query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Tests the html head links.
Тестирует ссылки в заголовке html.
public function testHtmlHeadLinks() { $support_ticket = $this->drupalCreateSupportTicket(); $this->drupalGet($support_ticket->urlInfo()); $result = $this->xpath('//link[@rel = "version-history"]'); $this->assertEqual($result[0]['href'], $support_ticket->url('version-history')); $result = $this->xpath('//link[@rel = "edit-form"]'); $this->assertEqual($result[0]['href'], $support_ticket->url('edit-form')); $result = $this->xpath('//link[@rel = "canonical"]'); $this->assertEqual($result[0]['href'], $support_ticket->url()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _check_head()\n\t{\n\t\tshow_error('debug does not work with the current version of Head library');\n\t\n\t\t$errors = '';\n\t\n\t\t//Check all the links for CSS\n\t\tforeach((array)$this->css as $css)\n\t\t{\n\t\t\t$file = is_array($css) ? $css[0] : $css;\n\t\t\tif ( ! file_exists($this->_get_link($file, 'css')))\n\t\t\t{\n\t\t\t\t$errors .= '<li>'.$file.' not found</li>';\n\t\t\t}\n\t\t}\n\n\t\t//Check all the links for JS\n\t\tforeach((array)$this->js as $js)\n\t\t{\n\t\t\t$file = is_array($js) ? $js[0] : $js;\n\t\t\tif ( ! file_exists($this->_get_link($file, 'js')))\n\t\t\t{\n\t\t\t\t$errors .= '<li>'.$file.' not found</li>';\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for favicon\n\t\tif ($this->use_favicon)\n\t\t{\n\t\t\tif ( ! file_exists($this->_get_link($this->favicon_location), 'favicon'))\n\t\t\t{\n\t\t\t\t$errors .= '<li>Favicon not found</li>';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (trim($errors))\n\t\t{\n\t\t\tshow_error('The following errors were encountered in the head area: <ul>'.$errors.'</ul>');\n\t\t}\n\t}", "public static function html_head_setup() {\n global $CFG, $PAGE;\n\n $clean = $PAGE->url->out(false);\n $output = '';\n\n if (isset($CFG->uncleanedurl)) {\n // This page came through router uncleaning.\n $output .= self::get_base_href($CFG->uncleanedurl);\n $output .= self::get_anchor_fix_javascript($clean);\n } else {\n // This page came through its canonical/legacy address (not clean version).\n $orig = $PAGE->url->raw_out(false);\n if ($orig != $clean) {\n // This page URL could have been cleaned up, so do it!\n $output .= self::get_base_href($orig);\n $output .= self::get_replacestate_script($clean);\n $output .= self::get_anchor_fix_javascript($clean);\n $output .= self::get_link_canonical();\n self::mark_apache_note($clean);\n }\n }\n\n return $output;\n }", "function getHtmlHead() {\n\n\t\treturn \"\";\n\t}", "private function _htmlHead ()\n {\n $htmlOut = \"<head>\\n\";\n $htmlOut .= \"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; \"\n . \"charset=\" . $this->getOption('charset') . \"\\\" />\\n\";\n if ($this->getBase()) {\n $htmlOut .= \"<base href=\\\"\" . $this->getBase() . \"\\\" />\\n\";\n }\n $htmlOut .= \"<title>\" . $this->getTitle() . \"</title>\\n\";\n $htmlOut .= $this->_renderMetaElements();\n $htmlOut .= $this->_renderCss();\n $htmlOut .= $this->_renderList($this->_links);\n $htmlOut .= $this->_renderList($this->_js[self::HTML_HEAD]);\n\n if ($this->_js[self::HTML_DEFERRED]) {\n $htmlOut .= $this->_renderJsDeferred(\n $this->_js[self::HTML_DEFERRED]\n );\n }\n\n $htmlOut .= $this->_headExtra;\n $htmlOut .= \"</head>\\n\";\n\n return $htmlOut;\n }", "protected function renderHeadHtml()\n {\n// debug($this);\n $lines = [];\n if (!empty($this->metaTags)) {\n $lines[] = implode(\"\\n\", $this->metaTags);\n }\n\n if (!empty($this->linkTags)) {\n $lines[] = implode(\"\\n\", $this->linkTags);\n }\n if (!empty($this->cssFiles[self::POS_HEAD])) {\n $lines[] = implode(\"\\n\", $this->cssFiles[self::POS_HEAD]);\n }\n\n// if (!empty($this->cssFiles)) {\n// $lines[] = implode(\"\\n\", $this->cssFiles);\n// }\n if (!empty($this->css)) {\n $lines[] = implode(\"\\n\", $this->css);\n }\n if (!empty($this->jsFiles[self::POS_HEAD])) {\n $lines[] = implode(\"\\n\", $this->jsFiles[self::POS_HEAD]);\n }\n if (!empty($this->js[self::POS_HEAD])) {\n $lines[] = Html::script(implode(\"\\n\", $this->js[self::POS_HEAD]));\n }\n\n if (!empty($this->html[self::POS_HEAD])) {\n $lines[] = implode(\"\\n\", $this->html[self::POS_HEAD]);\n }\n\n return empty($lines) ? '' : implode(\"\\n\", $lines);\n }", "public function GetHtmlHeadIncludes()\n {\n $aIncludes = array();\n\n return $aIncludes;\n }", "protected function renderHeadHtml()\n\t{\n\t\t$lines = array();\n\t\tif (!empty($this->metaTags)) {\n\t\t\t$lines[] = implode(\"\\n\", $this->metaTags);\n\t\t}\n\t\tif (!empty($this->linkTags)) {\n\t\t\t$lines[] = implode(\"\\n\", $this->linkTags);\n\t\t}\n\t\tif (!empty($this->cssFiles)) {\n\t\t\t$lines[] = implode(\"\", $this->cssFiles);\n\t\t}\n\t\tif (!empty($this->css)) {\n\t\t\t$lines[] = implode(\"\\n\", $this->css);\n\t\t}\n\t\tif (!empty($this->jsFiles[self::HEAD])) {\n\t\t\t$lines[] = implode(\"\", $this->jsFiles[self::HEAD]);\n\t\t}\n\t\tif (!empty($this->js[self::HEAD])) {\n\t\t\t$lines[] = Html::js(implode(\"\\n\", $this->js[self::HEAD]));\n\t\t}\n\t\treturn empty($lines) ? '' : implode(\"\\n\", $lines) . \"\\n\";\n\t}", "public static function head() {\n if(self::_is_searchable_page()){\n $search_handler_url = plugins_url('ajax_search_results.php', dirname(__FILE__));\n include('live-search.js.php');\n }\n }", "public function head(){\n return $this->html()->head();\n }", "public function testCreatePageWithHead()\n {\n// $page_data = (array)json_decode($json);\n// $page = $this->wordpress->createPage($page_data);\n $page = $this->wordpress->getPage(12345);\n $head = $page->getHead();\n $this->assertFalse(empty($head));\n $this->assertSame(\"On the horizon: looking ahead for global conservation, and hello from yoast\", $head->getTitle());\n }", "public function testHead()\n\t{\n\t\t$this->transport->expects($this->once())\n\t\t\t->method('request')\n\t\t\t->with('HEAD', new JUri('http://example.com'), null, array('testHeader'))\n\t\t\t->will($this->returnValue('ReturnString'));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->head('http://example.com', array('testHeader')),\n\t\t\t$this->equalTo('ReturnString')\n\t\t);\n\t}", "public function initializeHeadRequest()\n {\n $mockHTTPRequest = $this->getMock('stubHTTPRequest',\n array(),\n array($this->httpURL, new stubHeaderList(), 8)\n );\n $this->httpConnection->expects($this->once())\n ->method('createRequest')\n ->will($this->returnValue($mockHTTPRequest));\n $mockHTTPRequest->expects($this->never())\n ->method('preparePost');\n $mockHTTPResponse = $this->getMock('stubHTTPResponse',\n array(),\n array($this->getMock('stubSocket', array(), array('example.com')))\n );\n $mockHTTPRequest->expects($this->once())\n ->method('head')\n ->with(stubHTTPRequest::VERSION_1_1)\n ->will($this->returnValue($mockHTTPResponse));\n $this->assertSame($mockHTTPResponse, $this->httpConnection->head(stubHTTPRequest::VERSION_1_1));\n }", "public static function displayHeadTag() {\n echo \"\n <!--[if lt IE 7]> <html class=\\\"no-js lt-ie9 lt-ie8 lt-ie7\\\"> <![endif]-->\n <!--[if IE 7]> <html class=\\\"no-js lt-ie9 lt-ie8\\\"> <![endif]-->\n <!--[if IE 8]> <html class=\\\"no-js lt-ie9\\\"> <![endif]-->\n <!--[if gt IE 8]> <html class=\\\"no-js\\\"> <![endif]-->\n\n <head>\n <meta charset=\\\"utf-8\\\">\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\n <title>KARA DESIGNS</title>\n <meta name=\\\"description\\\" content=\\\"\\\">\n <meta name=\\\"viewport\\\" content=\\\"width=device-width\\\">\n <link href='http://fonts.googleapis.com/css?family=Quicksand|Muli'\n rel='stylesheet' type='text/css'>\n <link href='img/arrows.png' rel='shortcut icon' />\n <link rel=\\\"stylesheet\\\" href=\\\"css/normalize.css\\\">\n <link rel=\\\"stylesheet\\\" href=\\\"css/bootstrap.css\\\">\n <link rel=\\\"stylesheet\\\" href=\\\"css/main.css\\\">\n <script src=\\\"js/vendor/modernizr-2.6.2.min.js\\\"></script>\n <script src=\\\"js/picturefill.js\\\"></script>\n </head>\";\n }", "public function include_head()\n\t\t{\n\t\t\tif ($this->hasHeader) {\n\t\t\t\tinclude_once(CURRENT_BASE.\"partials/template_head.php\");\n\t\t\t} else{\n\t\t\t\tinclude_once(CURRENT_BASE.\"partials/HTML_head_includes.php\");\n\t\t\t}\n\t\t}", "public function isHead() {\n return $this->method() == 'HEAD';\n }", "public function isHead()\n {/*{{{*/\n return ($this->method === self::METHOD_HEAD);\n }", "function isHead() {\n\t\treturn ($this->method == 'HEAD');\n\t}", "function getHead() {\n\t\t$document=& JFactory::getDocument();\n\t\treturn $document->get('head');\n\t }", "function wunderpong_html_head_alter(&$head_elements) {\n // Unset meta variables.\n unset($head_elements['system_meta_generator']);\n foreach ($head_elements as $key => $element) {\n if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'shortlink') {\n unset($head_elements[$key]);\n }\n $head_elements['system_meta_content_type']['#attributes'] = array(\n 'charset' => 'utf-8',\n );\n }\n}", "function add_link_to_head() {\r\n echo \"\\n\\n<!-- Start LH RDF -->\\n\";\r\n foreach ($this->format_mapper as $key => $value){\r\n echo \"<link rel=\\\"meta\\\" type=\\\"\".$value.\"\\\" title=\\\"$key format link\\\" href=\\\"\".$this->get_link($key).\"\\\" />\\n\";\r\n }\r\n echo \"<!-- End LH RDF -->\\n\\n\";\r\n }", "public function shareride_head(){\r\n\t\t\t?>\r\n\t\t\t<!DOCTYPE html>\r\n\t\t\t<html>\r\n\t\t\t<head>\r\n\t\t\t\t<title><?= CONF['site']['title'] ?></title>\r\n\t\t\t\t<!-- use iso-8859-1 charset if you need to support languages like French -->\r\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n\t\t\t\t<!-- Includes the favicon -->\r\n\t\t\t\t<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n\t\t\t\t<!-- Includes all stylesheets -->\r\n\t\t\t\t<?php\r\n\t\t\t\t\tforeach($_SESSION['reader']['style'] as $style => $stylesheet){\r\n\t\t\t\t\t\techo '<link rel=\"stylesheet\" href=\"/static/css/' . $stylesheet . '\" />'; \r\n\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t\t\r\n\t\t\t\t<!-- Include all scripts -->\r\n\t\t\t\t<?php\r\n\t\t\t\t\tforeach($_SESSION['reader']['script'] as $script => $scriptname){\r\n\t\t\t\t\t\techo '<script src=\"/static/js/' . $scriptname . '\"></script>'; \r\n\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t</head>\r\n\t\t\t<body>\r\n\t\t\t<?php\r\n\t\t}", "public function testSeparatingBodyFromHead() {\n\t\t$response = $this->http->request('http://example.com/');\n\t\t$this->assertEquals('Test Body', $response->body);\n\t}", "function isHead()\n {\n\n }", "function hime_html_head( $context = 'index', $title = '' )\n{\n\n\tyourls_do_action( 'pre_html_head', $context, $title );\n\n\t// All components to false, except when specified true\n\t$share = $insert = $tablesorter = $tabs = $cal = $charts = false;\n\n\t// Load components as needed\n\tswitch ( $context ) {\n\t\tcase 'infos':\n\t\t\t$share = $tabs = $charts = true;\n\t\t\tbreak;\n\n\t\tcase 'bookmark':\n\t\t\t$share = $insert = $tablesorter = true;\n\t\t\tbreak;\n\n\t\tcase 'index':\n\t\t\t$insert = $tablesorter = $cal = $share = true;\n\t\t\tbreak;\n\n\t\tcase 'plugins':\n\t\tcase 'tools':\n\t\t\t$tablesorter = true;\n\t\t\tbreak;\n\n\t\tcase 'install':\n\t\tcase 'login':\n\t\tcase 'new':\n\t\tcase 'upgrade':\n\t\t\tbreak;\n\t}\n\n\t// Force no cache for all admin pages\n\tif( yourls_is_admin() && !headers_sent() ) {\n\t\theader( 'Expires: Thu, 23 Mar 1972 07:00:00 GMT' );\n\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\theader( 'Cache-Control: no-cache, must-revalidate, max-age=0' );\n\t\theader( 'Pragma: no-cache' );\n\t\tyourls_content_type_header( yourls_apply_filter( 'html_head_content-type', 'text/html' ) );\n\t\tyourls_do_action( 'admin_headers', $context, $title );\n\t}\n\n\t// Store page context\n\tyourls_set_html_context($context);\n\n\t// Body class\n\t$bodyclass = yourls_apply_filter( 'bodyclass', '' );\n\t$device = yourls_is_mobile_device() ? 'mobile' : 'desktop';\n\t$bodyclass .= $device;\n\n\t// Page title\n\t$_title = HTML_TITLE;\n\t$title = $title ? $title . \" &laquo; \" . $_title : $_title;\n\t$title = yourls_apply_filter( 'html_title', $title, $context );\n\n\t?>\n<!DOCTYPE html>\n<html <?php yourls_html_language_attributes(); ?>>\n<head>\n\t<title><?php echo $title ?></title>\n\t<?php yourls_do_action('html_head_meta', $context); ?>\n\t<meta http-equiv=\"Content-Type\" content=\"<?php echo yourls_apply_filter( 'html_head_meta_content-type', 'text/html; charset=utf-8' ); ?>\" />\n\t<meta name=\"author\" content=\"Hebiame, Kenstin\">\n\t<meta name=\"keywords\" content=\"awesome, hime, url, shortener\">\n\t<meta name=\"description\" content=\"Awesome Hime URL Shortener at <?php yourls_site_url(); ?>\" />\n\t<meta name=\"referrer\" content=\"always\" />\n\t<meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0\">\n\t<link href=\"https://fonts.googleapis.com/css?family=Fira+Sans:300\" rel=\"stylesheet\">\n\t<link href=\"https://fonts.googleapis.com/css?family=Share+Tech+Mono\" rel=\"stylesheet\">\n\t<link href=\"https://fonts.googleapis.com/css?family=Amatic+SC:400,700\" rel=\"stylesheet\">\n\t<link href=\"https://fonts.googleapis.com/css?family=Dancing+Script\" rel=\"stylesheet\">\n\t<link rel=\"icon\" type=\"image/png\" href=\"/hime-theme/img/favicon-32x32.png\" sizes=\"32x32\" />\n\t<link rel=\"icon\" type=\"image/png\" href=\"/hime-theme/img/favicon-16x16.png\" sizes=\"16x16\" />\n\t<link rel=\"stylesheet\" href=\"<?php yourls_site_url(); ?>/hime-theme/styles/main.css\" type=\"text/css\" media=\"screen\" />\n\t<script src=\"<?php yourls_site_url(); ?>/js/jquery-2.2.4.min.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t<script src=\"<?php yourls_site_url(); ?>/js/common.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t<script src=\"<?php yourls_site_url(); ?>/js/jquery.notifybar.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t<?php if ( $device == 'mobile' ) { ?>\n\t\t<link rel=\"stylesheet\" href=\"<?php yourls_site_url(); ?>/hime-theme/styles/mobile.css\" type=\"text/css\" media=\"screen\" />\n\t<?php } else { ?>\n\t\t<link rel=\"stylesheet\" href=\"<?php yourls_site_url(); ?>/hime-theme/styles/desktop.css\" type=\"text/css\" media=\"screen\" />\n\t<?php } ?>\n\t<?php if ( $tabs ) { ?>\n\t\t<link rel=\"stylesheet\" href=\"<?php yourls_site_url(); ?>/css/infos.css?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/css\" media=\"screen\" />\n\t\t<script src=\"<?php yourls_site_url(); ?>/js/infos.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t<?php } ?>\n\t<?php if ( $tablesorter ) { ?>\n\t\t<link rel=\"stylesheet\" href=\"<?php yourls_site_url(); ?>/css/tablesorter.css?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/css\" media=\"screen\" />\n\t\t<script src=\"<?php yourls_site_url(); ?>/js/jquery.tablesorter.min.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t<?php } ?>\n\t<?php if ( $insert ) { ?>\n\t\t<script src=\"<?php yourls_site_url(); ?>/js/insert.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t<?php } ?>\n\t<?php if ( $share ) { ?>\n\t\t<link rel=\"stylesheet\" href=\"<?php yourls_site_url(); ?>/hime-theme/styles/share.css\" type=\"text/css\" media=\"screen\" />\n\t\t<script src=\"<?php yourls_site_url(); ?>/js/share.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t\t<script src=\"<?php yourls_site_url(); ?>/js/clipboard.min.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t<?php } ?>\n\t<?php if ( $cal ) { ?>\n\t\t<link rel=\"stylesheet\" href=\"<?php yourls_site_url(); ?>/css/cal.css?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/css\" media=\"screen\" />\n\t\t<?php yourls_l10n_calendar_strings(); ?>\n\t\t<script src=\"<?php yourls_site_url(); ?>/js/jquery.cal.js?v=<?php echo YOURLS_VERSION; ?>\" type=\"text/javascript\"></script>\n\t<?php } ?>\n\t<?php if ( $charts ) { ?>\n\t\t\t<script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"></script>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t google.load('visualization', '1.0', {'packages':['corechart', 'geochart']});\n\t\t\t</script>\n\t<?php } ?>\n\t<script type=\"text/javascript\">\n\t//<![CDATA[\n\t\tvar ajaxurl = '<?php echo yourls_admin_url( 'admin-ajax.php' ); ?>';\n\t//]]>\n\t</script>\n\t<?php yourls_do_action( 'html_head', $context ); ?>\n</head>\n<body class=\"<?php echo $context; ?> <?php echo $bodyclass; ?>\">\n<main>\n\t<div id=\"thanks-section\">\n\t\t<ul>Thanks <span style=\"font-size: 30px\">&#10084</span>\n\t\t\t<li>Filip, Aleksandra</li>\n\t\t</ul>\n\t</div> \n\t<?php\n}", "public function standard_head_html() {\n $output = '';\n $output .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />' . \"\\n\";\n $output .= '<meta name=\"keywords\" content=\"moodle, ' . $this->page->title . '\" />' . \"\\n\";\n\n // Load the Plugin specific stylesheet.\n $this->page->requires->css('/local/brightcove/styles.css');\n // Allow themes override some styles.\n global $CFG;\n if (file_exists($CFG->dirroot . '/theme/' . $this->page->theme->name. '/style/brightcove.css')) {\n $this->page->requires->css('/theme/' . $this->page->theme->name. '/style/brightcove.css');\n }\n\n // Get the theme javascript head and footer.\n if ($jsurl = $this->page->theme->javascript_url(true)) {\n $this->page->requires->js($jsurl, true);\n }\n if ($jsurl = $this->page->theme->javascript_url(false)) {\n $this->page->requires->js($jsurl);\n }\n\n // Get any HTML from the page_requirements_manager.\n $output .= $this->page->requires->get_head_code($this->page, $this);\n\n return $output;\n }", "public function isHead()\n {\n return $this->isMethod('HEAD');\n }", "private function addHeadTemplate() {\n\t\t$this->_registry->getObject('template')->addTemplateBit('head', 'head.tpl.html');\n\t}", "function html_head ($pagetitle, $pagecss = \"web/css/lincoln.css\", $finish = true) {\n print \"<html>\n <head>\n <title>The Martyred President : $pagetitle</title>\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=iso-8859-1\\\">\n <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"$pagecss\\\">\n\t\t<link rel=\\\"shortcut icon\\\" href=\\\"images/lincoln.ico\\\">\";\n if ($finish) print \"\\n</head>\";\n}", "public function getHtmlHeadEntrySet()\n\t{\n\t\treturn $this->_htmlHeadEntrySet;\n\t}", "public function isHead()\n {\n return $this->getMethod() === 'HEAD';\n }", "public function GetHtmlHeadIncludes()\n {\n $aIncludes = parent::GetHtmlHeadIncludes();\n $aIncludes[] = '<script src=\"'.TGlobal::GetStaticURLToWebLib('/javascript/jquery-ui-1.12.1.custom/jquery-ui.js').'\" type=\"text/javascript\"></script>';\n $aIncludes[] = '<script src=\"'.TGlobal::GetStaticURLToWebLib('/javascript/jquery/cookie/jquery.cookie.js').'\" type=\"text/javascript\"></script>';\n $aIncludes[] = '<script src=\"'.TGlobal::GetStaticURLToWebLib('/javascript/jquery/jsTree/jquery.jstree.js').'\" type=\"text/javascript\"></script>';\n\n return $aIncludes;\n }", "protected function _parse_head()\n {\n // Parse the HEAD variables\n parse_str(parse_url($this->input->server('REQUEST_URI'), PHP_URL_QUERY), $head);\n\n // Merge both the URI segments and HEAD params\n $this->_head_args = array_merge($this->_head_args, $head);\n }", "public function isHead()\n {\n return $this->getMethod() === self::METHOD_HEAD;\n }", "function testHEADCollection() {\n\n $request = new HTTP\\Request('HEAD', '/dir');\n $response = $this->request($request);\n\n $this->assertEquals(200, $response->getStatus());\n\n }", "function print_head()\n\t{\n\t\t$html = '';\n\t\t\n\t\t$html .= html_tag('script', array('src' => $this->get_ember_js_url(), 'type' => 'text/javascript'));\n\t\t\n\t\t$html .= html_tag('script', array('cddata' => $this->get_domready(), 'type' => 'text/javascript'));\n\t\t\n\t\techo $html;\n\t}", "public function onBeforeCompileHead()\n\t{\n\t\tJavascriptLibraries::seed_document_head($this->params);\n\n\t\treturn true;\n\t}", "public function getHeadLinks() {\n if (!$this->_headLinks)\n $this->_headLinks = array();\n\n return join('', $this->_headLinks);\n }", "function addHead()\n\t{\n\t\t//TODO: should we return null here\n\t\t//we do not really need a header here\n\n\t\t// BOOTSTRAP CSS\n\t\t//$this->addCss ('bootstrap', false); \n\t\t//$this->addCss ('t3-admin-layout-preview', false); \n\n\t\t// Add scripts\n\t\t//$this->addScript (T3_URL.'/bootstrap/js/jquery.js');\n\t\t//$this->addScript (T3_URL.'/bootstrap/js/bootstrap.js');\n\t}", "public function isHead()\n {\n return (isset($this->server['REQUEST_METHOD']) && ($this->server['REQUEST_METHOD'] == 'HEAD'));\n }", "function head ($headTpl = \"head.tpl\"){\n if(!empty($headTpl)){\n $this->head = file_get_contents($this->tplDir . $headTpl);\n echo $this->head;\n return true;\n }else return false;\n }", "public function head_link(){\n\t\t\t\t\t\n\t\t$url = esc_url(home_url('humans.txt'));\n\t\techo \"<link rel='author' href='{$url}'>\\n\";\n\t}", "public function getIsHead()\n {\n return $this->getMethod() === 'HEAD';\n }", "public function head()\n {\n foreach($this->_assets as $asset) {\n echo $asset->getAllCssIncludes();\n }\n }", "public function testHead()\n {\n $this->todo('stub');\n }", "function portfolio_headers()\n\t{\n\t\t//Could check for existence of css and js in user template here\n\t\trequire_once(\"incl/header.incl.php\");\n\t}", "function drupal_set_html_head($data = NULL) {\n static $stored_head = '';\n\n if (!is_null($data)) {\n $stored_head .= $data .\"\\n\";\n }\n return $stored_head;\n}", "private function add_head_elements()\n {\n $this->mvc->head->add_link\n (\n array\n (\n 'rel' => 'stylesheet',\n 'type' => 'text/css',\n 'href' => MIDGARDMVC_STATIC_URL . '/midgardmvc_account/css/account.css'\n )\n );\n }", "function htmlHead( $data ) {\n\tif ( isset( $data[ 'exist' ] ) && !$data[ 'exist' ] ) return;\n\t\n\t$title = $data[ 'title' ];\n\t$subhead = $data[ 'subhead' ] ?? '';\n\t$status = $data[ 'status' ] ?? '';\n\t$button = $data[ 'button' ] ?? '';\n\t$button1 = $data[ 'button1' ] ?? '';\n\t$help = $data[ 'help' ] ?? '';\n\t$class = $status ? 'status' : '';\n\t$class.= $subhead ? ' sub' : '';\n\t\n\t$html.= $status ? '<heading data-status=\"'.$status.'\"' : '<heading';\n\t$html.= $class ? ' class=\"'.$class.'\">' : '>';\n\t$html.= '<span class=\"headtitle\">'.$title.'</span>';\n\t$html.= $button ? '<i id=\"'.$button[ 0 ].'\" class=\"fa fa-'.$button[ 1 ].'\"></i>' : '';\n\t$html.= $button1 ? '<i id=\"'.$button1[ 0 ].'\" class=\"fa fa-'.$button1[ 1 ].'\"></i>' : '';\n\t$html.= isset( $data[ 'nohelp' ] ) || $subhead ? '' : '<i class=\"help fa fa-question-circle\"></i>';\n\t$html.= isset( $data[ 'back' ] ) ? '<i class=\"fa fa-arrow-left back\"></i>' : '';\n\t$html.= '</heading>';\n\t$html.= $help ? '<span class=\"help-block hide\">'.$help.'</span>' : '';\n\t$html.= $status ? '<pre id=\"code'.$status.'\" class=\"status hide\"></pre>' : '';\n\t\n\techo $html;\n}", "public function siteHead()\n {\n\t\t\t$PathPlugins = $this->htmlPath().'libs/';\t \n\t\t\t$html = '<link rel=\"stylesheet\" href=\"'.$PathPlugins.'css/rrssb.css\" />'.PHP_EOL; \n\t\t\treturn $html; \n\t}", "public static function isHead()\n {\n return self::method() === self::METHOD_HEAD;\n }", "public function testHeaders()\n {\n $response = $this->runApp('GET', '/css?family=Open+Sans');\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertTrue((bool)preg_match('~^text/css(;|$)~', $response->getHeaderLine('Content-Type')));\n $this->assertTrue($response->hasHeader('Cache-Control'));\n $this->assertTrue($response->hasHeader('Pragma'));\n }", "public function getHead() {\r\n\t\t\r\n\t\t//Empty sting to concatenate the HTML output\r\n\t\t$content = \"\";\r\n\t\t\r\n\t\t//Head\r\n\t\t$content .= '<head>';\r\n\t\t\r\n\t\t\t//Meta contents\r\n\t\t\t$content .= '<meta charset=\"utf-8\">';\r\n\t\t\t$content .= '<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">';\r\n\t\t\t\r\n\t\t\t//Webpage title\r\n\t\t\t$content .= '<title>'. $this->websiteTitle .' - '. $this->pageTitle .'</title>';\r\n\t\t\t\r\n\t\t\t/* CSS Files */\r\n\t\t\t//Bootstrap core CSS\r\n\t\t\t$content .= '<link href=\"vendor/bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">';\r\n\t\t\t\r\n\t\t\t//Custom CSS\r\n\t\t\t$content .= '<link href=\"css/safetyFirst.css\" rel=\"stylesheet\">';\r\n\t\t\t\r\n\t\t$content .= '</head>';\r\n\t\t\r\n\t\t//Return the head contents to the caller function\r\n\t\treturn $content;\r\n\t}", "public function isHead()\n {\n if ('HEAD' == $this->getMethod()) {\n return true;\n }\n return false;\n }", "function local_agent_before_standard_html_head() {\n global $PAGE;\n\n if (local_agent_istobeshown()) {\n $PAGE->requires->css('/local/agent/lib/clippy.js/build/clippy.css');\n }\n\n return '';\n}", "function head($uri, array $headers = array());", "function TitleMIssingOrNotWithinHead() {\n // GLOBALS\n global $_ft_dom_;\n global $_ft_dom_element_head_;\n\n $sug = (object) [\n 'title' => 'Title element is missing or not within &#x3C;head&#x3E;',\n 'description' => 'Fun fact: The &#x3C;title&#x3E; tag is the only element of and HTML document that is always required. &#x3C;title&#x3E; is included within &#x3C;head&#x3E;.',\n 'weight' => 80,\n 'references' => ['https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title'],\n 'category' => ['content'],\n ];\n\n // RULE CODE\n // Search WHOLE DOM for title tag\n $title_elements = $_ft_dom_->getElementsByTagName('title');\n\n // Search HEAD for title tag\n $title_elements_in_head = $_ft_dom_element_head_->getElementsByTagName('title');\n\n if($title_elements->length == 0 || $title_elements_in_head->length == 0) { \n return $sug;\n }\n\n return false;\n}", "protected function get_html_head_markup() {\n\t\tob_start();\n\t\t?>\n\t\t<meta name=\"amp-story-generator-name\" content=\"Web Stories for WordPress\" />\n\t\t<meta name=\"amp-story-generator-version\" content=\"<?php echo esc_attr( WEBSTORIES_VERSION ); ?>\" />\n\t\t<?php\n\n\t\t/**\n\t\t * Prints scripts or data in the head tag on the front end.\n\t\t */\n\t\tdo_action( 'web_stories_story_head' );\n\n\t\treturn (string) ob_get_clean();\n\t}", "private function load_headers() {\n $headers = $this->parsed_page->headers();\n if (isset($headers['title'])) {\n $this->title = $headers['title'];\n }\n if (isset($headers['template'])) {\n $this->template = $headers['template'];\n }\n }", "function addCustomHeadTag( $html ) {\n\t\t$document=& JFactory::getDocument();\n\t\treturn $document->addCustomTag($html);\n\t}", "public static function addHeadItem($html)\n {\n self::$headItems[] = $html;\n }", "public static function addHeadStuff()\n\t{\n\t\tif (RL_Document::isFeed() || JFactory::getApplication()->input->getInt('print', 0))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$params = Params::get();\n\n\t\tif ( ! $params->load_bootstrap_framework && $params->load_jquery)\n\t\t{\n\t\t\tJHtml::_('jquery.framework');\n\t\t}\n\n\t\tif ($params->load_bootstrap_framework)\n\t\t{\n\t\t\tJHtml::_('bootstrap.framework');\n\t\t}\n\n\n\t\t$options = [\n\t\t\t'use_hash' => (int) $params->use_hash,\n\t\t\t'reload_iframes' => (int) $params->reload_iframes,\n\t\t\t'init_timeout' => (int) $params->init_timeout,\n\t\t\t'urlscroll' => 0,\n\t\t];\n\n\t\tRL_Document::scriptOptions($options, 'Sliders');\n\n\t\tRL_Document::script('sliders/script.min.js', ($params->media_versioning ? '7.7.9' : ''));\n\n\t\tif ($params->load_stylesheet)\n\t\t{\n\t\t\tRL_Document::style('sliders/style.min.css', ($params->media_versioning ? '7.7.9' : ''));\n\t\t}\n\n\t}", "function ui_head($title) {\n print \"<!DOCTYPE html><html>\\n<head>\\n\";\n print \"<title>Jdrop | $title</title>\\n\";\n print \"<meta http-equiv='content-type' content='text/html; charset=UTF-8' />\\n\";\n print \"<meta name='viewport' content='width=device-width,initial-scale=1.0'>\\n\";\n print \"<meta name='keywords' content='mobile json phone developer software development debug performance' />\\n\";\n ui_style();\n print \"</head>\\n<body>\\n\";\n print \"<header><hgroup><h1>Jdrop</h1><h2>JSON in the cloud</h2></hgroup></header>\\n<nav>\\n<ul>\";\n ui_nav();\n print \"</ul></nav><article>\";\n ui_account();\n print \"<h2>$title</h2>\";\n}", "public function testProxyHEADNode()\n {\n }", "protected function generateHTMLHead($html = \"\")\n\t\t{\n\t\t\tglobal $config, $logged_user;\n\n\t\t\t// Begin building the header\n\n\t\t\t$out = \"<!DOCTYPE html>\n\t\t\t<html><head>\n\t\t\t<meta charset='UTF-8'>\n\t\t\t<meta http-equiv='X-UA-Compatible' content='IE=chrome'>\n\t\t\t<meta name='viewport' content='width=device-width, initial-scale=1.0'>\n\t\t\t<meta name='viewport' content='width=device-width, initial-scale=1'>\n\t\t\t<meta name='author' content='Aaron Elizondo'>\";\n $out .= \"<title>{$this->title}</title>\";\n\t\t\t$out .= $this->printStylesheets();\n\t\t\t//$out .= \"<script>var baseURL='{$config['abs_url']}';</script>\";\n\n\t\t\t$out .= $html;\n\t\t\t$out .= \"</head>\";\n\n\t\t\treturn $out;\n\t\t}", "function springy_process_html(&$vars) {\r\n $vars['head_scripts'] = drupal_get_js('head_scripts');\r\n}", "public function isHead()\n {\n return ($this->getMethod() == self::METHOD_HEAD);\n }", "function PrintHead()\n{\n $head = file_get_contents(\"templates/head.html\");\n print $head;\n}", "public function head($url, $headers = array(), $options = array())\n {\n }", "function faq_therapist_head() {\n $this->output = $this->build_template($this->get_template(\"faq_therapist_head\"));\n }", "function filterHead()\n{\n $patterns = array(\n \"/<!--(?!\\s*\\[).*?-->/s\" => \"\",\n \"/(^[\\r\\n]*|[\\r\\n]+)[\\s\\t]*[\\r\\n]+/\" => \"\\n\",\n \"/\\n+\\s*</\" => \"\\n\" . $pOptions['spacer'] . \"<\",\n );\n ob_start();\n wp_head();\n echo preg_replace(array_keys($patterns), array_values($patterns), ob_get_clean());\n}", "public function testTitleSet()\n {\n /** @var BViewHead $head */\n $head = BViewHead::i(true);\n $head->setTitle(\"Test\");\n\n $this->assertEquals('<title>Test</title>', $head->getTitle());\n }", "protected function get_html_head_markup(): string {\n\t\tob_start();\n\t\t?>\n\t\t<meta name=\"amp-story-generator-name\" content=\"Web Stories for WordPress\" />\n\t\t<meta name=\"amp-story-generator-version\" content=\"<?php echo esc_attr( WEBSTORIES_VERSION ); ?>\" />\n\t\t<?php\n\n\t\t/**\n\t\t * Prints scripts or data in the head tag on the front end.\n\t\t */\n\t\tdo_action( 'web_stories_story_head' );\n\n\t\treturn (string) ob_get_clean();\n\t}", "function addHead($head) {\r\n\t\t$regex = \"#([<]!--%HEAD%--[>])#\";\r\n\t\t$this->template = preg_replace($regex,$head.\"\\n<!--%HEAD%-->\",$this->template);\r\n\t}", "public function isHeadRequest () {\r\n return $this->_is_head_request;\r\n }", "public function fetchHead(&$document)\n\t{\n\t\t// Trigger the onBeforeCompileHead event (skip for installation, since it causes an error)\n\t\t\\Event::trigger('onBeforeCompileHead');\n\n\t\t// Get line endings\n\t\t$lnEnd = $document->_getLineEnd();\n\t\t$tab = $document->_getTab();\n\t\t$tagEnd = ' />';\n\t\t$buffer = array();\n\n\t\t// Generate base tag (need to happen first)\n\t\t$base = $document->getBase();\n\t\tif (!empty($base))\n\t\t{\n\t\t\t$buffer[] = $tab . '<base href=\"' . $document->getBase() . '\" />';\n\t\t}\n\n\t\t// Generate META tags (needs to happen as early as possible in the head)\n\t\tforeach ($document->_metaTags as $type => $tag)\n\t\t{\n\t\t\tforeach ($tag as $name => $content)\n\t\t\t{\n\t\t\t\tif ($type == 'http-equiv')\n\t\t\t\t{\n\t\t\t\t\t$content .= '; charset=' . $document->getCharset();\n\t\t\t\t\t$buffer[] = $tab . '<meta http-equiv=\"' . $name . '\" content=\"' . htmlspecialchars($content) . '\" />';\n\t\t\t\t}\n\t\t\t\telseif ($type == 'standard' && !empty($content) && isset($content['content']))\n\t\t\t\t{\n\t\t\t\t\t$buffer[] = $tab . '<meta name=\"' . $content['name'] . '\" content=\"' . htmlspecialchars($content['content']) . '\" />';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Don't add empty descriptions\n\t\tif ($description = $document->getDescription())\n\t\t{\n\t\t\t$buffer[] = $tab . '<meta name=\"description\" content=\"' . htmlspecialchars($description) . '\" />';\n\t\t}\n\n\t\t// Don't add empty generators\n\t\tif ($generator = $document->getGenerator())\n\t\t{\n\t\t\t$buffer[] = $tab . '<meta name=\"generator\" content=\"' . htmlspecialchars($generator) . '\" />';\n\t\t}\n\n\t\t$buffer[] = $tab . '<title>' . htmlspecialchars($document->getTitle(), ENT_COMPAT, 'UTF-8') . '</title>';\n\n\t\t// Generate link declarations\n\t\tforeach ($document->_links as $link => $linkAtrr)\n\t\t{\n\t\t\t$line = $tab . '<link href=\"' . $link . '\" ' . $linkAtrr['relType'] . '=\"' . $linkAtrr['relation'] . '\"';\n\t\t\tif ($temp = Arr::toString($linkAtrr['attribs']))\n\t\t\t{\n\t\t\t\t$line .= ' ' . $temp;\n\t\t\t}\n\t\t\t$line .= ' />';\n\n\t\t\t$buffer[] = $line;\n\t\t}\n\n\t\t// Generate stylesheet links\n\t\tforeach ($document->_styleSheets as $strSrc => $strAttr)\n\t\t{\n\t\t\t$line = $tab . '<link rel=\"stylesheet\" href=\"' . $strSrc . '\" type=\"' . $strAttr['mime'] . '\"';\n\t\t\tif (!is_null($strAttr['media']))\n\t\t\t{\n\t\t\t\t$line .= ' media=\"' . $strAttr['media'] . '\" ';\n\t\t\t}\n\t\t\tif ($temp = Arr::toString($strAttr['attribs']))\n\t\t\t{\n\t\t\t\t$line .= ' ' . $temp;\n\t\t\t}\n\n\t\t\t$buffer[] = $line . $tagEnd;\n\t\t}\n\n\t\t// Generate stylesheet declarations\n\t\tforeach ($document->_style as $type => $content)\n\t\t{\n\t\t\t$buffer[] = $tab . '<style type=\"' . $type . '\">';\n\n\t\t\t// This is for full XHTML support.\n\t\t\tif ($document->_mime != 'text/html')\n\t\t\t{\n\t\t\t\t$buffer[] = $tab . $tab . '<![CDATA[';\n\t\t\t}\n\n\t\t\t$buffer[] = $content;\n\n\t\t\t// See above note\n\t\t\tif ($document->_mime != 'text/html')\n\t\t\t{\n\t\t\t\t$buffer[] = $tab . $tab . ']]>';\n\t\t\t}\n\t\t\t$buffer[] = $tab . '</style>';\n\t\t}\n\n\t\t// Generate script file links\n\t\tforeach ($document->_scripts as $strSrc => $strAttr)\n\t\t{\n\t\t\t$line = $tab . '<script src=\"' . $strSrc . '\"';\n\t\t\tif (!is_null($strAttr['mime']))\n\t\t\t{\n\t\t\t\t$line .= ' type=\"' . $strAttr['mime'] . '\"';\n\t\t\t}\n\t\t\tif ($strAttr['defer'])\n\t\t\t{\n\t\t\t\t$line .= ' defer=\"defer\"';\n\t\t\t}\n\t\t\tif ($strAttr['async'])\n\t\t\t{\n\t\t\t\t$line .= ' async=\"async\"';\n\t\t\t}\n\t\t\t$line .= '></script>';\n\n\t\t\t$buffer[] = $line;\n\t\t}\n\n\t\t// Generate script declarations\n\t\tforeach ($document->_script as $type => $content)\n\t\t{\n\t\t\t$buffer[] = $tab . '<script type=\"' . $type . '\">';\n\n\t\t\t// This is for full XHTML support.\n\t\t\tif ($document->_mime != 'text/html')\n\t\t\t{\n\t\t\t\t$buffer[] = $tab . $tab . '<![CDATA[';\n\t\t\t}\n\n\t\t\tif (is_array($content))\n\t\t\t{\n\t\t\t\tforeach ($content as $c)\n\t\t\t\t{\n\t\t\t\t\t$buffer[] = $c;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$buffer[] = $content;\n\t\t\t}\n\n\t\t\t// See above note\n\t\t\tif ($document->_mime != 'text/html')\n\t\t\t{\n\t\t\t\t$buffer[] = $tab . $tab . ']]>';\n\t\t\t}\n\t\t\t$buffer[] = $tab . '</script>';\n\t\t}\n\n\t\t// Generate script language declarations.\n\t\tif (count(\\Lang::script()))\n\t\t{\n\t\t\t$buffer[] = $tab . '<script type=\"text/javascript\">';\n\t\t\t$buffer[] = $tab . $tab . '(function() {';\n\t\t\t$buffer[] = $tab . $tab . $tab . 'var strings = ' . json_encode(\\Lang::script()) . ';';\n\t\t\t$buffer[] = $tab . $tab . $tab . 'if (typeof Hubzero == \\'undefined\\') {';\n\t\t\t$buffer[] = $tab . $tab . $tab . $tab . 'Hubzero = {};';\n\t\t\t$buffer[] = $tab . $tab . $tab . $tab . 'Hubzero.Lang = strings;';\n\t\t\t$buffer[] = $tab . $tab . $tab . '} else {';\n\t\t\t$buffer[] = $tab . $tab . $tab . $tab . 'Hubzero.Lang.load(strings);';\n\t\t\t$buffer[] = $tab . $tab . $tab . '}';\n\t\t\t$buffer[] = $tab . $tab . '})();';\n\t\t\t$buffer[] = $tab . '</script>';\n\t\t}\n\n\t\tforeach ($document->_custom as $custom)\n\t\t{\n\t\t\t$buffer[] = $tab . $custom;\n\t\t}\n\n\t\treturn implode($lnEnd, $buffer);\n\t}", "function rest_output_link_wp_head()\n{\n}", "public function isHead()\n {\n return (Request::METHOD_HEAD == $this->method);\n }", "function html5_head($content) {\r\n\t$content = \"<head>\";\r\n\t$content .= \"\\n\";\r\n\t$content .= \"<meta charset=\\\"utf-8\\\">\";\r\n\t$content .= \"\\n\";\r\n\treturn $content;\r\n}", "public function testUrlDoesContainQueryParamsIfMethodIsHead()\n {\n $url = 'http://test.com';\n\n $data = array(\n 'test_param1' => 'Testing1',\n 'test_param2' => 'Testing2'\n );\n\n $request = $this->getRequest();\n $request->setMethod('HEAD');\n $request->setUrl($url);\n $request->setRequestData($data);\n\n $expectedUrl = $url . '?test_param1=Testing1&test_param2=Testing2';\n\n $this->assertSame($expectedUrl, $request->getUrl());\n }", "function BasicHead( $css = \"\" )\n {\n global $_application_folder;\n\n $str_stylesheets = \"\";\n if ( is_array($css))\n {\n foreach( $css as $stylesheet )\n {\n $str_stylesheets .= '<link rel=\"stylesheet\" href=\"' . $_application_folder . '/css/' . $stylesheet . '\">' ;\n }\n }\n\n $data = array(\"stylesheets\" => $str_stylesheets );\n $template = $this->LoadTemplate(\"basic_head\");\n print $this->ReplaceContentOneRow($data, $template);\n\n $_SESSION[\"head_printed\"] = true;\n }", "function insert_head($title, $keywords, $description)\r\n{\r\n\techo '\r\n\t\t<head>\r\n\t\r\n\t\t\t<title>'. $title .'</title>\r\n\t\t\t<meta name=\"keywords\" content=\"SOBE, cleaning, green, professional, housekeepers, housekeeping, eco-friendly, eco, friendly, upholstery, cleaning, service, office, clean, carpet, business, washington, dc, district, \r\n\t\t\tcolumbia, virginia, maryland, organic, home,\r\n\t\t\tpet, safe, family, professional, efficient, carpet , house, maid, '. $keywords . '\">\r\n\t\t\t\r\n\t\t\t<meta http-equiv=\"Content-Language\" content=\"en\">\r\n\t\t\t<meta charset=\"utf-8\">\r\n\t\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\t\t\r\n\t\t\t<meta name=\"description\" content=\"' . $description . '\">\r\n\t\t\t<meta name=\"author\" content=\"Jorge Sepulveda, jorluiseptor.com\">\t\t\r\n\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n\t\t\t<a href=\"https://plus.google.com/103966360317515172512\" rel=\"publisher\" />\t\r\n\t\t\t<link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n\t\t\t<link rel=\"apple-touch-icon\" href=\"/apple-touch-icon.png\">\r\n\t\t\t\r\n\t\t\t<!-- CSS: implied media=\"all\" -->\r\n\t\t\t<link rel=\"stylesheet\" href=\"css/style.css\">\r\n\t\t\t<script src=\"js/libs/modernizr-1.7.min.js\"></script>\r\n\t\t\t<meta name=\"google-site-verification\" content=\"L7XsxzdOX-9nSiQ7Z4AH7a9HYJSEwACQL3_IQBP03wg\" /> \r\n\t\t\r\n\t\t</head>\t\r\n\t'; \r\n\r\n}", "function add_head($head){\n\t\t\n\t\t$this->data['head'] .= $head;\n\t\t\n\t}", "function head($uri = null, $headers = null);", "public static function outputHead() {\n # HTTP Headers\n self::outputHeaders();\n # XML declaration and doctype (if required).\n echo RenderContext::get()->renderPreContent();\n # Opening <html> and <head> tags\n self::outputOpeningTags();\n # Any <meta> tags\n self::outputMetaTags();\n # page title\n self::outputTitleTag();\n # links\n self::outputLinkTags();\n # stylesheets\n self::outputStylesheetTags();\n # external scripts\n self::outputExternalScriptTags();\n # favicons\n self::outputFaviconTags();\n self::outputEndHead();\n }", "function createHTMLHead($pageTitle,$metaDesc){\n $headHTML = '\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta name=\"description\" content=\"'.$metaDesc.'\">\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">\n <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\">\n <link href=\"https://fonts.googleapis.com/css2?family=Do+Hyeon&family=Fanwood+Text:ital@0;1&family=Holtwood+One+SC&display=swap\" rel=\"stylesheet\">\n <link rel=\"stylesheet\" href=\"css/font_and_color.css\">\n <link rel=\"stylesheet\" href=\"css/main.css\">';\n // if the page has additional css, adding it to the head\n switch ($pageTitle) {\n case 'register or login':\n $headHTML.= '<link rel=\"stylesheet\" href=\"css/reg_login.css\">';\n $headHTML .='<title>'.$pageTitle.'</title>';\n break;\n \n case 'admintool':\n $headHTML.= '<link rel=\"stylesheet\" href=\"css/admintool.css\">';\n $headHTML .='<title>'.$pageTitle.'</title>';\n break;\n \n case 'about':\n $headHTML.= '<link rel=\"stylesheet\" href=\"css/about.css\">';\n $headHTML .='<title>'.$pageTitle.'</title>';\n break;\n case 'your profile':\n $headHTML.= '<link rel=\"stylesheet\" href=\"css/profile.css\">';\n $headHTML .='<title>'.$pageTitle.'</title>';\n break;\n \n default: // if not, just include the title\n $headHTML .='<title>'.$pageTitle.'</title>';\n break;\n }\n $headHTML.= '<script src=\"js/code.js\" defer></script>';\n return $headHTML;\n}", "function head(&$url) {\n \n #-- inject cookie header (if any)\n if ($this->cookies) {\n $c = \"\";\n foreach ($this->cookies as $i=>$v) {\n $c .= \"; \" . urlencode($i) . \"=\" . urlencode($v);\n }\n $this->headers[\"Cookie\"] = substr($c, 2);\n $this->headers[\"Cookie2\"] = '$Version=\"1\"';\n }\n \n #-- request head\n $CRLF = \"\\015\\012\";\n $HEAD = \"{$this->method} {$url[path]} {$this->proto}$CRLF\";\n $HEAD .= \"Host: {$url[host]}$CRLF\";\n foreach ($this->headers as $h=>$v) {\n $HEAD .= trim($h) . \": \" . strtr(trim($v), \"\\n\", \" \") . $CRLF;\n }\n $HEAD .= $CRLF;\n return($HEAD);\n }", "function mosShowHead() {\n\t?><jdoc:include type=\"head\" /><?php\n}", "public function test_loads_links_page()\n {\n $link = Link::factory()->create();\n $this->get('/')\n ->assertStatus(200)\n ->assertSee($link->title)\n ->assertSee($link->url);\n }", "public static function makeHead($title = \"La tana del Luppolo\"){\n $html = file_get_contents('../html/components/head.html');\n $html = str_replace(\"<title/>\", \"<title>\".$title.\"</title>\", $html);\n return $html;\n\n }", "public function startHead($options = [])\n {\n\n if (! is_array($options)) {\n throw new RuntimeException(\"start head options not an array\");\n }\n\n\t$this->nc = 'No-cache Off';\n\tif (!empty($options) && in_array('no-cache', $options) ) {\n\t\theader(\"Cache-Control: no-cache, no-store, must-revalidate\"); // HTTP 1.1.\n\t\theader(\"Pragma: no-cache\"); // HTTP 1.0.\n\t\theader(\"Expires: 0\"); // Proxies.\n\t\t$this->nc = 'No-cache On';\n\t}\n\n $t = <<<EOT\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n\n <title>$this->title</title>\n <link rel='stylesheet' href = '/css/news4.css' />\n <link rel='stylesheet' href = '/css/navbar2.css' />\n\n <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js'></script>\n\t<script src='/js/f2js.js'></script>\n\t<script src='/js/ajax.js'></script>\n\t<script src='/js/help.js'></script>\n\t<script src='/js/navbar.js'></script>\n\nEOT;\n if (!empty($options) && in_array('tiny', $options)) {\n $t .= \"\n <script src='https://cdn.tiny.cloud/1/5rh2pclin81y4q8k7r0ddqfz2gcow6nvxqk1yxv4zci54rpx/tinymce/5/tinymce.min.js'></script>\n\n \t<script src='/js/tiny_init.js'></script>\n \";\n }\n\n return $t;\n }", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryHeadTagHandle() {\n\n }", "function loadHeader($link = 'main') {\n\t\tglobal $page_link; global $page_title; global $website; global $page_description; global $page_keywords; global $page_icon;\n \n\n\t\tif (!isset($_SERVER['HTTP_DODO'])) {\n \n header_is_loaded();\n\t\t\tinclude UI .\"headers/$link.php\";\n \n\t\t} else {\n\t\t\techo \"<link rel='stylesheet' href='\".UI.\"/$page_link/_styles.dd.css?v=\".VERSION.\"'>\";\n\t\t}\n\t}", "function print_add_html_headers() {\n print get_add_html_headers();\n}", "final private function getHeadContent() {\n\t\t$str = '';\n\t\t\n\t\t// Include jquery.\n\t\t$this->includeJquery();\n\t\t\n\t\t// Get the css includes.\n\t\t$str .= $this->getCssIncludes();\n\t\t\n\t\t// Get the javascript includes.\n\t\t$str .= $this->getJavascriptIncludes();\n\t\t\n\t\treturn $str;\n\t}", "function print_head_scripts()\n{\n}", "public function getHeadscripts()\n {\n return $this->scripts;\n }", "protected function _getHeadBlock()\n\t{\n\t\tif (($headBlock = Mage::getSingleton('core/layout')->getBlock('head')) !== false) {\n\t\t\treturn $headBlock;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function GetHtmlHeadIncludes()\n {\n $aHeadData = array();\n reset($this->modules);\n foreach ($this->modules as $spotName => $module) {\n $aModulHeadData = $this->modules[$spotName]->GetHtmlHeadIncludes();\n $aHeadData = array_merge($aHeadData, $aModulHeadData);\n }\n reset($this->modules);\n\n return $aHeadData;\n }", "public function isHead(){ }", "function vf_printhtmlheader($page_title, $include_scripts) {\n echo <<<END\n<title> Txuxrum: $page_title </title>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n<link href=\"css/gangnamstyle.css\" rel=\"stylesheet\" type=\"text/css\" />\n<meta name=\"keywords\" content=\"txuxrum, txux, rum, forum, chat, rooms, messages, depraved, drunk\">\n<meta name=\"description\" content=\"A forum with private messages and chatrooms for depraved and drunk people :)\">\n<meta name=\"author\" content=\"Bernardo Marques, Humberto Alves, Tiago Levita\">\n\nEND;\n if ($include_scripts)\n echo '<script src=\"js/scriptorium.js\"></script>';\n }" ]
[ "0.7185164", "0.69724095", "0.656206", "0.648328", "0.6400312", "0.63409394", "0.6322435", "0.6294879", "0.62626415", "0.6228132", "0.6228064", "0.61980873", "0.6193907", "0.614954", "0.611956", "0.61044776", "0.6080056", "0.60437363", "0.6037081", "0.6028943", "0.6028688", "0.60152924", "0.6004661", "0.6001274", "0.598812", "0.59771436", "0.5958512", "0.59437925", "0.59398234", "0.5938575", "0.59375316", "0.5913508", "0.5912572", "0.59086865", "0.5906131", "0.5890577", "0.5886781", "0.58826643", "0.58818173", "0.5880201", "0.58760124", "0.585403", "0.5841779", "0.58415765", "0.58269566", "0.5826874", "0.5825059", "0.58130085", "0.58065766", "0.5804924", "0.5795549", "0.57924974", "0.57883567", "0.5787404", "0.57842606", "0.57753116", "0.57712394", "0.5764526", "0.57598764", "0.5758694", "0.5754826", "0.5750566", "0.5744392", "0.57434666", "0.57337934", "0.5728183", "0.57242453", "0.57202154", "0.57107997", "0.57088405", "0.57084864", "0.57008743", "0.5683542", "0.5683114", "0.5681614", "0.56807965", "0.5676241", "0.5666278", "0.56620216", "0.56565356", "0.56543726", "0.5654234", "0.5643985", "0.5642501", "0.5633013", "0.5632423", "0.5627087", "0.56260014", "0.560614", "0.56043005", "0.5604262", "0.55963945", "0.55886024", "0.55852073", "0.55837935", "0.5580228", "0.5575132", "0.55734766", "0.55713046", "0.5568099" ]
0.78134227
0
Tests that we store and retrieve multibyte UTF8 characters correctly.
Тесты, проверяющие корректное хранение и извлечение многобайтных UTF8-символов.
public function testMultiByteUtf8() { $title = '🐝'; $this->assertTrue(mb_strlen($title, 'utf-8') < strlen($title), 'Title has multi-byte characters.'); $support_ticket = $this->drupalCreateSupportTicket(array('title' => $title)); $this->drupalGet($support_ticket->urlInfo()); $result = $this->xpath('//span[contains(@class, "field--name-title")]'); $this->assertEqual((string) $result[0], $title, 'The passed title was returned.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test_returns_true_for_utf8_strings() {\n // from http://www.i18nguy.com/unicode-example.html\n $utf8 = $this->get_testdata('utf-8.txt');\n $this->assertTrue(count($utf8) > 3);\n foreach ($utf8 as $string) {\n $this->assertTrue(seems_utf8($string));\n }\n }", "public function testGetCharset()\r\n\t{\r\n\t\t// Get Charset for utf8_unicode_ci\r\n\t\t$this->assertEquals('utf8', Collation::getCharacterSet('utf8_unicode_ci'));\r\n\t}", "function seems_utf8($str)\n{\n}", "public function testSeemUtf8()\n {\n $is_utf = $this->_i18n->seemUtf8('HéhéHÉHÉâ-ô߬- ©»«<ëßßä€êþÿûîœô');\n $is_iso = $this->_i18n->seemUtf8(utf8_decode('Héhé'));\n\n $this->boolean($is_utf)->isTrue();\n $this->boolean($is_iso)->isFalse();\n }", "public function testUnicodeValues()\n\t{\n\t\treturn array(\n\t\t\tarray('Pelé@example.com'),\n\t\t\tarray('δοκιμή@παράδειγμα.δοκιμή.gr'),\n\t\t\tarray('甲斐@黒川.日本.ja'),\n\t\t);\n\t}", "public function testMultiByteUtf8WithLoadXml()\n\t{\n\t\t$doc = new EbayEnterprise_Dom_Document('1.0', 'UTF-8');\n\t\t$data = '<root xmlns=\"http://api.gsicommerce.com/schema/checkout/1.0\">' .\n\t\t\tmb_convert_encoding('This is a multi-byte UTF-8 test', 'UTF-8') .\n\t\t\t'</root>';\n\t\t$doc->loadXML($data);\n\n\t\t$this->assertNotEmpty(\n\t\t\t$doc->saveXML()\n\t\t);\n\t}", "public function testSplitMultibyteString()\n {\n $Tests = [\n [\n 'String' => 'Test🍱',\n 'Length' => 8,\n 'Expected' => ['Test🍱'],\n 'Failure' => 'string split unnecessarily',\n ],\n [\n 'String' => 'Test🍱',\n 'Length' => 7,\n 'Expected' => ['Test', '🍱'],\n 'Failure' => 'string split incorrectly',\n ],\n [\n 'String' => '🍱',\n 'Length' => 4,\n 'Expected' => ['🍱'],\n 'Failure' => 'string split unnecessarily',\n ],\n [\n 'String' => '🍱a🍱bb🍱ccc🍱dddd🍱',\n 'Length' => 3,\n 'Expected' => [\n '🍱', 'a', '🍱', 'bb', '🍱', 'ccc', '🍱', 'ddd', 'd', '🍱'\n ],\n 'Failure' => 'string split incorrectly',\n ],\n [\n 'String' => '',\n 'Length' => 3,\n 'Expected' => [],\n 'Failure' => 'string split incorrectly',\n ],\n ];\n\n foreach ($Tests as $Test) {\n extract($Test);\n $this->assertEquals(\n $Expected,\n ContentLine::splitMultibyteString($String, $Length),\n 'Fails if '.$Failure\n );\n }\n\n }", "function is_utf8($word)\r\n{\r\n if (preg_match(\"/^([\".chr(228).\"-\".chr(233).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}){1}/\",$word) == true || preg_match(\"/([\".chr(228).\"-\".chr(233).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}){1}$/\",$word) == true || preg_match(\"/([\".chr(228).\"-\".chr(233).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}){2,}/\",$word) == true)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}", "function is_utf8($string) {\r\n\tif (mb_detect_encoding($string) == \"UTF-8\") { return true; }\r\n\treturn false;\r\n}", "public function testRequestMultibyte()\n {\n $string = \"10chars__\\u{4ee0}\" ;\n $this->s3Client->shouldReceive(\"putObject\")->atLeast()->times(1);\n\n $response = $this->largeFileMiddleware->request($string);\n $this->assertRegExp(\"/^s3:.*$/\", $response);\n }", "public function testMultiByteUtf8AddElement()\n\t{\n\t\t$doc = new EbayEnterprise_Dom_Document('1.0', 'UTF-16');\n\t\t$data = mb_convert_encoding('This is a multi-byte UTF-8 test', 'UTF-8');\n\t\t$doc->addElement('root', $data, 'http://api.gsicommerce.com/schema/checkout/1.0');\n\t\t$this->assertNotEmpty(\n\t\t\t$doc->saveXML()\n\t\t);\n\t}", "public function testElementEncoding() {\n\t\tforeach($this->arrArticles as $arrArticle) {\n\t\t\tforeach($arrArticle['Article'] as $strKey => $strValue) {\n\t\t\t\t$this->assertTrue(mb_check_encoding($strValue, \"UTF-8\"));\n\t\t\t}\n\t\t}\n\t}", "function utf8init()\n{\n mb_internal_encoding('UTF-8');\n\n // Tell PHP that we'll be outputting UTF-8 to the browser\n mb_http_output('UTF-8');\n\n //$str = json_encode($arr, JSON_UNESCAPED_UNICODE); //这样我们存进去的是就是中文了,那么取出的也就是中文了\n\n}", "public function testUnicodeCodepointConversionToUtf8()\n {\n $expected = \" ~ޙ\";\n $codepoints = array(0x20, 0x7e, 0x799);\n $result = '';\n foreach ($codepoints as $value) {\n $result .= $this->codepointToUtf8($value);\n }\n $this->assertEquals($expected, $result);\n }", "public function testUTF8ize_owl_isCuteAndFerocious() {\n // character instead of U+FFFD, but now he is sort of not as cute or\n // ferocious.\n $input = \"M(o\\xEE\\xFF\\xFFo)M\";\n $expect = \"M(o\\xEF\\xBF\\xBD\\xEF\\xBF\\xBD\\xEF\\xBF\\xBDo)M\";\n $result = phutil_utf8ize($input);\n $this->assertEqual($expect, $result);\n }", "#[@test]\n public function stringWithUmlauts() {\n $this->assertEquals('Hällo', $this->decode('<string>Hällo</string>'));\n }", "function set_file_utf8(){\n\t\n\tif (function_exists(\"iconv\") && PHP_VERSION_ID < 50600) {\n\t\ticonv_set_encoding(\"internal_encoding\", \"UTF-8\");\n\t\ticonv_set_encoding(\"input_encoding\", \"UTF-8\");\n\t\ticonv_set_encoding(\"output_encoding\", \"UTF-8\");\n\t} elseif (PHP_VERSION_ID >= 50600) {\n\t\tini_set(\"default_charset\", \"UTF-8\");\n\t}\n\t// to confirm\n\t//var_dump(iconv_get_encoding('all'));\n}", "function check_utf8( $in ) {\n $str = \"$in\"; // grr...\n $len = strlen( $str );\n $i = 0;\n while( $i < $len ) {\n $c = ord( $str[ $i ] );\n if( $c < 128 ) {\n // disallow most control characters:\n if( $c < 32 ) {\n switch( $c ) {\n case 9: // tab\n case 10: // lf \n case 13: // cr\n break;\n default:\n return false;\n }\n }\n } else {\n if( $c > 247 ) return false;\n elseif( $c > 239 ) $bytes = 4;\n elseif( $c > 223 ) $bytes = 3;\n elseif( $c > 191 ) $bytes = 2;\n else return false;\n if( $i + $bytes > $len ) return false;\n while( $bytes > 1 ) {\n $i++;\n $c = ord( $str[ $i ] );\n if( ( $c < 128 ) || ( $c > 191 ) ) return false;\n $bytes--;\n }\n }\n $i++;\n }\n return true;\n}", "public function setEncodeUTF8()\n {\n self::$_encodeUTF = 1;\n }", "public function testUtf8mb4Support(): void\n {\n // remove once https://jira.mariadb.org/browse/MDEV-27050 is fixed\n $columnAlias = '❤';\n $tableAlias = '🚀';\n if (str_contains($_ENV['DB_DSN'], 'mariadb')) {\n $columnAlias = '仮';\n $tableAlias = '名';\n }\n\n self::assertSame(\n [$columnAlias => 'žlutý_😀'],\n $this->q(\n $this->q()->field($this->e('\\'žlutý_😀\\''), $columnAlias),\n $tableAlias\n )\n ->where($columnAlias, 'žlutý_😀') // as param\n ->group($tableAlias . '.' . $columnAlias)\n ->having($this->e('{}', [$columnAlias])->render()[0] . ' = \\'žlutý_😀\\'') // as string literal (mapped to N'xxx' with MSSQL platform)\n ->getRow()\n );\n }", "public function testCharset() {\n\t\t$response = new CakeResponse();\n\t\t$this->assertEquals($response->charset(), 'UTF-8');\n\t\t$response->charset('iso-8859-1');\n\t\t$this->assertEquals($response->charset(), 'iso-8859-1');\n\t\t$this->assertEquals($response->charset('UTF-16'), 'UTF-16');\n\t}", "static private function is_utf8($word) {\r\n if (preg_match(\"/^([\".chr(228).\"-\".chr(233).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}){1}/\",$word) == true || preg_match(\"/([\".chr(228).\"-\".chr(233).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}){1}$/\",$word) == true || preg_match(\"/([\".chr(228).\"-\".chr(233).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}[\".chr(128).\"-\".chr(191).\"]{1}){2,}/\",$word) == true) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "function utf8_decode($data)\n{\n}", "public function testCharset() {\n\t\t$response = new CakeResponse();\n\t\t$this->assertEquals('UTF-8', $response->charset());\n\t\t$response->charset('iso-8859-1');\n\t\t$this->assertEquals('iso-8859-1', $response->charset());\n\t\t$this->assertEquals('UTF-16', $response->charset('UTF-16'));\n\t}", "function set_WRM_DB_utf8()\n{\n\tglobal $phpraid_config,$db_raid;\n\t\n\tif (($phpraid_config['wrm_db_utf8_support'] == \"yes\") or \n\t\t!isset($phpraid_config['wrm_db_utf8_support']) )\n\t{\n\t\t$sql = \"SET NAMES 'utf8'\";\n\t\t$result = $db_raid->sql_query($sql) or print_error($sql, $db_raid->sql_error(), 1);\n\t\t$sql = \"SET CHARACTER SET 'utf8'\";\n\t\t$result = $db_raid->sql_query($sql) or print_error($sql, $db_raid->sql_error(), 1);\t\t\n\t}\n}", "function is_utf8($_string) {\n if (is_array($_string)) {\n $enc = implode(' ', $_string);\n return @!((ord($enc[0]) != 239) && (ord($enc[1]) != 187) && (ord($enc[2]) != 191));\n } else {\n return (utf8_encode(utf8_decode($_string)) == $_string);\n }\n}", "function test_utf8($str) {\n if (is_array($str)) {\n $str = implode('', $str);\n // retourne FALSE si aucun caractere n'appartient au jeu utf8\n return !((ord($str[0]) != 239) && (ord($str[1]) != 187) && (ord($str[2]) != 191));\n } else {\n // retourne TRUE\n // si la chaine decoder et encoder est egale a elle meme\n return (utf8_encode(utf8_decode($str)) == $str);\n }\n}", "#[@test]\n public function umlaut() {\n $stream= new QuotedPrintableInputStream(new MemoryInputStream('=DCbercoder'));\n $chunk= $stream->read();\n $stream->close();\n $this->assertEquals('‹bercoder', $chunk);\n }", "public function testStringOfHtmlSpecialCharsEncodedToUnicodeEscapes()\n {\n Json\\Json::$useBuiltinEncoderDecoder = false;\n $expected = '\"\\\\u003C\\\\u003E\\\\u0026\\\\u0027\\\\u0022\"';\n $string = '<>&\\'\"';\n $encoded = Json\\Encoder::encode($string);\n $this->assertEquals(\n $expected,\n $encoded,\n 'Encoding error: expected ' . serialize($expected) . '; received: ' . serialize($encoded) . \"\\n\"\n );\n $this->assertEncodesToDecodable($string);\n }", "public function testStringOfOtherSpecialCharsEncodedToUnicodeEscapes()\n {\n // phpcs:disable Generic.Files.LineLength.TooLong\n Json\\Json::$useBuiltinEncoderDecoder = false;\n $string = \"\\\\ - \\n - \\t - \\r - \" . chr(0x08) . \" - \" . chr(0x0C) . \" - / - \\v\";\n $encoded = '\"\\u005C - \\u000A - \\u0009 - \\u000D - \\u0008 - \\u000C - \\u002F - \\u000B\"';\n $this->assertEquals($string, Json\\Decoder::decode($encoded));\n // phpcs:enable\n }", "public function is_utf8($val) {\n Trace::add_trace('check utf8 string',__METHOD__);\n return preg_match('%(?:\n [xC2-xDF][x80-xBF]\n |xE0[xA0-xBF][x80-xBF]\n |[xE1-xECxEExEF][x80-xBF]{2}\n |xED[x80-x9F][x80-xBF]\n |xF0[x90-xBF][x80-xBF]{2}\n |[xF1-xF3][x80-xBF]{3}\n |xF4[x80-x8F][x80-xBF]{2}\n )+%xs', $val);\n }", "function is_utf8($s) {\r\n for ($i = 0; $i < strlen($s); $i++) {\r\n $charOrd = ord($s[$i]);\r\n if ($charOrd < 0x80) {\r\n continue; # 0bbbbbbb\r\n }\r\n elseif (($charOrd & 0xE0) == 0xC0) $n=1; # 110bbbbb\r\n elseif (($charOrd & 0xF0) == 0xE0) $n=2; # 1110bbbb\r\n elseif (($charOrd & 0xF8) == 0xF0) $n=3; # 11110bbb\r\n elseif (($charOrd & 0xFC) == 0xF8) $n=4; # 111110bb\r\n elseif (($charOrd & 0xFE) == 0xFC) $n=5; # 1111110b\r\n else {\r\n # Does not match any model\r\n return false;\r\n }\r\n # n bytes matching 10bbbbbb follow ?\r\n for ($j = 0; $j < $n; $j++) {\r\n if ((++$i == strlen($s)) || ((ord($s[$i]) & 0xC0) != 0x80)) {\r\n return false;\r\n }\r\n }\r\n } // for\r\n return true;\r\n}", "private static function utf8EnvironmentSet(){\r\n\t\treturn (\r\n\t\t\t(ini_get('default_charset') == 'UTF-8')\r\n\t\t\t&& (ini_get('mbstring.internal_encoding') == 'UTF-8')\r\n\t\t\t&& (ini_get('mbstring.http_output') == 'UTF-8')\r\n\t\t);\r\n\t}", "function checkUTF8($input) {\n\n\tif ( mb_detect_encoding($input,'UTF-8',true) ) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function testEncoding(): void\n {\n $full = mb_convert_encoding(\"Близоруков Александр Сергеевич\", 'CP1251', 'UTF-8');\n $splitter = new NameSplitter(['enc' => 'CP1251']);\n $result = $splitter->split($full);\n $this->assertSame(\n explode(' ', $full),\n [\n $result->getSurname(),\n $result->getName(),\n $result->getMiddleName(),\n ]\n );\n }", "protected function checkLocaleWithUTF8filesystem() {}", "function is_utf8($string) {\n \n // From http://w3.org/International/questions/qa-forms-utf-8.html\n return preg_match('%^(?:\n [\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\n | [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n | [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n | \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n | [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n )*$%xs', $string);\n}", "function is_utf8($string)\n {\n\n // From http://w3.org/International/questions/qa-forms-utf-8.html\n return preg_match('%^(?:\n [\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\n | [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n | [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n | \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n | [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n )*$%xs', $string);\n\n }", "function setUTF() {\n\t}", "function wp_seems_utf8($str) {\n\t$length = strlen($str);\n\tfor ($i=0; $i < $length; $i++) {\n\t\t$c = ord($str[$i]);\n\t\tif ($c < 0x80) $n = 0; # 0bbbbbbb\n\t\telseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb\n\t\telseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb\n\t\telseif (($c & 0xF8) == 0xF0) $n=3; # 11110bbb\n\t\telseif (($c & 0xFC) == 0xF8) $n=4; # 111110bb\n\t\telseif (($c & 0xFE) == 0xFC) $n=5; # 1111110b\n\t\telse return false; # Does not match any model\n\t\tfor ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?\n\t\t\tif ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80))\n\t\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "public function utf8() {\n return $this->chars;\n }", "public function testUnicode(): void\n {\n $this->shouldParse('<\\\\U0001d400> {'.\"\\n\".'<\\\\U0001d400> <\\\\U0001d400> \"\\\\U0001d400\"^^<\\\\U0001d400>'.\"\\n\".'}'.\"\\n\",\n ['𝐀', '𝐀', '\"𝐀\"^^𝐀', '𝐀']);\n $this->shouldParse('@prefix c: <http://example.org/>.\n @prefix c: <http://example.org/>.\nc:test <b> <http://example.org/テスト> .', ['http://example.org/test', 'b', 'http://example.org/テスト', '']);\n\n // should parse unicode after prefix\n $this->shouldParse('@prefix c: <http://example.org/>.\nc:test <b> c:テスト .', ['http://example.org/test', 'b', 'http://example.org/テスト', '']);\n\n // should parse unicode in literal\n $this->shouldParse('@prefix c: <http://example.org/>.\nc:test <b> \"c:テスト\" .', ['http://example.org/test', 'b', '\"c:テスト\"', '']);\n\n // should parse unicode in prefixname\n $this->shouldParse('@prefix c: <http://example.org/テ>.\n<http://example.org/testprefixname> <b> c:スト .', ['http://example.org/testprefixname', 'b', 'http://example.org/テスト', '']);\n }", "public function testUTF8ize_LongString_nosegfault() {\n // preg_match(). Forestall this craziness in the common case, at least.\n phutil_utf8ize(str_repeat('x', 1024 * 1024));\n $this->assertEqual(true, true);\n }", "function _sm_mk_utf8($text)\n{\n return '=?UTF-8?B?' . base64_encode($text) . '?=';\n}", "function test_percent_encodes_non_reserved_characters() {\n $utf8urls = $this->get_testdata('utf-8.txt');\n $urlencoded = $this->get_testdata('utf-8-urlencoded.txt');\n for ($i=0; $i<count($utf8urls); ++$i) {\n $this->assertEquals($urlencoded[$i], utf8_uri_encode($utf8urls[$i]));\n }\n }", "public function verifyUTF8()\n {\n $paymentFormElement = WebDriverBy::className('FieldsPreview-desc');\n $condition = WebDriverExpectedCondition::visibilityOfElementLocated($paymentFormElement);\n $this->webDriver->wait()->until($condition);\n $this->assertTrue((bool) $condition);\n $this->assertSame(\n $this->configuration['firstname'] . ' ' . $this->configuration['lastname'],\n $this->findByClass('FieldsPreview-desc')->getText()\n );\n }", "public function testEncoding() {\n $this->assertEquals(Config::encoding(), 'UTF-8');\n\n Config::set('app.encoding', 'UTF-16');\n $this->assertEquals(Config::encoding(), 'UTF-16');\n\n Config::set('app.encoding', '');\n $this->assertEquals(Config::encoding(), 'UTF-8');\n }", "function valid_utf8($str) {\n $rep = test_utf8($str) ? $str : utf8_encode($str);\n return $rep;\n}", "function seems_utf8($str)\n{\n\t$str_len = strlen($str);\n\tfor ($i = 0; $i < $str_len; ++$i)\n\t{\n\t\tif (ord($str[$i]) < 0x80) continue; # 0bbbbbbb\n\t\telse if ((ord($str[$i]) & 0xE0) == 0xC0) $n=1; # 110bbbbb\n\t\telse if ((ord($str[$i]) & 0xF0) == 0xE0) $n=2; # 1110bbbb\n\t\telse if ((ord($str[$i]) & 0xF8) == 0xF0) $n=3; # 11110bbb\n\t\telse if ((ord($str[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb\n\t\telse if ((ord($str[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b\n\t\telse return false; # Does not match any model\n\n\t\tfor ($j = 0; $j < $n; ++$j) # n bytes matching 10bbbbbb follow ?\n\t\t{\n\t\t\tif ((++$i == strlen($str)) || ((ord($str[$i]) & 0xC0) != 0x80))\n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "function setUTF()\n\t{\n\t\tmysql_query( \"SET NAMES 'utf8'\", $this->_resource );\n\t}", "function setUTF()\n\t{\n\t\tmysql_query( \"SET NAMES 'utf8'\", $this->_resource );\n\t}", "function invalid_utf8($s)\n{\n return !@iconv('UTF-8', 'UTF-32', $s);\n}", "public function textLowerMultiBytesEncoding(UnitTester $I)\n {\n $I->wantToTest('Text - lower() - multi byte encoding');\n $expected = 'привет мир!';\n $actual = Text::lower('привет мир!');\n $I->assertEquals($expected, $actual);\n\n $expected = 'привет мир!';\n $actual = Text::lower('ПриВЕт Мир!');\n $I->assertEquals($expected, $actual);\n\n $expected = 'привет мир!';\n $actual = Text::lower('ПРИВЕТ МИР!');\n $I->assertEquals($expected, $actual);\n\n\n $expected = 'männer';\n $actual = Text::lower('männer');\n $I->assertEquals($expected, $actual);\n\n $expected = 'männer';\n $actual = Text::lower('mÄnnER');\n $I->assertEquals($expected, $actual);\n\n $expected = 'männer';\n $actual = Text::lower('MÄNNER');\n $I->assertEquals($expected, $actual);\n }", "function wc_check_invalid_utf8($var)\n {\n }", "function utf8_win ($s){\r\n$out=\"\";\r\n$c1=\"\";\r\n$byte2=false;\r\nfor ($c=0;$c<strlen($s);$c++){\r\n$i=ord($s[$c]);\r\nif ($i<=127) $out.=$s[$c];\r\nif ($byte2){\r\n$new_c2=($c1&3)*64+($i&63);\r\n$new_c1=($c1>>2)&5;\r\n$new_i=$new_c1*256+$new_c2;\r\nif ($new_i==1025){\r\n$out_i=168;\r\n}else{\r\nif ($new_i==1105){\r\n$out_i=184;\r\n}else {\r\n$out_i=$new_i-848;\r\n}\r\n}\r\n$out.=chr($out_i);\r\n$byte2=false;\r\n}\r\nif (($i>>5)==6) {\r\n$c1=$i;\r\n$byte2=true;\r\n}\r\n}\r\nreturn $out;\r\n}", "function al_utf8($var) {\n\tglobal $defaultCharset;\n\tif ($defaultCharset==\"utf-8\") $var = utf8_encode($var);\n\treturn $var;\n}", "function utf8_ascii($s)\n{\n\tstatic $accents = array(\n\t//german\n\t'ä'=>'a','ö'=>'o','ü'=>'u','ß'=>'ss',\n\t'Ä'=>'A','Ö'=>'O','Ü'=>'U',\n\t//french\n\t'û'=>'u','ÿ'=>'y','â'=>'a','æ'=>'ae','ç'=>'c','ê'=>'e','ë'=>'e','ï'=>'i','î'=>'i','ô'=>'o','œ'=>'oe',\n\t'Û'=>'U','Ÿ'=>'Y','Â'=>'A','Æ'=>'AE','Ç'=>'C','Ê'=>'E','Ë'=>'E','Ï'=>'I','Î'=>'I','Ô'=>'O','Œ'=>'OE',\n\t//czech\n\t'ú'=>'u','ů'=>'u','ý'=>'y','ž'=>'z','á'=>'a','č'=>'c','ď'=>'d','é'=>'e','ě'=>'e','í'=>'i','ň'=>'n','ó'=>'o','ř'=>'r','š'=>'s','ť'=>'t',\n\t'Ú'=>'U','Ů'=>'U','Ý'=>'Y','Ž'=>'Z','Á'=>'A','Č'=>'C','Ď'=>'D','É'=>'E','Ě'=>'E','Í'=>'I','Ň'=>'N','Ó'=>'O','Ř'=>'R','Š'=>'S','Ť'=>'T',\n\t//italian\n\t'à'=>'a','è'=>'e','ì'=>'i','ò'=>'o','ù'=>'u',\n\t'À'=>'A','È'=>'E','Ì'=>'I','Ò'=>'O','Ù'=>'U',\n\t//polish\n\t'ą'=>'a','ć'=>'c','ę'=>'e','ł'=>'l','ń'=>'n','ś'=>'s','ź'=>'z','ż'=>'z',\n\t'Ą'=>'A','Ć'=>'C','Ę'=>'E','Ł'=>'L','Ń'=>'N','Ś'=>'S','Ź'=>'Z','Ż'=>'Z',\n\t//spanish\n\t'ñ'=>'n','Ñ'=>'N',\n\t//swed/danisch/dutch/fin/nor\n\t'å'=>'a','ø'=>'o',\n\t'Å'=>'A','Ø'=>'O',\n\t//hungarian\n\t'ő'=>'o','ű'=>'u',\n\t'Ő'=>'O','Ű'=>'U',\n\t);\n\n\treturn preg_replace('/[^(\\x20-\\x7F)]*/','', strtr($s, $accents));\n}", "function utf8_to_unicode($str,$strict=false) {\r\n $mState = 0; // cached expected number of octets after the current octet\r\n // until the beginning of the next UTF8 character sequence\r\n $mUcs4 = 0; // cached Unicode character\r\n $mBytes = 1; // cached expected number of octets in the current sequence\r\n\r\n $out = array();\r\n\r\n $len = strlen($str);\r\n\r\n for($i = 0; $i < $len; $i++) {\r\n\r\n $in = ord($str{$i});\r\n\r\n if ( $mState == 0) {\r\n\r\n // When mState is zero we expect either a US-ASCII character or a\r\n // multi-octet sequence.\r\n if (0 == (0x80 & ($in))) {\r\n // US-ASCII, pass straight through.\r\n $out[] = $in;\r\n $mBytes = 1;\r\n\r\n } else if (0xC0 == (0xE0 & ($in))) {\r\n // First octet of 2 octet sequence\r\n $mUcs4 = ($in);\r\n $mUcs4 = ($mUcs4 & 0x1F) << 6;\r\n $mState = 1;\r\n $mBytes = 2;\r\n\r\n } else if (0xE0 == (0xF0 & ($in))) {\r\n // First octet of 3 octet sequence\r\n $mUcs4 = ($in);\r\n $mUcs4 = ($mUcs4 & 0x0F) << 12;\r\n $mState = 2;\r\n $mBytes = 3;\r\n\r\n } else if (0xF0 == (0xF8 & ($in))) {\r\n // First octet of 4 octet sequence\r\n $mUcs4 = ($in);\r\n $mUcs4 = ($mUcs4 & 0x07) << 18;\r\n $mState = 3;\r\n $mBytes = 4;\r\n\r\n } else if (0xF8 == (0xFC & ($in))) {\r\n /* First octet of 5 octet sequence.\r\n *\r\n * This is illegal because the encoded codepoint must be either\r\n * (a) not the shortest form or\r\n * (b) outside the Unicode range of 0-0x10FFFF.\r\n * Rather than trying to resynchronize, we will carry on until the end\r\n * of the sequence and let the later error handling code catch it.\r\n */\r\n $mUcs4 = ($in);\r\n $mUcs4 = ($mUcs4 & 0x03) << 24;\r\n $mState = 4;\r\n $mBytes = 5;\r\n\r\n } else if (0xFC == (0xFE & ($in))) {\r\n // First octet of 6 octet sequence, see comments for 5 octet sequence.\r\n $mUcs4 = ($in);\r\n $mUcs4 = ($mUcs4 & 1) << 30;\r\n $mState = 5;\r\n $mBytes = 6;\r\n\r\n } elseif($strict) {\r\n /* Current octet is neither in the US-ASCII range nor a legal first\r\n * octet of a multi-octet sequence.\r\n */\r\n trigger_error(\r\n 'utf8_to_unicode: Illegal sequence identifier '.\r\n 'in UTF-8 at byte '.$i,\r\n E_USER_WARNING\r\n );\r\n return FALSE;\r\n\r\n }\r\n\r\n } else {\r\n\r\n // When mState is non-zero, we expect a continuation of the multi-octet\r\n // sequence\r\n if (0x80 == (0xC0 & ($in))) {\r\n\r\n // Legal continuation.\r\n $shift = ($mState - 1) * 6;\r\n $tmp = $in;\r\n $tmp = ($tmp & 0x0000003F) << $shift;\r\n $mUcs4 |= $tmp;\r\n\r\n /**\r\n * End of the multi-octet sequence. mUcs4 now contains the final\r\n * Unicode codepoint to be output\r\n */\r\n if (0 == --$mState) {\r\n\r\n /*\r\n * Check for illegal sequences and codepoints.\r\n */\r\n // From Unicode 3.1, non-shortest form is illegal\r\n if (((2 == $mBytes) && ($mUcs4 < 0x0080)) ||\r\n ((3 == $mBytes) && ($mUcs4 < 0x0800)) ||\r\n ((4 == $mBytes) && ($mUcs4 < 0x10000)) ||\r\n (4 < $mBytes) ||\r\n // From Unicode 3.2, surrogate characters are illegal\r\n (($mUcs4 & 0xFFFFF800) == 0xD800) ||\r\n // Codepoints outside the Unicode range are illegal\r\n ($mUcs4 > 0x10FFFF)) {\r\n\r\n if($strict){\r\n trigger_error(\r\n 'utf8_to_unicode: Illegal sequence or codepoint '.\r\n 'in UTF-8 at byte '.$i,\r\n E_USER_WARNING\r\n );\r\n\r\n return FALSE;\r\n }\r\n\r\n }\r\n\r\n if (0xFEFF != $mUcs4) {\r\n // BOM is legal but we don't want to output it\r\n $out[] = $mUcs4;\r\n }\r\n\r\n //initialize UTF8 cache\r\n $mState = 0;\r\n $mUcs4 = 0;\r\n $mBytes = 1;\r\n }\r\n\r\n } elseif($strict) {\r\n /**\r\n *((0xC0 & (*in) != 0x80) && (mState != 0))\r\n * Incomplete multi-octet sequence.\r\n */\r\n trigger_error(\r\n 'utf8_to_unicode: Incomplete multi-octet '.\r\n ' sequence in UTF-8 at byte '.$i,\r\n E_USER_WARNING\r\n );\r\n\r\n return FALSE;\r\n }\r\n }\r\n }\r\n return $out;\r\n }", "function utf8ize($mixed)\n{\n if (is_array($mixed)) {\n foreach ($mixed as $key => $value) {\n $mixed[$key] = utf8ize($value);\n }\n } elseif (is_string($mixed)) {\n return mb_convert_encoding($mixed, \"UTF-8\", \"UTF-8\");\n }\n return $mixed;\n}", "protected final\n function is_multibyte(string $s): bool\n {\n return mb_strlen($s, 'utf-8') < strlen($s);\n }", "function utf8ize($mixed) {\nif (is_array($mixed)) {\n foreach ($mixed as $key => $value) {\n $mixed[$key] = utf8ize($value);\n }\n} else if (is_string ($mixed)) {\n return utf8_encode($mixed);\n}\nreturn $mixed;\n}", "public static function utf8_step(/* const char* */$utf8_str) {\n throw new \\Exception(\"verificar\");\n $utf8_bytes[256] = array(\n 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\n 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\n 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\n 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\n 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,\n 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0\n );\n\n return $utf8_bytes[$utf8_str];\n }", "public function setUpCharacterStrings() {}", "public function testHandleAndWriteWithInvalidUTF8()\n {\n // create an array containing invalid utf-8 csequences and also create the array which would be the outcome\n // after 'fixing' these invalid utf-8 chars\n $validUtf8 = 'Paição';\n $invalidUtf8 = mb_convert_encoding($validUtf8, 'ISO-8859-1', 'UTF-8');\n $testRecord = array(\n 'level' => Logger::INFO,\n 'testmessage' => $invalidUtf8,\n 'testDeeperArray' => array(\n $invalidUtf8 => $invalidUtf8\n ),\n 'formatted' => array()\n );\n\n $expectedjsonfied = json_encode(array(\n 'level' => Logger::INFO,\n 'testmessage' => $validUtf8,\n 'testDeeperArray' => array(\n $validUtf8 => $validUtf8\n ),\n 'formatted' => array()\n ));\n\n $testProperties= array(\n 'application_headers' => array(\n \"x-riak-target-vnode\" => array(\n \"S\", $this->vNode\n )\n )\n );\n\n $this->formatterMock->expects($this->once())\n ->method('format')\n ->with($testRecord)\n ->will($this->returnValue(array()));\n\n $this->messageProducerMock->expects($this->once())\n ->method('publish')\n ->with($expectedjsonfied, $this->routingKey, $testProperties);\n\n $this->rabbitMqHandler->addAdditionalProperties($testProperties);\n $this->rabbitMqHandler->setFormatter($this->formatterMock);\n $this->assertTrue($this->rabbitMqHandler->handle($testRecord));\n }", "public function utf8() {\n return $this->white ? static::UTF8_WHITE : static::UTF8_BLACK;\n }", "public function testLogUnicodeString()\n {\n $logged = $this->logger->log(LogLevel::INFO, implode($this->testData));\n\n $this->assertUnescapedUnicode($this->testData, $logged);\n }", "public function testWithArrayAccessAndUTF8Strings(UnitTester $I)\n {\n $language = $this->getGettextConfig();\n\n $translator = new Gettext(new InterpolatorFactory(), $language);\n\n $vars = [\n 'fname' => 'John',\n 'lname' => 'Doe',\n 'mname' => 'D.',\n ];\n\n $expected = 'Привет, John D. Doe!';\n $actual = $translator->{$this->func()}('Привет, %fname% %mname% %lname%!', $vars);\n $I->assertEquals($expected, $actual);\n }", "public function is_utf8($string)\n\t{\n\t\t// non-overlong 2-byte|excluding overlongs|straight 3-byte|excluding surrogates|planes 1-3|planes 4-15|plane 16\n\t\treturn preg_match('%(?:[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF] |\\xF0[\\x90-\\xBF][\\x80-\\xBF]{2}|[\\xF1-\\xF3][\\x80-\\xBF]{3}|\\xF4[\\x80-\\x8F][\\x80-\\xBF]{2})+%xs', $string);\n\t}", "function isUtf8($string) {\n if (function_exists(\"mb_check_encoding\") && is_callable(\"mb_check_encoding\")) {\n return mb_check_encoding($string, 'UTF8');\n }\n\n return preg_match('%^(?:\n [\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\n | [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n | [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n | \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n | [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n )*$%xs', $string);\n\n }", "function unicode_to_utf8($arr, $strict = false)\n {\n if (!is_array($arr))\n return '';\n ob_start();\n \n foreach (array_keys($arr) as $k) {\n \n if (($arr[$k] >= 0) && ($arr[$k] <= 0x007f)) {\n // ASCII range (including control chars)\n \n echo chr($arr[$k]);\n } else if ($arr[$k] <= 0x07ff) {\n // 2 byte sequence\n \n echo chr(0xc0 | ($arr[$k] >> 6));\n echo chr(0x80 | ($arr[$k] & 0x003f));\n } else if ($arr[$k] == 0xFEFF) {\n // Byte order mark (skip)\n \n // nop -- zap the BOM\n } else if ($arr[$k] >= 0xD800 && $arr[$k] <= 0xDFFF) {\n // Test for illegal surrogates\n \n // found a surrogate\n if ($strict) {\n trigger_error('unicode_to_utf8: Illegal surrogate ' . 'at index: ' . $k . ', value: ' . $arr[$k], E_USER_WARNING);\n return false;\n }\n } else if ($arr[$k] <= 0xffff) {\n // 3 byte sequence\n \n echo chr(0xe0 | ($arr[$k] >> 12));\n echo chr(0x80 | (($arr[$k] >> 6) & 0x003f));\n echo chr(0x80 | ($arr[$k] & 0x003f));\n } else if ($arr[$k] <= 0x10ffff) {\n // 4 byte sequence\n \n echo chr(0xf0 | ($arr[$k] >> 18));\n echo chr(0x80 | (($arr[$k] >> 12) & 0x3f));\n echo chr(0x80 | (($arr[$k] >> 6) & 0x3f));\n echo chr(0x80 | ($arr[$k] & 0x3f));\n } elseif ($strict) {\n \n trigger_error('unicode_to_utf8: Codepoint out of Unicode range ' . 'at index: ' . $k . ', value: ' . $arr[$k], E_USER_WARNING);\n \n // out of range\n return false;\n }\n }\n \n $result = ob_get_contents();\n ob_end_clean();\n return $result;\n }", "function reset_mbstring_encoding()\n{\n}", "public function isConnectionUTF8();", "function utf8_decode($data)\n{\n return '';\n}", "private function _convertUTF8($data)\n\t{\n\t\tforeach($data as $datakey => $entry)\n\t\t{\n\t\t\tforeach($entry as $entryKey => $value)\n\t\t\t{\n\t\t\t\tif(mb_detect_encoding($value, 'ISO-8859-1', true))\n\t\t\t\t\t$data[$datakey][$entryKey] = utf8_encode($value);\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "public static function is_utf8($string)\n {\n return preg_match('!!u', $string);\n }", "function utf8_to_unicode($str, $strict = false)\n {\n $mState = 0; // cached expected number of octets after the current octet\n // until the beginning of the next UTF8 character sequence\n $mUcs4 = 0; // cached Unicode character\n $mBytes = 1; // cached expected number of octets in the current sequence\n \n $out = array();\n \n $len = strlen($str);\n \n for ($i = 0; $i < $len; $i++) {\n \n $in = ord($str{$i});\n \n if ($mState == 0) {\n \n // When mState is zero we expect either a US-ASCII character or a\n // multi-octet sequence.\n if (0 == (0x80 & ($in))) {\n // US-ASCII, pass straight through.\n $out[] = $in;\n $mBytes = 1;\n } else if (0xC0 == (0xE0 & ($in))) {\n // First octet of 2 octet sequence\n $mUcs4 = ($in);\n $mUcs4 = ($mUcs4 & 0x1F) << 6;\n $mState = 1;\n $mBytes = 2;\n } else if (0xE0 == (0xF0 & ($in))) {\n // First octet of 3 octet sequence\n $mUcs4 = ($in);\n $mUcs4 = ($mUcs4 & 0x0F) << 12;\n $mState = 2;\n $mBytes = 3;\n } else if (0xF0 == (0xF8 & ($in))) {\n // First octet of 4 octet sequence\n $mUcs4 = ($in);\n $mUcs4 = ($mUcs4 & 0x07) << 18;\n $mState = 3;\n $mBytes = 4;\n } else if (0xF8 == (0xFC & ($in))) {\n /*\n * First octet of 5 octet sequence.\n *\n * This is illegal because the encoded codepoint must be either\n * (a) not the shortest form or\n * (b) outside the Unicode range of 0-0x10FFFF.\n * Rather than trying to resynchronize, we will carry on until the end\n * of the sequence and let the later error handling code catch it.\n */\n $mUcs4 = ($in);\n $mUcs4 = ($mUcs4 & 0x03) << 24;\n $mState = 4;\n $mBytes = 5;\n } else if (0xFC == (0xFE & ($in))) {\n // First octet of 6 octet sequence, see comments for 5 octet sequence.\n $mUcs4 = ($in);\n $mUcs4 = ($mUcs4 & 1) << 30;\n $mState = 5;\n $mBytes = 6;\n } elseif ($strict) {\n /*\n * Current octet is neither in the US-ASCII range nor a legal first\n * octet of a multi-octet sequence.\n */\n trigger_error('utf8_to_unicode: Illegal sequence identifier ' . 'in UTF-8 at byte ' . $i, E_USER_WARNING);\n return false;\n }\n } else {\n \n // When mState is non-zero, we expect a continuation of the multi-octet\n // sequence\n if (0x80 == (0xC0 & ($in))) {\n \n // Legal continuation.\n $shift = ($mState - 1) * 6;\n $tmp = $in;\n $tmp = ($tmp & 0x0000003F) << $shift;\n $mUcs4 |= $tmp;\n \n /**\n * End of the multi-octet sequence.\n * mUcs4 now contains the final\n * Unicode codepoint to be output\n */\n if (0 == --$mState) {\n \n /*\n * Check for illegal sequences and codepoints.\n */\n // From Unicode 3.1, non-shortest form is illegal\n if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || ((3 == $mBytes) && ($mUcs4 < 0x0800)) || ((4 == $mBytes) && ($mUcs4 < 0x10000)) || (4 < $mBytes) || \n // From Unicode 3.2, surrogate characters are illegal\n (($mUcs4 & 0xFFFFF800) == 0xD800) || \n // Codepoints outside the Unicode range are illegal\n ($mUcs4 > 0x10FFFF)) {\n \n if ($strict) {\n trigger_error('utf8_to_unicode: Illegal sequence or codepoint ' . 'in UTF-8 at byte ' . $i, E_USER_WARNING);\n \n return false;\n }\n }\n \n if (0xFEFF != $mUcs4) {\n // BOM is legal but we don't want to output it\n $out[] = $mUcs4;\n }\n \n // initialize UTF8 cache\n $mState = 0;\n $mUcs4 = 0;\n $mBytes = 1;\n }\n } elseif ($strict) {\n /**\n * ((0xC0 & (*in) != 0x80) && (mState != 0))\n * Incomplete multi-octet sequence.\n */\n trigger_error('utf8_to_unicode: Incomplete multi-octet ' . ' sequence in UTF-8 at byte ' . $i, E_USER_WARNING);\n \n return false;\n }\n }\n }\n return $out;\n }", "static function isUtf8($str) {\n\t\tif (! is_string ( $str )) {\n\t\t\tuser_error ( 'parameter is not a string', E_USER_WARNING );\n\t\t}\n\t\t$strUtf8 = iconv ( 'UTF-8', 'UTF-8//IGNORE', $str );\n\t\tif ($strUtf8 != $str) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function testUmlauts(){\n\n\t\t$gen = new RandomHash(1, 'ÜÖÄüäö');\n\t\t$token = $gen->getRandomToken();\n\n\t\t$this->assertContains($token, 'ÜÖÄüäö');\n\t}", "public function testLogUnicodeArray()\n {\n $logged = $this->logger->log(LogLevel::INFO, $this->testData);\n\n $this->assertUnescapedUnicode($this->testData, $logged);\n }", "function toutf8($i, $t)\n{\n switch ($t) {\n case 'UTF-8':\n $i = @iconv(\"UTF-8\", \"UTF-8//IGNORE\", $i);\n return $i;\n break;\n case 'GBK':\n $i = @iconv(\"GBK\", \"UTF-8//IGNORE\", $i);\n return $i;\n break;\n case 'GB2312':\n $i = @iconv(\"GB2312\", \"UTF-8//IGNORE\", $i);\n return $i;\n break;\n case 'GB18030':\n $i = @iconv(\"GB18030\", \"UTF-8//IGNORE\", $i);\n return $i;\n break;\n case 'Latin-1':\n $i = @iconv(\"ISO-8859-1\", \"UTF-8//IGNORE\", $i);\n return $i;\n break;\n default:\n $i = @iconv(\"UTF-8\", \"UTF-8//IGNORE\", $i);\n return $i;\n }\n}", "public static function isUTF8($string)\n {\n for ($idx = 0, $strlen = strlen($string); $idx < $strlen; $idx++) {\n $byte = ord($string[$idx]);\n\n if ($byte & 0x80) {\n if (($byte & 0xE0) == 0xC0) { \n $bytes_remaining = 1; // 2 byte char\n } elseif (($byte & 0xF0) == 0xE0) { \n $bytes_remaining = 2; // 3 byte char\n } elseif (($byte & 0xF8) == 0xF0) { \n $bytes_remaining = 3; // 4 byte char\n } else {\n return false;\n }\n\n if ($idx + $bytes_remaining >= $strlen) {\n return false;\n }\n\n while ($bytes_remaining--) {\n if ((ord($string[++$idx]) & 0xC0) != 0x80) {\n return false;\n }\n }\n \n }\n \n }\n\n return true;\n }", "public function testSplitMultibyteStringLengthTooSmall()\n {\n ContentLine::splitMultibyteString('', 0);\n }", "public function testUnicodeDataEncryptionAndDataDecryption()\n {\n $crypter = $this->getAsymmetricEncryptionAlgorithmInstanceForTesting();\n\n $this->assertTrue($crypter instanceof AbstractAsymmetricEncryptionAlgorithm);\n $this->assertTrue($crypter instanceof AbstractRsaEncryption);\n $this->assertTrue($crypter instanceof Rsa2048);\n\n $unicodeData = \"АJx 9,Й$\\v@UdrЯЙЮ\";\n $testCases = [true, false];\n\n foreach ($testCases as $chunkProcessingFlag) {\n ($chunkProcessingFlag) ? $crypter->enableChunkProcessing() : $crypter->disableChunkProcessing();\n\n $crypter->setPaddingStandard($crypter::OAEP_PADDING)->setCipherFormat($crypter::ENCRYPTION_OUTPUT_RAW);\n\n $this->assertEquals($crypter::OAEP_PADDING, $crypter->getPaddingStandard());\n $this->assertEquals($crypter::ENCRYPTION_OUTPUT_RAW, $crypter->getCipherFormat());\n\n $encryptedData = $crypter->encryptData($unicodeData);\n $decryptedData = $crypter->decryptData($encryptedData);\n\n $this->assertEquals($unicodeData, $decryptedData);\n }\n }", "function loco_ensure_utf8( $str, $enc = null, $prefix_bom = false ){ while( '' !== $str ){ $sniff = mb_detect_encoding( $str, array('UTF-8','ISO-8859-1'), true ); if( is_null($enc) ){ $m = substr( $str, 0, 2 ); if( \"\\xEF\\xBB\" === $m && \"\\xBF\" === $str{2} ){ $str = substr( $str, 3 ); $enc = 'UTF-8'; } else if( \"\\xFF\\xFE\" === $m ){ $str = substr( $str, 2 ); $enc = 'UTF-16LE'; } else if( \"\\xFE\\xFF\" === $m ){ $str = substr( $str, 2 ); $enc = 'UTF-16BE'; } else if( 'UTF-8' === $sniff ){ break; } else if( 'ISO-8859-1' === $sniff ){ $enc = 'Windows-1252'; } else { throw new InvalidArgumentException('Unknown character encoding'); } } else if( preg_match('/^UTF-?8$/i', $enc ) ){ $enc = 'UTF-8'; } else if( 0 === strcasecmp('ISO-8859-1',$enc) || 0 === strcasecmp('CP-1252', $enc ) ){ $enc = 'Windows-1252'; } else if( 0 === strcasecmp('UTF-16', $enc) ){ $enc = 'UTF-16BE'; } else if( false === @mb_encoding_aliases($enc) ){ throw new InvalidArgumentException('Unsupported character encoding: '.$enc); } if( 'UTF-8' !== $enc ) { $str = mb_convert_encoding( $str, 'UTF-8', array($enc) ); } else if( 'UTF-8' !== $sniff ){ throw new InvalidArgumentException('Bad UTF-8 encoding'); } break; } if( $prefix_bom ){ $str = \"\\xEF\\xBB\\xBF\".$str; } return $str; }", "public function testEscapeString()\n {\n $this->assertEquals('thisisastringร', self::escape('thisisastringร'));\n }", "public function testLogUnicodeEntity()\n {\n $entity = new Entity(['foo' => implode($this->testData)]);\n\n $logged = $this->logger->log(LogLevel::INFO, $entity);\n\n $this->assertUnescapedUnicode($this->testData, $logged);\n }", "#[Group('Laminas-8715')]\n public function testGetCharSet(): void\n {\n self::assertSame('UTF-8', $this->filter->getCharSet());\n }", "static public function checkUtf8($string)\n {\n if (mb_detect_encoding($string,'UTF-8',true) === false) return false;\n else return true;\n }", "function utf8_encode($data)\n{\n return '';\n}", "function test_decodes_iso_8859_1_rfc2047_q_encoding() {\n $this->assertEquals(\"this is some text\", wp_iso_descrambler(\"=?iso-8859-1?q?this=20is=20some=20text?=\"));\n }", "public function testDetectUnicodeVersion()\n {\n $unicodeVersion = NormalizationUtility::detectUnicodeVersion();\n $this->assertSame(1, preg_match('/^[1-9][0-9]*\\.[0-9]+\\.[0-9]+$/', $unicodeVersion));\n $this->assertTrue(version_compare('0.0.0', $unicodeVersion, '<'));\n if (ConfigurationHandler::isPolyfillImplementation()) {\n $this->assertSame('7.0.0', $unicodeVersion);\n }\n $latestVersion = NormalizationTestHandler::UPDATE_CHECK_VERSION_LATEST;\n $this->assertTrue(version_compare($unicodeVersion, $latestVersion, '<='));\n }", "function utf82utf16($utf8)\n {\n }", "public function testGetFirstLetterUmlaut() {\n\n\t\t$actual = $this->object->getFirstLetter('Öffentlichkeit');\n\n\t\t$expected = \"Ö\";\n\t\t$unexpected = \"o\";\n\t\t$this->assertEquals($expected, $actual);\n\t\t$this->assertNotEquals($unexpected, $actual);\n\t}", "function utf8ize( $mixed ) {\n if (is_array($mixed)) {\n foreach ($mixed as $key => $value) {\n $mixed[$key] = utf8ize($value);\n }\n } elseif (is_string($mixed)) {\n return iconv(mb_detect_encoding($mixed, mb_detect_order(), true), \"UTF-8\", $mixed);;\n }\n return $mixed;\n}", "function _toUtf8Php($marc8)\n {\n\n /*\n * get file content if neccessary\n */\n if ( @is_file($marc8) )\n {\n $string = file_get_contents($marc8);\n }\n else\n {\n $string = $marc8;\n }\n\n /*\n * parse helper map into static variable\n */\n static $ans2uniMap = null;\n\n if ( ! is_object( $ans2uniMap ) )\n {\n\n foreach( file( Z3950_ANS2UNI_DAT_PATH ) as $line )\n {\n $line = explode(\"#\",$line);\n $line = array_shift($line); // get rid of comments\n $line = explode(\"=\",$line);\n $target = array_pop($line); // get target character\n $seq = explode(\"+\",$line[0]); // get character sequence\n\n if( count($seq)==1 and hexdec($seq[0]) != hexdec($target) )\n {\n $ans2uniMap[hexdec($seq[0])][0] = hexdec($target);\n }\n if(count($seq)==2)\n {\n $ans2uniMap[hexdec($seq[0])][hexdec($seq[1])][0] = hexdec($target);\n }\n if(count($seq)==3)\n {\n $ans2uniMap[hexdec($seq[0])][hexdec($seq[1])][hexdec($seq[2])][0] = hexdec($target);\n }\n }\n }\n\n /*\n * convert ansi data\n */\n $i = 0;\n $output = \"\";\n\n while( $i<strlen( $string ) )\n {\n $c0 = ord($string{$i});\n $c1 = ord($string{$i+1});\n $c2 = ord($string{$i+2});\n $unicode = false;\n\n if($ans2uniMap[$c0][$c1][$c2][0])\n {\n $unicode = $ans2uniMap[$c0][$c1][$c2][0];\n $i+=3;\n }\n elseif ( $ans2uniMap[$c0][$c1][0] )\n {\n $unicode = $ans2uniMap[$c0][$c1][0];\n $i+=2;\n }\n elseif ( $ans2uniMap[$c0][0] )\n {\n $unicode = $ans2uniMap[$c0][0];\n $i+=1;\n }\n else\n {\n $output .= $string{$i++};\n }\n\n /*\n * the following code snippet is from Marc Grimshaw's \"Charmyknife\"\n */\n if($unicode)\n {\n $utf8 = '';\n if ($unicode < 128)\n {\n $utf8 .= chr($unicode);\n }\n elseif($unicode < 2048)\n {\n $utf8 .= chr(192 + (($unicode - ($unicode % 64)) / 64));\n $utf8 .= chr(128 + ($unicode % 64));\n }\n else\n {\n $utf8 .= chr( 224 + (($unicode - ($unicode % 4096)) / 4096));\n $utf8 .= chr( 128 + ((($unicode % 4096) - ($unicode % 64)) / 64));\n $utf8 .= chr( 128 + ($unicode % 64));\n }\n $output .= $utf8;\n }\n }\n\n /*\n * strip remaining invalid characters\n * @todo\n */\n $output = qcl_util_encoding_Converter::convert(\"utf-8\",\"utf-8\",$output);\n\n return $output;\n }", "function test_encoding() {\n\t\t// copy default settings\n\t\tcopy(\"scenario/default.inc\", \"../include/RESTfooly.inc\");\n\t\t// post to test server\n\t\t$resp = $this->httpRequestDo(self::TEST_DOMAIN,\"/resources/annotations\", \"POST\", \"classid=1&author=user&url=http://www.example.org/article&annotation=Schöne Äpfel aus Überlingen\");\n\t\t$resp = $this->httpRequestDo(self::TEST_DOMAIN, sprintf(\"/resources/annotations/%s\", $resp[\"BodyParsed\"][\"data\"][\"annotation_id\"]));\n\t\t$this->assertEqual(mb_convert_encoding(\"Schöne Äpfel aus Überlingen\", \"UTF8\"), $resp[\"BodyParsed\"][\"data\"][0][\"annotation\"]);\n\t\t// post successfully different encoding\n\t\t$resp = $this->httpRequestDo(self::TEST_DOMAIN,\"/resources/annotations\", \"POST\", \"classid=1&author=user&url=http://www.example.org/article&annotation=Schöne Äpfel aus Überlingen\", null, \"UTF-8\");\n\t\t$resp = $this->httpRequestDo(self::TEST_DOMAIN, sprintf(\"/resources/annotations/%s\", $resp[\"BodyParsed\"][\"data\"][\"annotation_id\"]));\n\t\t$this->assertEqual(mb_convert_encoding(\"Schöne Äpfel aus Überlingen\", \"UTF8\"), $resp[\"BodyParsed\"][\"data\"][0][\"annotation\"]);\n\t\t// put another \n\t\t$resp = $this->httpRequestDo(self::TEST_DOMAIN, sprintf(\"/resources/annotations/%s\", $resp[\"BodyParsed\"][\"data\"][0][\"annotation_id\"]), \"PUT\", \"classid=2&author=you&url=http://www.example.com/article&annotation=Schöne Äpfelchen aus Überlingen\", null, \"UTF-8\");\n\t\t$resp = $this->httpRequestDo(self::TEST_DOMAIN, sprintf(\"/resources/annotations/%s\", $resp[\"BodyParsed\"][\"data\"][\"annotation_id\"]));\n\t\t$this->assertEqual(mb_convert_encoding(\"Schöne Äpfelchen aus Überlingen\", \"UTF8\"), $resp[\"BodyParsed\"][\"data\"][0][\"annotation\"]);\n\t}", "function db_seems_utf8()\n{\n\tglobal $db_type, $forum_db;\n\n\t$seems_utf8 = true;\n\n\t$query = array(\n\t\t'SELECT'\t=> 'MIN(id), MAX(id), COUNT(id)',\n\t\t'FROM'\t\t=> 'posts'\n\t);\n\n\t$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);\n\tlist($min_id, $max_id, $count_id) = $forum_db->fetch_row($result);\n\n\tif ($count_id == 0)\n\t\treturn false;\n\n\t// Get a random soup of data and check if it appears to be UTF-8\n\tfor ($i = 0; $i < 100; ++$i)\n\t{\n\t\t$id = ($i == 0) ? $min_id : (($i == 1) ? $max_id : rand($min_id, $max_id));\n\n\t\t$query = array(\n\t\t\t'SELECT'\t=> 'p.message, p.poster, t.subject, f.forum_name',\n\t\t\t'FROM'\t\t=> 'posts AS p',\n\t\t\t'JOINS'\t\t=> array(\n\t\t\t\tarray(\n\t\t\t\t\t'INNER JOIN'\t=> 'topics AS t',\n\t\t\t\t\t'ON'\t\t=> 't.id = p.topic_id'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'INNER JOIN'\t=> 'forums AS f',\n\t\t\t\t\t'ON'\t\t=> 'f.id = t.forum_id'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'WHERE'\t\t=> 'p.id >= '.$id,\n\t\t\t'LIMIT'\t\t=> '1'\n\t\t);\n\n\t\t$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);\n\t\t$random_row = $forum_db->fetch_row($result);\n\n\t\tif (!seems_utf8($random_row[0].$random_row[1].$random_row[2].$random_row[3]))\n\t\t{\n\t\t\t$seems_utf8 = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn $seems_utf8;\n}", "function utf8_ensure($s) {\r\n return is_utf8($s) ? $s: unicode_entities_to_utf8_encode($s);\r\n}", "function to_utf8($string) {\n\t// From http://w3.org/International/questions/qa-forms-utf-8.html\n\tif (preg_match('%^(?:\n\t\t [\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\n\t\t| [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n\t\t| \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n\t\t| [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n\t\t| \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n\t\t| \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n\t\t| [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n\t\t| \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n\t)*$%xs', $string))\n\t\treturn $string;\n\telse\n\t\treturn iconv('CP1252', 'UTF-8', $string);\n}", "public function testPdfWithUTF16BETitleConvertToUTF8()\n {\n // '😻' (U+1F63B;D83DDE3B) in hexadecimal and as UTF16BE\n $actualTitle = $this->hexToStr('D83DDE3B');\n\n $tagger = $this->getTaggerMock();\n $tagger->expects($this->once())\n ->method('tag');\n\n $ruleBasedIgnoreOriginProcessor = $this->getRuleBasedIgnoreOriginProcessorMock();\n\n $graby = $this->getMockBuilder(Graby::class)\n ->setMethods(['fetchContent'])\n ->disableOriginalConstructor()\n ->getMock();\n\n $graby->expects($this->any())\n ->method('fetchContent')\n ->willReturn([\n 'html' => false,\n 'title' => $actualTitle,\n 'url' => '',\n 'headers' => [\n 'content-type' => 'application/pdf',\n ],\n 'language' => '',\n ]);\n\n $proxy = new ContentProxy($graby, $tagger, $ruleBasedIgnoreOriginProcessor, $this->getValidator(), $this->getLogger(), $this->fetchingErrorMessage);\n $entry = new Entry(new User());\n $proxy->updateEntry($entry, 'http://0.0.0.0');\n\n // '😻' (U+1F63B or F09F98BB) in hexadecimal and UTF-8\n $expectedTitle = 'F09F98BB';\n $this->assertSame($expectedTitle, $this->strToHex($entry->getTitle()));\n }" ]
[ "0.76496893", "0.68847066", "0.68486285", "0.6833621", "0.6806744", "0.6744659", "0.6720361", "0.6569568", "0.6496865", "0.64874697", "0.6466876", "0.64388347", "0.64358455", "0.64244616", "0.6396655", "0.63742805", "0.6335759", "0.63269097", "0.6323076", "0.63185716", "0.6299213", "0.6297746", "0.6291715", "0.62899923", "0.62877506", "0.6274192", "0.6264976", "0.6259459", "0.62592965", "0.6244965", "0.62406194", "0.62328374", "0.6229587", "0.6198778", "0.61982626", "0.61964345", "0.6189793", "0.6183555", "0.6182421", "0.6179559", "0.61504644", "0.61177415", "0.61075485", "0.6069058", "0.60650694", "0.6038363", "0.6023854", "0.5955823", "0.5953411", "0.59487927", "0.59487927", "0.5938745", "0.5937037", "0.5929475", "0.59278476", "0.5916258", "0.590802", "0.5906856", "0.59062666", "0.5893636", "0.58728004", "0.5872538", "0.5870531", "0.5863427", "0.58567894", "0.5849844", "0.58425295", "0.58409065", "0.58332837", "0.5820542", "0.580247", "0.57938826", "0.5792729", "0.57894176", "0.5788113", "0.5785399", "0.57798433", "0.57772857", "0.5774648", "0.57697755", "0.57636607", "0.57610834", "0.5757352", "0.5751948", "0.57476807", "0.5742869", "0.57383734", "0.5725691", "0.57254946", "0.57160604", "0.57141024", "0.57140374", "0.5700534", "0.5696169", "0.56922543", "0.5689573", "0.56882733", "0.56713104", "0.5669077", "0.5664182" ]
0.7180495
1
Sanitize this request's input.
Очистите входные данные этого запроса.
public function sanitize() { $this->sanitizer = \Sanitizer::make($this->input(), $this->filters()); $this->replace($this->sanitizer->sanitize()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sanitize()\n {\n $inputs = $this->all();\n\n foreach ($inputs as $field => $value) {\n $inputs[$field] = filter_var($value, FILTER_SANITIZE_STRING);\n }\n\n $this->replace($inputs);\n }", "function sanitizeInput() {\n\t\t$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);\n\t\t$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\t}", "private function sanitize(): void\n {\n $sanitizer = app(FactoryContract::class)\n ->make($this->input(), $this->filters());\n\n $this->replace($sanitizer->sanitize());\n }", "private function sanitize_things() {\n\n\t\t\t// Keylike inputs\n\t\t\t$request_params = array( 'act' , 'action' , 'deactivate' , 'option_page' , 'page' , 'sortorder' );\n\t\t\tforeach ( $request_params as $key ) {\n\t\t\t\t$this->clean[ $key ] = ! empty( $_REQUEST[ $key ] ) ? sanitize_key( $_REQUEST[ $key ] ) : '';\n\t\t\t}\n\n\t\t\t// Int only inputs\n\t\t\t$request_params = array( 'locationID' , 'start' );\n\t\t\tforeach ( $request_params as $key ) {\n\t\t\t\t$this->clean[ $key ] = ! empty( $_REQUEST[ $key ] ) ? intval( $_REQUEST[ $key ] ) : 0;\n\t\t\t}\n\n\t\t\t// Text only inputs\n\t\t\t$request_params = array( 'selected_nav_element' );\n\t\t\tforeach ( $request_params as $key ) {\n\t\t\t\t$this->clean[ $key ] = ! empty( $_REQUEST[ $key ] ) ? sanitize_text_field( $_REQUEST[ $key ] ) : '';\n\t\t\t}\n\n\t\t\t// Orderby inputs\n\t\t\t$request_params = array( 'orderBy' );\n\t\t\tforeach ( $request_params as $key ) {\n\t\t\t\t$this->clean[ $key ] = ! empty( $_REQUEST[ $key ] ) ? sanitize_sql_orderby( $_REQUEST[ $key ] ) : '';\n\t\t\t}\n\n\t\t}", "public function sanitize() {\n $input = $this->all();\n\n $input['blog_name'] = filter_var($input['blog_name'], FILTER_SANITIZE_STRING);\n $input['blog_seo_string'] = filter_var($input['blog_seo_string'], FILTER_SANITIZE_STRING);\n $input['blog_short_desc'] = filter_var($input['blog_short_desc'], FILTER_SANITIZE_STRING);\n $input['blog_desc'] = filter_var($input['blog_desc'], FILTER_SANITIZE_STRING);\n $input['status'] = filter_var($input['status'], FILTER_SANITIZE_NUMBER_INT);\n if (Auth::check()) {\n $input['created_by'] = filter_var(Auth::user()->id, FILTER_SANITIZE_NUMBER_INT);\n }\n $this->merge($input);\n }", "protected function sanitize()\n {\n $sanitized = sanitizer()->make(\n $this->all(),\n $this->sanitizerRules()\n );\n\n $this->replace($sanitized);\n }", "public function get_sanitized() {\n\n return $this->saneInput;\n }", "function Sanitize() {\n }", "public function sanitize_input( $input = null ) {\n\n return $input;\n\n }", "public function sanitizeData($input) {\n\t\t$data = trim($input);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\n\t}", "public function sanitize($input) {\n return htmlspecialchars(stripslashes(trim($input)));\n }", "public function sanitize()\n {\n $purifier = $this->_purifier;\n $this->_sanitized_data = array_map(\n function ($field) use ($purifier) {\n return strip_tags($purifier->purify($field));\n },\n $this->_data\n );\n }", "public function sanitize()\n {\n if ($this->request->has('email')) {\n\n $input = $this->all();\n $input['email'] = strtolower($input['email']);\n $this->replace($input);\n }\n \n return $this->all();\n }", "function filterInput($str){ return sanitize($str, array('full' => true)); }", "function sanitizeInput($input)\r\n {\r\n $input = strip_tags($input);\r\n $input = trim($input);\r\n $input = htmlspecialchars($input);\r\n $input = htmlentities($input);\r\n return $input;\r\n }", "function sanitizeString($input){\n return filter_input(INPUT_GET, $input, FILTER_SANITIZE_STRING);\n}", "public function sanitize(&$data);", "public static function sanitizePost() {\n return filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n }", "protected function sanitizeInput($input)\n {\n foreach ($input as $key => $value)\n {\n if (!in_array($key, $this->whiteList)) {\n unset($input[$key]);\n continue;\n }\n\n filter_var($input[$key], FILTER_SANITIZE_STRING);\n }\n return $input;\n }", "private function _sanitize($input) {\n return preg_replace('/[^-a-zA-Z0-9_]/', '', $input);\n }", "function sanitise_input($data) {\n\t\t\t$data = trim($data);\n\t\t\t$data = stripslashes($data);\n\t\t\t$data = htmlspecialchars($data);\n\t\t\treturn $data;\n\t\t}", "public function sanitize()\n {\n $input = $this->all();\n\n if (!array_key_exists('site', $input))\n $input['site'] = $input['site']; // TODO normalize site url\n\n if (!array_key_exists('site-meta', $input))\n $input['site-meta'] = '{}';\n\n $this->replace($input); \n }", "protected function cleanData()\n {\n $this->sanitizeData();\n }", "protected function sanitizeInput() {\n if ($this->isInputArray()) {\n $realName = $this->getRealName();\n if (!empty($_POST[$realName])){\n foreach ($_POST[$realName] as $key => $data){\n $_POST[$realName][$key] = $this->sanitize($data);\n }\n return $_POST[$realName];\n }\n } else {\n return parent::sanitizeInput();\n }\n return \"\";\n }", "private function sanitizeHTTPParameters() {\n foreach ($_POST as $key => $value) {\n $_POST[$key] = $this->mysqli->real_escape_string($value);\n }\n }", "function sanitiseInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function sanitize_input($data)\r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function sanitize_input($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "function sanitize_input($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "function sanitize_input($input)\n{\n\t$input = trim($input);\n\t$input = stripslashes($input);\n\t$input = htmlspecialchars($input);\n\treturn $input;\n}", "function sanitize_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function sanitize_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "public function sanitize($value)\n {\n }", "public function sanitize( $input )\n\t\t{\n\t\t\t$new_input = [];\n\t\t\tif( isset( $input[ 'email' ] ) )\n\t\t\t\t$new_input[ 'email' ] = sanitize_email( $input[ 'email' ] );\n\n\t\t\tif( isset( $input[ 'path' ] ) )\n\t\t\t\t$new_input[ 'path' ] = sanitize_option( 'upload_path', $input[ 'path' ] );\n\n\t\t\tif( isset( $input[ 'filename' ] ) )\n\t\t\t\t$new_input[ 'filename' ] = sanitize_file_name( $input[ 'filename' ] );\n\n\t\t\tif( isset( $input[ 'cron' ] ) )\n\t\t\t\t$new_input[ 'cron' ] = sanitize_text_field( $input[ 'cron' ] );\n\n\t\t\treturn $new_input;\n\t\t}", "function sanitizeInput() {\n\t$_POST ['fullName'] = strip_tags ( trim ( $_POST ['fullName'] ) );\n\t$_POST ['officeID'] = strip_tags ( trim ( $_POST ['officeID'] ) );\n\t$_POST ['department'] = strip_tags ( trim ( $_POST ['department'] ) );\n\t$_POST ['post'] = strip_tags ( trim ( $_POST ['post'] ) );\n\t$_POST ['email'] = strip_tags ( trim ( $_POST ['email'] ) );\n\t$_POST ['username'] = strip_tags ( trim ( $_POST ['username'] ) );\n\t$_POST ['pass'] = strip_tags ( trim ( $_POST ['pass'] ) );\n\t$_POST ['rePass'] = strip_tags ( trim ( $_POST ['rePass'] ) );\n}", "function sanitize_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "public static function inputSanitize($input) {\r\n\t\tif (is_array ( $input )) {\r\n\t\t\treturn $input;\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$input = trim ( $input );\r\n\t\t\t$input = strip_tags ( $input );\r\n\t\t\t$input = htmlspecialchars ( $input );\r\n\t\t\t$input = str_replace(array('\\r', '\\n'), '', $input); //remove newline from string\r\n\t\t\treturn $input;\r\n\t\t}\r\n\t}", "function sanitize_input($data) \n{ \n $data = trim($data); \n $data = stripslashes($data); \n $data = htmlspecialchars($data);\n return $data; \n}", "function sanitize_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function sanitiseInput($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "public function sanitize()\n {\n return $this->addFlag(Flag::sanitize());\n }", "public function sanitize( $input )\n {\n if( isset( $input['accesstoken'] ) )\n $new_input['accesstoken'] = sanitize_text_field( $input['accesstoken'] );\n\n if( isset( $input['facebook_url'] ) )\n $new_input['facebook_url'] = sanitize_text_field( $input['facebook_url'] );\n \n if( isset( $input['id'] ) )\n $new_input['id'] = sanitize_text_field( $input['id'] );\n \n if( isset( $input['secret'] ) )\n $new_input['secret'] = sanitize_text_field( $input['secret'] );\n\n return $new_input;\n }", "function sanitize($input) {\n\t\tif (is_array($input)) {\n\n// check each array value\n\t\t foreach($input as $var=>$val) {\n\t\t\t\t$output[$var] = sanitize($val);\n\t\t }\n\n// otherwise..\n\t\t}else{\n\t\t if (get_magic_quotes_gpc()) {\n\n// strip out back slashes\n\t\t\t\t$input = stripslashes($input);\n\t\t }\n\n// pass the string to the CLEANINPUT function for further processing\n\t\t $input = cleanInput($input);\n\n// escapes special characters contained in the string such as ' or \\\n\t\t $output = mysql_real_escape_string($input);\n\t }\n\n// in case some muppet tries to add in SQL code it truncates the submitted string at the first semi-colon\n\t $output = preg_replace('/\\;.*/', '', $output);\n\t $output = preg_replace('/=.*/', '', $output);\n\n\t return $output;\n }", "abstract public function cleanInput($input);", "function clean_input($inputData): string\n {\n $inputData = trim($inputData);\n $inputData = stripslashes($inputData);\n $inputData = htmlspecialchars($inputData);\n return $inputData;\n }", "public function sanitize()\n {\n return $this->value;\n }", "public static function globalXssClean() {\n // Recursive cleaning for array [] inputs, not just strings.\n $sanitized = static::arrayStripTags(Request::all());\n Request::merge($sanitized);\n }", "function sanitize($data)\n{\n return filter_var(trim($_POST[$data]), FILTER_SANITIZE_STRING);\n}", "public function getCleanedRequest() {\n $request = $this->getRequest();\n foreach ($this->_sensitive_fields as $field) {\n $request = preg_replace(\"/({$field}\\[\\d*\\])=[^&]*/\",\n \"$1=XXXXXXXX\", $request);\n }\n return $request;\n }", "function clean_input($data) {\n $data = trim($data); // strips unnecessary characters from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n }", "public function safeInput($input){\r\n\t\t\t$data = trim($input);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t\t}", "function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "protected static function sanitize(string $input): string\n {\n return \\json_encode(\n \\preg_replace('#[^\\x20-\\x7e]#', '', $input)\n );\n }", "public function sanitize( $input ) {\n\t\treturn $input;\n\n\t\t$new_input = array();\n\t\tif ( isset( $input['id_number'] ) ) {\n\t\t\t$new_input['id_number'] = absint( $input['id_number'] );\n\t\t}\n\n\t\tif ( isset( $input['title'] ) ) {\n\t\t\t$new_input['title'] = sanitize_text_field( $input['title'] );\n\t\t}\n\n\t\treturn $new_input;\n\t}", "protected function _sanitize($value, $filter) {}", "public function sanitize( $input )\r\n {\r\n $new_input = array();\r\n\r\n if( isset( $input['consumer_key'] ) )\r\n $new_input['consumer_key'] = sanitize_text_field( $input['consumer_key'] );\r\n\r\n if( isset( $input['consumer_secret'] ) )\r\n $new_input['consumer_secret'] = sanitize_text_field( $input['consumer_secret'] );\r\n\r\n return $new_input;\r\n }", "function clean_input() {\n\t\tglobal $errors;\n\t\tarray_walk_recursive($this->input, function(&$value, $key) {\n\t\t\tglobal $errors;\n\t\t\t$value = addslashes($value);\n\t\t\tif(empty($value)) {\n\t\t\t\t$errors[] = $key.\" input has been left empty\";\n\t\t\t}\n\t\t});\n\t\tif($errors) {\n\t\t\t$this->message($errors, 'error');\n\t\t}\n\t}", "function sanitize () {\n\t\t$this->text = preg_replace(\"/\\r/\", \"\", $this->text); // remove carriage returns\n\t\t$this->text = preg_replace(\"/(?<=\\n)\\s*\\n/\", \"\\n\", $this->text); // remove extra whitespace and duplicate empty lines\n\t\n\t\t// entify\n\t\t$this->text = htmlentities($this->text, ENT_QUOTES, \"UTF-8\");\n\t}", "function filter($entry) {\n //Filter user input to safeguard against XXS and SQL injections.\n $entry = htmlspecialchars($entry); //Against any XSS and SQL injections\n $entry = trim($entry); //Against SQL injections\n $entry = stripslashes($entry);\n return $entry; //Sanitized input\n}", "public function complete_sanitization($input)\n {\n return $this->remove_urls($this->remove_RT($this->remove_usernames($input)));\n }", "function clean_input($data){\r\n\t\t$data = trim($data);\r\n\t\t$data = stripslashes($data);\r\n\t\t$data = htmlspecialchars($data);\r\n\t\treturn $data;\r\n\t}", "function clean_input($data) \n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function clean_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function sanitize_input($str) {\n\treturn preg_replace(\"/[?'&<>\\\"]/\", \"\", $str);\n}", "function clean_input($data){\n $data = strip_tags($data);\n $data = trim($data);\n $data = htmlentities($data);\n $data = htmlspecialchars($data);\n $data = strIpslashes($data);\n\n return $data;\n }", "function clean_input($data) {\n $data = trim($data); // strips unnecessary characters from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n}", "public function sanitize( $input )\r\n {\r\n $new_input = array();\r\n if( isset( $input['api_key'] ) ) {\r\n $new_input['api_key'] = sanitize_text_field( $input['api_key'] );\r\n\t\t\t$url = str_replace(array('http://', 'www.', '/'), '', get_bloginfo('url'));\r\n\t\t\t$response = wp_remote_get('https://www.wpshepherd.com/server/wpsave/api_key/' . $input['api_key'] . '/url/' . $url . '/version/' . SHEP_VERSION, array('user-agent' => 'WordPress/WPShep/' . SHEP_VERSION));\t\r\n\t\t}\r\n\r\n return $new_input;\r\n }", "function sanitizeInput($value) {\n return preg_replace('/[^A-Za-z0-9 ]/', '', $value);\n }", "function clean_input($data){\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t}", "function clean_input($data){\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t}", "public function sanitize()\n {\n $attributes = $this->all();\n $attributes = $this->filterEditRoles($attributes);\n\n if (!strlen($this->get('password'))) {\n unset($attributes['password']);\n }\n\n $this->replace($attributes);\n }", "function sanitize($data) {\n // Remove superfluous spaces at the start and end of the string.\n $data = trim($data);\n // Remove backslashes that hackers might use to escape special characters.\n $data = stripslashes($data);\n // Transform some special characters into HTML entities to make them harmless.\n $data = htmlspecialchars($data);\n // Add slashes to avoid closing strings in the form.\n $data = addslashes($data);\n return $data;\n}", "public function validate()\n {\n $this->sanitize();\n\n parent::validate();\n }", "public function validate()\n {\n $this->sanitize();\n\n parent::validate();\n }", "function getCleanedRequest($request, $isHTML = false) {\n\t$cleanedRequest = trim($request);\n\n\tif ($isHTML)\n\t\t$cleanedRequest = htmlspecialchars($request);\n\telse\n\t\t$cleanedRequest = strip_tags($request);\n\n\treturn $cleanedRequest;\n}", "function sanitize($in)\n{ if (isset($_REQUEST[$in])) return mysql_escape_string($_REQUEST[$in]); else return 'notset'; }", "function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function input_filter($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "public function sanitize($input)\n\t{\n\t\t$new_input = array();\n\t\tif (isset($input['Trip_post_type_slug']))\n\t\t\t$new_input['Trip_post_type_slug'] = sanitize_text_field($input['Trip_post_type_slug']);\n\t\tif (isset($input['trip_price_hide']))\n\t\t\t$new_input['trip_price_hide'] = sanitize_text_field($input['trip_price_hide']);\n\t\tif (isset($input['trip_discount_hide']))\n\t\t\t$new_input['trip_discount_hide'] = sanitize_text_field($input['trip_discount_hide']);\n\t\tif (isset($input['trip_status_hide']))\n\t\t\t$new_input['trip_status_hide'] = sanitize_text_field($input['trip_status_hide']);\n\t\tif (isset($input['trip_status_option']))\n\t\t\t$new_input['trip_status_option'] = sanitize_text_field($input['trip_status_option']);\n\n\t\treturn $new_input;\n\t}", "function prepareInput($input): string\n{\n\treturn trim(htmlspecialchars($input));\n}", "function sanitizeString(string $input) : string {\n\n if (!is_null($input) && !empty($input)) {\n $input = trim($input);\n $input = filter_var($input, FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW | FILTER_FLAG_ENCODE_AMP);\n return $input;\n } else {\n return '';\n }\n\n}", "function airgame_sanitize( $input ) {\n\treturn strip_tags( stripslashes( $input ) );\n}", "function cleanInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function cleanInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function cleanInput($data) { \r\n return htmlspecialchars(stripslashes(trim($data)));\r\n }", "function input_filter($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data; \n\t}", "function sanitize($data)\n {\n // De asemenea poate sa fie folosit si pentru getting POST/GET variables\n //$_POST = sanitize($_POST);\n //$_GET = sanitize($_GET);\n if (is_array($data))\n \t foreach($data as $var=>$val) {\n $output[$var] = sanitize($val);\n } \n else \n {\n \t\t// remove whitespaces (not a must though)\n \t\t$data = trim($data); \n \t\t// apply stripslashes if magic_quotes_gpc is enabled\n \t\tif(get_magic_quotes_gpc()) \n \t\t{\t$data = stripslashes($data); }\n \t\t// curatire p. atacuri XSS cros site scripting \n \t\t$data = cleanInput($data);\n \t\t// a mySQL connection is required before using this function\n \t\t// transforma caracterele speciale in escape (\\x00, \\n, \\r, \\, ', \" and \\x1a.) \n \t\t$data = mysql_real_escape_string($data);\n \t}\n return $data;\n }", "public function sanitized(): string;", "function cleanInput($data) {\r\n\t\r\n\t$data = trim($data);\r\n\t\r\n\t$data = stripslashes($data);\r\n\t\r\n\t$data = htmlspecialchars($data);\r\n\t\r\n\treturn $data;\r\n}", "public function cleanInput($input) {\n\t\t\t$value = strip_tags($input);\n\t\t\t$value = stripslashes($value);\n\n\t\t\treturn $value;\n\t\t}", "public function sanitize()\n {\n return [];\n }", "function cleanInput($data){\n $data=trim($data);\n $data=stripslashes($data);\n $data=htmlspecialchars($data);\n return $data;\n}", "function cleanInput($data){\n $data=trim($data);\n $data=stripslashes($data);\n $data=htmlspecialchars($data);\n return $data;\n}", "function clean_input($data) \n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "public function validate()\n {\n $this->sanitize();\n parent::validate();\n }", "function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "function clean_inputData($value) {\n $value = htmlspecialchars($value);\n $value = trim($value);\n $value = stripslashes($value);\n return $value;\n}", "function clean_post_input($data) {\n /* trim whitespace */\n $data = trim($data);\n \n $data = htmlspecialchars($data);\n return $data;\n }", "public function sanitizePostedVariables() {\n $sanitizedArray = array();\n foreach ($_POST as $key => $value) {\n $sanitizedArray[$key] = htmlspecialchars(trim(filter_input_fix(INPUT_POST, $key)));\n }\n return $sanitizedArray;\n }" ]
[ "0.7901133", "0.7617234", "0.75558186", "0.72809184", "0.7217363", "0.7152169", "0.71452767", "0.7108423", "0.70685405", "0.69733936", "0.68336314", "0.68315756", "0.6728299", "0.6728089", "0.67182523", "0.67179614", "0.67059696", "0.6684357", "0.6654827", "0.6645629", "0.6645387", "0.6639741", "0.6616164", "0.66025656", "0.6594957", "0.65937847", "0.6581763", "0.6578775", "0.657834", "0.65678686", "0.6552518", "0.6552518", "0.65477985", "0.6537462", "0.65355396", "0.6533889", "0.65290195", "0.6511845", "0.64989907", "0.64843327", "0.6483179", "0.64797926", "0.6468545", "0.645782", "0.64397377", "0.643783", "0.6435348", "0.64252996", "0.64204323", "0.6410374", "0.640578", "0.6400704", "0.638405", "0.6379616", "0.6379437", "0.6366076", "0.6345841", "0.63449985", "0.633984", "0.63341737", "0.63277763", "0.632584", "0.63249135", "0.6314915", "0.62896115", "0.6288219", "0.62793845", "0.6274349", "0.62704897", "0.62704897", "0.626823", "0.6264181", "0.6263861", "0.6263861", "0.62561905", "0.62478006", "0.62435764", "0.62377566", "0.623468", "0.6221543", "0.6218928", "0.6206389", "0.6201346", "0.6201346", "0.6196176", "0.6193077", "0.61906344", "0.6188816", "0.6187388", "0.6186849", "0.6184636", "0.6179266", "0.6179266", "0.6179192", "0.61785793", "0.6175115", "0.6175115", "0.6171646", "0.6168218", "0.6164365" ]
0.7764818
1
/ !Get methods Returns the interval's islowerinclusive flag
/ !Get методы Возвращает флаг islowerinclusive интервала
public function getIsLowerInclusive(): bool { return $this->isLowerInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLowerInclusive(): bool\n {\n return $this->isLowerInclusive;\n }", "public function includeLowerBound() {\n return $this->lBoundIn;\n }", "public function setLowerInclusive(): self\n {\n $this->isLowerInclusive = true;\n \n return $this;\n }", "public function getLowerBound() {\n return $this->lBound;\n }", "public function lowerBound()\n {\n }", "public function isLowerExclusive(): bool\n {\n return ! $this->isLowerInclusive;\n }", "public function setInclusive($inclusive);", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === -1;\n }", "public function getTermsIncludeLowerBound(): bool {}", "public function getTermsIncludeLowerBound(): bool {}", "public function setLowerExclusive(): self\n {\n $this->isLowerInclusive = false;\n \n return $this;\n }", "public function setIsLowerInclusive(bool $isLowerInclusive): self\n {\n $this->isLowerInclusive = $isLowerInclusive;\n \n return $this;\n }", "public function getMinRange()\n {\n return $this->minRange;\n }", "public function getIsUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "public function between($low, $high);", "public function getIbuRange();", "function inRange($low, $high, $val)\n\t{\n\t\treturn $val >= $low && $val <= $high;\n\t}", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === null;\n }", "public function inRange()\n {\n return $this->getNumber() >= $this->minRange && $this->getNumber() <= $this->maxRange;\n }", "public function getLowerLimit()\n {\n return $this->lower_limit;\n }", "public function getAbvRange();", "public function clipLower(float $min)\n {\n $b = [];\n\n foreach ($this->a as $value) {\n if ($value < $min) {\n $b[] = $min;\n\n continue 1;\n }\n\n $b[] = $value;\n }\n\n return static::quick($b);\n }", "public function testInclusive()\n {\n $validator = new Zefram_Validate_GreaterThanContext('min', true);\n $validator->setInclusive(false);\n $this->assertFalse($validator->getInclusive());\n }", "function minIndexInterval();", "function value_in_range($value,$min,$max=false)\n{\n if($min!==false && $value<$min){return false;}\n if($max!==false && $value>$max){return false;}\n return true;\n}", "public function globalVarConditionMatchesOnLowerThanExpression() {}", "public function globalVarConditionMatchesOnLowerThanExpression() {}", "public function hasRanges(){\n return $this->_has(2);\n }", "public static function minBound($intervals);", "function isInterval(){\r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n $interval = $stop_map[0] - $start_map[0];\r\n return !empty($interval);\r\n }", "public function getZipIsRange();", "public function isUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "public static function inside($value, $lower, $upper)\n {\n return static::inRange($value, $lower, $upper, false, false);\n }", "public function globalVarConditionMatchesOnLowerThanOrEqualExpression() {}", "public function globalVarConditionMatchesOnLowerThanOrEqualExpression() {}", "function isWithin($interval){\r\n \r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n $this_interval = $stop_map[0] - $start_map[0];\r\n return ($this_interval <= $interval);\r\n \r\n }", "public function getOgRange();", "public function lRange()\n {\n }", "function inRange($arg)\n{\n if (($arg > 50) and ($arg < 100)) {\n $svar = true;\n } else {\n $svar = false;\n }\n return (boolean) $svar;\n}", "public function getRangeValueMin()\n {\n return $this->rangeValueMin;\n }", "public function includeUpperBound() {\n return $this->uBoundIn;\n }", "function isBetween($value, $min, $max, $inc = TRUE)\n\t{\n\t\tif ($value > $min &&\n\t\t$value < $max) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif ($inc &&\n\t\t$value >= $min &&\n\t\t$value <= $max) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "function range1($var)\n{\nif(($var >= 100)&&($var < 200))\n{\n\treturn true;\n\n}\n}", "public function getRange($interval);", "public static function isTaxInclusive(): bool\n {\n return (bool) core()->getConfigData('taxes.catalogue.pricing.tax_inclusive');\n }", "public function setLowerBoundValidation(int $min) {\n $this->min = intval($min);\n $this->max = -1;\n return $this;\n }", "public function testValidateRangeLowerBound()\n {\n $builder = new Command\\Builder\\QueryIndex(static::$riak);\n $builder->buildBucket('some_bucket')\n ->withIndexName(\"foo_int\")\n ->withRangeValue(null, 42);\n\n $builder->build();\n }", "public function isBeginsWithinDateInterval($lowerBoundDate, $upperBoundDate) {\n\n\t\t$minday = date('Y-m-d', strtotime($lowerBoundDate));\n\t\t$maxday = date('Y-m-d', strtotime($upperBoundDate));\n\t\t$thisday = date('Y-m-d', strtotime($this->beginDate));\n\n\t\treturn ( empty($lowerBoundDate) || $thisday >= $minday)\n\t\t\t&& ( empty($upperBoundDate) || $thisday <= $maxday);\n\t}", "public function getLowerBoundAttribute() {\n return $this->application ?? $this->start;\n }", "public function getRange()\n {\n }", "function inRange($value, $start, $end){\n\t if(!is_numeric($value)){\n\t $value = intval($value);\n\t }\n\t\t\n\t if($value > $end){\n\t\t\treturn $end;\n\t\t}\n\t\tif($value < $start){\n\t\t\treturn $start;\n\t\t}\n\t\treturn $value;\n\t}", "public function getTermsLowerBound(): string {}", "public function getTermsLowerBound(): string {}", "function checkRange ($i, $min, $max){\n if($i < $min or $i > $max){\n \n return false;\n \n }else\n {\n return true;\n }\n \n}", "public function filterByLt() {\n $args = func_get_args();\n return $this->internalFilterBy($args, '<');\n }", "function _is_in_range($client_ip, $start, $end)\n{\n $start = ip2long($start);\n\n if (false === $start) {\n return false;\n }\n\n $end = ip2long($end);\n\n if (false === $end) {\n return false;\n }\n\n return ($client_ip >= $start && $client_ip <= $end);\n}", "public static function inRange($value, $lower, $upper, $lowerExclusive = false, $upperExclusive = false)\n {\n if (!static::is($value) || !static::is($lower) || !static::is($upper)) {\n throw new \\InvalidArgumentException(\"The \\$value, \\$lower and \\$upper parameters must be numeric.\");\n }\n\n $lowerLimit = min($lower, $upper);\n if (!(($lowerExclusive) ? $lowerLimit < $value : $lowerLimit <= $value)) {\n return false;\n }\n\n $upperLimit = max($lower, $upper);\n if (!(($upperExclusive) ? $upperLimit > $value : $upperLimit >= $value)) {\n return false;\n }\n\n return true;\n }", "public function getFromRange()\n\t{\n\t\treturn $this->getKeyValue('from_range'); \n\n\t}", "public function inInterval($value) {\n if (!is_numeric($value)) {\n return FALSE;\n }\n else if ($this->isEmpty()) {\n return FALSE;\n }\n else if (!$this->allowFloats() && is_double($value)) {\n return FALSE;\n }\n else if ($this->includeLowerBound() && $value < $this->getLowerBound()) {\n return FALSE;\n }\n else if (!$this->includeLowerBound() && $value <= $this->getLowerBound()) {\n return FALSE;\n }\n else if ($this->includeUpperBound() && $value > $this->getUpperBound()) {\n return FALSE;\n }\n else if (!$this->includeUpperBound() && $value >= $this->getUpperBound()) {\n return FALSE;\n }\n else {\n return TRUE;\n }\n }", "public function isLessThanValue($value);", "public function getLower()\n {\n return $this->lower;\n }", "public function testBetween($key, $min, $max, $inc = TRUE)\n {\n if (!$this->keyExists($key)) \n {\n return false;\n }\n \n $value = $this->_source[$key];\n \n if ($value < $min ||\n $value > $max) \n {\n return false;\n }\n\n if ($inc &&\n $value <= $min ||\n $value >= $max) \n {\n return false;\n }\n \n return $this->_source[$key];\n }", "public function getThresholdRange()\n {\n return $this->threshold_range;\n }", "function get_resource_ref_range($lower,$higher)\n\t{\n\treturn sql_array(\"select ref value from resource where ref>='$lower' and ref<='$higher' and archive=0 order by ref\",0);\n\t}", "public static function range($check, $lower = null, $upper = null) {\n if (!is_numeric($check)) {\n return false;\n }\n if (isset($lower) && isset($upper)) {\n return ($check > $lower && $check < $upper);\n }\n return is_finite($check);\n }", "public function between()\n\t{\n\t}", "public static function between($value, $lower, $upper)\n {\n return static::inRange($value, $lower, $upper, true, true);\n }", "public function getRange() {\n return $this->range;\n }", "public function lessThan($value);", "public function setTermsIncludeLowerBound(bool $flag): \\SolrQuery {}", "public function setTermsIncludeLowerBound(bool $flag): \\SolrQuery {}", "function range() {\n\t\treturn $this->data['range'];\n\t}", "public function in_range( $str, $field )\n {\n $_range = explode( '-', $field );\n $_low = isset( $_range[0] ) ? (float) $_range[0] : NULL;\n $_high = isset( $_range[1] ) ? (float) $_range[1] : NULL;\n\n if (is_null($_low) || is_null($_high)) {\n\n return true;\n }\n\n if ( (float) $str >= $_low && (float) $str <= $_high ) :\n\n return TRUE;\n\n else :\n\n $CI =& get_instance();\n\n if ( ! array_key_exists( 'in_range', $CI->form_validation->_error_messages ) ) :\n\n $CI->form_validation->set_message( 'in_range', lang( 'fv_in_range_field' ) );\n\n endif;\n\n return FALSE;\n\n endif;\n }", "function getLowerLimit($minVal) {\n\t\t\tglobal $graphMin;\n\t\t\treturn floor($minVal) * $graphMin;\n\t\t}", "function number_between($val, $min, $max, $boundary = true, $reverse = false)\n {\n $result = $boundary ? ($val >= $min && $val <= $max) : ($val > $min && $val < $max);\n\n return $reverse ? ! $result : $result;\n }", "public function getMin();", "public function setTermsLowerBound(string $lowerBound): \\SolrQuery {}", "public function setTermsLowerBound(string $lowerBound): \\SolrQuery {}", "public function validManFloatInclusiveCases(): array\n {\n $cases = $this->validManFloatCases();\n\n $cases[] = ['valid.float-inclusive', null, INF];\n\n return $cases;\n }", "public function getRange()\r\n\t{\r\n\t\treturn $this->range;\r\n\t}", "private function validateLowerThan(): bool\n {\n if ($this->options['inclusive'] === true) {\n $isValid = \\mb_strlen($this->value, 'UTF-8') <= $this->options['length'] ? true : false;\n if (!$isValid) {\n $this->setError(self::VALIDATOR_ERROR_STRING_LENGTH_MUST_BE_LOWER_OR_EQUAL_TO_MAX);\n }\n return $isValid;\n }\n\n $isValid = \\mb_strlen($this->value, 'UTF-8') < $this->options['length'] ? true : false;\n if (!$isValid) {\n $this->setError(self::VALIDATOR_ERROR_STRING_LENGTH_MUST_BE_LOWER_THAN_MAX);\n }\n return $isValid;\n }", "function inRange($numberOne, $numberTwo)\n{\n return ($numberOne <= 20 || $numberTwo >= 50) || ($numberTwo <= 20 || $numberOne >= 50);\n}", "public function hasCodepointRange(){\n return $this->_has(2);\n }", "public function isRangeValidator(): bool {\n return $this->min >= 0 && $this->min < $this->max;\n }", "public function getRange()\n {\n return $this->range;\n }", "public function getRange()\n {\n return $this->range;\n }", "public function getRange()\n {\n return $this->range;\n }", "public function getCarbRange();", "public function range() {\n }", "function AssumeIsWithinRange($value, $msg, $min, $max)\n\t{\n\t\tif(!is_numeric($value) || $value < $min || $value > $max)\n\t\t{\n\t\t\terror_page($msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}", "public function isLessOrEqualThanValue($value);", "public static function minValue(): int;", "public function isRange()\n {\n return empty( $this->discreteValue);\n }", "function range_robust($min, $max, $step) {\n// min and max, it returns a two-element array, rather than range(), which gives an error and \n// returns I think an empty array during this case. \n//\n// This is the main routine used to generate the boundareis of the bins that Uwingu uses. It generates\n// the inclusive boundaries of bins -- that is, including star and end locations. \n// range_robust(-90, 90, 50) = [-90,-40,10,60,90]\n//\n// This routine was not working right for a long time, which is why the n pole of Moon was inaccessible to \n// uwingu for a long time. Fixed now.\n//\n// HBT Uwingu 5-Sep-2010\n\n $debug = 0;\n\n $range = $max-$min;\n if ($step > $range) {\n $out = array($min, $max);\n if ($debug) {\n print \"range_robust(\" . $min . \" \" . $max . \" \" . $step . \"): \";\n print_array($out);\n print \"<br>\";\n }\n } else {\n $out = range($min, $max, $step);\n }\n\n// Now see if the final bin is in the array, or not. If it's not, it should be, and we put it there.\n\n if (max($out) != $max) {\n $out[] = $max;\n }\n\n return $out;\n}", "#[@test]\n public function readRangeUpperBoundaryLessThanLower() {\n $p= $this->newPropertiesFrom('\n[section]\nrange=\"1..0\"\n ');\n $this->assertEquals(\n range(1, 0),\n $p->readRange('section', 'range')\n );\n }", "public function getInterval();", "public function getInterval();", "function lte($y)\n{\n return fn ($x) => $x <= $y;\n}", "public function getRankLower()\n {\n return $this->rank_lower;\n }", "public function getRankLower()\n {\n return $this->rank_lower;\n }" ]
[ "0.7301347", "0.7185736", "0.64984924", "0.64267725", "0.63345647", "0.6296367", "0.6172604", "0.6130451", "0.61063325", "0.61063325", "0.604741", "0.60256374", "0.6006506", "0.59237045", "0.5869266", "0.58648247", "0.5829486", "0.5827955", "0.5827001", "0.5785861", "0.5779114", "0.5767041", "0.5766533", "0.5727398", "0.5710991", "0.568982", "0.568982", "0.56801397", "0.5676356", "0.5638572", "0.56361425", "0.5624044", "0.5611164", "0.5594826", "0.55933815", "0.5581675", "0.5569544", "0.5563628", "0.55370355", "0.55261385", "0.5524166", "0.5522414", "0.5509162", "0.5495883", "0.54913986", "0.5486945", "0.54843897", "0.5480871", "0.54805475", "0.5473511", "0.5473475", "0.5470091", "0.5470091", "0.54664373", "0.54606706", "0.5457132", "0.544812", "0.54422605", "0.54264945", "0.54196155", "0.5400546", "0.53714496", "0.53566897", "0.53525066", "0.534327", "0.53387", "0.53182834", "0.53163475", "0.53109175", "0.53106356", "0.53106356", "0.5300906", "0.5299579", "0.5288671", "0.5277989", "0.52764094", "0.523911", "0.523911", "0.52370435", "0.5236553", "0.52218634", "0.52211213", "0.52198297", "0.5217949", "0.520995", "0.520995", "0.520995", "0.5195671", "0.5194629", "0.5193186", "0.5192631", "0.5175005", "0.5174418", "0.51695424", "0.5160513", "0.51507145", "0.51507145", "0.5111644", "0.5107674", "0.5107674" ]
0.7532276
0
Returns the interval's isupperinclusive flag
Возвращает флаг isupperinclusive интервала
public function getIsUpperInclusive(): bool { return $this->isUpperInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "public function isUpperExclusive(): bool\n {\n return ! $this->isUpperInclusive;\n }", "public function includeUpperBound() {\n return $this->uBoundIn;\n }", "public function setUpperInclusive(): self\n {\n $this->isUpperInclusive = true;\n \n return $this;\n }", "public function setIsUpperInclusive(bool $isUpperInclusive): self\n {\n $this->isUpperInclusive = $isUpperInclusive;\n \n return $this;\n }", "public function upperBound()\n {\n }", "public function setUpperExclusive(): self\n {\n $this->isUpperInclusive = false;\n \n return $this;\n }", "public function hasRanges(){\n return $this->_has(2);\n }", "public function includeLowerBound() {\n return $this->lBoundIn;\n }", "public function inRange()\n {\n return $this->getNumber() >= $this->minRange && $this->getNumber() <= $this->maxRange;\n }", "public function isLowerExclusive(): bool\n {\n return ! $this->isLowerInclusive;\n }", "public function getAbvRange();", "public function getIbuRange();", "public static function inside($value, $lower, $upper)\n {\n return static::inRange($value, $lower, $upper, false, false);\n }", "function inRange($low, $high, $val)\n\t{\n\t\treturn $val >= $low && $val <= $high;\n\t}", "public static function inRange($value, $lower, $upper, $lowerExclusive = false, $upperExclusive = false)\n {\n if (!static::is($value) || !static::is($lower) || !static::is($upper)) {\n throw new \\InvalidArgumentException(\"The \\$value, \\$lower and \\$upper parameters must be numeric.\");\n }\n\n $lowerLimit = min($lower, $upper);\n if (!(($lowerExclusive) ? $lowerLimit < $value : $lowerLimit <= $value)) {\n return false;\n }\n\n $upperLimit = max($lower, $upper);\n if (!(($upperExclusive) ? $upperLimit > $value : $upperLimit >= $value)) {\n return false;\n }\n\n return true;\n }", "public function isUpperBoundValidator(): bool {\n return $this->min < 0 && $this->max > 0;\n }", "public function getFgRange();", "public function isRange()\n {\n return empty( $this->discreteValue);\n }", "public function between($low, $high);", "function isWithin($interval){\r\n \r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n $this_interval = $stop_map[0] - $start_map[0];\r\n return ($this_interval <= $interval);\r\n \r\n }", "public function getIsLowerInclusive(): bool\n {\n return $this->isLowerInclusive;\n }", "public function getZipIsRange();", "function checkRange ($i, $min, $max){\n if($i < $min or $i > $max){\n \n return false;\n \n }else\n {\n return true;\n }\n \n}", "public function getOgRange();", "public static function range($check, $lower = null, $upper = null) {\n if (!is_numeric($check)) {\n return false;\n }\n if (isset($lower) && isset($upper)) {\n return ($check > $lower && $check < $upper);\n }\n return is_finite($check);\n }", "public function inInterval($value) {\n if (!is_numeric($value)) {\n return FALSE;\n }\n else if ($this->isEmpty()) {\n return FALSE;\n }\n else if (!$this->allowFloats() && is_double($value)) {\n return FALSE;\n }\n else if ($this->includeLowerBound() && $value < $this->getLowerBound()) {\n return FALSE;\n }\n else if (!$this->includeLowerBound() && $value <= $this->getLowerBound()) {\n return FALSE;\n }\n else if ($this->includeUpperBound() && $value > $this->getUpperBound()) {\n return FALSE;\n }\n else if (!$this->includeUpperBound() && $value >= $this->getUpperBound()) {\n return FALSE;\n }\n else {\n return TRUE;\n }\n }", "function range_robust($min, $max, $step) {\n// min and max, it returns a two-element array, rather than range(), which gives an error and \n// returns I think an empty array during this case. \n//\n// This is the main routine used to generate the boundareis of the bins that Uwingu uses. It generates\n// the inclusive boundaries of bins -- that is, including star and end locations. \n// range_robust(-90, 90, 50) = [-90,-40,10,60,90]\n//\n// This routine was not working right for a long time, which is why the n pole of Moon was inaccessible to \n// uwingu for a long time. Fixed now.\n//\n// HBT Uwingu 5-Sep-2010\n\n $debug = 0;\n\n $range = $max-$min;\n if ($step > $range) {\n $out = array($min, $max);\n if ($debug) {\n print \"range_robust(\" . $min . \" \" . $max . \" \" . $step . \"): \";\n print_array($out);\n print \"<br>\";\n }\n } else {\n $out = range($min, $max, $step);\n }\n\n// Now see if the final bin is in the array, or not. If it's not, it should be, and we put it there.\n\n if (max($out) != $max) {\n $out[] = $max;\n }\n\n return $out;\n}", "public function globalVarConditionMatchesOnLowerThanOrEqualExpression() {}", "public function globalVarConditionMatchesOnLowerThanOrEqualExpression() {}", "function number_between($val, $min, $max, $boundary = true, $reverse = false)\n {\n $result = $boundary ? ($val >= $min && $val <= $max) : ($val > $min && $val < $max);\n\n return $reverse ? ! $result : $result;\n }", "public function getRangeEnd()\n {\n return $this->range_end;\n }", "public function getUpperBound() {\n return $this->uBound;\n }", "public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {}", "public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {}", "function isInterval(){\r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n $interval = $stop_map[0] - $start_map[0];\r\n return !empty($interval);\r\n }", "public function upper()\n {\n return $this->addRule(new FilterRule\\Upper);\n }", "public function isUpperBoundValidator(): bool {\n return $this->min === null && $this->max > 0;\n }", "public function getUpperBoundAttribute() {\n return $this->end;\n }", "function inRange($arg)\n{\n if (($arg > 50) and ($arg < 100)) {\n $svar = true;\n } else {\n $svar = false;\n }\n return (boolean) $svar;\n}", "public static function between($value, $lower, $upper)\n {\n return static::inRange($value, $lower, $upper, true, true);\n }", "function value_in_range($value,$min,$max=false)\n{\n if($min!==false && $value<$min){return false;}\n if($max!==false && $value>$max){return false;}\n return true;\n}", "public function getUpper()\n {\n return $this->upper;\n }", "public function hasCodepointRange(){\n return $this->_has(2);\n }", "public function getRange($interval);", "public function isLowerInclusive(): bool\n {\n return $this->isLowerInclusive;\n }", "public function isBounded()\n {\n return !$this->isOpenEnded() && !$this->isOpenStarted();\n }", "function is_between( $value, $min, $max )\n{\n\treturn ($value >= $min && $value <= $max) ? true : false;\n}", "public function isBeginsWithinDateInterval($lowerBoundDate, $upperBoundDate) {\n\n\t\t$minday = date('Y-m-d', strtotime($lowerBoundDate));\n\t\t$maxday = date('Y-m-d', strtotime($upperBoundDate));\n\t\t$thisday = date('Y-m-d', strtotime($this->beginDate));\n\n\t\treturn ( empty($lowerBoundDate) || $thisday >= $minday)\n\t\t\t&& ( empty($upperBoundDate) || $thisday <= $maxday);\n\t}", "private function checkRangeOutside($value)\n {\n return !$this->checkRange($value);\n }", "function checkRange($extension){\n $low = $_SESSION[\"user\"]->_extension_low;\n $high = $_SESSION[\"user\"]->_extension_high;\n if ((($extension >= $low) && ($extension <= $high)) || (empty($low) && empty($high)))\n return true;\n else\n return false;\n}", "public static function capitalizeRangesCallback($in)\n {\n // Extract the relevant parts of the expression:\n $open = $in[1]; // opening symbol\n $close = $in[4]; // closing symbol\n $start = $in[2]; // start of range\n $end = $in[3]; // end of range\n\n // Is this a case-sensitive range?\n if (strtoupper($start) != strtolower($start)\n || strtoupper($end) != strtolower($end)\n ) {\n // Build a lowercase version of the range:\n $lower = $open . trim(strtolower($start)) . ' TO ' .\n trim(strtolower($end)) . $close;\n // Build a uppercase version of the range:\n $upper = $open . trim(strtoupper($start)) . ' TO ' .\n trim(strtoupper($end)) . $close;\n\n // Special case: don't create illegal timestamps!\n $timestamp = '/[0-9]{4}-[0-9]{2}-[0-9]{2}t[0-9]{2}:[0-9]{2}:[0-9]{2}z/i';\n if (preg_match($timestamp, $start) || preg_match($timestamp, $end)) {\n return $upper;\n }\n\n // Accept results matching either range:\n return '(' . $lower . ' OR ' . $upper . ')';\n } else {\n // Simpler case -- case insensitive (probably numeric) range:\n return $open . trim($start) . ' TO ' . trim($end) . $close;\n }\n }", "public function getTermsIncludeUpperBound(): bool {}", "public function getTermsIncludeUpperBound(): bool {}", "public function isOpenEnded()\n {\n return is_null($this->before) || (!is_null($this->after) && $this->before->lte($this->after));\n }", "public function testPositiveLowerToHigherRange(){\n\t\n\t\t$rangeFormatter = new RangeFormatter(4, 11);\n\t\t$this->assertEquals(\"4 Buzz Fizz Bazz 8 Fizz Buzz Bazz\", $rangeFormatter->generateOutput());\n\t\t\n\t}", "function inRange($value, $start, $end){\n\t if(!is_numeric($value)){\n\t $value = intval($value);\n\t }\n\t\t\n\t if($value > $end){\n\t\t\treturn $end;\n\t\t}\n\t\tif($value < $start){\n\t\t\treturn $start;\n\t\t}\n\t\treturn $value;\n\t}", "#[@test]\n public function readRangeUpperBoundaryLessThanLower() {\n $p= $this->newPropertiesFrom('\n[section]\nrange=\"1..0\"\n ');\n $this->assertEquals(\n range(1, 0),\n $p->readRange('section', 'range')\n );\n }", "function inRange($numberOne, $numberTwo)\n{\n return ($numberOne <= 20 || $numberTwo >= 50) || ($numberTwo <= 20 || $numberOne >= 50);\n}", "function is_between($value, $from, $to)\n {\n return ($value >= $from && $value <= $to) || ($value >= $to && $value <= $from);\n }", "public function globalVarConditionMatchesOnLowerThanExpression() {}", "public function globalVarConditionMatchesOnLowerThanExpression() {}", "function getCompletedInRange() {\n $from = $this->getAdditionalProperty('completed_on_filter_from');\n $to = $this->getAdditionalProperty('completed_on_filter_to');\n\n return $from && $to ? array(new DateValue($from), new DateValue($to)) : array(null, null);\n }", "public function testInclusive()\n {\n $validator = new Zefram_Validate_GreaterThanContext('min', true);\n $validator->setInclusive(false);\n $this->assertFalse($validator->getInclusive());\n }", "public function compareRanges($args)\n {\n $is_available = true;\n if($args['sv_start_time'] >= $args['rs_start_time'] && $args['sv_start_time'] <= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n if( ($args['sv_final_time'] - 1) >= $args['rs_start_time'] && ($args['sv_final_time'] - 1) <= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n if($args['sv_start_time'] <= $args['rs_start_time'] && ($args['sv_final_time'] - 1) >= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n return $is_available;\n }", "public function getToRange()\n\t{\n\t\treturn $this->getKeyValue('to_range'); \n\n\t}", "function isBetween($value, $min, $max, $inc = TRUE)\n\t{\n\t\tif ($value > $min &&\n\t\t$value < $max) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif ($inc &&\n\t\t$value >= $min &&\n\t\t$value <= $max) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === -1;\n }", "public function lowerBound()\n {\n }", "public function isGreaterOrEqualThanValue($value);", "public function getRange()\n {\n }", "public function setInclusive($inclusive);", "function AssumeIsWithinRange($value, $msg, $min, $max)\n\t{\n\t\tif(!is_numeric($value) || $value < $min || $value > $max)\n\t\t{\n\t\t\terror_page($msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}", "public function getLowerBound() {\n return $this->lBound;\n }", "public function subtotalInRange($subtotal, $range)\r\n\t{\r\n\t\tif (($range['from'] > $subtotal) || ($range['to'] < $subtotal))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($subtotal < $range['from'])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($subtotal > $range['to'])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t}", "public function isRangeValidator(): bool {\n return $this->min >= 0 && $this->min < $this->max;\n }", "public function is_within_range($value, $range)\n {\n \tif($this->is_empty($value)\n \t\t|| (is_numeric($value) AND ($value <= $range[0] AND $value >= $range[1])))\n \t{\n\t\t \treturn true;\n \t} \n\t\t\n\t\treturn false;\n }", "public function hasEndClosed(){\n return $this->_has(3);\n }", "function range1($var)\n{\nif(($var >= 100)&&($var < 200))\n{\n\treturn true;\n\n}\n}", "public function globalVarConditionMatchesOnGreaterThanExpression() {}", "public function globalVarConditionMatchesOnGreaterThanExpression() {}", "function in($number, $min, $max) {\n return $number >= $min && $number <= $max;\n}", "function range_check($estimate_val) {\n\t\t\n\t\tif ($estimate_val < MAX_REFRESH_INTERVAL) {\n\t\t\tif ($estimate_val < MIN_REFRESH_INTERVAL){\n\t\t\t\treturn MIN_REFRESH_INTERVAL;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $estimate_val;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t\treturn MAX_REFRESH_INTERVAL;\n\t\t}\n\t\t\n\t}", "public function isWithinShutdownPeriod()\n {\n /// If ends at is before starts at, then it should be safe to assume\n /// that the shutdown period is currently active\n\n $now = Carbon::now();\n\n return $this->getStartsAt() <= $now && $now <= $this->getEndsAt();\n }", "private function checkRange($value)\n {\n if ((!is_null($this->lowerLimit)) and (!is_null($this->upperLimit))) {\n if (($this->lowerLimit < $value) and ($this->upperLimit > $value)) {\n return true;\n }\n } elseif (!is_null($this->lowerLimit)) {\n if ($this->lowerLimit < $value) {\n return true;\n }\n } elseif (!is_null($this->upperLimit)) {\n if ($this->upperLimit > $value) {\n return true;\n }\n } else {\n // upper/lower is null. No check.\n return true;\n }\n\n return false;\n }", "function checkRange($extension){\n\t$low = isset($_SESSION[\"AMP_user\"]->_extension_low)?$_SESSION[\"AMP_user\"]->_extension_low:'';\n\t$high = isset($_SESSION[\"AMP_user\"]->_extension_high)?$_SESSION[\"AMP_user\"]->_extension_high:'';\n\t\n\tif ((($extension >= $low) && ($extension <= $high)) || ($low == '' && $high == ''))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "private function getOperator($up, $inclusive)\n {\n $operator = '>';\n\n if (false === $up) {\n $operator = '<';\n }\n\n if (true === $inclusive) {\n $operator .= '=';\n }\n\n return $operator;\n }", "public function between()\n\t{\n\t}", "function bbc_known_range($addr, $class_a) {\n global $BBC_IP2EXT_PATH;\n\n $long = sprintf(\"%u\", ip2long($addr));\n $file = $BBC_IP2EXT_PATH.$class_a.\".inc\";\n $is_valid = false;\n\n if (!is_readable($file)) return false;\n\n $fp = fopen($file, \"rb\");\n\n while (($range = fgetcsv($fp, 32, \"|\")) !== false) {\n if (($long >= $range[1]) && ($long < ($range[1] + $range[2]))) {\n $is_valid = true;\n break;\n }\n }\n fclose($fp);\n return ($is_valid ? true : false);\n }", "public function range()\n\t{\n\t\treturn $this->n() ? $this->max() - $this->min() : null;\n\t}", "public function getIsActiveAttribute()\n {\n if($this->start_at->isPast() && $this->end_at->isFuture())\n return TRUE;\n else\n return FALSE;\n\n }", "public function getIsActiveAttribute(): bool\n {\n $now = new DateTime();\n $start = $this->effective_start;\n $end = $this->effective_end;\n\n return ($start <= $now) && ($end >= $now);\n }", "public function getRange() {\n return $this->range;\n }", "public function upperFirst()\n {\n return $this->addRule(new FilterRule\\UpperFirst);\n }", "public static function numericValueBetweenClosed($data, $startValue, $endValue) {\n return $data >= $startValue && $data <= $endValue;\n }", "public function isRemoveOutsideVisibleBounds()\n {\n return $this->getOption('removeOutsideVisibleBounds', true);\n }", "public function getThresholdRange()\n {\n return $this->threshold_range;\n }", "public function isUpperHessenberg(): bool\n {\n if (!$this->isSquare()) {\n return false;\n }\n\n // Elements below lower diagonal are zero\n for ($i = 2; $i < $this->m; $i++) {\n for ($j = 0; $j < $i - 1; $j++) {\n if ($this->A[$i][$j] != 0) {\n return false;\n }\n }\n }\n\n return true;\n }", "function is_half_holiday($begin,$end,$time_begin,$time_end)\n{\n\tglobal $wpdb;\n\t\n\t$is_half_holiday = 'n';\n\t\n\t$half_holiday_days = \"SELECT * FROM \" . WP_CALENDAR_TABLE_Aula . \" WHERE event_category=5 AND event_valid='y' AND event_begin<='\" . $begin . \"' AND event_end>='\" . $end . \"'\";\n\t$result = $wpdb->get_results($half_holiday_days);\n\t\n\tif(!empty($result))\n\t{\n\t\tif(($time_begin >= '14:00') || ($time_end >= '14:00'))\n\t\t{\n\t\t\t$is_half_holiday = 'y';\t\n\t\t}\n\t}\n\t\n\treturn $is_half_holiday;\n\t\n}", "private function checkRangeInside($value)\n {\n return $this->checkRange($value);\n }" ]
[ "0.76339257", "0.66666996", "0.6320326", "0.62438035", "0.6068827", "0.59835017", "0.5952848", "0.58818007", "0.5852087", "0.5819349", "0.5806875", "0.57966655", "0.5778625", "0.571192", "0.56440514", "0.5557444", "0.555035", "0.55470586", "0.5535742", "0.5476863", "0.54623127", "0.5442783", "0.54331994", "0.5407664", "0.5401541", "0.54004675", "0.5378753", "0.5364494", "0.53549063", "0.53541297", "0.53516316", "0.534381", "0.5341302", "0.5311648", "0.53115875", "0.5310655", "0.53064215", "0.5304377", "0.53038436", "0.5296612", "0.5262852", "0.5246308", "0.5240475", "0.52185565", "0.52128804", "0.5199622", "0.5117341", "0.5117234", "0.5112616", "0.5109037", "0.50973666", "0.5089019", "0.50672686", "0.50672686", "0.5064605", "0.5062518", "0.5059831", "0.5033206", "0.50274837", "0.50264657", "0.50215614", "0.50215614", "0.5021346", "0.5016211", "0.50035584", "0.4991029", "0.49893302", "0.4987903", "0.49592674", "0.49578267", "0.49557382", "0.49545512", "0.49355766", "0.49300843", "0.49203077", "0.49187073", "0.49165767", "0.49068928", "0.49066913", "0.4899831", "0.4899831", "0.489773", "0.48938012", "0.48935306", "0.48572737", "0.48487994", "0.48457015", "0.4844172", "0.4840603", "0.48257506", "0.48075724", "0.48037985", "0.47977203", "0.47966716", "0.479428", "0.4793026", "0.47879684", "0.47872886", "0.47858748", "0.47811443" ]
0.7841785
0
Returns true if the lowerbound is exclusive
Возвращает true, если нижняя граница исключена
public function isLowerExclusive(): bool { return ! $this->isLowerInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isUpperExclusive(): bool\n {\n return ! $this->isUpperInclusive;\n }", "public function inRange()\n {\n return $this->getNumber() >= $this->minRange && $this->getNumber() <= $this->maxRange;\n }", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === -1;\n }", "function checkRange ($i, $min, $max){\n if($i < $min or $i > $max){\n \n return false;\n \n }else\n {\n return true;\n }\n \n}", "public function isExclusive(): bool;", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === null;\n }", "public static function inRange($value, $lower, $upper, $lowerExclusive = false, $upperExclusive = false)\n {\n if (!static::is($value) || !static::is($lower) || !static::is($upper)) {\n throw new \\InvalidArgumentException(\"The \\$value, \\$lower and \\$upper parameters must be numeric.\");\n }\n\n $lowerLimit = min($lower, $upper);\n if (!(($lowerExclusive) ? $lowerLimit < $value : $lowerLimit <= $value)) {\n return false;\n }\n\n $upperLimit = max($lower, $upper);\n if (!(($upperExclusive) ? $upperLimit > $value : $upperLimit >= $value)) {\n return false;\n }\n\n return true;\n }", "private function strictlyContainsOtherBound(?Boundary $boundary) : bool\n {\n if ($boundary === null) {\n return false;\n }\n\n $boundVersion = $boundary->getVersion();\n\n if ($this->lowerBoundary === null) {\n assert($this->upperBoundary !== null, 'We either have a lower or an upper boundary, or both');\n\n return $this->upperBoundary->getVersion()->isGreaterThan($boundVersion);\n }\n\n if ($this->upperBoundary === null) {\n return $boundVersion->isGreaterThan($this->lowerBoundary->getVersion());\n }\n\n return $boundVersion->isGreaterThan($this->lowerBoundary->getVersion())\n && $this->upperBoundary->getVersion()->isGreaterThan($boundVersion);\n }", "function inRange($numberOne, $numberTwo)\n{\n return ($numberOne <= 20 || $numberTwo >= 50) || ($numberTwo <= 20 || $numberOne >= 50);\n}", "public function isUpperBoundValidator(): bool {\n return $this->min < 0 && $this->max > 0;\n }", "public function hasRanges(){\n return $this->_has(2);\n }", "function value_in_range($value,$min,$max=false)\n{\n if($min!==false && $value<$min){return false;}\n if($max!==false && $value>$max){return false;}\n return true;\n}", "function inRange($low, $high, $val)\n\t{\n\t\treturn $val >= $low && $val <= $high;\n\t}", "public function isUpperBoundValidator(): bool {\n return $this->min === null && $this->max > 0;\n }", "public function isRange()\n {\n return empty( $this->discreteValue);\n }", "public function isBounded()\n {\n return !$this->isOpenEnded() && !$this->isOpenStarted();\n }", "static public function operatorOVERLAP(&$lhs, &$rhs): bool\n {\n $bbox = explode(',',$rhs);\n if(count($bbox) !== 4) return false;\n $lhsBbox = getBoundingBox($lhs);\n if(count($lhsBbox) !== 4) return false;\n\n return $lhsBbox[0] <= $bbox[2]\n && $lhsBbox[1] <= $bbox[3]\n && $lhsBbox[2] >= $bbox[0]\n && $lhsBbox[3] >= $bbox[1];\n }", "public function isBound();", "public function hasIsExclusive()\n {\n return $this->is_exclusive !== null;\n }", "public function isUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "public function testInclusive()\n {\n $validator = new Zefram_Validate_GreaterThanContext('min', true);\n $validator->setInclusive(false);\n $this->assertFalse($validator->getInclusive());\n }", "public function isRangeValidator(): bool {\n return $this->min >= 0 && $this->min < $this->max;\n }", "function rangeNoOverlap($start_time1,$end_time1,$start_time2,$end_time2){\n $utc = new DateTimeZone('UTC');\n\n $start1 = new DateTime($start_time1,$utc);\n $end1 = new DateTime($end_time1,$utc);\n\n $start2 = new DateTime($start_time2,$utc);\n $end2 = new DateTime($end_time2,$utc);\n\n return ($end1 <= $start2) || ($end2 <= $start1);\n }", "function checkRange($extension){\n $low = $_SESSION[\"user\"]->_extension_low;\n $high = $_SESSION[\"user\"]->_extension_high;\n if ((($extension >= $low) && ($extension <= $high)) || (empty($low) && empty($high)))\n return true;\n else\n return false;\n}", "public function getExclusive();", "public function includeLowerBound() {\n return $this->lBoundIn;\n }", "public function isRangeValidator(): bool {\n return $this->min !== null && $this->max !== null;\n }", "static public function operatorOUT(&$lhs, &$rhs): bool\n {\n $bbox = explode(',',$rhs);\n if(count($bbox) !== 4) return false;\n $lhsBbox = getBoundingBox($lhs);\n if(count($lhsBbox) !== 4) return false;\n\n return $lhsBbox[0] <= $bbox[0]\n && $lhsBbox[1] <= $bbox[1]\n && $lhsBbox[2] >= $bbox[2]\n && $lhsBbox[3] >= $bbox[3];\n }", "function inRange($arg)\n{\n if (($arg > 50) and ($arg < 100)) {\n $svar = true;\n } else {\n $svar = false;\n }\n return (boolean) $svar;\n}", "abstract protected function isCompatibleWith(Range $range);", "public function setLowerExclusive(): self\n {\n $this->isLowerInclusive = false;\n \n return $this;\n }", "function dtlIsInRange($n, $min, $max) {\n return dtlIsInt($n) && $n >= $min && $n <= $max;\n}", "private function checkRange($value)\n {\n if ((!is_null($this->lowerLimit)) and (!is_null($this->upperLimit))) {\n if (($this->lowerLimit < $value) and ($this->upperLimit > $value)) {\n return true;\n }\n } elseif (!is_null($this->lowerLimit)) {\n if ($this->lowerLimit < $value) {\n return true;\n }\n } elseif (!is_null($this->upperLimit)) {\n if ($this->upperLimit > $value) {\n return true;\n }\n } else {\n // upper/lower is null. No check.\n return true;\n }\n\n return false;\n }", "public function isLowerInclusive(): bool\n {\n return $this->isLowerInclusive;\n }", "public static function le(IUnit\\Type $x, IUnit\\Type $y) : IBool\\Type { // <=\n\t\t\treturn IBool\\Type::box(IUnit\\Module::compare($x, $y)->unbox() <= 0);\n\t\t}", "function isPrivateRange($numIp)\r\n{\r\n# 10.0.0.0 .. 10.255.255.255 => 167772160 .. 184549375\r\n# 172.16.0.0 .. 172.31.255.255 => -1408237568 .. -1407188993\r\n# 192.168.0.0 .. 192.168.255.255 => -1062731776 .. -1062666241\r\n\treturn ($numIp>-1062731776 && $numIp<-1062666241) \r\n\t || ($numIp> 167772160 && $numIp< 184549375)\r\n\t || ($numIp>-1408237568 && $numIp<-1407188993);\r\n}", "protected function op_range(&$oprand, $key, $range) {\n if (!isset($oprand[$key])) {\n return TRUE;\n }\n\n $opValue = $oprand[$key];\n if (!is_numeric($opValue)) {\n return FALSE;\n }\n $rangeEles = explode(',', $range);\n foreach ($rangeEles as $ele) {\n $rangeNums = explode('_', $ele);\n $nNums = count($rangeNums);\n if ($nNums < 1 || $nNums > 2) {\n return FALSE;\n } else if ($nNums === 1) {\n if (!is_numeric($rangeNums[0])) {\n return FALSE;\n } else if ($opValue == $rangeNums[0]) {\n return TRUE;\n }\n } else if ($nNums === 2) {\n if (strlen($rangeNums[0]) === 0 && is_numeric($rangeNums[1]) && $opValue <= $rangeNums[1]) {\n return TRUE;\n } else if (strlen($rangeNums[1]) === 0 && is_numeric($rangeNums[0]) && $opValue >= $rangeNums[0]) {\n return TRUE;\n } else if (!is_numeric($rangeNums[0]) || !is_numeric($rangeNums[1])) {\n return FALSE;\n } else if ($opValue >= $rangeNums[0] && $opValue <= $rangeNums[1]) {\n return TRUE;\n }\n }\n }\n return FALSE;\n }", "public function setInclusive($inclusive);", "public function inInterval($value) {\n if (!is_numeric($value)) {\n return FALSE;\n }\n else if ($this->isEmpty()) {\n return FALSE;\n }\n else if (!$this->allowFloats() && is_double($value)) {\n return FALSE;\n }\n else if ($this->includeLowerBound() && $value < $this->getLowerBound()) {\n return FALSE;\n }\n else if (!$this->includeLowerBound() && $value <= $this->getLowerBound()) {\n return FALSE;\n }\n else if ($this->includeUpperBound() && $value > $this->getUpperBound()) {\n return FALSE;\n }\n else if (!$this->includeUpperBound() && $value >= $this->getUpperBound()) {\n return FALSE;\n }\n else {\n return TRUE;\n }\n }", "public function getIsUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "public function lowerBound()\n {\n }", "public static function ge(IUnit\\Type $x, IUnit\\Type $y) : IBool\\Type { // >=\n\t\t\treturn IBool\\Type::box(IUnit\\Module::compare($x, $y)->unbox() >= 0);\n\t\t}", "private function isRangeValid(int $first, int $last, int $num) : bool\n {\n $rangeNum = $last - $first;\n if ($first <= 0 || $last <= 0 || $first > $num || $last > $num) {\n return false;\n } else if ($rangeNum > 49) {\n return false;\n }\n return true;\n }", "function _is_in_range($client_ip, $start, $end)\n{\n $start = ip2long($start);\n\n if (false === $start) {\n return false;\n }\n\n $end = ip2long($end);\n\n if (false === $end) {\n return false;\n }\n\n return ($client_ip >= $start && $client_ip <= $end);\n}", "private static function isStrictlyIncreasing(array $x) {\n $cnt = count($x);\n for ($i = 1; $i < $cnt; ++$i) {\n if ($x[$i - 1] >= $x[$i]) {\n return false;\n }\n }\n return true;\n }", "function is_between( $value, $min, $max )\n{\n\treturn ($value >= $min && $value <= $max) ? true : false;\n}", "public function includeUpperBound() {\n return $this->uBoundIn;\n }", "function between($number, $min, $max)\n\t{\n\t\tif ($number >= $min && $number <= $max) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function AssumeIsWithinRange($value, $msg, $min, $max)\n\t{\n\t\tif(!is_numeric($value) || $value < $min || $value > $max)\n\t\t{\n\t\t\terror_page($msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}", "function number_between($val, $min, $max, $boundary = true, $reverse = false)\n {\n $result = $boundary ? ($val >= $min && $val <= $max) : ($val > $min && $val < $max);\n\n return $reverse ? ! $result : $result;\n }", "private function checkRangeOutside($value)\n {\n return !$this->checkRange($value);\n }", "public function isLowerTriangular(): bool\n {\n if (!$this->isSquare()) {\n return false;\n }\n\n $m = $this->m;\n $n = $this->n;\n\n for ($i = 0; $i < $m; $i++) {\n for ($j = $i + 1; $j < $n; $j++) {\n if (!Support::isZero($this->A[$i][$j])) {\n return false;\n }\n }\n }\n\n return true;\n }", "public function rule_not_between( Papi_Core_Conditional_Rule $rule ) {\n\t\tlist( $rule, $value ) = $this->get_between_values( $rule );\n\n\t\tif ( $value === false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! ( $rule->value[0] <= $value && $value <= $rule->value[1] );\n\t}", "function range1($var)\n{\nif(($var >= 100)&&($var < 200))\n{\n\treturn true;\n\n}\n}", "public function is_within_range($value, $range)\n {\n \tif($this->is_empty($value)\n \t\t|| (is_numeric($value) AND ($value <= $range[0] AND $value >= $range[1])))\n \t{\n\t\t \treturn true;\n \t} \n\t\t\n\t\treturn false;\n }", "public function hasCodepointRange(){\n return $this->_has(2);\n }", "private function is_valid_range($start_time, $end_time)\r\n\t\t{\r\n\t\t\treturn strtotime($start_time) < strtotime($end_time);\r\n\t\t}", "function oneTwo($one, $two){\n if($one <= 20 || $two >= 50 ){\n return true;\n } else {\n return false;\n }\n }", "public function getExclusive()\n {\n return $this->exclusive;\n }", "private function lessThanOrEqual($leftOperand, $rightOperand) {\n return ($leftOperand <= $rightOperand);\n }", "public function valid()\n {\n return $this->current <= $this->last;\n }", "public function compareRanges($args)\n {\n $is_available = true;\n if($args['sv_start_time'] >= $args['rs_start_time'] && $args['sv_start_time'] <= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n if( ($args['sv_final_time'] - 1) >= $args['rs_start_time'] && ($args['sv_final_time'] - 1) <= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n if($args['sv_start_time'] <= $args['rs_start_time'] && ($args['sv_final_time'] - 1) >= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n return $is_available;\n }", "public function is_rangevalue($number,$min,$max) {\n Trace::add_trace('check rangevalue',__METHOD__);\n return (intval($number) >= $min && intval($number) <= $max);\n }", "public function isRanged(): bool\n {\n return $this->isShootingWeapon() || $this->isThrowingWeapon();\n }", "public function isBound()\n {\n return $this->bound;\n }", "public function notBetweenWhere($expr, $minimum, $maximum);", "public static function range($check, $lower = null, $upper = null) {\n if (!is_numeric($check)) {\n return false;\n }\n if (isset($lower) && isset($upper)) {\n return ($check > $lower && $check < $upper);\n }\n return is_finite($check);\n }", "public function _opposite() {\n\t\t$bool = $this->_value;\n\t return (!($bool === true));\n\t}", "function isOverX($tg,$x){\n\tif($tg >= $x){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "public function setExclusive($exclusive);", "function isBetween($value, $min, $max, $inc = TRUE)\n\t{\n\t\tif ($value > $min &&\n\t\t$value < $max) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif ($inc &&\n\t\t$value >= $min &&\n\t\t$value <= $max) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public static function inRange($input, $max, $min = 1) {\n\t\treturn ($input <= $max && $input >= $min);\n\t}", "public function isBound(){ return $this->hasField('bound'); }", "public static function isPriceQuantityRangesEnabled(): bool\n\t{\n\t\treturn self::isFeatureEnabled(self::EXTENDED_PRICES);\n\t}", "function overlaps(ic_Box $b)\r\n\t{\r\n\t\treturn !(\r\n\t\t\t\t$b->lr->above($this->ul) ||\r\n\t\t\t $b->lr->leftOf($this->ul) ||\r\n\t\t\t $b->ul->below($this->lr) ||\r\n\t\t\t $b->ul->rightOf($this->lr)\r\n\t\t\t );\r\n\t}", "public function getIsLowerInclusive(): bool\n {\n return $this->isLowerInclusive;\n }", "function range_robust($min, $max, $step) {\n// min and max, it returns a two-element array, rather than range(), which gives an error and \n// returns I think an empty array during this case. \n//\n// This is the main routine used to generate the boundareis of the bins that Uwingu uses. It generates\n// the inclusive boundaries of bins -- that is, including star and end locations. \n// range_robust(-90, 90, 50) = [-90,-40,10,60,90]\n//\n// This routine was not working right for a long time, which is why the n pole of Moon was inaccessible to \n// uwingu for a long time. Fixed now.\n//\n// HBT Uwingu 5-Sep-2010\n\n $debug = 0;\n\n $range = $max-$min;\n if ($step > $range) {\n $out = array($min, $max);\n if ($debug) {\n print \"range_robust(\" . $min . \" \" . $max . \" \" . $step . \"): \";\n print_array($out);\n print \"<br>\";\n }\n } else {\n $out = range($min, $max, $step);\n }\n\n// Now see if the final bin is in the array, or not. If it's not, it should be, and we put it there.\n\n if (max($out) != $max) {\n $out[] = $max;\n }\n\n return $out;\n}", "function integerRange($numberOne, $NumberTwo)\n{\n return ($numberOne >= 100 && $numberOne <= 200) || ($NumberTwo >= 100 && $NumberTwo <= 200);\n}", "public function isLessOrEqualThanValue($value);", "public function isBound()\n\t\t{\n\t\t\treturn $this->isBound;\n\t\t}", "public static function le(IHashMap\\Type $xs, IHashMap\\Type $ys) : IBool\\Type { // <=\n\t\t\treturn IBool\\Type::box(IHashMap\\Module::compare($xs, $ys)->unbox() <= 0);\n\t\t}", "public function isPlaceable($x,$y)\n {\n if( !is_int($x) || !is_int($y) )\n return false;\n\n if( $x < self::lowerX || $x > $this->upperX || $y < self::lowerY || $y > $this->upperY)\n return false;\n else\n return true;\n\n }", "private function moreThanOrEqual($leftOperand, $rightOperand) {\n return ($leftOperand >= $rightOperand);\n }", "public function isInverted()\n {\n return $this->after->gt($this->before);\n }", "protected function depthIsInRange()\n {\n return ($this->getRemainingDepth() > 0);\n }", "public function isPoint() : bool\n {\n return $this->min == $this->max;\n }", "function checkRange($extension){\n\t$low = isset($_SESSION[\"AMP_user\"]->_extension_low)?$_SESSION[\"AMP_user\"]->_extension_low:'';\n\t$high = isset($_SESSION[\"AMP_user\"]->_extension_high)?$_SESSION[\"AMP_user\"]->_extension_high:'';\n\t\n\tif ((($extension >= $low) && ($extension <= $high)) || ($low == '' && $high == ''))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function subtotalInRange($subtotal, $range)\r\n\t{\r\n\t\tif (($range['from'] > $subtotal) || ($range['to'] < $subtotal))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($subtotal < $range['from'])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($subtotal > $range['to'])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t}", "public static function range($number, $min, $max)\r\n\t{\r\n\t\treturn ($number >= $min AND $number <= $max);\r\n\t}", "function is_between($value, $from, $to)\n {\n return ($value >= $from && $value <= $to) || ($value >= $to && $value <= $from);\n }", "public function testNotBetween()\n {\n $exp = $this->_commonField->notBetween('dou', 'doz');\n $this->_testExpression($exp, 'NOT BETWEEN');\n }", "public function setExclusive();", "public function assertRangeNotContains($range, $values)\n {\n foreach($values as $number){\n $this->assertFalse($range->contains($number));\n }\n }", "public function checkWin(){\n if ( (($this->iX * $this->iY) - ($this->checkedForMines + $this->iNumberOfMines)) == 0 ){ return true; }\n else { return false; }\n }", "function lesserOrEq(Bool &$b) { # :: (Bool, Bool) -> Bool\n return new Bool($this->value <= $b());\n }", "static public function operatorIN(&$lhs, &$rhs): bool\n {\n $bbox = explode(',',$rhs);\n if(count($bbox) !== 4) return false;\n $lhsBbox = getBoundingBox($lhs);\n if(count($lhsBbox) !== 4) return false;\n\n return $lhsBbox[0] >= $bbox[0]\n && $lhsBbox[1] >= $bbox[1]\n && $lhsBbox[2] <= $bbox[2]\n && $lhsBbox[3] <= $bbox[3];\n }", "public static function ge(IHashMap\\Type $xs, IHashMap\\Type $ys) : IBool\\Type { // >=\n\t\t\treturn IBool\\Type::box(IHashMap\\Module::compare($xs, $ys)->unbox() >= 0);\n\t\t}", "function in($number, $min, $max) {\n return $number >= $min && $number <= $max;\n}", "function isInterval(){\r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n $interval = $stop_map[0] - $start_map[0];\r\n return !empty($interval);\r\n }", "public function globalVarConditionMatchesOnLowerThanOrEqualExpression() {}" ]
[ "0.65931773", "0.64685035", "0.6392864", "0.6377243", "0.62147075", "0.61611307", "0.61542314", "0.61137754", "0.6069121", "0.606069", "0.601594", "0.6004464", "0.6004321", "0.5973708", "0.58616996", "0.5860532", "0.585399", "0.5840067", "0.58296347", "0.5820757", "0.5774316", "0.5728924", "0.571189", "0.56924146", "0.5661305", "0.5646109", "0.56381774", "0.5622145", "0.5607743", "0.5602464", "0.55737394", "0.5572964", "0.5552105", "0.5546057", "0.55390984", "0.54846984", "0.54725003", "0.54616064", "0.5450157", "0.54467577", "0.5439761", "0.5412021", "0.5409974", "0.53889567", "0.5382344", "0.537875", "0.53787047", "0.53704965", "0.5335381", "0.53330135", "0.53325385", "0.53312266", "0.53180826", "0.5292069", "0.5290264", "0.5290093", "0.5288346", "0.5283061", "0.5278709", "0.52779627", "0.52704805", "0.52690136", "0.5268252", "0.5263255", "0.52595854", "0.5250453", "0.5237794", "0.523037", "0.52026725", "0.5201346", "0.5199923", "0.5194417", "0.51887107", "0.5185068", "0.51824474", "0.5179584", "0.517603", "0.5161924", "0.51617515", "0.51569295", "0.51544046", "0.51505375", "0.5146469", "0.5135939", "0.5132419", "0.51258767", "0.51151276", "0.51142585", "0.51127064", "0.5111806", "0.5101303", "0.50999767", "0.5097561", "0.5096012", "0.5086013", "0.50811464", "0.5077143", "0.5075276", "0.50733405", "0.50694746" ]
0.7726974
0
Returns true if the upperbound is exclusive
Возвращает true, если верхняя граница исключена
public function isUpperExclusive(): bool { return ! $this->isUpperInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLowerExclusive(): bool\n {\n return ! $this->isLowerInclusive;\n }", "public function isUpperBoundValidator(): bool {\n return $this->min < 0 && $this->max > 0;\n }", "public function isUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "public function isUpperBoundValidator(): bool {\n return $this->min === null && $this->max > 0;\n }", "public function inRange()\n {\n return $this->getNumber() >= $this->minRange && $this->getNumber() <= $this->maxRange;\n }", "public function isExclusive(): bool;", "public function isBounded()\n {\n return !$this->isOpenEnded() && !$this->isOpenStarted();\n }", "function checkRange ($i, $min, $max){\n if($i < $min or $i > $max){\n \n return false;\n \n }else\n {\n return true;\n }\n \n}", "public function hasRanges(){\n return $this->_has(2);\n }", "public function isRange()\n {\n return empty( $this->discreteValue);\n }", "public function isBound();", "public static function inRange($value, $lower, $upper, $lowerExclusive = false, $upperExclusive = false)\n {\n if (!static::is($value) || !static::is($lower) || !static::is($upper)) {\n throw new \\InvalidArgumentException(\"The \\$value, \\$lower and \\$upper parameters must be numeric.\");\n }\n\n $lowerLimit = min($lower, $upper);\n if (!(($lowerExclusive) ? $lowerLimit < $value : $lowerLimit <= $value)) {\n return false;\n }\n\n $upperLimit = max($lower, $upper);\n if (!(($upperExclusive) ? $upperLimit > $value : $upperLimit >= $value)) {\n return false;\n }\n\n return true;\n }", "public function hasIsExclusive()\n {\n return $this->is_exclusive !== null;\n }", "private function checkRangeOutside($value)\n {\n return !$this->checkRange($value);\n }", "public function getIsUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "private function strictlyContainsOtherBound(?Boundary $boundary) : bool\n {\n if ($boundary === null) {\n return false;\n }\n\n $boundVersion = $boundary->getVersion();\n\n if ($this->lowerBoundary === null) {\n assert($this->upperBoundary !== null, 'We either have a lower or an upper boundary, or both');\n\n return $this->upperBoundary->getVersion()->isGreaterThan($boundVersion);\n }\n\n if ($this->upperBoundary === null) {\n return $boundVersion->isGreaterThan($this->lowerBoundary->getVersion());\n }\n\n return $boundVersion->isGreaterThan($this->lowerBoundary->getVersion())\n && $this->upperBoundary->getVersion()->isGreaterThan($boundVersion);\n }", "public function includeUpperBound() {\n return $this->uBoundIn;\n }", "private function checkRange($value)\n {\n if ((!is_null($this->lowerLimit)) and (!is_null($this->upperLimit))) {\n if (($this->lowerLimit < $value) and ($this->upperLimit > $value)) {\n return true;\n }\n } elseif (!is_null($this->lowerLimit)) {\n if ($this->lowerLimit < $value) {\n return true;\n }\n } elseif (!is_null($this->upperLimit)) {\n if ($this->upperLimit > $value) {\n return true;\n }\n } else {\n // upper/lower is null. No check.\n return true;\n }\n\n return false;\n }", "function inRange($numberOne, $numberTwo)\n{\n return ($numberOne <= 20 || $numberTwo >= 50) || ($numberTwo <= 20 || $numberOne >= 50);\n}", "public function upperBound()\n {\n }", "public function isUpperTriangular(): bool\n {\n if (!$this->isSquare()) {\n return false;\n }\n\n $m = $this->m;\n\n for ($i = 1; $i < $m; $i++) {\n for ($j = 0; $j < $i; $j++) {\n if (!Support::isZero($this->A[$i][$j])) {\n return false;\n }\n }\n }\n\n return true;\n }", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === -1;\n }", "function value_in_range($value,$min,$max=false)\n{\n if($min!==false && $value<$min){return false;}\n if($max!==false && $value>$max){return false;}\n return true;\n}", "function checkRange($extension){\n $low = $_SESSION[\"user\"]->_extension_low;\n $high = $_SESSION[\"user\"]->_extension_high;\n if ((($extension >= $low) && ($extension <= $high)) || (empty($low) && empty($high)))\n return true;\n else\n return false;\n}", "function inRange($low, $high, $val)\n\t{\n\t\treturn $val >= $low && $val <= $high;\n\t}", "function isPrivateRange($numIp)\r\n{\r\n# 10.0.0.0 .. 10.255.255.255 => 167772160 .. 184549375\r\n# 172.16.0.0 .. 172.31.255.255 => -1408237568 .. -1407188993\r\n# 192.168.0.0 .. 192.168.255.255 => -1062731776 .. -1062666241\r\n\treturn ($numIp>-1062731776 && $numIp<-1062666241) \r\n\t || ($numIp> 167772160 && $numIp< 184549375)\r\n\t || ($numIp>-1408237568 && $numIp<-1407188993);\r\n}", "public function getExclusive();", "public function isRemoveOutsideVisibleBounds()\n {\n return $this->getOption('removeOutsideVisibleBounds', true);\n }", "public function isRangeValidator(): bool {\n return $this->min >= 0 && $this->min < $this->max;\n }", "public function isBound()\n {\n return $this->bound;\n }", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === null;\n }", "public function isRangeValidator(): bool {\n return $this->min !== null && $this->max !== null;\n }", "function rangeNoOverlap($start_time1,$end_time1,$start_time2,$end_time2){\n $utc = new DateTimeZone('UTC');\n\n $start1 = new DateTime($start_time1,$utc);\n $end1 = new DateTime($end_time1,$utc);\n\n $start2 = new DateTime($start_time2,$utc);\n $end2 = new DateTime($end_time2,$utc);\n\n return ($end1 <= $start2) || ($end2 <= $start1);\n }", "public function inInterval($value) {\n if (!is_numeric($value)) {\n return FALSE;\n }\n else if ($this->isEmpty()) {\n return FALSE;\n }\n else if (!$this->allowFloats() && is_double($value)) {\n return FALSE;\n }\n else if ($this->includeLowerBound() && $value < $this->getLowerBound()) {\n return FALSE;\n }\n else if (!$this->includeLowerBound() && $value <= $this->getLowerBound()) {\n return FALSE;\n }\n else if ($this->includeUpperBound() && $value > $this->getUpperBound()) {\n return FALSE;\n }\n else if (!$this->includeUpperBound() && $value >= $this->getUpperBound()) {\n return FALSE;\n }\n else {\n return TRUE;\n }\n }", "public function isBound()\n\t\t{\n\t\t\treturn $this->isBound;\n\t\t}", "public function isFull(): bool\n {\n return $this->drips() >= $this->max();\n }", "public function valid()\n {\n return $this->current <= $this->last;\n }", "public function setUpperExclusive(): self\n {\n $this->isUpperInclusive = false;\n \n return $this;\n }", "private function isRangeValid(int $first, int $last, int $num) : bool\n {\n $rangeNum = $last - $first;\n if ($first <= 0 || $last <= 0 || $first > $num || $last > $num) {\n return false;\n } else if ($rangeNum > 49) {\n return false;\n }\n return true;\n }", "protected function depthIsInRange()\n {\n return ($this->getRemainingDepth() > 0);\n }", "public function setExclusive($exclusive);", "function inRange($arg)\n{\n if (($arg > 50) and ($arg < 100)) {\n $svar = true;\n } else {\n $svar = false;\n }\n return (boolean) $svar;\n}", "static public function operatorOUT(&$lhs, &$rhs): bool\n {\n $bbox = explode(',',$rhs);\n if(count($bbox) !== 4) return false;\n $lhsBbox = getBoundingBox($lhs);\n if(count($lhsBbox) !== 4) return false;\n\n return $lhsBbox[0] <= $bbox[0]\n && $lhsBbox[1] <= $bbox[1]\n && $lhsBbox[2] >= $bbox[2]\n && $lhsBbox[3] >= $bbox[3];\n }", "public function isBoundAtEnd() {\n\t\treturn $this->nodeAtIndex( -1 )->isBound();\n\t}", "public function hasCodepointRange(){\n return $this->_has(2);\n }", "public function isBalanced()\n {\n foreach ($this->graph->getVertices() as $vertex) {\n if ($this->getDegreeInVertex($vertex) !== $this->getDegreeOutVertex($vertex)) {\n return false;\n }\n }\n\n return true;\n }", "static public function operatorOVERLAP(&$lhs, &$rhs): bool\n {\n $bbox = explode(',',$rhs);\n if(count($bbox) !== 4) return false;\n $lhsBbox = getBoundingBox($lhs);\n if(count($lhsBbox) !== 4) return false;\n\n return $lhsBbox[0] <= $bbox[2]\n && $lhsBbox[1] <= $bbox[3]\n && $lhsBbox[2] >= $bbox[0]\n && $lhsBbox[3] >= $bbox[1];\n }", "public function getExclusive()\n {\n return $this->exclusive;\n }", "abstract protected function isCompatibleWith(Range $range);", "function overlaps(ic_Box $b)\r\n\t{\r\n\t\treturn !(\r\n\t\t\t\t$b->lr->above($this->ul) ||\r\n\t\t\t $b->lr->leftOf($this->ul) ||\r\n\t\t\t $b->ul->below($this->lr) ||\r\n\t\t\t $b->ul->rightOf($this->lr)\r\n\t\t\t );\r\n\t}", "public function isMaxNumberReach();", "public function isUpperHessenberg(): bool\n {\n if (!$this->isSquare()) {\n return false;\n }\n\n // Elements below lower diagonal are zero\n for ($i = 2; $i < $this->m; $i++) {\n for ($j = 0; $j < $i - 1; $j++) {\n if ($this->A[$i][$j] != 0) {\n return false;\n }\n }\n }\n\n return true;\n }", "public function canBackOut()\n {\n if (!$this->isCanceled() && floatval($this->getBaseGrandTotal()) == 0 && !$this->canInvoice()) {\n return true;\n }\n\n return false;\n }", "function checkBottom($x){ return (($x + $this->row) < ($this->row * $this->row)); }", "public function is_within_range($value, $range)\n {\n \tif($this->is_empty($value)\n \t\t|| (is_numeric($value) AND ($value <= $range[0] AND $value >= $range[1])))\n \t{\n\t\t \treturn true;\n \t} \n\t\t\n\t\treturn false;\n }", "function isClosed(): bool { return ($this->coords[0] == $this->coords[count($this->coords)-1]); }", "public function isBound(){ return $this->hasField('bound'); }", "function is_between( $value, $min, $max )\n{\n\treturn ($value >= $min && $value <= $max) ? true : false;\n}", "public function isSubtractableBelowZero(): bool\n {\n return false;\n }", "public function subtotalInRange($subtotal, $range)\r\n\t{\r\n\t\tif (($range['from'] > $subtotal) || ($range['to'] < $subtotal))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($subtotal < $range['from'])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($subtotal > $range['to'])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t}", "public function isPrivate()\n {\n /** @var $subnets Subnet[] */\n $subnets = array(\n Subnet::fromCidr(new Address(\"10.0.0.0\"), 8),\n Subnet::fromCidr(new Address(\"172.16.0.0\"), 12),\n Subnet::fromCidr(new Address(\"192.168.0.0\"), 16),\n );\n foreach($subnets as $subnet) {\n if($subnet->contains($this)) {\n return true;\n }\n }\n return false;\n }", "function AssumeIsWithinRange($value, $msg, $min, $max)\n\t{\n\t\tif(!is_numeric($value) || $value < $min || $value > $max)\n\t\t{\n\t\t\terror_page($msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}", "public function isUpperBidiagonal(): bool\n {\n if (!$this->isSquare() || !$this->isUpperTriangular()) {\n return false;\n }\n\n $m = $this->m;\n $n = $this->n;\n\n // Elements above upper diagonal are zero\n for ($i = 0; $i < $m; $i++) {\n for ($j = $i + 2; $j < $n; $j++) {\n if ($this->A[$i][$j] != 0) {\n return false;\n }\n }\n }\n\n return true;\n }", "public function isRanged(): bool\n {\n return $this->isShootingWeapon() || $this->isThrowingWeapon();\n }", "function oneTwo($one, $two){\n if($one <= 20 || $two >= 50 ){\n return true;\n } else {\n return false;\n }\n }", "private static function checkAvaliblety($oldStart, $oldEnd, $newStart, $newEnd) {\n\n /*\n * this draw is sessions\n * \n * draw key \n */\n\n /*\n * old new\n * ...............................\n * -\n * start \n * -\n * ................................\n * - \n * end \n * -\n * ................................\n */\n if ($oldStart >= $newStart && $oldStart <= $newEnd && $newEnd <= $oldEnd)\n return FALSE;\n /*\n * old new\n * ...............................\n * -\n * start \n * -\n * ................................\n * -\n * end \n * - \n * ................................\n */\n if ($oldStart <= $newStart && $newStart <= $oldEnd && $oldEnd <= $newEnd)\n return FALSE;\n /*\n * old new\n * ...............................\n * -\n * start \n * -\n * ................................\n * - \n * end \n * -\n * ................................\n */\n if ($oldStart <= $newStart && $oldStart <= $newEnd && $oldStart >= $newStart && $oldStart >= $newEnd)\n return FALSE;\n /*\n * old new\n * ...............................\n * -\n * start \n * -\n * ................................\n * -\n * end \n * - \n * ................................\n */\n if ($newStart <= $oldStart && $newStart <= $oldEnd && $newEnd >= $oldStart && $newEnd >= $oldEnd)\n return FALSE;\n /*\n * old new\n * ...............................\n * \n * start - - \n * \n * ................................\n * \n * end - - \n * \n * ................................\n */\n if ($oldStart == $newStart && $oldEnd == $newEnd)\n return FALSE;\n return TRUE;\n }", "function dtlIsInRange($n, $min, $max) {\n return dtlIsInt($n) && $n >= $min && $n <= $max;\n}", "private static function isStrictlyIncreasing(array $x) {\n $cnt = count($x);\n for ($i = 1; $i < $cnt; ++$i) {\n if ($x[$i - 1] >= $x[$i]) {\n return false;\n }\n }\n return true;\n }", "public function test_between_returns_false_when_optional_and_input_not_num_range() {\n\t\t$optional = true;\n\t\t$params = [\n\t\t\t0,5\n\t\t];\n\n\t\t$result = self::$validator->validate( 10, $optional, $params );\n\t\t$this->assertFalse( $result );\n\t}", "public function setExclusive();", "public function isLimited(): bool\n {\n return self::UNLIMITED < $this->amount;\n }", "public function hasBoundingPoly(){\n return $this->_has(7);\n }", "public function exceed(){\n        $this->count(); // The rate agent controls each call amount somatory\n        $this->status(); // The agent looks the session conditions on this function\n        $return = (\n            $this->count > $this->limit && $this->range->from <= $this->now->sec && $this->now->sec <= $this->range->to\n        ) ? true : false;\n        // When the range is overflowed ($now is before $range->to) it becomes reset\n        if( $this->range->to <= $this->now->sec ) $this->reset();\n        return $return;\n    }", "public function hasBoundingPoly(){\n return $this->_has(1);\n }", "public function hasBoundingPoly(){\n return $this->_has(1);\n }", "function between($number, $min, $max)\n\t{\n\t\tif ($number >= $min && $number <= $max) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function testInclusive()\n {\n $validator = new Zefram_Validate_GreaterThanContext('min', true);\n $validator->setInclusive(false);\n $this->assertFalse($validator->getInclusive());\n }", "public function test_between_returns_false_when_not_optional_and_input_not_num_range() {\n\t\t$optional = false;\n\t\t$params = [\n\t\t\t0,5\n\t\t];\n\n\t\t$result = self::$validator->validate( 10, $optional, $params );\n\t\t$this->assertFalse( $result );\n\t}", "function range_robust($min, $max, $step) {\n// min and max, it returns a two-element array, rather than range(), which gives an error and \n// returns I think an empty array during this case. \n//\n// This is the main routine used to generate the boundareis of the bins that Uwingu uses. It generates\n// the inclusive boundaries of bins -- that is, including star and end locations. \n// range_robust(-90, 90, 50) = [-90,-40,10,60,90]\n//\n// This routine was not working right for a long time, which is why the n pole of Moon was inaccessible to \n// uwingu for a long time. Fixed now.\n//\n// HBT Uwingu 5-Sep-2010\n\n $debug = 0;\n\n $range = $max-$min;\n if ($step > $range) {\n $out = array($min, $max);\n if ($debug) {\n print \"range_robust(\" . $min . \" \" . $max . \" \" . $step . \"): \";\n print_array($out);\n print \"<br>\";\n }\n } else {\n $out = range($min, $max, $step);\n }\n\n// Now see if the final bin is in the array, or not. If it's not, it should be, and we put it there.\n\n if (max($out) != $max) {\n $out[] = $max;\n }\n\n return $out;\n}", "public function _opposite() {\n\t\t$bool = $this->_value;\n\t return (!($bool === true));\n\t}", "public function rule_not_between( Papi_Core_Conditional_Rule $rule ) {\n\t\tlist( $rule, $value ) = $this->get_between_values( $rule );\n\n\t\tif ( $value === false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! ( $rule->value[0] <= $value && $value <= $rule->value[1] );\n\t}", "public function valid(){\n return ($this->pointer >= $this->begin);\n }", "public function testValidateRangeUpperBound()\n {\n $builder = new Command\\Builder\\QueryIndex(static::$riak);\n $builder->buildBucket('some_bucket')\n ->withIndexName(\"foo_int\")\n ->withRangeValue(42, null);\n\n $builder->build();\n }", "public function isInverted()\n {\n return $this->after->gt($this->before);\n }", "public function atDifferentAddresses(): bool\n {\n return !$this->atTheSameAddress();\n }", "public function isPlaceable($x,$y)\n {\n if( !is_int($x) || !is_int($y) )\n return false;\n\n if( $x < self::lowerX || $x > $this->upperX || $y < self::lowerY || $y > $this->upperY)\n return false;\n else\n return true;\n\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "public function hasBoundingBox(){\n return $this->_has(2);\n }", "function is_between($value, $from, $to)\n {\n return ($value >= $from && $value <= $to) || ($value >= $to && $value <= $from);\n }", "public function compareRanges($args)\n {\n $is_available = true;\n if($args['sv_start_time'] >= $args['rs_start_time'] && $args['sv_start_time'] <= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n if( ($args['sv_final_time'] - 1) >= $args['rs_start_time'] && ($args['sv_final_time'] - 1) <= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n if($args['sv_start_time'] <= $args['rs_start_time'] && ($args['sv_final_time'] - 1) >= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n return $is_available;\n }", "function _is_in_range($client_ip, $start, $end)\n{\n $start = ip2long($start);\n\n if (false === $start) {\n return false;\n }\n\n $end = ip2long($end);\n\n if (false === $end) {\n return false;\n }\n\n return ($client_ip >= $start && $client_ip <= $end);\n}", "public function hasCanged()\n\t{\n\t return $this->value != $this->originalValue;\n\t}", "public function checkAreas()\n {\n for ($i = 0; $i < 3; $i++) {\n for ($j = 0; $j < 3; $j++) {\n if (!$this->checkAreaAt(\"$i;$j\")) {\n return false;\n }\n }\n }\n\n return true;\n }", "protected function op_range(&$oprand, $key, $range) {\n if (!isset($oprand[$key])) {\n return TRUE;\n }\n\n $opValue = $oprand[$key];\n if (!is_numeric($opValue)) {\n return FALSE;\n }\n $rangeEles = explode(',', $range);\n foreach ($rangeEles as $ele) {\n $rangeNums = explode('_', $ele);\n $nNums = count($rangeNums);\n if ($nNums < 1 || $nNums > 2) {\n return FALSE;\n } else if ($nNums === 1) {\n if (!is_numeric($rangeNums[0])) {\n return FALSE;\n } else if ($opValue == $rangeNums[0]) {\n return TRUE;\n }\n } else if ($nNums === 2) {\n if (strlen($rangeNums[0]) === 0 && is_numeric($rangeNums[1]) && $opValue <= $rangeNums[1]) {\n return TRUE;\n } else if (strlen($rangeNums[1]) === 0 && is_numeric($rangeNums[0]) && $opValue >= $rangeNums[0]) {\n return TRUE;\n } else if (!is_numeric($rangeNums[0]) || !is_numeric($rangeNums[1])) {\n return FALSE;\n } else if ($opValue >= $rangeNums[0] && $opValue <= $rangeNums[1]) {\n return TRUE;\n }\n }\n }\n return FALSE;\n }", "public static function range($check, $lower = null, $upper = null) {\n if (!is_numeric($check)) {\n return false;\n }\n if (isset($lower) && isset($upper)) {\n return ($check > $lower && $check < $upper);\n }\n return is_finite($check);\n }", "private function is_valid_range($start_time, $end_time)\r\n\t\t{\r\n\t\t\treturn strtotime($start_time) < strtotime($end_time);\r\n\t\t}", "public function isDiscrete()\n {\n return !$this->isRange();\n }", "public function hasOverlap()\n {\n return $this->overlap;\n }" ]
[ "0.7132193", "0.66208506", "0.6560112", "0.65457606", "0.6543624", "0.64321005", "0.63182956", "0.6306236", "0.6265052", "0.6241442", "0.6228662", "0.61712843", "0.61650246", "0.61234725", "0.6120449", "0.5952524", "0.59221", "0.5894416", "0.58843076", "0.5872974", "0.5830933", "0.5804464", "0.5768174", "0.5712808", "0.5711427", "0.5711097", "0.56854063", "0.5651294", "0.56504077", "0.56397665", "0.56253105", "0.5602352", "0.5575762", "0.5570512", "0.5568313", "0.55454135", "0.5541109", "0.55403817", "0.5507824", "0.5499947", "0.54976195", "0.54919404", "0.5488783", "0.5483286", "0.54654324", "0.5458336", "0.5456585", "0.54534405", "0.5408531", "0.5402651", "0.5378352", "0.5348383", "0.53469074", "0.53418785", "0.5338442", "0.5337989", "0.5336505", "0.5332014", "0.53095955", "0.5285585", "0.52740884", "0.5269465", "0.52657986", "0.5263145", "0.524704", "0.5243286", "0.5223491", "0.52186376", "0.52170396", "0.5216822", "0.5215091", "0.52144533", "0.52143884", "0.5213681", "0.5213681", "0.52086914", "0.5195427", "0.51927084", "0.518098", "0.5179336", "0.5177996", "0.51765007", "0.5170537", "0.51663196", "0.51644546", "0.5164256", "0.5157805", "0.5157805", "0.5157805", "0.5157805", "0.51513183", "0.5150981", "0.51352316", "0.5131919", "0.5123652", "0.5113379", "0.51078707", "0.5101555", "0.50976497", "0.5096952" ]
0.75667495
0
Returns true if the upperbound is inclusive
Возвращает true, если верхняя граница включена
public function isUpperInclusive(): bool { return $this->isUpperInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function inRange()\n {\n return $this->getNumber() >= $this->minRange && $this->getNumber() <= $this->maxRange;\n }", "public function includeUpperBound() {\n return $this->uBoundIn;\n }", "public function includeLowerBound() {\n return $this->lBoundIn;\n }", "public function getIsUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "function inRange($low, $high, $val)\n\t{\n\t\treturn $val >= $low && $val <= $high;\n\t}", "function checkRange ($i, $min, $max){\n if($i < $min or $i > $max){\n \n return false;\n \n }else\n {\n return true;\n }\n \n}", "public function hasRanges(){\n return $this->_has(2);\n }", "public function isUpperBoundValidator(): bool {\n return $this->min < 0 && $this->max > 0;\n }", "function isBetween($value, $min, $max, $inc = TRUE)\n\t{\n\t\tif ($value > $min &&\n\t\t$value < $max) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif ($inc &&\n\t\t$value >= $min &&\n\t\t$value <= $max) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === -1;\n }", "public function isBound();", "public static function inRange($value, $lower, $upper, $lowerExclusive = false, $upperExclusive = false)\n {\n if (!static::is($value) || !static::is($lower) || !static::is($upper)) {\n throw new \\InvalidArgumentException(\"The \\$value, \\$lower and \\$upper parameters must be numeric.\");\n }\n\n $lowerLimit = min($lower, $upper);\n if (!(($lowerExclusive) ? $lowerLimit < $value : $lowerLimit <= $value)) {\n return false;\n }\n\n $upperLimit = max($lower, $upper);\n if (!(($upperExclusive) ? $upperLimit > $value : $upperLimit >= $value)) {\n return false;\n }\n\n return true;\n }", "public function isUpperBoundValidator(): bool {\n return $this->min === null && $this->max > 0;\n }", "private function checkRange($value)\n {\n if ((!is_null($this->lowerLimit)) and (!is_null($this->upperLimit))) {\n if (($this->lowerLimit < $value) and ($this->upperLimit > $value)) {\n return true;\n }\n } elseif (!is_null($this->lowerLimit)) {\n if ($this->lowerLimit < $value) {\n return true;\n }\n } elseif (!is_null($this->upperLimit)) {\n if ($this->upperLimit > $value) {\n return true;\n }\n } else {\n // upper/lower is null. No check.\n return true;\n }\n\n return false;\n }", "function is_between( $value, $min, $max )\n{\n\treturn ($value >= $min && $value <= $max) ? true : false;\n}", "public function upperBound()\n {\n }", "function _is_in_range($client_ip, $start, $end)\n{\n $start = ip2long($start);\n\n if (false === $start) {\n return false;\n }\n\n $end = ip2long($end);\n\n if (false === $end) {\n return false;\n }\n\n return ($client_ip >= $start && $client_ip <= $end);\n}", "public function is_within_range($value, $range)\n {\n \tif($this->is_empty($value)\n \t\t|| (is_numeric($value) AND ($value <= $range[0] AND $value >= $range[1])))\n \t{\n\t\t \treturn true;\n \t} \n\t\t\n\t\treturn false;\n }", "function is_between($value, $from, $to)\n {\n return ($value >= $from && $value <= $to) || ($value >= $to && $value <= $from);\n }", "public function isLowerBoundValidator(): bool {\n return $this->min >= 0 && $this->max === null;\n }", "function inRange($numberOne, $numberTwo)\n{\n return ($numberOne <= 20 || $numberTwo >= 50) || ($numberTwo <= 20 || $numberOne >= 50);\n}", "public function isBounded()\n {\n return !$this->isOpenEnded() && !$this->isOpenStarted();\n }", "public function subtotalInRange($subtotal, $range)\r\n\t{\r\n\t\tif (($range['from'] > $subtotal) || ($range['to'] < $subtotal))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($subtotal < $range['from'])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ($subtotal > $range['to'])\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t}", "public function inInterval($value) {\n if (!is_numeric($value)) {\n return FALSE;\n }\n else if ($this->isEmpty()) {\n return FALSE;\n }\n else if (!$this->allowFloats() && is_double($value)) {\n return FALSE;\n }\n else if ($this->includeLowerBound() && $value < $this->getLowerBound()) {\n return FALSE;\n }\n else if (!$this->includeLowerBound() && $value <= $this->getLowerBound()) {\n return FALSE;\n }\n else if ($this->includeUpperBound() && $value > $this->getUpperBound()) {\n return FALSE;\n }\n else if (!$this->includeUpperBound() && $value >= $this->getUpperBound()) {\n return FALSE;\n }\n else {\n return TRUE;\n }\n }", "public function isRangeValidator(): bool {\n return $this->min >= 0 && $this->min < $this->max;\n }", "public function lowerBound()\n {\n }", "function value_in_range($value,$min,$max=false)\n{\n if($min!==false && $value<$min){return false;}\n if($max!==false && $value>$max){return false;}\n return true;\n}", "public function isLowerInclusive(): bool\n {\n return $this->isLowerInclusive;\n }", "function inRange($value, $start, $end){\n\t if(!is_numeric($value)){\n\t $value = intval($value);\n\t }\n\t\t\n\t if($value > $end){\n\t\t\treturn $end;\n\t\t}\n\t\tif($value < $start){\n\t\t\treturn $start;\n\t\t}\n\t\treturn $value;\n\t}", "function inRange($arg)\n{\n if (($arg > 50) and ($arg < 100)) {\n $svar = true;\n } else {\n $svar = false;\n }\n return (boolean) $svar;\n}", "function number_between($val, $min, $max, $boundary = true, $reverse = false)\n {\n $result = $boundary ? ($val >= $min && $val <= $max) : ($val > $min && $val < $max);\n\n return $reverse ? ! $result : $result;\n }", "function checkRange($extension){\n $low = $_SESSION[\"user\"]->_extension_low;\n $high = $_SESSION[\"user\"]->_extension_high;\n if ((($extension >= $low) && ($extension <= $high)) || (empty($low) && empty($high)))\n return true;\n else\n return false;\n}", "public function isRange()\n {\n return empty( $this->discreteValue);\n }", "public function isLowerExclusive(): bool\n {\n return ! $this->isLowerInclusive;\n }", "public static function inRange($input, $max, $min = 1) {\n\t\treturn ($input <= $max && $input >= $min);\n\t}", "public function isBoundAtEnd() {\n\t\treturn $this->nodeAtIndex( -1 )->isBound();\n\t}", "public function between($low, $high);", "public function inRange(DateTimeInterface $begin, DateTimeInterface $end, bool $strict = false): bool\n {\n if ($strict) {\n return $this->getTimestamp() > $begin->getTimestamp() && $this->getTimestamp() < $end->getTimestamp();\n }\n\n return $this->getTimestamp() >= $begin->getTimestamp() && $this->getTimestamp() <= $end->getTimestamp();\n }", "function dtlIsInRange($n, $min, $max) {\n return dtlIsInt($n) && $n >= $min && $n <= $max;\n}", "public function isBound()\n {\n return $this->bound;\n }", "public function hasCodepointRange(){\n return $this->_has(2);\n }", "function between($number, $min, $max)\n\t{\n\t\tif ($number >= $min && $number <= $max) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "abstract protected function isCompatibleWith(Range $range);", "function in($number, $min, $max) {\n return $number >= $min && $number <= $max;\n}", "public function isBeginsWithinDateInterval($lowerBoundDate, $upperBoundDate) {\n\n\t\t$minday = date('Y-m-d', strtotime($lowerBoundDate));\n\t\t$maxday = date('Y-m-d', strtotime($upperBoundDate));\n\t\t$thisday = date('Y-m-d', strtotime($this->beginDate));\n\n\t\treturn ( empty($lowerBoundDate) || $thisday >= $minday)\n\t\t\t&& ( empty($upperBoundDate) || $thisday <= $maxday);\n\t}", "public static function inside($value, $lower, $upper)\n {\n return static::inRange($value, $lower, $upper, false, false);\n }", "public function isUpperExclusive(): bool\n {\n return ! $this->isUpperInclusive;\n }", "function range1($var)\n{\nif(($var >= 100)&&($var < 200))\n{\n\treturn true;\n\n}\n}", "function AssumeIsWithinRange($value, $msg, $min, $max)\n\t{\n\t\tif(!is_numeric($value) || $value < $min || $value > $max)\n\t\t{\n\t\t\terror_page($msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}", "public function setInclusive($inclusive);", "protected function depthIsInRange()\n {\n return ($this->getRemainingDepth() > 0);\n }", "public function testBetween($key, $min, $max, $inc = TRUE)\n {\n if (!$this->keyExists($key)) \n {\n return false;\n }\n \n $value = $this->_source[$key];\n \n if ($value < $min ||\n $value > $max) \n {\n return false;\n }\n\n if ($inc &&\n $value <= $min ||\n $value >= $max) \n {\n return false;\n }\n \n return $this->_source[$key];\n }", "private function checkRangeInside($value)\n {\n return $this->checkRange($value);\n }", "private function isRangeValid(int $first, int $last, int $num) : bool\n {\n $rangeNum = $last - $first;\n if ($first <= 0 || $last <= 0 || $first > $num || $last > $num) {\n return false;\n } else if ($rangeNum > 49) {\n return false;\n }\n return true;\n }", "public static function range($check, $lower = null, $upper = null) {\n if (!is_numeric($check)) {\n return false;\n }\n if (isset($lower) && isset($upper)) {\n return ($check > $lower && $check < $upper);\n }\n return is_finite($check);\n }", "public function isBound()\n\t\t{\n\t\t\treturn $this->isBound;\n\t\t}", "public function getIsLowerInclusive(): bool\n {\n return $this->isLowerInclusive;\n }", "public function isBoundAtStart() {\n\t\treturn $this->nodeAtIndex( 0 )->isBound();\n\t}", "public function isRangeValidator(): bool {\n return $this->min !== null && $this->max !== null;\n }", "function betweenRus($data, $min, $max, $key) {\n\t\t//debug($data);\n\t\t$length = mb_strlen($data[$key], 'utf8');\n\n\t\tif ($length >= $min && $length <= $max) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "static public function operatorOVERLAP(&$lhs, &$rhs): bool\n {\n $bbox = explode(',',$rhs);\n if(count($bbox) !== 4) return false;\n $lhsBbox = getBoundingBox($lhs);\n if(count($lhsBbox) !== 4) return false;\n\n return $lhsBbox[0] <= $bbox[2]\n && $lhsBbox[1] <= $bbox[3]\n && $lhsBbox[2] >= $bbox[0]\n && $lhsBbox[3] >= $bbox[1];\n }", "function is_in($a, $from, $to) {\r\n if ($a < $from || $a > $to) return false;\r\n return true;\r\n }", "public function getLowerBound() {\n return $this->lBound;\n }", "public function getUpperBound() {\n return $this->uBound;\n }", "public static function isInRange( $addr, $range ) {\n $unsignedIP = IP::toUnsigned($addr);\n list( $start, $end ) = IP::parseRange($range);\n\n\t\t$start = hexdec($start);\n\t\t$end = hexdec($end);\n\n return (($unsignedIP >= $start) && ($unsignedIP <= $end));\n }", "private function checkRangeOutside($value)\n {\n return !$this->checkRange($value);\n }", "public function isBound(){ return $this->hasField('bound'); }", "function range_robust($min, $max, $step) {\n// min and max, it returns a two-element array, rather than range(), which gives an error and \n// returns I think an empty array during this case. \n//\n// This is the main routine used to generate the boundareis of the bins that Uwingu uses. It generates\n// the inclusive boundaries of bins -- that is, including star and end locations. \n// range_robust(-90, 90, 50) = [-90,-40,10,60,90]\n//\n// This routine was not working right for a long time, which is why the n pole of Moon was inaccessible to \n// uwingu for a long time. Fixed now.\n//\n// HBT Uwingu 5-Sep-2010\n\n $debug = 0;\n\n $range = $max-$min;\n if ($step > $range) {\n $out = array($min, $max);\n if ($debug) {\n print \"range_robust(\" . $min . \" \" . $max . \" \" . $step . \"): \";\n print_array($out);\n print \"<br>\";\n }\n } else {\n $out = range($min, $max, $step);\n }\n\n// Now see if the final bin is in the array, or not. If it's not, it should be, and we put it there.\n\n if (max($out) != $max) {\n $out[] = $max;\n }\n\n return $out;\n}", "function checkRange($extension){\n\t$low = isset($_SESSION[\"AMP_user\"]->_extension_low)?$_SESSION[\"AMP_user\"]->_extension_low:'';\n\t$high = isset($_SESSION[\"AMP_user\"]->_extension_high)?$_SESSION[\"AMP_user\"]->_extension_high:'';\n\t\n\tif ((($extension >= $low) && ($extension <= $high)) || ($low == '' && $high == ''))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function isWithin($interval){\r\n \r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n $this_interval = $stop_map[0] - $start_map[0];\r\n return ($this_interval <= $interval);\r\n \r\n }", "public function valid(){\n return ($this->pointer >= $this->begin);\n }", "function is_between($var, $min, $max)\n{\n return CValidate::between($var, $min, $max);\n}", "public static function range($number, $min, $max)\r\n\t{\r\n\t\treturn ($number >= $min AND $number <= $max);\r\n\t}", "public function getAbvRange();", "public function getTermsIncludeLowerBound(): bool {}", "public function getTermsIncludeLowerBound(): bool {}", "public function getTermsIncludeUpperBound(): bool {}", "public function getTermsIncludeUpperBound(): bool {}", "public function addRange($range): bool {\n foreach ($range as $obj) {\n $this->innerArray[] = $obj;\n }\n $this->count += count($range);\n return true;\n }", "public function needsUp($beginY, $endY) {\n if ($beginY < $endY) {\n return false;\n } elseif ($beginY > $endY) {\n return true;\n }\n\n return null;\n }", "function isIpInRange(string $inputIp, string $startIp, string $endIp): bool {\n \n function transformIpToDecimal(string $ip) {\n $ipOctets = explode(\".\", $ip);\n \n foreach ($ipOctets as $octet) {\n while (strlen($octet) < 3) {\n $octet = 0 . $octet; \n }\n \n $result = $octet . $result;\n }\n return $result;\n }\n \n return (transformIpToDecimal($inputIp) >= transformIpToDecimal($startIp) && transformIpToDecimal($inputIp) <= transformIpToDecimal($endIp));\n}", "protected function checkRange($value, $min, $max) {\n return $value >= $min && $value <= $max;\n }", "function ipv4_in_range( $ip, $range ) {\n\t\t$start = str_replace( '*', '0', $range );\n\t\t$end = str_replace( '*', '255', $range );\n\t\t$ip = (float) sprintf( \"%u\", ip2long( $ip ) );\n\n\t\treturn ( $ip >= (float) sprintf( \"%u\", ip2long( $start ) ) && $ip <= (float) sprintf( \"%u\", ip2long( $end ) ) );\n\t}", "private function strictlyContainsOtherBound(?Boundary $boundary) : bool\n {\n if ($boundary === null) {\n return false;\n }\n\n $boundVersion = $boundary->getVersion();\n\n if ($this->lowerBoundary === null) {\n assert($this->upperBoundary !== null, 'We either have a lower or an upper boundary, or both');\n\n return $this->upperBoundary->getVersion()->isGreaterThan($boundVersion);\n }\n\n if ($this->upperBoundary === null) {\n return $boundVersion->isGreaterThan($this->lowerBoundary->getVersion());\n }\n\n return $boundVersion->isGreaterThan($this->lowerBoundary->getVersion())\n && $this->upperBoundary->getVersion()->isGreaterThan($boundVersion);\n }", "function range($start, $end){\r\n \r\n $startToEnd = array($start, $end);\r\n return $startToEnd;\r\n}", "private function is_valid_range($start_time, $end_time)\r\n\t\t{\r\n\t\t\treturn strtotime($start_time) < strtotime($end_time);\r\n\t\t}", "public static function between($value, $lower, $upper)\n {\n return static::inRange($value, $lower, $upper, true, true);\n }", "public function testInclusive()\n {\n $validator = new Zefram_Validate_GreaterThanContext('min', true);\n $validator->setInclusive(false);\n $this->assertFalse($validator->getInclusive());\n }", "public function isInDistanceRange($shooter, $target, $fireOrder)\r\n {\r\n return true;\r\n }", "public function hasBoundingPoly(){\n return $this->_has(7);\n }", "protected function op_range(&$oprand, $key, $range) {\n if (!isset($oprand[$key])) {\n return TRUE;\n }\n\n $opValue = $oprand[$key];\n if (!is_numeric($opValue)) {\n return FALSE;\n }\n $rangeEles = explode(',', $range);\n foreach ($rangeEles as $ele) {\n $rangeNums = explode('_', $ele);\n $nNums = count($rangeNums);\n if ($nNums < 1 || $nNums > 2) {\n return FALSE;\n } else if ($nNums === 1) {\n if (!is_numeric($rangeNums[0])) {\n return FALSE;\n } else if ($opValue == $rangeNums[0]) {\n return TRUE;\n }\n } else if ($nNums === 2) {\n if (strlen($rangeNums[0]) === 0 && is_numeric($rangeNums[1]) && $opValue <= $rangeNums[1]) {\n return TRUE;\n } else if (strlen($rangeNums[1]) === 0 && is_numeric($rangeNums[0]) && $opValue >= $rangeNums[0]) {\n return TRUE;\n } else if (!is_numeric($rangeNums[0]) || !is_numeric($rangeNums[1])) {\n return FALSE;\n } else if ($opValue >= $rangeNums[0] && $opValue <= $rangeNums[1]) {\n return TRUE;\n }\n }\n }\n return FALSE;\n }", "public function is_rangevalue($number,$min,$max) {\n Trace::add_trace('check rangevalue',__METHOD__);\n return (intval($number) >= $min && intval($number) <= $max);\n }", "function IsIPInRange($currentIp, $startIp, $endIp) {\r\r\t$startIp = sprintf(\"%u\", ip2long($startIp));\r\t$endIp = sprintf(\"%u\", ip2long($endIp));\r\r\t$currentIp = sprintf(\"%u\", ip2long($currentIp));\r\r\treturn ( ($currentIp <= $endIp) && ($currentIp >= $startIp) ) ? 1 : 0 ;\r\r}", "public function valid()\n {\n return $this->current <= $this->last;\n }", "public function compareRanges($args)\n {\n $is_available = true;\n if($args['sv_start_time'] >= $args['rs_start_time'] && $args['sv_start_time'] <= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n if( ($args['sv_final_time'] - 1) >= $args['rs_start_time'] && ($args['sv_final_time'] - 1) <= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n if($args['sv_start_time'] <= $args['rs_start_time'] && ($args['sv_final_time'] - 1) >= ($args['rs_final_time'] - 1)){\n $is_available = false;\n }\n return $is_available;\n }", "public function test_between_returns_true_when_not_optional_and_input_in_num_range() {\n\t\t$optional = false;\n\t\t$params = [\n\t\t\t0,5\n\t\t];\n\n\t\t$result = self::$validator->validate( 3, $optional, $params );\n\t\t$this->assertTrue( $result );\n\t}", "protected function SPinBetween()\n {\n if($this->elmOne['space'] || $this->elmTwo['space']){\n return false;\n }\n if($this->elmOne['location'] != $this->elmTwo['location']){\n if($this->elmOne['onspace'] || $this->elmTwo['onspace']){\n if($this->hdir == 'r' && $this->elmTwo['row'] == 1){\n return false;\n }\n }\n\n return true;\n }\n return false;\n\n }", "public function test_between_returns_true_when_optional_and_input_in_num_range() {\n\t\t$optional = true;\n\t\t$params = [\n\t\t\t0,5\n\t\t];\n\n\t\t$result = self::$validator->validate( 3, $optional, $params );\n\t\t$this->assertTrue( $result );\n\t}", "public function isFull(): bool\n {\n return $this->drips() >= $this->max();\n }", "public function getOgRange();" ]
[ "0.73519063", "0.6915684", "0.6745426", "0.6721427", "0.6696382", "0.66951203", "0.6670799", "0.6569608", "0.647486", "0.64619946", "0.64450276", "0.6406027", "0.6396808", "0.6396523", "0.63700134", "0.6359953", "0.63559705", "0.6329038", "0.6313878", "0.6300226", "0.6223901", "0.6176198", "0.6175891", "0.6170916", "0.61597824", "0.6130223", "0.6088372", "0.6068469", "0.60507804", "0.60479987", "0.60448533", "0.6011894", "0.60086966", "0.60018927", "0.59902287", "0.5986653", "0.5984073", "0.59740734", "0.5971301", "0.59650373", "0.596101", "0.5955371", "0.5946807", "0.594108", "0.5927572", "0.58982235", "0.58909434", "0.58894193", "0.5871113", "0.586273", "0.5860283", "0.58520013", "0.5827027", "0.5821673", "0.58145493", "0.5793967", "0.57744515", "0.577439", "0.5771615", "0.5758083", "0.5725849", "0.57111293", "0.56804925", "0.56725883", "0.56690305", "0.5662519", "0.56538206", "0.56470525", "0.56333315", "0.5600127", "0.5572748", "0.55596715", "0.55305624", "0.55231905", "0.5517732", "0.5517732", "0.5505029", "0.5505029", "0.5500874", "0.5497195", "0.5496737", "0.54796195", "0.5478032", "0.54753864", "0.54617083", "0.5448238", "0.544615", "0.54406416", "0.54400945", "0.54320514", "0.54303867", "0.54146236", "0.541295", "0.54122", "0.5407396", "0.53936046", "0.53883135", "0.538716", "0.5377982", "0.53708917" ]
0.7077847
1
Parses an interval string
Парсит строку интервала
public function parse(string $string): self { // if the $string is not valid interval, short-circuit $pattern = '/^[\[\(]-?(\d*[\.]?\d+|INF), -?(\d*[\.]?\d+|INF)[\]\)]$/'; if ( ! preg_match($pattern, $string)) { throw new InvalidArgumentException( __METHOD__ . "() expects parameter one, string, to be a valid " . "interval; see the README for details" ); } // otherwise, check the boundaries $this->isLowerInclusive = substr($string, 0, 1) === '['; $this->isUpperInclusive = substr($string, -1, 1) === ']'; // get the endpoints $endpoints = explode($this->separator, substr($string, 1, -1)); // loop through the endpoints foreach ($endpoints as &$endpoint) { // if the endpoint is negative or positive infinity, convert the value // to the PHP constant; otherwise, cast the value to int or float // if ($endpoint === self::INFINITY_NEGATIVE) { $endpoint = -INF; } elseif ($endpoint === self::INFINITY_POSITIVE) { $endpoint = INF; } else { $endpoint = +$endpoint; } } // if the endpoints are out of order, short-circuit if ($endpoints[1] < $endpoints[0]) { throw new InvalidArgumentException( __METHOD__ . "() expects parameter one, string, to be a valid " . "interval, however, the upper bound appears to be greater " . "than the lower bound" ); } // if the endpoints are equal, the boundaries must match if ( $endpoints[0] == $endpoints[1] && $this->isLowerInclusive !== $this->isUpperInclusive ) { throw new InvalidArgumentException( __METHOD__ . "() expects parameter one, string, to be a valid " . "interval, however, the endpoints are the same but the " . "boundaries are different" ); } // otherwise, set the endpoints $this->lower = $endpoints[0]; $this->upper = $endpoints[1]; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readInterval($s) {\n $parts = explode(' ', $s);\n if (count($parts) != 2 || !is_numeric($parts[0])) {\n throw new InvalidArgumentException(\"Parameter must be in format '[number] [unit-of-time]'\");\n }\n $unit = strtolower($parts[1]);\n $bigUnits = array('day' => 'D', 'days' => 'D');\n $smallUnits = array('second' => 'S', 'seconds' => 'S', 'hour' => 'H', 'hours' => 'H');\n if (isset($bigUnits[$unit])) {\n return new DateInterval('P' . $parts[0] . $bigUnits[$unit]);\n } else if (isset($smallUnits[$unit])) {\n return new DateInterval('PT' . $parts[0] . $smallUnits[$unit]);\n } else {\n throw new InvalidArgumentException(\"Unrecognized time unit specified: $unit\");\n }\n}", "public function parse_interval($interval)\n {\n if ($interval < 60) {\n $interval = 0;\n } else {\n $interval = round(($interval / 60));\n\n }\n return $interval;\n }", "function parseRange($str) {\n\n\t$ret = array();\n\n\t//first, get all our commas\n\t$arr = explode(\",\",$str);\n\n\t//loop through our comma entries\n\tforeach ($arr AS $entry) {\n\n\t\t//now delimit by dashes\n\t\t$range = explode(\"-\",$entry);\n\n\t\t//if more than one entry, we have a range.otherwise we have a single entry\n\t\tif (count($range)==1) $ret[] = $range[0];\n\t\telse $ret = array_merge($ret,range($range[0],$range[1]));\n\n\t}\n\n\n\treturn $ret;\n\n}", "public function parse_position($string)\n {\n\n if (empty($string)) return array();\n\n // get the timestamp for this year\n $time_array = array(\n 'range' => '*',\n 'interval' => false\n );\n\n if ($string == '*') {\n return $time_array;\n } else if (preg_match('/^(\\d{4})$/', $string)) {\n $time_array['range'] = $string;\n\n return $time_array;\n } else {\n $time_array['range'] = array();\n switch (true) {\n // first check if it's a list\n case (strpos($string, ',') !== false) :\n $multi_pos = explode(',', $string);\n $interval = false;\n foreach ($multi_pos as $pos) {\n switch (true) {\n // get the interval first than proceed to the next\n case (($pos_pos = strpos($pos, '/')) !== false) :\n $interval = explode('/', $pos);\n $pos = substr($pos, 0, -(strlen($pos) - $pos_pos));\n // check the ranges\n default :\n $time_array['range'][] = array(\n 'range' => $pos,\n 'interval' => $interval[1]\n );\n $interval = false;\n break;\n\n }\n }\n break;\n // check if it's a range\n case (strpos($string, '-') !== false) :\n // get the interval first than proceed\n if (($pos_pos = strpos($string, '/')) !== false) {\n $interval = explode('/', $string);\n $time_array['interval'] = $interval[1];\n $string = substr($string, 0, -$pos_pos);\n }\n $time_array['range'] = $string;\n break;\n // check if it's an interval\n case (strpos($string, '/') !== false) :\n $multi_pos = explode('/', $string);\n $time_array['range'] = $multi_pos[0];\n $time_array['interval'] = $multi_pos[1];\n break;\n }\n }\n\n return $time_array;\n }", "static public function parse($expression) {\n\n\t\t\t// Convert named expressions if neccessary\n\n\t\t\tif (substr($expression,0,1) == '@') {\n\n\t\t\t\t$expression\t= strtr($expression, self::$intervals);\n\n\t\t\t\tif (substr($expression,0,1) == '@') {\n\n\t\t\t\t\t// Oops... unknown named interval!?!!\n\t\t\t\t\tthrow new Exception('Unknown named interval ['.$expression.']', 10000);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Next basic check... do we have 5 segments?\n\n\t\t\t$cron\t= explode(' ',$expression);\n\n\t\t\tif (count($cron) <> 5) {\n\n\t\t\t\t// No... we haven't...\n\t\t\t\tthrow new Exception('Wrong number of segments in expression. Expected: 5, Found: '.count($cron), 10001);\n\n\t\t\t} else {\n\n\t\t\t\t// Yup, 5 segments... lets see if we can work with them\n\n\t\t\t\tforeach ($cron as $idx=>$segment) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t$dummy[$idx]\t= self::expandSegment($idx, $segment);\n\n\t\t\t\t\t} catch (Exception $e) {\n\n\t\t\t\t\t\tthrow $e;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $dummy;\n\n\t\t}", "public static function parseRange($str) {\n // Check for valid characters\n if (preg_match('/[^0-9 ,-]/', $str) == 1)\n return array();\n\n // Remove leading and trailing spaces, commasn and hyphens\n $str = preg_replace('/^[ ,-]*/', '', $str);\n $str = preg_replace('/[ ,-]*$/', '', $str);\n $str = preg_replace('/ +/', ' ', $str);\n\n // Squeeze spaces\n $str = preg_replace('/ +/', ' ', $str);\n\n // Make interior spaces into commas, and squeeze commas\n $str = str_replace(\" \", \",\", $str);\n $str = preg_replace('/,+/', ',', $str);\n\n // Squeeze hyphens\n $str = preg_replace('/-+/', '-', $str);\n\n if (strlen($str) == 0)\n return array();\n\n $sub = explode(\",\", $str);\n $list = array();\n foreach ($sub as $s) {\n $delims = explode(\"-\", $s);\n $start = $delims[0];\n $end = $delims[count($delims)-1];\n\n // Check limits\n if ($start > $end) // invalid range\n return null;\n for ($i = $start; $i <= $end; $i++)\n $list[] = (int)$i;\n }\n\n return array_unique($list);\n }", "function range_string($range_str)\n{\n\t$range_out = [];\n\t$ranges = explode(',', $range_str);\n\n\t$last_num = 0;\n\n\tforeach($ranges as $range)\n\t{\n\t\t$step = 1;\n\t\t$range = trim($range);\n\n\t\tif(is_numeric($range))\n\t\t{\n\t\t\t// Just a number; add it to the list.\n\t\t\t$range_out[] = $range;\n\t\t\t$last_num = $range;\n\t\t}\n\t\telse if(is_string($range))\n\t\t{\n\t\t\t// Figure out if it is just a character.\n\t\t\tif(strlen($range) == 1)\n\t\t\t{\n\t\t\t\t$range_out[] = (string)$range;\n\t\t\t\t$last_num = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Is probably a range of values.\n\t\t\t\t$range_exp = explode(' ', $range);\n\n\t\t\t\tif(substr($range_exp[1], 0, 1) == '-' && !is_numeric(substr($range_exp[1], 0, 1)))\n\t\t\t\t{\n\t\t\t\t\t// Jumping range?\n\t\t\t\t\t$jump = str_split($range_exp[1], 1);\n\n\t\t\t\t\tif(count($jump) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(isset($jump[1]) && $jump[1] == '%')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$step = substr($range_exp[1], 2);\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// Normal range.\n\t\t\t\t\t\t$step = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$step = 1;\n\t\t\t\t}\n\n\t\t\t\tif($range_exp[0] == '[LAST_NUM]')\n\t\t\t\t{\n\t\t\t\t\t$start = $last_num;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$exp = explode(\"+\", $range_exp[0]);\n\n\t\t\t\t\tif($exp[0] == '[LAST_NUM')\n\t\t\t\t\t{\n\t\t\t\t\t\t$start = $last_num + trim($exp[1], ']');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$start = $range_exp[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$end = $range_exp[2];\n\n\t\t\t\tif($start > $end)\n\t\t\t\t{\n\t\t\t\t\tfor($i = $start; $i >= $end; $i -= $step)\n\t\t\t\t\t{\n\t\t\t\t\t\t$range_out[] = $i;\n\t\t\t\t\t}\n\n\t\t\t\t\t$last_num = $i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor($i = $start; $i <= $end; $i += $step)\n\t\t\t\t\t{\n\t\t\t\t\t\t$range_out[] = $i;\n\t\t\t\t\t}\n\n\t\t\t\t\t$last_num = $i;\n\t\t\t\t}\n\n\t\t\t\t// echo $step . \", \";\n\t\t\t}\n\t\t}\n\t}\n\treturn $range_out;\n}", "function get_range($string, $separator = ',', $range_indicator = '::')\n{\n $output = array();\n $ranges = explode_escaped($separator, $string);\n \n foreach ($ranges as $range) {\n // get the end points of the range\n $end_points = explode($range_indicator, $range);\n $end_points = array_map('trim', $end_points);\n \n // update the output array\n if (count($end_points) === 1) {\n $output[] = $end_points[0];\n } else {\n $range_end = end($end_points);\n $step = 1;\n $end_exploded = explode('#', $range_end);\n $range_end = trim($end_exploded[0]);\n \n if (isset($end_exploded[1]) AND is_numeric($end_exploded[1])) {\n $step = trim($end_exploded[1]);\n }\n \n foreach (range($end_points[0], $range_end, $step) as $e) {\n $output[] = $e;\n }\n }\n }\n \n return $output;\n}", "protected static function parseString( $string ) {\n\n //default values for start, stop, and step\n $values = [ 0, null, 1 ];\n\n //make sure there is some slice specified\n if( $string != '' ) {\n\n //normal slice notation\n if( strpos( $string, ':' ) !== false ) {\n $parts = explode( ':', $string );\n for( $i = 0; $i < count( $parts ); ++$i ) {\n if( strlen( $parts[ $i ] ) > 0 ) {\n $values[ $i ] = intval( $parts[ $i ] );\n }\n }\n }\n\n //single element\n else {\n $values[ 0 ] = intval( $string );\n $values[ 1 ] = $values[ 0 ] + 1;\n }\n }\n\n //return the slice values\n return $values;\n }", "public function __construct(string $interval = null) \n {\n if ($interval !== null) {\n $this->parse($interval);\n }\n }", "public function parse($str);", "static function getParsedTimeInterval ( $time_interval )\r\n\t{\r\n\t\t$timeInterval = array();\r\n\t\t\r\n\t\t$timeInterval['value'] = substr($time_interval, 0, strlen($time_interval)-1);\r\n\t\t$timeInterval['type'] = substr($time_interval, -1);\r\n\t\t\r\n\t\treturn $timeInterval;\r\n\t}", "public function getRange($interval);", "private function compileTimeInterval($i_start){\r\n \r\n $has_start_time = $has_stop_time = false;\r\n $token_ret = $token_start = $token_stop = null;\r\n $i_current = $i_start;\r\n $start_is_time = false; // true if the start token is an actual time token\r\n \r\n // possible: 8-9:30 or 8:00 - 9:30\r\n \r\n // check for the TIME THROUGH TIME (eg, 8:00 - 9:30) first...\r\n if($token_start = $this->compileTime($i_current)){\r\n \r\n $has_start_time = true;\r\n $start_is_time = true;\r\n $i_current = $token_start->index();\r\n \r\n if($token_start instanceof parse_date_time_interval_token){\r\n \r\n $token_ret = $token_start;\r\n $has_stop_time = true;\r\n \r\n }//if\r\n \r\n }else{\r\n \r\n // well, that failed, so try for a NUM THROUGH TIME (eg, 8-9:30)... \r\n if($token_hour = $this->get($i_current,self::TYPE_NUMBER)){\r\n $token_start = new parse_date_time_token($token_hour);\r\n list($hour_str,$min_str) = parse_date_get::timeBits($token_hour->get());\r\n $token_start->setTime($hour_str,$min_str);\r\n }//if\r\n \r\n }//if\r\n \r\n // now we need to finish the interval by getting THROUGH TIME...\r\n if(!empty($token_start) && !$has_stop_time){\r\n \r\n // now try and get a through...\r\n if($token_through = $this->get(++$i_current,self::TYPE_DELIM_COLLECTIVE)){\r\n \r\n // make sure the start time and the through are right next to each other...\r\n if($start_is_time || (($token_through->offsetWord() - $token_start->offsetWord()) <= 1)){\r\n \r\n // now try for another time map...\r\n if($token_stop = $this->compileTime($i_current + 1)){\r\n \r\n // success...\r\n $has_start_time = $has_stop_time = true;\r\n \r\n }else{\r\n \r\n if($has_start_time){\r\n \r\n // try for just an hour since we no we already have one time trigger and a through...\r\n if($token_hour = $this->get(++$i_current,self::TYPE_NUMBER)){\r\n \r\n $has_stop_time = true;\r\n $token_stop = new parse_date_time_token($token_hour);\r\n $token_stop->setTime($token_hour->get(),0);\r\n $token_stop->index($token_hour->index());\r\n \r\n }//if\r\n \r\n }//if\r\n \r\n }//if/else\r\n \r\n }//if\r\n \r\n }//if\r\n \r\n }//if\r\n \r\n if(empty($token_ret) && ($has_start_time && $has_stop_time)){\r\n \r\n // account for something like: 10:00-2:00\r\n $token_ret = new parse_date_time_interval_token(\r\n $token_stop->offsetWord(),\r\n $token_start->offsetChar(),\r\n $token_stop->offsetCharStop()\r\n );\r\n $token_ret->start($token_start);\r\n $token_ret->stop($token_stop);\r\n $token_ret->index($token_stop->index());\r\n \r\n }//if\r\n \r\n return $token_ret;\r\n \r\n }", "public abstract function get_interval(): int;", "public static abstract function parse($string);", "abstract public static function parse( $str );", "function ig_es_get_raw_human_interval( $interval_in_seconds = 0 ) {\n\n\t\t$interval = array();\n\n\t\t$seconds_in_minute = 60;\n\t\t$seconds_in__hour = 60 * $seconds_in_minute;\n\t\t$seconds_in_day = 24 * $seconds_in__hour;\n\n\t\t// extract days\n\t\t$interval['days'] = floor( $interval_in_seconds / $seconds_in_day );\n\n\t\t// extract hours\n\t\t$hour_seconds = $interval_in_seconds % $seconds_in_day;\n\t\t$interval['hours'] = floor( $hour_seconds / $seconds_in__hour );\n\n\t\t// extract minutes\n\t\t$minute_seconds = $hour_seconds % $seconds_in__hour;\n\t\t$interval['minutes'] = floor( $minute_seconds / $seconds_in_minute );\n\n\t\t// extract the remaining seconds\n\t\t$remaining_seconds = $minute_seconds % $seconds_in_minute;\n\t\t$interval['seconds'] = ceil( $remaining_seconds );\n\n\t\treturn $interval;\n\n\t}", "protected function parseString($str){\n\t\t\n\t\t$parts = \\preg_split('/[^\\d]+/', \\trim($str), static::PARTS_LENGTH,\n\t\t\t\t\\PREG_SPLIT_NO_EMPTY);\n\t\t\n\t\t//Only copy the minimum there and no more than the max allowed\n\t\tfor($i = 0, $l = \\min(\\count($parts), static::PARTS_LENGTH); $i < $l; ++$i){\n\t\t\t$this->_Parts[$i] = \\intval($parts[$i], 10);\n\t\t}\n\t\t\n\t}", "function getOptionRange($s)\n{\n\n\t//Returns as an array. First element is the lower bound, second element is the upper bound.\n\t$a = explode(',', $s);\n\t//echo \"<span>\".$a[1].\"</span>\";\n\treturn explode(\":\", $a[1] );\n\t\n}", "function rangestr_to_array($range_str) {\n\t\t$list = split('-', $range_str);\n\t\tif (count($list) == 1) {\n\t\t\treturn array(intval($list[0]), intval($list[0]));\n\t\t} else {\n\t\t\treturn array(intval($list[0]), intval($list[1]));\n\t\t}\n\t}", "public function getInterval();", "public function getInterval();", "public static function stringToRange($string)\n {\n $result = [];\n $ranges = preg_split(\"(,|\\s|;|\\|)\", $string);\n foreach($ranges as $range)\n {\n if(strstr($range, '-'))\n {\n list($start, $end) = explode(\"-\", $range, 2);\n if(is_numeric($start) && is_numeric($end))\n {\n $result = array_merge($result, range($start, $end));\n }\n else\n {\n $prefix = static::commonPrefix($start, $end);\n $range1 = str_replace($prefix, \"\", $start);\n $range2 = str_replace($prefix, \"\", $end);\n if(is_numeric($range1) && is_numeric($range2))\n {\n $prefixRange = range($range1, $range2);\n foreach($prefixRange as $r)\n {\n $result[] = $prefix . $r;\n }\n }\n else\n {\n $result[] = $range;\n }\n }\n }\n else\n {\n $result[] = $range;\n }\n }\n return $result;\n }", "public function getTimeBetweenBrackets(string $string)\r\n {\r\n preg_match_all(\"/\\[([^\\]]*)\\]/\", $string, $matches);\r\n $res = $matches[1];\r\n if (empty($res)) {\r\n return null;\r\n } elseif (count($res) === 1 && !empty($res[0])) {\r\n return (int) $res[0];\r\n } else {\r\n throw new AssociationBuilderException(\"Error parsing $string.\");\r\n }\r\n }", "public function getDateIntervalSymbol();", "function extract_values($str, $type) {\n if($str === null || strlen($str) === 0) {\n // nothing to do\n return null;\n }\n // maintain a list of values and/or ranges\n $values = array();\n // split on commas and loop over each entry, which could be either a single value or a range of values\n $parts = explode(',', $str);\n foreach($parts as $part) {\n if($type === 'int' && strpos($part, '-') !== false) {\n // split on the dash\n $range = explode('-', $part);\n // get the range endpoints\n $first = intval($range[0]);\n $last = intval($range[1]);\n if($last === $first) {\n // the first and last numbers are the same, just treat it as a singe value\n array_push($values, $first);\n } else if($last > $first) {\n // add the range as an array\n array_push($values, array($first, $last));\n } else {\n // the range is inverted, this is an error\n return null;\n }\n } else {\n // this is a single value\n if($type === 'int') {\n // cast to integer\n $value = intval($part);\n } else {\n // interpret the string literally\n $value = $part;\n }\n // add the extracted value to the list\n array_push($values, $value);\n }\n }\n // success, return the list\n return $values;\n}", "function parseval(array $str, int $offset){\n\t\t$frac_part = 0;//fractional part\n\t\t$int_part = 0;//integer part\n\t\t$float_flag = false;//if true then parsed value, have a \"float\" type\n\t\t$rate = 1;\n\t\t$neg_flag = false;//if integer part of negative value == 0, this var will be true\n\t\t$was_minus = false;//created to prevent extra value's sign flips\n\t\t\n\t\tfor($i = $offset; $i >= 0; $i--){\n\t\t\tif(is_numeric($str[$i])){\n\t\t\t\t(!$float_flag) ? $frac_part += (int)$str[$i] * $rate : $int_part += (int)$str[$i] * $rate;\n\t\t\t}\n\t\t\telse if($str[$i] === '.'){\n\t\t\t\t$float_flag = true;\n\t\t\t\t$rate = 1;\n\t\t\t}\n\t\t\telse if($str[$i] === '-' && !$was_minus){\n\t\t\t\t(!$float_flag) ? $frac_part = -$frac_part : $int_part = -$int_part;\n\t\t\t\tif(!$float_flag)\n\t\t\t\t\treturn $frac_part;\n\t\t\t\tif($int_part == 0)\n\t\t\t\t\t$neg_flag = true;\n\t\t\t\t$was_minus = true;\n\t\t\t}\n\t\t\telse{//if not a number or dot, or minus sign - return value\n\t\t\t\tif(!$float_flag)//if parsed value is integer\n\t\t\t\t\treturn $frac_part;\n\t\t\t\telse{\n\t\t\t\t\twhile(($frac_part /= 10) >= 1)\n\t\t\t\t\t\t;\n\t\t\t\t\tif($int_part < 0 || $neg_flag)\n\t\t\t\t\t\t$frac_part = -$frac_part;\n\t\t\t\t\treturn $int_part + $frac_part;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$rate *= 10;\n\t\t}\n\t\treturn 0;//if error occurs or line ends accidentally\n\t}", "static function compute($expression) {\n if (preg_match('/^'.MATH_INTERVAL_REGEX.'$/', $expression, $pieces)) {\n // Extracted interval.\n list(, $lbound_in_ex, $lbound, $ubound, $ubound_in_ex) = $pieces;\n // Convert upper and lower bound to number by adding 0.\n $lbound += 0;\n $ubound += 0;\n\n // Validate interval.\n if ($lbound > $ubound) {\n throw new MathIntervalException(\"Lower bound must be lower than upper bound in $expression\");\n }\n elseif (($ubound > $lbound) || ($lbound == $ubound && $lbound_in_ex == '[' && $ubound_in_ex == ']')) { \n // [1,1] is a valid range allowing only the number 1.\n return $expression;\n }\n else {\n // ]1,1], [1,1[ and ]1,1[ are all empty.\n // Return as empty interval .]0,0[ Accounting for floats.\n return (is_int($lbound) && is_int($ubound)) ? ']0,0[' : ']0.0,0.0[';\n }\n }\n elseif (preg_match('/^'.MATH_INTERVAL_EXPRESSION_REGEX.'$/', $expression, $results)) {\n // There are no atoms to extract.\n // Proceed to compute.\n $atom = $results[0];\n $ranges = preg_split('/ /', $atom);\n \n // First element is always a range.\n // The regex already validated this.\n $working_range = new MathInterval(array_shift($ranges));\n $op = current($ranges);\n \n do {\n $exp = next($ranges);\n \n if ($op == 'or') {\n $working_range->union($exp);\n }\n elseif ($op == 'and') {\n $working_range->intersection($exp);\n } \n }\n while ($op = next($ranges));\n \n return $working_range->__toString();\n }\n elseif (preg_match('/'.MATH_INTERVAL_EXP_ATOM_REGEX.'/', $expression, $atoms)) {\n // Extracted atom.\n // $atoms[0] contains the expression with parenthesis.\n // $atoms[1] contains the expression without parenthesis.\n $simplified = MathInterval::compute($atoms[1]);\n // Replace the atom with the simplified expression.\n // If multiple matches are found all will be replaced.\n $expression = str_replace($atoms[0], $simplified, $expression);\n // Run the compute again with the new expression.\n return MathInterval::compute($expression);\n }\n else {\n throw new MathIntervalException(\"Invalid expression.\");\n }\n }", "public function parse($string, $pos = 0);", "public static function parse($data)\n {\n if (strpos($data, '/') || strpos($data, ' ')) {\n // Range is defined by a network\n $network = Network::parse($data);\n $firstIP = $network->getFirstIP();\n $lastIP = $network->getLastIP();\n } elseif (strpos($data, '*')) {\n // Range is defined by wildcard\n $firstIP = IP::parse(str_replace('*', '0', $data));\n $lastIP = IP::parse(str_replace('*', '255', $data));\n } elseif (strpos($data, '-')) {\n // Range is defined by two IP\n list($first, $last) = explode('-', $data, 2);\n $firstIP = IP::parse($first);\n $lastIP = IP::parse($last);\n } else {\n // Range is defined by an IP\n $firstIP = IP::parse($data);\n $lastIP = clone $firstIP;\n }\n\n return new self($firstIP, $lastIP);\n }", "function Val_time ($String) {\r\n\tlist ($Hours, $Minutes) = explode (\":\", $String);\r\n\tif (Val_int ($Hours, 2) === false || Val_num ($Minutes, 2) === false) {\r\n\t\treturn false;\r\n\t}\r\n \r\n\tif ($Hours > 24 || $Minutes > 60) {\r\n\t\treturn false;\r\n\t}\r\n \r\n\treturn $String;\r\n}", "public function fillFromString($string){\n\t\t$start = (float) array_sum(explode(' ',microtime())); \n\t\t\n\t\t$this->log(\"Trying to parse: '$string'\");\n\t\t// If the string starts with a root name\n\t\tif(preg_match(\"/^[a-gA-G][b#]?/\", $string, $rootArr)){\n\t\t\t// Record root\n\t\t\t$this->root = $this->tone(strtolower($rootArr[0]));\n\t\t\t// Trim root off of the beginging of string\n\t\t\t$string = substr($string, strlen($this->root));\n\t\t\t$this->log(\"Root is: '{$rootArr[0]}'\");\n\t\t}else{\n\t\t\t$this->errors[] = \"Unable to determine root\";\n\t\t\treturn false;\n\t\t}\n\t\n\t\t// Assume a major chord based on the root (0,4,7)\n\t\t$this->intervalsAboveRoot = array(0 => 1, 4 => 1, 7 => 1);\n\t\t\n\t\t// If the last token is a slash \n\t\tif(preg_match(\"=/[a-gA-G][b#]?$=\", $string, $slashArr)){\n\t\t\t// Record the new bass tone (trimming the slash)\n\t\t\t$this->bass = $this->tone(strtolower(substr($slashArr[0], 1)));\n\t\t\t// Trim slash off of the end of string\n\t\t\t$string = substr($string, 0, strlen($string) - strlen($slashArr[0]));\n\t\t\t$this->log(\"Slash bass is: '\" . substr($slashArr[0], 1) . \"'\");\n\t\t}\n\t\t\n\t\t// Until there is no string left\n\t\twhile(strlen($string) > 0){\n\t\t\t$foundToken = false;\n\t\t\tforeach($this->tokens as $token => $intervals){\n\t\t\t\t//if the start of $string matches a token \n\t\t\t\tif(strpos($string, strval($token)) === 0){ // strval is needed to prevent the token from being interpreted as an integer (ie '-5')\n\t\t\t\t\t$this->log(\"Found token '$token'\");\n\t\t\t\t\t$foundToken = true;\n\t\t\t\t\t// Adjust the scoring of the intervals\n\t\t\t\t\tforeach($intervals as $interval => $weight){\n\t\t\t\t\t\t$this->intervalsAboveRoot[$interval] += $weight;\n\t\t\t\t\t\t// If the weight for the interval is 0 or less, remove the interval\n\t\t\t\t\t\tif($this->intervalsAboveRoot[$interval] <= 0){\n\t\t\t\t\t\t\tunset($this->intervalsAboveRoot[$interval]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Trim that token from string\n\t\t\t\t\t$string = substr($string, strlen($token));\n\t\t\t\t\t// Start at the top of the token list again (because the order is important)\n\t\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$foundToken){\n\t\t\t\t$this->errors[] = \"Unable to parse chord\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$this->fillChordTones();\n\t\treturn true;\n\t}", "public function parse($string) {\n $this->original = $string;\n $this->parsed = array();\n \n // Build up our regex that is used to parse the incoming string.\n $regex = '(?:([0,1,2]?\\d+)\\:?(\\d{2})\\:?(\\d{2})|([0,1,2]?\\d+)\\:?(\\d{2})()|([0,1,2]?\\d+)()())(am|pm|a|p)?';\n\n if ($this->options->colon === 'required') {\n $regex = str_replace('\\:?', '\\:', $regex);\n }\n\n if (!$this->options->fuzzy) {\n $regex = \"^{$regex}$\";\n }\n\n // If we can't match then we're done.\n if (!preg_match(\"/{$regex}/\", $string, $parts)) {\n return $this;\n }\n $parts = array_pad($parts, 11, NULL);\n\n // If colon is required, make sure that we capture the same thing when\n // no colons are present in the regex, otherwise the first capture\n // did not acuratly capture the whole string correctly.\n // This makes sure that 615 doesn't get mistaken as 6 and loose the mins.\n if ($this->options->colon === 'required' && !strpos($parts[0], ':')) {\n $colonRegex = str_replace('\\:', '', $regex);\n preg_match(\"/{$colonRegex}/\", $string, $temp);\n if ($temp[0] !== $parts[0]) {\n return $this;\n }\n }\n \n // If we can't figure out the hour then we need to bail.\n if (self::undefined($hour = $parts[1])\n && self::undefined($hour = $parts[4])\n && self::undefined($hour = $parts[7])) {\n return $this;\n }\n $hour *= 1;\n\n // Define the secs or 0.\n if (self::undefined($min = $parts[2])\n && self::undefined($min = $parts[5])\n && self::undefined($min = $parts[8])) {\n $min = 0;\n }\n\n // Define the secs or 0.\n if (self::undefined($sec = $parts[3])\n && self::undefined($sec = $parts[6])\n && self::undefined($sec = $parts[9])) {\n $sec = 0;\n }\n\n // Figure out the suffix if discovered.\n $suffix = $this->options->assume;\n $suffixPresent = FALSE;\n if (isset($parts[10])) {\n $suffixPresent = TRUE;\n $suffix = $parts[10];\n if ($suffix === 'a' || $suffix === 'p') {\n $suffix .= 'm';\n } \n }\n if ($hour > 23 || $min > 59) {\n return $this;\n }\n\n // am/pm\n if ($this->options->default === 12) {\n if ($hour > 12) {\n $hour -= 12;\n $suffix = 'pm';\n }\n else if ($hour === 0) {\n $hour = 12;\n $suffix = 'am';\n }\n }\n\n // Military\n if ($this->options->default === 24) {\n if ($hour === 12 && $suffix === 'am' && $suffixPresent) {\n $hour = 0;\n }\n elseif ($hour < 12 && $suffix === 'pm') {\n $hour += 12;\n }\n $suffix = '';\n\n if ($hour < 10) {\n $hour = \"0{$hour}\";\n }\n }\n\n $hour = (string) $hour;\n $min = $min == 0 ? '00' : ($min < 10 ? $min = '0' . (int) $min : (string) $min);\n $sec = $sec == 0 ? '00' : ($sec < 10 ? $sec = '0' . (int) $sec : (string) $sec);\n\n $this->parsed = array($hour, $min, $suffix);\n if ($this->options->seconds) {\n $this->parsed[] = $sec;\n }\n\n return $this;\n }", "function parseExpr($expr) {\n $parts=array();\n if (preg_match('/^@(\\w+)$/',$expr,$m)) {\n if (!isset($this->presets[$m[1]]))\n return FALSE;\n $expr=$this->presets[$m[1]];\n }\n $expr=preg_split('/\\s+/',$expr,-1,PREG_SPLIT_NO_EMPTY);\n $ranges=array(\n 0=>59,//minute\n 1=>23,//hour\n 2=>31,//day of month\n 3=>12,//month\n 4=>6,//day of week\n );\n foreach($ranges as $i=>$max)\n if (isset($expr[$i]) && preg_match_all('/(?<=,|^)\\h*(?:(\\d+)(?:-(\\d+))?|(\\*))(?:\\/(\\d+))?\\h*(?=,|$)/',\n $expr[$i],$matches,PREG_SET_ORDER)) {\n $parts[$i]=array();\n foreach($matches as $m) {\n if (!$range=@range(@$m[3]?0:$m[1],@$m[3]?$max:(@$m[2]?:$m[1]),@$m[4]?:1))\n return FALSE;//step exceeds specified range\n $parts[$i]=array_merge($parts[$i],$range);\n }\n } else\n return FALSE;\n return $parts;\n }", "public function getParseStringData()\n {\n $out = [];\n\n // Case #0: one day.\n $out[] = ['1d', 86400000];\n\n // Case #1: all unit types.\n $out[] = ['2w3d4h5m6ms', 1483500006];\n\n // Case #2: Invalid unit type.\n $out[] = ['2w3d4h5g6ms', 0, 'InvalidArgumentException', \"Unknown time unit 'g'\"];\n\n // Case #3: Invalid string.\n $out[] = ['ggg', 0, 'InvalidArgumentException', \"Invalid time string 'ggg'\"];\n\n return $out;\n }", "private static function GetIntervalName($timeLevel, $timeString){\n $value = \"\";\n $currentYear=Date('Y');\n $inYear=(int)substr($timeString,0,4);\n switch ($timeLevel){\n case 1:\n {\n $value=9 -($currentYear-$inYear); \n break;\n }\n case 2:\n {\n $value=9;\n break;\n }\n default:{\n $value=9;\n }\n }\n \n return \"interval\".$value;\n }", "public function getInterval() {}", "public static function fromDateInterval(DateInterval $dateInterval, string $unit):string\n\t{\n\t\t$isString = false;\n\n\t\tswitch ($unit) {\n\t\t\tcase \"MICROSECOND\": \n\t\t\t\t$expression = $dateInterval->format(\"%f\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"SECOND\":\n\t\t\t\t$expression = $dateInterval->format(\"%s\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"MINUTE\":\n\t\t\t\t$expression = $dateInterval->format(\"%i\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"HOUR\":\n\t\t\t\t$expression = $dateInterval->format(\"%h\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"DAY\":\n\t\t\t\t$expression = $dateInterval->format(\"%d\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"WEEK\":\n\t\t\t\t$expression = $dateInterval->format(\"%d\") / 7;\n\t\t\t\tbreak;\n\n\t\t\tcase \"MONTH\":\n\t\t\t\t$expression = $dateInterval->format(\"%m\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"QUARTER\":\n\t\t\t\t$expression = $dateInterval->format(\"%m\") / 3;\n\t\t\t\tbreak;\n\n\t\t\tcase \"YEAR\":\n\t\t\t\t$expression = $dateInterval->format(\"%y\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"SECOND_MICROSECOND\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%s.%f\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"MINUTE_MICROSECOND\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%i:%s.%f\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"MINUTE_SECOND\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%i:%s\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"HOUR_MICROSECOND\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%h:%i:%s.%f\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"HOUR_SECOND\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%h:%i:%s\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"HOUR_MINUTE\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%h:%i\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"DAY_MICROSECOND\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%d %h:%i:%s.%f\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"DAY_SECOND\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%d %h:%i:%s\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"DAY_MINUTE\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%d %h:%i\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"DAY_HOUR\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%d %h\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"YEAR_MONTH\":\n\t\t\t\t$isString = true;\n\t\t\t\t$expression = $dateInterval->format(\"%y-%m\");\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tthrow new \\InvalidArgumentException(\"Unit '\".$unit.\"' is not a valid MySQL interval unit\", 1);\n\t\t}\n\n\t\treturn \"INTERVAL \".($isString ? \"'\".$expression.\"'\" : (int)$expression).\" \".$unit;\n\t}", "public static function parse_str($str)\n {\n }", "public static function parseRange( $range ) {\n\t\tif ( strpos( $range, '/' ) !== false ) {\n\t\t\t# CIDR\n\t\t\tlist( $network, $bits ) = IP::parseCIDR( $range );\n\t\t\tif ( $network === false ) {\n\t\t\t\t$start = $end = false;\n\t\t\t} else {\n\t\t\t\t$start = sprintf( '%08X', $network );\n\t\t\t\t$end = sprintf( '%08X', $network + pow( 2, (32 - $bits) ) - 1 );\n\t\t\t}\n\t\t} elseif ( strpos( $range, '-' ) !== false ) {\n\t\t\t# Explicit range\n\t\t\tlist( $start, $end ) = array_map( 'trim', explode( '-', $range, 2 ) );\n\t\t\tif ( $start > $end ) {\n\t\t\t\t$start = $end = false;\n\t\t\t} else {\n\t\t\t\t$start = IP::toHex( $start );\n\t\t\t\t$end = IP::toHex( $end );\n\t\t\t}\n\t\t} else {\n\t\t\t# Single IP\n\t\t\t$start = $end = IP::toHex( $range );\n\t\t}\n\t\tif ( $start === false || $end === false ) {\n\t\t\treturn array( false, false );\n\t\t} else {\t\t\t\t\n\t\t\treturn array( $start, $end );\n\t\t}\n }", "function parseTime($str) {\n $hour = (int)substr($str,0,2);\n if ($hour >= 12) {\n if ($hour !== 12)\n $hour -=12;\n $period = 'pm';\n }else{\n $period = 'am';\n if ($hour === 0)\n $hour = 12; //midnight\n } \n $min = substr($str,-2);\n return $hour.':'.$min.$period;\n}", "public function getIntervalSpec()\n {\n $interval_spec = $this->invert ? '-P' : 'P';\n\n $interval_spec .= $this->y ? \"{$this->y}Y\" : '';\n $interval_spec .= $this->m ? \"{$this->m}M\" : '';\n $interval_spec .= $this->w ? \"{$this->w}W\" : '';\n $interval_spec .= $this->d ? \"{$this->d}D\" : '';\n\n $interval_spec .= ($this->h || $this->i || $this->s) ? 'T' : '';\n\n $interval_spec .= $this->h ? \"{$this->h}H\" : '';\n $interval_spec .= $this->i ? \"{$this->i}M\" : '';\n $interval_spec .= $this->s ? \"{$this->s}S\" : '';\n\n return ($interval_spec == 'P' || $interval_spec == '-P') ? $this->interval_spec : $interval_spec;\n }", "public function parse($s) {\n $this->clear();\n\n $s=trim($s);\n\n //split influx string into array with: value,delim,value,delim,...\n $p = []; //parts\n $w = ''; //word\n $q = false; //in qouted\n $len = strlen($s);\n $i = 0;\n while($i<$len) {\n $c = $s[$i];\n $c1 = @$s[$i+1]; //next char or '' if no next char\n if($q && $c=='\"' && ($c1==','||$c1=='='||$c1==' ')) {\n $q = false;\n }else if(!$q && ($c==','||$c=='='||$c==' ')) {\n $p[] = $w;\n $p[] = $c;\n $w = '';\n if($c1=='\"') { $q=true; $i++;} //skip quote\n }else{\n if($c=='\\\\') {\n $w .= $c1;\n $i++;\n }else{\n $w .= $c;\n }\n }\n $i++;\n }\n $p[] = $w;\n\n //sort $p into tbl,tags,fields, and ts\n $cnt = count($p);\n if($cnt < 5) return 1; //minimum 5 parts: \"tbl fld=val\"\n $this->tbl = $p[0];\n $i = 1;\n while($p[$i]==','){\n if($i+4 > $cnt) return 2;\n if($p[$i+2] != '=') return 3;\n $this->tag[$p[$i+1]] = $p[$i+3];\n $i+=4;\n }\n if($i+4 > $cnt) return 5;\n if($p[$i]!=' ') return 6;\n if($p[$i+2] != '=') return 7;\n $this->parse_fld($p[$i+1], $p[$i+3]);\n $i+=4;\n while($i < $cnt && $p[$i]==','){\n if($i+4 > $cnt) return 8;\n if($p[$i+2] != '=') return 9;\n $this->parse_fld($p[$i+1], $p[$i+3]);\n $i+=4;\n }\n if($i+1 < $cnt) {\n if($p[$i] != ' ') return 10;\n $this->setTs($p[$i+1]);\n }else{\n $this->setTs(time());\n }\n\n //split \"tablename:precision\"\n $parts = explode(':',$this->tbl,2);\n if(count($parts)==2) {\n $this->tbl = $parts[0];\n if(((int)$parts[1]) > 0) $this->precision = (int)$parts[1];\n } \n return 0;\n}", "public function setInterval($interval) {\n if(!isset($interval['unit']) || !isset($interval['length']) || !in_array($interval['unit'], array('DAY', 'MONTH', 'YEAR')) || !is_numeric($interval['length'])) {\n $this->setError('Interval must be an array containing the keys \\'length\\' and \\'unit\\'.');\n }\n else {\n $this->interval = $interval;\n }\n \n return $this;\n }", "function parse_time_string(string $src) : ?array\n {\n $matches = [];\n\n if(preg_match(\"/(?<hours>\\d{1,2}):(?<minutes>\\d{1,2})/\", $src, $matches)){\n return [\n 'hours' => intval($matches['hours']),\n 'minutes' => intval($matches['minutes']),\n ];\n } else{\n return null;\n }\n }", "function cronrow_checkdigit($s, $i)\n {\n $range = array(60, 24, -31, -12, 7);\n if (strpos($s, '-'))\n {\n list($a, $b) = explode('-', $s);\n $ok = (int)$a<(int)$b && cronrow_checkdigit($a, $i) && cronrow_checkdigit($b, $i);\n }\n else\n {\n if ($i<0)\n {\n $r = $range[-1-$i];\n if ($r>0)\n $r = -$r;\n }\n else\n $r = $range[$i];\n $s = (int)$s;\n $ok = ($r<0 ? $s>0 && $s<=-$r : $s<$r);\n }\n return $ok;\n }", "public static function get_subscription_period_interval_strings( $interval = '' ) {\n $intervals = array( 1 => _x( 'every', 'period interval (eg \"$10 _every_ 2 weeks\")', 'dokan' ) );\n\n foreach ( range( 2, 6 ) as $i ) {\n // translators: period interval, placeholder is ordinal (eg \"$10 every _2nd/3rd/4th_\", etc)\n $intervals[ $i ] = sprintf( _x( 'every %s', 'period interval with ordinal number (e.g. \"every 2nd\"', 'dokan' ), self::append_numeral_suffix( $i ) );\n }\n\n $intervals = apply_filters( 'dokan_pro_subscription_period_interval_strings', $intervals );\n\n if ( empty( $interval ) ) {\n return $intervals;\n } else {\n return $intervals[ $interval ];\n }\n }", "function return_between($string, $start, $stop, $type)\n {\n $temp = split_string($string, $start, AFTER, $type);\n return split_string($temp, $stop, BEFORE, $type);\n }", "private function __validate_param_codel_interval() {\n if ($this->validated_data[\"aqm\"] === \"codel\") {\n # Check for our optional `param_codel_interval` payload value\n if (isset($this->initial_data[\"param_codel_interval\"])) {\n # Ensure the param_codel_interval is numeric\n if (is_numeric($this->initial_data[\"param_codel_interval\"])) {\n # Ensure the param_codel_interval value is 0 or greater\n if (intval($this->initial_data[\"param_codel_interval\"]) >= 0) {\n $this->validated_data[\"param_codel_interval\"] = intval($this->initial_data[\"param_codel_interval\"]);\n } else {\n $this->errors[] = APIResponse\\get(4181);\n }\n } else {\n $this->errors[] = APIResponse\\get(4181);\n }\n } else {\n $this->validated_data[\"param_codel_interval\"] = 100;\n }\n }\n }", "public function parseSalariesFromString($input = null)\n {\n $salary = [\n 'min' => null,\n 'max' => null\n ];\n $expressions = [\n 'annualRange' => \"/^.\\d+k\\s-\\s.\\d+k\\/year$/\",\n 'annualFixed' => \"/^.\\d+k\\/year$/\",\n 'hourlyRange' => \"/^.\\d+.\\d+\\s-\\s.\\d+.\\d+\\/hour$/\",\n 'hourlyFixed' => \"/^.\\d+.\\d+\\/hour$/\",\n ];\n\n foreach ($expressions as $key => $expression) {\n if (preg_match($expression, $input)) {\n $method = 'parse'.$key;\n $salary = $this->$method($salary, $input);\n }\n }\n\n return $salary;\n }", "protected function parse($str)\n {\n }", "public function interval(string $interval)\n {\n $this->interval = $interval;\n\n return $this;\n }", "public function formatInterval($interval, $granularity = 2, $langcode = NULL);", "public static function parse($input);", "public function __construct($interval)\n {\n $this->message = \"Invalid interval \\\"{$interval}\\\".\";\n }", "function parseString(string $subject) : FormatParser\n{\n return new FormatParser($subject);\n}", "public static function stringToCarbonInterval(string $time = '0:0:0') : CarbonInterval\n {\n $time = explode(':', $time);\n\n if (count($time)) {\n $seconds = isset($time[2]) ? (integer)$time[2] : 0;\n $minutes = isset($time[1]) ? (integer)$time[1] : 0;\n $hours = isset($time[0]) ? (integer)$time[0] : 0;\n\n return self::toCarbonInterval($seconds, $minutes, $hours);\n }\n\n return CarbonInterval::hours($time);\n }", "public function __construct(...$args)\n {\n $expression = is_string($args[0]) ? $args[0] : null;\n //Improve Repeating intervals (R/start/interval/end) configuration\n if (preg_match('/^R(\\d*)\\/([^\\/]+)\\/([^\\/]+)\\/([^\\/]+)$/', $expression, $repeating)) {\n $this->start = new DateTime($repeating[2]);\n $this->interval = new DateInterval($repeating[3]);\n $this->end = new DateTime($repeating[4]);\n $this->recurrences = $repeating[1] ? $repeating[1] + 1 : self::INF_RECURRENCES;\n //Improve Repeating intervals (R[n]/start/interval) or (R[n]/interval/end) configuration\n } elseif (preg_match('/^R(\\d*)\\/([^\\/]+)\\/([^\\/]+)$/', $expression, $repeating)) {\n $withoutStart = substr($repeating[2], 0, 1) === 'P';\n $this->start = $withoutStart ? null : new DateTime($repeating[2]);\n $this->interval = new DateInterval($repeating[$withoutStart ? 2 : 3]);\n $this->end = $withoutStart ? new DateTime($repeating[3]) : null;\n $this->recurrences = $repeating[1] ? $repeating[1] + 1 : self::INF_RECURRENCES;\n //Improve Repeating intervals (R[n]/start/interval) configuration\n } elseif (preg_match('/^R(\\d*)\\/([^\\/]+)$/', $expression, $repeating)) {\n $this->start = null;\n $this->interval = new DateInterval($repeating[2]);\n $this->end = null;\n $this->recurrences = $repeating[1] ? $repeating[1] + 1 : self::INF_RECURRENCES;\n } elseif (count($args) === 3 && is_array($args[2])) {\n $this->start = $args[0];\n $this->interval = $args[1];\n $this->end = $args[2][0];\n $this->recurrences = $args[2][1] + 1;\n } elseif (count($args) === 2 || count($args) === 3) {\n $this->start = $args[0];\n $this->interval = $args[1];\n $this->end = isset($args[2]) && $args[2] instanceof DateTimeInterface ? $args[2] : null;\n $this->recurrences = isset($args[2]) && is_int($args[2]) ? $args[2] + 1 : self::INF_RECURRENCES;\n } else {\n throw new Exception('Invalid DatePeriod definition');\n }\n // Validate properties\n if (isset($this->start) && !($this->start instanceof DateTimeInterface)) {\n throw new Exception('Invalid DatePeriod::start definition');\n }\n if (!($this->interval instanceof DateInterval)) {\n throw new Exception('Invalid DatePeriod::interval definition');\n }\n if (isset($this->end) && !($this->end instanceof DateTimeInterface)) {\n throw new Exception('Invalid DatePeriod::end definition');\n }\n if (!($this->recurrences >= 0)) {\n throw new Exception('Invalid DatePeriod::recurrences definition');\n }\n }", "public function parse($s)\n {\n $args = func_get_args();\n array_shift($args);\n return $this->parseVals($s, $args);\n }", "private function interval(): string\n {\n $offset = $this->offset();\n\n if ($offset > 0) {\n return \" + INTERVAL {$offset} HOUR\";\n }\n\n if ($offset === 0) {\n return '';\n }\n\n return ' - INTERVAL '.($offset * -1).' HOUR';\n }", "public function testStringBetween()\n {\n \t$string = 'SDC002000173';\n \t\n \t$result = getStringBetween($string,'SDC','173');\n\n $this->assertEquals($result,'002000');\n }", "function _string2minutes($value)\n {\n if(strpos($value,':')===false)\n {\n // decimal format\n $tmp = explode('.',$value);\n if(strlen($tmp[1])==1) $tmp[1]=$tmp[1]*10;\n return $tmp[0]*60+$tmp[1]*(60/100);\n }\n else\n {\n // hh:mm format\n $tmp = explode(':',$value);\n return $tmp[0]*60+$tmp[1];\n }\n }", "function ParseCoordString($pCoordString){\n\t\t//~ var_dump($pCoordString);\n\t\t//~ echo '<br/>';\n\t\t//~ var_dump(urlencode(htmlspecialchars('36°31\\'21.4\"N; 114°09\\'50.6\"W')));\n\t\t//~ var_dump($pCoordString);\n\t\t\n\t\t$lMinSymbol = '[’\\'`]';\n\t\t$lSecondsSymbol = '([’\\'`]{2}|[\"])';\n\t\t$lDegSymbol = '[°°]';\n\t\t$lPatterns = array();\n\t\t$lPatterns[] = '/'\n\t\t\t. '(?P<coord_name1>[sewn])?\\s*'\n\t\t\t. '(?P<degs>[+-]?\\d+(\\.(\\d)*)?)\\s*' . $lDegSymbol .'\\s*'\n\t\t\t. '((?P<minutes>(\\d)+(\\.(\\d)*)?)\\s*' . $lMinSymbol . ')\\s*' \n\t\t\t. '((?P<seconds>(\\d)+(\\.(\\d)*)?)\\s*' . $lSecondsSymbol . ')\\s*'\n\t\t\t. '(?P<coord_name2>[sewn])?' \n\t\t\t. '/iu';//1.Example 1: “36° 31' 21.4\" N (DMS)\n\t\t$lPatterns[] = '/'\n\t\t\t. '(?P<coord_name1>[sewn])?\\s*'\n\t\t\t. '(?P<degs>[+-]?\\d+(\\.(\\d)*)?)\\s*' . $lDegSymbol .'\\s*'\n\t\t\t. '((?P<minutes>(\\d)+(\\.(\\d)*)?)\\s*' . $lMinSymbol . ')\\s*' \n\t\t\t. '(?P<seconds>(\\d)+(\\.(\\d)*)?)\\s*'\n\t\t\t. '(?P<coord_name2>[sewn])?' \n\t\t\t. '/iu';//1.Example 1: “36° 31' 21.4 N (DMS)\n\t\t$lPatterns[] = '/'\n\t\t\t. '(?P<coord_name1>[sewn])?\\s*'\n\t\t\t. '(?P<degs>[+-]?\\d+(\\.(\\d)*)?)\\s*' . $lDegSymbol .'\\s*'\n\t\t\t. '((?P<minutes>(\\d)+(\\.(\\d)*)?)\\s*' . $lMinSymbol . ')\\s*' \n\t\t\t. '(?P<coord_name2>[sewn])?' \n\t\t\t. '/iu';//1.Example 1: “36° 31.5' N (DM)\n\t\t$lPatterns[] = '/'\n\t\t\t. '(?P<coord_name1>[sewn])?\\s*'\n\t\t\t. '(?P<degs>[+-]?\\d+(\\.(\\d)*)?)\\s*' . $lDegSymbol .'\\s*'\n\t\t\t. '((?P<minutes>(\\d)+(\\.(\\d)*)?))\\s*' \n\t\t\t. '(?P<coord_name2>[sewn])?' \n\t\t\t. '/iu';//1.Example 1: “36° 31.5N (DM)\n\t\t$lPatterns[] = '/'\n\t\t\t. '(?P<coord_name1>[sewn])?\\s*'\n\t\t\t. '(?P<degs>[+-]?\\d+(\\.(\\d)*)?)\\s*' . $lDegSymbol .'\\s*'\n\t\t\t. '(?P<coord_name2>[sewn])?' \n\t\t\t. '/iu';//1.Example 1: “36.3° N (D)\n\t\t$lPatterns[] = '/'\n\t\t\t. '(?P<coord_name1>[sewn])?\\s*'\n\t\t\t. '(?P<degs>[+-]?\\d+(\\.(\\d)*)?)\\s*'\n\t\t\t. '(?P<coord_name2>[sewn])?' \n\t\t\t. '/iu';//1.Example 1: “36.3 N (D)\n\t\t\n\t\t\n\t\t//~ $lPattern = '/'\n\t\t\t//~ . '(?P<coord_name1>[sewn])?\\s*'\n\t\t\t//~ . '(?P<degs>[+-]?\\d+?(\\.(\\d)*)?)\\s*' . $lDegSymbol .'\\s*'\n\t\t\t//~ . '((?P<minutes>(\\d)+?(\\.(\\d)*)?)\\s*' . $lMinSymbol . ')?\\s*' \n\t\t\t//~ . '((?P<seconds>(\\d)+?(\\.(\\d)*)?)\\s*)?\\s*'\n\t\t\t//~ . '(?P<coord_name2>[sewn])?' \n\t\t\t//~ . '/iu';\n\t\t/**\n\t\t\tГорния паттерн хваща следните формати (хваща и случаите когато полукълбото е отпред)\n\t\t\t1.Example 1: “36° 31' 21.4\" N; 114° 09' 50.6\" W“ (DMS)\n\t\t\t2. Example 2: “36° 31.4566’N; 114° 09.8433’W” (DDM)\n\t\t\t3. Example 3: “36.524276° S; 114.164055° W” (DD)\n\t\t*/\n\t\tforeach( $lPatterns as $lPattern ){\t\t\t\n\t\t\tif( preg_match( $lPattern, $pCoordString, $lCoordData )){\n\t\t\t\t//~ echo 1;\n\t\t\t\t//~ var_dump($lPattern);\n\t\t\t\t//~ var_dump($pCoordString);\n\t\t\t\t//~ echo '<br/>';\n\t\t\t\t$lHemisphere = $lCoordData['coord_name1'];\n\t\t\t\tif( $lHemisphere == '' )\n\t\t\t\t\t$lHemisphere = $lCoordData['coord_name2'];\n\t\t\t\t$lDeg = (float)$lCoordData['degs'];\n\t\t\t\t$lMin = (float)$lCoordData['minutes'];\t\t\t\n\t\t\t\t$lSec = (float)$lCoordData['seconds'];\n\t\t\t\t$lHemisphere = mb_strtolower($lHemisphere);\n\t\t\t\t$lCoordIsLatitude = -1;\n\t\t\t\tif( $lHemisphere != '' ){//Имаме полукълбо\n\t\t\t\t\t$lCoordIsLatitude = false;//Координатата e longitude\n\t\t\t\t\tif( $lHemisphere == 's' || $lHemisphere == 'n' )//Координатата е latitude\n\t\t\t\t\t\t$lCoordIsLatitude = true;\n\t\t\t\t\tif( $lHemisphere == 's' || $lHemisphere == 'w' )//обръщаме резултата понеже е в обратното полукълбо\n\t\t\t\t\t\t$lDeg = - $lDeg;\n\t\t\t\t}\n\t\t\t\t$lDDCoord = $this->ConvertCoordinatesToDD($lDeg, $lMin, $lSec);\t\n\t\t\t\treturn array('coord' => (float)$lDDCoord, 'is_latitude' => $lCoordIsLatitude);\n\t\t\t}\t\n\t\t}\t\t\t\n\t\t/**\n\t\t\tХващаме случая когато работим с DD (decimal degrees); \n\t\t\tExample 4: “−36.524276; −114.164055“ \n\t\t*/\t\t\n\t\treturn array('coord' => (float) $pCoordString, 'is_latitude' => -1);\t\t\n\t}", "private function parse($input) {\n $source= \"BEGIN:VCALENDAR\\r\\n\".preg_replace('/\\n\\s+/', \"\\r\\n\", trim($input)).\"\\r\\nEND:VCALENDAR\\r\\n\";\n return $calendar= (new ICalendar())->read($source)->timezones()[0];\n }", "public function initParser(string $str)\n {\n $this->result = [];\n\n $str = str_replace(' ', '', $str);\n $str = preg_replace('/(\\d+)(\\*)(i)/', '\\\\1\\\\3', $str);\n $this->toParse = $str;\n }", "public function getSQLIntervalString($startEpoch, $endEpoch);", "function evaluateQuantifier ($quantifier, &$pos, &$min, &$max) {\n\t\t$min=1;\n\t\t$max=1;\n\t\tif (!$quantifier[$pos+1]) { return; }\n\t\tif (strpos (' *?+{',$quantifier[$pos+1])) {\n\t\t\tswitch ($quantifier[$pos+1]) {\n\t\t\t\tcase '*':\n\t\t\t\t\t$min = 0;\n\t\t\t\t\t$max = 999;\t // Indefinately\n\t\t\t\t\tbreak;\n\t\t\t\tcase '?':\n\t\t\t\t\t$min = 0;\n\t\t\t\t\t$max = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\t$min = 1;\n\t\t\t\t\t$max = 999; // Indefinately\n\t\t\t\t\tbreak;\n\t\t\t\tcase '{':\t\t// Quantifier enclosed in curly braces\n\t\t\t\t\t$pos++;\n\t\t\t\t\tunset ($str);\n\t\t\t\t\t\t// Parse the first value\n\t\t\t\t\twhile ($quantifier[$pos+1] != '}' && $quantifier[$pos+1] != '-' && $pos<strlen ($quantifier)) {\n\t\t\t\t\t\t$str .= $quantifier[$pos+1];\n\t\t\t\t\t\t$pos++;\n\t\t\t\t\t}\n\t\t\t\t\t$min = intval ($str);\n\t\t\t\t\t$max = $min;\n\t\t\t\t\tif ($quantifier[$pos+1] == '-') {\n\t\t\t\t\t\t$pos++;\n\t\t\t\t\t\tif ($quantifier[$pos+1] == '}') {\n\t\t\t\t\t\t\t\t// No second value (upper range), so assume indefinately\n\t\t\t\t\t\t\t$max = 999;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// Parse the upper range value\n\t\t\t\t\t\t\tunset ($str);\n\t\t\t\t\t\t\twhile ($quantifier[$pos+1] != '}' && $pos<strlen ($quantifier)) {\n\t\t\t\t\t\t\t\t$str .= $quantifier[$pos+1];\n\t\t\t\t\t\t\t\t$pos++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$max = intval ($str);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($quantifier[$pos+1] != '}') { debug ('Parse error! Expected \\'}\\' at this point'); }\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tdebug ('Parse error! Unexpected token: \\''.$quantifier[$pos+1].'\\''); $ok = 0;\n\t\t\t}\n\t\t}\n\t}", "static function getIntervalTypeRange ()\r\n\t{\r\n\t\treturn array('d'=>__('days'),'m'=>__('months'),'r'=>__('years'));\r\n\t}", "public static function parse(string $string)\n {\n if (!preg_match('/^[-]?\\d+\\.\\.[-]?\\d+$/', $string)) {\n throw new invalidArgumentException(\"Couldn't parse the string \\\"$string\\\"\");\n }\n\n [$start, $end] = explode('..', $string);\n\n return new static((int) $start, (int) $end);\n }", "function str_between($string, $sub_start, $sub_end) {\n\t$str1 = explode($sub_start, $string);\n\t$str2 = explode($sub_end, $str1[1]);\n\treturn trim($str2[0]);\n}", "function parse_components(string $string) : array\n{\n if (!is_valid($string)) {\n throw InvalidStringRepresentationException::with($string);\n }\n\n $build = explode('+', $string, 2);\n $string = array_shift($build);\n $build = array_pop($build);\n\n if (null !== $build) {\n $build = explode('.', $build);\n } else {\n $build = [];\n }\n\n $pre = explode('-', $string, 2);\n $string = array_shift($pre);\n $pre = array_pop($pre);\n\n if (null !== $pre) {\n $pre = explode('.', $pre);\n } else {\n $pre = [];\n }\n\n $number = explode('.', $string);\n\n return [\n 'major' => (int) $number[0],\n 'minor' => (int) $number[1],\n 'patch' => (int) $number[2],\n 'pre-release' => $pre,\n 'build' => $build\n ];\n}", "public static function parseTime(\r\n\t\t$string)\r\n\t{\r\n\t\tif(false !== ($ts = strtotime('1970-01-01 ' . $string . '+0'))){\r\n\t\t\treturn $ts;\r\n\t\t}\r\n\r\n\t\t$parts = explode(':', $string);\r\n\t\tif(count($parts) < 2){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn (((int) $parts[0] * 60) + (int) $parts[1]) * 60;\r\n\t}", "public function parseString($config);", "function getInbetweenStrings($start, $end, $str){\n $matches = array();\n $regex = \"/$start([a-zA-Z0-9_@]*)$end/\";\n preg_match_all($regex, $str, $matches);\n return $matches[1];\n}", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "function getParseString($str) {\r\n\t\t$arr_n = array();\r\n\t\t$arr = explode(\"BEGIN:VEVENT\",$str);\r\n\t\t$addfield = '';\r\n\t\t$inFlowtext = false;\r\n\r\n\t\tfor($x=1;$x<sizeof($arr);$x++) {\r\n\r\n\t\t\t$arr_n[$x]['location'] = ''; // Syncom\r\n\t\t\t$arr_n[$x]['last-modified'] = ''; // Syncom\r\n\t\t\t$arr_n[$x]['url'] = ''; // Syncom\r\n\t\t\t$arr_n[$x]['dtstamp'] = ''; // Syncom\r\n\t\t\t$arr_n[$x]['created'] = ''; // Syncom\r\n\r\n\t\t\t$arr2 = explode(\"\\n\",$arr[$x]);\r\n\t\t\tfor($y=1;$y<sizeof($arr2);$y++) {\r\n\t\t\t\t$mas = explode(\":\",$arr2[$y]);\r\n\t\t\t\t$mas_ = explode(\";\",$mas[0]);\r\n\t\t\t\tif(isset($mas_[0]))\r\n\t\t\t\t\t$mas[0] = $mas_[0];\r\n\r\n\t\t\t\tif (sizeof($mas_) < 2)\r\n\t\t\t\t\t$mas_ = array($mas[0], '');\r\n\r\n\t\t\t\tswitch(trim($mas[0])) {\r\n\t\t\t\t\tcase \"DTSTART\":\r\n\t\t\t\t\t\t$arr_n[$x]['start_date'] = $this->getMySQLDate($mas[1], $mas_[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"DTEND\":\r\n\t\t\t\t\t\t$arr_n[$x]['end_date'] = $this->getMySQLDate($mas[1], $mas_[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"RRULE\":\r\n\t\t\t\t\t\t$rrule = explode(\";\", $mas[1]);\r\n\t\t\t\t\t\tfor($z=0;$z<sizeof($rrule);$z++) {\r\n\t\t\t\t\t\t\t$rrule_n = explode(\"=\", $rrule[$z]);\r\n\t\t\t\t\t\t\tswitch($rrule_n[0]) {\r\n\t\t\t\t\t\t\t\tcase \"FREQ\":\r\n\t\t\t\t\t\t\t\t\t$arr_n[$x]['type'] = $this->getConvertType($rrule_n[1], true);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase \"INTERVAL\":\r\n\t\t\t\t\t\t\t\t\t$arr_n[$x]['count'] = $rrule_n[1];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase \"COUNT\":\r\n\t\t\t\t\t\t\t\t\t$arr_n[$x]['extra'] = $rrule_n[1];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase \"BYDAY\":\r\n\t\t\t\t\t\t\t\t\t$bayday = explode(\",\",$rrule_n[1]);\r\n\t\t\t\t\t\t\t\t\tif(sizeof($bayday) == 1) {\r\n\t\t\t\t\t\t\t\t\t\tif(strlen(trim($bayday[0])) == 3) {\r\n\t\t\t\t\t\t\t\t\t\t\t$arr_n[$x]['day'] = substr($bayday[0], 0, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t$arr_n[$x]['counts'] = $this->getConvertDay(substr($bayday[0], 1, 2), true);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t$arr_n[$x]['days'] = $this->getConvertDay($bayday[0], true);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t$arr_n[$x]['days'] = \"\";\r\n\t\t\t\t\t\t\t\t\t\tfor($nx=0;$nx<sizeof($bayday);$nx++) {\r\n\t\t\t\t\t\t\t\t\t\t\t$arr_n[$x]['days'] .= $this->getConvertDay($bayday[$nx], true);\r\n\t\t\t\t\t\t\t\t\t\t\tif($nx != sizeof($bayday)-1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t$arr_n[$x]['days'] .= \",\";\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}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase \"UNTIL\":\r\n\t\t\t\t\t\t\t\t\t$arr_n[$x]['until'] = $this->getMySQLDate($rrule_n[1], $mas_[1]);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"EXDATE\":\r\n\t\t\t\t\t\t$exdate = explode(\",\",trim($mas[1]));\r\n\t\t\t\t\t\tif(sizeof($exdate) == 1) {\r\n\t\t\t\t\t\t\t$arr_n[$x]['exdate'] = $this->getMySQLDate($exdate[0], $mas_[1]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tfor($nx=0;$nx<sizeof($exdate);$nx++) {\r\n\t\t\t\t\t\t\t\t$arr_n[$x]['exdate'][$nx] = $this->getMySQLDate($exdate[$nx], $mas_[1]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"RECURRENCE-ID\":\r\n\t\t\t\t\t\t$arr_n[$x]['rec_id'] = $this->getMySQLDate($mas[1], $mas_[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"UID\":\r\n\t\t\t\t\t\t//$arr_n[$x]['event_id'] = $x;\r\n\t\t\t\t\t\t$arr_n[$x]['event_id'] = trim($mas[1]);\r\n\t\t\t\t\t\t$arr_n[$x]['uid'] = trim($mas[1]); // Syncom\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t// Syncom - Start\r\n\t\t\t\t\tcase \"DESCRIPTION\":\r\n\t\t\t\t\t\t//$arr_n[$x]['description'] = trim($mas[1]);\r\n\t\t\t\t\t\t$arr_n[$x]['description'] = trim(substr($arr2[$y], 12));\r\n\t\t\t\t\t\t$addfield = 'description';\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"LOCATION\":\r\n\t\t\t\t\t\t$arr_n[$x]['location'] = trim($mas[1]);\r\n\t\t\t\t\t\t$addfield = 'location';\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"LAST-MODIFIED\":\r\n\t\t\t\t\t\t$arr_n[$x]['last-modified'] = $this->getMySQLDate($mas[1], $mas_[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"SEQUENCE\":\r\n\t\t\t\t\t\t$arr_n[$x]['sequence'] = trim($mas[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"STATUS\":\r\n\t\t\t\t\t\t$arr_n[$x]['status'] = trim($mas[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"TRANSP\":\r\n\t\t\t\t\t\t$arr_n[$x]['transp'] = trim($mas[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"URL\":\r\n\t\t\t\t\t\t$arr_n[$x]['url'] = trim(substr($arr2[$y], 4));\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"DTSTAMP\":\r\n\t\t\t\t\t\t$arr_n[$x]['dtstamp'] = $this->getMySQLDate($mas[1], $mas_[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"CREATED\":\r\n\t\t\t\t\t\t$arr_n[$x]['created'] = $this->getMySQLDate($mas[1], $mas_[1]);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"END\":\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"X-APPLE-NEEDS-REPLY\":\r\n\t\t\t\t\t\t$arr_n[$x]['x-apple-needs-reply'] = trim($mas[1]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t// Syncom - End\r\n\r\n\t\t\t\t\tcase \"SUMMARY\":\r\n\t\t\t\t\t\t//$arr_n[$x]['text'] = trim($mas[1]);\r\n\t\t\t\t\t\t$arr_n[$x]['text'] = trim(substr($arr2[$y], 8));\r\n\t\t\t\t\t\t$addfield = 'text';\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault: // Syncom\r\n\t\t\t\t\t\t//print_r($mas);\r\n\t\t\t\t\t\t//echo $arr2[$y].\"\\n\";\r\n\t\t\t\t\t\t//die('');\r\n\t\t\t\t\t\t$inFlowtext = true; // Syncom\r\n\t\t\t\t\t\tif (($addfield != '') and (substr($arr2[$y], 0, 1) == ' ')) // Syncom\r\n\t\t\t\t\t\t\t@$arr_n[$x][$addfield] .= substr(str_replace(array(\"\\r\"), array(''), $arr2[$y]), 1); // Syncom\r\n\r\n\t\t\t\t\t\tbreak; // Syncom\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!$inFlowtext) // Syncom\r\n\t\t\t\t$addfield = ''; // Syncom\r\n\r\n\t\t\tif(isset($arr_n[$x]['rec_id'])){\r\n\t\t\t\t$arr_n[$x]['event_pid'] = $arr_n[$x]['event_id'];\r\n\t\t\t}\r\n\t\t\tif(isset($arr_n[$x]['exdate'])){\r\n\t\t\t\t$arr_n[$x]['event_pid'] = $arr_n[$x]['event_id'];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $arr_n;\r\n\t}", "public function parse(string $content);", "private function parseTime($str){\n\t preg_match(\"/([0-2][0-9]):([0-5][0-9])( (\\d\\d)-(\\d\\d)-(\\d\\d))?/\",$str,$match);\n\t $h = $match[1];\n\t $i = $match[2];\n\t \n\t $d = date(\"d\");\n\t $m = date(\"m\");\n\t $y = date(\"y\");\n\t if(isset($match[3])){\n\t $d = $match[4];\n\t $m = $match[5];\n\t $y = $match[6];\n\t }\n\t $y = \"20\".$y;\n\t return mktime($h,$i,0,$m,$d,$y);\n }", "public function sub($interval) {\n\t\tif (!is_string($interval)) {\n\t\t\tparent::sub($interval);\n\t\t}\n\t\telse {\n\t\t\t$this->modify(\"-{$interval}\");\n\t\t}\n\t}", "public function in_range($str, $field)\n {\n $_range = explode('-', $field);\n $_low = isset($_range[0]) ? (float) $_range[0] : null;\n $_high = isset($_range[1]) ? (float) $_range[1] : null;\n\n if (is_null($_low) || is_null($_high)) {\n return true;\n }\n\n if ((float) $str >= $_low && (float) $str <= $_high) {\n\n return true;\n\n } else {\n\n if (!array_key_exists('in_range', $this->_error_messages)) {\n $this->set_message('in_range', lang('fv_in_range_field'));\n }\n\n return false;\n }\n }", "function ig_es_get_human_interval( $interval_in_seconds = 0 ) {\n\n\t\t$interval = ig_es_get_raw_human_interval( $interval_in_seconds );\n\n\t\t$human_time = '';\n\n\t\tif ( $interval['days'] > 0 ) {\n\t\t\t$human_time .= $interval['days'] . 'd ';\n\t\t}\n\n\t\tif ( $interval['hours'] > 0 ) {\n\t\t\t$human_time .= $interval['hours'] . 'h ';\n\t\t}\n\n\t\tif ( $interval['minutes'] > 0 ) {\n\t\t\t$human_time .= $interval['minutes'] . 'm ';\n\t\t}\n\n\t\tif ( $interval['seconds'] > 0 ) {\n\t\t\t$human_time .= $interval['seconds'] . 's ';\n\t\t}\n\n\t\tif ( empty( $human_time ) ) {\n\t\t\t$human_time = '0s';\n\t\t}\n\n\t\treturn trim( $human_time );\n\n\t}", "public function extractMin($time) {\n \t$start = 0;\n \t$min = \"\";\n\t$time = preg_split('//', $time, -1, PREG_SPLIT_NO_EMPTY); // split string into array\n foreach ($time as $i) {\n\t if ($start==1) {\n\t $min = $min.$i;\n\t }\n\t if ($i == \":\") {\n\t $start = 1;\n\t }\n\t}\n\treturn $min;\n }", "protected function parseHourlyRange($salary = [], $input = null)\n {\n preg_replace_callback(\"/(.\\d+.\\d+)\\s.\\s(.\\d+.\\d+)/\", function ($matches) use (&$salary) {\n $salary['min'] = $matches[1];\n $salary['max'] = $matches[2];\n }, $input);\n\n return $salary;\n }", "function convertRealTimeToMinutes($inp){\r\n\t\t//mixed sscanf ( string $str , string $format [, mixed &$... ] )\r\n\t\tsscanf($inp, \"%d:%d\", $hours, $minutes);\r\n\t\t$time_hours = $hours * 60;\r\n\t\t$time_minutes = $minutes;\r\n\t\t$totalStarting = $time_hours + $time_minutes;\r\n\t\treturn $totalStarting;\r\n\t}", "public function parseMeetingPeriod($meetingPeriod)\n\t{\n\t\t// Determine the meeting period\n\t\tswitch (strlen($meetingPeriod)) {\n\t\t\tcase 4:\n\t\t\t\t// Check to see if we are in a double block of \"E\" periods.\n\t\t\t\tif (substr($meetingPeriod, 0, 1) == 'E')\n\t\t\t\t{ // We know we have an \"E\" period range\n\t\t\t\t\t$period = substr($meetingPeriod, 0, 2);\n\t\t\t\t}\n\t\t\t\telse if (substr($meetingPeriod, 1, 1) != '-')\n\t\t\t\t{ // We know that we have a double digit period going to \"E\". E.g. 11E1 (11-E1)\n\t\t\t\t\t$period = substr($meetingPeriod, 0, 2);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ // We are still in the normal integer periods\n\t\t\t\t\t$period = substr($meetingPeriod, 0, 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t// We know that we have a range of periods, E.g. 7-8. Grab the first period\n\t\t\t\t// in the range\n\t\t\t\t$period = substr($meetingPeriod, 0, 1);\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t // We know that we have a singular, double-digit integer period, E.g. 11\n\t\t\t\t$period = substr($meetingPeriod, 0, 2);\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\t// We know that we have a singular, one-digit integer period\n\t\t\t\t$period = substr($meetingPeriod, 0, 1);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Something went wrong\n\t\t\t\t$period = null;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $period;\n\t}", "public static function parseRange($query)\n {\n $regEx = '/\\[([^\\]]+)\\s+TO\\s+([^\\]]+)\\]/';\n if (!preg_match($regEx, $query, $matches)) {\n return false;\n }\n return array('from' => trim($matches[1]), 'to' => trim($matches[2]));\n }", "function extract_unit($string, $start, $end){\n $pos = strripos($string, $start);\n $str = substr($string, $pos);\n $str_two = substr($str, strlen($start));\n $second_pos = strripos($str_two, $end);\n $str_three = substr($str_two, 0, $second_pos);\n $unit = trim($str_three);\n return $unit;\n }", "public function prepare_interval( $values, $format = '%s', $operator = 'IN' ) {\n\t\t$values = Tribe__Utils__Array::list_to_array( $values );\n\n\t\t$prepared = array();\n\t\tforeach ( $values as $value ) {\n\t\t\t$prepared[] = $this->prepare_value( $value, $format );\n\t\t}\n\n\t\treturn in_array( $operator, array( 'BETWEEN', 'NOT BETWEEN' ) )\n\t\t\t? sprintf( '%s AND %s', $prepared[0], $prepared[1] )\n\t\t\t: sprintf( '(%s)', implode( ',', $prepared ) );\n\t}", "protected function parse()\n {\n $timeStr = preg_replace(\"/[^0-9:\\-\\n]/\", \"\", $this->readFile());\n $timeRows = explode(\"\\n\", $timeStr);\n\n return $this->getTimeRowsAsDateTime($timeRows, '-');\n }", "private function evaluate_range($range)\n {\n $ranges = explode(\":\", $range);\n if (sizeof($ranges) != 2)\n throw new Exception(\"Cannot give a range with more then one colon! range: \" . print_r($ranges, true));\n \n $left = $this->handleCellTags($ranges[0], self::EVALUATION_RANGE_BEGINNING);\n $right = $this->handleCellTags($ranges[1], self::EVALUATION_RANGE_END);\n \n $answer = \"(\";\n $answer .= $left;\n $answer .= \":\" . $right;\n $answer .= \")\";\n return $answer;\n }", "public static function parseDayExpression(string $expression): array\n {\n $interval = [];\n\n $parts = preg_split('/,\\s*/', $expression);\n foreach ($parts as $part) {\n $interval = array_merge($interval, static::parsePartialExpression($part));\n }\n\n return $interval;\n }", "public static function between($string, $start_str, $end_str) {\n\t\t$str1 = explode($start_str, $string);\n\t\t$str2 = explode($end_str, $str1[1]);\n\t\treturn trim($str2[0]);\n\t}", "function toSeconds($text)\n\t{\n\t\tif (is_numeric($text)) return $text;\n\t\t$text = strtotime('+' . ltrim($text, '+-'), 0);\n\t\treturn $text > 0 ? $text : null;\n\t}", "public function interval($interval = null)\r\n {\r\n\r\n if (is_null($interval))\r\n return $this->interval;\r\n $this->interval = (integer) $interval;\r\n return $this;\r\n }", "function hoursToSecods ($hour) {\n\n $parse = array();\n if (!preg_match ('#^(?<hours>[\\d]{2}):(?<mins>[\\d]{2}):(?<secs>[\\d]{2})$#',$hour,$parse)) {\n // Throw error, exception, etc\n throw new RuntimeException (\"Hour Format not valid\");\n }\n\n return (int) $parse['hours'] * 3600 + (int) $parse['mins'] * 60 + (int) $parse['secs'];\n\n}" ]
[ "0.7279617", "0.6553945", "0.633563", "0.63328326", "0.6067124", "0.60508084", "0.59489435", "0.59366065", "0.5857498", "0.5777887", "0.5745532", "0.56518567", "0.5597374", "0.5582767", "0.544582", "0.5423506", "0.54221326", "0.5326376", "0.5214018", "0.51989055", "0.5198703", "0.5191091", "0.5191091", "0.518708", "0.5180316", "0.51772535", "0.5149457", "0.5149419", "0.51374054", "0.51270336", "0.51195693", "0.5108623", "0.5094259", "0.50877684", "0.5087668", "0.5067206", "0.50638765", "0.50593275", "0.5034961", "0.5034174", "0.5024959", "0.49693605", "0.49613068", "0.49351594", "0.4926921", "0.4926495", "0.49113104", "0.49060538", "0.49029317", "0.4901607", "0.48974165", "0.4895453", "0.48709583", "0.48450533", "0.48389074", "0.4835507", "0.4830229", "0.48292863", "0.482596", "0.48066512", "0.47948372", "0.47898027", "0.47644457", "0.4747864", "0.4727606", "0.47266522", "0.4725033", "0.4721698", "0.4720606", "0.47137743", "0.4706232", "0.47043616", "0.46810892", "0.46689233", "0.4658849", "0.46336266", "0.46336266", "0.46336266", "0.46336266", "0.46336266", "0.46262994", "0.45922711", "0.45900324", "0.45869905", "0.45854113", "0.45851636", "0.45850083", "0.45753622", "0.45742714", "0.4570217", "0.45686677", "0.45603406", "0.4543268", "0.45390508", "0.45382908", "0.45370853", "0.4535699", "0.45261657", "0.45228693", "0.45123968" ]
0.7112642
1
Set the cache reset flag.
Установите флаг сброса кэша.
public function setResetCache($resetCache);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetCache();", "public function resetCache();", "public function resetEnableCache()\n {\n $this->cacheEnabled = $this->lastCacheEnabled;\n }", "public function resetCache()\n {\n }", "public function shouldResetCache();", "public function reset()\n {\n $this->cache = array();\n }", "function __resetCache($reset = null) {\n\t\tstatic $cache = array();\n\t\tif (!$cache && $reset === true) {\n\t\t\t$cache = true;\t\n\t\t}\n\t\treturn $cache;\n\t}", "public function resetCache()\n {\n Magento_PHPUnit_BackendCache_Memory::cleanById();\n self::$_previousLoadedHash = null;\n }", "function reset_cache( $group = '0', $force = false ) {\n\t\t\tif ( true === $force ) {\n\t\t\t\t$this->xl_core_cache = array();\n\t\t\t} elseif ( isset( $this->xl_core_cache[ $group ] ) ) {\n\t\t\t\t$this->xl_core_cache[ $group ] = array();\n\t\t\t}\n\t\t}", "public function reset()\n {\n $this->byteCodeCache = null;\n }", "public function reset_cache() {\n\t\tAvada()->dynamic_css->reset_all_caches();\n\t}", "protected function _resetCacheAuto()\n {\n $hash = $this->_getHash();\n if (self::$_previousLoadedHash != $hash) {\n $this->resetCache();\n self::$_previousLoadedHash = $hash;\n }\n }", "function reset() {}", "function reset() {}", "public function reset_counters() {\n\t\t$this->clean_cache_hits = 0;\n\t\t$this->dirty_cache_hits = 0;\n\t\t$this->cache_misses = 0;\t\t\n\t}", "function wp_cache_reset()\n{\n}", "public function reset()\n {\n Redis::del($this->cacheKey());\n }", "public static function reset();", "public function reset() :bool;", "private static function cache_set($recache = FALSE)\n\t{\n\t\t$checksum = \"\";\n\t\t$cached_mod_time = 0;\n\t\t\n\t\tif(self::$flags != null)\n\t\t{\n\t\t\t$checksum = \"-\" . implode(\"_\", array_keys(self::$flags));\n\t\t}\n\n\t\t# Determine the name of the cache file\n\t\tself::$cached_file = join_path(CACHEPATH,preg_replace('#(.+)(\\.css)$#i', \"$1{$checksum}$2\", self::config('core.request.relative_file')));\n\n\t\t# Check to see if we should delete the cache file\n\t\tif($recache === true && file_exists(self::$cached_file))\n\t\t{\n\t\t\t# Empty out the cache\n\t\t\tself::cache_clear();\n\t\t}\n\t\telseif(file_exists(self::$cached_file))\n\t\t{\n\t\t\t# When was the cache last modified\n\t\t\t$cached_mod_time = (int) filemtime(self::$cached_file);\n\t\t}\n\t\t\n\t\tself::config_set('core.cache.mod_time', $cached_mod_time);\n\t}", "public function setAutoReset($reset)\n {\n $this->_autoReset = $reset;\n }", "public function invalidateCache(): void\n {\n self::$m = [];\n }", "public function stop_cache ()\n {\n $this->ar_caching = FALSE;\n }", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "function object_cache_reset() {\r\n\tglobal $ts_object_cache;\r\n\t\r\n\treturn $ts_object_cache->reset ();\r\n}", "public function stop_cache() {\n $this->ar_caching = FALSE;\n }", "public static function reset_cache()\n\t\t{\n\t\t\tself::$tax_class_cache = array();\n\t\t\tself::$_customer_context = null;\n\t\t\tself::$_tax_exempt = false;\n\t\t\tself::$shipping_tax_class = null;\n\t\t}", "abstract function reset();", "public function reset()\n {\n $this->values[self::FLAG] = null;\n }", "public function reset()\n\t{\n\t\t$this->saveToCache($this->scanFeatures());\n\t}", "public function setCaching(bool $caching): void\n {\n $this->caching = $caching;\n }", "public function reset() : void;", "public function setUseCache( $yesNo )\n\t{\n\t\t$this->flushCache();\n\n\t\t$this->flagUseCache = (bool) $yesNo;\n\t}", "public function setUseCache( $yesNo )\n\t{\n\t\t$this->flushCache();\n\n\t\t$this->flagUseCache = (bool) $yesNo;\n\t}", "protected function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "protected abstract function reset();", "public function invalidate_caches()\n {\n $this->cached_layers_deep = null;\n $this->updated_at = null;\n $this->created_at = null;\n }", "function reset()\n {\n }", "public static function reset(){\n\t\tself::$_cache = array('environment'=>'','merchantId'=>'','publicKey'=>'','privateKey'=>'','clientsideKey'=>'');\n\t}", "function reset() {\n }", "public function reset(): void;", "public abstract function reset();", "public static function reset_caches() {\n cache_helper::purge_by_event('resettagindexbuilder');\n }", "function reset() ;", "function reset();", "static public function reset() {}", "public function scheduleCacheClear()\n {\n $this->clearCache = true;\n }", "static public function reset();", "public function reset_cache_incrementor() {\n\t\tbp_core_reset_incrementor( 'hgbp' );\n\t}", "public static function set_caching($bool)\n\t{\n\t\tself::$DB->set_caching($bool);\n\t}", "public function noCache() {\r\n\t\t \r\n\t\t $this->_enable_caching = false;\r\n\t }", "public function testSetCache()\n {\n // Remove the following lines when you implement this test.\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "function reset(){\n\t}", "public function reset() {\n\t}", "public function disableCache ()\n {\n $this->caching = false;\n }", "public function setResetHitCount($is_reset)\n {\n if ($is_reset) {\n $this->hit_count = 0;\n }\n }", "public function disableCache()\n {\n $this->lastCacheEnabled = $this->cacheEnabled;\n $this->cacheEnabled = false;\n }", "public static function reset(): void\n {\n }", "function _flag_clear_cache() {\n if (module_exists('views')) {\n views_invalidate_cache();\n }\n // Reset our flags cache, thereby making the following code aware of the\n // modifications.\n flag_get_flags(NULL, NULL, NULL, TRUE);\n // The title of a flag may appear in the menu (indirectly, via our \"default\n // views\"), so we need to clear the menu cache. This call also clears the\n // page cache, which is desirable too because the flag labels may have\n // changed.\n menu_rebuild();\n}", "public function reset(): void\n {\n $this->enabled = $this->enabledDefault;\n }", "public function reset(){ }", "public function invalidate()\n {\n $this->cache = null;\n }", "public function setCache($cache_objects)\r\n {\r\n $this->cache = (bool)$cache_objects;\r\n }" ]
[ "0.76884556", "0.76884556", "0.75416726", "0.7502098", "0.7355579", "0.70681876", "0.687162", "0.6729418", "0.66351056", "0.66285634", "0.66241884", "0.65304047", "0.6504155", "0.6504155", "0.6435593", "0.63665026", "0.63504404", "0.632219", "0.63010645", "0.6294903", "0.62924165", "0.6290434", "0.62803537", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6279714", "0.6270378", "0.62520415", "0.6248241", "0.6242015", "0.6239952", "0.6226325", "0.6217257", "0.62072206", "0.6194791", "0.6194791", "0.6190035", "0.6186033", "0.6186033", "0.6186033", "0.6186033", "0.6186033", "0.6185906", "0.6185497", "0.61846375", "0.6184135", "0.6182747", "0.61809176", "0.6174706", "0.61745685", "0.6170743", "0.614517", "0.6119938", "0.6118575", "0.611724", "0.6115319", "0.61059695", "0.6103424", "0.60973936", "0.6085565", "0.60830796", "0.6068225", "0.6059575", "0.60529524", "0.60470414", "0.60455215", "0.60418373", "0.60327375", "0.60306233", "0.60235846", "0.6023401", "0.6016219" ]
0.81999993
0
Should we reset the cache on this request?
Нужно ли сбросить кэш на этом запросе?
public function resetCache();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shouldResetCache();", "public function resetCache()\n {\n }", "protected function refreshCache()\n {\n if ($this->request->isNoCache() && $this->responseIsCached()) {\n $this->app['cache']->forget($this->cacheKey);\n }\n }", "public function clearCache() {}", "public function clearCache() {}", "abstract public function clearCache();", "public function resetCache()\n {\n Magento_PHPUnit_BackendCache_Memory::cleanById();\n self::$_previousLoadedHash = null;\n }", "function flushCache() {\n\t}", "function illuminate_forget_cache() {\n if (class_exists('\\Cache')) {\n \\Cache::flush();\n }\n}", "public static function prevent_caching()\n {\n }", "public function flush_cache();", "public function clean_cache();", "function elgg_invalidate_simplecache() {\n\t_elgg_services()->simpleCache->invalidate();\n}", "public function clearCache(): void;", "protected function should_use_cache()\n {\n }", "public function clearCache()\n {\n return true;\n }", "public function clearCache()\n {\n return true;\n }", "public function cacheRegenerate()\n\t{\n\t\tif($this->user_id) {\n\t\t\t$this->user->cacheUpdate();\n\t\t}\n\t\tif($this->account_id) {\n\t\t\t$this->account->cacheUpdate();\n\t\t}\n\t}", "public function clearCache()\n {\n $this->loaded = false;\n $this->all = array();\n }", "public function resetEnableCache()\n {\n $this->cacheEnabled = $this->lastCacheEnabled;\n }", "protected function clearCacheOnError() {}", "protected function disableCache() {}", "public static function avoidCache()\r\n {\r\n self::$avoidCache = true;\r\n }", "function nocache() {\n $this->info['cache'] = false;\n }", "public function reset()\n {\n $this->cache = array();\n }", "protected function bustCache()\n {\n Cache::forget(static::SESSION_ID_CACHE_KEY);\n Cache::forget(static::AUTH_CACHE_KEY);\n Cache::forget(static::LOGIN_CACHE_KEY);\n }", "public function flushCache()\n {\n $this->_cache = array();\n }", "public function RefreshCache();", "public function cache()\n {\n return false;\n }", "private function _clearCache()\n\t{\n\t\tif ($this->input->get('task', '', 'cmd') == __FUNCTION__)\n\t\t{\n\t\t\tdie(__FUNCTION__ . ' : direct call not allowed');\n\t\t}\n\n\t\t$cache = JFactory::getCache('com_flexicontent');\n\t\t$cache->clean();\n\t\t$itemcache = JFactory::getCache('com_flexicontent_items');\n\t\t$itemcache->clean();\n\t}", "public function recreateCache();", "public function uncache() {\n\t\t$this->url = null;\n\t\t$this->path = null;\n\t\t// $this->page = null;\n\t}", "public function disableCaching();", "function wp_cache_reset()\n{\n}", "public function invalidate_caches()\n {\n $this->cached_layers_deep = null;\n $this->updated_at = null;\n $this->created_at = null;\n }", "function clear_cache() {\r\r\n $this->output->set_header(\"cache-control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0\");\r\r\n $this->output->set_header(\"Pragma:no-cache\");\r\r\n }", "public function clearCache()\n\t{\n\t\tself::$_queryCache = array();\n\t}", "final public function cache() {\n\t\tif ($this->getCacheEngine()->has($this->_cacheKey)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$request = $this->request();\n\t\t$results = $request->response();\n\n\t\tif (!empty($results)) {\n\t\t\t$this->getCacheEngine()->set($this->_cacheKey, $results);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function _elgg_invalidate_query_cache() {\n\tglobal $DB_QUERY_CACHE, $DB_QUERY_CACHE_COUNT;\n\tif ($DB_QUERY_CACHE instanceof ElggLRUCache) {\n\t\t$DB_QUERY_CACHE->clear();\n\t\t$DB_QUERY_CACHE_COUNT = 0;\n\t\telgg_log(\"Query cache invalidated\", 'NOTICE');\n\t} elseif ($DB_QUERY_CACHE) {\n\t\t// In case someone sets the cache to an array and primes it with data\n\t\t$DB_QUERY_CACHE = array();\n\t\t$DB_QUERY_CACHE_COUNT = 0;\n\t\telgg_log(\"Query cache invalidated\", 'NOTICE');\n\t}\n}", "public function noCache() {\r\n\t\t \r\n\t\t $this->_enable_caching = false;\r\n\t }", "public function recompileCache()\n\t{\n\t}", "public function cacheRegenerate()\n\t{\n\t\tCache::forget(\"admin_roles\");\n\t}", "function clear_cache()\n {\n $this->output->set_header(\"Cache-Control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0\");\n $this->output->set_header(\"Pragma: no-cache\");\n }", "public function BreakCache() {\r\n $this->osm = null;\r\n $this->section = null;\r\n $this->badgeWork = array();\r\n }", "public function clearCache()\n\t{\n\t\tYii::app()->cache->delete('customurlrules');\n\t}", "function rx_reload_cache() {\n\t$headerCache = new \\app\\model\\RxCache ( \"header\", true );\n\t$headerCache->clear();\n}", "public function shouldCache(): bool\n {\n return true;\n }", "public function shouldCache(): bool\n {\n return true;\n }", "public function flush_cache() {\n $this->_reset_run(array(\n 'ar_cache_select' => array(),\n 'ar_cache_from' => array(),\n 'ar_cache_join' => array(),\n 'ar_cache_where' => array(),\n 'ar_cache_like' => array(),\n 'ar_cache_groupby' => array(),\n 'ar_cache_having' => array(),\n 'ar_cache_orderby' => array(),\n 'ar_cache_set' => array(),\n 'ar_cache_exists' => array(),\n 'ar_cache_no_escape' => array()\n ));\n }", "public function flushCache(): void\n {\n $this->localCache = [];\n }", "protected function _resetCacheAuto()\n {\n $hash = $this->_getHash();\n if (self::$_previousLoadedHash != $hash) {\n $this->resetCache();\n self::$_previousLoadedHash = $hash;\n }\n }", "public function flushCache() {\n $this->cache->forget($this->cacheKey);\n }", "function object_cache_reset() {\r\n\tglobal $ts_object_cache;\r\n\t\r\n\treturn $ts_object_cache->reset ();\r\n}", "function jp_rest_cache_rebuild( $server, $request ) {\n\n\t\t$request->set_param('refresh-cache', true);\n\t\treturn $server->dispatch($request);\n\n\t}", "function clear_caching()\n { \n global $FNS;\n \n $FNS->clear_caching($_POST['type']);\n \n return Utilities::clear_cache_form(TRUE);\n }", "protected function saveToCache() {}", "public function resetListCache();", "public function updateCache() :void;", "public static function cacheNone() {\n $gm_mod = gmdate('D, d M Y H:i:s') . ' GMT';\n header(\"Last-Modified: $gm_mod\");\n header(\"Pragma: no-cache\");\n //-------------------------------------------------\n // Backwards Compatibility for HTTP/1.0 clients\n header(\"Expires: 0\");\n // header(\"Expires: $gm_mod\");//expires now\n // header(\"Expires: Sat, 26 Jul 1997 05:00:00 GMT\"); // expires Date in the past\n //-------------------------------------------------\n // HTTP/1.1 support\n header(\"Cache-Control: no-cache,no-store,max-age=0,s-maxage=0\");\n // header(\"Cache-Control: no-cache, must-revalidate\"); //HTTP 1.1\n }", "private function _clearCache()\n {\n Cache::forget(\"report-resource:{$this->id}\");\n\n foreach ($this->getAssociatedDamageIds() as $id) {\n Cache::forget(\"roaddamage-resource:{$id}\");\n }\n foreach ($this->getAssociatedReportIds() as $id) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }", "public function invalidateCache()\n {\n // Invalidate the caches by setting the timestamp to now\n $cacheKey = $this->getCacheKey(\n $this::ROUTEMAP_CACHE_PREFIX . $this::ROUTEMAP_CACHE_TIMESTAMP\n );\n craft()->cache->set($cacheKey, time(), false);\n }", "public function disableCache ()\n {\n $this->caching = false;\n }", "public function invalidateCache(): void\n {\n self::$m = [];\n }", "function recompileCache() {\n\t}", "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 }", "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 }", "public function flushCache()\n {\n if ($this->isDirty) {\n call_user_func($this->helper);\n $this->isDirty = false;\n }\n }", "function elgg_reset_system_cache() {\n\t_elgg_services()->systemCache->reset();\n}", "protected function updateCache()\n {\n $this->_updateCache = true;\n }", "protected function emptyCache()\n {\n Cache::forget('questions_newest');\n Cache::forget('questions_popular');\n Cache::forget('questions_unanswered');\n }", "public function clearCache() {\n $this->scope_cache = Array();\n }", "public static function preventCache()\n {\n self::prevenirCache();\n }", "public function cacheUpdate()\n\t{\n\t\t$this->cacheUpdateReceipts();\n\t}", "function elgg_flush_caches() {\n\t_elgg_services()->events->trigger('cache:flush', 'system');\n}", "public static function reset_caches() {\n cache_helper::purge_by_event('resettagindexbuilder');\n }", "public function warmUpCache()\n {\n if ($this->cache) {\n $this->clearCache();\n $this->getLocalizations();\n }\n }", "public function ClearCache()\r\n {\r\n\t\t$this->_cache = Array();\r\n\t}", "public static function truncateRequestCache()\n {\n RequestCache::purge();\n }", "public function testPreCacheWipe()\n {\n cache_set($this->thingy, $this->thingy, $this->bin);\n $this->assertEquals($this->thingy,\n cache_get($this->thingy, $this->bin)->data, 'Cache item fetched successfully'\n );\n }", "public function invalidate()\n {\n $this->cache = null;\n }", "function bp_core_clear_cache() {\r\n\tglobal $cache_path, $cache_filename;\r\n\r\n\tif ( function_exists( 'prune_super_cache' ) ) {\r\n\t\tdo_action( 'bp_core_clear_cache' );\r\n\r\n\t\treturn prune_super_cache( $cache_path, true );\r\n\t}\r\n}", "protected function scheduleCache()\n {\n return ;\n }", "public function clearCaches();", "public function clearCaches();", "function resethits() {\n\t\t$id\t\t= JRequest::getInt( 'id', 0 );\n\t\t$model = $this->getModel('item');\n\n\t\t$model->resetHits($id);\n\t\t\n\t\t//$cache = &JFactory::getCache('com_flexicontent');\n\t\t$cache = FLEXIUtilities::getCache();\n\t\t$cache->clean('com_flexicontent_items');\n\n\t\techo 0;\n\t}", "public function cache()\n\t{\n\t\t/*\n\t\t * This is an empty implementation so that cacheing capability is not\n\t\t * required, but may be implemented.\n\t\t */\n\t}", "protected function removeExpiredCacheEntries() {}", "public static function reset_cache()\n\t\t{\n\t\t\tself::$tax_class_cache = array();\n\t\t\tself::$_customer_context = null;\n\t\t\tself::$_tax_exempt = false;\n\t\t\tself::$shipping_tax_class = null;\n\t\t}", "public function cache_delete()\n {\n }", "public function flushCaches() {}", "public function maybe_restore_orders_cache_usage() : void\n {\n }", "function clearCache() {\r\n\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages', 'reg1=414');\r\n\t}", "private function invalidateMetaDataCache() {\n\t\t$this->metaDataCache = null;\n\t}", "public function resetCache()\n {\n for ($i = 1; $i <= MAX_BLOG_CACHE_PAGES; $i++) {\n PHPWS_Cache::remove(BLOG_CACHE_KEY . $i);\n }\n }", "public function reset_cache() {\n\t\tAvada()->dynamic_css->reset_all_caches();\n\t}", "public function invalidateCache()\n {\n /*\n $manager = Doctrine_Manager::getInstance();\n $cache_driver = $manager->getAttribute(Doctrine::ATTR_RESULT_CACHE);\n \n if ($cache_driver instanceof Doctrine_Cache_Driver){\n $c1 = $cache_driver->deleteByPrefix('hot');\n $c2 = $cache_driver->deleteByPrefix('latest');\n AppLog::add('info', 'invalidated cache hotlist: ' . $c1);\n AppLog::add('info', 'invalidated cache latestlist: ' . $c2);\n }\n */\n \n $job = array('operation' => 'UpdateListingCache', 'TotalPages' => 5);\n $queue = new RedisJobQueue(CacheUpdateWorker::QUEUE_NAME);\n $queue->addJob($job);\n }", "public function clearCache() {\n\t\t$this->blacklistCache = null;\n\t}", "public function stop_cache ()\n {\n $this->ar_caching = FALSE;\n }", "public function cleanCache()\n {\n $this->instances = null;\n $this->instancesById = null;\n }" ]
[ "0.8403102", "0.7785865", "0.7613404", "0.7373493", "0.7373493", "0.73277414", "0.7300471", "0.7205763", "0.7130112", "0.7092498", "0.7048992", "0.70179856", "0.7014313", "0.699496", "0.6970341", "0.6960508", "0.6960508", "0.69131714", "0.68886656", "0.6885806", "0.6884207", "0.68780476", "0.68689007", "0.6864296", "0.68638575", "0.684168", "0.6830505", "0.68247086", "0.6821569", "0.6811737", "0.6811274", "0.67880034", "0.6774844", "0.6761385", "0.67540246", "0.67351353", "0.6727787", "0.6725218", "0.6720993", "0.67106473", "0.6707689", "0.6690098", "0.6679758", "0.66565424", "0.664697", "0.66450644", "0.6627891", "0.6627891", "0.661565", "0.6614358", "0.66123354", "0.6607245", "0.65879834", "0.65866977", "0.65841246", "0.6578158", "0.6575389", "0.6570029", "0.65641564", "0.6559536", "0.6550658", "0.6549507", "0.6548093", "0.6539413", "0.6537238", "0.6537238", "0.653642", "0.6530559", "0.6518448", "0.6518224", "0.6513377", "0.6504891", "0.65032005", "0.6502931", "0.6501317", "0.6493218", "0.64923114", "0.64860195", "0.648364", "0.64697254", "0.6468752", "0.64560616", "0.6455306", "0.6455306", "0.64476395", "0.64437103", "0.6436465", "0.6428523", "0.642511", "0.6421356", "0.6413607", "0.6400082", "0.6399461", "0.6383636", "0.6382361", "0.6374921", "0.63513005", "0.6350335", "0.6347526" ]
0.7843693
1
Should this request use session authentication?
Нужно ли использовать аутентификацию сессии для этого запроса?
public function useSessionAuth();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function needsSessionDoubleAuthenticationCheck() ;", "public function checkSessionAccess() {\n // Defaults to True; any authentication is handled by the resource itself.\n return true;\n }", "public function canPreserveSessionDataWhenAuthenticating() {}", "public function checkAuthWithSession()\n {\n $loadSession = R::findOne('authorization', 'token = ?', array($_SESSION['auth']['token']));\n\n if (!$loadSession) {\n $this->userExit();\n }\n }", "public function canLoadExistingAuthenticatedSession() {}", "protected function isAuthorizedBackendSession() {}", "protected function isAuthorizedBackendSession() {}", "private function isSessionRequest()\n {\n return MiddlewareHelper::requestUrlContains($this->request, 'session');\n }", "function is_authenticated() {}", "static function loginIsRequired()\n {\n if (REQUIRE_AUTH) {\n $request = new Request();\n if ($request->getSession()['auth'] != true) {\n $response = new Response();\n if ($request->method === \"GET\") {\n $response->redirect(\"/login\", 302);\n exit();\n }\n $response->setStatusCode(401);\n $response->render();\n exit();\n }\n }\n }", "public function requiresAuthentication() {\n return FALSE;\n }", "protected function isAuthorizedFrontendSession() {}", "public static function authenticated(){\n return isset($_SESSION['user']) ? true : false;\n }", "public function canSetSessionDataForAnonymousUser() {}", "function isAuth () {\n session_start();\n return isset($_SESSION['user']);\n}", "public function isAuthenticated()\n {\n return $this->_sessionToken !== null;\n }", "function isAuth()\n {\n // do not start a session if we are using http auth...\n // we have a situation where the app is behind a http access and is also login\n // need to work out a way to handle that.\n $ff= HTML_FlexyFramework::get();\n if (php_sapi_name() != \"cli\" && (empty($_SERVER['PHP_AUTH_USER']) || !empty($ff->disable_http_auth))) {\n @session_start();\n }\n \n \n \n $sesPrefix = $this->sesPrefix();\n \n if (self::$authUser) {\n return self::$authUser;\n }\n \n \n if (!empty($_SESSION[get_class($this)][$sesPrefix .'-auth'])) {\n // in session...\n $a = unserialize($_SESSION[get_class($this)][$sesPrefix .'-auth']);\n $u = DB_DataObject::factory($this->tableName());\n $u->autoJoin();\n if ($a->id && $u->get($a->id)) { //&& strlen($u->passwd)) {\n if ($u->verifyAuth()) {\n self::$authUser = $u;\n return true;\n }\n }\n unset($_SESSION[get_class($this)][$sesPrefix .'-auth']);\n unset($_SESSION[get_class($this)][$sesPrefix .'-timeout']);\n //setcookie('Pman.timeout', -1, time() + (30*60), '/');\n return false;\n }\n \n // http basic auth..\n $u = DB_DataObject::factory($this->tableName());\n \n if (empty($ff->disable_http_auth) // http auth requests should not have this...\n &&\n !empty($_SERVER['PHP_AUTH_USER']) \n &&\n !empty($_SERVER['PHP_AUTH_PW'])\n &&\n $u->get('email', $_SERVER['PHP_AUTH_USER'])\n &&\n $u->checkPassword($_SERVER['PHP_AUTH_PW'])\n ) {\n // logged in via http auth\n // http auth will not need session... \n //$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize($u);\n self::$authUser = $u;\n return true; \n }\n \n // at this point all http auth stuff is done, so we can init session\n \n \n //die(\"test init\");\n if (!$this->canInitializeSystem()) {\n // die(\"can not init\");\n return false;\n }\n \n \n $auto_auth_allow = false;\n if (!empty($ff->Pman['local_autoauth']) && $ff->Pman['local_autoauth'] === true) {\n $auto_auth_allow = true;\n }\n if ( !empty($ff->Pman['local_autoauth'])\n &&\n !empty($_SERVER['SERVER_ADDR']) &&\n !empty($_SERVER['REMOTE_ADDR']) &&\n (\n (\n $_SERVER['SERVER_ADDR'] == '127.0.0.1' &&\n $_SERVER['REMOTE_ADDR'] == '127.0.0.1'\n )\n ||\n (\n $_SERVER['SERVER_ADDR'] == '::1' &&\n $_SERVER['REMOTE_ADDR'] == '::1'\n )\n )\n \n ){\n $auto_auth_allow = true;\n }\n \n \n if (empty($_SERVER['PATH_INFO']) || $_SERVER['PATH_INFO'] == '/Login') {\n $auto_auth_allow = false;\n }\n //var_dump($auto_auth_allow);\n // local auth - \n $default_admin = false;\n if ($auto_auth_allow) {\n $group = DB_DataObject::factory('core_group');\n $group->get('name', 'Administrators');\n \n $member = DB_DataObject::factory('core_group_member');\n $member->autoJoin();\n $member->group_id = $group->id;\n $member->whereAdd(\"\n join_user_id_id.id IS NOT NULL\n \");\n if($member->find(true)){\n $default_admin = DB_DataObject::factory($this->tableName());\n $default_admin->autoJoin();\n if(!$default_admin->get($member->user_id)){\n $default_admin = false;\n }\n }\n }\n \n //var_dump($ff->Pman['local_autoauth']); var_dump($_SERVER); exit;\n $u = DB_DataObject::factory($this->tableName());\n $u->autoJoin();\n $ff = HTML_FlexyFramework::get();\n \n if ($auto_auth_allow && \n ($default_admin || $u->get('email', $ff->Pman['local_autoauth']))\n ) {\n \n $user = $default_admin ? $default_admin->toArray() : $u->toArray();\n \n // if we request other URLS.. then we get auto logged in..\n self::$authUser = $default_admin ? $default_admin : $u;;\n //$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize((object) $user);\n return true;\n }\n \n //var_dump(session_id());\n //var_dump($_SESSION[__CLASS__]);\n \n //if (!empty( $_SESSION[__CLASS__][$sesPrefix .'-empty'] )) {\n // return false;\n //}\n //die(\"got this far?\");\n // not in session or not matched...\n $u = DB_DataObject::factory($this->tableName());\n $u->whereAdd(' LENGTH(passwd) > 0');\n $n = $u->count();\n if (empty($_SESSION[get_class($this)]) || !is_array($_SESSION[get_class($this)])) { \n $_SESSION[get_class($this)] = array();\n }\n $_SESSION[get_class($this)][$sesPrefix .'-empty'] = $n;\n if (class_exists('PEAR')) {\n $error = PEAR::getStaticProperty('DB_DataObject','lastError');\n if ($error) {\n die($error->toString()); // not really a good thing to do...\n }\n }\n if (!$n){ // authenticated as there are no users in the system...\n return true;\n }\n return false;\n \n }", "public function requiresAuthentication() {\n return TRUE;\n }", "function user_must_be_logged_in() {\n\tif (isset($_SESSION[\"username\"])) {\n\t\treturn;\n\t}\n\tjson_error(\"Unauthorized HTTP request.\");\n}", "function hasAuthenticated(Illuminate\\Http\\Request $request){\n if($request->session()->has(SESSION_KEY_USERNAME) && $request->session()->has(SESSION_KEY_PASSWORD)){\n return true;\n }\n return false;\n}", "function isAuthenticated()\n{\n return isset($_SESSION['user']);\n}", "private function is_authenticated() {\n return array_key_exists( $this->cookie_name( 'session' ), $_COOKIE );\n }", "public function needsSession($request) {\n return ($request->state && (\n $request->state->hasHandlers() || \n $request->state->requiresAuthentication()\n ));\n }", "public function isAuthenticated();", "public function isAuthenticated();", "public function isAuthenticated();", "static function isAuthentic($session_var){\n\t\t\t$isSessionSet = Session::isSessionSet($session_var);\n\t\t\t$isSessionEmpty = Session::isSessionEmpty($session_var);\n\t\t\treturn ($isSessionSet && !$isSessionEmpty);\n\t\t}", "public function hasSession();", "public function hasSession() {}", "protected function sessionSetup($request)\n\t{\n\t\t// Detect if using webdav url\n\t\t$isWebdav = preg_match(\"|\".Config::get('mrcore.webdav_base_url').\"|i\", Request::url());\n\n\t\t// Detect if accessing /file and passing basic/digest auth username (so using curl or wget...)\n\t\t$fileHttpAuth = (Request::is('file*') && Request::server('PHP_AUTH_USER'));\n\n\t\treturn false; //fix later\n\n\t\t// Login one time (no session) as anonymous only if regular web.\n\t\t// Do not login as anonymous if webdav or hitting the /file path with a username passed (curl/wget)\n\t\tif (!Auth::check() && !$isWebdav && !$fileHttpAuth) {\n\t\t\t// I cannot access Auth::onceUsingId here yet, so I set a flag in the IoC and auth once later in boot()\n\n\t\t\t// FIXME, Auth::check is always false here, too early..chicken egg...\n\t\t\tvar_dump(Auth::check());\n\t\t\t\n\t\t\tif (!Request::is('login')) {\n\t\t\t\t// Return true means to reject the session creation, basically like using session.driver = array\n\t\t\t\t#$this->app['stateless'] = true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn false;\n\t}", "private function checkSession() {\n \t\t$authInfo = false;\n \t \t$loginDetails = Session::get('LOGIN');\n \n \t \t// Session Hash doesn't exist if NULL\n \tif ($loginDetails != NULL && $loginDetails instanceof LoginInformation) {\n \tif ($loginDetails->getIpAdress() === $_SERVER['REMOTE_ADDR']) {\n \t \t$authInfo = $loginDetails;\n \t}\n \t}\n \n \tif ($authInfo) {\r\n \t\t$this->_hasAuthenticated = true;\r\n \t} else {\r\n \t\t$this->_hasAuthenticated = false;\r\n \t}\n \t\n \treturn $authInfo;\n \t}", "public function checkAuth() {\n if (isset($_SESSION[$this->_sessionVarName]) &&\n $_SESSION[$this->_sessionVarName] == 1\n ) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthenticated(){\n\t\treturn (isset($_SESSION['auth']) && $_SESSION['auth'] === true);\n\t}", "public function IsAuthenticated()\n\t{\n\t\t$requestParameters = $this->GetRequestParameters();\n\t\t$resourceParameters = $this->GetResourceParameters();\n\n\t\t$sessionID = '';\n\t\t$user = [];\n\t\tif (!empty($requestParameters['session_id'])) {\n\t\t\t$session = $this->db->where('session_key', $requestParameters['session_id'])\n\t\t\t\t\t\t\t\t->getOne('sessions');\n\n\t\t\tif (count($session) > 0) {\n\t\t\t\t$sessionID = $requestParameters['session_id'];\n\n\t\t\t\t$user = $this->db->where('user_id', $session['user_id'])\n\t\t\t\t\t\t\t\t ->getOne('users');\n\t\t\t}\n\t\t} else if (!empty($resourceParameters['email']) && !empty($resourceParameters['password'])) {\n\t\t\t$user = $this->db->where('user_email', $resourceParameters['email'])\n\t\t\t\t\t\t\t ->where('user_password', md5($resourceParameters['password']))\n\t\t\t\t\t\t\t ->getOne('users');\n\t\t\tif (count($user) > 0) {\n\t\t\t\t$session = $this->db->where('user_id', $user['user_id'])\n\t\t\t\t\t\t\t\t\t->getOne('sessions');\n\n\t\t\t\tif (count($session) == 0) {\n\t\t\t\t\t$hash = $this->BuildHashBlock() . $this->BuildHashBlock() . $this->BuildHashBlock() . $this->BuildHashBlock();\n\t\t\t\t\t$this->db->insert('sessions', ['session_key' => $hash, 'user_id' => $user['user_id'], 'updated_at' => time()]);\n\n\t\t\t\t\t$sessionID = $hash;\n\t\t\t\t} else {\n\t\t\t\t\t$this->db->where('user_id', $user['user_id'])\n\t\t\t\t\t\t\t ->update('sessions', ['updated_at' => time()]);\n\n\t\t\t\t\t$sessionID = $session['session_key'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($sessionID) && !empty($user)) {\n\t\t\treturn ['user_id' => $user['user_id'],\n\t\t\t\t\t'full_name' => $user['user_fullname'],\n\t\t\t\t\t'email' => $user['user_email'],\n\t\t\t\t\t'status' => $user['user_status'],\n\t\t\t\t\t'session_id' => $sessionID];\n\t\t}\n\n\t\treturn false;\n\t}", "protected function Check_Session()\n {\n return true;\n }", "function auth()\n{\n\tif(isset($_SESSION['client_id']) && $_SESSION['client_id'] > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function isAuthenticated()\n\t{\n\t\treturn FALSE;\n\t}", "function isAuth(){\n\t\treturn array_key_exists('auth', $_SESSION) \n\t\t\t|| array_key_exists('auth', $_COOKIE);//unimplemented\n\t}", "function isAuth(): bool\n {\n return array_key_exists(\"auth\", $_SESSION);\n }", "private static function _authSession($sessionId)\n\t{\n\t\tif (!is_null($sessionId)) {\n\t\t\t$sessionRow = Db::get('sessions', array(\n\t\t\t\t'user_id',\n\t\t\t), array(\n\t\t\t\t'session_id' => $sessionId\n\t\t\t));\n\n\t\t\tif ($sessionRow) {\n\t\t\t\tself::$_authType = self::API_SESSION;\n\t\t\t\tself::$_sessionId = $sessionId;\n\t\t\t\tself::$_userId = $sessionRow['user_id'];\n\t\t\t\t$userRow = Db::get('users', array(\n\t\t\t\t\t'type'\n\t\t\t\t), array(\n\t\t\t\t\t'user_id' => self::$_userId\n\t\t\t\t));\n\t\t\t\tif ($userRow) {\n\t\t\t\t\tself::$_userType = $row['user_type'];\t\n\t\t\t\t}\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function requestAuth() {}", "function isUserAuthenticated()\n{\n $store = new SessionStore();\n $userinfo = $store->get('user');\n return ! empty($userinfo);\n}", "function sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function isAuthenticated(){\n\n\t\t@session_start();\n\t\tif(isset($_SESSION['logged']) && $_SESSION['logged']===1)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "protected function authenticateSession()\n {\n $userid =\n (isset($_COOKIE[$this->cookiePrefix . 'userid']) ? $_COOKIE[$this->cookiePrefix . 'userid'] : false);\n $password =\n (isset($_COOKIE[$this->cookiePrefix . 'password']) ? $_COOKIE[$this->cookiePrefix . 'password'] : false);\n\n $sessionHash = (isset($_COOKIE[$this->cookiePrefix . 'sessionhash']) ?\n $_COOKIE[$this->cookiePrefix . 'sessionhash'] : false);\n\n if ($userid && $password) {\n $user = $this->isValidCookieUser($userid, $password);\n\n if ($user) {\n $sessionHash = $this->updateOrCreateSession($userid);\n $userinfo = DB::connection($this->connection)->table($this->databasePrefix . 'user')\n ->where('userid', '=', $userid)->take(1)->get($this->userColumns);\n $userinfo = $userinfo[0];\n $this->setUserInfo($userinfo);\n return true;\n } else {\n return false;\n }\n } elseif ($sessionHash) {\n\n $session = DB::connection($this->connection)->table($this->databasePrefix . 'session')\n ->where('sessionhash', '=', $sessionHash)->where('idhash', '=', $this->fetchIdHash())->get();\n\n if ($session) {\n $session = $session[0];\n\n if ($session && ($session->host == Request::server('REMOTE_ADDR'))) {\n $userinfo = DB::connection($this->connection)->table($this->databasePrefix . 'user')\n ->where('userid', '=', $session->userid)->take(1)->get($this->userColumns);\n\n if (!$userinfo) {\n return false;\n }\n\n $userinfo = $userinfo[0];\n\n $this->setUserInfo($userinfo);\n $this->updateOrCreateSession($userinfo->userid);\n\n return true;\n }\n } else {\n return false;\n } \n } else {\n return false;\n }\n\n return false;\n }", "public function needsAuthentication(): bool;", "protected function _check_php_session()\n {\n // If whitelist is enabled it has the first chance to kick them out\n if ($this->config->item('rest_ip_whitelist_enabled')) {\n $this->_check_whitelist_auth();\n }\n\n // Load library session of CodeIgniter\n $this->load->library('session');\n\n // Get the auth_source config item\n $key = $this->config->item('auth_source');\n\n // If false, then the user isn't logged in\n if (!$this->session->userdata($key)) {\n // Display an error response\n $this->response([\n $this->config->item('rest_status_field_name') => false,\n $this->config->item('rest_message_field_name') => $this->lang->line('text_rest_unauthorized'),\n ], self::HTTP_UNAUTHORIZED);\n }\n }", "#[Pure] public function requiresAuthentication(): bool;", "function isUserAuthenticated() {\n\treturn (isset($_SESSION[\"username\"]) && isset($_SESSION[\"password\"]) && $_SESSION[\"username\"] == getTypedConf(\"Username\") && md5($_SESSION[\"password\"]) == getTypedConf(\"Password\"));\n}", "public function IsAuthenticated()\r\n {\r\n return isset($_SESSION['user']);\r\n }", "public static function isAuthenticatied() {\n\t\treturn (!empty($_SESSION['logged in']) && $_SESSION['logged in']=='true');\n\t}", "function UploadIsAuthenticated($get){\n\tif(!empty($get['session'])) return true;\n\t\n\treturn false;\n}", "public function session();", "function is_authenticated() {\n global $session;\n\n return $session->get('auth_logged_in', false);\n}", "function requiresAuth()\n {\n return true;\n }", "public function authorize()\n {\n if (!empty($this->webSession->getWebSessionID()) &&\n !empty($this->webSession->getTransId())\n ) {\n $transactionId = $this->getToken(10);\n $this->webSession->setTransId($transactionId);\n return true;\n } else {\n $transactionId = $this->getToken(10);\n $response = $this->getSessionData($transactionId);\n\n if (!empty($response) && is_array($response) &&\n isset($response['ResponseCode']) && $response['ResponseCode'] == 0\n ) {\n $this->webSession->setWebSessionID($response['WebSessionID']);\n $this->webSession->setOrgID($response['OrgID']);\n $this->webSession->setTransId($transactionId);\n return true;\n } else {\n return false;\n }\n }\n }", "function isSecured() {\n\t\tif((!$_SERVER['PHP_AUTH_USER'] || !$_SERVER['PHP_AUTH_PW']) && preg_match('/Basic+(.*)$/i', $_SERVER['REMOTE_USER'], $matches)) {\n\t\t\tlist($name, $password) = explode(':', base64_decode($matches[1]));\n\t\t\t$_SERVER['PHP_AUTH_USER'] = strip_tags($name);\n\t\t\t$_SERVER['PHP_AUTH_PW'] = strip_tags($password);\n\t\t}\n\n\t\treturn (isset($_SERVER['PHP_AUTH_USER'])\n\t\t\t&& isset($_SERVER['PHP_AUTH_PW'])\n\t\t\t&& VerifSession($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'])==\"1\");\n\t}", "function _requireAuth() {\n \n }", "private function doLoginWithSessionData()\n {\n $this->user_is_logged_in = true; // ?\n }", "private function doLoginWithSessionData()\n {\n $this->user_is_logged_in = true; // ?\n }", "public function getSessionEndpoint();", "public function Authenticated();", "static function isAuth(): bool {\n return isset($_SESSION['user']);\n }", "public function has_session()\n {\n }", "function smart_session($request) {\n\t$sess = NULL;\n\t\n\tif (isset($request['auth_token'])) {\n\t\t$sess = get_session_data($request['auth_token']);\n\t\t$sess['auth_token'] = $request['auth_token'];\n\t} else if (isset($_COOKIE['auth_token'])) {\n\t\t$sess = get_session_data($_COOKIE['auth_token']);\n\t\t$sess['auth_token'] = $_COOKIE['auth_token'];\n\t} else {\n\t\t$sess = array(\n\t\t\t'auth_token' => start_new_session()\n\t\t);\n\t}\n\t\n\tif (!isset($_COOKIE['auth_token'])) {\n\t\tsetcookie('auth_token', $sess['auth_token'], time()+157680000, '/'); //set for 5 years from now\n\t}\n\t\n\tsession_start();\n\t\n\t$_SESSION = $sess;\n}", "public function isAuthenticated(): bool\n {\n return true;\n }", "public function isAuthenticated()\n {\n // simple check to see if we have sso session variables\n // uses $options['namespace'] which must be consistant across all apps (inc sso server app)\n\n return (!empty($this->getAttributes()));\n }", "public function isAuthenticated(): bool;", "public function isAuthenticated(): bool;", "function authenticateUser() {\n if(!isset($_SESSION[\"authenticated\"])) {\n return false;\n }\n else {\n if($_SESSION[\"authenticated\"] != true){\n return false;\n }\n else {\n return true;\n }\n }\n }", "public static function assertSession($request) {\n\t\t// If no session then return 401\n\t\tHTTP::setStatus(401);\n\t\texit;\n\t}", "function sessionValid()\n {\n \treturn $this->Session->check('othAuth.' . $this->hashkey);\n }", "public function auth() {\n // later on pages that call auth().\n if (!$this->renew()) {\n\n // The session is expired\n $_SESSION['errors'][] = \"Your session has timed out for security. Please login again.\";\n\n // Redirect back, so the errors can be displayed\n header(\"HTTP/1.1 303 See Other\");\n header(\"Location: \" . SITE_ROOT . \"login\");\n exit;\n\n }\n\n\n }", "function phpfmg_user_isLogin(){\n return ( isset($_SESSION['authenticated']) && true === $_SESSION['authenticated'] );\n}", "function phpfmg_user_isLogin(){\r\n return ( isset($_SESSION['authenticated']) && true === $_SESSION['authenticated'] );\r\n}", "function sessionAuthenticate(){\n\n // Check if the user hasn't logged in\n if (!isset($_SESSION[\"login\"]))\n {\n // The request does not identify a session\n $_SESSION[\"message\"] = \"You are not authorized to access the URL \n {$_SERVER[\"REQUEST_URI\"]}\";\n\n header(\"Location: login-screen.php?m=2\");\n exit;\n }\n\n // Check if the request is from a different IP address to previously\n if (!isset($_SESSION[\"loginIP\"]) || \n ($_SESSION[\"loginIP\"] != $_SERVER[\"REMOTE_ADDR\"]))\n {\n // The request did not originate from the machine\n // that was used to create the session.\n // THIS IS POSSIBLY A SESSION HIJACK ATTEMPT\n\n $_SESSION[\"message\"] = \"You are not authorized to access the URL \n {$_SERVER[\"REQUEST_URI\"]} from the address \n {$_SERVER[\"REMOTE_ADDR\"]}\";\n\n header(\"Location: login-screen.php?m=3\");\n exit;\n }\n}", "function exponent_sessions_loggedIn() {\n\t//if ($anon){\n\treturn (isset($_SESSION[SYS_SESSION_KEY]['ticket']) && isset($_SESSION[SYS_SESSION_KEY]['user']));\n\t//}\n\t//else{\n\t//\treturn (isset($_SESSION[SYS_SESSION_KEY]['ticket']));\t\t\n\t//}\t\n}", "public function hasSession() {\n return FALSE; // XXX \n }", "private function checkAuth()\n {\n if (!isset($_SESSION['user_id'])) {\n return false;\n }\n return true;\n }", "public function isRequestAuthenticated()\n {\n $credentialObj = getCredential();\n $userObj = new User;\n if($userObj->isLoggedIn())\n return true;\n elseif($credentialObj->isOAuthRequest())\n return true;\n\n return false;\n }", "protected function checkSession(){\n if( !session_id()){\n session_start();\n }\n }", "public function checkSession(){\n \n if (!(isset($_SESSION['id'])) || (strlen($_SESSION['id']) == 0) || (strlen($_SESSION['username']) == 0)){\n \n Header(\"Location: index.php?mode=common&module=auth&action=index\");\n return false;\n }\n else {\n return true;\n }\n }", "public function skipAuthentication()\n {\n $request = $this->getServerInstance()->getRequest();\n $method = $request->getService() . \".\" . $request->getMethod();\n switch( $method )\n {\n case \"logbuch.access.authenticate\":\n session_regenerate_id(); // to avoid to loose the last session used.\n case \"logbuch.setup.setup\":\n case \"logbuch.registration.confirmEmail\":\n $this->log( \"Authentication for '$method' is not required.\", QCL_LOG_ACCESS );\n return true;\n default:\n $this->log( \"Authentication required for '$method'\", QCL_LOG_ACCESS );\n return false;\n }\n }", "public function isAuthenticated() {\n $session = new Session();\n /**\n * Return false if the session IS empty, and true if the session ISN'T empty\n */\n return !$session->isEmpty();\n }", "function sessionAuthenticate() \n{\n // Check if the user hasn't logged in\n if (!isset($_SESSION[\"loginUsername\"]))\n {\n // The resquest does not identify a session\n $message = \"You are not authorized to access\";\n header(\"Location: login_form.php?msg=$message\");\n exit;\n }\n\n// Check if the request is from a different IP address to previously\n if (!isset($_SESSION[\"loginIP\"]) ||\n ($_SESSION[\"loginIP\"] != $_SERVER[\"REMOTE_ADDR\"]))\n {\n // The request did not originate from the machine\n // that was used to create the session.\n // THIS IS PROBABLY A SESSION HIJACK ATTEMPT\n $message = \"You are not authorized to acces the URL\";\n header(\"Location: login_form.php?msg=$message\");\n exit;\n }\n}", "function sessionAuthenticate()\n{\n // Check if the user hasn't logged in\n if (!isset($_SESSION[\"loginUsername\"]))\n {\n // The request does not identify a session\n $_SESSION[\"message\"] = \"You are not authorized to access the URL \n {$_SERVER[\"REQUEST_URI\"]}\";\n\n header(\"Location: logout.php\");\n exit;\n }\n\n // Check if the request is from a different IP address to previously\n if (!isset($_SESSION[\"loginIP\"]) || \n ($_SESSION[\"loginIP\"] != $_SERVER[\"REMOTE_ADDR\"]))\n {\n // The request did not originate from the machine\n // that was used to create the session.\n // THIS IS POSSIBLY A SESSION HIJACK ATTEMPT\n\n $_SESSION[\"message\"] = \"You are not authorized to access the URL \n {$_SERVER[\"REQUEST_URI\"]} from the address \n {$_SERVER[\"REMOTE_ADDR\"]}\";\n\n header(\"Location: logout.php\");\n exit;\n }\n}", "protected function authenticated(){\n\t}", "function authenticateUser() {\n if (!isset($_SESSION[\"authenticated\"])) {\n return false;\n } else {\n if ($_SESSION[\"authenticated\"] != true) {\n return false;\n } else {\n return true;\n }\n }\n}", "public function requestAuth() {\n\t\t\t$this->_view->encodeAuth();\n\t\t}", "private function sessionAuthenticate() {\n require_once('User.php');\n $this->_user = new User($this->_registry, intval($_SESSION['authSessionUid']), '', '');\n if ($this->_user->isValid()) {\n if ($this->_user->isActive() == false) {\n $this->_loggedIn = false;\n $this->_loginFailureReason = 'inactive';\n } else {\n $this->_loggedIn = true;\n // transfers basket content to user if products are added to basket before login\n $this->_registry->getModel('basket')->transferToUser($this->_user->getUserId());\n session_regenerate_id();\n $this->_userId = $this->_user->getUserId();\n }\n } else {\n $this->_loggedIn = false;\n $this->_loginFailureReason = 'nouser';\n }\n if ($this->_loggedIn == false) {\n $this->logout();\n }\n }", "public function checkSession()\n {\n if (!isset($_SESSION['ws_auth_user_id'])) {\n return false;\n }\n\n // check if session is expired (1 hour)\n if(!isset($_SESSION['ws_auth_generated_time'])) {\n return false;\n }\n if (time() > ($_SESSION['ws_auth_generated_time'] + 3600)) {\n return false;\n }\n\n // validate ip address\n if(!isset($_SESSION['ws_auth_client_ip'])) {\n return false;\n }\n if ($_SESSION['ws_auth_client_ip'] !==\n filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_SANITIZE_STRING)) {\n return false;\n }\n\n // validate user agent\n if(!isset($_SESSION['ws_auth_user_agent'])) {\n return false;\n }\n if ($_SESSION['ws_auth_user_agent'] !==\n filter_input(INPUT_SERVER, 'HTTP_USER_AGENT',\n FILTER_SANITIZE_STRING)) {\n return false;\n }\n\n // check is user is logged in\n $user_id = $_SESSION['ws_auth_user_id'];\n $logged_in_model = new Ws_logged_inModel();\n $logged_in_model->search(\"user_id=$user_id\");\n\n // if user is logged in\n if ($logged_in_model->nRows >= 1) {\n // check session ID and Token\n if(session_id() == trim($logged_in_model->session_id)\n && $_SESSION['ws_auth_token'] == trim($logged_in_model->token)){\n\n // expand expiration time for 1 hour\n $_SESSION['ws_auth_generated_time'] = time();\n\n /** Id and token match, refresh the session\n * for the next request\n */\n unset($user_id, $logged_in_model);\n return true;\n }\n }\n\n unset($user_id, $logged_in_model);\n return false;\n }", "public static function is_auth () {\n\t\t\treturn\n\t\t\t\tisset($_SESSION[static::$id_key])\n\t\t\t\tand $_SESSION['rights'] >= self::getRights () ['user'];\n\t\t}", "public function securityAction(\\Symfony\\Component\\HttpFoundation\\Request $request) {\n return new JsonResponse($request->getSession()->get('userId') ? true : false);\n }", "public function mayUpdateSession() { return false; }", "function require_login() {\n return false;\n }", "public function isSecureRequest(){ }", "function needLogin() {\n if (empty($_SESSION['authenticated'] || $_SESSION['authenticated'] == true)) {\n redirect('');\n exit;\n } \n }", "private function checkAuth()\n {\n //if (isset($_SESSION['customer']));\n //1return (isset($_SESSION['user']) AND $_SESSION['user']['auth'] === true) ? true : false;\n //if (isset($_SESSION['customer']['auth'] OR $_SESSION['user']['auth']);\n return true;\n }", "public function authentication(){\n\t\t\tif(isset($_SESSION[\"email\"]) == false)\n\t\t\t\theader(\"location:index.php?controller=login\");\n\t\t}", "function user_auth()\n {\n $auth = false;\n if (isset($_SESSION['user_id'])) {\n if (isset($_SESSION['user_ip']) && $_SESSION['user_ip'] == $_SERVER['REMOTE_ADDR']) {\n if (isset($_SESSION['user_agent']) && $_SESSION['user_agent'] == $_SERVER['HTTP_USER_AGENT']) {\n $auth = true;\n }\n }\n }\n\n return $auth;\n }" ]
[ "0.75409037", "0.7296258", "0.72700673", "0.72157234", "0.71775866", "0.6951518", "0.6950835", "0.68410987", "0.6796148", "0.67949486", "0.6777252", "0.676013", "0.6713127", "0.6707142", "0.66514117", "0.66380244", "0.6637398", "0.6634509", "0.6620395", "0.6596185", "0.6595263", "0.6593299", "0.6579055", "0.6559325", "0.6559325", "0.6559325", "0.6554281", "0.65539783", "0.65394336", "0.6538012", "0.65327287", "0.6518761", "0.65178704", "0.6516765", "0.65074944", "0.6492069", "0.648483", "0.6473392", "0.64655954", "0.64563245", "0.64470536", "0.644455", "0.64438164", "0.6442524", "0.6437358", "0.64313334", "0.64277256", "0.6425784", "0.6423386", "0.6420838", "0.641478", "0.6413369", "0.6405577", "0.6405195", "0.640419", "0.63884497", "0.63835365", "0.6381568", "0.6375754", "0.6375754", "0.63730305", "0.63606167", "0.63560194", "0.6355491", "0.634657", "0.63465255", "0.6340751", "0.6337644", "0.6337644", "0.6337329", "0.63351417", "0.6335066", "0.6330444", "0.63267326", "0.6326686", "0.6322648", "0.631441", "0.6312645", "0.6299443", "0.6288884", "0.62855333", "0.6284468", "0.6282903", "0.62806886", "0.62801754", "0.6279396", "0.62674034", "0.6260241", "0.6259842", "0.6246896", "0.62387145", "0.623803", "0.6221625", "0.62214285", "0.62213635", "0.62213224", "0.62186843", "0.621513", "0.62004346", "0.61947143" ]
0.75396526
1
Listen to bootstrap event. Attaches the module's render listener to the application event manager instance.
Слушайте событие bootstrap. Прикрепляет прослушиватель отрисовки модуля к экземпляру менеджера событий приложения.
public function onBootstrap($e) { $app = $e->getApplication(); $events = $app->getEventManager(); $events->attach('render', [$this, 'onRender'], 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onBootstrap(MvcEvent $event)\n {\n $app = $event->getTarget();\n $events = $app->getEventManager();\n $events->attach(MvcEvent::EVENT_RENDER, array($this, 'onRender'), 100);\n }", "public function onBootstrap(MvcEvent $e)\n {\n /** @var ApplicationInterface $application */\n $application = $e->getTarget();\n $events = $application->getEventManager();\n $events->attach(MvcEvent::EVENT_RENDER, [$this, 'onRender'], 100);\n }", "public function onBootstrap($e)\n {\n \t// application\n \t$eventManager = $e->getApplication()->getEventManager();\n \t$moduleRouteListener = new ModuleRouteListener();\n \t$moduleRouteListener->attach($eventManager);\n \t\n \t$this->writeCssFile($e);\n \t$this->writeJsFile($e);\n }", "public function onBootstrap(MvcEvent $e)\n {\n // application\n $eventManager = $e->getApplication()->getEventManager();\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n }", "public function onBootstrap(MvcEvent $e)\n {\n // application\n $eventManager = $e->getApplication()->getEventManager();\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n }", "public function onBootstrap(MvcEvent $e)\n {\n // application\n $eventManager = $e->getApplication()->getEventManager();\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n }", "public function onBootstrap(MvcEvent $e)\n {\n // application\n $eventManager = $e->getApplication()->getEventManager();\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n }", "public function onBootstrap(MvcEvent $e)\n {\n // application\n $eventManager = $e->getApplication()->getEventManager();\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n\n $e->getApplication()->getEventManager()->getSharedManager()->attach('Zend\\Mvc\\Controller\\AbstractController', 'dispatch', array($this, 'setEdpModuleLayouts'), 100);\n $e->getApplication()->getEventManager()->getSharedManager()->attach('Zend\\Mvc\\Controller\\AbstractController', 'dispatch', array($this, 'setHeadValues'), 100);\n }", "public function onBootstrap(MvcEvent $e)\r\n {\r\n // application\r\n $eventManager = $e->getApplication()->getEventManager();\r\n $moduleRouteListener = new ModuleRouteListener();\r\n $moduleRouteListener->attach($eventManager);\r\n \r\n $app = $e->getParam(\"application\");\r\n $app->getEventManager()->attach('dispatch', array($this, 'setLayout'));\r\n \r\n //Register log event\r\n $log = $this->getLogger($e);\r\n //$events = StaticEventManager::getInstance();\r\n $sharedEventManager = $eventManager->getSharedManager();\r\n $sharedEventManager->attach('Advertise\\Controller\\AdvertiseController', 'log', function($event) use ($log){\r\n $target = get_class($event->getTarget());\r\n $message = $event->getParam('message', 'No message provided');\r\n $priority = (int) $event->getParam('priority', \\Zend\\Log\\Logger::INFO);\r\n $message = sprintf(\"%s: %s\", $target, $message);\r\n $log->log($priority, $message);\r\n });\r\n }", "public function onBootstrap(MvcEvent $e)\n {\n }", "public function onBootstrap(MvcEvent $event): void\n {\n // Get event manager.\n $eventManager = $event->getApplication()->getEventManager();\n\n // Register the event listener method.\n /** @noinspection UnusedFunctionResultInspection */\n $eventManager->attach(MvcEvent::EVENT_DISPATCH, [$this, 'onDispatch'], 100);\n }", "public function onBootstrap(MvcEvent $event)\n {\n // application\n $eventManager = $event->getApplication()->getEventManager();\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n\n $serviceLocator = $event->getApplication()->getServiceManager();\n $config = $serviceLocator->get('Config');\n $appConfig = isset($config['app_registry']) ? $config['app_registry'] : array();\n if (isset($appConfig['upload_path'])) {\n $uploaddableListener = $serviceLocator->get('Gedmo\\Uploadable');\n $uploaddableListener->setDefaultPath($appConfig['upload_path']);\n //$uploaddableListener->setDefaultPath(realpath($appConfig['upload_path']) . DIRECTORY_SEPARATOR . date('mY'));\n }\n\n $eventManager->attachAggregate(new \\Registry\\Event\\UserListener);\n $eventManager->attachAggregate(new \\Registry\\Event\\RegistryListener);\n $eventManager->attachAggregate(new \\Registry\\Event\\CommentListener);\n\n $cloudfrontConfig = isset($config['cloudfront']) ? $config['cloudfront'] : array();\n if (isset($cloudfrontConfig['domain']) && $serviceLocator->get('ViewHelperManager')->has('cloudfrontlink')) {\n $cloudfrontHelper = $serviceLocator->get('ViewHelperManager')->get('cloudfrontlink');\n $cloudfrontHelper->setDefaultDomain($cloudfrontConfig['domain']);\n }\n }", "public function onBootstrap(EventInterface $e)\n {\n $serviceManager = $e->getApplication()->getServiceManager();\n if (!$serviceManager->get(Environment::class)->is(\\Admin42\\Module::ENVIRONMENT_ADMIN)) {\n return;\n }\n $serviceManager\n ->get(MediaEventListener::class)\n ->attach($serviceManager->get('Media42\\EventManager'));\n }", "public function onBootstrap(EventInterface $event) {\n // application\n //$eventManager = $e->getApplication()->getEventManager();\n //$moduleRouteListener = new ModuleRouteListener();\n //$moduleRouteListener->attach($eventManager);\n $app = $event->getTarget();\n $serviceManager = $app->getServiceManager();\n //$config = $serviceManager->get('User\\Config');\n $ControllerGuard = $serviceManager->get('User\\Guard\\Controller');\n //$authorize = $serviceManager->get('User\\Service\\Authorize');\n $app->getEventManager()->attach($ControllerGuard);\n\n //$events->attach('dispatch', array($this, 'mvcPreDispatch'), -100);\n }", "public function onBootstrap(MvcEvent $event)\n {\n $eventManager = $event->getApplication()->getEventManager();\n\n $serviceManager = $event->getApplication()->getServiceManager();\n\n $config = $serviceManager->get('config');\n\n if(!isset($config['zf3turbo'])) {\n throw new Exception\\RuntimeException('Unable to load configuration; did you forget to create zf3turbo.global.php ?');\n }\n\n $listener = new \\Mecanik\\ZF3Turbo\\Listener\\ZF3TurboListener($config['zf3turbo']);\n\n $listener->attach($eventManager); \n }", "public function onBootstrap(MvcEvent $event) {\n // Get event manager.\n $eventManager = $event->getApplication()->getEventManager();\n $sharedEventManager = $eventManager->getSharedManager();\n // Register the event listener method. \n $sharedEventManager->attach(AbstractActionController::class, MvcEvent::EVENT_DISPATCH, [$this, 'onDispatch'], 100);\n\n //setup error handler\n $eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'handleError'));\n $eventManager->attach(MvcEvent::EVENT_RENDER_ERROR, array($this, 'handleError'));\n \n //set default sessionManager\n $sessionManager = $event->getApplication()->\n getServiceManager()->get('Zend\\Session\\SessionManager');\n }", "public function onBootstrap(MvcEvent $e)\n {\n $eventManager = $e->getApplication()->getEventManager();\n $serviceLocator = $e->getApplication()->getServiceManager();\n /** @var OutcomeListener $incomeListener */\n $incomeListener = $serviceLocator->get(OutcomeListener::class);\n $incomeListener->attach($eventManager);\n\n\n /** @var RenderListener $renderListener */\n $renderListener = $serviceLocator->get(RenderListener::class);\n $renderListener->attach($eventManager);\n\n /** @var Logger $logger */\n $logger = $serviceLocator->get('logger');\n Logger::registerErrorHandler($logger);\n Logger::registerExceptionHandler($logger);\n }", "public function onBootstrap(MvcEvent $event)\n {\n $application = $event->getApplication();\n $services = $application->getServiceManager();\n $config = $services->get('Config');\n $sharedEvents = $application->getEventManager()->getSharedManager();\n\n $this->view_config = isset($config['view_manager']) && (is_array($config['view_manager']) || $config['view_manager'] instanceof ArrayAccess)\n ? $config['view_manager']\n : [];\n\n $injectTemplateListener = $this->getInjectTemplateListener();\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($injectTemplateListener, 'injectTemplate'), -85);\n\n $this->processArazuConfig($config);\n }", "public function onBootstrap(MvcEvent $e)\n {\n $serviceManager = $e->getApplication()->getServiceManager();\n\n // Don't break console routes\n if ($e->getRequest() instanceof Request) {\n return;\n }\n\n //Add Domain Checker\n $onDispatchListener = $serviceManager->get(\n \\RcmAdmin\\EventListener\\DispatchListener::class\n );\n\n /** @var \\Zend\\EventManager\\EventManager $eventManager */\n $eventManager = $e->getApplication()->getEventManager();\n\n $eventManager->attach(\n MvcEvent::EVENT_DISPATCH,\n [\n $onDispatchListener,\n 'getAdminPanel'\n ],\n 10001\n );\n }", "public function onBootstrap(Event $e)\n {\n $application = $e->getApplication();\n $container = $application->getServiceManager();\n $oDbAdapter = $container->get(AdapterInterface::class);\n $tableGateway = $container->get(EventTable::class);\n\n # Register Filter Plugin Hook\n CoreEntityController::addHook('event-edit-after-save',(object)['sFunction'=>'writeSettingsToChildren','oItem'=>new EventController($oDbAdapter,$tableGateway,$container)]);\n }", "public function onBootstrap(\\Zend\\Mvc\\MvcEvent $e)\n\t{\n\t\t$event = $e->getApplication()->getServiceManager()->get('Freshbooks\\Event\\SettingsEvent');\n\t\t$event->register($this->sharedEvents);\n\n\t\t$event = $e->getApplication()->getServiceManager()->get('Freshbooks\\Event\\ViewEvent');\n\t\t$event->register($this->sharedEvents);\n\t}", "public function boot()\n {\n Event::listen('backend.page.beforeDisplay', function ($controller) {\n $controller->addCss(url('plugins/rainlab/docs/assets/css/link.css'));\n $controller->addJs(url('plugins/rainlab/docs/assets/js/linkInserter.js'), [\n 'id' => 'docs-link',\n 'data-label' => Lang::get('rainlab.docs::lang.links.docsLink'),\n ]);\n });\n }", "public function onBootstrap(MvcEvent $e)\n {\n\n //**********************************************************\n $eventManager = $e->getApplication()->getEventManager();\n\n //var_dump($datosCabecera);\n\n //$viewModel = $event->getResult();\n\n //$this->setLayout()\n\n // Eventos PreDistpach\n $eventManager->getSharedManager()->attach('Zend\\Mvc\\Controller\\AbstractController',\n MvcEvent::EVENT_DISPATCH,\n function(MvcEvent $event){\n\n //cho \"<script>alert('onDispatchBootstrap')</script>\";\n\n // Redirect\n// $request = $event->getRouteMatch();\n// $m = $request->setParam(\"module\",\"application\");\n// $c = $request->setParam(\"controller\",\"index\");\n// $a = $request->setParam(\"action\",\"index2\");\n// return;\n\n\n /**\n * Render switch layout with AJAX request\n */\n $request = $event->getRequest();\n $viewModel = $event->getResult();\n\n if($request->isXmlHttpRequest()) {\n $viewModel->setTerminal(true);\n }\n\n\n// //Render Ajax into view\n /* $result = $event->getResult();\n if ($result instanceof \\Zend\\View\\Model\\ViewModel) {\n $result->setTerminal($event->getRequest()->isXmlHttpRequest());\n }*/\n\n\n\n\n });\n\n /*$e->getTarget()-> la setVariable(\"someVar\",\"wwwwwwwwwwwwww\");\n\n echo \"<script>alert('onDispatchBootstrap')</script>\";*/\n\n //Routes dinamicos\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n\n\n }", "public function onBootstrap(MvcEvent $event)\n {\n // Get event manager.\n $eventManager = $event->getApplication()->getEventManager();\n $sharedEventManager = $eventManager->getSharedManager();\n\n $sharedEventManager->attach(AbstractActionController::class,\n MvcEvent::EVENT_DISPATCH, [$this, 'accessFilter'], 100);\n\n $sessionManager = $event->getApplication()->getServiceManager()->get(SessionManager::class);\n $this->forgetInvalidSession($sessionManager);\n\n $this->translateConfig($event);\n $this->setLayoutParams($event);\n }", "public function onBootstrap(MvcEvent $e)\n {\n // application\n $eventManager = $e->getApplication()->getEventManager();\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n \n $sm = $e->getApplication()->getServiceManager();\n $adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n \\Zend\\Db\\TableGateway\\Feature\\GlobalAdapterFeature::setStaticAdapter($adapter);\n }", "public function boot()\n {\n parent::boot();\n\n if (config('app.debug', false)) {\n // app events depend on the eloquent trigger\n Event::listen('eloquent.*', function ($eventName) {\n Tracking::put((object) ['event' => $eventName], 'app');\n });\n\n // layout init events\n Event::listen('creating:*', function ($eventName) {\n Tracking::put((object) ['event' => $eventName], 'lay');\n });\n\n // layout compose events\n Event::listen('composing:*', function ($eventName) {\n Tracking::put((object) ['event' => $eventName], 'lay');\n });\n\n // all events tracking trail\n Event::listen([\n '*.*',\n 'creating:*',\n 'composing:*',\n 'bootstrapped:*'\n ], function ($eventName) {\n Tracking::put((object) ['event' => $eventName], 'event');\n });\n }\n }", "private function bootEvents(): void\n {\n $dispatcher = $this->app[Dispatcher::class];\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n $dispatcher->listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n $this->listeners->call('boot', [$this], ListenerContainer::POSITIONS);\n $this->wasBooted = true;\n static::$staticInstance = $this;\n static::$staticContainer = $this->container;\n }", "public function onBootstrap(MvcEvent $e) {\n parent::onBootstrap($e);\n\n // get manager\n $eventManager = $e->getApplication()->getEventManager();\n $serviceManager = $e->getApplication()->getServiceManager();\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n\n //Init correct datetime fro oracle date object\n // $em = $e->getApplication()->getServiceManager()->get('Doctrine\\ORM\\EntityManager');\n // $em->getConnection()->query('ALTER SESSION SET NLS_DATE_FORMAT=\"YYYY-MM-DD HH24:MI:SS\"');\n\n // set translator for form validation error messages\n $translator = $serviceManager->get('translator');\n AbstractValidator::setDefaultTranslator($translator);\n }", "public function boot(){\n $this->_moduleResolver->resolve();\n\n $this->initAop();\n\n $this->_containerProvider->compile();\n\n $this->_eventDispatcher = $this->_containerProvider->provide()->get('event_dispatcher');\n\n $this->_eventDispatcher->dispatch(KernelEvent::BOOT, new KernelEvent(null, null));\n }", "public static function boot ()\n {\n parent::boot();\n self::observe(new ParentMenuObserver());\n }", "public function boot()\n {\n $this->package('modules/' . $this->getLowerName(), $this->getLowerName(), $this->path);\n\n $this->fireEvent('boot');\n }", "public function onBootstrap($event)\n {\n $application = $event->getApplication();\n $services = $application->getServiceManager();\n $config = $services->get('Config');\n $events = $application->getEventManager();\n $sharedEvents = $events->getSharedManager();\n\n $this->config = isset($config['view_manager']) && (is_array($config['view_manager']) || $config['view_manager'] instanceof ArrayAccess)\n ? $config['view_manager']\n : array();\n $this->services = $services;\n $this->event = $event;\n\n $routeNotFoundStrategy = $this->getRouteNotFoundStrategy();\n $exceptionStrategy = $this->getExceptionStrategy();\n $mvcRenderingStrategy = $this->getMvcRenderingStrategy();\n $createViewModelListener = new CreateViewModelListener();\n $injectTemplateListener = new InjectTemplateListener();\n $injectViewModelListener = new InjectViewModelListener();\n\n $this->registerMvcRenderingStrategies($events);\n $this->registerViewStrategies();\n\n $events->attach($routeNotFoundStrategy);\n $events->attach($exceptionStrategy);\n $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($injectViewModelListener, 'injectViewModel'), -100);\n $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($injectViewModelListener, 'injectViewModel'), -100);\n $events->attach($mvcRenderingStrategy);\n\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($createViewModelListener, 'createViewModelFromArray'), -80);\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($routeNotFoundStrategy, 'prepareNotFoundViewModel'), -90);\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($createViewModelListener, 'createViewModelFromNull'), -80);\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($injectTemplateListener, 'injectTemplate'), -90);\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($injectViewModelListener, 'injectViewModel'), -100);\n }", "public function bootstrap()\n { \t\n $eventManager = $this->getEventManager();\n $eventManager->attachAggregate(new RouteListener());\n $eventManager->attachAggregate(new DispatchListener());\n $eventManager->attachAggregate(new ViewListener());\n\n // Setup MVC Event\n $this->event = $event = new MvcEvent();\n $event->setTarget($this);\n $event->setApplication($this)\n ->setRequest($this->getRequest())\n ->setResponse($this->getResponse())\n ->setRouter($this->router);\n\n // Trigger bootstrap events\n $eventManager->trigger('bootstrap', $event);\n return $this;\n }", "public function boot()\n {\n parent::boot();\n\n $modules = config('bifrost.modules', []);\n foreach ($modules as $moduleName => $moduleConfig)\n {\n $subscribers = data_get($moduleConfig, 'eventSubscribers', []);\n foreach ($subscribers as $subscriber) {\n Event::subscribe($subscriber);\n }\n }\n }", "public function onKernelResponse(ControllerEvent $event): void\n {\n $this->extensionRegistry->initializeAll($this->widgets, $this->config, $this->twig, $this->dispatcher);\n }", "public function onBootstrap(EventInterface $e)\n {\n $app = $e->getApplication();\n $container = $app->getServiceManager();\n\n /**\n * @var Environment $env\n */\n $config = $container->get('Configuration');\n $env = $container->get(Environment::class);\n $name = static::MODULE_NAME;\n $options = $envOptions = empty($config[$name]) ? [] : $config[$name];\n $extensions = empty($options['extensions']) ? [] : $options['extensions'];\n $renderer = $container->get(TwigRenderer::class);\n\n // Setup extensions\n foreach ($extensions as $extension) {\n // Allows modules to override/remove extensions.\n if (empty($extension)) {\n continue;\n } elseif (is_string($extension)) {\n if ($container->has($extension)) {\n $extension = $container->get($extension);\n } else {\n $extension = new $extension($container, $renderer);\n }\n } elseif (!is_object($extension)) {\n throw new InvalidArgumentException('Extensions should be a string or object.');\n }\n\n if (!$env->hasExtension(get_class($extension))) {\n $env->addExtension($extension);\n }\n }\n\n return;\n }", "protected static function boot() {\n\t\tself::scanEvents();\n\t}", "function InstallEvents(){\n // RegisterModuleDependences('main', 'OnEndBufferContent', $this->MODULE_ID, self::moduleClassEvents, 'OnEndBufferContentHandler');\n\n return true;\n }", "public function run()\n {\n $dispatcher = EventDispatcher::getInstance();\n $dispatcher->attachListener(Events::PAGE_ADD_JS, $this, 'addJs');\n $dispatcher->attachListener(Events::PAGE_ADD_CSS, $this, 'addCss');\n }", "public function onBootstrap(MvcEvent $e)\n {\n $eventManager = $e->getApplication()->getEventManager();\n $serviceManager = $e->getApplication()->getServiceManager();\n $config = $serviceManager->get('Config');\n\n //set default timezone from config\n if(isset($config['myapp']['timezone'])){\n date_default_timezone_set($config['myapp']['timezone']);\n }\n\n //set error reporting from config\n if(isset($config['myapp']['environment']['error_reporting'])){\n error_reporting($config['myapp']['environment']['error_reporting']);\n }\n\n //set display errors from config\n if(isset($config['myapp']['environment']['display_errors'])){\n ini_set('display_errors', $config['myapp']['environment']['display_errors']);\n }\n\n //set display exceptions from config\n if(isset($config['myapp']['environment']['display_exceptions'])){\n ini_set('display_exception', $config['myapp']['environment']['display_exceptions']);\n }\n\n //log exceptions\n $eventManager->attach('dispatch.error', function($e){\n $exception = $e->getResult()->exception;\n if ($exception) {\n\n $serviceManager = $e->getApplication()->getServiceManager();\n $config = $serviceManager->get('Config');\n\n //if logging exceptions\n if(isset($config['myapp']['environment']['log_exceptions'])\n && $config['myapp']['environment']['log_exceptions']){\n\n //create logger\n $log = new Logger('exceptions');\n\n //log to file\n if(isset($config['myapp']['environment']['log_file'])\n && $config['myapp']['environment']['log_file']){\n\n $formatter = new \\Monolog\\Formatter\\LineFormatter();\n $formatter->includeStacktraces(true);\n\n $streamHandler = new StreamHandler($config['myapp']['environment']['log_file'], Logger::ERROR);\n $streamHandler->setFormatter($formatter);\n $log->pushHandler($streamHandler);\n\n }\n\n //log to loggly\n if(isset($config['myapp']['environment']['log_loggly'])\n && $config['myapp']['environment']['log_loggly']){\n\n $log->pushHandler(new LogglyHandler($config['myapp']['environment']['log_loggly'], Logger::ERROR));\n }\n\n $log->error($exception);\n\n }\n }\n });\n\n //change the layout based on the controller\n //fix-me: convert this to a configuration file\n $eventManager->attach(MvcEvent::EVENT_DISPATCH, function($e) {\n $controller = $e->getTarget();\n if($e->getRequest()->isXmlHttpRequest()) {\n $controller->layout('layout/ajax');\n }\n });\n\n //attach the event manager to the module route listener so that we can change the layout based on route paramaters\n $moduleRouteListener = new ModuleRouteListener();\n $moduleRouteListener->attach($eventManager);\n\n //get the router, request and matched route\n $router = $serviceManager->get('router');\n $request = $serviceManager->get('request');\n $matchedRoute = $router->match($request);\n\n //we are going to inject some variables into the view model so that we can use them later\n if($matchedRoute){\n\n $params = $matchedRoute->getParams();\n\n $controller = $params['controller'];\n $action = $params['action'];\n\n if(isset($params['__NAMESPACE__'])){\n $module_array = explode('\\\\', $params['__NAMESPACE__']);\n $module = $module_array[0];\n }else{\n $module = $controller;\n }\n\n $route = $matchedRoute->getMatchedRouteName();\n\n //force canonical for blog-posts\n if($route=='blog-post'){\n unset($params['category']);\n }\n\n\n if(!in_array($route,array('doctrine_cli'))){\n $url = $serviceManager->get('ViewHelperManager')->get('url')->__invoke($route,$params, array('force_canonical' => true));\n }\n\n //$url = $this->url($route, array('id' => 123), array('force_canonical' => true);\n $e->getViewModel()->setVariables(\n array(\n 'CURRENT_MODULE_NAME' => $module,\n 'CURRENT_CONTROLLER_NAME' => $controller,\n 'CURRENT_ACTION_NAME' => $action,\n 'CURRENT_ROUTE_NAME' => $route,\n 'CANONICAL_URL' => $url,\n )\n );\n\n }\n\n }", "public function onBootstrap(MvcEvent $event)\n {\n $application = $event->getApplication();\n $services = $application->getServiceManager();\n $events = $services->get('queue')->getEventManager();\n $config = $services->get('queue')->getConfig();\n\n // unless disabled, attach listener to process ping tasks\n if (!$config['disable_trigger_diagnostics']) {\n $events->attach(new PingListener($services));\n }\n }", "public function bootstrap(): void\n {\n $this->hasBeenBootstrapped = true;\n\n $this['events']->dispatch('bootstrapping', [$this]);\n $this->boot();\n $this['events']->dispatch('bootstrapped', [$this]);\n }", "public function boot()\n {\n// if (defined('MENU_ACTION_SIDEBAR_OPTIONS')) {\n// add_action(MENU_ACTION_SIDEBAR_OPTIONS, [$this, 'registerMenuOptions'], 2);\n// }\n //add_filter(DASHBOARD_FILTER_ADMIN_LIST, [$this, 'registerDashboardWidgets'], 21, 2);\n add_filter(BASE_FILTER_PUBLIC_SINGLE_DATA, [$this, 'handleSingleView'], 2, 1);\n\n Event::listen(SessionStarted::class, function () {\n admin_bar()->registerLink('Service', route('service.create'), 'add-new');\n });\n }", "protected function registerEvents()\n {\n $this->emitter->on('app.start', new OnStartEvent($this->logger['kernel'], Config::get('site.name')));\n $this->emitter->on('app.finish', new OnFinishEvent($this->logger['kernel'], Config::get('site.name')));\n $this->emitter->on('app.middleware.load', new OnLoadMiddlewareEvent($this->logger['slim']));\n }", "public function init()\n {\n // event that allows returning a component to replace the standard status update form\n OW::getEventManager()->bind('feed.get_status_update_cmp', array($this, 'onStatusUpdateCreate'));\n OW::getEventManager()->bind(OW_EventManager::ON_APPLICATION_INIT, array($this, 'onApplicationInit'));\n OW::getEventManager()->bind('feed.on_item_render', array($this, 'onItemRender'));\n OW::getEventManager()->bind('feed.before_action_delete', array($this, 'onBeforePostDelete'));\n }", "public function boot()\n {\n parent::boot();\n\n Event::listen('laravels.received_request', function (\\Illuminate\\Http\\Request $req, $app) {\n //创建sentinel 客户端\n $sentinel = new \\Sentinel\\SentinelClient(env('SENTINEL_HOST', 'localhost'), env('SENTINEL_PORT', '9000'));\n try {\n $sentinelHelloEntry = $sentinel->entry(\"hello\");\n } catch (\\Sentinel\\BlockException $e) {\n $sentinelHelloEntry = null;\n throw $e;\n } finally {\n $sentinelHelloEntry = null;\n }\n });\n\n// Event::listen('ServerStart', function ($swoole_server){\n// //服务注册\n// ServiceHandler::register();\n// });\n //\n }", "public function attachGlobalEvents();", "public function boot(EventDispatcher $event)\n {\n $this->fullBoot('auth', __DIR__.'/../');\n $event->listen('Lembarek\\Auth\\Events\\UserHasCreated', 'Lembarek\\Auth\\Listeners\\SendWelcomeMessage');\n }", "public static function boot() \n\t{\n parent::boot();\n \n // FingerPrint::observe(new FingerPrintObserver());\n }", "public function appBootstrap ()\n {\n $this->frontController->registerPlugin(new Initializer('test'));\n }", "public function run()\n {\n // We need an instatance of EventDispatcher class to attach handlers to\n // events. So get it.\n $dispatcher = EventDispatcher::getInstance();\n // There are a lot of events. Use a few of them to show how they work.\n $dispatcher->attachListener(Events::PAGE_ADD_CSS, $this, 'addCustomCss');\n }", "public function appBootstrap ()\r\n {\r\n $this->frontController->registerPlugin(new Initializer('test'));\r\n }", "protected function registerEvents() {\n\t\t$this->app->bindShared('events', function() {\n\t\t\treturn new Dispatcher;\n\t\t});\n\t}", "public function boot()\n { \n $this->app->booted(function($app) {\n \\Event::listen(OrderCompleted::class, Listeners\\OrderCompleted::class); \n\n $component = $app['site']->get('easy-license')->components()->first(function($component) {\n return $component->name() == 'checkout';\n });\n\n $component->config([\n 'layout' => 'phoenix'\n ]); \n \n \n $component = $app['site']->get('easy-license')->components()->first(function($component) {\n return $component->name() == 'credit';\n });\n\n $component->config([\n 'layout' => 'mdarman-license-order'\n ]);\n }); \n }", "public function boot()\n {\n if (!\\App::runningInBackend()) {\n return;\n }\n\n // Listen for `backend.page.beforeDisplay` event and inject js to current controller instance.\n \\Event::listen('backend.page.beforeDisplay', function($controller, $action, $params) {\n $controller->addJs('/plugins/kubamarkiewicz/translations/assets/js/multilingual-fix.js');\n });\n }", "public function onRun()\n {\n \t$this->addCss('/plugins/beysong/proevent/assets/bootstrapvalidator/dist/css/bootstrapValidator.css');\n \t$this->addJs('/plugins/beysong/proevent/assets/bootstrapvalidator/dist/js/bootstrapValidator.min.js');\n $this->addJs('/plugins/beysong/proevent/assets/pingpp/src/pingpp-pc.js');\n \t$this->addJs('/plugins/beysong/proevent/assets/js/events.js');\n //\t$event_id = $this->property('events');\n //\t$tickets = BeysongEvent::find($event_id)->tickets;\n //\t$this->page['tickets'] = $tickets;\n\n }", "public function addEvent()\n {\n C::Event()->addListener($this->module, $this->name, static::class . '.fire');\n }", "public function onBootstrap(MvcEvent $e) {\n $config = $e->getApplication()->getServiceManager()->get('config');\n if (!isset($config['role_wise_layouts'])) {\n return;\n }\n $e->getApplication()->getEventManager()->getSharedManager()\n ->attach(Application::class, 'dispatch', function($e) {\n $sm = $e->getApplication()->getServiceManager();\n $authService = $sm->get(AccessService::class);\n $roles = $authService->getRoles();\n if ($roles === false) {\n return;\n }\n $config = $e->getApplication()->getServiceManager()->get('config');\n if (isset($config['role_wise_layouts'])) {\n $key = $this->getMatchedeElement(array_keys($config['role_wise_layouts']), $roles);\n if ($key !== false) {\n $e->getViewModel()->setTemplate($config['role_wise_layouts'][$key]);\n }\n }\n }, 100);\n $e->getApplication()->getEventManager()->getSharedManager()\n ->attach(Application::class, 'dispatch.error', function($e) {\n $sm = $e->getApplication()->getServiceManager();\n $authService = $sm->get(AccessService::class);\n $roles = $authService->getRoles();\n if ($roles === false) {\n return;\n }\n $config = $e->getApplication()->getServiceManager()->get('config');\n if (isset($config['role_wise_layouts'])) {\n $key = $this->getMatchedeElement(array_keys($config['role_wise_layouts']), $roles);\n if ($key !== false) {\n $e->getViewModel()->setTemplate($config['role_wise_layouts'][$key]);\n }\n }\n }, 100);\n //For layout according to user role END\n }", "protected function bootstrap()\n {\n // Define the default renderer for validation error messages\n $this->validatorFactory->setRenderer(new Renderer\\StandardJson());\n\n // Define a directory where partial template fragments must be stored\n $this->view->getPartialBag()\n ->addPartialDir($this->view->createThemePath('Site', $this->appConfig->getTheme()).'/partials/');\n\n // Append required assets\n $this->view->getPluginBag()->appendStylesheets(array(\n '@Site/bootstrap/css/bootstrap.min.css',\n '@Site/styles.css'\n ));\n\n // Append required script paths\n $this->view->getPluginBag()->appendScripts(array(\n '@Site/jquery.min.js',\n '@Site/bootstrap/js/bootstrap.min.js',\n '@Site/krystal.jquery.js'\n ));\n\n // Add shared variables\n $this->view->addVariables(array(\n 'isLoggedIn' => $this->getAuthService()->isLoggedIn()\n ));\n\n // Define the main layout\n $this->view->setLayout('__layout__');\n }", "public function boot()\n {\n // 启动模块\n $this->app['modules']->boot();\n }", "public function boot()\n {\n /*Event::listen(TaskEvent::class, [TaskEventListener::class,'handle']\n );\n Event::listen(function (TaskEvent $event){\n\n });*/\n }", "public function boot()\n {\n Stat::observe(StatObserver::class);\n\n }", "public function boot()\n {\n Item::observe(ItemObserver::class);\n }", "public function boot()\n {\n $this->listenMenuModelEvents();\n }", "protected function registerEvents()\n {\n $this->app->bindIf('events', function () {\n return new Dispatcher();\n }, true);\n }", "public static function boot() \n\t{\n parent::boot();\n\n\t\tStatus::observe(new StatusObserver);\n }", "private function listen()\n {\n $this->emitter->on('suite.start', [$this, 'onSuiteStart']);\n }", "protected function bootstrap()\n {\n // Validate the request on demand\n $this->validateRequest();\n\n // Define the default renderer for validation error messages\n $this->validatorFactory->setRenderer(new Renderer\\StandardJson());\n\n // Define a directory where partial template fragments must be stored\n $this->view->getPartialBag()\n ->addPartialDir($this->view->createThemePath('Site', $this->appConfig->getTheme()).'/partials/');\n\n // Append required assets\n $this->view->getPluginBag()->appendStylesheets($this->stylesheets);\n\n // Append required script paths\n $this->view->getPluginBag()->appendScripts($this->scripts);\n\n // Add shared variables\n $this->view->addVariables(array(\n 'isLoggedIn' => $this->getAuthService()->isLoggedIn()\n ));\n\n // Define the main layout\n $this->view->setLayout('__layout__', 'Site');\n }", "public function boot()\n\t{\n\t\tTag::observe(TagObserver::class);\n\t}", "public function onBootstrap(MvcEvent $event)\n {\n $application = $event->getApplication();\n $services = $application->getServiceManager();\n $formats = $services->get('formats');\n\n $formats->addHandler(\n new FormatHandler(\n // can-preview callback\n function ($file, $extension, $mimeType, $request) {\n // don't render markdown when diffing\n if ($request && $request->getUri()->getPath() == '/diff') {\n return false;\n }\n return in_array(\n $extension,\n array('markdown', 'mdown', 'mkdn', 'md', 'mkd', 'mdwn', 'mdtxt', 'mdtext')\n );\n },\n // render-preview callback\n function ($file, $extension, $mimeType) use ($services) {\n $helpers = $services->get('ViewHelperManager');\n $purifiedMarkdown = $helpers->get('purifiedMarkdown');\n\n $maxSize = 1048576; // 1MB\n $contents = $file->getDepotContents(\n array(\n $file::UTF8_CONVERT => true,\n $file::UTF8_SANITIZE => true,\n $file::MAX_FILESIZE => $maxSize\n )\n );\n\n return '<div class=\"view view-md markdown\">'\n . $purifiedMarkdown($contents)\n . '</div>';\n }\n ),\n 'markdown'\n );\n\n // override the view template\n $application->getEventManager()->attach('dispatch', array($this, 'setTemplate'), -100);\n }", "public function bootstrap()\n\t{\n\t\t$this->fireBootingCallbacks();\n\t\t\n\t\trequire config('ghost.bootstrap', app_path('Http/Lib/bootstrap.php'));\n\t\t\n//\t\t$this->addAdminAssets();\n\t\t\n\t\t$this->fireBootedCallbacks();\n\t}", "public function boot()\n {\n Preorder::observe(PreorderObserver::class);\n }", "private function bootstrap()\n {\n if (app()->bound(self::SENTRY)) {\n $handler = new RavenHandler(app(self::SENTRY), config(self::SENTRY_LEVEL, Logger::WARNING));\n $handler->setFormatter(new LineFormatter(\"%message% %context%\\n\"));\n\n /**\n * @var $monolog Logger\n */\n $monolog = Log::driver();\n $monolog->pushHandler($handler);\n }\n }", "public function init()\n\t{\n\n\t\t$this->setComponents([\n\t\t\t'label' => Label::class\n\t\t]);\n\n\t\tparent::init();\n\n\t\tCraft::$app->getView()->registerTwigExtension(new TwigExtension());\n\n\t\tEvent::on(\n\t\t\tView::class,\n\t\t\tView::EVENT_BEFORE_RENDER_PAGE_TEMPLATE,\n\t\t\tfunction (Event $event) {\n\t\t\t\tEnvironmentLabel::getInstance()->label->doItBaby();\n\t\t\t}\n\t\t);\n\n\t}", "protected function _setupApplication()\n {\n $this->getCubex()->listen(\n ResponsePreSendHeadersEvent::class,\n function (ResponsePreSendHeadersEvent $e) {\n $r = $e->getResponse();\n if($r instanceof Response && $e->getContext()->isEnv(Context::ENV_LOCAL))\n {\n $r->enableDebugHeaders();\n }\n }\n );\n }", "protected function bootstrap()\n\t{\n\t\t$request = $this->getRequest();\n\t\t$this->setResponse($request);\n\t}", "function onLoad()\r\n {\r\n //Initialize any event handlers\r\n $this->registerEventHandler('new_event', 'on_new_event');\r\n }", "protected function bootMemoryEvent()\n {\n $app = $this->app;\n /** looking for forms * */\n //$app->make('events')->listen('antares.forms', function ($name) use ($app) {\n $app->make('events')->listen(Form::class, function (Form $event) use ($app) {\n $app->make('antares.memory')->make('registry.forms')->put('forms', $event->formName);\n });\n /** when application is terminating we collect all data from application * */\n $app->terminating(function () use ($app) {\n if (!app('antares.installed')) {\n //$app->make('antares.memory')->finish();\n }\n });\n //$app->make('events')->listen('antares.after.load-service-providers', function() {\n $app->make('events')->listen(LoadServiceProviders::class, function() {\n $this->app->make('antares.defered.service')->run();\n });\n }", "public function boot(Bootstrap $bootstrap) {\n }", "public function onBootstrap(MvcEvent $event)\n {\n $application = $event->getApplication();\n $services = $application->getServiceManager();\n $formats = $services->get('formats');\n\n $formats->addHandler(\n new FormatHandler(\n // can-preview callback\n function ($file, $extension, $mimeType, $request) {\n // Returning false here will mean we never render markdown for diffs and file\n // preview. We need to improve markdown display configuration with regards to\n // the actual display and any size limit and how that effects display for\n // diff vs view vs project overview. Note this does not effect the display of\n // markdown in the project overview.\n //\n // see https://jira.perforce.com:8443/browse/SW-4196\n // see https://jira.perforce.com:8443/browse/SW-4191\n return false;\n },\n // render-preview callback\n function ($file, $extension, $mimeType) use ($services) {\n $helpers = $services->get('ViewHelperManager');\n $purifiedMarkdown = $helpers->get('markupMarkdown');\n\n $maxSize = 1048576; // 1MB\n $contents = $file->getDepotContents(\n array(\n $file::UTF8_CONVERT => true,\n $file::UTF8_SANITIZE => true,\n $file::MAX_FILESIZE => $maxSize\n )\n );\n\n return '<div class=\"view view-md markdown\">'\n . $purifiedMarkdown($contents)\n . '</div>';\n }\n ),\n 'markdown'\n );\n }", "public function boot()\n {\n $this->registerLivewireComponents();\n $this->registerHubSlots();\n }", "public function bootExtensionComponents()\n {\n $path = __DIR__ . '/../';\n $this->addConfigComponent('antares/notifications', 'antares/notifications', \"{$path}/resources/config\");\n $this->addLanguageComponent('antares/notifications', 'antares/notifications', \"{$path}/resources/lang\");\n $this->addViewComponent('antares/notifications', 'antares/notifications', \"{$path}/resources/views\");\n $this->bootMemory();\n $this->attachMenu(NotificationsTopMenuHandler::class);\n if (config('antares/notifications::sockets')) {\n publish('notifications', 'scripts.default');\n }\n $this->attachMenu(NotificationsBreadcrumbMenu::class);\n $this->app->make('view')->composer('antares/notifications::admin.logs.config', ControlPane::class);\n\n Option::observe(new ConfigurationListener());\n }", "public function attachDefaultListeners ()\n {\n $events = $this->getEventManager();\n\n // preInit\n if (method_exists($this, 'preInit'))\n $events->attach(Event::EVENT_INIT, array($this, 'preInit'), 1000);\n\n // onInit\n if (method_exists($this, 'onInit'))\n $events->attach(Event::EVENT_INIT, array($this, 'onInit'));\n\n // postInit\n if (method_exists($this, 'postInit')) {\n $events->attach(Event::EVENT_INIT, array($this,'postInit'), -100);\n }\n\n // render event\n if (method_exists($this, 'load')) {\n $sharedEventManager = $events->getSharedManager();\n // $sharedEventManager->attach('Zend\\Mvc\\Application', MvcEvent::EVENT_RENDER, array( $this, 'load' ), -10000);\n }\n }", "public function onConsoleResponse(ConsoleCommandEvent $event): void\n {\n $this->extensionRegistry->initializeAll($this->widgets, $this->config, $this->twig, $this->dispatcher);\n }", "public function boot()\n {\n //\n $this->observersHandle();\n }", "public function boot(){\n Event::listen('store.created', 'App\\Events\\EmailStoreCreated@handle');\n }", "public function boot(): void\n {\n Brand::observe(BrandObserver::class);\n User::observe(UserObserver::class);\n Style::observe(StyleObserver::class);\n }", "public function bootEvents()\n {\n $events = app('events');\n\n foreach ($this->listen 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 }", "public function boot()\n {\n $this->bootModuleComponents();\n\n /*\n * Delayed until app is fully booted, because we need the current theme to be registered.\n * Modules\\Setting\\Providers\\ThemeServiceProvider::register()\n */\n $this->app->booted(function () {\n $this->registerBlockBladeDirective();\n });\n }", "function RaisePreRenderEvents();", "protected function bootstrap(){\n\t\t$this->frameworkAdapter->bootstrap();\n\t\t$this->output->bootstrap();\n\t}", "public function boot()\n {\n $this->listen();\n $this->subscribe();\n $this->logger();\n }", "public function boot()\n {\n $this->registerDatabaseMacros();\n $this->addModuleEventListeners();\n }", "public function boot()\n {\n // 3 days\n $minutes = (1440 * 3);\n\n $this->listen = Cache::remember('event_listeners', $minutes, function() {\n // build listen list\n $modules = Module::all();\n\n // array to return, containaing\n // keys of event class paths and\n // listener class paths\n $listen = [];\n\n // aray of events\n $events = [];\n\n // array of listeners\n $listeners = [];\n foreach($modules as $module) {\n // find all events\n $files = Storage::disk('plugins')->files(ucfirst($module['slug']) . '/Events');\n\n if (!empty($files)) {\n foreach($files as $file) {\n $path = str_replace('/', '\\/', $file);\n\n $class = basename($file);\n $class = str_replace('.php', '', $class);\n\n $path = str_replace('/', '', 'App\\Modules\\/' . $path);\n $path = str_replace('.php', '', $path);\n\n $events[$class] = $path;\n }\n }\n\n // find all listeners\n $files = Storage::disk('plugins')->files(ucfirst($module['slug']) . '/Listeners');\n\n if (!empty($files)) {\n foreach($files as $file) {\n $path = str_replace('/', '\\/', $file);\n\n $class = basename($file);\n $class = str_replace('.php', '', $class);\n\n if (!isset($listeners[$class])) {\n $listeners[$class] = [];\n }\n\n $path = str_replace('/', '', 'App\\Modules\\/' . $path);\n $path = str_replace('.php', '', $path);\n\n $listeners[$class][] = $path;\n }\n }\n }\n\n if (!empty($events) && !empty($listeners)) {\n foreach($events as $class => $path) {\n $listenerClass = str_replace('Event', 'Listener', $class);\n\n if (!empty($listeners[$listenerClass])) {\n $listen[$path] = $listeners[$listenerClass];\n }\n }\n }\n\n return $listen;\n });\n\n parent::boot();\n\n //\n }", "protected static function boot()\n\t{\n\t\tparent::boot();\n\t\t\n\t\tPackage::observe(PackageObserver::class);\n\t\t\n\t\tstatic::addGlobalScope(new ActiveScope());\n\t}", "public function boot()\n {\n Book::observe(BookObserver::class);\n Series::observe(SeriesObserver::class);\n Periodic::observe(PeriodicObserver::class);\n Quote::observe(QuoteObserver::class);\n Amel::observe(AmelObserver::class);\n Publication::observe(PublicationObserver::class);\n Cover::observe(CoverObserver::class);\n File::observe(FileObserver::class);\n Image::observe(ImageObserver::class);\n \n view()->composer('*', HomeComposer::class);\n }", "function doInit()\n {\n include dirname(__FILE__) . '/config.php';\n\n /** @var EventDispatcher $dispatcher */\n $dispatcher = \\App\\Config::getInstance()->getEventDispatcher();\n $dispatcher->addSubscriber(new \\Tk\\Ml\\Listener\\MailLogHandler());\n $dispatcher->addSubscriber(new \\Tk\\Ml\\Listener\\MenuHandler());\n\n }", "protected static function boot()\n {\n parent::boot();\n static::observe(new BasicModelObserver());\n }", "public function boot()\n {\n Broadcast::routes();\n\n if (blank($this->modules) && is_readable($this->bundleBasePath . '/Interfaces/Http/Broadcast/channels.php')) {\n require_once $this->bundleBasePath . '/Interfaces/Http/Broadcast/channels.php';\n return;\n }\n\n $modulesNames = array_keys($this->modules);\n\n foreach ($modulesNames as $moduleName)\n {\n if (is_readable($this->bundleBasePath . '/' . $moduleName . '/Interfaces/Http/Broadcast/channels.php')) {\n require_once $this->bundleBasePath . '/' . $moduleName . '/Interfaces/Http/Broadcast/channels.php';\n }\n }\n }" ]
[ "0.7412147", "0.7274157", "0.7202705", "0.68885314", "0.68885314", "0.68885314", "0.68885314", "0.6825447", "0.6719995", "0.6685989", "0.6662744", "0.65900797", "0.65799534", "0.6564925", "0.65242994", "0.6485345", "0.63521487", "0.63193226", "0.63185", "0.62972426", "0.62791735", "0.62730163", "0.62132967", "0.61764175", "0.61661077", "0.6082253", "0.60800046", "0.6076286", "0.59635943", "0.59521997", "0.59334433", "0.5917942", "0.5900305", "0.58883804", "0.5875881", "0.58712214", "0.5870976", "0.586482", "0.5847052", "0.5845653", "0.5817242", "0.58093077", "0.58068633", "0.58023673", "0.58010334", "0.57820475", "0.57402503", "0.5735501", "0.57213956", "0.5708961", "0.57035136", "0.57006097", "0.5673223", "0.5672833", "0.5670577", "0.56659883", "0.56651914", "0.5664114", "0.5661064", "0.56488794", "0.5648816", "0.56487453", "0.56463814", "0.5646104", "0.56394", "0.5631752", "0.5625834", "0.5624731", "0.56214976", "0.56028223", "0.5598964", "0.55971485", "0.559142", "0.559109", "0.5583075", "0.55801487", "0.557194", "0.5566645", "0.55614203", "0.55569434", "0.5553215", "0.5551429", "0.55461186", "0.55447686", "0.5542247", "0.554222", "0.55376893", "0.55293816", "0.5528981", "0.55201817", "0.55194753", "0.55172145", "0.55140346", "0.5511751", "0.550257", "0.55005753", "0.5499506", "0.54982924", "0.54961383", "0.54956955" ]
0.7713895
0
Listen to render event. Attaches the SwaggerViewStrategy to the view event manager instance if a Swagger view model is detected.
Слушайте событие рендера. При обнаружении модели Swagger привязывает SwaggerViewStrategy к экземпляру менеджера событий view.
public function onRender($e) { $model = $e->getResult(); if (! $model instanceof ViewModel) { return; } $app = $e->getApplication(); $services = $app->getServiceManager(); $view = $services->get('View'); $events = $view->getEventManager(); $services->get(SwaggerViewStrategy::class)->attach($events); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n {\n $view = $this->event->getView();\n if ($view instanceof View) {\n $this->renderingStrategy->setView($view);\n\n // Setting the rendered view as the response\n $this->event->getResponse()->setBody($this->renderingStrategy->render());\n }\n }", "public function onRender(MvcEvent $event)\n {\n $result = $event->getResult();\n\n if (!$result instanceof View\\YamlModel) {\n return;\n }\n\n $app = $event->getTarget();\n $services = $app->getServiceManager();\n\n if ($services->has('View')) {\n $view = $services->get('View');\n $events = $view->getEventManager();\n\n // register at high priority, to \"beat\" normal json strategy registered\n // via view manager, as well as HAL strategy.\n $services->get(YamlStrategy::class)->attach($events, 100);\n }\n }", "public function onRender(MvcEvent $e)\n {\n $result = $e->getResult();\n if (! $result instanceof View\\HalJsonModel) {\n return;\n }\n\n /** @var Application $application */\n $application = $e->getTarget();\n $services = $application->getServiceManager();\n $events = $services->get('View')->getEventManager();\n\n // register at high priority, to \"beat\" normal json strategy registered\n // via view manager\n /** @var HalJsonStrategy $halStrategy */\n $halStrategy = $services->get('Laminas\\ApiTools\\Hal\\JsonStrategy');\n $halStrategy->attach($events, 200);\n }", "private function dispatcher()\n {\n $route = $this->serviceLocator->get('router')->getByRequest();\n\n $controller = $this->getController($route);\n\n $view = $this->getView($route, $controller);\n \n $this->serviceLocator->get('response')->setView($view);\n $this->serviceLocator->get('response')->render();\n }", "protected function getApiPlatform_Listener_View_RespondService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/api-platform/core/src/EventListener/RespondListener.php';\n\n return $this->privates['api_platform.listener.view.respond'] = new \\ApiPlatform\\Core\\EventListener\\RespondListener(($this->privates['api_platform.metadata.resource.metadata_factory.cached'] ?? $this->getApiPlatform_Metadata_Resource_MetadataFactory_CachedService()));\n }", "public function onKernelView(ViewEvent $event) {\n $controller_result = $event->getControllerResult();\n\n if ($controller_result instanceof ResponseInterface) {\n $event->setResponse($this->httpFoundationFactory->createResponse($controller_result));\n }\n\n }", "public function render()\n {\n $this->view->render($this->_response);\n }", "public function renderView($descriptorInstance);", "public function render() {\n\t\t$view = new View($this->route, $this->view, $this->layout, $this->meta);\n\n\t\t$view->run($this->vars);\n\t}", "public function injectResponse(ViewEvent $e)\n {\n $renderer = $e->getRenderer();\n if ($renderer !== $this->renderer) {\n return;\n }\n }", "private function renderView(){\n $this->beforeRender();\n $this->viewObj = new NodeView($this->view, $this->layout, $this->viewData, $this->title, $this);\n $this->viewObj->render();\n $this->afterRender();\n }", "function render(View $view);", "public function processRequest()\r\n {\r\n return $this->renderView(\"LeaguesView\",\"application\\view\\ListView\");\r\n /*\r\n $viewModel=new $this->target($this->model);\r\n if($view){\r\n $this->view($viewModel);\r\n }\r\n else{\r\n $this->deploy($viewModel);\r\n }*/\r\n }", "public function render()\n {\n $this->preRenderAll();\n if ($this->sLayout) {\n $this->renderLayout();\n } else {\n $this->renderView();\n }\n }", "public function registerViewStrategy(MvcEvent $e)\r\n\t{\r\n\t\t$application = $e->getTarget();\r\n\t\t$manager = $application->getServiceManager();\r\n\t\t\r\n\t\t// @todo: this is hacky-sack, get a proper error handler in here\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\t$strategy = $manager->get('Application\\View\\Strategy');\r\n\t\t\t$view = $manager->get('Zend\\View\\View');\r\n\r\n\t\t\t$view->events()->attach( $strategy, 100 );\r\n\t\t}\r\n\t\tcatch (\\Zend\\ServiceManager\\Exception\\ServiceNotCreatedException $e)\r\n\t\t{\r\n\t\t\t$this->message = 'The requested URL ' . $_SERVER[\"REQUEST_URI\"] . ' was not found on this server.';\r\n\t\t\t\r\n\t\t\terror_log($this->message);\r\n\t\t\trequire_once __DIR__ . '/views/error/404.phtml';\r\n\t\t\texit; \r\n\t\t}\r\n\t}", "public function loadView() {\n $view = new api_view($this->route);\n $this->controller->setView($view);\n }", "public function renderView()\n {\n /** @noinspection PhpIncludeInspection */\n require($this->_viewPath);\n }", "private function _dispatchView()\n {\n // ?view=...&form=...&rule=...&mode=...&...\n //$getKeys = array_keys($_GET);\n //if ($getKeys[0] == \"view\")\n\n $form = isset($_GET['form']) ? $_GET['form'] : \"\";\n $rule = isset($_GET['rule']) ? $_GET['rule'] : \"\";\n $hist = isset($_GET['hist']) ? $_GET['hist'] : \"\";\n $viewName = $_GET['view'];\n $params = $this->_getParameters();\n\n if (defined('NOTFOUND_VIEW'))\n {\n if (!Resource::getXmlFileWithPath($viewName))\n {\n $this->renderView(NOTFOUND_VIEW, $form, $rule, $params, $hist);\n exit;\n }\n }\n\n if (!$this->_canUserAccessView($viewName)) //access denied error\n $this->renderView($this->_accessDeniedView);\n\n $this->renderView($viewName, $form, $rule, $params, $hist);\n }", "public function boot(\\Core\\Api\\View\\ViewInterface $view): object;", "public function indexAction()\n {\n $refresh = (bool)$this->request->getQuery('refresh', 'int', 0);\n\n if ($refresh) {\n file_put_contents($this->docPath, $this->scanAndGenerate());\n }\n\n $this->view->partial('swagger-ui', [\n 'assetPath' => '/swagger-ui',\n 'jsonFile' => $this->docUrl,\n ]);\n }", "public function doView(GetResponseForControllerResultEvent $doEvent)\r\n {\r\n if (!$doEvent->getRequest()->attributes->has('_view')) return;\r\n \r\n $request = $doEvent->getRequest();\r\n \r\n $viewServiceId = $request->attributes->get('_view');\r\n \r\n $view = $this->container->get($viewServiceId);\r\n \r\n $viewResponse = $view->renderResponse($request);\r\n \r\n $doEvent->setResponse($viewResponse);\r\n }", "public function onRender(MvcEvent $event)\n {\n $response = $event->getResponse();\n if ($response instanceof \\Zend\\Http\\Response) {\n $headers = $response->getHeaders();\n if ($headers) {\n $headers->addHeaderLine(\n 'Content-Type', \n 'text/html; charset=UTF-8'\n );\n }\n }\n }", "public static function handle_render_endpoint( \\WP_REST_Request $request ) {\n $context = $request->get_params();\n return static::render( $context );\n }", "private function setView()\n {\n $this->view->type = $this->request->getRequestedResource();\n }", "public function view(Listener $listener, array $input = []);", "public function view(Listener $listener, array $input = []);", "public function injectResponse(ViewEvent $e)\n {\n $renderer = $e->getRenderer();\n if ($renderer !== $this->renderer) {\n // Discovered renderer is not ours; do nothing\n return;\n }\n\n $result = $e->getResult();\n if (!$result instanceof NegotiatedResult) {\n // not a NegotiatedResult, we can't go on here\n return;\n }\n\n // Populate response\n $response = $e->getResponse();\n $response->setContent($result->content);\n\n $headers = $response->getHeaders();\n $headers->addHeaderLine('content-type', $result->contentType);\n }", "private function render() : void\n {\n $this->handle();\n }", "protected function getApiPlatform_Listener_View_ValidateService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/api-platform/core/src/Validator/EventListener/ValidateListener.php';\n\n return $this->privates['api_platform.listener.view.validate'] = new \\ApiPlatform\\Core\\Validator\\EventListener\\ValidateListener(($this->privates['api_platform.validator'] ?? $this->getApiPlatform_ValidatorService()), ($this->privates['api_platform.metadata.resource.metadata_factory.cached'] ?? $this->getApiPlatform_Metadata_Resource_MetadataFactory_CachedService()));\n }", "public function render()\n {\n /**\n * Register component and get id\n */\n $id = \\Layout::registerComponent($this->componentName, $this);\n\n /**\n * Push on except bfg component methods\n */\n array_push(\n $this->except,\n 'create', 'attrs', 'attr', 'text', 'slot', 'inner', 'toSlot', 'provoke', 'generateName'\n );\n\n /**\n * Calling an internal event for feeding content for the api class.\n */\n $this->inner();\n\n /**\n * Check on out call\n */\n if (request()->has($id)) {\n LayoutMiddleware::$responces[$id] =\n EmbeddedCall::make([$this, request()->get($id)]);\n }\n\n /**\n * Get class for default state\n */\n $class = isset($this->attributes['class']) ? $this->attributes['class'] : null;\n\n /**\n * Make function trap for bfg templating\n * @param array $data\n * @return string\n */\n return function (array $data) use ($class, $id) {\n /**\n * Return the parent to the current component.\n */\n Component::$current = $this->tmp_current;\n\n /**\n * Transform default component data to bfg templater\n */\n $roles = __transform_blade_component($data, static::class);\n\n /**\n * Attribute list\n */\n $attributes = [];\n\n /**\n * Create to separate data from tags if a bfg layout is used.\n */\n if (LayoutMiddleware::$current) {\n $attributes[\"data-schema\".($this->parent ? \"-child\" : \"\").\"-id\"] = $id;\n if (!request()->ajax()) {\n LayoutMiddleware::$current->addPageData($roles['schema']['e'], $roles['schema']['m']);\n $roles['schema']['m'] = [];\n }\n $roles['schema']['id'] = $id;\n LayoutMiddleware::$current->addPageData($id, $roles['schema']);\n } else {\n $attributes[\"data-schema\".($this->parent ? \"-child\" : \"\")] = base64_encode(json_encode($roles['schema']));\n }\n\n if (isset($roles['schema']['a']['class']) || $class) {\n /**\n * Pass the class to the default node component, if it exists.\n */\n $attributes['class'] = $roles['schema']['a']['class'] ?? $class;\n }\n\n /**\n * Return the component as a tag.\n */\n return tag($this->element, $attributes, (string) $roles['content'])->render();\n };\n }", "function onRender($e, $t) {\n\t\tif ($this->_view == null) {\n\t\t\treturn;\n\t\t}\n\t\tparent::onRender($e, $t);\n\t\t// Render the css files\n\t\t$this->_view->pushText('CssFile', $this->renderCssFiles());\n\t\t// Render the scripts\n\t\t$this->_view->pushText('ScriptFiles', $this->renderScriptFiles());\n\t\t$this->_view->pushText('Scripts', $this->renderScripts());\n\t\t// Render page variables\n\t\t$this->_view->pushText('Title', $this->_title);\n\t\t//$viewKit = ViewKit::singleton();\n\t\t//\t\t$this->_view->pushText('TemplatePath', $viewKit->getTemplatePath()); // TODO review: no longer relevant?\n\t}", "protected function getSensioFrameworkExtra_View_ListenerService()\n {\n return $this->services['sensio_framework_extra.view.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener(new \\Sensio\\Bundle\\FrameworkExtraBundle\\Templating\\TemplateGuesser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel')) && false ?: '_'}), ${($_ = isset($this->services['twig']) ? $this->services['twig'] : $this->getTwigService()) && false ?: '_'});\n }", "private function processRender() {\n $this->generate($this->template);\n $this->template->render();\n }", "private function handleViews()\n {\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'ecommerce');\n\n $this->publishes([__DIR__.'/../resources/views' => base_path('resources/views/vendor/ecommerce')], 'ecommerce-views');\n\n View::composer('ecommerce::pdfs.*', function ($view) {\n $logo = getMediaFromSetting('Website Logo');\n $view->with(compact(['logo']));\n });\n }", "public function render() {\n $this->processRender();\n }", "public function render($view, Model $model, NotificationCenter $notificationCenter, $output = true);", "public function postDispatch() {\n $view = $this->view;\n }", "public function render(\\Zend_View_Abstract $view);", "function render()\n {\n if (!isset($this->result)) {\n $this->usageError('Nothing to render!');\n }\n\n $baseViewFilePath = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'views';\n\n if (!empty($_SERVER['argv'])) {\n $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'console'.DIRECTORY_SEPARATOR.'index.php';\n } else {\n $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'web'.DIRECTORY_SEPARATOR.'index.php';\n }\n\n $this->renderViewFile($viewFilename, $this->result);\n }", "function render()\n{\n $requestUri = sanitizeUri($_SERVER['REQUEST_URI']);\n\n $path = '/' . implode('/', array_filter(explode('/', $requestUri)));\n $schema = endsWith($path, 'schema');\n $path = $path ? $path : '/api/';\n $path = $path === '/api' ? '/api/' : $path;\n\n $endpointsData = json_decode(@file_get_contents('endpoints.json'))->endpoints;\n $endpoints = registerEndpoints($endpointsData);\n\n $handler = findRequestHandler($requestUri, $path, $endpoints);\n generateResponse($handler, $requestUri, $path, $endpoints);\n}", "public function render_view(): callable {\n\t\tif ( null === $this->view ) {\n\t\t\tthrow Page_Exception::view_not_set( $this );\n\t\t}\n\n\t\tif ( '' === $this->view_template ) {\n\t\t\tthrow Page_Exception::undefined_property( 'view_template', $this );\n\t\t}\n\n\t\treturn function() {\n\t\t\t// @phpstan-ignore-next-line, as we have already checked for null.\n\t\t\t$this->view->render( $this->view_template, $this->view_data );\n\t\t};\n\n\t}", "public function handle_render_partials_request()\n {\n }", "public function setup_view(MvcEvent $e)\n {\n $em = EntityManagerSingleton::getInstance();\n $route_match = $e->getRouteMatch();\n $controller = (!$route_match) ? null : $route_match->getParam('controller');\n $action = (!$route_match) ? null : $route_match->getParam('action');\n\n $theme = Settings::get('frontend_theme');\n $e->getViewModel()->setVariables(['theme' => $theme]);\n\n // Set up banners\n $theme_config = json_decode(file_get_contents(getcwd() . '/public/themes/' . $theme . '/config.json'), true);\n $banner_info = $theme_config['banners'];\n\n if (!empty($banner_info))\n {\n $banners = [];\n\n // Get banners that are on the layout\n $layout_banners_labels = $banner_info['Default'];\n $layout_banners = $em->getRepository('Library\\Model\\Page\\Banner')->findBy(['label' => $layout_banners_labels]);\n\n // Get banners from controller\n if ((!is_null($controller)) && isset($banner_info[$controller][$action]))\n {\n $banner_labels = $banner_info[$controller][$action];\n $banners = $em->getRepository('Library\\Model\\Page\\Banner')->findBy(['label' => $banner_labels]);\n }\n\n $e->getViewModel()->setVariables(['banners' => $banners, 'layout_banners' => $layout_banners]);\n }\n\n // Set up CSS\n $css_info = $theme_config['css'];\n if (!empty($css_info))\n {\n // Get stylesheets from controller\n if (!is_null($controller) && isset($css_info[$controller][$action]))\n {\n $css_files = $css_info[$controller][$action];\n if (count($css_files) > 0)\n {\n $headLink_function = $e->getApplication()->getServiceManager()->get('ViewHelperManager')->get('headLink');\n\n foreach ($css_files as $css_file)\n {\n $headLink_function->appendStylesheet('/themes/' . $theme . '/css/' . $css_file);\n }\n }\n }\n }\n\n // Set up scripts\n $js_info = $theme_config['js'];\n if (!empty($js_info))\n {\n // Get scripts from controller\n if (!is_null($controller) && isset($js_info[$controller][$action]))\n {\n $js_files = $js_info[$controller][$action];\n if (count($js_files) > 0)\n {\n $headScript_function = $e->getApplication()->getServiceManager()->get('ViewHelperManager')->get('headScript');\n\n foreach ($js_files as $js_file)\n {\n $headScript_function->appendFile('/themes/' . $theme . '/js/' . $js_file);\n }\n }\n }\n }\n }", "public function injectResponse(ViewEvent $e)\n {\n $renderer = $e->getRenderer();\n if ($renderer !== $this->renderer) {\n return;\n }\n\n $result = $e->getResult();\n $response = $e->getResponse();\n $response->setContent($result);\n }", "public function render_view() {\n\t\tif ( isset( $_GET['view'] ) ) {\n\t\t\t$page_view = $_GET['view'];\n\t\t} else {\n\t\t\t$page_view = 'management-start';\n\t\t}\n\n\t\tif ( ! is_null( $page_view ) ) {\n\t\t\t$this->view->render( $page_view );\n\t\t} else {\n\t\t\techo '<h2>Papi - 404</h2>';\n\t\t}\n\t}", "public function beforeRender(CakeEvent $e)\n\t{\n\t\t// $this->_controller()->set('Taggable', new TaggableView($e->subject));\n\t}", "public function render($view = null, $layout = null) {\n\t\t$event = new CakeEvent('Controller.beforeRender', $this);\n\t\t$this->getEventManager()->dispatch($event);\n\t\tif ($event->isStopped()) {\n\t\t\t$this->autoRender = false;\n\t\t\treturn $this->response;\n\t\t}\n\n\t\tif (!empty($this->uses) && is_array($this->uses)) {\n\t\t\tforeach ($this->uses as $model) {\n\t\t\t\tlist($plugin, $className) = pluginSplit($model);\n\t\t\t\t$this->request->params['models'][$className] = compact('plugin', 'className');\n\t\t\t}\n\t\t}\n\n\t\t$viewClass = $this->viewClass;\n\t\tif ($this->viewClass != 'View') {\n\t\t\tlist($plugin, $viewClass) = pluginSplit($viewClass, true);\n\t\t\t$viewClass = $viewClass . 'View';\n\t\t\tApp::uses($viewClass, $plugin . 'View');\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t// ELSE IS CUSTOM In ORDER To Provide the right layout even were we are ( as plugin ... )\n\t\t\tlist($plugin, $viewClass) = pluginSplit($viewClass, true);\n\t\t\t$viewClass = 'Trois' . 'View';\n\t\t\tApp::uses($viewClass, 'Trois.' . 'View');\n\t\t}\n\n\t\t$View = new $viewClass($this);\n\n\t\t$models = ClassRegistry::keys();\n\t\tforeach ($models as $currentModel) {\n\t\t\t$currentObject = ClassRegistry::getObject($currentModel);\n\t\t\tif (is_a($currentObject, 'Model')) {\n\t\t\t\t$className = get_class($currentObject);\n\t\t\t\tlist($plugin) = pluginSplit(App::location($className));\n\t\t\t\t$this->request->params['models'][$currentObject->alias] = compact('plugin', 'className');\n\t\t\t\t$View->validationErrors[$currentObject->alias] =& $currentObject->validationErrors;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->autoRender = false;\n\t\t$this->View = $View;\n\t\t$this->response->body($View->render($view, $layout));\n\t\treturn $this->response;\n\t}", "public function onBootstrap(MvcEvent $event)\n {\n $app = $event->getTarget();\n $events = $app->getEventManager();\n $events->attach(MvcEvent::EVENT_RENDER, array($this, 'onRender'), 100);\n }", "public function loadViews() {\n //Define View object\n $this->view = new ViewComponent\\View(\n new ViewComponent\\Viewloader(APP_PATH.'/views/')\n );\n }", "public function render()\n {\n // Run any pending edits\n $this->edit()->apply();\n\n $resource = $this->resource();\n header('Content-Type: ' . $this->mime());\n call_user_func($this->renderer, $resource);\n }", "private function dispatch()\n\t{\n\t\t// Get routing service\n\t\t$router = $this->getService('router');\n\n\t\t// Dispatch route\n\t\t$response = $router->dispatch();\n\n\t\t// Render response\n\t\t$response->render();\n\t}", "public function onDispatch(MvcEvent $e) {\n \n // Call the base class' onDispatch() first and grab the response\n $response = parent::onDispatch($e); \n \n // Set alternative layout\n $this->layout()->setTemplate('layout/layout2'); \n \n // Return the response\n return $response;\n }", "abstract public function render($request, $e);", "protected function viewHandle()\n {\n $packageViewsPath = __DIR__.'/resources/views';\n\n $this->loadViewsFrom($packageViewsPath, 'vue-trust');\n\n $this->publishes([\n $packageViewsPath => resource_path('views/vendor/vue-trust'),\n ], 'views');\n }", "public function beforeRender() {\n\t\t$this->sendPayload();\n\t}", "protected function injectControllerDispatcher(){\n // router.matched\n\n $dispatcher = new ControllerDispatcher($this->app);\n\n $this->app->instance('illuminate.route.dispatcher', $dispatcher);\n\n $this->app->instance(\\Illuminate\\Routing\\Contracts\\ControllerDispatcher::class, $dispatcher);\n\n // Caution: If the priority of this listener is lower than\n // PageTypeRouter, the controllerDispatcher wont geht useful\n // information if no page was found\n $this->app['events']->listen(RouteMatched::class, function(RouteMatched $event) use ($dispatcher) {\n $dispatcher->configure($event->route, $event->request);\n }, 10);\n\n }", "function onProductView ($event, View $view);", "public function onRequest(GetResponseEvent $event)\n {\n $collectEvent = new CollectLayoutEvent($this->context);\n $this->dispatcher->dispatch(CollectLayoutEvent::EVENT_NAME, $collectEvent);\n $tokenFound = false;\n $request = $event->getRequest();\n\n // By setting the token after the event has run and context has been\n // populated, we ensure that any accidental layout load in the context\n // that might have happened will be reset to allow transparent editable\n // temporary tokens to be loaded instead.\n if ($tokenString = $request->get(PHP_LAYOUT_TOKEN_PARAMETER)) {\n try {\n $this->context->setToken($tokenString);\n $tokenFound = true;\n } catch (InvalidTokenError $e) {\n // Fallback on non-edit mode\n }\n }\n\n if (!$tokenFound && $request->isXmlHttpRequest()) {\n if ($tokenString = $request->get('token')) {\n try {\n $this->context->setToken($tokenString);\n } catch (InvalidTokenError $e) {\n // Fallback on non-edit mode\n }\n }\n }\n }", "public function handle(ObbRenderController $obbRenderController)\n {\n $obbRenderController->Render();\n }", "private function renderView()\n\t{\n\t\tff_renderView(substr(__CLASS__, 7));\n\t}", "public function onClientView(RenderExtendableBlockEvent $event)\n {\n $event->addController('BusinessManJobBundle:Client:view');\n }", "public function onView(GetResponseForControllerResultEvent $event)\n {\n /* @var Template $template */\n $request = $event->getRequest();\n $template = $request->attributes->get('_template');\n\n if (null === $template) {\n return;\n }\n\n\t\tif(is_string($template)){\n\t\t\t$templating = $this->container->get('templating');\n\t\t\t\tif($templating->getContentFile() === null)\n\t\t\t\t\t$templating->setContentFile($template);\n\t\t\treturn;\n\t\t}\n\n $parameters = $event->getControllerResult();\n $owner = $template->getOwner();\n list($controller, $action) = $owner;\n\n // when the annotation declares no default vars and the action returns\n // null, all action method arguments are used as default vars\n if (null === $parameters) {\n $parameters = $this->resolveDefaultParameters($request, $template, $controller, $action);\n }\n\n // attempt to render the actual response\n $templating = $this->container->get('templating');\n\t\t\n\t\t//dump($parameters); exit(__METHOD__);\n\t\t\n\t\t$templating->assign($parameters);\n\t\t\n\t\tif($templating->getContentFile() === null)\n\t\t\t$templating->setContentFile($template->getTemplate());\n\n /*if ($template->isStreamable()) {\n $callback = function () use ($templating, $template, $parameters) {\n return $templating->stream($template->getTemplate(), $parameters);\n };\n\n $event->setResponse(new StreamedResponse($callback));\n }*/\n\n // make sure the owner (controller+dependencies) is not cached or stored elsewhere\n $template->setOwner(array());\n\n //$event->setResponse($templating->renderResponse($template->getTemplate(), $parameters));\n\t\t\n\t\t$response = new StreamedResponse(array($templating, \"getGeneratedPage\"));\n\t\t$event->setResponse($response);\n }", "public function onDispatch(MvcEvent $e)\n {\n // Call the base class' onDispatch() first and grab the response\n $response = parent::onDispatch($e);\n\n // Set alternative layout\n $this->layout()->setTemplate('layout/layout');\n $layoutData = [];\n $this->layout()->setVariables($layoutData);\n\n // Return the response\n return $response;\n }", "protected function renderViewDialogWidget()\n {\n $widgetAttributes = EQuickDlgs::getDialogWidgetAttributes($this->viewDialog,$this->viewDialogConfig);\n\n $widgetAttributes['id'] = $this->getDialogWidgetId('view');\n $widgetAttributes['controllerRoute'] = $this->getViewControllerRoute('view');\n $widgetAttributes['actionParams'] = array(); //reset for the widget: was used to create the button url;\n $widgetAttributes['renderOpenButton'] = false;\n $widgetAttributes['url'] = null;\n\n EQuickDlgs::renderDialogWidget($widgetAttributes,EQuickDlgs::TYPEAJAX);\n }", "public function handleRoute() {\n\n // Firstly handle the content route handler to see whether we need to proceed.\n $contentResponse = $this->contentRouteHandler->handleRoute();\n\n if ($contentResponse instanceof View) {\n\n // Process decorator\n $myResponse = parent::handleRoute();\n\n // If our response is a view, continue.\n if ($myResponse instanceof View) {\n\n $contentModel = $contentResponse->getModel();\n\n // Get content as string\n ob_start();\n $contentResponse->send();\n $content = ob_get_contents();\n ob_end_clean();\n\n // Literally poke in additional model.\n $this->injectParamsIntoViewModel($myResponse, [\"contentModel\" => $contentModel, \"content\" => $content]);\n\n }\n\n return $myResponse;\n\n\n } else {\n return $contentResponse;\n }\n\n }", "public function onBootstrap(MvcEvent $e)\n {\n /** @var ApplicationInterface $application */\n $application = $e->getTarget();\n $events = $application->getEventManager();\n $events->attach(MvcEvent::EVENT_RENDER, [$this, 'onRender'], 100);\n }", "protected function callRenderMethod() {}", "public function setView(Renderer $view);", "public function executeEventListener(sfWebRequest $request)\n {\n $this->setTemplate('index');\n }", "public function render($request): void\n {\n\n }", "public function onDispatch(MvcEvent $e)\n {\n // Call the base class' onDispatch() first and grab the response\n $response = parent::onDispatch($e);\n\n // Set alternative layout\n $this->layout()->setTemplate('layout/beheer');\n\n // Return the response\n return $response;\n }", "public function register_hooks() {\n\t\tadd_action( 'jmw_view_event_details', [ $this, 'render' ] );\n\t}", "public function onDispatch(MvcEvent $e)\n {\n // Call the base class' onDispatch() first and grab the response\n $response = parent::onDispatch($e);\n \n // Set alternative layout\n $this->layout()->setTemplate('layout/blank.phtml');\n \n // Return the response\n return $response;\n }", "public function onDispatch(MvcEvent $e)\n {\n // Call the base class' onDispatch() first and grab the response\n $response = parent::onDispatch($e);\n \n // Set alternative layout\n $this->layout()->setTemplate('layout/blank.phtml');\n \n // Return the response\n return $response;\n }", "function render() {\n \n $baseViewFilePath = $this->viewBase();\n \n $viewFileName = $baseViewFilePath . 'index.php';\n \n $layoutFile = $this->installationBase() . 'views' . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . 'main.php';\n \n $this->renderViewFile($layoutFile, [\n 'title' => $this->title,\n 'content' => $this->renderViewFile($viewFileName, $this->result, true)\n ]);\n }", "public function render() {\n $this->set('rox_page_title', $this->pageTitle);\n\n foreach ($this->helpers as $helper) {\n $varName = Inflector::lowerCamelize($helper);\n $this->set($varName, Rox::getHelper($helper));\n }\n\n $viewPath = $this->params['controller'];\n if (!empty($this->params['namespace'])) {\n $simpleControllerName = substr($this->params['controller'], strlen($this->params['namespace']) + 1);\n $viewPath = $this->params['namespace'] . '/' . $simpleControllerName;\n }\n\n $viewName = $this->params['action'];\n\n $view = new \\rox\\template\\View($this->viewVars);\n $view->response = $this->response;\n $view->params = $this->params;\n\n $this->response->body = $view->render($viewPath, $viewName, $this->layout);\n }", "public function beforeRender(Event $event)\n {\n if (!array_key_exists('_serialize', $this->viewVars) &&\n in_array($this->response->type(), ['application/json', 'application/xml'])\n ) {\n $this->set('_serialize', true);\n }\n\n }", "public function render() {\n\t\t$renderer = Application::kernel()->view()->getRenderer();\n\t\t$response = $renderer->render($this);\n\n\t\tif (!starts_with($this->templatePath, '@component/')) {\n\t\t\tApplication::kernel()->view()->setContext(array());\n\t\t}\n\n\t\treturn $response;\n\t}", "protected function render($urlManifest, array $options = [], $resourceName = null)\n {\n static $id = 0;\n\n $view = $this->view;\n\n /* $view->headLink()\n ->prependStylesheet($view->assetUrl('css/tailwind.min.css', 'SolrDragon'));*/\n\n $view->headLink()\n ->prependStylesheet('https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css');\n $view->headScript()\n ->appendFile('https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js');\n $view->headScript()\n ->appendFile('https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js');\n\n $view->headLink()\n ->prependStylesheet($view->assetUrl('css/solrdragon.css', 'SolrDragon'));\n $view->headScript()\n ->prependFile($view->assetUrl('vendor/solrdragon/js/openseadragon.min.js', 'SolrDragon'));\n\n $view->headLink()\n ->prependStylesheet($view->assetUrl('vendor/zino-ui/themes/silver/zino.splitter.css', 'SolrDragon'));\n $view->headScript()\n ->appendFile($view->assetUrl('vendor/zino-ui/zino-1.5.custom.min.js', 'SolrDragon'));\n\n $view->headLink()\n ->prependStylesheet($view->assetUrl('vendor/uv/uv.css', 'UniversalViewer'))\n ->prependStylesheet($view->assetUrl('css/universal-viewer.css', 'UniversalViewer'));\n $view->headScript()\n ->appendFile($view->assetUrl('vendor/uv/lib/offline.js', 'UniversalViewer'))\n ->appendFile($view->assetUrl('vendor/uv/helpers.js', 'UniversalViewer'))\n ->appendFile($view->assetUrl('vendor/uv/uv.js', 'UniversalViewer'));\n\n $configUri = isset($options['config'])\n ? $this->basePath($options['config'])\n : $this->assetPath('universal-viewer/config.json', 'UniversalViewer');\n\n $config = [\n 'id' => 'uv-' . ++$id,\n 'root' => $view->assetUrl('vendor/uv/', 'UniversalViewer', false, false),\n 'iiifResourceUri' => $urlManifest,\n 'configUri' => $configUri,\n 'embedded' => true,\n ];\n\n // $locale = $view->identity()\n // ? $view->userSetting('locale')\n // : ($view->params()->fromRoute('__SITE__')\n // ? $view->siteSetting('locale')\n // : ($view->setting('locale') ?: 'en-GB'));\n $config['locales'] = [\n ['name' => 'en-GB', 'label' => 'English'],\n ];\n\n $config += $options;\n\n return $view->partial('common/helper/solrdragon', [\n 'config' => $config,\n ]);\n }", "public function onBootstrap($event)\n {\n $application = $event->getApplication();\n $services = $application->getServiceManager();\n $config = $services->get('Config');\n $events = $application->getEventManager();\n $sharedEvents = $events->getSharedManager();\n\n $this->config = isset($config['view_manager']) && (is_array($config['view_manager']) || $config['view_manager'] instanceof ArrayAccess)\n ? $config['view_manager']\n : array();\n $this->services = $services;\n $this->event = $event;\n\n $routeNotFoundStrategy = $this->getRouteNotFoundStrategy();\n $exceptionStrategy = $this->getExceptionStrategy();\n $mvcRenderingStrategy = $this->getMvcRenderingStrategy();\n $createViewModelListener = new CreateViewModelListener();\n $injectTemplateListener = new InjectTemplateListener();\n $injectViewModelListener = new InjectViewModelListener();\n\n $this->registerMvcRenderingStrategies($events);\n $this->registerViewStrategies();\n\n $events->attach($routeNotFoundStrategy);\n $events->attach($exceptionStrategy);\n $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($injectViewModelListener, 'injectViewModel'), -100);\n $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($injectViewModelListener, 'injectViewModel'), -100);\n $events->attach($mvcRenderingStrategy);\n\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($createViewModelListener, 'createViewModelFromArray'), -80);\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($routeNotFoundStrategy, 'prepareNotFoundViewModel'), -90);\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($createViewModelListener, 'createViewModelFromNull'), -80);\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($injectTemplateListener, 'injectTemplate'), -90);\n $sharedEvents->attach('Zend\\Stdlib\\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($injectViewModelListener, 'injectViewModel'), -100);\n }", "public function run()\r\n {\r\n $this->touch_page_view();\r\n }", "public function onRender(MvcEvent $e)\n {\n if (!$e->getResult() instanceof \\Zend_Controller_Response_Abstract) {\n return;\n }\n\n $response = $e->getResponse();\n $this->renderIntoResponse($response, $e->getResult());\n\n $e->setResult($response);\n return $response;\n }", "public function render() {\n $currentView = $this;\n $this->_renderViews = new \\SplStack();\n while ($currentView) {\n $this->_renderViews->push($currentView);\n $currentView = $currentView->getParentView();\n }\n\n $this->renderChild();\n }", "public function renderViewport(){\n\t\t$this->m_user = $this->objects(\"userWrapper\");\n\t\t$this->m_user->getUser();\n\t\t\n\t\t$this->m_inStep = new InStep();\n\t\t$this->m_inStep->setupSuperview( $this->superview(), __CLASS__, $this->m_user );\n\t\n\t\t// Set the default request handler\n\t\t$this->bindDefault($this->m_defaultHandler);\t\t\n\t\t\n\t\t\n\t\t// Bind request patterns. Set these in order of precedence\n\t\t$this->bind('[message|warning]/\\d+', \"displayMessage\" );\n\t\t// Debug output\n\t\t$this->bind('debug', \"printDebugInformation\" );\n\t}", "public function initializeView() {}", "public function initializeView() {}", "public function uiView(Zikula_DisplayHook $hook)\n {\n // Security check\n if (!SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_READ)) {\n return;\n }\n // get data from $event\n $objectid = $hook->getId(); // id of hooked item\n\n if (!$objectid) {\n return;\n }\n\n $pc_event = $this->_em->getRepository('PostCalendar_Entity_CalendarEvent')->getHookedEvent($hook);\n\n if (!$pc_event) {\n return;\n }\n\n $this->view->assign('eid', $pc_event->getEid());\n\n // add this response to the event stack\n $hook->setResponse(new Zikula_Response_DisplayHook(self::PROVIDER_AREANAME, $this->view, 'hooks/view.tpl'));\n }", "public function render()\n {\n if ($this->onBeforeRender() === false) {\n return $this->notFound();\n }\n\n $method = \\sb\\Gateway::$request->method;\n if (method_exists($this, $method)) {\n $reflection = new \\ReflectionMethod($this, $method);\n\n //check for phpdocs\n $docs = $reflection->getDocComment();\n $servable = false;\n if (!empty($docs)) {\n if (preg_match(\"~@servable (true|false)~\", $docs, $match)) {\n $servable = $match[1] == 'true' ? true : false;\n }\n }\n\n if ($servable) {\n return $this->filterOutput($this->$method());\n } else {\n return $this->filterOutput($this->notFound($method));\n }\n } else {\n return $this->filterOutput($this->notFound($method));\n }\n }", "protected function afterRender(ResponseInterface $response) {}", "public function render($view, $params);", "public function dispatch()\n {\n if ($this->_dispatched) {\n return;\n }\n\n $config = $this->getConfig();\n $dispatcher = $this->getApp()->getMessageDispatcher();\n\n $dispatcher->post('beforeResourceSetup', $this);\n $this->setup($config);\n $dispatcher->post('afterResourceSetup', $this);\n\n // Detach from dispatch event\n if (isset($this->_dispatchEvent)) {\n $event = (is_array($this->_dispatchEvent) && isset($this->_dispatchEvent[0]))\n ? $this->_dispatchEvent[0] : $this->_dispatchEvent;\n $dispatcher->detach($this, $event);\n }\n\n $this->_dispatched = true;\n }", "public function documentAction ()\n {\n\n $this->_helper->viewRenderer->setNoRender(false);\n \n $viewType = 'wiki';\n if ($this->getRequest()->getParam('type')) {\n $viewType = $this->getRequest()->getParam('type');\n if ($viewType != 'xml' && $viewType != 'html' && $viewType != 'wiki') {\n $viewType = 'wiki';\n }\n }\n \n $this->_helper->viewRenderer->setViewScriptPathSpec(\n \"server/$viewType.phtml\");\n $result = $this->_helper->serverDocumentator->generateDoc(\n $this->_serverClass, $this->_aliasClass, $this->view);\n \n $this->view->classInfo = $result;\n }", "public function onDispatch(MvcEvent $e)\n {\n $response = parent::onDispatch($e);\n\n // Set alternative layout\n $this->layout()->setTemplate('biblio/layout');\n\n // Return the response\n return $response;\n }", "public function onDispatch(MvcEvent $e)\n {\n $response = parent::onDispatch($e);\n $this->layout()->setTemplate('admin/layout');\n\n return $response;\n }", "public function onBootstrap($e)\n {\n $app = $e->getApplication();\n $events = $app->getEventManager();\n $events->attach('render', [$this, 'onRender'], 100);\n }", "public function renderToResponse(ResponseInterface $response, ViewInterface $view, ?string $outputType): ResponseInterface;", "public function render_view_mode()\n {\n }", "protected function renderView($optCommand) {\r\n $this->view->render($this, $optCommand);\r\n }", "protected function getApiPlatform_Listener_View_SerializeService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/api-platform/core/src/EventListener/SerializeListener.php';\n\n return $this->privates['api_platform.listener.view.serialize'] = new \\ApiPlatform\\Core\\EventListener\\SerializeListener(($this->services['serializer'] ?? $this->getSerializerService()), ($this->privates['api_platform.serializer.context_builder.filter'] ?? $this->getApiPlatform_Serializer_ContextBuilder_FilterService()), ($this->privates['api_platform.metadata.resource.metadata_factory.cached'] ?? $this->getApiPlatform_Metadata_Resource_MetadataFactory_CachedService()));\n }", "public function handle(Request $request): View;" ]
[ "0.63342434", "0.61683255", "0.6125966", "0.5458438", "0.5239636", "0.5153726", "0.51347935", "0.51273584", "0.51114905", "0.508668", "0.5058521", "0.50433934", "0.5013526", "0.4993464", "0.49518505", "0.49439391", "0.4900713", "0.48870766", "0.4878151", "0.48546377", "0.48413762", "0.48396617", "0.48078662", "0.48025358", "0.4797626", "0.4797626", "0.47973308", "0.47871736", "0.47854015", "0.47518143", "0.4746139", "0.47460043", "0.47428253", "0.4734455", "0.47213486", "0.47177303", "0.47147402", "0.47096688", "0.47053462", "0.47020695", "0.47019294", "0.46851692", "0.46755072", "0.46665674", "0.46658477", "0.46629", "0.46545324", "0.46395844", "0.46268052", "0.46251956", "0.4623703", "0.4616223", "0.4615063", "0.46128199", "0.46098906", "0.46068096", "0.46065578", "0.46002802", "0.45837796", "0.45737642", "0.45667276", "0.45590863", "0.4558387", "0.45580438", "0.455468", "0.45480117", "0.4545858", "0.45351237", "0.45333147", "0.45308754", "0.45283148", "0.45250857", "0.4522192", "0.4522192", "0.4517147", "0.45170575", "0.4516911", "0.4491419", "0.4483522", "0.44827485", "0.44728944", "0.44704533", "0.44662428", "0.44607955", "0.44582552", "0.44582552", "0.4458224", "0.44554496", "0.44523925", "0.44521642", "0.4451087", "0.44510406", "0.44509584", "0.44432276", "0.4441929", "0.44418317", "0.44379762", "0.44357657", "0.44356877", "0.44304934" ]
0.71030486
0
Returns true if the tag is exposed
Возвращает true, если тег отображен
function isExposed() { return $this->exposed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasTags(): bool;", "public function hasTags(): bool;", "public function hasTags() : bool;", "public function isPublic()\n {\n return $this->flagsHas(self::IS_PUBLIC);\n }", "public function isViewable(): bool\n {\n return $this->status != self::STATUS_HIDDEN;\n }", "public function hasTag($tag);", "public function isPublic()\r\n {\r\n return ($this->getct_is_public() == 1) ? true : false;\r\n }", "public function isPublic(): bool\n {\n return $this->{self::ATTR_PUBLIC} === true;\n }", "public function isPublic()\n {\n return (is_null($this->nestedIn)) ? true : false;\n }", "public function tagged()\n {\n return count($this->_tags) > 0;\n }", "public function hasTags(){\n return $this->_has(2);\n }", "private function checkFunctionExposed(): bool\n {\n return (bool)($this->FunctionalArea['exposed'] ?? false);\n }", "public function isPublic()\n {\n if (array_key_exists('is_public', $this->attributes)) {\n return $this->attributes['is_public'];\n }\n\n if (isset($this->is_public)) {\n return $this->is_public;\n }\n\n return true;\n }", "public function isPublic()\n\t{\n\t\treturn ! $this->isPrivate();\n\t}", "public function isPublic()\n {\n return $this->isPublic;\n }", "public function isPublic()\n {\n return $this->public;\n }", "public function isPublic()\n\t{\n\t\treturn $this->public;\n\t}", "public function is_public()\n {\n return $this->is_public;\n }", "public function isPublic(): bool\n {\n return ($this->modifiers & CoreReflectionMethod::IS_PUBLIC) === CoreReflectionMethod::IS_PUBLIC;\n }", "public function isViewable(): bool\n {\n return $this->canceled === null;\n }", "public function hasMonitoredTag()\n {\n return ! empty($this->tags);\n }", "public function hasTags()\n {\n return count($this->get(self::TAGS)) !== 0;\n }", "public function isPublic();", "public function isPublic();", "public function isPublic();", "public function isPublic() {}", "public function isViewable() {\n\t\treturn $this->publicly_queryable || ($this->public && $this->isBuiltin());\n\t}", "public function isPubliclyAccessible(): bool\n {\n return $this->getUrlGenerator()->isPubliclyAccessible();\n }", "public function is_public();", "public function isPublic()\n {\n return $this->source->public;\n }", "public function hasTags()\n {\n return !empty($this->_tags);\n }", "public function isFeatured()\n {\n }", "public function is_viewable()\t{\n return false;\n }", "public function isPublic()\n {\n return $this->visibility == self::OPEN_WORLD;\n }", "public function hasEtag(){\n return $this->_has(7);\n }", "public function hasRecommendTag(){\n return $this->_has(3);\n }", "public function isPublicUse();", "public function isPublic()\n {\n return false;\n }", "public function isPrivate()\n {\n return $this->flagsHas(self::IS_PRIVATE);\n }", "public function isEnabled()\n {\n return $this->_getAttribute('taxvat') ? (bool)$this->_getAttribute('taxvat')->isVisible() : false;\n }", "public function isVisibleToPublic()\n {\n return ImageLicense::CLOSED !== $this->license;\n }", "public function getIncludeFlagForTags(): bool\n {\n return $this->tags;\n }", "public function isVisible(): bool\r\n {\r\n \treturn $this->isVisible;\r\n }", "public function isInvisible(): bool\n {\n return $this->accept(new IsInvisibleVisitor(true));\n }", "public function isPublic(): bool\n {\n return self::ACCESSOR_PUBLIC === $this->accessor;\n }", "public function isUsageTag() {\n\t\treturn $this->usageorfree == 'T';\n\t}", "public function isPublished(): bool;", "public function has_public_access(): bool {\n\t\treturn true;\n\t}", "protected function canBeViewed() : bool {}", "protected function canBeViewed() : bool {}", "public function isPublicAvailable()\n {\n return $this->isVisible()\n && $this->availableInDate()\n && !$this->isOutOfStock();\n }", "public function canBeViewed()\n\t{\n\t\treturn $this->isPublished()\n\t\t\t|| ($this->getPostStatus() === 'private' && Mage::getSingleton('customer/session')->isLoggedIn());\n\t}", "public function getIsPublishedAttribute()\n {\n return true;\n }", "public function canBeViewed() {}", "public function hasTag($tag)\n {\n return $this->bindingsResolver->hasTag($tag);\n }", "public function isVisible(): bool\n {\n return $this->isVisible;\n }", "public function is_visible()\n {\n }", "public function is_visible()\n {\n }", "public function isAddTags()\n {\n return $this->scopeConfig->isSetFlag(\n self::XML_PATH_ADD_TAGS,\n ScopeInterface::SCOPE_STORE,\n $this->storeId\n );\n }", "public function isHidden(): bool;", "abstract public function isPublic(): bool;", "public function hasTags($tags);", "public function isPublic() {\n\t\t$mgr = $this->getPermissionManager();\n\t\treturn $mgr->getPermissions() ? false : true;\n\t}", "public function hasVisibility()\n {\n return $this->visibility !== null;\n }", "public function hasVisibility()\n {\n return $this->visibility !== null;\n }", "public function hasView(): bool;", "public function hasTagClass($name);", "public function access()\n {\n return true;\n }", "public function isVisible()\n {\n return in_array($this->getType(), [self::TYPE_PHYSICAL, self::TYPE_VIRTUAL]);\n }", "private function isAccessible()\n {\n return !Route::isBlocked($this->url) &&\n ($this->function instanceof \\Closure ||\n Controller::hasMethod($this->controller, $this->method) ||\n Controller::exists($this->url));\n }", "public function hasTagsList()\n {\n return $this->tags !== null;\n }", "public function shouldDisplayOpenGraphTags()\n {\n $value = Configuration::get(static::CONFIG_KEY_DISPLAY_OPEN_GRAPH_TAGS);\n if ($value === false) {\n $value = 1;\n Configuration::updateValue(static::CONFIG_KEY_DISPLAY_OPEN_GRAPH_TAGS, $value);\n }\n return (bool)$value;\n }", "public function isPublished()\n {\n return $this->access !== LibBaseDomainBehaviorPrivatable::ADMIN;\n }", "public function access(): bool\n {\n return true;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Ukpos_KnowledgeHub::taglist');\n }", "public function hasTags()\n {\n $tags = \"tags\";\n $postType = getPostType($this->getTable());\n return ($postType->hasTags && isset($this->$tags) && !$this->$tags->isEmpty());\n }", "public function is_tag($tag = '')\n {\n }", "public function hasTag( $tag ) {\n\t\treturn in_array( $tag, $this->tags, true );\n\t}", "public function isPrivate(): bool\n {\n return ($this->modifiers & CoreReflectionMethod::IS_PRIVATE) === CoreReflectionMethod::IS_PRIVATE;\n }", "function isVisible()\n\t{\n\t\treturn $this->visible;\n\t}", "public function isPublish();", "public function isPublished() {}", "public static function tagged($name){\n return isset(static::$tags[$name]) ? static::$tags[$name] : false;\n }", "public function isVisible()\n {\n return $this->is_visible;\n }", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();" ]
[ "0.6871049", "0.6871049", "0.67992646", "0.6616368", "0.6613503", "0.6540294", "0.65110326", "0.64996916", "0.649938", "0.649798", "0.6483404", "0.6469668", "0.64140916", "0.6397022", "0.63799834", "0.6378082", "0.6357228", "0.6309084", "0.62897784", "0.62863064", "0.6277134", "0.6260129", "0.6257701", "0.6257701", "0.6257701", "0.6254763", "0.6240269", "0.6203741", "0.6201614", "0.6169831", "0.6164558", "0.6150316", "0.61470115", "0.613053", "0.6108104", "0.61037576", "0.61034155", "0.6098869", "0.6069629", "0.60607976", "0.6053768", "0.6050376", "0.6035026", "0.6015008", "0.6009665", "0.59960175", "0.59875", "0.59807664", "0.59610385", "0.5960071", "0.59509444", "0.5934146", "0.5923247", "0.5918384", "0.59165204", "0.5903477", "0.5903222", "0.5902436", "0.58986366", "0.5898611", "0.5892832", "0.58912814", "0.5887693", "0.58788794", "0.58788794", "0.5873149", "0.58722955", "0.58722335", "0.5868127", "0.5843963", "0.5837652", "0.5836796", "0.5835056", "0.58269155", "0.58250797", "0.58235455", "0.5807005", "0.58054954", "0.57991403", "0.5799106", "0.579747", "0.57809097", "0.5780427", "0.5774665", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111", "0.577111" ]
0.7407866
0
Set the enabled flag of this tag
Установите флаг enabled этого тега
function setEnabled($enabled) { $this->enabled = $enabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEnabled($enable);", "public function setEnabled($enabled);", "function setEnabled($enabled = true);", "protected function setEnabled($enabled) {\n\n\t \t\t \t$this->enabled = $enabled;\n\t }", "public function set_enabled(bool $enabled = \\true)\n {\n }", "public function enable()\n {\n $this->enabled = true;\n }", "public function enable(): void\n {\n $this->disabled = false;\n }", "public function setEnabled($enabled)\n {\n $this->enabled = $enabled;\n }", "public function setEnabled($enabled)\n {\n $this->enabled = $enabled;\n }", "public function setEnabled($enabled)\n {\n $this->enabled = $enabled;\n }", "protected function set__enabled( $value )\n\t{\n\t\t$this->enabled = $value;\n\t}", "public static function enable()\n {\n self::$isEnabled = true;\n }", "public static function enable()\n {\n update_option( static::getPrefix() . 'enabled', 1 );\n }", "public function SetEnabled($enable)\n\t{\n\t\t$this->enabled = $enable;\n\t}", "public function setEnabled($val)\n {\n $this->_pendingChanges = true;\n $this->enabled = ($val) ? 1 : 0;\n }", "public function setEnabledAttribute($value)\n\t{\n\t\tif (empty($value)) {\n\t\t\t$this->attributes['enabled'] = 0;\n\t\t} else {\n\t\t\t$this->attributes['enabled'] = $value;\n\t\t}\n\t}", "public static function set_enabled($enabled)\n {\n self::$enabled = $enabled;\n }", "public static function setEnabled($enabled)\n {\n self::$enabled = (bool) $enabled;\n }", "protected function updateEnabled($enable)\n\t{\n\t\t$this->client()->setAttribute($this->_control, 'disabled', $enable===false);\n\t}", "public function setDisabledYes()\n\t{\n\t\t$this->setAttribute( \"disabled\");\n\t}", "static public function enable()\n {\n self::$enabled = true;\n }", "public function enabled();", "public function enabled();", "public function enable();", "public function enable();", "public function enable();", "public function enable();", "public function setIsEnabled(bool $flag): self;", "public function setEnabled(?bool $value): void {\n $this->getBackingStore()->set('enabled', $value);\n }", "public function setEnabled(?bool $value): void {\n $this->getBackingStore()->set('enabled', $value);\n }", "function setEnabled($enabled) {\n\t\treturn $this->setData('enabled',$enabled);\n\t}", "public function SetDisabled ($disabled);", "public function enable() {\n\t\t$this->activated = true;\n\t}", "public function setEnabled($status)\n {\n $this->_enabled = (boolean)$status;\n }", "public function setEnabled($var)\n {\n GPBUtil::checkBool($var);\n $this->enabled = $var;\n }", "public function setEnabled($val)\n {\n $this->_propDict[\"enabled\"] = $val;\n return $this;\n }", "public function enabled()\n {\n return(TRUE);\n }", "function enabled ($enabled = null);", "public function enable() {}", "public function enable($value) {\n return $this->setProperty('enable', $value);\n }", "public function enable($value) {\n return $this->setProperty('enable', $value);\n }", "public function enable($value) {\n return $this->setProperty('enable', $value);\n }", "public function enable( $enable = true ) {\n $this->enable = $enable;\n }", "public function setIsEnabled(?bool $value): void {\n $this->getBackingStore()->set('isEnabled', $value);\n }", "public function setIsEnabled(?bool $value): void {\n $this->getBackingStore()->set('isEnabled', $value);\n }", "public function enable() {\n\t\t$this->userEnabled = true;\n\t}", "public function enable()\n {\n $this->enabled = true;\n\n $this->boot();\n }", "function setEnabled($enabled) {\n\t\t$journal =& Request::getJournal();\n\t\tif ($journal) {\n\t\t\t$this->updateSetting($journal->getJournalId(), 'enabled', $enabled ? true : false);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function __validate_enabled() {\n if ($this->initial_data[\"enabled\"] !== false) {\n $this->validated_data[\"enabled\"] = \"on\";\n }\n }", "public function setDisabled(?bool $disabled): void {\n\t\t$this->setAttribute(\"disabled\", ($disabled ? \"disabled\" : null));\n\t}", "public function is_enabled()\n {\n }", "public function is_enabled()\n {\n }", "public function setIsDisableCapable($flag);", "public function setEnabled($value) {\n\t\tif ($value) {\n\t\t\t$this->removeAttribute('disabled');\n\t\t}\n\t\telse {\n\t\t\t$this->setAttribute('disabled', 'disabled');\n\t\t}\n\t\treturn $this;\n\t}", "public function enabled($value)\n {\n return $this->setProperty('enabled', $value);\n }", "public function setDisabled($disabled)\n {\n $this->disabled = $disabled;\n }", "public function setVerp($enabled = \\false)\n {\n }", "public function enabled() {\n\t\treturn true;\n\t}", "function enable($name) {\n\t\t$this->_disabled = array_diff($this->_disabled, (array)$name);\n\t}", "public function enable() {\n $this->changes['useraccountcontrol'] = $this->getData('useraccountcontrol') | DirectoryUAC::ADS_UF_ACCOUNT_DISABLE;\n }", "public function setEnabled($enabled = true)\n {\n foreach ($this->debugPlugins as $plugin)\n {\n $plugin->setEnabled($enabled);\n }\n }", "protected function is_enabled()\n {\n }", "public function setIsDisabled($isDisabled);", "function enable() ;", "public function enable()\n {\n $client = Utils\\CloudClient::getClient();\n $client->post($this->url . \"/enable\");\n }", "public static function enable() {}", "public function disable(): void\n {\n $this->disabled = true;\n }", "public function setEnabled($boolean)\n {\n $this->isEnabled = !!$boolean;\n }", "public function setEnable($var)\n {\n GPBUtil::checkBool($var);\n $this->enable = $var;\n\n return $this;\n }", "public function enabledAction() {\n $id = $this->_getParam('tab_id');\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n $tab = Engine_Api::_()->getItem('seaocore_tab', $id);\n try {\n $tab->enabled = !$tab->enabled;\n $tab->save();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "public function is_enabled()\n {\n }", "public function enabled(): bool\n {\n return true;\n }", "public function setDisabled($disabled = true)\n {\n $this->disabled = $disabled;\n $this->setAttributes(\"Disabled\");\n }", "public function setDisabled($disabled = true)\n {\n $this->disabled = $disabled;\n $this->setAttributes(\"Disabled\");\n }", "public function setIsEnabled($value)\n {\n $this->_fields['IsEnabled']['FieldValue'] = $value;\n return $this;\n }", "public static function set_enabled($enabled) {\n $val = $enabled ? 1 : 0;\n if (self::$enabled != $val) {\n set_config('courseenabled', $val, 'local_campusconnect');\n self::$enabled = $val;\n }\n }", "public function onEnable()\n {\n }", "public function is_enabled() {\n\t\treturn true;\n\t}", "public function markAsEnabledById($id);", "public static function setStatus(bool $enabled = true)\n {\n self::$enabled = $enabled;\n }", "public function getEnabledValue() {\n return TRUE;\n }", "public function enable()\n {\n return $this->setActive(1);\n }", "public function enabled(Extension $extension);", "public function set_enabled(int $newval): int\n {\n $rest_val = strval($newval);\n return $this->_setAttr(\"enabled\", $rest_val);\n }", "function enable($setting){\n\t\tsettings::set($setting, true);\n\t}", "public function enable() {\n\n event_buffer_enable($this->resource, $this->operations);\n\n }", "protected function get__enabled()\n\t{\n\t\treturn $this->enabled;\n\t}", "public function setDisabled($disabled)\n\t{\n\t\tif($disabled)\n\t\t{\n\t\t\tif(!$this->hasAttribute('disabled'))\n\t\t\t\t$this->setAttribute('disabled', 'disabled');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($this->hasAttribute('disabled'))\n\t\t\t\t$this->removeAttribute('disabled');\n\t\t}\n\t}", "public function onEnable() {\n if (is_callable(array($this, 'enable'))) {\n $this->enable();\n }\n }", "public function enable ($key) {\n if ($this->disabled($key)) $this->conf[$key]['enabled'] = true;\n return $this;\n }", "public function inlineEnable(){\n $this->bInlineEnabled = true;\n }", "public function setIsEnabled($value)\n {\n $this->enabled = (bool) $value;\n\n return $this;\n }", "public function enable() { \n\n\t\t$sql = \"UPDATE `user` SET `disabled`='0' WHERE id='\" . $this->id . \"'\";\n\t\t$db_results = Dba::query($sql); \n\n\t\treturn true; \n\n\t}", "public function enable()\n {\n Application::executeControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), \"enable\", Application::PRIORITY_LOW);\n }", "public function setEnabled($enabled)\n\t{\n\t\t$this->_closeSocket();\n\t\t$this->_enabled = (bool)$enabled;\n\t\treturn $this;\n\t}", "public function enable()\n {\n $this->_enabled = true;\n return $this;\n }", "function isEnabled() ;", "public function setDisabled($value = TRUE)\n\t{\n\t\t$this->attributes['data-disabled'] = $value ? 'true' : 'false';\n\t\t$this->setReadOnly($value);\n\t\treturn parent::setDisabled($value);\n\t}", "public function enable()\n\t{\n\t\tif($this->isImmutable())\n\t\t{\n\t\t\treturn; // todo: throw NotAllowedException?\n\t\t}\n\n\t\tif($this->disable >= 1)\n\t\t{\n\t\t\t$this->disable--;\n\t\t}\n\t}", "public function setIsDisabled($isDisabled)\n {\n $this->isDisabled = $isDisabled;\n }" ]
[ "0.77773696", "0.77651393", "0.76675135", "0.7632741", "0.7600858", "0.7545297", "0.7501311", "0.7475785", "0.7475785", "0.7475785", "0.7336503", "0.72987956", "0.7275066", "0.72528636", "0.7223732", "0.72053576", "0.71782446", "0.71419865", "0.703709", "0.6997093", "0.6916978", "0.69009745", "0.69009745", "0.67756534", "0.67756534", "0.67756534", "0.67756534", "0.6757575", "0.67114484", "0.67114484", "0.6706131", "0.66971225", "0.66956276", "0.6682266", "0.668155", "0.66253614", "0.65919", "0.65599847", "0.65585583", "0.65539145", "0.65539145", "0.65539145", "0.6548063", "0.6504691", "0.6504691", "0.64832306", "0.6483014", "0.6462196", "0.6460281", "0.6455283", "0.64438707", "0.64423203", "0.6420512", "0.6380508", "0.63752437", "0.63674", "0.63665974", "0.63494754", "0.63197297", "0.6307223", "0.62961817", "0.62916267", "0.6273253", "0.6272389", "0.6241283", "0.6237733", "0.623572", "0.62082714", "0.61904013", "0.61871964", "0.61614007", "0.6153027", "0.61435", "0.61435", "0.6135771", "0.61022276", "0.60973537", "0.6096672", "0.6095741", "0.60820436", "0.6076608", "0.60763013", "0.6037183", "0.6031896", "0.6028728", "0.6016216", "0.6010009", "0.5984925", "0.5981262", "0.5981085", "0.59793526", "0.59702647", "0.5950218", "0.5944637", "0.5938239", "0.59265584", "0.5916504", "0.59098816", "0.59013855", "0.5897727" ]
0.7852488
0
Returns an array of story states and totals.
Возвращает массив состояний историй и итоговых значений.
public function getStoryStates() { $states = array(); $data = $this->getData('stories'); $total = (int) $data->attributes()->total; // Parse story API data for state count $stories = $data->xpath('/stories/story'); while(list( , $node) = each($stories)) { $state = (string) $node->current_state; if(array_key_exists($state, $states)) { $states[$state]++; } else { $states[$state] = 1; } } // Compile into label/value format $formatted = array(); foreach( $states as $state_name => $state_count ) { $state = $this->getState( $state_name ); $formatted[] = array('label' => $state["label"], 'value'=> $state_count, 'color'=> $state['color'], 'state' => $state_name); } return $formatted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStates(): array;", "public static function totals()\n {\n return [];\n }", "public function getEpics()\n {\n $data = $this->getData('stories');\n $epic_states = array();\n $formatted = array();\n foreach( $this->epics as $epic ) {\n $epic_state = array();\n $formatted[] = array('label' => $epic['title'], 'states'=>$epic_state, 'labels'=>$epic['label'], 'total'=>0);\n }\n\n // Parse story API data for epics state breakdown\n $stories = $data->xpath('/stories/story');\n while(list( , $node) = each($stories)) {\n $state = (string) $node->current_state;\n $labels = (string) $node->labels;\n\n foreach( $formatted as &$epic ) {\n if(strpos($labels, $epic['labels']) !== false) {\n\n // This story label is tagged as an epic so append epic states\n $epic_states = &$epic['states'];\n if(array_key_exists($state, $epic_states)) {\n $epic_states[$state] = $epic_states[$state]+1;\n } else {\n $epic_states[$state] = 1;\n }\n $epic['total'] = $epic['total']+1;\n break;\n }\n }\n }\n\n // Create Totals for the epic states\n foreach( $formatted as &$epic ) {\n\n $epic_states = &$epic['states'];\n foreach( $epic_states as $state => $state_total) {\n\n $epic_states[$state] = number_format(($state_total/$epic['total'])*100, 0);\n //$this->logger->info('epic state:'.$state.' total:'.$epic['total'].' value:'.$state_total);\n }\n }\n\n return $formatted;\n }", "public static function getStates();", "public static function getStates();", "public function getStories()\n {\n $sql = <<<SQL\n SELECT\n story.*,\n (SELECT COUNT(*) FROM comment WHERE comment.story_id = story.id) as 'count'\n FROM story\n ORDER BY story.created_on DESC;\nSQL;\n\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute();\n $stories = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $stories;\n }", "public function getStories(): int\n {\n return $this->storyCount;\n }", "public function getCalories();", "public function getStates()\n {\n return array(\n Workflow\\Machine::STATE_UNDEFINED => array(\n 'next' => 'ready',\n 'action' => array(\n 'Lottery_Game_Dice',\n 'initBet'\n ),\n 'properties' => array(\n Lottery_Game_Dice::PROPERTY_SUM,\n Lottery_Game_Dice::PROPERTY_CHANCE\n )\n ),\n // State\n 'ready' => array(\n 'roll' => array(\n 'next' => 'finished',\n 'title' => 'Roll',\n 'visible' => true,\n 'action' => array(\n 'Lottery_Game_Dice',\n 'roll'\n ),\n 'properties' => array(),\n 'preconditions' => array()\n ),\n 'cancel' => array(\n 'next' => 'canceled',\n 'title' => 'Cancel',\n 'visible' => true\n )\n ),\n 'finished' => array(),\n 'canceled' => array()\n );\n }", "public function getStateAssessments() {\n\t\tif (!isset($this->stateAssessments)) {\n\t\t\t$this->stateAssessments = array();\n\t\t\t$SQL = \"\n\t\t\t\tSELECT samrefid,\n\t to_char(begdate, 'mm-dd-yyyy') as samdate,\n\t samdesc,\n\t COALESCE(gl_code, '$this->grdlevel') as samgrade,\n\t dsydesc as samyear\n\t FROM webset_tx.std_sam_main sam\n\t LEFT OUTER JOIN webset.disdef_schoolyear sy ON sy.dsyrefid = sam.syrefid\n\t LEFT OUTER JOIN c_manager.def_grade_levels grd ON grd.gl_refid = sam.grade_id\n\t WHERE stdrefid = \" . $this->tsrefid . \"\n\t AND ardinclude = 'Y'\n\t ORDER BY begdate desc, samrefid desc\n\t \";\n\t\t\t$assessments = db::execSQL($SQL)->assocAll();\n\n\t\t\tforeach ($assessments as $assessment) {\n\t\t\t\t$assessment = array_merge($assessment, $this->getStateAssessmentsGeneral($assessment['samrefid']));\n\t\t\t\t$assessment['staar_subjects'] = $this->getStateAssessmentsStaarSubjects($assessment['samrefid']);\n\t\t\t\t$assessment['staar_ratio'] = $this->getStateAssessmentsStaarRatio($assessment['samrefid']);\n\t\t\t\t$assessment['staar_success'] = $this->getStateAssessmentsStaarSuccess($assessment['samrefid']);\n\t\t\t\t$assessment['staar_acceler'] = $this->getStateAssessmentsStaarAcceler($assessment['samrefid']);\n\t\t\t\t$assessment['taks_subjects'] = $this->getStateAssessmentsStaarSubjects($assessment['samrefid'], 'TAKS|TAAS');\n\t\t\t\t$assessment['taks_ratio'] = $this->getStateAssessmentsStaarRatio($assessment['samrefid'], 'TAKS');\n\t\t\t\t$assessment['taks_success'] = $this->getStateAssessmentsStaarSuccess($assessment['samrefid'], 'TAKS');\n\t\t\t\t$assessment['taks_acceler'] = $this->getStateAssessmentsStaarAcceler($assessment['samrefid'], 'TAKS');\n\t\t\t\t$assessment['top_subjects'] = $this->getStateAssessmentsStaarSubjects($assessment['samrefid'], 'TELPAS');\n\t\t\t\t$this->stateAssessments[] = $assessment;\n\t\t\t}\n\n\t\t}\n\t\treturn $this->stateAssessments;\n\t}", "public function all(): array\n {\n return $this->getStoryRepository()->all();\n }", "public function getSummaries() : array;", "private function summaries() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'type' => 'membership',\n\t\t\t\t'subject' => __( 'Daily Group Membership Updates', 'ht_dms' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'decisions',\n\t\t\t\t'subject' => __( 'Active Decision Updates', 'ht_dms' ),\n\t\t\t)\n\n\t\t);\n\n\t}", "public function readStates () {\r\n\t\t// Busca os estados\r\n\t\treturn $this->db->get('Estados')->result();\r\n\t}", "public function getTotalStations(){\n \treturn $this->getStations()->count();\n }", "public function getStates()\n {\n //$courts = Courts::all();\n $states = DB::select('select * from states');\n\n return compact('states');\n }", "public function getSummary()\n {\n $ret = array();\n $critCount = 0; \n $warnCount = 0; \n $okCount = 0; \n $unknownCount = 0; \n foreach ($this->getList() as $serviceStatus) {\n $stateIsCrit = $serviceStatus->getCurrentstate() \n == Servicestatus::CURRENT_STATE_CRIT;\n $stateIsWarn = $serviceStatus->getCurrentstate() \n == Servicestatus::CURRENT_STATE_WARN;\n $stateIsOk = $serviceStatus->getCurrentstate() \n == Servicestatus::CURRENT_STATE_OK;\n $stateIsUnknown = $serviceStatus->getCurrentstate() \n == Servicestatus::CURRENT_STATE_UNKNOWN;\n if ($stateIsUnknown) {\n $unknownCount++;\n }\n if ($stateIsWarn) {\n $warnCount++;\n }\n if ($stateIsCrit) {\n $critCount++;\n }\n if ($stateIsOk) {\n $okCount++;\n }\n }\n $ret['crit'] = $critCount;\n $ret['warn'] = $warnCount;\n $ret['ok'] = $okCount;\n $ret['unknown'] = $unknownCount;\n return json_encode($ret);\n }", "public function getTotals()\n {\n $count = count(\\app\\models\\UserAdvertisement::findAll(['user_id' => Yii::$app->user->id, 'status' => 10]));\n return [\n 'income' => Yii::$app->appConfig->adIncome * $count,\n 'count' => $count\n ];\n }", "public function getstates()\r\n\t{\r\n\t\treturn $this->api->get( 'states', 'getList', array() )->response();\r\n\t}", "public function index()\n {\n $this->checkPermission('state_summary_view');\n $items = $this->service->viewAll();\n $items = StateSummaryResource::collection($items);\n return $this->respondWithSuccess($items);\n }", "function getTotal($state = 1)\r\n\t{\r\n\t\t// Lets load the content if it doesn't already exist\r\n\t\tif (empty($this->_total))\r\n\t\t{\r\n\t\t\t$query = $this->_buildQuery($state);\r\n\t\t\t$this->_total[$state] = $this->_getListCount($query);\r\n\t\t}\r\n\r\n\t\treturn $this->_total[$state];\r\n\t}", "public function getStates()\n {\n return $this->states;\n }", "function count_states() {\r\n\t\t\r\n\t\tglobal $status_values, $resolved_status_threshold;\r\n\t\t$count_states = array();\r\n\t\t$count_states['open'] = $count_states['resolved'] = 0;\r\n\t\t\r\n\t\tforeach ( $status_values as $key => $val ) {\r\n\t\t\tif ( $val < $resolved_status_threshold ) {\r\n\t\t\t\t$count_states['open']++;\r\n\t\t\t} else {\r\n\t\t\t\t$count_states['resolved']++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $count_states;\r\n\t}", "public function standings()\n {\n $standings = array();\n // define initial velues\n foreach ($this->teams as $team) {\n $standings[$team->id] = array(\n 'team_id' => $team->id,\n 'team_name' => $team->name,\n 'team_iso' => $team->iso,\n 'played' => 0,\n 'wins' => 0,\n 'draws' => 0,\n 'losses' => 0,\n 'goalsFor' => 0,\n 'goalsAgainst' => 0,\n );\n }\n // update values according to each game\n foreach ($this->games as $game) { // only group games\n if (is_null($game->score_h) || is_null($game->score_a)) break; // game not finished\n $standings[$game->team_h]['played'] += 1;\n $standings[$game->team_a]['played'] += 1;\n $standings[$game->team_h]['goalsFor'] += $game->score_h;\n $standings[$game->team_h]['goalsAgainst'] += $game->score_a;\n $standings[$game->team_a]['goalsFor'] += $game->score_a;\n $standings[$game->team_a]['goalsAgainst'] += $game->score_h;\n switch ($game->score_h <=> $game->score_a) {\n case 0:\n $standings[$game->team_h]['draws'] += 1;\n $standings[$game->team_a]['draws'] += 1;\n break;\n case 1:\n $standings[$game->team_h]['wins'] += 1;\n $standings[$game->team_a]['losses'] += 1;\n break; // home team wins\n case -1:\n $standings[$game->team_h]['losses'] += 1;\n $standings[$game->team_a]['wins'] += 1;\n break; // home team loses\n }\n }\n usort($standings, array($this, \"cmp_standings\"));\n return $standings;\n }", "public static function getTodaysStorysCount()\n {\n return self::getBasicQuery()\n ->where('created_at > DATE_SUB(NOW(), INTERVAL 1 DAY)')\n ->count();\n }", "public function getStauts(){\n\t\t//reutns the goal stauts \n\t\treturn $this->goalStatus;\n\t}", "public static function load_action_totals() {\n\t\t\tself::$statistics['actions']['current'][self::$range] = self::get_actions(array(\n\t\t\t\t'per_days' => self::$range,\n\t\t\t\t'skip' => 0\n\t\t\t));\n\n\t\t\t/* get action count in past time period */\n\t\t\tself::$statistics['actions']['past'][self::$range] = self::get_actions(array(\n\t\t\t\t'per_days' => self::$range,\n\t\t\t\t'skip' => 1\n\t\t\t));\n\n\n\t\t\t/* determine difference rate */\n\t\t\tself::$statistics['actions']['difference'][self::$range] = self::get_percentage_change(self::$statistics['actions']['current'][self::$range], self::$statistics['actions']['past'][self::$range]);\n\n\t\t\t/* determine action to impression rate for current time period */\n\t\t\tself::$statistics['actions']['rate']['current'][self::$range] = (self::$statistics['impressions']['current'][self::$range]) ? self::$statistics['actions']['current'][self::$range] / self::$statistics['impressions']['current'][self::$range] : 0;\n\n\t\t\t/* determine action to impression rate for past time period */\n\t\t\tself::$statistics['actions']['rate']['past'][self::$range] = (self::$statistics['impressions']['past'][self::$range]) ? self::$statistics['actions']['past'][self::$range] / self::$statistics['impressions']['past'][self::$range] : 0;\n\n\t\t\t/* determine action to impression rate for past time period */\n\t\t\tself::$statistics['actions']['rate']['difference'][self::$range] = self::get_percentage_change(self::$statistics['actions']['rate']['current'][self::$range], self::$statistics['actions']['rate']['past'][self::$range]);\n\n\t\t}", "public static function getTotalsByStatuses()\n {\n $totals = [];\n $result = DB::select(DB::raw(\"SHOW COLUMNS FROM `invoices` LIKE 'status'\"));\n if ($result) {\n $statuses = explode(\"','\", preg_replace(\"/(enum|set)\\('(.+?)'\\)/\", '\\\\2', $result[0]->Type));\n\n foreach ($statuses as $status) {\n $totals[$status] = self::getTotalsByStatus($status);\n }\n }\n\n return $totals;\n }", "private function getStados()\n {\n $estados = array();\n\n $dataProvider = Yii::app()->controller->purchase_references;\n $criteria = $dataProvider->getCriteria();\n\n $criteria->group = 'current_status_id';\n\n $dataProvider->setCriteria($criteria);\n\n foreach ($dataProvider->data as $purchase) {\n $estados[$purchase->current_status_id] = '';\n }\n\n foreach ($estados as $key => $estado) {\n $estados[$key] = Status::model()->findByAttributes(array('id' => $key));\n }\n\n return $estados;\n }", "public function getStates(): array\n {\n return $this->states;\n }", "function getTotalStories()\n{\n\t$dbHandler = DbHandler();\n $query = $dbHandler->prepare\n\t( \n\t\t\"SELECT COUNT(id) \n\t\tAS total \n\t\tFROM `posts` \"\n\t);\n\t$query->execute();\n\t$totalStories = $query->fetch(PDO::FETCH_ASSOC);\n\treturn $totalStories['total'];\n}", "public function getStates()\n {\n return $this->states;\n }", "public function getStates()\n {\n return $this->states;\n }", "public function getStates()\n {\n return $this->states;\n }", "public function getStates()\n {\n return $this->states;\n }", "public function getAllStates()\n {\n \t$inventoryStateService = new InventoryStateServices();\n \t$roles = $inventoryStateService->fetchAll();\n \t$result = array();\n \tforeach ($roles as $rol){\n \t\t$result[$rol['id_state_Inventory']] = $rol['conditions'];\n \t}\n \treturn $result;\n }", "public function getAllStates()\n {\n \t$inventoryStateService = new InventoryStateServices();\n \t$roles = $inventoryStateService->fetchAll();\n \t$result = array();\n \tforeach ($roles as $rol){\n \t\t$result[$rol['id_state_Inventory']] = $rol['conditions'];\n \t}\n \treturn $result;\n }", "public function getallstories(){\n\t\t$params=array(\n\t\t\t'Select'=>\"story.story_id, story.story_name\",\n\t\t\t'from'=> \"story\",\n\t\t\t);\n\t\t$result=$this->find($params);\n\t\tif($result !=null){\n\t\t\treturn $result;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getCalories()\r\n\t{\r\n\t\treturn $this->calories;\r\n\t}", "public function stories()\n {\n return $this->hasMany( Story::class );\n }", "public function allState()\n\t{\n $states = State::get();\n\t\t$count = 0;\n\t\treturn view('backend.state.all-state', compact('states', 'count'));\n\n\t}", "public function getDefaultStories()\n {\n // Get an existing story\n $data = $this->getData('stories');\n return $data;\n }", "function GetStates()\n\t{\t\t\n\t\t// create new associative array object\n\t\t$state_array = array();\n\t\t// prepare statement\n\t\t$sql = \"select * from state order by state_id desc\";\n\t\t// run statement or error\n\t\t$result = mysql_query($sql) or die (show_error('Problem with pulling States'));\n\t\t\n\t\t// push the states onto the array stack LIFO. State ID 1-50.\n\t\tif (mysql_num_rows($result) > 0) \n\t\t{\n\t\t\t\n\t\t\twhile($row = mysql_fetch_array($result))\n\t\t {\t \n\t\t\t// prepare new state object\n\t\t\t$state \t\t = new State();\t\t\t\t\t\n\t\t\t// populate object\n\t\t\t$state->id \t\t= $row[\"state_id\"];\n\t\t\t$state->name \t= $row[\"state_desc\"];\n\t\t\t// push onto stack\n\t\t\tarray_push($state_array, $state);\n\t\t\t}\n\t\t\n\t\t}\n\t\t// return array\n\t\treturn $state_array;\t\t\n\t}", "public function statesAction()\n {\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n\n // Retrieve all state records and store the state data into\n // a multi-dimensional array\n $records = $this->entity->getEntityManager()->getRepository(\n \"Training\\Entity\\State\")->findAll();\n $array = [];\n foreach($records as $i)\n {\n $array[$i->id]['state_name'] = $i->state_name;\n $array[$i->id]['state_abbreviation'] = $i->state_abbreviation;\n }\n\n // Output the json\n $this->_helper->json($array);\n }", "public function getAllStories()\n {\n $stories = array();\n\n foreach (\\App\\Story::where('final', '=', true)->get() as $entry) {\n $story = array();\n\n $story['id'] = $entry->id;\n $story['title'] = $entry->title;\n $story['description'] = $entry->description;\n $story['author'] = $entry->author;\n $story['revision'] = $entry->revision;\n $story['size'] = $entry->size;\n $story['size_uom'] = $entry->size_uom;\n $story['location'] = $entry->location;\n $story['radius'] = $entry->radius;\n $story['radius_uom'] = $entry->radius_uom;\n $story['created_at'] = $entry->created_at->toDateTimeString();\n $story['updated_at'] = $entry->updated_at->toDateTimeString();\n\n $stories[] = $story;\n }\n\n $headers['Content-Type'] = 'application/json; charset=utf-8';\n\n return response()->json($stories, 200, $headers, JSON_UNESCAPED_UNICODE);\n }", "function states()\n\t{\n\t\tglobal $TMPL;\n\t\t\n\n\t\t$country_code = ($TMPL->fetch_param('country_code')) ? $TMPL->fetch_param('country_code') : \"USA\";\n\t\t$return_data = '';\n\t\t\n\t\tif ($country_code == \"USA\")\n\t\t{\n\t\t\t$states_array = $this->states; \n\t\t}\n\t\telse\n\t\t{\n\t\t\t$states_list = $country_code . \"states\";\n\t\t\t$states_array = @$this->$states_list; \n\t\t}\n\t\tforeach ($states_array as $abbrev => $state)\n\t\t{\n\t\t\t$tagdata = $TMPL->tagdata;\n\t\t\t$tagdata = $TMPL->swap_var_single('abbrev', $abbrev, $tagdata);\n\t\t\t$tagdata = $TMPL->swap_var_single('state', $state, $tagdata);\n\t\t\t$return_data .= $tagdata;\n\t\t}\n\t\t\n\t\treturn $return_data;\n\t}", "public function getIncomingStates(): array;", "public function getStateArray()\n {\n return $this->stateData;\n }", "public static function arrayStatuses() {\n\n $statuses = array(\n 'all' => array(\n 'label' => __( 'All', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'publish' => array(\n 'label' => __( 'Publish', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'trash' => array(\n 'label' => __( 'Trash', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n )\n );\n return $statuses;\n }", "public function get_totals() {\n\t\treturn $this->totals;\n\t}", "public function standings(){\n $standings = array();\n // define initial velues\n foreach($this->teams as $team){\n $standings[$team->id] = array(\n 'team_id'=>$team->id,\n 'team_name'=>$team->name,\n 'team_iso'=>$team->iso,\n 'played' => 0,\n 'wins' => 0,\n 'draws' => 0,\n 'losts'=> 0,\n 'goalsFor' => 0,\n 'goalsAgainst' => 0,\n );\n }\n // update values according to each match\n foreach($this->matches as $match){ // only group matches\n if (is_null($match->score_h) || is_null($match->score_a)) break; // match not finished\n $standings[$match->team_h]['played'] += 1;\n $standings[$match->team_a]['played'] += 1;\n $standings[$match->team_h]['goalsFor'] += $match->score_h;\n $standings[$match->team_h]['goalsAgainst'] += $match->score_a; \n $standings[$match->team_a]['goalsFor'] += $match->score_a;\n $standings[$match->team_a]['goalsAgainst'] += $match->score_h;\n switch ($match->score_h <=> $match->score_a){\n case 0 : $standings[$match->team_h]['draws'] += 1; $standings[$match->team_a]['draws'] += 1; break;\n case 1 : $standings[$match->team_h]['wins'] += 1; $standings[$match->team_a]['losts'] += 1; break; // home team wins\n case -1: $standings[$match->team_h]['losts'] += 1; $standings[$match->team_a]['wins'] += 1; break; // home team loses\n } \n }\n usort($standings,array($this, \"cmp_standings\")); \n return $standings;\n }", "public function index(){\n\n return $this->stateService->getAll();\n }", "public function totalsChartData($totals)\n\t{\n\t\t//echo json_encode($this->states);\n\t\t/*\n\t\tforeach($this->states AS $state)\n\t\t{\n\t\t\t$hours[] = $totals['hours'][$state];\n\t\t}\n\t\t$data = array($this->states, $hours);\n\t\t*/\n\t\tforeach($this->simpleStates AS $simpleState => $states)\n\t\t{\n\t\t\t$stateNames[] = $simpleState;\n\t\t\tforeach($states AS $state)\n\t\t\t{\n\t\t\t\t$hours[$simpleState] += $totals['hours'][$state];\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($hours AS $key => $hour)\n\t\t{\n\t\t\t$hourNoKey[] = $hour;\n\t\t}\n\t\t\n\t\t$data = array($stateNames, $hourNoKey);\n\t\treturn $data;\n\t}", "public function getStagiaires()\n {\n return $this->stagiaires;\n }", "public function calories() {\n\t\t$nutrition = $this->nutrition();\n\t\treturn isset( $nutrition['calories'] ) ? $nutrition['calories'] : false;\n\t}", "public function getTopStories(){\n\t\treturn $this->getArticles();\n\t}", "public function states()\n {\n return response(LocationService::getStates());\n }", "function bottomStory() {\n\n $data = array();\n $sql = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n SELECT *\n FROM `story`\n WHERE `isActive` = 1\n AND `companyId` ='\" . $this->getCompanyId() . \"'\n LIMIT 3\";\n } else if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n SELECT *\n FROM [story]\n WHERE [isActive] = 1\n AND [companyId] = '\" . $this->getCompanyId() . \"'\n LIMIT 3\";\n } else if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n SELECT *\n FROM STORY\n WHERE ISACTIVE = 1\n AND COMPANYID = '\" . $this->getCompanyId() . \"'\n LIMIT 3\";\n }\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n header('Content-Type:application/json; charset=utf-8');\n $this->q->rollback();\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n while (($row = $this->q->fetchArray($result)) == TRUE) {\n\n $data[] = $row;\n }\n return $data;\n }", "public function getStateMetrics()\n {\n return $this->getState()->getMetrics();\n }", "public function getStateList() {\n $arrResult = null;\n\n $sql = \"select * from \" . $this->table . \"state order by description,stateName\";\n $this->dbcon->execute_query($sql);\n $arrTemp = $this->dbcon->fetch_records(true);\n if (is_array($arrTemp)) {\n $arrResult = $arrTemp;\n }\n\n return $arrResult;\n }", "public function indexAction()\n\t{\n\t\t$states = State::find([\n\t\t\t'order' => 'name'\n\t\t]);\n\n\t\treturn $this->createResponse($states);\n\t}", "protected function localSummary()\n {\n if(Auth()->User()->lga_id != null){\n $acredited = 0;\n $registered = 0;\n $pdp = 0;\n $apc = 0;\n $valid_vote = 0;\n $invalid_vote = 0;\n $other = 0;\n foreach(Auth()->User()->lga->wards as $ward){\n foreach ($ward->pollingUnits as $pollingUnit) {\n $acredited = $acredited + $pollingUnit->acredited;\n $registered = $registered + $pollingUnit->registered;\n }\n }\n return [\n 'registered' => $registered,\n 'acredited' => $acredited,\n 'pdp' => $pdp,\n 'apc' => $apc,\n 'valid_vote' => $valid_vote,\n 'invalid_vote' => $invalid_vote,\n 'other' => $other\n ];\n }else{\n return [];\n }\n }", "public function getTotalsForDisplay()\n {\n $amount = $this->getAmount();\n $label = $this->_cybCodeHelper->getCybCodLabel() ? $this->_cybCodeHelper->getCybCodLabel() : __($this->getTitle());\n $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;\n $total = ['amount' => $amount, 'label' => $label, 'font_size' => $fontSize];\n return [$total];\n }", "public function ourStoriesAction() {\r\n\r\n return array(\r\n );\r\n }", "public function getStates(){\n\n\t\treturn array('Andhra Pradesh'=>'Andhra Pradesh','Arunachal Pradesh'=>'Arunachal Pradesh','Assam'=>'Assam','Bihar'=>'Bihar','Chhattisgarh'=>'Chhattisgarh','Goa'=>'Goa','Gujarat'=>'Gujarat','Haryana'=>'Haryana','Himachal Pradesh'=>'Himachal Pradesh','Jammu and Kashmir'=>'Jammu and Kashmir','Jharkhand'=>'Jharkhand','Karnataka'=>'Karnataka','Kerala'=>'Kerala','MadhyaPradesh'=>'MadhyaPradesh','Maharashtra'=>'Maharashtra','Manipur'=>'Manipur','Meghalaya'=>'Meghalaya','Mizoram'=>'Mizoram','Nagaland'=>'Nagaland','Odisha'=>'Odisha','Punjab'=>'Punjab','Rajasthan'=>'Rajasthan','Sikkim'=>'Sikkim','Tamil Nadu'=>'Tamil Nadu','Telangana State'=>'Telangana State','Tripura'=>'Tripura','Uttarakhand'=>'Uttarakhand','Uttar Pradesh'=>'Uttar Pradesh','West Bengal'=>'West Bengal','Andaman and Nicobar Islands'=>'Andaman and Nicobar Islands','Chandigarh'=>'Chandigarh','Dadra and Nagar Haveli'=>'Dadra and Nagar Haveli','Daman and Diu'=>'Daman and Diu','Delhi'=>'Delhi','Lakshadweep'=>'Lakshadweep','Puducherry'=>'Puducherry');\n\t}", "public function getStates(): array\n {\n \\trigger_error(\"WebAPI::getStates is not implemented.\", E_USER_WARNING);\n\n $json = $this->_guzzle\n ->request('GET', '/crunchi/api/order/Address/CountryStates?cartCountry=USA')\n ->getBody()\n ->getContents();\n\n return \\json_decode($json);\n\n $results = [];\n foreach (\\json_decode($json) as $country) {\n //$results[] = $country;\n }\n\n return $results;\n }", "function readStateTags() {\n global $conn, $stateAndTags, $statesAndAllRecivesCounts, $statesAndInfractionsCounts,\n $statesAndObserveCounts, $statesAndEditCounts;\n $sql = \"SELECT * FROM statesTags\";\n $result = $conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n $stateAndTags[] = [$row[\"state\"], explode(',', $row[\"tags\"]), $row['name']];\n ////Assignmet default value 0 Zero\n $statesAndAllRecivesCounts[$row[\"state\"]] = 0;\n $statesAndInfractionsCounts[$row[\"state\"]] = 0;\n $statesAndObserveCounts[$row[\"state\"]] = 0;\n $statesAndEditCounts[$row[\"state\"]] = 0;\n }\n }\n}", "public function getStateImports() {\n\t\t$stateInports = array();\n\t\t\n\t\t$artMetricsMgr = $this->container->get('seriel_cross_indicator.article_metrics_manager');\n\t\tif (false) $artMetricsMgr = new CrossIndicatorArticleManager();\n\t\t\n\t\t$date= $artMetricsMgr->getLastDateCalcul();\n\t\tif (isset($date)) {\n\t\t\t$stateInports[] = New StateImport('CrossIndicator - Dernier calcul', $date);\n\t\t}\n\t\treturn $stateInports;\n\t}", "public function gettotals(){\n\t $today = getdate();\n\t $thisfy = $today['year'];\n\t$lastfy = $thisfy-1;\n\t$fytotals=array(\"lastfy\"=>0,\"thisfy\"=>0);\n\t\n\t$this->paidlastfy='select sum(amtpaidthisyear) from members where fyear = \"'.$lastfy.'\" and status in( \"Active\",\"Left\")';\n\t$this->load();\n\t$fytotals[\"lastfy\"]=$this->paidlastfy;\n\t$this->paidthisfy='select sum(amtpaidthisyear) from members where fyear = \"'.$thisfy.'\" and status in( \"Active\",\"Left\")';\n\t$this->load();\n\t$fytotals[\"thisfy\"]=$this->paidthisfy;\n\t//$fytotals[\"lastfy\"] = 23;\n\t\nreturn $fytotals\t;\n}", "public function getOutgoingStates(): array;", "public function getAllOpenStories()\n {\n $stories = array();\n\n foreach (\\App\\Story::where('final', '=', false)->get() as $entry) {\n $story = array();\n\n $story['id'] = $entry->id;\n $story['working_title'] = $entry->working_title;\n $story['created_at'] = $entry->created_at->toDateTimeString();\n $story['updated_at'] = $entry->updated_at->toDateTimeString();\n\n $stories[] = $story;\n }\n\n $headers['Content-Type'] = 'application/json; charset=utf-8';\n\n return response()->json($stories, 200, $headers, JSON_UNESCAPED_UNICODE);\n }", "public function loadStates()\n {\n foreach (\\eZContentObjectStateGroup::fetchObjectList(\\eZContentObjectStateGroup::definition()) as $stateGroup) {\n $stateIdentifiers = array();\n $states = $stateGroup->states();\n foreach ($states as $state) {\n $stateIdentifiers[] = $state->attribute('identifier');\n }\n $this->stateIndex[$stateGroup->attribute('identifier')] = array(\n 'id' => $stateGroup->attribute('id'),\n 'status' => 'reference',\n 'identifier' => $stateGroup->attribute('identifier'),\n 'states' => $stateIdentifiers,\n );\n }\n return $this->stateIndex;\n }", "public function getGameState() : array\n {\n return $this->gameState;\n }", "public function getCalories()\n {\n $caloriesForOneUnit = DB::table('food_unit')->where('food_id', $this->food->id)\n ->where('unit_id', $this->unit->id)\n ->pluck('calories');\n\n return $caloriesForOneUnit * $this->quantity;\n }", "public function getStates()\n {\n $states = file_get_contents(\"states.db\");\n $states = explode(';', $states);\n return array_filter($states);\n }", "public static function summary() {\n\t\t$chart = \"\";\n\t\t$translator = Shineisp_Registry::getInstance ()->Zend_Translate;\n\t\t\n\t\t// Get the customer summary values\n\t\t$dq = Doctrine_Query::create ()\n\t\t\t\t\t\t\t\t\t->select ( \"customer_id, count(*) as items, s.status as status\" )\n\t\t\t\t\t\t\t\t\t->from ( 'Customers c' )\n\t\t\t\t\t\t\t\t\t->leftJoin ( 'c.Statuses s' )\n\t\t\t\t\t\t\t\t\t->where(\"s.section = 'customers'\")\n ->addWhere( \"c.isp_id = ?\", Isp::getCurrentId() )\n\t\t\t\t\t\t\t\t\t->groupBy('s.status');\n\n $auth = Zend_Auth::getInstance ();\n if( $auth->hasIdentity () ) {\n $logged_user= $auth->getIdentity ();\n $dq->andWhere( \"c.isp_id = ?\", $logged_user['isp_id']);\n } \n \n $datarecords = $dq->execute(array (), Doctrine_Core::HYDRATE_ARRAY);\n\n\t\t$records['data'] = $datarecords;\n\t\t$records['fields'] = array('items' => array('label' => $translator->translate('Items')), 'status' => array('label' => $translator->translate('Status')));\n\t\t\n\t\treturn $records;\n\t}", "public function getStatesList() {\n\t\tself::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' begin' );\n\n\t\t$list = array ();\n\n\t\t$query = ClaimsDB::getStates ();\n\n\t\t$connectionManager = ConnectionManager::getInstance ();\n\n\t\t$rs = $connectionManager->select ( $query );\n\n\t\tforeach ( $rs as $element ) {\n\n\t\t\t$obj = new State();\n\n\t\t\t$obj->setId($element['id']);\n\t\t\t$obj->setName(Util::getLiteral($element['name']));\n\n\t\t\t$list [] = $obj;\n\t\t}\n\n\t\tself::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' end' );\n\n\t\treturn $list;\n\t}", "public function getTotal();", "public function getTotal();", "public function getTotal();", "public function getTotal();", "public function getTotal();", "public function getTotal();", "public function getTotal();", "public function getTotal();", "public function getSuits() : array;", "public function index()\n {\n return response()->json([\n 'states' => $this->states->paginate(10)\n ], 200);\n }", "public function getCurrentStates()\n {\n return new PingdomApiReportGetCurrentStatesResponse($this->callSoapClient('Report_getCurrentStates'));\n }", "public function action_counts() {\n\t\tglobal $wpdb;\n\n\t\t$sql = \"SELECT a.status, count(a.status) as 'count'\";\n\t\t$sql .= \" FROM {$wpdb->actionscheduler_actions} a\";\n\t\t$sql .= \" GROUP BY a.status\";\n\n\t\t$actions_count_by_status = array();\n\t\t$action_stati_and_labels = $this->get_status_labels();\n\n\t\tforeach ( $wpdb->get_results( $sql ) as $action_data ) {\n\t\t\t// Ignore any actions with invalid status\n\t\t\tif ( array_key_exists( $action_data->status, $action_stati_and_labels ) ) {\n\t\t\t\t$actions_count_by_status[ $action_data->status ] = $action_data->count;\n\t\t\t}\n\t\t}\n\n\t\treturn $actions_count_by_status;\n\t}", "public function studio_summary_info()\n {\n\n\t return (object) array(\n\t 'where_made' => get_field('c_where_made', $post_id),\n\t //'printers_workshops' => get_field('c_printers_workshops', $post_id),\n\t 'printer_notes' => get_field('c_printer_notes', $post_id, false, false),\n\t 'sum_edition' => get_field('c_sum_edition_information', $post_id, false, false),\n\t );\n }", "public function actionState()\n {\n $searchModel = new AccountTransactionSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n \n $tableData = [];\n \n $queryIn = AccountTransaction::find()\n ->where(['account_transaction.type' => AccountTransaction::TYPE_IN])\n ->andWhere(['is not', 'account_transaction.invoice_service_id', null])\n ->andWhere(['>', 'uid_date', date('Y-m-d', strtotime(time() . ' -1 year'))])\n ->orderBy(['uid_date' => SORT_DESC]);\n $itemsIn = $queryIn->asArray()->all();\n $queryOut = AccountTransaction::find()\n ->where(['account_transaction.type' => AccountTransaction::TYPE_OUT])\n ->andWhere(['is not', 'account_transaction.invoice_service_id', null])\n ->andWhere(['>', 'uid_date', date('Y-m-d', strtotime(time() . ' -1 year'))])\n ->orderBy(['uid_date' => SORT_DESC]);\n $itemsOut = $queryOut->asArray()->all();\n \n $totalIncome = 0;\n $totalOutcome = 0;\n foreach ($queryIn->each() as $item) {\n $month = Yii::$app->formatter->asDate(strtotime($item['uid_date']), 'LLLL, yyyy');\n if (!isset($tableData[$month])) {\n $tableData[$month] = [\n 'services' => [],\n ];\n }\n \n $service = $item['invoice_service_id'];\n $invoiceService = InvoiceService::findOne($service);\n if (!isset($tableData[$month]['services'][$service])) {\n $tableData[$month]['services'][$service] = [\n 'name' => $invoiceService->service->name,\n 'income' => 0,\n 'outcome' => 0,\n ];\n }\n \n if ($item['type'] == AccountTransaction::TYPE_IN) {\n $tableData[$month]['services'][$service]['income'] += $item['amount'];\n $totalIncome += $item['amount'];\n } elseif ($item['type'] == AccountTransaction::TYPE_OUT) {\n $tableData[$month]['services'][$service]['outcome'] += $item['amount'];\n $totalOutcome += $item['amount'];\n }\n }\n \n foreach ($queryOut->each() as $item) {\n $month = Yii::$app->formatter->asDate(strtotime($item['uid_date']), 'LLLL, yyyy');\n if (!isset($tableData[$month])) {\n $tableData[$month] = [\n 'services' => [],\n ];\n }\n \n $service = $item['invoice_service_id'];\n $invoiceService = InvoiceService::findOne($service);\n if (!isset($tableData[$month]['services'][$service])) {\n $tableData[$month]['services'][$service] = [\n 'name' => $invoiceService->service->name,\n 'income' => 0,\n 'outcome' => 0,\n ];\n }\n \n if ($item['type'] == AccountTransaction::TYPE_IN) {\n $tableData[$month]['services'][$service]['income'] += $item['amount'];\n $totalIncome += $item['amount'];\n } elseif ($item['type'] == AccountTransaction::TYPE_OUT) {\n $tableData[$month]['services'][$service]['outcome'] += $item['amount'];\n $totalOutcome += $item['amount'];\n }\n }\n\n return $this->render('state', [\n 'tableData' => $tableData,\n 'totalIncome' => $totalIncome,\n 'totalOutcome' => $totalOutcome,\n ]);\n }", "public function get_totals()\n {\n }", "public function createStates() {\n $order_states = array (\n array (\n '#ccfbff',\n $this->l ( 'Transaction in Process' ),\n 'in_process',\n '010010000' \n ),\n array (\n '#c9fecd',\n $this->l ( 'Transaction Finished' ),\n 'payment',\n '110010010' \n ),\n array (\n '#fec9c9',\n $this->l ( 'Transaction Cancelled' ),\n 'order_canceled',\n '010010000' \n ),\n array (\n '#fec9c9',\n $this->l ( 'Transaction Rejected' ),\n 'payment_error',\n '010010000' \n ),\n array (\n '#ffeddb',\n $this->l ( 'Transaction Refunded' ),\n 'refund',\n '110010000' \n ),\n array (\n '#c28566',\n $this->l ( 'Transaction Chargedback' ),\n 'charged_back',\n '010010000' \n ),\n array (\n '#b280b2',\n $this->l ( 'Transaction in Mediation' ),\n 'in_mediation',\n '010010000' \n ),\n array (\n '#fffb96',\n $this->l ( 'Transaction Pending' ),\n 'pending',\n '010010000' \n ) \n );\n \n $languages = Language::getLanguages ();\n \n foreach ( $order_states as $key => $value ) {\n if (! is_null ( $this->orderStateAvailable ( Configuration::get ( 'MERCADOPAGO_STATUS_' . $key ) ) )) {\n continue;\n } else {\n $order_state = new OrderState ();\n $order_state->invoice = $value [3] [0];\n $order_state->send_email = $value [3] [1];\n $order_state->module_name = 'mercadopago';\n $order_state->color = $value [0];\n $order_state->unremovable = $value [3] [2];\n $order_state->hidden = $value [3] [3];\n $order_state->logable = $value [3] [4];\n $order_state->delivery = $value [3] [5];\n $order_state->shipped = $value [3] [6];\n $order_state->paid = $value [3] [7];\n $order_state->deleted = $value [3] [8];\n $order_state->name = array ();\n $order_state->template = array ();\n \n foreach ( Language::getLanguages ( false ) as $language ) {\n $order_state->name [( int ) $language ['id_lang']] = $value [1];\n $order_state->template [$language ['id_lang']] = $value [2];\n \n if ($value [2] == 'in_process' || $value [2] == 'pending' || $value [2] == 'charged_back' || $value [2] == 'in_mediation') {\n $this->populateEmail ( $language ['iso_code'], $value [2], 'html' );\n $this->populateEmail ( $language ['iso_code'], $value [2], 'txt' );\n }\n }\n \n if (! $order_state->add ())\n return false;\n \n $file = _PS_ROOT_DIR_ . '/img/os/' . ( int ) $order_state->id . '.gif';\n copy ( (dirname ( __file__ ) . '/views/img/mp_icon.gif'), $file );\n \n Configuration::updateValue ( 'MERCADOPAGO_STATUS_' . $key, $order_state->id );\n }\n }\n return true;\n }", "final public function all(): array\n {\n return $this->stats;\n }", "public function getStates() {\n\t\treturn array('AL'=>\"Alabama\",'AK'=>\"Alaska\",'AZ'=>\"Arizona\",'AR'=>\"Arkansas\",'CA'=>\"California\",'CO'=>\"Colorado\",'CT'=>\"Connecticut\",'DE'=>\"Delaware\",'DC'=>\"District Of Columbia\",'FL'=>\"Florida\",'GA'=>\"Georgia\",'HI'=>\"Hawaii\",'ID'=>\"Idaho\",'IL'=>\"Illinois\",'IN'=>\"Indiana\",'IA'=>\"Iowa\",'KS'=>\"Kansas\",'KY'=>\"Kentucky\",'LA'=>\"Louisiana\",'ME'=>\"Maine\",'MD'=>\"Maryland\",'MA'=>\"Massachusetts\",'MI'=>\"Michigan\",'MN'=>\"Minnesota\",'MS'=>\"Mississippi\",'MO'=>\"Missouri\",'MT'=>\"Montana\",'NE'=>\"Nebraska\",'NV'=>\"Nevada\",'NH'=>\"New Hampshire\",'NJ'=>\"New Jersey\",'NM'=>\"New Mexico\",'NY'=>\"New York\",'NC'=>\"North Carolina\",'ND'=>\"North Dakota\",'OH'=>\"Ohio\",'OK'=>\"Oklahoma\",'OR'=>\"Oregon\",'PA'=>\"Pennsylvania\",'RI'=>\"Rhode Island\",'SC'=>\"South Carolina\",'SD'=>\"South Dakota\",'TN'=>\"Tennessee\",'TX'=>\"Texas\",'UT'=>\"Utah\",'VT'=>\"Vermont\",'VA'=>\"Virginia\",'WA'=>\"Washington\",'WV'=>\"West Virginia\",'WI'=>\"Wisconsin\",'WY'=>\"Wyoming\");\n\t}", "public function run()\n {\n $states = [\n\n [\n 'state_id' => 1,\n 'country_id' => 1,\n 'state_name' => 'Andhra Pradesh'\n\n ],\n [\n 'state_id' => 2,\n 'country_id' => 1,\n 'state_name' => 'Arunachal Pradesh '\n ],\n [\n 'state_id' => 3,\n 'country_id' => 1,\n 'state_name' => 'Assam'\n\n ],\n [\n 'state_id' => 4,\n 'country_id' => 1,\n 'state_name' => 'Bihar'\n\n ],\n [\n 'state_id' => 5,\n 'country_id' => 1,\n 'state_name' => 'Chhattisgarh'\n\n ],\n [\n 'state_id' => 6,\n 'country_id' => 1,\n 'state_name' => 'Goa'\n\n ],\n [\n 'state_id' => 7,\n 'country_id' => 1,\n 'state_name' => 'Gujarat'\n\n ],\n [\n 'state_id' => 8,\n 'country_id' => 1,\n 'state_name' => 'Haryana'\n\n ],\n [\n 'state_id' => 9,\n 'country_id' => 1,\n 'state_name' => 'Himachal Pradesh'\n\n ],\n [\n 'state_id' => 10,\n 'country_id' => 1,\n 'state_name' => 'Jharkhand'\n\n ],\n [\n 'state_id' => 11,\n 'country_id' => 1,\n 'state_name' => 'Karnataka'\n\n ],\n [\n 'state_id' => 12,\n 'country_id' => 1,\n 'state_name' => 'Kerala '\n\n ],\n [\n 'state_id' => 13,\n 'country_id' => 1,\n 'state_name' => 'Madhya Pradesh'\n\n ],\n [\n 'state_id' => 14,\n 'country_id' => 1,\n 'state_name' => 'Maharashtra'\n\n ],\n [\n 'state_id' => 15,\n 'country_id' => 1,\n 'state_name' => 'Manipur'\n\n ],\n [\n 'state_id' => 16,\n 'country_id' => 1,\n 'state_name' => 'Meghalaya'\n\n ],\n [\n 'state_id' => 17,\n 'country_id' => 1,\n 'state_name' => 'Mizoram'\n\n ],\n [\n 'state_id' => 18,\n 'country_id' => 1,\n 'state_name' => 'Nagaland'\n\n ],\n [\n 'state_id' => 19,\n 'country_id' => 1,\n 'state_name' => 'Odisha'\n\n ],\n [\n 'state_id' => 20,\n 'country_id' => 1,\n 'state_name' => 'Punjab'\n\n ],\n [\n 'state_id' => 21,\n 'country_id' => 1,\n 'state_name' => 'Rajasthan'\n\n ],\n [\n 'state_id' => 22,\n 'country_id' => 1,\n 'state_name' => 'Sikkim'\n\n ],\n [\n 'state_id' => 23,\n 'country_id' => 1,\n 'state_name' => 'Tamil Nadu'\n\n ],\n [\n 'state_id' => 24,\n 'country_id' => 1,\n 'state_name' => 'Telangana '\n\n ],\n [\n 'state_id' => 25,\n 'country_id' => 1,\n 'state_name' => 'Tripura '\n\n ],\n [\n 'state_id' => 26,\n 'country_id' => 1,\n 'state_name' => 'Uttar Pradesh'\n\n ],\n [\n 'state_id' => 27,\n 'country_id' => 1,\n 'state_name' => 'Uttarakhand'\n\n ],\n [\n 'state_id' => 28,\n 'country_id' => 1,\n 'state_name' => 'West Bengal '\n\n ],\n [\n 'state_id' => 29,\n 'country_id' => 1,\n 'state_name' => ' Andaman and Nicobar Islands '\n\n ],\n [\n 'state_id' => 30,\n 'country_id' => 1,\n 'state_name' => 'Chandigarh'\n\n ],\n [\n 'state_id' => 31,\n 'country_id' => 1,\n 'state_name' => 'Dadra and Nagar Haveli and Daman and Diu (DNHDD)'\n\n ],\n [\n 'state_id' => 32,\n 'country_id' => 1,\n 'state_name' => 'Delhi'\n\n ],\n [\n 'state_id' => 33,\n 'country_id' => 1,\n 'state_name' => 'Jammu and Kashmir '\n\n ],\n [\n 'state_id' => 34,\n 'country_id' => 1,\n 'state_name' => 'Ladakh '\n\n ],\n [\n 'state_id' => 35,\n 'country_id' => 1,\n 'state_name' => 'Lakshadweep'\n\n ],\n [\n 'state_id' => 36,\n 'country_id' => 1,\n 'state_name' => 'Puducherry'\n\n ],\n\n\n ];\n\n state::insert($states);\n }", "public function getSummary();", "public function getSummary();", "public function getSummary();", "public function getSummary();" ]
[ "0.60306257", "0.5996237", "0.59729415", "0.58354497", "0.58354497", "0.5820977", "0.5785108", "0.5761071", "0.57529634", "0.5733886", "0.5725187", "0.5663867", "0.5647059", "0.5641737", "0.5552936", "0.5550473", "0.5549096", "0.55384564", "0.55345845", "0.5508866", "0.5499484", "0.5494749", "0.54812264", "0.54727745", "0.54610395", "0.54609555", "0.54446423", "0.54163706", "0.54074013", "0.53819776", "0.53603405", "0.5359935", "0.5359935", "0.5359935", "0.5359935", "0.5358835", "0.5358835", "0.53540534", "0.53046304", "0.5287206", "0.52826774", "0.5275903", "0.5273803", "0.5270973", "0.52536404", "0.52468044", "0.5246585", "0.5219819", "0.52018464", "0.5191883", "0.5183162", "0.51771915", "0.5176556", "0.5148354", "0.514285", "0.51333034", "0.51249975", "0.51212645", "0.5119563", "0.5115811", "0.5105874", "0.5105538", "0.51007485", "0.5099281", "0.50934476", "0.5050046", "0.5042784", "0.5037576", "0.5027979", "0.50224376", "0.5018762", "0.5017053", "0.5010034", "0.5005805", "0.50035876", "0.50019264", "0.49967548", "0.4990741", "0.4990741", "0.4990741", "0.4990741", "0.4990741", "0.4990741", "0.4990741", "0.4990741", "0.4988495", "0.4987903", "0.4978583", "0.4970634", "0.49631447", "0.49617702", "0.4960279", "0.49580607", "0.49571967", "0.49558878", "0.49547806", "0.49502254", "0.49502254", "0.49502254", "0.49502254" ]
0.80171895
0
/ Use the setUp() method to define settings of this meta box.
Используйте метод setUp(), чтобы определить настройки этого мета-ящика.
public function setUp() { /* * Create tabbed sections. */ $this->addSettingSections( array( 'section_id' => 'theatre_tickets', 'title' => 'Ticket', 'collapsible' => array( 'title' => 'Ticket', 'container' => 'section' ), 'attributes' => array( 'data-block' => 'owst-theatre__tickets', ), 'repeatable' => true, 'sortable' => true, ) ); /** * Adds setting fields in the meta box. */ // $this->addSettingFields( // array( // 'field_id' => 'description', // 'type' => 'section_title', // 'title' => 'Tickets' // ) // ); /** * Adds setting fields in the meta box. */ $this->addSettingFields( 'theatre_tickets', array( 'field_id' => '_name', 'type' => 'section_title', 'attributes' => array( 'placeholder' => 'Ticket Name', 'style' => 'width: 140px;margin-bottom: 4px;', ), ), array( 'field_id' => '_description', 'type' => 'text', 'attributes' => array( 'placeholder' => 'Description', 'style' => 'width: 100%;', ) ), array( 'field_id' => '_price', 'type' => 'number', 'attributes' => array( 'style' => 'width: 70px; font-family: monospace;', 'min' => 0.00, 'step' => 0.25, 'placeholder' => 'Price' ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp() {\n\n\t\t/*\n\t\t * ( optional ) Adds a contextual help pane at the top right of the page that the meta box resides.\n\t\t */\n\t\t$this->addHelpText( \n\t\t\t__( 'This text will appear in the contextual help pane.', 'legull' ), \n\t\t\t__( 'This description goes to the sidebar of the help pane.', 'legull' )\n\t\t);\t\t\t\n\t\t\n\t}", "public function setUp() {\n $this->account_pagemeta = new AccountPagemeta();\n\n // Define\n $this->phactory->define( 'website_pagemeta', array( 'website_page_id' => self::WEBSITE_PAGE_ID, 'key' => self::KEY, 'value' => self::VALUE ) );\n $this->phactory->define( 'website_pages', array( 'website_id' => self::WEBSITE_ID, 'website_page_id' => self::WEBSITE_PAGE_ID ) );\n $this->phactory->recall();\n }", "protected function setUp() {\n $this->set_object();\n parent::setUp();\n }", "protected function setUpSettings() {\n // This form will never be reached.\n }", "protected function setUp() {\n $this->object = new Qwin_Widget;\n }", "public function setUp() {\n\t\tparent::setUp();\n\n\t\tglobal $post;\n\t\t$this->create_posts();\n\t\t$post = get_post( $this->child_post_id );\n\t\tsetup_postdata( $post );\n\n\t\trequire_once plugin_dir_path( ( dirname( __FILE__ ) ) ) . 'public/partials/class-ultimateslideshowdisplay.php';\n\t\t$this->frontend = new Wpslide\\UltimateSlideshowDisplay();\n\n\t\tforeach ( $this->shortcodes as $shortcode ) {\n\t\t\tadd_shortcode( $shortcode, array( $this, '_shortcode_' . str_replace( '-', '_', $shortcode ) ) );\n\t\t}\n\n\t\t$this->atts = null;\n\t\t$this->content = null;\n\t\t$this->tagname = null;\n\t}", "function setUp() {\r\n\t\t\t// empty\r\n\t\t}", "public function setUp() {\n\t\tparent::setUp();\n\t\trequire_once ABSPATH . WPINC . '/class-wp-customize-manager.php';\n\t\trequire_once ABSPATH . WPINC . '/class-wp-customize-control.php';\n\t}", "protected function setUp() {\r\n \r\n }", "protected function setUp() {\n $this->object = new HTMLFormInternalFields;\n }", "public function setUp() {\n\t\tregister_setting( 'Zool', 'points', array(\n\t\t\t'type' => 'number',\n\t\t\t'description' => __( 'Test how many points we have in Zool.' ),\n\t\t\t'show_in_graphql' => true,\n\t\t\t'default' => 4.5,\n\t\t) );\n\n\t\t$this->admin = $this->factory->user->create( [\n\t\t\t'role' => 'administrator',\n\t\t] );\n\n\t\t$this->editor = $this->factory->user->create( [\n\t\t\t'role' => 'editor',\n\t\t] );\n\n\t\tparent::setUp();\n\n\t}", "protected function setUp() {\r\n\t\t$this->object = new FormularInput('name', 'Label');\r\n\t}", "protected function setUp(){\r\n \r\n }", "function setUp() {\n\t\t// calling this allows hooks into the base WordPress classes such as the WP_User object.\n\t\tparent::setUp();\n\n\t\t// Regenerate the Storage class each test\n\t\t$this->s = new Postmedia\\Web\\Storage();\n\t\t// Re-initialize storage each test\n\t\t$this->s->initialize_storage( $this->storage_hook = 'my_plugin_or_theme_hook' );\n\t\t$this->s->add_option( 'status', 'initialized' );\n\t}", "public function setUp() {\n\n\t\t// ----------------------------------------\n\t\t// Definition\n\t\t// ----------------------------------------\n\n\t\t$this->pageFactory->addInPageTab(\n\t\t\tarray(\n\t\t\t\t'page_slug' => $this->pageSlug,\n\t\t\t\t'tab_slug' => $this->tabSlug,\n\t\t\t\t'title' => __( 'Basics', 'tmc_sp' )\n\t\t\t)\n\t\t);\n\n\t}", "protected function setUp()\n {\n parent::setUp();\n $contents = file_get_contents(dirname(dirname(__DIR__)).'/forms/login.yml');\n $data = Yaml::parse($contents);\n $this->form = new Form();\n AddElements::execute($this->form, $data);\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n\t\t\n\t\t$this->_props = array(\n\t\t\t'id'\t\t=> 'USD',\n\t\t\t'label'\t\t=> 'U.S. Dollar',\n\t\t);\n\t}", "protected function setUp()\n {\n Html::init();\n }", "protected function setUp()\n {\n $context = \\Xmf\\Xadr\\Controller::getNew();\n $this->object = new Form($context);\n }", "protected function setUp()\n {\n parent::setUp();\n $this->_managementBlock = new Oggetto_GeoDetection_Block_Adminhtml_Management;\n }", "protected function setUp() {\n\t\tparent::setUp ();\n\t\n\t}", "function setUp()\n {\n \t$this->parentSetup();\n }", "public function setUp() {\n\t\t\t\n\t}", "protected function setUp()\n {\n $this->object = new \\Yana\\Forms\\NullBuilder();\n }", "protected function setUp()\n\t{\n\t\t$this->object = new System_Form_Element_Checkbox('tets');\n\t}", "public function setUp()\n {\n $this->formFactory = new RootFormFactory();\n\n parent::setUp();\n }", "public function setUp() : void\n {\n $this->setUpForm(new InstructionsAndPreferencesForm());\n }", "public function setUp()\n {\n $container = new Container();\n\n $this->formBuilder = $container->make('Avh\\Framework\\Html\\FormBuilder');\n parent::setUp();\n }", "protected function setUp()\n\t{\n\t\tparent::setUp();\n\t\t\n\t}", "protected function setUp()\n {\n \n }", "protected function setUp()\n {\n \n }", "function setUp()\n\t{\n\t\tparent::setUp();\n\t}", "protected function setUp()\n {\n $this->object = new Pager;\n }", "function setUp()\n {\n parent::setUp();\n\n wl_configure_wordpress_test();\n wl_empty_blog();\n rl_empty_dataset();\n }", "function setUp()\n {\n parent::setUp();\n\n wl_configure_wordpress_test();\n }", "protected function setUp(){\n\t}", "function setUp()\n {\n parent::setUp();\n wl_configure_wordpress_test();\n }", "protected function setUp() {\n\t\tparent::setUp ();\n\t\n\t\t// TODO Auto-generated Test::setUp()\n\t}", "protected function setUp() {\n\t\tparent::setUp ();\n\t}", "public function setUp()\n {\n parent::setUp();\n\n Config::inst()->update(ApiTestBook::class, 'api_access', true);\n Config::inst()->update(ApiTestWidget::class, 'api_access', true);\n\n $widget = ApiTestWidget::create(['Name' => 'TestWidget1']);\n $widget->write();\n $widget = ApiTestWidget::create(['Name' => 'TestWidget2']);\n $widget->write();\n }", "protected function setUp() {\n \n \n }", "protected function setUp() {\n $this->object = new Button_Add();\n }", "protected function setUp()\n\t{\n\t}", "protected function setUp()\n\t{\n\t}", "protected function setUp()\n\t{\n\t}", "protected function setUp()\n {\n $this->object = new SimpleLayout;\n }", "public function setUp(): void\n {\n parent::setUp();\n\n $this->form = $this->getFormBuilder();\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.8237976", "0.7588684", "0.74087864", "0.73782635", "0.7368556", "0.735146", "0.73447883", "0.73181325", "0.7304443", "0.7301227", "0.7283835", "0.725383", "0.7230093", "0.72129554", "0.72114336", "0.72089535", "0.7194675", "0.71881515", "0.71870583", "0.7180607", "0.7179053", "0.7175176", "0.71729845", "0.7163921", "0.7154441", "0.71347", "0.7126527", "0.7125927", "0.7112584", "0.7102061", "0.7102061", "0.71014595", "0.7099074", "0.70966744", "0.7090892", "0.7089195", "0.70875037", "0.7081542", "0.7078936", "0.70786303", "0.7076873", "0.7071801", "0.70656693", "0.70656693", "0.70656693", "0.70639116", "0.70631987", "0.70596176", "0.70596176", "0.70596176", "0.70596176", "0.70596176", "0.70596176", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149", "0.7059149" ]
0.7631542
1
TODO: Implement isGroup() method.
TODO: Реализовать метод isGroup().
public function isGroup(): bool { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function group();", "public function hasGroup(){\n return $this->_has(1);\n }", "function isMultiGroup()\n\t{\n\t\treturn true;\n\t}", "public function group()\n\t{\n\t}", "public function groups();", "public function groups();", "public function getGroup();", "public function getGroup();", "public function getGroup();", "public function getGroup();", "public function getGroup(): bool {}", "public function getGroup(): bool {}", "public function getGroup() {}", "public function getGroup() {}", "function isGrouped() {\n return $this->getGroupBy() != self::DONT_GROUP;\n }", "abstract public function getGroups();", "function getGroup() ;", "function getGroups()\n {\n return false;\n }", "public function getSubgroup() {}", "function hasGroup() {\n\t\treturn $this->_group !== null;\n\t}", "public function isSuperGroup()\n\t{\n\t\treturn ($this->get('type') == 3) ? true : false;\n\t}", "function create_group($name)\n {\n /* empty for address books don't supporting groups */\n return false;\n }", "function getGroups();", "public function hasGroupid(){\n return $this->_has(8);\n }", "public function grouped()\n {\n }", "public function createGroup();", "public abstract function getGroups();", "public function getElementGroup();", "public function getUsergroup() {}", "function group()\n {\n return Group::getInstance();\n }", "function getGroup() {\n\t\treturn $this->_group;\n\t}", "public function hasGroupid(){\n return $this->_has(16);\n }", "public function getGroupMain(): bool {}", "public function getGroupMain(): bool {}", "public function isGroup() : bool\n {\n $distinguishingDigit = substr($this->rawGroundWithSnow, 0, 1);\n\n return strcasecmp($distinguishingDigit, self::DIGIT) == 0;\n }", "public function hasGroupBy()\n {\n return !empty($this->group);\n }", "public function hasMoreGroups();", "public function getGroup()\n {\n\n if ($this->group != null) {\n return $this->group ;\n } else {\n if ($groupdata = posix_getgrgid(filegroup($this->folder. '/' . $this->fileName))) {\n\n $this->group = $groupdata['name'];\n\n return $this->group;\n } else {\n return false;\n }\n }\n\n }", "public function getGroups();", "public function getGroups();", "public function getGroups();", "public function getGroups();", "public function isGrouped()\n {\n return $this->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_GROUPED;\n }", "public function testGroup()\n {\n $field = Field::group('city', 'groupCity');\n $this->assertType('\\Xyster\\Data\\Symbol\\GroupField', $field);\n }", "public static function getGroup()\n {\n return static::$sGroup;\n }", "abstract public function GetGroupID(string $groupname);", "public function getGroup()\n\t{\n\t return $this->group;\n\t}", "public function hasGroupName(){\n return $this->_has(1);\n }", "function can_arbitrary_groupby()\n\t{\n\t\treturn true;\n\t}", "public function getGroups(): StringGroup;", "static function is_in_group( $name, $group ) {\n\t\treturn static::get_group_for( $name ) == $group;\n\t}", "static function get_group_for( $name ){\n\t\tif ( isset( static::$active_tests[ $name ] ) ) {\n\t\t\treturn static::$active_tests[ $name ][ 'group' ];\n\t\t}\n\t\treturn false;\n\t}", "public function type()\n {\n return 'group';\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "function isInGroupNamed($name)\n {\n return false;\n }", "function EventMod_Import_Events_Data_Group()\n {\n $group=\"Import\";\n if (empty($this->ItemDataGroups[ $group ][ \"Data\" ]))\n {\n $group=\"Basic\";\n }\n\n return $group;\n }", "abstract protected function getGroupList() ;", "public static function is_group( $obj ) {\n\t\tif ( is_object( $obj ) && is_a( $obj, 'KYSS_Group' ) )\n\t\t\treturn true;\n\t\tif ( is_string( $obj ) && self::group_exists( $obj ) )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function getGroup()\n\t{\n $app = JFactory::getApplication();\n\n $option\t= $app->input->get('option', '', 'word');\n $view = $app->input->get('view', '', 'word');\n $id = $app->input->get('id', '', 'int');\n $group_id = $app->input->get('group_id', '', 'int');\n \n if ($option == 'com_hwdmediashare' && $view == 'group' && $id)\n {\n return $id;\n }\n\n if ($option == 'com_hwdmediashare' && $view == 'mediaitem' && $group_id)\n {\n return $group_id;\n }\n \n return false;\n\t}", "public function createGroup() {\n\t\treturn $this->objectManager->get('Tx_Sfsvgapi_Domain_Model_Group');\n\t}", "public function isGroupProviderForUser();", "function &createGroup() {\n return $this->_gHandler->create();\n }", "public function isGroup() : bool\n {\n $distinguishingDigit = substr($this->rawSunshineRadiation, 0, 2);\n\n return strcasecmp($distinguishingDigit, self::DIGIT) == 0;\n }", "public function getGroup($group) {\n return false;\n }", "public function getGroup(): string;", "public function getGroup(): string;", "public function group() : Stage\\Group\n {\n return $this->builder->group();\n }", "function &getGroup() {\n\t\treturn $this->Group;\n\t}", "public function hasValidGroup()\t{\n if ($this->helper('wizard')->isEnabled()) {\n return is_object($this->_getCollection());\n }\n return false;\n }", "function get_groups()\n {\n //\n return $this->current('right');\n }", "public function getGroup(): int\n {\n return $this->decorated->getGroup();\n }", "public function getGroupname();", "function pname_group($r)\n\t{\n\t\treturn $r['id_group'];\n\t}", "public function getGroupNGroups(): bool {}", "public function getGroupNGroups(): bool {}", "public function testGetGroup()\n { \n $groups = Admin_Controller_Group::getInstance()->search($this->objects['initialGroup']->name);\n \n $group = Admin_Controller_Group::getInstance()->get($groups[0]->getId());\n \n $this->assertEquals($this->objects['initialGroup']->name, $group->name);\n }", "final public static function getGroup()\n {\n return self::$group;\n }", "function getGroup() {\n\n return null;\n\n }", "public function hasGroupId()\n {\n return $this->group_id !== null;\n }", "function get_group($group_id)\n {\n /* empty for address books don't supporting groups */\n return null;\n }", "public abstract static function getGroupId();", "public function isBasic()\n {\n return $this->groups()->find(1);\n }", "public function validate() : Group;", "public function testIsNotInGroup()\n {\n $oTestNews = oxNew('oxnews');\n $oTestNews->load($this->_oNews->getId());\n $this->assertFalse($oTestNews->inGroup('xxx'));\n }", "public static function getType() {\n\t\treturn \"Group\";\n\t}", "protected function _addGroupDo()\n\t{\n\t\t//-------------------------------\n\t\t// INIT\n\t\t//-------------------------------\n\t\t\n\t\t$g_id\t= intval( $this->request['entered_group'] );\n\t\t$isok\t= 0;\n\t\t\n\t\t//-------------------------------\n\t\t// Check...\n\t\t//-------------------------------\n\t\t\n\t\tif ( !$g_id )\n\t\t{\n\t\t\t$this->registry->output->global_message = $this->lang->words['r_nogroup'];\n\t\t\t$this->_addRole( 'group' );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//-------------------------------\n\t\t// Get member...\n\t\t//-------------------------------\n\t\t\n\t\t$group = $this->caches['group_cache'][ $g_id ];\n\n\t\t//-------------------------------\n\t\t// Check...\n\t\t//-------------------------------\n\t\t\n\t\tif ( ! $group['g_id'] )\n\t\t{\n\t\t\t$this->registry->output->global_message = $this->lang->words['r_nofindgroup'];\n\t\t\t$this->_addRole( 'group' );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//-------------------------------\n\t\t// Already got 'em\n\t\t//-------------------------------\n\t\t\n\t\t$test = $this->DB->buildAndFetch( array( 'select' => 'row_id', 'from' => 'admin_permission_rows', 'where' => \"row_id_type='group' AND row_id=\" . $g_id ) );\n\t\t\n\t\tif ( $test['row_id'] )\n\t\t{\n\t\t\t$this->registry->output->global_message = sprintf( $this->lang->words['r_groupalready'], $group['g_title'] );\n\t\t\t$this->_addRole( 'group' );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//-------------------------------\n\t\t// Don't restrict ourselves\n\t\t//-------------------------------\n\t\tif( $g_id == $this->memberData['member_group_id'] )\n\t\t{\n\t\t\t$this->registry->output->global_message = $this->lang->words['r_ownaccount'];\n\t\t\t$this->_addRole( 'group' );\n\t\t\treturn;\t\t\t\n\t\t}\n\n\t\tif( in_array( $g_id, explode( ',', IPSText::cleanPermString( $this->memberData['mgroup_others'] ) ) ) )\n\t\t{\n\t\t\t$this->registry->output->global_message = $this->lang->words['r_ownaccount'];\n\t\t\t$this->_addRole( 'group' );\n\t\t\treturn;\t\t\t\n\t\t}\n\n\t\t//-------------------------------\n\t\t// Primary ACP group?\n\t\t//-------------------------------\n\t\t\n\t\tif ( !$group['g_access_cp'] )\n\t\t{\n\t\t\t$this->registry->output->global_message = sprintf( $this->lang->words['r_groupnoacp'], $group['g_title'] );\n\t\t\t$this->_addRole( 'group' );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//-------------------------------\n\t\t// A-OK\n\t\t//-------------------------------\n\n\t\t$this->DB->insert( 'admin_permission_rows', array( 'row_id'\t\t\t\t=> $g_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'row_id_type'\t\t=> 'group',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'row_perm_cache'\t=> serialize( array() ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'row_updated'\t\t=> time() ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$this->registry->output->setMessage( sprintf( $this->lang->words['r_addedgroup'], $group['g_title'] ), 1 );\n\t\t$this->_acppermsList();\n\t}", "public function getSubGroups() {}", "function cc_cafnr_is_cafnr_group(){\n return ( bp_get_current_group_id() == cc_cafnr_get_group_id() );\n}", "public function get_group() {\n\t\treturn 'custom';\n\t}", "protected function getGroupList() {}", "protected function getGroupList() {}", "function find_group($ident=\"\")\n\t{\n\tGLOBAL $CircleGroups;\n\t\n\t$group = \"\";\n\t\n\tforeach($CircleGroups as $circle)\n\t {\n\t if ( $circle[0] == $ident )\n\t { $group = $circle[2]; break; }\n\t }\n\t \n\t//IPS_LogMessage(\"...\",$ident.\"-\".$group);\n\treturn $group;\n\t}" ]
[ "0.79098535", "0.7644274", "0.7507701", "0.74602664", "0.7450829", "0.7450829", "0.7430906", "0.7430906", "0.7430906", "0.7430906", "0.73913103", "0.73913103", "0.72742987", "0.72742987", "0.71984136", "0.7119404", "0.71145827", "0.70986813", "0.7010929", "0.6929105", "0.6869031", "0.6863947", "0.683709", "0.68302435", "0.68094623", "0.6807108", "0.67903185", "0.67391413", "0.67337686", "0.6713516", "0.66911906", "0.6669251", "0.66553897", "0.66553897", "0.66504955", "0.6644494", "0.66405845", "0.6632682", "0.66168976", "0.66168976", "0.66168976", "0.66168976", "0.65912294", "0.6589197", "0.65817267", "0.65738815", "0.6569766", "0.65424824", "0.6535975", "0.6516898", "0.64977896", "0.6488591", "0.6479148", "0.6476335", "0.6476335", "0.6476335", "0.6476335", "0.6476335", "0.6476335", "0.6476335", "0.6476335", "0.6476335", "0.64685273", "0.64525753", "0.6439822", "0.64219797", "0.64177704", "0.63826776", "0.63825595", "0.6382128", "0.63783526", "0.63658273", "0.6359793", "0.6359793", "0.6350514", "0.63447106", "0.63434416", "0.6343408", "0.6342851", "0.634251", "0.6340728", "0.63366675", "0.63366675", "0.63231844", "0.6313267", "0.6306416", "0.628314", "0.6280262", "0.62739944", "0.62721264", "0.6265835", "0.6254513", "0.62373453", "0.62368685", "0.62368035", "0.6232549", "0.62258434", "0.6225543", "0.62245315", "0.6218322" ]
0.82438713
0
Return an array of social media platforms.
Вернуть массив социальных сетей.
public function get_social_media_platforms() { return $this->social_media_platforms; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPlatforms()\n {\n return $this->platforms;\n }", "public function GetPlatforms()\n {\n try {\n $platforms = $this->sample['browscap']\n ->map(function ($item, $key) {\n # Cast array into collection\n $item = collect($item)->recursive();\n \n # Return platform\n if ($item['data']->has('platform'))\n return collect(['system' => $item['data']['platform']]);\n })\n ->groupBy('system')\n ->map(function ($item, $key) {\n return $item->count();\n });\n \n return $platforms;\n \n } catch (StatsException $e){\n Log::error( $e );\n return collect([]);\n }\n }", "public function getPlatforms();", "public function findAllPlatforms($order = null, $by = null)\r\n\t{\r\n\t\t$this->set(array('order' => $order, 'by' => $by));\t\t\r\n\t\treturn $this->find(\"platforms\");\r\n\t}", "private function _getPlatforms(array $entrys): array\n {\n $platforms = array_unique(\n array_map(function ($entry) {\n $split = explode(\", \", $entry[\"content\"]['$t']);\n $splitPlatform = explode(\": \", $split[0])[1];\n\n return ucfirst($splitPlatform);\n }, $entrys)\n );\n\n return $platforms;\n }", "public function platforms(): BelongsToMany\n {\n return $this->belongsToMany(Platform::class);\n }", "function drush_webgeeks_migrate_platform_list_sites($platform) {\n $sites = array();\n\n $platform_node = hosting_context_load($platform);\n\n // Load the platform:\n $all_sites = hosting_get_sites_by_status($platform_node->nid, HOSTING_SITE_ENABLED);\n\n foreach ($all_sites as $site) {\n $sites[] = $site->title;\n }\n \n // This is a bit of a fragile way to return the data, but I couldn't seem to\n // get Drush to pass the structured data back properly, so we'll do this,\n // which works.\n drush_print_r(serialize($sites));\n}", "public function socialNetworks()\n {\n if ($this->socialNetworks) {\n return $this->socialNetworks;\n }\n\n $socials = json_decode($this->cmsConfig()['social_medias'], true);\n $configMeta = $this->configModel()->p('social_medias')->structureMetadata();\n\n foreach ($socials as $ident => $account) {\n $prefix = $configMeta->property($ident)['input_prefix'];\n $socials[$ident] = [\n 'account' => $account,\n 'prefix' => $prefix,\n 'fullUrl' => $prefix.$account\n ];\n }\n\n $this->socialNetworks = $socials;\n\n return $this->socialNetworks;\n }", "public function platformDataProvider(): array\n {\n return [\n 'mysql' => [$this->prophesize(MySqlPlatform::class)->reveal()],\n 'postgresql' => [$this->prophesize(PostgreSqlPlatform::class)->reveal()],\n 'sqlserver' => [$this->prophesize(SQLServerPlatform::class)->reveal()],\n 'sqlite' => [$this->prophesize(SqlitePlatform::class)->reveal()],\n ];\n }", "private function validPlatforms()\n {\n return [\n 'ANY',\n 'ANDROID',\n 'LINUX',\n 'MAC',\n 'UNIX',\n 'VISTA',\n 'WINDOWS',\n 'XP',\n ];\n }", "public function getSocialPlatformIds()\n {\n $cacheKey = self::STORE_KEY_SOCIAL_PLATFORM_IDS;\n\n if (self::CACHE_ENABLED && $this->redis->exists($cacheKey)) {\n $platformIds = $this->redis->smembers($cacheKey);\n } else {\n $platformCollection = $this->documentManager->getDocumentCollection('SnapRapidApiBundle:Platform');\n $qb = $platformCollection->createQueryBuilder();\n $qb->select('id');\n $qb->field('_id')->notEqual(new \\MongoId($this->webPlatformId));\n $cursor = $qb->getQuery()->execute();\n $platformIds = array_keys(iterator_to_array($cursor));\n\n $this->addCacheItem($cacheKey, $platformIds);\n }\n\n // convert string ids to mongo ids\n foreach ($platformIds as &$platformId) {\n $platformId = new \\MongoId($platformId);\n }\n\n return $platformIds;\n }", "abstract protected function getSupportedPlatforms();", "public function getSocialProviders();", "protected function getSocialLinks()\n {\n $socialite_enable = [];\n $socialite_links = '';\n\n if (getenv('BITBUCKET_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Bit Bucket']), 'bitbucket');\n }\n\n if (getenv('FACEBOOK_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Facebook']), 'facebook');\n }\n\n if (getenv('GOOGLE_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Google']), 'google');\n }\n\n if (getenv('GITHUB_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Github']), 'github');\n }\n\n if (getenv('LINKEDIN_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Linked In']), 'linkedin');\n }\n\n if (getenv('TWITTER_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Twitter']), 'twitter');\n }\n\n for ($i = 0; $i < count($socialite_enable); $i++) {\n $socialite_links .= ($socialite_links != '' ? '&nbsp;|&nbsp;' : '').$socialite_enable[$i];\n }\n\n return $socialite_links;\n }", "public function platforms() {\n return $this->belongsToMany('App\\Platform', 'product_has_platforms', 'product_id', 'platform_id');\n }", "function get_supported_websites()\n{\n $websites = array(\n array(\"name\" => \"4anime\", \"color\" => \"#c52033\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"9gag\", \"color\" => \"#000000\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"akillitv\", \"color\" => \"#3e3e3e\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"bandcamp\", \"color\" => \"#21759b\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"music\"),\n array(\"name\" => \"bilibili\", \"color\" => \"#00a1d6\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"bitchute\", \"color\" => \"#ef4137\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"blogger\", \"color\" => \"#fc4f08\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"blutv\", \"color\" => \"#0270fb\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"break\", \"color\" => \"#b92b27\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"buzzfeed\", \"color\" => \"#df2029\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"dailymotion\", \"color\" => \"#0077b5\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"douyin\", \"color\" => \"#131418\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"espn\", \"color\" => \"#df2029\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"facebook\", \"color\" => \"#3b5998\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"febspot\", \"color\" => \"#f02730\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"flickr\", \"color\" => \"#ff0084\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"gaana\", \"color\" => \"#e72c30\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"music\"),\n array(\"name\" => \"imdb\", \"color\" => \"#e8c700\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"imgur\", \"color\" => \"#02b875\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"instagram\", \"color\" => \"#e4405f\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"izlesene\", \"color\" => \"#ff6600\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"kwai\", \"color\" => \"#ff9000\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"likee\", \"color\" => \"#be3cfa\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"linkedin\", \"color\" => \"#0e76a8\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"liveleak\", \"color\" => \"#dd4b39\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"mashable\", \"color\" => \"#0084ff\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"mxtakatak\", \"color\" => \"#6de4ff\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"odnoklassniki\", \"color\" => \"#f57d00\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"periscope\", \"color\" => \"#3fa4c4\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"pinterest\", \"color\" => \"#bf1f24\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"puhutv\", \"color\" => \"#18191a\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"reddit\", \"color\" => \"#ff4301\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"rumble\", \"color\" => \"#74a642\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"soundcloud\", \"color\" => \"#ff3300\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"music\"),\n array(\"name\" => \"streamable\", \"color\" => \"#2c2c2c\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"ted\", \"color\" => \"#e62b1e\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"tiktok\", \"color\" => \"#131418\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"tumblr\", \"color\" => \"#32506d\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"twitch\", \"color\" => \"#6441a5\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"clip\"),\n array(\"name\" => \"twitter\", \"color\" => \"#00aced\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"vimeo\", \"color\" => \"#1ab7ea\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"vk\", \"color\" => \"#4a76a8\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n array(\"name\" => \"youtube\", \"color\" => \"#d82624\", \"slug\" => \"\", \"text\" => \"\", \"type\" => \"video\"),\n );\n return $websites;\n}", "public function getSocialLinks()\n {\n $socialite_enable = [];\n $socialite_links = '';\n\n if (strlen(getenv('BITBUCKET_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Bit Bucket']), 'bitbucket');\n }\n\n if (strlen(getenv('FACEBOOK_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Facebook']), 'facebook');\n }\n\n if (strlen(getenv('GOOGLE_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Google']), 'google');\n }\n\n if (strlen(getenv('GITHUB_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Github']), 'github');\n }\n\n if (strlen(getenv('LINKEDIN_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Linked In']), 'linkedin');\n }\n\n if (strlen(getenv('TWITTER_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Twitter']), 'twitter');\n }\n\n for ($i = 0; $i < count($socialite_enable); $i++) {\n $socialite_links .= ($socialite_links != '' ? '&nbsp;|&nbsp;' : '').$socialite_enable[$i];\n }\n\n return $socialite_links;\n }", "public function getSocialLinks()\n {\n $links = [];\n foreach ($this->socialNetworks as $socialNetwork) {\n if ($link = trim($this->getConfigValue('social/' . $socialNetwork))) {\n $links[] = $link;\n }\n }\n\n return $links;\n }", "public function platformDataProvider() : array {}", "function fusion_builder_get_custom_social_networks() {\n\n\t$fusion_settings = fusion_get_fusion_settings();\n\t$social_links_array = [];\n\t$social_media_icons = $fusion_settings->get( 'social_media_icons' );\n\tif ( is_array( $social_media_icons ) && isset( $social_media_icons['icon'] ) && is_array( $social_media_icons['icon'] ) ) {\n\t\tforeach ( $social_media_icons['icon'] as $key => $icon ) {\n\t\t\tif ( 'custom' === $icon && isset( $social_media_icons['url'][ $key ] ) && ! empty( $social_media_icons['url'][ $key ] ) ) {\n\t\t\t\t$social_links_array[ $key ] = [\n\t\t\t\t\t'url' => $social_media_icons['url'][ $key ],\n\t\t\t\t\t'title' => $social_media_icons['custom_title'][ $key ],\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t}\n\treturn $social_links_array;\n}", "public /*ISocialNetwork[]*/ function getSocialNetworks(){\n\t\treturn $this->socialNetworks;\n\t}", "function getPlatforms($id,$options=null)\r\n {\r\n $my['options'] = array('outputFormat' => 'array', 'outputDetails' => 'full', 'addIfNull' => false);\r\n $my['options'] = array_merge($my['options'], (array)$options);\r\n \r\n switch($my['options']['outputFormat'])\r\n {\r\n case 'map':\r\n $platforms = $this->platform_mgr->getLinkedToTestplanAsMap($id);\r\n break;\r\n \r\n default:\r\n $opt = array('outputFormat' => $my['options']['outputFormat']);\r\n $platforms = $this->platform_mgr->getLinkedToTestplan($id,$opt);\r\n break;\r\n } \r\n \r\n if( !is_null($platforms) )\r\n {\r\n switch($my['options']['outputDetails'])\r\n {\r\n case 'name':\r\n foreach($platforms as $id => $elem)\r\n {\r\n $platforms[$id] = $elem['name']; \r\n }\r\n break;\r\n \r\n default:\r\n break; \r\n }\r\n \r\n }\r\n else if( $my['options']['addIfNull'] )\r\n {\r\n $platforms = array( 0 => '');\r\n }\r\n return $platforms; \r\n }", "public function getPlatformForAppAction()\n {\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->getHelper('layout')->disableLayout();\n\n $appId = trim($this->_getParam('id'));\n\n $productModel = new Model_Product();\n $platforms = $productModel->getSupportedPlatforms($appId);\n\n echo json_encode($platforms);\n }", "public function SocialLinks()\n {\n return SiteConfig::current_site_config()->SocialLinks();\n }", "public function getPlatform();", "public function getPlatform();", "public function getPlatform();", "function get__socialMedia($items = ['twitter', 'facebook', 'linkedin'], $wrapper = false, $share = false) {\n\n\t# Vars\n\tinclude 'vars.php';\n\n\t# Classes\n\t$wrapper = (gettype($wrapper) === 'array') ? join(' ', $wrapper) : $wrapper;\n\t$container__class = $share ? ['social__media', 'social__media--share'] : ['social__media'];\n\n\t# Output\n\t$html = '';\n\t$html .= $wrapper ? '<div class=\"' . $wrapper . '\">' : '';\n\t$html .= '<ul class=\"' . join(' ', $container__class) . '\">';\n\n\tforeach ($items as $item) {\n\t\t$html .= '<li class=\"social__item\">';\n\t\t$html .= '<div class=\"icon__container\">' . $socialMedia[$item]['icon'] . '</div>';\n\t\t$html .= ($share && !empty($socialMedia[$item]['share']))\n\t\t\t? '<a href=\"' . $socialMedia[$item]['share'] . '\" class=\"cover\" target=\"_blank\"></a>'\n\t\t\t: '<a href=\"' . $socialMedia[$item]['link'] . '\" class=\"cover\" target=\"_blank\"></a>';\n\t\t$html .= '</li>';\n\t}\n\t\t\t\n\t$html .= '</ul>';\n\t$html .= $wrapper ? '</div>' : '';\n\treturn $html;\n}", "public static function getSocialLinks()\n {\n $socialLinks = get_option( 'hw_theme_options' );\n\n unset($socialLinks['gtm']);\n\n return $socialLinks;\n }", "public function setPlatforms(array $platforms)\n {\n $this->platforms = $platforms;\n\n return $this;\n }", "public function getSocial(){\n\t\t$this->db->select('*');\n\t\t$this->db->where('is_deleted',0);\n\t\t$this->db->where('is_active',1);\t\n\t\t$query = $this->db->get(SOCIAL_MEDIA);\n\t\treturn $query->result_array();\n\t}", "public function getPlatformOptions()\n {\n return array(\n self::PLATFORM_EBAY=>'eBay',\n self::PLATFORM_WISH=>'Wish',\n /*self::PLATFORM_AMAZON=>'Amazon',\n self::PLATFORM_ALIEXPRESS=>'AliExpress',\n self::PLATFORM_ECSHOP=>'Ecshop sites',\n self::PLATFORM_MAGENTO=>'Magento sites',*/\n );\n }", "public function getPlatformInfo()\n {\n return array(\n 'name' => 'Wellms.io',\n 'version' => '0.1.0',\n 'h5pVersion' => '0.1.0',\n );\n }", "function e_seinajoki_social_links_icons() {\n\t// Supported social links icons.\n\t$social_links_icons = array(\n\t\t'facebook.com' => 'facebook',\n\t\t'instagram.com' => 'instagram',\n\t\t'twitter.com' => 'twitter',\n\t\t'youtube.com' => 'youtube',\n\t);\n\n\treturn apply_filters( 'e_seinajoki_social_links_icons', $social_links_icons );\n}", "function g1_socials_user_get_supported_networks() {\n\t$networks = G1_Socials()->get_items();\n\treturn apply_filters( 'g1_socials_user_get_supported_networks', $networks );\n}", "public function loadGamePlatforms($iMediaId)\n\t{\n\t\t$aRows = $this->database()->select('p.*, m.title, m.media_id, gm.account')\n\t\t\t\t->from(Phpfox::getT('medialibrary_games_platforms'), 'p')\n\t\t\t\t->join(Phpfox::getT('medialibrary_games_platforms_medias'), 'pm', 'p.platform_id = pm.platform_id')\n\t\t\t\t->join(Phpfox::getT('medialibrary'), 'm', 'm.media_id = pm.media_id')\n\t\t\t\t->leftJoin(Phpfox::getT('medialibrary_games_accounts'), 'gm', 'p.platform_id = gm.platform_id AND m.media_id = gm.media_id AND user_id='.Phpfox::getUserId())\n\t\t\t\t->where('m.media_id = ' . (int)$iMediaId)\n\t\t\t\t->execute('getSlaveRows');\n\t\t\t\t\n\t\treturn $aRows;\n\t}", "public function supportedApplications() {\n return ['html', 'blog', 'gallery'];\n }", "function sukelius_social_networks() {\r\n \r\n $twitter = hybrid_get_setting( 'sukelius_input_twitter' );\r\n $facebook = hybrid_get_setting( 'sukelius_input_facebook' );\r\n $pinterest = hybrid_get_setting( 'sukelius_input_pinterest' );\r\n $rss = hybrid_get_setting( 'sukelius_input_rss' );\r\n \r\n if ( $twitter || $facebook || $pinterest || $rss ) {\r\n \r\n echo '<ul id=\"social\">';\r\n \r\n if ( $facebook )\r\n echo '<li><a id=\"facebook\" href=\"'. $facebook .'\" title=\"'. __( 'Facebook', 'sukelius-magazine') .'\">'. __( 'Facebook', 'sukelius-magazine') .'</a></li>'; \r\n\r\n if ( $twitter )\r\n echo '<li><a id=\"twitter\" href=\"'. $twitter .'\" title=\"'. __( 'Twitter', 'sukelius-magazine') .'\">'. __( 'Twitter', 'sukelius-magazine') .'</a></li>'; \r\n\r\n if ( $pinterest )\r\n echo '<li><a id=\"pinterest\" href=\"'. $pinterest .'\" title=\"'. __( 'Pinterest', 'sukelius-magazine') .'\">'. __( 'Pinterest', 'sukelius-magazine') .'</a></li>'; \r\n \r\n if ( $rss )\r\n echo '<li><a id=\"rss\" href=\"'. $rss .'\" title=\"'. __( 'RSS', 'sukelius-magazine') .'\">'. __( 'RSS', 'sukelius-magazine') .'</a></li>';\r\n \r\n echo '</ul>';\r\n\r\n } \r\n}", "public function getPlatform() {}", "public function getPlatform()\n {\n $this->parse();\n return $this->platform;\n }", "public function platform()\n {\n\t\t// Initialise variables.\n $document = JFactory::getDocument();\n \n // Load HWD config.\n $hwdms = hwdMediaShareFactory::getInstance();\n $config = $hwdms->getConfig();\n\n $pluginClass = 'plgHwdmediashare' . $config->get('platform');\n $pluginPath = JPATH_ROOT . '/plugins/hwdmediashare/' . $config->get('platform') . '/' . $config->get('platform') . '.php';\n if (file_exists($pluginPath))\n {\n JLoader::register($pluginClass, $pluginPath);\n $HWDplatform = call_user_func(array($pluginClass, 'getInstance'));\n\n if (!$HWDplatform->addUpload())\n {\n // Set JSON output in JSEND spec http://labs.omniti.com/labs/jsend\n $return = array(\n 'status' => 'fail',\n 'data' => array(\n 'task' => 'addmedia'\n ),\n 'message' => $HWDplatform->getError()\n );\n }\n else\n {\n // Set JSON output in JSEND spec http://labs.omniti.com/labs/jsend\n $return = array(\n 'status' => 'success',\n 'data' => array(\n 'task' => 'addmedia',\n 'name' => $HWDplatform->_item->title,\n 'id' => $HWDplatform->_item->id \n ),\n 'message' => null\n );\n } \n\n // Set the MIME type for JSON output.\n $document->setMimeEncoding( 'application/json' );\n\n // Output the JSON data. \n echo json_encode($return);\n\n JFactory::getApplication()->close(); \n }\n }", "public function platformDistribution(): array {\n $dist = self::$cache->get_value(self::USER_PLATFORM);\n $dist = false;\n if ($dist === false) {\n self::$db->prepared_query(\"\n SELECT OperatingSystem AS label,\n count(*) AS total\n FROM users_sessions\n GROUP BY label\n ORDER BY total DESC\n \");\n $dist = $this->reformatDist(self::$db->to_pair('label', 'total', false));\n self::$cache->cache_value(self::USER_PLATFORM, $dist, 86400);\n }\n return $dist;\n }", "private function getSocialMedia( $senator ) {\n\t\t// Update links here. Currently pointing to example.com\n\t\t$shareOptions = array(\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://www.facebook.com/sharer.php?u=http://tinyurl.com/7vq4o8g&t=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/2/2a/WP_SOPA_sm_icon_facebook_dedede.png\",\n\t\t\t\t\"name\" => \"Facebook\"\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://m.google.com/app/plus/x/?v=compose&content=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/0/08/WP_SOPA_sm_icon_gplus_dedede.png\",\n\t\t\t\t\"name\" => \"Google+\"\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://twitter.com/intent/tweet?text=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/4/45/WP_SOPA_sm_icon_twitter_dedede.png\",\n\t\t\t\t\"name\" => \"Twitter\"\n\t\t\t)\n\t\t);\t\n\n\t\t$htmlShare = '';\n\t\tforeach( $shareOptions as $option ) {\n\t\t\t$htmlShare .= Html::rawElement( 'div',\n\t\t\t\tarray(\n\t\t\t\t\t'class' => 'sopaSocial'\n\t\t\t\t),\n\t\t\t\tHtml::rawElement( 'a',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => str_replace( '$1', $this->formatDoneText( $senator ), $option['url'] ),\n\t\t\t\t\t\t'style' => 'text-decoration: none'\n\t\t\t\t\t),\n\t\t\t\t\tHtml::rawElement( 'img',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'src' => $option['img'],\n\t\t\t\t\t\t\t'height' => '33',\n\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t''\n\t\t\t\t\t) \n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'br' ) .\n\t\t\t\tHtml::rawElement( 'a',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $option['url'],\n\t\t\t\t\t\t'style' => 'text-decoration: none'\n\t\t\t\t\t),\n\t\t\t\t\t$option['name']\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t$htmlOut = Html::rawElement( 'div',\n\t\t\tarray( \n\t\t\t\t'id' => 'sopaShareOptions',\n\t\t\t\t'class' => 'sopaActionDiv'\n\t\t\t),\n\t\t\t\tHtml::rawElement( 'p',\n\t\t\t\t\tarray(), 'Done? Tell the world!'\n\t\t\t\t) . \n\t\t\t\tHtml::rawElement( 'div', \n\t\t\t\t\tarray(),\n\t\t\t\t\t$htmlShare) .\n\t\t\t\tHtml::rawElement( 'div',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'style' => 'clear: both;'\n\t\t\t\t\t), ''\n\t\t\t\t) . \n\t\t\t\tHtml::rawElement( 'hr' )\n\t\t\t);\n\n\t\treturn $htmlOut;\n\t}", "function getPlatform();", "public function getPlatform()\n {\n return $this->platform;\n }", "public function getPlatform()\n {\n return $this->platform;\n }", "public function getPlatform()\n {\n return $this->platform;\n }", "function g1_socials_user_set_supported_networks() {\n\treturn array(\n\t\t'facebook' => 'facebook',\n\t\t'googleplus' => 'googleplus',\n\t\t'instagram' => 'instagram',\n\t\t'linkedin' => 'linkedin',\n\t\t'pinterest' => 'pinterest',\n\t\t'reddit' => 'reddit',\n\t\t'snapchat' => 'snapchat',\n\t\t'tumblr' => 'tumblr',\n\t\t'twitter' => 'twitter',\n\t\t'vimeo' => 'vimeo',\n\t\t'vine' => 'vine',\n\t\t'youtube' => 'youtube',\n\t);\n}", "public function getSocialHome(){\n\t\t$this->db->select('*');\n\t\t$this->db->where('is_deleted',0);\n\t\t$this->db->where('is_active',1);\t\n\t\t$this->db->where('is_home',1);\t\n\t\t$query = $this->db->get(SOCIAL_MEDIA);\n\t\treturn $query->result_array();\n\t}", "function overlap_get_social_icons(){\r\n \r\n $icons = array(\r\n 'ol-behance'\t\t\t=> 'Behance',\r\n 'ol-deviantart'\t\t\t=> 'DeviantArt',\r\n 'ol-digg'\t\t\t\t=> 'Digg',\r\n 'ol-dribbble'\t\t\t=> 'Dribbble',\r\n 'ol-dropbox'\t\t\t=> 'Dropbox',\r\n 'ol-facebook'\t\t\t=> 'Facebook',\r\n 'ol-flickr'\t\t\t\t=> 'Flickr',\r\n 'ol-github' => 'Github',\r\n 'ol-google-plus' => 'Google+',\r\n 'ol-instagram'\t\t\t=> 'Instagram',\r\n 'ol-linkedin'\t\t\t=> 'LinkedIn',\r\n 'ol-pinterest' => 'Pinterest',\r\n 'ol-reddit'\t\t\t\t=> 'Reddit',\r\n 'ol-rss'\t\t\t\t=> 'RSS',\r\n 'ol-skype'\t\t\t\t=> 'Skype',\r\n 'ol-soundcloud'\t\t\t=> 'Soundcloud',\r\n 'ol-tumbler'\t\t\t=> 'Tumblr',\r\n 'ol-twitter'\t\t\t=> 'Twitter',\r\n 'ol-vimeo'\t\t\t\t=> 'Vimeo',\r\n 'ol-vkontakte' => 'VK',\r\n 'ol-yahoo'\t\t\t\t=> 'Yahoo',\r\n 'ol-youtube'\t\t\t=> 'Youtube',\r\n );\r\n\r\n return apply_filters('overlap_social_media_icons', $icons);\r\n}", "public function getGamesFromPlatform($url, $http_header = null)\n {\n\t\t\n\t}", "function supportedPlatform( $platform = NULL ) {\n\t\treturn is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE;\n\t}", "function codeless_team_socials( ){\n $list = codeless_get_team_social_list();\n $output = '';\n if( empty($list) )\n return;\n \n foreach($list as $social){\n $link = codeless_get_meta( $social['id'] . '_link', '', get_the_ID());\n\n if( $link != '' ){\n $output .= '<a href=\"'.esc_url( $link ).'\"><i class=\"'.esc_attr( $social['icon'] ).'\"></i></a>';\n }\n }\n\n \n return $output;\n}", "public function socialNetworks($website = NULL, string $locale = NULL): array\n {\n if (!$website) {\n return [];\n }\n\n $session = new Session();\n\n $websiteId = $website instanceof Website ? $website->getId() : $website['id'];\n $socialNetworksSession = $session->get('social_networks_' . $websiteId);\n if ($socialNetworksSession) {\n return $socialNetworksSession;\n }\n\n $result = [];\n $locale = !$locale ? $this->request->getLocale() : $locale;\n $informationId = $website instanceof Website ? $website->getInformation()->getId() : $website['information']['id'];\n $socialNetworks = $this->entityManager->getRepository(SocialNetwork::class)->findAllArray($informationId);\n\n foreach ($socialNetworks as $socialNetwork) {\n if ($socialNetwork['locale'] === $locale) {\n $result['twitter'] = $socialNetwork['twitter'];\n $result['facebook'] = $socialNetwork['facebook'];\n $result['google-plus'] = $socialNetwork['google'];\n $result['youtube'] = $socialNetwork['youtube'];\n $result['instagram'] = $socialNetwork['instagram'];\n $result['linkedin'] = $socialNetwork['linkedin'];\n $result['pinterest'] = $socialNetwork['pinterest'];\n $result['tripadvisor'] = $socialNetwork['tripadvisor'];\n }\n }\n\n $session->set('social_networks_' . $website['id'], $result);\n\n return $result;\n }", "public function providers() \n\t\t{\n\t\t\t$response = $this->curl_get('https://noembed.com/providers');\n\t\t\treturn json_decode($response);\n\t\t}", "public function getPlatform()\n {\n return $this->platform; \n }", "public function getPlatform()\n {\n return $this->_platform;\n }", "public function platform()\n {\n return $this->platform;\n }", "function getBuildList($platform)\n\t{\n\t\t$builds = array();\n\t\tforeach ($this->data->builds as $build_name) {\n\t\t\t$build = $this->config->getBuildFromName($build_name);\n\t\t\tif (isset($build['platform']) && $build['platform'] == $platform) {\n\t\t\t\t$builds[] = $build_name;\n\t\t\t}\n\t\t}\n\t\treturn $builds;\n\t}", "public function getSocial(){\n return $this->Csz_model->getSocial(FALSE);\n }", "public function getPlatform() {\n\t\treturn $this->platform;\n\t}", "public function social_links() {\n if(!get_field('social_accounts', 'site_settings')) {\n return false;\n }\n\n return json_decode(json_encode(get_field('social_accounts', 'site_settings')));\n }", "function codeless_get_team_social_list(){\n $list = array(\n array( 'id' => 'twitter', 'icon' => 'cl-icon-twitter' ),\n array( 'id' => 'facebook', 'icon' => 'cl-icon-facebook-f' ),\n array( 'id' => 'linkedin', 'icon' => 'cl-icon-linkedin' ),\n array( 'id' => 'whatsapp', 'icon' => 'cl-icon-whatsapp' ),\n array( 'id' => 'pinterest', 'icon' => 'cl-icon-pinterest' ),\n array( 'id' => 'google', 'icon' => 'cl-icon-google' ),\n );\n\n return apply_filters( 'codeless_team_social_list', $list );\n}", "public function getPlatform()\n {\n if (array_key_exists(\"platform\", $this->_propDict)) {\n if (is_a($this->_propDict[\"platform\"], \"\\Beta\\Microsoft\\Graph\\Model\\DevicePlatformType\") || is_null($this->_propDict[\"platform\"])) {\n return $this->_propDict[\"platform\"];\n } else {\n $this->_propDict[\"platform\"] = new DevicePlatformType($this->_propDict[\"platform\"]);\n return $this->_propDict[\"platform\"];\n }\n }\n return null;\n }", "protected function getPushNotificationPlatformTypeList() {\n $pushNotificationPlatformTypeList = $this->getNotificationConfigurationLoaderIns()->getPushNotificationConfigurationByKey(Notificationconfigurationloader::PUSH_NOTIFICATION_PLATFORM_TYPE_KEY);\n if (checkArrayParam($pushNotificationPlatformTypeList)) {\n return $pushNotificationPlatformTypeList;\n }\n return FALSE;\n }", "public static function getPlatform($url)\n {\n if (false !== strpos($url, 'youtube')) {\n return PlatformNomenclature::YOUTUBE;\n }\n\n return PlatformNomenclature::OTHER;\n }", "function embed_sites_array(){\n $embed_array=array('vimeo.com','youtube.com');\n return $embed_array;\n}", "function heateor_ss_fetch_amp_sharing_networks(){\n\tglobal $theChampSharingOptions, $theChampLoginOptions;\n\t$fb_key = '595489497242932';\n\tif(isset($theChampLoginOptions['fb_key']) && $theChampLoginOptions['fb_key']){\n\t\t$fb_key = $theChampLoginOptions['fb_key'];\n\t}\n\t$ampIconPath = plugins_url('../images/amp', __FILE__);\n\n\t$sharingNetworks = array(\n\t\t'facebook_share' => '',\n\t\t'facebook_like' => '',\n\t\t'facebook_recommend' => '',\n\t\t'twitter_tweet' => '',\n\t\t'linkedin_share' => '',\n\t\t'pinterest_pin' => '',\n\t\t'buffer_share' => '',\n\t\t'xing_share' => '',\n\t\t'yummly_share' => '',\n\t\t'reddit_badge' => '',\n\t\t'Copy_Link' => '',\n\t\t'facebook' => '<a class=\"heateor_ss_amp heateor_ss_amp_facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=%encoded_post_url%\" title=\"Facebook\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/facebook.svg\" width=\"%width%\" height=\"%height%\" alt=\"Facebook\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'twitter' => '<a class=\"heateor_ss_amp heateor_ss_amp_twitter\" href=\"http://twitter.com/intent/tweet?%via_twitter_username%text=%wpseo_post_title%&url=%encoded_post_url%\" title=\"Twitter\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/twitter.svg\" width=\"%width%\" height=\"%height%\" alt=\"Twitter\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'linkedin' => '<a class=\"heateor_ss_amp heateor_ss_amp_linkedin\" href=\"http://www.linkedin.com/shareArticle?mini=true&url=%encoded_post_url%&title=%post_title%\" title=\"Linkedin\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/linkedin.svg\" width=\"%width%\" height=\"%height%\" alt=\"Linkedin\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'print' => '<a class=\"heateor_ss_amp heateor_ss_amp_print\" href=\"javascript:void(0)\" onclick=\"window.print()\" title=\"Print\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/print.svg\" width=\"%width%\" height=\"%height%\" alt=\"Print\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'email' => '<a class=\"heateor_ss_amp heateor_ss_amp_email\" href=\"mailto:?subject=%post_title%&body=%encoded_post_url%\" title=\"Email\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/email.svg\" width=\"%width%\" height=\"%height%\" alt=\"Email\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'yahoo' => '<a class=\"heateor_ss_amp heateor_ss_amp_yahoo\" href=\"http://bookmarks.yahoo.com/toolbar/SaveBM/?u=%encoded_post_url%&t=%post_title%\" title=\"Yahoo\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/yahoo.svg\" width=\"%width%\" height=\"%height%\" alt=\"Yahoo\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'reddit' => '<a class=\"heateor_ss_amp heateor_ss_amp_reddit\" href=\"http://reddit.com/submit?url=%encoded_post_url%&title=%post_title%\" title=\"Reddit\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/reddit.svg\" width=\"%width%\" height=\"%height%\" alt=\"Reddit\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'digg' => '<a class=\"heateor_ss_amp heateor_ss_amp_digg\" href=\"http://digg.com/submit?url=%encoded_post_url%&title=%post_title%\" title=\"Digg\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/digg.svg\" width=\"%width%\" height=\"%height%\" alt=\"Digg\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'float_it' => '<a class=\"heateor_ss_amp heateor_ss_amp_float_it\" href=\"http://www.designfloat.com/submit.php?url=%encoded_post_url%&title=%post_title%\" title=\"Float it\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/float_it.svg\" width=\"%width%\" height=\"%height%\" alt=\"Float it\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'tumblr' => '<a class=\"heateor_ss_amp heateor_ss_amp_tumblr\" href=\"https://www.tumblr.com/widgets/share/tool?posttype=link&canonicalUrl=%encoded_post_url%&title=%post_title%&caption=\" title=\"Tumblr\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/tumblr.svg\" width=\"%width%\" height=\"%height%\" alt=\"Tumblr\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'vkontakte' => '<a class=\"heateor_ss_amp heateor_ss_amp_vkontakte\" href=\"http://vkontakte.ru/share.php?&url=%encoded_post_url%\" title=\"Vkontakte\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/vkontakte.svg\" width=\"%width%\" height=\"%height%\" alt=\"Vkontakte\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'pinterest' => '<a class=\"heateor_ss_amp heateor_ss_amp_pinterest\" href=\"javascript:void( (function() {var e=document.createElement(\\'script\\' );e.setAttribute(\\'type\\',\\'text/javascript\\' );e.setAttribute(\\'charset\\',\\'UTF-8\\' );e.setAttribute(\\'src\\',\\'//assets.pinterest.com/js/pinmarklet.js?r=\\'+Math.random()*99999999);document.body.appendChild(e)})());\" title=\"Pinterest\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/pinterest.svg\" width=\"%width%\" height=\"%height%\" alt=\"Pinterest\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'xing' => '<a class=\"heateor_ss_amp heateor_ss_amp_xing\" href=\"https://www.xing.com/spi/shares/new?cb=0&url=%encoded_post_url%\" title=\"Xing\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/xing.svg\" width=\"%width%\" height=\"%height%\" alt=\"Xing\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'whatsapp' => '<a class=\"heateor_ss_amp heateor_ss_amp_whatsapp\" href=\"https://'. heateor_ss_whatsapp_share_api() .'.whatsapp.com/send?text=%post_title% %encoded_post_url%\" title=\"Whatsapp\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/whatsapp.svg\" width=\"%width%\" height=\"%height%\" alt=\"Whatsapp\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'instagram' => '<a class=\"heateor_ss_amp heateor_ss_amp_instagram\" href=\"https://www.instagram.com/'. ($theChampSharingOptions['instagram_username'] != '' ? $theChampSharingOptions['instagram_username'] : $theChampSharingOptions['vertical_instagram_username']) .'\" title=\"Instagram\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/instagram.svg\" width=\"%width%\" height=\"%height%\" alt=\"Instagram\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'yummly' => '<a class=\"heateor_ss_amp heateor_ss_amp_yummly\" href=\"http://www.yummly.com/urb/verify?url=%encoded_post_url%&title=%post_title%\" title=\"Yummly\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/yummly.svg\" width=\"%width%\" height=\"%height%\" alt=\"Yummly\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'buffer' => '<a class=\"heateor_ss_amp heateor_ss_amp_buffer\" href=\"https://buffer.com/add?url=%encoded_post_url%&title=%post_title%\" title=\"Buffer\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/buffer.svg\" width=\"%width%\" height=\"%height%\" alt=\"Buffer\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'AIM' => '<a class=\"heateor_ss_amp heateor_ss_amp_aim\" href=\"http://lifestream.aol.com/?url=%%encoded_post_url%&title=%post_title%\" title=\"AIM\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/aim.svg\" width=\"%width%\" height=\"%height%\" alt=\"AIM\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Amazon_Wish_List' => '<a class=\"heateor_ss_amp heateor_ss_amp_amazon_wish_list\" href=\"http://www.amazon.com/wishlist/add?u=%encoded_post_url%&t=%post_title%\" title=\"Amazon Wish List\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/amazon_wish_list.svg\" width=\"%width%\" height=\"%height%\" alt=\"Amazon Wish List\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'AOL_Mail' => '<a class=\"heateor_ss_amp heateor_ss_amp_aol_mail\" href=\"http://webmail.aol.com/25045/aol/en-us/Mail/compose-message.aspx?subject=%post_title%&body=%encoded_post_url%\" title=\"AOL Mail\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/aol_mail.svg\" width=\"%width%\" height=\"%height%\" alt=\"AOL Mail\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'App.net' => '<a class=\"heateor_ss_amp heateor_ss_amp_app_net\" href=\"https://account.app.net/login/\" title=\"App.net\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/app_net.svg\" width=\"%width%\" height=\"%height%\" alt=\"App.net\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Balatarin' => '<a class=\"heateor_ss_amp heateor_ss_amp_balatarin\" href=\"https://www.balatarin.com/login\" title=\"Balatarin\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/balatarin.svg\" width=\"%width%\" height=\"%height%\" alt=\"Balatarin\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'BibSonomy' => '<a class=\"heateor_ss_amp heateor_ss_amp_bibsonomy\" href=\"http://www.bibsonomy.org/login\" title=\"BibSonomy\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/bibsonomy.svg\" width=\"%width%\" height=\"%height%\" alt=\"BibSonomy\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Bitty_Browser' => '<a class=\"heateor_ss_amp heateor_ss_amp_bitty_browser\" href=\"http://www.bitty.com/manual/?contenttype=&contentvalue=%encoded_post_url%\" title=\"Bitty Browser\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/bitty_browser.svg\" width=\"%width%\" height=\"%height%\" alt=\"Bitty Browser\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Blinklist' => '<a class=\"heateor_ss_amp heateor_ss_amp_blinklist\" href=\"http://blinklist.com/blink?t=%post_title%&d=&u=%encoded_post_url%\" title=\"Blinklist\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/blinklist.svg\" width=\"%width%\" height=\"%height%\" alt=\"Blinklist\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Blogger_Post' => '<a class=\"heateor_ss_amp heateor_ss_amp_blogger_post\" href=\"https://www.blogger.com/blog_this.pyra?t&u=%encoded_post_url%&l&n=%post_title%\" title=\"Blogger Post\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/blogger_post.svg\" width=\"%width%\" height=\"%height%\" alt=\"Blogger Post\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'BlogMarks' => '<a class=\"heateor_ss_amp heateor_ss_amp_blogmarks\" href=\"http://blogmarks.net/my/new.php?mini=1&simple=1&title=%post_title%&url=%encoded_post_url%\" title=\"BlogMarks\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/blogmarks.svg\" width=\"%width%\" height=\"%height%\" alt=\"BlogMarks\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Bookmarks.fr' => '<a class=\"heateor_ss_amp heateor_ss_amp_bookmarks_fr\" href=\"http://www.bookmarks.fr/Connexion/?action=add&address=%encoded_post_url%&title=%post_title%\" title=\"Bookmarks.fr\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/bookmarks_fr.svg\" width=\"%width%\" height=\"%height%\" alt=\"Bookmarks.fr\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Box.net' => '<a class=\"heateor_ss_amp heateor_ss_amp_box_net\" href=\"https://www.box.com/api/1.0/import?url=%encoded_post_url%&name=%post_title%&description=&import_as=link\" title=\"Box.net\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/box_net.svg\" width=\"%width%\" height=\"%height%\" alt=\"Box.net\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'BuddyMarks' => '<a class=\"heateor_ss_amp heateor_ss_amp_buddymarks\" href=\"http://buddymarks.com/login.php?bookmark_title=%post_title%&bookmark_url=%encoded_post_url%&bookmark_desc=&bookmark_tags=\" title=\"BuddyMarks\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/buddymarks.svg\" width=\"%width%\" height=\"%height%\" alt=\"BuddyMarks\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Care2_News' => '<a class=\"heateor_ss_amp heateor_ss_amp_care2_news\" href=\"http://www.care2.com/passport/login.html?promoID=10&pg=http://www.care2.com/news/compose?sharehint=news&share[share_type]news&bookmarklet=Y&share[title]=%post_title%&share[link_url]=%encoded_post_url%&share[content]=\" title=\"Care2 News\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/care2_news.svg\" width=\"%width%\" height=\"%height%\" alt=\"Care2 News\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'CiteULike' => '<a class=\"heateor_ss_amp heateor_ss_amp_citeulike\" href=\"http://www.citeulike.org/posturl?url=%encoded_post_url%&title=%post_title%\" title=\"CiteULike\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/citeulike.svg\" width=\"%width%\" height=\"%height%\" alt=\"CiteULike\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Comment' => '<a class=\"heateor_ss_amp heateor_ss_amp_comment\" href=\"%post_url%#'. ($theChampSharingOptions['comment_container_id'] != '' ? $theChampSharingOptions['comment_container_id'] : $theChampSharingOptions['vertical_comment_container_id']) .'\" title=\"Comment\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/comment.svg\" width=\"%width%\" height=\"%height%\" alt=\"Comment\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Diary.Ru' => '<a class=\"heateor_ss_amp heateor_ss_amp_diary_ru\" href=\"http://www.diary.ru/?newpost&title=%post_title%&text=%encoded_post_url%\" title=\"Diary.Ru\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/diary_ru.svg\" width=\"%width%\" height=\"%height%\" alt=\"Diary.Ru\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Diaspora' => '<a class=\"heateor_ss_amp heateor_ss_amp_diaspora\" href=\"https://joindiaspora.com/bookmarklet?url=%encoded_post_url%&title=%post_title%&v=1&\" title=\"Diaspora\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/diaspora.svg\" width=\"%width%\" height=\"%height%\" alt=\"Diaspora\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"><i-amphtml-sizer style=\t\"display: block; padding-top: 100%;\"></i-amphtml-sizer></amp-img></a>',\n\t\t'Diigo' => '<a class=\"heateor_ss_amp heateor_ss_amp_diigo\" href=\"http://www.diigo.com/post?url=%encoded_post_url%&title=%post_title%\" title=\"Diigo\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/diigo.svg\" width=\"%width%\" height=\"%height%\" alt=\"Diigo\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Draugiem' => '<a class=\"heateor_ss_amp heateor_ss_amp_draugiem\" href=\"https://www.draugiem.lv/say/ext/add.php?link=%encoded_post_url%&title=%post_title%\" title=\"Draugiem\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/draugiem.svg\" width=\"%width%\" height=\"%height%\" alt=\"Draugiem\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Douban' => '<a class=\"heateor_ss_amp heateor_ss_amp_douban\" href=\"https://www.douban.com/share/service?name=%post_title%&href=%encoded_post_url%&image=&updated=&bm=&url=%encoded_post_url%&title=%post_title%&sel=\" title=\"Douban\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/douban.svg\" width=\"%width%\" height=\"%height%\" alt=\"Douban\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'DZone' => '<a class=\"heateor_ss_amp heateor_ss_amp_dzone\" href=\"http://www.dzone.com/links/add.html?url=%encoded_post_url%&title=%post_title%\" title=\"DZone\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/dzone.svg\" width=\"%width%\" height=\"%height%\" alt=\"DZone\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Evernote' => '<a class=\"heateor_ss_amp heateor_ss_amp_evernote\" href=\"https://www.evernote.com/clip.action?url=%encoded_post_url%&title=%post_title%\" title=\"Evernote\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/evernote.svg\" width=\"%width%\" height=\"%height%\" alt=\"Evernote\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Facebook_Messenger' => '<a class=\"heateor_ss_amp heateor_ss_amp_facebook_messenger\" href=\"'. (heateor_ss_check_if_mobile() ? 'fb-messenger://share/?link=%encoded_post_url%' : 'https://www.facebook.com/dialog/send?app_id='. $fb_key .'&display=popup&link=%encoded_post_url%&redirect_uri=%encoded_post_url%') .'\" title=\"Facebook Messenger\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/facebook_messenger.svg\" width=\"%width%\" height=\"%height%\" alt=\"Facebook Messenger\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Fark' => '<a class=\"heateor_ss_amp heateor_ss_amp_fark\" href=\"https://www.fark.com/submit?new_url=%encoded_post_url%\" title=\"Fark\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/fark.svg\" width=\"%width%\" height=\"%height%\" alt=\"Fark\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Fintel' => '<a class=\"heateor_ss_amp heateor_ss_amp_fintel\" href=\"https://fintel.io/submit?url=%encoded_post_url%\" title=\"Fintel\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/fintel.svg\" width=\"%width%\" height=\"%height%\" alt=\"Fintel\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Flipboard' => '<a class=\"heateor_ss_amp heateor_ss_amp_flipboard\" href=\"https://share.flipboard.com/bookmarklet/popout?v=2&url=%encoded_post_url%&title=%post_title%\" title=\"Flipboard\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/flipboard.svg\" width=\"%width%\" height=\"%height%\" alt=\"Flipboard\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Folkd' => '<a class=\"heateor_ss_amp heateor_ss_amp_folkd\" href=\"http://www.folkd.com/page/social-bookmarking.html?addurl=%encoded_post_url%\" title=\"Folkd\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/folkd.svg\" width=\"%width%\" height=\"%height%\" alt=\"Folkd\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'GentleReader' => '<a class=\"heateor_ss_amp heateor_ss_amp_gentlereader\" href=\"https://app.gentlereader.com/bookmark?url=%encoded_post_url%\" title=\"GentleReader\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/gentlereader.svg\" width=\"%width%\" height=\"%height%\" alt=\"GentleReader\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Google_Bookmarks' => '<a class=\"heateor_ss_amp heateor_ss_amp_google_bookmarks\" href=\"https://www.google.com/bookmarks/mark?op=edit&bkmk=%encoded_post_url%&title=%post_title%&annotation=\" title=\"Google Bookmarks\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/google_bookmarks.svg\" width=\"%width%\" height=\"%height%\" alt=\"Google Bookmarks\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Google_Classroom' => '<a class=\"heateor_ss_amp heateor_ss_amp_google_classroom\" href=\"https://classroom.google.com/u/0/share?url=%encoded_post_url%\" title=\"Google Classroom\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/google_classroom.svg\" width=\"%width%\" height=\"%height%\" alt=\"Google Classroom\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Google_Gmail' => '<a class=\"heateor_ss_amp heateor_ss_amp_google_gmail\" href=\"https://mail.google.com/mail/?ui=2&view=cm&fs=1&tf=1&su=%post_title%&body=Link:%encoded_post_url%\" title=\"Gmail\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/google_gmail.svg\" width=\"%width%\" height=\"%height%\" alt=\"Gmail\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Hacker_News' => '<a class=\"heateor_ss_amp heateor_ss_amp_hacker_news\" href=\"https://news.ycombinator.com/submitlink?u=%encoded_post_url%&t=%post_title%\" title=\"Hacker News\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/hacker_news.svg\" width=\"%width%\" height=\"%height%\" alt=\"Hacker News\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Hatena' => '<a class=\"heateor_ss_amp heateor_ss_amp_hatena\" href=\"http://b.hatena.ne.jp/bookmarklet?url=%encoded_post_url%&btitle=%post_title%\" title=\"Hatena\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/hatena.svg\" width=\"%width%\" height=\"%height%\" alt=\"Hatena\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Instapaper' => '<a class=\"heateor_ss_amp heateor_ss_amp_instapaper\" href=\"http://www.instapaper.com/edit?url=%encoded_post_url%&title=%post_title%\" title=\"Instapaper\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/instapaper.svg\" width=\"%width%\" height=\"%height%\" alt=\"Instapaper\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Jamespot' => '<a class=\"heateor_ss_amp heateor_ss_amp_jamespot\" href=\"//my.jamespot.com/\" title=\"Jamespot\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/jamespot.svg\" width=\"%width%\" height=\"%height%\" alt=\"Jamespot\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Kakao' => '<a class=\"heateor_ss_amp heateor_ss_amp_kakao\" href=\"https://story.kakao.com/share?url=%encoded_post_url%\" title=\"Kakao\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/kakao.svg\" width=\"%width%\" height=\"%height%\" alt=\"Kakao\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Kik' => '<a class=\"heateor_ss_amp heateor_ss_amp_kik\" href=\"https://www.kik.com/send/article/?app_name=Share&text=&title=%post_title%&url=%encoded_post_url%\" title=\"Kik\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/kik.svg\" width=\"%width%\" height=\"%height%\" alt=\"Kik\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Kindle_It' => '<a class=\"heateor_ss_amp heateor_ss_amp_kindle_it\" href=\"//fivefilters.org/kindle-it/send.php?url=%encoded_post_url%\" title=\"Kindle It\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/kindle_it.svg\" width=\"%width%\" height=\"%height%\" alt=\"Kindle It\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Known' => '<a class=\"heateor_ss_amp heateor_ss_amp_known\" href=\"https://withknown.com/share/?url=%encoded_post_url%&title=%post_title%\" title=\"Known\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/known.svg\" width=\"%width%\" height=\"%height%\" alt=\"Known\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Line' => '<a class=\"heateor_ss_amp heateor_ss_amp_line\" href=\"https://social-plugins.line.me/lineit/share?url=%encoded_post_url%\" title=\"Line\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/line.svg\" width=\"%width%\" height=\"%height%\" alt=\"Line\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'LiveJournal' => '<a class=\"heateor_ss_amp heateor_ss_amp_livejournal\" href=\"http://www.livejournal.com/update.bml?subject=%post_title%&event=%encoded_post_url%\" title=\"LiveJournal\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/livejournal.svg\" width=\"%width%\" height=\"%height%\" alt=\"LiveJournal\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Mail.Ru' => '<a class=\"heateor_ss_amp heateor_ss_amp_mail_ru\" href=\"https://connect.mail.ru/share?share_url=%encoded_post_url%\" title=\"Mail.Ru\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/mail_ru.svg\" width=\"%width%\" height=\"%height%\" alt=\"Mail.Ru\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Mendeley' => '<a class=\"heateor_ss_amp heateor_ss_amp_mendeley\" href=\"https://www.mendeley.com/sign-in/\" title=\"Mendeley\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/mendeley.svg\" width=\"%width%\" height=\"%height%\" alt=\"Mendeley\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Meneame' => '<a class=\"heateor_ss_amp heateor_ss_amp_meneame\" href=\"https://www.meneame.net/submit.php?url=%encoded_post_url%\" title=\"Meneame\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/meneame.svg\" width=\"%width%\" height=\"%height%\" alt=\"Meneame\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'MeWe' => '<a class=\"heateor_ss_amp heateor_ss_amp_mewe\" href=\"https://mewe.com/share?link=%encoded_post_url%\" title=\"MeWe\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/mewe.svg\" width=\"%width%\" height=\"%height%\" alt=\"MeWe\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'mix' => '<a class=\"heateor_ss_amp heateor_ss_amp_mix\" href=\"https://mix.com/mixit?url=%encoded_post_url%\" title=\"Mix\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/mix.svg\" width=\"%width%\" height=\"%height%\" alt=\"Mixi\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Mixi' => '<a class=\"heateor_ss_amp heateor_ss_amp_mixi\" href=\"https://mixi.jp/share.pl?mode=login&u=%encoded_post_url%\" title=\"Mixi\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/mixi.svg\" width=\"%width%\" height=\"%height%\" alt=\"Mixi\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'MySpace' => '<a class=\"heateor_ss_amp heateor_ss_amp_myspace\" href=\\'var heateorSsMyspaceShareUrl = \"https://myspace.com/post?u=\" + encodeURIComponent(\"%encoded_post_url%\") + \"&t=%post_title%&l=3&c=%post_title%\";theChampPopup(heateorSsMyspaceShareUrl)\\' title=\"MySpace\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/myspace.svg\" width=\"%width%\" height=\"%height%\" alt=\"MySpace\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Netvouz' => '<a class=\"heateor_ss_amp heateor_ss_amp_netvouz\" href=\"http://www.netvouz.com/action/submitBookmark?url=%encoded_post_url%&title=%post_title%&popup=no&description=\" title=\"Netvouz\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/netvouz.svg\" width=\"%width%\" height=\"%height%\" alt=\"Netvouz\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Odnoklassniki' => '<a class=\"heateor_ss_amp heateor_ss_amp_odnoklassniki\" href=\"https://connect.ok.ru/dk?cmd=WidgetSharePreview&st.cmd=WidgetSharePreview&st.shareUrl=%encoded_post_url%&st.client_id=-1\" title=\"Odnoklassniki\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/odnoklassniki.svg\" width=\"%width%\" height=\"%height%\" alt=\"Odnoklassniki\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Outlook.com' => '<a class=\"heateor_ss_amp heateor_ss_amp_outlook_com\" href=\"https://mail.live.com/default.aspx?rru=compose?subject=%post_title%&body=%encoded_post_url%&lc=1033&id=64855&mkt=en-us&cbcxt=mai\" title=\"Outlook.com\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/outlook_com.svg\" width=\"%width%\" height=\"%height%\" alt=\"Outlook.com\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Papaly' => '<a class=\"heateor_ss_amp heateor_ss_amp_papaly\" href=\"https://papaly.com/api/share.html?url=%encoded_post_url%&title=%post_title%\" title=\"Papaly\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/papaly.svg\" width=\"%width%\" height=\"%height%\" alt=\"Papaly\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Parler' => '<a class=\"heateor_ss_amp heateor_ss_amp_parler\" href=\"https://parler.com/new-post?message=%post_title%&url=%encoded_post_url%\" title=\"Parler\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/parler.svg\" width=\"%width%\" height=\"%height%\" alt=\"Parler\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Pinboard' => '<a class=\"heateor_ss_amp heateor_ss_amp_pinboard\" href=\"https://pinboard.in/popup_login/?url=%encoded_post_url%&title=%post_title%&later=&description=&next=same\" title=\"Pinboard\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/pinboard.svg\" width=\"%width%\" height=\"%height%\" alt=\"Pinboard\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Plurk' => '<a class=\"heateor_ss_amp heateor_ss_amp_plurk\" href=\"//www.plurk.com/m?content=%encoded_post_url%&qualifier=shares\" title=\"Plurk\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/plurk.svg\" width=\"%width%\" height=\"%height%\" alt=\"Plurk\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Pocket' => '<a class=\"heateor_ss_amp heateor_ss_amp_pocket\" href=\"https://readitlaterlist.com/save?url=%encoded_post_url%&title=%post_title%\" title=\"Pocket\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/pocket.svg\" width=\"%width%\" height=\"%height%\" alt=\"Pocket\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'PrintFriendly' => '<a class=\"heateor_ss_amp heateor_ss_amp_printfriendly\" href=\"http://www.printfriendly.com/print?url=%encoded_post_url%&partner=a2a\" title=\"PrintFriendly\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/printfriendly.svg\" width=\"%width%\" height=\"%height%\" alt=\"PrintFriendly\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Protopage_Bookmarks' => '<a class=\"heateor_ss_amp heateor_ss_amp_protopage_bookmarks\" href=\"http://www.protopage.com/add-button-site?url=%encoded_post_url%&label=&type=page\" title=\"Protopage Bookmarks\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/protopage_bookmarks.svg\" width=\"%width%\" height=\"%height%\" alt=\"Protopage Bookmarks\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Pusha' => '<a class=\"heateor_ss_amp heateor_ss_amp_pusha\" href=\"//www.pusha.se/posta?url=%encoded_post_url%\" title=\"Pusha\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/pusha.svg\" width=\"%width%\" height=\"%height%\" alt=\"Pusha\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Qzone' => '<a class=\"heateor_ss_amp heateor_ss_amp_qzone\" href=\"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=%encoded_post_url%\" title=\"Qzone\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/qzone.svg\" width=\"%width%\" height=\"%height%\" alt=\"Qzone\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Rediff MyPage' => '<a class=\"heateor_ss_amp heateor_ss_amp_rediff_mypage\" href=\"//share.rediff.com/bookmark/addbookmark?bookmarkurl=%encoded_post_url%&title=%post_title%\" title=\"Rediff MyPage\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/rediff_mypage.svg\" width=\"%width%\" height=\"%height%\" alt=\"Rediff MyPage\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Refind' => '<a class=\"heateor_ss_amp heateor_ss_amp_refind\" href=\"https://refind.com/?url=%encoded_post_url%\" title=\"Refind\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/refind.svg\" width=\"%width%\" height=\"%height%\" alt=\"Refind\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Renren' => '<a class=\"heateor_ss_amp heateor_ss_amp_renren\" href=\"//www.connect.renren.com/share/sharer?url=%encoded_post_url%&title=%post_title%\" title=\"Renren\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/renren.svg\" width=\"%width%\" height=\"%height%\" alt=\"Renren\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Sina Weibo' => '<a class=\"heateor_ss_amp heateor_ss_amp_sina_weibo\" href=\"http://service.weibo.com/share/share.php?url=%encoded_post_url%&title=%post_title%\" title=\"Sina Weibo\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/sina_weibo.svg\" width=\"%width%\" height=\"%height%\" alt=\"Sina Weibo\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'SiteJot' => '<a class=\"heateor_ss_amp heateor_ss_amp_sitejot\" href=\"http://www.sitejot.com/loginform.php?iSiteAdd=&iSiteDes=\" title=\"SiteJot\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/sitejot.svg\" width=\"%width%\" height=\"%height%\" alt=\"SiteJot\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Skype' => '<a class=\"heateor_ss_amp heateor_ss_amp_skype\" href=\"https://web.skype.com/share?url=%encoded_post_url%\" title=\"Skype\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/skype.svg\" width=\"%width%\" height=\"%height%\" alt=\"Skype\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Slashdot' => '<a class=\"heateor_ss_amp heateor_ss_amp_slashdot\" href=\"//slashdot.org/submission?url=%encoded_post_url%\" title=\"Slashdot\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/slashdot.svg\" width=\"%width%\" height=\"%height%\" alt=\"Slashdot\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'SMS' => '<a class=\"heateor_ss_amp heateor_ss_amp_sms\" href=\"sms://?&body=%post_title% %encoded_post_url%\" title=\"SMS\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/sms.svg\" width=\"%width%\" height=\"%height%\" alt=\"SMS\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'StockTwits' => '<a class=\"heateor_ss_amp heateor_ss_amp_stocktwits\" href=\"https://stocktwits.com/widgets/share?body=%post_title%%20%encoded_post_url%\" title=\"StockTwits\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/stocktwits.svg\" width=\"%width%\" height=\"%height%\" alt=\"StockTwits\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Svejo' => '<a class=\"heateor_ss_amp heateor_ss_amp_svejo\" href=\"https://svejo.net/story/submit_by_url?url=%encoded_post_url%&title=%post_title%&summary=\" title=\"Svejo\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/svejo.svg\" width=\"%width%\" height=\"%height%\" alt=\"Svejo\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Symbaloo_Feeds' => '<a class=\"heateor_ss_amp heateor_ss_amp_symbaloo_feeds\" href=\"//www.symbaloo.com/\" title=\"Symbaloo Feeds\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/symbaloo_feeds.svg\" width=\"%width%\" height=\"%height%\" alt=\"Symbaloo Feeds\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Telegram' => '<a class=\"heateor_ss_amp heateor_ss_amp_telegram\" href=\"https://telegram.me/share/url?url=%encoded_post_url%&text=%post_title%\" title=\"Telegram\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/telegram.svg\" width=\"%width%\" height=\"%height%\" alt=\"Telegram\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Threema' => '<a class=\"heateor_ss_amp heateor_ss_amp_threema\" href=\"threema://compose?text=%post_title% %encoded_post_url%\" title=\"Threema\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/threema.svg\" width=\"%width%\" height=\"%height%\" alt=\"Threema\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Trello' => '<a class=\"heateor_ss_amp heateor_ss_amp_trello\" href=\"https://trello.com/add-card?mode=popup&url=%encoded_post_url%&name=%post_title%&desc=\" title=\"Trello\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/trello.svg\" width=\"%width%\" height=\"%height%\" alt=\"Trello\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Tuenti' => '<a class=\"heateor_ss_amp heateor_ss_amp_tuenti\" href=\"https://www.tuenti.com/share?p=b5dd6602&url=%encoded_post_url%\" title=\"Tuenti\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/tuenti.svg\" width=\"%width%\" height=\"%height%\" alt=\"Tuenti\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Twiddla' => '<a class=\"heateor_ss_amp heateor_ss_amp_twiddla\" href=\"//www.twiddla.com/New.aspx?url=%encoded_post_url%&title=%post_title%\" title=\"Twiddla\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/twiddla.svg\" width=\"%width%\" height=\"%height%\" alt=\"Twiddla\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'TypePad_Post' => '<a class=\"heateor_ss_amp heateor_ss_amp_typepad_post\" href=\"https://www.typepad.com/services/quickpost/post?v=2&qp_show=ac&qp_title=%post_title%&qp_href=%encoded_post_url%\" title=\"TypePad Post\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/typepad_post.svg\" width=\"%width%\" height=\"%height%\" alt=\"TypePad Post\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Viadeo' => '<a class=\"heateor_ss_amp heateor_ss_amp_viadeo\" href=\"//www.viadeo.com/shareit/share/?url=%encoded_post_url%&title=%post_title%\" title=\"Viadeo\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/viadeo.svg\" width=\"%width%\" height=\"%height%\" alt=\"Viadeo\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Viber' => '<a class=\"heateor_ss_amp heateor_ss_amp_viber\" href=\"viber://forward?text=%post_title% %encoded_post_url%\" title=\"Viber\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/viber.svg\" width=\"%width%\" height=\"%height%\" alt=\"Viber\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Wanelo' => '<a class=\"heateor_ss_amp heateor_ss_amp_wanelo\" href=\"//wanelo.com/p/post?bookmarklet=&images%5B%5D=&url=%encoded_post_url%&title=%post_title%&price=&shop=\" title=\"Wanelo\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/wanelo.svg\" width=\"%width%\" height=\"%height%\" alt=\"Wanelo\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Webnews' => '<a class=\"heateor_ss_amp heateor_ss_amp_webnews\" href=\"//www.webnews.de/login\" title=\"Webnews\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/webnews.svg\" width=\"%width%\" height=\"%height%\" alt=\"Webnews\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'WordPress' => '<a class=\"heateor_ss_amp heateor_ss_amp_wordpress\" href=\"//www.addtoany.com/ext/wordpress/press_this?linkurl=%encoded_post_url%&linkname=%post_title%\" title=\"WordPress\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/wordpress.svg\" width=\"%width%\" height=\"%height%\" alt=\"WordPress\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Wykop' => '<a class=\"heateor_ss_amp heateor_ss_amp_wykop\" href=\"//www.wykop.pl/dodaj?url=%encoded_post_url%&title=%post_title%\" title=\"Wykop\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/wykop.svg\" width=\"%width%\" height=\"%height%\" alt=\"Wykop\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Yahoo_Mail' => '<a class=\"heateor_ss_amp heateor_ss_amp_yahoo_mail\" href=\"//compose.mail.yahoo.com/?Subject=%post_title%&body=Link:%encoded_post_url%\" title=\"Yahoo Mail\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/yahoo_mail.svg\" width=\"%width%\" height=\"%height%\" alt=\"Yahoo Mail\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Yahoo_Messenger' => '<a class=\"heateor_ss_amp heateor_ss_amp_yahoo_messenger\" href=\"ymsgr:sendim?m=%encoded_post_url%\" title=\"Yahoo Messenger\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/yahoo_messenger.svg\" width=\"%width%\" height=\"%height%\" alt=\"Yahoo Messenger\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>',\n\t\t'Yoolink' => '<a class=\"heateor_ss_amp heateor_ss_amp_yoolink\" href=\"//yoolink.to/addorshare?url_value=%encoded_post_url%&title=%post_title%\" title=\"Yoolink\" rel=\"nofollow noopener\" target=\"_blank\"><amp-img src=\"'. $ampIconPath .'/yoolink.svg\" width=\"%width%\" height=\"%height%\" alt=\"Yoolink\" class=\"amp-wp-enforced-sizes\" style=\"width: %width%px;\"></amp-img></a>'\n\t);\n\treturn $sharingNetworks;\n}", "public function GetBrowserTypes()\n {\n try {\n $devices = $this->sample['browscap']\n ->map(function ($item, $key) {\n # Cast array into collection\n $item = collect($item)->recursive();\n \n # Return platform\n if ($item['data']->has('browser_type'))\n return collect(['browser_type' => $item['data']['browser_type']]);\n })\n ->groupBy('browser_type')\n ->map(function ($item, $key) {\n return $item->count();\n });\n \n return $devices;\n \n } catch (StatsException $e){\n Log::error($e);\n return collect([]);\n }\n }", "public function sitePhotographs(){\r\n\t\t$data = array();\r\n\t\t$this->_db->where('project_id IN ('. implode(',' , $this->_project_id_arr).')' );\r\n\t\t$q = $this->_db->get('site_photographs');\r\n\t\tif($q->num_rows()){\r\n\t\t\tforeach($q->result_array() as $id=>$row){\r\n\t\t\t\t$data[$id] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "public function platform()\n {\n (isset($this->platform[$this->version]))\n ?: $this->platform[$this->version] = new JsonPlatform($this->version);\n\n return $this->platform[$this->version];\n }", "function foxhound_social_networks() {\n\t$social_networks = array(\n\t\t'none' => array(\n\t\t\t'name' => false,\n\t\t\t'title' => '(none)'\n\t\t),\n\t\t'amazon' => array(\n\t\t\t'name' => 'amazon',\n\t\t\t'title' => 'Amazon',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'bandcamp' => array(\n\t\t\t'name' => 'bandcamp',\n\t\t\t'title' => 'BandCamp',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'bandsintown' => array(\n\t\t\t'name' => 'bandsintown',\n\t\t\t'title' => 'BandsInTown',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'facebook' => array(\n\t\t\t'name' => 'facebook',\n\t\t\t'title' => 'Facebook',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'ilike' => array(\n\t\t\t'name' => 'ilike',\n\t\t\t'title' => 'iLike',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'itunes' => array(\n\t\t\t'name' => 'itunes',\n\t\t\t'title' => 'iTunes',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'lastfm' => array(\n\t\t\t'name' => 'lastfm',\n\t\t\t'title' => 'LastFM',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'myspace' => array(\n\t\t\t'name' => 'myspace',\n\t\t\t'title' => 'MySpace',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'purevolume' => array(\n\t\t\t'name' => 'purevolume',\n\t\t\t'title' => 'PureVolume',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'reverbnation' => array(\n\t\t\t'name' => 'reverbnation',\n\t\t\t'title' => 'ReverbNation',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'soundcloud' => array(\n\t\t\t'name' => 'soundcloud',\n\t\t\t'title' => 'SoundCloud',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'tumblr' => array(\n\t\t\t'name' => 'tumblr',\n\t\t\t'title' => 'Tumblr',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'twitter' => array(\n\t\t\t'name' => 'twitter',\n\t\t\t'title' => 'Twitter',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t),\n\t\t'youtube' => array(\n\t\t\t'name' => 'youtube',\n\t\t\t'title' => 'YouTube',\n\t\t\t'baseurl' => '',\n\t\t\t'iconlinkpos' => array(\n\t\t\t\t'headerx' => '',\n\t\t\t\t'headery' => '',\n\t\t\t\t'footerx' => '',\n\t\t\t\t'footery' => ''\n\t\t\t)\n\t\t)\n\t);\n\treturn apply_filters( 'foxhound_social_networks', $social_networks );\n}", "function getPlatform() {\n\t\t\t\treturn $this->platform;\n\t\t\t}", "public function social_media()\n {\n return $this->belongsToMany('App/SocialMedia', 'social_media_id', 'social_media_id');\n }", "public function definition()\n {\n\n $platforms = ['Playstation 4', 'PC', 'Nintendo Switch', 'Xbox'];\n\n return [\n 'platform' => $platforms[rand(0,3)]\n ];\n }", "public function getHubs() {\r\n\t\tif (array_key_exists ( 'hubs', $this->data )) {\r\n\t\t\treturn $this->data ['hubs'];\r\n\t\t}\r\n\t\t\r\n\t\t$hubs = $this->getExtension ( 'Atom' )->getHubs ();\r\n\t\t\r\n\t\t$this->data ['hubs'] = $hubs;\r\n\t\t\r\n\t\treturn $this->data ['hubs'];\r\n\t}", "function cfcustomizer_get_social_profiles($which = 'all'){\n $cfOptions = get_option( 'cf_options', 'default' );\n $socialTypes = array('facebook','twitter','googleplus','linkedin','youtube');\n \n $socialProfiles = array();\n if($which = 'all'){\n $i = 0;\n foreach($socialTypes as $socialType){\n if(array_key_exists($socialType, $cfOptions)){\n if($cfOptions[$socialType] != '') {\n $socialProfiles[$socialType] = $cfOptions[$socialType];\n }\n $i++;\n }\n }\n } else {\n $socialProfiles[$which] = $cfOptions[$which];\n }\n \n return $socialProfiles;\n}", "function social_urls(){\n $post = new posts();\n $socials = $post->get_post_by('social');\n $icons = $post->social_icons;\n for($i=0;$i<count($icons); $i++ ){\n $data[$icons[$i]] = (isset($socials[$i])) ? ($icons[$i]==$socials[$i]->post_title) ? $socials[$i]->post_content : '#' : '#';\n }\n return $data;\n}", "function gazebo_ubc_social_media_links($items = NULL, $style = 'plain') {\n // social media buttons\n $variables['tweet'] = '<span class=\"social-link social-link-twitter\"><a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-url=\"';\n $variables['tweet'] .= $_SERVER['HTTP_HOST'] . base_path() . drupal_get_path_alias($_GET['q']) . '\" data-count=\"horizontal\">Tweet</a>';\n $variables['tweet'] .= '<script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script></span>';\n $variables['facebook_like'] = '\n <script>\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) {return;}\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, \"script\", \"facebook-jssdk\"));\n </script>';\n\n $variables['facebook_like'] .= '<span class=\"social-link social-link-fb\"><fb:like href=http://' . $_SERVER['HTTP_HOST'] . base_path() . drupal_get_path_alias($_GET['q']);\n $variables['facebook_like'] .= ' layout=\"button_count\" show-faces=\"true\" width=\"80\" action=\"like\" colorscheme=\"light\" /></span>';\n \n $variables['social_media_buttons'] = '<div class=\"media-links-' . $style . '\">';\n if (isset($items)) {\n if (in_array('twitter', $items)) {\n $variables['social_media_buttons'] .= $variables['tweet'];\n }\n if (in_array('facebook', $items)) {\n $variables['social_media_buttons'] .= $variables['facebook_like'];\n }\n }\n else $variables['social_media_buttons'] .= $variables['facebook_like'] . $variables['tweet'];\n \n return $variables['social_media_buttons'] . '</div>';\n\n}", "public function getAssignedPlatforms(SnGames $game) {\n\t\t$platform = new SnGamesPlatformsRel();\n\t\t$platform->ID_GAME = $game->ID_GAME;\n\t\t$platform->purgeCache();\n\t\t$platforms = $platform->find();\n\n\t\t$result = array();\n\t\tif($platforms) {\n\t\t\tforeach ($platforms as $p) {\n\t\t\t\t$result[] = $p->ID_PLATFORM;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function social(): ?array {\n return self::$social;\n }", "public function getSocialIds();", "function slcr_social_media_url() {\n global $slcr_redux;\n $facebook_url = $slcr_redux['facebook-url'];\n if ($facebook_url == true) { ?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-facebook-url']); ?>\" target=\"_blank\"><i class=\"socicon-facebook\"></i></a>\n </li>\n <?php }\n $twitter_url = $slcr_redux['twitter-url'];\n if ($twitter_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-twitter-url']); ?>\" target=\"_blank\"><i class=\"socicon-twitter\"></i></a>\n </li>\n <?php }\n $google_plus_url = $slcr_redux['google-plus-url'];\n if ($google_plus_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-google-plus-url']); ?>\" target=\"_blank\"><i class=\"socicon-googleplus\"></i></a>\n </li>\n <?php }\n $vimeo_url = $slcr_redux['vimeo-url'];\n if ($vimeo_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vimeo-url']); ?>\" target=\"_blank\"><i class=\"socicon-vimeo\"></i></a>\n </li>\n <?php }\n $dribbble_url = $slcr_redux['dribbble-url'];\n if ($dribbble_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-dribbble-url']); ?>\" target=\"_blank\"><i class=\"socicon-dribbble\"></i></a>\n </li>\n <?php }\n $pinterest_url = $slcr_redux['pinterest-url'];\n if ($pinterest_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-pinterest-url']); ?>\" target=\"_blank\"><i class=\"socicon-pinterest\"></i></a>\n </li>\n <?php }\n $youtube_url = $slcr_redux['youtube-url'];\n if ($youtube_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-youtube-url']); ?>\" target=\"_blank\"><i class=\"socicon-youtube\"></i></a>\n </li>\n <?php }\n $tumblr_url = $slcr_redux['tumblr-url'];\n if ($tumblr_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-tumblr-url']); ?>\" target=\"_blank\"><i class=\"socicon-tumblr\"></i></a>\n </li>\n <?php }\n $linkedin_url = $slcr_redux['linkedin-url'];\n if ($linkedin_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-linkedin-url']); ?>\" target=\"_blank\"><i class=\"socicon-linkedin\"></i></a>\n </li>\n <?php }\n $rss_url = $slcr_redux['rss-url'];\n if ($rss_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-rss-url']); ?>\" target=\"_blank\"><i class=\"socicon-rss\"></i></a>\n </li>\n <?php }\n $behance_url = $slcr_redux['behance-url'];\n if ($behance_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-behance-url']); ?>\" target=\"_blank\"><i class=\"socicon-behance\"></i></a>\n </li>\n <?php }\n $flickr_url = $slcr_redux['flickr-url'];\n if ($flickr_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-flickr-url']); ?>\" target=\"_blank\"><i class=\"socicon-flickr\"></i></a>\n </li>\n <?php }\n $spotify_url = $slcr_redux['spotify-url'];\n if ($spotify_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-spotify-url']); ?>\" target=\"_blank\"><i class=\"socicon-spotify\"></i></a>\n </li>\n <?php }\n $instagram_url = $slcr_redux['instagram-url'];\n if ($instagram_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-instagram-url']); ?>\" target=\"_blank\"><i class=\"socicon-instagram\"></i></a>\n </li>\n <?php }\n $github_url = $slcr_redux['github-url'];\n if ($github_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-github-url']); ?>\" target=\"_blank\"><i class=\"socicon-github\"></i></a>\n </li>\n <?php }\n $stackexchange_url = $slcr_redux['stackexchange-url'];\n if ($stackexchange_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-stackexchange-url']); ?>\" target=\"_blank\"><i class=\"socicon-stackexchange\"></i></a>\n </li>\n <?php }\n $soundcloud_url = $slcr_redux['soundcloud-url'];\n if ($soundcloud_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-soundcloud-url']); ?>\" target=\"_blank\"><i class=\"socicon-soundcloud\"></i></a>\n </li>\n <?php }\n $vk_url = $slcr_redux['vk-url'];\n if ($vk_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vk-url']); ?>\" target=\"_blank\"><i class=\"socicon-vkontakte\"></i></a>\n </li>\n <?php }\n $vine_url = $slcr_redux['vine-url'];\n if ($vine_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vine-url']); ?>\" target=\"_blank\"><i class=\"socicon-vine\"></i></a>\n </li>\n <?php }\n $houzz_url = $slcr_redux['houzz-url'];\n if ($houzz_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-houzz-url']); ?>\" target=\"_blank\"><i class=\"socicon-houzz\"></i></a>\n </li>\n <?php }\n $yelp_url = $slcr_redux['yelp-url'];\n if ($yelp_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-yelp-url']); ?>\" target=\"_blank\"><i class=\"socicon-yelp\"></i></a>\n </li>\n <?php }\n $email_url = $slcr_redux['email-url'];\n if ($email_url == true) {?>\n <li>\n <a href=\"mailto:<?php echo esc_url($slcr_redux['social-media-email-url']); ?>\"><i class=\"socicon-mail\"></i></a>\n </li>\n <?php }\n $phone_url = $slcr_redux['phone-url'];\n if ($phone_url == true) {?>\n <li>\n <a href=\"tel:<?php echo esc_url($slcr_redux['social-media-phone-url']); ?>\"><i class=\"icon_phone\"></i></a>\n </li>\n <?php } \n }", "public function social() {\n\n\t\t\tob_start();\n\n\t\t\t\tif( $this->settings->get_option( 'social', 'ae_tools_maintenance', 'on' ) == 'on' ) { ?>\n\n\t\t\t\t<ul>\n\n\t\t\t\t\t<?php foreach ( $this->customizer->social() as $network ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $network['url'] = get_theme_mod( 'social_' . $network['id'] ) ) { ?>\n\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a href=\"<?php echo $network['url']; ?>\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<i class=\"fab fa-<?php echo $network['id']; ?>\"></i>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<?php }\n\n\t\t\t\t\t} ?>\n\n\t\t\t\t</ul>\n\n\t\t\t<?php }\n\n\t\t\t$markup = ob_get_contents(); ob_end_clean();\n\n\t\t\treturn $markup;\n\n\t\t}", "function getAllMainSiteWidgetsAvailableToGalaxy($orderby = 'title')\n\t{\n\t\t$mainDB = Jadu_Service_Container::getInstance()->getMainDB();\n\t\n\t\t$dateFunctions['dateCreated'] = $mainDB->SQLDate(\"Y-m-d\", \"dateCreated\");\n\n\t\tif (defined('HOMEPAGES_SHOW_ALL_WIDGETS') && HOMEPAGES_SHOW_ALL_WIDGETS == false) {\n\t\t\t$widgetScope = '(scope = 0 OR scope = 2)';\n\t\t}\n\t\telse {\n\t\t\t$widgetScope = '(scope = 0 OR scope = 2 OR scope = 3)';\t\n\t\t}\n\t\n\t\t$query = \"SELECT id, title, defaultWidthPercentage, defaultBackgroundColour, description,\n\t\t\t\t previewImage, contentCode, contentCodeBehind, contentJs, settingsCode, jsCode, requiresCategory, \n\t\t\t\t minimumWidth, limitUse, memberOnly, standard,\n\t\t\t\t adminID, \" . $dateFunctions['dateCreated'] . \" AS dateCreated, live, scope \n\t\t\t FROM \" . HOMEPAGE_WIDGETS_TABLE . \"\n\t\t\t WHERE $widgetScope\n\t\t\t ORDER BY $orderby\";\n\n\t\t$cache = new Cache(HOMEPAGE_WIDGETS_TABLE, $query, getMainDomain());\n\t\n\t\tif ($cache->isEmpty()) {\n\t\n\t\t\t$allHomepageWidgets = array();\n\t\n\t\t\t$result = $mainDB->Execute($query);\n\t\n\t\t\tif ($result) {\n\t\t\t\twhile (!$result->EOF) {\n\t\t\t\t\t$homepage = new HomepageWidget();\n\t\t\t\t\t$homepage->mainSite = 1;\t\t\t\t\t\t\t\t\n\t\t\t\t\t$homepage->populate($result->fields);\n\t\n\t\t\t\t\t$allHomepageWidgets[$homepage->id] = $homepage;\n\t\t\n\t\t\t\t\t$result->MoveNext();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t$cache->setData($allHomepageWidgets);\n\t\t\treturn $allHomepageWidgets;\n\t\t}\n\t\telse {\n\t\t\treturn $cache->data;\n\t\t}\n\t}", "public function index()\n {\n try {\n if (!$this->authorize('socialmedia')) {\n abort(403);\n }\n } catch (AuthorizationException $e) {\n abort(403);\n }\n\n $type_arr = Vw_Socialmedia::where('type','!=',0)->select(['type'])->get();\n $types = [1,2,3,4,5,6,7,8];\n $types_ids = [];\n foreach ($type_arr as $p){\n array_push($types_ids,$p->type);\n }\n foreach ($types_ids as $type){\n foreach ($types as $key=>$p){\n if ($type == $p){\n unset($types[$key]);\n }\n }\n }\n $items = Vw_Socialmedia::all();\n return view('admin.socialmedia.create',compact('items','types'));\n }", "public function index()\n {\n //\n return Social::first(['facebook', 'twitter']);\n }", "private function detectPlatform()\n\t{\n\t\t$platforms = $this->listPlatforms();\n\t\t\n\t\tif(empty($platforms)) throw new Exception('No Akeeba Engine platform class found');\n\t\t\n\t\t$bestPlatform = (object)array(\n\t\t\t'name'\t\t=> null,\n\t\t\t'priority'\t=> 0,\n\t\t);\n\t\t\n\t\tforeach($platforms as $platform) {\n\t\t\t$o = $this->loadPlatform($platform);\n\t\t\tif(is_null($o)) continue;\n\t\t\t\n\t\t\tif($o->isThisPlatform()) {\n\t\t\t\tif($o->priority > $bestPlatform->priority) {\n\t\t\t\t\t$bestPlatform->priority = $o->priority;\n\t\t\t\t\t$bestPlatform->name = $platform;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $bestPlatform->name;\n\t}", "public function getHypermedia()\n {\n return [\n 'related' => $this->getRelatedHypermedia()\n ];\n }", "public function social_media()\n {\n return $this->belongsToMany('App/SocialMedia','studio_social','social_media_id','social_media_id');\n }", "function setPlatforms(array $platforms) {\n if ( count($platforms) > count(self::VALID_PLATFORMS) )\n throw new Exception(\"So much platforms!\");\n //check if $platformns contains invalid value\n elseif ( count(array_diff($platforms, self::VALID_PLATFORMS)) > 0 )\n throw new Exception(\"One or more of the platforms are invalid!\\n\"\n . \"Accepted platforms: \".implode(\", \", self::VALID_PLATFORMS));\n else\n $this->platforms = $platforms;\n }", "public function social_platforms_section()\n{\n}", "public function getDesktopOs();", "public function index()\n {\n // Retrieving models\n $socials = Social::all();\n $site_info = SiteInfo::first();\n\n return view('admin-panel.social-media.index', compact('site_info', 'socials'));\n }", "public function GetProviders() {\n $Providers = JsConnectPlugin::GetProvider();\n $JsConnectProviders = array();\n foreach ($Providers as $Provider) {\n $Data = $Provider;\n $Target = Gdn::Request()->Get('Target');\n if (!$Target)\n $Target = '/'.ltrim(Gdn::Request()->Path());\n\n if (StringBeginsWith($Target, '/entry/signin'))\n $Target = '/';\n\n $ConnectQuery = array('client_id' => $Provider['AuthenticationKey'], 'Target' => $Target);\n $Data['Target'] = Url('entry/jsconnect', TRUE);\n if(strpos($Data['Target'],'?') !== FALSE) {\n $Data['Target'] .= '&'.http_build_query($ConnectQuery);\n } else {\n $Data['Target'] .= '?'.http_build_query($ConnectQuery);\n }\n $Data['Target'] = urlencode($Data['Target']);\n $Data['Name'] = Gdn_Format::Text($Data['Name']);\n $Data['SignInUrl'] = FormatString(GetValue('SignInUrl', $Provider, ''), $Data);\n $JsConnectProviders[] = $Data;\n }\n return empty($JsConnectProviders) ? FALSE: $JsConnectProviders;\n }", "protected function getPlatform()\n {\n if (null === $this->platform) {\n $this->platform = new DefaultPlatform();\n }\n\n return $this->platform;\n }", "public function get_et_divi_social(){\n \n // Get options.\n $et_divi = get_option('et_divi');\n \n $et_divi_social_defaults = array(\n 'divi_facebook_url',\n 'divi_twitter_url',\n 'divi_instagram_url',\n 'divi_youtube_url',\n 'divi_linkedin_url'\n );\n \n // Set a default empty string if not set. \n foreach($et_divi_social_defaults as $social_default){\n \n if( !isset($et_divi[$social_default]) ){\n \n $et_divi[$social_default] = '';\n \n }\n \n }\n \n // Update the following keys if you wish to change the shortcode names.\n // Key = shortcode name.\n // Value = URL in the DB.\n return array(\n 'social_facebook_url' => $et_divi['divi_facebook_url'],\n 'social_twitter_url' => $et_divi['divi_twitter_url'],\n 'social_instagram_url' => $et_divi['divi_instagram_url'],\n 'social_youtube_url' => $et_divi['divi_youtube_url'],\n 'social_linkedin_url' => $et_divi['divi_linkedin_url'],\n );\n \n }", "public function getPlatform()\n {\n return $this->parser->platform() ?: null;\n }", "function platform()\n {\n if (!$this->platform)\n $this->platform = new Platform($this);\n\n return $this->platform;\n }", "function getMediaTypeList(){\r\n $nList = array();\r\n $nList['koran'] = \"Koran\";\r\n $nList['news-online'] = \"News Online\";\r\n $nList['tv'] = \"TV\";\r\n $nList['radio'] = \"Radio\";\r\n \r\n return $nList;\r\n }" ]
[ "0.74161524", "0.69818336", "0.6908933", "0.6388562", "0.6352483", "0.63330805", "0.62439287", "0.61406595", "0.6004694", "0.5928621", "0.59210527", "0.58994836", "0.58944243", "0.5877151", "0.58234894", "0.5823435", "0.58083296", "0.57641095", "0.57614076", "0.5755976", "0.57406074", "0.57316196", "0.5695496", "0.5584204", "0.55417037", "0.55417037", "0.55417037", "0.553957", "0.5527286", "0.55170614", "0.5504264", "0.54343414", "0.54224265", "0.5388021", "0.53805333", "0.53577787", "0.5349091", "0.5334255", "0.5317931", "0.528919", "0.5285724", "0.527553", "0.52676183", "0.52498555", "0.52466714", "0.52466714", "0.52466714", "0.52447665", "0.52362835", "0.523046", "0.5215983", "0.5210111", "0.52091414", "0.5204876", "0.5200122", "0.5192719", "0.51863647", "0.51790166", "0.5177519", "0.51586545", "0.5157585", "0.515647", "0.5152229", "0.5143543", "0.51389235", "0.5134604", "0.51326644", "0.5120485", "0.5088852", "0.50869477", "0.5081487", "0.5080764", "0.506851", "0.5067314", "0.50663054", "0.5061928", "0.50557214", "0.50522333", "0.5048344", "0.50423425", "0.5024835", "0.50237095", "0.50096697", "0.5007624", "0.49850035", "0.4971259", "0.49649698", "0.4960395", "0.4952427", "0.49523684", "0.49446055", "0.49445742", "0.49440825", "0.4943945", "0.49224448", "0.4916318", "0.49005902", "0.48932892", "0.4887047", "0.48804888" ]
0.8462566
0
Return an array of social media feeds.
Вернуть массив социальных сетей.
public function get_social_feeds() { return $this->social_feeds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFeed()\n {\n $feed = $this->getFeedCache();\n if (!$feed) {\n $feed = $this->getFeedUncached();\n $this->extend('updateFeedUncachedData', $feed);\n $this->setFeedCache($feed);\n if (class_exists('AbstractQueuedJob')) {\n singleton('SocialFeedCacheQueuedJob')->createJob($this);\n }\n }\n\n $data = array();\n if ($feed) {\n foreach ($feed as $post) {\n $created = SS_Datetime::create();\n $created->setValue($this->getPostCreated($post));\n\n $data[] = array(\n 'SocialFeedsDir' => SOCIAL_FEEDS_DIR,\n 'Type' => $this->getType(),\n 'Content' => \\InsiteContentManager::truncate($this->getPostContent($post),200),\n 'Created' => $created,\n 'URL' => $this->getPostUrl($post),\n 'Data' => $post,\n 'UserName' => $this->getUserName($post),\n 'Image' => $this->getImage($post),\n );\n }\n }\n\n $result = ArrayList::create($data);\n $result = $result->sort('Created', 'DESC');\n\n return $result;\n }", "public function getFeeds()\n {\n $feeds = [];\n $links = $this->getLinks();\n foreach ($links as $link) {\n if (stristr($link['href'], 'feedburner.com')) {\n $feeds[] = $link['href'];\n }\n }\n return $feeds;\n }", "public function getRssFeeds();", "function feeds() {\n\t\treturn Feed::find_all_by_show_id( $this->id );\n\t}", "public function getFeeds()\r\n {\r\n return $this->getFeed();\r\n }", "public function get_feeds() {\n\t\t$feeds = (array) apply_filters( 'instant_notifier_feeds', array() );\n\n\t\treturn $feeds;\n\t}", "public function getFeedData() {\n\n // Store channelwize account configurations.\n $twitterConfigArray = [];\n\n $configObj = new SocialMediaConfigData();\n\n $twitterConfigArray = $configObj->getTwitterChannelConfig();\n// $twitterConfigArray = $configObj->getChannelConfig('twitter');\n\n return $this->getData($twitterConfigArray);\n }", "function getFeeds()\n {\n $url =\n common_local_url('grouprss',\n array('nickname' => $this->group->nickname));\n\n return array(new Feed(Feed::JSON,\n common_local_url('ApiTimelineGroup',\n array('format' => 'as',\n 'id' => $this->group->id)),\n // TRANS: Tooltip for feed link. %s is a group nickname.\n sprintf(_('Notice feed for %s group (Activity Streams JSON)'),\n $this->group->nickname)),\n new Feed(Feed::RSS1,\n common_local_url('grouprss',\n array('nickname' => $this->group->nickname)),\n // TRANS: Tooltip for feed link. %s is a group nickname.\n sprintf(_('Notice feed for %s group (RSS 1.0)'),\n $this->group->nickname)),\n new Feed(Feed::RSS2,\n common_local_url('ApiTimelineGroup',\n array('format' => 'rss',\n 'id' => $this->group->id)),\n // TRANS: Tooltip for feed link. %s is a group nickname.\n sprintf(_('Notice feed for %s group (RSS 2.0)'),\n $this->group->nickname)),\n new Feed(Feed::ATOM,\n common_local_url('ApiTimelineGroup',\n array('format' => 'atom',\n 'id' => $this->group->id)),\n // TRANS: Tooltip for feed link. %s is a group nickname.\n sprintf(_('Notice feed for %s group (Atom)'),\n $this->group->nickname)),\n new Feed(Feed::FOAF,\n common_local_url('foafgroup',\n array('nickname' => $this->group->nickname)),\n // TRANS: Tooltip for feed link. %s is a group nickname.\n sprintf(_('FOAF for %s group'),\n $this->group->nickname)));\n }", "public function getFeeds()\n {\n return $this->feeds;\n }", "public static function getFeedItems()\n {\n return self::where('is_published', 1)->whereDate('published_at', '<=', Carbon::now())->get();\n }", "public function getFeeds() {\n return $this->feeds;\n }", "public function getFeeds() {\n return $this->feeds; \n }", "public function get_newsfeed() {\n // get tweets\n $tweets = $this->db->limit(20)->order_by('timestamp desc')->get('tweets')->result();\n\n // get tags associated with tweets\n $tweet_ids = array_map(function ($e) { return $e->id; }, $tweets);\n $tags = $this->Tag->get_for_tweets($tweet_ids);\n\n // associate tags with tweets\n foreach ($tweets as &$tweet)\n $tweet->tags = (isset($tags[$tweet->id])) ? $tags[$tweet->id] : array();\n\n return $tweets;\n }", "public function getFeed()\n {\n $since_id = $this->max('id');\n $paramArr = [\n 'count' => 200,\n 'include_entities' => 1\n ];\n if ($since_id) {\n $paramArr['since_id'] = $since_id;\n }\n echo \"Fetching tweets since \" . $since_id . \"<br>\";\n $r = \\Twitter::getHomeTimeline($paramArr);\n echo \"Tweets found: \" . count($r) . \"<br>\";\n return $r;\n\n }", "function getFeeds()\n {\n $feeds = array();\n\n while (list($key, $feed) = each($this->args)) {\n if (preg_match('/^url\\d*$/', $key)) {\n $feeds[] = $feed;\n }\n }\n\n return $feeds;\n }", "public function getRecentFeeds()\n {\n $this->init();\n\n /*\n *create array from\n * ***/\n $followers = Followers::where('user_id', '=', $this->user_id)->select('user_following_id')->get();\n\n $folarray = json_decode($followers, true);\n /*\n * check if user_id is in array if not push into array\n * **/\n if (!in_array($this->user_id, $folarray)) {\n array_push($folarray, array(\n \"user_following_id\" => intval($this->user_id)\n ));\n }\n\n\n $results = DB::table('events')->whereIn('user_id', $folarray)->latest()->simplePaginate(100);\n\n $datarx = json_decode(json_encode($results));\n\n\n return response(CustomPaginator::mediaFeeds($results->perPage(), $results->count(), $results->currentPage(), $results->nextPageUrl(),\n $results->previousPageUrl(), $datarx->data, $this->user_id), 200);\n }", "function ncn_chatter_get_feed_posts($fid, $type=\"feed\", $params=array()) {\n if (!isset($params['page'])) { $params['page'] = 0; }\n if (!isset($params['perPage'])) { $params['perPage'] = 3; } // Default\n\n $feed = ncn_chatter_get_feed($fid);\n if ($feed) {\n if ($type == 'feed') {\n switch ($feed['type']) {\n case FEED_TYPE_COMPANY:\n return ncn_chatter_get_company_feed_posts($fid, $params);\n break;\n case FEED_TYPE_AR:\n return ncn_chatter_get_ar_feed_posts($fid, $params);\n break;\n case FEED_TYPE_CLAIM:\n return ncn_chatter_get_claim_feed_posts($fid, $params);\n break;\n case FEED_TYPE_USER:\n return ncn_chatter_get_user_profile_feed_posts($fid, $params);\n break;\n }\n } else if ($type == 'user_follow' && $feed['type'] == FEED_TYPE_USER) {\n return ncn_chatter_get_user_follow_feed_posts($fid, $params);\n }\n }\n return array();\n}", "public function getFeeds()\n\t{\n\t\treturn $this->feedsList;\n\t}", "public function userFeeds() {\n $req = $this->getApp()->get('/me/feed', $this->getToken());\n $this->setFeedData($req->getDecodedBody());\n }", "public function feeds() {\n \n if( !$this->RequestHandler->isRss() ) {\n $this->redirect('/');\n }\n $questions = $this->Post->find('all', array('conditions' => array('Post.type' => 'question',), \n 'order' => 'Post.timestamp DESC',\n 'limit' => 15));\n \n return $this->set(compact('questions'));\n }", "public static function getFeedItems()\n {\n return self::whereApproved(1)->orderBy('created_at', 'desc')->limit(15)->get();\n }", "public static function getAll()\n {\n $ig = self::connect();\n $result = [];\n $userId = $ig->people->getUserIdForName(Yii::$app->params['instagram']['username']);\n //$maxId = '1841326011726057726_344733174';\n $maxId = null;\n\n $response = $ig->timeline->getUserFeed($userId, $maxId);\n foreach ($response->getItems() as $item) {\n $data = ['id'=>$item->getId()];\n $data['title']='';\n if($caption = $item->getCaption())\n $data['title'] = $caption->getText();\n if($item->getCarouselMedia()){\n foreach ($item->getCarouselMedia() as $album)\n $data['images'][] = $album->getImageVersions2()->getCandidates()[0]->getUrl();\n }else\n $data['image'] = $item->getImageVersions2()->getCandidates()[0]->getUrl();\n $result[] = $data;\n }\n return $result;\n }", "public function get_list_of_post_links()\n\t{\n\t\t$rss_feed = $this->source->fetcher_source; \n\t\t$feed = \\Feeds::make($rss_feed);\n\n\t\t// get all Items in the RSS feed\n\t\t$items = collect($feed->get_items());\n\n\t\t// keep only url and id\n\t\t$items = $items->map(function($item) {\n\t\t\treturn [ 'url' => $item->get_link(), 'uid' => $item->get_id(), 'published_at' => $item->get_date()];\n\t\t});\n\n\t\treturn $items;\n\t}", "private function _getFeeds()\n\t{\n\t\tif (file_exists($this->feedsPath))\n\t\t{\n\t\t\t$data = file_get_contents($this->feedsPath);\n\t\t\treturn empty($data) ? array() : json_decode($data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t}", "public function getRss();", "public function getPosts($offset = 0, $num_per_page = null) {\n $cid = 'socialmediafeed:allposts';\n $data = NULL;\n if ($this->config->get('cache_enable') && $cache = \\Drupal::cache()->get($cid)) {\n $this->socialmediafeeds = $cache->data;\n }\n else {\n if ($this->config->get('facebook_enable')) {\n $fb = new FacebookController();\n $a = $fb->getData();\n $this->socialmediafeeds = array_merge($this->socialmediafeeds, $a);\n }\n if ($this->config->get('twitter_enable')) {\n $twitter = new TwitterController();\n $a = $twitter->getData();\n $this->socialmediafeeds = array_merge($this->socialmediafeeds, $a);\n }\n if ($this->config->get('instagram_enable')) {\n $insta = new InstagramController();\n $a = $insta->getData();\n $this->socialmediafeeds = array_merge($this->socialmediafeeds, $a);\n }\n if ($this->config->get('youtube_enable')) {\n $youtube = new YoutubeController();\n $a = $youtube->getData();\n $this->socialmediafeeds = array_merge($this->socialmediafeeds, $a);\n }\n if ($this->config->get('linkedin_enable')) {\n $linedin = new LinkedinController();\n $a = $linedin->getData();\n $this->socialmediafeeds = array_merge($this->socialmediafeeds, $a);\n }\n usort($this->socialmediafeeds, array($this, 'sort_by_timestamp'));\n $this->traverseArray($this->socialmediafeeds, array('timestamp'));\n $cache_time = $this->getCacheDuration();\n \\Drupal::cache()->set($cid, $this->socialmediafeeds, $cache_time);\n }\n if (is_numeric($num_per_page)) {\n return array(\n 'data' => array_slice($this->socialmediafeeds, $offset, $num_per_page),\n 'total' => count($this->socialmediafeeds),\n );\n }\n return $this->socialmediafeeds;\n }", "function rtas_get_feeds( $feed_url='http://feeds.feedburner.com/rtpanel' ) {\n\n // Get RSS Feed(s)\n include_once( ABSPATH . WPINC . '/feed.php' );\n $maxitems = 0;\n // Get a SimplePie feed object from the specified feed source.\n $rss = fetch_feed( $feed_url );\n if ( !is_wp_error( $rss ) ) { // Checks that the object is created correctly\n\n // Figure out how many total items there are, but limit it to 5.\n $maxitems = $rss->get_item_quantity( 5 );\n\n // Build an array of all the items, starting with element 0 (first element).\n $rss_items = $rss->get_items( 0, $maxitems );\n \n } ?>\n <ul><?php\n if ( $maxitems == 0 ) {\n echo '<li>'.__( 'No items', 'rtPanel' ).'.</li>';\n } else {\n // Loop through each feed item and display each item as a hyperlink.\n foreach ( $rss_items as $item ) { ?>\n <li>\n <a href='<?php echo $item->get_permalink(); ?>' title='<?php echo __( 'Posted ', 'rtPanel' ) . $item->get_date( 'j F Y | g:i a' ); ?>'><?php echo $item->get_title(); ?></a>\n </li><?php\n }\n } ?>\n </ul><?php\n}", "function fetch() \n {\n $this->parsed = array();\n\n // fetch the feed\n $this->fetch_xml();\n if ($this->xml == '')\n {\n return $this->parsed;\n }\n\n // parse it\n $doc = new DOMDocument();\n $doc->loadXML($this->xml);\n $items = $doc->getElementsByTagName('item');\n if (empty($items)) \n {\n return array();\n }\n $fetched = 0;\n $data = array();\n foreach($items as $item) \n {\n $valid = $item->getElementsByTagName('title') && $item->getElementsByTagName('creator') && $item->getElementsByTagName('link') && $item->getElementsByTagName('pubDate');\n if (!$valid) \n {\n continue;\n }\n $data = array(\n 'title' => $item->getElementsByTagName('title')->item(0)->nodeValue,\n 'author' => $item->getElementsByTagName('creator')->item(0)->nodeValue,\n 'permalink' => $item->getElementsByTagName('link')->item(0)->nodeValue,\n 'date' => date(\"M j, Y\", strtotime($item->getElementsByTagName('pubDate')->item(0)->nodeValue)),\n 'categories' => array()\n );\n if ($item->getElementsByTagName('category'))\n { \n $cat_ct = 0;\n foreach($item->getElementsByTagName('category') as $node) \n {\n $data['categories'][] = $node->nodeValue;\n if (++$cat_cat >= FeaturedPostPlugin::$MAX_NUM_CATEGORY_LINKS)\n {\n break;\n }\n }\n }\n $this->parsed[] = $data;\n \n if (++$fetched >= $this->num_posts) \n {\n break;\n }\n }\n return $this->parsed;\n }", "public function newsStream() {\n\t\t$this->construct();\n\t\tif (empty($_SESSION['tokens']['google'])) return false;\nerror_log(\"in \" . __METHOD__);\n\t\trequire_once('http.class.php');\n\t\t$_SESSION['user']['google']['following'] = $this->getFollowing('me');\n\t\tif (empty($_SESSION['user']['google']['following']) or !is_array($_SESSION['user']['google']['following'])) return false;\n\t\t$stream = array();\n\t\tforeach ($_SESSION['user']['google']['following'] as $person) {\n\t\t\t$stream[] = userFeed($person['id']);\n\t\t}\nreturn $stream;\n\t\ttry {\n\t\t\tlist($headers, $stream) = httpWorker::get($this->urls['stream']);\n\t\t\tpreg_match(\"'^HTTP/1\\.. (\\d+) '\", $headers[0], $matches);\n\t\t\tif ((int) ($matches[1] / 100) != 2) {\n#\t\t\t\tunset($_SESSION['tokens']['google']);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$stream = json_decode($stream, true);\n\t\t\tif (isset($stream['error'])) {\n\t\t\t\t$_SESSION['error'] = $stream['error'];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn $stream['items'];\n\t\t} catch (Exception $e) {\n\t\t}\n\t\treturn false;\n\t}", "function getFeeds($user)\n\t{\n\t\tglobal $db;\n\t\t$query = $db->query(\"SELECT *, feeds.id as fid, (SELECT COUNT(*) FROM feed_likes WHERE feedCode = feeds.id) as nlikes, (SELECT COUNT(*) FROM feed_comments WHERE feedCode = feeds.id) as ncomments FROM feeds JOIN users ON feeds.createdBy = users.Id WHERE users.id = \\\"$user\\\" ORDER BY createdDate DESC \") or trigger_error(\"sdsd\".$db->error, E_USER_ERROR);\n\n\t\t$posts = array();\n\n\t\twhile ($data = $query->fetch_assoc()) {\n\n\t\t\t//getting post attachments\n\t\t\t$attq = $db->query(\"SELECT imgUrl FROM investmentimg WHERE investCode = $data[fid]\") or trigger_error($investDb->error);\n\n\t\t\t$att = array();\n\t\t\twhile ( $attData = $attq->fetch_assoc()) {\n\t\t\t\t$att[] = $attData['imgUrl'];\n\t\t\t}\n\n\t\t\t$data['feedAttachments'] = $att;\n\n\t\t\t$posts[] = $data;\n\t\t}\n\t\treturn $posts;\n\t}", "public function facebookGetStream()\n {\n $facebook = $this->_getFacebookObject();\n $url = $GLOBALS['registry']->getServiceLink('prefs', 'horde')\n ->add(array('group' => 'facebook'));\n\n try {\n $options = array(\n 'since' => $this->vars->oldest,\n 'until' => $this->vars->newest\n );\n $stream = $facebook->streams->getStream($this->vars->filter, $options);\n } catch (Horde_Service_Facebook_Exception $e) {\n $html = sprintf(_(\"There was an error making the request: %s\"), $e->getMessage());\n $html .= sprintf(_(\"You can also check your Facebook settings in your %s.\"), $url->link() . _(\"preferences\") . '</a>');\n\n return $html;\n }\n\n // Parse the posts.\n $posts = $stream->data;\n $newest = new Horde_Date($posts[0]->created_time);\n $oldest = new Horde_Date($posts[count($posts) -1]->created_time);\n $newest = $newest->timestamp();\n $oldest = $oldest->timestamp();\n\n // Build the view for each story.\n $html = '';\n foreach ($posts as $post) {\n $html .= $this->_buildPost($post);\n }\n\n return array(\n 'o' => $oldest,\n 'n' => $newest,\n 'c' => $html\n );\n }", "public function friendsFeed($params = array())\n\t{\n\t\treturn $this->con->get('friends_feed', $params);\n\t}", "public function getData($count = 20)\n\t{\n\t\t$cacheKey = \"media-jhu-feed-{$count}\";\n\n \tif ($feed = $this->cache->fetch($cacheKey)) {\n return $feed;\n\t\t}\n\n $collectedFeeds = array(); \n\n // parse out each feed\n foreach ($this->jhuFeeds as $feed) {\n\n $xmlObj = $this->http->clearPrevious()\n ->setBaseURL($feed[\"baseUrl\"])\n ->setEndpoint($feed[\"endpoint\"])\n ->get();\n\n // This will trigger if the response comes back as a string. There was a bug in the HTTP worker\n // that was causing this to happen. This bug has since been fixed, but I am leaving this here\n // just in case. -jw\n if (!is_object($xmlObj) || !is_object($xmlObj->channel) || !is_object($xmlObj->channel->item)) {\n\t // log\n\t continue;\n }\n\n // get some info for the whole feed\n $source = (string) $xmlObj->channel->title;\n $linkToSource = (string) $xmlObj->channel->link;\n\n // parse out each item\n foreach ($xmlObj->channel->item as $item) {\n\n \t$desc = !empty($item->description) ? (string) strip_tags($item->description, \"<a><b><strong><i><em>\") : \"\";\n \t$desc = $this->truncate($desc, 150, \" \");\n\n \t$headline = (string) $item->title;\n\n \t// Strip the date off the end of Medicine headlines\n \t$headline = preg_replace(\"/\\s-\\s\\d{1,2}\\/\\d{1,2}\\/\\d{2}/\", \"\", $headline);\n\n $data = array(\n \"headline\" => $headline,\n \"link\" => (string) $item->link,\n \"publish_date\" => strtotime($item->pubDate),\n \"description\" => $desc,\n \"source\" => array(\n \"name\" => $source,\n \"url\" =>$linkToSource\n )\n );\n\n $collectedFeeds[] = $data;\n }\n\n }\n\n // sort the feed items by descending date\n usort( $collectedFeeds, function ($a, $b) {\n $a_val = $a[\"publish_date\"];\n $b_val = $b[\"publish_date\"];\n if ( $a_val == $b_val ) {\n return 0;\n }\n return ($a_val > $b_val) ? -1 : 1;\n });\n\n // limit the feed to designated number\n $finalFeed = array_slice($collectedFeeds, 0, $count);\n\n\t\t$items = array();\n\n\t\t// Grab only the data we need and sanitize\n\t\tforeach ($finalFeed as $item) {\n\n\t\t\t$items[] = array(\n\t\t\t\t\"title\" => htmlspecialchars($item[\"headline\"]), \n\t\t\t\t\"link\" => $item[\"link\"],\n\t\t\t\t\"pubDate\" => $item[\"publish_date\"],\n\t\t\t\t\"description\" => $item[\"description\"],\n\t\t\t\t\"source\" => array(\n\t\t\t\t\t\"name\" => $item[\"source\"][\"name\"],\n\t\t\t\t\t\"url\" => $item[\"source\"][\"url\"]\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$this->cache->store($cacheKey, $items, 300);\n\n return $items;\n }", "function extrairOsItemsDoFeed($feed){\n $items=[];\n foreach ($feed as $entry) {\n $data = [\n 'title' => $entry->getTitle(),\n 'url' => $entry->getLink()\n ];\n $items[] = $data;\n }\n return $items;\n}", "public function feed()\n {\n $ids = $this->getFriends()->map->id->prepend($this->id);\n\n return Post::with(['location', 'postable', 'user', 'comments', 'reactions.user'])\n ->latest()\n ->whereIn('user_id', $ids)\n ->get();\n }", "public function getFeedRss(){\n global $urlFeedTorrent;\n $rss = fetch_rss ($urlFeedTorrent); //apre il feed\n $items = array(); //contiene tutti gli elementi\n foreach ($rss->items as $feed) {\n $item = array(); //definisce un singolo elemento\n //Variabilizzo tutto\n $item['link'] = $feed['link'];\n $item['title'] = $feed['title'];\n //Formatto la data con un intero UNIX TIMESTAMP\n //(del tipo 1129218794) per poterla maneggiare\n $item['date'] = strtotime ($feed['pubdate']);\n $items[] = $item; //aggiungo l'elemento all'array generale\n } // chiudo il ciclo FOREACH ITEM\n return $items;\n }", "public function getList(){\n\t\tif (empty($this->source->rss_feed)) {\n\t\t\treturn $this->getListFromMedia();\n\t\t}\n\n\t\treturn $this->getListFromRss();\n\t}", "public function skipAcl_getRssFeeds( ){\n\t\t$xml = $this->config->item(\"investor_rss_feed_url\");\n\t\t$feeds = simplexml_load_file($xml);\n\t\t$feeds = json_decode( json_encode($feeds),true );\n\t\t$response = array() ;\n\t\t$response[] = array_slice($feeds[\"channel\"][\"item\"], 0, 6); \n\t\t$response[] = array_slice($feeds[\"channel\"][\"item\"], 6, 4); \n\t\treturn $response;\n\t}", "public function getFeedsAction()\n {\n try {\n /** @var \\Shopware\\Models\\ProductFeed\\Repository $repository */\n $repository = Shopware()->Models()->getRepository(ProductFeed::class);\n $dataQuery = $repository->getListQuery(\n $this->Request()->getParam('sort', []),\n $this->Request()->getParam('start'),\n $this->Request()->getParam('limit')\n );\n\n $totalCount = Shopware()->Models()->getQueryCount($dataQuery);\n $feeds = $dataQuery->getArrayResult();\n\n $this->View()->assign(['success' => true, 'data' => $feeds, 'totalCount' => $totalCount]);\n } catch (Exception $e) {\n $this->View()->assign(['success' => false, 'errorMsg' => $e->getMessage()]);\n }\n }", "public function getFeedList()\n {\n if (isset($this->feedList)) {\n return $this->feedList;\n } else {\n return false;\n }\n }", "public function feeds(): MorphMany\n {\n return $this->morphMany(Feed::class, 'owner');\n }", "public function get_feed()\n {\n }", "function ncn_chatter_get_user_follow_feed_posts($user_fid, $params) {\n $posts = array();\n $user_feed = ncn_chatter_get_feed($user_fid);\n if ($user_feed) {\n $u = user_load($user_feed['entity_id']);\n if ($u) {\n if (is_member_user($u)) {\n // Company Feed Posts for Member Role\n $company_feed = ncn_chatter_get_feed_by_entity(FEED_TYPE_COMPANY, $u->uid);\n return ncn_chatter_get_company_feed_posts($company_feed['fid'], $params);\n } else {\n // User Follow Feed Posts\n $follow_fids = ncn_chatter_get_user_follow_fid($u->uid);\n $posts = ncn_chatter_get_posts_in_feeds($follow_fids, $params);\n }\n }\n }\n return $posts;\n}", "private function FetchFeed() {\n\t\n\t\t$r = '';\n\t\tif ($this->ID != '' && $this->Count > 0) {\n\t\t\t// fetch feed\n\t\t\t$c = curl_init();\n\t\t\tcurl_setopt_array($c, array(\n\t\t\t\tCURLOPT_URL => 'http://twitter.com/statuses/user_timeline/' . $this->ID . '.json?count=' . $this->Count,\n\t\t\t\tCURLOPT_HEADER => false,\n\t\t\t\tCURLOPT_TIMEOUT => 10,\n\t\t\t\tCURLOPT_RETURNTRANSFER => true\n\t\t\t));\n\t\t\t$r = curl_exec($c);\n\t\t\tcurl_close($c);\n\t\t}\n\t\n\t\t// return JSON as array\n\t\treturn (!!$r ? json_decode($r, true) : false);\n\t}", "public function get_feeds() {\n $token = $this->input->get_post('token');\n $user = $this->userlib->getUserProfile($token);\n \n $query = \"\n SELECT\n id AS feed_id,\n titles,\n industries,\n locations,\n company,\n target_salary,\n timestamp AS create_datetime\n FROM \".TABLE_CACHE_JOB_SEARCH.\"\n WHERE\n user_id = ?\n AND active = 1\n ORDER BY create_datetime DESC\n \";\n $data = array($user['id']);\n $results = $this->db->query($query, $data);\n $results = $results->result_array();\n \n $this->outputlib->output(STATUS_OK, '', $results);\n return;\n }", "function ncn_chatter_get_ar_feed_posts($ar_fid, $params) {\n $follow_fids = ncn_chatter_get_follow_fid_from_tree($ar_fid);\n $posts = ncn_chatter_get_posts_in_feeds($follow_fids, $params);\n return $posts;\n}", "public function feedAction()\n {\n $articles = $this->getDoctrine()->getRepository('IntranetNewsBundle:Article')->findAll();\n\n $feed = $this->get('eko_feed.feed.manager')->get('article');\n $feed->addFromArray($articles);\n $feed->addItemField(new MediaItemField('getFeedMediaItem'));\n \n return new Response($feed->render('atom')); // or 'atom'\n }", "public function get_posts(){\n\t\t$data = Post::find_all_by_type();\n\t\treturn $this->get_feed( $data );\n\t}", "public function feeds()\n\t{\n\t\tif( ! $this->feeds) {\n\t\t\t$feeds = $this->storage->get();\n\n\t\t\t// adapt the feeds into \\Steadweb\\Rss\\Feed classes\n\t\t\t// @todo make this more aware that storage might return a different structure.\n\t\t\tarray_walk($feeds, function($feed) {\n\t\t\t\t$this->feeds[] = new $this->driver($feed->uri, $feed->items, $feed->title, $feed->description, $feed->lastupdated);\n\t\t\t});\n\t\t}\n\n\t\t// chaining\n\t\treturn $this;\n\t}", "function listFeeds($memberId = 1)\n\t{\n\t\tglobal $db, $investDb;\t\t\n\t\t$query = $db->query(\"SELECT F.*, F.id as fid, u.userImage as feedByImg, COALESCE(u.name, u.phone) as feedByName, (SELECT COUNT(*) FROM investments.feed_likes WHERE feedCode = F.id) as nlikes, (SELECT COUNT(*) FROM investments.feed_comments WHERE feedCode = F.id) as ncomments, (SELECT COUNT(*) FROM investments.feed_likes WHERE feedCode = F.id AND userCode = '$memberId') as liked FROM investments.feeds as F JOIN uplus.users AS u ON u.id = F.createdBy WHERE archive = 'NO' OR ISNULL(archive) ORDER BY createdDate DESC\") or trigger_error($db->error, E_USER_ERROR);\n\n\t\t$posts = array();\n\n\t\twhile ($data = $query->fetch_assoc()) {\n\t\t\t$feedId = $data['fid'];\n\t\t\t//getting post attachments\n\t\t\t$attq = $investDb->query(\"SELECT imgUrl FROM investments.investmentimg WHERE investCode = $feedId\") or trigger_error($investDb->error);\n\n\t\t\t$att = array();\n\t\t\twhile ( $attData = $attq->fetch_assoc()) {\n\t\t\t\t$att[] = $attData['imgUrl'];\n\t\t\t}\n\t\t\t$liked = $data['liked']==0?\"NO\":\"YES\";\n\t\t\t$data[\"feedLikeStatus\"] = $liked;\n\t\t\t$data['feedAttachments'] = $att;\n\t\t\t$data['video'] = \"\";\n\t\t\t$data['videoThumbnail'] = \"\";\n\t\t\t$data['createdDateText'] = textDiffDates(date(DATE_ATOM), $data['createdDate']);\n\n\t\t\t//checking images and videos\n\t\t\t$vidQ = $investDb->query(\"SELECT * FROM feed_videos WHERE feedCode = $feedId AND archived = 'no' ORDER BY createdDate DESC LIMIT 1 \") or trigger_error($investDb->error);\n\n\n\t\t\tif($vidQ && $vidQ->num_rows){\n\t\t\t\t$videoData = $vidQ->fetch_assoc();\n\t\t\t\t$data['video'] = $videoData['video'];\n\t\t\t\t$data['videoThumbnail'] = HOSTNAME.$videoData['thumbnail'];\n\t\t\t}\n\t\t\t$posts[] = $data;\n\t\t}\n\t\treturn $posts;\n\t}", "public function my_feeds() {\n $user = \\Auth::user();\n $feeds = $user->feeds()->latest('updated_at')->get()->toArray();\n // dd($feeds->get()->toArray());\n\n return view('feeds.my_feeds', compact('feeds'));\n }", "function ncn_chatter_get_user_profile_feed_posts($user_fid, $params) {\n $follow_fids = array($user_fid);\n $posts = ncn_chatter_get_posts_in_feeds($follow_fids, $params);\n return $posts;\n}", "public function toArray(): array {\n $newsFeed = [];\n foreach ($this->content as $item) {\n $newsFeed[] = [\n 'type' => 'pinterest',\n 'id' => $this->user['data']['username'],\n 'avatar' => $this->user['data']['image']['60x60']['url'],\n 'title' => $item['name'],\n 'content' => $item['description'],\n 'image' => $item['image']['60x60']['url'],\n 'link' => $item['url'],\n ];\n }\n\n return $newsFeed;\n }", "public function getDashboardFeed($count = false, $page = 1){\n $this->JACKED->Flock->requireLogin();\n $userid = $this->JACKED->MySQL->sanitize($this->JACKED->Sessions->read('auth.Flock.userid'));\n \n $pagination = $count? $this->JACKED->MySQL->paginator($count, $page ?: 1) : '';\n \n $result = $this->JACKED->MySQL->query(\n 'SELECT DISTINCT P.id, P.user_id, P.poster_id, P.comment, P.datetime_posted\n FROM ' . $this->config->dbt_posts . ' P,\n ' . $this->config->dbt_friends . ' F\n WHERE \n P.user_id = ' . $userid . ' OR (\n F.pending = 0 AND\n F.user_id = ' . $userid . ' AND\n P.user_id = F.friend_id\n )\n ORDER BY datetime_posted DESC\n ' . $pagination\n );\n $feed = $this->JACKED->MySQL->parseResult($result);\n if(count($feed) > 0 && !is_array($feed[0]))\n $feed = array(0 => $feed);\n foreach($feed as $key => $item){\n $feed[$key]['comments'] = $this->getComments($item['id']);\n }\n\n return $feed;\n }", "public function get_facebook_posts() {\n\t\t$this->db->order_by( \"created\", \"desc\" );\n\t\t$this->db->limit( 5 );\n\t\t$query = $this->db->get( $this::FACEBOOK_POSTS_TABLE );\n\n\t\treturn $query->result();\n\t}", "public function feedItems()\n {\n if ($this->client == null) {\n $this->initializeFeed();\n }\n\n $list = collect($this->client->get_items())\n ->sortBy(function (\\SimplePie_Item $item, $key) {\n return $item->get_title();\n })->sortByDesc(function (\\SimplePie_Item $item, $key) {\n return $item->get_date('Ymd');\n });\n\n $list = $this->extractData($list);\n\n return $list;\n }", "function get_feed() {\n\t\t$postlist = remove_doubles($this->feedposts);\n\t\treturn array_object_sort( $postlist, 'post_date_gmt', $this->direction );\n\t}", "public function feed()\n {\n return Feed::i();\n }", "public function getPosts(){\n\t\t\t$options = array(\n\t\t\t\t\t'maxResults' => $this->_limit,\n\t\t\t\t\t'key' => $this->_devKEY\n\t\t\t);\n\t\t\t$result = parent::_fileGetContent(parent::_getUrl(self::API_URI, $options,$this->_userID.'/activities/public'));\n\t\t\treturn $this->_loop($result);\n\t\t}", "public function feed(){\n\n $return = $this->fb->get('/'.$this->page.'/feed', $_SESSION['facebook_access_token']);\n\n\n return view('feed', [\"data\" => $return->getDecodedBody()]);\n }", "public function findForFeed()\n {\n return $this->model->orderBy('created_at', 'desc')->limit(15)->get();\n }", "function ncn_chatter_get_posts_in_feeds($follow_fids, $params) {\nglobal $user;\n $is_ncn_user = is_ncn_user($user);\n $perPage = $params['perPage'];\n $offset = $params['page'] * $perPage;\n\n $str_follow_fids = implode(', ', $follow_fids);\n\n $where_query='';\n if (!$is_ncn_user) {\n $where_query = \"WHERE p.ncn_only = 0 \";\n }\n $query = \"SELECT p.* \n FROM ( SELECT DISTINCT(fp.pid) AS fpid, fp.created_at AS created_at \n FROM {chatter_feed_post} AS fp \n WHERE fp.fid IN ( $str_follow_fids ) \n ORDER BY fp.created_at DESC ) AS ffp \n LEFT JOIN {chatter_post} AS p ON (ffp.fpid = p.id) \n $where_query \n ORDER BY ffp.created_at DESC, p.updated_at DESC \n LIMIT $offset, $perPage\";\n\n //ncn_print_r($query);\n $result = db_query($query);\n $posts = array();\n if ($result) {\n while ($post = $result->fetchAssoc()) {\n $post['count_comments'] = ncn_chatter_get_comments_under_post($post['id'], true);\n $posts[$post['id']] = $post;\n }\n }\n return $posts;\n}", "public static function selfFeed()\n\t\t\t {\n\t\t\t\t \n\t\t\t\t $endpoint = 'https://api.instagram.com/v1/users/self/feed?access_token=' . self::$access_token . '&count=' . self::$count;\n\t\t\t\t \n\t\t\t\t return json_decode(CurlHelper::getCurl($endpoint));\n\n\t\t\t }", "function feedinput_get_all_feeds( ) {\n return FeedInput_Manager::get_all_feedsets();\n}", "public function feeds()\n {\n return $this->hasMany(Feed::class, 'feed_mix_id', 'id');\n }", "public function getFeed()\n {\n return $this->feed;\n }", "public function getFeed()\n {\n return $this->feed;\n }", "public function feed(): Feed\n {\n return $this->feed;\n }", "public function parse() {\n if (empty($this->feeds)) {\n throw new Exception(\"No scraped RSS data was found (hint: Consume::scrape())\");\n }\n \n $items = array(); \n \n foreach ($this->feeds as $feedsrc => $feed) {\n \n /**\n * Create a new SimpleXMLElement object using the data returned from the RSS/Atom feed\n */\n \n $xml = new SimpleXMLElement($feed['body'], LIBXML_NOCDATA);\n \n /**\n * Find all namespaces\n */\n \n $ns = $xml->getNamespaces(true);\n $type = \"rss\";\n \n if ($xml->channel->item != NULL) {\n $loop = $xml->channel->item; \n } else {\n $type = \"atom\";\n $loop = $xml->entry;\n }\n \n /**\n * Loop through each entry in the feed\n */\n \n foreach ($loop as $node) {\n $date = !empty($node->date->__toString()) ? $node->date->__toString() : $node->pubDate->__toString();\n \n if (empty($date) && !empty($node->updated->__toString())) {\n $date = $node->updated->__toString(); \n }\n \n $link = $node->link->__toString();\n \n foreach ($node->link as $link) {\n if ($link['type'] == \"text/html\" || $link['rel'] == \"alternate\") {\n $link = $link['href']->__toString();\n }\n }\n \n $item = array(\n \"id\" => !empty($node->guid->__toString()) ? $node->guid->__toString() : $link,\n \"title\" => $node->title->__toString(),\n \"description\" => !empty($node->content->__toString()) ? $node->content->__toString() : $node->description->__toString(),\n \"link\" => $link,\n \"tags\" => $link,\n \"category\" => $link,\n \"date\" => $date,\n );\n \n /**\n * Loop through all known namespaces and assemble the data\n */\n \n foreach ($ns as $namespace) {\n foreach ($node->children($namespace) as $key => $data) {\n \n if (isset($item[$key]) && !empty(trim($data->__toString()))) {\n $item[$key] = trim($data->__toString()); \n } elseif ($key == \"encoded\") {\n $item['description'] = $data->__toString();\n } else {\n $item['extra'][$key] = $data->__toString();\n }\n }\n }\n \n /**\n * Organise the tag(s) situation a little better\n */\n \n if (count($node->tag) > 0) {\n $tags = array(); \n \n foreach ($node->tag as $tag) {\n $tags[] = $tag->__toString();\n }\n \n if (!empty(implode(\",\", $tags))) {\n $item['tags'] = implode(\",\", $tags);\n }\n }\n \n if (count($node->category) > 0) {\n $tags = array(); \n \n foreach ($node->category as $tag) {\n $tags[] = $tag->__toString();\n }\n \n if (!empty(implode(\",\", $tags))) {\n $item['tags'] = implode(\",\", $tags);\n }\n }\n \n /**\n * Process / tidy up the feed item\n */\n \n $item = $this->process($item);\n \n /**\n * Get the item summary\n */\n \n $item['summary'] = $this->createSummary($item['description']);\n $item['body'] = $this->stripSummaryFromBody($item['summary'], $item['description']);\n \n /**\n * Add this item to the array of processed items\n */\n \n $this->feeds[$feedsrc]['items'][] = $item;\n }\n }\n \n return $this;\n }", "protected function extractFeeds(string $html) : array\n {\n $dom = new \\DOMDocument();\n $dom->loadHTML($html);\n\n $links = $dom->getElementsByTagName('link');\n $feeds = [];\n foreach ($links as $link) {\n if ($this->isFeedLink($link)) {\n $feeds[] = $link->getAttribute('href');\n }\n }\n\n return $feeds;\n }", "public function actionGetFeedItems()\n\t{\n\t\t$this->requireAjaxRequest();\n\n\t\t$url = craft()->request->getRequiredParam('url');\n\t\t$limit = craft()->request->getParam('limit');\n\n\t\t$items = craft()->feeds->getFeedItems($url, $limit);\n\n\t\tforeach ($items as &$item)\n\t\t{\n\t\t\tif (isset($item['date']))\n\t\t\t{\n\t\t\t\t$item['date'] = $item['date']->uiTimestamp();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tunset($item['date']);\n\t\t\t}\n\t\t}\n\n\t\t$this->returnJson(array('items' => $items));\n\t}", "public function getFeed()\n {\n return $this->_feed;\n }", "public function retrieveAllEntriesForFeed($feed) {\n $feedClass = get_class($feed);\n $reflectionObj = new ReflectionClass($feedClass);\n $result = $reflectionObj->newInstance();\n do {\n foreach ($feed as $entry) {\n $result->addEntry($entry);\n }\n\n $next = $feed->getLink('next');\n if ($next !== null) {\n $feed = $this->getFeed($next->href, $feedClass);\n } else {\n $feed = null;\n }\n }\n while ($feed != null);\n return $result;\n }", "public function getFeed(): Feed\n {\n return $this->feed;\n }", "public static function getRegisteredFeeds() {\n\t\twfRunHooks( 'BSRSSFeederGetRegisteredFeeds', array( &self::$aFeeds ) );\n\t\treturn self::$aFeeds;\n\t}", "public function getFeedsFromWebsite($xml){\n\n $xml = simplexml_load_file($xml);\n\n $extract = new ImageExtractor();\n $storyList = new StoryList();\n\n foreach($xml->channel->item as $key => $value){\n $story = new Story();\n $story->setTitle($value->title->__toString());\n $story->setDescription($value->description->__toString());\n $story->setLink($value->guid->__toString());\n $story->setPubDate($value->pubDate->__toString());\n $story->setImageUrl($extract->extractStoryImage($story->getLink()));\n\n $storyList->addStory($story);\n }\n\n return $storyList;\n\n }", "public static function getFeeds($user = null)\n {\n if (isset($user)) {\n if ($user == 'all') {\n $feeds = FeedsModel::all();\n if (count($feeds) == 0)\n Flash::warning(trans('rssfeeds::general.status.error-no-feeds'));\n } else {\n $feeds = FeedsModel::where('feed_owner', $user)->get();\n if (count($feeds) == 0)\n Flash::warning(trans('rssfeeds::general.status.error-no-user-feeds'));\n }\n } else {\n $feeds = FeedsModel::where('feed_owner', 0)->get();\n if (count($feeds) == 0)\n Flash::warning(trans('rssfeeds::general.status.error-no-feeds'));\n }\n\n return $feeds;\n }", "public function getFullFeedData(): array\n {\n $externalIdList = $this->externalIdRepository->findAll();\n $feedSummaryData = [];\n foreach ($this->feedSummaryRepository->findAll() as $feedSummary) {\n $feedSummaryData[$feedSummary->getExternal()->getId()] = $feedSummary;\n }\n $feedTitleData = [];\n foreach ($this->feedTitleRepository->findAll() as $feedTitle) {\n $feedTitleData[$feedTitle->getExternal()->getId()] = $feedTitle;\n }\n\n $result = [];\n foreach ($externalIdList as $externalId) {\n $result[] = new FullFeedEntry(\n $externalId,\n $feedTitleData[$externalId->getId()],\n $feedSummaryData[$externalId->getId()],\n $this->feedLinkRepository->findBy(['external' => $externalId->getId()])\n );\n }\n\n return $result;\n }", "public function getNewsListForFeed($feedId)\n {\n try {\n // fetching mails\n $news = News::where([\n ['news_rss_feed_id', $feedId]\n ])\n ->orderBy('news_id', 'desc')\n ->limit(10)\n ->get()\n ->toArray();\n //echo \"<pre>\"; print_r($news); exit;\n return $news;\n }catch (\\Exception $e){\n return array();\n }\n }", "function getPosts()\n {\n if ($this->username != ''){\n $listObject = $this->getCurl();\n $userGet = $listObject->entry_data->ProfilePage[0]->graphql->user;\n $edges = ($userGet->edge_owner_to_timeline_media->edges);\n $posts = [];\n foreach ($edges as $key => $value) {\n $posts[] = $this->createPostObject($value);\n }\n return $posts;\n }else{\n return $this->returnError('Você precisa definir o username no construtor');\n }\n }", "public function get_page_feeds($user_id) {\n App::import('vendors', 'TwitterAPIExchange');\n $this->layout = 'ajax';\n\n\n $user = $this->User->find('first', array('conditions' => array('User.id' => $user_id), 'fields' => array('User.user_type')));\n\n $posts = array();\n $i = 0;\n\n if ($user['User']['user_type'] == 'athlete') {\n $this->loadModel('AthleteProfile');\n $profile = $this->AthleteProfile->find('first', array('conditions' => array('AthleteProfile.user_id' => $user_id),\n 'fields' => array('AthleteProfile.fb_page', 'AthleteProfile.twitter_page')));\n\n $Model = 'AthleteProfile';\n } else if ($user['User']['user_type'] == 'fan') {\n $this->loadModel('FanProfile');\n $profile = $this->FanProfile->find('first', array('conditions' => array('FanProfile.user_id' => $user_id),\n 'fields' => array('FanProfile.fb_page', 'FanProfile.twitter_page')));\n\n $Model = 'FanProfile';\n } else if ($user['User']['user_type'] == 'affiliate') {\n\n $this->loadModel('AffiliateProfile');\n $profile = $this->AffiliateProfile->find('first', array('conditions' => array('AffiliateProfile.user_id' => $user_id),\n 'fields' => array('AffiliateProfile.fb_page', 'AffiliateProfile.twitter_page')));\n\n $this->loadModel('Customfeed');\n\n $this->Customfeed->bindModel(array('belongsTo' => array(\n 'Event' => array(\n 'className' => 'Event',\n 'foreignKey' => 'event_id'\n )\n )));\n $custom = $this->Customfeed->find('all', array('conditions' => array('Customfeed.user_id' => $this->Auth->user('id')),\n 'fields' => array('Customfeed.*', 'Event.id', 'Event.title', 'Event.picture')));\n\n if (!empty($custom)) {\n foreach ($custom as $fd) {\n if ($fd['Customfeed']['is_public'] == 'Yes') {\n $posts[$i]['picture'] = $this->webroot . 'files/events/' . $fd['Event']['id'] . '/thumb_' . $fd['Event']['picture'];\n $posts[$i]['name'] = $fd['Event']['title'];\n $posts[$i]['message'] = $fd['Customfeed']['content'];\n $posts[$i]['link'] = $this->webroot . 'events/event_details/' . $fd['Event']['id'];\n $posts[$i]['created'] = strtotime($fd['Customfeed']['created']);\n\n $i++;\n }\n }\n }\n\n $Model = 'AffiliateProfile';\n }\n\n\n if (!empty($profile[$Model]['fb_page'])) {\n $fb_posts = file_get_contents(\"https://graph.facebook.com/\" . $profile[$Model]['fb_page'] . \"/posts?fields=caption,description,id,link,message,picture,name,story,updated_time&limit=10&access_token=\" . FB_ACCESS_TOKEN);\n $fb_posts = json_decode($fb_posts);\n\n\n if (isset($fb_posts->data) && !empty($fb_posts->data)) {\n foreach ($fb_posts->data as $dat) {\n $posts[$i]['picture'] = $posts[$i]['name'] = $posts[$i]['message'] = $posts[$i]['link'] = $posts[$i]['created'] = '';\n\n if (!empty($dat->picture))\n $posts[$i]['picture'] = $dat->picture;\n\n if (!empty($dat->name))\n $posts[$i]['name'] = $dat->name;\n\n if (!empty($dat->message))\n $posts[$i]['message'] = $dat->message;\n\n if (!empty($dat->link))\n $posts[$i]['link'] = $dat->link;\n\n if (!empty($dat->picture))\n $posts[$i]['created'] = strtotime($dat->created_time);\n\n $i++;\n }\n }\n }\n\n\n if (!empty($profile[$Model]['twitter_page'])) {\n $settings = array(\n 'oauth_access_token' => TW_TOKEN,\n 'oauth_access_token_secret' => TW_TOKEN_SECRET,\n 'consumer_key' => TW_APP_KEY,\n 'consumer_secret' => TW_APP_SECRET\n );\n\n $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';\n $getfield = '?screen_name=' . $profile[$Model]['twitter_page'] . '&count=5';\n\n $requestMethod = 'GET';\n\n $twitter = new TwitterAPIExchange($settings);\n $response = $twitter->setGetfield($getfield)\n ->buildOauth($url, $requestMethod)\n ->performRequest();\n\n $response = json_decode($response);\n\n if (!empty($response)) {\n foreach ($response as $tw) {\n $posts[$i]['picture'] = $posts[$i]['name'] = $posts[$i]['message'] = $posts[$i]['link'] = $posts[$i]['created'] = '';\n\n if (!empty($tw->user->profile_image_url))\n $posts[$i]['picture'] = $tw->user->profile_image_url;\n\n if (!empty($tw->user->name))\n $posts[$i]['name'] = $tw->user->name;\n\n if (!empty($tw->text))\n $posts[$i]['message'] = $tw->text;\n\n if (!empty($tw->user->url))\n $posts[$i]['link'] = $tw->user->url;\n\n if (!empty($tw->created_at))\n $posts[$i]['created'] = strtotime($tw->created_at);\n\n $i++;\n }\n }\n }\n\n\n $arr = array();\n if (!empty($posts)) {\n foreach ($posts as $pst) {\n $arr[$pst['created']][] = $pst;\n }\n }\n\n array_multisort($arr, SORT_DESC, $posts);\n\n\n $this->set('posts', $posts);\n $this->render('news');\n }", "public function getProfileFeed($user = false, $count = false, $page = 1){\n if(!$user){\n $this->JACKED->Flock->requireLogin();\n $user = $this->JACKED->MySQL->sanitize($this->JACKED->Sessions->read('auth.Flock.userid'));\n }\n \n $pagination = $count? $this->JACKED->MySQL->paginator($count, $page ?: 1) : '';\n\n $query = 'SELECT id, user_id, poster_id, comment, datetime_posted\n FROM ' . $this->config->dbt_posts .\n ' WHERE user_id = ' . $user . '\n ORDER BY datetime_posted DESC\n ' . $pagination;\n\n $result = $this->JACKED->MySQL->query($query);\n $feed = $this->JACKED->MySQL->parseResult($result);\n if(count($feed) > 0 && !is_array($feed[0]))\n $feed = array(0 => $feed);\n foreach($feed as $key => $item){\n $feed[$key]['comments'] = $this->getComments($item['id']);\n }\n\n return $feed;\n }", "public function get() {\n\t\t$empty = array(array(\n\t\t\t'link' => '',\n\t\t\t'created_time' => '',\n\t\t\t'thumbnail_url' => '',\n\t\t\t'caption' => '',\n\t\t\t'username' => '',\n\t\t\t'full_name' => '',\n\t\t));\n\t\t$media = file_get_contents(\"http://instagram.com/{$this->username}/media\");\n\t\tif(strlen($media) < 1) return $empty;\n\n\t\t$json = json_decode($media);\n\t\tif(!isset($json->items) || count($json->items) == 0) return $empty;\n\n\t\t$results = array();\n\t\tforeach( $json->items as $item ) {\n\t\t\t$results[] = array(\n\t\t\t\t'link' => $item->link,\n\t\t\t\t'created_time' => $item->created_time,\n\t\t\t\t'thumbnail_url' => $item->images->standard_resolution->url,\n\t\t\t\t'caption' => isset( $item->caption->text ) ? $item->caption->text : '',\n\t\t\t\t'username' => $item->user->username,\n\t\t\t\t'full_name' => $item->user->full_name,\n\t\t\t);\n\t\t}\n\t\treturn $results;\n\t}", "public function feed(Request $request)\n {\n return $this->getItemsForUser($request);\n }", "public function feeds($limit = null)\n {\n return $this->process(ci()->comment_m->get_recent($limit));\n }", "function combineFeeds($size) {\n\n $feeds = array();\n\n //get all feeds\n $result = mysql_query(\"SELECT * FROM Feeds\") or die(mysql_error());\n \n //echo out feeds in database\n while($row = mysql_fetch_array( $result )) {\n $temparr = array(\"url\" => $row['Url'] , \"title\" => $row['Title']);\n array_push($feeds, $temparr);\n }\n \n $postarray = array();\n \n foreach ($feeds as $feed) {\n \n //load feed into xml element\n $rss = simplexml_load_file($feed[\"url\"]);\n \n //keep track of how many posts we've output so we can limit this\n $count = 0;\n \n if($rss) {\n \n //get items\n $items = $rss->channel->item;\n \n //go through each itme and output title and length of time since it was posted\n foreach($items as $item) {\n if ($count < $size) {\n $title = strip_tags($item->title);\n //$title = str_replace (\" \", \"%20\", $title);\n $link = strip_tags($item->link);\n $published_on = strip_tags($item->pubDate);\n $published_on = date('Y-m-d H:i:s', strtotime($published_on));\n //$d = countTime($published_on);\n $temparr = array(\"posttitle\" => $title, \"postlink\" => $link, \"date\" => $published_on, \"via\" => $feed[\"title\"]);\n array_push($postarray,$temparr);\n $count++;\n }\n }\n }\n \n }\n \n usort($postarray, 'sortbydate');\n $count = 0;\n \n foreach ($postarray as $post) {\n if($count < $size) {\n $d = countTime($post[\"date\"]);\n $link = str_replace (\" \", \"%20\", $post[\"postlink\"]);\n echo '<li><a href=\"'. $link . '\">' . $post[\"posttitle\"] . '</a> <div class=\"date\">' . $d . ' via ' . $post[\"via\"] .'</div>' . '</li>';\n $count++;\n }\n }\n //print_r($postarray);\n }", "public function getRSSFeed($url){\n\n $filename = $url;\n $items = array();\n $i = 0;\n $xmlReader = new XMLReader();\n $xmlReader->open ($filename, null, LIBXML_NOBLANKS);\n\n $isParserActive = false;\n $simpleNodeTypes = array (\"title\", \"description\", \"link\", \"pubDate\");\n\n while ($xmlReader->read ())\n {\n $nodeType = $xmlReader->nodeType;\n\n // Only deal with Beginning/Ending Tags\n if ($nodeType != XMLReader::ELEMENT && $nodeType != XMLReader::END_ELEMENT)\n {\n continue;\n }\n else if ($xmlReader->name == \"item\")\n {\n if (($nodeType == XMLReader::END_ELEMENT) && $isParserActive)\n {\n $i++;\n }\n $isParserActive = ($nodeType != XMLReader::END_ELEMENT);\n }\n\n if (!$isParserActive || $nodeType == XMLReader::END_ELEMENT)\n {\n continue;\n }\n\n $name = $xmlReader->name;\n\n if (in_array ($name, $simpleNodeTypes))\n {\n // Skip to the text node\n $xmlReader->read ();\n $items[$i][$name] = $xmlReader->value;\n }\n else if ($name == \"media:thumbnail\")\n {\n $items[$i]['media:thumbnail'] = array (\n \"url\" => $xmlReader->getAttribute(\"url\"),\n \"width\" => $xmlReader->getAttribute(\"width\"),\n \"height\" => $xmlReader->getAttribute(\"height\")\n );\n }\n }\n\n /*\n $rss = new \\DOMDocument();\n $rss->load($filename);\n\n foreach ($rss->getElementsByTagName('item') as $node) {\n $item = array (\n 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,\n 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,\n 'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,\n 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,\n );\n array_push($feed, $item);\n }*/\n\n return $items;\n }", "private function make($limit){\n $feeds=new Collection;\n foreach($this->fetch($limit) as $comicpic){\n $feed=new Feed($comicpic->title,$comicpic->description,'Comicpic');\n $feed->sourceUrl='/comicpic/index';\n $feed->url=('/comicpic/show/'.$comicpic->id);\n $feed->image=Storage::disk('public')->url($comicpic->medias[0]->getFullName());\n $feed->afterHtml='<a class=\"text-muted\" href=\"'. $feed->sourceUrl.'\">see more <i class=\"fas fa-angle-right\"></i></a>';\n $feed->beforeHtml='<a class=\"text-muted\" href=\"'. $feed->sourceUrl.'\">see more <i class=\"fas fa-angle-right\"></i></a>';\n $feeds->push($feed);\n }\n return $feeds->all();\n}", "public function actionGetFeed() {\n $city = isset($_GET['city']) && $_GET['city'] != null ? $_GET['city'] : null;\n $pageSize = isset($_GET['size']) && $_GET['size'] != null ? $_GET['size'] : null;\n $page = isset($_GET['page']) && $_GET['page'] != null ? $_GET['page'] : null;\n $request = Yii::$app->request->isAjax;\n if($request){\n $limit = Yii::$app->params['LimitObjectFeedGlobal'];\n\n $top_post = Post::GetTopPostUserJoinGlobal($limit, $city);\n $top_topic = Topic::GetTopTopicGlobal($limit, $city);\n $top_city = City::GetTopCityUserJoinGlobal($limit, $city);\n\n $htf = new HistoryFeed();\n $query_feed = $htf->find()->where('city_id = '. $city)->orderBy(['created_at'=> SORT_DESC]);\n $countQuery = clone $query_feed;\n $pages = new Pagination(['totalCount' => $countQuery->count(),'pageSize'=>$pageSize,'page'=> $page - 1]);\n $data_feed = $query_feed->offset($pages->offset)\n ->limit($pages->limit)\n ->all();\n $feeds =[];\n foreach ($data_feed as $key => $value) {\n if ($value->type_item == 'post') {\n $num_date = UtilitiesFunc::FormatDateTime($value->created_at);\n $url_avatar = User::GetUrlAvatar($value->item->user->id,$value->item->user->profile->photo);\n $item = [\n 'id' => $value->item->id,\n 'title'=> $value->item->title,\n 'content'=> $value->item->content,\n 'topic_id' => $value->item->topic_id,\n 'photo' => $url_avatar,\n 'city_id'=> $value->item->topic->city_id,\n 'city_name'=> $value->item->topic->city->name,\n 'created_at' => $value->created_at,\n 'appear_day' => $num_date,\n 'posted_by' => $value->item->user['profile']['first_name'].\" \". $value->item->user['profile']['last_name'],\n 'is_post' => 1\n ];\n } else {\n $num_date = UtilitiesFunc::FormatDateTime($value->created_at);\n $item = [\n 'id' => $value->item->id,\n 'title'=> $value->item->title,\n 'city_id'=> $value->item->city_id,\n 'city_name'=> $value->item->city->name,\n 'created_at' => $value->created_at,\n 'appear_day' => $num_date,\n 'created_by' => $value->item->user['profile']['first_name'].\" \".$value->item->user['profile']['last_name'],\n 'is_post' => 0\n ];\n }\n array_push($feeds, $item);\n }\n\n $item = [\n 'top_post'=> $top_post,\n 'top_topic'=> $top_topic,\n 'feed' => $feeds\n ];\n\n $hash = json_encode($item);\n return $hash;\n }\n }", "public function getAll()\n {\n try {\n $social_medias = $this->db->getAll($this->table, $this->columns);\n return $social_medias;\n } catch(\\Exception $exception) {\n throw $exception;\n }\n }", "public function pullFeed(){\n $pullFeed['surl'] = $this->getBaseUrl().'index.php/expertrec-feed/api/pullFeed';\n $pullFeed['secret'] = $this->getSecret();\n $pullFeed['link'] = $this->getBaseUrl().'index.php/expertrec-feed/api/pullFeed?secret='.$this->getSecret();\n return $pullFeed;\n }", "public function getFeed()\n {\n $demo = env('DEMO', false);\n $backend = env('BACKEND_LOCATION');\n\n if($demo) { // return early with a demo JSON file\n return json_decode(file_get_contents('../resources/assets/camera.json'));\n }\n\n $client = new Client(); //GuzzleHttp\\Client\n $response = $client->get(\n $backend.'/zm/api/monitors.json', \n [\n //'auth' => ['user', 'pass']\n ]\n );\n if($response->getStatusCode() === 200) {\n $body = $response->getBody();\n return json_decode($body);\n }\n\n return [];\n }", "public function returnFeedInfo()\n\t{\n\t\treturn array(\n\t\t\t\t\t'key'\t\t\t=> 'blogs',\n\t\t\t\t\t'app'\t\t\t=> 'blog',\n\t\t\t\t\t'name'\t\t\t=> $this->lang->words['feed_name__blogs'],\n\t\t\t\t\t'description'\t=> $this->lang->words['feed_description__blogs'],\n\t\t\t\t\t'hasFilters'\t=> true,\n\t\t\t\t\t'templateBit'\t=> 'feed__generic',\n\t\t\t\t\t'inactiveSteps'\t=> array( ),\n\t\t\t\t\t);\n\t}", "protected function loadFeedData() {\n $feeds = $this->getModuleSections('feeds');\n foreach ($feeds as $index=>&$feedData) {\n $feedData['INDEX'] = $index;\n }\n reset($feeds);\n return $feeds;\n }", "public function fetch()\n {\n $feeds = \\ORM::for_table('feeds')->find_array();\n\n foreach ($feeds as $feed) {\n $parserName = '\\\\FeedAPI\\\\Parsers\\\\' . $feed['feed_type'];\n $parser = new $parserName();\n\n try {\n $items = $parser->parseLink($feed['url']);\n \\FeedAPI\\Data::addToDatabase($items, true);\n } catch(\\Exception $e) {\n $this->error(\"An error occured, while fetching \\\"{$feed['title']}\\\" feed data: \" . $e->getMessage(), false, false);\n }\n }\n }", "function feed_facebook($fanpage = 'nikefutebol', $limit = 2, $offset = 0) {\n\t//$feed = fetchUrl(\"https://graph.facebook.com/{$fanpage}/posts?fields=status_type,picture,message,link&limit={$limit}&offset={$offset}&access_token=396646610471255|rIw3iyPeaaB8cAsDmoOxdsXOPQM\");\n\t$tokenFacebook = '185963128571419|cfb9b355f53906512c7a156ced9cce60';\n\t// Token localhost\n\t//$tokenFacebook = 'EAACpIeo4RhsBAB91f8t3NhTIxdxQvwxvbVKvVDGTRLcTz77sDZCWCeQMw3dsgJVhcDA6xO6ZCnzQe2HXIQ1XOjJwwekKka9CijEh78vXKz1Sza2cZAe5GAHrbzKVAweyzZAZC562bjLmHxPhTBLHKBfBfT0VeOH6SZCc0ldCQRwO8EZCJRl5DRKnnc2MZAH3yZBMZD';\n\t//$feed = $this->_fetchUrl(\"https://graph.facebook.com/{$fanpage}/posts?limit={$limit}&offset={$offset}&access_token=\" . $tokenFacebook);\n\n\t$feed = fetchUrl(\"https://graph.facebook.com/{$fanpage}/?fields=posts.limit({$limit}).offset({$offset}){type,full_picture,link,permalink_url,caption,name,description,message,created_time}&access_token=\" . $tokenFacebook);\n\n\t//$feed = fetchUrl(\"https://graph.facebook.com/{$fanpage}/posts?limit=15&access_token=396646610471255|rIw3iyPeaaB8cAsDmoOxdsXOPQM\");\n\t$fbfeed = json_decode($feed);\n\t$posts = array();\n// $i = 0;\n\tforeach($fbfeed->posts->data as $post){\n\t\tif($post->type == 'photo'){\n\t\t\t//$post->thumbnail = $post->full_picture;//\"https://graph.facebook.com/{$post->object_id}/picture?type=normal&amp;width=750&amp;height=537\";\n\t\t\tarray_push($posts, $post);\n// $i++;\n\t\t\t/*\n\t\t\t//exibe apenas update de fotos\n\t\t\t?>\n\t\t\t<div class=\"col-md-6 th-item\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-xs-4 col-sm-3 col-md-3\">\n\t\t\t\t\t\t<a href=\"<?php echo $post->link ?>\" target=\"_blank\">\n\t\t\t\t\t\t\t<img src=\"<?php echo $post->picture ?>\" class=\"img-circle fxall img-responsive\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"col-xs-8 col-sm-9 col-md-9 th-comment\">\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<?php echo $post->message ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<a href=\"<?php echo $post->link ?>\" class=\"btn btn-success\" target=\"_blank\">ver no facebook</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\t*/\n\t\t}\n// if($i == $limit)\n// break;\n\t}\n\treturn $posts;\n}", "public function getFacebookPosts(Request $request) {\n $group_id = \"1722428574572165\"; // TODO: from request\n $facebook = new Facebook();\n $posts_raw = $facebook->getPostsFromGroup($group_id);\n\n $posts = [];\n foreach($posts_raw['data'] as $post_data) {\n\n if(isset($post_data['comments'])) {\n $post = $facebook->parsePost($post_data['id'], $post_data['message'], $post_data['comments']['data']);\n } else {\n $post = $facebook->parsePost($post_data['id'], $post_data['message']);\n }\n\n if($post) {\n $posts[] = $post;\n }\n\n }\n\n $this->storeFacebookPosts($posts);\n }", "public function getFeedsByUser($request, $response)\n {\n $feeds = [];\n \n try {\n $rows = $this->container['db']\n ->table('feed')\n ->select(['feed.id','feed.url_id', 'url.url', 'url.title'])\n ->join('url', 'url.id', '=', 'feed.url_id')\n ->where([ 'feed.user_id' => $request->getAttribute('idUser') ])\n ->get();\n \n foreach ($rows as $key => $new) {\n $feeds[$key]['id'] = $new->id;\n $feeds[$key]['url_id'] = $new->url_id;\n $feeds[$key]['url'] = $new->url;\n $feeds[$key]['title'] = $new->title; \n }\n } catch (Exception $ex) {\n return $response->withJson('Error' , 500);\n }\n \n return $response->withJson($feeds, 200);\n }", "function ncn_chatter_get_company_feed_posts($company_fid, $params) {\n // Company + AR + Claim\n $follow_fids = ncn_chatter_get_follow_fid_from_tree($company_fid);\n // Member + Sub User\n $user_fids = ncn_chatter_get_company_users_fid($company_fid);\n\n ////\n $follow_fids = array_merge($follow_fids, $user_fids);\n $posts = ncn_chatter_get_posts_in_feeds($follow_fids, $params);\n\n return $posts;\n}", "public function newsfeed()\n {\n\n $followedUsers = \\Auth()->user()->followedUsers;\n\n $userprofileidofleaders = [];\n\n foreach($followedUsers as $users){\n $userprofileidofleaders[] = $users->userprofile->id;\n }\n\n $allfeeds = collect([]);\n\n for($i=0; $i<sizeof($userprofileidofleaders); $i++){\n\n $postfromleader = Post::with(['userprofile.user', 'reaction'])->where('userprofile_id', $userprofileidofleaders[$i])->get();\n\n $allfeeds = $allfeeds->merge($postfromleader);\n }\n\n $postedbyuser = Post::with(['userprofile.user', 'reaction'])->where('userprofile_id', \\Auth::user()->userprofile->id)->get();\n\n $allfeeds = $allfeeds->merge($postedbyuser);\n\n $data['allfeeds'] = $allfeeds;\n \n $data['destinations'] = \\App\\Models\\Destination::orderBy('created_at', 'DESC')->published()->get();\n\n $Rdestination = $this->recommendPlaces();\n\n return view('front.home.newsfeed', $data)->with('Rdestination', $Rdestination);\n }" ]
[ "0.7566835", "0.7546637", "0.73134786", "0.71517694", "0.7103152", "0.7043407", "0.69479185", "0.69311357", "0.68839794", "0.6873913", "0.6836128", "0.6829705", "0.6755717", "0.6751424", "0.67438304", "0.673205", "0.67287403", "0.6711638", "0.6687908", "0.6650157", "0.6648002", "0.6612392", "0.6598277", "0.6590227", "0.6531421", "0.6527829", "0.646937", "0.6457685", "0.6453966", "0.6444394", "0.64097047", "0.64065653", "0.6405078", "0.63996214", "0.6393072", "0.6392257", "0.63750273", "0.6374746", "0.6363426", "0.6359791", "0.6335079", "0.6321317", "0.6306569", "0.6294624", "0.62726456", "0.625774", "0.6255971", "0.6250425", "0.62103796", "0.62093824", "0.61885506", "0.6187777", "0.6185554", "0.61835325", "0.61704284", "0.61630625", "0.6161252", "0.614564", "0.6127306", "0.61264896", "0.61244744", "0.61193746", "0.61167324", "0.6112096", "0.6107693", "0.6096266", "0.6096266", "0.609169", "0.6075285", "0.6067862", "0.6060372", "0.6041936", "0.6031994", "0.60251725", "0.5993853", "0.598193", "0.59733003", "0.5972955", "0.5969636", "0.59564924", "0.59305084", "0.5925894", "0.59195507", "0.59180206", "0.5913763", "0.5912614", "0.5905713", "0.59018904", "0.58972514", "0.58877414", "0.5870444", "0.58664197", "0.58645445", "0.5862961", "0.58596617", "0.5835113", "0.58292484", "0.5825829", "0.58245426", "0.5819162" ]
0.78594154
0
Get a social media message depending on platform.
Получить сообщение для социальной сети в зависимости от платформы.
public function get_social_media_message( int $post_id, string $platform ) : string { $message = $this->get_social_media_message_raw( $post_id, $platform ); $message = $this->filter_social_media_message( $message, $post_id, $platform ); // Sanitize the message. return $this->sanitize_social_media_message( $message ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_message();", "public function get_message();", "public static function android()\n {\n return new Message(self::TYPE_ANDROID);\n }", "public function getUserMessage();", "public function getUserMessage();", "protected function get_message() {\n\n\t\t\t$message = $this->message;\n\t\t\t$link = $this->get_review_link_tag();\n\t\t\t$message = $message . ' ' . $link;\n\n\t\t\treturn wp_kses_post( $message );\n\n\t\t}", "public function getMessage(): ?string\n {\n return $this->message;\n }", "public function getMessage(): ?string\n {\n return $this->message;\n }", "public function getMessage(): ?string\n {\n return $this->message;\n }", "public function getCustomPrivacyMessage()\n {\n if (array_key_exists(\"customPrivacyMessage\", $this->_propDict)) {\n return $this->_propDict[\"customPrivacyMessage\"];\n } else {\n return null;\n }\n }", "public function getMessage()\n {\n $messages = $this->session->has('flashMessages') ? $this->session->get('flashMessages') : null;\n \n if(!empty($messages)){\n $html = \"\";\n foreach($messages as $msg){\n // match type with class\n $type = $msg['type'];\n $class = $this->class[$type];\n $message = $msg['message'];\n $html .= \"<div class='$class'><p>$message</p></div>\";\n }\n // unset session variable\n unset($_SESSION['flashMessages']);\n return $html;\n }\n else{\n return null;\n }\n }", "public function getMessage(): ?string\n {\n return $this->data['Message'];\n }", "public function getTelegramMessage(): string;", "public function get_social_media_platforms() {\n\t\treturn $this->social_media_platforms;\n\t}", "public function getMessage() {\n if (!is_string($this->code) || !array_key_exists($this->code, PelecardPaymentStatus::MESSAGES)) {\n // invalid status code provided, should be string value\n return null;\n }\n\n $outputMessage = null;\n $outputLocale = 'HE';\n $messageHe = PelecardPaymentStatus::MESSAGES[$this->code]['HE'];\n $messageEn = PelecardPaymentStatus::MESSAGES[$this->code]['EN'];\n if (is_string($this->locale) && in_array(strtoupper($this->locale), ['HE', 'EN'], true)) {\n $outputLocale = strtoupper($this->locale);\n }\n\n switch ($outputLocale) {\n case 'HE':\n // return hebrew when exists, otherwise english\n if (!empty($messageHe)) {\n $outputMessage = $messageHe;\n } elseif (!empty($messageEn)) {\n $outputMessage = $messageEn;\n }\n break;\n case 'EN':\n // return english when exists\n if (!empty($messageEn)) {\n $outputMessage = $messageEn;\n }\n break;\n default:\n // invalid locale provided, return null\n $outputMessage = null;\n }\n\n return $outputMessage;\n }", "public function get_message() {\n return \"Get News Feed test\";\n }", "public function get_user_message() {\n\n\t\t$allowed_user_error_message_codes = array(\n\t\t\t'10445',\n\t\t\t'10474',\n\t\t\t'12126',\n\t\t\t'13113',\n\t\t\t'13122',\n\t\t\t'13112',\n\t\t);\n\n\t\treturn in_array( $this->get_api_error_code(), $allowed_user_error_message_codes ) ? $this->get_api_error_message() : null;\n\t}", "public function getMessage(): ?string\n {\n if (!$this->isSuccessful() && isset($this->data['message'])) {\n return $this->data['message'];\n }\n return null;\n }", "public function message()\n {\n return Lang::get('validation.custom.twitter_handle');\n }", "function message()\n {\n return Message::getInstance();\n }", "public function getMessage()\n {\n if (array_key_exists('message', $this->_data)) { return $this->_data['message']; }\n return NULL;\n }", "public function getMessage(): ?string;", "function get_message() {\n return $this->message;\n }", "public function getMessage() : ?string \n {\n if ( ! $this->hasMessage()) {\n $this->setMessage($this->getDefaultMessage());\n }\n return $this->message;\n }", "public static function getMessageKind()\r\n {\r\n return (!isset($_SESSION['wcmAction'])) ? null: getArrayParameter($_SESSION['wcmAction'], 'messageKind', 0);\r\n }", "public function getContent($message): ?string;", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessage();", "public function getMessageId () :string\n {\n if ($this->getUpdateType () == 'edited_message'){\n $message_id = $this->content ['edited_message']['message_id'];\n }\n if ($this->getUpdateType () == 'channel_post'){\n $message_id = $this->content ['channel_post']['message_id'];\n }\n if ($this->getUpdateType () == 'edited_channel_post'){\n $message_id = $this->content ['edited_channel_post']['message_id'];\n }\n if ($this->getUpdateType () == 'callback_query'){\n $message_id = $this->content ['callback_query']['message']['message_id'];\n }\n return $message_id ?? $this->content ['message']['message_id'];\n }", "public function getMessage()\n\t{\n\t\treturn wp_remote_retrieve_response_message(\n\t\t\t$this->response\n\t\t);\n\t}", "function get_message() {\n if ($_SESSION['message']) {\n foreach ($_SESSION['message'] as $type => $messages) {\n $message .= $this->create_message(implode('<br>', $messages), $type);\n }\n $_SESSION['message'] = null;\n }\n\n return $message;\n }", "public function getMessage()\r\n {\r\n if (!$this->locator->has('message')) {\r\n $this->locator->set('message', '\\yii\\twocheckout\\TwoCheckoutMessage');\r\n }\r\n return $this->locator->get('message');\r\n }", "function socialMessageGet($opt=array()){\n\n\tif($opt['debug']) $this->pre(\"[OPT]\", $opt);\n\n\t# Gerer les options\n\t#\n\n\t$dbMode\t= 'dbMulti';\n\t$sel[] \t= 'k_socialmessage.*';\n\t\n\t// GET id_socialmessage\n\tif(array_key_exists('id_socialmessage', $opt)){\n\n\t\tif(is_array($opt['id_socialmessage']) && sizeof($opt['id_socialmessage']) > 0){\n\t\t\t$cond[] = \"k_socialmessage.id_socialmessage IN(\".implode(', ', $opt['id_socialmessage']).\")\";\n\t\t\t\n\t\t\tif(!array_key_exists('order', $opt) && !array_key_exists('direction', $opt)){\n\t\t\t\t$opt['order']\t\t= \"FIND_IN_SET(k_socialmessage.id_socialmessage, '\".implode(', ', $opt['id_socialmessage']).\"')\";\n\t\t\t\t$opt['direction']\t= \"DESC\";\n\t\t\t\t\n\t\t\t}\n\t\t}else\n\t\tif(intval($opt['id_socialmessage']) > 0){\n\t\t\t$dbMode = 'dbOne';\n\t\t\t$cond[] = \"k_socialmessage.id_socialmessage=\".$opt['id_socialmessage'];\n\t\t}else{\n\t\t\tif($opt['debug']) $this->pre(\"ERROR: ID_SOCIALMESSAGE (NUMERIC, ARRAY)\", \"GIVEN\", var_export($opt['id_socialmessage'], true));\n\t\t\treturn array();\n\t\t}\n\n\t}\n\n\t// GET mid_socialmessage\n\tif(array_key_exists('mid_socialmessage', $opt)){\n\n\t\tif(intval($opt['mid_socialmessage']) > 0){\n\t\t\t$cond[] = \"k_socialmessage.mid_socialmessage=\".$opt['mid_socialmessage'];\n\t\t}else{\n\t\t\tif($opt['debug']) $this->pre(\"ERROR: MID_SOCIALMESSAGE (NUMERIC > 0)\", \"GIVEN\", var_export($opt['id_socialmessage'], true));\n\t\t\treturn array();\n\t\t}\n\n\t}\n\n\t// GET: is_read\n\tif(array_key_exists('is_read', $opt)){\n\t\tif(is_bool($opt['is_read'])){\n\t\t\t$cond[] = \"is_read = \".(($opt['is_read']) ? 1 : 0);\n\t\t}else{\n\t\t\tif($opt['debug']) $this->pre(\"ERROR: is_read (BOOLEAN)\", \"GIVEN\", var_export($opt['is_read'], true));\n\t\t\treturn array();\n\t\t}\t\n\t}\n\n\n\t// GET id_user\t\n\tif($opt['id_user'] > 0){\n\n\t\t$noID = $opt['id_user'];\n\n\t\tif($opt['writer']){\n\t\t\t$cond[] = \"k_socialmessage.id_user=\".$opt['id_user'];\n\t\t\t$cond[] = \"k_socialmessage.mid_socialmessage=0\";\n\t\t}else\n\t\tif($opt['reader']){\n\t\t\t$cond[] = \"k_socialmessageuser.id_user=\".$opt['id_user'];\n\t\t\t$join[] = \"INNER JOIN k_socialmessageuser ON k_socialmessage.id_socialmessage = k_socialmessageuser.id_socialmessage\";\n\t\t\t$sel[] = \"k_socialmessageuser.is_read\";\n\t\t}else{\n\t\t\t$cond[] = \"k_socialmessage.id_user=\".$opt['id_user'];\n\t\t}\n\t}\n\n\n\t# Former les CONDITIONS\n\t#\t\t\n\tif(sizeof($cond) > 0) \t$where\t= \"WHERE \".implode(\" AND \", $cond);\n\tif(sizeof($join) > 0) \t$join\t= \"\\n\".implode(\"\\n\", $join).\"\\n\";\n\t\t\t\t\t\t\t$select\t= implode(', ', $sel);\n\n\t# Former les LIMITATIONS et ORDRE\n\t#\n\tif($dbMode == 'dbMulti'){\n\t\t$order = ($opt['order'] != '' && $opt['direction'] != '')\n\t\t\t? $opt['order'].\" \".$opt['direction']\n\t\t\t: \"k_socialmessage.id_socialmessage DESC\";\n\n\t\t$order = \"\\nORDER BY \".$order;\n\n\t\tif($opt['offset'] != '' && $opt['limit']) $limit = \"\\nLIMIT \".$opt['offset'].\",\".$opt['limit'];\n\t}else{\n\t\t$flip = true;\n\t}\n\n\n\t# MESSAGE\n\t#\n\t$messages\t\t= $this->$dbMode(\"SELECT SQL_CALC_FOUND_ROWS \".$select.\" FROM k_socialmessage\\n\" . $join . $where . $order . $limit);\n\t$this->total\t= $this->db_num_total;\n\n\tif($opt['debug']) $this->pre($this->db_query, $this->db_error, $messages);\n\n\tif(sizeof($messages) > 0){\n\t\tif($flip) $messages = array($messages);\n\n\t\t# JSON\n\t\t#\t\t\n\t\tforeach($messages as $n => $e){\n\t\t\t$messages[$n]['socialMessageFlat']\t\t= ($e['socialMessageFlat'] != '')\t\t? json_decode($e['socialMessageFlat'], true)\t\t: array();\n\t\t\t$messages[$n]['socialMessageThread']\t= ($e['socialMessageThread'] != '')\t\t? json_decode($e['socialMessageThread'], true)\t\t: array();\n\t\t\t$messages[$n]['socialMessageOpenGraph']\t= ($e['socialMessageOpenGraph'] != '')\t? json_decode($e['socialMessageOpenGraph'], true)\t: array();\n\t\t\t$messages[$n]['socialMessageRecipient']\t= ($e['socialMessageRecipient'] != '')\t? json_decode($e['socialMessageRecipient'], true)\t: array();\n\t\t}\n\n\t\t# WITH USER\n\t\tif($opt['withAuthor']){\n\t\t\tforeach($messages as $n => $e){\n\t\t\t\t$id_users[] = $e['id_user'];\n\t\t\t\t$messages[$n]['user'] = NULL;\n\t\t\t}\n\t\t\tif(sizeof($id_users) > 0){\n\t\t\t\t$users = $this->apiLoad('user')->userGet(array(\n\t\t\t\t\t'id_user'\t=> $id_users,\n\t\t\t\t\t'useMedia'\t=> true\n\t\t\t\t));\n\t\t\t\tforeach($users as $u){\n\t\t\t\t\t$uids[$u['id_user']] = $u;\n\t\t\t\t}\n\t\t\t\tforeach($messages as $n => $e){\n\t\t\t\t\t$messages[$n]['author'] = $uids[$e['id_user']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t# RECIPIENT\n\t\tif($opt['withRecipient'] == true){\n\t\t\tforeach($messages as $n => $e){\n\t\t\t\tif(sizeof($e['socialMessageRecipient']) > 0){\n\t\t\t\t\t$users = $this->apiLoad('user')->userGet(array(\n\t\t\t\t\t\t'debug'\t\t=> false,\n\t\t\t\t\t\t'id_user'\t=> $e['socialMessageRecipient'],\n\t\t\t\t\t\t'useMedia'\t=> true,\n\t\t\t\t\t\t'useField'\t=> true,\n\t\t\t\t\t));\n\n\t\t\t\t\t$messages[$n]['socialMessageRecipient'] = $users;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t# MEDIA TRANSLATION\n\t\tif($opt['human']){\n\t\t\tforeach($messages as $n => $m){\n\t\t\t\t$messageMedia = json_decode(stripslashes($p['socialMessageMedia']), true);\n\t\t\t\tif(sizeof($messageMedia) > 0){\n\t\t\t\t\tforeach($messageMedia as $e){\n\t\t\t\t\t\t$media[$e['type']][] = $this->mediaInfos($e['url']);\n\t\t\t\t\t}\n\t\t\t\t\t$messages[$n]['socialPostMedia'] = $media;\n\t\t\t\t}else{\n\t\t\t\t\t$messages[$n]['socialPostMedia'] = array();\n\t\t\t\t}\n\t\t\t\tunset($media);\n\t\t\t}\t\t\n\t\t}\n\n\t\tif($flip) $messages = $messages[0];\n\t}\n\n\treturn $messages;\n}", "public static function getMessage()\r\n {\r\n return (!isset($_SESSION['wcmAction'])) ? null : getArrayParameter($_SESSION['wcmAction'], 'message', null);\r\n }", "public function getMessage()\n {\n $value = $this->get(self::message);\n return $value === null ? (string)$value : $value;\n }", "protected function getSessionMessage(&$messageType = null)\n {\n $session = $this->getRequest()->getSession();\n $message = $session->get('Security.Message.message');\n $messageType = null;\n if (empty($message)) {\n return null;\n }\n\n $messageType = $session->get('Security.Message.type');\n $messageCast = $session->get('Security.Message.cast');\n if ($messageCast !== ValidationResult::CAST_HTML) {\n $message = Convert::raw2xml($message);\n }\n\n return sprintf('<p class=\"message %s\">%s</p>', Convert::raw2att($messageType), $message);\n }", "public function getDefaultMessage(): ?string;", "public function message()\n {\n return $this->message ?? '利用できる曜日で入力してください。';\n }", "public function get_privacy_message()\n {\n }", "public function getMessage(): ?string\n {\n return $this->data['MsgDescricao'];\n }", "public function get_privacy_message()\n {\n }", "public function getMessage(): string;", "public function getMessage(): string;", "public function getMessage(): string;", "public function getMessage(): string;", "public function getMessage(): string;", "public function getMessage(): string;", "public function getMessage(): string;", "public function getMessage(): string;", "public function getMessage(): string;", "public function getMessage(): string\n {\n return $this->message;\n }", "public function getMessage(): string\n {\n return $this->message;\n }", "public function getMessage(): string\n {\n return $this->message;\n }", "public function getMessage(): string\n {\n return $this->message;\n }", "public function getMessage()\n {\n return isset($this->Message) ? $this->Message : null;\n }", "public function getMessage()\n {\n return isset($this->Message) ? $this->Message : null;\n }", "public function getMessage()\n {\n return isset($this->Message) ? $this->Message : null;\n }", "public function getMessage()\n {\n return isset($this->Message) ? $this->Message : null;\n }", "function getMessage(): string;", "public function getPlatform();", "public function getPlatform();", "public function getPlatform();", "public function smuCheck($body)\n {\n $domainrobotPromise = $this->smuCheckAsync($body);\n $domainrobotResult = $domainrobotPromise->wait();\n\n Domainrobot::setLastDomainrobotResult($domainrobotResult);\n\n return new SocialMedia(ArrayHelper::getValueFromArray($domainrobotResult->getResult(), 'data.0', NULL));\n }", "public function getMessageProvider()\n {\n return $this->provider;\n }", "public function get_message() {\n return $this->message;\n }", "public function getMessage(): string\n {\n return $this->_message;\n }", "public function getMessage() {\n return $this->message;\n }", "public function getUserMessage()\n\t{\n\t\tswitch ( $this->getCode() )\n\t\t{\n\t\t\tcase static::USER_INVALID:\n\t\t\tcase static::PHONE_NUMBER_INVALID:\n\t\t\t\treturn 'authy_mfa_invalid_number';\n\t\t\t\t\n\t\t\tcase static::TOKEN_REUSED:\n\t\t\t\treturn 'authy_mfa_reused_code';\n\t\t\t\t\n\t\t\tcase static::TOKEN_INVALID:\n\t\t\t\treturn 'authy_mfa_invalid_code';\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\treturn 'authy_generic_error';\n\t\t}\n\t}", "private function processNaturalLanguageIntent(string $intentMessage) : ?string\n {\n return null;\n }", "protected function get_error_message($message = null) {\n global $OUTPUT;\n\n if (empty($message)) {\n $message = get_string('apierror', 'block_tag_youtube');\n }\n return $OUTPUT->notification($message);\n }", "public function getMessage()\n {\n return ($this->message === null) ? '' : $this->message;\n }", "public function getMessage(){\n\t\t$message = $this->message ? $this->message : '';\n\t\treturn $message;\n\t}", "public function getSingleMessage() : stdClass\n {\n $this->json('GET', '/api/messages');\n $response = json_decode($this->response->content());\n $this->assertGreaterThan(0, sizeof($response));\n return $response[0];\n\n }", "public function getMessage() {}" ]
[ "0.5854448", "0.5854448", "0.57353693", "0.5672314", "0.5672314", "0.5649747", "0.5504957", "0.5504957", "0.5504957", "0.55039656", "0.5494844", "0.5468244", "0.5459595", "0.5455938", "0.5397317", "0.539074", "0.5381438", "0.5344956", "0.53449047", "0.5324441", "0.53204036", "0.5310329", "0.5298976", "0.52611166", "0.5260705", "0.5239927", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.523951", "0.5229411", "0.52255523", "0.52145994", "0.52140045", "0.5204083", "0.51989514", "0.5195125", "0.51841867", "0.51821005", "0.51797426", "0.5179387", "0.5178272", "0.5177918", "0.5167384", "0.5167384", "0.5167384", "0.5167384", "0.5167384", "0.5167384", "0.5167384", "0.5167384", "0.5167384", "0.5163015", "0.5163015", "0.5163015", "0.5163015", "0.51616037", "0.51616037", "0.51616037", "0.51616037", "0.5157857", "0.50980777", "0.50980777", "0.50980777", "0.50942165", "0.5092057", "0.50861907", "0.5085732", "0.5083321", "0.5082302", "0.50798804", "0.5078681", "0.50603133", "0.5060209", "0.50590545", "0.5058622" ]
0.70718855
0
Return the user capability string to manage social media.
Верните строку пользовательских возможностей для управления социальными сетями.
public function get_user_cap_manage_string() { return $this->user_cap_manage_social_media; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_cap_share_string() {\n\t\treturn self::USER_CAP_SOCIAL_SHARE;\n\t}", "public function get_capability() : string;", "public function get_capability() : string {\n return 'manage_options';\n }", "function metaslider_permissions($capability) {\n $capability = 'administrator';\n return $capability;\n}", "function capability() {\n\t\tif ( isset( $this->settings['access_cap'] ) )\n\t\t\treturn $this->settings['access_cap'];\n\t\telse\n\t\t\treturn apply_filters( 'rda_default_access_cap', 'manage_options' );\n\t}", "function wphb_get_admin_capability() {\r\n\t$cap = 'manage_options';\r\n\tif ( is_multisite() && is_network_admin() ) {\r\n\t\t$cap = 'manage_network';\r\n\t}\r\n\r\n\treturn apply_filters( 'wphb_admin_capability', $cap );\r\n}", "function current_user_can($capability)\n{\n}", "public function __toString() {\n\t\t// translators: Basic name of the plugin\n\t\treturn sprintf( __( '%s: Social Media', 'wpcampus-social' ), 'WPCampus' );\n\t}", "function wporg_simple_role_caps()\n{\n $role = get_role('editor_galeria');\n \n // add a new capability\n $role->add_cap('ascom_galeria', true);\n}", "public function getPermissionString() : string\n\t{\n\t\t$permissionString = [];\n\t\t\n\t\t/** @var Module[] $modules */\n\t\t$modules = $this->getAllowedModules();\n\t\t\n\t\tforeach ($modules as $module){\n\t\t\t$permissionNumber = $this->permissions[$module->id];\n\t\t\t$permissionString[] = ($module->slug ? : $module->name) . ':' . $permissionNumber;\n\t\t}\n\t\t\n\t\treturn implode(';', $permissionString);\n\t}", "static public function add_capability($capabilities) {\n $capabilities[self::capability] = __('Manage Facebook Tabs',ud_get_wpp_fbtabs()->domain);\n\n return $capabilities;\n }", "private static function user_caps(){\n\t\t$role = get_role( 'contributor' );\n\n\t\t$role->add_cap( 'upload_files' );\n\t}", "static public function add_capability($capabilities) {\n $capabilities[self::$capability_capability] = __('Manage Capabilities',ud_get_wpp_pt()->domain);\n $capabilities[self::$capability_white_label] = __('Manage White Label',ud_get_wpp_pt()->domain);\n return $capabilities;\n }", "public function supportedClaim(): string\n {\n return self::CLAIM_NAME;\n }", "function socialbridge_add_capabilities(){\n $roles = array('administrator', 'editor', 'socialbridge_logger');\n\n foreach ($roles as $the_role) {\n $role = get_role( $the_role );\n\n $role->add_cap( 'read' );\n $role->add_cap( 'edit_socialbridges' );\n $role->add_cap( 'publish_socialbridges' );\n $role->add_cap( 'edit_published_socialbridges' );\n }\n\n $manager_roles = array('administrator', 'editor');\n\n foreach ($manager_roles as $the_role) {\n $role = get_role( $the_role );\n $role->add_cap( 'read_private_socialbridges' );\n $role->add_cap( 'edit_others_socialbridges' ); \n $role->add_cap( 'edit_private_socialbridges' ); \n $role->add_cap( 'delete_socialbridges' );\n $role->add_cap( 'delete_published_socialbridges' );\n $role->add_cap( 'delete_private_socialbridges' );\n $role->add_cap( 'delete_others_socialbridges' ); \n }\n\n}", "function user_can($user, $capability)\n{\n}", "abstract public function getCapabilityName();", "function multi_device_switcher_page_capability( $capability ) {\n\treturn 'edit_theme_options';\n}", "public function getPermission(): string\n {\n // TODO: Implement getPermission() method.\n }", "function photoboard_notifications_option_page_capability( $capability ) {\n\t\treturn 'edit_theme_options';\n\t}", "function current_user_can_for_blog($blog_id, $capability)\n{\n}", "public function pluginDetails()\n {\n return [\n 'name' => 'Laravel Socialite',\n 'description' => 'Log in User with OAuth2',\n 'author' => 'Kakuki',\n 'icon' => 'icon-leaf',\n ];\n }", "public static function add() {\n global $wp_roles;\n\n if (!current_user_can('ure_create_capabilities')) {\n return esc_html__('Insufficient permissions to work with User Role Editor','user-role-editor');\n }\n \n $mess = '';\n if (!isset($_POST['capability_id']) || empty($_POST['capability_id'])) {\n return 'Wrong Request';\n }\n \n $data = self::validate($_POST['capability_id']); \n if (!$data['result']) {\n return $data['message'];\n }\n \n $cap_id = $data['cap_id']; \n $lib = URE_Lib::get_instance();\n $lib->get_user_roles();\n $lib->init_full_capabilities();\n $full_capabilities = $lib->get('full_capabilities');\n if (!isset($full_capabilities[$cap_id])) {\n $admin_role = $lib->get_admin_role(); \n $wp_roles->use_db = true;\n $wp_roles->add_cap($admin_role, $cap_id);\n $mess = sprintf(esc_html__('Capability %s was added successfully', 'user-role-editor'), $cap_id);\n } else {\n $mess = sprintf(esc_html__('Capability %s exists already', 'user-role-editor'), $cap_id);\n }\n \n return $mess;\n }", "public function get_point_admin_capability() {\n\n\t\t\t// Need to have something or we are in deep trouble\n\t\t\tif ( ! isset( $this->caps['plugin'] ) || empty( $this->caps['plugin'] ) )\n\t\t\t\t$this->caps['plugin'] = 'edit_theme_options';\n\n\t\t\t// Try to prevent \"lockouts\" on Multisites where the delete_user cap is not available admins.\n\t\t\t// Try instead using \"export\" which should also be available for admins.\n\t\t\tif ( $this->is_multisite && $this->caps['plugin'] == 'delete_user' )\n\t\t\t\t$this->caps['plugin'] = 'edit_theme_options';\n\n\t\t\t// backwards cap.\n\t\t\t$capability = apply_filters( 'mycred_edit_plugin_cap', $this->caps['plugin'] );\n\n\t\t\treturn apply_filters( 'get_point_admin_capability', $capability, $this );\n\n\t\t}", "public function capability();", "protected static function get_permissions_name() {\n $strpermissions = array(\n CAP_INHERIT => get_string('inherit', 'role'),\n CAP_ALLOW => get_string('allow', 'role'),\n CAP_PREVENT => get_string('prevent', 'role'),\n CAP_PROHIBIT => get_string('prohibit', 'role')\n );\n return $strpermissions;\n }", "static function add_capability( $capabilities ) {\n\n $capabilities[ self::$capability ] = __( 'Manage Admin Tools', ud_get_wp_property()->domain );\n\n return $capabilities;\n }", "public function moderator_description() {\n\t\treturn apply_filters( 'bpbcm_moderator_description', 'Type the username of the moderator who will approve your blog registration.' );\n\t}", "function wporg_simple_role_caps() {\n $subscriber = get_role( 'subscriber' );\n \n // Add a new capability.\n\n $subscriber->add_cap( 'publish_projects', false );\n $subscriber->add_cap( 'edit_projects', true ); \n $subscriber->add_cap( 'edit_others_projects', false ); \n $subscriber->add_cap( 'delete_projects', false ); \n $subscriber->add_cap( 'delete_others_projects', false ); \n $subscriber->add_cap( 'read_private_projects', false ); \n $subscriber->add_cap( 'edit_project', true ); \n $subscriber->add_cap( 'delete_project', false ); \n $subscriber->add_cap( 'read_project', true ); \n $subscriber->add_cap( 'upload_files', true );\n $subscriber->add_cap( 'edit_published_projects', false );\n\n\n $subscriber = get_role( 'administrator' );\n \n // Add a new capability.\n\n $subscriber->add_cap( 'publish_projects', true );\n $subscriber->add_cap( 'edit_projects', true ); \n $subscriber->add_cap( 'edit_others_projects', true ); \n $subscriber->add_cap( 'delete_projects', true ); \n $subscriber->add_cap( 'delete_others_projects', true ); \n $subscriber->add_cap( 'read_private_projects', true ); \n $subscriber->add_cap( 'edit_project', true ); \n $subscriber->add_cap( 'delete_project', true ); \n $subscriber->add_cap( 'read_project', true ); \n $subscriber->add_cap( 'upload_files', true );\n $subscriber->add_cap( 'edit_published_projects', true );\n \n \n}", "function bp_get_moderator_role() {\n\t_doing_it_wrong( 'bp_get_moderator_role', __( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );\n}", "public function permission(): string\n {\n return Permission::ACTION_SETTINGS_RENAME;\n }", "public function role_capabilities() {\n\t\t$admin = get_role( 'administrator' );\n\n\t\tif ( $admin ) {\n\t\t\t$admin->add_cap( 'edit_embargoed_posts', true );\n\t\t}\n\t}", "public function role_to_human(){\n\t\tswitch($this->role) {\n\t\t\tcase \"b\": return \"banned\";\n\t\t\tcase \"g\": return \"guest\";\n\t\t\tcase \"u\": return \"user\";\n\t\t\tcase \"c\": return \"contributor\";\n\t\t\tcase \"m\": return \"mod\";\n\t\t\tcase \"a\": return \"admin\";\n\t\t\tcase \"o\": return \"owner\";\n\t\t\tdefault: return \"unknown\";\n\t\t}\n\t}", "public abstract function getusercapabilities($user);", "public static function delete() { \n \n if (!isset($_POST['action']) || $_POST['action']!='delete-user-capability') {\n return 'Wrong Request';\n }\n \n if (!current_user_can('ure_delete_capabilities')) {\n return esc_html__('Insufficient permissions to work with User Role Editor','user-role-editor');\n }\n \n $lib = URE_Lib::get_instance();\n $mess = ''; \n $caps_allowed_to_remove = $lib->get_caps_to_remove();\n if (!is_array($caps_allowed_to_remove) || count($caps_allowed_to_remove) == 0) {\n return esc_html__('There are no capabilities available for deletion!', 'user-role-editor');\n }\n \n $capabilities = self::get_caps_for_deletion_from_post($caps_allowed_to_remove);\n if (empty($capabilities)) {\n return esc_html__('There are no capabilities available for deletion!', 'user-role-editor');\n }\n\n self::revoke_caps($capabilities); \n \n if (count($capabilities)==1) {\n $mess = sprintf(esc_html__('Capability %s was removed successfully', 'user-role-editor'), $capabilities[0]);\n } else {\n $short_list_str = $lib->get_short_list_str($capabilities);\n $mess = count($capabilities) .' '. esc_html__('capabilities were removed successfully', 'user-role-editor') .': '. \n $short_list_str;\n }\n\n return $mess;\n }", "public static function galleryPermission()\n {\n return 'own';\n }", "function vesmedia_perm() {\n return array('access vesmedia content');\n}", "function wc_shop_manager_has_capability($allcaps, $caps, $args, $user)\n {\n }", "function user_panel_profile(){\n\treturn 'this is my profile - here you can change details about this profile!';\n}", "public function getCapability() {\n\t\treturn $this->capability;\n\t}", "function leadify_user_access() {\r\n\r\n\t\t\tif ( is_user_logged_in() ) {\r\n\t\t\t\tif ( current_user_can( 'manage_options' ) ) {\r\n\r\n\t\t\t\t\tglobal $wp_roles;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//$wp_user_name\t:[administrator] => Administrator [editor] => Editor [author] => Author [contributor] => Contributor [subscriber] => Subscriber )\r\n\t \t\t\t\t$wp_user_name = $wp_roles->get_names();\r\n\t \t\t\t\t$roles = false;\r\n\t \t\t\t\tif(!$roles) {\r\n\t \t\t\t\t\t$roles = array();\r\n\t \t\t\t\t}\r\n\r\n\t \t\t\t\t// give access to administrator\r\n\t \t\t\t\t$roles[] = 'administrator';\r\n\r\n\t \t\t\t\tforeach ( $wp_user_name as $key => $value ) {\r\n\t \t\t\t\t\t$role = get_role( $key );\r\n\r\n\t \t\t\t\t\tif ( in_array( $key, $roles ) ) {\r\n\t \t\t\t\t\t\t//adds user capability\r\n\t \t\t\t\t\t\t$role->add_cap( 'leadify_access' );\r\n\t \t\t\t\t\t} else {\r\n\t \t\t\t\t\t\t$role->remove_cap( 'leadify_access' );\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}", "public static function privacyPolicyComponent()\n {\n return Features::getOption(Features::registration(), 'privacy_policy');\n }", "public function assign_display_appraisees_name() {\n assign_capability('mod/workshop:viewauthornames', CAP_ALLOW, self::STUDENT_ROLE_ID, $this->context->id, true);\n }", "public function username()\n {\n return 'mobile';\n }", "function get_role_capabilities() {\n\n\t$caps = array(\n\t\t// Every user can read.\n\t\t'read' => true,\n\n\t\t// Can list and create new books, but not publish them.\n\t\t'edit_books' => true,\n\n\t\t// Can list and create other user's books.\n\t\t'edit_others_books' => true,\n\n\t\t// Can publish books.\n\t\t'publish_books' => true,\n\n\t\t// Can edit their published books.\n\t\t'edit_published_books' => true,\n\n\t\t// Can delete non-published book owned by them.\n\t\t'delete_books' => true,\n\n\t\t// Can delete books owned by other users.\n\t\t'delete_others_books' => true,\n\n\t\t// Can delete their own published books.\n\t\t'delete_published_books' => true,\n\n\t\t// Can uploads attachments, images, etc.\n\t\t'upload_files' => true,\n\n\t);\n\n\treturn $caps;\n}", "protected function userProviderModel(): string\n {\n return $this->preset->config('user-auth-provider', User::class);\n }", "function inschrijvingen_user_cap() {\n /** The admin */\n $role = get_role('administrator');\n if(NULL !== $role) {\n $role->add_cap('inschrijvingen_cap_admin');\n $role->add_cap('inschrijvingen_cap_subs');\n }\n \n /** The editor */\n $role = get_role('editor');\n if(NULL !== $role) {\n $role->add_cap('inschrijvingen_cap_subs');\n }\n \n /** The author */\n $role = get_role('author');\n if(NULL !== $role) {\n $role->add_cap('inschrijvingen_cap_subs');\n }\n \n /** The contributor */\n $role = get_role('contributor');\n if(NULL !== $role) {\n $role->add_cap('inschrijvingen_cap_subs');\n }\n \n /** The subscriber */\n $role = get_role('subscriber');\n if(NULL !== $role) {\n $role->add_cap('inschrijvingen_cap_subs');\n }\n}", "public function getUserAuthModeName();", "public static function get_every_capability() {\n\t\treturn [\n\t\t\tself::CAP_REDIRECT_MANAGE,\n\t\t\tself::CAP_REDIRECT_ADD,\n\t\t\tself::CAP_REDIRECT_DELETE,\n\n\t\t\tself::CAP_GROUP_MANAGE,\n\t\t\tself::CAP_GROUP_ADD,\n\t\t\tself::CAP_GROUP_DELETE,\n\n\t\t\tself::CAP_404_MANAGE,\n\t\t\tself::CAP_404_DELETE,\n\n\t\t\tself::CAP_LOG_MANAGE,\n\t\t\tself::CAP_LOG_DELETE,\n\n\t\t\tself::CAP_IO_MANAGE,\n\n\t\t\tself::CAP_OPTION_MANAGE,\n\n\t\t\tself::CAP_SUPPORT_MANAGE,\n\n\t\t\tself::CAP_SITE_MANAGE,\n\t\t];\n\t}", "public static function current_user_can_manage() {\n\t\t\treturn current_user_can( self::get_required_cap() );\n\t\t}", "final public function getCapabilityKey() {\n return $this->getPhobjectClassConstant('CAPABILITY');\n }", "public function isSocialUser();", "public function getAllowRole() {\n return 'Chimp';\n }", "private function getAccess()\n {\n return str_replace(\n config('permission.black-listed-chars', [ '.', ]),\n config('permission.glue', '_'),\n request()->route()->getName()\n );\n }", "function _s_option_page_capability( $capability ) {\n\treturn 'edit_theme_options';\n}", "public function capabilities()\n {\n return $this->roles->map->capabilities->flatten()->pluck('name')->unique();\n }", "public function current_user_can( $capability = null ) {\r\n\t\tif ( $capability ) {\r\n\t\t\treturn ( $this->is_vaa_enabled() && ( VAA_API::is_super_admin() || current_user_can( $capability ) ) );\r\n\t\t}\r\n\t\treturn ( $this->is_vaa_enabled() && VAA_API::is_super_admin() );\r\n\t}", "public function get_manage_url() {\n\t\t\treturn \"<a class='ask-rating' target='_blank' href='http://codecanyon.net/downloads'>Rate Me</a>\";\n\t\t}", "public function onPrivacyCollectAdminCapabilities() {\n\t\t$this->loadLanguage();\n\n\t\treturn array(\n\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_JOPENSIMTITLE') => array(\n\t\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_ADDONS').'<ul>',\n\t\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_PROFILE'),\n\t\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_GROUPMEMBERSHIP'),\n\t\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_MONEYTRANSACTIONS').'</ul>',\n\t\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_MODULES').'<ul>',\n\t\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_IP'),\n\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_TIME').'</ul>',\n\t\t\t\t\n\t\t\t),\n\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_OPENSIMTITLE') => array(\n\t\t\t\tJText::_('PLG_JOPENSIMPRIVACY_CAPABILITY_EMAIL'),\n\t\t\t),\n\t\t);\n\t}", "function check_user_role( $atts, $content = null ) \r\n{\r\n extract( shortcode_atts( array(\r\n 'role' => 'role' ), $atts ) );\r\n \r\n if( current_user_can( $role ) ) \r\n\t\t{\r\n\t\t\treturn $content;\r\n }\r\n}", "function vocabcards_get_extra_capabilities() {\n return array(\n 'moodle/site:accessallgroups',\n );\n}", "function sp_get_bp_user_nicename(){\n global $bp;\n return $bp->displayed_user->userdata->user_nicename;\n}", "public function capabilities();", "protected function loginType(): string\n {\n return User::SOCIAL_FACEBOOK;\n }", "function sqimap_capability($imap_stream, $capability='') {\n global $sqimap_capabilities;\n if (!is_array($sqimap_capabilities)) {\n $read = sqimap_run_command($imap_stream, 'CAPABILITY', true, $a, $b);\n\n $c = explode(' ', $read[0]);\n for ($i=2; $i < count($c); $i++) {\n $cap_list = explode('=', $c[$i]);\n if (isset($cap_list[1])) {\n // FIX ME. capabilities can occure multiple times.\n // THREAD=REFERENCES THREAD=ORDEREDSUBJECT\n $sqimap_capabilities[$cap_list[0]] = $cap_list[1];\n } else {\n $sqimap_capabilities[$cap_list[0]] = TRUE;\n }\n }\n }\n if ($capability) {\n if (isset($sqimap_capabilities[$capability])) {\n return $sqimap_capabilities[$capability];\n } else {\n return false;\n }\n }\n return $sqimap_capabilities;\n}", "private function getGooglePlusMeta() {\r\r\n $meta = '';\r\r\n $author = SQ_Tools::$options['sq_google_plus'];\r\r\n\r\r\n if (strpos($author, 'plus.google.com') === false && is_numeric($author)) {\r\r\n $author = 'https://plus.google.com/' . $author;\r\r\n }\r\r\n\r\r\n if ($author <> '' && !class_exists('ABH_Classes_ObjController')) {\r\r\n $meta = '<link rel=\"publisher\" href=\"' . $author . '\" />' . \"\\n\";\r\r\n }\r\r\n\r\r\n return apply_filters('sq_publisher_meta', $meta);\r\r\n }", "public function get_role_caps()\n {\n }", "public function get_point_editor_capability() {\n\n\t\t\tif ( ! isset( $this->caps['creds'] ) || empty( $this->caps['creds'] ) )\n\t\t\t\t$this->caps['creds'] = 'manage_options';\n\n\t\t\t$capability = apply_filters( 'mycred_edit_creds_cap', $this->caps['creds'] );\n\n\t\t\treturn apply_filters( 'get_point_editor_capability', $capability, $this );\n\n\t\t}", "public function username()\n {\n return $this->socialiteType;\n }", "public function map_caps() {\n\t\treturn apply_filters( 'indieauth_meta_caps', array( 'publish_posts', 'delete_users', 'edit_users', 'remove_users', 'promote_users', 'delete_posts', 'delete_pages', 'edit_posts', 'edit_pages', 'read_posts', 'read_pages', 'unfiltered_html' ) );\n\t}", "public function getUserAdmin()\n {\n if ($this->fresh()->isOnline()) {\n return '<div class=\"user-block\">\n\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->fresh()->avatar_square_tiny . '\" alt=\"User Image\">\n\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->fresh()->url .'\" target=\"_blank\">' . $this->fresh()->name . '</a></span>\n\t\t\t\t\t<span class=\"description\"><i class=\"fa fa-circle text-success\"></i> Online</span>\n\t\t\t\t</div>';\n } else {\n return '<div class=\"user-block\">\n\t\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->fresh()->avatar_square_tiny . '\" alt=\"User Image\">\n\t\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->fresh()->url .'\" target=\"_blank\">' . $this->fresh()->name . '</a></span>\n\t\t\t\t\t\t<span class=\"description\"><i class=\"fa fa-circle text-danger\"></i> Offline</span>\n\t\t\t\t\t</div>';\n }\n }", "function wpse35165_add_cap()\n{\n $custom_cap = 'name_of_your_custom_capability';\n $min_cap = 'subscriber'; // Check \"Roles and objects table in codex!\n $grant = true; \n\n foreach ( $GLOBALS['wp_roles'] as $role_obj )\n {\n if ( \n ! $role_obj->has_cap( $custom_cap ) \n AND $role_obj->has_cap( $min_cap )\n )\n $role_obj->add_cap( $custom_cap, $grant );\n }\n}", "public static function getDescription() : string\n {\n return 'Checks if the given user has access to the given resource.';\n }", "public function getHelpText()\n {\n return \"This variable holds oAuth Instagram user ID and authorization (oAuth) associated a Craft CMS user.\";\n }", "function get_role_name() {\n\treturn 'administrator';\n}", "public function step12CustomTitle()\n\t{\n\t\treturn 'Enabling social promotion for administrators';\n\t}", "public function message()\n {\n return 'Пользователь должен обладать правами модератора';\n }", "function author_can($post, $capability)\n{\n}", "function bp_get_caps_for_role( $role = '' ) {\n\n\t// Which role are we looking for?\n\tswitch ( $role ) {\n\n\t\t// Administrator\n\t\tcase 'administrator' :\n\t\t\t$caps = array(\n\t\t\t\t// Misc\n\t\t\t\t'bp_moderate',\n\t\t\t);\n\n\t\t\tbreak;\n\n\t\tcase 'editor' :\n\t\tcase 'author' :\n\t\tcase 'contributor' :\n\t\tcase 'subscriber' :\n\t\tdefault :\n\t\t\t$caps = array();\n\t\t\tbreak;\n\t}\n\n\treturn apply_filters( 'bp_get_caps_for_role', $caps, $role );\n}", "public function getName()\n {\n return 'robisk_user_extension';\n }", "public function add_new_capability(){\r\n $editor_role = get_role('editor');\r\n $admin_role = get_role('administrator');\r\n $editor_role->add_cap('update_enrollments_table');\r\n $admin_role->add_cap('update_enrollments_table');\r\n }", "function wcrichmond_option_page_capability( $capability ) {\n\treturn 'edit_theme_options';\n}", "public function registerPermissions() {\n return ['mercator.twigextensions.configuration' => ['tab' => 'Twig Extensions', 'label' => 'Manage configuration', ],\n\n ];\n }", "public static function get_capabilities() {\n\t\treturn array(\n\t\t\t'edit_post' => 'manage_options',\n\t\t\t'read_post' => 'manage_options',\n\t\t\t'delete_post' => 'manage_options',\n\t\t\t'edit_posts' => 'manage_options',\n\t\t\t'edit_others_posts' => 'manage_options',\n\t\t\t'publish_posts' => 'manage_options',\n\t\t\t'read_private_posts' => 'manage_options',\n\t\t\t'read' => 'manage_options',\n\t\t\t'delete_posts' => 'manage_options',\n\t\t\t'delete_private_posts' => 'manage_options',\n\t\t\t'delete_published_posts' => 'manage_options',\n\t\t\t'delete_others_posts' => 'manage_options',\n\t\t\t'edit_private_posts' => 'manage_options',\n\t\t\t'edit_published_posts' => 'manage_options',\n\t\t\t'create_posts' => 'manage_options',\n\t\t);\n\t}", "function socialbridge_remove_capabilities(){\n\n $manager_roles = array('administrator', 'editor', 'socialbridge_logger');\n\n foreach ($manager_roles as $the_role) {\n $role = get_role( $the_role );\n $role->remove_cap( 'read' );\n $role->remove_cap( 'edit_socialbridges' );\n $role->remove_cap( 'publish_socialbridges' );\n $role->remove_cap( 'edit_published_socialbridges' );\n $role->remove_cap( 'read_private_socialbridges' );\n $role->remove_cap( 'edit_others_socialbridges' ); \n $role->remove_cap( 'edit_private_socialbridges' ); \n $role->remove_cap( 'delete_socialbridges' );\n $role->remove_cap( 'delete_published_socialbridges' );\n $role->remove_cap( 'delete_private_socialbridges' );\n $role->remove_cap( 'delete_others_socialbridges' ); \n }\n}", "public function getName()\n {\n return 'user_extension';\n }", "public function get_capability( $which = 'new' )\n\t\t{\n\t\t\t$option = avia_get_option( 'alb_element_templates' );\n\n\t\t\t$cap = 'admins_only' == $option ? 'manage_options' : 'edit_posts';\n\n\t\t\t/**\n\t\t\t * Filter the user capability to create and edit ALB Element Templates\n\t\t\t * Make sure to return a valid capability.\n\t\t\t *\n\t\t\t * @since 4.8\n\t\t\t * @param string $cap\n\t\t\t * @param string $which\t\t\t\t'new' | 'edit'\n\t\t\t * @param string $option\n\t\t\t * @return string\n\t\t\t */\n\t\t\treturn apply_filters( 'avf_custom_elements_user_capability', $cap, $which, $option );\n\t\t}", "function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('1')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('1');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getSocialUrl(): string {\n\t\treturn ($this->socialUrl);\n\t}", "function simplelesson_get_extra_capabilities() {\n return array();\n}", "function _EmbedVideo()\r\n{\r\n return ((get_option('sharingrule', 1) == 1) || is_moderator());\r\n}", "function ajan_get_displayed_user_mentionname() {\n\t\treturn apply_filters( 'ajan_get_displayed_user_mentionname', ajan_activity_get_user_mentionname( ajan_displayed_user_id() ) );\n\t}", "public function getName()\n {\n return \"display_media\";\n }", "function writePermission()\r\n {\r\n switch( $this->WritePermission )\r\n {\r\n case 1:\r\n {\r\n $ret = \"User\";\r\n }\r\n break;\r\n\r\n case 2:\r\n {\r\n $ret = \"Group\";\r\n }\r\n break;\r\n\r\n case 3:\r\n {\r\n $ret = \"All\";\r\n }\r\n break;\r\n\r\n default:\r\n $ret = \"User\";\r\n }\r\n\r\n return $ret;\r\n }", "function show_anon_mod_name() {\n\t\tif ( ! current_user_can( 'moderate' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$moderator_user = get_user_by( 'slug', 'moderator' );\n\t\tif ( $moderator_user->ID !== bbp_get_reply_author_id() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$user = get_user_by( 'id', get_post_meta( bbp_get_reply_id(), self::MODERATOR_REPLY_AUTHOR, true ) );\n\n\t\tprintf(\n\t\t\t'<em>' . __( 'Posted by <a href=\"%s\">@%s</a>.', 'wporg-forums' ) . '</em><br/>',\n\t\t\tesc_url( bbp_get_user_profile_url( $user->ID ) ),\n\t\t\tesc_html( $user->user_nicename )\n\t\t);\n\t}", "public function assign_display_appraisers_name() {\n assign_capability('mod/workshop:viewreviewernames', CAP_ALLOW, self::STUDENT_ROLE_ID, $this->context->id, true);\n }", "public function registerPermissions()\n {\n return [\n 'nexxa.enhancedmedia.manage' => [\n 'tab' => 'enhancedmedia',\n 'label' => 'Some permission'\n ],\n ];\n }", "public static function getAvailablePermission()\n {\n return [\n 'users-listUser'\n ];\n }", "function user_panel_playlists(){\n\treturn 'this is my playlists';\n}", "function pfund_permissions_section_text() {\n\techo '<p>'.__( 'Settings to determine who can create or submit campaigns', 'pfund' ).'</p>';\n}" ]
[ "0.6662557", "0.6485181", "0.64054894", "0.62527245", "0.61690384", "0.61640644", "0.6019747", "0.5927686", "0.5799099", "0.5675818", "0.56514686", "0.56236404", "0.5587976", "0.5583648", "0.5570806", "0.553471", "0.55038387", "0.5482185", "0.5477575", "0.54461807", "0.54358774", "0.54199255", "0.540975", "0.5401211", "0.53764766", "0.53461874", "0.5344786", "0.5338053", "0.5319942", "0.5262237", "0.52447337", "0.52437437", "0.5236631", "0.5223152", "0.52168036", "0.5206751", "0.5196366", "0.5177641", "0.51743054", "0.51645696", "0.516407", "0.5153949", "0.51484007", "0.5144175", "0.51333475", "0.51283437", "0.5121979", "0.51146346", "0.51137406", "0.5109235", "0.51037884", "0.5103065", "0.50992644", "0.50965255", "0.5071471", "0.5071256", "0.50700927", "0.5060512", "0.5045486", "0.5041792", "0.5040911", "0.5037091", "0.5022587", "0.50166905", "0.501272", "0.5008174", "0.5003953", "0.50006825", "0.4994766", "0.49925327", "0.49919245", "0.499149", "0.49912876", "0.49905095", "0.49894178", "0.4971299", "0.49690127", "0.49681467", "0.49648228", "0.4959885", "0.49557298", "0.49529505", "0.49497774", "0.494866", "0.49456474", "0.49419352", "0.49415442", "0.4935327", "0.49223697", "0.49190006", "0.49174526", "0.49083784", "0.49075302", "0.49050686", "0.48966363", "0.48939282", "0.48919424", "0.48901984", "0.4882508", "0.48820424" ]
0.82257676
0
Return the user capability string to share social media.
Вернуть строку пользовательских возможностей для общей социальной сети.
public function get_user_cap_share_string() { return self::USER_CAP_SOCIAL_SHARE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_cap_manage_string() {\n\t\treturn $this->user_cap_manage_social_media;\n\t}", "public function __toString() {\n\t\t// translators: Basic name of the plugin\n\t\treturn sprintf( __( '%s: Social Media', 'wpcampus-social' ), 'WPCampus' );\n\t}", "public function get_capability() : string;", "public function hookDisplaySocialSharing()\n {\n if (!isset($this->context->controller) || !method_exists($this->context->controller, 'getProduct')) {\n return '';\n }\n\n $product = $this->context->controller->getProduct();\n\n if (isset($product) && Validate::isLoadedObject($product)) {\n $imageCoverId = $product->getCover($product->id);\n if (is_array($imageCoverId) && isset($imageCoverId['id_image'])) {\n $imageCoverId = (int)$imageCoverId['id_image'];\n } else {\n $imageCoverId = 0;\n }\n\n Media::addJsDef(\n [\n 'sharing_name' => addcslashes($product->name, \"'\"),\n 'sharing_url' => addcslashes($this->context->link->getProductLink($product), \"'\"),\n 'sharing_img' => addcslashes($this->context->link->getImageLink($product->link_rewrite, $imageCoverId, $this->getSelectedProductImageType()), \"'\"),\n ]\n );\n }\n\n if (!$this->isCached('socialsharing.tpl', $this->getCacheId('socialsharing|' . (isset($product->id) && $product->id ? (int)$product->id : '')))) {\n $this->context->smarty->assign(\n [\n 'product' => isset($product) ? $product : '',\n 'PS_SC_TWITTER' => Configuration::get('PS_SC_TWITTER'),\n 'PS_SC_FACEBOOK' => Configuration::get('PS_SC_FACEBOOK'),\n 'PS_SC_PINTEREST' => Configuration::get('PS_SC_PINTEREST'),\n ]\n );\n }\n\n return $this->display(__FILE__, 'socialsharing.tpl', $this->getCacheId('socialsharing|' . (isset($product->id) && $product->id ? (int)$product->id : '')));\n }", "function capability() {\n\t\tif ( isset( $this->settings['access_cap'] ) )\n\t\t\treturn $this->settings['access_cap'];\n\t\telse\n\t\t\treturn apply_filters( 'rda_default_access_cap', 'manage_options' );\n\t}", "function vantage_premium_show_social_share(){\n\tif( siteorigin_setting('social_share_post') && is_single() ) {\n\t\tsiteorigin_share_render( array(\n\t\t\t'twitter' => siteorigin_setting('social_twitter'),\n\t\t) );\n\t}\n}", "function current_user_can($capability)\n{\n}", "public function shareTwitter()\n {\n return urlencode($this->current()->title . '') \n . 'http://'\n . $_SERVER['HTTP_HOST']\n . $_SERVER['REQUEST_URI'];\n\n }", "public function getPermissionString() : string\n\t{\n\t\t$permissionString = [];\n\t\t\n\t\t/** @var Module[] $modules */\n\t\t$modules = $this->getAllowedModules();\n\t\t\n\t\tforeach ($modules as $module){\n\t\t\t$permissionNumber = $this->permissions[$module->id];\n\t\t\t$permissionString[] = ($module->slug ? : $module->name) . ':' . $permissionNumber;\n\t\t}\n\t\t\n\t\treturn implode(';', $permissionString);\n\t}", "function metaslider_permissions($capability) {\n $capability = 'administrator';\n return $capability;\n}", "public function shareUrlProvider()\n {\n return [[\"a string\"]];\n }", "public function get_capability() : string {\n return 'manage_options';\n }", "public function getShareType()\n {\n return isset($this->share_type) ? $this->share_type : '';\n }", "function wphb_get_admin_capability() {\r\n\t$cap = 'manage_options';\r\n\tif ( is_multisite() && is_network_admin() ) {\r\n\t\t$cap = 'manage_network';\r\n\t}\r\n\r\n\treturn apply_filters( 'wphb_admin_capability', $cap );\r\n}", "function _EmbedVideo()\r\n{\r\n return ((get_option('sharingrule', 1) == 1) || is_moderator());\r\n}", "public function isSocialUser();", "private function getGooglePlusMeta() {\r\r\n $meta = '';\r\r\n $author = SQ_Tools::$options['sq_google_plus'];\r\r\n\r\r\n if (strpos($author, 'plus.google.com') === false && is_numeric($author)) {\r\r\n $author = 'https://plus.google.com/' . $author;\r\r\n }\r\r\n\r\r\n if ($author <> '' && !class_exists('ABH_Classes_ObjController')) {\r\r\n $meta = '<link rel=\"publisher\" href=\"' . $author . '\" />' . \"\\n\";\r\r\n }\r\r\n\r\r\n return apply_filters('sq_publisher_meta', $meta);\r\r\n }", "public function getSocialUrl(): string {\n\t\treturn ($this->socialUrl);\n\t}", "function responsive_share_tools( $text = '', $echo = true ) {\n\tif ( function_exists( 'sharing_display' ) ) {\n\t\treturn sharing_display( $text, $echo );\n\t}\n}", "public function TwitterShareLink()\n {\n if (!$this->owner->hasMethod('AbsoluteLink')) {\n return false;\n }\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n $text = rawurlencode($this->owner->getOGTitle());\n\n return ($pageURL) ? \"https://twitter.com/intent/tweet?text=$text&url=$pageURL\" : false;\n }", "public function assign_display_appraisees_name() {\n assign_capability('mod/workshop:viewauthornames', CAP_ALLOW, self::STUDENT_ROLE_ID, $this->context->id, true);\n }", "public function share()\r\n {\r\n $user_id = Users::getUserId();\r\n $user = Users::where(\"id\", $user_id)->first(['id', 'extension_code']);\r\n if (empty($user)) {\r\n return $this->error(\"Member Not Found\");\r\n }\r\n\r\n $data['share_title'] = Setting::getValueByKey('share_title', '');\r\n $data['share_content'] = Setting::getValueByKey('share_content', '');\r\n $data['share_url'] = Setting::getValueByKey('share_url', '');\r\n $data['extension_code'] = $user['extension_code'];\r\n\r\n return $this->success($data);\r\n }", "function sqimap_capability($imap_stream, $capability='') {\n global $sqimap_capabilities;\n if (!is_array($sqimap_capabilities)) {\n $read = sqimap_run_command($imap_stream, 'CAPABILITY', true, $a, $b);\n\n $c = explode(' ', $read[0]);\n for ($i=2; $i < count($c); $i++) {\n $cap_list = explode('=', $c[$i]);\n if (isset($cap_list[1])) {\n // FIX ME. capabilities can occure multiple times.\n // THREAD=REFERENCES THREAD=ORDEREDSUBJECT\n $sqimap_capabilities[$cap_list[0]] = $cap_list[1];\n } else {\n $sqimap_capabilities[$cap_list[0]] = TRUE;\n }\n }\n }\n if ($capability) {\n if (isset($sqimap_capabilities[$capability])) {\n return $sqimap_capabilities[$capability];\n } else {\n return false;\n }\n }\n return $sqimap_capabilities;\n}", "function user_can($user, $capability)\n{\n}", "public function FacebookShareLink()\n {\n if (!$this->owner->hasMethod('AbsoluteLink')) {\n return false;\n }\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n\n return ($pageURL) ? \"https://www.facebook.com/sharer/sharer.php?u=$pageURL\" : false;\n }", "abstract public function getCapabilityName();", "public function jetpack_sharing_display() {\n\t\tif ( function_exists( 'sharing_display' ) ) {\n\t\t\tsharing_display( '', true );\n\t\t}\n\t}", "function cellular_social_media_share() {\n if (theme_get_setting('social_media_share') === 1) {\n global $base_url;\n $set = cellular_sm_settings('share');\n $output = '';\n $page = array(\n 'url' => $base_url . '/' . current_path(),\n 'title' => drupal_get_title(),\n );\n $block_title = theme_get_setting('sm_share_title');\n $media_block = array(\n 'title' => !empty($block_title) ? \"<h3>$block_title</h3>\\n\" : '',\n 'id' => 'social-media-share',\n 'link_class' => 'social icon',\n 'link_text' => 'Share this page on ',\n );\n\n $links = array();\n $set['google'] === 1 ? $links['google+'] = array(\n 'name' => 'Google+',\n 'script' => NULL,\n 'url' => 'http://plus.google.com/share?url=' . $page['url'],\n 'class' => 'google',\n ) : NULL;\n $set['twitter'] === 1 ? $links['twitter'] = array(\n 'name' => 'Twitter',\n 'script' => NULL,\n 'url' => 'https://twitter.com/share',\n 'class' => 'twitter-bird',\n ) : NULL;\n $set['linkedin'] === 1 ? $links['linkedin'] = array(\n 'name' => 'LinkedIn',\n 'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=' .\n $page['url'] . '&title=' . $page['title'] . '&source=' . $base_url,\n 'class' => 'linkedin',\n ) : NULL;\n $set['pinterest'] === 1 ? $links['pinterest'] = array(\n 'name' => 'Pinterest',\n 'url' => 'http://pinterest.com/pin/create/bookmarklet/?media=&url=' .\n $page['url'] . '&is_video=false&description=' . $page['title'],\n 'class' => 'pinterest',\n ) : NULL;\n $set['reddit'] === 1 ? $links['reddit'] = array(\n 'name' => 'Reddit',\n 'url' => 'http://www.reddit.com/submit?url=' . $page['url'],\n 'class' => 'reddit',\n ) : NULL;\n\n if ($set['fb'] === 1) {\n // Set variables to appease PAReview.\n $fbscript = '(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, \\'script\\', \\'facebook-jssdk\\'));';\n $fbtag = '<div class=\"fb-like\" data-href=\"' . $page['url'] . '\"\n data-layout=\"button\" data-action=\"like\" data-show-faces=\"false\"\n data-share=\"true\"></div><div id=\"fb-root\"></div>';\n\n $links['facebook'] = array(\n // Facebook javascript.\n 'script' => $fbscript,\n // Set fb markup.\n 'tag' => $fbtag,\n // Push script to end of body.\n 'weight' => 1000,\n );\n }\n\n $content = cellular_build_links($links, $media_block);\n\n if (!empty($content)) {\n $output .= \"\\n<div id=\\\"\" . $media_block['id'] . \"\\\">\\n\";\n $output .= $media_block['title'] . $content . \"\\n</div>\\n\";\n }\n\n return $output;\n }\n}", "public function getPermission(): string\n {\n // TODO: Implement getPermission() method.\n }", "static function share_enabled() {\n\t\t\t$enabled = self::get_option( self::$name . '_ui_share_enabled' );\n\t\t\tif ($enabled == '0') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn self::get_option( self::$name . '_rpx_share_providers' );\n\t\t}", "protected function print_social_share( string $content ): string {\n\t\t$share_providers = [\n\t\t\t[\n\t\t\t\t'provider' => 'twitter',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'provider' => 'linkedin',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'provider' => 'email',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'provider' => 'system',\n\t\t\t],\n\t\t];\n\n\t\t/**\n\t\t * Filters the list of sharing providers in the Web Stories sharing dialog.\n\t\t *\n\t\t * @since 1.3.0\n\t\t *\n\t\t * @link https://amp.dev/documentation/components/amp-social-share/?format=stories#pre-configured-providers\n\t\t *\n\t\t * @param array[] $share_providers List of sharing providers.\n\t\t */\n\t\t$share_providers = (array) apply_filters( 'web_stories_share_providers', $share_providers );\n\n\t\tif ( empty( $share_providers ) ) {\n\t\t\treturn $content;\n\t\t}\n\n\t\t$config = [\n\t\t\t'shareProviders' => $share_providers,\n\t\t];\n\t\t$social_share = sprintf(\n\t\t\t'<amp-story-social-share layout=\"nodisplay\"><script type=\"application/json\">%s</script></amp-story-social-share>',\n\t\t\twp_json_encode( $config )\n\t\t);\n\n\n\t\treturn str_replace( '</amp-story>', $social_share . '</amp-story>', $content );\n\t}", "public function onMenuInitialize_sitestoreproductWishlistGutterShare() {\n if (!Engine_Api::_()->core()->hasSubject('sitestoreproduct_wishlist')) {\n return false;\n }\n //GET VIEWER ID\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n\n //RETURN IF VIEWER IS EMPTY\n if (empty($viewer_id)) {\n return false;\n }\n //GET SUBJECT\n $subject = Engine_Api::_()->core()->getSubject('sitestoreproduct_wishlist');\n return array(\n 'class' => 'smoothbox seaocore_icon_share buttonlink',\n 'route' => 'default',\n 'params' => array(\n 'module' => 'activity',\n 'controller' => 'index',\n 'action' => 'share',\n 'type' => $subject->getType(),\n 'id' => $subject->getIdentity(),\n 'format' => 'smoothbox',\n ),\n );\n }", "function hasSharePermission()\n \t{\n \treturn $this->perms_map[\"share\"];\n \t}", "public function shareFacebook()\n {\n return 'http://'\n . $_SERVER['HTTP_HOST']\n . $_SERVER['REQUEST_URI'];\n\n }", "public function isSocial()\n {\n $user_data = $this->getUserData();\n if (empty($user_data)) {\n return null;\n } else {\n return $user_data['fb_share'] && $this->hasFb() ? true : false;\n }\n }", "static public function add_capability($capabilities) {\n $capabilities[self::capability] = __('Manage Facebook Tabs',ud_get_wpp_fbtabs()->domain);\n\n return $capabilities;\n }", "private static function user_caps(){\n\t\t$role = get_role( 'contributor' );\n\n\t\t$role->add_cap( 'upload_files' );\n\t}", "public function sitestoreproductGutterShare() {\n if (!Engine_Api::_()->core()->hasSubject('sitestoreproduct_product')) {\n return false;\n }\n\n //GET SUBJECT\n $sitestoreproduct = Engine_Api::_()->core()->getSubject('sitestoreproduct_product');\n\n //GET VIEWER ID\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n\n //RETURN IF VIEWER IS EMPTY\n if (empty($viewer_id)) {\n return false;\n }\n\n return array(\n 'class' => 'smoothbox seaocore_icon_share buttonlink',\n 'route' => 'default',\n 'params' => array(\n 'module' => 'activity',\n 'controller' => 'index',\n 'action' => 'share',\n 'type' => $sitestoreproduct->getType(),\n 'id' => $sitestoreproduct->getIdentity(),\n 'format' => 'smoothbox',\n ),\n );\n }", "public function assign_display_appraisers_name() {\n assign_capability('mod/workshop:viewreviewernames', CAP_ALLOW, self::STUDENT_ROLE_ID, $this->context->id, true);\n }", "public function getSocialSecurity()\n {\n if (isset($_POST[self::$socialSecurity])) {\n return $_POST[self::$socialSecurity];\n\n }\n }", "function facebook_intent($url)\n{\n return 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($url);\n}", "public function supportedClaim(): string\n {\n return self::CLAIM_NAME;\n }", "function current_user_can_for_blog($blog_id, $capability)\n{\n}", "private function getFacebookIns() {\r\r\n $sq_facebook_insights = SQ_Tools::$options ['sq_facebook_insights'];\r\r\n\r\r\n if ($this->isHomePage() && $sq_facebook_insights <> '') {\r\r\n return sprintf(\"<meta property=\\\"fb:admins\\\" content=\\\"%s\\\" />\", $sq_facebook_insights) . \"\\n\";\r\r\n }\r\r\n\r\r\n return false;\r\r\n }", "public static function featureName()\n\t{\n\t\treturn __( 'Twitter settings', 'twitter' );\n\t}", "public static function shareButton(){\n $social_providers = array_filter(explode(',', parent::$param->getValue('socialpub')));\n foreach ($social_providers as $val) { $rpx_social_icons .= '<div class=\"jn-icon jn-size16 jn-'.$val.'\"></div>'; }\n $buttons = '<div class=\"rpx_social_icons\">' . $rpx_social_icons . '</div>';\n $share = '<div id=\"janrainEngageShare\" class=\"rpxsocial rpx_tooltip\">';\n $share .= '<span class=\"rpxsharebutton\">share</span><div class=\"rpx_share_tip\">Share this on:<br>' . $buttons . '</div></div>';\n //TODO: make a class for this so it can be edited in the css file\n return '<div style=\"margin-top:35px;\" >'.$share.'</div>';\n }", "function ajan_activity_user_link() {\n\techo ajan_get_activity_user_link();\n}", "function rp_gpo_home_share () {\r\n $output = rp_social_share(network_site_url());\r\n echo $output;\r\n}", "protected static function get_permissions_name() {\n $strpermissions = array(\n CAP_INHERIT => get_string('inherit', 'role'),\n CAP_ALLOW => get_string('allow', 'role'),\n CAP_PREVENT => get_string('prevent', 'role'),\n CAP_PROHIBIT => get_string('prohibit', 'role')\n );\n return $strpermissions;\n }", "function ajan_get_displayed_user_mentionname() {\n\t\treturn apply_filters( 'ajan_get_displayed_user_mentionname', ajan_activity_get_user_mentionname( ajan_displayed_user_id() ) );\n\t}", "function user( $atts ) {\n\n\t\t\t$atts = shortcode_atts( array(\n\t\t\t\t'field' => '',\n\t\t\t), $atts, 'htmlpress-user' );\n\n\t\t\t$output = '';\n\t\t\tswitch ( $atts['field'] ) {\n\n\t\t\t\tcase 'avatar' :\n\t\t\t\t\t\t\t\t$output = get_avatar( esc_url( get_the_author_meta( 'ID' ) ) );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$output = esc_attr( get_the_author_meta( $atts['field'] ) );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn $output;\n\t\t}", "public function LinkedInShareLink()\n {\n if (!$this->owner->hasMethod('AbsoluteLink')) {\n return false;\n }\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n $title = rawurlencode($this->owner->getOGTitle());\n $description = rawurlencode($this->owner->getOGDescription());\n $source = rawurlencode($this->owner->getOGSiteName());\n\n return \"https://www.linkedin.com/shareArticle?mini=true&url=$pageURL&title=$title&summary=$description&source=$source\";\n }", "static public function add_capability($capabilities) {\n $capabilities[self::$capability_capability] = __('Manage Capabilities',ud_get_wpp_pt()->domain);\n $capabilities[self::$capability_white_label] = __('Manage White Label',ud_get_wpp_pt()->domain);\n return $capabilities;\n }", "function twittervisualeditor_sharetwitter( $atts, $content = null ) {\n $atts_sharetwitter = shortcode_atts( array(\n 'text' => 'Compartir en Twitter',\n 'size' => 'small',\n ), $atts );\n\n\t$link_twitter = 'http://twitter.com/intent/tweet?url=' . urlencode( get_permalink() ) . '&amp;text=' . urlencode( get_the_title() );\n\t\n\t$bigclass = '';\n\tif ( $atts_sharetwitter['size'] == 'big' )\n\t\t$bigclass = 'sct-twitter-big';\n\t\n\t$content = '<a class=\"sct-twitter ' . $bigclass . '\" target=\"_blank\" href=\"' . $link_twitter . '\">' . $atts_sharetwitter['text'] . '</a>';\n\t\n\treturn $content;\n}", "public function pluginDetails()\n {\n return [\n 'name' => 'Laravel Socialite',\n 'description' => 'Log in User with OAuth2',\n 'author' => 'Kakuki',\n 'icon' => 'icon-leaf',\n ];\n }", "function zaxu_share_toggle() {\n\t\t\tif (get_theme_mod('zaxu_site_share', 'enabled') === 'enabled') {\n\t\t\t\techo '\n\t\t\t\t\t<li class=\"content-item share-toggle\">\n\t\t\t\t\t\t<div class=\"share-icon\"></div>\n\t\t\t\t\t</li>\n\t\t\t\t';\n\t\t\t}\n\t\t}", "function display_user_icon() {\n $show_user_icon = trim(elgg_get_plugin_setting('show_user_icon', 'amapnews'));\n \n if ($show_user_icon === AMAPNEWS_GENERAL_YES) {\n return true;\n } \n \n return false;\n}", "function wporg_simple_role_caps()\n{\n $role = get_role('editor_galeria');\n \n // add a new capability\n $role->add_cap('ascom_galeria', true);\n}", "function sp_get_bp_user_nicename(){\n global $bp;\n return $bp->displayed_user->userdata->user_nicename;\n}", "public function username()\n {\n return $this->socialiteType;\n }", "public function capability();", "function socialbridge_add_capabilities(){\n $roles = array('administrator', 'editor', 'socialbridge_logger');\n\n foreach ($roles as $the_role) {\n $role = get_role( $the_role );\n\n $role->add_cap( 'read' );\n $role->add_cap( 'edit_socialbridges' );\n $role->add_cap( 'publish_socialbridges' );\n $role->add_cap( 'edit_published_socialbridges' );\n }\n\n $manager_roles = array('administrator', 'editor');\n\n foreach ($manager_roles as $the_role) {\n $role = get_role( $the_role );\n $role->add_cap( 'read_private_socialbridges' );\n $role->add_cap( 'edit_others_socialbridges' ); \n $role->add_cap( 'edit_private_socialbridges' ); \n $role->add_cap( 'delete_socialbridges' );\n $role->add_cap( 'delete_published_socialbridges' );\n $role->add_cap( 'delete_private_socialbridges' );\n $role->add_cap( 'delete_others_socialbridges' ); \n }\n\n}", "function show_anon_mod_name() {\n\t\tif ( ! current_user_can( 'moderate' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$moderator_user = get_user_by( 'slug', 'moderator' );\n\t\tif ( $moderator_user->ID !== bbp_get_reply_author_id() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$user = get_user_by( 'id', get_post_meta( bbp_get_reply_id(), self::MODERATOR_REPLY_AUTHOR, true ) );\n\n\t\tprintf(\n\t\t\t'<em>' . __( 'Posted by <a href=\"%s\">@%s</a>.', 'wporg-forums' ) . '</em><br/>',\n\t\t\tesc_url( bbp_get_user_profile_url( $user->ID ) ),\n\t\t\tesc_html( $user->user_nicename )\n\t\t);\n\t}", "function ajan_get_send_public_message_link() {\n\n\t\tif ( ! is_user_logged_in() || ! ajan_is_user() || ajan_is_my_profile() )\n\t\t\treturn false;\n\n\t\treturn apply_filters( 'ajan_get_send_public_message_link', wp_nonce_url( ajan_get_activity_directory_permalink() . '?r=' . ajan_get_displayed_user_mentionname() ) );\n\t}", "public function __toString()\n {\n return $this->sender->login . ' just ' . $this->action\n . \" <a href='\" . $this->member->html_url . \"'>\"\n . $this->member->login . '</a> in the '\n . $this->team->name . ' ' . $this->scope . '.';\n }", "public function PinterestShareLink()\n {\n $pinImage = ($this->owner->hasMethod('getPinterestImage')) ? $this->owner->getPinterestImage() : $this->owner->getOGImage();\n if ($pinImage) {\n // OGImage may be an Image object or an absolute URL\n $imageURL = rawurlencode((is_string($pinImage)) ? $pinImage : $pinImage->getAbsoluteURL());\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n $description = rawurlencode($this->owner->getOGTitle());\n // Combine Title, link and image in to rich link\n return \"http://www.pinterest.com/pin/create/button/?url=$pageURL&media=$imageURL&description=$description\";\n }\n\n return false;\n }", "public static function facebook()\n {\n #'http://www.facebook.com/sharer.php?u='.$url;\n\n $str = \"<a href=\\\"#\\\" onclick=\\\"window.open(\"\n .\"'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),\"\n .\"'facebook-share-dialog',\"\n .\"'width=626,height=436');\"\n .\"return false;\\\">\"\n\n .\"<img title=\\\"Facebook\\\" class=\\\"ssba\\\" alt=\\\"Facebook\\\" src=\\\"\".$img.\"\\\">\"\n\n .\"</a>\";\n\n return $str;\n }", "public function step12CustomTitle()\n\t{\n\t\treturn 'Enabling social promotion for administrators';\n\t}", "function print_embed_sharing_dialog()\n{\n}", "public function get() {\n\t\t/**\n\t\t * Filter: 'wpseo_twitter_site' - Allow changing the Twitter site account as output in the Twitter card by Yoast SEO.\n\t\t *\n\t\t * @api string $twitter_site Twitter site account string.\n\t\t *\n\t\t * @param Indexable_Presentation $presentation The presentation of an indexable.\n\t\t */\n\t\t$twitter_site = \\apply_filters( 'wpseo_twitter_site', $this->presentation->twitter_site, $this->presentation );\n\t\t$twitter_site = $this->get_twitter_id( $twitter_site );\n\n\t\tif ( ! \\is_string( $twitter_site ) || $twitter_site === '' ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn '@' . $twitter_site;\n\t}", "function g1_socials_user_get_supported_networks() {\n\t$networks = G1_Socials()->get_items();\n\treturn apply_filters( 'g1_socials_user_get_supported_networks', $networks );\n}", "public function get_privacy_policy_for_sharing( $policy ) {\n\t\t$policy .= \"<p class=\\\"privacy-policy-tutorial\\\">\" . sprintf( wp_kses( __( 'When running Security Check, ithemes.com will be contacted as part of a process to determine if the site supports TLS/SSL requests. No personal data is sent to ithemes.com as part of this process. Requests to ithemes.com include the site\\'s URL. For ithemes.com privacy policy details, please see the <a href=\"%1$s\">iThemes Privacy Policy</a>.', 'it-l10n-ithemes-security-pro' ), array( 'a' => array( 'href' => array() ) ) ), 'https://ithemes.com/privacy-policy/' ) . \"</p>\\n\";\n\n\t\treturn $policy;\n\t}", "protected function loginType(): string\n {\n return User::SOCIAL_FACEBOOK;\n }", "public function add_likes_to_sharing_meta_box_title() {\n\t\treturn __( 'Likes and Shares', 'jetpack' );\n\t}", "public function getDisplayFacebookLike()\n\t{\n\t\tif ($this->_dataHelper->moduleEnabled()) {\n\t\t\treturn $this->_layoutFactory->create()->createBlock(\n\t\t\t\t'MW\\RewardPoints\\Block\\Facebook\\Like'\n\t\t\t)->setTemplate(\n\t\t\t\t'MW_RewardPoints::facebook/likebutton.phtml'\n\t\t\t)->toHtml();\n\t\t}\n\n\t\treturn '';\n\t}", "private function getSocialMedia( $senator ) {\n\t\t// Update links here. Currently pointing to example.com\n\t\t$shareOptions = array(\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://www.facebook.com/sharer.php?u=http://tinyurl.com/7vq4o8g&t=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/2/2a/WP_SOPA_sm_icon_facebook_dedede.png\",\n\t\t\t\t\"name\" => \"Facebook\"\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://m.google.com/app/plus/x/?v=compose&content=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/0/08/WP_SOPA_sm_icon_gplus_dedede.png\",\n\t\t\t\t\"name\" => \"Google+\"\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://twitter.com/intent/tweet?text=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/4/45/WP_SOPA_sm_icon_twitter_dedede.png\",\n\t\t\t\t\"name\" => \"Twitter\"\n\t\t\t)\n\t\t);\t\n\n\t\t$htmlShare = '';\n\t\tforeach( $shareOptions as $option ) {\n\t\t\t$htmlShare .= Html::rawElement( 'div',\n\t\t\t\tarray(\n\t\t\t\t\t'class' => 'sopaSocial'\n\t\t\t\t),\n\t\t\t\tHtml::rawElement( 'a',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => str_replace( '$1', $this->formatDoneText( $senator ), $option['url'] ),\n\t\t\t\t\t\t'style' => 'text-decoration: none'\n\t\t\t\t\t),\n\t\t\t\t\tHtml::rawElement( 'img',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'src' => $option['img'],\n\t\t\t\t\t\t\t'height' => '33',\n\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t''\n\t\t\t\t\t) \n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'br' ) .\n\t\t\t\tHtml::rawElement( 'a',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $option['url'],\n\t\t\t\t\t\t'style' => 'text-decoration: none'\n\t\t\t\t\t),\n\t\t\t\t\t$option['name']\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t$htmlOut = Html::rawElement( 'div',\n\t\t\tarray( \n\t\t\t\t'id' => 'sopaShareOptions',\n\t\t\t\t'class' => 'sopaActionDiv'\n\t\t\t),\n\t\t\t\tHtml::rawElement( 'p',\n\t\t\t\t\tarray(), 'Done? Tell the world!'\n\t\t\t\t) . \n\t\t\t\tHtml::rawElement( 'div', \n\t\t\t\t\tarray(),\n\t\t\t\t\t$htmlShare) .\n\t\t\t\tHtml::rawElement( 'div',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'style' => 'clear: both;'\n\t\t\t\t\t), ''\n\t\t\t\t) . \n\t\t\t\tHtml::rawElement( 'hr' )\n\t\t\t);\n\n\t\treturn $htmlOut;\n\t}", "public static function privacyPolicyComponent()\n {\n return Features::getOption(Features::registration(), 'privacy_policy');\n }", "function vesmedia_perm() {\n return array('access vesmedia content');\n}", "function rp_gpo_share ($text = null, $url = null) {\r\n $output = rp_social_share($url, $text);\r\n echo $output;\r\n}", "function pmc_socialLink() {\n\t$social = '';\n\tglobal $pmc_data; \n\t$icons = $pmc_data['socialicons'];\n\tforeach ($icons as $icon){\n\t\t$social .= '<a target=\"_blank\" href=\"'.esc_url($icon['link']).'\" title=\"'.esc_attr($icon['title']).'\"><i class=\"fa '.esc_attr($icon['url']).'\"></i></a>';\t\n\t}\n\techo $social;\n}", "public function getShareable()\n {\n return $this->shareable;\n }", "private function getAccess()\n {\n return str_replace(\n config('permission.black-listed-chars', [ '.', ]),\n config('permission.glue', '_'),\n request()->route()->getName()\n );\n }", "function c3m_social_share() {\n\t\n\t\t\t\techo '<div class=\"social-share\" style=\"margin-bottom:50px;width:500px;\">\n\t\t\t\t\t<ul class=\"share-buttons\">\n<li style=\"float:left;margin-right:25px;\"><a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-url=\"'; echo the_permalink(); echo '\" data-text=\"'; echo the_title(); echo '\" data-count=\"horizontal\" data-via=\"XXX-Replace-With-Twitter-Username-XXX\">Tweet</a></li>\n\t\t\t\t\t<li style=\"float:left;width:300px\"><fb:like href=\"'; echo the_permalink(); echo'\" layout=\"standard\" action=\"like\" font=\"lucida grande\"></fb:like></li>';\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\techo '</ul>\n\t\t\t\t\t </div><div class=\"clear\"> </div>'; \n\t\t\t\t\t\n\t\t\t\t\t}", "function title()\n {\n return _m('Social Analytics');\n }", "function multi_device_switcher_page_capability( $capability ) {\n\treturn 'edit_theme_options';\n}", "public function moderator_description() {\n\t\treturn apply_filters( 'bpbcm_moderator_description', 'Type the username of the moderator who will approve your blog registration.' );\n\t}", "public function getSocialName()\r\n\t{\r\n\t\tif ($this->facebook) {\r\n\t\t\treturn $this->facebook->name;\r\n\t\t}\r\n\t\tif ($this->twitter) {\r\n\t\t\treturn $this->twitter->name;\r\n\t\t}\r\n\t\treturn NULL;\r\n\t}", "function print_embed_sharing_button()\n{\n}", "public function get_manage_url() {\n\t\t\treturn \"<a class='ask-rating' target='_blank' href='http://codecanyon.net/downloads'>Rate Me</a>\";\n\t\t}", "function wc_shop_manager_has_capability($allcaps, $caps, $args, $user)\n {\n }", "function ajan_displayed_user_mentionname() {\n\techo ajan_get_displayed_user_mentionname();\n}", "function get_twitter_share_text_for_promotion( $post_id ) {\n\treturn get_post_field( $post_id, 'fusion_distribution', 'twitter', 'share_text' );\n}", "public function userDevice(): string\n {\n return \\App\\Classes\\BrowserDetection::userDevice();\n }", "protected function getSocialLinks()\n {\n $socialite_enable = [];\n $socialite_links = '';\n\n if (getenv('BITBUCKET_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Bit Bucket']), 'bitbucket');\n }\n\n if (getenv('FACEBOOK_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Facebook']), 'facebook');\n }\n\n if (getenv('GOOGLE_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Google']), 'google');\n }\n\n if (getenv('GITHUB_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Github']), 'github');\n }\n\n if (getenv('LINKEDIN_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Linked In']), 'linkedin');\n }\n\n if (getenv('TWITTER_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Twitter']), 'twitter');\n }\n\n for ($i = 0; $i < count($socialite_enable); $i++) {\n $socialite_links .= ($socialite_links != '' ? '&nbsp;|&nbsp;' : '').$socialite_enable[$i];\n }\n\n return $socialite_links;\n }", "function get_facebook_share_text_for_promotion( $post_id ) {\n\treturn get_post_field( $post_id, 'fusion_distribution', 'facebook', 'share_text' );\n}", "public function getShareUrl(){\n\t\treturn $this->_baseUrl.\n\t\t'?url='.urlencode($this->getUrl()).\n\t\t'&title='.urlencode($this->getTitle()).\n\t\t'&description='.urlencode($this->getDescription())\n\t\t;\n\t}", "public function getAllowRole() {\n return 'Chimp';\n }", "public function getQuizSharingDescription()\n {\n return $this->_quizSharingDescription;\n }", "static public function facebookLike() {\n\t\t$s_return = '<div class=\"fb-like\" data-href=\"'.URL.'\" data-send=\"true\" data-layout=\"button_count\" data-width=\"450\" data-show-faces=\"true\" data-font=\"arial\"></div>';\n\t\treturn $s_return;\n\t}", "public function field_share_media_cb() {\n\t\t$value = $this->options['msm_do_share_media'];\n\t\tprintf(\n\t\t\t'<input type=\"checkbox\" id=\"msm_do_share_media\" name=\"msm_sharing_settings[msm_do_share_media]\" value=\"yes\" %s />',\n\t\t\tnull !== $value && $value === 'yes' ? 'checked' : ''\n\t\t);\n\t\techo '<label for=\"msm_do_share_media\">' . __( 'Share media across network', 'multisite-shared-media' ) . '</label>';\n\t}" ]
[ "0.7556454", "0.5981519", "0.5798927", "0.5665007", "0.5635236", "0.5546429", "0.5510206", "0.5472914", "0.54718983", "0.54360825", "0.5358888", "0.53489447", "0.5345732", "0.5331127", "0.5310376", "0.5302815", "0.5298266", "0.5283794", "0.5272559", "0.52675605", "0.5242405", "0.52147967", "0.5209504", "0.52054894", "0.52019477", "0.51906186", "0.5183054", "0.51739913", "0.5168671", "0.5168116", "0.516648", "0.515935", "0.5158065", "0.5151426", "0.5147262", "0.5139856", "0.5138234", "0.5127778", "0.5105378", "0.5101049", "0.5090085", "0.5068828", "0.50380296", "0.50237185", "0.5016605", "0.50134087", "0.50019085", "0.4993589", "0.49933076", "0.49891874", "0.49864322", "0.4976907", "0.4973113", "0.49706104", "0.49681267", "0.49670568", "0.49501887", "0.49478266", "0.49424192", "0.49408126", "0.49382287", "0.49365488", "0.49353153", "0.49261987", "0.49216577", "0.49203518", "0.49140388", "0.49000442", "0.48970526", "0.48907682", "0.48893434", "0.48876283", "0.4887387", "0.48868066", "0.48818117", "0.48688757", "0.48670745", "0.4848974", "0.4847917", "0.4845185", "0.48418644", "0.48306885", "0.48274165", "0.4826745", "0.48240578", "0.48237002", "0.48213845", "0.48197848", "0.48188683", "0.4813522", "0.48111588", "0.48109138", "0.4808191", "0.48067224", "0.48052788", "0.480425", "0.48037267", "0.47978872", "0.47968122", "0.4794405" ]
0.78455746
0
Creating tweet intent URL.
Создание URL с намерением твита.
public function get_tweet_intent_url( $args ) { // Build arguments. $final_args = array(); if ( ! empty( $args['url'] ) ) { $final_args['url'] = urlencode( trim( strip_tags( $args['url'] ) ) ); } if ( ! empty( $args['via'] ) ) { $final_args['via'] = urlencode( trim( strip_tags( $args['via'] ) ) ); } if ( ! empty( $args['text'] ) ) { $final_args['text'] = urlencode( trim( strip_tags( $args['text'] ) ) ); } if ( ! empty( $args['hashtags'] ) ) { if ( is_string( $args['hashtags'] ) ) { $final_args['hashtags'] = trim( strip_tags( $args['hashtags'] ) ); } elseif ( is_array( $args['hashtags'] ) ) { $args['hashtags'] = array_map( 'strip_tags', $args['hashtags'] ); $args['hashtags'] = array_map( 'trim', $args['hashtags'] ); $args['hashtags'] = urlencode( implode( ',', $args['hashtags'] ) ); } } return add_query_arg( $final_args, 'https://twitter.com/intent/tweet' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tweet_intent($text, $url, $twitter = null)\n{\n if (! is_null($twitter)) {\n $text = str_replace('TWITTER_NAME', $twitter, $text);\n }\n\n return 'https://twitter.com/intent/tweet?text='.rawurlencode($text).'&url='.rawurlencode($url);\n}", "public function getTweetUrl()\n {\n return 'https://twitter.com/'.$this->team->twitter.'/status/'.$this->tweet_id;\n }", "public function shareTwitter()\n {\n return urlencode($this->current()->title . '') \n . 'http://'\n . $_SERVER['HTTP_HOST']\n . $_SERVER['REQUEST_URI'];\n\n }", "function twitter_sharer($url, $text) {\n return 'https://twitter.com/intent/tweet?' . http_build_query([\n 'original_referer' => server_root(),\n 'text' => $text,\n 'tw_p' => 'tweetbutton',\n 'url' => $url\n ]);\n}", "protected function buildUrl() {\n\t\n\t\treturn self::$service . $this->feed;\n\t}", "function exa_get_tweet_link($title, $tweet = null, $classes = null, $header = null) {\n\n\tif($tweet === null) {\n\t\t$tweet = $title;\n\t}\n\n\t$tweet = str_replace(' ',\"%20\",$tweet);\n\t$dom = \"<a \";\n\n\t$dom .= \"target='blank' \";\n\t$dom .= \"class='tweet-link $classes' \";\n\t$dom .= \"href='https://twitter.com/intent/tweet/?text=$tweet' \";\n\t\n\t$dom .= \">\";\n\n\tif( $isheader = (is_int($header) && 0 < $header && $header < 7) ) {\n\t\t$dom .= \"<h\" . $header . \">\";\n\t}\n\n\t$dom .= $title;\n\n\tif($isheader) {\n\t\t$dom .= \"</h\" . $header . \">\";\n\t}\n\t$dom .= \"</a>\";\n\n\treturn $dom;\n}", "public function TwitterShareLink()\n {\n if (!$this->owner->hasMethod('AbsoluteLink')) {\n return false;\n }\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n $text = rawurlencode($this->owner->getOGTitle());\n\n return ($pageURL) ? \"https://twitter.com/intent/tweet?text=$text&url=$pageURL\" : false;\n }", "public function getUrlAttribute()\n {\n return route('tweet.show', ['username' => $this->owner->username, 'id' => $this->id]);\n }", "public function linkify($tweet) {\n\t $tweet = preg_replace(\"/([\\w]+\\:\\/\\/[\\w-?&;#~=\\.\\/\\@]+[\\w\\/])/\", \"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", $tweet);\n\n\t //Convert hashtags to twitter searches in <a> links\n\t $tweet = preg_replace(\"/#([A-Za-z0-9\\/\\.]*)/\", \"<a target=\\\"_new\\\" href=\\\"http://twitter.com/search?q=$1\\\">#$1</a>\", $tweet);\n\n\t //Convert attags to twitter profiles in <a> links\n\t $tweet = preg_replace(\"/@([A-Za-z0-9\\/\\.]*)/\", \"<a href=\\\"http://www.twitter.com/$1\\\">@$1</a>\", $tweet);\n\n\t return $tweet;\n\n\t}", "function facebook_intent($url)\n{\n return 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($url);\n}", "public function activate_url($text){\n\t\t\t\t$tweetText = $text;\n\t\t\n\t\t\t\t# Make links active\n\t\t\t\t$tweetText = preg_replace(\"#(http://|(www.))(([^s<]{4,68})[^s<]*)#\", '<a href=\"http://$2$3\" style=\"color:#979907\" target=\"_blank\">$1$2$4</a>', $tweetText);\n\t\t\n\t\t\t\t# Linkify user mentions\n\t\t\t\t//$tweetText = preg_replace(\"/@(w+)/\", '<a href=\"http://www.twitter.com/$1\" target=\"_blank\">@$1</a>', $tweetText);\n\t\t\n\t\t\t\t# Linkify tags\n\t\t\t\t//$tweetText = preg_replace(\"/#(w+)/\", '<a href=\"http://search.twitter.com/search?q=$1\" target=\"_blank\">#$1</a>', $tweetText);\n\t\t\n\t\t\t\treturn $tweetText;\n\t\n\t}", "function linkify_tweet($tweet) {\n $tweet = preg_replace(\"/([\\w]+\\:\\/\\/[\\w-?&;#~=\\.\\/\\@]+[\\w\\/])/\", \"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", $tweet);\n //Convert hashtags to twitter searches in <a> links\n $tweet = preg_replace(\"/#([A-Za-z0-9\\/\\.]*)/\", \"<a target=\\\"_new\\\" href=\\\"http://twitter.com/search?q=$1\\\">#$1</a>\", $tweet);\n //Convert attags to twitter profiles in <a> links\n $tweet = preg_replace(\"/@([A-Za-z0-9\\/\\.]*)/\", \"<a href=\\\"http://www.twitter.com/$1\\\">@$1</a>\", $tweet);\n return $tweet;\n}", "private function format_links($tweet = array()) {\n if((strpos($tweet,'http') !== false)) {\n $pattern = \"/(?i)\\b((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\\\".,<>?«»“”‘’]))/\";\n $tweet = preg_replace($pattern, '<a href=\"$1\" target=\"_blank\">$1</a>', $tweet);\n }\n return $tweet;\n }", "protected function generate_url() : String\n {\n return (new Tokenizer(5))->create()->check([\n 'org' => 'url',\n 'feeds' => 'org_url',\n 'renewal' => 'org_url',\n ]);\n }", "private function generate_telegram_share_link( $url, $text ) {\n\t\treturn 'https://t.me/share/url?url=' . rawurlencode( $this->get_shortened_link( $url, 'telegram', false ) ) . '&text=' . rawurlencode( $text );\n\t}", "function pzdc_merchant_twitter_link($echo = TRUE, $identifier = FALSE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_twitter_link($echo = TRUE, $identifier = FALSE);\n}", "function opened_twitter_func( $atts ) {\n extract(shortcode_atts( array(\n 'name' => '', //name of account\n ), $atts));\n\n return '<a class=\"twitter-timeline\" href=\"https://twitter.com/' . $name . '?ref_src=twsrc%5Etfw\">Tweets by' . $name . '</a> <script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>';\n}", "function build_feed_url($atts) {\n\t$url = 'http://news.google.com/news?q=' . $atts['query'] . '&topic=' . $atts['topic'] . '&ned=' . $atts['region'] . '&scoring=' . $atts['sort'];\n\treturn $url;\n}", "protected function generateURL()\n {\n $options = http_build_query(array_slice($this->options,0,5));\n $this->baseUrl = sprintf($this->baseUrl,$this->uID,$this->api,$options);\n return $this->baseUrl;\n }", "function gdlr_core_tweets_link_convert($status){\n\t\t\t$status = preg_replace(\"/([\\w]+\\:\\/\\/[\\w\\-?&;#~=\\.\\/\\@]+…)/\", \"\", $status);\n\t\t\t$status = preg_replace(\"/([\\w]+\\:\\/\\/[\\w\\-?&;#~=\\.\\/\\@]+[\\w\\/])/\", \"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", $status);\n\n\t\t\t// convert # to twitter searches in <a> links\n\t\t\t$status = preg_replace(\"/#(.+?)(?=[\\s.,:,\\(\\)]|$)/\", \"<a target=\\\"_blank\\\" href=\\\"http://twitter.com/search?q=$1\\\">#$1</a>\", $status);\n\n\t\t\t// convert @ to twitter profiles in <a> links\n\t\t\t$status = preg_replace(\"/@(.+?)(?=[\\s.,:,\\(\\)]|$)/\", \"<a href=\\\"http://www.twitter.com/$1\\\">@$1</a>\", $status);\n\n\t\t\treturn $status;\n\t\t}", "function genTwitterUrl($key, $secret){\n\n //Check to ensure if session was set\n if(session_status() === PHP_SESSION_NONE || session_id() === ''){\n session_start();\n }\n /* Build TwitterOAuth object with client credentials. */\n $con = new TwitterOAuth($key, $secret);\n\n // Get temporary credentials.\n $request_token = $con->getRequestToken(@$_REQUEST['oauth_verifier']);\n // Save temporary credentials to file. NOT THE BEST IMPLEMENTATION BUT SESSION IS NOT PERSISTING SOMEHOW.\n $token = $request_token['oauth_token'];\n $token_secret = $request_token['oauth_token_secret'];\n $f = fopen('f.txt', 'w');\n fwrite($f, $token . ',' . $token_secret);\n fclose($f);\n // Build authorize URL to Twitter.\n $url = $con->getAuthorizeURL($token);\n return $url;\n }", "function format_twitter_links($inputstring) {\n\t$twitter_start = 'https://twitter.com/';\n\t$tw_url_exploded = explode('/', $inputstring);\n\t$file_name = 'tw_screenshot-'.$tw_url_exploded[count($tw_url_exploded)-1].'.png';\n\t$raw_insert = '<span style=\"display:block;height:1em;width:100%%;\"></span>'.\"\\n\".'<center>'.\"\\n\".'<p style=\"text-align: center;margin:0;padding:0;\">'.\"\\n\".'<a href=\"%1$s\" style=\"text-decoration:none !important;border:none!important;\" style=\"color:#CE4815;font-weight:bold;text-decoration:none;\"><img src=\"%2$s\" aria-hidden=\"true\" width=\"80%%\" border=\"0\" style=\"height:auto;background:#ffffff;font-family:sans-serif; width:80%%;font-size:15px;line-height:100%%;color:#555555;display:block;margin:0 auto;\"></a>'.\"\\n\".'</p>'.\"\\n\".'</center>'.\"\\n\".'<span style=\"display:block;height:1em;width:100%%;\"></span>'.\"\\n\";\n\tif (substr($inputstring, 0, strlen($twitter_start)) === $twitter_start) {\n\t\t// NOTE: Gets a screenshot of a tweet, but it's not a very pretty one a lot of the time\n\t\t$tw_screenshot_raw = 'https://audubon-tweets.herokuapp.com/img?url='.$inputstring;\n\t\t$tw_screenshot = file_get_contents($tw_screenshot_raw);\n\t\tfile_put_contents('./temp/'.$file_name, $tw_screenshot);\n\t\t// Put the image on Extras and use it\n\t\t$extras_url = 'https://extras.denverpost.com/newsletter/screenshots/'.$file_name;\n\t\tif (do_ftp($file_name)) {\n\t\t\treturn sprintf($raw_insert,trim($inputstring),trim($extras_url));\n\t\t} else {\n\t\t\treturn $inputstring;\n\t\t}\n\t} else {\n\t\treturn $inputstring;\n\t}\n}", "public static function create($tweet = null, $options = array()) {\n\t\t$defaults = array(\n\t\t\t'escape' => false,\n\t\t\t'full_encode' => false,\n\t\t\t'class_url' => 'url',\n\t\t\t'class_user' => 'username',\n\t\t\t'class_list' => 'list',\n\t\t\t'class_hash' => 'hashtag',\n\t\t\t'url_base_user' => 'https://twitter.com/',\n\t\t\t'url_base_list' => 'https://twitter.com/',\n\t\t\t'url_base_hash' => 'https://twitter.com/#!/search?q=%23',\n\t\t\t'nofollow' => true,\n\t\t\t'external' => true,\n\t\t\t'target' => '_blank',\n\t\t);\n\t\t$options = am($defaults, $options);\n\n\t\t$autoLink = new self($tweet, $options['escape'], $options['full_encode']);\n\t\t$autoLink\n\t\t\t->setURLClass($options['class_url'])\n\t\t\t->setUsernameClass($options['class_user'])\n\t\t\t->setListClass($options['class_list'])\n\t\t\t->setHashtagClass($options['class_hash'])\n\t\t\t->setNoFollow($options['nofollow'])\n\t\t\t->setExternal($options['external'])\n\t\t\t->setTarget($options['target'])\n\t\t\t->setUrlBaseUser($options['url_base_user'])\n\t\t\t->setUrlBaseList($options['url_base_list'])\n\t\t\t->setUrlBaseHash($options['url_base_hash'])\n\t\t;\n\t\treturn $autoLink;\n\t}", "public static function shareTwitterURL($url, $title)\n\t{\n\t\treturn 'http://twitter.com/home?status=' . urlencode($title) . '+' . urlencode($url);\n\t}", "public function create_url ( $url, $tweet_id ) {\n\t\t$this->db->insert(\"tweet_urls\", array(\n\t\t\t\"created_at\" => time(),\n\t\t\t\"tweet_id\" => $tweet_id,\n\t\t\t\"url\" => $url[\"url\"],\n\t\t\t\"tco_url\" => $url[\"tco\"],\n\t\t\t\"text\" => $url[\"text\"]\n\t\t));\n\n\t\treturn $this->db->insert_id();\n\t}", "function email_template_shortcode_ticket_url( $atts ) {\n\t\treturn $this->tmp( 'ticket_url' );\n\t}", "public function toTwitter($post) {\n }", "public function buildURL()\n\t{\n\t\t$url = self::HTTP_URL;\n\n\t\t// Building the URL\n\t\tif ($this->useSecureURL() OR Request::current()->secure())\n\t\t{\n\t\t\t$url = self::HTTPS_URL;\n\t\t}\n\n\t\t$url .= $this->getEmailHash($this->_email);\n\n\t\t$query = array(\n\t\t\t's' => $this->getSize(),\n\t\t\t'r' => $this->getRating(),\n\t\t);\n\n\t\tif ($this->getDefaultImage())\n\t\t{\n\t\t\t$query = Arr::merge($query, array('d' => $this->getDefaultImage()));\n\t\t}\n\n\t\tif ($this->isForceDefault())\n\t\t{\n\t\t\t$query = Arr::merge($query, array('f' => 'y'));\n\t\t}\n\n\t\t$url .= URL::query($query, FALSE);\n\n\t\treturn $url;\n\t}", "function genrate_login_url()\n {\n $tw = new TwitterOAuth(CONSUMER_KEY,CONSUMER_SECRET);\n\n //include_once('proxy.php');\n\n // get a request token from twitter\n $req_token = $tw->oauth('oauth/request_token',['oauth_callback'=>OAUTH_CALLBACK]);\n // save twitter token info to the session for verify access token\n $_SESSION['oauth_token'] = $req_token['oauth_token'];\n $_SESSION['oauth_token_secret'] = $req_token['oauth_token_secret'];\n\n $url = $tw->url('oauth/authorize',['oauth_token'=>$req_token['oauth_token']]);\n\n return $url;\n }", "private function buildUrl()\n {\n return 'http://' . $this->config[self::CONFIG_API_HOST] \n . $this->config[self::CONFIG_API_URL];\n }", "static function buildURL($args = []);", "public function gen_tracking_invite_sent_url()\n {\n $params = array( 'u' => $_GET['kt_ut'] );\n if(isset($_GET['kt_uid'])) $params['s'] = $_GET['kt_uid'];\n if(isset($_GET['kt_st1'])) $params['st1'] = $_GET['kt_st1'];\n if(isset($_GET['kt_st2'])) $params['st2'] = $_GET['kt_st2'];\n if(isset($_GET['kt_st3'])) $params['st3'] = $_GET['kt_st3'];\n\n if(isset($_REQUEST['ids'])){\n $params['r'] = join(',' , $_REQUEST['ids']);\n }\n\n return $this->m_kt_comm_layer->gen_tracking_url('v1', 'ins', $params);\n }", "function wpacc_tweet_linkify( $text ) {\n\n\t$text = preg_replace( \"#(^|[\\n ])([\\w]+?://[\\w]+[^ \\\"\\n\\r\\t< ]*)#\", '\\\\1<a href=\"\\\\2\" title=\"externe site\" rel=\"nofollow\">\\\\2</a>', $text );\n\t$text = preg_replace( \"#(^|[\\n ])((www|ftp)\\.[^ \\\"\\t\\n\\r< ]*)#\", '\\\\1<a href=\"http://\\\\2\" title=\"externe site\" rel=\"nofollow\">\\\\2</a>', $text );\n\t$text = preg_replace( '/@(\\w+)/', '<a href=\"http://www.twitter.com/\\\\1\" title=\"externe site\" rel=\"nofollow\">@\\\\1</a>', $text );\n\t// $text = preg_replace( '/#(\\w+)/', '<a href=\"http://search.twitter.com/search?q=\\\\1\" title=\"externe site\" rel=\"nofollow\">#\\\\1</a>', $text );\n\n\treturn $text;\n\n}", "public function format_tweet( $text ) {\n\t\t$text = preg_replace( '#(^|[\\n ])([\\w]+?://[\\w]+[^ \\\"\\n\\r\\t< ]*)#', '\\\\1<a href=\\\"\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>', $text );\n\t\t$text = preg_replace( '#(^|[\\n ])((www|ftp)\\.[^ \\\"\\t\\n\\r< ]*)#', '\\\\1<a href=\\\"http://\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>', $text );\n\t\t$text = preg_replace( '/@(\\w+)/', '<a href=\\\"http://www.twitter.com/\\\\1\\\" target=\\\"_blank\\\">@\\\\1</a>', $text );\n\t\t$text = preg_replace( '/#(\\w+)/', '<a href=\\\"http://twitter.com/search?q=%23\\\\1&src=hash\\\" target=\\\"_blank\\\">#\\\\1</a>', $text );\n\t\treturn $text;\n\t}", "function fn_hybrid_auth_url_post(&$_url, $area, $url, $protocol, $company_id_in_url, $lang_code, $locations)\n{\n if ($url === '/auth/twitter') {\n $_url = $locations[$area][$protocol] . $url;\n }\n}", "public function generateUrl()\n {\n\n return sprintf('%s%s',\n $this->service->getUrl(),\n $this->generateResourcePath());\n }", "function tw_link($text) {\r\n $text = preg_replace(\"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\", \"<a href=\\\"\\\\0\\\" target=\\'_blank\\'>\\\\0</a>\", $text);\r\n $text = preg_replace(\"/\\B@(\\w+(?!\\/))\\b/i\", '<a href=\"https://twitter.com/\\\\1\" target=\\\"_blank\\\">@\\\\1</a>', $text);\r\n $text = preg_replace(\"/\\B(?<![=\\/])#([\\w]+[a-z]+([0-9]+)?)/i\",'<a href=\"https://twitter.com/#!/search/%23\\\\1\" target=\\\"_blank\\\">#\\\\1</a>', $text);\r\n return $text;\r\n}", "public function GetShareServiceUrl() {\t\t\r\r\n\t\t$queryStringArray = array(\r\r\n\t\t\t\"url\" => $this->GetUrl(),\r\r\n\t\t\t\"title\" => $this->GetTitle(),\r\r\n\t\t\t\"bodytext\" => $this->GetDescription()\r\r\n\t\t);\r\r\n\t\t\r\r\n\t\tif(!empty($this->media)){\r\r\n\t\t\t$queryStringArray[\"media\"] = $this->media;\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\tif(!empty($this->topic)){\r\r\n\t\t\t$queryStringArray[\"topic\"] = $this->topic;\r\r\n\t\t}\r\r\n\r\r\n\t\t\r\r\n\t\treturn $this->GetBasicShareServiceUrl() . http_build_query($queryStringArray);\r\r\n\t}", "public function generate_twitter_creator() {\n\t\treturn '';\n\t}", "public function getPostUrl(): string\n {\n return\n rtrim($this->context->getServiceUrl(), '/') .\n '/v3/conversations/' .\n $this->context->getConversationId() .\n '/activities/' .\n urlencode($this->context->getId());\n }", "private function generate_whatsapp_share_link( $text ) {\n\t\t// See https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat\n\t\treturn 'https://wa.me/?text=' . urlencode( $text );\n\t}", "private function process_links($tweet) {\n\t\tif(isset($tweet->retweeted_status)) {\n\t\t\t// Split it so indices count correctly for @mentions etc.\n\t\t\t$rt_section = current(explode(\":\", $tweet->text));\n\t\t\t$text = $rt_section.\": \";\n\t\t\t// Get Text\n\t\t\t$text .= $tweet->retweeted_status->text;\n\t\t} else {\n\t\t\t// Not a retweet - get Tweet\n\t\t\t$text = $tweet->text;\n\t\t}\n\n\t\t// NEW Link Creation from clickable items in the text\n\t\t$text = preg_replace('/((http)+(s)?:\\/\\/[^<>\\s]+)/i', '<a href=\"$0\" target=\"_blank\" rel=\"nofollow\">$0</a>', $text );\n\t\t// Clickable Twitter names\n\t\t$text = preg_replace('/[@]+([A-Za-z0-9-_]+)/', '<a href=\"http://twitter.com/$1\" target=\"_blank\" rel=\"nofollow\">@$1</a>', $text );\n\t\t// Clickable Twitter hash tags\n\t\t$text = preg_replace('/[#]+([A-Za-z0-9-_]+)/', '<a href=\"http://twitter.com/search?q=%23$1\" target=\"_blank\" rel=\"nofollow\">$0</a>', $text );\n\t\t// END TWEET CONTENT REGEX\n\t\treturn $text;\n\t}", "public function url(){\n\t\treturn 'https://youtu.be/'.$this->codigo;\n\t}", "private function buildUrl(string $username): string\n {\n return $this->apiUrl . $username;\n }", "private function concatURL()\r\n {\r\n \r\n $this->full_shorten_url = sprintf($this->bitly_shorten_url, $this->bit_login, $this->bit_apiKey, $this->target_url);\r\n \r\n return $this->full_shorten_url;\r\n \r\n \r\n }", "function tf_escape_site_to_twitter ( $newvalue ){\n\t\n\tif (!$newvalue)\n\t\treturn;\n\n\tif( strpos ( $newvalue, 'twitter.' ) !== false ) {\n\t\t$newvalue = esc_url( $newvalue );\n\n\t} else {\n\t\t$newvalue = ltrim( $newvalue, '@');\n\t\t$newvalue = 'http://twitter.com/' . $newvalue;\n\t}\n\t\t\n\treturn $newvalue;\t\t\n}", "public function getTwitterAttribute($value)\r\n {\r\n return '<a href=' . $value . ' target=\"_blank\"><img src=\"/img/twitter.png\" width=\"25\" height=\"25\"></a>';\r\n }", "public function _create_url($method)\n\t{\n\t\treturn $this->url_base.$method;\n\t}", "protected function makeBaseString()\n {\n $parametersContainer = [];\n //Twitter requires parameters to be sorted alphabetically by key.\n ksort($this->oauth);\n foreach ($this->oauth as $key => $value) {\n //Returns strings as \"key=value\"\n array_push($parametersContainer, \"$key=\" . rawurlencode($value));\n }\n return \"GET&\" . rawurlencode($this->baseUrl) . '&' . rawurlencode(implode('&', $parametersContainer));\n }", "function tweeturl($callback){\n $_SESSION['tw'] = array();\n\n /* Build TwitterOAuth object with client credentials. */\n $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);\n \n /* Get temporary credentials. */\n $request_token = $connection->getRequestToken($callback);\n\n /* Save temporary credentials to session. */\n $_SESSION['tw']['oauth_token'] = $token = $request_token['oauth_token'];\n $_SESSION['tw']['oauth_token_secret'] = $request_token['oauth_token_secret'];\n \n /* If last connection failed don't return authorization link. */\n if (200 != $connection->http_code) {\n $_SESSION['tw'] = array();\n return false;\n }\n\n /* Build authorize URL. */\n $url = $connection->getAuthorizeURL($token);\n return $url;\n}", "public function buildURL()\r\n {\r\n $url = $this->secure === false ? 'http://' : 'https://';\r\n $url .= $this->base;\r\n if(count($this->uri) > 0) {\r\n $url .= '/' . implode('/', $this->uri);\r\n }\r\n if(count($this->parameters) > 0) {\r\n $url .= '?' . implode('&', $this->parameters);\r\n }\r\n return $url;\r\n }", "private function generate_threema_share_link( $text ) {\n\t\treturn 'threema://compose?text=' . urlencode( $text );\n\t}", "function formatTweet($str){\n\n // Linkifying URLs, mentionds and topics. Notice that\n // each resultant anchor type has a unique class name.\n\n $str = preg_replace(\n '/((ftp|https?):\\/\\/([-\\w\\.]+)+(:\\d+)?(\\/([\\w\\/_\\.]*(\\?\\S+)?)?)?)/i',\n '<a class=\"link\" href=\"$1\" target=\"_blank\">$1</a>',\n $str\n );\n\n $str = preg_replace(\n '/(\\s|^)@([\\w\\-]+)/',\n '$1<a class=\"mention\" href=\"http://twitter.com/#!/$2\" target=\"_blank\">@$2</a>',\n $str\n );\n\n $str = preg_replace(\n '/(\\s|^)#([\\w\\-]+)/',\n '$1<a class=\"hash\" href=\"http://twitter.com/search?q=%23$2\" target=\"_blank\">#$2</a>',\n $str\n );\n\n return $str;\n }", "public function setUrlBase()\r\n {\r\n switch ( $this->feed_type ) {\r\n case \"hometimeline\":\r\n $this->base_url = 'https://api.twitter.com/1.1/statuses/home_timeline.json';\r\n break;\r\n case \"search\":\r\n $this->base_url = 'https://api.twitter.com/1.1/search/tweets.json';\r\n break;\r\n\t case \"hashtag\":\r\n\t\t $this->base_url = 'https://api.twitter.com/1.1/search/tweets.json';\r\n\t\t break;\r\n case \"mentionstimeline\":\r\n $this->base_url = 'https://api.twitter.com/1.1/statuses/mentions_timeline.json';\r\n break;\r\n\t case \"lists\":\r\n\t\t $this->base_url = 'https://api.twitter.com/1.1/lists/statuses.json';\r\n\t\t break;\r\n\t case \"listsmeta\":\r\n\t\t $this->base_url = 'https://api.twitter.com/1.1/lists/list.json';\r\n\t\t break;\r\n\t case \"accountlookup\":\r\n\t \t$this->base_url = 'https://api.twitter.com/1.1/account/verify_credentials.json';\r\n\t \tbreak;\r\n\t case \"userslookup\":\r\n\t\t $this->base_url = 'https://api.twitter.com/1.1/users/lookup.json';\r\n\t\t break;\r\n default:\r\n $this->base_url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';\r\n }\r\n }", "public function getShareUrl(){\n\t\treturn $this->_baseUrl.\n\t\t'?url='.urlencode($this->getUrl()).\n\t\t'&title='.urlencode($this->getTitle()).\n\t\t'&description='.urlencode($this->getDescription())\n\t\t;\n\t}", "function twitter_linkify($str)\n{\n\t$str = preg_replace('/(https?:\\/\\/[^\\s\"<>]+)/','<a href=\"$1\" target=\"_blank\">$1</a>', $str);\n\t$str = preg_replace('/(^|[\\n\\s])@([^\\s\"\\t\\n\\r<:]*)/is', '$1<a href=\"http://twitter.com/$2\" target=\"_blank\">@$2</a>', $str);\n\t$str = preg_replace('/(^|[\\n\\s])#([^\\s\"\\t\\n\\r<:]*)/is', '$1<a href=\"http://twitter.com/search?q=%23$2\" target=\"_blank\">#$2</a>', $str);\n\n\treturn $str;\n}", "public function buildUrl()\n {\n return sprintf(static::URL, $this->secure ? 'https' : 'http', $this->ip, $this->field);\n }", "function notify_shortcode_ticket_url( $atts ) {\n\t\tif ( ! $this->tmp( 'attendee_id' ) )\n\t\t\treturn;\n\n\t\t$edit_token = get_post_meta( $this->tmp( 'attendee_id' ), 'tix_edit_token', true );\n\t\treturn $this->get_edit_attendee_link( $this->tmp( 'attendee_id' ), $edit_token );\n\t}", "public function get_create_url() : string\n {\n }", "function linkify_text($raw_text, $tweet = NULL)\n{\n $output = $raw_text;\n\n // create xhtml safe text (mostly to be safe of ampersands)\n $output = htmlentities(html_entity_decode($raw_text, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8');\n\n // parse urls\n if ($tweet == NULL)\n {\n // for regular strings, just create <a> tags for each url\n $pattern = '/([A-Za-z]+:\\/\\/[A-Za-z0-9-_]+\\.[A-Za-z0-9-_:%&\\?\\/.=]+)/i';\n $replacement = '';\n// $replacement = '<br /><a href=\"${1}\" rel=\"external\">${1}</a>';\n $output = preg_replace($pattern, $replacement, $output);\n } else {\n // for tweets, let's extract the urls from the entities object\n foreach ($tweet->entities->urls as $url)\n {\n $old_url = $url->url;\n $expanded_url = (empty($url->expanded_url)) ? $url->url : $url->expanded_url;\n $display_url = (empty($url->display_url)) ? $url->url : $url->display_url;\n $replacement = '<br /><a href=\"'.$expanded_url.'\" rel=\"external\">'.$display_url.'</a>';\n $output = str_replace($old_url, $replacement, $output);\n }\n\n // let's extract the hashtags from the entities object\n foreach ($tweet->entities->hashtags as $hashtags)\n {\n $hashtag = '#'.$hashtags->text;\n $replacement = '<br /><a href=\"http://twitter.com/search?q=%23'.$hashtags->text.'\" rel=\"external\">'.$hashtag.'</a>';\n $output = str_ireplace($hashtag, $replacement, $output);\n }\n\n // let's extract the usernames from the entities object\n foreach ($tweet->entities->user_mentions as $user_mentions)\n {\n $username = '@'.$user_mentions->screen_name;\n $replacement = '<br /><a href=\"http://twitter.com/'.$user_mentions->screen_name.'\" rel=\"external\" title=\"'.$user_mentions->name.' on Twitter\">'.$username.'</a>';\n $output = str_ireplace($username, $replacement, $output);\n }\n\n // if we have media attached, let's extract those from the entities as well\n if (isset($tweet->entities->media))\n {\n foreach ($tweet->entities->media as $media)\n {\n $old_url = $media->url;\n $replacement = '<br /><span class=\"glyphicon glyphicon-picture\" style=\"color:#fff;\"></span> <a href=\"'.$media->expanded_url.'\" rel=\"external\" class=\"twitter-media\" data-media=\"'.$media->media_url.'\">'.$media->display_url.'</a>';\n $output = str_replace($old_url, $replacement, $output);\n }\n }\n }\n\n return $output;\n}", "public static function getOAuthRedirectUrl() {\n\n $routePrefix = System::getContainer()->getParameter('contao.backend.route_prefix');\n\n $url = Environment::get('url') . Environment::get('path');\n $url = str_replace('http:','https:',$url);\n $url = $url . $routePrefix . '?do=' . Input::get('do') . '&mod=' . Input::get('mod') . '&table=' . Input::get('table');\n\n return $url;\n }", "function addTweetEntityLinks( $tweet, $add_links) {\n $tweetText = $tweet['text'];\n \n // If we want to actually add the links\n if($add_links == 1){\n // create an array to hold urls\n $tweetEntites = array();\n \n // add each url to the array\n foreach( $tweet['entities']['urls'] as $url ) {\n $tweetEntites[] = array (\n 'type' => 'url',\n 'curText' => substr( $tweetText, $url['indices'][0], ( $url['indices'][1] - $url['indices'][0] ) ),\n 'newText' => '<a href=\"' . $url['expanded_url'] . '\" itemprop=\"sameAs\" target=\"_blank\">'.$url['display_url'].'</a>'\n );\n } // end foreach\n \n // add each user mention to the array\n foreach ( $tweet['entities']['user_mentions'] as $mention ) {\n $string = substr( $tweetText, $mention['indices'][0], ( $mention['indices'][1] - $mention['indices'][0] ) );\n $tweetEntites[] = array (\n 'type' => 'mention',\n 'curText' => mb_substr( $tweetText, $mention['indices'][0], ( $mention['indices'][1] - $mention['indices'][0] ), 'UTF-8'),\n 'newText' => '<a href=\"http://twitter.com/' .$mention['screen_name'].'\" itemprop=\"sameAs\" target=\"_blank\">'.$string.'</a>'\n );\n } // end foreach\n \n // add each hashtag to the array\n foreach ( $tweet['entities']['hashtags'] as $tag ) {\n $string = substr( $tweetText, $tag['indices'][0], ( $tag['indices'][1] - $tag['indices'][0] ) );\n $tweetEntites[] = array (\n 'type' => 'hashtag',\n 'curText' => substr( $tweetText, $tag['indices'][0], ( $tag['indices'][1] - $tag['indices'][0] ) ),\n 'newText' => '<a href=\"http://twitter.com/search?q=%23'.$tag['text'].'&src=hash\" target=_blank>'.$string.'</a>'\n );\n } // end foreach\n \n // replace the old text with the new text for each entity\n foreach ( $tweetEntites as $entity ) {\n $tweetText = str_replace( $entity['curText'], $entity['newText'], $tweetText );\n } // end foreach\n \n return $tweetText;\n } else {\n return $tweetText;\n }\n }", "function tadc_generate_launch_url($tadcHost, $tadcTenantCode)\n{\n if(substr($tadcHost, -1) !== \"/\")\n {\n $tadcHost .= \"/\";\n }\n return $tadcHost . $tadcTenantCode . TADC_LTI_LAUNCH_PATH;\n}", "public function toUrl(): string\n {\n $postData = $this->toPostdata();\n $out = $this->getNormalizedHttpUrl();\n if ($postData) {\n $out .= '?' . $postData;\n }\n return $out;\n }", "function shortcodetwitter_sharetwitter( $atts, $content = null ) {\n $atts_sharetwitter = shortcode_atts( array(\n 'text' => 'Compartir en Twitter',\n 'size' => 'small',\n ), $atts );\n\n\t$link_twitter = 'http://twitter.com/intent/tweet?url=' . urlencode( get_permalink() ) . '&amp;text=' . urlencode( get_the_title() );\n\t\n\t$bigclass = '';\n\tif ( $atts_sharetwitter['size'] == 'big' )\n\t\t$bigclass = 'sct-twitter-big';\n\t\n\t$content = '<a class=\"sct-twitter ' . $bigclass . '\" target=\"_blank\" href=\"' . $link_twitter . '\">' . $atts_sharetwitter['text'] . '</a>';\n\t\n\treturn $content;\n}", "function generateLink( $id ){\n return 'http://www.youtube.com/watch?v=' . trim($id);\n }", "function glue_url ($parsed) {\n\t\t// See http://www.php.net/manual/en/function.parse-url.php\n\t\tif (! is_array($parsed)) return false;\n\t\t$uri = isset($parsed['scheme']) ? $parsed['scheme'].':'.((strtolower_codesafe($parsed['scheme']) == 'mailto') ? '':'//'): '';\n\t\t$uri .= isset($parsed['user']) ? $parsed['user'].($parsed['pass']? ':'.$parsed['pass']:'').'@':'';\n\t\t$uri .= isset($parsed['host']) ? $parsed['host'] : '';\n\t\t$uri .= isset($parsed['port']) ? ':'.$parsed['port'] : '';\n\t\t$uri .= isset($parsed['path']) ? $parsed['path'] : '';\n\t\t$uri .= isset($parsed['query']) ? '?'.$parsed['query'] : '';\n\t\t$uri .= isset($parsed['fragment']) ? '#'.$parsed['fragment'] : '';\n\t\treturn $uri;\n\t}", "public function generateNewLink() {\r\n\t\treturn Core::getBaseUrl() . \"/s/\" . $this->shortUrl;\r\n\t}", "public function getURL()\n {\n $url_params = \"\";\n\n if (!empty($this->event_type_filter)) {\n $url_params .= $this->getEventTypeURLParam($url_params);\n }\n\n if (!empty($this->audience_filter)) {\n $url_params .= $this->getAudienceURLParam($url_params);\n }\n\n $url = self::generateURL($this->calendar);\n\n return $url . $url_params;\n }", "protected function buildUrl($mobile_no, $otp)\n {\n $this->url .= config('bueno.voice_otp_api.key') . \"/VOICE/\" . $mobile_no . \"/\" . $otp;\n }", "static function createLinkUrl($controller, $action) \n\t{\n $baseUrl=Registry::get('baseurl');\n \n echo $baseUrl . '/' . $controller . '/' . $action; \n }", "public function getAuthorizeUrl($requestToken) {\n\t\tif (is_string($requestToken)) {\n\t\t\t$requestToken = array('oauth_token' => $requestToken);\n\t\t}\n\t\treturn 'https://api.twitter.com/oauth/authorize?' . http_build_query($requestToken);\n\t}", "public static function twitterLinks($text) {\n\t\t\t//Convert urls to <a> links\n\t\t\t$text = preg_replace(\"/([\\w]+\\:\\/\\/[\\w\\-?&;#~=\\.\\/\\@_]+[\\w\\/])/\", \"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", $tweet);\n\t\t\t\n\t\t\t//Convert hashtags to twitter searches in <a> links\n\t\t\t$text = preg_replace(\"/#([A-Za-z0-9\\/\\._]*)/\", \"<a target=\\\"_blank\\\" href=\\\"http://twitter.com/search?q=$1\\\">#$1</a>\", $tweet);\n\t\t\t\n\t\t\t//Convert attags to twitter profiles in <a> links\n\t\t\t$text = preg_replace(\"/@([A-Za-z0-9\\/\\._]*)/\", \"<a href=\\\"http://www.twitter.com/$1\\\" target=\\\"_blank\\\">@$1</a>\", $tweet);\n\t\t\t\n\t\t\treturn $text;\n\t\t}", "private function build_url(string $_action, ?array $_args = null): string\n {\n //\n // if there were arguments passed in\n //\n if (is_null($_args) == false)\n {\n return $this->m_client->url() . $_action . '.json' . '?' . http_build_query($_args);\n } else\n {\n return $this->m_client->url() . $_action . '.json';\n }\n }", "public function generateUrl()\n\t{\n\t\tif(!$this->permission['events']) return Redirect::to('/');\n\t\t\n\t\t$url = Str::slug(Input::get('title'));\n\t\t$urlCount = count(AppEvent::where('url', '=', $url)->get());\n\t\treturn ($urlCount > 0) ? \"{$url}-{$urlCount}\" : $url;\n\t}", "public static function makeOpenIDURL() {\r\n\t\tself::$error = self::initParams();\r\n\t\tif (self::$error !== null) return null;\r\n\t\r\n\t\t$req = self::getOpenIDRequest();\r\n\t\r\n\t\treturn self::endpoint .'?'. http_build_query($req,'','&');\r\n\t}", "function getURL()\n {\n $date = explode('-', $this->eventdatetime->starttime);\n $day = explode(' ', $date[2]);\n $f = array('y'=>$date[0],\n 'm'=>$date[1],\n 'd'=>$day[0],\n 'eventdatetime_id'=>$this->eventdatetime->id);\n if (isset($this->calendar)) {\n $f['calendar'] = $this->calendar->id;\n }\n return UNL_UCBCN_Frontend::formatURL($f);\n }", "function ink_wp_shortcode($content=null){\r\n\t$post_url = get_permalink($post->ID);\r\n\t$post_title = get_the_title($post->ID);\r\n\t$tweet = '<a style=\"color:blue; font-size:20px;\" href=\"http://twitter.com/home/?status=Read'. $post_title .'at'. $post_url .'\"><b>Share on Twitter</b></a>';\r\n\treturn $tweet;\r\n}", "function createUri(){\n\t\t$tmp = '/' .$this->getPath();\n\t\tforeach ($this->parameters as $key => $value){\n\t\t\t$tmp .= '/' .$key .'/' .$value;\n\t\t}\n\t\t$this->uri = $tmp;\n\t\treturn $this->uri;\n\t}", "private function buildQueryUrl(){\n if ($this->otpType == ServerData::$SMS_OTP_TYPE)\n return ServerData::$OTP_PATH . \"/\" . ServerData::$SMS_OTP_TYPE . \"/\" . $this->phone;\n return ServerData::$OTP_PATH . \"/\" . ServerData::$VOICE_OTP_TYPE . \"/\" . $this->phone;\n }", "function formatTweet($tweet) {\r\n\t$linkified = '@(https?://([-\\w\\.]+[-\\w])+(:\\d+)?(/([\\w/_\\.#-]*(\\?\\S+)?[^\\.\\s])?)?)@';\r\n\t$hashified = '/(^|[\\n\\s])#([^\\s\"\\t\\n\\r<:]*)/is';\r\n\t$mentionified = '/(^|[\\n\\s])@([^\\s\"\\t\\n\\r<:]*)/is';\r\n\t$prettyTweet = preg_replace(\r\n\t\tarray(\r\n\t\t\t$linkified,\r\n\t\t\t$hashified,\r\n\t\t\t$mentionified\r\n\t\t), \r\n\t\tarray(\r\n\t\t\t'<a href=\"$1\" class=\"link-tweet\" target=\"_blank\">$1</a>',\r\n\t\t\t'$1<a class=\"link-hashtag\" href=\"https://twitter.com/search?q=$2&src=hash\" target=\"_blank\">#$2</a>',\r\n\t\t\t'$1<a class=\"link-mention\" href=\"http://twitter.com/$2\" target=\"_blank\">@$2</a>'\r\n\t\t), \r\n\t\t$tweet\r\n\t);\r\n\treturn $prettyTweet;\r\n}", "public static function url($profile)\n\t{\n\t\tif (preg_match('#^[a-z0-9\\_\\-]+$#i', $profile))\n\t\t\treturn \"https://www.twitter.com/{$profile}\";\n\t\treturn null;\n\t}", "public function getLoginUrl()\n\t{\n\t\t$this->twitterOAuth = new Abraham\\TwitterOAuth\\TwitterOAuth($this->params['consumerKey'], $this->params['consumerSecret']);\n\t\t$this->requestToken = $this->twitterOAuth->oauth(\n\t\t\t'oauth/request_token',\n\t\t\t[\n\t\t\t\t'oauth_callback' => $this->params['callbackURL'],\n\t\t\t],\n\t\t);\n\n\t\t$sessionSection = $this->session->getSection('twitter');\n\t\t$sessionSection->oauth_token = $token = $this->requestToken['oauth_token'];\n\t\t$sessionSection->oauth_token_secret = $this->requestToken['oauth_token_secret'];\n\n\t\t$loginUrl = $this->twitterOAuth->url(\n\t\t\t'oauth/authorize',\n\t\t\t[\n\t\t\t\t'oauth_token' => $this->requestToken['oauth_token'],\n\t\t\t],\n\t\t);\n\t\treturn $loginUrl;\n\t}", "public function generate(string $uri): Url;", "function make()\n {\n switch (strtolower($this->WebhookUrlBase)) {\n case 'aws':\n $hostname = file_get_contents(\"http://instance-data.ec2.internal/latest/meta-data/public-hostname\");\n return \"http://\" . $hostname . $this->WebhookUrlSuffix;\n break;\n case 'laravel':\n return URL::to('/') . $this->WebhookUrlSuffix;\n break;\n default:\n return $this->WebhookUrlBase . $this->WebhookUrlSuffix;\n }\n }", "protected function create_facebook_request_url($url){\n\n\t\t$base_url = 'https://graph.facebook.com/v2.7';\n\n\t\t$params = array(\n\t\t\t'id' => $url,\n\t\t\t'access_token' => $this->get_access_token()\n\t\t);\n\n\t\t$url = $base_url . '?' . http_build_query($params);\n\n\t\terror_log($url);\n\n\t\treturn $url;\n\n\t}", "public function logintURL()\n {\n $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);\n $request_token = $connection->getRequestToken(OAUTH_CALLBACK);\n if ($request_token) {\n $token = $request_token['oauth_token'];\n $_SESSION['request_token'] = $token ;\n $_SESSION['request_token_secret'] = $request_token['oauth_token_secret'];\n $_SESSION['login_url'] = $connection->getAuthorizeURL($token);\n header('Location'.filter_var($_SESSION['login_url'], FILTER_SANITIZE_URL));\n }\n }", "protected function _generateLink()\n {\n $request = $this->getRequest();\n\n $link = rtrim($this->_settings['site_path'], '/') . '/' . ltrim($request->getRequestUri(), '/');\n\n $params = $request->getParams();\n\n if (count($params) > 0) {\n $link .= '?';\n\n foreach ($params as $key => $value) {\n if (!is_array($value)) {\n $link .= $key . '=' . $value . '&';\n }\n }\n\n $link = rtrim($link, '&');\n }\n\n return $link;\n }", "public function build_url() {\n\n\t\t\t$this->is_valid();\n\n\t\t\t$parts = array();\n\t\t\tarray_push($parts, $this->httpify($this->endpoint));\n\t\t\tarray_push($parts, '?');\n\t\t\tarray_push($parts, 'url='.urlencode($this->httpify($this->url)).'&');\n\n\t\t\tif ( !empty($this->maxheight) ) array_push($parts, 'maxheight='.$this->maxheight.'&');\n\t\t\tif ( !empty($this->maxwidth) )array_push($parts, 'maxwidth='.$this->maxwidth.'&');\n\n\t\t\tarray_push($parts, $this->build_other_params());\n\t\t\tarray_push($parts, 'format=json');\n\n\t\t\treturn implode('', $parts);\n\t\t}", "protected function _getURL($options) {\r\n\t\t\r\n\t\t// get options\r\n\t\textract($options);\r\n\r\n\t\t// clean options\r\n\t\tforeach (array('from_user', 'to_user', 'ref_user', 'word', 'nots', 'hashtag') as $var) {\r\n\t\t\t$$var = preg_replace('/[@#]/', '', preg_replace('/\\s+/', ' ', trim($$var)));\r\n\t\t}\r\n\t\t\r\n\t\t// build query\r\n\t\t$query = array();\r\n\t\t\r\n\t\tif ($from_user) {\r\n\t\t\t$query[] = 'from:'.str_replace(' ', ' OR from:', $from_user);\r\n\t\t}\r\n\r\n\t\tif ($to_user) {\r\n\t\t\t$query[] = 'to:'.str_replace(' ', ' OR to:', $to_user);\r\n\t\t}\r\n\r\n\t\tif ($ref_user) {\r\n\t\t\t$query[] = '@'.str_replace(' ', ' @', $ref_user);\r\n\t\t}\r\n\r\n\t\tif ($word) {\r\n\t\t\t$query[] = $word;\r\n\t\t}\r\n\r\n\t\tif ($nots) {\r\n\t\t\t$query[] = '-'.str_replace(' ', ' -', $nots);\r\n\t\t}\r\n\r\n\t\tif ($hashtag) {\r\n\t\t\t$query[] = '#'.str_replace(' ', ' #', $hashtag);\r\n\t\t}\r\n\r\n\t\t$limit = min($limit ? intval($limit) : 5, 100);\r\n\r\n\t\t// build timeline url\r\n\t\tif ($from_user && !strpos($from_user, ' ') && count($query) == 1) {\r\n\r\n\t\t\t$url = 'http://twitter.com/statuses/user_timeline/'.strtolower($from_user).'.json';\r\n\r\n\t\t\tif ($limit > 15) {\r\n\t\t\t\t$url .= '?count='.$limit;\r\n\t\t\t}\r\n\r\n\t\t\treturn $url;\r\n\t\t}\r\n\r\n\t\t// build search url\r\n\t\tif (count($query)) {\r\n\r\n\t\t\t$url = 'http://search.twitter.com/search.json?q='.urlencode(implode(' ', $query));\r\n\r\n\t\t\tif ($limit > 15) {\r\n\t\t\t\t$url .= '&rpp='.$limit;\r\n\t\t\t}\r\n\r\n\t\t\treturn $url;\r\n\t\t}\r\n\r\n\t\treturn null;\t\r\n\t}", "function bigbluebuttonbn_getJoinURL( $meetingID, $userName, $PW, $SALT, $URL ) {\n $url_join = $URL.\"api/join?\";\n $params = 'meetingID='.urlencode($meetingID).'&fullName='.urlencode($userName).'&password='.urlencode($PW);\n return ($url_join.$params.'&checksum='.sha1(\"join\".$params.$SALT) );\n}", "function bigbluebuttonbn_getJoinURL( $meetingID, $userName, $PW, $SALT, $URL ) {\n $url_join = $URL.\"api/join?\";\n $params = 'meetingID='.urlencode($meetingID).'&fullName='.urlencode($userName).'&password='.urlencode($PW);\n return ($url_join.$params.'&checksum='.sha1(\"join\".$params.$SALT) );\n}", "public function getOAuthUrl( ) {\n // maybe use user provided OAuth url\n if ( ! empty( $this->oauth_url ) ) {\n return $this->oauth_url;\n }\n \n return 'https://' . ( $this->sandbox ? 'aps' : 'apm' ) . '.fidor.de/oauth';\n }", "private function generateURL(){\n\t\t$pageURL = 'http';\n\t\tif ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n\t\t$pageURL .= \"://\";\n\t\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t\t} else {\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t\t}\n\t\n\t\treturn $pageURL;\n\t}", "function generateUrl($nomefile){\n return 'http://'.$_SERVER['HTTP_HOST'].'/foto/'.$nomefile;\n }", "function StringURL($cadena_origen){\n \n //echo $cadena_origen;\n\n //filtro los enlaces normales\n $cadena_resultante= preg_replace(\"/((http|https|www)[^\\s]+)/\", '<a href=\"$1\">$0</a>', $cadena_origen);\n //miro si hay enlaces con solamente www, si es así le añado el http://\n $cadena_resultante= preg_replace(\"/href=\\\"www/\", 'href=\"http://www', $cadena_resultante);\n //echo '<h3>Cadena filtrada con enlaces normales:</h3>'.$cadena_resultante;\n\n //saco los enlaces de twitter\n $cadena_resultante = preg_replace(\"/(@[^\\s]+)/\", '<a target=\\\"_blank\\\" href=\"http://twitter.com/intent/user?screen_name=$1\">$0</a>', $cadena_resultante);\n $cadena_resultante = preg_replace(\"/(#[^\\s]+)/\", '<a target=\\\"_blank\\\" href=\"http://twitter.com/search?q=$1\">$0</a>', $cadena_resultante);\n //echo '<h3>Cadena filtrada con enlaces de Twitter:</h3>'.$cadena_resultante;\n \n return $cadena_resultante;\n }", "public function generate_twitter_image() {\n\t\t$images = $this->twitter_image_generator->generate( $this->context );\n\t\t$image = \\reset( $images );\n\n\t\t// When there is an image set by the user.\n\t\tif ( $image && $this->context->indexable->twitter_image_source === 'set-by-user' ) {\n\t\t\treturn $image['url'];\n\t\t}\n\n\t\t// When there isn't a set image or there is a Open Graph image set.\n\t\tif ( empty( $image ) || ( $this->context->open_graph_enabled === true && $this->open_graph_images ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn $image['url'];\n\t}", "function formatTweet($tweet) {\n\t\t$linkified = '@(https?://([-\\w\\.]+[-\\w])+(:\\d+)?(/([\\w/_\\.#-]*(\\?\\S+)?[^\\.\\s])?)?)@';\n\t\t$hashified = '/(^|[\\n\\s])#([^\\s\"\\t\\n\\r<:]*)/is';\n\t\t$mentionified = '/(^|[\\n\\s])@([^\\s\"\\t\\n\\r<:]*)/is';\n\t\t\n\t\t$prettyTweet = preg_replace(\n\t\t\tarray(\n\t\t\t\t$linkified,\n\t\t\t\t$hashified,\n\t\t\t\t$mentionified\n\t\t\t), \n\t\t\tarray(\n\t\t\t\t'<a href=\"$1\" class=\"link-tweet\" target=\"_blank\">$1</a>',\n\t\t\t\t'$1<a class=\"link-hashtag\" href=\"https://twitter.com/search?q=%23$2&src=hash\" target=\"_blank\">#$2</a>',\n\t\t\t\t'$1<a class=\"link-mention\" href=\"http://twitter.com/$2\" target=\"_blank\">@$2</a>'\n\t\t\t), \n\t\t\t$tweet\n\t\t);\n\t\t\n\t\treturn $prettyTweet;\n\t}", "protected function getBuiltUrl($urlPart) {\n return getTwitchAPIURL().'/'.$urlPart;\n }", "public function create_click_track_link($source, $url) {\n\t\tif (Config::has_feature(ConfigUserNotifications::ENABLE_CLICK_TRACKING)) {\n\t\t\t$new_url = Url::create(ActionMapper::get_url('clicktrack', $this));\n\t\t\t$new_url->replace_query_parameter('src', $source);\n\t\t\t$new_url->replace_query_parameter('url', $url);\n\t\t\t$new_url->replace_query_parameter('token', $this->click_track_fingerprint($source, $url));\n\t\t\treturn $new_url->build();\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}" ]
[ "0.7270318", "0.6913166", "0.65466297", "0.6431821", "0.6400457", "0.6397411", "0.6325129", "0.6307222", "0.6227301", "0.6216257", "0.6054652", "0.6035848", "0.60230917", "0.60113233", "0.59963375", "0.59593743", "0.5954708", "0.5925143", "0.5918764", "0.58381796", "0.57994413", "0.57642764", "0.5759969", "0.57564527", "0.57503384", "0.57193124", "0.5719281", "0.57040733", "0.5696015", "0.56575316", "0.5656049", "0.56531066", "0.5652175", "0.5652056", "0.56504834", "0.5649236", "0.5641665", "0.5613159", "0.55962026", "0.5591722", "0.55912584", "0.5579959", "0.5579237", "0.5578543", "0.5575556", "0.55718464", "0.556857", "0.5561053", "0.5554259", "0.5550718", "0.55265945", "0.552358", "0.5506808", "0.5486697", "0.5476892", "0.54709077", "0.5463629", "0.54623395", "0.54595864", "0.54523486", "0.544983", "0.54368067", "0.54348445", "0.5433852", "0.5433799", "0.54323053", "0.54295284", "0.54143333", "0.5402562", "0.54008895", "0.5399674", "0.5393713", "0.53922987", "0.53912944", "0.53906274", "0.5390487", "0.5385532", "0.5384228", "0.5380479", "0.5370798", "0.5357409", "0.5357171", "0.53459793", "0.5325862", "0.53239", "0.53202426", "0.5313877", "0.5313301", "0.531063", "0.53026223", "0.52957517", "0.52957517", "0.5295039", "0.52917147", "0.52844304", "0.5279091", "0.5272495", "0.5271684", "0.5269882", "0.52673215" ]
0.7313644
0
Get the max message length depending on platform. If no platform is passed, will get max lengths for all platforms.
Получите максимальную длину сообщения в зависимости от платформы. Если не передано ни одной платформы, будут получены максимальные длины для всех платформ.
public function get_max_message_length( $platform = '' ) { if ( ! empty( $platform ) ) { if ( ! empty( $this->max_message_length[ $platform ] ) ) { // If no set length in options, return default length. return (int) $this->max_message_length[ $platform ]; } return 0; } // If no specific platform, get all of them. $max_lengths = array(); foreach ( $this->max_message_length as $platform_key => $platform_length ) { // If no set length in options, set default length. $max_lengths[ $platform_key ] = (int) $platform_length; } return $max_lengths; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxMessageLength()\n {\n return $this->maxMessageLength;\n }", "public static function getMaxLength(): int {\n\t\treturn self::$maxLength;\n\t}", "public function getMaximumLength()\n {\n if (array_key_exists(\"maximumLength\", $this->_propDict)) {\n return $this->_propDict[\"maximumLength\"];\n } else {\n return null;\n }\n }", "public function getMaxLength()\n {\n return $this->getProperty(self::MAX_LENGTH);\n }", "public function getMaxLength()\r\r\n {\r\r\n return $this->maxLength;\r\r\n }", "public function getMaxLength()\n {\n return $this->maxLength;\n }", "protected function getMaxLength(): int\n {\n return $this->_length;\n }", "public function getMaxLength()\n\t{\n\t\treturn $this->length;\n\t}", "public function getMaxLength();", "public static function getMaxIdentifierLength(AbstractPlatform $platform): int\n {\n $platformName = static::getPlatformIdentifier($platform);\n\n return self::$identifierLimits[$platformName];\n }", "private function _get_max_log_line_size()\n\t{\n\t\t// FIXME - Not flexible.\n\t\t$max_message_length = self::$_max_log_length + 1;\n\t\t$max_date_length = 8;\n\t\t$max_time_length = 10;\n\t\t$max_username_length = 40;\n\t\t$max_type_name_length = 10;\n\t\t\n\t\t$max_log_length = $max_message_length + $max_date_length + $max_time_length + $max_username_length + $max_type_name_length;\n\t\treturn $max_log_length;\n\t}", "public function getMaxlength()\n {\n return $this->_maxlength;\n }", "public function getMaxNumberOfMessages()\n {\n return $this->MaxNumberOfMessages;\n }", "public function getMaxMessageSize()\n {\n return isset($this->settings[self::PARAM_MAX_MESSAGE_SIZE])\n ? (int)$this->settings[self::PARAM_MAX_MESSAGE_SIZE]\n : 0;\n }", "public function getMaximumLineLength() {}", "public function getMaxTextLength(): int\n {\n return $this->max_text_length;\n }", "public function getDefaultLength(AbstractPlatform $platform)\n {\n return 50;\n }", "private function findMaxLength()\n {\n $length = 0;\n foreach ($this->items as $itemValue) {\n $lengthOfProductName = $this->getLengthOfString($itemValue['product']->getName());\n if ($length < $lengthOfProductName) {\n $length = $lengthOfProductName;\n }\n }\n\n return $length;\n }", "public static function getMaximumPathLength() {}", "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "public function getMltMaxWordLength(): int {}", "public function getMltMaxWordLength(): int {}", "public function getLongestCharLength($period = 'm')\n {\n $posts = $this->api->getAllPosts();\n $maximums = [];\n foreach($posts as $post){\n $dt = new DateTime($post['created_time']);\n $month = date($period, $dt->getTimestamp());\n $message_length = strlen($post['message']);\n if ($message_length > $maximums[$month]['max']) {\n $maximums[$month]['max'] = $message_length;\n $maximums[$month]['id'] = $post['id'];\n }\n } \n return $maximums;\n }", "public function getMaxLength(): int\n {\n return (int) \\max($this->rightLength, $this->leftLength, $this->ancestorLength);\n }", "public function getMaxWordLength()\n {\n if (is_null($this->maxWordLength)) {\n return $this->getOptionValue(self::OPTION_MAX_WORD_LENGTH);\n }\n\n return min(\n $this->maxWordLength,\n $this->getOptionValue(self::OPTION_MAX_WORD_LENGTH)\n );\n }", "protected function getPostMaxSize()\n {\n $iniValue = ini_get('post_max_size');\n $postMaxSize = parseShorthandBytes($iniValue);\n\n return $postMaxSize;\n }", "protected function max_length($param)\n\t{\n\t\tif (strpos(strtolower($param['udt_name']), 'varchar') === 0 ) {\n\t\t\t$number = intval($param['character_maximum_length']); // in between parenthesis\n\t\t\treturn $number;\n\t\t}\n\t\treturn null;\n\t}", "function getMaxFileSize()\n {\n $val = ini_get('post_max_size');\n if (strtolower($val[strlen($val)-1]) != 'm')\n $this->reportError('cms/model/config.php getMaxFileSize. post_max_size is '.$val.' and not in Mb');\n $postMaxSize = intval(trim($val));\n\n return($postMaxSize);\n }", "public static function getNativeMaxUpload () {\n $upload_max_filesize = upload::getBytesFromGreek(ini_get('upload_max_filesize'));\n $post_max_size = upload::getBytesFromGreek(ini_get('post_max_size'));\n if ($upload_max_filesize >= $post_max_size) {\n return $post_max_size;\n } else {\n return $upload_max_filesize;\n }\n \n }", "public function getMaxPasswordLength()\n {\n $wordCount = $this->getWordCount();\n\n return ($this->getMaxWordLength() * $wordCount) + (strlen($this->getWordSeparator()) * ($wordCount - 1));\n }", "public static function getMaxSize()\n {\n $maxUpload = File::ini2bytes(ini_get('upload_max_filesize'));\n $maxPost = File::ini2bytes(ini_get('post_max_size'));\n $legalSize = File::ini2bytes(LegalFile::config()->max_size);\n\n return min($maxPost, $maxUpload, $legalSize);\n }", "public function getLengthLimit()\n {\n return $this->property->getDatatype()->getLength();\n }", "protected function getLongestPipeLength()\n\t{\n\t\tif(empty($this->pipes)) return 0;\n\n\t\treturn array_reduce($this->pipes, function($carry, $pipe)\n\t\t{\n\t\t\treturn strlen($pipe) > $carry ? strlen($pipe) : $carry;\n\n\t\t}, static::MIN_PIPE_LENGTH);\n\t}", "public function getLength()\n {\n return 65535;\n }", "public function getMaxSize()\n\t{\n\t\treturn $this->max_size;\n\t}", "public function maxMessageLengthFilter($max, array $message): int\n {\n return \\max($max, strlen($this->filterOutTags($message['output'])));\n }", "public function getMaxSize()\n {\n return $this->max_size;\n }", "function getMaxSize()\n\t{\n\t\treturn $this->_maxsize;\n\t}", "public function getMaxUploadFileSize()\n\t{\n\t\t$objResult = \\Database::getInstance()->prepare(\"SELECT MAX(maxlength) AS maxlength FROM tl_form_field WHERE pid=? AND invisible='' AND type='upload' AND maxlength>0\")\n\t\t\t\t\t\t\t\t\t\t\t ->execute($this->id);\n\n\t\tif ($objResult->numRows > 0 && $objResult->maxlength > 0)\n\t\t{\n\t\t\treturn $objResult->maxlength;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \\Config::get('maxFileSize');\n\t\t}\n\t}", "public function getMaximumPathLength() {\n\t\treturn PHP_MAXPATHLEN;\n\t}", "public static function getMaxUploadSize()\n\t{\n\t\t$phpIniMaxSize = ini_get('upload_max_filesize');\n\t\tif ($phpIniMaxSize &&\n\t\t\tsubstr($phpIniMaxSize, -1) == 'M') {\n\n\t\t\t$phpIniMaxSize = substr($phpIniMaxSize, 0, strlen($phpIniMaxSize) -1) * 1024 * 1024;\n\t\t} else {\n\t\t\t$phpIniMaxSize = NULL;\n\t\t}\n\n\t\t$appIniMaxSize = L8M_Config::getOption('mediabrowser.maxupload');\n\n\t\t$returnValue = $appIniMaxSize;\n\t\tif ($phpIniMaxSize !== NULL &&\n\t\t\t$appIniMaxSize > $phpIniMaxSize) {\n\n\t\t\t$returnValue = $phpIniMaxSize;\n\t\t}\n\n\t\treturn $returnValue;\n\t}", "public static function getMaxBindParameters(AbstractPlatform $platform): int\n {\n $platformName = static::getPlatformIdentifier($platform);\n\n return self::$bindParameterLimits[$platformName];\n }", "protected function extractMaxLength(int $default = 1050): int\n {\n if (!isset($this->attributes['maxlength'])) return $default;\n\n if (Cast::isOptInt($this->attributes['maxlength']))\n {\n $length = Cast::toManInt($this->attributes['maxlength'], $default);\n\n if ($length>=0) return $length;\n }\n\n return $default;\n }", "public function getOtherCountryExperiencesMaxLength(){\n $this->sql = $this->conn->prepare(\"Select CHARACTER_MAXIMUM_LENGTH FROM information_schema.columns WHERE table_schema = '\" . $this->settings[\"database_name\"] . \"' AND table_name = 'users_country_experience' AND COLUMN_NAME = 'other_experience'\");\n $this->sql->execute();\n return $this->sql->fetch(PDO::FETCH_COLUMN);\n }", "public function max($length)\n {\n return $this->maxlength($length);\n }", "function getMaxLength_line()\r\n {\r\n return $this->_maxlength_line;\r\n }", "protected function calcMaxString(array $data = [])\n {\n $maxLength = 0;\n\n foreach ($data as $name) {\n if (strlen($name) > $maxLength) {\n $maxLength = strlen($name);\n }\n }\n\n return $maxLength;\n }", "protected function get_maxlength(){\r\n\t\t\tglobal $db;\r\n\t\t\t$table = $this->form->get_table();\r\n\t\t\t\r\n\t\t\tif($table)\r\n\t\t\t\treturn $db->field_length($table, $this->id);\r\n\t\t\t\r\n\t\t\treturn 0;\r\n\t\t}", "public function getMaxLineLength();", "public function getMaxSize()\n {\n return $this->maxSize;\n }", "function getMaxChars()\n\t{\n\t\treturn ($this->maxchars) ? $this->maxchars : NULL;\n\t}", "public function getLength()\n {\n return $this->parameters['length'] == 1 ? $this->parameters['length'] : null;\n }", "public function GetMaxSize ();", "public function postMaxSize() : int\n {\n return $this->postMaxSize;\n }", "public function getMaxPayload(): int\n {\n return $this->maxPayload;\n }", "public function getPHPMaxFileSize(): ?int\n {\n // Maximum size of an uploaded file (default: 2M)\n $raw = $this->numberService->getBytes((string) ini_get('upload_max_filesize'));\n $uploadMaxFilesize = is_numeric($raw) ? (int) $raw : 2097152;\n if ($uploadMaxFilesize > 0) {\n // Let's substract a small value (just in case)\n $uploadMaxFilesize = max(1000, $uploadMaxFilesize - 100);\n }\n // Max size of post data allowed (default: 8M)\n $raw = $this->numberService->getBytes((string) ini_get('post_max_size'));\n $postMaxSize = is_numeric($raw) ? (int) $raw : 8388608;\n if ($postMaxSize > 0) {\n // Let's substract something to consider other posted fields.\n $postMaxSize = max(1000, $postMaxSize - 10000);\n }\n if ($uploadMaxFilesize <= 0) {\n if ($postMaxSize <= 0) {\n return null;\n }\n return $postMaxSize;\n }\n if ($postMaxSize <= 0) {\n return $uploadMaxFilesize;\n }\n\n return min($uploadMaxFilesize, $postMaxSize);\n }", "function getLengthOfLongestValue(array $array = []): int\n{\n return max(array_map('mb_strlen', $array));\n}", "function getMaxLength_word()\r\n {\r\n return $this->_maxlength_word;\r\n }", "function getMaxLength_text()\r\n {\r\n return $this->_maxlength_text;\r\n }", "public function getMaxSize()\n {\n return $this->size;\n }", "static function get_password_max_size() {\n\t\tswitch( \\Core\\Config::mantis_get( 'login_method' ) ) {\n\t\t\t# Max password size cannot be bigger than the database field\n\t\t\tcase PLAIN:\n\t\t\tcase BASIC_AUTH:\n\t\t\tcase HTTP_AUTH:\n\t\t\t\treturn DB_FIELD_SIZE_PASSWORD;\n\t\n\t\t\t# All other cases, i.e. password is stored as a hash\n\t\t\tdefault:\n\t\t\t\treturn PASSWORD_MAX_SIZE_BEFORE_HASH;\n\t\t}\n\t}", "public function getSizeLimit() {\n $validator = $this->getValidator('Size');\n if ($validator) {\n return $validator->getMax('raw');\n } else {\n return null;\n }\n }", "public function get_max_chunk_size() {\n\t\tif ( ! empty( $this->max_chunk_size ) ) {\n\t\t\treturn $this->max_chunk_size;\n\t\t}\n\n\t\t$max_size = tribe( 'db' )->get_max_allowed_packet_size();\n\n\t\t/**\n\t\t * Filters the max size of the of the chunks in bytes.\n\t\t *\n\t\t * @param int $max_size By default the `max_allowed_packet` from the database.\n\t\t */\n\t\t$this->max_chunk_size = apply_filters( 'tribe_meta_chunker_max_size', $max_size );\n\n\t\treturn $max_size;\n\t}", "public function getOsMaximumVersion()\n {\n if (array_key_exists(\"osMaximumVersion\", $this->_propDict)) {\n return $this->_propDict[\"osMaximumVersion\"];\n } else {\n return null;\n }\n }", "public function getMessageCount()\n {\n $smsLength = $this->getMessageLength();\n $retValue = 1;\n if ($smsLength > 160) {\n $retValue = ceil($smsLength / $this->_smsLength);\n }\n return $retValue;\n }", "public function getMaxReceiveCount()\n {\n return $this->MaxReceiveCount;\n }", "public function getMax()\n {\n return $this->options['max'];\n }", "public function getMaxOutstandingMessages()\n {\n return $this->max_outstanding_messages;\n }", "public function getMaxValue()\n {\n return (2 ** $this->len)- 1;\n }", "public function getLengthToUse(){\n //Get Total Number of Links in the DB\n $totalNumberOfLinks = $this->linkRepository->count([]);\n //Get Total Number of Characters used for string generation\n $totalNumberOfCharacters = $this->randomStringGenerator->getTotalNumberOfCharacters();\n\n $totalAllowed = 0;\n for($n = self::MIN_LENGTH;$n <= self::MAX_LENGTH; $n++){\n $totalAllowed += pow($totalNumberOfCharacters,$n);\n\n if($totalNumberOfLinks < $totalAllowed){\n return $n;\n }\n }\n\n return null;\n }", "public function getMaxQuantity()\n {\n $result = 0;\n for ($i = $this->configuration->getMaxLength(); $i >= $this->configuration->getMinLength(); $i--) {\n $result += pow(mb_strlen($this->getFullCharactersSet()), $i);\n }\n\n return $result;\n }", "static function getMaxUploadFileSize()\r\n {\r\n static $maxSize = -1;\r\n\r\n if ($maxSize < 0)\r\n {\r\n // Start with post_max_size.\r\n $postMaxSize = self::parseSize(ini_get('post_max_size'));\r\n $uploadMax = self::parseSize(ini_get('upload_max_filesize'));\r\n\r\n if ($postMaxSize > 0)\r\n {\r\n $maxSize = $postMaxSize;\r\n }\r\n\r\n // If upload_max_size is less, then reduce. Except if upload_max_size is zero, which indicates no limit.\r\n if ($uploadMax > 0 && $uploadMax < $maxSize)\r\n {\r\n $maxSize = $uploadMax;\r\n }\r\n }\r\n\r\n return $maxSize;\r\n }", "public function getPinMaximumLength(): ?int {\n $val = $this->getBackingStore()->get('pinMaximumLength');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'pinMaximumLength'\");\n }", "public function getMaxTeleports() {\n return $this->maxTeleports;\n }", "public function getMaxBytes();", "protected function getToastMaxLength(): int\n {\n return 200;\n }", "public function getMaxQueryLength()\n\t{\n\t\treturn self::MAX_QUERY_LEN;\n\t}", "public function length(): int\n {\n $length = $this->request->input('length', 10);\n\n return is_numeric($length) ? intval($length) : 10;\n }", "public function get_max_cache_size() {\n $max_cache_size = get_option( $this->field_names['max_cache_size'], 1 );\n try {\n $max_cache_size = intval($max_cache_size);\n } catch ( Exception $e ) {\n $max_cache_size = 1;\n }\n return $max_cache_size;\n }", "public static function getSize()\n {\n return strlen(PHP_INT_MAX.'');\n }", "public function getMaxLineLength()\n {\n return $this->lineLength;\n }", "protected function getPostMaxSize()\n {\n if (is_numeric($postMaxSize = ini_get('post_max_size'))) {\n return (int) $postMaxSize;\n }\n\n $metric = strtoupper(substr($postMaxSize, -1));\n\n switch ($metric) {\n case 'K':\n return (int) $postMaxSize * 1024;\n case 'M':\n return (int) $postMaxSize * 1048576;\n case 'G':\n return (int) $postMaxSize * 1073741824;\n default:\n return (int) $postMaxSize;\n }\n }", "public function getMaximalSize()\n\t{\n\t\t$size = ini_get('post_max_size');\n\t\t\n\t\t$type = mb_strtoupper(mb_substr($size, -1));\n\t\t\n\t\t$size = (int) $size;\n\n\t\tswitch ($type) {\n\t\t\tcase PostSizeTypes::KILO_BYTES_TYPE:\n\t\t\t\t$size = $size * PostSizeTypes::KILO_BYTES; break;\n\t\t\tcase PostSizeTypes::MEGA_BYTES_TYPE:\n\t\t\t\t$size = $size * PostSizeTypes::MEGA_BYTES; break;\n\t\t\tcase PostSizeTypes::GIGA_BYTES_TYPE:\n\t\t\t\t$size = $size * PostSizeTypes::GIGA_BYTES; break;\n\t\t}\n\t\t\n\t\treturn (int) $size;\n\t}", "protected function _getMax()\n\t{\n\t\t$max = 0;\n\t\tif (!empty($this->_tagsArray)) {\n\t\t\t$p_size = 0;\n\t\t\tforeach ($this->_tagsArray as $cKey => $cVal) {\n\t\t\t\t$c_size = $cVal['size'];\n\t\t\t\tif ($c_size > $p_size) {\n\t\t\t\t\t$max = $c_size;\n\t\t\t\t\t$p_size = $c_size;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $max;\n\t}", "public function getMaximumWipeOsVersion()\n {\n if (array_key_exists(\"maximumWipeOsVersion\", $this->_propDict)) {\n return $this->_propDict[\"maximumWipeOsVersion\"];\n } else {\n return null;\n }\n }", "public function getMessageLength()\n {\n $message = $this->getMessage();\n $length = strlen($message);\n\n foreach ($this->_specialChars as $char) {\n $c = (substr_count($message, $char) * 2) - 1;\n if ($c > 0) {\n $length += $c;\n }\n }\n\n return $length;\n }", "public function getMessageTimeout()\n {\n $messageTimeout = (int)Mage::getStoreConfig(self::PROCESSING_MESSAGE_TIMEOUT);\n if (!$messageTimeout) {\n $messageTimeout = self::PROCESSING_DEFAULT_MESSAGE_TIMEOUT;\n }\n\n return $messageTimeout;\n }", "public function getMaxAllowedPacket()\n\t{\n\t\tstatic $mtu;\n\n\t\tif (is_null($mtu))\n\t\t{\n\t\t\t$mtu = 0;\n\n\t\t\t$res = $this->query(\"SHOW VARIABLES LIKE 'max_allowed_packet'\")->fetch();\n\t\t\tif ($res['Variable_name'] == 'max_allowed_packet')\n\t\t\t{\n\t\t\t\t$mtu = intval($res['Value']);\n\t\t\t}\n\t\t}\n\n\t\treturn $mtu;\n\t}", "function MaxLength($value,$max){\n\t\t$value=trim($value);\n\t\t$value=trim($max);\n\t\t$this->EmptyNull($value);\n\t\t$this->EmptyNull($max);\n\t\t$this->Length($max);\n\t\tif(strlen($value)<=$max){\n\t\t\t$resp=true;\n\t\t}\n\t\telse\n\t\t\t$resp=false;\n\t\treturn $resp;\n\t}", "public function maximumSize()\n {\n return $this->size;\n }", "protected function getMaximumUploadSize()\n {\n // Get the upload_max_filesize from the php.ini\n $uploadMaxFileSize = ini_get('upload_max_filesize');\n\n // Convert the value to bytes\n if (stripos($uploadMaxFileSize, 'K') !== false) {\n $uploadMaxFileSize = round($uploadMaxFileSize * 1024);\n } elseif (stripos($uploadMaxFileSize, 'M') !== false) {\n $uploadMaxFilesize = round($uploadMaxFileSize * 1024 * 1024);\n } elseif (stripos($uploadMaxFileSize, 'G') !== false) {\n $uploadMaxFileSize = round($uploadMaxFileSize * 1024 * 1024 * 1024);\n }\n\n return min($uploadMaxFileSize, \\Config::get('maxFileSize'));\n }", "protected function getSizeLimit()\n {\n // Get the lowest between post_max_size and upload_max_filesize, log a warning if the first is < than the latter\n $limit = $this->sizeToBytes(ini_get('upload_max_filesize'));\n $postLimit = $this->sizeToBytes(ini_get('post_max_size'));\n if ($postLimit > 0 && $postLimit < $limit) {\n Yii::warning('PHP.ini\\'s \\'post_max_size\\' is less than \\'upload_max_filesize\\'.', __METHOD__);\n $limit = $postLimit;\n }\n if ($this->maxSize !== null && $limit > 0 && $this->maxSize < $limit) {\n $limit = $this->maxSize;\n }\n if (isset($_POST['MAX_FILE_SIZE']) && $_POST['MAX_FILE_SIZE'] > 0 && $_POST['MAX_FILE_SIZE'] < $limit) {\n $limit = (int) $_POST['MAX_FILE_SIZE'];\n }\n\n return $limit;\n }", "public static function getMaxStringLength($type){\n\t\t//if there are no brackets found \n\t\tif(!strpos($type,'(') && !strpos($type,')')) return '';\n\t\t$maxLength=substr($type,strpos($type,'(')+1,strpos($type,')')-strpos($type,'(')-1);\n\t\treturn $maxLength;\n\t}", "public function getMaxWidth();", "public function maxSize() {\n $sizes = array(detect::maxPostSize(), detect::maxUploadSize());\n if($this->options['maxSize']) {\n $sizes[] = $this->options['maxSize'];\n }\n return min($sizes);\n }", "public static function getMaxSize()\r\n {\r\n \t$key = 'maxContent';\r\n \tif(!self::cacheExsits($key))\r\n \t{\r\n\t \t$sql = 'SELECT character_maximum_length FROM information_schema.columns WHERE table_schema = :db AND table_name = :tbl AND column_name = :col limit 1';\r\n\t \t$results = Dao::getResultsNative($sql, array('db' => Config::get('Database', 'DB'), 'tbl' => strtolower(__CLASS__), 'col' => 'content'), PDO::FETCH_ASSOC);\r\n\t \tself::addCache($key, count($results) === 0 ? 0 : $results[0]['character_maximum_length']);\r\n \t} \r\n \treturn self::getCache($key);\r\n }", "public function maxMax(): int\n {\n return PHP_INT_MAX;\n }", "public function setMaximumLength($val)\n {\n $this->_propDict[\"maximumLength\"] = $val;\n return $this;\n }", "function has_max($value){\n $max = 255;\n $len = strlen($value);\n return $len <= $max;\n }", "public static function length($value)\n\t{\n\t\tif (function_exists('mb_strlen'))\n\t\t{\n\t\t\treturn mb_strlen($value, Config::$items['application']['encoding']);\n\t\t}\n\n\t\treturn strlen($value);\n\t}" ]
[ "0.73990875", "0.72409785", "0.7219898", "0.71128666", "0.7076374", "0.70760435", "0.6936059", "0.69320905", "0.6771388", "0.674763", "0.66820127", "0.66622704", "0.65904444", "0.6441376", "0.63880664", "0.6328603", "0.6313195", "0.6240721", "0.62130797", "0.6212102", "0.6187624", "0.6187624", "0.6182966", "0.616191", "0.61345893", "0.61285496", "0.612414", "0.612327", "0.6114135", "0.60848916", "0.6053127", "0.604871", "0.60460913", "0.6016095", "0.6010999", "0.6000846", "0.60001594", "0.5996726", "0.5972904", "0.59659135", "0.5963001", "0.59612167", "0.59533954", "0.59383315", "0.5926721", "0.5922933", "0.59131485", "0.59063476", "0.5898672", "0.589107", "0.5881353", "0.5861703", "0.58407396", "0.5822641", "0.5804127", "0.5786758", "0.5785797", "0.57837296", "0.5773479", "0.5765026", "0.57628834", "0.57554746", "0.57463574", "0.5743803", "0.5741163", "0.5738141", "0.5727995", "0.5725071", "0.57139456", "0.5712915", "0.57119054", "0.5683945", "0.56650126", "0.56641275", "0.5664017", "0.5662143", "0.565359", "0.56532687", "0.5632063", "0.562573", "0.5625186", "0.5624596", "0.56169534", "0.5607726", "0.56046253", "0.56023026", "0.55973506", "0.55970675", "0.55938095", "0.558647", "0.5582721", "0.55745083", "0.5572548", "0.55724114", "0.55666304", "0.5548555", "0.55460095", "0.55237263", "0.55220336", "0.5521966" ]
0.89572203
0
Will return true if post is an excluded post on a specific platform.
Вернёт true, если пост является исключённым постом на конкретной платформе.
public function is_excluded_post( $post_id, $platform ) { return in_array( $post_id, $this->get_excluded_posts( $platform ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_excluded_posts( $platform ) {\n\t\treturn array();\n\t}", "function rfi_should_stop_post_publishing($post) {\n\t$is_watched_post_type = rfi_is_supported_post_type($post);\n\t$is_after_enforcement_time = rfi_is_in_enforcement_window($post);\n\t$large_enough_image_attached = rfi_post_has_large_enough_image_attached($post);\n\n\tif ($is_after_enforcement_time && $is_watched_post_type) {\n\t\treturn !$large_enough_image_attached;\n\t}\n\treturn false;\n}", "public function is_excluded( $post_type ) {\n\t\treturn \\in_array( $post_type, $this->get_excluded_post_types_for_indexables(), true );\n\t}", "private static function exclude_postmeta( $meta_key ) {\n\t\t/*oEmbed cache data or WP post edit*/\n\t\treturn substr( $meta_key, 0, 7 ) === '_oembed' || in_array( $meta_key, array( '_edit_last', '_edit_lock' ),true) ;\n\t}", "public static function is_post_rejectable( $post ) {\n\t\t$post = get_post( $post );\n\t\tif ( ! $post ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only photo post type can be rejected.\n\t\treturn Registrations::get_post_type() === get_post_type( $post );\n\t}", "public static function isCompatiblePost() {\r\n return\r\n TpsOptions::get('enable_on_pages') ?\r\n (is_single() || is_page()) :\r\n is_single();\r\n }", "public static function is_post_rejected( $post ) {\n\t\t$post = get_post( $post );\n\t\tif ( ! $post ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( self::get_post_status() === get_post_status( $post ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function is_post() {\n\n\t\treturn post_type_exists( $this->get_type() );\n\t}", "public static function isVoucherOnlyWallee($postData)\n {\n return isset($postData['generateDiscountRefund']) && ! isset($postData['wallee_offline']);\n }", "public function isExcluded();", "public function isExcluded();", "public function isExcluded()\n {\n return $this->excluded;\n }", "protected function remove_excluded_post_type( $post_type ) {\n\t\treturn ( true === apply_filters( 'wp_sitemap_index-' . $post_type, true ) );\n\t}", "function is_whitelisted_post_meta( $meta_key ) {\n\t\treturn in_array( $meta_key, Settings::get_setting( 'post_meta_whitelist' ) ) || wp_startswith( $meta_key, '_wpas_skip_' );\n\t}", "private function has_post_meta() {\n\t\tif ( ! is_date() &&\n\t\t\t! is_author() &&\n\t\t\t! is_search() &&\n\t\t\t! is_404()\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function filter_amp_skip_post( $skipped, int $post ) {\n\t\t// This is the opposite to the `AMP__VERSION >= WEBSTORIES_AMP_VERSION` check in the HTML renderer.\n\t\tif (\n\t\t\t$this->story_post_type->get_slug() === get_post_type( $post )\n\t\t\t&&\n\t\t\t\\defined( '\\AMP__VERSION' )\n\t\t\t&&\n\t\t\tversion_compare( WEBSTORIES_AMP_VERSION, AMP__VERSION, '>' )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $skipped;\n\t}", "function is_post( $post ) {\n\treturn true === ( $post instanceof \\WP_Post );\n}", "public function hasExcluded();", "public function hasExcluded();", "private function is_post() {\n\t\t\treturn count( $_POST ) && \n\t\t\t\t\tisset( $_POST[ BASEMENT_TEXTDOMAIN ] ) && \n\t\t\t\t\tis_array( $_POST[ BASEMENT_TEXTDOMAIN ] ) && \n\t\t\t\t\tcount( $_POST[ BASEMENT_TEXTDOMAIN ] ) ? $_POST[ BASEMENT_TEXTDOMAIN ] : array() ;\n\t\t}", "public function test_get_post_not_content_types()\n\t{\n\t\t$unexpected = array();\n\t\t$unexpected[] = Post::create(array(\n\t\t\t'title' => 'This is a Post',\n\t\t\t'content' => 'If this was really a post, would it have such ridiculous content?',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published' ),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\t\t$unexpected[] = Post::create(array(\n\t\t\t'title' => 'I am not a Post',\n\t\t\t'content' => 'But I\\'m certainly not a pipe',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published'),\n\t\t\t'content_type' => Post::type('page'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\n\t\t$types = array();\n\t\tforeach ( $unexpected as $post ) $types[] = $post->content_type;\n\n\t\t$result = Posts::get(array('not:content_type' => $types));\n\n\t\t$this->assert_equal(0, count($result), 'No posts should be returned');\n\t}", "public function userWantsToDeletePost() : bool {\n return $this->userWantsToViewPost() && $this->isRequestPOSTHeaderPresent(self::$postDelete);\n }", "private function canIgnore()\n {\n if (!in_array(\n $this->fields['notification_type'],\n [\n Constants::NOTIFICATION_TYPE_ORDER,\n Constants::NOTIFICATION_TYPE_ORDER_PENDING,\n Constants::NOTIFICATION_TYPE_ORDER_FAILURE,\n Constants::NOTIFICATION_TYPE_VOID,\n Constants::NOTIFICATION_TYPE_SETTLE,\n Constants::NOTIFICATION_TYPE_CREDIT,\n Constants::NOTIFICATION_TYPE_REBILL_SUCCESS,\n ]\n )) {\n return true;\n }\n return false;\n }", "function learnarmor_child_jetpackme_exclude_related_post( $exclude_post_ids, $post_id ) {\n if ( is_singular() == '15-things-veterans-want-know-uncw' || is_singular() == '15-things-veterans-want-know-ivmf' || is_singular() == '15-things-veterans-want-know-phoenix') {\n $exclude_post_ids[] = 15637; // 15 Things for HCP\n $exclude_post_ids[] = 7969; // 15 Things\n }\n if ( is_singular() == '15-things-veterans-want-know') {\n $exclude_post_ids[] = 15637; // 15 Things for HCP\n }\n if ( is_singular() == '15-things-veterans-want-know-healthcare-providers') {\n $exclude_post_ids[] = 7969; // 15 Things\n }\n $exclude_post_ids[] = 10209; // UNCW\n $exclude_post_ids[] = 10141; // UNCW\n $exclude_post_ids[] = 10254; // UNCW\n $exclude_post_ids[] = 10314; // UNCW\n $exclude_post_ids[] = 10261; // UNCW\n $exclude_post_ids[] = 10322; // UNCW\n $exclude_post_ids[] = 10332; // UNCW\n $exclude_post_ids[] = 10338; // UNCW\n $exclude_post_ids[] = 10268; // UNCW\n $exclude_post_ids[] = 10273; // UNCW\n $exclude_post_ids[] = 10342; // UNCW\n $exclude_post_ids[] = 10280; // UNCW \n $exclude_post_ids[] = 10118; // IVMF\n $exclude_post_ids[] = 10119; // IVMF\n $exclude_post_ids[] = 10120; // IVMF\n $exclude_post_ids[] = 10121; // IVMF\n $exclude_post_ids[] = 10122; // IVMF\n $exclude_post_ids[] = 10123; // IVMF\n $exclude_post_ids[] = 10124; // IVMF\n $exclude_post_ids[] = 10125; // IVMF\n $exclude_post_ids[] = 10126; // IVMF\n $exclude_post_ids[] = 10069; // IVMF\n $exclude_post_ids[] = 9954; // IVMF\n $exclude_post_ids[] = 50789; // Phoenix\n $exclude_post_ids[] = 50791; // Phoenix\n $exclude_post_ids[] = 50795; // Phoenix\n $exclude_post_ids[] = 50797; // Phoenix\n $exclude_post_ids[] = 50793; // Phoenix\n $exclude_post_ids[] = 50799; // Phoenix\n return $exclude_post_ids;\n}", "public function isSlidesFromPosts(){\n\t\treturn $this->is_posts();\n\t}", "function msd_yc_plugin_get_post_types() {\r\n // Get all registered types of posts\r\n $post_types = get_post_types('', 'names');\r\n // Post types to exclude\r\n $to_exclude = array('attachment', 'revision', 'nav_menu_item');\r\n\r\n return array_diff($post_types, $to_exclude);\r\n}", "function site_supports_custom_post_type() {\n // If the current theme requests it.\n if ( current_theme_supports( self::CUSTOM_POST_TYPE ) || get_option( self::OPTION_NAME, '0' ) ) {\n return true;\n }\n\n // Otherwise, say no unless something wants to filter us to say yes.\n /** This action is documented in modules/custom-post-types/nova.php */\n return (bool) apply_filters( 'jetpack_enable_cpt', false, self::CUSTOM_POST_TYPE );\n }", "private function is_noindexed_password_protected_post() {\n\t\tif ( is_singular() &&\n\t\t\t$this->is_password_protected()\n\t\t\t&& apply_filters( 'post_meta_noindex_password_posts', false )\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function getExcludedPost() : array\n {\n return (array) get_field( 'custom_exclude_post' , 'options' );\n }", "public function is_specific_posts(){\n\t\treturn (in_array($this->get_param('source_type', 'gallery'), array('specific_posts', 'specific_post'), true)) ? true : false;\n\t}", "public function is_local( $post ) {\n return empty( $post->site_id ) || $post->site_id === $this->index_name;\n }", "public function hasExcludeTypes(){\n return $this->_has(6);\n }", "function wpcd_is_app_delete_protected( $post_id ) {\n\n\t$wpcd_app_delete_protection = get_post_meta( $post_id, 'wpcd_app_delete_protection', true );\n\tif ( empty( $wpcd_app_delete_protection ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n\n}", "public function isPostDependency($post_types = array()) {\n if (count($post_types) === 0) {\n $post_types = self::getPostDependencyEntityTypes();\n }\n\n return in_array($this->getDrupalEntityType(), $post_types);\n }", "public static function isVoucherOnlyPostFinanceCheckout($postData)\n {\n return isset($postData['generateDiscountRefund']) && ! isset($postData['postfinancecheckout_offline']);\n }", "protected function CheckPost(ExternalPost $post): bool\n {\n return Post::whereLink($post->getLink())->doesntExist();\n }", "function isIgnoringUnknown(): bool\n {\n return $this->ignoreUnknown;\n }", "public function get_excluded_post_types() {\n return $this->exclude_post_types;\n }", "static function any_deletable() {\n $visitor = Visitor::current();\n $sql = SQL::current();\n\n # Can they delete posts?\n if ($visitor->group->can(\"delete_post\"))\n return true;\n\n # Can they delete drafts?\n if ($visitor->group->can(\"delete_draft\") and\n $sql->count(\"posts\", array(\"status\" => \"draft\")))\n return true;\n\n # Can they delete their own posts, and do they have any?\n if ($visitor->group->can(\"delete_own_post\") and\n $sql->count(\"posts\", array(\"user_id\" => $visitor->id)))\n return true;\n\n # Can they delete their own drafts, and do they have any?\n if ($visitor->group->can(\"delete_own_draft\") and\n $sql->count(\"posts\", array(\"status\" => \"draft\", \"user_id\" => $visitor->id)))\n return true;\n\n return false;\n }", "public function ignore($token)\n {\n return (in_array($token->getType(), $this->context['ignore']));\n }", "static function any_deletable(): bool {\n $visitor = Visitor::current();\n $sql = SQL::current();\n\n # Can they delete posts?\n if ($visitor->group->can(\"delete_post\"))\n return true;\n\n # Can they delete drafts?\n if ($visitor->group->can(\"delete_draft\") and\n $sql->count(\n tables:\"posts\",\n conds:array(\"status\" => self::STATUS_DRAFT)\n )\n )\n return true;\n\n # Can they delete their own posts, and do they have any?\n if ($visitor->group->can(\"delete_own_post\") and\n $sql->count(\n tables:\"posts\",\n conds:array(\"user_id\" => $visitor->id)\n )\n )\n return true;\n\n # Can they delete their own drafts, and do they have any?\n if ($visitor->group->can(\"delete_own_draft\") and\n $sql->count(\n tables:\"posts\",\n conds:array(\n \"status\" => self::STATUS_DRAFT,\n \"user_id\" => $visitor->id\n )\n )\n )\n return true;\n\n return false;\n }", "public function tag_not_in_test()\n\t{\n\t\treturn $this->terms_test( 'post_tag', FALSE, FALSE );\n\t}", "function getPlacementPostIdForExclude()\n{\n return get_transient('__placement_post_ids');\n}", "function gfwa_exclude_post_types( $type ) {\n $filters = array( '', 'attachment' );\n $filters = apply_filters( 'gfwa_exclude_post_types', $filters );\n return(!in_array( $type, $filters ));\n}", "function timber_lite_post_is_project( $post = null ) {\n\n\tif ( $post === null ) {\n\t\tglobal $post;\n\t}\n\n\t// if we can't determine the post type we quit\n\tif ( ! isset( $post->post_type ) ) {\n\t\treturn false;\n\t}\n\n\tif ( $post->post_type === 'jetpack-portfolio' ) {\n\t\treturn true;\n\t} elseif ( $post->post_type === 'page' ) {\n\t\t$custom_portfolio_page_type = get_post_meta( timber_lite_get_post_id(), 'custom_portfolio_page_type', true);\n\t\tif ( $custom_portfolio_page_type === 'project' ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "function is_post_or_post_id( $post ) {\n\tif ( true === is_post( $post ) ) {\n\t\treturn true;\n\t}\n\n\t$post = get_post( $post );\n\n\tif ( true === is_post( $post ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public static function disable_post_types() {\n\t\tglobal $wp_post_types;\n\n\t\t$post_types_all = self::get_listing_post_types();\n\t\t$post_types_supported = get_theme_mod( 'inventor_general_post_types', $post_types_all );\n\t\t$post_types_unsupported = array_diff( $post_types_all, $post_types_supported );\n\n\t\tif ( is_array( $post_types_unsupported ) ) {\n\t\t\tforeach( $post_types_unsupported as $post_type ) {\n\t\t\t\tif ( ! empty( $wp_post_types[ $post_type ] ) ) {\n\t\t\t\t\tunset( $wp_post_types[ $post_type ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function isFromPost(){\r\n\t\treturn !empty($this->postData);\r\n\t}", "public function test_get_post_not_slug()\n\t{\n\t\t$expected = Post::create(array(\n\t\t\t'title' => 'This is a Post',\n\t\t\t'content' => 'If this was really a post, would it have such ridiculous content?',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published' ),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\t\t$unexpected = Post::create(array(\n\t\t\t'title' => 'I am not a Post',\n\t\t\t'content' => 'But I\\'m certainly not a pipe',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published'),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\n\t\t$result = Posts::get(array('not:slug' => $unexpected->slug));\n\n\t\t$this->assert_true($result instanceof Posts, 'Result should be of type Posts');\n\t\t$result = $result[0];\n\t\t$this->assert_true($result instanceof Post, 'Items should be of type Post');\n\t\t$this->assert_equal($expected->slug, $result->slug, 'slug of returned Post should the one we didn\\'t ask to exclude');\n\t}", "public function is_posting_enabled() {\n\t\treturn (bool) get_option( self::POST_OPTION, '' );\n\t}", "public function prune(): bool\n {\n // Prepare query\n // Note: $wpdb->delete cannot be used as it does not support \"<=\" comparison)\n /** @var string $query */\n $query = $this->wpdb->prepare(\n \"DELETE FROM {$this->blocklist_table} WHERE release_time <= %s\",\n MySQLDateTime::formatDateTime(\\time())\n );\n // Execute query\n $result = $this->wpdb->query($query);\n // Return result\n return $result !== false;\n }", "public function post_is_under_review() {\n return 'on' === get_post_meta( get_the_ID(), '_rns_under_review', true );\n }", "public function post_not_in_test()\n\t{\n\t\t// get the ten most recent posts as in test #2.\n\t\t$terms = $this->get_most_used_terms( $this->ten_most_recent_hits_wp );\n\t\tif ( empty( $terms ) )\n\t\t{\n\t\t\techo \"no term found for most recent posts by term tests\\n\\n\";\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// find the posts to exclude from our search\n\t\t$excluded_posts = $this->wp_query_most_recent_by_terms( $terms[0]['term'], 10 );\n\t\tif ( 10 > count( $excluded_posts ) )\n\t\t{\n\t\t\techo \"could not find enough posts to exclude to complete the test\\n\\n\";\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$wpq_results = new WP_Query(\n\t\t\tarray(\n\t\t\t\t'post_type' => 'any',\n\t\t\t\t'post_status' => 'publish',\n\t\t\t\t'posts_per_page' => 10,\n\t\t\t\t'orderby' => 'date', // or 'modified'?\n\t\t\t\t'order' => 'DESC',\n\t\t\t\t'post__not_in' => $excluded_posts,\n\t\t) );\n\n\t\t$wpq_result_ids = $this->get_ids_from_posts( $wpq_results->posts );\n\t\t$test_failed = FALSE;\n\n\t\tif ( $wpq_results->post_count != 10 )\n\t\t{\n\t\t\techo \"did not find expected number of WP_Query results (10). FAILED\\n\\n\";\n\t\t\t$test_failed = TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$diff = array_diff( $wpq_result_ids, $excluded_posts );\n\t\t\tif ( count( $diff ) == 10 )\n\t\t\t{\n\t\t\t\techo \"WP_Query results do not include any id from the exclusion list. PASSED.\\n\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"FAILED: some excluded posts were still found in search results.\\n\\n\";\n\t\t\t\t$test_failed = TRUE;\n\t\t\t}\n\t\t}//END else\n\n\t\t// sphinx search\n\t\tgo_sphinx()->client = FALSE; // ensure we get a new instance\n\t\t$client = go_sphinx()->client();\n\t\t$client->SetLimits( 0, 10, 1000 );\n\t\t$client->SetSortMode( SPH_SORT_EXTENDED, 'post_date_gmt DESC, @rank DESC' );\n\t\t$client->SetMatchMode( SPH_MATCH_EXTENDED );\n\t\t$client->SetFilter( '@id', $excluded_posts, TRUE );\n\t\t$spx_results = $client->Query( '@post_status publish', go_sphinx()->index_name );\n\n\t\tif ( FALSE === $spx_results )\n\t\t{\n\t\t\techo 'query error: ';\n\t\t\tprint_r( $client->GetLastError() );\n\t\t\techo \"\\n---\\n\\n\";\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ( 10 > count( $spx_results['matches'] ) )\n\t\t{\n\t\t\techo \"did not find expected number of Sphinx results (10). FAILED\\n\\n\";\n\t\t\t$test_failed = TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$matched_ids = $this->extract_sphinx_matches_ids( $spx_results );\n\n\t\t\t$diff = array_diff( $matched_ids, $excluded_posts );\n\t\t\tif ( count( $diff ) == 10 )\n\t\t\t{\n\t\t\t\techo \"Sphinx results do not include any id from the exclusion list. PASSED.\\n\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"FAILED: some excluded posts were still found in search results.\\n\\n\";\n\t\t\t\t$test_failed = TRUE;\n\t\t\t}\n\t\t}//END else\n\n\t\techo \"---\\n\\n\";\n\n\t\treturn ( ! $test_failed );\n\t}", "function exa_is_standard($post = null) {\n\t$post = get_post($post);\n\treturn true;\n}", "function isUnregistered($post_id){\n if($this->data->getFieldData($post_id, 'unregistered')){\n return true;\n }\n return false;\n }", "public function isImageIgnored()\n {\n return (bool)$this->get('imageIgnore');\n }", "public function isPost() {\n\t\tif ($this->post) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public function canPost() {\n $canPost = false;\n if ($this->xpdo->discuss->user->isLoggedIn) {\n $level = 9998;\n if ($this->xpdo->discuss->user->isAdmin()) {\n $level = 0;\n } elseif ($this->isModerator($this->xpdo->discuss->user->get('id'))) {\n $level = 1;\n }\n /* only allow posts if meeting minimum level\n * AND if board is not archived (and user is not an admin, who can post to archived boards)\n * AND if board not locked (and user is not an admin, who can always post)\n */\n if ($level <= ((int)$this->get('minimum_post_level'))\n && ($this->get('status') != disBoard::STATUS_ARCHIVED || $level == 0)\n && (!$this->get('locked') || $level == 0)) {\n $canPost = true;\n }\n }\n return $canPost;\n }", "public function test_get_post_not_slugs()\n\t{\n\t\t$expected = Post::create(array(\n\t\t\t'title' => 'This is a Post',\n\t\t\t'content' => 'If this was really a post, would it have such ridiculous content?',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published' ),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\t\t$unexpected = array();\n\t\t$unexpected[] = Post::create(array(\n\t\t\t'title' => 'I am not a Post',\n\t\t\t'content' => 'But I\\'m certainly not a pipe',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published'),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\t\t$unexpected[] = Post::create(array(\n\t\t\t'title' => 'Chili',\n\t\t\t'content' => 'The Breakfast of Champions',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published'),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\n\t\t$slugs = array();\n\t\tforeach ( $unexpected as $post ) $slugs[] = $post->slug;\n\n\t\t$result = Posts::get( array('not:slug' => $slugs ) );\n\n\t\t$this->assert_true($result instanceof Posts, 'Result should be of type Posts');\n\t\tforeach ( $result as $r ) {\n\t\t\t$this->assert_true( $r instanceof Post, 'Items should be of type Post' );\n\t\t\t$this->assert_false( in_array( $r->slug, $slugs ), 'slug of returned Post should not be in the list of the ones excluded' );\n\t\t}\n\t}", "function kalium_blog_is_in_the_loop() {\n\tglobal $blog_options;\n\n\treturn in_the_loop() && ! is_single() && ! empty( $blog_options );\n}", "protected function checkPostType($post) {\n\t\treturn $post->post_type === 'page';\n\t}", "public function isNotMobileView()\n {\n return ($this->viewType == self::VIEW_NOT_MOBILE);\n }", "public static function exclude_post_types( $post_types ) {\n\t\t$post_types[] = Thrive_Quiz_Builder::SHORTCODE_NAME;\n\n\t\treturn $post_types;\n\t}", "private function isDraft($post)\n {\n return (bool) $this->postId($post);\n }", "public function canDelete()\n\t{\n\t\t$user = $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$topics = $this->getModel()->getList();\n\t\tforeach($topics as $topic)\n\t\t{\n\t\t\t$forum = $this->getService('com://site/ninjaboard.model.forums')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($topic->forum_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\t\t\t$post = $this->getService('com://site/ninjaboard.model.posts')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($topic->first_post_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\n\t\t\t// @TODO we migth want to add an option later, wether or not to allow users to delete their own post.\n\t\t\tif($forum->post_permissions < 3 && $post->created_by != $user->id) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function is_posts(){\n\t\t$source = $this->get_param('sourcetype', 'gallery');\n\n\t\treturn (in_array($source, array('post', 'posts', 'specific_posts', 'specific_post', 'current_post', 'woocommerce', 'woo'), true)) ? true : false;\n\t}", "function algolia_exclude_post_types( $post_types ) {\n\tunset( $post_types['tumblr'] );\n\tunset( $post_types['coffee_checkins'] );\n\tunset( $post_types['presentation'] );\n\n\treturn $post_types;\n}", "public function test_get_post_not_ids()\n\t{\n\t\t$expected = Post::create(array(\n\t\t\t'title' => 'This is a Post',\n\t\t\t'content' => 'If this was really a post, would it have such ridiculous content?',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published' ),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\t\t$unexpected = array();\n\t\t$unexpected[] = Post::create(array(\n\t\t\t'title' => 'I am not a Post',\n\t\t\t'content' => 'But I\\'m certainly not a pipe',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published'),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\t\t$unexpected[] = Post::create(array(\n\t\t\t'title' => 'Chili',\n\t\t\t'content' => 'The Breakfast of Champions',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published'),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\n\t\t$ids = array();\n\t\tforeach ( $unexpected as $post ) $ids[] = $post->id;\n\n\t\t$result = Posts::get( array('not:id' => $ids ) );\n\n\t\t$this->assert_true($result instanceof Posts, 'Result should be of type Posts');\n\t\tforeach ( $result as $r ) {\n\t\t\t$this->assert_true( $r instanceof Post, 'Items should be of type Post' );\n\t\t\t$this->assert_false( in_array( $r->id, $ids ), 'id of returned Post should not be in the list of the ones excluded' );\n\t\t}\n\t}", "function this_is_a_blog_page(){\n if (is_home() || is_singular( 'post' ) || is_post_type_archive('post') || is_tag() || is_category() || is_date() || is_search()) {\n if(!is_post_type_archive('product')){\n return true;\n }\n }\n return false;\n}", "public function isPost () {\n return ($this->getType() === $this::TYPE_POST);\n }", "public function isProjectSkipped()\n {\n return !$this->isTargetLanguageAllowed();\n }", "public function hasDiscardSupport() {\n\t\treturn $this->hasProperty(self::PROP_DISCARD);\n\t}", "#[SymfonySerializer\\Ignore()]\n public function isEmbed(): bool\n {\n return (!empty($this->getEmbedId()) && !empty($this->getEmbedPlatform()));\n }", "public function exists() {\n\t\treturn empty( $this->post ) ? false : true;\n\t}", "public function is_posted() { return $this->post_enabled; }", "public function test_get_post_not_content_type()\n\t{\n\t\t$expected = Post::create(array(\n\t\t\t'title' => 'This is a Post',\n\t\t\t'content' => 'If this was really a post, would it have such ridiculous content?',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published' ),\n\t\t\t'content_type' => Post::type('entry'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\t\t$unexpected = Post::create(array(\n\t\t\t'title' => 'I am not a Post',\n\t\t\t'content' => 'But I\\'m certainly not a pipe',\n\t\t\t'user_id' => $this->user->id,\n\t\t\t'status' => Post::status('published'),\n\t\t\t'content_type' => Post::type('page'),\n\t\t\t'pubdate' => HabariDateTime::date_create(time()),\n\t\t));\n\n\t\t$result = Posts::get(array('not:content_type' => $unexpected->content_type));\n\n\t\t$this->assert_true($result instanceof Posts, 'Result should be of type Posts');\n\t\t$result = $result[0];\n\t\t$this->assert_true($result instanceof Post, 'Items should be of type Post');\n\t\t$this->assert_equal($expected->content_type, $result->content_type, 'Returned posts should be of the requested content type');\n\t}", "function advance_exclude_post( $query ) {\n if ( $query->is_home() && $query->is_main_query() ) {\n\t\t$advance_num_post = esc_attr(get_theme_mod ('Staticimage_post',esc_attr('Hello world!')));\n\t\t$excluded = array( -$advance_num_post );\n\n\t\t $query->set('post__not_in', $excluded);\n }\n}", "function wpcd_can_current_user_delete_app( $post_id ) {\n\n\t// Short circuit: If admin, then just return true.\n\tif ( wpcd_is_admin() ) {\n\t\treturn true;\n\t}\n\n\t// get state of delete protect flag.\n\t$wpcd_app_delete_protection = get_post_meta( $post_id, 'wpcd_app_delete_protection', true );\n\n\t// get user id and post object.\n\t$user_id = get_current_user_id();\n\t$post = get_post( $post_id );\n\n\t// do checks.\n\tif ( ( $post->post_type == 'wpcd_app' && ! wpcd_user_can( $user_id, 'delete_app_record', $post->ID ) && $post->post_author != $user_id ) || ( $post->post_type == 'wpcd_app' && ! empty( $wpcd_app_delete_protection ) ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n\n}", "public function CanSkip()\n\t{\n\t\t$version = $this->GetVersion();\n\t\tif (!empty($version)) {\n\t\t\t$splitver = explode('.', $version);\n\n\t\t\t/* Skip only appears in git >= 1.5.0 */\n\t\t\tif (($splitver[0] < 1) || (($splitver[0] == 1) && ($splitver[1] < 5))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "static function use_imageless(WP_Post $p): bool {\r\n\r\n\t\t// If this post doesn't even have a featured image\r\n\t\tif (!has_post_thumbnail($p->ID)) return true;\r\n\r\n\t\t// If its personal 'hide' option is checked\r\n\t\tif (MJKNPE_ACF::get(MJKNPE_ACF::hide_feat, $p->ID)) return false;\r\n\r\n\t\t// If its category's 'hide' option is checked\r\n\t\t$excl = MJKNPE_ACF_Options::get(MJKNPE_ACF_Options::hide_feat_image_cats);\r\n\t\tforeach(wp_get_post_categories($p->ID, ['fields' => 'ids']) as $cat) {\r\n\t\t\tif (in_array($cat, $excl)) return true;\r\n\t\t}\r\n\r\n\t\t// Otherwise we're good to use an image\r\n\t\treturn false;\r\n\t}", "function bakes_and_cakes_exclude_posts_for_blogpage( $query ) {\n $show_on_front = get_option( 'show_on_front' );\n $ed_slider = get_theme_mod( 'bakes_and_cakes_ed_slider' );\n $slider_category = get_theme_mod( 'bakes_and_cakes_slider_cat' );\n\n if ( ! is_admin() && $query->is_home() && $query->is_main_query() && $ed_slider && 'posts' == $show_on_front ) {\n if( $slider_category ){\n $query->set( 'category__not_in', $slider_category );\n }\n }\n}", "private function isExcluded($fileinfo)\n {\n if ($fileinfo->isReadable() == false) {\n return true;\n }\n if ($fileinfo->isDir() && $this->dirs == false) {\n return true;\n }\n if (in_array($fileinfo->getBasename(), $this->exclude['name'])) {\n return true;\n }\n if ($this->isDisplayable($fileinfo->getRealPath()) == false) {\n return true;\n }\n }", "public function sync_hidden_post_inclusion()\n\t{\n\t\t$include = array('unapproved' => false, 'deleted' => false);\n\t\t$counts = count::from_db($this->topic_posts, false);\n\t\t$visible_posts = $counts['teams'] + $counts['authors'] + $counts['public'];\n\n\t\tif (!$visible_posts)\n\t\t{\n\t\t\tif (!$counts['deleted'])\n\t\t\t{\n\t\t\t\t$include['unapproved'] = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$include['deleted'] = true;\n\t\t\t}\n\t\t}\n\t\treturn $include;\n\t}", "protected function isUsingSoftDelete()\n {\n return in_array(SoftDelete::class, array_values(\n class_uses(get_called_class())\n ));\n }", "function checkPostData($post) {\n\n if (!empty($post['base_url']) && !empty($post['db_host']) && !empty($post['db_user'])\n && !empty($post['db_password']) && !empty($post['db_name']) \n && !empty($post['admin_username']) && !empty($post['admin_pass'])) {\n\n return true;\n } else {\n return false;\n }\n }", "function pos_host_is_default_post( $post_id, $post_type ) {\r\n\tif ( ! in_array( $post_type, array( 'pos_host_register', 'pos_host_outlet', 'pos_host_receipt' ) ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn (int) get_option( 'pos_host_default_' . str_replace( 'pos_', '', $post_type ), 0 ) === (int) $post_id ? true : false;\r\n}", "private function is_post() {\n\t\treturn count( $_POST ) && \n\t\t\t\tisset( $_POST[ $this->textdomain ] ) && \n\t\t\t\tis_array( $_POST[ $this->textdomain ] ) && \n\t\t\t\tcount( $_POST[ $this->textdomain ] ) ? $_POST[ $this->textdomain ] : array() ;\n\t}", "function yapb_is_photoblog_post() {\n\t\t\n\t\t$result = false;\n\n\t\t// If YAPB wasn't able to attach the image in the first place\n\t\t// TODO: Convert to this and remove the automatic attachment via hook\n\n\t\tglobal $post;\n\t\t\n\t\tif (!property_exists($post, 'image')) {\n\t\t\tif (!is_null($image = YapbImage::getInstanceFromDb($post->ID))) {\n\t\t\t\t\n\t\t\t\t// We assign the image to the post\n\t\t\t\t// So we don't have to do the sql\n\t\t\t\t// a second time later on\n\t\t\t\t\n\t\t\t\t$post->image = $image;\n\t\t\t\t$result = true;\n\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\t// We have an YapbImage in the current $post instance\n\t\t\t\n\t\t\t$result = true;\n\t\t\t\n\t\t}\n\n\t\treturn $result;\n\t\t\n\t}", "public function postIdNotIn($ids){\n\t\treturn $this->setVar('post__not_in', $ids);\n\t}", "public function isM2eExclude()\n {\n return $this->getConfigForStore(self::XML_SYNC_ORDERS_M2E_PATH);\n }", "public function is_enabled() {\r\n \r\n global $post;\r\n \r\n $pid = $post->ID;\r\n \r\n if( $pid ) {\r\n \r\n $disable_woothumbs = get_post_meta( $pid, 'disable_woothumbs', true );\r\n \r\n return ( $disable_woothumbs && $disable_woothumbs == \"yes\" ) ? false : true;\r\n \r\n }\r\n \r\n return false;\r\n \r\n }", "protected function isPost() {\n\t\treturn $this->_request->is('post');\n\t}", "public function attachment_meta_still_posting( $post_args, $fields ) {\n $still_posting_meta = false;\n\n foreach ( $fields as $attachment_field ) {\n $posting_field = isset( $post_args['meta'][ $attachment_field ][0]['value'] )\n && $post_args['meta'][ $attachment_field ][0]['value'] === null;\n $still_posting_meta = $still_posting_meta || $posting_field;\n\n $field_meta_key = $attachment_field . '_meta';\n $posting_meta = isset( $post_args['meta'][ $field_meta_key ][0]['value'] )\n && $post_args['meta'][ $field_meta_key ][0]['value'] === null;\n $still_posting_meta = $still_posting_meta || $posting_meta;\n }\n\n return $still_posting_meta;\n }", "public static function is_edd_related( $post = false ) {\n\t\tif ( ! is_a( $post, 'WP_Post' ) ) {\n\t\t\tif ( 0 < intval( $post ) ) {\n\t\t\t\t$post = get_post( $post );\n\t\t\t}else{\n\t\t\t\tglobal $post;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( ! $post || ! is_a( $post, 'WP_Post' ) ) {\n\t\t\treturn false;\n\n\t\t}\n\n\t\tif ( 'download' == get_post_type( $post ) || in_array( $post->ID, array( 4,5,6,7,377 ) ) || is_tax( 'download_category' ) || is_tax( 'download_tag' ) ) {\n\t\t\t\treturn true;\n\t\t}\n\n\t}", "public function canManageBlogEtcPosts()\n {\n // Enter the logic needed for your app.\n // Maybe you can just hard code in a user id that you\n // know is always an admin ID?\n\n if ($this->id === 1\n && $this->email === \"your@email.com\"\n ) {\n\n // return true so this user CAN edit/post/delete\n // blog posts (and post any HTML/JS)\n\n return true;\n }\n\n // otherwise return false, so they have no access\n // to the admin panel (but can still view posts)\n\n return false;\n }", "function maybe_disable_blog_options()\n\t{\n\t\treturn (get_option('show_on_front') !== 'page' || get_option('page_for_posts') < 1);\n\t}", "public function getOnlypost()\n {\n return $this->onlypost;\n }", "function exodus_exclude_gallery_posts( $args, $options ) {\n\n\t// Add meta query to WP_Query arguments to exclude posts having this field true (checkbox)\n\t$args['meta_query'] = array(\n\t\t'relation'\t\t=> 'OR',\n\t\tarray(\n \t'key' \t\t=> '_ctcom_gallery_exclude',\n \t'value'\t\t=> '',\n \t'compare' \t=> '=',\n\t\t),\n\t\tarray(\n \t'key' \t\t=> '_ctcom_gallery_exclude',\n \t'value' \t=> '', // required until bug fixed: http://core.trac.wordpress.org/ticket/23268\n \t'compare' \t=> 'NOT EXISTS',\n\t\t)\n\t);\n\n\treturn $args;\n\n}", "public function isPostStore()\n\t{\n\t\treturn $this->is_post;\n\t}", "public function isDisabled()\n {\n // Disable (if no enabled icons):\n \n if (!$this->getEnabledIcons()->exists()) {\n return true;\n }\n \n // Disable (if no current page):\n \n if (!($page = $this->getCurrentPage(Page::class))) {\n return true;\n }\n \n // Disable (if disabled for page class):\n \n if (in_array(get_class($page), $this->config()->disabled_on)) {\n return true;\n }\n \n // Enable (if sharing is not disabled for page):\n \n return !$page->isSharingDisabled() ? parent::isDisabled() : true;\n }" ]
[ "0.675817", "0.65839165", "0.63558626", "0.61574966", "0.6037555", "0.59935856", "0.59768313", "0.5972748", "0.59710974", "0.59620494", "0.59620494", "0.5924524", "0.5893961", "0.5889082", "0.5843273", "0.5824087", "0.57747406", "0.57531995", "0.57531995", "0.57228696", "0.57077116", "0.56910574", "0.5678784", "0.5667172", "0.5648561", "0.56336004", "0.5626477", "0.5622078", "0.5616875", "0.56163627", "0.55871856", "0.5581146", "0.55696595", "0.5568254", "0.5563537", "0.55405587", "0.55267894", "0.55018663", "0.54942286", "0.549251", "0.5478158", "0.54771364", "0.5473981", "0.5450073", "0.5420527", "0.54181415", "0.54125684", "0.5398387", "0.538756", "0.5385105", "0.53717625", "0.53715944", "0.5364617", "0.5358155", "0.5349377", "0.53461176", "0.5336533", "0.5327895", "0.53253055", "0.53249615", "0.53241926", "0.53211606", "0.53207576", "0.5316717", "0.53124636", "0.5311694", "0.53091633", "0.5308519", "0.53038675", "0.5285503", "0.5284461", "0.5283534", "0.52810913", "0.5281059", "0.527895", "0.5276554", "0.52658904", "0.5262573", "0.5248007", "0.524502", "0.5244155", "0.5239498", "0.52365386", "0.5236305", "0.52291685", "0.5226335", "0.5224788", "0.52230746", "0.5221901", "0.52176803", "0.52128357", "0.52036446", "0.5194054", "0.5193989", "0.5193753", "0.5185404", "0.5177325", "0.51764923", "0.51687497", "0.5165763" ]
0.78555655
0
Convert JSON to Array of Flights CONVERTING JSON TO ARRAY OF FLIGHT
Конвертировать JSON в массив рейсов CONVERTING JSON TO ARRAY OF FLIGHT
public function convertToArray($body){ $data = json_decode($body); $data = $data->trips[0]; $flights = []; foreach($data->dates as $key => $value){ foreach($value->flights as $key2 => $value2){ $flight = new Flight(); $flight->setDeparture($value2->segments[0]->origin); $flight->setArrival($value2->segments[0]->destination); $flight->setDepartureTime(new \DateTime($value2->segments[0]->time[0])); $flight->setArrivalTime(new \DateTime($value2->segments[0]->time[1])); $flight->setFlightNumber($value2->segments[0]->flightNumber); $flight->setPrice($value2->regularFare->fares[0]->amount); $flights[] = $flight; } } return $flights; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function flights()\n {\n $flights = [];\n foreach ($this->result()->xpath('//air:AirPricingSolution') as $airPricingSolution) {\n $flights[]['flight'] = [\n 'details' => $this->getFlightDetails($airPricingSolution),\n 'pricing' => $this->getFlightPricing($airPricingSolution)\n ];\n }\n\n return $flights;\n }", "protected function parseResponse(array $response)\n {\n if (empty($response['scheduledFlights'])) {\n return [];\n }\n\n $airlines = $this->parseAirlines($response['appendix']['airlines']);\n\n $airports = $this->parseAirports($response['appendix']['airports']);\n\n $flights = [];\n\n foreach ($response['scheduledFlights'] as $flight) {\n // Set the carrier\n $carrier = $airlines[$flight['carrierFsCode']];\n\n $flight['carrier'] = $carrier;\n\n // Set the departure airport\n $departureAirport = $airports[$flight['departureAirportFsCode']];\n\n $flight['departureAirport'] = $departureAirport;\n\n // Set the arrival airport\n $arrivalAirport = $airports[$flight['arrivalAirportFsCode']];\n\n $flight['arrivalAirport'] = $arrivalAirport;\n\n // Set the UTC departure time\n $flight['departureDate'] = [\n 'dateLocal' => $flight['departureTime'],\n 'dateUtc' => $this->dateToUtc(\n $flight['departureTime'],\n $departureAirport['timeZoneRegionName']\n ),\n ];\n\n // Set the UTC arrival time\n $flight['arrivalDate'] = [\n 'dateLocal' => $flight['arrivalTime'],\n 'dateUtc' => $this->dateToUtc(\n $flight['arrivalTime'],\n $arrivalAirport['timeZoneRegionName']\n ),\n ];\n\n $flights[] = $flight;\n }\n\n return $flights;\n }", "protected function parseResponse(array $response)\n {\n if (empty($response['flightStatuses'])) {\n return [];\n }\n\n $airlines = $this->parseAirlines($response['appendix']['airlines']);\n\n $airports = $this->parseAirports($response['appendix']['airports']);\n\n $flights = [];\n\n foreach ($response['flightStatuses'] as $flight) {\n // Set the carrier\n $carrier = $airlines[$flight['carrierFsCode']];\n\n $flight['carrier'] = $carrier;\n\n // Set the departure airport\n $departureAirport = $airports[$flight['departureAirportFsCode']];\n\n $flight['departureAirport'] = $departureAirport;\n\n // Set the arrival airport\n $arrivalAirport = $airports[$flight['arrivalAirportFsCode']];\n\n $flight['arrivalAirport'] = $arrivalAirport;\n\n $flights[] = $flight;\n }\n\n return $flights;\n }", "public function getFlights($from, $to)\n {\n $final_date = Carbon::now()->addMonth('1')->format('j/n/Y');\n $response = $this->client->get('https://api.skypicker.com/flights?fly_from=' . $from . '&fly_to=' . $to . '&date_from=' . date('j/n/Y') . '&date_to=' . $final_date . '&adults=1&infants=1');\n return $response;\n }", "static function fromJSON($array){ return json_decode($array, true); }", "private static function getFactsFromJSON() {\n $file = dirname(__FILE__) . '/chuck.json';\n \n return json_decode(file_get_contents($file));\n }", "public function getAirportDepartures($airport, $howMany, $offset) {\r\n //$result_airport = $this->client->AirportInfo($params_airport);\r\n //echo \"<hr><pre>\";\r\n //print_r($result_airport);\r\n //echo \"</pre>\";\r\n\r\n\r\n $params = array(\"airport\" => $airport, \"howMany\" => $howMany, \"filter\" => \"\", \"offset\" => $offset);\r\n $result = $this->client->Scheduled($params);\r\n\r\n //echo \"<hr><pre>\";\r\n //print_r($result);\r\n //echo \"</pre>\";\r\n\r\n $airportDepartures = array();\r\n\r\n if (!empty($result->ScheduledResult->scheduled)) {\r\n\r\n $amount = count($result->ScheduledResult->scheduled);\r\n //$flight = null;\r\n\r\n\r\n if ($amount > 0) {\r\n\r\n foreach ($result->ScheduledResult->scheduled as &$element) {\r\n\r\n $number = $element->ident;\r\n $airline = \"\";\r\n $airport_from = $element->origin;\r\n $airport_to = $element->destination;\r\n $aircraft = $element->aircrafttype;\r\n $flightstatus = \"S\";\r\n $arrival_sced = date(\"Y-m-d H:i:s\", $element->estimatedarrivaltime);\r\n $arrival_calc = \"\";\r\n $depart_sced = date(\"Y-m-d H:i:s\", $element->filed_departuretime);\r\n $depart_calc = \"\";\r\n $timestamp = \"\";\r\n $longitude = \"\";\r\n $latitude = \"\";\r\n $coordinates_log = \"\";\r\n $groundspeed = \"\";\r\n $heading = \"\";\r\n\r\n $airportDepartures[] = new Flight($number, $airline, $airport_from, $airport_to,\r\n $aircraft, $flightstatus, $arrival_sced, $arrival_calc,\r\n $depart_sced, $depart_calc, $timestamp, $longitude,\r\n $latitude, $coordinates_log, $groundspeed, $heading);\r\n }\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n return $airportDepartures;\r\n }", "public function flightsRespone($tourId)\n {\n \t$roundTrip = App\\FlightRoundTrip::where('tour_id', $tourId)->get();\n\n \t$flightsRespone = array();\n \tforeach ($roundTrip as $key => $value) {\n \t\t$temp = $this->renderFlightResponse($value->id);\n \t\t$temp['Round'] = array( 'id' => $value->id,\n 'price' => $value->price,\n \t\t\t\t\t\t\t\t'cabinClass' => $value->cabin_class,\n \t\t\t\t\t\t\t\t'seats' => $value->number_of_seat,\n \t\t\t\t\t\t\t\t'email' => $value->email,\n 'address' => $value->address,\n 'phone' => $value->phone,\n 'book_info' => $this->getFlightBookInfo($value->id),\n \t\t\t\t\t\t\t\t'created_at' => (string) $value->created_at\n \t\t\t\t\t\t\t);\n \t\tarray_push($flightsRespone, $temp);\n \t}\n\n \treturn $flightsRespone;\n }", "function seconds_to_arrival($response){\n $response = substr($response,1,strlen($response)-2);\n $json_obj = json_decode($response);\n $seconds_to_arrival = array();\n foreach($json_obj->Arrivals as $bus){\n array_push($seconds_to_arrival,$bus->SecondsToArrival);\n }\n var_export($seconds_to_arrival);\n return $seconds_to_arrival;\n}", "function extractCountryData(string $allJsonData) : array {\n\t$countries = [];\n\n\t$allData = json_decode($allJsonData, false);\n\t\n\tif( !is_null($allData) ) {\n\t\tforeach($allData as $fullCountryData) {\n\t\t\t$country = new Country();\n\t\t\t$country->loadFromFullCountryData($fullCountryData);\n\t\t\tarray_push($countries, $country);\n\t\t}\n\t}\n\t\n\treturn $countries;\n}", "public function api(string $flyplass) {\n\n // filtrer string flyplass\n $flyplass = strip_tags($flyplass);\n $data = $this->getFlights($flyplass);\n\n $flights = $data->flights;\n\n // $json = json_decode(json_encode($flights));\n // print_r($json);\n return response()->json($flights);\n\n }", "public function findFlights(Request $request)\n {\n // Let's extract our values from the request body, make things handy\n $tripType = $request->input('type');\n $departureCode = $request->input('departure');\n $arrivalCode = $request->input('arrival');\n\n // Start by looking for outbound flights, cuz nothing happens if you can't fligh out\n $outbound = Flight::where('departure_from','=', $departureCode)\n ->where('arrival_at', '=', $arrivalCode)\n ->get();\n\n if($outbound->isEmpty())\n {\n // early return for empty outbound flight. Can't go further if you can't fligh out!\n // so return empty array\n return $outbound->toJson();\n }\n else\n {\n // Need to grab the airport data in order to append it to flight records.\n // We'll need stuff like names and countries to produce a dataset that is fully usable.\n $departureAirport = Airport::where('iata_code', '=', $departureCode)->get()[0];\n $arrivalAirport = Airport::where('iata_code', '=', $arrivalCode)->get()[0];\n\n // Add needed data to flight records\n \n foreach ($outbound as $flight) {\n\n // Add type, departure_name, arrival_name\n $flight['type'] = 'outbound';\n $flight['departure_name'] = $departureAirport->name . ', ' . $departureAirport->city . ' (' . $departureAirport->iata_code . ')';\n $flight['arrival_name'] = $arrivalAirport->name . ', ' . $arrivalAirport->city . ' (' . $arrivalAirport->iata_code . ')';\n\n // // Add airline\n $flight->airline = Airline::select('name')\n ->where('iata_code', '=', substr($flight->flight_id, 0, 2))\n ->get()[0]->name;\n }\n\n // Return if this is a one way trip. We need nothing else.\n if ($tripType == 'oneWay')\n {\n return $outbound->toJson();\n }\n\n }\n\n // This is not a one Way trip, we assume Round Trip and look for return flights\n $inbound = Flight::where('departure_from','=', $arrivalCode)\n ->where('arrival_at', '=', $departureCode)\n ->get();\n\n if ($inbound->isEmpty())\n {\n // Can't make a round trip, return empty array\n return $inbound->toJson();\n }\n\n foreach ($inbound as $flight) {\n\n // Add type, departure_name, arrival_name\n $flight['type'] = 'inbound';\n $flight['departure_name'] = $arrivalAirport->name . ', ' . $arrivalAirport->city . ' (' . $arrivalAirport->iata_code . ')';\n $flight['arrival_name'] = $departureAirport->name . ', ' . $departureAirport->city . ' (' . $departureAirport->iata_code . ')';\n\n // // Add airline\n $flight->airline = Airline::select('name')\n ->where('iata_code', '=', substr($flight->flight_id, 0, 2))\n ->get()[0]->name;\n }\n\n // For now, we only have 'oneWay' and 'roundTrip', so return this as a roundtrip\n $roundTrips = $outbound->merge($inbound);\n\n return $roundTrips->toJson();\n }", "public function json_to_array()\n\t{\n\n\t\t// dd($this->_example_file_path);\n\t\t// we will use the Laravel's File class to fetch our JSON file.\n\t\t$file_path = $this->_example_file_path.'example_json.json';\n\n\t\tif ( file_exists($file_path))\n\t\t{\n\t\t\t$file = File::get($file_path);\n\n\t\t\tif ( ! empty($file))\n\t\t\t{\n\t\t\t\t$results = Formatter::make($file, 'json')->to_array();\n\n\t\t\t\tprint_r($results);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'Sorry, but the file you requested does not exist.';\n\t\t}\n\t}", "private function setFlights()\r\n {\r\n $filter = array('destination' => array('in', array_keys($this->allDestinations())));\r\n if($from = @$this->query['start']['from']){\r\n $filter['depart_date'] = array('>', $this->convertDate($from, 'Y-m-d'));\r\n }\r\n if($to = @$this->query['finish']['to']){\r\n $filter['return_date'] = array('<', $this->convertDate($to, 'Y-m-d'));\r\n }\r\n $this->flights = $this->flightApi()->getPriceMap($this->flightQuery)\r\n ->filter($filter)\r\n ->sort('value')\r\n ->crop(0, 10)\r\n ->group('destination')\r\n ->response;\r\n return $this;\r\n }", "static function fromJSON($json_data)\n {\n foreach ($json_data->disciplines as $discipline) {\n $discipline->available_tests = (array) $discipline->available_tests;\n\n }\n\n return $json_data;\n }", "private function formatJsonToObjects($json)\n {\n return json_decode($json);\n }", "public function Transform($result)\n {\n $hotels = collect(json_decode($result))\n ->map(function ($hotel) {\n return [\n 'provider' => 'BestHotel',\n 'hotelName' => $hotel->hotel ?? 'Unknown',\n 'fare' => round($hotel->hotelFare, 2),\n 'amenities' => isset($hotel->roomAmenities) ? explode(',', $hotel->roomAmenities) : []\n ];\n });\n return $hotels;\n }", "public static function jsonToArray($json)\r\n\t{\r\n\t\treturn json_decode($json, true);\r\n\t}", "public function run()\n {\n $json = '[{\"name\":\"Afghanistan\",\"iso2_code\":\"AF\",\"iso3_code\":\"AFG\",\"calling_code\":\"93\",\"native_name\":\"\\u0627\\u0641\\u063a\\u0627\\u0646\\u0633\\u062a\\u0627\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/afg.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AFN\",\"name\":\"Afghan afghani\",\"symbol\":\"\\u060b\"}},{\"name\":\"\\u00c5land Islands\",\"iso2_code\":\"AX\",\"iso3_code\":\"ALA\",\"calling_code\":\"358\",\"native_name\":\"\\u00c5land\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ala.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Albania\",\"iso2_code\":\"AL\",\"iso3_code\":\"ALB\",\"calling_code\":\"355\",\"native_name\":\"Shqip\\u00ebria\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/alb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ALL\",\"name\":\"Albanian lek\",\"symbol\":\"L\"}},{\"name\":\"Algeria\",\"iso2_code\":\"DZ\",\"iso3_code\":\"DZA\",\"calling_code\":\"213\",\"native_name\":\"\\u0627\\u0644\\u062c\\u0632\\u0627\\u0626\\u0631\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/dza.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"DZD\",\"name\":\"Algerian dinar\",\"symbol\":\"\\u062f.\\u062c\"}},{\"name\":\"American Samoa\",\"iso2_code\":\"AS\",\"iso3_code\":\"ASM\",\"calling_code\":\"1684\",\"native_name\":\"American Samoa\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/asm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United State Dollar\",\"symbol\":\"$\"}},{\"name\":\"Andorra\",\"iso2_code\":\"AD\",\"iso3_code\":\"AND\",\"calling_code\":\"376\",\"native_name\":\"Andorra\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/and.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Angola\",\"iso2_code\":\"AO\",\"iso3_code\":\"AGO\",\"calling_code\":\"244\",\"native_name\":\"Angola\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ago.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AOA\",\"name\":\"Angolan kwanza\",\"symbol\":\"Kz\"}},{\"name\":\"Anguilla\",\"iso2_code\":\"AI\",\"iso3_code\":\"AIA\",\"calling_code\":\"1264\",\"native_name\":\"Anguilla\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/aia.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}},{\"name\":\"Antarctica\",\"iso2_code\":\"AQ\",\"iso3_code\":\"ATA\",\"calling_code\":\"672\",\"native_name\":\"Antarctica\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ata.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Antigua and Barbuda\",\"iso2_code\":\"AG\",\"iso3_code\":\"ATG\",\"calling_code\":\"1268\",\"native_name\":\"Antigua and Barbuda\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/atg.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}},{\"name\":\"Argentina\",\"iso2_code\":\"AR\",\"iso3_code\":\"ARG\",\"calling_code\":\"54\",\"native_name\":\"Argentina\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/arg.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ARS\",\"name\":\"Argentine peso\",\"symbol\":\"$\"}},{\"name\":\"Armenia\",\"iso2_code\":\"AM\",\"iso3_code\":\"ARM\",\"calling_code\":\"374\",\"native_name\":\"\\u0540\\u0561\\u0575\\u0561\\u057d\\u057f\\u0561\\u0576\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/arm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AMD\",\"name\":\"Armenian dram\",\"symbol\":null}},{\"name\":\"Aruba\",\"iso2_code\":\"AW\",\"iso3_code\":\"ABW\",\"calling_code\":\"297\",\"native_name\":\"Aruba\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/abw.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AWG\",\"name\":\"Aruban florin\",\"symbol\":\"\\u0192\"}},{\"name\":\"Australia\",\"iso2_code\":\"AU\",\"iso3_code\":\"AUS\",\"calling_code\":\"61\",\"native_name\":\"Australia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/aus.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Austria\",\"iso2_code\":\"AT\",\"iso3_code\":\"AUT\",\"calling_code\":\"43\",\"native_name\":\"\\u00d6sterreich\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/aut.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Azerbaijan\",\"iso2_code\":\"AZ\",\"iso3_code\":\"AZE\",\"calling_code\":\"994\",\"native_name\":\"Az\\u0259rbaycan\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/aze.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AZN\",\"name\":\"Azerbaijani manat\",\"symbol\":null}},{\"name\":\"Bahamas\",\"iso2_code\":\"BS\",\"iso3_code\":\"BHS\",\"calling_code\":\"1242\",\"native_name\":\"Bahamas\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bhs.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BSD\",\"name\":\"Bahamian dollar\",\"symbol\":\"$\"}},{\"name\":\"Bahrain\",\"iso2_code\":\"BH\",\"iso3_code\":\"BHR\",\"calling_code\":\"973\",\"native_name\":\"\\u200f\\u0627\\u0644\\u0628\\u062d\\u0631\\u064a\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bhr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BHD\",\"name\":\"Bahraini dinar\",\"symbol\":\".\\u062f.\\u0628\"}},{\"name\":\"Bangladesh\",\"iso2_code\":\"BD\",\"iso3_code\":\"BGD\",\"calling_code\":\"880\",\"native_name\":\"Bangladesh\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bgd.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BDT\",\"name\":\"Bangladeshi taka\",\"symbol\":\"\\u09f3\"}},{\"name\":\"Barbados\",\"iso2_code\":\"BB\",\"iso3_code\":\"BRB\",\"calling_code\":\"1246\",\"native_name\":\"Barbados\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/brb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BBD\",\"name\":\"Barbadian dollar\",\"symbol\":\"$\"}},{\"name\":\"Belarus\",\"iso2_code\":\"BY\",\"iso3_code\":\"BLR\",\"calling_code\":\"375\",\"native_name\":\"\\u0411\\u0435\\u043b\\u0430\\u0440\\u0443\\u0301\\u0441\\u044c\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/blr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BYN\",\"name\":\"New Belarusian ruble\",\"symbol\":\"Br\"}},{\"name\":\"Belgium\",\"iso2_code\":\"BE\",\"iso3_code\":\"BEL\",\"calling_code\":\"32\",\"native_name\":\"Belgi\\u00eb\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bel.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Belize\",\"iso2_code\":\"BZ\",\"iso3_code\":\"BLZ\",\"calling_code\":\"501\",\"native_name\":\"Belize\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/blz.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BZD\",\"name\":\"Belize dollar\",\"symbol\":\"$\"}},{\"name\":\"Benin\",\"iso2_code\":\"BJ\",\"iso3_code\":\"BEN\",\"calling_code\":\"229\",\"native_name\":\"B\\u00e9nin\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ben.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Bermuda\",\"iso2_code\":\"BM\",\"iso3_code\":\"BMU\",\"calling_code\":\"1441\",\"native_name\":\"Bermuda\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bmu.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BMD\",\"name\":\"Bermudian dollar\",\"symbol\":\"$\"}},{\"name\":\"Bhutan\",\"iso2_code\":\"BT\",\"iso3_code\":\"BTN\",\"calling_code\":\"975\",\"native_name\":\"\\u02bcbrug-yul\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/btn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BTN\",\"name\":\"Bhutanese ngultrum\",\"symbol\":\"Nu.\"}},{\"name\":\"Bolivia (Plurinational State of)\",\"iso2_code\":\"BO\",\"iso3_code\":\"BOL\",\"calling_code\":\"591\",\"native_name\":\"Bolivia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bol.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BOB\",\"name\":\"Bolivian boliviano\",\"symbol\":\"Bs.\"}},{\"name\":\"Bonaire, Sint Eustatius and Saba\",\"iso2_code\":\"BQ\",\"iso3_code\":\"BES\",\"calling_code\":\"5997\",\"native_name\":\"Bonaire\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bes.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Bosnia and Herzegovina\",\"iso2_code\":\"BA\",\"iso3_code\":\"BIH\",\"calling_code\":\"387\",\"native_name\":\"Bosna i Hercegovina\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bih.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BAM\",\"name\":\"Bosnia and Herzegovina convertible mark\",\"symbol\":null}},{\"name\":\"Botswana\",\"iso2_code\":\"BW\",\"iso3_code\":\"BWA\",\"calling_code\":\"267\",\"native_name\":\"Botswana\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bwa.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BWP\",\"name\":\"Botswana pula\",\"symbol\":\"P\"}},{\"name\":\"Bouvet Island\",\"iso2_code\":\"BV\",\"iso3_code\":\"BVT\",\"calling_code\":\"\",\"native_name\":\"Bouvet\\u00f8ya\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bvt.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NOK\",\"name\":\"Norwegian krone\",\"symbol\":\"kr\"}},{\"name\":\"Brazil\",\"iso2_code\":\"BR\",\"iso3_code\":\"BRA\",\"calling_code\":\"55\",\"native_name\":\"Brasil\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bra.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BRL\",\"name\":\"Brazilian real\",\"symbol\":\"R$\"}},{\"name\":\"British Indian Ocean Territory\",\"iso2_code\":\"IO\",\"iso3_code\":\"IOT\",\"calling_code\":\"246\",\"native_name\":\"British Indian Ocean Territory\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/iot.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"United States Minor Outlying Islands\",\"iso2_code\":\"UM\",\"iso3_code\":\"UMI\",\"calling_code\":\"\",\"native_name\":\"United States Minor Outlying Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/umi.svg\",\"measure_system\":\"IMPERIAL\",\"currency\":{\"code\":\"USD\",\"name\":\"United States Dollar\",\"symbol\":\"$\"}},{\"name\":\"Virgin Islands (British)\",\"iso2_code\":\"VG\",\"iso3_code\":\"VGB\",\"calling_code\":\"1284\",\"native_name\":\"British Virgin Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/vgb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":null,\"name\":\"[D]\",\"symbol\":\"$\"}},{\"name\":\"Virgin Islands (U.S.)\",\"iso2_code\":\"VI\",\"iso3_code\":\"VIR\",\"calling_code\":\"1 340\",\"native_name\":\"Virgin Islands of the United States\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/vir.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Brunei Darussalam\",\"iso2_code\":\"BN\",\"iso3_code\":\"BRN\",\"calling_code\":\"673\",\"native_name\":\"Negara Brunei Darussalam\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/brn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BND\",\"name\":\"Brunei dollar\",\"symbol\":\"$\"}},{\"name\":\"Bulgaria\",\"iso2_code\":\"BG\",\"iso3_code\":\"BGR\",\"calling_code\":\"359\",\"native_name\":\"\\u0411\\u044a\\u043b\\u0433\\u0430\\u0440\\u0438\\u044f\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bgr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BGN\",\"name\":\"Bulgarian lev\",\"symbol\":\"\\u043b\\u0432\"}},{\"name\":\"Burkina Faso\",\"iso2_code\":\"BF\",\"iso3_code\":\"BFA\",\"calling_code\":\"226\",\"native_name\":\"Burkina Faso\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bfa.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Burundi\",\"iso2_code\":\"BI\",\"iso3_code\":\"BDI\",\"calling_code\":\"257\",\"native_name\":\"Burundi\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/bdi.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BIF\",\"name\":\"Burundian franc\",\"symbol\":\"Fr\"}},{\"name\":\"Cambodia\",\"iso2_code\":\"KH\",\"iso3_code\":\"KHM\",\"calling_code\":\"855\",\"native_name\":\"K\\u00e2mp\\u016dch\\u00e9a\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/khm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KHR\",\"name\":\"Cambodian riel\",\"symbol\":\"\\u17db\"}},{\"name\":\"Cameroon\",\"iso2_code\":\"CM\",\"iso3_code\":\"CMR\",\"calling_code\":\"237\",\"native_name\":\"Cameroon\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cmr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Canada\",\"iso2_code\":\"CA\",\"iso3_code\":\"CAN\",\"calling_code\":\"1\",\"native_name\":\"Canada\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/can.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CAD\",\"name\":\"Canadian dollar\",\"symbol\":\"$\"}},{\"name\":\"Cabo Verde\",\"iso2_code\":\"CV\",\"iso3_code\":\"CPV\",\"calling_code\":\"238\",\"native_name\":\"Cabo Verde\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cpv.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CVE\",\"name\":\"Cape Verdean escudo\",\"symbol\":\"Esc\"}},{\"name\":\"Cayman Islands\",\"iso2_code\":\"KY\",\"iso3_code\":\"CYM\",\"calling_code\":\"1345\",\"native_name\":\"Cayman Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cym.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KYD\",\"name\":\"Cayman Islands dollar\",\"symbol\":\"$\"}},{\"name\":\"Central African Republic\",\"iso2_code\":\"CF\",\"iso3_code\":\"CAF\",\"calling_code\":\"236\",\"native_name\":\"K\\u00f6d\\u00f6r\\u00f6s\\u00ease t\\u00ee B\\u00eaafr\\u00eeka\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/caf.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Chad\",\"iso2_code\":\"TD\",\"iso3_code\":\"TCD\",\"calling_code\":\"235\",\"native_name\":\"Tchad\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tcd.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Chile\",\"iso2_code\":\"CL\",\"iso3_code\":\"CHL\",\"calling_code\":\"56\",\"native_name\":\"Chile\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/chl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CLP\",\"name\":\"Chilean peso\",\"symbol\":\"$\"}},{\"name\":\"China\",\"iso2_code\":\"CN\",\"iso3_code\":\"CHN\",\"calling_code\":\"86\",\"native_name\":\"\\u4e2d\\u56fd\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/chn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CNY\",\"name\":\"Chinese yuan\",\"symbol\":\"\\u00a5\"}},{\"name\":\"Christmas Island\",\"iso2_code\":\"CX\",\"iso3_code\":\"CXR\",\"calling_code\":\"61\",\"native_name\":\"Christmas Island\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cxr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Cocos (Keeling) Islands\",\"iso2_code\":\"CC\",\"iso3_code\":\"CCK\",\"calling_code\":\"61\",\"native_name\":\"Cocos (Keeling) Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cck.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Colombia\",\"iso2_code\":\"CO\",\"iso3_code\":\"COL\",\"calling_code\":\"57\",\"native_name\":\"Colombia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/col.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"COP\",\"name\":\"Colombian peso\",\"symbol\":\"$\"}},{\"name\":\"Comoros\",\"iso2_code\":\"KM\",\"iso3_code\":\"COM\",\"calling_code\":\"269\",\"native_name\":\"Komori\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/com.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KMF\",\"name\":\"Comorian franc\",\"symbol\":\"Fr\"}},{\"name\":\"Congo\",\"iso2_code\":\"CG\",\"iso3_code\":\"COG\",\"calling_code\":\"242\",\"native_name\":\"R\\u00e9publique du Congo\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cog.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Congo (Democratic Republic of the)\",\"iso2_code\":\"CD\",\"iso3_code\":\"COD\",\"calling_code\":\"243\",\"native_name\":\"R\\u00e9publique d\\u00e9mocratique du Congo\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cod.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CDF\",\"name\":\"Congolese franc\",\"symbol\":\"Fr\"}},{\"name\":\"Cook Islands\",\"iso2_code\":\"CK\",\"iso3_code\":\"COK\",\"calling_code\":\"682\",\"native_name\":\"Cook Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cok.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"}},{\"name\":\"Costa Rica\",\"iso2_code\":\"CR\",\"iso3_code\":\"CRI\",\"calling_code\":\"506\",\"native_name\":\"Costa Rica\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cri.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CRC\",\"name\":\"Costa Rican col\\u00f3n\",\"symbol\":\"\\u20a1\"}},{\"name\":\"Croatia\",\"iso2_code\":\"HR\",\"iso3_code\":\"HRV\",\"calling_code\":\"385\",\"native_name\":\"Hrvatska\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/hrv.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"HRK\",\"name\":\"Croatian kuna\",\"symbol\":\"kn\"}},{\"name\":\"Cuba\",\"iso2_code\":\"CU\",\"iso3_code\":\"CUB\",\"calling_code\":\"53\",\"native_name\":\"Cuba\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cub.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CUC\",\"name\":\"Cuban convertible peso\",\"symbol\":\"$\"}},{\"name\":\"Cura\\u00e7ao\",\"iso2_code\":\"CW\",\"iso3_code\":\"CUW\",\"calling_code\":\"599\",\"native_name\":\"Cura\\u00e7ao\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cuw.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ANG\",\"name\":\"Netherlands Antillean guilder\",\"symbol\":\"\\u0192\"}},{\"name\":\"Cyprus\",\"iso2_code\":\"CY\",\"iso3_code\":\"CYP\",\"calling_code\":\"357\",\"native_name\":\"\\u039a\\u03cd\\u03c0\\u03c1\\u03bf\\u03c2\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cyp.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Czech Republic\",\"iso2_code\":\"CZ\",\"iso3_code\":\"CZE\",\"calling_code\":\"420\",\"native_name\":\"\\u010cesk\\u00e1 republika\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/cze.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CZK\",\"name\":\"Czech koruna\",\"symbol\":\"K\\u010d\"}},{\"name\":\"Denmark\",\"iso2_code\":\"DK\",\"iso3_code\":\"DNK\",\"calling_code\":\"45\",\"native_name\":\"Danmark\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/dnk.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"DKK\",\"name\":\"Danish krone\",\"symbol\":\"kr\"}},{\"name\":\"Djibouti\",\"iso2_code\":\"DJ\",\"iso3_code\":\"DJI\",\"calling_code\":\"253\",\"native_name\":\"Djibouti\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/dji.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"DJF\",\"name\":\"Djiboutian franc\",\"symbol\":\"Fr\"}},{\"name\":\"Dominica\",\"iso2_code\":\"DM\",\"iso3_code\":\"DMA\",\"calling_code\":\"1767\",\"native_name\":\"Dominica\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/dma.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}},{\"name\":\"Dominican Republic\",\"iso2_code\":\"DO\",\"iso3_code\":\"DOM\",\"calling_code\":\"1809\",\"native_name\":\"Rep\\u00fablica Dominicana\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/dom.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"DOP\",\"name\":\"Dominican peso\",\"symbol\":\"$\"}},{\"name\":\"Ecuador\",\"iso2_code\":\"EC\",\"iso3_code\":\"ECU\",\"calling_code\":\"593\",\"native_name\":\"Ecuador\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ecu.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Egypt\",\"iso2_code\":\"EG\",\"iso3_code\":\"EGY\",\"calling_code\":\"20\",\"native_name\":\"\\u0645\\u0635\\u0631\\u200e\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/egy.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EGP\",\"name\":\"Egyptian pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"El Salvador\",\"iso2_code\":\"SV\",\"iso3_code\":\"SLV\",\"calling_code\":\"503\",\"native_name\":\"El Salvador\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/slv.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Equatorial Guinea\",\"iso2_code\":\"GQ\",\"iso3_code\":\"GNQ\",\"calling_code\":\"240\",\"native_name\":\"Guinea Ecuatorial\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gnq.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Eritrea\",\"iso2_code\":\"ER\",\"iso3_code\":\"ERI\",\"calling_code\":\"291\",\"native_name\":\"\\u12a4\\u122d\\u1275\\u122b\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/eri.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ERN\",\"name\":\"Eritrean nakfa\",\"symbol\":\"Nfk\"}},{\"name\":\"Estonia\",\"iso2_code\":\"EE\",\"iso3_code\":\"EST\",\"calling_code\":\"372\",\"native_name\":\"Eesti\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/est.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Ethiopia\",\"iso2_code\":\"ET\",\"iso3_code\":\"ETH\",\"calling_code\":\"251\",\"native_name\":\"\\u12a2\\u1275\\u12ee\\u1335\\u12eb\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/eth.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ETB\",\"name\":\"Ethiopian birr\",\"symbol\":\"Br\"}},{\"name\":\"Falkland Islands (Malvinas)\",\"iso2_code\":\"FK\",\"iso3_code\":\"FLK\",\"calling_code\":\"500\",\"native_name\":\"Falkland Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/flk.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"FKP\",\"name\":\"Falkland Islands pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Faroe Islands\",\"iso2_code\":\"FO\",\"iso3_code\":\"FRO\",\"calling_code\":\"298\",\"native_name\":\"F\\u00f8royar\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/fro.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"DKK\",\"name\":\"Danish krone\",\"symbol\":\"kr\"}},{\"name\":\"Fiji\",\"iso2_code\":\"FJ\",\"iso3_code\":\"FJI\",\"calling_code\":\"679\",\"native_name\":\"Fiji\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/fji.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"FJD\",\"name\":\"Fijian dollar\",\"symbol\":\"$\"}},{\"name\":\"Finland\",\"iso2_code\":\"FI\",\"iso3_code\":\"FIN\",\"calling_code\":\"358\",\"native_name\":\"Suomi\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/fin.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"France\",\"iso2_code\":\"FR\",\"iso3_code\":\"FRA\",\"calling_code\":\"33\",\"native_name\":\"France\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/fra.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"French Guiana\",\"iso2_code\":\"GF\",\"iso3_code\":\"GUF\",\"calling_code\":\"594\",\"native_name\":\"Guyane fran\\u00e7aise\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/guf.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"French Polynesia\",\"iso2_code\":\"PF\",\"iso3_code\":\"PYF\",\"calling_code\":\"689\",\"native_name\":\"Polyn\\u00e9sie fran\\u00e7aise\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/pyf.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XPF\",\"name\":\"CFP franc\",\"symbol\":\"Fr\"}},{\"name\":\"French Southern Territories\",\"iso2_code\":\"TF\",\"iso3_code\":\"ATF\",\"calling_code\":\"\",\"native_name\":\"Territoire des Terres australes et antarctiques fran\\u00e7aises\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/atf.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Gabon\",\"iso2_code\":\"GA\",\"iso3_code\":\"GAB\",\"calling_code\":\"241\",\"native_name\":\"Gabon\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gab.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XAF\",\"name\":\"Central African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Gambia\",\"iso2_code\":\"GM\",\"iso3_code\":\"GMB\",\"calling_code\":\"220\",\"native_name\":\"Gambia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gmb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GMD\",\"name\":\"Gambian dalasi\",\"symbol\":\"D\"}},{\"name\":\"Georgia\",\"iso2_code\":\"GE\",\"iso3_code\":\"GEO\",\"calling_code\":\"995\",\"native_name\":\"\\u10e1\\u10d0\\u10e5\\u10d0\\u10e0\\u10d7\\u10d5\\u10d4\\u10da\\u10dd\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/geo.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GEL\",\"name\":\"Georgian Lari\",\"symbol\":\"\\u10da\"}},{\"name\":\"Germany\",\"iso2_code\":\"DE\",\"iso3_code\":\"DEU\",\"calling_code\":\"49\",\"native_name\":\"Deutschland\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/deu.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Ghana\",\"iso2_code\":\"GH\",\"iso3_code\":\"GHA\",\"calling_code\":\"233\",\"native_name\":\"Ghana\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gha.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GHS\",\"name\":\"Ghanaian cedi\",\"symbol\":\"\\u20b5\"}},{\"name\":\"Gibraltar\",\"iso2_code\":\"GI\",\"iso3_code\":\"GIB\",\"calling_code\":\"350\",\"native_name\":\"Gibraltar\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gib.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GIP\",\"name\":\"Gibraltar pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Greece\",\"iso2_code\":\"GR\",\"iso3_code\":\"GRC\",\"calling_code\":\"30\",\"native_name\":\"\\u0395\\u03bb\\u03bb\\u03ac\\u03b4\\u03b1\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/grc.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Greenland\",\"iso2_code\":\"GL\",\"iso3_code\":\"GRL\",\"calling_code\":\"299\",\"native_name\":\"Kalaallit Nunaat\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/grl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"DKK\",\"name\":\"Danish krone\",\"symbol\":\"kr\"}},{\"name\":\"Grenada\",\"iso2_code\":\"GD\",\"iso3_code\":\"GRD\",\"calling_code\":\"1473\",\"native_name\":\"Grenada\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/grd.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}},{\"name\":\"Guadeloupe\",\"iso2_code\":\"GP\",\"iso3_code\":\"GLP\",\"calling_code\":\"590\",\"native_name\":\"Guadeloupe\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/glp.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Guam\",\"iso2_code\":\"GU\",\"iso3_code\":\"GUM\",\"calling_code\":\"1671\",\"native_name\":\"Guam\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gum.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Guatemala\",\"iso2_code\":\"GT\",\"iso3_code\":\"GTM\",\"calling_code\":\"502\",\"native_name\":\"Guatemala\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gtm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GTQ\",\"name\":\"Guatemalan quetzal\",\"symbol\":\"Q\"}},{\"name\":\"Guernsey\",\"iso2_code\":\"GG\",\"iso3_code\":\"GGY\",\"calling_code\":\"44\",\"native_name\":\"Guernsey\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ggy.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Guinea\",\"iso2_code\":\"GN\",\"iso3_code\":\"GIN\",\"calling_code\":\"224\",\"native_name\":\"Guin\\u00e9e\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gin.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GNF\",\"name\":\"Guinean franc\",\"symbol\":\"Fr\"}},{\"name\":\"Guinea-Bissau\",\"iso2_code\":\"GW\",\"iso3_code\":\"GNB\",\"calling_code\":\"245\",\"native_name\":\"Guin\\u00e9-Bissau\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gnb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Guyana\",\"iso2_code\":\"GY\",\"iso3_code\":\"GUY\",\"calling_code\":\"592\",\"native_name\":\"Guyana\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/guy.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GYD\",\"name\":\"Guyanese dollar\",\"symbol\":\"$\"}},{\"name\":\"Haiti\",\"iso2_code\":\"HT\",\"iso3_code\":\"HTI\",\"calling_code\":\"509\",\"native_name\":\"Ha\\u00efti\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/hti.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"HTG\",\"name\":\"Haitian gourde\",\"symbol\":\"G\"}},{\"name\":\"Heard Island and McDonald Islands\",\"iso2_code\":\"HM\",\"iso3_code\":\"HMD\",\"calling_code\":\"\",\"native_name\":\"Heard Island and McDonald Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/hmd.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Holy See\",\"iso2_code\":\"VA\",\"iso3_code\":\"VAT\",\"calling_code\":\"379\",\"native_name\":\"Sancta Sedes\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/vat.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Honduras\",\"iso2_code\":\"HN\",\"iso3_code\":\"HND\",\"calling_code\":\"504\",\"native_name\":\"Honduras\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/hnd.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"HNL\",\"name\":\"Honduran lempira\",\"symbol\":\"L\"}},{\"name\":\"Hong Kong\",\"iso2_code\":\"HK\",\"iso3_code\":\"HKG\",\"calling_code\":\"852\",\"native_name\":\"\\u9999\\u6e2f\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/hkg.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"HKD\",\"name\":\"Hong Kong dollar\",\"symbol\":\"$\"}},{\"name\":\"Hungary\",\"iso2_code\":\"HU\",\"iso3_code\":\"HUN\",\"calling_code\":\"36\",\"native_name\":\"Magyarorsz\\u00e1g\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/hun.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"HUF\",\"name\":\"Hungarian forint\",\"symbol\":\"Ft\"}},{\"name\":\"Iceland\",\"iso2_code\":\"IS\",\"iso3_code\":\"ISL\",\"calling_code\":\"354\",\"native_name\":\"\\u00cdsland\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/isl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ISK\",\"name\":\"Icelandic kr\\u00f3na\",\"symbol\":\"kr\"}},{\"name\":\"India\",\"iso2_code\":\"IN\",\"iso3_code\":\"IND\",\"calling_code\":\"91\",\"native_name\":\"\\u092d\\u093e\\u0930\\u0924\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ind.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"INR\",\"name\":\"Indian rupee\",\"symbol\":\"\\u20b9\"}},{\"name\":\"Indonesia\",\"iso2_code\":\"ID\",\"iso3_code\":\"IDN\",\"calling_code\":\"62\",\"native_name\":\"Indonesia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/idn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"IDR\",\"name\":\"Indonesian rupiah\",\"symbol\":\"Rp\"}},{\"name\":\"C\\u00f4te d\\'Ivoire\",\"iso2_code\":\"CI\",\"iso3_code\":\"CIV\",\"calling_code\":\"225\",\"native_name\":\"C\\u00f4te d\\'Ivoire\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/civ.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Iran (Islamic Republic of)\",\"iso2_code\":\"IR\",\"iso3_code\":\"IRN\",\"calling_code\":\"98\",\"native_name\":\"\\u0627\\u06cc\\u0631\\u0627\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/irn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"IRR\",\"name\":\"Iranian rial\",\"symbol\":\"\\ufdfc\"}},{\"name\":\"Iraq\",\"iso2_code\":\"IQ\",\"iso3_code\":\"IRQ\",\"calling_code\":\"964\",\"native_name\":\"\\u0627\\u0644\\u0639\\u0631\\u0627\\u0642\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/irq.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"IQD\",\"name\":\"Iraqi dinar\",\"symbol\":\"\\u0639.\\u062f\"}},{\"name\":\"Ireland\",\"iso2_code\":\"IE\",\"iso3_code\":\"IRL\",\"calling_code\":\"353\",\"native_name\":\"\\u00c9ire\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/irl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Isle of Man\",\"iso2_code\":\"IM\",\"iso3_code\":\"IMN\",\"calling_code\":\"44\",\"native_name\":\"Isle of Man\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/imn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Israel\",\"iso2_code\":\"IL\",\"iso3_code\":\"ISR\",\"calling_code\":\"972\",\"native_name\":\"\\u05d9\\u05b4\\u05e9\\u05b0\\u05c2\\u05e8\\u05b8\\u05d0\\u05b5\\u05dc\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/isr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ILS\",\"name\":\"Israeli new shekel\",\"symbol\":\"\\u20aa\"}},{\"name\":\"Italy\",\"iso2_code\":\"IT\",\"iso3_code\":\"ITA\",\"calling_code\":\"39\",\"native_name\":\"Italia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ita.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Jamaica\",\"iso2_code\":\"JM\",\"iso3_code\":\"JAM\",\"calling_code\":\"1876\",\"native_name\":\"Jamaica\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/jam.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"JMD\",\"name\":\"Jamaican dollar\",\"symbol\":\"$\"}},{\"name\":\"Japan\",\"iso2_code\":\"JP\",\"iso3_code\":\"JPN\",\"calling_code\":\"81\",\"native_name\":\"\\u65e5\\u672c\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/jpn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"JPY\",\"name\":\"Japanese yen\",\"symbol\":\"\\u00a5\"}},{\"name\":\"Jersey\",\"iso2_code\":\"JE\",\"iso3_code\":\"JEY\",\"calling_code\":\"44\",\"native_name\":\"Jersey\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/jey.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Jordan\",\"iso2_code\":\"JO\",\"iso3_code\":\"JOR\",\"calling_code\":\"962\",\"native_name\":\"\\u0627\\u0644\\u0623\\u0631\\u062f\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/jor.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"JOD\",\"name\":\"Jordanian dinar\",\"symbol\":\"\\u062f.\\u0627\"}},{\"name\":\"Kazakhstan\",\"iso2_code\":\"KZ\",\"iso3_code\":\"KAZ\",\"calling_code\":\"76\",\"native_name\":\"\\u049a\\u0430\\u0437\\u0430\\u049b\\u0441\\u0442\\u0430\\u043d\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/kaz.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KZT\",\"name\":\"Kazakhstani tenge\",\"symbol\":null}},{\"name\":\"Kenya\",\"iso2_code\":\"KE\",\"iso3_code\":\"KEN\",\"calling_code\":\"254\",\"native_name\":\"Kenya\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ken.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KES\",\"name\":\"Kenyan shilling\",\"symbol\":\"Sh\"}},{\"name\":\"Kiribati\",\"iso2_code\":\"KI\",\"iso3_code\":\"KIR\",\"calling_code\":\"686\",\"native_name\":\"Kiribati\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/kir.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Kuwait\",\"iso2_code\":\"KW\",\"iso3_code\":\"KWT\",\"calling_code\":\"965\",\"native_name\":\"\\u0627\\u0644\\u0643\\u0648\\u064a\\u062a\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/kwt.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KWD\",\"name\":\"Kuwaiti dinar\",\"symbol\":\"\\u062f.\\u0643\"}},{\"name\":\"Kyrgyzstan\",\"iso2_code\":\"KG\",\"iso3_code\":\"KGZ\",\"calling_code\":\"996\",\"native_name\":\"\\u041a\\u044b\\u0440\\u0433\\u044b\\u0437\\u0441\\u0442\\u0430\\u043d\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/kgz.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KGS\",\"name\":\"Kyrgyzstani som\",\"symbol\":\"\\u0441\"}},{\"name\":\"Lao People\\'s Democratic Republic\",\"iso2_code\":\"LA\",\"iso3_code\":\"LAO\",\"calling_code\":\"856\",\"native_name\":\"\\u0eaa\\u0e9b\\u0e9b\\u0ea5\\u0eb2\\u0ea7\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lao.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"LAK\",\"name\":\"Lao kip\",\"symbol\":\"\\u20ad\"}},{\"name\":\"Latvia\",\"iso2_code\":\"LV\",\"iso3_code\":\"LVA\",\"calling_code\":\"371\",\"native_name\":\"Latvija\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lva.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Lebanon\",\"iso2_code\":\"LB\",\"iso3_code\":\"LBN\",\"calling_code\":\"961\",\"native_name\":\"\\u0644\\u0628\\u0646\\u0627\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lbn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"LBP\",\"name\":\"Lebanese pound\",\"symbol\":\"\\u0644.\\u0644\"}},{\"name\":\"Lesotho\",\"iso2_code\":\"LS\",\"iso3_code\":\"LSO\",\"calling_code\":\"266\",\"native_name\":\"Lesotho\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lso.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"LSL\",\"name\":\"Lesotho loti\",\"symbol\":\"L\"}},{\"name\":\"Liberia\",\"iso2_code\":\"LR\",\"iso3_code\":\"LBR\",\"calling_code\":\"231\",\"native_name\":\"Liberia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lbr.svg\",\"measure_system\":\"IMPERIAL\",\"currency\":{\"code\":\"LRD\",\"name\":\"Liberian dollar\",\"symbol\":\"$\"}},{\"name\":\"Libya\",\"iso2_code\":\"LY\",\"iso3_code\":\"LBY\",\"calling_code\":\"218\",\"native_name\":\"\\u200f\\u0644\\u064a\\u0628\\u064a\\u0627\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lby.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"LYD\",\"name\":\"Libyan dinar\",\"symbol\":\"\\u0644.\\u062f\"}},{\"name\":\"Liechtenstein\",\"iso2_code\":\"LI\",\"iso3_code\":\"LIE\",\"calling_code\":\"423\",\"native_name\":\"Liechtenstein\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lie.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CHF\",\"name\":\"Swiss franc\",\"symbol\":\"Fr\"}},{\"name\":\"Lithuania\",\"iso2_code\":\"LT\",\"iso3_code\":\"LTU\",\"calling_code\":\"370\",\"native_name\":\"Lietuva\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ltu.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Luxembourg\",\"iso2_code\":\"LU\",\"iso3_code\":\"LUX\",\"calling_code\":\"352\",\"native_name\":\"Luxembourg\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lux.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Macao\",\"iso2_code\":\"MO\",\"iso3_code\":\"MAC\",\"calling_code\":\"853\",\"native_name\":\"\\u6fb3\\u9580\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mac.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MOP\",\"name\":\"Macanese pataca\",\"symbol\":\"P\"}},{\"name\":\"Macedonia (the former Yugoslav Republic of)\",\"iso2_code\":\"MK\",\"iso3_code\":\"MKD\",\"calling_code\":\"389\",\"native_name\":\"\\u041c\\u0430\\u043a\\u0435\\u0434\\u043e\\u043d\\u0438\\u0458\\u0430\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mkd.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MKD\",\"name\":\"Macedonian denar\",\"symbol\":\"\\u0434\\u0435\\u043d\"}},{\"name\":\"Madagascar\",\"iso2_code\":\"MG\",\"iso3_code\":\"MDG\",\"calling_code\":\"261\",\"native_name\":\"Madagasikara\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mdg.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MGA\",\"name\":\"Malagasy ariary\",\"symbol\":\"Ar\"}},{\"name\":\"Malawi\",\"iso2_code\":\"MW\",\"iso3_code\":\"MWI\",\"calling_code\":\"265\",\"native_name\":\"Malawi\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mwi.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MWK\",\"name\":\"Malawian kwacha\",\"symbol\":\"MK\"}},{\"name\":\"Malaysia\",\"iso2_code\":\"MY\",\"iso3_code\":\"MYS\",\"calling_code\":\"60\",\"native_name\":\"Malaysia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mys.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MYR\",\"name\":\"Malaysian ringgit\",\"symbol\":\"RM\"}},{\"name\":\"Maldives\",\"iso2_code\":\"MV\",\"iso3_code\":\"MDV\",\"calling_code\":\"960\",\"native_name\":\"Maldives\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mdv.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MVR\",\"name\":\"Maldivian rufiyaa\",\"symbol\":\".\\u0783\"}},{\"name\":\"Mali\",\"iso2_code\":\"ML\",\"iso3_code\":\"MLI\",\"calling_code\":\"223\",\"native_name\":\"Mali\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mli.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Malta\",\"iso2_code\":\"MT\",\"iso3_code\":\"MLT\",\"calling_code\":\"356\",\"native_name\":\"Malta\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mlt.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Marshall Islands\",\"iso2_code\":\"MH\",\"iso3_code\":\"MHL\",\"calling_code\":\"692\",\"native_name\":\"M\\u0327aje\\u013c\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mhl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Martinique\",\"iso2_code\":\"MQ\",\"iso3_code\":\"MTQ\",\"calling_code\":\"596\",\"native_name\":\"Martinique\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mtq.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Mauritania\",\"iso2_code\":\"MR\",\"iso3_code\":\"MRT\",\"calling_code\":\"222\",\"native_name\":\"\\u0645\\u0648\\u0631\\u064a\\u062a\\u0627\\u0646\\u064a\\u0627\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mrt.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MRO\",\"name\":\"Mauritanian ouguiya\",\"symbol\":\"UM\"}},{\"name\":\"Mauritius\",\"iso2_code\":\"MU\",\"iso3_code\":\"MUS\",\"calling_code\":\"230\",\"native_name\":\"Maurice\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mus.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MUR\",\"name\":\"Mauritian rupee\",\"symbol\":\"\\u20a8\"}},{\"name\":\"Mayotte\",\"iso2_code\":\"YT\",\"iso3_code\":\"MYT\",\"calling_code\":\"262\",\"native_name\":\"Mayotte\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/myt.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Mexico\",\"iso2_code\":\"MX\",\"iso3_code\":\"MEX\",\"calling_code\":\"52\",\"native_name\":\"M\\u00e9xico\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mex.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MXN\",\"name\":\"Mexican peso\",\"symbol\":\"$\"}},{\"name\":\"Micronesia (Federated States of)\",\"iso2_code\":\"FM\",\"iso3_code\":\"FSM\",\"calling_code\":\"691\",\"native_name\":\"Micronesia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/fsm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":null,\"name\":\"[D]\",\"symbol\":\"$\"}},{\"name\":\"Moldova (Republic of)\",\"iso2_code\":\"MD\",\"iso3_code\":\"MDA\",\"calling_code\":\"373\",\"native_name\":\"Moldova\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mda.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MDL\",\"name\":\"Moldovan leu\",\"symbol\":\"L\"}},{\"name\":\"Monaco\",\"iso2_code\":\"MC\",\"iso3_code\":\"MCO\",\"calling_code\":\"377\",\"native_name\":\"Monaco\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mco.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Mongolia\",\"iso2_code\":\"MN\",\"iso3_code\":\"MNG\",\"calling_code\":\"976\",\"native_name\":\"\\u041c\\u043e\\u043d\\u0433\\u043e\\u043b \\u0443\\u043b\\u0441\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mng.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MNT\",\"name\":\"Mongolian t\\u00f6gr\\u00f6g\",\"symbol\":\"\\u20ae\"}},{\"name\":\"Montenegro\",\"iso2_code\":\"ME\",\"iso3_code\":\"MNE\",\"calling_code\":\"382\",\"native_name\":\"\\u0426\\u0440\\u043d\\u0430 \\u0413\\u043e\\u0440\\u0430\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mne.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Montserrat\",\"iso2_code\":\"MS\",\"iso3_code\":\"MSR\",\"calling_code\":\"1664\",\"native_name\":\"Montserrat\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/msr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}},{\"name\":\"Morocco\",\"iso2_code\":\"MA\",\"iso3_code\":\"MAR\",\"calling_code\":\"212\",\"native_name\":\"\\u0627\\u0644\\u0645\\u063a\\u0631\\u0628\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mar.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MAD\",\"name\":\"Moroccan dirham\",\"symbol\":\"\\u062f.\\u0645.\"}},{\"name\":\"Mozambique\",\"iso2_code\":\"MZ\",\"iso3_code\":\"MOZ\",\"calling_code\":\"258\",\"native_name\":\"Mo\\u00e7ambique\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/moz.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MZN\",\"name\":\"Mozambican metical\",\"symbol\":\"MT\"}},{\"name\":\"Myanmar\",\"iso2_code\":\"MM\",\"iso3_code\":\"MMR\",\"calling_code\":\"95\",\"native_name\":\"Myanma\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mmr.svg\",\"measure_system\":\"IMPERIAL\",\"currency\":{\"code\":\"MMK\",\"name\":\"Burmese kyat\",\"symbol\":\"Ks\"}},{\"name\":\"Namibia\",\"iso2_code\":\"NA\",\"iso3_code\":\"NAM\",\"calling_code\":\"264\",\"native_name\":\"Namibia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/nam.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NAD\",\"name\":\"Namibian dollar\",\"symbol\":\"$\"}},{\"name\":\"Nauru\",\"iso2_code\":\"NR\",\"iso3_code\":\"NRU\",\"calling_code\":\"674\",\"native_name\":\"Nauru\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/nru.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Nepal\",\"iso2_code\":\"NP\",\"iso3_code\":\"NPL\",\"calling_code\":\"977\",\"native_name\":\"\\u0928\\u0947\\u092a\\u093e\\u0932\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/npl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NPR\",\"name\":\"Nepalese rupee\",\"symbol\":\"\\u20a8\"}},{\"name\":\"Netherlands\",\"iso2_code\":\"NL\",\"iso3_code\":\"NLD\",\"calling_code\":\"31\",\"native_name\":\"Nederland\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/nld.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"New Caledonia\",\"iso2_code\":\"NC\",\"iso3_code\":\"NCL\",\"calling_code\":\"687\",\"native_name\":\"Nouvelle-Cal\\u00e9donie\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ncl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XPF\",\"name\":\"CFP franc\",\"symbol\":\"Fr\"}},{\"name\":\"New Zealand\",\"iso2_code\":\"NZ\",\"iso3_code\":\"NZL\",\"calling_code\":\"64\",\"native_name\":\"New Zealand\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/nzl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"}},{\"name\":\"Nicaragua\",\"iso2_code\":\"NI\",\"iso3_code\":\"NIC\",\"calling_code\":\"505\",\"native_name\":\"Nicaragua\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/nic.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NIO\",\"name\":\"Nicaraguan c\\u00f3rdoba\",\"symbol\":\"C$\"}},{\"name\":\"Niger\",\"iso2_code\":\"NE\",\"iso3_code\":\"NER\",\"calling_code\":\"227\",\"native_name\":\"Niger\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ner.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Nigeria\",\"iso2_code\":\"NG\",\"iso3_code\":\"NGA\",\"calling_code\":\"234\",\"native_name\":\"Nigeria\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/nga.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NGN\",\"name\":\"Nigerian naira\",\"symbol\":\"\\u20a6\"}},{\"name\":\"Niue\",\"iso2_code\":\"NU\",\"iso3_code\":\"NIU\",\"calling_code\":\"683\",\"native_name\":\"Niu\\u0113\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/niu.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"}},{\"name\":\"Norfolk Island\",\"iso2_code\":\"NF\",\"iso3_code\":\"NFK\",\"calling_code\":\"672\",\"native_name\":\"Norfolk Island\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/nfk.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Korea (Democratic People\\'s Republic of)\",\"iso2_code\":\"KP\",\"iso3_code\":\"PRK\",\"calling_code\":\"850\",\"native_name\":\"\\ubd81\\ud55c\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/prk.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KPW\",\"name\":\"North Korean won\",\"symbol\":\"\\u20a9\"}},{\"name\":\"Northern Mariana Islands\",\"iso2_code\":\"MP\",\"iso3_code\":\"MNP\",\"calling_code\":\"1670\",\"native_name\":\"Northern Mariana Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/mnp.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Norway\",\"iso2_code\":\"NO\",\"iso3_code\":\"NOR\",\"calling_code\":\"47\",\"native_name\":\"Norge\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/nor.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NOK\",\"name\":\"Norwegian krone\",\"symbol\":\"kr\"}},{\"name\":\"Oman\",\"iso2_code\":\"OM\",\"iso3_code\":\"OMN\",\"calling_code\":\"968\",\"native_name\":\"\\u0639\\u0645\\u0627\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/omn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"OMR\",\"name\":\"Omani rial\",\"symbol\":\"\\u0631.\\u0639.\"}},{\"name\":\"Pakistan\",\"iso2_code\":\"PK\",\"iso3_code\":\"PAK\",\"calling_code\":\"92\",\"native_name\":\"\\u067e\\u0627\\u06a9\\u0633\\u062a\\u0627\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/pak.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"PKR\",\"name\":\"Pakistani rupee\",\"symbol\":\"\\u20a8\"}},{\"name\":\"Palau\",\"iso2_code\":\"PW\",\"iso3_code\":\"PLW\",\"calling_code\":\"680\",\"native_name\":\"Palau\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/plw.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"(none)\",\"name\":\"[E]\",\"symbol\":\"$\"}},{\"name\":\"Palestine, State of\",\"iso2_code\":\"PS\",\"iso3_code\":\"PSE\",\"calling_code\":\"970\",\"native_name\":\"\\u0641\\u0644\\u0633\\u0637\\u064a\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/pse.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ILS\",\"name\":\"Israeli new sheqel\",\"symbol\":\"\\u20aa\"}},{\"name\":\"Panama\",\"iso2_code\":\"PA\",\"iso3_code\":\"PAN\",\"calling_code\":\"507\",\"native_name\":\"Panam\\u00e1\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/pan.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"PAB\",\"name\":\"Panamanian balboa\",\"symbol\":\"B\\/.\"}},{\"name\":\"Papua New Guinea\",\"iso2_code\":\"PG\",\"iso3_code\":\"PNG\",\"calling_code\":\"675\",\"native_name\":\"Papua Niugini\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/png.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"PGK\",\"name\":\"Papua New Guinean kina\",\"symbol\":\"K\"}},{\"name\":\"Paraguay\",\"iso2_code\":\"PY\",\"iso3_code\":\"PRY\",\"calling_code\":\"595\",\"native_name\":\"Paraguay\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/pry.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"PYG\",\"name\":\"Paraguayan guaran\\u00ed\",\"symbol\":\"\\u20b2\"}},{\"name\":\"Peru\",\"iso2_code\":\"PE\",\"iso3_code\":\"PER\",\"calling_code\":\"51\",\"native_name\":\"Per\\u00fa\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/per.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"PEN\",\"name\":\"Peruvian sol\",\"symbol\":\"S\\/.\"}},{\"name\":\"Philippines\",\"iso2_code\":\"PH\",\"iso3_code\":\"PHL\",\"calling_code\":\"63\",\"native_name\":\"Pilipinas\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/phl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"PHP\",\"name\":\"Philippine peso\",\"symbol\":\"\\u20b1\"}},{\"name\":\"Pitcairn\",\"iso2_code\":\"PN\",\"iso3_code\":\"PCN\",\"calling_code\":\"64\",\"native_name\":\"Pitcairn Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/pcn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"}},{\"name\":\"Poland\",\"iso2_code\":\"PL\",\"iso3_code\":\"POL\",\"calling_code\":\"48\",\"native_name\":\"Polska\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/pol.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"PLN\",\"name\":\"Polish z\\u0142oty\",\"symbol\":\"z\\u0142\"}},{\"name\":\"Portugal\",\"iso2_code\":\"PT\",\"iso3_code\":\"PRT\",\"calling_code\":\"351\",\"native_name\":\"Portugal\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/prt.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Puerto Rico\",\"iso2_code\":\"PR\",\"iso3_code\":\"PRI\",\"calling_code\":\"1787\",\"native_name\":\"Puerto Rico\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/pri.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Qatar\",\"iso2_code\":\"QA\",\"iso3_code\":\"QAT\",\"calling_code\":\"974\",\"native_name\":\"\\u0642\\u0637\\u0631\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/qat.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"QAR\",\"name\":\"Qatari riyal\",\"symbol\":\"\\u0631.\\u0642\"}},{\"name\":\"Republic of Kosovo\",\"iso2_code\":\"XK\",\"iso3_code\":\"KOS\",\"calling_code\":\"383\",\"native_name\":\"Republika e Kosov\\u00ebs\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/kos.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"R\\u00e9union\",\"iso2_code\":\"RE\",\"iso3_code\":\"REU\",\"calling_code\":\"262\",\"native_name\":\"La R\\u00e9union\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/reu.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Romania\",\"iso2_code\":\"RO\",\"iso3_code\":\"ROU\",\"calling_code\":\"40\",\"native_name\":\"Rom\\u00e2nia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/rou.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"RON\",\"name\":\"Romanian leu\",\"symbol\":\"lei\"}},{\"name\":\"Russian Federation\",\"iso2_code\":\"RU\",\"iso3_code\":\"RUS\",\"calling_code\":\"7\",\"native_name\":\"\\u0420\\u043e\\u0441\\u0441\\u0438\\u044f\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/rus.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"RUB\",\"name\":\"Russian ruble\",\"symbol\":\"\\u20bd\"}},{\"name\":\"Rwanda\",\"iso2_code\":\"RW\",\"iso3_code\":\"RWA\",\"calling_code\":\"250\",\"native_name\":\"Rwanda\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/rwa.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"RWF\",\"name\":\"Rwandan franc\",\"symbol\":\"Fr\"}},{\"name\":\"Saint Barth\\u00e9lemy\",\"iso2_code\":\"BL\",\"iso3_code\":\"BLM\",\"calling_code\":\"590\",\"native_name\":\"Saint-Barth\\u00e9lemy\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/blm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Saint Helena, Ascension and Tristan da Cunha\",\"iso2_code\":\"SH\",\"iso3_code\":\"SHN\",\"calling_code\":\"290\",\"native_name\":\"Saint Helena\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/shn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SHP\",\"name\":\"Saint Helena pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Saint Kitts and Nevis\",\"iso2_code\":\"KN\",\"iso3_code\":\"KNA\",\"calling_code\":\"1869\",\"native_name\":\"Saint Kitts and Nevis\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/kna.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}},{\"name\":\"Saint Lucia\",\"iso2_code\":\"LC\",\"iso3_code\":\"LCA\",\"calling_code\":\"1758\",\"native_name\":\"Saint Lucia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lca.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}},{\"name\":\"Saint Martin (French part)\",\"iso2_code\":\"MF\",\"iso3_code\":\"MAF\",\"calling_code\":\"590\",\"native_name\":\"Saint-Martin\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/maf.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Saint Pierre and Miquelon\",\"iso2_code\":\"PM\",\"iso3_code\":\"SPM\",\"calling_code\":\"508\",\"native_name\":\"Saint-Pierre-et-Miquelon\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/spm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Saint Vincent and the Grenadines\",\"iso2_code\":\"VC\",\"iso3_code\":\"VCT\",\"calling_code\":\"1784\",\"native_name\":\"Saint Vincent and the Grenadines\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/vct.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XCD\",\"name\":\"East Caribbean dollar\",\"symbol\":\"$\"}},{\"name\":\"Samoa\",\"iso2_code\":\"WS\",\"iso3_code\":\"WSM\",\"calling_code\":\"685\",\"native_name\":\"Samoa\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/wsm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"WST\",\"name\":\"Samoan t\\u0101l\\u0101\",\"symbol\":\"T\"}},{\"name\":\"San Marino\",\"iso2_code\":\"SM\",\"iso3_code\":\"SMR\",\"calling_code\":\"378\",\"native_name\":\"San Marino\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/smr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Sao Tome and Principe\",\"iso2_code\":\"ST\",\"iso3_code\":\"STP\",\"calling_code\":\"239\",\"native_name\":\"S\\u00e3o Tom\\u00e9 e Pr\\u00edncipe\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/stp.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"STD\",\"name\":\"S\\u00e3o Tom\\u00e9 and Pr\\u00edncipe dobra\",\"symbol\":\"Db\"}},{\"name\":\"Saudi Arabia\",\"iso2_code\":\"SA\",\"iso3_code\":\"SAU\",\"calling_code\":\"966\",\"native_name\":\"\\u0627\\u0644\\u0639\\u0631\\u0628\\u064a\\u0629 \\u0627\\u0644\\u0633\\u0639\\u0648\\u062f\\u064a\\u0629\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sau.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SAR\",\"name\":\"Saudi riyal\",\"symbol\":\"\\u0631.\\u0633\"}},{\"name\":\"Senegal\",\"iso2_code\":\"SN\",\"iso3_code\":\"SEN\",\"calling_code\":\"221\",\"native_name\":\"S\\u00e9n\\u00e9gal\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sen.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Serbia\",\"iso2_code\":\"RS\",\"iso3_code\":\"SRB\",\"calling_code\":\"381\",\"native_name\":\"\\u0421\\u0440\\u0431\\u0438\\u0458\\u0430\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/srb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"RSD\",\"name\":\"Serbian dinar\",\"symbol\":\"\\u0434\\u0438\\u043d.\"}},{\"name\":\"Seychelles\",\"iso2_code\":\"SC\",\"iso3_code\":\"SYC\",\"calling_code\":\"248\",\"native_name\":\"Seychelles\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/syc.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SCR\",\"name\":\"Seychellois rupee\",\"symbol\":\"\\u20a8\"}},{\"name\":\"Sierra Leone\",\"iso2_code\":\"SL\",\"iso3_code\":\"SLE\",\"calling_code\":\"232\",\"native_name\":\"Sierra Leone\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sle.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SLL\",\"name\":\"Sierra Leonean leone\",\"symbol\":\"Le\"}},{\"name\":\"Singapore\",\"iso2_code\":\"SG\",\"iso3_code\":\"SGP\",\"calling_code\":\"65\",\"native_name\":\"Singapore\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sgp.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BND\",\"name\":\"Brunei dollar\",\"symbol\":\"$\"}},{\"name\":\"Sint Maarten (Dutch part)\",\"iso2_code\":\"SX\",\"iso3_code\":\"SXM\",\"calling_code\":\"1721\",\"native_name\":\"Sint Maarten\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sxm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ANG\",\"name\":\"Netherlands Antillean guilder\",\"symbol\":\"\\u0192\"}},{\"name\":\"Slovakia\",\"iso2_code\":\"SK\",\"iso3_code\":\"SVK\",\"calling_code\":\"421\",\"native_name\":\"Slovensko\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/svk.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Slovenia\",\"iso2_code\":\"SI\",\"iso3_code\":\"SVN\",\"calling_code\":\"386\",\"native_name\":\"Slovenija\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/svn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Solomon Islands\",\"iso2_code\":\"SB\",\"iso3_code\":\"SLB\",\"calling_code\":\"677\",\"native_name\":\"Solomon Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/slb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SBD\",\"name\":\"Solomon Islands dollar\",\"symbol\":\"$\"}},{\"name\":\"Somalia\",\"iso2_code\":\"SO\",\"iso3_code\":\"SOM\",\"calling_code\":\"252\",\"native_name\":\"Soomaaliya\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/som.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SOS\",\"name\":\"Somali shilling\",\"symbol\":\"Sh\"}},{\"name\":\"South Africa\",\"iso2_code\":\"ZA\",\"iso3_code\":\"ZAF\",\"calling_code\":\"27\",\"native_name\":\"South Africa\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/zaf.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ZAR\",\"name\":\"South African rand\",\"symbol\":\"R\"}},{\"name\":\"South Georgia and the South Sandwich Islands\",\"iso2_code\":\"GS\",\"iso3_code\":\"SGS\",\"calling_code\":\"500\",\"native_name\":\"South Georgia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sgs.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Korea (Republic of)\",\"iso2_code\":\"KR\",\"iso3_code\":\"KOR\",\"calling_code\":\"82\",\"native_name\":\"\\ub300\\ud55c\\ubbfc\\uad6d\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/kor.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"KRW\",\"name\":\"South Korean won\",\"symbol\":\"\\u20a9\"}},{\"name\":\"South Sudan\",\"iso2_code\":\"SS\",\"iso3_code\":\"SSD\",\"calling_code\":\"211\",\"native_name\":\"South Sudan\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ssd.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SSP\",\"name\":\"South Sudanese pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Spain\",\"iso2_code\":\"ES\",\"iso3_code\":\"ESP\",\"calling_code\":\"34\",\"native_name\":\"Espa\\u00f1a\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/esp.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"EUR\",\"name\":\"Euro\",\"symbol\":\"\\u20ac\"}},{\"name\":\"Sri Lanka\",\"iso2_code\":\"LK\",\"iso3_code\":\"LKA\",\"calling_code\":\"94\",\"native_name\":\"\\u015br\\u012b la\\u1e43k\\u0101va\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/lka.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"LKR\",\"name\":\"Sri Lankan rupee\",\"symbol\":\"Rs\"}},{\"name\":\"Sudan\",\"iso2_code\":\"SD\",\"iso3_code\":\"SDN\",\"calling_code\":\"249\",\"native_name\":\"\\u0627\\u0644\\u0633\\u0648\\u062f\\u0627\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sdn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SDG\",\"name\":\"Sudanese pound\",\"symbol\":\"\\u062c.\\u0633.\"}},{\"name\":\"Suriname\",\"iso2_code\":\"SR\",\"iso3_code\":\"SUR\",\"calling_code\":\"597\",\"native_name\":\"Suriname\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sur.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SRD\",\"name\":\"Surinamese dollar\",\"symbol\":\"$\"}},{\"name\":\"Svalbard and Jan Mayen\",\"iso2_code\":\"SJ\",\"iso3_code\":\"SJM\",\"calling_code\":\"4779\",\"native_name\":\"Svalbard og Jan Mayen\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/sjm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NOK\",\"name\":\"Norwegian krone\",\"symbol\":\"kr\"}},{\"name\":\"Swaziland\",\"iso2_code\":\"SZ\",\"iso3_code\":\"SWZ\",\"calling_code\":\"268\",\"native_name\":\"Swaziland\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/swz.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SZL\",\"name\":\"Swazi lilangeni\",\"symbol\":\"L\"}},{\"name\":\"Sweden\",\"iso2_code\":\"SE\",\"iso3_code\":\"SWE\",\"calling_code\":\"46\",\"native_name\":\"Sverige\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/swe.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SEK\",\"name\":\"Swedish krona\",\"symbol\":\"kr\"}},{\"name\":\"Switzerland\",\"iso2_code\":\"CH\",\"iso3_code\":\"CHE\",\"calling_code\":\"41\",\"native_name\":\"Schweiz\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/che.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"CHF\",\"name\":\"Swiss franc\",\"symbol\":\"Fr\"}},{\"name\":\"Syrian Arab Republic\",\"iso2_code\":\"SY\",\"iso3_code\":\"SYR\",\"calling_code\":\"963\",\"native_name\":\"\\u0633\\u0648\\u0631\\u064a\\u0627\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/syr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"SYP\",\"name\":\"Syrian pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"Taiwan\",\"iso2_code\":\"TW\",\"iso3_code\":\"TWN\",\"calling_code\":\"886\",\"native_name\":\"\\u81fa\\u7063\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/twn.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"TWD\",\"name\":\"New Taiwan dollar\",\"symbol\":\"$\"}},{\"name\":\"Tajikistan\",\"iso2_code\":\"TJ\",\"iso3_code\":\"TJK\",\"calling_code\":\"992\",\"native_name\":\"\\u0422\\u043e\\u04b7\\u0438\\u043a\\u0438\\u0441\\u0442\\u043e\\u043d\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tjk.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"TJS\",\"name\":\"Tajikistani somoni\",\"symbol\":\"\\u0405\\u041c\"}},{\"name\":\"Tanzania, United Republic of\",\"iso2_code\":\"TZ\",\"iso3_code\":\"TZA\",\"calling_code\":\"255\",\"native_name\":\"Tanzania\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tza.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"TZS\",\"name\":\"Tanzanian shilling\",\"symbol\":\"Sh\"}},{\"name\":\"Thailand\",\"iso2_code\":\"TH\",\"iso3_code\":\"THA\",\"calling_code\":\"66\",\"native_name\":\"\\u0e1b\\u0e23\\u0e30\\u0e40\\u0e17\\u0e28\\u0e44\\u0e17\\u0e22\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tha.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"THB\",\"name\":\"Thai baht\",\"symbol\":\"\\u0e3f\"}},{\"name\":\"Timor-Leste\",\"iso2_code\":\"TL\",\"iso3_code\":\"TLS\",\"calling_code\":\"670\",\"native_name\":\"Timor-Leste\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tls.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Togo\",\"iso2_code\":\"TG\",\"iso3_code\":\"TGO\",\"calling_code\":\"228\",\"native_name\":\"Togo\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tgo.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XOF\",\"name\":\"West African CFA franc\",\"symbol\":\"Fr\"}},{\"name\":\"Tokelau\",\"iso2_code\":\"TK\",\"iso3_code\":\"TKL\",\"calling_code\":\"690\",\"native_name\":\"Tokelau\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tkl.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"NZD\",\"name\":\"New Zealand dollar\",\"symbol\":\"$\"}},{\"name\":\"Tonga\",\"iso2_code\":\"TO\",\"iso3_code\":\"TON\",\"calling_code\":\"676\",\"native_name\":\"Tonga\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ton.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"TOP\",\"name\":\"Tongan pa\\u02bbanga\",\"symbol\":\"T$\"}},{\"name\":\"Trinidad and Tobago\",\"iso2_code\":\"TT\",\"iso3_code\":\"TTO\",\"calling_code\":\"1868\",\"native_name\":\"Trinidad and Tobago\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tto.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"TTD\",\"name\":\"Trinidad and Tobago dollar\",\"symbol\":\"$\"}},{\"name\":\"Tunisia\",\"iso2_code\":\"TN\",\"iso3_code\":\"TUN\",\"calling_code\":\"216\",\"native_name\":\"\\u062a\\u0648\\u0646\\u0633\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tun.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"TND\",\"name\":\"Tunisian dinar\",\"symbol\":\"\\u062f.\\u062a\"}},{\"name\":\"Turkey\",\"iso2_code\":\"TR\",\"iso3_code\":\"TUR\",\"calling_code\":\"90\",\"native_name\":\"T\\u00fcrkiye\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tur.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"TRY\",\"name\":\"Turkish lira\",\"symbol\":null}},{\"name\":\"Turkmenistan\",\"iso2_code\":\"TM\",\"iso3_code\":\"TKM\",\"calling_code\":\"993\",\"native_name\":\"T\\u00fcrkmenistan\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tkm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"TMT\",\"name\":\"Turkmenistan manat\",\"symbol\":\"m\"}},{\"name\":\"Turks and Caicos Islands\",\"iso2_code\":\"TC\",\"iso3_code\":\"TCA\",\"calling_code\":\"1649\",\"native_name\":\"Turks and Caicos Islands\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tca.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Tuvalu\",\"iso2_code\":\"TV\",\"iso3_code\":\"TUV\",\"calling_code\":\"688\",\"native_name\":\"Tuvalu\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/tuv.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AUD\",\"name\":\"Australian dollar\",\"symbol\":\"$\"}},{\"name\":\"Uganda\",\"iso2_code\":\"UG\",\"iso3_code\":\"UGA\",\"calling_code\":\"256\",\"native_name\":\"Uganda\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/uga.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"UGX\",\"name\":\"Ugandan shilling\",\"symbol\":\"Sh\"}},{\"name\":\"Ukraine\",\"iso2_code\":\"UA\",\"iso3_code\":\"UKR\",\"calling_code\":\"380\",\"native_name\":\"\\u0423\\u043a\\u0440\\u0430\\u0457\\u043d\\u0430\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ukr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"UAH\",\"name\":\"Ukrainian hryvnia\",\"symbol\":\"\\u20b4\"}},{\"name\":\"United Arab Emirates\",\"iso2_code\":\"AE\",\"iso3_code\":\"ARE\",\"calling_code\":\"971\",\"native_name\":\"\\u062f\\u0648\\u0644\\u0629 \\u0627\\u0644\\u0625\\u0645\\u0627\\u0631\\u0627\\u062a \\u0627\\u0644\\u0639\\u0631\\u0628\\u064a\\u0629 \\u0627\\u0644\\u0645\\u062a\\u062d\\u062f\\u0629\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/are.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"AED\",\"name\":\"United Arab Emirates dirham\",\"symbol\":\"\\u062f.\\u0625\"}},{\"name\":\"United Kingdom of Great Britain and Northern Ireland\",\"iso2_code\":\"GB\",\"iso3_code\":\"GBR\",\"calling_code\":\"44\",\"native_name\":\"United Kingdom\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/gbr.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"GBP\",\"name\":\"British pound\",\"symbol\":\"\\u00a3\"}},{\"name\":\"United States of America\",\"iso2_code\":\"US\",\"iso3_code\":\"USA\",\"calling_code\":\"1\",\"native_name\":\"United States\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/usa.svg\",\"measure_system\":\"IMPERIAL\",\"currency\":{\"code\":\"USD\",\"name\":\"United States dollar\",\"symbol\":\"$\"}},{\"name\":\"Uruguay\",\"iso2_code\":\"UY\",\"iso3_code\":\"URY\",\"calling_code\":\"598\",\"native_name\":\"Uruguay\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ury.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"UYU\",\"name\":\"Uruguayan peso\",\"symbol\":\"$\"}},{\"name\":\"Uzbekistan\",\"iso2_code\":\"UZ\",\"iso3_code\":\"UZB\",\"calling_code\":\"998\",\"native_name\":\"O\\u2018zbekiston\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/uzb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"UZS\",\"name\":\"Uzbekistani so\\'m\",\"symbol\":null}},{\"name\":\"Vanuatu\",\"iso2_code\":\"VU\",\"iso3_code\":\"VUT\",\"calling_code\":\"678\",\"native_name\":\"Vanuatu\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/vut.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"VUV\",\"name\":\"Vanuatu vatu\",\"symbol\":\"Vt\"}},{\"name\":\"Venezuela (Bolivarian Republic of)\",\"iso2_code\":\"VE\",\"iso3_code\":\"VEN\",\"calling_code\":\"58\",\"native_name\":\"Venezuela\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/ven.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"VEF\",\"name\":\"Venezuelan bol\\u00edvar\",\"symbol\":\"Bs F\"}},{\"name\":\"Viet Nam\",\"iso2_code\":\"VN\",\"iso3_code\":\"VNM\",\"calling_code\":\"84\",\"native_name\":\"Vi\\u1ec7t Nam\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/vnm.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"VND\",\"name\":\"Vietnamese \\u0111\\u1ed3ng\",\"symbol\":\"\\u20ab\"}},{\"name\":\"Wallis and Futuna\",\"iso2_code\":\"WF\",\"iso3_code\":\"WLF\",\"calling_code\":\"681\",\"native_name\":\"Wallis et Futuna\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/wlf.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"XPF\",\"name\":\"CFP franc\",\"symbol\":\"Fr\"}},{\"name\":\"Western Sahara\",\"iso2_code\":\"EH\",\"iso3_code\":\"ESH\",\"calling_code\":\"212\",\"native_name\":\"\\u0627\\u0644\\u0635\\u062d\\u0631\\u0627\\u0621 \\u0627\\u0644\\u063a\\u0631\\u0628\\u064a\\u0629\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/esh.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"MAD\",\"name\":\"Moroccan dirham\",\"symbol\":\"\\u062f.\\u0645.\"}},{\"name\":\"Yemen\",\"iso2_code\":\"YE\",\"iso3_code\":\"YEM\",\"calling_code\":\"967\",\"native_name\":\"\\u0627\\u0644\\u064a\\u064e\\u0645\\u064e\\u0646\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/yem.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"YER\",\"name\":\"Yemeni rial\",\"symbol\":\"\\ufdfc\"}},{\"name\":\"Zambia\",\"iso2_code\":\"ZM\",\"iso3_code\":\"ZMB\",\"calling_code\":\"260\",\"native_name\":\"Zambia\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/zmb.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"ZMW\",\"name\":\"Zambian kwacha\",\"symbol\":\"ZK\"}},{\"name\":\"Zimbabwe\",\"iso2_code\":\"ZW\",\"iso3_code\":\"ZWE\",\"calling_code\":\"263\",\"native_name\":\"Zimbabwe\",\"flag\":\"https:\\/\\/restcountries.eu\\/data\\/zwe.svg\",\"measure_system\":\"METRIC\",\"currency\":{\"code\":\"BWP\",\"name\":\"Botswana pula\",\"symbol\":\"P\"}}]';\n $countries = json_decode($json, true);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Truncate Table If Exist\n if (Schema::hasTable('countries')) {\n // $this->dropForeignKeys();\n DB::table('countries')->truncate();\n }\n if (Schema::hasTable('currencies')) {\n DB::table('currencies')->truncate();\n }\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n // recreate constraints once table are truncate\n // $this->reCreateForeignKeys();\n\n foreach ($countries as $country) {\n\n $currency = $country['currency'];\n unset($country['currency']);\n\n $currencyRecord = DB::table('currencies')->where('code', $currency['code'])->first();\n\n if ($currencyRecord === null) {\n $country['currency_id'] = DB::table('currencies')->insertGetId($currency + []);\n } else {\n $country['currency_id'] = $currencyRecord->id;\n }\n DB::table('countries')->insert($country);\n }\n\n }", "private function convert_to_airline_array () {\n $records = array();\n foreach ($this -> data as $key => $record)\n array_push ($records, AirlineEntity::create_airline_from_arr ($record));\n $this -> data = $records;\n }", "public function __toArray() {\n return json_decode($this->_jsonstring, true);\n }", "public function flights($id = \"\"){\n $this->load->model('flightModel');\n $data = NULL;\n if($id === \"\") {\n $data = $this->flightModel->all(); \n \n }\n else {\n $data = $this->flightModel->get($id);\n }\n echo json_encode($data, JSON_PRETTY_PRINT);\n }", "public function convertData($jsonTestData);", "public function showAirportFlights($id)\n {\n $airport=Airport::find($id);\n\n if(!is_null($airport)){\n $flights = $airport->flights;\n return $flights;\n }\n\n return response()->json(\"Nada encontrado!\", 404);\n }", "private function parseForecastResponse(string $response)\n {\n $struct = json_decode($response, TRUE);\n if (!isset($struct['cod']) || $struct['cod'] != 200) {\n return FALSE;\n }\n\n $forecast = [];\n foreach ($struct['list'] as $item) {\n $forecast[] = [\n 'datetime' => [\n 'timestamp' => $item['dt'],\n 'timestamp_sunrise' => $struct['city']['sunrise'],\n 'timestamp_sunset' => $struct['city']['sunset'],\n 'formatted_date' => date($this->format_date, $item['dt']),\n 'formatted_day' => date($this->format_day, $item['dt']),\n 'formatted_time' => date($this->format_time, $item['dt']),\n 'formatted_sunrise' => date($this->format_time, $struct['city']['sunrise']),\n 'formatted_sunset' => date($this->format_time, $struct['city']['sunset']),\n ],\n 'condition' => [\n 'name' => $item['weather'][0]['main'],\n 'desc' => $item['weather'][0]['description'],\n 'icon' => $this->api_endpoint_icons . $item['weather'][0]['icon'] . '.png',\n ],\n 'forecast' => [\n 'temp' => round($item['main']['temp']),\n 'temp_min' => round($item['main']['temp_min']),\n 'temp_max' => round($item['main']['temp_max']),\n 'pressure' => round($item['main']['pressure']),\n 'humidity' => round($item['main']['humidity']),\n ]\n ];\n }\n return [\n 'formats' => [\n 'lang' => $this->api_lang,\n 'date' => $this->format_date,\n 'day' => $this->format_day,\n 'time' => $this->format_time,\n 'units' => $this->format_units,\n ],\n 'location' => [\n 'id' => (isset($struct['city']['id'])) ? $struct['city']['id'] : 0,\n 'name' => $struct['city']['name'],\n 'country' => $struct['city']['country'],\n 'latitude' => $struct['city']['coord']['lat'],\n 'longitude' => $struct['city']['coord']['lon'],\n ],\n 'forecast' => $forecast\n ];\n }", "public function index() {\n\n $data = $this->getFlights('TRD');\n $flights = $data->flights;\n $json = json_decode(json_encode($flights));\n\n return view('main', compact('flights'));\n }", "function convertJson2Fields($array, $jsonField) {\n if (!is_array($jsonField)) { $jsonField = array($jsonField); }\n foreach($jsonField as $jsonFieldName) {\n foreach (json_decode($array[$jsonFieldName],true) as $k=>$v) { $array[$jsonFieldName.'__'.$k] = $v; }\n unset($array[$jsonFieldName]);\n }\n return $array;\n }", "public static function &jsonToArray(JSON $json){\r\n\t\t$array=array();\r\n\t\tfor ($i=0; $json->getCount() > $i; $i++){\r\n\t\t\t$item=$json->itemAt($i);\r\n\t\t\t$array[$item->getProperty()]=$item->getValue();\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "public function convertJsonToArrayCollection($jsonResponse):ArrayCollection\n {\n return $this->serializer->deserialize($jsonResponse, HotelMapper::class, 'json')->hotels;\n }", "function convertArray($objeto)\n {\n var_dump($objeto);\n die;\n //Converte JSON em ARRAY\n $listArray = json_decode($objeto, true);\n \n return $listArray;\n }", "public static function JsonToTweets($json_input, $remora=NULL) {\n\n\t\t$list = new \\dobj\\DObjList();\n\n\t\tforeach ($json_input['statuses'] as $json_tweet) {\n\n\t\t\t$tweet = new \\dobj\\Tweet();\n\t\t\t$tweet->fillFromJson($json_tweet, $remora);\n\n\n\t\t\tif (!$tweet->duplicate && !$tweet->blocked) {\n\n\t\t\t\t$list->dInsert($tweet);\n\t\t\t}\n\t\t}\n\n\t\t$list->sort(array('key' => 'created_at',\n\t\t\t\t'order' => 'asc',\n\t\t\t\t'sorting_date' => True));\n\n\t\treturn $list;\n\t}", "public function acf_json_load($paths){\n\t\tunset($paths[0]);\n\n\t\t$paths[] = encore_theme.'/acf';\n\n\t\treturn $paths;\n\t}", "public function jsonSerialize(): array\n {\n $data = [];\n $numberFields = [\n 'orderTotal',\n 'shipmentTotal',\n 'shipmentCost',\n 'itemTotal',\n 'flowerTotal',\n 'floristCost',\n 'netTotal',\n 'itemTotal',\n 'shipmentCost',\n 'extraCost',\n 'netAmountTotal',\n 'floristCost',\n 'price',\n 'quantity',\n 'total',\n ];\n\n foreach ($this as $key => $value) {\n if (null !== $value) {\n if (in_array($key, $numberFields)) {\n $data[$key] = (float) number_format(round($value, 2), 2, \".\", \"\");\n continue;\n }\n if ($value instanceof \\DateTime) {\n $data[$key] = $value->format('Y-m-d\\TH:i:s\\Z');\n continue;\n }\n if (isset($value)) {\n $data[$key] = $value;\n }\n }\n }\n\n return $data;\n }", "protected function getFortunesArray()\n {\n // so we can add the new fortune\n return Fortunes::find()->toArray();\n }", "public function testGetForecastJsonArray()\n {\n $lon = \"18.110103\";\n $lat = \"59.334415\";\n $myDarkSkyData = new DarkSkyData($lat, $lon, 3);\n $res= $myDarkSkyData->getForecastJsonArray();\n $this->assertIsArray($res, true);\n }", "public function populate(string $json): array;", "public function flights($tripId)\n {\n try {\n return $this->getFlights($tripId);\n } catch (Exception $e) {\n return response()->json([\n 'error' => $e->getMessage()\n ], 404);\n }\n }", "public function getAirportArrivals($airport, $howMany, $offset) {\r\n //$result_airport = $this->client->AirportInfo($params_airport);\r\n //echo \"<hr><pre>\";\r\n //print_r($result_airport);\r\n //echo \"</pre>\";\r\n\r\n\r\n $params = array(\"airport\" => $airport, \"howMany\" => $howMany, \"filter\" => \"\", \"offset\" => $offset);\r\n $result = $this->client->Enroute($params);\r\n\r\n //echo \"<hr><pre>\";\r\n //print_r($result);\r\n //echo \"</pre>\";\r\n\r\n\r\n $airportArrivals = array();\r\n\r\n if (!empty($result->EnrouteResult->enroute)) {\r\n\r\n $amount = count($result->EnrouteResult->enroute);\r\n //$flight = null;\r\n\r\n\r\n if ($amount > 0) {\r\n\r\n foreach ($result->EnrouteResult->enroute as &$element) {\r\n\r\n $number = $element->ident;\r\n $params_inFlight = array(\"ident\" => $number, \"howMany\" => \"1\");\r\n $result_inFlight = $this->client->InFlightInfo($params_inFlight);\r\n\r\n $params_flightinfo = array(\"ident\" => $result_inFlight->InFlightInfoResult->faFlightID, \"howMany\" => 1, \"offset\" => 0);\r\n $result_flightinfo = $this->client->FlightInfoEx($params_flightinfo);\r\n\r\n // Flugstatus setzen\r\n if ($result_inFlight->InFlightInfoResult->timeout == \"timed_out\") {\r\n $flightstatus = \"L\";\r\n } else {\r\n $flightstatus = \"A\";\r\n }\r\n\r\n // Tatsächliche Abflugzeit definieren\r\n if ($element->actualdeparturetime == \"0\") {\r\n $depart_calc = date(\"Y-m-d H:i:s\", $result_inFlight->InFlightInfoResult->departureTime);\r\n } else {\r\n $depart_calc = date(\"Y-m-d H:i:s\", $element->actualdeparturetime);\r\n }\r\n\r\n // Tatsächliche / geplante Ankunftszeit definieren\r\n if ($result_inFlight->InFlightInfoResult->arrivalTime == \"0\") {\r\n $arrival_calc = date(\"Y-m-d H:i:s\", $result_flightinfo->FlightInfoExResult->flights->estimatedarrivaltime);\r\n } else {\r\n $arrival_calc = date(\"Y-m-d H:i:s\", $result_inFlight->InFlightInfoResult->arrivalTime);\r\n }\r\n\r\n //echo \"<hr><pre>\";\r\n //print_r($element);\r\n //echo \"</pre>\";\r\n //echo \"<pre>\";\r\n //print_r($result_inFlight);\r\n //echo \"</pre>\";\r\n //echo \"<pre>\";\r\n //print_r($result_flightinfo);\r\n //echo \"</pre>\";\r\n\r\n $airline = \"\";\r\n $airport_from = $element->origin;\r\n $airport_to = $element->destination;\r\n $aircraft = $element->aircrafttype;\r\n $arrival_sced = date(\"Y-m-d H:i:s\", $element->estimatedarrivaltime);\r\n $depart_sced = date(\"Y-m-d H:i:s\", $element->filed_departuretime);\r\n $timestamp = \"\";\r\n $longitude = \"\";\r\n $latitude = \"\";\r\n $coordinates_log = \"\";\r\n $groundspeed = \"\";\r\n $heading = \"\";\r\n\r\n $airportArrivals[] = new Flight($number, $airline, $airport_from, $airport_to,\r\n $aircraft, $flightstatus, $arrival_sced, $arrival_calc,\r\n $depart_sced, $depart_calc, $timestamp, $longitude,\r\n $latitude, $coordinates_log, $groundspeed, $heading);\r\n }\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n return $airportArrivals;\r\n }", "public function flights(){\n return $this->hasMany('App\\Flight');\n }", "protected function importFiltersFromJson()\n\t{\n\t\t$data = json_decode(file_get_contents($this->getFilePath()));\n\t\tforeach ($data->filters as $filter) {\n\t\t\t$filter = new Filter($filter->pattern, $filter->gravity, $filter->desc, $filter->type);\n\t\t\t$this->push($filter);\n\t\t}\n\t}", "public static function decode($json) {\n\n $offers = array();\n $array = json_decode($json, true);\n if(!isset($array['offers']['Hotel'] ))\n return $offers;\n \n \n foreach ($array['offers']['Hotel'] as $key => $json) { //each high level offer\n $hotelOffer = new HotelOffer();\n self::decodeOfferDateInfo($json['offerDateRange'], $hotelOffer);\n self::decodeDestination($json['destination'], $hotelOffer);\n self::decodeHotelInfo($json['hotelInfo'], $hotelOffer);\n self::decodeHotelUrgencyInfo($json['hotelUrgencyInfo'], $hotelOffer);\n self::decodeHotelPricingInfo($json['hotelPricingInfo'], $hotelOffer);\n self::decodeHotelUrlInfo($json['hotelUrls'], $hotelOffer);\n $offers[] = $hotelOffer;\n }\n \n return $offers;\n }", "public function GetArrayFromJson()\n {\n $objects = MTJson::Decode($this->ConfigJson);\n if ($objects == null) return null;\n $result = array();\n //---\n foreach ($objects as $obj)\n {\n $info = MTOrderJson::GetFromJson($obj);\n //---\n $result[] = $info;\n }\n //---\n $objects = null;\n //---\n return $result;\n }", "function getTrainLinesFromAPI(){\n$ch = curl_init();\ncurl_setopt_array($ch, array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => 'http://www.septastats.com/api/current/lines')\n);\n$res = curl_exec($ch);\n\nif(curl_errno($ch)){\n\ndie('cUrl Error: ' . curl_errno($ch));\n}\n\ncurl_close($ch);\n\n$decoded = json_decode($res, TRUE);\n\n$allTrains = $decoded['data'];\n\nreturn $allTrains;\n}", "public function flights()\n {\n $flights = Flight::all();\n $featuredFlights = Flight::where('featured', 1)->take(3)->get();\n\n return view('flights.index', compact('flights', 'featuredFlights'));\n }", "public function map($data)\n {\n return array_map(function ($data) {\n return [\n 'flight_status' => $data['flight_status'],\n 'departure_iata' => $data['departure']['iata'],\n 'departure_airport' => $data['departure']['airport'],\n 'arrival_iata' => $data['arrival']['iata'],\n 'arrival_airport' => $data['arrival']['airport'],\n 'airline_name' => $data['airline']['name'],\n 'flight_number' => $data['flight']['number'],\n 'flight_iata' => $data['flight']['iata'],\n 'flight_icao' => $data['flight']['icao'],\n 'aircraft_registration' => $data['aircraft'] != null ? $data['aircraft']['registration'] : 'N/A',\n\n ];\n }, $data['data']);\n }", "function traerTodos(){\n $archivo = file_get_contents(\"usuarios.json\");\n\n $usuariosJSON = explode(PHP_EOL, $archivo);\n array_pop($usuariosJSON);\n $usuariosFinal = [];\n foreach ($usuariosJSON as $usuario) {\n $usuariosFinal[] = json_decode($usuario, true);\n }\n\n return $usuariosFinal;\n}", "protected function balanceHandler(array $json)\n {\n $balances = [];\n foreach ($json as $item) {\n $asset = $item->a;\n $available = $item->f;\n $onOrder = $item->l;\n $balances[$asset] = [\n \"available\" => $available,\n \"onOrder\" => $onOrder,\n ];\n }\n return $balances;\n }", "private function parseForecastResponse(string $response){\n\t\t$struct = json_decode($response, TRUE);\n\t\tif(!isset($struct['cod']) || $struct['cod'] != 200){\n\t\t\treturn FALSE;\n\t\t}\n\t\t$forecast = [];\n\t\tforeach($struct['list'] as $item){\n\t\t\t$forecast[] = [\n\t\t\t\t'timestamp' => $item['dt'],\t\n\t\t\t\t'condition' => [\n\t\t\t\t\t'name' \t=> $item['weather'][0]['main'],\n\t\t\t\t\t'desc' \t=> $item['weather'][0]['description'],\n\t\t\t\t\t'icon' \t \t=> 'http://openweathermap.org/img/w/'.$item['weather'][0]['icon'].'.png',\n\t\t\t\t],\n\t\t\t\t'forecast' => [\n\t\t\t\t\t'temp' \t => round($item['main']['temp']),\n\t\t\t\t\t'temp_min' => round($item['main']['temp_min']),\n\t\t\t\t\t'temp_max' => round($item['main']['temp_max']),\n\t\t\t\t\t'pressure' \t=> round($item['main']['pressure']),\n\t\t\t\t\t'humidity'\t=> round($item['main']['humidity']),\n\t\t\t\t]\n\t\t\t];\n\t\t}\n\t\treturn [\n\t\t\t'location' => [\n\t\t\t\t'name' => $struct['city']['name'], \n\t\t\t\t'country' => $struct['city']['country'],\n\t\t\t\t'latitude' => $struct['city']['coord']['lat'],\n\t\t\t\t'longitude' => $struct['city']['coord']['lon'],\n\t\t\t],\n\t\t\t'forecast' => $forecast\n\t\t];\n\t}", "private function lowFareSearchProcessOneWay()\n {\n $airAirPricePointList = $this->lowFareResponse['airAirPricePointList']['airAirPricePoint'];\n // $airFareInfoList=$this->lowFareResponse['airLowFareSearchRsp']['airFareInfoList'];\n\n $count=0;\n $flightList = [];\n foreach ($airAirPricePointList as $out=> $airItem) {\n $count++;\n\n $airOptionlistOut=$airItem['airAirPricingInfo']['airFlightOptionsList']['airFlightOption']['airOption'];\n// $airOptionlistIn=$airItem['airAirPricingInfo']['airFlightOptionsList']['airFlightOption'][1]['airOption'];\n $airAirPricingInfo=$airItem['airAirPricingInfo']['@attributes'];\n $air['outBound']=$this->getAirBeanList($airOptionlistOut,$airAirPricingInfo);\n // $air['inBound']=$this->getAirBeanList($airOptionlistIn,$airAirPricingInfo);\n $flightList[] = $air;\n }\n return $flightList;\n\n }", "public static function getFlightById($flight_id)\n {\n return Flights::where('flight_id', $flight_id)\n ->leftjoin('airways', 'airways.airways_id', 'flights.airways_id')\n ->get();\n }", "function fromJson($data, $toArray = false){\n return json_decode($data, $toArray);\n}", "protected function json_to_array($json)\n\t{\n\t\treturn (array) json_decode($json);\n\t}", "protected function getAvailFares($flight)\n {\n $retval = [];\n $all_fares = $this->fareRepo->all();\n $avail_fares = $all_fares->except($flight->fares->modelKeys());\n foreach ($avail_fares as $fare) {\n $retval[$fare->id] = $fare->name.' (base price: '.$fare->price.')';\n }\n\n return $retval;\n }", "private function formatTourDates($result) {\n\t\t$formatedResults = array();\n\n\t\tforeach($result as $item) {\n\t\t\t$item->days = maybe_unserialize($item->days);\n\n\t\t\tif(!array_key_exists($item->id, $formatedResults)) {\n\t\t\t\t$timeInstance = array();\n\n\t\t\t\tif($item->time_id && $item->time) {\n\t\t\t\t\t$timeInstance['id'] = $item->time_id;\n\t\t\t\t\t$timeInstance['time'] = $item->time;\n\n\t\t\t\t\t$item->times = array($timeInstance);\n\t\t\t\t}\n\n\t\t\t\tunset($item->time_id);\n\t\t\t\tunset($item->time);\n\n\t\t\t\t$formatedResults[$item->id] = $item;\n\t\t\t} else {\n\n\t\t\t\tif($item->time_id && $item->time) {\n\t\t\t\t\t$timeInstance = array(\n\t\t\t\t\t\t'id' => $item->time_id,\n\t\t\t\t\t\t'time' => $item->time\n\t\t\t\t\t);\n\n\t\t\t\t\t$formatedResults[$item->id]->times[] = $timeInstance;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $formatedResults;\n\t}", "public function formatRecords($origin)\n {\n $response = [];\n if (empty($origin)) return $response;\n\n $index = 0;\n foreach ($origin as $data){\n foreach ($data->values as $val){\n $response[$index]['Zoho_ID'] = $data->zoho_id;\n $response[$index][$val->label_name] = $this->castValue($val->type, $val->value);\n if (!empty($val->section_name)) {\n $response[$index]['TabularSections'][$val->section_name][$val->row_id][$val->label_name] = $this->castValue($val->type, $val->value);\n }\n }\n $index++;\n }\n return $response;\n }", "function getTwelveHourTemperature($url){\n $str = file_get_contents(\"{$url}\");\n $jason = json_decode($str,true);\n echo \"<br>\";\n echo \"Time Date and Temperture For 12 Hours:\";\n $count = 12;\n for ($i=0;$i<$count;$i++)\n {\n echo \"<br>\";\n $oneDateAndTime = $jason['list'][\"{$i}\"]['dt_txt'];\n $oneTemperature=$jason['list'][\"{$i}\"]['main']['temp'];\n $windSpeed = $jason['list'][\"{$i}\"]['wind']['speed'];\n $pressure = $jason['list'][\"{$i}\"]['main']['pressure'];\n $icon = $jason['list'][\"{$i}\"]['weather']['0']['icon'];\n $icon_phrase = $jason['list'][\"{$i}\"]['weather']['0']['description'];\n\n\n\n $twelveHour_object[] = array(\n 'dateAndTime'=>$oneDateAndTime,\n 'icon' => $icon,\n 'icon_phrase' => $icon_phrase,\n 'icon_url' => \"http://openweathermap.org/img/w/\" . $icon . '.png',\n 'temp' => $oneTemperature,\n 'pressure' => $pressure,\n 'windSpeed'=>$windSpeed\n\n );\n\n\n\n\n }\n return $twelveHour_object;\n echo \"<br>\";\n}", "public function fromJSONCollection($jsonString);", "function getAllAirline() {\n global $airlinesManager;\n\n $result = [];\n\n // Get All the Airlines in the database\n $airlines = $airlinesManager->getAllAirlines();\n\n // if not empty, need to transform all object to associative Array\n if ( count( $airlines ) ) {\n foreach ( $airlines as $airline ) {\n $result[] = [\n \"id\" => $airline->getId(),\n \"code\" => $airline->getCode(),\n \"name\" => $airline->getName()\n ];\n }\n } else {\n $result = $airlines;\n }\n\n echo json_encode( $result );\n}", "public function index()\n\t{\n\t\t$flight = Flight::all();\n \treturn response()->json(['flight'=>$flight, 'message'=>'Flights fetched Successfully'], 200);\n\t}", "function my_acf_json_load_point( $paths ) {\r\n unset($paths[0]);\r\n $paths[] = get_stylesheet_directory() . '/acf-field';\r\n return $paths;\r\n}", "function fc_json_decode( $json, $arr = false ) {\n $result = json_decode( $json, $arr );\n if (is_array($result)) {\n foreach ( $result as &$val ) {\n if ( is_string( $val ) ) {\n $nested = fc_json_decode( $val, $arr );\n if ( $nested ) {\n $val = $nested;\n }\n }\n }\n return $result;\n }\n return $json;\n}", "public function testJsonToArray() {\n $data = '{\"foo\":\"bar\",\"bar\":\"foo\"}';\n $actual = Formatter::make($data, Formatter::JSON)->toArray();\n $expected = ['foo'=>'bar', 'bar'=>'foo'];\n $this->assertEquals($expected, $actual);\n }", "static function jsonClients(){\n\t\t$string = file_get_contents(\"clientes_falsos.json\");\n\t\t$json_a = json_decode($string, true);\n\t\treturn $json_a;\n\t}", "public function toArray()\n {\n $this->checkDataIsValid();\n return json_decode($this->response, true);\n }", "public function handle()\n {\n $demo = [\n '2020年11月' => '[{\"client_time\":1605885188,\"lon\":120.291565,\"lat\":27.413345,\"lv\":5,\"duration\":2729,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605156553,\"lon\":120.433441,\"lat\":27.523119,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1604744917,\"lon\":120.558189,\"lat\":27.578054,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1604984884,\"lon\":120.456139,\"lat\":27.507421,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605112208,\"lon\":120.558266,\"lat\":27.577984,\"lv\":2,\"duration\":499,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1606213148,\"lon\":120.558662,\"lat\":27.580173,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605971660,\"lon\":120.563248,\"lat\":27.582752,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330326\",\"aoi\":null,\"poi\":null},{\"client_time\":1604743632,\"lon\":120.554247,\"lat\":27.581389,\"lv\":9,\"duration\":1285,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1606318374,\"lon\":120.451942,\"lat\":27.53149,\"lv\":2,\"duration\":3,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605444297,\"lon\":120.451584,\"lat\":27.525599,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1604744920,\"lon\":120.554245,\"lat\":27.581387,\"lv\":26,\"duration\":8770,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1604666528,\"lon\":120.554268,\"lat\":27.581375,\"lv\":2,\"duration\":7,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605621832,\"lon\":120.602783,\"lat\":27.44244,\"lv\":2,\"duration\":1366,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605138112,\"lon\":120.460999,\"lat\":27.526505,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605157043,\"lon\":120.386627,\"lat\":27.502434,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605623419,\"lon\":120.451805,\"lat\":27.531607,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1606143133,\"lon\":120.554726,\"lat\":27.583511,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605896970,\"lon\":120.291565,\"lat\":27.413345,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605274436,\"lon\":120.609253,\"lat\":27.434332,\"lv\":2,\"duration\":82,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605895780,\"lon\":120.446808,\"lat\":27.526289,\"lv\":2,\"duration\":4,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":{\"id\":\"7WPG8hZ8sty\",\"name\":\"胖妹面馆\",\"distance\":15.75360575879129}},{\"client_time\":1604931676,\"lon\":120.55825,\"lat\":27.577997,\"lv\":2,\"duration\":1092,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1606321334,\"lon\":120.451942,\"lat\":27.53149,\"lv\":2,\"duration\":63,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605625019,\"lon\":120.602783,\"lat\":27.44244,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1606153855,\"lon\":120.554726,\"lat\":27.583511,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605799826,\"lon\":120.291565,\"lat\":27.413345,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1605117027,\"lon\":120.558266,\"lat\":27.577984,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null}]',\n '2020年12月' => '[{\"client_time\":1608487231,\"lon\":120.367928,\"lat\":27.477409,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608973516,\"lon\":120.367981,\"lat\":27.477468,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609149235,\"lon\":120.601746,\"lat\":27.428726,\"lv\":2,\"duration\":308,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":{\"id\":\"7SkFzy5gwpk\",\"name\":\"金城豪庭\",\"distance\":11.114652468053546}},{\"client_time\":1607166116,\"lon\":120.403732,\"lat\":27.512362,\"lv\":2,\"duration\":3287,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":{\"id\":\"7RXvdGFJzcC\",\"name\":\"开瑞汽车\",\"distance\":6.989792620776612}},{\"client_time\":1608918678,\"lon\":120.421028,\"lat\":27.556648,\"lv\":2,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608385968,\"lon\":120.422714,\"lat\":27.5228,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5j1A2Yq\",\"name\":\"上江小区\",\"distance\":224.87423971727983},\"poi\":{\"id\":\"87Yx4Loq2wg\",\"name\":\"斑马摄影工作室\",\"distance\":22.643647556195123}},{\"client_time\":1608038142,\"lon\":120.61718,\"lat\":27.4284,\"lv\":3,\"duration\":82,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1606752091,\"lon\":120.456123,\"lat\":27.528456,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608918738,\"lon\":120.416664,\"lat\":27.55966,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609162824,\"lon\":120.601746,\"lat\":27.428726,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":{\"id\":\"7SkFzy5gwpk\",\"name\":\"金城豪庭\",\"distance\":11.114652468053546}},{\"client_time\":1609137836,\"lon\":120.536484,\"lat\":27.515696,\"lv\":4,\"duration\":214,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1607873522,\"lon\":120.61718,\"lat\":27.4284,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608996808,\"lon\":120.367981,\"lat\":27.477468,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608042896,\"lon\":120.61718,\"lat\":27.4284,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608653643,\"lon\":120.36792,\"lat\":27.477427,\"lv\":2,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1606922189,\"lon\":120.555702,\"lat\":27.58205,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608693018,\"lon\":120.424927,\"lat\":27.512207,\"lv\":2,\"duration\":14,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5ixevWh\",\"name\":\"怡和城市家园\",\"distance\":126.37061437672403},\"poi\":null},{\"client_time\":1609237021,\"lon\":120.601654,\"lat\":27.428303,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608553728,\"lon\":120.36792,\"lat\":27.477406,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608651959,\"lon\":120.36792,\"lat\":27.477427,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1606752127,\"lon\":120.555618,\"lat\":27.582207,\"lv\":4,\"duration\":3122,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609246417,\"lon\":120.601654,\"lat\":27.428303,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608465998,\"lon\":120.367928,\"lat\":27.477409,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1608511721,\"lon\":120.551353,\"lat\":27.542297,\"lv\":2,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609059498,\"lon\":120.601746,\"lat\":27.428726,\"lv\":2,\"duration\":1539,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":{\"id\":\"7SkFzy5gwpk\",\"name\":\"金城豪庭\",\"distance\":11.114652468053546}},{\"client_time\":1607847150,\"lon\":120.416901,\"lat\":27.5355,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1607183528,\"lon\":120.543427,\"lat\":27.508982,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":{\"id\":\"7dfGPcG5V8a\",\"name\":\"卖自行车的\",\"distance\":4.244044311489315}},{\"client_time\":1608747296,\"lon\":120.421028,\"lat\":27.556648,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609327313,\"lon\":120.604546,\"lat\":27.438131,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5aZTF2Z\",\"name\":\"涌金花苑小区\",\"distance\":104.45541372895634},\"poi\":null},{\"client_time\":1608886215,\"lon\":120.422249,\"lat\":27.502354,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null}]',\n '2021年01月' => '[{\"client_time\":1609750523,\"lon\":120.466423,\"lat\":27.51322,\"lv\":2,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610196201,\"lon\":120.332466,\"lat\":27.460398,\"lv\":3,\"duration\":8976,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609846027,\"lon\":120.475571,\"lat\":27.518959,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610549732,\"lon\":120.577705,\"lat\":27.489429,\"lv\":6,\"duration\":7,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5Zht2o1\",\"name\":\"黄龙锦园\",\"distance\":30.285918566535848},\"poi\":null},{\"client_time\":1612076042,\"lon\":120.436501,\"lat\":27.525238,\"lv\":14,\"duration\":541,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5iuQpqF\",\"name\":\"绿都花城(A组团)\",\"distance\":10.51325448830412},\"poi\":{\"id\":\"5PuX5iuQpqF\",\"name\":\"绿都花城(A组团)\",\"distance\":9.018642699411009}},{\"client_time\":1609521972,\"lon\":120.61013,\"lat\":27.423241,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609838647,\"lon\":120.475571,\"lat\":27.518959,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609937995,\"lon\":120.451485,\"lat\":27.532032,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610364354,\"lon\":120.550911,\"lat\":27.582092,\"lv\":1,\"duration\":7394,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":{\"id\":\"EP8f289a23bae7\",\"name\":null,\"distance\":9.09136586030716}},{\"client_time\":1610086147,\"lon\":120.452415,\"lat\":27.52792,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610026060,\"lon\":120.447182,\"lat\":27.535084,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609724817,\"lon\":120.400017,\"lat\":27.526449,\"lv\":3,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609763548,\"lon\":120.470665,\"lat\":27.510124,\"lv\":2,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1609775040,\"lon\":120.329178,\"lat\":27.45956,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610637461,\"lon\":120.577705,\"lat\":27.489429,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5Zht2o1\",\"name\":\"黄龙锦园\",\"distance\":30.285918566535848},\"poi\":null},{\"client_time\":1610453351,\"lon\":120.551521,\"lat\":27.580978,\"lv\":2,\"duration\":15,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1611767733,\"lon\":120.606232,\"lat\":27.429239,\"lv\":5,\"duration\":176,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610464571,\"lon\":120.551521,\"lat\":27.580978,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610187225,\"lon\":120.332466,\"lat\":27.460398,\"lv\":3,\"duration\":35778,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610356960,\"lon\":120.41497,\"lat\":27.511784,\"lv\":1,\"duration\":1,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5j3P1UW\",\"name\":\"新建小区\",\"distance\":69.58754171400395},\"poi\":{\"id\":\"7dfGPmk6tgc\",\"name\":\"阿春制衣\",\"distance\":5.747097590381571}},{\"client_time\":1610375396,\"lon\":120.550911,\"lat\":27.582092,\"lv\":1,\"duration\":11042,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":{\"id\":\"EP8f289a23bae7\",\"name\":null,\"distance\":9.09136586030716}},{\"client_time\":1610521190,\"lon\":120.577705,\"lat\":27.489429,\"lv\":2,\"duration\":472,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5Zht2o1\",\"name\":\"黄龙锦园\",\"distance\":30.285918566535848},\"poi\":null},{\"client_time\":1612103756,\"lon\":120.436501,\"lat\":27.525238,\"lv\":1,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":{\"id\":\"5PuX5iuQpqF\",\"name\":\"绿都花城(A组团)\",\"distance\":10.51325448830412},\"poi\":{\"id\":\"5PuX5iuQpqF\",\"name\":\"绿都花城(A组团)\",\"distance\":9.018642699411009}},{\"client_time\":1609753502,\"lon\":120.470665,\"lat\":27.510124,\"lv\":5,\"duration\":0,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null},{\"client_time\":1610151447,\"lon\":120.332466,\"lat\":27.460398,\"lv\":3,\"duration\":1,\"country_code\":\"042\",\"district_code\":\"330327\",\"aoi\":null,\"poi\":null}]'];\n\n foreach ($demo as $item) {\n $data = json_decode($item, true);\n foreach ($data as $value) {\n //var_dump($value['lon']);\n $this->address($value['lon'], $value['lat']);\n }\n\n }\n return 0;\n }", "public function testJSONToXMLToArrayToJsonToArray() {\n $data = '{\"foo\":\"bar\",\"bar\":\"foo\"}';\n $result = Formatter::make($data, Formatter::JSON)->toXml();\n $result = Formatter::make($result, Formatter::XML)->toArray();\n $result = Formatter::make($result, Formatter::ARR)->toJson();\n $actual = Formatter::make($result, Formatter::JSON)->toArray();\n $expected = ['foo'=>'bar', 'bar'=>'foo'];\n $this->assertEquals($expected, $actual);\n }", "private function transform($data)\n {\n $services = [];\n\n $data = json_decode($data, true);\n $data = Arr::get($data, 'results.bindings', []);\n\n if (empty($data)) {\n return $services;\n }\n\n collect($data)->each(function ($agent) use (&$services) {\n $identifier = Arr::get($agent, 'identifier.value', '');\n\n if (!empty($identifier)) {\n $services[] = [\n 'label' => Arr::get($agent, 'name.value', ''),\n 'uri' => Arr::get($agent, 'agent.value', ''),\n 'identifier' => $identifier,\n ];\n }\n });\n\n return $services;\n }", "public function get_Firm_Fees(){\n\t\t$Start_Date = date_format(date_create($this->input->post(\"SD_FirmFees\")), 'Y/m/d');\n\t\t$End_Date = date_format(date_create($this->input->post(\"ED_FirmFees\")), 'Y/m/d');\n\t\t$list = $this->financials_model->get_Firm_Fees($Start_Date, $End_Date);\n\t\t//echo \"<pre>\"; print_r($list);exit;\n\t\t$data = array();\n\t\tforeach($list as $result){\n\t\t\t$row = array();\n\t\t\t$row[] = $result->Provider_Id;\n\t\t\t$row[] = $result->Provider_Name;\n\t\t\t$row[] = $result->Case_Id;\n\t\t\t$row[] = $result->IndexOrAAA_Number;\n\t\t\t$row[] = \"$\".number_format($result->Settlement_Ff, 2);\n\t\t\t$row[] = \"$\".number_format($result->Settlement_Af, 2);\n\t\t\t$row[] = date_format(date_create(substr($result->Settlement_Date, 0,10)), \"m/d/Y\");\n\t\t\t$row[] = $result->Settlement_Notes;\n\t\t\t\n\t\t\t$data[] = $row;\n\t\t}\n\t\t\n\t\t$output = array( \"data\" => $data );\n\t\techo json_encode($output);\n\t}", "function json_to_array($string, $to_array = true)\n{\n return json_decode($string, $to_array);\n}", "private function getAirportsAsArray()\n {\n try {\n $airports = Airport::all();\n } catch (\\Exception $e){\n return null;\n }\n\n if (empty($airports)) {\n return [];\n }\n\n $airports_as_array = [];\n foreach ($airports as $airport) {\n $airports_as_array[] = \\array_merge(\n $airport->toArray(),\n [\n 'link' => URL::route('api_get_airports', $airport['airport_code'])\n ]\n );\n }\n\n return $airports_as_array;\n }", "public static function getCollectionOfFunnelsStartAtOrderForm()\n {\n $ptyp = array(\"OrderForm\");\n $json = SELF::coreData(\n 'api/funnel/get-funnel-pages'\n );\n\n $obj = (object)$json;\n $f = json_decode($obj->scalar);\n $fnls = array();\n\n foreach ($f->pages as $page) {\n if(in_array($page->stage->name,$ptyp)) {\n $fnls[$page->stage->funnel_id][] = $page;\n }\n }\n\n return $fnls;\n }", "public function providerTraffic()\n {\n return [\n [1, [ \n ['2016-07-01','398d3b21ac','23568545','12448536','251.78'],\n ['2016-07-01','281d3b1a8','4879451','1247369','48.69'],\n ],\n '1,2016-07-01,398d3b21ac,23568545,12448536,251.78\n1,2016-07-01,281d3b1a8,4879451,1247369,48.69'\n ],\n [2, [\n ['2016-07-01','kgjo93420','5345363','423526','63.24'],\n ],\n '2,2016-07-01,kgjo93420,5345363,423526,63.24'\n ],\n [1, [\n ['2016-07-02','mody73kg83','363436','64564','126.55'],\n ],\n '1,2016-07-02,mody73kg83,363436,64564,126.55'\n ],\n ];\n }", "public function listFutureTestAsJson() {\r\n $number = DB::table('staffs')->where('staff_id', Auth::user()->id)->first()->phongban;\r\n $medicial_list = $this->medicial_mng->getListFutureTestMedicial(MedicialManagement::AWAIT_STATUS, $number);\r\n return $medicial_list;\r\n }", "function toArray($obj)\n {\n //Json\n if (is_string($obj)) {\n $json = json_decode($obj);\n if (json_last_error() === JSON_ERROR_NONE) {\n $obj = json_decode($obj);\n }\n }\n\n $new = [];\n\n //Object\n if (is_object($obj)) {\n $obj = (array) $obj;\n }\n\n //Array\n if (is_array($obj)) {\n foreach($obj as $key => $val) {\n $new[$key] = toArray($val);\n }\n } else {\n $new = $obj;\n }\n\n return $new;\n }", "private function jsonToFields($obj, $json) {\r\n $fields = $this->allFields($obj);\r\n $return_fields = array();\r\n $keys = array_keys($json);\r\n $len = count($keys);\r\n for ($i = 0; $i < $len; $i++) {\r\n if (array_key_exists($keys[$i], $fields))\r\n //$return_fields[] = '`' . $keys[$i] . '` = \\'' . $json[$keys[$i]] . '\\'';\r\n $return_fields[$keys[$i]] = $json[$keys[$i]] ;\r\n };\r\n return $return_fields;\r\n }", "function obterDadosDoArquivo($arquivo) {\n $livrosJSON = file_get_contents($arquivo);\n \n // Converte de Json para Array\n return json_decode($livrosJSON, true );\n\n}", "function transportfd_values($fproptransport)\n{\n\tif(is_array($fproptransport))\n\t{\n\t\t$output_array = array();\n\t\tforeach($fproptransport as $key=>$val)\n\t\t{\n\t\t\t$primitive_output = transportfd_values($val);\n\t\t\tif(is_array($primitive_output)) \n\t\t\t{\n\t\t\t\t$output_array = array_merge($output_array, $primitive_output);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($output_array, $primitive_output);\n\t\t\t}\n\t\t}\n\t\treturn $output_array;\n\t}\n\telse\n\t{\n\t\treturn $fproptransport;\n\t}\n}", "function buildArrayResponse($json) {\n\n $reviewList = array();\n $reviewsJSONObject = $this->getServiceJSONObject(\"reviews\", $json);\n if ($reviewsJSONObject->__get(\"review\") instanceof JSONObject) {\n $reviewJSONObject = $reviewsJSONObject->__get(\"review\");\n $reviewJSONObject = new JSONObject($reviewJSONObject);\n $reviewObj = new Review();\n $reviewObj->setStrResponse($json);\n $reviewObj->setResponseSuccess($this->isRespponseSuccess($json));\n $this->buildObjectFromJSONTree($reviewObj, $reviewJSONObject);\n array_push($reviewList, $reviewObj);\n } else {\n // There is an Array of attribute\n $reviewJSONArray = $reviewsJSONObject->getJSONArray(\"review\");\n for ($i = 0; $i < count($reviewJSONArray); $i++) {\n $reviewJSONObj = $reviewJSONArray[$i];\n $reviewObj = new Review();\n $reviewObj->setStrResponse($json);\n $reviewJSONObj = new JSONObject($reviewJSONObj);\n $reviewObj->setResponseSuccess($this->isRespponseSuccess($json));\n $this->buildObjectFromJSONTree($reviewObj, $reviewJSONObj);\n array_push($reviewList, $reviewObj);\n }\n }\n\n return $reviewList;\n }", "private function _toArray($response)\n {\n return json_decode($response->getBody()->getContents());\n }", "protected function fromJSON($json) {\n\t\treturn json_decode($json, true);\n\t}", "protected function getFlights($tripId)\n {\n $data = $this->tripService->getFlights($tripId);\n\n if (empty($data)) {\n return response()->json([\n 'error' => 'No flights available'\n ], 204);\n }\n\n return response()->json($data, 200, [], JSON_PRETTY_PRINT);\n }", "public function loadDataGraphArray()\n {\n $json = $this->loadDefault2();\n $normalizedData = json_decode($json,true);\n $keys = array_keys($normalizedData);\n $resources = array();\n foreach ($keys as $single) {\n if (is_array($normalizedData[$single])) {\n $resources=array_merge($resources,$normalizedData[$single]);\n }\n }\n\n return $resources;\n }", "public function index()\n {\n $flights = $this->flightRepository->all(15);\n\n return FlightResource::collection($flights);\n }", "public function getRoute(Flight $flight)\n {\n if (!$flight->route) {\n return collect();\n }\n\n $route_points = array_map('strtoupper', explode(' ', $flight->route));\n\n $route = $this->navDataRepo->findWhereIn('id', $route_points);\n\n // Put it back into the original order the route is in\n $return_points = [];\n foreach ($route_points as $rp) {\n $return_points[] = $route->where('id', $rp)->first();\n }\n\n return collect($return_points);\n }", "private function getFlightsForRound(Round $round) {\n $flightSize = $round->num_boats / $this->regatta->getFleetSize();\n $flights = array();\n $flight = array();\n\n foreach ($this->regatta->getRacesInRound($round, $this->firstDivision) as $race) {\n $flight[] = $race;\n if (count($flight) == $flightSize) {\n $flights[] = $flight;\n $flight = array();\n }\n }\n if (count($flight) > 0) {\n $flights[] = $flight;\n }\n\n return $flights;\n }", "public function getCountriesArray()\n {\n $return = json_decode($this->Country);\n\n if (empty($return) && isset($this->Country)) {\n $return = [$this->Country];\n }\n\n return $return;\n }", "public function facility_get_all() {\n $ch = $this->api_connect($this->url . 'facility/get_all/');\n $ch = $this->api_options($ch, \"POST\", NULL);\n $result = curl_exec($ch);\n\n $result = json_decode($result, true);\n return $result['response'];\n }", "function my_acf_json_load_point($paths){\n unset($paths[0]);\n $paths[] = themosis_path('theme') . 'acf-json';\n return $paths;\n}", "public function filterFlights($user)\n {\n $where = [];\n if (setting('pilots.only_flights_from_current', false)) {\n $where['dpt_airport_id'] = $user->curr_airport_id;\n }\n\n return $this->flightRepo\n ->whereOrder($where, 'flight_number', 'asc');\n }", "public function get_features() \n {\n $vehicle_features = [];\n\n foreach ($this->vehicle_features()->get() as $vehicle_feature)\n {\n array_push($vehicle_features, $vehicle_feature->feature()->first());\n }\n return $vehicle_features;\n }", "private function getTweets($json)\n {\n $rawArray = json_decode($json, true);\n\n // create Tweet objects\n $tweets = [];\n $statuses = $rawArray['statuses'];\n foreach ($statuses as $rawTweet) {\n $id = $rawTweet['id'];\n $screenName = $rawTweet['user']['screen_name'];\n $profileImageUrl = $rawTweet['user']['profile_image_url'];\n $text = $rawTweet['text'];\n $latitude = $rawTweet['coordinates']['coordinates'][1];\n $longitude = $rawTweet['coordinates']['coordinates'][0];\n $placeName = $rawTweet['place']['name'];\n $createdAt = $rawTweet['created_at'];\n\n $tweet = new Tweet($id, $screenName, $profileImageUrl, $text, $latitude, $longitude, $placeName, $createdAt);\n array_push($tweets, $tweet);\n }\n\n return $tweets;\n }", "public function checkFlightsAvailability(){\n //Get List of available flights\n }", "public function run()\n {\n $maker = json_decode(\"[\n {\n \\\"FIELD1\\\": \\\"Aerospatiale (Sud Aviation) Se.210 Caravelle\\\",\n \\\"FIELD2\\\": \\\"CRV\\\",\n \\\"FIELD3\\\": \\\"S210\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Aerospatiale/Alenia ATR 42-300\\\",\n \\\"FIELD2\\\": \\\"AT4\\\",\n \\\"FIELD3\\\": \\\"AT43\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Aerospatiale/Alenia ATR 42-500\\\",\n \\\"FIELD2\\\": \\\"AT5\\\",\n \\\"FIELD3\\\": \\\"AT45\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Aerospatiale/Alenia ATR 42-600\\\",\n \\\"FIELD2\\\": \\\"ATR\\\",\n \\\"FIELD3\\\": \\\"AT46\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Aerospatiale/Alenia ATR 72\\\",\n \\\"FIELD2\\\": \\\"AT7\\\",\n \\\"FIELD3\\\": \\\"AT72\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A300\\\",\n \\\"FIELD2\\\": \\\"AB3\\\",\n \\\"FIELD3\\\": \\\"A30B\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A300-600\\\",\n \\\"FIELD2\\\": \\\"ABY\\\",\n \\\"FIELD3\\\": \\\"A306\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A310\\\",\n \\\"FIELD2\\\": \\\"310\\\",\n \\\"FIELD3\\\": \\\"A310\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A318\\\",\n \\\"FIELD2\\\": \\\"318\\\",\n \\\"FIELD3\\\": \\\"A318\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A319\\\",\n \\\"FIELD2\\\": \\\"319\\\",\n \\\"FIELD3\\\": \\\"A319\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A320\\\",\n \\\"FIELD2\\\": \\\"320\\\",\n \\\"FIELD3\\\": \\\"A320\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A321\\\",\n \\\"FIELD2\\\": \\\"321\\\",\n \\\"FIELD3\\\": \\\"A321\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A330\\\",\n \\\"FIELD2\\\": \\\"330\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A330-200\\\",\n \\\"FIELD2\\\": \\\"332\\\",\n \\\"FIELD3\\\": \\\"A332\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A330-300\\\",\n \\\"FIELD2\\\": \\\"333\\\",\n \\\"FIELD3\\\": \\\"A333\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A340\\\",\n \\\"FIELD2\\\": \\\"340\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A340-200\\\",\n \\\"FIELD2\\\": \\\"342\\\",\n \\\"FIELD3\\\": \\\"A342\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A340-300\\\",\n \\\"FIELD2\\\": \\\"343\\\",\n \\\"FIELD3\\\": \\\"A343\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A340-500\\\",\n \\\"FIELD2\\\": \\\"345\\\",\n \\\"FIELD3\\\": \\\"A345\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A340-600\\\",\n \\\"FIELD2\\\": \\\"346\\\",\n \\\"FIELD3\\\": \\\"A346\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A350\\\",\n \\\"FIELD2\\\": \\\"350\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A350-1000\\\",\n \\\"FIELD2\\\": \\\"351\\\",\n \\\"FIELD3\\\": \\\"A35K\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A350-900\\\",\n \\\"FIELD2\\\": \\\"359\\\",\n \\\"FIELD3\\\": \\\"A359\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A380\\\",\n \\\"FIELD2\\\": \\\"380\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Airbus A380-800\\\",\n \\\"FIELD2\\\": \\\"388\\\",\n \\\"FIELD3\\\": \\\"A388\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Antonov An-148\\\",\n \\\"FIELD2\\\": \\\"A81\\\",\n \\\"FIELD3\\\": \\\"A148\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Antonov An-158\\\",\n \\\"FIELD2\\\": \\\"A58\\\",\n \\\"FIELD3\\\": \\\"A158\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Antonov AN-72\\\",\n \\\"FIELD2\\\": \\\"AN7\\\",\n \\\"FIELD3\\\": \\\"AN72\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Avro RJ100\\\",\n \\\"FIELD2\\\": \\\"AR1\\\",\n \\\"FIELD3\\\": \\\"RJ1H\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Avro RJ70\\\",\n \\\"FIELD2\\\": \\\"AR7\\\",\n \\\"FIELD3\\\": \\\"RJ70\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Avro RJ85\\\",\n \\\"FIELD2\\\": \\\"AR8\\\",\n \\\"FIELD3\\\": \\\"RJ85\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"BAe 146\\\",\n \\\"FIELD2\\\": \\\"146\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"BAe 146-100\\\",\n \\\"FIELD2\\\": \\\"141\\\",\n \\\"FIELD3\\\": \\\"B461\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"BAe 146-200\\\",\n \\\"FIELD2\\\": \\\"142\\\",\n \\\"FIELD3\\\": \\\"B462\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"BAe 146-300\\\",\n \\\"FIELD2\\\": \\\"143\\\",\n \\\"FIELD3\\\": \\\"B463\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Beechcraft 1900\\\",\n \\\"FIELD2\\\": \\\"BEH\\\",\n \\\"FIELD3\\\": \\\"B190\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Beechcraft Baron\\\",\n \\\"FIELD2\\\": null,\n \\\"FIELD3\\\": \\\"BE58\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Bell 212\\\",\n \\\"FIELD2\\\": \\\"BH2\\\",\n \\\"FIELD3\\\": \\\"B212\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 707\\\",\n \\\"FIELD2\\\": \\\"703\\\",\n \\\"FIELD3\\\": \\\"B703\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 717\\\",\n \\\"FIELD2\\\": \\\"717\\\",\n \\\"FIELD3\\\": \\\"B712\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 720B\\\",\n \\\"FIELD2\\\": \\\"B72\\\",\n \\\"FIELD3\\\": \\\"B720\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 727\\\",\n \\\"FIELD2\\\": \\\"727\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 727-100\\\",\n \\\"FIELD2\\\": \\\"721\\\",\n \\\"FIELD3\\\": \\\"B721\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 727-200\\\",\n \\\"FIELD2\\\": \\\"722\\\",\n \\\"FIELD3\\\": \\\"B722\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737\\\",\n \\\"FIELD2\\\": \\\"737\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737 MAX 8\\\",\n \\\"FIELD2\\\": \\\"7M8\\\",\n \\\"FIELD3\\\": \\\"B38M\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737-200\\\",\n \\\"FIELD2\\\": \\\"732\\\",\n \\\"FIELD3\\\": \\\"B732\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737-300\\\",\n \\\"FIELD2\\\": \\\"733\\\",\n \\\"FIELD3\\\": \\\"B733\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737-400\\\",\n \\\"FIELD2\\\": \\\"734\\\",\n \\\"FIELD3\\\": \\\"B734\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737-500\\\",\n \\\"FIELD2\\\": \\\"735\\\",\n \\\"FIELD3\\\": \\\"B735\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737-600\\\",\n \\\"FIELD2\\\": \\\"736\\\",\n \\\"FIELD3\\\": \\\"B736\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737-700\\\",\n \\\"FIELD2\\\": \\\"73G\\\",\n \\\"FIELD3\\\": \\\"B737\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737-800\\\",\n \\\"FIELD2\\\": \\\"738\\\",\n \\\"FIELD3\\\": \\\"B738\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 737-900\\\",\n \\\"FIELD2\\\": \\\"739\\\",\n \\\"FIELD3\\\": \\\"B739\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 747\\\",\n \\\"FIELD2\\\": \\\"747\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 747-100\\\",\n \\\"FIELD2\\\": \\\"741\\\",\n \\\"FIELD3\\\": \\\"B741\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 747-200\\\",\n \\\"FIELD2\\\": \\\"742\\\",\n \\\"FIELD3\\\": \\\"B742\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 747-300\\\",\n \\\"FIELD2\\\": \\\"743\\\",\n \\\"FIELD3\\\": \\\"B743\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 747-400\\\",\n \\\"FIELD2\\\": \\\"744\\\",\n \\\"FIELD3\\\": \\\"B744\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 747-8\\\",\n \\\"FIELD2\\\": \\\"748\\\",\n \\\"FIELD3\\\": \\\"B748\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 747SP\\\",\n \\\"FIELD2\\\": \\\"74L\\\",\n \\\"FIELD3\\\": \\\"B74S\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 747SR\\\",\n \\\"FIELD2\\\": \\\"74R\\\",\n \\\"FIELD3\\\": \\\"B74R\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 757\\\",\n \\\"FIELD2\\\": \\\"757\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 757-200\\\",\n \\\"FIELD2\\\": \\\"752\\\",\n \\\"FIELD3\\\": \\\"B752\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 757-300\\\",\n \\\"FIELD2\\\": \\\"753\\\",\n \\\"FIELD3\\\": \\\"B753\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 767\\\",\n \\\"FIELD2\\\": \\\"767\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 767-200\\\",\n \\\"FIELD2\\\": \\\"762\\\",\n \\\"FIELD3\\\": \\\"B762\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 767-300\\\",\n \\\"FIELD2\\\": \\\"763\\\",\n \\\"FIELD3\\\": \\\"B763\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 767-400\\\",\n \\\"FIELD2\\\": \\\"764\\\",\n \\\"FIELD3\\\": \\\"B764\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 777\\\",\n \\\"FIELD2\\\": \\\"777\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 777-200\\\",\n \\\"FIELD2\\\": \\\"772\\\",\n \\\"FIELD3\\\": \\\"B772\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 777-200LR\\\",\n \\\"FIELD2\\\": \\\"77L\\\",\n \\\"FIELD3\\\": \\\"B77L\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 777-300\\\",\n \\\"FIELD2\\\": \\\"773\\\",\n \\\"FIELD3\\\": \\\"B773\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 777-300ER\\\",\n \\\"FIELD2\\\": \\\"77W\\\",\n \\\"FIELD3\\\": \\\"B77W\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 787\\\",\n \\\"FIELD2\\\": \\\"787\\\",\n \\\"FIELD3\\\": null,\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 787-10\\\",\n \\\"FIELD2\\\": \\\"78J\\\",\n \\\"FIELD3\\\": \\\"B78X\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 787-8\\\",\n \\\"FIELD2\\\": \\\"788\\\",\n \\\"FIELD3\\\": \\\"B788\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Boeing 787-9\\\",\n \\\"FIELD2\\\": \\\"789\\\",\n \\\"FIELD3\\\": \\\"B789\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Bombardier CS100\\\",\n \\\"FIELD2\\\": \\\"CS1\\\",\n \\\"FIELD3\\\": \\\"BCS1\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Bombardier CS300\\\",\n \\\"FIELD2\\\": \\\"CS3\\\",\n \\\"FIELD3\\\": \\\"BCS3\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Bombardier Global Express\\\",\n \\\"FIELD2\\\": \\\"CCX\\\",\n \\\"FIELD3\\\": \\\"GLEX\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"British Aerospace ATP\\\",\n \\\"FIELD2\\\": \\\"ATP\\\",\n \\\"FIELD3\\\": \\\"ATP\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"British Aerospace Jetstream 31\\\",\n \\\"FIELD2\\\": \\\"J31\\\",\n \\\"FIELD3\\\": \\\"JS31\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"British Aerospace Jetstream 32\\\",\n \\\"FIELD2\\\": \\\"J32\\\",\n \\\"FIELD3\\\": \\\"JS32\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"British Aerospace Jetstream 41\\\",\n \\\"FIELD2\\\": \\\"J41\\\",\n \\\"FIELD3\\\": \\\"JS41\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Canadair CL-44\\\",\n \\\"FIELD2\\\": \\\"CL4\\\",\n \\\"FIELD3\\\": \\\"CL44\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Canadair Regional Jet 100\\\",\n \\\"FIELD2\\\": \\\"CR1\\\",\n \\\"FIELD3\\\": \\\"CRJ1\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Canadair Regional Jet 1000\\\",\n \\\"FIELD2\\\": \\\"CRK\\\",\n \\\"FIELD3\\\": \\\"CRJX\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Canadair Regional Jet 200\\\",\n \\\"FIELD2\\\": \\\"CR2\\\",\n \\\"FIELD3\\\": \\\"CRJ2\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Canadair Regional Jet 700\\\",\n \\\"FIELD2\\\": \\\"CR7\\\",\n \\\"FIELD3\\\": \\\"CRJ7\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Canadair Regional Jet 900\\\",\n \\\"FIELD2\\\": \\\"CR9\\\",\n \\\"FIELD3\\\": \\\"CRJ9\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna 172\\\",\n \\\"FIELD2\\\": \\\"CN1\\\",\n \\\"FIELD3\\\": \\\"C172\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna 182 Skylane\\\",\n \\\"FIELD2\\\": \\\"CN1\\\",\n \\\"FIELD3\\\": \\\"C182\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna 208 Caravan\\\",\n \\\"FIELD2\\\": \\\"CN1\\\",\n \\\"FIELD3\\\": \\\"C208\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna 210 Centurion\\\",\n \\\"FIELD2\\\": \\\"CN1\\\",\n \\\"FIELD3\\\": \\\"C210\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna Citation CJ3\\\",\n \\\"FIELD2\\\": \\\"CNJ\\\",\n \\\"FIELD3\\\": \\\"C25B\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna Citation CJ4\\\",\n \\\"FIELD2\\\": \\\"CNJ\\\",\n \\\"FIELD3\\\": \\\"C25C\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna Citation Excel\\\",\n \\\"FIELD2\\\": \\\"CNJ\\\",\n \\\"FIELD3\\\": \\\"C56X\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna Citation I\\\",\n \\\"FIELD2\\\": \\\"CNJ\\\",\n \\\"FIELD3\\\": \\\"C500\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna Citation II\\\",\n \\\"FIELD2\\\": \\\"CNJ\\\",\n \\\"FIELD3\\\": \\\"C550\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna Citation Mustang\\\",\n \\\"FIELD2\\\": \\\"CNJ\\\",\n \\\"FIELD3\\\": \\\"C510\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna Citation Sovereign\\\",\n \\\"FIELD2\\\": \\\"CNJ\\\",\n \\\"FIELD3\\\": \\\"C680\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Cessna Citation X\\\",\n \\\"FIELD2\\\": \\\"CNJ\\\",\n \\\"FIELD3\\\": \\\"C750\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"COMAC C-919\\\",\n \\\"FIELD2\\\": null,\n \\\"FIELD3\\\": \\\"C919\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Concorde\\\",\n \\\"FIELD2\\\": \\\"SSC\\\",\n \\\"FIELD3\\\": \\\"CONC\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Dassault Falcon 2000\\\",\n \\\"FIELD2\\\": \\\"D20\\\",\n \\\"FIELD3\\\": \\\"F2TH\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Dassault Falcon 7X\\\",\n \\\"FIELD2\\\": \\\"DF7\\\",\n \\\"FIELD3\\\": \\\"FA7X\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"De Havilland Canada DHC-4 Caribou\\\",\n \\\"FIELD2\\\": \\\"DHC\\\",\n \\\"FIELD3\\\": \\\"DHC4\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"De Havilland Canada DHC-6 Twin Otter\\\",\n \\\"FIELD2\\\": \\\"DHT\\\",\n \\\"FIELD3\\\": \\\"DHC6\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"De Havilland Canada DHC-7 Dash 7\\\",\n \\\"FIELD2\\\": \\\"DH7\\\",\n \\\"FIELD3\\\": \\\"DHC7\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"De Havilland Canada DHC-8-300 Dash 8\\\",\n \\\"FIELD2\\\": \\\"DH3\\\",\n \\\"FIELD3\\\": \\\"DH8C\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"De Havilland Canada DHC-8-400 Dash 8Q\\\",\n \\\"FIELD2\\\": \\\"DH4\\\",\n \\\"FIELD3\\\": \\\"DH8D\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Douglas DC-10\\\",\n \\\"FIELD2\\\": \\\"D10\\\",\n \\\"FIELD3\\\": \\\"DC10\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Douglas DC-3\\\",\n \\\"FIELD2\\\": \\\"D3F\\\",\n \\\"FIELD3\\\": \\\"DC3\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Douglas DC-6\\\",\n \\\"FIELD2\\\": \\\"D6F\\\",\n \\\"FIELD3\\\": \\\"DC6\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Douglas DC-9-10\\\",\n \\\"FIELD2\\\": \\\"D91\\\",\n \\\"FIELD3\\\": \\\"DC91\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Douglas DC-9-30\\\",\n \\\"FIELD2\\\": \\\"D93\\\",\n \\\"FIELD3\\\": \\\"DC93\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Douglas DC-9-40\\\",\n \\\"FIELD2\\\": \\\"D94\\\",\n \\\"FIELD3\\\": \\\"DC94\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Douglas DC-9-50\\\",\n \\\"FIELD2\\\": \\\"D95\\\",\n \\\"FIELD3\\\": \\\"DC95\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer 170\\\",\n \\\"FIELD2\\\": \\\"E70\\\",\n \\\"FIELD3\\\": \\\"E170\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer 190\\\",\n \\\"FIELD2\\\": \\\"E90\\\",\n \\\"FIELD3\\\": \\\"E190\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer 195\\\",\n \\\"FIELD2\\\": \\\"E95\\\",\n \\\"FIELD3\\\": \\\"E195\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer EMB 110 Bandeirante\\\",\n \\\"FIELD2\\\": \\\"EMB\\\",\n \\\"FIELD3\\\": \\\"E110\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer EMB 120 Brasilia\\\",\n \\\"FIELD2\\\": \\\"EM2\\\",\n \\\"FIELD3\\\": \\\"E120\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer Legacy 600\\\",\n \\\"FIELD2\\\": \\\"ER3\\\",\n \\\"FIELD3\\\": \\\"E35L\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer Phenom 100\\\",\n \\\"FIELD2\\\": \\\"EP1\\\",\n \\\"FIELD3\\\": \\\"E50P\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer Phenom 300\\\",\n \\\"FIELD2\\\": \\\"EP3\\\",\n \\\"FIELD3\\\": \\\"E55P\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer RJ135\\\",\n \\\"FIELD2\\\": \\\"ER3\\\",\n \\\"FIELD3\\\": \\\"E135\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer RJ140\\\",\n \\\"FIELD2\\\": \\\"ERD\\\",\n \\\"FIELD3\\\": \\\"E135\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Embraer RJ145\\\",\n \\\"FIELD2\\\": \\\"ER4\\\",\n \\\"FIELD3\\\": \\\"E145\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Fairchild Dornier 328JET\\\",\n \\\"FIELD2\\\": \\\"FRJ\\\",\n \\\"FIELD3\\\": \\\"J328\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Fairchild Dornier Do.228\\\",\n \\\"FIELD2\\\": \\\"D28\\\",\n \\\"FIELD3\\\": \\\"D228\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Fairchild Dornier Do.328\\\",\n \\\"FIELD2\\\": \\\"D38\\\",\n \\\"FIELD3\\\": \\\"D328\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Fokker 100\\\",\n \\\"FIELD2\\\": \\\"100\\\",\n \\\"FIELD3\\\": \\\"F100\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Fokker 50\\\",\n \\\"FIELD2\\\": \\\"F50\\\",\n \\\"FIELD3\\\": \\\"F50\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Fokker 70\\\",\n \\\"FIELD2\\\": \\\"F70\\\",\n \\\"FIELD3\\\": \\\"F70\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Fokker F27 Friendship\\\",\n \\\"FIELD2\\\": \\\"F27\\\",\n \\\"FIELD3\\\": \\\"F27\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Gulfstream IV\\\",\n \\\"FIELD2\\\": \\\"GJ4\\\",\n \\\"FIELD3\\\": \\\"GLF4\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Gulfstream V\\\",\n \\\"FIELD2\\\": \\\"GJ5\\\",\n \\\"FIELD3\\\": \\\"GLF5\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Harbin Yunshuji Y12\\\",\n \\\"FIELD2\\\": \\\"YN2\\\",\n \\\"FIELD3\\\": \\\"Y12\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Hawker Siddeley HS 748\\\",\n \\\"FIELD2\\\": \\\"HS7\\\",\n \\\"FIELD3\\\": \\\"A748\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Ilyushin IL18\\\",\n \\\"FIELD2\\\": \\\"IL8\\\",\n \\\"FIELD3\\\": \\\"IL18\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Ilyushin IL62\\\",\n \\\"FIELD2\\\": \\\"IL6\\\",\n \\\"FIELD3\\\": \\\"IL62\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Ilyushin IL76\\\",\n \\\"FIELD2\\\": \\\"IL7\\\",\n \\\"FIELD3\\\": \\\"IL76\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Ilyushin IL86\\\",\n \\\"FIELD2\\\": \\\"ILW\\\",\n \\\"FIELD3\\\": \\\"IL86\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Ilyushin IL96\\\",\n \\\"FIELD2\\\": \\\"I93\\\",\n \\\"FIELD3\\\": \\\"IL96\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Learjet 35\\\",\n \\\"FIELD2\\\": \\\"LRJ\\\",\n \\\"FIELD3\\\": \\\"LJ35\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Learjet 60\\\",\n \\\"FIELD2\\\": \\\"LRJ\\\",\n \\\"FIELD3\\\": \\\"LJ60\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Lockheed L-188 Electra\\\",\n \\\"FIELD2\\\": \\\"LOE\\\",\n \\\"FIELD3\\\": \\\"L188\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"McDonnell Douglas MD-11\\\",\n \\\"FIELD2\\\": \\\"M11\\\",\n \\\"FIELD3\\\": \\\"MD11\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"McDonnell Douglas MD-81\\\",\n \\\"FIELD2\\\": \\\"M81\\\",\n \\\"FIELD3\\\": \\\"MD81\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"McDonnell Douglas MD-82\\\",\n \\\"FIELD2\\\": \\\"M82\\\",\n \\\"FIELD3\\\": \\\"MD82\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"McDonnell Douglas MD-83\\\",\n \\\"FIELD2\\\": \\\"M83\\\",\n \\\"FIELD3\\\": \\\"MD83\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"McDonnell Douglas MD-87\\\",\n \\\"FIELD2\\\": \\\"M87\\\",\n \\\"FIELD3\\\": \\\"MD87\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"McDonnell Douglas MD-88\\\",\n \\\"FIELD2\\\": \\\"M88\\\",\n \\\"FIELD3\\\": \\\"MD88\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"McDonnell Douglas MD-90\\\",\n \\\"FIELD2\\\": \\\"M90\\\",\n \\\"FIELD3\\\": \\\"MD90\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"NAMC YS-11\\\",\n \\\"FIELD2\\\": \\\"YS1\\\",\n \\\"FIELD3\\\": \\\"YS11\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Partenavia P.68\\\",\n \\\"FIELD2\\\": \\\"PN6\\\",\n \\\"FIELD3\\\": \\\"P68\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Pilatus Britten-Norman BN-2A Mk III Trislander\\\",\n \\\"FIELD2\\\": \\\"BNT\\\",\n \\\"FIELD3\\\": \\\"TRIS\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Pilatus Britten-Norman BN-2A/B Islander\\\",\n \\\"FIELD2\\\": \\\"BNI\\\",\n \\\"FIELD3\\\": \\\"BN2P\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Pilatus PC-12\\\",\n \\\"FIELD2\\\": \\\"PL2\\\",\n \\\"FIELD3\\\": \\\"PC12\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Pilatus PC-6 Turbo Porter\\\",\n \\\"FIELD2\\\": \\\"PL6\\\",\n \\\"FIELD3\\\": \\\"PC6T\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Piper PA-31 Navajo\\\",\n \\\"FIELD2\\\": \\\"PA2\\\",\n \\\"FIELD3\\\": \\\"PA31\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Saab 2000\\\",\n \\\"FIELD2\\\": \\\"S20\\\",\n \\\"FIELD3\\\": \\\"SB20\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Saab SF340A/B\\\",\n \\\"FIELD2\\\": \\\"SF3\\\",\n \\\"FIELD3\\\": \\\"SF34\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Shorts SD.360\\\",\n \\\"FIELD2\\\": \\\"SH6\\\",\n \\\"FIELD3\\\": \\\"SH36\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Sikorsky S-61\\\",\n \\\"FIELD2\\\": \\\"S61\\\",\n \\\"FIELD3\\\": \\\"S61\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Sikorsky S-76\\\",\n \\\"FIELD2\\\": \\\"S76\\\",\n \\\"FIELD3\\\": \\\"S76\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Sukhoi Superjet 100-95\\\",\n \\\"FIELD2\\\": \\\"SU9\\\",\n \\\"FIELD3\\\": \\\"SU95\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Tupolev Tu-134\\\",\n \\\"FIELD2\\\": \\\"TU3\\\",\n \\\"FIELD3\\\": \\\"T134\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Tupolev Tu-144\\\",\n \\\"FIELD2\\\": null,\n \\\"FIELD3\\\": \\\"T144\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Tupolev Tu-154\\\",\n \\\"FIELD2\\\": \\\"TU5\\\",\n \\\"FIELD3\\\": \\\"T154\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Tupolev Tu-204\\\",\n \\\"FIELD2\\\": \\\"T20\\\",\n \\\"FIELD3\\\": \\\"T204\\\",\n \\\"FIELD4\\\": \\\"\\\"\n },\n {\n \\\"FIELD1\\\": \\\"Yakovlev Yak-40\\\",\n \\\"FIELD2\\\": \\\"YK4\\\",\n \\\"FIELD3\\\": \\\"YK40\\\",\n \\\"FIELD4\\\": \\\"\\\"\n }\n ]\");\n foreach ($maker as $m) {\n DB::table('planes')->insert([\n 'name' => $m->FIELD1,\n 'short_name_1' => $m->FIELD2,\n 'short_name_2' => $m->FIELD3,\n 'max_passenger' => rand(200, 300)\n ]);\n }\n }", "function my_acf_json_load_point($paths)\n{\n\tunset($paths[0]);\n\t// append path\n\t$paths[] = get_stylesheet_directory() . '/acf-json';\n\t// return\n\treturn $paths;\n}", "public function actionGetFacilityList()\n {\n $companyId = $this->getFromPost('companyId');\n $facilityManager = new FacilityManager();\n if ($companyId != 'null') {\n $facilities = $facilityManager->getFacilityListByCompanyId($companyId);\n } else {\n $facilities = $facilityManager->getFacilityListByCompanyId();\n }\n $facilityList = array();\n foreach ($facilities as $facility) {\n $facilityList[] = array(\n \"id\" => $facility->getFacilityId(),\n \"name\" => $facility->getName()\n );\n }\n $facilityList = json_encode($facilityList);\n echo $facilityList;\n }", "public function convertTransactions()\n {\n $converted = [];\n\n foreach ($this->data['transactions'] as $transaction) {\n list($id, $date, $amount) = $transaction;\n\n $this->converted[] = [$id, $date, $this->converter->convert($amount)];\n }\n }", "public function getStates(): array\n {\n \\trigger_error(\"WebAPI::getStates is not implemented.\", E_USER_WARNING);\n\n $json = $this->_guzzle\n ->request('GET', '/crunchi/api/order/Address/CountryStates?cartCountry=USA')\n ->getBody()\n ->getContents();\n\n return \\json_decode($json);\n\n $results = [];\n foreach (\\json_decode($json) as $country) {\n //$results[] = $country;\n }\n\n return $results;\n }", "public static function getAll(){\n $jsonParser = new jsonParser(\"featuredItems.json\");\n $result = $jsonParser->parse();\n itemsFeatured::$data = $result;\n }", "public function renderFlightResponse($flightRoundTripId)\n {\n \t$outbound = App\\Flights::where('round_trip_id', $flightRoundTripId)\n \t\t\t\t\t\t\t->where('type', 'Outbound')\n \t\t\t\t\t\t\t->orderBy('index')\n \t\t\t\t\t\t\t->get();\n\n \t$inbound = App\\Flights::where('round_trip_id', $flightRoundTripId)\n \t\t\t\t\t\t\t->where('type', 'Inbound')\n \t\t\t\t\t\t\t->orderBy('index')\n \t\t\t\t\t\t\t->get();\n $flight_round_trip = DB::table('flight_round_trip')->where('id', $flightRoundTripId)->get();\n \n \t$respone = array();\n \t$oSegment = array();\n \tforeach ($outbound as $key => $value) {\n \t\t$arrival = new \\DateTime($value->arrival_datetime);\n \t\t$departure = new \\DateTime($value->departure_datetime);\n \t\t$duration = $arrival->getTimestamp() - $departure->getTimestamp();\n \t\tarray_push($oSegment, array(\n 'originName' => $value->origin_place,\n 'originCode' => $value->origin_code,\n 'destinationName' =>$value->destination_place,\n 'destinationCode' =>$value->destination_code,\n 'departureDate' => $departure->format('Y-m-d'),\n 'arrivalDate' => $arrival->format('Y-m-d'),\n 'departureTime' => $departure->format('H:i'),\n 'arrivalTime' => $arrival->format('H:i'),\n 'duration_h' => floor($duration/3600),\n 'duration_m'=> floor($duration/60%60),\n 'imageUrl' => $value->carrier_logo,\n 'imageName' => $value->carrier_name,\n 'flightNumber' => $value->flight_number\n ));\n \t}\n\n \t$dSegment = array();\n \tforeach ($inbound as $key => $value) {\n \t\t$arrival = new \\DateTime($value->arrival_datetime);\n \t\t$departure = new \\DateTime($value->departure_datetime);\n \t\t$duration = $arrival->getTimestamp() - $departure->getTimestamp();\n \t\tarray_push($dSegment, array(\n 'originName' => $value->origin_place,\n 'originCode' => $value->origin_code,\n 'destinationName' =>$value->destination_place,\n 'destinationCode' =>$value->destination_code,\n 'departureDate' => $departure->format('Y-m-d'),\n 'arrivalDate' => $arrival->format('Y-m-d'),\n 'departureTime' => $departure->format('H:i'),\n 'arrivalTime' => $arrival->format('H:i'),\n 'duration_h' => floor($duration/3600),\n 'duration_m'=> floor($duration/60%60),\n 'imageUrl' => $value->carrier_logo,\n 'imageName' => $value->carrier_name,\n 'flightNumber' => $value->flight_number\n ));\n \t}\n $payment = array();\n foreach ($flight_round_trip as $key => $value) \n {\n $paymentId = $value->payment_id;\n $payments = DB::table('payments')->where('paypal_id', $paymentId)->get();\n foreach ($payments as $result) {\n # code...\n \n array_push($payment, array(\n 'name' => $result->payer_name,\n 'email' => $result->payer_email,\n 'amount_total'=> $result->amount_total,\n 'amount_currency'=> $result->amount_currency,\n 'payment_time' => $result->created_at\n ));\n }\n }\n\n \treturn array('Outbound' => $oSegment, 'Inbound' => $dSegment, 'Payment' => $payment);\n }", "public function getFranchiseList() {\n $franchiseModel = new FranchiseModel();\n $franchise = $franchiseModel->getFranchiseMessage();\n $this->JsonCall($franchise);\n }" ]
[ "0.6768", "0.5685274", "0.56137866", "0.5538807", "0.53330195", "0.52878916", "0.5286482", "0.52665627", "0.51957595", "0.51919067", "0.5182042", "0.51632905", "0.50566953", "0.5035946", "0.5032948", "0.50323164", "0.5026231", "0.50256485", "0.50158525", "0.5006191", "0.49968266", "0.4954373", "0.49540412", "0.4927265", "0.48994032", "0.48967934", "0.4894536", "0.4885272", "0.48650736", "0.48642492", "0.4853235", "0.48445043", "0.48440748", "0.48437965", "0.48318675", "0.48302457", "0.48217794", "0.48004967", "0.47456172", "0.472787", "0.47118542", "0.47110108", "0.4698563", "0.46930018", "0.46882933", "0.46839425", "0.46691045", "0.46664682", "0.46626675", "0.4660969", "0.46598378", "0.4646241", "0.46452233", "0.46429086", "0.4631633", "0.46268925", "0.46253914", "0.46190223", "0.46156913", "0.46006796", "0.45984504", "0.45913717", "0.45723", "0.4570641", "0.45684004", "0.4562354", "0.45603764", "0.45591316", "0.45477107", "0.45439452", "0.45396152", "0.45317703", "0.45268244", "0.45251572", "0.45202428", "0.4517519", "0.45130506", "0.4509879", "0.450665", "0.45009056", "0.44984746", "0.44913936", "0.44854566", "0.44774735", "0.44693834", "0.44622403", "0.44619328", "0.44606876", "0.44562736", "0.4452305", "0.44468087", "0.44389108", "0.44388893", "0.44316295", "0.44292268", "0.44276607", "0.44271803", "0.44218332", "0.44175035", "0.44138816" ]
0.7127231
0
woocommerce_pip_my_orders_action function. Add HTML invoice button to my orders page so customers can view their invoices.
Функция woocommerce_pip_my_orders_action. Добавить кнопку HTML-счета на страницу "Мои заказы", чтобы клиенты могли просмотреть свои счета.
function woocommerce_pip_my_orders_action( $actions, $order ) { if ( in_array( $order->status, array( 'processing', 'completed' ) ) ) { $actions[] = array( 'url' => wp_nonce_url( site_url( '?print_pip_invoice=true&post='.$order->id ), 'client-print-pip' ), 'name' => __( 'View invoice', 'woocommerce-pip' ) ); } return $actions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_alter_order_actions( $order ) {\n\n\t\t\t?>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post='.$order->id.'&type=print_invoice'), 'print-pip' ); ?>\"><img src=\"<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/invoice-icon.png'; ?>\" alt=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" width=\"14\"></a>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $order->id.'&type=print_packing' ), 'print-pip' ); ?>\"><img src=\"<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/packing-list-icon.png'; ?>\" alt=\"<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>\" width=\"14\"></a>\n\t\t\t<?php\n}", "public function orderInvoice()\n\t{\n\t\t$data=array();\n\t _adminLayout(\"order-mgmt/order-invoice\",$data);\t\n\t}", "public function printInvoices()\n\t{\n\t\t$strMessage = '';\n\n\t\t$strReturn = '\n<div id=\"tl_buttons\">\n<a href=\"'.ampersand(str_replace('&key=print_invoices', '', $this->Environment->request)).'\" class=\"header_back\" title=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['backBT']).'\">'.$GLOBALS['TL_LANG']['MSC']['backBT'].'</a>\n</div>\n\n<h2 class=\"sub_headline\">'.$GLOBALS['TL_LANG']['tl_iso_orders']['print_invoices'][0].'</h2>\n<form action=\"'.$this->Environment->request.'\" id=\"tl_print_invoices\" class=\"tl_form\" method=\"post\">\n<input type=\"hidden\" name=\"FORM_SUBMIT\" value=\"tl_print_invoices\">\n<input type=\"hidden\" name=\"REQUEST_TOKEN\" value=\"'.REQUEST_TOKEN.'\">\n<div class=\"tl_formbody_edit\">\n<div class=\"tl_tbox block\">';\n\n\t\t$objWidget = new SelectMenu($this->prepareForWidget($GLOBALS['TL_DCA']['tl_iso_orders']['fields']['status'], 'status'));\n\n\t\tif ($this->Input->post('FORM_SUBMIT') == 'tl_print_invoices')\n\t\t{\n\t\t\t$objOrders = $this->Database->prepare(\"SELECT id FROM tl_iso_orders WHERE status=?\")->execute($this->Input->post('status'));\n\n\t\t\tif ($objOrders->numRows)\n\t\t\t{\n\t\t\t\t$this->generateInvoices($objOrders->fetchEach('id'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strMessage = '<p class=\"tl_gerror\">'.$GLOBALS['TL_LANG']['MSC']['noOrders'].'</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn $strReturn . $strMessage . $objWidget->parse() . '\n</div>\n</div>\n<div class=\"tl_formbody_submit\">\n<div class=\"tl_submit_container\">\n<input type=\"submit\" name=\"print_invoices\" id=\"ctrl_print_invoices\" value=\"'.$GLOBALS['TL_LANG']['MSC']['labelSubmit'].'\">\n</div>\n</div>\n</form>\n</div>';\n\t}", "function woocommerce_pip_client_window() {\n\tif ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\t\t$order_id = $_GET['post'];\n\t\t$order = new WC_Order( $order_id );\n\t\t$current_user = wp_get_current_user();\n\t\t$action = 'print_invoice';\n\t\t$client = true;\n\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'client-print-pip' ) || ! is_user_logged_in() || $order->user_id != $current_user->ID ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows (actually this one might not be needed, are the customers in the admin for this?)\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\tob_start();\n\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t$content .= ob_get_clean();\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "public function customer_invoice($order)\n {\n }", "function sendinvoice($orderid) {\n $email = new WC_Email_Customer_Invoice();\n $email->trigger($orderid);\n}", "public function admin_invoice_link($content)\n {\n global $post;\n global $woocommerce;\n\n $order = new WC_Order($post->ID);\n\n if (!$order) {\n return $content;\n }\n\n $invoice = $this->get_invoice($post->ID);\n\n // WooCommerce styling fix (covering multiple versions...)\n if (isset($woocommerce->version) && version_compare($woocommerce->version, '2.1', '>=')) {\n $button_style = 'style=\"display:block;text-indent:-9999px;position:relative;padding:6px 4px;height:2em!important;width:2em;\"';\n }\n else {\n $button_style = '';\n }\n\n // Show invoice link\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled']) {\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n\n $download_button = '<a id=\"\" class=\"button tips\" ' . $button_style . ' href=\"'.$download_url.'\" data-tip=\"'.__('Invoice', 'woo_pdf').'\">' .\n '<img src=\"'.WOOPDF_PLUGIN_URL.'/assets/images/download.png'.'\" alt=\"'.__('Invoice', 'woo_pdf').'\" width=\"14\">' .\n '</a>';\n echo $download_button;\n }\n\n // Show proforma link\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && $order->status != 'completed') {\n $download_url = home_url('/?wpd_proforma='.$post->ID);\n $download_button = '<a id=\"\" class=\"button tips\" ' . $button_style . ' href=\"'.$download_url.'\" data-tip=\"'.__('Proforma', 'woo_pdf').'\">' .\n '<img src=\"'.WOOPDF_PLUGIN_URL.'/assets/images/download.png'.'\" alt=\"'.__('Proforma', 'woo_pdf').'\" width=\"14\">' .\n '</a>';\n echo $download_button;\n }\n\n return $content;\n }", "function hwoo_myaccount_show_orders($data = array()) {\r\n wc_get_template( 'myaccount/my-orders.php' );\r\n }", "public function generate_invoice()\n {\n if (!class_exists('WC_Order')) {\n return;\n }\n\n // Load order\n $order = new WC_Order($_GET['wpd_generate_invoice']); \n\n if (!$order) {\n return;\n }\n\n // Check if user has rights to generate invoices\n $current_user = wp_get_current_user();\n $user_ok = false;\n\n if ($current_user instanceof WP_User) {\n if (in_array('administrator', $current_user->roles) || in_array('shop_manager', $current_user->roles)) {\n $user_ok = true;\n }\n }\n\n if (!$user_ok) {\n return;\n }\n\n // Check maybe we already have invoice for this order\n $invoice_id = get_post_meta($order->id, 'woo_pdf_invoice_id', true);\n if (!empty($invoice_id)) {\n wp_redirect(admin_url('/post.php?post='.$_GET['wpd_generate_invoice'].'&action=edit'));\n exit;\n }\n\n // If not - create a new one\n $this->make_invoice($order);\n\n // Redirect back to order page\n wp_redirect(admin_url('/post.php?post='.$_GET['wpd_generate_invoice'].'&action=edit'));\n exit;\n }", "public function orders_actions($actions, $order)\n {\n if ($this->opt['woo_pdf_display_orders_page_button']) {\n\n $invoice = $this->get_invoice($order->id);\n\n // Show invoice link\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled'] && $this->opt['woo_pdf_allow_download'] && apply_filters('woo_pdf_allow_regular_invoice_download', true, $order, 'list')) {\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n $title = $this->opt['woo_pdf_document_name'];\n }\n\n // Show proforma link\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && $this->opt['woo_pdf_allow_proforma_download'] && $order->status != 'completed' && apply_filters('woo_pdf_allow_proforma_invoice_download', true, $order, 'list')) {\n $download_url = home_url('/?wpd_proforma='.$order->id);\n $title = $this->opt['woo_pdf_proforma_name'];\n }\n\n if (isset($download_url) && isset($title)) {\n $actions['invoice'] = array(\n 'url' => $download_url,\n 'name' => $title,\n );\n }\n }\n\n return $actions;\n }", "public function invoiceAction() {\r\n\r\n\t\t// initialise action varibles\r\n\t\t$request = $this->getRequest();\r\n\t\t$user = $this->loggedInUser();\r\n\t\t\r\n\t\t// get the requested order. Also checks that the logged in user has access\r\n\t\t$order_id = $request->getParam('id');\r\n\t\t$ordModel = Base::getModel('Common_Orders');\r\n\t\t$select = $ordModel->select()\r\n\t\t ->where('id = ?', $order_id)\r\n\t\t\t\t ->where('sub_id IN (?)', $user->subs()->inField('id'));\r\n\t\t\r\n\t\t$order = $ordModel->fetchRow($select);\r\n\t\t\r\n\t\tif (!$order) {\r\n\t\t\t$this->addFlash('Invalid order', 'errors');\r\n\t\t\t$this->_redirect('/common/orders', array('exit' => true));\r\n\t\t}\r\n\r\n\t\t$this->view->order = $order;\r\n\t\t$date = new DateTime();\r\n\t\t$this->view->currentYear = $date->format('Y');\r\n\r\n\t}", "function send_customer_invoice($request) { #API\r\n if(!validate_request($request)) {\r\n return invalid_request_response();\r\n }\r\n \r\n if(!isset($request['orderid']))\r\n return \"ERROR: Missing email\";\r\n\r\n $order = wc_get_order(absint($request['orderid']));\r\n if(!$order) \r\n return \"ERROR: Couldn't find order '\".$request['orderid'].\"'\";\r\n\r\n $wc = WC();\r\n if(!$wc) return \"ERROR: Couldn't get WC?\";\r\n $mailer = $wc->mailer();\r\n if(!$mailer) return \"ERROR: Couldn't get mailer?\";\r\n $mailer->customer_invoice($order);\r\n\r\n return \"Probably OK\";\r\n}", "public function viewInvoice()\n {\n $this->_rootElement->find($this->invoiceId)->click();\n }", "public function execute(){\n \n $order_id = $this->getRequest()->getParam('order');\n $order = $this->getOrder($order_id);\n try{\n if($order->getId()){\n if($order->getCustomerId() == $this->getCustomer()){\n if ($order->getPayment()->getMethodInstance()->getCode() == 'coinremitter_checkout' && $order->getStatus() == \"pending\") {\n\n $resultPage = $this->resultPageFactory->create();\n $resultPage->getConfig()->getTitle()->prepend(__('Order Invoice #'.$order->getIncrementId()));\n $block = $resultPage->getLayout()->getBlock('coinremitter_invoice');\n $block->setData('order_id', $order_id);\n return $resultPage;\n }\n }\n }\n }catch(Exception $e){}\n $resultRedirect = $this->resultRedirectFactory->create();\n $resultRedirect->setPath('/');\n return $resultRedirect; \n }", "function receipt_page( $order ) {\r\n\t\t\techo '<p>' . __( 'Thank you - your order is now pending payment. You should be automatically redirected to Interswitch to make payment.', 'woocommerce' ) . '</p>';\r\n\t\t\techo $this->generate_webpay_form( $order );\r\n\t\t}", "function wc_get_account_orders_actions($order)\n {\n }", "public function DisplayModifyInvoice() {\n\n }", "function createInvoice(Order $order);", "function cpe_orders_print_view()\n{\n\n /*dd(var_export(wp_verify_nonce($_GET['_wpnonce'], \"cpe_print_invoice-{$_GET['order']}\"), true));\n\n if (!wp_verify_nonce($nonce, \"cpe_print_invoice-{$_GET['order']}\")) {\n wp_die(\n __(\"Sorry! Something went wrong. Please contact site administrator or go back and retry.\"),\n __(\"Not Allowed!\"),\n array(\n \"response\" => 403,\n \"back_link\" => true\n )\n );\n }*/\n\n // Do we have an order ID?\n if (empty($_GET['order'])) {\n wp_redirect(admin_url('admin.php?page=pmpro-orders'));\n exit;\n }\n\n // Get order and membership level.\n $order = new MemberOrder($_GET['order']);\n\n if (!isset($order->id)) {\n wp_die(\n __(\"Sorry! Something went wrong. Please contact site administrator or go back and retry.\"),\n __(\"Not Allowed!\"),\n array(\n \"response\" => 403,\n \"back_link\" => true\n )\n );\n }\n\n $level = pmpro_getLevel($order->membership_id);\n\n // Load template\n $template = CPE_DIR . '/paid-memberships-pro/pages/orders-print.php';\n \n require_once($template);\n\n ?>\n <script>\n window.print();\n </script>\n\n <?php\n exit;\n}", "public function invoice($order_detail_id=''){ \n\t $this->_check_login(); //check login authentication\n\t $data['title']='Customer Invoice';\n\t $order_detail_id = base64_decode($order_detail_id);\n\t $data['order_info'] = $order_info = $this->common_model->get_orderdetails($order_detail_id, 2, user_id());\n\t if(empty($order_info)) redirect($_SERVER['HTTP_REFERER']);\n\t $data['order_detail_id'] = $order_detail_id;\n\t $this->load->view('order-invoices',$data);\n\n\t}", "public function addViewReceiptButton($observer)\n {\n $block = $observer->getEvent()->getBlock();\n\n if (\n $block instanceof Mage_Adminhtml_Block_Sales_Order_Invoice_View &&\n 'sales_order_invoice' === $block->getRequest()->getControllerName()\n ) {\n $invoice = Mage::registry('current_invoice');\n\n $receiptId = $invoice->getReceiptfulId();\n\n if (!$receiptId) {\n return;\n }\n\n $receiptUrl = Receiptful_Core_ApiClient::getBaseUrl() . '/receipt/' . $receiptId;\n\n $block->addButton('view_receipt', array(\n 'label' => Mage::helper('sales')->__('View Receipt'),\n 'onclick' => 'popWin(\\'' . $receiptUrl . '\\', \\'_blank\\')'\n ));\n }\n }", "public function add_order_actions( $order ) {\n\n\t\t$order = new WC_Shipwire_Order( $order->id );\n\n\t\tif ( ! $order->is_exported ) {\n\n\t\t\t$url = wp_nonce_url( admin_url( 'admin-ajax.php?action=wc_shipwire_export_order&order_id=' . $order->id ), 'wc_shipwire_export_order' );\n\t\t\t$name = __( 'Export to Shipwire', 'woocommerce-shipwire' );\n\n\t\t\tprintf( '<a class=\"button tips export_to_shipwire\" href=\"%1$s\" data-tip=\"%2$s\">%2$s</a>', esc_url( $url ), $name );\n\t\t}\n\t}", "function add_invoice() {\n $this->wireframe->actions->add('change_description_formats', lang('Change Description Formats'), Router::assemble('invoicing_settings_change_description_formats'), array(\n 'onclick' => new FlyoutFormCallback('', array(\n 'title' => lang('Change Formats'),\n 'width' => 700,\n 'success_message' => lang('Settings updated'),\n 'success_event' => 'description_formats_updated',\n ))\n ));\n\n $invoice_data = $this->request->post('invoice_data');\n\n if(empty($invoice_data)) {\n $invoice_data = array();\n } // if\n\n $preview_items_url = $this->active_object->invoice()->getPreviewItemsUrl();\n\n if($this->active_object instanceof Project || $this->active_object instanceof Task) {\n if(!isset($invoice_data['company_id'])) {\n $invoice_data['company_id'] = $this->active_object->getCompany()->getId();\n } // if\n } // if\n\n if($this->active_object instanceof Quote) {\n if(!isset($invoice_data['note'])) {\n $invoice_data['note'] = $this->active_object->getNote();\n } // if\n\n if($this->active_object->getCompany() instanceof Company && !isset($invoice_data['company_id'])) {\n $invoice_data['company_id'] = $this->active_object->getCompany()->getId();\n } // if\n\n if($this->active_object->getProject() instanceof Project && !isset($invoice_data['project_id'])) {\n $invoice_data['project_id'] = $this->active_object->getProject()->getId();\n } // if\n } // if\n\n if($this->active_object instanceof TrackingReport) {\n $filter_data = $this->request->get('filter') ? $this->request->get('filter') : unserialize($this->request->post('filter_data'));\n\n if($filter_data) {\n foreach($filter_data as $k => $v) {\n $preview_items_url = extend_url($preview_items_url, array(\"filter[$k]\" => $v));\n } // foreach\n } // if\n\n $this->active_object->setAttributes($filter_data);\n\n if(!isset($invoice_data['company_id'])) {\n $report_company = $this->active_object->getCompany($this->logged_user);\n\n if($report_company) {\n $invoice_data['company_id'] = $report_company->getId();\n } // if\n } // if\n \n $this->response->assign('filter_data', serialize($filter_data));\n } // if\n\n // Set default PO value object have Purcahse Order number in custom fields\n if($this->active_object instanceof ICustomFields) {\n $custom_field_name = $this->active_object->customFields()->getFieldNameForLabel(array(\n 'po',\n 'purchase order',\n 'purchase order number'\n ));\n\n if($custom_field_name && !isset($invoice_data['purchase_order_number'])) {\n $invoice_data['purchase_order_number'] = $this->active_object->customFields()->getValue($custom_field_name);\n } // if\n } // if\n\n if(!$this->active_object instanceof Quote && !isset($invoice_data['project_id'])) {\n list($time_records, $expenses, $project) = $this->active_object->invoice()->queryRecords($this->logged_user);\n $invoice_data['project_id'] = $project instanceof Project ? $project->getId() : $project;\n } // if\n\n\n $this->response->assign(array(\n 'invoice_data' => $invoice_data,\n 'preview_items_url' => $preview_items_url,\n )); \n \n if($this->request->isSubmitted()) {\n if($this->active_object->invoice()->canAdd($this->logged_user)) {\n try {\n $errors = new ValidationErrors();\n\n $company = isset($invoice_data['company_id']) && $invoice_data['company_id'] ? Companies::findById($invoice_data['company_id']) : null;\n if(empty($company)) {\n $errors->addError(lang('Client is required'), 'company_id');\n } // if\n\n $company_address = isset($invoice_data['company_address']) && $invoice_data['company_address'] ? trim($invoice_data['company_address']) : '';\n if(empty($company_address)) {\n $errors->addError(lang('Client address is required'), 'company_address');\n } // if\n\n if($errors->hasErrors()) {\n throw $errors;\n } // if\n\n if(empty($invoice_data['currency_id'])) {\n $invoice_data['currency_id'] = Currencies::getDefault()->getId();\n } // if\n\n $allow_payments = (boolean) ConfigOptions::getValue('allow_payments');\n if($allow_payments && !isset($invoice_data['allow_payments'])) {\n $invoice_data['allow_payments'] = -1;\n } // if\n \n $invoice = $this->active_object->invoice()->create($company, $company_address, $invoice_data, $this->logged_user);\n \n $this->response->respondWithData($invoice, array(\n \t 'as' => 'invoice', \n \t )); \n } catch(Exception $e) {\n $this->response->exception($e);\n } // try\n } else {\n $this->response->badRequest();\n } // if\n } // if\n }", "public function invoice($id)\n {\n $orders = Orderedproduct::where('order_id', $id)->get();\n\n $order_info = Order::where('id', $id)->first();\n $setting = Setting::first();\n\n return view('admin.orders.invoice', compact('orders','order_info', 'setting'));\n }", "public function push_invoice()\n {\n $invoice = explode('|', base64_decode($_GET['wpd_invoice']));\n\n if (count($invoice) != 4) {\n exit;\n }\n\n // Get file path\n $upload_dir = wp_upload_dir();\n $location = $upload_dir['basedir'] . '/' . 'woocommerce_pdf_invoices';\n $file_path = $location . '/' . $invoice[2] . '.pdf';\n\n // Push file to browser\n if ($fp = fopen($file_path, 'rb')) {\n header('Content-Type: application/pdf');\n header('Content-Length: ' . filesize($file_path));\n header('Content-disposition: attachment; filename=\"'._x($this->opt['woo_pdf_title_filename_prefix'], 'file name prefix', 'woo_pdf') . (!empty($invoice[1]) ? $invoice[1] . '_' : '') . $invoice[0] . (!empty($invoice[3]) ? '_' . $invoice[3] : '') . '.pdf\"');\n fpassthru($fp);\n }\n\n exit;\n }", "function add_link_back_to_order($order, $is_admin)\n{\n\tif ($order->get_status() !== \"completed\") return;\n\t// Open the section with a paragraph so it is separated from the other content\n\t$link = '<p style=\"text-align: center;\">';\n\n\t// Add the anchor link with the admin path to the order page\n\t$link .= '<a href=\"https://wapo.ie/my-account-2\">';\n\n\t$buttonStyles = '\n\t\tbackground-color: #59bcb8;\n\t\tpadding: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder: none;';\n\n\t// Clickable text\n\t$link .= '<button style=\"' . $buttonStyles . '\">View Purchase</button>';\n\n\t// Close the link\n\t$link .= '</a>';\n\n\t// Close the paragraph\n\t$link .= '</p>';\n\n\t// Return the link into the email\n\techo $link;\n}", "public function user_invoice_link($order)\n {\n $invoice = $this->get_invoice($order->id);\n\n // Show invoice link\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled'] && $this->opt['woo_pdf_allow_download'] && apply_filters('woo_pdf_allow_regular_invoice_download', true, $order, 'single')) {\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n $download_button = '<p class=\"woo_pdf_download_link\" style=\"padding: 15px 0;\"><a id=\"woo_pdf_invoice_download_link\" href=\"'.$download_url.'\" data-tip=\"Invoice\">' .\n '<img style=\"position: relative; top: 4px;\" src=\"'.WOOPDF_PLUGIN_URL.'/assets/images/pdf.png'.'\" alt=\"Invoice\" width=\"20\" height=\"20\">' .\n '<span style=\"padding-left: 10px;\">' . $this->opt['woo_pdf_title_download_invoice'] . '</span>' .\n '</a></p>';\n echo $download_button;\n }\n\n // Show proforma link\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && $this->opt['woo_pdf_allow_proforma_download'] && $order->status != 'completed' && apply_filters('woo_pdf_allow_proforma_invoice_download', true, $order, 'single')) {\n $download_url = home_url('/?wpd_proforma='.$order->id);\n $download_button = '<p class=\"woo_pdf_download_link\" style=\"padding: 15px 0;\"><a id=\"woo_pdf_proforma_download_link\" href=\"'.$download_url.'\" data-tip=\"Invoice\">' .\n '<img style=\"position: relative; top: 4px;\" src=\"'.WOOPDF_PLUGIN_URL.'/assets/images/pdf.png'.'\" alt=\"Invoice\" width=\"20\" height=\"20\">' .\n '<span style=\"padding-left: 10px;\">' . $this->opt['woo_pdf_title_download_proforma'] . '</span>' .\n '</a></p>';\n echo $download_button;\n }\n }", "function receipt_page( $order ) {\r\n\r\n\t\techo '<p>'.__( 'Thank you for your order, please click the button below to pay with 2Checkout.', 'woocommerce' ).'</p>';\r\n\r\n\t\techo $this->generate_tco_form( $order );\r\n\r\n\t}", "function bonuin_invoices_menu_initiate() {\r\n add_menu_page(\r\n 'Package Invoices',\r\n 'Package Invoices',\r\n 'manage_options',\r\n 'bonuin_package_invoices',\r\n 'bonuin_invoice_view' , get_template_directory_uri().'/assets/img/bonuin_admin_icon.png' , 5 );\r\n}", "public function customerView(OrderInterface $order);", "public function generate_form( WC_Order $order ) {\n\t\t\t$invoice = $this->create_invoice( $order );\n//\t\t\t$invoice = '2cd7eaf4-576b-7db4-dfe1-26005a951e81'; // test\n\n\t\t\tif ( is_wp_error( $invoice ) ) {\n\t\t\t\treturn '<a class=\"button cancel\" href=\"' . $order->get_cancel_order_url() . '\">' . __( 'Отказаться от оплаты & вернуться в корзину',\n\t\t\t\t\t'woocommerce' ) . '</a>';\n\t\t\t}\n\n\t\t\treturn\n\t\t\t\t'<a class=\"button alt\" href=\"' . $this->get_gateway_url( '/' . $this->get_lang() . '/invoice/' . $invoice ) . '\">' . __( 'Оплатить',\n\t\t\t\t\t'woocommerce' ) . '</a>\n\t\t\t\t\t<a class=\"button cancel\" href=\"' . $order->get_cancel_order_url() . '\">' . __( 'Отказаться от оплаты & вернуться в корзину',\n\t\t\t\t\t'woocommerce' ) . '</a>';\n\t\t}", "public function processAndInvoice() {\n $errorMessage = $this->checkDirectory();\n\n /** Make sure method was called by AJAX */\n if(!$this->getRequest()->isXmlHttpRequest()) {\n return $this->generateRedirectFromRoute('admin.order.list');\n }\n\n $request = $this->getRequest()->request;\n\n $turn = (int)$request->get('turn');\n $offset = 10 * $turn;\n\n $paidStatus = OrderStatusQuery::create()->findOneByCode('paid');\n\n $orders = OrderQuery::create()\n ->filterByOrderStatus($paidStatus)\n ->offset($offset)\n ->limit(10)\n ->find()\n ;\n\n if ($orders->count() > 0) {\n $htmltopdf = new Html2Pdf('P', 'A4', 'fr');\n\n $page = $offset;\n foreach ($orders as $order) {\n ++$page;\n $htmlInvoice = $this->returnHTMLInvoice($order->getId(), 'invoice');\n $htmltopdf->writeHTML($htmlInvoice);\n }\n\n $currentUserId = $this->getSecurityContext()->getAdminUser()->getId();\n\n $fileName = THELIA_LOCAL_DIR . 'invoices/' . $currentUserId . '/ordersInvoice_' . $turn . '.pdf';\n $htmltopdf->output($fileName, 'F');\n }\n\n /** JsonResponse for the AJAX call */\n return new JsonResponse([\n \"status\" => $errorMessage ? 'error' : 'success',\n \"message\" => $errorMessage ? $errorMessage : $this->getTranslator()->trans(\n \"Part $turn of invoice : Done\",\n [],\n ProcessAndInvoice::DOMAIN_NAME\n )\n ], $errorMessage ? 500 : 200);\n }", "function woocommerce_pip_send_email( $order_id ) {\n\tif ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) {\n\t\t// Build email information\n\t\t$order = new WC_Order( $order_id );\n\t\t$to = $order->billing_email;\n\t\t$subject = __( 'Order invoice', 'woocommerce-pip' );\n\t\t$subject = '[' . get_bloginfo('name') . '] ' . $subject;\n\t\t$attachments = '';\n\n\t\t// Read the file\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'email-template.php' ) . 'email-template.php';\n\t\t$message = ob_get_clean();\n\n\t\t // Send the mail\n\t\twc_mail( $to, $subject, $message, $headers = \"Content-Type: text/html\\r\\n\", $attachments );\n\t}\n}", "function updateInvoicePaymentView() {\n $invPage = $_SESSION['PAYMENT_HISTORY_INV_CONTROLLER'];\n $invPage->doViewReloadTable($_POST['include_acknowledged'] == 'true');\n echo $invPage->toHtml();\n }", "public function getProcessButton(Orders $order, Request $request);", "#[Route('/customs-invoice/{orderId}', name: 'customers_invoice')]\n public function getCustomsInvoiceAction($orderId): Response\n {\n if (null !== OrderQuery::create()->findOneById($orderId))\n {\n if ($label = ColissimoLabelQuery::create()->findOneByOrderId($orderId)) {\n $fileName = ColissimoLabel::getLabelCN23Path($label->getOrderRef().'CN23', 'pdf');\n\n return new Response(\n file_get_contents($fileName),\n 200,\n [\n 'Content-Type' => 'application/pdf',\n 'Content-disposition' => 'Attachement;filename='.basename($fileName),\n ]\n );\n }\n }\n\n return $this->generateRedirect(URL::getInstance()->absoluteUrl('/admin/module/ColissimoLabel/labels'));\n }", "public function woo_pdf_metabox_content()\n {\n global $post;\n\n if (!$post) {\n return;\n }\n\n $order = new WC_Order($post->ID);\n\n if (!$order) {\n return;\n }\n\n $invoice = $this->get_invoice($post->ID);\n\n echo '<table class=\"form-table\">';\n\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled']) {\n\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n $delete_url = home_url('/?wpd_delete_invoice='.$download_code.'&order_id='.$post->ID);\n\n ?>\n <tr>\n <td>\n <a class=\"button tips\" href=\"<?php echo $download_url; ?>\" data-tip=\"<?php _e('Download regular invoice', 'woo_pdf'); ?>\"><?php _e('Invoice', 'woo_pdf'); ?></a>\n <?php if ($this->opt['woo_pdf_allow_delete']): ?>\n <a class=\"button tips\" href=\"<?php echo $delete_url; ?>\" data-tip=\"<?php _e('Delete invoice so you can regenerate it if needed', 'woo_pdf'); ?>\"><?php _e('Delete Invoice', 'woo_pdf'); ?></a>\n <?php endif; ?>\n </td>\n </tr>\n <?php\n }\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && ($order->status != 'completed' || $this->opt['woo_pdf_enabled'])) {\n\n $download_url = home_url('/?wpd_proforma='.$post->ID);\n $generate_url = home_url('/?wpd_generate_invoice='.$post->ID);\n\n ?>\n <tr>\n <td>\n <?php if ($order->status != 'completed'): ?>\n <a class=\"button tips\" href=\"<?php echo $download_url; ?>\" data-tip=\"<?php _e('Download proforma invoice', 'woo_pdf'); ?>\"><?php _e('Proforma', 'woo_pdf'); ?></a>\n <?php endif; ?>\n <?php if ($this->opt['woo_pdf_enabled']): ?>\n <a class=\"button tips\" href=\"<?php echo $generate_url; ?>\" data-tip=\"<?php _e('Manually generate regular invoice', 'woo_pdf'); ?>\"><?php _e('Generate Invoice', 'woo_pdf'); ?></a>\n <?php endif; ?>\n </td>\n </tr>\n <?php\n }\n else if ($this->opt['woo_pdf_enabled']) {\n\n $generate_url = home_url('/?wpd_generate_invoice='.$post->ID);\n\n ?>\n <tr>\n <td>\n <a class=\"button tips\" href=\"<?php echo $generate_url; ?>\" data-tip=\"<?php _e('Manually generate regular invoice', 'woo_pdf'); ?>\"><?php _e('Generate Invoice', 'woo_pdf'); ?></a>\n </td>\n </tr>\n <?php\n }\n\n echo '</table>';\n }", "function salesInvoicesGridAction() {\n\t\t\t$this->_initWarehouse( );\n\t\t\t$this->_gridAction( 'sales_invoice', true );\n\t\t}", "public function invoice($id = '', $vendor_id = '')\n\t{\n\t\t$this->set_page_title(_l('invoice'));\n\t\t$data['order'] = $this->orders->get($id);\n\t\t$data['order_items'] = $this->orders->get_items($id, $vendor_id);\n\t\t$this->template->load('index', 'content', 'orders/invoice', $data);\n\t}", "function woocommerce_account_view_order($order_id)\n {\n }", "function woocommerce_pip_create_box_content() {\n\n\tglobal $post_id;\n\n\t?>\n\t<table class=\"form-table\">\n\t\t<?php if ( get_post_meta( $post_id, '_pip_invoice_number', true ) ) { ?>\n\t\t<tr>\n\t\t\t<td><?php _e( 'Invoice: #', 'woocommerce-pip' ); echo get_post_meta( $post_id, '_pip_invoice_number', true ); ?></td>\n\t\t</tr>\n\t\t<?php } ?>\n\t\t<tr>\n\t\t\t<td><a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_invoice' ), 'print-pip' ); ?>\"><?php _e('Print Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_packing' ), 'print-pip' ); ?>\"><?php _e( 'Print Packing List', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { ?>\n\t\t\t\t<a class=\"button pip-email\" href=\"<?php echo wp_nonce_url( admin_url( '?email_pip=true&post=' . $post_id ), 'email-pip' ); ?>\"><?php _e( 'Send Email Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php } ?>\n\t\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php\n}", "public function executeExportInvoices()\n {\n global $wpdb;\n $delimiter = $this->getParameter( 'export_invoices_delimiter', ',' );\n\n header( 'Content-Type: text/csv; charset=utf-8' );\n header( 'Content-Disposition: attachment; filename=invoices.csv' );\n\n $titles = array(\n 'name' => \\Bookly\\Lib\\Utils\\Common::getTranslatedOption( 'bookly_l10n_label_name' ),\n 'wp_user' => __( 'User', 'bookly' ),\n 'phone' => \\Bookly\\Lib\\Utils\\Common::getTranslatedOption( 'bookly_l10n_label_phone' ),\n 'email' => \\Bookly\\Lib\\Utils\\Common::getTranslatedOption( 'bookly_l10n_label_email' ),\n 'notes' => __( 'Notes', 'bookly' ),\n 'last_appointment' => __( 'Last appointment', 'bookly' ),\n 'total_appointments' => __( 'Total appointments', 'bookly' ),\n 'payments' => __( 'Payments', 'bookly' ),\n 'birthday' => __( 'Date of birth', 'bookly' ),\n );\n $header = array();\n $column = array();\n\n foreach ( $this->getParameter( 'exp' ) as $key => $value ) {\n $header[] = $titles[ $key ];\n $column[] = $key;\n }\n\n $output = fopen( 'php://output', 'w' );\n fwrite( $output, pack( 'CCC', 0xef, 0xbb, 0xbf ) );\n fputcsv( $output, $header, $delimiter );\n\n $rows = Lib\\Entities\\Invoice::query( 'c' )\n ->select( 'c.*, MAX(a.start_date) AS last_appointment,\n COUNT(a.id) AS total_appointments,\n COALESCE(SUM(p.total),0) AS payments,\n wpu.display_name AS wp_user' )\n ->leftJoin( 'invoiceAppointment', 'ca', 'ca.invoice_id = c.id' )\n ->leftJoin( 'Appointment', 'a', 'a.id = ca.appointment_id' )\n ->leftJoin( 'Payment', 'p', 'p.id = ca.payment_id' )\n ->tableJoin( $wpdb->users, 'wpu', 'wpu.ID = c.wp_user_id' )\n ->groupBy( 'c.id' )\n ->fetchArray();\n\n foreach ( $rows as $row ) {\n $row_data = array_fill( 0, count( $column ), '' );\n foreach ( $row as $key => $value ) {\n $pos = array_search( $key, $column );\n if ( $pos !== false ) {\n $row_data[ $pos ] = $value;\n }\n }\n fputcsv( $output, $row_data, $delimiter );\n }\n\n fclose( $output );\n\n exit;\n }", "public static function get_order_preview_actions_html($order)\n {\n }", "function add_order_email_instructions( $order ) {\n echo \"<p>Desde ahora puedes ver el estado y toda la documentación de tu pedido en nuestra <a href=\\\"https://agrupab.com/escritorio\\\">Area de Clientes</a></p>\";\n}", "public function __construct() {\n add_action( 'woocommerce_checkout_create_order_line_item', [ $this, 'order_item_meta' ], 10, 3 );\n add_action( 'woocommerce_order_status_changed', [ $this, 'order_status_changed' ], 10, 4 );\n\n if ( is_admin() ) {\n add_action( 'woocommerce_before_order_itemmeta', [ $this, 'render_order_item_warranty' ], 10, 3 );\n add_action( 'woocommerce_order_item_meta_end', [ $this, 'render_order_item_warranty' ], 10, 3 );\n }\n\n // My account page custom rewrite for order\n add_action( 'init', [ $this, 'rewrite_endpoint' ] );\n add_filter( 'query_vars', [ $this, 'add_query_vars' ] );\n add_filter( 'the_title', [ $this, 'endpoint_title' ] );\n add_filter( 'woocommerce_account_menu_items', [ $this, 'dokan_rma_requests_link' ], 50 );\n add_action( 'woocommerce_account_request-warranty_endpoint', [ $this, 'content_request_warranty' ] );\n add_action( 'woocommerce_account_rma-requests_endpoint', [ $this, 'content_rma_requests' ] );\n add_action( 'woocommerce_account_view-rma-requests_endpoint', [ $this, 'content_rma_requests_view' ] );\n\n // My order list table actions\n add_filter( 'woocommerce_my_account_my_orders_actions', [ $this, 'request_button' ], 10, 2 );\n add_filter( 'dokan_my_account_my_sub_orders_actions', [ $this, 'request_button' ], 10, 2 );\n }", "public function view($order_id = 0)\n\t{ \n\t\t \n\t\tif($order_id > 0){\t\n\t\t\t$data['menutitle'] = 'Invoices';\n\t\t $data['pagetitle'] = 'Add Invoice';\n\t\t\t$data['bredcrumbs'] = '<ul class=\"page-breadcrumb\"><li> <i class=\"fa fa-home\"></i> <a href=\"'.base_url().'index_con\">Home</a> <i class=\"fa fa-angle-right\"></i> </li><li> <i class=\"fa fa-home\"></i> <a href=\"'.base_url().'orders\">Manage Orders</a> <i class=\"fa fa-angle-right\"></i> </li><li>View Order</li></ul>';\n\t\t\t// get the order details and order products\n\t\t\t$orderDetails = $this->orders_model->getOrderDetails($order_id);\n\t\t\t$orderProducts = $this->orders_model->getOrderProducts($order_id);\n\t\t\t$data['orderDetails'] = $orderDetails;\t\n\t\t\t$data['orderProducts'] = $orderProducts;\t\n\t\t\t//echo '<pre>'; print_r($data); die();\n\t\t\tif($data != false)\n\t\t\t{\n\t\t\t\t$this->template\n\t\t\t\t\t ->set_layout('admin_default')\n\t\t \t \t ->build('orders/view_order',$data);\n\t\t\t\t\t\n\t\t\t}\n\t\t}else {\n\t\t\t\tredirect('orders');\n\t\t}\t\t\t\n\t}", "function kleo_woo_orders_screen_content() {\n\t\techo '<div class=\"woocommerce\">';\n\t\twc_get_template( 'myaccount/my-orders.php', array( 'order_count' => 'all' ) );\n\t\techo '</div>';\n\t}", "function kleo_woo_orders_screen() {\n\t\tadd_action( 'bp_template_content', 'kleo_woo_orders_screen_content' );\n\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}", "public function btnOrder(){\n return '<i class=\"orderList fa fa-arrows\"></i>';\n }", "public function adminOrderAccess() {\n global $purchlogitem;\n\n if ($purchlogitem->extrainfo->gateway == 'wpevelocity_cc' && $purchlogitem->extrainfo->processed != 7) {\n echo '<a href=\"options-general.php?page=wpevelocity-refund&id=' \n . base64_encode(json_encode($purchlogitem)) . '\"><img src=\"' \n . plugins_url(\"assets/images/return.png\", __FILE__) \n . '\" style=\"width:20px; height:20px;margin-right:10px;\" />Velocity Online Refund</a>';\n } else if ($purchlogitem->extrainfo->gateway == 'wpevelocity_cc' && $purchlogitem->extrainfo->processed == 7) {\n echo '<span style=\"opacity:.5;pointer-events: none;\"><img src=\"' \n . plugins_url(\"assets/images/return.png\", __FILE__) \n . '\" style=\"width:20px; height:20px;margin-right:10px;\" />Velocity Online Refund</span>';\n }\n }", "public function getInvoices()\n {\n $id = @$this->request->get['id'];\n $item = @$this->model_addon_invoices->getItem($id);\n $item['statustext'] = $this->document->invoicesstatus[$item['status']];\n @$this->data['output'] = json_encode($item);\n\n @$this->id=\"item\";\n @$this->template=\"common/output.tpl\";\n @$this->render();\n }", "public function receipt_page($order)\n {\n echo $this->generate_form($order);\n }", "public function invoice($invoice_id) {\n\n\t\treturn view('hotelmanager.tripInvoice');\n\t}", "public function autoInvoice($observer)\n {\n return;\n\n Mage::log(\"Winvoice | AutoInvoice trigger for order\".$observer->getEvent()->getOrder(), null, 'winvoice.log', true);\n\n\n $order = $observer->getEvent()->getShipment()->getOrder();\n\n $invoice = $order->prepareInvoice();\n $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);\n $invoice->register();\n $invoice->getOrder()->setCustomerNoteNotify(true);\n $invoice->getOrder()->setIsInProcess(true);\n\n $order->addStatusHistoryComment('AutoInvoice by Winvoice.', false);\n\n $transactionSave = Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder());\n\n $transactionSave->save();\n\n $invoice->sendEmail(true, \"Factura enviada ao cliente\");\n }", "function acknowledge_invoice_payment() {\n $invPage = $_SESSION['PAYMENT_HISTORY_INV_CONTROLLER'];\n $invPage->acknowledgeInvoice($_POST['invoice_id']);\n }", "public function hookInvoice($params) {\n global $smarty;\n\n $id_order = $params['id_order'];\n\n $bitcoinpaymentdetails = $this->readBitcoinpaymentdetails($id_order);\n\n if($bitcoinpaymentdetails['invoice_id'] === 0)\n {\n return;\n }\n\n $smarty->assign(array(\n 'btcpayurl' => $this->btcpayurl,\n 'invoice_id' => $bitcoinpaymentdetails['invoice_id'],\n 'status' => $bitcoinpaymentdetails['status'],\n 'id_order' => $id_order,\n 'this_page' => $_SERVER['REQUEST_URI'],\n 'this_path' => $this->_path,\n 'this_path_ssl' => Configuration::get('PS_FO_PROTOCOL').$_SERVER['HTTP_HOST'].__PS_BASE_URI__.\"modules/{$this->name}/\"\n ));\n return $this->display(__FILE__, 'invoice_block.tpl');\n }", "public function invoice(int $sales_order_id)\n {\n return view('admin.sales_order.invoice', ['invoice_data' => $this->invoiceService->getDataForInvoice($sales_order_id)]);\n }", "function hook_uc_invoice_templates() {\n return array('admin', 'customer');\n}", "public function makeInvoice();", "public function getOrderInvoice(OrderEntity $order);", "public function setAllOrdersInvoiced() {\n $orders = OrderQuery::create()->find();\n\n foreach ($orders as $order) {\n $invoiced = PdfInvoiceQuery::create()\n ->filterById($order->getId())\n ->findOne()\n ;\n\n if (null === $invoiced) {\n $invoiced = new PdfInvoice();\n }\n\n $invoiced->setOrderId($order->getId())\n ->setInvoiced(1)\n ->save()\n ;\n\n }\n\n return new RedirectResponse(\n URL::getInstance()->absoluteUrl(\"/admin/module/ProcessAndInvoice\")\n );\n }", "public function receipt_page($order_id) {\n\t\n\t\t\tif($this->testmode == 'yes') {\n\t\t\t\t$omni_address = $this->testurl . '?';\n\t\t\t\t$secretKey = $this->testkey;\n\t\t\t} else {\n\t\t\t\t$omni_address = $this->liveurl . '?';\n\t\t\t\t$secretKey = $this->secretkey;\n\t\t\t}\n\t\n\t\t\t$submethod = get_post_meta($order_id, 'Payment Submethod', 1);\n\t\t\tif(!is_numeric($submethod) && ($submethod < 1 || $submethod > 6)) {\n\t\t\t\t$submethod = 0;\n\t\t\t}\n\n\t\t\t$omniArgs = $this->order_args($order_id, $submethod);\n\t\t\t$omniData = '';\n\t\t\tforeach($omniArgs as $k => $v) {\n\t\t\t\t$v = str_replace('|', '', $v);\n\t\t\t\t$omniData .= (empty($omniData) ? '' : '|') . ($k . '=' . $v);\n\t\t\t}\n\n\t\t\t$omniSeal = hash('sha256', utf8_encode($omniData . $secretKey));;\n\n\t\t\tif($this->debugger == 'yes') $this->log->add('omnicard', 'Redirecting to PSP gateway');\n\n\t\t\twc_enqueue_js('\n\t\t\t\tjQuery.blockUI({\n\t\t\t\t\tmessage: \"' . esc_js(__('Thank you for your order. We are now redirecting you to Rabobank OmniKassa to make payment.', 'omnicard-lite')) . '\",\n\t\t\t\t\tbaseZ: 99999,\n\t\t\t\t\toverlayCSS:\t{ background: \"#000\", opacity: 0.6 },\n\t\t\t\t\tcss: { padding: \"20px\", zindex: \"9999\", textAlign: \"center\", color: \"#555\", border: \"3px solid #aaa\", backgroundColor: \"#fff\", cursor: \"wait\", lineHeight: \"32px\" }\n\t\t\t\t});\n\t\t\t\tjQuery(\"#submit_omnicard_payment_form\").click();\n\t\t\t');\n\t\n\t\t\techo '<h3>'.__('Please click the button below to complete your purchase.', 'omnicard-lite').'</h3>';\n\t\t\techo '<form action=\"'.esc_url($omni_address).'\" method=\"post\" id=\"omnicard_payment_form\" target=\"_top\">';\n\t\t\techo '<input type=\"hidden\" name=\"InterfaceVersion\" value=\"'.esc_attr(htmlspecialchars($this->interface_version)).'\" />';\n\t\t\techo '<input type=\"hidden\" name=\"Data\" value=\"'.esc_attr(htmlspecialchars($omniData)).'\" />';\n\t\t\techo '<input type=\"hidden\" name=\"Seal\" value=\"'.esc_attr(htmlspecialchars($omniSeal)).'\" />';\n\t\t\techo '<input type=\"submit\" class=\"button-alt\" id=\"submit_omnicard_payment_form\" value=\"'.__('Continue', 'omnicard-lite').'\" />';\n\t\t\techo '</form>';\n\t\t\tunset($secretKey, $omniData, $omniSeal, $omniArgs, $order_id);\n\t\t}", "function theme_orders_page() {\n if(isset($_GET['action']) and $_GET['action'] == 'view-detail'){\n require_once 'class-orders-detail-list-table.php';\n\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Chi tiết đơn hàng</h2>\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPOrders_Detail_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</div>';\n }else{\n require_once 'class-orders-list-table.php';\n \n $product_id = 0;\n if(isset($_REQUEST['product_id']) and intval($_REQUEST['product_id']) > 0){\n $product_id = intval($_REQUEST['product_id']);\n }\n\n $btn2Excel = '<a class=\"button\" href=\"' . get_template_directory_uri() . '/export2excel.php'. (($product_id > 0) ? '?product_id=' . $product_id : '') .'\">Xuất ra Excel</a>';\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Danh sách đơn hàng $btn2Excel</h2>\n <ul class=\"subsubsub\">\nHTML;\n echo '<li><a class=\"', (!isset($_GET['status'])) ? 'current' : '' ,'\" href=\"?page=nvt_orders', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Chờ duyệt</a> | </li>';\n //echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == \"0\") ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=0', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Chờ duyệt</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == 1) ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=1', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Đã duyệt</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == 2) ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=2', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Đã hủy</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == \"all\") ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=all', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Tất cả</a></li>';\n echo <<<HTML\n </ul>\n <form action=\"\" method=\"get\">\n <input type=\"hidden\" name=\"page\" value=\"nvt_orders\" />\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPOrders_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</form></div>';\n }\n}", "function action_woocommerce_thankyou( $order_id ) { \n \n}", "public function multiOrderProcess() {\n $errorMessage = $this->checkDirectory();\n\n /** Make sure method was called by AJAX */\n if(!$this->getRequest()->isXmlHttpRequest()) {\n return $this->generateRedirectFromRoute('admin.order.list');\n }\n\n $request = $this->getRequest()->request;\n\n $turn = (int)$request->get('turn');\n $orders = $request->get('orders');\n $offset = 10 * $turn;\n $limit = $offset + 10;\n\n $htmltopdf = new Html2Pdf('P', 'A4', 'fr');\n\n while ($offset < $limit && $offset < count($orders)) {\n $htmlInvoice = $this->returnHTMLInvoice($orders[$offset], 'invoice');\n $htmltopdf->writeHTML($htmlInvoice);\n\n $invoiced = PdfInvoiceQuery::create()->filterByOrderId($orders[$offset]);\n $invoiced\n ->findOneOrCreate()\n ->setOrderId($orders[$offset])\n ->setInvoiced(1)\n ->save();\n\n $offset++;\n }\n\n $currentUserId = $this->getSecurityContext()->getAdminUser()->getId();\n\n $fileName = THELIA_LOCAL_DIR . 'invoices/' . $currentUserId . '/ordersInvoice_' . $turn . '.pdf';\n $htmltopdf->output($fileName, 'F');\n\n /** JsonResponse for the AJAX call */\n return new JsonResponse([\n \"status\" => $errorMessage ? 'error' : 'success',\n \"message\" => $errorMessage ? $errorMessage : $this->getTranslator()->trans(\n \"Part $turn of invoicing : Done\",\n [],\n ProcessAndInvoice::DOMAIN_NAME\n )\n ], $errorMessage ? 500 : 200);\n }", "public function confirmed_orders()\n\t{\n\t\t$confirmed_inquiries = $this->inquiry_m->get_confirmed_inquiries();\n\n\t//RENDER VIEW\n\t\t$this->template\n\t\t->append_css('module::style.css', 'dashboard')\n\t\t->append_css('module::buttons.css', 'dashboard')\n\t\t->append_css('module::blue_tablesorter_style.css', 'dashboard')\n\t\t->append_js('module::jquery.tablesorter.min.js', 'dashboard')\n\t\t->title('Confirmed Orders')\n\t\t->set('confirmed_inquiries', $confirmed_inquiries)\n\t\t->build('confirmed_orders');\n\t}", "public function order_preview_template()\n {\n }", "public function ordersAction()\n {\n \t// Change maximum execution time \n set_time_limit(0);\n \n echo Ireus_Controller_Export::getInstance()\n ->setOrderColumns($this->_ordersColumns)\n ->exportOrdersCsv(Mage::getModel('Sales/Order_Item')->getCollection()->getData());\n\n exit;\n }", "protected function _createInvoice()\n {\n if (!$this->_order->canInvoice()) {\n return;\n }\n $invoice = $this->_order->prepareInvoice();\n $invoice->register()->capture();\n $this->_order->addRelatedObject($invoice);\n }", "public function showInvoiceFormAction() {\n //$this->get('app.pdf')->fill();\n return $this->render('hourly_invoice_form.html.twig');\n }", "public function orderView(OrderInterface $order);", "public static function output_storefront_button()\n {\n }", "function mje_render_order_button($mjob_post, $text = '') {\n\t$disable_class = 'mjob-order-action';\n\tif (in_array($mjob_post->post_status, array('pause', 'pending', 'draft', 'reject', 'archive'))) {\n\t\t$disable_class = 'mjob-order-disable';\n\t}\n\t$text = !empty($text) ? $text : __('ORDER NOW', 'enginethemes');\n\t$price_mjob = mje_shorten_price(mje_get_price_after_commission_for_buyer($mjob_post->et_budget));\n\t?>\n <button class=\"<?php mje_button_classes(array('btn-order', 'waves-effect', 'waves-light'))?> <?php echo $disable_class; ?>\" >\n <?php echo sprintf(__('%s (<span class=\"mjob-price mje-price-text\">%s</span>)', 'enginethemes'), $text, $price_mjob); ?>\n </button>\n <?php\n}", "public function woo_vou_display_order_info_html( $order_id, $type='html' ){\r\r\n\t\t\r\r\n\t\t$order_details_html\t= '';\r\r\n\t\t\r\r\n\t\t//get order\r\r\n\t\t$order \t\t\t= new Wc_Order( $order_id );\r\r\n\t\t\r\r\n\t\t//get order date\r\r\n\t\t$order_date\t\t= $order->order_date;\t\t\r\r\n\t\t$order_date \t= !empty( $order_date ) ? $this->woo_vou_get_date_format( $order_date, true ) : '';\r\r\n\t\t\r\r\n\t\t//get payment method\r\r\n\t\t$payment_method\t= $order->payment_method_title;\r\r\n\t\t\r\r\n\t\t//Order title\r\r\n\t\t$order_total = esc_html( strip_tags( $order->get_formatted_order_total() ) );\r\r\n\t\t\r\r\n\t\t//Order discount\r\r\n\t\t$order_discount = wc_price( $order->get_total_discount(), array( 'currency' => $order->get_order_currency() ) );\r\r\n\t\t\r\r\n\t\tif($type=='html')\r\r\n\t\t\t$order_id_url = '<a href=\"'.esc_url( admin_url( 'post.php?post=' . absint( $order_id ) . '&action=edit' ) ).'\">' . $order_id . '</a>';\r\r\n\t\tif($type=='pdf')\r\r\n\t\t\t$order_id_url = $order_id;\r\r\n\t\t\r\r\n\t\tif( $type == 'csv' ) {\r\r\n\t\t\t\r\r\n\t\t\t$order_details_html .= 'ID : '.$order_id.\"\\n\";\r\r\n\t\t\t$order_details_html .= 'Order Date : '.$order_date.\"\\n\";\r\r\n\t\t\t$order_details_html .= 'Payment Method : '.$payment_method.\"\\n\";\r\r\n\t\t\t$order_details_html .= 'Order Total : \t'.$order_total.\"\\n\";\r\r\n\t\t\t$order_details_html .= 'Order Discount :'.strip_tags($order_discount);\r\r\n\t\t} else {\t\r\r\n\t\t\t\r\r\n\t\t\t$order_details_html .= '<table>';\r\r\n\t\t\t$order_details_html .= '<tr><td style=\"font-weight:bold;\">'.__( 'ID:', 'woovoucher' ).'</td><td>'.$order_id_url.'</td></tr>';\r\r\n\t\t\t$order_details_html .= '<tr><td style=\"font-weight:bold;\">'.__( 'Order Date:', 'woovoucher' ).'</td><td>'.$order_date.'</td></tr>';\r\r\n\t\t\t$order_details_html .= '<tr><td style=\"font-weight:bold;\">'.__( 'Payment Method:', 'woovoucher' ).'</td><td>'.$payment_method.'</td></tr>';\r\r\n\t\t\t$order_details_html .= '<tr><td style=\"font-weight:bold;\">'.__( 'Order Total:', 'woovoucher' ).'</td><td>'.$order_total.'</td></tr>';\r\r\n\t\t\t$order_details_html .= '<tr><td style=\"font-weight:bold;\">'.__( 'Order Discount:', 'woovoucher' ).'</td><td>'.$order_discount.'</td></tr>';\r\r\n\t\t\t$order_details_html .= '</table>';\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\treturn apply_filters( 'woo_vou_display_order_info_html', $order_details_html, $order_id, $type );\r\r\n\t}", "function showorder($request) {\r\n\t\tif(isset($_REQUEST[\"print\"])) {\r\n\t\t\tRequirements::clear();\r\n\t\t\tRequirements::themedCSS(\"typography\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"OrderReport\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"Order_Invoice\", \"print\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\treturn $this->renderWith(\"Invoice\");\r\n\t\t}\r\n\t\telseif(isset($_REQUEST[\"packingslip\"])) {\r\n\t\t\tRequirements::clear();\r\n\t\t\tRequirements::themedCSS(\"typography\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"OrderReport\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"Order_PackingSlip\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\treturn $this->renderWith(\"PackingSlip\");\r\n\t\t}\r\n\t\treturn array();\r\n\t}", "function cmdeals_pay_for_order_customer_notification( $the_order ) {\n\t\n\tglobal $order_id, $order, $email_heading;\n\t\n\t$order = $the_order;\n\t$order_id = $order->id;\n\t\n\t$email_heading = sprintf(__('Invoice for Order #%s', 'cmdeals'), $order_id);\n\n\t$subject = sprintf(__('[%s] Pay for Order', 'cmdeals'), get_bloginfo('name'));\n\n\t// Buffer\n\tob_start();\n\t\n\t// Get mail template\n\tcmdeals_get_template('emails/customer_pay_for_order.php', false);\n\t\n\t// Get contents\n\t$message = ob_get_clean();\n\n\t// Send the mail\t\n\tcmdeals_mail( $order->user_email, $subject, $message );\n}", "function woocommerce_pip_invoice_number( $order_id ) {\n\n\t$invoice_number = get_option( 'woocommerce_pip_invoice_start', 1 );\n\n\tif ( add_post_meta( $order_id, '_pip_invoice_number', get_option( 'woocommerce_pip_invoice_prefix' ) . $invoice_number . get_option( 'woocommerce_pip_invoice_suffix' ), true) ) {\n\n\t\tupdate_option( 'woocommerce_pip_invoice_start', $invoice_number + 1 );\n\n\t}\n\n\treturn get_post_meta( $order_id, '_pip_invoice_number', true );\n}", "function wpdocs_my_display_callback( $post ) {\n echo ajaxApi::getOrderCartHtml($post->ID);\n}", "function it_exchange_easy_eu_vat_set_checkout_mode_on_invoice_page() {\n\n\t$product_id = it_exchange_get_the_product_id();\n\n\tif ( it_exchange_get_product_type( $product_id ) !== 'invoices-product-type' ) {\n\t\treturn;\n\t}\n\n\techo '<script> var ITExchangeEasyValueAddedTaxesCheckoutPage = true;</script>';\n}", "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t$orders = explode( ',', $_GET['post'] );\n\t\t$action = $_GET['type'];\n\t\t$number_of_orders = count( $orders );\n\t\t$order_loop = 0;\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\t// Loop through all orders (bulk printing).\n\t\tforeach ( $orders as $order_id ) {\n\t\t\t$order_loop++;\n\t\t\t$order = new WC_Order( $order_id );\n\t\t\tob_start();\n\t\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t\t$content .= ob_get_clean();\n\t\t\tif ( $number_of_orders > 1 && $order_loop < $number_of_orders ) {\n\t\t\t\t$content .= '<p class=\"pagebreak\"></p>';\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "public function add_po_file_to_pip( $type, $action, $document, $order ) {\n if ( 'invoice' != $type ) {\n return;\n }\n\n $payment_method = version_compare( WC_VERSION, '3.0', '<' ) ? $order->payment_method : $order->get_payment_method();\n $order_id = version_compare( WC_VERSION, '3.0', '<' ) ? $order->id : $order->get_id();\n\n if ( 'woocommerce_gateway_purchase_order' === $payment_method ) {\n $po_file = get_post_meta( $order_id, '_po_file', true );\n printf( '<div class=\"purchase-order-number\">' . __( '<strong>Purchase order file:</strong> %s', 'woocommerce-gateway-purchase-order' ) . '</div>', '<strong>', '</strong>', $po_file );\n /* translators: Placeholder: %1$s - opening <strong> tag, %2$s - coupons count (used in order), %3$s - closing </strong> tag - %4$s - coupons list */\n printf( '<div class=\"purchase-order-file\">' . __( '%1$sPurchase order filer:%2$s %3$s', 'woocommerce-gateway-purchase-order' ) . '</div>', '<strong>', '</strong>', $po_file );\n }\n }", "public function invoiceprint(){\n $data['thispage']=\"72\";\n $data['title']=\"Invoices Print || WishingMart\";\n\n $url_invoice_view=base_api_url().\"dashboard/invoiceview/iid/\".$this->uri->segment(3).base_api_key();\n $data['invoice_view'] = self::getapi($url_invoice_view);\n //print_r($data['invoice_list']);exit();\n\n $this->load->view('dashboard/invoiceprint_view', $data);\n }", "function view ()\n {\n $this->tran = get_customer_trans($this->tran_no, ST_SALESINVOICE);\n $this->tran_branch = get_branch($this->tran[\"branch_code\"]);\n \n \n box_start(sprintf(_(\"SALES INVOICE #%d\"), $this->tran_no));\n \n $this->info();\n echo \"<hr>\";\n $this->tran_header();\n \n box_start(\"Invoice Items\");\n $this->items();\n \n $voided = is_voided_display(ST_SALESINVOICE, $this->tran_no, \n _(\"This invoice has been voided.\"));\n \n if (! $voided) {\n display_allocations_to(PT_CUSTOMER, $this->tran['debtor_no'], \n ST_SALESINVOICE, $this->tran_no, $this->tran['Total']);\n }\n box_end();\n }", "function woocommerce_account_orders($current_page)\n {\n }", "public function track_orders_view()\n {\n }", "public function invoice($first_name, $last_name, $email, $shipping_amount, $prorow, $order_no, $payment_status, $total,$address_1,$address_2,$pincode,$city,$state,$pay_mode,$discount)\n {\n $amount_paid = $total+$shipping_amount;\n $tablehead = '<table border=\"1\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Product Name</th>\n\t\t\t<th>Product Quantity</th>\n\t\t\t<th>Gross Amount</th>\n\t\t\t<th>Product Color</th>\n\t\t\t<th>Product Size</th>\n <th>Product Discount</th>\n <th>Total Amount</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>';\n $tbalefooter = '</tbody>\n\t<tfoot>\n \n\t\t<tr>\n\t\t\t<td colspan=\"6\">Shipping Charge:-</td>\n\t\t\t<td>'.$shipping_amount.'</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"6\">Amount to paid:-</td>\n\t\t\t<td>'.$amount_paid.'</td>\n\t\t</tr>\n\t</tfoot>\n</table>';\n $prorows = $tablehead.implode('<br/>', $prorow).$tbalefooter;\n \n //echo $prorows;\n //pr($prorow);\n //exit;\n $from = \"info@pepealoans.com\";\n $to = $email;\n $email_template = EmailTemplate::where('slug', '=', 'order-invoice')->first();\n $email_type = $email_template->email_type;\n $subject = $email_template->subject;\n $body = $email_template->body;\n $to = $email;\n \n $body = str_replace(array(\n '{FIRST_NAME}',\n '{LAST_NAME}',\n '{SHIPPING_CHARGE}',\n '{PRO_ROWS}',\n '{ORDER_NO}',\n '{TOTAL}',\n '{PAYMENT_MOD}',\n '{PAYMENT_STATUS}',\n '{ADDRESS}',\n '{PINCODE}',\n '{CITY}',\n '{STATE}',\n ), array(\n ucfirst($first_name),\n ucfirst($last_name),\n $shipping_amount,\n $prorows,\n $order_no,\n $total,\n $pay_mode,\n $payment_status,\n $address_1.', '.$address_2,\n $pincode,\n $city,\n $state\n ), $body);\n $subject = str_replace(array(\n '{FIRST_NAME}',\n '{LAST_NAME}',\n '{SHIPPING_CHARGE}',\n '{PRO_ROWS}',\n '{ORDER_NO}',\n '{TOTAL}',\n '{PAYMENT_MOD}',\n '{PAYMENT_STATUS}',\n '{ADDRESS}',\n '{PINCODE}',\n '{CITY}',\n '{STATE}',\n ), array(\n ucfirst($first_name),\n ucfirst($last_name),\n $shipping_amount,\n $prorows,\n $order_no,\n $total,\n $pay_mode,\n $payment_status,\n $address_1.', '.$address_2,\n $pincode,\n $city,\n $state\n ), $subject);\n//pr($body);exit;\n EmailHelper::sendMail($to, $from, '', $subject, 'default', $body, $email_type);\n}", "function woocommerce_pip_page() {\n\n\t//Check the user capabilities\n\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce-pip' ) );\n\t}\n\t//Load needed WP resources for media uploader\n\twp_enqueue_media();\n\n\t//Save the field values\n\tif ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) {\n\t\tforeach ( $_POST as $key => $value ) {\n\t\t\tif ( $key == 'woocommerce_pip_invoice_start' && isset( $_POST['woocommerce_pip_reset_start'] ) ) {\n\t\t\t\tif ( $_POST['woocommerce_pip_reset_start'] == 'Yes' ) {\n\t\t\t\t\tupdate_option( $key, ltrim( $value, '0') );\n\t\t\t\t}\n\t\t\t} elseif ( $key == 'woocommerce_pip_reset_start' ) {\n\t\t\t} else {\n\t\t\t\tif ( get_option( $key ) != $value ) {\n\t\t\t\t\tupdate_option( $key, $value );\n\t\t\t\t} else {\n\t\t\t\t\tadd_option( $key, $value, '', 'no' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t?>\n\t<div class=\"wrap\">\n\t\t<div id=\"icon-options-general\" class=\"icon32\">\n\t\t\t<br />\n\t\t</div>\n\t\t<h2><?php _e( 'WooCommerce - Print invoice/packing list settings', 'woocommerce-pip' ); ?></h2>\n\t\t<?php if ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) { ?>\n\t\t<div id=\"message\" class=\"updated fade\"><p><strong><?php _e( 'Your settings have been saved.', 'woocommerce-pip' ); ?></strong></p></div>\n\t\t<?php } ?>\n\t\t<p><?php _e( 'Change settings for print invoice/packing list.', 'woocommerce-pip' ); ?></p>\n\t\t<div id=\"content\">\n\t\t\t <form method=\"post\" action=\"\" id=\"pip_settings\">\n\t\t\t\t<input type=\"hidden\" name=\"pip_fields_submitted\" value=\"submitted\">\n\t\t\t\t<div id=\"poststuff\">\n\t\t\t\t\t<div class=\"postbox\">\n\t\t\t\t\t\t<h3 class=\"hndle\"><?php _e( 'Settings', 'woocommerce-pip' ); ?></h3>\n\t\t\t\t\t\t<div class=\"inside pip-preview\">\n\t\t\t\t\t\t\t <table class=\"form-table\">\n\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_name\"><b><?php _e( 'Company name:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_company_name\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_company_name' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom company name for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_logo\"><b><?php _e( 'Custom logo:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input id=\"woocommerce_pip_logo\" type=\"text\" size=\"36\" name=\"woocommerce_pip_logo\" value=\"<?php echo get_option( 'woocommerce_pip_logo' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<input id=\"upload_image_button\" type=\"button\" value=\"<?php _e( 'Upload Image', 'woocommerce-pip' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom logo for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to use a custom logo.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_extra\"><b><?php _e( 'Company extra info:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_company_extra\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_company_extra' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Some extra info that is displayed under company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print the info.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_return_policy\"><b><?php _e( 'Returns Policy, Conditions, etc.:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_return_policy\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_return_policy' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Here you can add some policies, conditions etc. For example add a returns policy in case the client would like to send back some goods.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print any policy.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_footer\"><b><?php _e( 'Custom footer:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_footer\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_footer' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom footer for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a footer.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_start\"><b><?php _e( 'Invoice counter start:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"woocommerce_pip_reset_start\" name=\"woocommerce_pip_reset_start\" value=\"Yes\" /> <?php _e( 'Reset invoice numbering', 'woocommerce-pip' ); ?><br />\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" readonly=\"true\" id=\"woocommerce_pip_invoice_start\" name=\"woocommerce_pip_invoice_start\" class=\"regular-text\" value=\"<?php echo wp_kses_stripslashes( get_option( 'woocommerce_pip_invoice_start' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Reset the invoice counter to start your custom position for example 103. Leading zeros will be trimmed. Use prefix instead.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'You need to check the checkbox to actually reset the value.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_prefix\"><b><?php _e( 'Invoice numbering prefix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_prefix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_prefix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom prefix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_suffix\"><b><?php _e( 'Invoice numbering suffix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_suffix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_suffix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom suffix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Preview before printing:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_preview' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Send invoice as HTML email:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t <p class=\"submit\">\n\t\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', 'woocommerce-pip' ); ?>\" />\n\t\t\t </p>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<?php\n}", "public function process_order_meta_box_actions( $order ) {\n\n\t\t$order = new WC_Shipwire_Order( $order->id );\n\n\t\tif ( 'woocommerce_order_action_wc_shipwire_export_order' === current_filter() ) {\n\t\t\t$order->export();\n\t\t} else {\n\t\t\t$order->update_tracking();\n\t\t}\n\t}", "public function orders()\n\t{\n\t\t$vendor_id = $this->session->userdata('id');\n\t\t$vendor_info['orders'] = $this->vendor->get_orders($vendor_id);\n\t\t$this->load->view('vendor/partials/orders', $vendor_info);\n\t}", "public function process_export_orders( ){ \n\n\t\tif ( empty( $_GET[ 'orders_for_product' ] ) ) {\n\n\t\t\treturn __( 'You haven\\'t selected a product\\'s orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you\\'d like to view.', 'topgroupshops' );\n\t\t\n\t\t} else { \n\t\t\t$this->product_id = !empty( $_GET[ 'orders_for_product' ] ) ? (int) $_GET[ 'orders_for_product' ] : false;\n\t\t\t\n\t\t\t$products = array( $this->product_id );\n\n\t\t\t$_product = get_product( $this->product_id );\n\n\t\t\tif ( is_object( $_product ) ) { \n\n\t\t\t\t$children = $_product->get_children();\n\n\t\t\t\tif ( !empty( $children ) ) {\n\t\t\t\t\t$products = array_merge($products, $children);\n\t\t\t\t\t$products = array_unique($products);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t$this->orders = TGS_Queries::get_orders_for_products( $products, array( 'vendor_id' => get_current_user_id() ) );\n\t\t}\n\n\t\tif ( !$this->orders ) {\n\t\t\treturn __( 'No orders.', 'topgroupshops' );\n\t\t}\n\n\t\tif ( $this->can_export_csv && !empty( $_POST[ 'export_orders' ] ) ) {\n\t\t\t\t$this->download_csv();\n\t\t}\n\n\t}", "function PaidExampleHook($invoice) { \n include_once $GLOBALS['xoops']->path('/modules/xpayment/plugin/xpayment.php'); \n return PaidXpaymentHook($invoice); \n }", "function receipt_page($orderId) {\n $order = wc_get_order( $orderId );\n// echo \"<br /> RECEIPT PAGE: ORDER <br />\";\n// var_dump($order);\n// echo \"<br />\";\n \n echo '<p>' . __('Thank you - your order is now pending payment. You should be automatically redirected to Taurus Datafast Paycenter to make payment.', 'woo-payment-gateway-for-taurus-datafast') . '</p>';\n \n// $order->update_status('processing');\n// echo \"<br /> Done\";\n echo $this->generate_taurusdatafast_form($order); \n //check_transaction_status();\n }", "function edit_woocommerce_checkout_page($order){\r\n global $post_id;\r\n $order = new WC_Order( $post_id );\r\n echo '<p><strong>'.__('HCPID').':</strong> ' . get_post_meta($order->get_id(), 'hcpid', true ) . '</p>';\r\n}", "function woocommerce_pip_order_bulk_action() {\n\n\t$wp_list_table = _get_list_table( 'WP_Posts_List_Table' );\n\t$action = $wp_list_table->current_action();\n\n\tif ( $action == 'print_invoice' || $action=='print_packing' ) {\n\t\t$posts = '';\n\n\t\tforeach( $_REQUEST['post'] as $post_id ) {\n\t\t\tif ( empty( $posts ) ) {\n\t\t\t\t$posts = $post_id;\n\t\t\t} else {\n\t\t\t\t$posts .= ','.$post_id;\n\t\t\t}\n\t\t}\n\n\t\t$forward = wp_nonce_url( admin_url(), 'print-pip' );\n\t\t$forward = add_query_arg( array( 'print_pip' => 'true', 'post' => $posts, 'type' => $action ), $forward );\n\t\twp_redirect( $forward );\n\t\texit();\n\t}\n}", "function receipt_page( $order ){\n\t\t\tif ( 'yes' == $this->debug ) {\n\t\t\t\t$this->log->add( 'visanet', 'Mostrando pagina de recibo y generando formulario POST. ');\n\t\t\t}\n \techo '<p>' . __('Gracias por su compra, por favor haga click debajo para pagar en VisaNet.', 'woocommerce').'</p>';\n \techo $this->generate_visanet_form( $order );\n \t}", "function returnInvoice($orderID, $userID) {\n\tglobal $ss_config, $_SESSION, $menuvar;\n\t\n\t//see if the user is trying to view someone elses order\n\t\tif ($_SESSION['user_level'] == USER || $_SESSION['user_level'] == BANNED) {\n\t\t\t$sql = \"SELECT id FROM `\" . DBTABLEPREFIX . \"orders` WHERE id='$orderID' AND user_id='$userID'\";\n\t\t\t$result = mysql_query($sql);\n\t\t\t$authorized = mysql_num_rows($result);\n\t\t}\n\t\telse { $authorized = 1; } \n\t\t\n\t\tif ($authorized == 1) {\n\t\t\t$sql = \"SELECT * FROM `\" . DBTABLEPREFIX . \"orders` WHERE id='$orderID'\";\n\t\t\t$result = mysql_query($sql);\n\t\t\t\t\t\n\t\t\t$x = 1; //reset the variable we use for our row colors\t\n\t\t\t\t\t\n\t\t\t$page_content = \"\n\t\t\t\t\t\t\t<table class=\\\"contentBox\\\" cellpadding=\\\"1\\\" cellspacing=\\\"1\\\" width=\\\"100%\\\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title1\\\" colspan=\\\"6\\\">\" . $ss_config['ftsss_store_name'] . \" Invoice</td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t$ordersids = array();\n\t\t\tif (!$result || mysql_num_rows($result) == 0) { // No orders yet!\n\t\t\t\t$page_content .= \"\\n\t\t\t\t\t<tr class=\\\"greenRow\\\">\";\n\t\t\t\t$page_content .= \"\\n\t\t\t\t\t\t<td colspan=\\\"5\\\">Unable to pull order info.</td>\";\n\t\t\t\t$page_content .= \"\\n\t\t\t\t\t</tr>\";\t\n\t\t\t}\n\t\t\telse {\t // Print all our orders\t\t\t\t\t\t\t\t\n\t\t\t\twhile ($row = mysql_fetch_array($result)) {\n\t\t\t\t\t$processingType = ($row['rush_fee'] > 0) ? \"Rush Processing\" : \"Standard Processing\";\t\t\t\n\t\t\t\t\t$showDiscountColumn = showOrderDiscountColumn($orderID);\n\t\t\t\t\t$priceColSpan = ($showDiscountColumn) ? \"\" : \" colspan=\\\"2\\\"\";\n\t\t\t\t\t$discountColumn = ($showDiscountColumn) ? \"<td class=\\\"title2\\\"><strong>Discount</strong></td>\" : \"\";\n\t\t\t\t\t$techInfoBlock = getTechUserInfoFromID($row['tech_user_id']);\n\t\t\t\t\t$techInfoBlock = (trim($techInfoBlock) != \"\") ? $techInfoBlock . \"<br />\" : \"\";\n\t\t\t\t\t$storeInfoBlock = getStoreInfo();\n\t\t\t\t\t$storeInfoBlock = (trim($storeInfoBlock) != \"\") ? \"<br />\" . $storeInfoBlock : \"\";\n\t\t\t\t\t\n\t\t\t\t\t$page_content .= \"\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<tr class=\\\"title2\\\">\n\t\t\t\t\t\t\t\t\t<td colspan=\\\"6\\\">\n\t\t\t\t\t\t\t\t\t\t<table border=\\\"0\\\" cellpadding=\\\"1\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\">\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 width=\\\"34%\\\" style=\\\"vertical-align: top;\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Order Number: </strong>\" . $row['id'] . \"<br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Ordered On: </strong>\" . makeOrderDateTime($row['datetime']) . \"<br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Email Address: </strong>\" . getEmailAddressFromID($row['user_id']) . \"<br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\" . $techInfoBlock . \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\" . $storeInfoBlock . \"\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<td width=\\\"33%\\\" style=\\\"vertical-align: top;\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<strong style=\\\"text-decoration: underline;\\\">Bill To: </strong><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\" . getAddress(0, $row['id']) . \"\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<td width=\\\"33%\\\" style=\\\"vertical-align: top;\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<strong style=\\\"text-decoration: underline;\\\">Ship To: </strong><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\" . getAddress(1, $row['id']) . \"\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>\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title1\\\" colspan=\\\"6\\\"><strong>Products</strong></td>\n\t\t\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\"><strong>ID</strong></td>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\"><strong>Description</strong></td>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\"\" . $priceColSpan . \"><strong>Price</strong></td>\n\t\t\t\t\t\t\t\t\t\" . $discountColumn . \"\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\"><strong>Qty</strong></td>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\"><strong>Item Total</strong></td>\n\t\t\t\t\t\t\t\t</tr>\";\t\n\t\t\t\t\t// Print out the systems info\t\n\t\t\t\t\t$sql2 = \"SELECT * FROM `\" . DBTABLEPREFIX . \"systems` s LEFT JOIN `\" . DBTABLEPREFIX . \"models` m ON s.model_id=m.id WHERE s.order_id = '$orderID' ORDER BY m.name\";\n\t\t\t\t\t$result2 = mysql_query($sql2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t$x = 1; //reset the variable we use for our row colors\t\n\n\t\t\t\t\tif (mysql_num_rows($result2) == \"0\") { // No orders yet!\n\t\t\t\t\t\t$page_content .= \"\\n\t\t\t\t\t<tr class=\\\"greenRow\\\">\";\n\t\t\t\t\t\t$page_content .= \"\\n\t\t\t\t\t\t<td colspan=\\\"6\\\">Unable to pull order info.</td>\";\n\t\t\t\t\t\t$page_content .= \"\\n\t\t\t\t\t</tr>\";\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\t // Print all our orders\t\t\t\t\t\t\t\t\n\t\t\t\t\t\twhile ($row2 = mysql_fetch_array($result2)) {\t\n\t\t\t\t\t\t\t$modelDiscount = ($showDiscountColumn) ? \"<td>\" . formatCurrency($row2['discount']) . \"</td>\" : \"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$page_content .= \"\t\t\t\n\t\t\t\t\t\t\t\t<tr id=\\\"\" . $row2['id'] . \"_row\\\" class=\\\"row\" . $x . \"\\\">\n\t\t\t\t\t\t\t\t\t<td>\" . $row2['id'] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<strong>Model Name: </strong>\" . $row2['name'] . \"<br />\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Spit out the parts for the system\t\t\t\n\t\t\t\t\t\t\t$sql3 = \"SELECT s.part_name FROM `\" . DBTABLEPREFIX . \"systemparts` s LEFT JOIN `\" . DBTABLEPREFIX . \"partcats` p ON p.id=s.partcat_id WHERE s.system_id = '\" . $row2['id'] . \"' AND UCASE(s.part_name)!='NONE' ORDER BY p.sort_order ASC\";\n\t\t\t\t\t\t\t$result3 = mysql_query($sql3);\n\t\t\n\t\t\t\t\t\t\tif (mysql_num_rows($result3) > 0) { \t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile ($row3 = mysql_fetch_array($result3)) {\t\n\t\t\t\t\t\t\t\t\t$page_content .= $row3['part_name'] . \"<br />\";\n\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($result3);\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$page_content .= \"\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td\" . $priceColSpan . \">\" . formatCurrency($row2['price']) . \"</td>\n\t\t\t\t\t\t\t\t\t\" . $modelDiscount . \"\n\t\t\t\t\t\t\t\t\t<td>\" . $row2['qty'] . \"</td>\n\t\t\t\t\t\t\t\t\t<td>\" . formatCurrency($row2['qty'] * ($row2['price'] - $row2['discount'])) . \"</td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t\t\t$x = ($x==2) ? 1 : 2;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\tmysql_free_result($result2);\n\t\t\t\t\t}\n\t\t\t\t\t$showCouponRow = showOrderCouponRow($orderID);\n\t\t\t\t\t\n\t\t\t\t\t$page_content .= \"\t\t\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title1\\\" colspan=\\\"6\\\"><strong>Order Info</strong></td>\n\t\t\t\t\t\t\t\t</tr>\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\" colspan=\\\"5\\\" style=\\\"text-align: right;\\\"><strong>Subtotal</strong></td><td class=\\\"row1\\\">\" . formatCurrency($row['items_total']) . \"</td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$hideCouponRow = ($showCouponRow) ? \"\" : \" style=\\\"display: none;\\\"\";\n\t\t\t\t\t$page_content .= \"\t\t\t\n\t\t\t\t\t\t\t\t<tr id=\\\"\" . $_SESSION['orderid'] . \"couponRow\\\"\" . $hideCouponRow . \">\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\" colspan=\\\"5\\\" style=\\\"text-align: right;\\\"><strong>Coupon</strong></td><td class=\\\"row1\\\">-\" . formatCurrency(getOrderCouponDiscount($orderID)) . \"</td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t/* This is disabled for now\n\t\t\t\t\t$page_content .= \"\t\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\" colspan=\\\"6\\\" style=\\\"text-align: right;\\\"><strong>Discount</strong></td><td class=\\\"row1\\\"><span id=\\\"discountContainer\\\"><input name=\\\"discount\\\" id=\\\"discount\\\" type=\\\"text\\\" size=\\\"10\\\" value=\\\"\" . $row['discount'] . \"\\\" /></span><span id=\\\"\" . $orderID . \"taxSpinner\\\" style=\\\"display: none;\\\"><img src=\\\"themes/\" . $ss_config['ftsss_theme'] . \"/icons/indicator.gif\\\" alt=\\\"spinner\\\" /></span></td>\n\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t*/\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t$page_content .= \"\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\" colspan=\\\"5\\\" style=\\\"text-align: right;\\\"><strong>Sales Tax</strong></td><td class=\\\"row1\\\">\" . formatCurrency($row['tax']) . \"</td>\n\t\t\t\t\t\t\t\t</tr>\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\" colspan=\\\"5\\\" style=\\\"text-align: right;\\\"><strong>Shipping - \" . printShippingType($row['shipping']) . \"</strong></td><td class=\\\"row1\\\">\" . formatCurrency($row['shipping_price']) . \"</td>\n\t\t\t\t\t\t\t\t</tr>\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\" colspan=\\\"5\\\" style=\\\"text-align: right;\\\"><strong>\" . $processingType . \"</strong></td><td class=\\\"row1\\\">\" . formatCurrency($row['rush_fee']) . \"</td>\n\t\t\t\t\t\t\t\t</tr>\t\t\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\\\"title2\\\" colspan=\\\"5\\\" style=\\\"text-align: right;\\\"><strong>Order Total</strong></td><td class=\\\"row1\\\">\" . formatCurrency($row['price']) . \"</td>\n\t\t\t\t\t\t\t\t</tr>\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tmysql_free_result($result);\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t$page_content .= \"\t\t\t\t\t</table>\";\n\t\t}\n\t\telse { $page_content = \"You Are Not Authorized To Access Other User's Orders. Please Refrain From Trying To Do So Again.\"; }\n\t\n\t// Return the invoice to the page that called it\n\treturn $page_content;\n}", "function orders( $args, $assoc_args ) {\n\t\tlist( $user_id ) = $args;\n\t\t$customer = new CBCustomer($user_id, $interactive = false);\n\t\tWP_CLI::line(var_export($customer->get_orders(), true));\n\t}", "public function payment_page( $order_id ) {\n\n\t\techo '<p>' . __( 'Thank you for your order, please click the button below to pay with Payza.', WC_Payza::TEXT_DOMAIN ) . '</p>';\n\t\techo $this->generate_payza_form( $order_id );\n\t}", "function show_buttons(){\n if(isset($_GET['order_id'])) {\n \n $show_buttons= <<<DELIMETER\n\n <input type=\"button\" class=\"btn btn-warning btn-lg\" value=\"Print this page\" onClick=\"window.print()\">\n \n <td><a class = \"btn btn-danger btn-lg\" href =\"index.php?delete_order_id={$_GET['order_id']}\">Delete</a></td>\n \n </aside><!--SIDEBAR-->\n\nDELIMETER;\n\n echo $show_buttons;\n }\n \n}", "function write_EDI_order( $order_id ){\n\t\tinclude_once(ABSPATH . \"acc/counter.php\");\n\t\tglobal $the_order;\n\t\t$counter = new Counter;\n\t\t//$order = wc_get_order( $order_id );\n\t\t$the_order = wc_get_order( $order_id );\n $PONumber = get_post_meta($order_id, 'order_number', true) == '' ? $order_id : get_post_meta($order_id, 'order_number', true);\n $CustPONumber = get_post_meta($order_id, 'customer_order_number', true) == '' ? '' : get_post_meta($order_id, 'customer_order_number', true);\n\t\t$user_info = get_userdata( $the_order->user_id );\n\t\t$username = $user_info->user_login;\n\t\t//$vendors = get_vendors( $the_order );\n\t\t$delim = '*';\n\t\t$eoldelim = \"~\\r\\n\";\n\t\t\t$StringToWrite =\t\"ISA\" . $delim . \"00\" . $delim . ' ' . $delim . \"00\" . $delim . ' ' . $delim;\n\t\t\t$StringToWrite .= 'ZZ' . $delim . str_pad(\"HAWSUSA\", 15) . $delim . \"01\" . $delim . str_pad(\"005211974\", 15) . $delim;\n\t\t\t$StringToWrite .= date(\"ymd\") . $delim . date(\"Hi\") . $delim . 'U' . $delim . '00401' . $delim . str_pad($counter->increment('ISA'),9,'0', STR_PAD_LEFT) . $delim;\n\t\t\t$StringToWrite .= '0' . $delim;\n if( get_user_meta(get_current_user_id(), 'ITR_Prod', true) != ''){\n $StringToWrite .= get_user_meta(get_current_user_id(), 'ITR_Prod') ? 'P' : 'T';\n } else {\n $StringToWrite .= 'P';;\n }\n $StringToWrite .= $delim . '>' . $eoldelim;\n\t\t\t$StringToWrite .=\t\"GS\" . $delim . \"PO\" . $delim . \"HAWSUSA\" . $delim . \"005211974\" . $delim;\n\t\t\t$StringToWrite .= date(\"Ymd\") . $delim . date(\"Hi\") . $delim . $counter->increment('GS') . $delim . 'X' . $delim . '004010' . $eoldelim;\n\t\t\t$StringToWrite .= \"ST\" . $delim . \"850\" . $delim . str_pad($counter->increment('ST'),4,'0', STR_PAD_LEFT) . $eoldelim;\n\t\t\t$StringToWrite .= \"BEG\" . $delim . '00' . $delim . 'DS' . $delim;\n $StringToWrite .= ($CustPONumber == '') ? $PONumber : $CustPONumber;\n $StringToWrite .= $delim . '' . $delim . date(\"Ymd\") . $eoldelim;\n\t\t\t// REF Segments\t\t---------------------------------------------------------------------------------------------\n\t\t\t$StringToWrite .= \"REF\" . $delim . 'IA' . $delim . '0002835697' . $eoldelim;\n\t\t\t$StringToWrite .= \"REF\" . $delim . 'PK' . $delim . 'PK' . date('y') . str_pad($counter->increment('PK'),8,'0', STR_PAD_LEFT) . $delim . 'HW' . $eoldelim;\n $StringToWrite .= ($CustPONumber == '') ? '' : \"REF\" . $delim . 'CO' . $delim . $CustPONumber . $eoldelim;\n\t\t\t$StringToWrite .= \"REF\" . $delim . 'ZZ' . $delim . 'COMMERCIAL' . $eoldelim;\n\t\t\t//REQUESTED SHIP DATE--------------------------------------------------------------------------------------------\n\t\t\t$StringToWrite .= \"DTM\" . $delim . '010' . $delim . date('Ymd', time() + (3 * 24 * 60 * 60)) . $eoldelim;\n\t\t\t//CARRIER DETAILS\t---------------------------------------------------------------------------------------------\n\t\t\t$StringToWrite .= \"TD5\" . $delim . '' . $delim . '' . $delim . '' . $delim . '' . $delim . 'BEST WAY' . $eoldelim;\n\t\t\t// Ship To / Bill To---------------------------------------------------------------------------------------------\n\t\t\t$StringToWrite .= \"N1\" . $delim . 'ST' . $delim . $the_order->shipping_first_name . ' ' . $the_order->shipping_last_name . $delim . $eoldelim;\n\t\t\t$StringToWrite .= \"N3\" . $delim . $the_order->shipping_address_1;\n\t\t\t$the_order->shipping_address_2 != '' ? $StringToWrite .= $delim . $the_order->shipping_address_2 . $eoldelim : $StringToWrite .= $eoldelim;\n\t\t\t$StringToWrite .= \"N4\" . $delim . $the_order->shipping_city . $delim . $the_order->shipping_state. $delim . $the_order->shipping_postcode . $eoldelim;\n\t\t\t\n\t\t\t$StringToWrite .= \"N1\" . $delim . 'BT' . $delim . 'HAWS USA INC' . $eoldelim;\n\n/*\n\t\t\t$delim . $the_order->billing_first_name . ' ' . $the_order->billing_last_name . $eoldelim;\n\t\t\t$StringToWrite .= \"N3\" . $delim . $the_order->billing_address_1;\n\t\t\t$the_order->billing_address_2 != '' ? $StringToWrite .= $delim . $the_order->billing_address_2 . $eoldelim : $StringToWrite .= $eoldelim;\n\t\t\t$StringToWrite .= \"N4\" . $delim . $the_order->billing_city . $delim . $the_order->billing_state. $delim . $the_order->billing_postcode . $eoldelim;\n*/\n\t\t\t//-------------------------------------------------------------------------------------------------------------------\n\t\t\t// Line Items--------------------------------------------------------------------------------------------------------\n\t\t\ttry{\n\t\t\t\t$connection = new mysqli('localhost', 'orders_admin', 'orderspass', 'orders');\n\t\t\t} catch (Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t// mysql_select_db('parts_catalog_db', $connection) or die(mysql_error());\n\t\t\t$linesTotal = 0;\t\n\t\tforeach( $the_order->get_items() as $item ){\n\t\t\t$_product = apply_filters( 'woocommerce_order_item_product', $the_order->get_product_from_item( $item ), $item );\n\t\t//\t$query = 'select * from freshandeasy_parts_list where product_id = \"'.$key.'\";';\n\t\t//\t$result = mysql_query($query, $connection);\n\t\t//\t$name = mysql_result($result,0,\"product_name\");\n\t\t//\t$photo_dir = mysql_result($result,0,\"photo_directory\");\n\t\t//mysql_result($result,0,\"product_description\");\n $propost = get_post($item['variation_id']);\n preg_match('/Style.*/', $propost->post_title, $PID);\n\t\t\t$price = $_product->get_regular_price();\n\t\t\t$UPC = get_post_meta( $item['variation_id'], '_upc', true );\n\t\t//\t$uom = mysql_result($result,0,\"uom\");\n\t\t//\t$quantity = $value;\n\t\t//\t$ID = $key;\n\t\t\t$linesTotal++;\n\t\t\t$StringToWrite .= 'PO1' . $delim . $linesTotal . $delim . absint( $item['qty'] ) . $delim . 'EA' . $delim . $price . $delim . '' . $delim . 'UP' . $delim;\n\t\t\t$StringToWrite .= $UPC;\n\t\t\t$StringToWrite .= $eoldelim;\n if($PID[0] != '') $StringToWrite .= 'PID' . $delim . $delim . $delim . $delim . $delim . substr($PID[0], 0,80) . $eoldelim;\n\t\t}\n\t\t\t$StringToWrite .= \"CTT\" . $delim . $linesTotal . $eoldelim;\n\t\t\t//mysql_close($connection);\n\t\t\t//-------------------------------------------------------------------------------------------------------------------\n\t\t\t$a=0;\n\t\t\t$textAr = explode($eoldelim, $StringToWrite);\n\t\t\tforeach ($textAr as $i) {\n\t\t\t\t$a++;\n\t\t\t}\n\t\t\t$a = $a-2;\n\t\t\t$StringToWrite .= \"SE\" . $delim . $a . $delim . str_pad($counter->getCounter('ST'),4,'0', STR_PAD_LEFT) . $eoldelim;\t\t\n\t\t\t$StringToWrite .= \"GE\" . $delim . '1' . $delim . $counter->getCounter('GS') . $eoldelim;\n\t\t\t$StringToWrite .= \"IEA\" . $delim . '1' . $delim . str_pad($counter->getCounter('ISA'),9,'0', STR_PAD_LEFT) . $eoldelim;\n if( get_user_meta(get_current_user_id(), 'ITR_Prod', true) != ''){\n $filetowrite = get_user_meta(get_current_user_id(), 'ITR_Prod', true) ? \"/usr/bots/csHaws/PROD/InFromHaws/\" . $username . \"-\" . date(\"md-Hms\") . \".850\" : \"/usr/bots/csHaws/TEST/InFromHaws/\" . $username . \"-\" . date(\"md-Hms\") . \".850\";\n } else {\n $filetowrite .= \"/usr/bots/csHaws/TEST/InFromHaws/\" . $username . \"-\" . date(\"md-Hms\") . \".850\";\n }\n\t\t\t$fh = fopen($filetowrite,'w') or die(\"Can't open file\");\n\t\t\tfwrite($fh, $StringToWrite);\n\t\t\tfclose($fh);\n\t\t /* Make connection to database */ \n\t\t $ordersConnection = mysql_connect('localhost', 'orders_admin', 'orderspass') or die(mysql_error());\n\t\t mysql_select_db('orders', $ordersConnection) or die(mysql_error());\n\t\t $q2 = \"INSERT INTO orders_status (associated_order, order_status, edi_file, sequence_num, user) \"\n\t\t\t. \"VALUES ('\". $order_id .\"', 'Sent - Carhartt', '\".$counter->increment('doccounter').\"', '1', '\" . $username . \"')\";\n\t\t $newResult = mysql_query($q2, $ordersConnection);\n\t\t $filetowrite = \"/home/strongbo/docs/edi/\" . $counter->getCounter('doccounter');\n\t\t $fh = fopen($filetowrite,'w') or die(\"Can't open file\");\n\t\t fwrite($fh, $StringToWrite);\n\t\t fclose($fh);\n\t\t mysql_close($ordersConnection);\n\t\t return $StringToWrite;\n\t}" ]
[ "0.7437382", "0.68170327", "0.67349803", "0.6513923", "0.65096176", "0.65042883", "0.63756204", "0.63732415", "0.63644934", "0.6321169", "0.627622", "0.6232554", "0.6157307", "0.61428475", "0.6089371", "0.60560435", "0.6043712", "0.60381174", "0.6029566", "0.6005625", "0.5959584", "0.5954737", "0.5938584", "0.592727", "0.59249794", "0.5911382", "0.5896812", "0.5880358", "0.5875914", "0.5866117", "0.58458066", "0.5842479", "0.5823124", "0.58085144", "0.5793058", "0.57887256", "0.5758511", "0.57390606", "0.57365763", "0.57363296", "0.57127833", "0.57077515", "0.5677251", "0.5675684", "0.5663928", "0.5634198", "0.56318617", "0.56292987", "0.5611474", "0.5602848", "0.5600682", "0.55907923", "0.5589656", "0.5588121", "0.55713093", "0.55697894", "0.5564902", "0.5559523", "0.55530846", "0.55398047", "0.5530293", "0.55234903", "0.552025", "0.5495086", "0.5487424", "0.54577", "0.54413694", "0.5426968", "0.5421908", "0.5420787", "0.5416977", "0.5413033", "0.54129523", "0.5412487", "0.5412305", "0.5407871", "0.5391224", "0.5386359", "0.5385418", "0.5385174", "0.5381015", "0.53776336", "0.5359027", "0.53570276", "0.535261", "0.534887", "0.5343708", "0.53400373", "0.53392947", "0.5338315", "0.5333667", "0.53325164", "0.53319794", "0.53296626", "0.53288543", "0.5324526", "0.5323472", "0.5318911", "0.5317849", "0.5305538" ]
0.7761132
0
woocommerce_pip_page function. WordPress Settings Page
Функция woocommerce_pip_page. Страница настроек WordPress
function woocommerce_pip_page() { //Check the user capabilities if ( ! current_user_can( 'manage_woocommerce' ) ) { wp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce-pip' ) ); } //Load needed WP resources for media uploader wp_enqueue_media(); //Save the field values if ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) { foreach ( $_POST as $key => $value ) { if ( $key == 'woocommerce_pip_invoice_start' && isset( $_POST['woocommerce_pip_reset_start'] ) ) { if ( $_POST['woocommerce_pip_reset_start'] == 'Yes' ) { update_option( $key, ltrim( $value, '0') ); } } elseif ( $key == 'woocommerce_pip_reset_start' ) { } else { if ( get_option( $key ) != $value ) { update_option( $key, $value ); } else { add_option( $key, $value, '', 'no' ); } } } } ?> <div class="wrap"> <div id="icon-options-general" class="icon32"> <br /> </div> <h2><?php _e( 'WooCommerce - Print invoice/packing list settings', 'woocommerce-pip' ); ?></h2> <?php if ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) { ?> <div id="message" class="updated fade"><p><strong><?php _e( 'Your settings have been saved.', 'woocommerce-pip' ); ?></strong></p></div> <?php } ?> <p><?php _e( 'Change settings for print invoice/packing list.', 'woocommerce-pip' ); ?></p> <div id="content"> <form method="post" action="" id="pip_settings"> <input type="hidden" name="pip_fields_submitted" value="submitted"> <div id="poststuff"> <div class="postbox"> <h3 class="hndle"><?php _e( 'Settings', 'woocommerce-pip' ); ?></h3> <div class="inside pip-preview"> <table class="form-table"> <tr> <th> <label for="woocommerce_pip_company_name"><b><?php _e( 'Company name:', 'woocommerce-pip' ); ?></b></label> </th> <td> <input type="text" name="woocommerce_pip_company_name" class="regular-text" value="<?php echo stripslashes( get_option( 'woocommerce_pip_company_name' ) ); ?>" /><br /> <span class="description"><?php echo __( 'Your custom company name for the print.', 'woocommerce-pip' ); echo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> '; echo __( 'Leave blank to not to print a company name.', 'woocommerce-pip' ); ?></span> </td> </tr> <tr> <th> <label for="woocommerce_pip_logo"><b><?php _e( 'Custom logo:', 'woocommerce-pip' ); ?></b></label> </th> <td> <input id="woocommerce_pip_logo" type="text" size="36" name="woocommerce_pip_logo" value="<?php echo get_option( 'woocommerce_pip_logo' ); ?>" /> <input id="upload_image_button" type="button" value="<?php _e( 'Upload Image', 'woocommerce-pip' ); ?>" /> <br /> <span class="description"><?php echo __( 'Your custom logo for the print.', 'woocommerce-pip' ); echo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> '; echo __( 'Leave blank to not to use a custom logo.', 'woocommerce-pip' ); ?></span> </td> </tr> <tr> <th> <label for="woocommerce_pip_company_extra"><b><?php _e( 'Company extra info:', 'woocommerce-pip' ); ?></b></label> </th> <td> <textarea name="woocommerce_pip_company_extra" cols="45" rows="3" class="regular-text"><?php echo stripslashes( get_option( 'woocommerce_pip_company_extra' ) ); ?></textarea><br /> <span class="description"><?php echo __( 'Some extra info that is displayed under company name.', 'woocommerce-pip' ); echo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> '; echo __( 'Leave blank to not to print the info.', 'woocommerce-pip' ); ?></span> </td> </tr> <tr> <th> <label for="woocommerce_pip_return_policy"><b><?php _e( 'Returns Policy, Conditions, etc.:', 'woocommerce-pip' ); ?></b></label> </th> <td> <textarea name="woocommerce_pip_return_policy" cols="45" rows="3" class="regular-text"><?php echo stripslashes( get_option( 'woocommerce_pip_return_policy' ) ); ?></textarea><br /> <span class="description"><?php echo __( 'Here you can add some policies, conditions etc. For example add a returns policy in case the client would like to send back some goods.', 'woocommerce-pip' ); echo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> '; echo __( 'Leave blank to not to print any policy.', 'woocommerce-pip' ); ?></span> </td> </tr> <tr> <th> <label for="woocommerce_pip_footer"><b><?php _e( 'Custom footer:', 'woocommerce-pip' ); ?></b></label> </th> <td> <textarea name="woocommerce_pip_footer" cols="45" rows="3" class="regular-text"><?php echo stripslashes( get_option( 'woocommerce_pip_footer' ) ); ?></textarea><br /> <span class="description"><?php echo __( 'Your custom footer for the print.', 'woocommerce-pip' ); echo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> '; echo __( 'Leave blank to not to print a footer.', 'woocommerce-pip' ); ?></span> </td> </tr> <tr> <th> <label for="woocommerce_pip_invoice_start"><b><?php _e( 'Invoice counter start:', 'woocommerce-pip' ); ?></b></label> </th> <td> <input type="checkbox" id="woocommerce_pip_reset_start" name="woocommerce_pip_reset_start" value="Yes" /> <?php _e( 'Reset invoice numbering', 'woocommerce-pip' ); ?><br /> <input type="text" readonly="true" id="woocommerce_pip_invoice_start" name="woocommerce_pip_invoice_start" class="regular-text" value="<?php echo wp_kses_stripslashes( get_option( 'woocommerce_pip_invoice_start' ) ); ?>" /><br /> <span class="description"><?php echo __( 'Reset the invoice counter to start your custom position for example 103. Leading zeros will be trimmed. Use prefix instead.', 'woocommerce-pip' ); echo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> '; echo __( 'You need to check the checkbox to actually reset the value.', 'woocommerce-pip' ); ?></span> </td> </tr> <tr> <th> <label for="woocommerce_pip_invoice_prefix"><b><?php _e( 'Invoice numbering prefix:', 'woocommerce-pip' ); ?></b></label> </th> <td> <input type="text" name="woocommerce_pip_invoice_prefix" class="regular-text" value="<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_prefix' ) ); ?>" /><br /> <span class="description"><?php echo __( 'Set your custom prefix for the invoice numbering.', 'woocommerce-pip' ); ?></span> </td> </tr> <tr> <th> <label for="woocommerce_pip_invoice_suffix"><b><?php _e( 'Invoice numbering suffix:', 'woocommerce-pip' ); ?></b></label> </th> <td> <input type="text" name="woocommerce_pip_invoice_suffix" class="regular-text" value="<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_suffix' ) ); ?>" /><br /> <span class="description"><?php echo __( 'Set your custom suffix for the invoice numbering.', 'woocommerce-pip' ); ?></span> </td> </tr> <tr> <th> <label for="preview"><b><?php _e( 'Preview before printing:', 'woocommerce-pip' ); ?></b></label> </th> <td> <?php if ( get_option( 'woocommerce_pip_preview' ) == 'enabled') { ?> <input type="radio" name="woocommerce_pip_preview" value="enabled" id="pip-preview" class="input-radio" checked="yes" /> <label for="woocommerce_pip_preview"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br /> <input type="radio" name="woocommerce_pip_preview" value="disabled" id="pip-preview" class="input-radio" /> <label for="woocommerce_pip_preview"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br /> <?php } else { ?> <input type="radio" name="woocommerce_pip_preview" value="enabled" id="pip-preview" class="input-radio" /> <label for="woocommerce_pip_preview"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br /> <input type="radio" name="woocommerce_pip_preview" value="disabled" id="pip-preview" class="input-radio" checked="yes" /> <label for="woocommerce_pip_preview"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br /> <?php } ?> </td> </tr> <tr> <th> <label for="preview"><b><?php _e( 'Send invoice as HTML email:', 'woocommerce-pip' ); ?></b></label> </th> <td> <?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled') { ?> <input type="radio" name="woocommerce_pip_send_email" value="enabled" id="pip-send-email" class="input-radio" checked="yes" /> <label for="woocommerce_pip_send_email"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br /> <input type="radio" name="woocommerce_pip_send_email" value="disabled" id="pip-send-email" class="input-radio" /> <label for="woocommerce_pip_send_email"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br /> <?php } else { ?> <input type="radio" name="woocommerce_pip_send_email" value="enabled" id="pip-send-email" class="input-radio" /> <label for="woocommerce_pip_preview"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br /> <input type="radio" name="woocommerce_pip_send_email" value="disabled" id="pip-send-email" class="input-radio" checked="yes" /> <label for="woocommerce_pip_send_email"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br /> <?php } ?> </td> </tr> </table> </div> </div> </div> <p class="submit"> <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'woocommerce-pip' ); ?>" /> </p> </form> </div> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pro6pp_settings_page ()\n {\n if (! current_user_can('manage_woocommerce')) {\n wp_die(\n __(\n 'You do not have sufficient' .\n ' permissions to access this page.',\n 'pro6pp_autocomplete'));\n }\n\n // This variable is used inside the template.\n $tabs = $this->get_template_settings();\n\n // Render the settings template\n include (sprintf(\"%s/templates/settings.php\", dirname(__FILE__)));\n }", "public function settings_page() {\r\n\r\n\t\t\trequire_once YIKES_Custom_Product_Tabs_Pro_Path . 'partials/page-settings.php';\r\n\t\t}", "public function woocommerce_settings_page() {\n\n\t\tWC_Admin_Settings::output_fields( $this->woocommerce_get_settings() );\n\n\t}", "function settings_page() {\n include( eboywp_DIR . '/templates/page-settings.php' );\n }", "public static function settings_page() {\n\t\t\t\t\t\n\t\t\tslp_pvw_plugin_framework::pvw_plugin_settings();\n\t\t\n\t\t}", "public function settings_page()\n {\n }", "public function plugin_settings_page()\n {\n \tif(!current_user_can('manage_options'))\n \t{\n \t\twp_die(__('You do not have sufficient permissions to access this page.'));\n \t}\n\n \t// Render the settings template\n \tinclude(sprintf(\"%s/templates/settings.php\", dirname(__FILE__)));\n }", "function hop_add_pages() {\r\n\tadd_theme_page(__('FYA Settings','hybrid'), __('FYA Settings','hybrid'), 10, 'hybrid-hop.php', hop_theme_page);\r\n}", "function wc_admin_connect_page($options)\n {\n }", "function wviewforwp_options_page() {\n?>\n<div>\n<h2>Wview for WP Options Page</h2>\n\n<form action=\"options.php\" method=\"post\">\n<?php settings_fields('wviewforwp'); //The Settings Page Name?>\n<?php do_settings_sections('wviewforwp'); ?>\n\n<input name=\"Submit\" type=\"submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\n</form></div>\n<?php }", "function go_wp_display_settings_page() {\n\t\n\t// check if user is allowed access\n\tif ( ! current_user_can( 'manage_options' ) ) return;\n\t\n\t?>\n\t\n\t<div class=\"wrap\">\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\n\t\t\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t\n\t\t\t<?php\n\t\t\t\n\t\t\t// output security fields\n\t\t\tsettings_fields( $option_group = 'go_wp_options' );\n\t\t\t\n\t\t\t// output setting sections\n\t\t\tdo_settings_sections( $page = 'go_wp' );\n\t\t\t\n\t\t\t// submit button\n\t\t\tsubmit_button();\n\t\t\t\n\t\t\t?>\n\t\t\t\n\t\t</form>\n\t</div>\n\t\n\t<?php\n\t\n}", "function wpbitly_settings_section() {\r\n\t\techo '<p>Configure WP Bit.ly settings here.</p>';\r\n\t}", "function add_plugin_settings_page() {\n\t\tadd_options_page( __( 'Excedea settings', 'excedea_client_connection_plugin' ), 'Excedea', 'manage_options', 'excedea_settings', array(\n\t\t\t$this,\n\t\t\t'excedea_options_page_output'\n\t\t) );\n\t}", "public function page_init() {\n register_setting(\n 'pediodosonline_option_group', // Option group\n 'pediodosonline_option_name', // Option name\n array($this, 'sanitize') // Sanitize\n );\n\n add_settings_section(\n 'pediodosonline_admin', // ID\n '', // Title\n array(), // Callback\n 'pedidosonline-settings' // Page\n );\n\n $args = array(\n 'sort_order' => 'ASC',\n 'sort_column' => 'post_title',\n 'hierarchical' => 1,\n 'exclude' => '',\n 'include' => '',\n 'meta_key' => '',\n 'meta_value' => '',\n 'authors' => '',\n 'child_of' => 0,\n 'parent' => -1,\n 'exclude_tree' => '',\n 'number' => '',\n 'offset' => 0,\n 'post_type' => 'page',\n 'post_status' => 'publish'\n );\n $this->publish_pages = get_pages($args);\n add_settings_field(\n 'login_page', // ID\n __('Login Page', 'clipe'), // Title\n array($this, 'login_page_callback'), // Callback\n 'pedidosonline-settings', // Page\n 'pediodosonline_admin' // Section\n );\n add_settings_field(\n 'email', // ID\n __('Email', 'clipe'), // Title\n array($this, 'email_callback'), // Callback\n 'pedidosonline-settings', // Page\n 'pediodosonline_admin' // Section\n );\n add_settings_field(\n 'password', // ID\n __('Password', 'clipe'), // Title\n array($this, 'password_callback'), // Callback\n 'pedidosonline-settings', // Page\n 'pediodosonline_admin' // Section\n );\n add_settings_field(\n 'collect-stats-data', // ID\n __('Allow collection of statistic data in Clipe', 'clipe'), // Title\n array($this, 'checkbox_field_callback'), // Callback\n 'pedidosonline-settings', // Page\n 'pediodosonline_admin', // Section\n array(\n 'optionName' => 'collect-stats-data'\n )\n );\n add_settings_field(\n 'language', // ID\n __('Language API responses', 'clipe'), // Title\n array($this, 'lenguage_callback'), // Callback\n 'pedidosonline-settings', // Page\n 'pediodosonline_admin', // Section\n array(\n 'optionName' => 'language'\n )\n );\n add_settings_field(\n 'change_new_status', // ID\n __('Change status of new orders to in progess automatically when review their details', 'clipe'), // Title\n array($this, 'change_new_status_callback'), // Callback\n 'pedidosonline-settings', // Page\n 'pediodosonline_admin', // Section\n array(\n 'optionName' => 'change_new_status'\n )\n );\n add_settings_field(\n 'theme', // ID\n __('Theme Templates', 'clipe'), // Title\n array($this, 'theme_callback'), // Callback\n 'pedidosonline-settings', // Page\n 'pediodosonline_admin', // Section\n array(\n 'optionName' => 'theme'\n )\n );\n }", "function mnp_settings_page() {\n\n\techo '<div class=\"wrap\"><h1>MNP Settings</h1></div>';\n\n\t// externalize the shortcode generator\n\n\tinclude_once MN_PLUGIN_DIR . '/includes/mn_shortcode_generator.php';\n\n\t// we need JS to generate the shortcode\n\t// best to externalize it and place it only on this page\n\n\techo '<script type=\"text/javascript\" src=\"' . MN_PLUGIN_URL . 'assets/js/mn_shortcode_generator.js\"></script>';\n\n}", "static function settings_page() {\n\t\t// This function is delegated to the Options class.\n\t\tOptions::settings_page();\n\t}", "function hopeful_options_page() {\n\t// Create the settings page\n\tadd_submenu_page( 'themes.php', 'HopefulTheme Customization', 'Hopeful Settings', 'edit_theme_options', 'hopefultheme-settings', 'hopeful_settings_page');\n}", "public function admin_page_content() { ?>\n\n <div class=\"wrap pyis-dpd-helpscout-settings\">\n\t\t\t\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\n\t\t\t\t<?php echo wp_nonce_field( 'pyis_dpd_helpscout_settings', 'pyis_dpd_helpscout_nonce' ); ?>\n\n\t\t\t\t<?php settings_fields( 'pyis_dpd_helpscout' ); ?>\n\n\t\t\t\t<?php do_settings_sections( 'pyis-dpd-helpscout' ); ?>\n\n\t\t\t\t<?php submit_button(); ?>\n\n\t\t\t</form>\n\n </div>\n\n <?php\n \n }", "public function diy_options_page() {\r\n // Add a theme page or an option page depending on the diy usage\r\n if ($this->usage == 'theme') {\r\n $this->page = add_theme_page( __($this->settings_page_title), __($this->settings_page_link), 'edit_theme_options', $this->slug, array(&$this,'diy_render_options_page' ));\r\n add_action('load-'.$this->page, array(&$this, 'diy_enqueue_settings_page_scripts'));\t\r\n } else if ($this->usage == 'plugin') {\r\n $this->page = add_options_page(__($this->settings_page_title), __($this->settings_page_link), 'manage_options', $this->slug, array($this, 'diy_render_options_page'));\r\n add_filter( 'plugin_action_links', array(&$this, 'diy_add_settings_link'), 10, 2 );\r\n\r\n // Run stuff as and when this options page loads\r\n add_action('load-'.$this->page, array(&$this, 'diy_enqueue_settings_page_scripts'));\r\n }\r\n }", "public function settings_page() {\n Mapti_Admin_Settings::output();\n }", "function pl_settings_page() {\r\n if ('true' == $_REQUEST['updated']) { \r\n wp_cache_add('pl_pluginlist_data', pl_get_plugin_list());\r\n }\r\n \r\n // create UI\r\n $page = '<p>By placing Maker &lt;!--plugin list--&gt; (just like (X)HTML comment with two dashes) in your page or post by sources code in your Rich text editor(only if enabled) plugin replaces it with list of currently installed WordPress plugins. Plugin List has some options that can be configured below.</p>';\r\n $page .= wpol_label('Show deactivated plugins', 'wppl_show_deactivated');\r\n $page .= wpol_checkbox('wppl_show_deactivated', pl_get_option('wppl_show_deactivated'), '', array('selected'=>pl_checked('wppl_show_deactivated')));\r\n $page .= wpol_br();\r\n $page .= wpol_label('Show plugin version', 'wppl_show_plugin_version');\r\n $page .= wpol_checkbox('wppl_show_plugin_version', pl_get_option('wppl_show_plugin_version'), '', array('selected'=>pl_checked('wppl_show_plugin_version')));\r\n $page .= wpol_br();\r\n $page .= wpol_label('Show plugin description', 'wppl_show_plugin_description');\r\n $page .= wpol_checkbox('wppl_show_plugin_description', pl_get_option('wppl_show_plugin_description'), '', array('selected'=>pl_checked('wppl_show_plugin_description')));\r\n $page .= wpol_br();\r\n $page .= wpol_label('Show Plugin List itself', 'wppl_show_plugin_itself');\r\n $page .= wpol_checkbox('wppl_show_plugin_itself', pl_get_option('wppl_show_plugin_itself'), '', array('selected'=>pl_checked('wppl_show_plugin_itself')));\r\n $page .= wpol_br(2);\r\n $page .= wpol_label('Show headline with stats', 'wppl_total_headline');\r\n $page .= wpol_checkbox('wppl_total_headline', pl_get_option('wppl_total_headline'), '', array('selected'=>pl_checked('wppl_total_headline')));\r\n $page .= wpol_br();\r\n $page .= wpol_label('Headline text', 'wppl_total_headline_text');\r\n $page .= wpol_text('wppl_total_headline_text', pl_get_option('wppl_total_headline_text'), '', array('style'=>'width:250px'));\r\n\r\n // render page\r\n wpol_settings_page('plugin-list', 'Plugin List Options', $page, $script);\r\n }", "public function plugin_settings_page() {\n\n\t\t// If the Soap extension is loaded, display the normal settings page.\n\t\tif ( extension_loaded( 'soap' ) ) {\n\t\t\treturn parent::plugin_settings_page();\n\t\t}\n\n\t\t// Get plugin settings icon.\n\t\t$icon = $this->plugin_settings_icon();\n\n\t\t// If no icon is defined, set it a default.\n\t\tif ( empty( $icon ) ) {\n\t\t\t$icon = '<i class=\"fa fa-cogs\"></i>';\n\t\t}\n\n\t\t// Prepare message.\n\t\techo sprintf(\n\t\t\t'<h3><span>%s %s</span></h3><p>%s</p><p>%s</p>',\n\t\t\t$icon,\n\t\t\tesc_html( $this->plugin_settings_title() ),\n\t\t\tsprintf(\n\t\t\t\tesc_html__( 'Gravity Forms CleverReach Add-On requires the %sPHP Soap extension%s to be able to communicate with CleverReach.' , 'gravityformscleverreach' ),\n\t\t\t\t'<a href=\"http://php.net/manual/en/book.soap.php\">', '</a>'\n\t\t\t),\n\t\t\tesc_html__( 'To continue using this Add-On, please enable the Soap extension. For information on doing so, contact your hosting provider.', 'gravityformscleverreach' )\n\t\t);\n\n\t}", "public static function register_page_options() {\n\t\tregister_setting( 'wpex_portfolio_options', 'wpex_portfolio_editor', array( 'WPEX_Portfolio_Config', 'sanitize' ) );\n\t}", "public static function get_settings_pages()\n {\n }", "function bookplugin_reading_settings_template_callback(){\r\n\r\n ?>\r\n <div class=\"wrap\">\r\n <h1> <?php echo esc_html(get_admin_page_title()); ?></h1>\r\n \r\n <?php settings_errors(); ?>\r\n <form action=\"options.php\" method=\"post\">\r\n <?php\r\n //security field\r\n settings_fields('bookplugin-reading-settings-page');\r\n\r\n //output settings section here\r\n\r\n do_settings_sections('bookplugin-reading-settings-page');\r\n\r\n //save settings button\r\n\r\n submit_button('Save Settings');\r\n ?>\r\n </div>\r\n <?php\r\n }", "function settings_page()\n {\n ?>\n <div class=\"wrap\">\n <h1>Customize WP Dashboard</h1>\n\n <!-- options.php is a Wordpress file that does most logic -->\n <form method=\"post\" action=\"options.php\">\n <?php\n // Insert section, fields and save button\n do_settings_sections(\"customize-wp-backend\");\n settings_fields(\"menuhide\");\n submit_button();\n ?>\n </form>\n </div>\n <?php\n }", "function plugin_page() {\n\t\t\techo '<div class=\"wrap\">';\n\n\t\t\t$this->settings_api->show_navigation();\n\t\t\t$this->settings_api->show_forms();\n\n\t\t\techo '</div>';\n\t\t}", "function add_notely_settings_page() {\r\n add_options_page( 'Notely', 'Notely', 'manage_options', 'notely-settings', 'notely_settings_page' );\r\n}", "function settings_page () {\n\t\t?>\n <div class='wrap'>\n <h2>Custom Fields</h2>\n <form method=\"post\" action=\"options.php\">\n <?php wp_nonce_field('update-options') ?>\n \n <p><strong>My Name:</strong><br />\n <input type=\"text\" name=\"myname_cl\" size=\"45\" value=\"<?php echo get_option('myname_cl'); ?>\" /></p>\n \n <p><strong>Amazon ID:</strong><br />\n <input type=\"text\" name=\"amazonid_cl\" size=\"45\" value=\"<?php echo get_option('amazonid_cl'); ?>\" /></p>\n \n <p><strong>Today's Featured Website:</strong><br />\n <input type=\"text\" name=\"todaysite_cl\" size=\"45\" value=\"<?php echo get_option('todaysite_cl'); ?>\" /></p>\n \n <p><strong>Welcome Text:</strong><br />\n <textarea name=\"welcomemessage_cl\" cols=\"100%\" rows=\"7\"><?php echo get_option('welcomemessage_cl'); ?></textarea></p>\n \n <p>\n <!--<input type=\"submit\" name=\"Submit\" value=\"Update Options\" />-->\n <input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\n </p>\n \n <input type=\"hidden\" name=\"action\" value=\"update\" />\n <input type=\"hidden\" name=\"page_options\" value=\"myname_cl,amazonid_cl,todaysite_cl,welcomemessage_cl\" />\n \n </form>\n </div>\n <?php\n\t}", "function hys_settings_page() {\n\t\tglobal $hys;\n\t\tif (!current_user_can('manage_options')) \n\t\t\twp_die( __('You cannot access this page. (mention error hys function error 244).') );\n\t\thys_settings_page_output(); //print form from options.php\n\t}", "public function admin_options(){\n\t echo '<h3>'.__('Modulo de pagos VisaNet UY', 'woocommerce').'</h3>';\n\t echo '<p>'.__('').'</p>';\n\t echo '<table class=\"form-table\">';\n\t // Generate the HTML For the settings form.\n\t $this->generate_settings_html();\n\t echo '</table>'; \n \t}", "function display_settings_page()\n {\n ?>\n <div class=\"section panel\">\n <h1><?php _e('Plugin Boilerplate Options', PLUGIN_BOILERPLATE_PLUGIN_SLUG); ?></h1>\n \n <?php settings_errors(); ?>\n <form method=\"post\" enctype=\"multipart/form-data\" action=\"options.php\">\n <?php \n settings_fields(PLUGIN_BOILERPLATE_PLUGIN_SLUG . '_options');\n do_settings_sections(PLUGIN_BOILERPLATE_PLUGIN_SLUG . '_options_section');\n\n $this->submit_button();\n ?>\n </form>\n </div>\n <?php\n }", "function Options_Page(){ global $WPTS_OPTIONS; ?>\n\n <div class=\"wrap\">\n\n <h2 style=\"clear:both;\"><?php _e( 'WP Top Slider Options' ); ?></h2>\n\n <form method=\"post\" action=\"options.php\">\n\n <?php settings_fields( 'WPTS_OPTIONS_group' ); ?>\n \n <?php do_settings_sections( 'WPTS_OPTIONS_page' ); ?>\n\n <p class=\"submit\">\n <input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n </p>\n\n </form>\n\n </div>\n \n <?php }", "static function settings_page() {\n\n $tabs = apply_filters( 'wpp::settings_developer::tabs', array(\n 'attributes' => array(\n 'label' => __( 'Attributes', ud_get_wp_property()->domain ),\n 'template' => ud_get_wp_property()->path( 'static/views/admin/settings-developer-attributes.php', 'dir' ),\n 'order' => 10\n ),\n 'meta' => array(\n 'label' => __( 'Meta', ud_get_wp_property()->domain ),\n 'template' => ud_get_wp_property()->path( 'static/views/admin/settings-developer-meta.php', 'dir' ),\n 'order' => 20\n ),\n 'types' => array(\n 'label' => __( 'Types', ud_get_wp_property()->domain ),\n 'template' => ud_get_wp_property()->path( 'static/views/admin/settings-developer-types.php', 'dir' ),\n 'order' => 30\n ),\n ) );\n\n /* Sort Tabs by 'order' */\n uasort( $tabs, create_function( '$a,$b', 'if ($a[\\'order\\'] == $b[\\'order\\']) { return 0; } return ($a[\\'order\\'] > $b[\\'order\\']) ? 1 : -1;' ) );\n\n $template = ud_get_wp_property()->path( 'static/views/admin/settings-developer.php', 'dir' );\n include( $template );\n\n }", "function wc_admin_register_page($options)\n {\n }", "function mt_add_pages() \r\n\t{\r\n\tadd_options_page('FP FSpax Pirep', 'FP FSpax Pirep', 8, basename(__FILE__), 'fp_pirep_admin_options');\r\n\t}", "function oxy_one_click_details()\n{\n return array(\n 'install_plugins_url' => esc_url(\n add_query_arg(\n array(\n 'page' => 'tgmpa-install-plugins'\n ),\n admin_url('themes.php')\n )\n )\n );\n}", "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t$orders = explode( ',', $_GET['post'] );\n\t\t$action = $_GET['type'];\n\t\t$number_of_orders = count( $orders );\n\t\t$order_loop = 0;\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\t// Loop through all orders (bulk printing).\n\t\tforeach ( $orders as $order_id ) {\n\t\t\t$order_loop++;\n\t\t\t$order = new WC_Order( $order_id );\n\t\t\tob_start();\n\t\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t\t$content .= ob_get_clean();\n\t\t\tif ( $number_of_orders > 1 && $order_loop < $number_of_orders ) {\n\t\t\t\t$content .= '<p class=\"pagebreak\"></p>';\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "function settings_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\n\t\t\t<h1><?php _e( 'Is Varnish Working?', 'varnish-http-purge' ); ?></h1>\n\t\t\t\t\n\t\t\t<?php settings_errors(); ?>\n\n\t\t\t<form action=\"options.php\" method=\"POST\" ><?php\n\t\t\t\tsettings_fields( 'varnish-http-purge-url' );\n\t\t\t\tdo_settings_sections( 'varnish-url-settings' );\n\t\t\t\tsubmit_button( 'Check URL', 'primary');\n\t\t\t?></form>\n\n\t\t\t<form action=\"options.php\" method=\"POST\" ><?php\n\t\t\t\t// Only available if _not_ multisite\n\t\t\t\tif ( !is_multisite() ) {\n\t\t\t\t\tsettings_fields( 'varnish-http-purge-ip' );\n\t\t\t\t\tdo_settings_sections( 'varnish-ip-settings' );\n\t\t\t\t\tsubmit_button( 'Save IP', 'secondary');\n\t\t\t\t}\n\t\t\t?></form>\n\n\t\t</div>\n\t\t<?php\n\t}", "function theme_options_do_page() {\n\tglobal $select_options, $radio_options;\n\n\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t$_REQUEST['settings-updated'] = false;\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); echo \"<h2>\" . wp_get_theme() . __( ' Theme Options', 'gbteddybear' ) . \"</h2>\"; ?>\n\n\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t<div class=\"updated fade\"><p><strong><?php _e( 'Options saved', 'gbteddybear' ); ?></strong></p></div>\n\t\t<?php endif; ?>\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'gbteddybear_options' ); ?>\n\t\t\t<?php $options = get_option( 'gbteddybear_theme_options' ); ?>\n\n\t\t\t<table class=\"form-table\">\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Account Page ID', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[account_page_id]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[account_page_id]\" value=\"<?php esc_attr_e( $options['account_page_id'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Cart Page ID', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[cart_page_id]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[cart_page_id]\" value=\"<?php esc_attr_e( $options['cart_page_id'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Terms &amp; Conditions Page ID', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[tnc_page_id]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[tnc_page_id]\" value=\"<?php esc_attr_e( $options['tnc_page_id'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Gallery Page ID', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[gallery_page_id]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[gallery_page_id]\" value=\"<?php esc_attr_e( $options['gallery_page_id'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Submit Photo Page ID', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[submit_photo_page_id]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[submit_photo_page_id]\" value=\"<?php esc_attr_e( $options['submit_photo_page_id'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Celebrity Bear Page ID', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[celebrity_bear_page_id]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[celebrity_bear_page_id]\" value=\"<?php esc_attr_e( $options['celebrity_bear_page_id'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'All Bears Category ID', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[all_bears_category_id]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[all_bears_category_id]\" value=\"<?php esc_attr_e( $options['all_bears_category_id'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Customer Service Page ID', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[customer_service_page_id]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[customer_service_page_id]\" value=\"<?php esc_attr_e( $options['customer_service_page_id'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Facebook URL', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[facebook_url]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[facebook_url]\" value=\"<?php esc_attr_e( $options['facebook_url'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Twitter URL', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[twitter_url]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[twitter_url]\" value=\"<?php esc_attr_e( $options['twitter_url'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Pinterest URL', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[pinterest_url]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[pinterest_url]\" value=\"<?php esc_attr_e( $options['pinterest_url'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Google Plus URL', 'gbteddybear' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t <input id=\"gbteddybear_theme_options[google_plus_url]\" class=\"regular-text\" type=\"text\" name=\"gbteddybear_theme_options[google_plus_url]\" value=\"<?php esc_attr_e( $options['google_plus_url'] ); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t\n\t\t\t</table>\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e( 'Save Options', 'gbteddybear' ); ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t</div>\n\t<?php\n}", "public function settings_page_init() { \n register_setting(\n 'pu_settings_option_group', // Option group\n 'pu_settings_options', // Option name\n array( $this, 'sanitize_settings' ) // Sanitize\n );\n\n add_settings_section(\n 'pu_general_settings', // ID\n __( 'General', 'page-utils' ), // Title\n array( $this, 'pu_general_settings_section_info' ), // Callback\n 'pu-settings-admin' // Page\n ); \n\n add_settings_field(\n 'custom_css', // ID\n __( 'Custom CSS', 'page-utils' ), // Title \n array( $this, 'custom_css_field_callback' ), // Callback\n 'pu-settings-admin', // Page\n 'pu_general_settings' // Section \n ); \n\n add_settings_field(\n 'override_ga_id', // ID\n __( 'Override GA ID', 'page-utils' ), // Title \n array( $this, 'override_ga_id_field_callback' ), // Callback\n 'pu-settings-admin', // Page\n 'pu_general_settings' // Section \n ); \n\n add_settings_field(\n 'pu_ga_id', // ID\n __( 'Add GA ID', 'page-utils' ), // Title \n array( $this, 'pu_ga_id_field_callback' ), // Callback\n 'pu-settings-admin', // Page\n 'pu_general_settings' // Section \n ); \n\n add_settings_field(\n 'load_ga_type', // ID\n __( 'Load GA types', 'page-utils' ), // Title \n array( $this, 'load_ga_type_field_callback' ), // Callback\n 'pu-settings-admin', // Page\n 'pu_general_settings' // Section \n ); \n\n add_settings_field(\n 'exclude_current_post_sitemap', // ID\n __( 'Exclude current page / post', 'page-utils' ), // Title \n array( $this, 'exclude_current_post_sitemap_field_callback' ), // Callback\n 'pu-settings-admin', // Page\n 'pu_general_settings' // Section \n );\n\n // shortcodes docs\n add_settings_field(\n 'pu_shortcodes_docs', // ID\n __( '', 'page-utils' ), // Title \n array( $this, 'pu_shortcodes_docs_callback' ), // Callback\n 'pu-settings-admin', // Page\n 'pu_general_settings' // Section \n ); \n }", "function jig_init_settings_page(){\r\n\t\t\tadd_options_page(\r\n\t\t\t\t__('Justified Image Grid', 'jig_td'),\r\n\t\t\t\t__('Justified Image Grid', 'jig_td'),\r\n\t\t\t\t'manage_options',\r\n\t\t\t\tself::PAGE_NAME,\r\n\t\t\t\tarray($this, 'jig_build_settings_page')\r\n\t\t\t);\r\n\t\t}", "public function page_settings()\n\t\t{\n\t\t\tOmise_Page_Settings::render();\n\t\t}", "public function page_init()\n { \n register_setting(\n 'my_option_group', // Option group\n 'ew_options_data', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n __('EW CPT Settings','envato-world'), // Title\n array( $this, 'print_section_info' ), // Callback\n 'ew-cpt-setting-admin' // Page\n ); \n\n add_settings_field(\n 'token_number', // ID\n __('Envato Api Token ','envato-world'), // Title \n array( $this, 'token_number_callback' ), // Callback\n 'ew-cpt-setting-admin', // Page\n 'setting_section_id' // Section \n );\n \n add_settings_field(\n 'ew_product_cache_time', // ID\n __('Envato Product Cache Time','envato-world'), // Title \n array( $this, 'ew_product_cache_time_callback' ), // Callback\n 'ew-cpt-setting-admin', // Page\n 'setting_section_id' // Section \n );\n \n add_settings_field(\n 'ew_single_product_cache_time', // ID\n __('Envato Product Cache Time(single)','envato-world'), // Title \n array( $this, 'ew_single_product_cache_time_callback' ), // Callback\n 'ew-cpt-setting-admin', // Page\n 'setting_section_id' // Section \n ); \n\n add_settings_field(\n 'ew_portfolio_allowed_category', \n __('Allowed Category','envato-world'), \n array( $this, 'ew_portfolio_allowed_category_callback' ), \n 'ew-cpt-setting-admin', \n 'setting_section_id'\n );\n\n add_settings_field(\n 'ew_portfolio_schedule_update_time', \n __('Schedule time','envato-world'), \n array( $this, 'ew_portfolio_schedule_update_time_callback' ), \n 'ew-cpt-setting-admin', \n 'setting_section_id'\n );\n\n add_settings_field(\n 'title', \n __('Title','envato-world'), \n array( $this, 'title_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n }", "public function my_plugin_settings_page()\n {\n $meta = $this->getMetaData();\n\n if (empty($meta['last_update'])) {\n $lastText = 'Never';\n } else {\n $lastText = date('jS F Y h:i:s A', $meta['last_update']['timestamp']) . ' UTC, ';\n\n switch ($meta['last_update']['status']) {\n case 200:\n $lastText .= 'successful';\n break;\n\n case 404:\n $lastText .= 'wrong key';\n break;\n\n case 500:\n $lastText .= 'server error';\n break;\n\n case 504:\n $lastText .= 'network error';\n break;\n\n default:\n $lastText .= 'result unknown';\n }\n }\n ?>\n <div class=\"wrap\">\n <h2>Drago Project Details</h2>\n\n <p> Login to your <a target=\"_blank\" href=\"https://www.drago.mn/\">Drago</a> Dashboard to get your project key</p>\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'my-plugin-settings-group' ); ?>\n <?php do_settings_sections( 'my-plugin-settings-group' ); ?>\n\n <?php if ($meta['status']) {\n echo '<p>Available languages: ' . implode(', ', $meta['extra_languages']) . '</p>';\n echo '<p>Original language: ' . $meta['original_language'] . '</p>';\n } ?>\n\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\">Project Key</th>\n <td><input type=\"text\" size=\"40\" name=\"drago_key\" value=\"<?php echo esc_attr( get_option('drago_key') ); ?>\" /></td>\n </tr>\n </table>\n\n <?php submit_button(); ?>\n </form>\n\n <p>\n Last text upload: <?php echo $lastText; ?>\n <button class=\"button\">Force full re-upload</button>\n </p>\n\n <a target=\"_blank\" href=\"http://wordpress.org/support/view/plugin-reviews/localizejs?rate=5#postform\">\n <?php _e( 'Love Drago? Help spread the word by rating us 5★ on WordPress.org', 'drago' ); ?>\n </a>\n </div>\n <?php\n }", "public function cookies_settings_page() {\n \t$page_title = __('Custom Cookies Settings Page', 'set-cookies');\n \t$menu_title = __('Custom Cookies', 'set-cookies');\n \t$capability = 'manage_options';\n \t$slug = 'custom_cookies';\n \t$callback = array( $this, 'cookies_settings_page_content' );\n \t$icon = plugin_dir_url( __FILE__ ) . 'assets/images/cookie.png';\n \t$position = 100;\n \tadd_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position );\n }", "public function options_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<form action='options.php' method='post'>\n\n\t\t\t\t<h1>\n\t\t\t\t\t<?php esc_html_e( 'Coinpayments Settings', 'stats-dashboard-for-coinpayments' ); ?>\n\t\t\t\t</h1>\n\n\t\t\t\t<?php\n\t\t\t\tsettings_fields( 'coinpayments-settings' );\n\t\t\t\tdo_settings_sections( 'coinpayments-settings' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function register_settings_page() {\n\t\tadd_options_page(\n\t\t\t__( 'Coral Settings', 'coral-project-talk' ),\n\t\t\t__( 'Coral Settings', 'coral-project-talk' ),\n\t\t\t'manage_options',\n\t\t\t'talk-settings',\n\t\t\tarray( $this, 'render_settings_page' )\n\t\t);\n\t}", "public function markupSettingsPage() {\n\t\t\t$rasrMetaBoxID = Skylabapps_GoogleMapMarker_Core::PREFIX . 'rasr-plug';\n\t\t\t$rasrMetaBoxPage = Skylabapps_GoogleMapMarker_Core::PREFIX . 'settings'; // @todo better var name\n\t\t\t$hidden = get_hidden_meta_boxes( $rasrMetaBoxPage );\n\t\t\t$hidden_class = in_array( $rasrMetaBoxPage, $hidden ) ? ' hide-if-js' : '';\n\t\t\t//$show_api_key_notice = empty( $this->mapApiKey ) || empty( $this->geocodingApiKey );\n\t\t\t$show_api_key_notice = empty( $this->mapApiKey );\n\n\t\t\t// @todo some of above may not be needed\n\n\t\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t\trequire_once( dirname( __FILE__ ) . '/views/settings.php' );\n\t\t\t} else {\n\t\t\t\twp_die( 'Access denied.' );\n\t\t\t}\n\t\t}", "public function plugin_settings_page(){\r\n\t\r\n\t\techo \"<style> \r\n\t\t.form-table{ clear:left; } \r\n\t\t.nav-tab-wrapper{ margin-bottom:0px; }\r\n\t\t</style>\";\r\n\t\t\r\n\t\techo $this->display_social_media(); \r\n\t\t\r\n echo '<div class=\"wrap\" >';\r\n\t\t\r\n\t\t\techo '<div id=\"icon-'.$this->page_icon.'\" class=\"icon32\"><br /></div>';\r\n\t\t\t\r\n\t\t\techo \"<h2>\".self::$plugin_title.\" Plugin Settings</h2>\";\r\n\t\t\t\r\n\t\t\t//$this->show_backup_manager_link();\r\n\t\t\t$this->show_do_backup_button();\r\n\t\t\t\r\n\t\t\t$this->settings_page->show_tab_nav();\r\n\t\t\t\r\n\t\t\techo '<div id=\"poststuff\" class=\"metabox-holder has-right-sidebar\">';\r\n\t\t\t\r\n\t\t\t\techo '<div class=\"inner-sidebar\">';\r\n\t\t\t\t\techo '<div id=\"side-sortables\" class=\"meta-box-sortabless ui-sortable\" style=\"position:relative;\">';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$this->settings_page->show_sidebar();\r\n\t\t\t\t\t\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\r\n\t\t\t\techo '<div class=\"has-sidebar\" >';\t\t\t\r\n\t\t\t\t\techo '<div id=\"post-body-content\" class=\"has-sidebar-content\">';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->settings_page->show_settings_forms();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//$this->show_do_backup_button();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->show_ftp_tools();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\t\r\n\t\t\techo '</div>';\r\n\t\t\t\r\n echo '</div>';\r\n\t\t\r\n }", "function yb_add_options_page() {\n\t/* create main yb options page */\n\tacf_add_options_page(array(\n\t\t'page_title' => 'yb Site Options',\n\t\t'menu_title' => 'Site Options',\n\t\t'menu_slug' => 'yb-options',\n\t\t'capability' => 'edit_posts',\n\t\t'redirect' => false\n\t));\n\n\t/* create settings sub page */\n\tacf_add_options_sub_page(array(\n\t\t'page_title' => 'Miscellaneous',\n\t\t'menu_title' => 'Miscellaneous',\n\t\t'parent_slug' => 'yb-options',\n\t));\n}", "function sopa_options_page_callback() {\r\n\tif ( ! current_user_can( 'manage_options' ) )\r\n\t\twp_die( 'You do not have sufficient permissions to view this page.' );\r\n?>\r\n<div class=\"wrap\">\r\n\t<h2><?php _e( 'SOPA Blackout Options' , 'sopa-blackout-plugin') ?></h2>\r\n <form method=\"post\" action=\"options.php\">\r\n <?php settings_fields( 'sopa_options_page' ) ?>\r\n <?php do_settings_sections( 'sopa_options_page' ) ?>\r\n <p><input type=\"submit\" class=\"button-primary\" value=\"<?php _e( 'Save Changes' , 'sopa-blackout-plugin') ?>\"/></p>\r\n </form>\r\n</div>\r\n<?php\r\n}", "function all_settings_link() {\nadd_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');\n}", "function options_page() {\t\t\n\t\tadd_options_page( \n\t\t\t__( 'Dashboard Access Settings', 'remove_dashboard_access' ),\n\t\t\t__( 'Dashboard Access', 'remove_dashboard_access' ),\n\t\t\t'manage_options',\n\t\t\t'dashboard-access',\n\t\t\tarray( $this, 'options_page_cb' )\n\t\t);\n\t}", "function add_toplevel_page() {\n?>\n<div>\n <h2> The Home Page Promotion Icon Row </h2>\n <p> Here is where you can upload your own personal icon with text to display beneath it. These will show up in order as listed below in a row below your picture and text. </p>\n <!-- options.php necessary for wordpress -->\n <form action=\"options.php\" method=\"post\">\n <!-- setting the settings group name, register_setting first arg must match this group name -->\n <?php settings_fields('plugin_options'); ?>\n <!-- slug name of page whose settings sections to be output, match add_settings_section fourth arg -->\n <?php do_settings_sections('plugin'); ?>\n <input name=\"Submit\" type=\"submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\n </form>\n</div>\n<?php\n}", "function security_example_nonces_display_settings_page() {\n\n\t// check if user is allowed access\n\tif ( ! current_user_can( 'manage_options' ) ) return;\n\n\t?>\n\n\t<div class=\"wrap\">\n\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\n\t\t<?php myplugin_form_favorite_music(); ?>\n\t\t<?php myplugin_process_favorite_music(); ?>\n\n\t</div>\n\n<?php\n\n}", "function custom_settings_page() { ?>\n<div class=\"wrap\">\n<h1>Custom Settings</h1>\n<form method=\"post\" action=\"options.php\">\n<?php settings_fields( 'section' );\ndo_settings_sections( 'theme-options' );\nsubmit_button(); ?>\n</form>\n</div>\n<?php }", "function custom_settings_page() { ?>\n<div class=\"wrap\">\n<h1>Custom Settings</h1>\n<form method=\"post\" action=\"options.php\">\n<?php settings_fields( 'section' );\ndo_settings_sections( 'theme-options' );\nsubmit_button(); ?>\n</form>\n</div>\n<?php }", "function options_page() {\n\t\t\tinclude(\"settings.php\");\n }", "public function fone_create_plugin_settings_page() {\n \t$page_title = 'New York Times Data Block Settings ';\n \t$menu_title = 'NYT Top Stories';\n \t$capability = 'manage_options';\n \t$slug = 'fone_nyt_top_stories';\n \t$callback = array( $this, 'fone_plugin_settings_page_content' );\n \t$icon = 'dashicons-admin-plugins';\n \t$position = 100;\n\n \tadd_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position );\n }", "public function createThemeOptionsPage(): void\n\t{\n\t\tif (\\function_exists('acf_add_options_page')) {\n\t\t\t\\acf_add_options_page(\n\t\t\t\t[\n\t\t\t\t\t'page_title' => \\esc_html__('General Settings', 'eightshift-libs'),\n\t\t\t\t\t'menu_title' => \\esc_html__('Theme Options', 'eightshift-libs'),\n\t\t\t\t\t'menu_slug' => static::THEME_OPTIONS_SLUG,\n\t\t\t\t\t'capability' => static::THEME_OPTIONS_CAPABILITY,\n\t\t\t\t\t'redirect' => false,\n\t\t\t\t\t'icon_url' => 'dashicons-welcome-view-site',\n\t\t\t\t\t'autoload' => true,\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\t}", "function start_add_options_page() {\n\tacf_add_options_page( array(\n\t\t'page_title' => 'Site Options',\n\t\t'menu_slug' => 'start-site-options',\n\t) );\n}", "function _s_theme_options_add_page() {\n\t$theme_page = add_theme_page(\n\t\t__( 'Honey Lake Options', '_s' ), // Name of page\n\t\t__( 'Honey Lake Options', '_s' ), // Label in menu\n\t\t'edit_theme_options', // Capability required\n\t\t'theme_options', // Menu slug, used to uniquely identify the page\n\t\t'_s_theme_options_render_page' // Function that renders the options page\n\t);\n}", "public function settings_admin_page_callback()\n {\n $instance = Custom_Settings_Page_Api::instance();\n $instance->option_name('mo_leads');\n $instance->page_header(__('Lead Bank', 'mailoptin'));\n $this->register_core_settings($instance);\n $instance->build(true);\n }", "function options_page_fn() {\r\n?>\r\n\t<div class=\"wrap\">\r\n\t\t<div class=\"icon32\" id=\"icon-options-general\"><br></div>\r\n\t\t<h2>Website Under Construction Settings</h2>\r\n\t\t<form action=\"options.php\" method=\"post\">\r\n\t\t<?php settings_fields('under_construction_options'); ?>\r\n\t\t<?php do_settings_sections('under_construction'); ?>\r\n\t\t<p class=\"submit\">\r\n\t\t\t<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\r\n\t\t</p>\r\n\t\t</form>\r\n\t</div>\r\n<?php\r\n}", "public function page_settings() {\n add_option('datadwell_domain', '', null, true);\n\t\tadd_option('datadwell_apikey', '', null, true);\n\t\tinclude $this->dir . '/views/settings.php';\n\t\tinclude $this->dir . '/views/demo.php';\n\t}", "public function page_options() {\n\t\tinclude( plugin_dir_path( __FILE__ ) . 'partials/wp-tesseract-admin-display.php' );\n\t}", "function manu_theme_options_add_page() {\n add_theme_page(__('Opciones del tema', 'manu'), __('Opciones del tema', 'manu'), 'edit_theme_options', 'theme_options', 'manu_theme_options_do_page');\n}", "function theme_options_add_page() {\n\tadd_theme_page( __( 'Theme Options', 'bunchtheme' ), __( 'Theme Options', 'bunchtheme' ), 'edit_theme_options', 'theme_options', 'theme_options_do_page' );\n}", "function reading_time_ym_settings_page_markup()\n{\n if ( !current_user_can('manage_options') ) {\n return;\n }\n include( WPPLUGIN_DIR . 'templates/admin/settings-page.php');\n}", "function storms_define_pagseguro_options() {\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$woocommerce_pagseguro_settings = array(\n\n\t\t\t\t'enabled' \t\t\t\t=> 'yes',\n\t\t\t\t'title' \t\t\t\t=> '',\n\t\t\t\t'description' \t\t\t=> \"Pagar com PagSeguro, a forma mais segura de comprar.\\nDiversas opções de cartões para você pagar sua compra.\\nPague também utilizando boleto bancário.\",\n\n\t\t\t\t// Integração\n\t\t\t\t'integration' \t\t\t=> '',\n\t\t\t\t'method' \t\t\t\t=> 'transparent',\n\n\t\t\t\t'email' \t\t\t\t=> '', \t\t// TODO Add email\n\t\t\t\t'token' \t\t\t\t=> '', \t\t// TODO Add token\n\n\t\t\t\t'sandbox' \t\t\t\t=> 'no', \t// TODO PROD: 'no' / DEV and TST: 'yes'\n\t\t\t\t'sandbox_email' \t\t=> '', \t\t// TODO Add sandbox email\n\t\t\t\t'sandbox_token' \t\t=> '', \t\t// TODO Add sandbox token\n\n\t\t\t\t// Opções do Checkout Transparente\n\t\t\t\t'transparent_checkout' \t=> '',\n\t\t\t\t'tc_credit' \t\t\t=> 'yes',\n\t\t\t\t'tc_transfer' \t\t\t=> 'yes',\n\t\t\t\t'tc_ticket' \t\t\t=> 'yes',\n\t\t\t\t'tc_ticket_message' \t=> 'yes',\n\n\t\t\t\t// Comportamento da integração\n\t\t\t\t'behavior' \t\t\t\t=> '',\n\t\t\t\t'send_only_total' \t\t=> 'no',\n\t\t\t\t'invoice_prefix' \t\t=> 'StormseComm-', // TODO Change this\n\n\t\t\t\t// Testes\n\t\t\t\t'testing' \t\t\t\t=> '',\n\t\t\t\t'debug' \t\t\t\t=> 'yes',\n\n\t\t\t);\n\n\t\t\tif( 'production' !== wp_get_environment_type() ) {\n\t\t\t\t$woocommerce_pagseguro_settings['sandbox'] = 'yes';\n\t\t\t}\n\n\t\t\tupdate_option( 'woocommerce_pagseguro_settings', $woocommerce_pagseguro_settings );\n\t\t}", "function sharei_wp_options_page()\n { ?>\n <div>\n <?php screen_icon(); ?>\n <h2>تنظیمات افزونه Share it Wordpress</h2>\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'sharei_wp_options_group' ); ?>\n <p>شما در اینجا میتونید تنظیمات توکن تلگرام و فلان و این چیزا را انجام دهید</p>\n <table>\n <tr valign=\"top\">\n <th scope=\"row\"><label for=\"sharei_wp_option_token\">توکن</label></th>\n <td><input type=\"text\" id=\"sharei_wp_option_token\" name=\"sharei_wp_option_token\" value=\"<?php echo get_option('sharei_wp_option_token'); ?>\" /></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><label for=\"sharei_wp_option_username\">یوزرنیم</label></th>\n <td><input type=\"text\" id=\"sharei_wp_option_username\" name=\"sharei_wp_option_username\" value=\"<?php echo get_option('sharei_wp_option_username'); ?>\" /></td>\n </tr>\n </table>\n <?php submit_button(); ?>\n </form>\n </div>\n <?php }", "public function show_settings() {\n\t\twoocommerce_admin_fields( $this->get_settings() );\n\t}", "public function create_plugin_settings_page()\n {\n // Add the menu item and page\n $page_title = 'My Instagram API Settings';\n $menu_title = 'My Instagram API';\n $capability = 'manage_options';\n $slug = $this->name . '_fields';\n $callback = array($this, 'plugin_settings_page_content');\n $icon = 'dashicons-admin-plugins';\n $position = 100;\n add_submenu_page('options-general.php', $page_title, $menu_title, $capability, $slug, $callback);\n }", "public static function settings_pages(){\n\t\treturn apply_filters('em_ml_admin_settings_pages', array('events-manager-options'));\n\t}", "public function plugin_settings_page_content()\n {\n\n echo '\n <div class=\"wrap\">\n <h2>My Instagram API Settings</h2>\n <form method=\"post\" action=\"options.php\">\n ';\n\n settings_fields($this->name . '_fields');\n do_settings_sections($this->name . '_fields');\n\n $url = get_bloginfo('url') . '/wp-json/' . $this->name . '/' . $this->version . '/posts';\n echo \"You can find your Instagram posts here: <a target='_blank' href='{$url}'>{$url}</a>\";\n\n submit_button();\n\n echo '\n </form>\n </div>\n ';\n }", "function wpplugin_settings_page_markup()\n{\n if ( !current_user_can('manage_options') ) {\n return;\n }\n ?>\n <div class=\"wrap\">\n <h1><?php esc_html_e( get_admin_page_title() ); ?></h1>\n <p><?php esc_html_e( 'Some content.', 'wpplugin' ); ?></p>\n </div>\n <?php\n}", "function admin_menu() {\n\t\tadd_options_page( esc_html__( 'LivePress Settings', 'livepress' ), esc_html__( 'LivePress', 'livepress' ), 'manage_options', 'livepress-settings', array( $this, 'render_settings_page' ) );\n\t}", "function bppc_settings_page() {\n\t\n\t$all_pages = get_pages(); ?>\n\t\n\t<div class=\"wrap\">\n\t\t<h2><?php _e( 'Photo Contest Settings' ); ?></h2>\n\t\t\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t<?php @settings_fields( 'bppc_options' ); ?>\n\t\t\t<?php @do_settings_fields( 'bppc_options' ); ?>\n\t\t\t\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_login_page\"><?php _e( 'Photo Login Page' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"bppc_login_page\" id=\"bppc_login_page\">\n\t\t\t\t\t\t\t<option value=\"\"><?php _e( '&mdash; Select One &mdash;' ); ?></option>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$login_page = get_option( 'bppc_login_page', 0 );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach( $all_pages as $page ) {\n\t\t\t\t\t\t\t\t\t$selected = ( $login_page == $page->ID ) ? ' selected' : '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tprintf( \n\t\t\t\t\t\t\t\t\t\t'<option value=\"%1$s\"%2$s>%3$s</option>', \n\t\t\t\t\t\t\t\t\t\t$page->ID, \n\t\t\t\t\t\t\t\t\t\t$selected, \n\t\t\t\t\t\t\t\t\t\t$page->post_title \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</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_photo_submission_page\"><?php _e( 'Photo Submission Page' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"bppc_photo_submission_page\" id=\"bppc_photo_submission_page\">\n\t\t\t\t\t\t\t<option value=\"\"><?php _e( '&mdash; Select One &mdash;' ); ?></option>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$photo_submission_page = get_option( 'bppc_photo_submission_page', 0 );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach( $all_pages as $page ) {\n\t\t\t\t\t\t\t\t\t$selected = ( $photo_submission_page == $page->ID ) ? ' selected' : '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tprintf( \n\t\t\t\t\t\t\t\t\t\t'<option value=\"%1$s\"%2$s>%3$s</option>', \n\t\t\t\t\t\t\t\t\t\t$page->ID, \n\t\t\t\t\t\t\t\t\t\t$selected, \n\t\t\t\t\t\t\t\t\t\t$page->post_title \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</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_photo_submission_thankyou_page\"><?php _e( 'Photo Submission Thank You Page' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"bppc_photo_submission_thankyou_page\" id=\"bppc_photo_submission_thankyou_page\">\n\t\t\t\t\t\t\t<option value=\"\"><?php _e( '&mdash; Select One &mdash;' ); ?></option>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$post_photo_submission_page = get_option( 'bppc_photo_submission_thankyou_page', 0 );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach( $all_pages as $page ) {\n\t\t\t\t\t\t\t\t\t$selected = ( $post_photo_submission_page == $page->ID ) ? ' selected' : '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tprintf( \n\t\t\t\t\t\t\t\t\t\t'<option value=\"%1$s\"%2$s>%3$s</option>', \n\t\t\t\t\t\t\t\t\t\t$page->ID, \n\t\t\t\t\t\t\t\t\t\t$selected, \n\t\t\t\t\t\t\t\t\t\t$page->post_title \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</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_photos_per_page\"><?php _e( 'Number of Photos Per Page' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"number\" name=\"bppc_photos_per_page\" id=\"bppc_photos_per_page\" min=\"3\" step=\"3\" value=\"<?php echo get_option( 'bppc_photos_per_page', 24 ); ?>\">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_entry_fee\"><?php _e( 'Entry Fee' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"number\" name=\"bppc_entry_fee\" id=\"bppc_entry_fee\" min=\"0\" step=\"50\" value=\"<?php echo get_option( 'bppc_entry_fee', 0 ); ?>\">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_payment_success_page\"><?php _e( 'Payment Success Page' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"bppc_payment_success_page\" id=\"bppc_payment_success_page\">\n\t\t\t\t\t\t\t<option value=\"\"><?php _e( '&mdash; Select One &mdash;' ); ?></option>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$payment_success_page = get_option( 'bppc_payment_success_page', 0 );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach( $all_pages as $page ) {\n\t\t\t\t\t\t\t\t\t$selected = ( $payment_success_page == $page->ID ) ? ' selected' : '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tprintf( \n\t\t\t\t\t\t\t\t\t\t'<option value=\"%1$s\"%2$s>%3$s</option>', \n\t\t\t\t\t\t\t\t\t\t$page->ID, \n\t\t\t\t\t\t\t\t\t\t$selected, \n\t\t\t\t\t\t\t\t\t\t$page->post_title \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</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_payment_failure_page\"><?php _e( 'Payment Failure Page' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"bppc_payment_failure_page\" id=\"bppc_payment_failure_page\">\n\t\t\t\t\t\t\t<option value=\"\"><?php _e( '&mdash; Select One &mdash;' ); ?></option>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$payment_failure_page = get_option( 'bppc_payment_failure_page', 0 );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach( $all_pages as $page ) {\n\t\t\t\t\t\t\t\t\t$selected = ( $payment_failure_page == $page->ID ) ? ' selected' : '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tprintf( \n\t\t\t\t\t\t\t\t\t\t'<option value=\"%1$s\"%2$s>%3$s</option>', \n\t\t\t\t\t\t\t\t\t\t$page->ID, \n\t\t\t\t\t\t\t\t\t\t$selected, \n\t\t\t\t\t\t\t\t\t\t$page->post_title \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</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_payu_merchant_key\"><?php _e( 'PayU Merchant Key' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" name=\"bppc_payu_merchant_key\" id=\"bppc_payu_merchant_key\"value=\"<?php echo get_option( 'bppc_payu_merchant_key', '' ); ?>\">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_payu_salt\"><?php _e( 'PayU Merchant Salt' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"text\" name=\"bppc_payu_salt\" id=\"bppc_payu_salt\"value=\"<?php echo get_option( 'bppc_payu_salt', '' ); ?>\">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"bppc_payu_mode\"><?php _e( 'PayU Sandbox Mode' ); ?></label>\n\t\t\t\t\t</th>\n\t\t\t\t\t\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"bppc_payu_mode\" id=\"bppc_payu_mode\" <?php checked( get_option( 'bppc_payu_mode', '' ), 'on' ); ?>>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t\n\t\t\t<?php @submit_button(); ?>\n\t\t</form>\n\t</div> <?php\n\t\n}", "function cf_cap_add_settings_page()\n{\n\tadd_options_page(\n\t\t'Check Active Plugins',\n\t\t'Check Active Plugins',\n\t\t'manage_options',\n\t\t'cf-check-active-plugins',\n\t\t'cf_cap_render_plugin_settings_page'\n\t);\n}", "public function settings_page() {\n\t\tadd_options_page(\n\t\t __( 'Upload Scanner Options', 'upload-scanner' ),\n\t\t __( 'Upload Scanner', 'upload-scanner' ),\n\t\t 'manage_options', 'upload-scanner-plugin', array( $this, 'plugin_options' )\n\t\t);\t\n\t}", "public function page_init() {\n\t\tregister_setting(\n\t\t\t'w4p_options_group', /* Option group */\n\t\t\t'w4p_social_profiles', /* Option name */\n\t\t\tarray( $this, 'sanitize_profiles' ) /* Sanitize */\n\t\t);\n\n\t\tregister_setting(\n\t\t\t'w4p_options_group', /* Option group */\n\t\t\t'w4p_contacts_address' /* Option name */\n\t\t);\n\t\tregister_setting(\n\t\t\t'w4p_options_group', /* Option group */\n\t\t\t'w4p_contacts_phones' /* Option name */\n\t\t);\n\t\tregister_setting(\n\t\t\t'w4p_options_group', /* Option group */\n\t\t\t'w4p_contacts_skype' /* Option name */\n\t\t);\n\n\t\tregister_setting(\n\t\t\t'w4p_options_group', /* Option group */\n\t\t\t'w4p_copyright', /* Option name */\n\t\t\tarray( $this, 'sanitize_copyright' ) /* Sanitize */\n\t\t);\n\n\t\tadd_settings_section(\n\t\t\t'setting_section_id', /* ID */\n\t\t\t__( 'W4P Theme Options', 'w4ptheme' ), /* Title */\n\t\t\tarray( $this, 'print_section_info' ), /* Callback */\n\t\t\t'theme_options' /* Page */\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'w4p_social_profiles', /* ID */\n\t\t\t__( 'Social Profiles', 'w4ptheme' ), /* Title */\n\t\t\tarray( $this, 'social_profile_callback' ), /* Callback */\n\t\t\t'theme_options', /* Page */\n\t\t\t'setting_section_id' /* Section */\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'w4p_contacts',\n\t\t\t__( 'Contacts', 'w4ptheme' ),\n\t\t\tarray( $this, 'contacts_callback' ),\n\t\t\t'theme_options',\n\t\t\t'setting_section_id'\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'w4p_copyright',\n\t\t\t__( 'Copyright', 'w4ptheme' ),\n\t\t\tarray( $this, 'copyright_callback' ),\n\t\t\t'theme_options',\n\t\t\t'setting_section_id'\n\t\t);\n\t}", "function custom_settings_page() { ?>\n\t<div class=\"wrap\">\n\t\t<h1>Custom Settings</h1>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php\n settings_fields('section');\n do_settings_sections('theme-options'); \n submit_button(); \n ?>\n\t\t</form>\n\t</div>\n\t<?php }", "function manu_theme_options_do_page() {\n\n\tif (!isset($_REQUEST['settings-updated']))\n\t\t$_REQUEST['settings-updated'] = false;\n\t?>\n \n <div class=\"wrap\">\n <?php\n /**\n * < 3.4 Backward Compatibility\n */\n ?>\n <?php $theme_name = function_exists('wp_get_theme') ? wp_get_theme() : get_current_theme(); ?>\n <?php screen_icon(); echo \"<h2>\" . $theme_name .\" \". __('Opciones del tema', 'manu') . \"</h2>\"; ?>\n\n\t\t<?php if (false !== $_REQUEST['settings-updated']) : ?>\n\t\t<div class=\"updated fade\"><p><strong><?php _e('Opciones guardadas', 'manu'); ?></strong></p></div>\n\t\t<?php endif; ?>\n\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields('manu_options'); ?>\n <?php $options = get_option('manu_theme_options'); ?>\n \n <div id=\"rwd\" class=\"grid col-940\">\n <h3 class=\"rwd-toggle\"><a href=\"#\"><?php _e('Opciones Generales sitio - Redes Sociales', 'manu'); ?></a></h3>\n <div class=\"rwd-container\">\n <div class=\"rwd-block\">\n <?php\n /**\n * Textos para footer\n */\n ?>\n <div class=\"grid col-220\"><?php _e('Facebook', 'manu'); ?></div><!-- end of .grid col-300 -->\n <div class=\"grid col-700 fit\">\n <input id=\"manu_theme_options[facebook]\" class=\"regular-text\" type=\"text\" name=\"manu_theme_options[facebook]\" value=\"<?php if (!empty($options['facebook'])) echo esc_attr($options['facebook']); ?>\" />\n <label class=\"description small-text\" for=\"manu_theme_options[facebook]\"><?php _e('Ingrese enlace para facebook', 'manu'); ?></label>\n </div><!-- end of .grid col-620 -->\n \t\t\t\t\t<div class=\"grid col-220\"><?php _e('Twitter', 'manu'); ?></div><!-- end of .grid col-300 -->\n <div class=\"grid col-700 fit\">\n <input id=\"manu_theme_options[twitter]\" class=\"regular-text\" type=\"text\" name=\"manu_theme_options[twitter]\" value=\"<?php if (!empty($options['twitter'])) echo esc_attr($options['twitter']); ?>\" />\n <label class=\"description small-text\" for=\"manu_theme_options[twitter]\"><?php _e('Ingrese enlace para twitter', 'manu'); ?></label>\n </div><!-- end of .grid col-620 -->\n <div class=\"grid col-220\"><?php _e('Youtube', 'manu'); ?></div><!-- end of .grid col-300 -->\n <div class=\"grid col-700 fit\">\n <input id=\"manu_theme_options[youtube]\" class=\"regular-text\" type=\"text\" name=\"manu_theme_options[youtube]\" value=\"<?php if (!empty($options['youtube'])) echo esc_attr($options['youtube']); ?>\" />\n <label class=\"description small-text\" for=\"manu_theme_options[youtube]\"><?php _e('Ingrese enlace para youtube', 'manu'); ?></label>\n </div><!-- end of .grid col-620 -->\n <div class=\"grid col-220\"><?php _e('Spotify', 'manu'); ?></div><!-- end of .grid col-300 -->\n <div class=\"grid col-700 fit\">\n <input id=\"manu_theme_options[spotify]\" class=\"regular-text\" type=\"text\" name=\"manu_theme_options[spotify]\" value=\"<?php if (!empty($options['spotify'])) echo esc_attr($options['spotify']); ?>\" />\n <label class=\"description small-text\" for=\"manu_theme_options[spotify]\"><?php _e('Ingrese enlace para spotify', 'manu'); ?></label>\n <p class=\"submit\">\n <input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Guardar opciones', 'manu'); ?>\" />\n </p>\n </div><!-- end of .grid col-620 -->\n </div><!-- end of .rwd-block -->\n </div><!-- end of .rwd-container -->\n </div><!-- end of .grid col-940 -->\n </form>\n </div>\n <?php\n}", "public function create_admin_settings_page() {\n\t}", "function ipm_admin_menu_settings() {\r\n\tif (function_exists('add_options_page')) {\r\n\t\tadd_options_page('IPM Settings', 'IPManager Connector Settings', 8, basename(__FILE__) . '_settings', 'ipm_subpanel_settings');\r\n\t}\r\n}", "public function add_settings_page() {\n add_submenu_page(\n 'options-general.php',\n __( 'Neuralab Next Web Page Cache', 'nwpp' ),\n __( 'Next Web Page Cache', 'nwpp' ),\n 'manage_options',\n $this->slug,\n [$this, 'do_settings_page']\n );\n }", "function sc_options_page(){\n add_menu_page(\n __('SC Options', 'sc'), // $page_title\n __('SC Options', 'sc'), // $menu_title\n 'manage_options', // $capability\n 'sc_custom_options', // $menu_slug\n 'sc_options_page_html' // $function\n );\n}", "public function settings_screen () {\n\t\t$hidden_fields = array( 'page' => 'woothemes' );\n\t\tif ( isset( $_GET['tab'] ) && '' != $_GET['tab'] ) $hidden_fields['tab'] = sanitize_title_with_dashes( $_GET['tab'] );\n\n\t\tdo_action( 'wf_screen_get_header', 'woothemes', 'themes' );\n\t\t$this->_field_obj->__set( 'has_tabs', true );\n\t\t$this->_field_obj->__set( 'extra_hidden_fields', $hidden_fields );\n\t\t$this->_field_obj->init_tabs();\n\t\t$this->_field_obj->render_tabs();\n\t\t$this->_field_obj->render();\n\t\tdo_action( 'wf_screen_get_footer', 'woothemes', 'themes' );\n\t}", "function theme_options_add_page() {\n\tadd_theme_page( __( 'BlueMasters Options' ), __( 'BlueMasters Options' ), 'edit_theme_options', 'theme_options', 'theme_options_do_page' );\n}", "function setup_settings_page()\n {\n // Add settings sections in settings page\n add_settings_section(\n \"menuhide\",\n \"Hide from menu\",\n null,\n \"customize-wp-backend\"\n );\n //Iterating over the list of items in protected array\n foreach($this->hideMenuItems as $menuItem => $label )\n {\n add_settings_field(\n $menuItem, //(string) (Required) Slug-name to identify the field. Used in the 'id' attribute of tags.\n $label, //(string) (Required) Formatted title of the field. Shown as the label for the field during output.\n array($this, \"hide\"), //(callable) (Required) Function that fills the field with the desired form inputs. The function should echo its output.\n \"customize-wp-backend\", //(string) (Required) The slug-name of the settings page on which to show the section (general, reading, writing, ...).\n \"menuhide\", //(string) (Optional) The slug-name of the section of the settings page in which to show the box.\n array(\n $menuItem\n )\n );\n // Register settings in DB\n register_setting(\n \"menuhide\",\n $menuItem\n );\n }\n }", "function custom_settings_page() { ?>\n\t<div class=\"wrap\">\n\t <h1>Custom Settings</h1>\n\t <form method=\"post\" action=\"options.php\">\n\t\t <?php\n\t\t\t settings_fields( 'section' );\n\t\t\t do_settings_sections( 'theme-options' ); \n\t\t\t submit_button(); \n\t\t ?> \n\t </form>\n\t</div>\n <?php }", "public function view_settings_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e( 'Pantheon Page Cache', 'pantheon-cache' ); ?></h2>\n\n\t\t\t<?php if ( ! empty( $_GET['cache-cleared'] ) && 'true' == $_GET['cache-cleared'] ) : ?>\n\t\t\t\t<div class=\"updated below-h2\">\n\t\t\t\t\t<p><?php esc_html_e( 'Site cache flushed.', 'pantheon-cache' ); ?></p>\n\t\t\t\t</div>\n\t\t\t<?php endif ?>\n\n\t\t\t<?php if ( class_exists( 'Pantheon_Advanced_Page_Cache\\Purger' ) ) : ?>\n\t\t\t\t<div class=\"notice notice-success\"><p><?php echo sprintf( __( 'Pantheon Advanced Page Cache activated. <a target=\"_blank\" href=\"%s\">Learn more</a>', 'pantheon-cache' ), 'https://github.com/pantheon-systems/pantheon-advanced-page-cache' ); ?></p></div>\n\t\t\t<?php else :\n\t\t\t\t?>\n\t\t\t\t<div class=\"notice notice-warning\"><p><?php echo sprintf( __( 'Want to automatically clear related pages when you update content? Install <a href=\"%s\">Pantheon Advanced Page Cache</a>.', 'pantheon-cache' ), admin_url( 'plugin-install.php?s=pantheon+advanced+page+cache&tab=search&type=term&action=pantheon-load-infobox' ) ); ?></p></div>\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php\n\t\t\t/**\n\t\t\t * Permits the Pantheon Advanced Page Cache plugin to add\n\t\t\t * supplemental text.\n\t\t\t */\n\t\t\tdo_action( 'pantheon_cache_settings_page_top' ); ?>\n\n\t\t\t<?php if ( apply_filters( 'pantheon_cache_allow_clear_all', true ) ) : ?>\n\n\t\t\t\t<form action=\"admin-post.php\" method=\"POST\">\n\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"pantheon_cache_flush_site\" />\n\t\t\t\t\t<?php wp_nonce_field( 'pantheon-cache-clear-all', 'pantheon-cache-nonce' ); ?>\n\t\t\t\t\t<h3><?php _e( 'Clear Site Cache', 'pantheon-cache' ); ?></h3>\n\t\t\t\t\t<p><?php _e( 'Use with care. Clearing the entire site cache will negatively impact performance for a short period of time.', 'pantheon-cache' ); ?></p>\n\t\t\t\t\t<?php submit_button( __( 'Clear Cache', 'pantheon-cache' ), 'secondary' ); ?>\n\t\t\t\t</form>\n\n\t\t\t\t<hr />\n\n\t\t\t<?php endif ?>\n\n\t\t\t<style>\n\t\t\t.ttl-form th[scope=\"row\"] {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.ttl-form td {\n\t\t\t\tpadding-left: 0;\n\t\t\t}\n\t\t\t.ttl-form td p {\n\t\t\t\tmargin-bottom: 1em;\n\t\t\t\tfont-size: 13px;\n\t\t\t}\n\t\t\t</style>\n\n\t\t\t<h3><?php _e( 'Default Time to Live (TTL)', 'pantheon-cache' ); ?></h3>\n\t\t\t<form action=\"options.php\" method=\"POST\" class=\"ttl-form\">\n\t\t\t\t<?php settings_fields( self::SLUG ); ?>\n\t\t\t\t<?php do_settings_sections( self::SLUG ); ?>\n\t\t\t\t<?php submit_button( __( 'Update TTL', 'pantheon-cache' ) ); ?>\n\t\t\t</form>\n\n\t\t\t<hr />\n\n\t\t\t<?php\n\t\t\t/**\n\t\t\t * Permits the Pantheon Advanced Page Cache plugin to add\n\t\t\t * supplemental text.\n\t\t\t */\n\t\t\tdo_action( 'pantheon_cache_settings_page_bottom' ); ?>\n\n\t\t</div>\n\t\t<?php\n\t}", "function add_acf_option_pages(){\n\n if( function_exists('acf_add_options_page') ) {\n\n acf_add_options_page(array(\n \t'page_title' \t=> 'CK Settings',\n \t'menu_title'\t=> 'CK Settings',\n \t'menu_slug' \t=> 'ck-settings',\n \t'capability'\t=> 'edit_posts',\n \t'redirect'\t\t=> false\n ));\n\n }\n }", "public function renderOptionsPage() {\n require \"templates/admin_settings_page.php\";\n }", "function the_bootstrap_theme_options_render_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<h2><?php esc_html_e( 'The Bootstrap Theme Options', 'the-bootstrap' ); ?></h2>\n\t\t<?php settings_errors(); ?>\n\n\t\t<div id=\"poststuff\">\n\t\t\t<div id=\"post-body\" class=\"obenland-wp columns-2\">\n\t\t\t\t<div id=\"post-body-content\">\n\t\t\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tsettings_fields( 'the_bootstrap_options' );\n\t\t\t\t\t\tdo_settings_sections( 'theme_options' );\n\t\t\t\t\t\tsubmit_button(); ?>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"postbox-container-1\">\n\t\t\t\t\t<div id=\"side-info-column\">\n\t\t\t\t\t\t<?php do_action( 'the_bootstrap_side_info_column' ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<?php\n}", "function do_settings_sections($page)\n{\n}", "public function setupAdminPage()\n {\n if (function_exists('acf_add_options_page')) {\n $option_page = acf_add_options_page(array(\n 'page_title' => self::$pageName,\n 'menu_title' => self::$pageName,\n 'menu_slug' => sanitize_title(self::$pageName),\n 'parent_slug' => self::$parentSlug,\n 'capability' => 'edit_posts',\n 'redirect' => false\n ));\n }\n }", "function rpa_options_page() {\n?>\n\n<div class=\"options__wrap\">\n\t<header class=\"options__header\">\n\t\t<h1>Theme Options</h1>\n\t</header>\n\t<form method=\"post\" action=\"options.php\">\n\t\t<?php\n\t\tsettings_fields( 'rpa-options' );\n\t\tdo_settings_sections( 'rpa-options' );\n\t\tsubmit_button();\n\t\t?>\n\t</form>\n</div>\n\n<?php\n}", "function wuc_options_page()\n{\n if(function_exists(\"acf_add_options_sub_page\")){\n acf_add_options_sub_page([\n 'page_title' => \"Additional Code\",\n 'menu_title' => \"Additional Code\",\n 'menu_slug' => \"wp-user-code\",\n 'icon_url' => \"dashicons-media-code\",\n 'parent_slug' => \"options-general.php\"\n ]);\n }\n}" ]
[ "0.75846314", "0.72501767", "0.72459376", "0.7049723", "0.6908472", "0.6860766", "0.6773082", "0.6771104", "0.6764996", "0.6725326", "0.67149943", "0.6714908", "0.6710785", "0.6703185", "0.6685194", "0.6682159", "0.6677213", "0.6627483", "0.6626994", "0.66114825", "0.6603958", "0.65852123", "0.6580337", "0.6574948", "0.65715444", "0.6561811", "0.6554626", "0.65429837", "0.6538411", "0.6529087", "0.6528108", "0.65205336", "0.6514334", "0.65064317", "0.65035665", "0.64965576", "0.6493763", "0.6491165", "0.6483747", "0.64746714", "0.6457314", "0.6455324", "0.64508337", "0.6447179", "0.64381033", "0.64380354", "0.64316624", "0.64270884", "0.6426052", "0.6413051", "0.6412826", "0.64004606", "0.63897914", "0.6386631", "0.6384081", "0.6383481", "0.63827014", "0.63827014", "0.63780266", "0.6375199", "0.6363391", "0.6363376", "0.6361908", "0.6357447", "0.6356764", "0.6356646", "0.6352826", "0.635255", "0.63475645", "0.6347391", "0.63470376", "0.6346489", "0.63319975", "0.63268864", "0.6324626", "0.6322735", "0.6322191", "0.63203895", "0.63115096", "0.6310761", "0.6309076", "0.6301912", "0.6301498", "0.62996703", "0.62920433", "0.62904686", "0.62891614", "0.62830895", "0.6278112", "0.62746155", "0.62727064", "0.6267639", "0.62642235", "0.62624586", "0.6262239", "0.6260354", "0.62583494", "0.6254516", "0.62543035", "0.62520677" ]
0.7670714
0
woocommerce_pip_add_box function. Add the meta box on the single order page
Функция woocommerce_pip_add_box. Добавление метабокса на странице отдельного заказа
function woocommerce_pip_add_box() { add_meta_box( 'woocommerce-pip-box', __( 'Print invoice/packing list', 'woocommerce-pip' ), 'woocommerce_pip_create_box_content', 'shop_order', 'side', 'default' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_order_meta_box() {\n\n\t\tadd_meta_box(\n\t\t\t'wc_shipwire_order_meta_box',\n\t\t\t__( 'Shipwire Order Information', 'woocommerce-shipwire' ),\n\t\t\tarray( $this, 'render_order_meta_box'),\n\t\t\t'shop_order',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function store_add_cart_meta(){\n \t\tglobal $post;\n\n\t \tadd_meta_box(\"store_cart_list_products\", \"Attached Products\", \"store_cart_list_products\", \"orders\", \"normal\", \"low\");\n\t \tadd_meta_box(\"store_cart_list_products\", \"Attached Products\", \"store_cart_list_products\", \"cart\", \"normal\", \"low\");\n\t \tadd_meta_box(\"store_order_show_status\", \"Order Status\", \"store_order_show_status\", \"orders\", \"side\", \"low\");\n\t \tif ( store_get_order_shipping_address($post->ID) && store_get_order_billing_address($post->ID) ) {\n\t\t \tadd_meta_box(\"store_cart_list_addresses\", \"Addresses\", \"store_cart_list_addresses\", \"orders\", \"normal\", \"low\");\n\t\t}\n\t\tadd_meta_box(\"store_list_order_history\", \"History\", \"store_list_order_history\", \"orders\", \"side\", \"low\");\n\t\tadd_meta_box(\"store_transaction_info\", \"Transaction Info\", \"store_transaction_info\", \"orders\", \"side\", \"low\");\n\t}", "function add_rehub_woo_meta_box() {\r\n add_meta_box(\r\n 'woo_rehub_coupons', // $id\r\n 'Coupons for Affiliate', // $title \r\n 'show_rehub_woo_meta_box', // $callback\r\n 'product', // $page\r\n 'normal', // $context\r\n 'low'); // $priority\r\n}", "function plib_add_box() {\n global $meta_box;\n\n foreach($meta_box as $post_type => $value) {\n add_meta_box($value['id'], $value['title'], 'plib_format_box', $post_type, $value['context'], $value['priority']);\n }\n}", "function register_meta_box() {\r\n add_meta_box( 'rent-payment', $this->method_title, [ $this, 'charge_meta_box_content' ], 'shop_order' );\r\n }", "public function add_meta_box() {\n\t\tglobal $post, $current_screen;\n\n\t\t// sanity checks\n\t\tif ( ! $post instanceof WP_Post\n\t\t || ! $current_screen\n\t\t || ! in_array( $current_screen->id, $this->screens, true )\n\t\t || ! current_user_can( 'manage_woocommerce_pickup_locations' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->get_title(),\n\t\t\tarray( $this, 'do_output' ),\n\t\t\t$current_screen->id,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\n\t\tadd_filter( \"postbox_classes_{$current_screen->id}_{$this->id}\", array( $this, 'postbox_classes' ) );\n\t}", "function add_custom_meta_box() {\n add_meta_box(\n 'recipe_meta', // $id\n 'Ingredients', // $title\n 'show_custom_meta_box', // $callback\n 'recipe', // $page\n 'advanced', // $context\n 'high' // $priority\n );\n}", "function ufandshands_meta_add_box() {\n $metaBoxes = ufandshands_getMetaBoxes();\n \n foreach ($metaBoxes as $metaBox) {\n\t add_meta_box($metaBox['id'], $metaBox['title'], 'display_html', $metaBox['page'], $metaBox['context'], $metaBox['priority'], $metaBox);\n }\n}", "function biagiotti_mikado_meta_box_add() {\n\t\tglobal $biagiotti_mikado_global_Framework;\n\n\t\tforeach ( $biagiotti_mikado_global_Framework->mkdMetaBoxes->metaBoxes as $key => $box ) {\n\t\t\t$hidden = false;\n\t\t\tif ( ! empty( $box->hidden_property ) ) {\n\t\t\t\tforeach ( $box->hidden_values as $value ) {\n\t\t\t\t\tif ( biagiotti_mikado_option_get_value( $box->hidden_property ) == $value ) {\n\t\t\t\t\t\t$hidden = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( is_string( $box->scope ) ) {\n\t\t\t\t$box->scope = array( $box->scope );\n\t\t\t}\n\n\t\t\tif ( is_array( $box->scope ) && count( $box->scope ) ) {\n\t\t\t\tforeach ( $box->scope as $screen ) {\n biagiotti_mikado_create_meta_box_handler( $box, $key, $screen );\n\n\t\t\t\t\tif ( $hidden ) {\n\t\t\t\t\t\tadd_filter( 'postbox_classes_' . $screen . '_mkdf-meta-box-' . $key, 'biagiotti_mikado_meta_box_add_hidden_class' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( biagiotti_mikado_is_plugin_installed( 'gutenberg-editor' ) || biagiotti_mikado_is_plugin_installed( 'gutenberg-plugin' ) ) {\n\t\t\tbiagiotti_mikado_enqueue_meta_box_styles();\n\t\t\tbiagiotti_mikado_enqueue_meta_box_scripts();\n\t\t} else {\n\t\t\tadd_action( 'admin_enqueue_scripts', 'biagiotti_mikado_enqueue_meta_box_styles' );\n\t\t\tadd_action( 'admin_enqueue_scripts', 'biagiotti_mikado_enqueue_meta_box_scripts' );\n\t\t}\n\t}", "public function add_meta_boxes() {\n\t\t$screen = get_current_screen();\n\t\t$screen_id = $screen ? $screen->id : '';\n\n\t\t// Products.\n\t\tadd_meta_box( 'postexcerpt', __( 'Product short description', '' ), 'WC_Meta_Box_Product_Short_Description::output', 'product', 'normal' );\n\t\tadd_meta_box( '-product-data', __( 'Product data', '' ), 'WC_Meta_Box_Product_Data::output', 'product', 'normal', 'high' );\n\t\tadd_meta_box( '-product-images', __( 'Product gallery', '' ), 'WC_Meta_Box_Product_Images::output', 'product', 'side', 'low' );\n\n\t\t// Orders.\n\t\tforeach ( wc_get_order_types( 'order-meta-boxes' ) as $type ) {\n\t\t\t$order_type_object = get_post_type_object( $type );\n\t\t\tadd_meta_box( '-order-data', sprintf( __( '%s data', '' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Data::output', $type, 'normal', 'high' );\n\t\t\tadd_meta_box( '-order-items', __( 'Items', '' ), 'WC_Meta_Box_Order_Items::output', $type, 'normal', 'high' );\n\t\t\tadd_meta_box( '-order-notes', sprintf( __( '%s notes', '' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Notes::output', $type, 'side', 'default' );\n\t\t\tadd_meta_box( '-order-downloads', __( 'Downloadable product permissions', '' ) . wc_help_tip( __( 'Note: Permissions for order items will automatically be granted when the order status changes to processing/completed.', '' ) ), 'WC_Meta_Box_Order_Downloads::output', $type, 'normal', 'default' );\n\t\t\tadd_meta_box( '-order-actions', sprintf( __( '%s actions', '' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Actions::output', $type, 'side', 'high' );\n\t\t}\n\n\t\t\n\n\t\t// Возможность комментить\n\t\tif ( 'comment' === $screen_id && isset( $_GET['c'] ) && metadata_exists( 'comment', $_GET['c'], 'rating' ) ) {\n\t\t\tadd_meta_box( '-rating', __( 'Rating', '' ), 'WC_Meta_Box_Product_Reviews::output', 'comment', 'normal', 'high' );\n\t\t}\n\t}", "function add_custom_meta_box() \n\t{\n\t\tadd_meta_box( 'custom_meta_box','Custom Meta Box', 'show_custom_meta_box', 'location', 'normal','high');\n\t}", "function mfn_layout_meta_add() {\n\tglobal $mfn_layout_meta_box;\n\tadd_meta_box($mfn_layout_meta_box['id'], $mfn_layout_meta_box['title'], 'mfn_layout_show_box', $mfn_layout_meta_box['page'], $mfn_layout_meta_box['context'], $mfn_layout_meta_box['priority']);\n}", "function metabox_adding(){\n\t\t\tadd_meta_box('ob_property_detail', 'Property Details', 'property_detail', 'ob_property','normal', 'high');\n\t\t\tadd_meta_box('ob_property_location', 'Property Location', 'property_location', 'ob_property','normal', 'low');\n\t\t}", "function my_em_event_order_boxes(){ \n\tadd_meta_box('em-event-order', 'Order Details', 'my_em_event_order_metabox','tribe_events', 'side','low');\n}", "function dynamic_add_custom_box() {\n add_meta_box(\n 'dynamic_sectionid',\n __( 'My Tracks', 'garage' ),\n 'dynamic_inner_custom_box',\n 'post');\n}", "function alep_add_custom_meta_box() {\n\t\tadd_meta_box( 'alep-meta-box', __( 'Alep Shortcodes', 'alep' ), 'alep_meta_box_output', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'alep-meta-box', __( 'Alep Shortcodes', 'alep' ), 'alep_meta_box_output', 'page', 'normal', 'high' );\n\t}", "function gb_add_meta_box() {\n\n\tadd_meta_box(\n\t\t'gb-meta-box',\n\t\t__( 'GB Meta Box', 'text-domain' ),\n 'gb_meta_box_callback',\n 'post'\n );\n\n}", "function hCustomFields_add_box() {\r\n add_meta_box( 'hCustomFields_sectionid', __( 'Hierarchical Custom Fields', 'hCustomFields_textdomain' ), \r\n 'hCustomFields_inner_custom_box', 'post' );\r\n}", "function swi_add_meta_boxes( $post ){\n\t\tadd_meta_box( 'software_meta_box', __( 'Additional', 'swi' ), 'swi_build_meta_box', 'software', 'advanced', 'low' );\n\t}", "public function add_meta_box( ) {\n\t\t$post_type = $this->post_type;\n\n\t\tif($post_type == 'pi_portfolio'){\n\t\t\tadd_meta_box(\n\t\t\t\t'pi_item_data',\n\t\t\t\t__( 'Item Information', $this->theme_name ),\n\t\t\t\tarray( $this, 'render_pi_portfolio_info' ),\n\t\t\t\t$post_type,\n\t\t\t\t'normal',\n\t\t\t\t'high'\n\t\t\t);\n\t\t}else{\n\t\t\tadd_meta_box(\n\t\t\t\t'pi_images',\n\t\t\t\t__( 'Slider Upload',\n\t\t\t\t\t$this->theme_name ),\n\t\t\t\tarray( $this, 'render_pi_plupload' ),\n\t\t\t\t$post_type,\n\t\t\t\t'normal',\n\t\t\t\t'high'\n\t\t\t);\n\t\t\tadd_meta_box(\n\t\t\t\t'pislider_shortcode',\n\t\t\t\t__( 'Shortcode', $this->theme_name ),\n\t\t\t\tarray( $this, 'pi_slider_shortcode_callback' ),\n\t\t\t\t$post_type,\n\t\t\t\t'side',\n\t\t\t\t'low'\n\t\t\t);\n\t\t\tadd_meta_box(\n\t\t\t\t'pislider_settings',\n\t\t\t\t__( 'Settings', $this->theme_name ),\n\t\t\t\tarray( $this, 'render_settings_content' ),\n\t\t\t\t$post_type,\n\t\t\t\t'advanced',\n\t\t\t\t'low'\n\t\t\t);\n\t\t}\n\n\t}", "public function add_meta_box() {\n\n\t\t\t$tax = get_taxonomy( $this->taxonomy );\n\n\t\t\tadd_meta_box( $this->taxonomy, $tax->labels->name, array(\n\t\t\t\t$this,\n\t\t\t\t'metabox_inner'\n\t\t\t), $this->post_type, 'side', 'core' );\n\t\t}", "function add_meta_box() {\r\n\t\t\t\r\n\t\t\tadd_meta_box( $this->domain . '-meta-box', __( 'Project Attributes', $this->domain ), array( $this, 'meta_box' ), $this->post_type, 'normal', 'high' );\r\n\t\t\t\t\r\n\t\t}", "function meta_box_add_process()\n\t{\n\t\tadd_action( 'add_meta_boxes_'.$this->post_type, [$this,'add_custom_meta_box']);\n\t\t//\n\t\tadd_action( \"save_post_\".$this->post_type,[$this,'save_meta_data'],10,2);\n\t}", "function shams_solar_pro_posttype_bn_services_meta_box() {\n add_meta_box( 'shams-solar-pro-posttype-testimonial-meta', __( 'Enter Details', 'shams-solar-pro-posttype' ), 'shams_solar_pro_posttype_bn_services_meta_callback', 'services', 'normal', 'high' );\n}", "function add_meta_boxes()\n {\n }", "function places_meta_box(){\n\tadd_meta_box('places_box', 'Place/Trip Details', 'places_box_callback', 'places', 'normal', 'high');\n\t// add_meta_box('beer_review_meta_box', 'Beer Review Details', 'display_beer_review_meta_box', 'places', 'normal', 'high');\n}", "function wp_basalcart_setup_meta_boxes() {\n\t\tadd_meta_box('wp_basalcart_mainimagebox', 'Upload Mainimage', array($this, 'wp_basalcart_render_image_attachment_box'), 'wp_basalcart_product', 'normal', 'high', array('typeofbox'=>'mainimage'));\n\t\tadd_meta_box('wp_basalcart_pic1box', 'Upload Pic1', array($this, 'wp_basalcart_render_image_attachment_box'), 'wp_basalcart_product', 'normal', 'high', array('typeofbox'=>'pic1'));\n\t\tadd_meta_box('wp_basalcart_pic2box', 'Upload Pic2', array($this, 'wp_basalcart_render_image_attachment_box'), 'wp_basalcart_product', 'normal', 'high', array('typeofbox'=>'pic2'));\n\t\tadd_meta_box('wp_basalcart_pic3box', 'Upload Pic3', array($this, 'wp_basalcart_render_image_attachment_box'), 'wp_basalcart_product', 'normal', 'high', array('typeofbox'=>'pic3'));\n\t\tadd_meta_box('wp_basalcart_price', 'Price', array($this, 'wp_basalcart_render_general_meta_box'), 'wp_basalcart_product', 'side', 'default', array('typeofbox'=>'price'));\n\t\tadd_meta_box('wp_basalcart_sku', 'SKU', array($this, 'wp_basalcart_render_general_meta_box'), 'wp_basalcart_product', 'side', 'default', array('typeofbox'=>'sku'));\n\t}", "function add_meta_box($id, $title, $callback, $screen = \\null, $context = 'advanced', $priority = 'default', $callback_args = \\null)\n{\n}", "function notelywoo_meta_box(){\r\n\t\tif ( class_exists( 'WooCommerce' ) ) {\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t 'notes'\r\n\t\t\t\t,'Product Notes'\r\n\t\t\t\t,array( &$this, 'meta_box_content' )\r\n\t\t\t\t,'product'\r\n\t\t\t\t,'side'\r\n\t\t\t\t,'default'\r\n\t\t\t);\r\n\t\t}\r\n\t}", "function add_page_meta_box()\n{\n add_meta_box(\n \"page-custom-meta-box\", \n \"Page Elements\", \n \"page_meta_custom_fields\", \n \"page\", \n \"side\", \n \"high\", \n null);\n}", "function skudo_create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.\"Skudo\".' PAGE SETTINGS', 'skudo_new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "public function add_meta_box() {\r\n\t\tadd_meta_box(\r\n\t\t\t'wfc-image-gallery',\r\n\t\t\tesc_html__( 'Image Gallery Settings', 'wfc-toolkit' ),\r\n\t\t\tarray( $this, 'meta_box_markup_callback'),\r\n\t\t\tarray( 'post', 'page' ),\r\n\t\t\t'side'\r\n\t\t);\r\n\t}", "function tech_create_meta_box() {\n\tglobal $meta_box;\n\tadd_meta_box($meta_box['id'], $meta_box['title'], 'tech_new_meta_boxes', 'post', $meta_box['context'], $meta_box['priority']);\n\tadd_meta_box($meta_box['id'], $meta_box['title'], 'tech_new_meta_boxes', 'page', $meta_box['context'], $meta_box['priority']);\n}", "function se_meta_box_add() {\n\t\tadd_meta_box( 'se-metabox', 'Research Everything', array(&$this,'se_meta_box_cb'), 'post', 'side', 'high' );\n\t}", "function register_metabox() {\n\t\tadd_meta_box( 'it-exchange-recurring-payments-info', __( 'Recurring Payments Info', 'LION' ), array( $this, 'print_metabox' ), 'it_exchange_prod', 'it_exchange_normal', 'high' );\n\t}", "function cd_meta_box_add()\n{\n\tadd_meta_box( 'my-title-id', 'Title meta box', 'cd_meta_box_cb', 'page', 'normal', 'high' );\n\tadd_meta_box( 'my-desc-id', 'Description Meta Box', 'cd_meta_box_desc_cb', 'page', 'normal', 'high' );\n}", "public function add_meta_boxes()\n {\n }", "function recipe_meta_init() {\n add_action('add_meta_boxes', 'add_custom_meta_box');\n}", "function product_meta_boxes() {\n\t\tadd_meta_box( 'products-price', 'Product Price', array( &$this, 'prod_price_box' ), 'product', 'side', 'high' );\n\t\tadd_meta_box( 'products-online', 'Only Sold Online', array( &$this, 'prod_online_box' ), 'product', 'side', 'high' );\n\t\tadd_meta_box( 'products-images', 'Product Images', array( &$this, 'prod_images_box' ), 'product', 'side', 'high' );\n\t\t\n\t add_meta_box( 'product-image', 'Product Image', array( &$this, 'product_image_box' ), 'product', 'side', 'high' );\n }", "function add_rehub_post_meta_box() {\n add_meta_box(\n 'post_rehub_offers', // $id\n 'Post offer', // $title \n 'show_rehub_post_meta_box', // $callback\n 'post', // $page\n 'normal', // $context\n 'low'); // $priority\n}", "function tt_add_meta_box_property_payment() {\n add_meta_box( 'meta-box', __('Property Payment Details', 'tt' ), 'tt_meta_box_property_payment', 'property', 'normal', 'core' );\n}", "function special_add_meta_box() {\n\n add_meta_box(\n 'special_sectionid', 'Special Event', 'special_meta_box_callback', 'sp_event'\n ); //you can change the 4th paramter i.e. post to custom post type name, if you want it for something else\n\n}", "function meta_box_function_name() {\n add_meta_box( 'meta_box_id', __( 'Tender Details', 'meta-textdomain' ), 'meta_box_callback', 'the_post_type' );\n}", "function add_box() {\n\t\t\tforeach ( $this->page as $page ) {\n\t\t\t\tadd_meta_box( $this->id, $this->title, array( $this, 'meta_box_callback' ), $page, 'normal', 'high' );\n\t\t\t}\n\t\t}", "function hybrid_create_meta_box() {\n\tglobal $theme_name;\n\n\tadd_meta_box( 'post-meta-boxes', __('Post Options'), 'post_meta_boxes', 'post', 'normal', 'high' );\n\tadd_meta_box( 'slideshow-meta-boxes', __('Slideshow Options'), 'slideshow_meta_boxes', 'page', 'normal', 'high' );\n\tadd_meta_box( 'page-meta-boxes', __('Page Options'), 'page_meta_boxes', 'page', 'normal', 'high' );\n}", "function add_meta_boxes() {\n\n\t // Add metabox to Envira CPT\n\t add_meta_box( 'wp-quick-bulk-edit', __( 'Custom Fields', 'envira-gallery' ), array( $this, 'output_custom_fields' ), 'page', 'normal', 'high' );\n\n\t}", "function my_wish_dynamic_add_custom_box() {\r\n\tadd_meta_box(\r\n\t\t'my_wish_dynamic_sectionid',\r\n\t\t__( 'Wishes', 'myplugin_textdomain' ),\r\n\t\t'my_wish_dynamic_inner_custom_box',\r\n\t\t'wishlist' );\r\n\r\n\tadd_meta_box(\r\n\t\t'my_wish_dynamic_sidebarid',\r\n\t\t__( 'Wishlist Settings', 'myplugin_textdomain' ),\r\n\t\t'my_wish_dynamic_sidebar_custom_box',\r\n\t\t'wishlist',\r\n\t\t'side',\r\n\t\t'high' );\r\n}", "function add_box() {\r\n global $post_type;\r\n\r\n\t\tforeach ( $this->page as $page ) {\r\n\t\t\tadd_meta_box( $this->id, $this->title, array( $this, 'meta_box_callback' ), $page, 'normal', $this->priority, array( 'post_type' => $post_type ) );\r\n\t\t\t\r\n\t\t\t/* if it's not a post type add a side metabox with a save button */\r\n\t\t\tif( isset( $_GET['page'] ) )\r\n\t\t\t\tadd_meta_box( 'page-save-metabox', __( 'Save' ), array( $this, 'page_save_meta_box' ), $page, 'side' );\r\n\t\t}\r\n\t}", "abstract protected function addMetaBox();", "function front_office_add_meta_box() {\n\n\n add_meta_box(\n 'front_office_sectionid', 'Front Office Staff Info', 'front_office_meta_box_callback', 'front_office'\n ); //you can change the 4th paramter i.e. post to custom post type name, if you want it for something else\n\n}", "function add_custom_meta_box()\n{\n add_meta_box(\"circolari-meta-box\", \"Report Circolari\", \"dsi_circolari_meta_box\", \"circolare\", \"normal\");\n}", "function rp_add_custom_boxes() {\n add_meta_box(\n 'page_options_id',\n __( 'Opzioni Pagina', 'rp' ),\n 'rp_print_custom_box_page',\n 'page',\n 'normal',\n 'high'\n );\n\n}", "function coach_add_meta_box() {\n\n add_meta_box(\n 'coach_sectionid', 'Coach Info', 'coach_meta_box_callback', 'coach'\n ); //you can change the 4th paramter i.e. post to custom post type name, if you want it for something else\n\n}", "public function meta_boxes() {\n cts_meta_boxes::factory()\n ->set_include_page(plugin_dir_path(__FILE__) . 'includes/add-to-cart.php')\n ->set_id('cts_add_to_cart')\n ->set_piority('high')\n ->set_screen($this->post_type->get_post_type_name())\n ->set_title('Shopping Cart Items')\n ->metabox();\n\n\n //create coupoun meta boxes\n\n cts_meta_boxes::factory()\n ->set_include_page(plugin_dir_path(__FILE__).'/includes/coupons-metabox.php')\n ->set_id('cts_coupons')\n ->set_context('normal')\n ->set_piority('high')\n ->set_screen($this->post_type->get_post_type_name())\n ->set_title('Coupons / Discounts')\n ->metabox();\n //Cart checkout\n\n cts_meta_boxes::factory()\n ->set_include_page(plugin_dir_path(__FILE__).'/includes/cart-total-metabox.php')\n ->set_id('cts_cart_total')\n ->set_context('side')\n ->set_piority('high')\n ->set_screen($this->post_type->get_post_type_name())\n ->set_title('Checkout Summary $')\n ->metabox();\n }", "function add_meta_boxes() {\n add_meta_box(\"omeka-addons-releases\", __('Addon Releases', 'omeka-addons'), array($this, \"meta_box\"), \"omeka_plugin\", \"side\", \"low\");\n add_meta_box(\"omeka-addons-releases\", __('Addon Releases', 'omeka-addons'), array($this, \"meta_box\"), \"omeka_theme\", \"side\", \"low\");\n }", "function add_listing_meta_box() {\n$post_types = array ( 'listing', 'opportunity' );\nforeach( $post_types as $post_type )\n {\n add_meta_box(\n 'listing_meta_box', // $id\n 'Aircraft Information', // $title\n 'show_listing_meta_box', // $callback\n $post_type, // post type\n 'normal', // $context\n 'high' // $priority\n );\n }\n}", "public function add_meta_boxes()\n {\n add_meta_box(\n 'options',\n __('Download options', 'wp-coinero'),\n array($this, 'add_meta_box_callback'),\n 'coinero_download',\n 'normal',\n 'default'\n );\n }", "function add() {\n foreach($this->_meta_boxes as $meta_box)\n {\n add_meta_box('gp_metabox_'.$meta_box['id'],\n $meta_box['name'],\n array(&$this, 'show'),\n $meta_box['type'],\n 'normal',\n 'high',\n null);\n }\n \n }", "function myplugin_add_custom_box() {\n add_meta_box( \n 'myplugin_sectionid',\n __( 'Preview Mobile Layout', 'myplugin_textdomain' ),\n 'myplugin_inner_custom_box',\n 'post' \n );\n add_meta_box(\n 'myplugin_sectionid',\n __( 'Preview Mobile Layout', 'myplugin_textdomain' ), \n 'myplugin_inner_custom_box',\n 'page'\n );\n}", "public function add_meta_box(){\n \tadd_action( \"{$this->slug}_edit_form_fields\", array($this, 'taxonomy_edit_meta_field'), 10, 2 );\n\t add_action( \"edited_{$this->slug}\", array($this, 'save_taxonomy_custom_meta'), 10, 2 );\n\t}", "public function add_meta_boxes ();", "function add_people_meta_box() {\n add_meta_box(\n 'people_meta_box', // $id\n 'Additional Information', // $title\n 'show_person_meta_box', // $callback\n 'people', // post type\n 'normal', // $context\n 'high' // $priority\n );\n}", "function strawberryfields_add_meta_box() {\n\n\tadd_meta_box(\n\t\t'strawberryfields_sectionid',\n\t\t__( 'Beatles Song for Post', 'strawberryfields_textdomain' ),\n\t\t'strawberryfields_meta_box_callback',\n\t\t'post'\n\t);\n\n}", "function pointfinder_orders_add_meta_box_ex($post_type) {\n\t\t$setup3_pointposttype_pt1 = PFSAIssetControl('setup3_pointposttype_pt1','','pfitemfinder');\n\n\t\tif ($post_type == $setup3_pointposttype_pt1) {\n\t\t\t$setup3_pointposttype_pt7s = PFSAIssetControl('setup3_pointposttype_pt7s','','Listing Type');\n\t\t\t$setup3_pointposttype_pt6 = PFSAIssetControl('setup3_pointposttype_pt6','','Features');\n\n\t\t\tremove_meta_box( 'pointfinderltypesdiv', $setup3_pointposttype_pt1, 'side' );\n\t\t\tremove_meta_box( 'pointfinderconditionsdiv', $setup3_pointposttype_pt1, 'side' );\n\t\t\tremove_meta_box( 'pointfinderfeaturesdiv', $setup3_pointposttype_pt1, 'side' );\n\t\t\t\n\t\t\tadd_meta_box(\n\t\t\t\t'pointfinder_itemdetailcf_process_lt',\n\t\t\t\t$setup3_pointposttype_pt7s,\n\t\t\t\t'pointfinder_itemdetailcf_process_lt_function',\n\t\t\t\t$setup3_pointposttype_pt1,\n\t\t\t\t'normal',\n\t\t\t\t'high'\n\t\t\t);\n\n\t\t\tadd_meta_box(\n\t\t\t\t'pointfinder_itemdetailcf_process',\n\t\t\t\tesc_html__( 'Additional Details', 'pointfindert2d' ),\n\t\t\t\t'pointfinder_itemdetailcf_process_function',\n\t\t\t\t$setup3_pointposttype_pt1,\n\t\t\t\t'normal',\n\t\t\t\t'high'\n\t\t\t);\n\t\t\t$setup3_pointposttype_pt6_check = PFSAIssetControl('setup3_pointposttype_pt6_check','','1');\n\t\t\tif ($setup3_pointposttype_pt6_check ) {\n\t\t\t\tadd_meta_box(\n\t\t\t\t\t'pointfinder_itemdetailcf_process_fe',\n\t\t\t\t\t$setup3_pointposttype_pt6,\n\t\t\t\t\t'pointfinder_itemdetailcf_process_fe_function',\n\t\t\t\t\t$setup3_pointposttype_pt1,\n\t\t\t\t\t'normal',\n\t\t\t\t\t'core'\n\t\t\t\t);\n\t\t\t}\n\t\t\t$setup3_modulessetup_openinghours = PFSAIssetControl('setup3_modulessetup_openinghours','','0');\n\t\t\t$setup3_modulessetup_openinghours_ex = PFSAIssetControl('setup3_modulessetup_openinghours_ex','','1');\n\t\t\tif ($setup3_modulessetup_openinghours == 1) {\n\t\t\t\tadd_meta_box(\n\t\t\t\t\t'pointfinder_itemdetailoh_process_fe',\n\t\t\t\t\tesc_html__( 'Opening Hours', 'pointfindert2d' ).' <small>('.esc_html__('Leave blank to show closed','pointfindert2d' ).')</small>',\n\t\t\t\t\t'pointfinder_itemdetailoh_process_fe_function',\n\t\t\t\t\t$setup3_pointposttype_pt1,\n\t\t\t\t\t'normal',\n\t\t\t\t\t'high'\n\t\t\t\t);\n\t\t\t}\n\n\n\t\t\t$setup3_pt14_check = PFSAIssetControl('setup3_pt14_check','',0);\n\t\t\t$setup3_pt14s = PFSAIssetControl('setup3_pt14s','','Condition');\n\t\t\tif ($setup3_pt14_check ) {\n\t\t\t\tadd_meta_box(\n\t\t\t\t\t'pointfinder_itemdetailcf_process_co',\n\t\t\t\t\t$setup3_pt14s,\n\t\t\t\t\t'pointfinder_itemdetailcf_process_co_function',\n\t\t\t\t\t$setup3_pointposttype_pt1,\n\t\t\t\t\t'side',\n\t\t\t\t\t'core'\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\n\t\t\n\t}", "function create_meta_box() {\r\n\r\n\t\t\tglobal $new_meta_boxes;\r\n\r\n\t\t\tif ( function_exists('add_meta_box') ) :\r\n\r\n\t\t\t\t//if ( current_user_can('administrator') || current_user_can('editor') || !current_user_can('author') && !current_user_can('contributor') ) :\r\n\r\n\t\t\t\tglobal $user;\r\n\r\n\t\t\t\tif ( $user->has_cap('edit_pages') ) :\r\n\r\n\t\t\t\t\t// External Featured image\r\n\t\t\t\t\tadd_meta_box( 'ext-feat-image', 'Featured Image from URL', 'ext_feat_image', 'post', 'side', 'low' );\r\n\r\n\t\t\t\t\t// Custom sidebar\r\n\t\t\t\t\tadd_meta_box( 'new-meta-boxes', 'Custom sidebar', 'new_meta_boxes', 'post', 'side', 'low' );\r\n\t\t\t\t\tadd_meta_box( 'new-meta-boxes', 'Custom sidebar', 'new_meta_boxes', 'page', 'side', 'low' );\r\n\r\n\t\t\t\tendif;\r\n\r\n\t\t\tendif;\r\n\r\n\t\t}", "public function add_metabox() {\r\n add_meta_box(\r\n 'case27-listing-type-options',\r\n __( 'Listing Type Options', 'my-listing' ),\r\n function( $post ) {\r\n wp_nonce_field( 'save_type_editor', '_themenonce' );\r\n require_once locate_template( 'includes/src/listing-types/views/metabox.php' );\r\n },\r\n 'case27_listing_type',\r\n 'advanced',\r\n 'high'\r\n );\r\n }", "final public function add_metabox() {\n\t\tadd_meta_box( $this->get_id(), $this->get_title(), array( $this, 'content_callback' ), $this->get_post_type(), $this->args['context'], $this->args['priority'] );\n\t}", "public function register_metabox() {\n add_meta_box(\n 'wc_any_shipping_notify',\n 'WC Any Shipping Notify',\n array( $this, 'metabox_content' ),\n 'shop_order',\n 'side',\n 'default'\n );\n }", "function places_slider_meta_box(){\n\tadd_meta_box('places_slider_box', 'Places Slider Box', 'places_slider_box_callback', 'page', 'side');\n}", "public function create_meta_box(){\n\t\tadd_meta_box('image_folder_box', $this->name, array($this,'render_image_meta_box'), 'post', 'normal', 'high');\n\t}", "function weever_add_custom_box() {\n\tif ( apply_filters( 'weever_show_map_meta_box', true ) ) {\n\t\tadd_meta_box('weever_sectionid', __( 'Weever Apps - Map Data', 'myplugin_textdomain' ), 'weever_inner_custom_box', 'post', 'advanced' );\n\t}\n}", "function coupon_code_add_custom_box()\n{\n add_meta_box(\n 'coupon_code_meta_box',\n __('Coupon Codes and Links', 'dietdiscountcode'),\n 'coupon_code_inner_custom_box',\n 'post'\n );\n}", "public function custom_meta_add() {\n\t\tif( $this->options->show_on && !in_array(get_the_id(), $this->options->show_on) ){\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach($this->options->post_types as $post_type){\n\t\t\tadd_meta_box(\n\t\t\t\t$this->options->unique_id, // Unique ID\n\t\t\t\tesc_html__( $this->options->title, 'example' ), //Title\n\t\t\t\tarray(&$this, 'custom_meta_render' ), // Callback (builds html)\n\t\t\t\t$post_type, // Admin page (or post type)\n\t\t\t\t$this->options->context, // Context\n\t\t\t\t$this->options->priority, // Priority\n\t\t\t\t$callback_args = null\n\t\t\t);\n\t\t}\n\n\t}", "public function on_add_meta_boxes() {\n\t\textract( array(\n\t\t\t'id' => basename( dirname( __FILE__ ) ),\n\t\t\t'title' => __( 'Post title styler', WP_DPP_PTS_DOMAIN ),\n\t\t\t'callback' => array( $this, 'render_meta_box' ),\n\t\t\t'screen' => 'post',\n\t\t\t'context' => 'advanced',\n\t\t\t'priority' => 'default',\n\t\t) );\n\n\t\tadd_meta_box( $id, $title, $callback, $screen, $context, $priority );\n\t}", "function shams_solar_pro_posttype_bn_testimonial_meta_box() {\n\tadd_meta_box( 'shams-solar-pro-posttype-testimonial-meta', __( 'Enter Details', 'shams-solar-pro-posttype' ), 'shams_solar_pro_posttype_bn_testimonial_meta_callback', 'testimonials', 'normal', 'high' );\n}", "static function register_metabox(){\n\n\t$box = array(\n 'name' => 'pwp_order',\n 'title' => __( 'Order parameters', 'pwp' ),\n 'post_type' => array( 'order' ),\n 'elements' => array(\n array(\n 'type' => 'text',\n 'name' => 'order_id',\n 'params'=> array(\n 'label' => __( 'Order id', 'pwp' ),\n 'class' => 'large-text',\n 'validator'=>array('notempty','email')\n\n ),\n\n ),\n\t\tarray(\n 'type' => 'orderitem',\n 'name' => 'order_item',\n 'params'=> array(\n 'label' => __( 'Order content', 'pwp' ),\n 'class' => 'large-text',\n\t\t\t\n ),\n ),\n \n \n \n \n \n\t\t\n )\n );\n new Metabox( $box );\n }", "function tptn_add_meta_box( $post_type ) {\n\n\t// If metaboxes are disabled, then exit.\n\tif ( ! tptn_get_option( 'show_metabox' ) ) {\n\t\treturn;\n\t}\n\n\t// If current user isn't an admin and we're restricting metaboxes to admins only, then exit.\n\tif ( ! current_user_can( 'manage_options' ) && tptn_get_option( 'show_metabox_admins' ) ) {\n\t\treturn;\n\t}\n\n\t$args = array(\n\t\t'public' => true,\n\t);\n\t$post_types = get_post_types( $args );\n\n\t/**\n\t * Filter post types on which the meta box is displayed\n\t *\n\t * @since 2.2.0\n\t *\n\t * @param array $post_types Array of post types\n\t */\n\t$post_types = apply_filters( 'tptn_meta_box_post_types', $post_types );\n\n\tif ( in_array( $post_type, $post_types, true ) ) {\n\n\t\tadd_meta_box(\n\t\t\t'tptn_metabox',\n\t\t\t'Top 10',\n\t\t\t'tptn_call_meta_box',\n\t\t\t$post_type,\n\t\t\t'advanced',\n\t\t\t'default'\n\t\t);\n\t}\n}", "function company_details_add_meta_box(){\n add_meta_box('user_text', 'Company Details', 'company_details_callback_function', 'application_jobs', 'side');\n}", "public static function register_meta_boxes() {\n\t\t// estimate specific\n\t\t$args = array(\n\t\t\t'si_subscription_payments' => array(\n\t\t\t\t'title' => __( 'Recurring Invoice Payment', 'sprout-invoices' ),\n\t\t\t\t'show_callback' => array( __CLASS__, 'show_subscription_payments_meta_box' ),\n\t\t\t\t'save_callback' => array( __CLASS__, 'save_meta_box_subscription_payments' ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'low',\n\t\t\t\t'weight' => 0,\n\t\t\t\t'save_priority' => 0,\n\t\t\t)\n\t\t);\n\t\tdo_action( 'sprout_meta_box', $args, SI_Invoice::POST_TYPE );\n\t}", "function advisory_board_add_meta_box() {\n\n add_meta_box(\n 'advisory_board_sectionid', 'Advisory Board Info', 'advisory_board_meta_box_callback', 'advisory_board'\n ); //you can change the 4th paramter i.e. post to custom post type name, if you want it for something else\n\n}", "function home_away_add_meta_box() {\n\n add_meta_box(\n 'home_away_sectionid', 'home_away', 'home_away_meta_box_callback', 'sp_event'\n ); //you can change the 4th paramter i.e. post to custom post type name, if you want it for something else\n\n}", "function player_add_meta_box() {\n\n add_meta_box(\n 'player_info_id', 'Player Info', 'player_meta_box_callback', 'player'\n ); //you can change the 4th paramter i.e. post to custom post type name, if you want it for something else\n\n}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'woocommerce-lookbook',\n\t\t\t__( 'Image', 'woocommerce-lookbook' ),\n\t\t\tarray( $this, 'render_metabox' ),\n\t\t\t'woocommerce-lookbook',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t\tadd_meta_box(\n\t\t\t'woocommerce-lookbook-sidebar',\n\t\t\t__( 'Node', 'woocommerce-lookbook' ),\n\t\t\tarray( $this, 'render_metabox_node' ),\n\t\t\t'woocommerce-lookbook',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t}", "function labishop_add_meta_box() {\n\n\t$screens = array( 'post', 'page' );\n\n\tforeach ( $screens as $screen ) {\n\n\t\tadd_meta_box(\n\t\t\t'labishop_sectionid',\n\t\t\t__( 'افزودن کالا', 'labishop_textdomain' ),\n\t\t\t'labishop_meta_box_callback',\n\t\t\t$screen\n\t\t);\n\t}\n}", "function location_add_post_meta_boxes() {\n add_meta_box(\n 'location_details', // Unique ID\n esc_html__( 'Location Details', 'example' ), // Title\n 'location_post_meta_box', // Callback function\n array( 'venues', 'location', 'post' ), // Admin page (or post type)\n 'normal', // Context\n 'default' // Priority\n );\n}", "function layers_child_add_meta_box() {\n\n add_meta_box(\n 'smashing-post-class', // Unique ID\n esc_html__('Post Class', 'example'), // Title\n 'smashing_post_class_meta_box', // Callback function\n 'post', // Admin page (or post type)\n 'advanced', // Context (side)\n 'default' // Priority\n );\n\n}", "public function add_meta_box($post_type) {\n $post_types = array( 'post', 'page' ); //limit meta box to certain post types\n if (in_array($post_type, $post_types)) {\n add_meta_box('_theme_post_extra', __('Extra', 'theme'), array( $this, 'render_meta_box_content' ),\n $post_type, 'advanced', 'high');\n }\n }", "public function register_custom_meta_box() {\n\t\tadd_meta_box(\n\t\t\t'excerpt_location',\n\t\t\t'Post Excerpt',\n\t\t\t[ $this, 'add_excerpt' ],\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t}", "public function add_meta_box( $post )\n {\n $this->custom = get_post_custom($post->ID);\n ?>\n <div class=\"copter-metabox\">\n <div class=\"copter-input-container\" id=\"copter-general\">\n <table class=\"copter-inputs\">\n <?php\n\n foreach ($this->meta_fields as $meta) {\n if (isset($meta['placeholder'])) {\n $placeholder = $meta['placeholder'];\n } else {\n $placeholder = NULL;\n }\n\n $this->add_field(\n $meta['slug'], \n $meta['label'], \n $meta['type'], \n $placeholder\n );\n }\n\n ?>\n </table><!-- .copter-inputs -->\n </div><!-- .copter-input-container#copter-general -->\n </div><!-- end .copter-metabox -->\n <?php\n }", "function roofingtypes_add_custom_box() {\n global $current_screen;\n add_meta_box(\n 'rft_link',\n 'Roofing Type Settings',\n 'roofingtypes_meta_box_html',\n ['roofingtypes']\n );\n}", "public abstract function addmetaBoxes();", "function add_meta_boxes() {\n\t add_meta_box(\n\t 'select_item',\n\t 'Enter Amazon Product ASIN',\n\t array( $this, 'content' ),\n\t 'product',\n\t 'normal',\n\t 'high'\n\t );\n\t}", "function pat_add_books_metaboxes() {\n\n add_meta_box(\n 'pat-books-amazon',\n _x( 'Amazon Information', 'Amazon Information Metabox Title', THEME_ID ),\n 'pat_books_external_link_metabox_content',\n 'pat-books',\n 'side'\n );\n \n}", "function skudo_create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.\"Skudo\".' POST TYPE SETTINGS', 'skudo_new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "public static function addMetaBoxes() {\n\t\t$id = self::NONCE;\n\t\t$title = __('Teasers', self::NONCE);\n\t\t$callback = array(__CLASS__, 'renderMetaBox');\n\t\t$page = 'page';\n\t\t$context = 'side';\n\n\t\tadd_meta_box($id, $title, $callback, $page, $context);\n\t}", "public function _admin_add_meta_box() {\r\n\t\t\t// Syntax: add_meta_box( $id, $title, $callback, $screen, $context, $priority, $callback_args );\r\n\t\t\tadd_meta_box( '', __('Add Image', LGP_TXTDM), array(&$this, 'lg_upload_multiple_images'), '_light_image_gallery', 'normal', 'default' );\r\n\t\t}", "function crp_add_meta_box( $post_type, $post ) {\n\n\t// If metaboxes are disabled, then exit.\n\tif ( ! crp_get_option( 'show_metabox' ) ) {\n\t\treturn;\n\t}\n\n\t// If current user isn't an admin and we're restricting metaboxes to admins only, then exit.\n\tif ( ! current_user_can( 'manage_options' ) && crp_get_option( 'show_metabox_admins' ) ) {\n\t\treturn;\n\t}\n\n\t$args = array(\n\t\t'public' => true,\n\t);\n\t$post_types = get_post_types( $args );\n\n\t/**\n\t * Filter post types on which the meta box is displayed\n\t *\n\t * @since 2.2.0\n\t *\n\t * @param array $post_types Array of post types.\n\t * @param array $post_types Post object.\n\t */\n\t$post_types = apply_filters( 'crp_meta_box_post_types', $post_types, $post );\n\n\tif ( in_array( $post_type, $post_types, true ) ) {\n\n\t\tadd_meta_box(\n\t\t\t'crp_metabox',\n\t\t\t'Contextual Related Posts',\n\t\t\t'crp_call_meta_box',\n\t\t\t$post_type,\n\t\t\t'advanced',\n\t\t\t'default'\n\t\t);\n\t}\n}", "public function add_custom_meta_fields()\n {\n $custom_taxonomy_meta_config = array(\n 'id' => 'stores_meta_box',\n 'title' => 'Stores Meta Box',\n 'pages' => array('store_category', 'store_filter'),\n 'context' => 'side',\n 'fields' => array(),\n 'local_images' => false,\n 'use_with_theme' => false,\n );\n\n $custom_taxonomy_meta_fields = new Tax_Meta_Class($custom_taxonomy_meta_config);\n // $custom_taxonomy_meta_fields->addImage($prefix.'image', array('name' => __('Map Icon ', 'wordpress-store-locator')));\n // No ID!\n // $custom_taxonomy_meta_fields->addTaxonomy($prefix.'product_category',array('taxonomy' => 'product_cat'),array('name'=> __('Link to Product Category ','wordpress-store-locator')));\n\n $options = array('' => 'Select Category');\n $categories = get_terms('product_cat');\n if(is_array($categories)) {\n foreach ($categories as $category) {\n $options[$category->term_id] = $category->name;\n }\n $custom_taxonomy_meta_fields->addSelect($this->prefix . 'product_category', $options, array('name' => __('Link to Product Category ', 'wordpress-store-locator')));\n }\n $custom_taxonomy_meta_fields->addImage($this->prefix . 'icon', array('name'=> __('Custom Icon ','wordpress-store-locator')));\n $custom_taxonomy_meta_fields->Finish();\n }", "public function loc_8_meta_box_setup() {\n\t\tadd_action( 'add_meta_boxes', array( $this, 'loc_8_add_meta_box' ) );\n\t}", "public function add_meta_box()\n {\n $post_types = get_post_types();\n\n // Add meta box to all available post types\n foreach ($post_types as $post_type) {\n if ($post_type != 'page') {\n add_meta_box(\n 'wppc_primary_category',\n 'Primary Category',\n array($this, 'meta_box_html'),\n $post_type,\n 'side'\n );\n }\n }\n }" ]
[ "0.8006347", "0.77595025", "0.7754601", "0.7745639", "0.7739097", "0.7715668", "0.7627119", "0.75832903", "0.75742304", "0.75179064", "0.746191", "0.74490714", "0.7440462", "0.74088943", "0.74017954", "0.7396631", "0.7356823", "0.7355198", "0.7335077", "0.7328468", "0.7320058", "0.7313128", "0.73108083", "0.72878104", "0.72850674", "0.7269751", "0.7263876", "0.72578907", "0.7239302", "0.72316176", "0.7198586", "0.7197571", "0.71911967", "0.717897", "0.7176949", "0.71719867", "0.7168334", "0.71672064", "0.7165712", "0.71644026", "0.71639854", "0.7149849", "0.7145601", "0.7133316", "0.7121233", "0.7118448", "0.7116748", "0.71164787", "0.71126527", "0.711124", "0.70989037", "0.70988613", "0.7090193", "0.7083191", "0.70820016", "0.7081954", "0.7072016", "0.70709133", "0.706992", "0.7069357", "0.706704", "0.7065263", "0.70588815", "0.70510334", "0.70464396", "0.70445687", "0.7041176", "0.70378923", "0.702444", "0.70198", "0.7014282", "0.7011298", "0.7009509", "0.70080775", "0.7007244", "0.70037025", "0.6995837", "0.6994016", "0.69915956", "0.69826406", "0.6981627", "0.697162", "0.69711125", "0.696817", "0.69545877", "0.69535625", "0.69516015", "0.69455", "0.6943183", "0.69363093", "0.6927955", "0.69186115", "0.6914661", "0.69091326", "0.690867", "0.69075847", "0.69037855", "0.69024944", "0.6899548", "0.6898651" ]
0.86216605
0
woocommerce_pip_create_box_content function. Create the meta box content on the single order page
Функция woocommerce_pip_create_box_content. Создание содержимого мета-окна на странице отдельного заказа
function woocommerce_pip_create_box_content() { global $post_id; ?> <table class="form-table"> <?php if ( get_post_meta( $post_id, '_pip_invoice_number', true ) ) { ?> <tr> <td><?php _e( 'Invoice: #', 'woocommerce-pip' ); echo get_post_meta( $post_id, '_pip_invoice_number', true ); ?></td> </tr> <?php } ?> <tr> <td><a class="button pip-link" href="<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_invoice' ), 'print-pip' ); ?>"><?php _e('Print Invoice', 'woocommerce-pip' ); ?></a> <a class="button pip-link" href="<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_packing' ), 'print-pip' ); ?>"><?php _e( 'Print Packing List', 'woocommerce-pip' ); ?></a> <?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { ?> <a class="button pip-email" href="<?php echo wp_nonce_url( admin_url( '?email_pip=true&post=' . $post_id ), 'email-pip' ); ?>"><?php _e( 'Send Email Invoice', 'woocommerce-pip' ); ?></a> <?php } ?> </td> </tr> </table> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_add_box() {\n\n\tadd_meta_box( 'woocommerce-pip-box', __( 'Print invoice/packing list', 'woocommerce-pip' ), 'woocommerce_pip_create_box_content', 'shop_order', 'side', 'default' );\n}", "function tech_create_meta_box() {\n\tglobal $meta_box;\n\tadd_meta_box($meta_box['id'], $meta_box['title'], 'tech_new_meta_boxes', 'post', $meta_box['context'], $meta_box['priority']);\n\tadd_meta_box($meta_box['id'], $meta_box['title'], 'tech_new_meta_boxes', 'page', $meta_box['context'], $meta_box['priority']);\n}", "public function add_order_meta_box() {\n\n\t\tadd_meta_box(\n\t\t\t'wc_shipwire_order_meta_box',\n\t\t\t__( 'Shipwire Order Information', 'woocommerce-shipwire' ),\n\t\t\tarray( $this, 'render_order_meta_box'),\n\t\t\t'shop_order',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function plib_add_box() {\n global $meta_box;\n\n foreach($meta_box as $post_type => $value) {\n add_meta_box($value['id'], $value['title'], 'plib_format_box', $post_type, $value['context'], $value['priority']);\n }\n}", "function cd_meta_box_add()\n{\n\tadd_meta_box( 'my-title-id', 'Title meta box', 'cd_meta_box_cb', 'page', 'normal', 'high' );\n\tadd_meta_box( 'my-desc-id', 'Description Meta Box', 'cd_meta_box_desc_cb', 'page', 'normal', 'high' );\n}", "public function meta_boxes() {\n cts_meta_boxes::factory()\n ->set_include_page(plugin_dir_path(__FILE__) . 'includes/add-to-cart.php')\n ->set_id('cts_add_to_cart')\n ->set_piority('high')\n ->set_screen($this->post_type->get_post_type_name())\n ->set_title('Shopping Cart Items')\n ->metabox();\n\n\n //create coupoun meta boxes\n\n cts_meta_boxes::factory()\n ->set_include_page(plugin_dir_path(__FILE__).'/includes/coupons-metabox.php')\n ->set_id('cts_coupons')\n ->set_context('normal')\n ->set_piority('high')\n ->set_screen($this->post_type->get_post_type_name())\n ->set_title('Coupons / Discounts')\n ->metabox();\n //Cart checkout\n\n cts_meta_boxes::factory()\n ->set_include_page(plugin_dir_path(__FILE__).'/includes/cart-total-metabox.php')\n ->set_id('cts_cart_total')\n ->set_context('side')\n ->set_piority('high')\n ->set_screen($this->post_type->get_post_type_name())\n ->set_title('Checkout Summary $')\n ->metabox();\n }", "function register_meta_box() {\r\n add_meta_box( 'rent-payment', $this->method_title, [ $this, 'charge_meta_box_content' ], 'shop_order' );\r\n }", "function shams_solar_pro_posttype_bn_services_meta_box() {\n add_meta_box( 'shams-solar-pro-posttype-testimonial-meta', __( 'Enter Details', 'shams-solar-pro-posttype' ), 'shams_solar_pro_posttype_bn_services_meta_callback', 'services', 'normal', 'high' );\n}", "public function meta_box_content() {\n\t\t//add_thickbox();\n\t\tglobal $post_id;\n\n\t\t$field_data = $this->custom_fields();\n\n\t\t$html = '';\n\n\t\t$html .= '<input type=\"hidden\" name=\"seriouslysimple_' . $this->token . '_nonce\" id=\"seriouslysimple_' . $this->token . '_nonce\" value=\"' . wp_create_nonce( plugin_basename( $this->dir ) ) . '\" />';\n\n\t\tif ( 0 < count( $field_data ) ) {\n\n\t\t\t$html .= '<input id=\"seriouslysimple_post_id\" type=\"hidden\" value=\"' . $post_id . '\" />';\n\n\t\t\tforeach ( $field_data as $k => $v ) {\n\t\t\t\t$data = $v['default'];\n\t\t\t\t$saved = get_post_meta( $post_id, $k, true );\n\t\t\t\tif ( $saved ) {\n\t\t\t\t\t$data = $saved;\n\t\t\t\t}\n\n\t\t\t\t$class = '';\n\t\t\t\tif ( isset( $v['class'] ) ) {\n\t\t\t\t\t$class = $v['class'];\n\t\t\t\t}\n\n\t\t\t\t$disabled = false;\n\t\t\t\tif ( isset( $v['disabled'] ) && $v['disabled'] ) {\n\t\t\t\t\t$disabled = true;\n\t\t\t\t}\n\n\t\t\t\tswitch ( $v['type'] ) {\n\t\t\t\t\tcase 'file':\n\t\t\t\t\t\t$upload_button = '<input type=\"button\" class=\"button\" id=\"upload_' . esc_attr( $k ) . '_button\" value=\"' . __( 'Upload File', 'seriously-simple-podcasting' ) . '\" data-uploader_title=\"' . __( 'Choose a file', 'seriously-simple-podcasting' ) . '\" data-uploader_button_text=\"' . __( 'Insert podcast file', 'seriously-simple-podcasting' ) . '\" />';\n\t\t\t\t\t\tif ( ssp_is_connected_to_podcastmotor() ) {\n\t\t\t\t\t\t\t$upload_button = '<div id=\"ssp_upload_container\" style=\"display: inline;\">';\n\t\t\t\t\t\t\t$upload_button .= ' <button id=\"ssp_select_file\" href=\"javascript:\">Select podcast file</button>';\n\t\t\t\t\t\t\t$upload_button .= '</div>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$html .= '<p>\n\t\t\t\t\t\t\t\t\t<label class=\"ssp-episode-details-label\" for=\"' . esc_attr( $k ) . '\">' . wp_kses_post( $v['name'] ) . '</label>';\n\n\t\t\t\t\t\tif ( ssp_is_connected_to_podcastmotor() ) {\n\t\t\t\t\t\t\t$html .= '<div id=\"ssp_upload_notification\">Your browser doesn\\'t have HTML5 support.</div>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$html .= '<input name=\"' . esc_attr( $k ) . '\" type=\"text\" id=\"upload_' . esc_attr( $k ) . '\" value=\"' . esc_attr( $data ) . '\" />\n\t\t\t\t\t\t\t\t\t' . $upload_button . '\n\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t<span class=\"description\">' . wp_kses_post( $v['description'] ) . '</span>\n\t\t\t\t\t\t\t\t</p>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\t$html .= '<p><input name=\"' . esc_attr( $k ) . '\" type=\"checkbox\" class=\"' . esc_attr( $class ) . '\" id=\"' . esc_attr( $k ) . '\" ' . checked( 'on', $data, false ) . ' /> <label for=\"' . esc_attr( $k ) . '\"><span>' . wp_kses_post( $v['description'] ) . '</span></label></p>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t$html .= '<p>\n\t\t\t\t\t\t\t\t\t<span class=\"ssp-episode-details-label\">' . wp_kses_post( $v['name'] ) . '</span><br/>';\n\t\t\t\t\t\tforeach ( $v['options'] as $option => $label ) {\n\t\t\t\t\t\t\t$html .= '<input style=\"vertical-align: bottom;\" name=\"' . esc_attr( $k ) . '\" type=\"radio\" class=\"' . esc_attr( $class ) . '\" id=\"' . esc_attr( $k ) . '_' . esc_attr( $option ) . '\" ' . checked( $option, $data, false ) . ' value=\"' . esc_attr( $option ) . '\" />\n\t\t\t\t\t\t\t\t\t\t<label style=\"margin-right:10px;\" for=\"' . esc_attr( $k ) . '_' . esc_attr( $option ) . '\">' . esc_html( $label ) . '</label>' . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$html .= '<span class=\"description\">' . wp_kses_post( $v['description'] ) . '</span>\n\t\t\t\t\t\t\t\t</p>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'select':\n\t\t\t\t\t\t$html .= '<p>\n\t\t\t\t\t\t\t\t\t<span class=\"ssp-episode-details-label\">' . wp_kses_post( $v['name'] ) . '</span><br/>';\n\t\t\t\t\t\t$html .= '<select name=\"' . esc_attr( $k ) . '\" class=\"' . esc_attr( $class ) . '\" id=\"' . esc_attr( $k ) . '_' . esc_attr( $option ) . '\">';\n\t\t\t\t\t\tforeach ( $v['options'] as $option => $label ) {\n\t\t\t\t\t\t\t$html .= '<option ' . selected( $option, $data, false ) . ' value=\"' . esc_attr( $option ) . '\">' . esc_attr( $label ) . '</option>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$html .= '</select>';\n\t\t\t\t\t\t$html .= '<span class=\"description\">' . wp_kses_post( $v['description'] ) . '</span>\n\t\t\t\t\t\t\t\t</p>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'datepicker':\n\t\t\t\t\t\t$display_date = '';\n\t\t\t\t\t\tif ( $data ) {\n\t\t\t\t\t\t\t$display_date = date( 'j F, Y', strtotime( $data ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$html .= '<p class=\"hasDatepicker\">\n\t\t\t\t\t\t\t\t\t<label class=\"ssp-episode-details-label\" for=\"' . esc_attr( $k ) . '_display\">' . wp_kses_post( $v['name'] ) . '</label>\n\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"' . esc_attr( $k ) . '_display\" class=\"ssp-datepicker ' . esc_attr( $class ) . '\" value=\"' . esc_attr( $display_date ) . '\" />\n\t\t\t\t\t\t\t\t\t<input name=\"' . esc_attr( $k ) . '\" id=\"' . esc_attr( $k ) . '\" type=\"hidden\" value=\"' . esc_attr( $data ) . '\" />\n\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t<span class=\"description\">' . wp_kses_post( $v['description'] ) . '</span>\n\t\t\t\t\t\t\t\t</p>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'textarea':\n\t\t\t\t\t\tob_start();\n\t\t\t\t\t\techo '<p><label class=\"ssp-episode-details-label\" for=\"' . esc_attr( $k ) . '\">' . wp_kses_post( $v['name'] ) . '</label><br/>';\n\t\t\t\t\t\twp_editor( $data, $k, array( 'editor_class' => esc_attr( $class ) ) );\n\t\t\t\t\t\techo '<br/><span class=\"description\">' . wp_kses_post( $v['description'] ) . '</span></p>' . \"\\n\";\n\t\t\t\t\t\t$html .= ob_get_clean();\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'hidden':\n\t\t\t\t\t\t$html .= '<p>\n\t\t\t\t\t\t\t\t\t<input name=\"' . esc_attr( $k ) . '\" type=\"hidden\" id=\"' . esc_attr( $k ) . '\" value=\"' . esc_attr( $data ) . '\" />\n\t\t\t\t\t\t\t\t</p>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t$html .= '<p>\n\t\t\t\t\t\t\t\t\t<label class=\"ssp-episode-details-label\" for=\"' . esc_attr( $k ) . '\">' . wp_kses_post( $v['name'] ) . '</label>\n\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t<input name=\"' . esc_attr( $k ) . '\" type=\"number\" min=\"0\" id=\"' . esc_attr( $k ) . '\" class=\"' . esc_attr( $class ) . '\" value=\"' . esc_attr( $data ) . '\" />\n\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t<span class=\"description\">' . wp_kses_post( $v['description'] ) . '</span>\n\t\t\t\t\t\t\t\t</p>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$html .= '<p>\n\t\t\t\t\t\t\t\t\t<label class=\"ssp-episode-details-label\" for=\"' . esc_attr( $k ) . '\">' . wp_kses_post( $v['name'] ) . '</label>\n\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t<input name=\"' . esc_attr( $k ) . '\" type=\"text\" id=\"' . esc_attr( $k ) . '\" class=\"' . esc_attr( $class ) . '\" value=\"' . esc_attr( $data ) . '\" />\n\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t<span class=\"description\">' . wp_kses_post( $v['description'] ) . '</span>\n\t\t\t\t\t\t\t\t</p>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\techo $html;\n\t}", "function add_custom_meta_box() {\n add_meta_box(\n 'recipe_meta', // $id\n 'Ingredients', // $title\n 'show_custom_meta_box', // $callback\n 'recipe', // $page\n 'advanced', // $context\n 'high' // $priority\n );\n}", "public function add_meta_boxes() {\n\t\t$screen = get_current_screen();\n\t\t$screen_id = $screen ? $screen->id : '';\n\n\t\t// Products.\n\t\tadd_meta_box( 'postexcerpt', __( 'Product short description', '' ), 'WC_Meta_Box_Product_Short_Description::output', 'product', 'normal' );\n\t\tadd_meta_box( '-product-data', __( 'Product data', '' ), 'WC_Meta_Box_Product_Data::output', 'product', 'normal', 'high' );\n\t\tadd_meta_box( '-product-images', __( 'Product gallery', '' ), 'WC_Meta_Box_Product_Images::output', 'product', 'side', 'low' );\n\n\t\t// Orders.\n\t\tforeach ( wc_get_order_types( 'order-meta-boxes' ) as $type ) {\n\t\t\t$order_type_object = get_post_type_object( $type );\n\t\t\tadd_meta_box( '-order-data', sprintf( __( '%s data', '' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Data::output', $type, 'normal', 'high' );\n\t\t\tadd_meta_box( '-order-items', __( 'Items', '' ), 'WC_Meta_Box_Order_Items::output', $type, 'normal', 'high' );\n\t\t\tadd_meta_box( '-order-notes', sprintf( __( '%s notes', '' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Notes::output', $type, 'side', 'default' );\n\t\t\tadd_meta_box( '-order-downloads', __( 'Downloadable product permissions', '' ) . wc_help_tip( __( 'Note: Permissions for order items will automatically be granted when the order status changes to processing/completed.', '' ) ), 'WC_Meta_Box_Order_Downloads::output', $type, 'normal', 'default' );\n\t\t\tadd_meta_box( '-order-actions', sprintf( __( '%s actions', '' ), $order_type_object->labels->singular_name ), 'WC_Meta_Box_Order_Actions::output', $type, 'side', 'high' );\n\t\t}\n\n\t\t\n\n\t\t// Возможность комментить\n\t\tif ( 'comment' === $screen_id && isset( $_GET['c'] ) && metadata_exists( 'comment', $_GET['c'], 'rating' ) ) {\n\t\t\tadd_meta_box( '-rating', __( 'Rating', '' ), 'WC_Meta_Box_Product_Reviews::output', 'comment', 'normal', 'high' );\n\t\t}\n\t}", "function hCustomFields_add_box() {\r\n add_meta_box( 'hCustomFields_sectionid', __( 'Hierarchical Custom Fields', 'hCustomFields_textdomain' ), \r\n 'hCustomFields_inner_custom_box', 'post' );\r\n}", "function notelywoo_meta_box(){\r\n\t\tif ( class_exists( 'WooCommerce' ) ) {\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t 'notes'\r\n\t\t\t\t,'Product Notes'\r\n\t\t\t\t,array( &$this, 'meta_box_content' )\r\n\t\t\t\t,'product'\r\n\t\t\t\t,'side'\r\n\t\t\t\t,'default'\r\n\t\t\t);\r\n\t\t}\r\n\t}", "function create_meta_box() {\r\n\r\n\t\t\tglobal $new_meta_boxes;\r\n\r\n\t\t\tif ( function_exists('add_meta_box') ) :\r\n\r\n\t\t\t\t//if ( current_user_can('administrator') || current_user_can('editor') || !current_user_can('author') && !current_user_can('contributor') ) :\r\n\r\n\t\t\t\tglobal $user;\r\n\r\n\t\t\t\tif ( $user->has_cap('edit_pages') ) :\r\n\r\n\t\t\t\t\t// External Featured image\r\n\t\t\t\t\tadd_meta_box( 'ext-feat-image', 'Featured Image from URL', 'ext_feat_image', 'post', 'side', 'low' );\r\n\r\n\t\t\t\t\t// Custom sidebar\r\n\t\t\t\t\tadd_meta_box( 'new-meta-boxes', 'Custom sidebar', 'new_meta_boxes', 'post', 'side', 'low' );\r\n\t\t\t\t\tadd_meta_box( 'new-meta-boxes', 'Custom sidebar', 'new_meta_boxes', 'page', 'side', 'low' );\r\n\r\n\t\t\t\tendif;\r\n\r\n\t\t\tendif;\r\n\r\n\t\t}", "function add_rehub_woo_meta_box() {\r\n add_meta_box(\r\n 'woo_rehub_coupons', // $id\r\n 'Coupons for Affiliate', // $title \r\n 'show_rehub_woo_meta_box', // $callback\r\n 'product', // $page\r\n 'normal', // $context\r\n 'low'); // $priority\r\n}", "function skudo_create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.\"Skudo\".' PAGE SETTINGS', 'skudo_new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "function ufandshands_meta_add_box() {\n $metaBoxes = ufandshands_getMetaBoxes();\n \n foreach ($metaBoxes as $metaBox) {\n\t add_meta_box($metaBox['id'], $metaBox['title'], 'display_html', $metaBox['page'], $metaBox['context'], $metaBox['priority'], $metaBox);\n }\n}", "function dynamic_add_custom_box() {\n add_meta_box(\n 'dynamic_sectionid',\n __( 'My Tracks', 'garage' ),\n 'dynamic_inner_custom_box',\n 'post');\n}", "function shams_solar_pro_posttype_bn_testimonial_meta_box() {\n\tadd_meta_box( 'shams-solar-pro-posttype-testimonial-meta', __( 'Enter Details', 'shams-solar-pro-posttype' ), 'shams_solar_pro_posttype_bn_testimonial_meta_callback', 'testimonials', 'normal', 'high' );\n}", "function hybrid_create_meta_box() {\n\tglobal $theme_name;\n\n\tadd_meta_box( 'post-meta-boxes', __('Post Options'), 'post_meta_boxes', 'post', 'normal', 'high' );\n\tadd_meta_box( 'slideshow-meta-boxes', __('Slideshow Options'), 'slideshow_meta_boxes', 'page', 'normal', 'high' );\n\tadd_meta_box( 'page-meta-boxes', __('Page Options'), 'page_meta_boxes', 'page', 'normal', 'high' );\n}", "static function register_metabox(){\n\n\t$box = array(\n 'name' => 'pwp_order',\n 'title' => __( 'Order parameters', 'pwp' ),\n 'post_type' => array( 'order' ),\n 'elements' => array(\n array(\n 'type' => 'text',\n 'name' => 'order_id',\n 'params'=> array(\n 'label' => __( 'Order id', 'pwp' ),\n 'class' => 'large-text',\n 'validator'=>array('notempty','email')\n\n ),\n\n ),\n\t\tarray(\n 'type' => 'orderitem',\n 'name' => 'order_item',\n 'params'=> array(\n 'label' => __( 'Order content', 'pwp' ),\n 'class' => 'large-text',\n\t\t\t\n ),\n ),\n \n \n \n \n \n\t\t\n )\n );\n new Metabox( $box );\n }", "function meticle_box_content( $post_id ) {\n\tglobal $post;\n\t// nonce field for security check, you can have the same\n\t// nonce field for all your meta boxes of same plugin\n\twp_nonce_field( plugin_basename( __FILE__ ), 'meticle_nonce' );\n\n\t// Adds all the invisible meta fields for necessary data - only adds if doesn't already exist so mostly a check\n\tadd_post_meta( $post_id, '_meticle_level', $level, true );\n\tadd_post_meta( $post_id, '_meticle_platform_linux', $linux, true );\n\tadd_post_meta( $post_id, '_meticle_platform_mac', $mac, true );\n\tadd_post_meta( $post_id, '_meticle_platform_windows', $windows, true );\n\n\t// Grabs all of the data from the meta fields\n\t$level = get_post_meta( $post->ID, '_meticle_level', true );\n\t$linux = get_post_meta( $post->ID, '_meticle_platform_linux', true );\n\t$mac = get_post_meta( $post->ID, '_meticle_platform_mac', true );\n\t$windows = get_post_meta( $post->ID, '_meticle_platform_windows', true );\n\t\n\t// Initialize empty strings so we can specify the inputs as \"checked\" so they don't appear reset after reloading an edit post page\n\t$linux_check = \"\";\n\t$mac_check = \"\";\n\t$windows_check = \"\";\n\t$level_0 = \"\";\n\t$level_1 = \"\";\n\t$level_2 = \"\";\n\t$level_3 = \"\";\n\t$c = \"checked\";\n\n\t// Check if the past data lists any as previously selected if so make the value \"checked\"\n\tif( $linux == \"1\" ){\n\t\t$linux_check = $c;\n\t}\n\tif( $mac == \"1\" ){\n\t\t$mac_check = $c;\n\t}\n\tif( $windows == \"1\" ){\n\t\t$windows_check = $c;\n\t}\n\n\t// Check with radio button was selected from previous data and set that variable as \"checked\"\n\tswitch( $level ){\n\t\tcase \"1\":\n\t\t\t$level_1 .= $c;\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\t$level_2 .= $c;\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\t$level_3 .= $c;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$level_0 .= $c;\n\t\t\tbreak;\n\t}\n\n\t// Create our html meta box with the correct fields checked\n\t?>\n\t<table>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>Platforms</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<b>Level of meticle</b>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<input type = 'checkbox' name = 'meticle_platform_linux' value = '1' <?php echo $linux_check ?> /> Linux <br />\n\t\t\t\t<input type = 'checkbox' name = 'meticle_platform_mac' value = '1' <?php echo $mac_check ?> /> Mac <br />\n\t\t\t\t<input type = 'checkbox' name = 'meticle_platform_windows' value = '1' <?php echo $windows_check ?> /> Windows <br />\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input type = 'radio' name = 'meticle_level' value = '1' id = 'diff_1' <?php echo $level_1 ?> /> Easy <br />\n\t\t\t\t<input type = 'radio' name = 'meticle_level' value = '2' id = 'diff_2' <?php echo $level_2 ?> /> Medium <br />\n\t\t\t\t<input type = 'radio' name = 'meticle_level' value = '3' id = 'diff_3' <?php echo $level_3 ?> /> Hard <br />\n\t\t\t\t<input type = 'radio' name = 'meticle_level' value = '0' id = 'diff_0' <?php echo $level_0 ?> /> None\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php\n}", "function my_em_event_order_boxes(){ \n\tadd_meta_box('em-event-order', 'Order Details', 'my_em_event_order_metabox','tribe_events', 'side','low');\n}", "public function create_meta_box(){\n\t\tadd_meta_box('image_folder_box', $this->name, array($this,'render_image_meta_box'), 'post', 'normal', 'high');\n\t}", "public function metaBoxContent()\n {\n foreach($this->items as $item) {\n\n if($item['type'] == 'field') {\n foreach($item['fields'] as $field) {\n echo $field->build();\n }\n }\n\n if($item['type'] == 'list') {\n $list_amount = 0;\n $fields = [];\n $lists = [];\n \n foreach($item['fields'] as $index => $field) {\n $field_value = CustomField::getItemValue($field->getId());\n $fields[] = $field->setIndex(0)->build();\n\n if(is_array($field_value)) {\n $field_size = sizeof($field_value);\n\n } else {\n $field_size = 0;\n }\n\n $list_amount = $list_amount < $field_size ? $field_size : $list_amount;\n }\n\n for($list_index = 0; $list_index < $list_amount; $list_index++) {\n $fields = [];\n foreach($item['fields'] as $field) {\n $fields[] = $field->setIndex($list_index)->build();\n }\n\n $lists[] = [\n 'fields' => $fields\n ];\n }\n\n echo Template::build('MetaBox/list.html', [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'label' => $item['label'],\n 'fields' => $fields,\n 'lists' => $lists,\n 'text' => $this->text\n ]);\n }\n }\n\t}", "function cp_meta_box( $object, $box ) {\n\n $token = wp_nonce_field( basename( __FILE__ ), 'cp_token' ); \n\n $url = esc_attr( get_post_meta( $object->ID, 'cp_url', true ) );\n $checked = $url !== '';\n $menus = get_post_meta( $object->ID, 'cp_include_menus', true );\n\n ?>\n\n <?php echo $token ?>\n\n <div class=\"cp-row\">\n <label for=\"cp-enabled\">\n <input type=\"checkbox\" id=\"cp-enabled\" name=\"cp_enabled\" <?php echo ($checked ? 'checked' : '')?> />\n Replace with a Codex Press article.\n </label>\n </div>\n\n <div class=\"cp-editor\" <?php echo ($checked ? 'style=\"display:block\"' : '') ?>>\n <div class=\"cp-row\">\n <label for=\"cp-url\">URL of the article on Codex Press:</label>\n <input placeholder=\"e.g. /nimble/xela\" type=\"text\" size=\"30\" id=\"cp-url\" name=\"cp_url\" value=\"<?php echo $url ?>\" >\n </div>\n\n <div class=\"cp-row\">\n <label for=\"cp-include-menus\">\n <input type=\"checkbox\" id=\"cp-include-menus\" name=\"cp_include_menus\" <?php echo ($menus ? 'checked' : '') ?>>\n Include WordPress menus\n </label>\n </div>\n\n <div class=\"cp-row\">\n <input type=\"button\" class=\"button button-large\" id=\"cp-edit\" value=\"Edit\">\n <input type=\"button\" class=\"button button-large\" id=\"cp-pull\" value=\"Pull Content\">\n <input type=\"button\" class=\"button button-large\" id=\"cp-undo\" value=\"Undo Pull\">\n </div>\n\n <a target=_blank href=https://codex.press/docs/wordpress>More information about this box.</a>\n\n </div>\n\n <?php\n}", "function biagiotti_mikado_meta_box_add() {\n\t\tglobal $biagiotti_mikado_global_Framework;\n\n\t\tforeach ( $biagiotti_mikado_global_Framework->mkdMetaBoxes->metaBoxes as $key => $box ) {\n\t\t\t$hidden = false;\n\t\t\tif ( ! empty( $box->hidden_property ) ) {\n\t\t\t\tforeach ( $box->hidden_values as $value ) {\n\t\t\t\t\tif ( biagiotti_mikado_option_get_value( $box->hidden_property ) == $value ) {\n\t\t\t\t\t\t$hidden = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( is_string( $box->scope ) ) {\n\t\t\t\t$box->scope = array( $box->scope );\n\t\t\t}\n\n\t\t\tif ( is_array( $box->scope ) && count( $box->scope ) ) {\n\t\t\t\tforeach ( $box->scope as $screen ) {\n biagiotti_mikado_create_meta_box_handler( $box, $key, $screen );\n\n\t\t\t\t\tif ( $hidden ) {\n\t\t\t\t\t\tadd_filter( 'postbox_classes_' . $screen . '_mkdf-meta-box-' . $key, 'biagiotti_mikado_meta_box_add_hidden_class' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( biagiotti_mikado_is_plugin_installed( 'gutenberg-editor' ) || biagiotti_mikado_is_plugin_installed( 'gutenberg-plugin' ) ) {\n\t\t\tbiagiotti_mikado_enqueue_meta_box_styles();\n\t\t\tbiagiotti_mikado_enqueue_meta_box_scripts();\n\t\t} else {\n\t\t\tadd_action( 'admin_enqueue_scripts', 'biagiotti_mikado_enqueue_meta_box_styles' );\n\t\t\tadd_action( 'admin_enqueue_scripts', 'biagiotti_mikado_enqueue_meta_box_scripts' );\n\t\t}\n\t}", "function company_details_add_meta_box(){\n add_meta_box('user_text', 'Company Details', 'company_details_callback_function', 'application_jobs', 'side');\n}", "function charge_meta_box_content(WP_Post $post) {\r\n global $pagenow;\r\n wp_enqueue_script('wc-rent-payment-admin', WC_RENTPAYMENT_PLUGIN_URL . '/assets/js/admin.js', ['jquery-ui-tabs'], WC_RENTPAYMENT_PLUGIN_VERSION);\r\n wp_enqueue_style('wc-rent-payment-admin', WC_RENTPAYMENT_PLUGIN_URL . '/assets/css/admin.css', [] , WC_RENTPAYMENT_PLUGIN_VERSION);\r\n $order = new WC_Order( wc_get_order() );\r\n\r\n if (! $order->is_editable()) {\r\n echo __('<p>This order is closed, payment cannot be processed anymore.</p>',self::TEXTDOMAIN);\r\n return;\r\n }\r\n\r\n if (! $order->needs_payment()) {\r\n echo __('<p>This order doesn\\'t need any payment.</p>',self::TEXTDOMAIN);\r\n if ( in_array( $pagenow, array( 'post-new.php' )) ) {\r\n echo __('<p>Add items and fees first, then come back to manage the payment.</p>',self::TEXTDOMAIN);\r\n }\r\n return;\r\n }\r\n\r\n if ($this->sandbox) {\r\n echo \"<p>The payment gateway is in sandbox mode, credit cards will not be charged.</p>\";\r\n }\r\n\r\n $token = $order->get_meta(self::ORDER_META_RENTPAYMENT_TOKEN);\r\n\r\n require_once WC_RENTPAYMENT_PLUGIN_PATH . '/templates/charge-meta-box.php';\r\n }", "public function create_meta_boxes () {\n\t\t\n\t\t\tif ( function_exists('add_meta_box') ) { \t\t\n\t\t\t\t\n\t\t\t\tadd_meta_box( 'reservation-data', __( 'Reservation Details', 'woothemes' ), array(&$this, 'meta_box_reservationdata'), $this->token, 'normal', 'low');\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tadd_action('dbx_post_advanced', array(&$this, 'meta_box_reservationdata'));\n\t\t\t\n\t\t\t} // End IF Statement\n\t\t\t\n\t\t\t// Remove \"Diner Custom Settings\" meta box.\n\t\t\tremove_meta_box( 'woothemes-settings', 'reservation', 'normal' );\n\t\t\t\n\t\t}", "public function add_meta_box() {\n\t\tglobal $post, $current_screen;\n\n\t\t// sanity checks\n\t\tif ( ! $post instanceof WP_Post\n\t\t || ! $current_screen\n\t\t || ! in_array( $current_screen->id, $this->screens, true )\n\t\t || ! current_user_can( 'manage_woocommerce_pickup_locations' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->get_title(),\n\t\t\tarray( $this, 'do_output' ),\n\t\t\t$current_screen->id,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\n\t\tadd_filter( \"postbox_classes_{$current_screen->id}_{$this->id}\", array( $this, 'postbox_classes' ) );\n\t}", "function dynamic_inner_custom_box() {\n global $post;\n // Use nonce for verification\n wp_nonce_field( plugin_basename( __FILE__ ), 'dynamicMeta_noncename' );\n \n $prfx_stored_meta = get_post_meta( $post->ID );\n ?>\n\n <p>\n <label for=\"mb-secondary-title\" class=\"prfx-row-title major-label\"><?php _e( 'Title/Heading', 'prfx-textdomain' )?></label>\n <input type=\"text\" name=\"mb-secondary-title\" class=\"meta-text-input major-input\" value=\"<?php if ( isset ( $prfx_stored_meta['mb-secondary-title'] ) ) echo $prfx_stored_meta['mb-secondary-title'][0]; ?>\" />\n </p>\n\n <div id=\"meta_inner\">\n <?php\n\n //get the saved meta as an arry\n $books = get_post_meta($post->ID,'mb-secondary-books',true);\n\n $c = 0;\n if ( count( $books ) > 0 ) {\n echo '<div class=\"secondary-books\">';\n foreach( $books as $book ) {\n if ( isset( $book['title'] ) || isset( $book['url'] ) ) {\n printf( '<div class=\"single-secondary-book\"><p>' .\n '<label class=\"prfx-row-title\">Book Title</label>' .\n '<input type=\"text\" class=\"meta-text-input\" name=\"mb-secondary-books[%1$s][title]\" value=\"%2$s\" />' .\n '</p>' .\n '<p>' .\n '<label class=\"prfx-row-title\">Subtitle</label>' .\n '<input type=\"text\" class=\"meta-text-input\" name=\"mb-secondary-books[%1$s][subtitle]\" value=\"%3$s\" />' .\n '</p>' .\n '<p>' .\n '<label class=\"prfx-row-title\">Book Page URL</label>' .\n '<input type=\"text\" class=\"meta-text-input\" name=\"mb-secondary-books[%1$s][book-url]\" value=\"%4$s\" />' .\n '</p>' .\n '<p>' .\n '<div class=\"flex-container\"><label class=\"prfx-row-title\">Image</label>' .\n '<span class=\"flex-image-thumb %1$s\"><img src=\"%5$s\" /></span>' .\n '<input type=\"hidden\" class=\"image-url\" name=\"mb-secondary-books[%1$s][meta-image]\" value=\"%5$s\" />' .\n '<input type=\"button\" class=\"add-image button\" value=\"Add/Change Image\" /></div>' . \n '</p>' .\n '<p>' .\n '<label class=\"prfx-row-title\">Description</label>' .\n '<textarea rows=\"10\" class=\"meta-text-input\" name=\"mb-secondary-books[%1$s][desc]\" value=\"%6$s\">%6$s</textarea>' .\n '</p>' .\n '<p>' .\n '<label class=\"prfx-row-title\">Buy Link</label>' .\n '<input type=\"url\" class=\"meta-text-input\" name=\"mb-secondary-books[%1$s][buylink]\" value=\"%7$s\" />' .\n '</p>' .\n '<span class=\"remove button\">%8$s</span></div>', $c, $book['title'], $book['subtitle'], $book['book-url'], $book['meta-image'], $book['desc'], $book['buylink'], __( 'Remove Book' ) );\n $c = $c +1;\n }\n } \n echo '</div>';\n }\n\n ?>\n<span id=\"here\"></span>\n<span class=\"add button\"><?php _e('Add A Book'); ?></span>\n<script>\n var $ =jQuery.noConflict();\n $(document).ready(function() {\n var count = <?php echo $c; ?>;\n $(\".add\").click(function() {\n count = count + 1;\n\n $('#here').append('<div class=\"secondary-books\">' +\n '<p>' +\n '<label class=\"prfx-row-title\">Book Title</label>' +\n '<input type=\"text\" class=\"meta-text-input\" name=\"mb-secondary-books['+count+'][title]\" value=\"\" />' +\n '</p>' +\n '<p>' +\n '<label class=\"prfx-row-title\">Subtitle</label>' +\n '<input type=\"text\" class=\"meta-text-input\" name=\"mb-secondary-books['+count+'][subtitle]\" value=\"\" />' +\n '</p><p>' +\n '<label class=\"prfx-row-title\">Book Page URL</label>' + \n '<input type=\"url\" class=\"meta-text-input\" name=\"mb-secondary-books['+count+'][book-url]\" value=\"\" />' +\n '</p>' +\n '<p>' +\n '<div class=\"flex-container dynamic\"><label class=\"prfx-row-title\">Image</label>' + \n '<span class=\"flex-image-thumb\"></span>' +\n '<input type=\"hidden\" class=\"image-url\" name=\"mb-secondary-books['+count+'][meta-image]\" value=\"\" />' +\n '<input type=\"button\" class=\"add-image button\" value=\"Add/Change Image\" /></div>' + \n '</p>' +\n '<p>' +\n '<label class=\"prfx-row-title\">Description</label>' + \n '<textarea class=\"meta-text-input\" name=\"mb-secondary-books['+count+'][desc]\"></textarea>' +\n '</p>' +\n '<p>' +\n '<label class=\"prfx-row-title\">Buy Link</label>' + \n '<input type=\"url\" class=\"meta-text-input\" name=\"mb-secondary-books['+count+'][buylink]\" value=\"\" />' +\n '</p>' +\n '<span class=\"remove button\">Remove Book</span></div>' );\n return false;\n });\n $(\".remove\").live('click', function() {\n $(this).parent().remove();\n });\n });\n </script>\n</div><?php\n\n}", "function skudo_create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.\"Skudo\".' POST TYPE SETTINGS', 'skudo_new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "function store_add_cart_meta(){\n \t\tglobal $post;\n\n\t \tadd_meta_box(\"store_cart_list_products\", \"Attached Products\", \"store_cart_list_products\", \"orders\", \"normal\", \"low\");\n\t \tadd_meta_box(\"store_cart_list_products\", \"Attached Products\", \"store_cart_list_products\", \"cart\", \"normal\", \"low\");\n\t \tadd_meta_box(\"store_order_show_status\", \"Order Status\", \"store_order_show_status\", \"orders\", \"side\", \"low\");\n\t \tif ( store_get_order_shipping_address($post->ID) && store_get_order_billing_address($post->ID) ) {\n\t\t \tadd_meta_box(\"store_cart_list_addresses\", \"Addresses\", \"store_cart_list_addresses\", \"orders\", \"normal\", \"low\");\n\t\t}\n\t\tadd_meta_box(\"store_list_order_history\", \"History\", \"store_list_order_history\", \"orders\", \"side\", \"low\");\n\t\tadd_meta_box(\"store_transaction_info\", \"Transaction Info\", \"store_transaction_info\", \"orders\", \"side\", \"low\");\n\t}", "function alep_add_custom_meta_box() {\n\t\tadd_meta_box( 'alep-meta-box', __( 'Alep Shortcodes', 'alep' ), 'alep_meta_box_output', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'alep-meta-box', __( 'Alep Shortcodes', 'alep' ), 'alep_meta_box_output', 'page', 'normal', 'high' );\n\t}", "public function build_product_meta_box($agilepress_meta) {\n\t\t$product_post_id = get_the_ID();\n\t\t$product_post_name = get_post_field('post_name', $product_post_id);\n\n\t\t$agilepress_version = (!empty($agilepress_meta['version'])) ? $agilepress_meta['version'] : '';\n\t\t$agilepress_target = (!empty($agilepress_meta['target'])) ? $agilepress_meta['target'] : '';\n\t\t$agilepress_phase = (!empty($agilepress_meta['phase'])) ? $agilepress_meta['phase'] : '';\n\n\t\t//nonce field for security\n\t\twp_nonce_field( 'product-meta-box-save', 'agilepress' );\n\n\t // meta box form\n\t $product_metabox = '<table>';\n\t $product_metabox .= '<tr>';\n\t $product_metabox .= '<td>' .__('Current Version', 'agilepress').':</td><td><input type=\"text\" name=\"agilepress_product[version]\" value=\"'.esc_attr( $agilepress_version ).'\" size=\"24\" ' . $this->is_disabled() . '></td>';\n\t $product_metabox .= '</tr><tr>';\n\t $product_metabox .= '<td>' .__('Target Version', 'agilepress').':</td><td><input type=\"text\" name=\"agilepress_product[target]\" value=\"'.esc_attr( $agilepress_target ).'\" size=\"24\" ' . $this->is_disabled() . '></td>';\n\t $product_metabox .= '</tr>';\n\n\t\t// start phase select box\n\t\t$product_development_phase = array(\n\t\t\t['post_name' => 'pre-alpha',\n\t\t\t'post_title' => 'Pre-Alpha'],\n\t\t\t['post_name' => 'alpha',\n\t\t\t'post_title' => 'Alpha'],\n\t\t\t['post_name' => 'closed-beta',\n\t\t\t'post_title' => 'Closed Beta'],\n\t\t\t['post_name' => 'open-beta',\n\t\t\t'post_title' => 'Open Beta'],\n\t\t\t['post_name' => 'release-candidate',\n\t\t\t'post_title' => 'Release Candidate'],\n\t\t\t['post_name' => 'release-to-web',\n\t\t\t'post_title' => 'Release to Web/MFG'],\n\t\t\t['post_name' => 'general-availability',\n\t\t\t'post_title' => 'General Availability'],\n\t\t);\n\n\t\t$product_metabox .= $this->meta_select_box(\n\t\t\t'In-Progress Version Status',\n\t\t\t'agilepress_product[phase]',\n\t\t\t$agilepress_phase,\n\t\t\tnull,\n\t\t\t$product_development_phase);\n\t\t// end select box\n\n\t //display the meta box shortcode legend section\n\t $product_metabox .= '<tr><td colspan=\"2\"><hr></td></tr>';\n\t $product_metabox .= '<tr><td colspan=\"2\"><strong>' .__( 'Shortcode Legend', 'agilepress' ).'</strong></td></tr>';\n\t\t$product_metabox .= '<tr><td colspan=\"2\"><em>' .__( '(These shortcodes all you to show AgilePress datapoints in posts and pages as needed.)', 'agilepress' ).'</em></td></tr>';\n\t\t$product_metabox .= '<tr><td colspan=\"2\"><hr /></td></tr>';\n\t $product_metabox .= '<tr><td>' .__( 'Version', 'agilepress' ).':</td><td>[agilepress-data type=product value=' . esc_html($product_post_name) . ' show=version]</td></tr>';\n\t\t$product_metabox .= '<tr><td>' .__( 'Target', 'agilepress' ).':</td><td>[agilepress-data type=product value=' . esc_html($product_post_name) . ' show=target]</td></tr>';\n\t\t$product_metabox .= '<tr><td>' .__( 'Phase', 'agilepress' ).':</td><td>[agilepress-data type=product value=' . esc_html($product_post_name) . ' show=phase]</td></tr>';\n\t $product_metabox .= '</table>';\n\n\t\treturn $product_metabox;\n\t}", "function mytheme_show_box() {\n global $meta_box, $post;\n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n echo '<table class=\"form-table\">';\n foreach ($meta_box['fields'] as $field) {\n // get current post meta data\n $meta = get_post_meta($post->ID, $field['id'], true);\n echo '<tr>',\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n '<td>';\n switch ($field['type']) {\n case 'text':\n echo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />', '<br />', $field['desc'];\n break;\n }\n echo '</td><td>',\n '</td></tr>';\n }\n echo '</table>';\n }", "function places_meta_box(){\n\tadd_meta_box('places_box', 'Place/Trip Details', 'places_box_callback', 'places', 'normal', 'high');\n\t// add_meta_box('beer_review_meta_box', 'Beer Review Details', 'display_beer_review_meta_box', 'places', 'normal', 'high');\n}", "function my_wish_dynamic_add_custom_box() {\r\n\tadd_meta_box(\r\n\t\t'my_wish_dynamic_sectionid',\r\n\t\t__( 'Wishes', 'myplugin_textdomain' ),\r\n\t\t'my_wish_dynamic_inner_custom_box',\r\n\t\t'wishlist' );\r\n\r\n\tadd_meta_box(\r\n\t\t'my_wish_dynamic_sidebarid',\r\n\t\t__( 'Wishlist Settings', 'myplugin_textdomain' ),\r\n\t\t'my_wish_dynamic_sidebar_custom_box',\r\n\t\t'wishlist',\r\n\t\t'side',\r\n\t\t'high' );\r\n}", "public function add_meta_box( ) {\n\t\t$post_type = $this->post_type;\n\n\t\tif($post_type == 'pi_portfolio'){\n\t\t\tadd_meta_box(\n\t\t\t\t'pi_item_data',\n\t\t\t\t__( 'Item Information', $this->theme_name ),\n\t\t\t\tarray( $this, 'render_pi_portfolio_info' ),\n\t\t\t\t$post_type,\n\t\t\t\t'normal',\n\t\t\t\t'high'\n\t\t\t);\n\t\t}else{\n\t\t\tadd_meta_box(\n\t\t\t\t'pi_images',\n\t\t\t\t__( 'Slider Upload',\n\t\t\t\t\t$this->theme_name ),\n\t\t\t\tarray( $this, 'render_pi_plupload' ),\n\t\t\t\t$post_type,\n\t\t\t\t'normal',\n\t\t\t\t'high'\n\t\t\t);\n\t\t\tadd_meta_box(\n\t\t\t\t'pislider_shortcode',\n\t\t\t\t__( 'Shortcode', $this->theme_name ),\n\t\t\t\tarray( $this, 'pi_slider_shortcode_callback' ),\n\t\t\t\t$post_type,\n\t\t\t\t'side',\n\t\t\t\t'low'\n\t\t\t);\n\t\t\tadd_meta_box(\n\t\t\t\t'pislider_settings',\n\t\t\t\t__( 'Settings', $this->theme_name ),\n\t\t\t\tarray( $this, 'render_settings_content' ),\n\t\t\t\t$post_type,\n\t\t\t\t'advanced',\n\t\t\t\t'low'\n\t\t\t);\n\t\t}\n\n\t}", "public static function register_meta_boxes() {\n\t\t// invoice specific\n\t\t$args = array(\n\t\t\t'si_invoice_line_items' => array(\n\t\t\t\t'title' => __( 'Management', 'sprout-invoices' ),\n\t\t\t\t'show_callback' => array( __CLASS__, 'show_line_items_view' ),\n\t\t\t\t'save_callback' => array( __CLASS__, 'save_line_items' ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'weight' => 0,\n\t\t\t\t'save_priority' => 5,\n\t\t\t),\n\t\t\t'si_invoice_update' => array(\n\t\t\t\t'title' => __( 'Information', 'sprout-invoices' ),\n\t\t\t\t'show_callback' => array( __CLASS__, 'show_information_meta_box' ),\n\t\t\t\t'save_callback' => array( __CLASS__, 'save_meta_box_invoice_information' ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'weight' => 20,\n\t\t\t\t'save_priority' => 50,\n\t\t\t),\n\t\t\t'si_doc_send' => array(\n\t\t\t\t'title' => __( 'Send Invoice', 'sprout-invoices' ),\n\t\t\t\t'show_callback' => array( __CLASS__, 'show_invoice_send_view' ),\n\t\t\t\t'save_callback' => array( __CLASS__, 'save_invoice_note' ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'low',\n\t\t\t\t'weight' => 30,\n\t\t\t\t'save_priority' => 500,\n\t\t\t),\n\t\t\t'si_invoice_history' => array(\n\t\t\t\t'title' => __( 'Invoice History', 'sprout-invoices' ),\n\t\t\t\t'show_callback' => array( __CLASS__, 'show_submission_history_view' ),\n\t\t\t\t'save_callback' => array( __CLASS__, '_save_null' ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'low',\n\t\t\t\t'weight' => 20,\n\t\t\t),\n\t\t\t'si_invoice_notes' => array(\n\t\t\t\t'title' => __( 'Terms & Notes', 'sprout-invoices' ),\n\t\t\t\t'show_callback' => array( __CLASS__, 'show_notes_view' ),\n\t\t\t\t'save_callback' => array( __CLASS__, 'save_notes' ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'low',\n\t\t\t\t'weight' => 100,\n\t\t\t),\n\t\t);\n\t\tdo_action( 'sprout_meta_box', $args, SI_Invoice::POST_TYPE );\n\t}", "function coupon_code_add_custom_box()\n{\n add_meta_box(\n 'coupon_code_meta_box',\n __('Coupon Codes and Links', 'dietdiscountcode'),\n 'coupon_code_inner_custom_box',\n 'post'\n );\n}", "function gb_add_meta_box() {\n\n\tadd_meta_box(\n\t\t'gb-meta-box',\n\t\t__( 'GB Meta Box', 'text-domain' ),\n 'gb_meta_box_callback',\n 'post'\n );\n\n}", "public function create_meta_boxes(){\n\tforeach( $this->metaboxes as $meta_box => $fields ){\n\t\t\n\t\t$unique_id = strtolower( Inflector::singularize( $this->class_name ) ) . '_' . $meta_box;\n\t\t$title = Inflector::humanize( Inflector::singularize( $meta_box ));\n\t\t$context = 'advanced';\n\t\t$priority = 'default'; \n\t\tadd_meta_box( $unique_id, $title, array($this, 'output_meta_box'), $this->post_type_slug, $context, $priority, array($fields) );\n\t\t\n\t}\n\t\n}", "function biagiotti_mikado_render_meta_box( $post, $metabox ) { ?>\n\t\t<div class=\"mkdf-meta-box mkdf-page\">\n\t\t\t<div class=\"mkdf-meta-box-holder\">\n\t\t\t\t<?php $metabox['args']['box']->render(); ?>\n\t\t\t\t<?php wp_nonce_field( 'biagiotti_mikado_meta_box_' . $metabox['args']['box']->name . '_save', 'biagiotti_mikado_meta_box_' . $metabox['args']['box']->name . '_save' ); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function add_custom_meta_box()\n{\n add_meta_box(\"circolari-meta-box\", \"Report Circolari\", \"dsi_circolari_meta_box\", \"circolare\", \"normal\");\n}", "public function render_meta_box_content( $post ) {\n // Add an nonce field so we can check for it later.\n wp_nonce_field( 'vhrp_custom_box', 'vhrp_custom_box_nonce' );\n\n $saved_values = get_post_meta( $post->ID, $this->metakey, true );\n\n\n $args = array(\n 'post_type' => array('post','page'),\n 'posts_per_page' => -1,\n 'post_status' => 'publish'\n );\n $posts_query = new WP_Query( apply_filters( 'vhrp_admin_query', $args ) );\n\n require_once( dirname( __FILE__ ) . '/templates/admin.php' );\n }", "function add_page_meta_box()\n{\n add_meta_box(\n \"page-custom-meta-box\", \n \"Page Elements\", \n \"page_meta_custom_fields\", \n \"page\", \n \"side\", \n \"high\", \n null);\n}", "function product_meta_boxes() {\n\t\tadd_meta_box( 'products-price', 'Product Price', array( &$this, 'prod_price_box' ), 'product', 'side', 'high' );\n\t\tadd_meta_box( 'products-online', 'Only Sold Online', array( &$this, 'prod_online_box' ), 'product', 'side', 'high' );\n\t\tadd_meta_box( 'products-images', 'Product Images', array( &$this, 'prod_images_box' ), 'product', 'side', 'high' );\n\t\t\n\t add_meta_box( 'product-image', 'Product Image', array( &$this, 'product_image_box' ), 'product', 'side', 'high' );\n }", "function front_office_add_meta_box() {\n\n\n add_meta_box(\n 'front_office_sectionid', 'Front Office Staff Info', 'front_office_meta_box_callback', 'front_office'\n ); //you can change the 4th paramter i.e. post to custom post type name, if you want it for something else\n\n}", "function mfn_layout_meta_add() {\n\tglobal $mfn_layout_meta_box;\n\tadd_meta_box($mfn_layout_meta_box['id'], $mfn_layout_meta_box['title'], 'mfn_layout_show_box', $mfn_layout_meta_box['page'], $mfn_layout_meta_box['context'], $mfn_layout_meta_box['priority']);\n}", "public static function renderMetaBox() {\n\t\twp_nonce_field(self::ACTION_SAVE, self::NONCE . '-nonce');\n\n\t\tinclude 'meta-box.php';\n\t}", "public function address_meta_box_html() {\n\t\t$price = get_post_meta( get_the_ID(), '_hotel_price', true );\n\t\t$hotel_address = get_post_meta( get_the_ID(), '_hotel_address', true );\n\t\t$hotel_country = get_post_meta( get_the_ID(), '_hotel_country', true );\n\t\t$id_images = get_post_meta( get_the_ID(), '_hotel_gallery', true );\n\n\t\twp_nonce_field( plugin_basename( __FILE__ ), 'hotel-option' );\n\n\t\tMeta_Boxes::va_show_template_meta_box(\n\t\t\tarray(\n\t\t\t\t'id' => 'hotel_price',\n\t\t\t\t'title' => esc_html__( 'Price', 'minimo' ),\n\t\t\t\t'name' => 'hotel_price',\n\t\t\t\t'value' => $price,\n\t\t\t),\n\t\t\t'text'\n\t\t);\n\t\tMeta_Boxes::va_show_template_meta_box(\n\t\t\tarray(\n\t\t\t\t'id' => 'hotel_address',\n\t\t\t\t'title' => esc_html__( 'Address', 'minimo' ),\n\t\t\t\t'name' => 'hotel_address',\n\t\t\t\t'value' => $hotel_address,\n\t\t\t),\n\t\t\t'text'\n\t\t);\n\t\tMeta_Boxes::va_show_template_meta_box(\n\t\t\tarray(\n\t\t\t\t'id' => 'hotel_country',\n\t\t\t\t'title' => esc_html__( 'Country', 'minimo' ),\n\t\t\t\t'name' => 'hotel_country',\n\t\t\t\t'value' => $hotel_country,\n\t\t\t),\n\t\t\t'text'\n\t\t);\n\t\tMeta_Boxes::va_show_template_meta_box(\n\t\t\tarray(\n\t\t\t\t'id' => '_hotel_gallery',\n\t\t\t\t'title' => esc_html__( 'Gallery', 'minimo' ),\n\t\t\t\t'value' => $id_images,\n\t\t\t\t'multiple' => true,\n\t\t\t),\n\t\t\t'gallery'\n\t\t);\n\t}", "function wp_basalcart_setup_meta_boxes() {\n\t\tadd_meta_box('wp_basalcart_mainimagebox', 'Upload Mainimage', array($this, 'wp_basalcart_render_image_attachment_box'), 'wp_basalcart_product', 'normal', 'high', array('typeofbox'=>'mainimage'));\n\t\tadd_meta_box('wp_basalcart_pic1box', 'Upload Pic1', array($this, 'wp_basalcart_render_image_attachment_box'), 'wp_basalcart_product', 'normal', 'high', array('typeofbox'=>'pic1'));\n\t\tadd_meta_box('wp_basalcart_pic2box', 'Upload Pic2', array($this, 'wp_basalcart_render_image_attachment_box'), 'wp_basalcart_product', 'normal', 'high', array('typeofbox'=>'pic2'));\n\t\tadd_meta_box('wp_basalcart_pic3box', 'Upload Pic3', array($this, 'wp_basalcart_render_image_attachment_box'), 'wp_basalcart_product', 'normal', 'high', array('typeofbox'=>'pic3'));\n\t\tadd_meta_box('wp_basalcart_price', 'Price', array($this, 'wp_basalcart_render_general_meta_box'), 'wp_basalcart_product', 'side', 'default', array('typeofbox'=>'price'));\n\t\tadd_meta_box('wp_basalcart_sku', 'SKU', array($this, 'wp_basalcart_render_general_meta_box'), 'wp_basalcart_product', 'side', 'default', array('typeofbox'=>'sku'));\n\t}", "public function meta_box_cb() {\r\n\r\n\t\t// $post is already set, and contains an object: the WordPress post\r\n\t\tglobal $post;\r\n\t\t$basic_fields = new CustomFieldBasic();\r\n\t\t$multi = new MultiSelectTransfer();\r\n\t\t//Now get the values\r\n\t\t$values = get_post_custom( $post->ID );\r\n\r\n\t\tforeach(static::$my_meta_box['box_fields'] as $val):\r\n\t\t\t$$val = isset( $values[$val] ) ? array_shift($values[$val]) : '';\r\n\t\tendforeach;\r\n\r\n\t\t//We'll use this nonce field later when saving\r\n\t\twp_nonce_field ('my_doc_meta_box_nonce_id','my_doc_meta_box_nonce_fieldname');\r\n\t\t?>\r\n\t\t\t<?php\r\n\t\t\t// Globalize $post\r\n\t\t\tglobal $post;\r\n\t\t\t// Get the page template post meta\r\n\t\t\t$page_template = get_post_meta( $post->ID, '_wp_page_template', true );\r\n\t\t\tif($page_template =='page-templates/menu.php'):?>\r\n\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\r\n\t\t\t<!--rh_is_beer_menu-->\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_is_beer_menu';\r\n\t\t\t$fieldlabel = 'Is this the beer menu?';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = 'Use this toggle to override Single Platform settings and display data from from BeerMenus.com.';\r\n\t\t\techo $basic_fields->get_checkbox($fieldname, $fieldlabel, $fieldvalue, $fieldnotes, $fieldplaceholder);\r\n\t\t\t?>\r\n\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\r\n\t\t\t<!--rh_menu_id-->\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_menu_id';\r\n\t\t\t$fieldlabel = 'Order Number (Located in Single Platform backend next to Menu title field)';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = 'We use the Single Platform menu Order Number to map this page to the proper menu within the Single Platform api.';\r\n\t\t\techo $basic_fields->get_text_input( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder );\r\n\r\n\t\t\tendif; // end if is menu page template\r\n\t\t\t?>\r\n\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\r\n\t\t\t<!--rh_display_title-->\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_display_title';\r\n\t\t\t$fieldlabel = 'Page Display Title:';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = '';\r\n\t\t\techo $basic_fields->get_text_input( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder );\r\n\t\t\t?>\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\t\t\t<?php\r\n\t\t\t\t// Is the currently edited page the front page?\r\n\t\t\t\t$is_front = false;\r\n\t\t\t\t$front_page_id = get_option('page_on_front');\r\n\t\t\t\tif($front_page_id == $post->ID) {\r\n\t\t\t\t\t$is_front = true;\r\n\t\t\t\t}\r\n\t\t\t\tif($is_front):\r\n\t\t\t?>\r\n\t\t\t<h1>Note: Homepage hero area media must respect a precise 16/9 width-to-height ratio for proper front-end display.</h1>\r\n\t\t\t<?php else: ?>\r\n\t\t\t<h1>Note: Desktop Masthead media must respect a 1920 x 350 width-to-height ratio for proper front-end display. Additionally, whitespace is required within masthead media at bottom to provide for page title overlap.</h1>\r\n\t\t\t<?php endif; ?>\r\n\t\t\t<!--rh_header_img-->\r\n\t\t\t<?php if($is_front): ?>\r\n\t\t\t\t<h3>Video, if populated, will appear in the homepage hero area for desktop screen sizes.</h3>\r\n\t\t\t<?php else: ?>\r\n\t\t\t\t<h3>Video, if populated, will appear in the masthead area for desktop screen sizes. Whitespace is required within the video at bottom to allow for title overlap.</h3>\r\n\t\t\t<?php endif; ?>\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_header_img';\r\n\t\t\t$fieldlabel = '<br />Video:';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = '';\r\n\t\t\techo $basic_fields->get_browse( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder );\r\n\t\t\t?>\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\t\t\t<!--rh_poster_img-->\r\n\t\t\t<?php if($is_front): ?>\r\n\t\t\t\t<h3>Image, if populated, will appear in the homepage hero area for device screen sizes. If no video, this image will populate for all screen sizes.</h3>\r\n\t\t\t<?php else: ?>\r\n\t\t\t\t<h3>If populated, will appear in the masthead area for desktop screen sizes. If no video populated, this image will display for all screen sizes. Whitespace is required within the image at bottom to allow for title overlap.</h3>\r\n\t\t\t<?php endif; ?>\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_poster_img';\r\n\t\t\t$fieldlabel = '<br />Image:';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = '';\r\n\t\t\techo $basic_fields->get_browse( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder );\r\n\t\t\t?>\r\n\t\t\t<?php if(!$is_front): ?>\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\t\t\t<!--rh_mobile_img-->\r\n\t\t\t<h3>Mobile masthead image. 1920px by 720px image expected.</h3>\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_mobile_img';\r\n\t\t\t$fieldlabel = '<br />Device Masthead Image:';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = '';\r\n\t\t\techo $basic_fields->get_browse( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder );\r\n\t\t\t?>\r\n\t\t\t<?php endif; ?>\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\r\n\t\t\t<!--rh_page_base_color-->\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_page_base_color';\r\n\t\t\t$fieldlabel = 'Page Base Color:';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = isset( $$fieldname ) && !empty( $$fieldname ) ? $$fieldname : 'blue';\r\n\t\t\t$fieldnotes = 'Controls color for page title, page title border, and subheadings.';\r\n\t\t\t$fieldoptions = array(\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'label' => 'Red',\r\n\t\t\t\t\t\t'value'\t=> 'red'\r\n\t\t\t\t\t],\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'label' => 'Blue',\r\n\t\t\t\t\t\t'value'\t=> 'blue'\r\n\t\t\t\t\t],\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'label' => 'Yellow',\r\n\t\t\t\t\t\t'value'\t=> 'yellow'\r\n\t\t\t\t\t],\r\n\r\n\t\t\t\t);\r\n\t\t\techo $basic_fields->get_radio_group( $fieldname, $fieldvalue, $fieldnotes, $fieldplaceholder, $fieldoptions );\r\n\r\n\t\t\t?>\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\t\t\t<!--rh_flyouts_a-->\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_flyouts_a';\r\n\t\t\t$fieldlabel = 'Optional flyout menus:';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = 'Select from list of available tabs/flyout menus';\r\n\t\t\t$fieldoptions = $this->flyoutOptions;\r\n\t\t\techo $multi->get_option_transfer( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder, $fieldoptions, $maxSelected=-1 );\r\n\t\t\t?>\r\n\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\t\t\t<!--rh_select_locations-->\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_select_locations';\r\n\t\t\t$fieldlabel = 'Optionally restrict display of this page to selected locations:';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = 'Select from list of available tabs/flyout menus';\r\n\t\t\t$fieldoptions = static::getSites();\r\n\t\t\techo $multi->get_option_transfer( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder, $fieldoptions, $maxSelected=-1 );\r\n\t\t\t?>\r\n\r\n\r\n\t\t\t<?php\r\n\t\t\t// Globalize $post\r\n\t\t\tglobal $post;\r\n\t\t\t// Get the page template post meta\r\n\t\t\t$page_template = get_post_meta( $post->ID, '_wp_page_template', true );\r\n\t\t\tif($page_template =='page-templates/tabbed-content.php'):?>\r\n\t\t\t<hr class=\"rh_separator\" />\r\n\t\t\t<!--rh_tab_title-->\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_tab_title';\r\n\t\t\t$fieldlabel = 'Tab Title:';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = 'Shows within the second tab. These fields are only available in the Tabbed Content page template.';\r\n\t\t\techo $basic_fields->get_text_input( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder );\r\n\t\t\t?>\r\n\r\n\t\t\t<!--rh_tab_content-->\r\n\t\t\t<?php\r\n\t\t\t$fieldname = 'rh_tab_content';\r\n\t\t\t$fieldlabel = 'Second Tab Content';\r\n\t\t\t$fieldplaceholder = '';\r\n\t\t\t$fieldvalue = $$fieldname;\r\n\t\t\t$fieldnotes = 'This content will be displayed in the second tab pane. Use the default wysiwyg editor for the first tab pane.';\r\n\t\t\techo $basic_fields->get_text_editor( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder );\r\n\t\t\t?>\r\n\t\t\t<!--rh_flyouts_b-->\r\n\t\t\t<?php\r\n\t\t\t// $fieldname = 'rh_flyouts_b';\r\n\t\t\t// $fieldlabel = 'Optional flyout menus:';\r\n\t\t\t// $fieldplaceholder = '';\r\n\t\t\t// $fieldvalue = $$fieldname;\r\n\t\t\t// $fieldnotes = 'Select from list of available tabs/flyout menus to show in this panel view';\r\n\t\t\t// $fieldoptions = $this->flyoutOptions;\r\n\t\t\t// echo $multi->get_option_transfer( $fieldname, $fieldlabel , $fieldvalue, $fieldnotes, $fieldplaceholder, $fieldoptions, $maxSelected=-1 );\r\n\r\n\r\n\r\n\t\t\tendif;\r\n\r\n\r\n\r\n\r\n\r\n\t}", "function add_box() {\n\t\t\tforeach ( $this->page as $page ) {\n\t\t\t\tadd_meta_box( $this->id, $this->title, array( $this, 'meta_box_callback' ), $page, 'normal', 'high' );\n\t\t\t}\n\t\t}", "function add_meta_box() {\r\n\t\t\t\r\n\t\t\tadd_meta_box( $this->domain . '-meta-box', __( 'Project Attributes', $this->domain ), array( $this, 'meta_box' ), $this->post_type, 'normal', 'high' );\r\n\t\t\t\t\r\n\t\t}", "function hgr_testimonial_custom_box( $post ) {\n\t\t\twp_nonce_field( 'sage_testi_custom_box', 'sage_testi_custom_box_nonce' );\n\t\n\t\t\t// Get metaboxes values from database\n\t\t\t$hgr_testi_author\t\t\t=\tget_post_meta( $post->ID, '_hgr_testi_author', true );\n\t\t\t$hgr_testi_role\t\t\t\t=\tget_post_meta( $post->ID, '_hgr_testi_role', true );\n\t\t\t\n\t\t\t// Construct the metaboxes and print out\n\t\t\t\n\t\t\t// Testimonial author name\n\t\t\techo '<div class=\"settBlock\" style=\"margin-bottom:15px\"><label for=\"testi_author\" style=\"width:170px;display:inline-block;height:30px;\">';\n\t\t\t esc_html_e( \"Testimonial author\", 'hgressentials' );\n\t\t\techo '</label> ';\n\t\t\techo '<input type=\"text\" id=\"testi_author\" name=\"testi_author\" value=\"' . esc_attr( $hgr_testi_author ) . '\" size=\"25\" placeholder=\"Jon Doe\" /></div>';\n\t\t \n\t\t\t// Testimonial author company and job\n\t\t\techo '<div class=\"settBlock\" style=\"margin-bottom:15px\"><label for=\"testi_role\" style=\"width:170px;display:inline-block;height:30px;\">';\n\t\t\t esc_html_e( \"Company and Position\", 'hgressentials' );\n\t\t\techo '</label> ';\n\t\t\techo '<input type=\"text\" id=\"testi_role\" name=\"testi_role\" value=\"' . esc_attr( $hgr_testi_role ) . '\" size=\"25\" /></div>';\n\t\t}", "function voisen_page_meta_box_callback( $post ) {\n\twp_nonce_field( 'voisen_meta_box', 'voisen_meta_box_nonce' );\n\t$header_val = get_post_meta( $post->ID, 'voisen_header_page', true );\n\t$layout_val = get_post_meta( $post->ID, 'voisen_layout_page', true );\n\t$logo_val = get_post_meta( $post->ID, 'voisen_logo_page', true );\n\techo '<div class=\"bootstrap\">';\n\t\techo '<div class=\"option row\">';\n\t\t\techo '<div class=\"option_label col-md-3 col-sm-12\"><label for=\"custom_header_option\">' . esc_html__('Custom header:', 'voisen') . '</label></div>';\n\t\t\techo '<div class=\"option_field col-md-9 col-sm-12\"><select id=\"custom_header_option\" name=\"voisen_header_page\">';\n\t\t\techo '<option value=\"first\"'. (($header_val == 'first') ? ' selected=\"selected\"' : '') .'>'. esc_html__('Header first (Default)', 'voisen') .'</option>';\n\t\t\techo '<option value=\"second\"'. (($header_val == 'second') ? ' selected=\"selected\"' : '') .'>'. esc_html__('Header second', 'voisen') .'</option>';\n\t\t\techo '<option value=\"third\"'. (($header_val == 'third') ? ' selected=\"selected\"' : '') .'>'. esc_html__('Header third', 'voisen') .'</option>';\n\t\t\techo '</select></div>';\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"option row\">';\n\t\t\techo '<div class=\"option_label col-md-3 col-sm-12\"><label for=\"custom_layout_option\">' . esc_html__('Custom layout:', 'voisen') . '</label></div>';\n\t\t\techo '<div class=\"option_field col-md-9 col-sm-12\"><select id=\"custom_layout_option\" name=\"voisen_layout_page\">';\n\t\t\techo '<option value=\"full\"'. (($layout_val == 'full') ? ' selected=\"selected\"' : '') .'>'. esc_html__('Full (Default)', 'voisen') .'</option>';\n\t\t\techo '<option value=\"box\"'. (($layout_val == 'box') ? ' selected=\"selected\"' : '') .'>'. esc_html__('Box', 'voisen') .'</option>';\n\t\t\techo '</select></div>';\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"option row\">';\n\t\t\techo '<div class=\"option_label col-md-3 col-sm-12\"><label for=\"custom_logo_option\">' . esc_html__('Custom logo:', 'voisen') . '</label></div>';\n\t\t\techo '<div class=\"option_field col-md-9 col-sm-12\"><input type=\"hidden\" name=\"voisen_logo_page\" id=\"custom_logo_option\" value=\"'. esc_attr($logo_val) . '\" />';\n\t\t\techo '<div class=\"wp-media-buttons\"><button id=\"voisen_media_button\" class=\"button\" type=\"button\"/>'. esc_html__('Upload Logo', 'voisen') .'</button><button id=\"voisen_remove_media_button\" class=\"button\" type=\"button\">'. esc_html__('Remove', 'voisen') .'</button></div>';\n\t\t\techo '<div id=\"voisen_page_selected_media\">'. (($logo_val) ? '<img width=\"150\" src=\"'. esc_url($logo_val) .'\" />':'') .'</div>';\n\t\t\techo '</div>';\n\t\techo '</div>';\n\techo '</div>';\n\t?>\n\t<script type = \"text/javascript\">\n // Uploading files\n var file_frame;\n\t\tjQuery(document).on('click', '#voisen_remove_media_button', function(e){\n\t\t\te.preventDefault();\n\t\t\tjQuery('#custom_logo_option').val('');\n\t\t\tjQuery('#voisen_page_selected_media').html('');\n\t\t});\n\t\tjQuery(document).on('click', '#voisen_media_button', function(e){\n\t\t\t\n\t\t\t// If the media frame already exists, reopen it.\n\t\t\tif (file_frame){\n\t\t\t\tfile_frame.open();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Create the media frame.\n\t\t\tfile_frame = wp.media.frames.file_frame = wp.media({\n\t\t\t\ttitle: jQuery(this).data('uploader_title'),\n\t\t\t\tbutton: {\n\t\t\t\t\ttext: jQuery(this).data('uploader_button_text'),\n\t\t\t\t},\n\t\t\t\tmultiple: false // Set to true to allow multiple files to be selected\n\t\t\t});\n\t\t\t// When a file is selected, run a callback.\n\t\t\tfile_frame.on('select', function(){\n\t\t\t\t// We set multiple to false so only get one image from the uploader\n\t\t\t\tattachment = file_frame.state().get('selection').first().toJSON();\n\t\t\t\tvar url = attachment.url;\n\t\t\t\tvar field = document.getElementById(\"custom_logo_option\");\n\t\t\t\tfield.value = url; //set which variable you want the field to have\n\t\t\t\tjQuery('#voisen_page_selected_media').html('<img width=\"150\" src=\"'+ url +'\" />');\n\t\t\t\tfile_frame.close();\n\t\t\t});\n\t\t\t// Finally, open the modal\n\t\t\tfile_frame.open();\n\t\t\te.preventDefault();\n\t\t});\n </script>\n<?php\n\tfunction voisen_admin_scripts() {\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n }\n function voisen_admin_styles() {\n wp_enqueue_style('thickbox');\n }\n add_action('admin_print_scripts', 'voisen_admin_scripts');\n add_action('admin_print_styles', 'voisen_admin_styles');\n}", "public static function duplicata_meta_box() {\r\r\n $post = get_post();\r\r\n $original = PNV::get_original();\r\r\n\r\r\n require PNV_COMPLETE_PATH . '/template/duplicata_meta_box.php';\r\r\n }", "function myplugin_add_custom_box() {\n add_meta_box( \n 'myplugin_sectionid',\n __( 'Preview Mobile Layout', 'myplugin_textdomain' ),\n 'myplugin_inner_custom_box',\n 'post' \n );\n add_meta_box(\n 'myplugin_sectionid',\n __( 'Preview Mobile Layout', 'myplugin_textdomain' ), \n 'myplugin_inner_custom_box',\n 'page'\n );\n}", "public function render_meta_box_content( $post ) {\n\t\t\t// RETRIEVE SAVED POST META FROM DB - IF IT EXISTS\n\t\t\t$value = get_post_meta( $post->ID, $this->field_key, true );\n\n\t\t\t// RENDER THE FORM FIELD USING RETRIEVED DATA\n\t\t\techo '<div class=\"';\n\n\t\t\tif($this->hide_container){\n\t\t\t\techo 'hidden pz-hidden';\n\t\t\t}else{\n\t\t\t\techo 'pz-meta-box-wrapper';\n\t\t\t}\n\t\t\techo '\" >';\n\t\t\t// FIRST, WE RENDER THE DESCRIPTION IF WE HAD TO...\n\t\t\tif($this->show_description){\n\t\t\t\techo '<small class=\"pz_small small_' . $this->field_name . '\" for=\"' . $this->field_name . '\">';\n\t\t\t\t_e( $this->field_description, $this->domain );\n\t\t\t\techo '</small><br /><br />';\n\t\t\t}\n\t\t\tswitch($this->field_type){\n\t\t\t\tcase \"text\":\n\t\t\t\tcase \"number\":\n\t\t\t\tcase \"url\":\n\t\t\t\tcase \"password\":\n\t\t\t\tcase \"email\":\n\t\t\t\tcase \"tel\":\n\t\t\t\tcase \"hidden\":\n\t\t\t\t\techo '<input class=\"meta-box-helper\" type=\"' . $this->field_type . '\" id=\"' . $this->field_name . '\" name=\"' . $this->field_name . '\"';\n\t\t\t\t\techo ' value=\"' . $value . '\" />';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"button\":\n\t\t\t\t\techo '<' . $this->field_type . ' class=\"meta-box-helper\" onclick=\"return false;\" id=\"' . $this->field_name . '\" name=\"' . $this->field_name . '\" >' . $value . '</' . $this->field_type . '>';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"submit\":\n\t\t\t\t\techo '<input class=\"meta-box-helper\" type=\"' . $this->field_type . '\" onclick=\"return false;\" id=\"' . $this->field_name . '\" name=\"' . $this->field_name . '\" value=\"' . $value . '\" >';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"select\":\n\t\t\t\t\techo '<select class=\"meta-box-helper\" id=\"' . $this->field_name . '\" name=\"' . $this->field_name . '\" >';\n\t\t\t\t\techo $this->getSelectFieldOptions(esc_attr($value));\n\t\t\t\t\techo '</select>';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"select_multi\":\n\t\t\t\t\techo '<select class=\"meta-box-helper\" multiple=\"multiple\" style=\"min-height: 300px;\" id=\"' . $this->field_name . '\" name=\"' . $this->field_name . '[]\" >';\n\t\t\t\t\techo $this->getSelectFieldOptions(esc_attr($value));\n\t\t\t\t\techo '</select>';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"textarea\":\n\t\t\t\t\techo '<textarea class=\"meta-box-helper\" id=\"' . $this->field_name . '\" name=\"' . $this->field_name . '\"';\n\t\t\t\t\techo ' placeholder=\"' . __($this->input_placeholder_text, $this->domain) . '\" />';\n\t\t\t\t\techo esc_attr($value) . '</textarea>';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"editor\":\n\t\t\t\t\t$val = $value;\n\t\t\t\t\t$val = (!$val)?\"\":$val;\n\t\t\t\t\twp_editor($val, $this->field_name, array(\n\t\t\t\t\t\t'wpautop' => TRUE,\n\t\t\t\t\t\t'media_buttons' => TRUE,\n\t\t\t\t\t\t'default_editor' => '',\n\t\t\t\t\t\t'drag_drop_upload' => FALSE,\n\t\t\t\t\t\t'tinymce' => TRUE,\n\t\t\t\t\t\t'textarea_name' => $this->field_name,\n\t\t\t\t\t\t'textarea_rows' => 10,\n\t\t\t\t\t\t'tabindex' => '',\n\t\t\t\t\t\t'tabfocus_elements' => ':prev,:next',\n\t\t\t\t\t\t'editor_css' => '',\n\t\t\t\t\t\t'editor_class' => '',\n\t\t\t\t\t\t'teeny' => TRUE,\n\t\t\t\t\t\t'dfw' => TRUE,\n\t\t\t\t\t\t'_content_editor_dfw' => TRUE,\n\t\t\t\t\t\t'quicktags' => TRUE\n\t\t\t\t\t));\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\techo '<input class=\"meta-box-helper\" type=\"text\" id=\"' . $this->field_name . '\" name=\"' . $this->field_name . '\"';\n\t\t\t\t\techo ' value=\"' . esc_attr($value) . '\" />';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\techo '</div>';\n\t\t\tif($this->append_nonce){\n\t\t\t\twp_nonce_field($this->nonce_action, $this->nonce_key);\n\t\t\t}\n\t\t}", "public function render_meta_box_content($post) {\n\n // Add an nonce field so we can check for it later.\n wp_nonce_field('_theme_post_extra', '_theme_post_extra_nonce');\n\n // Begin the field table and loop\n $html = '<table class=\"form-table\">';\n\n foreach ($this->fields as $field_id => $data) {\n\n if (!in_array($this->get_current_post_type(), $data[ 'post_type' ])) {\n continue;\n }\n\n // get value of this field if it exists for this post\n $meta = get_post_meta($post->ID, $this->get_meta_name($field_id), true);\n // begin a table row with\n\n $html .= '<tr>';\n $html .= '<th><label for=\"' . $this->get_meta_name($field_id) . '\">' . $data[ 'label' ] . '</label></th>';\n $html .= '<td>';\n switch ($data[ 'type' ]) {\n // text\n case 'checkbox':\n $html .= '<input name=\"' . $this->get_meta_name($field_id) . '\" type=\"checkbox\" id=\"' . $this->get_meta_name($field_id) . '\"' . ($meta ? ' checked=\"checked\"' : '') . '\">';\n $html .= '&nbsp;&nbsp;<span class=\"description\">' . $data[ 'desc' ] . '</span>';\n\n break;\n case 'text':\n $html .= '<input type=\"text\" name=\"' . $this->get_meta_name($field_id) . '\" id=\"'\n . '' . $this->get_meta_name($field_id) . '\" value=\"' . $meta . '\" placeholder=\"' . $data[ 'placeholder' ] . '\" class=\"widefat\"/>';\n $html .= '<br /><span class=\"description\">' . $data[ 'desc' ] . '</span>';\n\n break;\n case 'textarea':\n $html .= '<textarea name=\"' . $this->get_meta_name($field_id) . '\" id=\"'\n . '' . $this->get_meta_name($field_id) . '\" placeholder=\"' . $data[ 'placeholder' ] . '\" class=\"widefat\" rows=\"4\">' . $meta . '</textarea>';\n $html .= '<br /><span class=\"description\">' . $data[ 'desc' ] . '</span>';\n\n break;\n case 'select':\n $partial = '';\n\n $data[ 'id' ] = $this->get_meta_name($field_id);\n $data[ 'value' ] = $meta;\n\n if (is_callable($data[ 'callback' ])) {\n $partial = call_user_func($data[ 'callback' ], $data);\n }\n\n $html .= $partial;\n\n break;\n case 'file':\n\n $html .= '<div class=\"media-uploader\" data-id=\"' . $this->get_meta_name($field_id) . '\">';\n\n $html .= '<input class=\"media-uploader-input-value\" type=\"hidden\" name=\"' . $this->get_meta_name($field_id) . '\" id=\"' . $this->get_meta_name($field_id) . '\" value=\"' . $meta . '\"/>';\n //$html .= '<span class=\"\">' . (empty($meta) ? $field[ 'desc' ] : $meta) . '</span>&nbsp;&nbsp;';\n //$html .= '<a href=\"#' . $field[ 'id' ] . '\" class=\"media-uploader-input media-uploader-button\">[ ' . __('Edit') . ' ]</a>';\n $html .= '<a href=\"#' . $this->get_meta_name($field_id) . '\" class=\"media-uploader-input media-uploader-button\">' . (empty($meta) ? $data[ 'desc' ] : basename($meta)) . '</a>';\n\n $html .= '</div>';\n\n //$html .= $uploader->renderReturn();\n\n break;\n } //end switch\n $html .= '</td></tr>';\n } // end foreach\n $html .= '</table>'; // end table\n\n echo $html;\n }", "function add_custom_meta_box() \n\t{\n\t\tadd_meta_box( 'custom_meta_box','Custom Meta Box', 'show_custom_meta_box', 'location', 'normal','high');\n\t}", "function tech_new_meta_boxes() {\n global $meta_box, $post;\n \n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"techozoic_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n \n echo '<table class=\"form-table\">';\n\n foreach ($meta_box['fields'] as $field) {\n // get current post meta data\n $meta = get_post_meta($post->ID, $field['id'], true);\n \n echo '<tr>',\n '<th><label for=\"', $field['id'], '\">', $field['title'], '</label></th>',\n '<td>';\n switch ($field['type']) {\n case 'text':\n echo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />', '\n', $field['desc'];\n break;\n case 'textarea':\n echo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>', '\n', $field['desc'];\n break;\n case 'select':\n echo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $option) {\n echo '<option', $meta == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n break;\n case 'radio':\n foreach ($field['options'] as $option) {\n echo '<input type=\"radio\" name=\"', $field['id'], '\" value=\"', $option['value'], '\"', $meta == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n }\n break;\n case 'checkbox':\n echo '<input type=\"checkbox\" name=\"', $field['id'], '\" id=\"', $field['id'], '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n break;\n }\n echo\t'<td>',\n\t\t\t\t'<tr><td colspan=\"3\">',$field['description'],'</td></tr>',\n\t\t\t\t'</tr>';\n }\n \n echo '</table>';\n\n}", "function display_meta_box( $post ) {\n\t\techo \"<div id='\" . self::metadata_taxonomy . \"_meta_box'>\";\n\t\t// Add nonce for verification upon save\n\t\techo \"<input type='hidden' name='\" . self::metadata_taxonomy . \"_nonce' value='\" . wp_create_nonce( 'ef-save-metabox' ) . \"' />\";\n\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t// Make the metabox title include a link to edit the Editorial Metadata terms. Logic similar to how Core dashboard widgets work.\n\t\t\t$url = add_query_arg( 'page', 'ef-editorial-metadata-settings', get_admin_url( null, 'admin.php' ) );\n\t\t\techo '<p><a href=\"'. esc_url( $url ) . '\">' . __( 'Configure', 'edit-flow' ) . '</a></p>';\n\t\t}\n\t\n\t\t$terms = $this->get_editorial_metadata_terms();\n\t\tif ( !count( $terms ) ) {\n\t\t\t$message = __( 'No editorial metadata available.' );\n\t\t\tif ( current_user_can( 'manage_options' ) )\n\t\t\t\t$message .= sprintf( __( ' <a href=\"%s\">Add fields to get started</a>.' ), $this->get_link() );\n\t\t\telse \n\t\t\t\t$message .= __( ' Encourage your site administrator to configure your editorial workflow by adding editorial metadata.' );\n\t\t\techo '<p>' . $message . '</p>';\n\t\t} else {\n\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t$postmeta_key = $this->get_postmeta_key( $term );\n\t\t\t\t$current_metadata = esc_attr( $this->get_postmeta_value( $term, $post->ID ) );\n\t\t\t\t$type = $term->type;\n\t\t\t\t$description = $term->description;\n\t\t\t\tif ( $description )\n\t\t\t\t\t$description_span = \"<span class='description'>$description</span>\";\n\t\t\t\telse\n\t\t\t\t\t$description_span = '';\n\t\t\t\techo \"<div class='\" . self::metadata_taxonomy . \" \" . self::metadata_taxonomy . \"_$type'>\";\n\t\t\t\tswitch( $type ) {\n\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t// TODO: Move this to a function\n\t\t\t\t\t\tif ( !empty( $current_metadata ) ) {\n\t\t\t\t\t\t\t// Turn timestamp into a human-readable date\n\t\t\t\t\t\t\t$current_metadata = $this->show_date_or_datetime( intval( $current_metadata ) );\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<label for='$postmeta_key'>{$term->name}</label>\";\n\t\t\t\t\t\tif ( $description_span )\n\t\t\t\t\t\t\techo \"<label for='$postmeta_key'>$description_span</label>\";\n\t\t\t\t\t\techo '<input id=\"' . esc_attr( $postmeta_key ) .'\" name=\"' . esc_attr( $postmeta_key ) . '\" type=\"tex\" class=\"date-time-pick\" value=\"' . esc_attr( $current_metadata ) . '\" />';\n\t\t\t\t\t\techo '<input type=\"hidden\" id=\"' . esc_attr( $postmeta_key ) . '_hidden' . '\" name=\"' . esc_attr( $postmeta_key ) . '_hidden' . '\" />';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"location\":\n\t\t\t\t\t\techo \"<label for='$postmeta_key'>{$term->name}</label>\";\n\t\t\t\t\t\tif ( $description_span )\n\t\t\t\t\t\t\techo \"<label for='$postmeta_key'>$description_span</label>\";\n\t\t\t\t\t\techo \"<input id='$postmeta_key' name='$postmeta_key' type='text' value='$current_metadata' />\";\n\t\t\t\t\t\tif ( !empty( $current_metadata ) )\n\t\t\t\t\t\t\techo \"<div><a href='http://maps.google.com/?q={$current_metadata}&t=m' target='_blank'>\" . sprintf( __( 'View &#8220;%s&#8221; on Google Maps', 'edit-flow' ), $current_metadata ) . \"</a></div>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\techo \"<label for='$postmeta_key'>{$term->name}$description_span</label>\";\n\t\t\t\t\t\techo \"<input id='$postmeta_key' name='$postmeta_key' type='text' value='$current_metadata' />\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"paragraph\":\n\t\t\t\t\t\techo \"<label for='$postmeta_key'>{$term->name}$description_span</label>\";\n\t\t\t\t\t\techo \"<textarea id='$postmeta_key' name='$postmeta_key'>$current_metadata</textarea>\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t\techo \"<label for='$postmeta_key'>{$term->name}$description_span</label>\";\n\t\t\t\t\t\techo \"<input id='$postmeta_key' name='$postmeta_key' type='checkbox' value='1' \" . checked($current_metadata, 1, false) . \" />\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"user\": \n\t\t\t\t\t\techo \"<label for='$postmeta_key'>{$term->name}$description_span</label>\";\n\t\t\t\t\t\t$user_dropdown_args = array( \n\t\t\t\t\t\t\t\t'show_option_all' => __( '-- Select a user --', 'edit-flow' ), \n\t\t\t\t\t\t\t\t'name' => $postmeta_key,\n\t\t\t\t\t\t\t\t'selected' => $current_metadata \n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$user_dropdown_args = apply_filters( 'ef_editorial_metadata_user_dropdown_args', $user_dropdown_args );\n\t\t\t\t\t\twp_dropdown_users( $user_dropdown_args );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"number\":\n\t\t\t\t\t\techo \"<label for='$postmeta_key'>{$term->name}$description_span</label>\";\n\t\t\t\t\t\techo \"<input id='$postmeta_key' name='$postmeta_key' type='text' value='$current_metadata' />\";\n\t\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\techo \"<p>\" . __( 'This editorial metadata type is not yet supported.', 'edit-flow' ) . \"</p>\";\n\t\t\t\t}\n\t\t\techo \"</div>\";\n\t\t\techo \"<div class='clear'></div>\";\n\t\t} // Done iterating through metadata terms\n\t\t}\t\t\n\t\techo \"</div>\";\n\t}", "function add_listing_meta_box() {\n$post_types = array ( 'listing', 'opportunity' );\nforeach( $post_types as $post_type )\n {\n add_meta_box(\n 'listing_meta_box', // $id\n 'Aircraft Information', // $title\n 'show_listing_meta_box', // $callback\n $post_type, // post type\n 'normal', // $context\n 'high' // $priority\n );\n }\n}", "public static function register_meta_boxes() {\n\t\t// estimate specific\n\t\t$args = array(\n\t\t\t'si_subscription_payments' => array(\n\t\t\t\t'title' => __( 'Recurring Invoice Payment', 'sprout-invoices' ),\n\t\t\t\t'show_callback' => array( __CLASS__, 'show_subscription_payments_meta_box' ),\n\t\t\t\t'save_callback' => array( __CLASS__, 'save_meta_box_subscription_payments' ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'low',\n\t\t\t\t'weight' => 0,\n\t\t\t\t'save_priority' => 0,\n\t\t\t)\n\t\t);\n\t\tdo_action( 'sprout_meta_box', $args, SI_Invoice::POST_TYPE );\n\t}", "function meta_box_function_name() {\n add_meta_box( 'meta_box_id', __( 'Tender Details', 'meta-textdomain' ), 'meta_box_callback', 'the_post_type' );\n}", "function mytheme_show_box() {\n global $meta_box, $post;\n\n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n\n echo '<table class=\"form-table\">';\n\n foreach ($meta_box['fields'] as $field) {\n // get current post meta data\n $meta = get_post_meta($post->ID, $field['id'], true);\n\n echo '<tr class=\"meta\">',\n '<th style=\"width:15%; padding-left:30px;\"><label for=\"', esc_attr( $field['id']), '\">', $field['name'], '</label></th>',\n '<td>';\n switch ($field['type']) {\n case 'text':\n echo '<input style=\"width:34%;\" type=\"text\" name=\"', esc_attr( $field['id']), '\" id=\"', esc_attr( $field['id']), '\" value=\"', esc_attr($meta ? $meta : $field['std']), '\" size=\"30\" style=\"width:97%\" />', '<br />', esc_attr( $field['desc']);\n break;\n\t\t\t\t\n case 'heading':\n echo '<h3 id=\"',esc_attr( $field['id']), '\" class=\"meta\">'; echo esc_attr( $field['desc']); echo '</h3>';\n break;\n\t\t\t\t\n\t\t\t\t\n case 'line':\n echo '<hr class=\"meta\">';\n break;\n\t\t\t\t\n case 'textarea':\n echo '<textarea name=\"',esc_attr( $field['id']), '\" id=\"',esc_attr( $field['id']), '\" cols=\"60\" rows=\"4\" style=\"width:97%\">',esc_textarea( $meta ? $meta : $field['std']), '</textarea>', '<br />', $field['desc'];\n break;\n case 'select':\n echo '<select name=\"', esc_attr( $field['id']), '\" id=\"', esc_attr( $field['id']), '\" class=\"meta\">';\n foreach ($field['options'] as $option) {\n echo '<option', $meta == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>', '<br />', $field['desc'];\n break;\n case 'radio':\n foreach ($field['options'] as $option) {\n echo '<input type=\"radio\" name=\"', esc_attr( $field['id']), '\" value=\"', $option['value'], '\"', $meta == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n }\n break;\n case 'checkbox':\n echo '<input type=\"checkbox\" name=\"', esc_attr( $field['id']), '\" id=\"',esc_attr( $field['id']), '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n break;\n }\n echo '<td>',\n '</tr>';\n }\n\n echo '</table>';\n}", "function ts_charity_pro_posttype_bn_testimonial_meta_box() {\n\tadd_meta_box( 'ts-charity-pro-posttype-pro-testimonial-meta', __( 'Enter Designation', 'ts-charity-pro-posttype-pro' ), 'ts_charity_pro_posttype_bn_testimonial_meta_callback', 'testimonials', 'normal', 'high' );\n}", "function metabox_adding(){\n\t\t\tadd_meta_box('ob_property_detail', 'Property Details', 'property_detail', 'ob_property','normal', 'high');\n\t\t\tadd_meta_box('ob_property_location', 'Property Location', 'property_location', 'ob_property','normal', 'low');\n\t\t}", "function meta_box_callback() {\n\t\t\t// Use nonce for verification\n\t\t\twp_nonce_field( 'custom_meta_box_nonce_action', 'custom_meta_box_nonce_field' );\n\n\n\t\t\t$fields = apply_filters( 'hippo-plugin-cmb-fields', $this->fields, $this->page, $this->id );\n\n\t\t\t// Begin the field table and loop\n\t\t\techo '<table class=\"form-table meta_box\">';\n\t\t\tforeach ( $fields as $field ) {\n\n\t\t\t\t$field = apply_filters( 'hippo-plugin-cmb-field', $field, $this->page, $this->id );\n\n\t\t\t\tif ( $field[ 'type' ] == 'section' ) {\n\t\t\t\t\techo '<tr>\n\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t<h2>' . $field[ 'label' ] . '</h2>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\t\t\t\telseif ( $field[ 'type' ] == 'icons' ) {\n\n\t\t\t\t\techo '<tr>\n <th><label for=\"' . $field[ 'id' ] . '\">' . $field[ 'label' ] . '</label></th>\n <td>';\n\n\t\t\t\t\t$meta = get_post_meta( get_the_ID(), $field[ 'id' ], TRUE );\n\t\t\t\t\techo hippo_custom_meta_box_field( $field, $meta );\n\n\t\t\t\t\techo '</td></tr>';\n\t\t\t\t}\n\t\t\t\telseif ( $field[ 'type' ] == 'gallery' ) {\n\n\t\t\t\t\techo '<tr><td>';\n\n\t\t\t\t\t$meta = get_post_meta( get_the_ID(), $field[ 'id' ], TRUE );\n\t\t\t\t\techo hippo_custom_meta_box_field( $field, $meta );\n\n\t\t\t\t\techo '</td></tr>';\n\t\t\t\t}\n\t\t\t\telseif ( $field[ 'type' ] == 'map' ) {\n\n\t\t\t\t\techo '<tr><td colspan=\"2\">';\n\n\t\t\t\t\t$meta = get_post_meta( get_the_ID(), $field[ 'id' ], TRUE );\n\t\t\t\t\techo hippo_custom_meta_box_field( $field, $meta );\n\n\t\t\t\t\techo '</td></tr>';\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t$row_divider_class = isset( $field[ 'divider' ] ) ? ' class=\"meta-box-divider\"' : '';\n\n\t\t\t\t\techo '<tr' . $row_divider_class . '>\n\t\t\t\t\t\t<th><label for=\"' . $field[ 'id' ] . '\">' . $field[ 'label' ] . '</label></th>\n\t\t\t\t\t\t<td>';\n\n\t\t\t\t\t$meta = get_post_meta( get_the_ID(), $field[ 'id' ], TRUE );\n\t\t\t\t\techo hippo_custom_meta_box_field( $field, $meta );\n\n\t\t\t\t\techo '</td>\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\t\t\t} // end foreach\n\t\t\techo '</table>'; // end table\n\t\t}", "final public function add_metabox() {\n\t\tadd_meta_box( $this->get_id(), $this->get_title(), array( $this, 'content_callback' ), $this->get_post_type(), $this->args['context'], $this->args['priority'] );\n\t}", "function labishop_meta_box_callback( $post ) {\n\n\t// Add a nonce field so we can check for it later.\n\twp_nonce_field( 'labishop_save_meta_box_data', 'labishop_meta_box_nonce' );\n\n\t/*\n\t * Use get_post_meta() to retrieve an existing value\n\t * from the database and use the value for the form.\n\t */\n\t$value = get_post_meta( $post->ID, 'ls_itemname', true );\n\t$value2 = get_post_meta( $post->ID, 'ls_price', true );\n\n\techo '<label for=\"labishop_new_field\">';\n\t_e( 'توسط این قسمت, کالای خود را به مشتریان عرضه کنید', 'labishop_textdomain' );\n\techo '</label> <br>';\n\techo '<label for=\"labishop_itemname\">';\n\t_e( 'نام کالا', 'labishop_textdomain' );\n\techo '</label> ';\n\techo '<input type=\"text\" id=\"labishop_itemname\" name=\"labishop_itemname\" value=\"' . esc_attr( $value ) . '\" size=\"50\" />';\n\t\n\techo '<label for=\"labishop_price\"><br>';\n\t_e( 'قیمت کالا (تومان)', 'labishop_textdomain' );\n\techo '</label> ';\n\techo '<input type=\"text\" id=\"labishop_price\" name=\"labishop_price\" value=\"' . esc_attr( $value2 ) . '\" size=\"50\" />';\n}", "public static function get_meta_box( $meta_boxes ) {\n\t$prefix = 'pw-';\n\n\t$meta_boxes[] = array(\n\t\t'id' => 'geral',\n\t\t'title' => esc_html__( 'Informações Gerais', Product::TEXT_DOMAIN ),\n\t\t'post_types' => array(Product::TEXT_DOMAIN ),\n\t\t'context' => 'advanced',\n\t\t'priority' => 'default',\n\t\t'autosave' => 'true',\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'vip',\n\t\t\t\t'name' => esc_html__( 'Usuário VIP', Product::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'desc' => esc_html__( 'Este parceiro é VIP ou não?', Product::TEXT_DOMAIN ),\n\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'endereco',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'name' => esc_html__( 'Endereço', Product::TEXT_DOMAIN ),\n\t\t\t\t'desc' => esc_html__( 'Endereço do Parceiro', Product::TEXT_DOMAIN ),\n\t\t\t\t'placeholder' => esc_html__( 'Endereço do Parceiro', Product::TEXT_DOMAIN ),\n\t\t\t\t'rows' => 4,\n\t\t\t\t'cols' => 1,\n\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'cidade',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'name' => esc_html__( 'Cidade', Product::TEXT_DOMAIN ),\n\t\t\t\t'desc' => esc_html__( 'Cidade do Parceiro', Product::TEXT_DOMAIN ),\n\t\t\t\t'placeholder' => esc_html__( 'Cidade do Parceiro', Product::TEXT_DOMAIN ),\n\t\t\t\t'size' => 40,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'email',\n\t\t\t\t'name' => esc_html__( 'Email', Product::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'email',\n\t\t\t\t'desc' => esc_html__( 'Email do Parceiro', Product::TEXT_DOMAIN ),\n\t\t\t\t'placeholder' => esc_html__( 'Email do Parceiro', Product::TEXT_DOMAIN ),\n\t\t\t\t'clone' => 'true',\n\t\t\t\t'size' => 40,\n\t\t\t\t'sort_clone' => 'true',\n\t\t\t\t'max_clone' => 20,\n\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'telefone',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'name' => esc_html__( 'Telefone', Product::TEXT_DOMAIN ),\n\t\t\t\t'desc' => esc_html__( 'Telefone do Parceiro', Product::TEXT_DOMAIN ),\n\t\t\t\t'placeholder' => esc_html__( 'Telefone do Parceiro', Product::TEXT_DOMAIN ),\n\t\t\t\t'size' => 40,\n\t\t\t\t'clone' => 'true',\n\t\t\t\t'max_clone' => 20,\n\t\t\t\t'sort_clone' => 'true',\n\t\t\t),\n\n\t\t),\n\n\t\t'validation' => array(\n\t\t\t'rules' => array(\n\t\t\t\t'pw-endereco' => array(\n\t\t\t\t\t'required' => true,\n\t\t\t\t),\n\t\t\t\t'pw-cidade' => array(\n\t\t\t\t\t'required' => true,\n\t\t\t\t),\n\t\t\t\t'pw-email[0]' => array(\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'email'=>true,\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\t// Rules for other fields\n\t\t\t),\n\t\t),\n\t\t\n\n\n\t);\n\n\n\n\n\t$meta_boxes[] = array(\n\t\t'id' => 'imagem',\n\t\t'title' => esc_html__( 'Imagem', Product::TEXT_DOMAIN ),\n\t\t'post_types' => array(Product::TEXT_DOMAIN ),\n\t\t'context' => 'advanced',\n\t\t'priority' => 'default',\n\t\t'autosave' => 'true',\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'id' => $prefix . 'imagem',\n\t\t\t\t'type' => 'image_advanced',\n\t\t\t\t'name' => esc_html__( 'Galeria de Imagens', Product::TEXT_DOMAIN ),\n\t\t\t\t'desc' => esc_html__( 'Galeria de Imagens', Product::TEXT_DOMAIN ),\n\t\t\t\t'max_file_uploads' => '20',\n\t\t\t\t'force_delete' => 'true',\n\t\t\t),\t\t\t\n\n\t\t),\n\t);\n\n\treturn $meta_boxes;\n}", "function notelypage_meta_box(){\r\n add_meta_box(\r\n 'notes'\r\n ,'Page Notes'\r\n ,array( &$this, 'meta_box_content' )\r\n ,'page'\r\n ,'side'\r\n ,'default'\r\n );\r\n }", "function alep_meta_box_output( $post ) {\n\t\t// create a nonce field\n\t\twp_nonce_field( 'my_alep_meta_box_nonce', 'alep_meta_box_nonce' ); ?>\n\n\t\t<p><i>This theme supports a number of shortcodes and embedds. To use them properly please insert the shortcodes or ID's respectively in each box.</i></p>\n\t\t<br />\n\n\t\t<p>\n\t\t\t<label for=\"alep_delightful_downloads_shortcode\"><b><?php _e( 'Delightful Downloads shortcode', 'alep' ); ?>:</b></label>\n\t\t\t<br />\n\t\t\t<span><i>Please enter the the whole shortcode generated by DD here:</i></span>\n\t\t\t<br />\n\t\t\t<textarea name=\"alep_delightful_downloads_shortcode\" id=\"alep_delightful_downloads_shortcode\" cols=\"40\" rows=\"3\"><?php echo alep_get_custom_field( 'alep_delightful_downloads_shortcode' ); ?></textarea>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label for=\"alep_easy_digital_downloads\"><b><?php _e( 'Easy Digital Downloads shortcode', 'alep' ); ?>:</b></label>\n\t\t\t<br />\n\t\t\t<span><i>Please enter the the whole shortcode generated by EDD here:</i></span>\n\t\t\t<br />\n\t\t\t<textarea name=\"alep_easy_digital_downloads\" id=\"alep_easy_digital_downloads\" cols=\"40\" rows=\"3\"><?php echo alep_get_custom_field( 'alep_easy_digital_downloads' ); ?></textarea>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label for=\"alep_youtube_embedding\"><b><?php _e( 'Youtube URL', 'alep' ); ?>:</b></label>\n\t\t\t<br />\n\t\t\t<span><i>Please enter the ID of the video only!</i></span>\n\t\t\t<br />\n\t\t\t<textarea name=\"alep_youtube_embedding\" id=\"alep_youtube_embedding\" cols=\"40\" rows=\"1\"><?php echo alep_get_custom_field( 'alep_youtube_embedding' ); ?></textarea>\n\t\t</p>\n\n\t\t<?php\n\t}", "function meta_box(){\n global $post;\n\n $html = \"<div id='omeka-addons-upload'>\";\n $html .= '<form enctype=\"multipart/form-data\" action=\"__URL__\" method=\"POST\" >';\n $html .= \"<label for='omeka-addons-file'>Add:</label><input id='omeka-addons-file' type='file' name='omeka_addons_file' />\";\n $html .= \"</form>\";\n $html .= \"</div>\";\n\n $messages_html = \"\";\n \n $releases_html = \"\";\n $releases = $this->get_releases($post);\n if($releases) {\n foreach($releases as $release) {\n if( $release['new'] ) {\n $messages_html .= $this->_release_template_message_meta_box($release);\n if($release['status'] == 'error') {\n wp_delete_attachment($release['attachment_id']);\n } else {\n $updated = $release;\n $updated['new'] = false;\n update_post_meta($release['attachment_id'], 'omeka_addons_release', $updated, $release);\n }\n }\n if($release['status'] != 'error') {\n $releases_html .= $this->_release_template_meta_box($release);\n }\n }\n $html .= $messages_html . $releases_html;\n } else {\n $html .= \"<p><strong>You have no releases yet.</strong></p>\";\n }\n \t\techo $html;\n }", "public function oldCustomBox() {\n\t\t?>\n\t\t<div class=\"dbx-b-ox-wrapper\">\n\t\t\t<fieldset id=\"geko-post-location_fieldsetid\" class=\"dbx-box\">\n\t\t\t\t<div class=\"dbx-h-andle-wrapper\">\n\t\t\t\t\t<h3 class=\"dbx-handle\"><?php echo __( $this->_sSectionLabel, 'geko-post-location_textdomain' ); ?></h3>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"dbx-c-ontent-wrapper\"><div class=\"dbx-content\">\n\t\t\t\t\t<?php $this->outputForm(); ?>\n\t\t\t\t</div></div>\n\t\t\t</fieldset>\n\t\t</div>\n\t\t<?php\n\t}", "public static function addMetaBoxes() {\n\t\t$id = self::NONCE;\n\t\t$title = __('Teasers', self::NONCE);\n\t\t$callback = array(__CLASS__, 'renderMetaBox');\n\t\t$page = 'page';\n\t\t$context = 'side';\n\n\t\tadd_meta_box($id, $title, $callback, $page, $context);\n\t}", "public function renderMetaBox() {\n\n\t\t// Add nonce field\n\t\twp_nonce_field(plugin_basename(__FILE__), \"{$this->getNameSpace()}_nonce_field\");\n\n\t\t// Load our template\n\t\t$this->loadTemplate(\"metabox\");\n\t}", "function plugpress_plugins_box_metabox($context, $args) {\n\t$args = $args['args'];\n\t$box = $args['box'];\n\t$data = $box->data;\n\t$content = '';\n\n\tif (count($data) > 0) {\n\t\t$content = '<table class=\"\">';\n\t\t$row_num = 1;\n\n\t\tif (isset($args['options']['items_per_row']) === false) {\n\t\t\t$args['options']['items_per_row'] = 5;\n\t\t}\n\n\t\tforeach($data as $row) {\n\t\t\tif ($row_num === 1) { $content .= '<tr>'; }\n\n\t\t\t$infos = '{name: \"'. esc_attr($row->name) .'\", thumbnail: \"'. $row->icon . '\", price: ' . $row->price . ', short_description: \"' . $row->shortdescription . '\", rating: ' . $row->rating . ', numrating: ' . $row->numrating . '}';\n\t\t\t$content .= '<td class=\"plugpress-td-plugin-normal\">';\n\t\t\t$content .= '<a href=\"admin.php?page=plugpress-browse&ppsubpage=plugindetail&ppslug='. $row->slug .'\"><span class=\"plugpress-span-plugin-normal\" plugpress=\"' . htmlspecialchars($infos) .'\"><img src=\"' . $row->icon . '\" class=\"plugpress-img-plugin-normal\" /><br/><b>'. esc_html($row->name) .'</b></span></a></td>';\n\n\t\t\t$row_num++;\n\n\t\t\tif ($row_num > $args['options']['items_per_row']) {\n\t\t\t\t$content .= '</tr>';\n\t\t\t\t$row_num = 1;\n\t\t\t}\n\t\t}\n\t\t$content .= '</table>';\n\t\t$slug = '';\n\t\tif ($box->options['category'] != '') {\n\t\t\t$slug = '&ppslug=' . $box->options['category'];\n\t\t}\n\n\t\t$footer = '';\n\t\tif (isset($box->options['page']) && isset($box->options['pagecount'])) {\n\t\t\t$footer = PlugPress_Misc::generate_pagination(\n\t\t\t\t$box->options['page'],\n\t\t\t\t$box->options['pagecount'],\n\t\t\t\t'admin.php?page=plugpress-browse&ppsubpage=plugins'. $slug .'&pppage=');\n\t\t}\n\t\telseif (isset($box->options['seemore'])) {\n\t\t\t$url_page = isset($box->options['seemore']['page']) ? $box->options['seemore']['page'] : 'plugpress-browse';\n\t\t\t$url_ppsubpage = isset($box->options['seemore']['ppsubpage']) ? '&ppsubpage=' . $box->options['seemore']['ppsubpage'] : '';\n\t\t\t$url_ppslug = isset($box->options['seemore']['ppslug']) ? '&ppslug=' . $box->options['seemore']['ppslug'] : '';\n\t\t\t$url_pppage = isset($box->options['seemore']['pppage']) ? '&pppage=' . $box->options['seemore']['pppage'] : '';\n\n\t\t\t$footer = '<a href=\"admin.php?page=' . $url_page . $url_ppsubpage . $url_ppslug . $url_pppage .'\">'. esc_html($box->options['seemore']['text']) .' &raquo;</a>';\n\t\t}\n\n\t\t$footerclass = '';\n\t\tif (isset($box->options['footerclass'])) {\n\t\t\t$footerclass = $box->options['footerclass'];\n\t\t}\n\n\t\t$content .= '<div class=\"plugpress-box-prefooter ' . $footerclass .'\">' . $footer . '</div>';\n\t}\n\telse {\n\t\t$content = '<p>' . esc_html(__('Sorry, that category does not contain any plugins yet.', 'plugpress')) . '</p>';\n\t}\n\n\techo $content;\n}", "function fluxus_standard_post_add_meta_box() {\n add_meta_box(\n 'fluxus_standard_meta_box',\n __( 'Standard Post', 'fluxus' ),\n 'fluxus_standard_post_meta_box_contents',\n 'post',\n 'normal'\n );\n}", "function wp_basalcart_render_general_meta_box($post, $metabox) {\n\t\tglobal $post;\n\t\t$current_meta_box = $metabox['args']['typeofbox'];\n\t\t$get_all_metabox_values = maybe_unserialize(get_post_meta($post->ID,'wp_basalcart_metadata', true));\n\t\t$current_meta_box_value = $get_all_metabox_values[$current_meta_box];\n\t\t\n\t\tif($current_meta_box=='price') { echo \"&yen;\"; }\n\t\techo '<input type=\"text\" name=\"wp_basalcart_'.$current_meta_box.'\" id=\"wp_basalcart_'.$current_meta_box.'\" value=\"'.$current_meta_box_value.'\" />';\n\t\techo '<input type=\"hidden\" name=\"wp_basalcart_manual_save_flag\" value=\"true\" />';\n\t}", "public function metabox_content( $post ) {\n $tracking_codes = wc_any_shipping_get_tracking_codes( $post->ID );\n $order = wc_get_order( $post->ID );\n\n $available_companies = wc_any_shipping_notify_get_shipping_companies();\n\n wp_enqueue_style( 'wc-any-shipping-notify', plugins_url( 'assets/css/wc-any-shipping-notify.css', WC_Any_Shipping_Notify::get_main_file() ), array(), 1.0 );\n wp_enqueue_script( 'wc-any-shipping-notify', plugins_url( 'assets/js/wc-any-shipping-notify.js', WC_Any_Shipping_Notify::get_main_file() ), array( 'jquery', 'jquery-blockui', 'wp-util' ), 1.1, true );\n wp_localize_script(\n 'wc-any-shipping-notify',\n 'WC_Any_Shipping_Notify_JS',\n array(\n 'order_id' => $post->ID,\n 'i18n' => array(\n 'removeQuestion' => esc_js( __( 'Você quer mesmo remover este código de rastreio?', 'wc-any-shipping-notify' ) ),\n ),\n 'nonces' => array(\n 'add' => wp_create_nonce( 'wc-any-shipping-notify-add-tracking-code' ),\n 'remove' => wp_create_nonce( 'wc-any-shipping-notify-remove-tracking-code' ),\n ),\n )\n );\n\n include_once dirname( __FILE__ ) . '/views/html-meta-box-tracking-code.php';\n }", "public function render_order_meta_box() {\n\t\tglobal $post;\n\n\t\t$order = new WC_Shipwire_Order( $post->ID );\n\n\t\t// don't show any information for new orders\n\t\tif ( 'new' == $order->shipwire_status ) {\n\t\t\techo \"<p>\" . __( 'Shipwire order information will be displayed here once this order is exported.', 'woocommerce-shipwire' ) . \"</p>\";\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<table id=\"wc_shipwire_order_meta_box\">\n\n\t\t\t<tr>\n\t\t\t\t<th><strong><?php esc_html_e( 'Order ID', 'woocommerce-shipwire' ) ?> : </strong></th>\n\t\t\t\t<td><?php echo esc_html( ( empty( $order->wc_shipwire_order_id ) ) ? __( 'N/A', 'woocommerce-shipwire' ) : $order->wc_shipwire_order_id ); ?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><strong><?php esc_html_e( 'Transaction ID', 'woocommerce-shipwire' ) ?> : </strong></th>\n\t\t\t\t<td><?php echo esc_html( ( empty( $order->wc_shipwire_transaction_id ) ) ? __( 'N/A', 'woocommerce-shipwire' ) : $order->wc_shipwire_transaction_id ); ?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th><strong><?php esc_html_e( 'Status', 'woocommerce-shipwire' ) ?> : </strong></th>\n\t\t\t\t<td class=\"shipwire_status\">\n\t\t\t\t\t<mark class=\"<?php echo esc_attr( $order->shipwire_status ); ?>\"><?php echo esc_html( $order->get_shipwire_status_for_display() ); ?></mark>\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<?php if ( 'held' === $order->shipwire_status && ! empty( $order->holds ) ) : ?>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<th><strong><?php esc_html_e( 'Holds', 'woocommerce-shipwire' ) ?> : </strong></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<?php foreach ( $order->holds as $hold ) : ?>\n\t\t\t\t\t\t\t<?php echo esc_html( $hold ); ?><br />\n\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t<?php elseif ( 'completed' === $order->shipwire_status || 'shipped' === $order->shipwire_status ) : ?>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<th><strong><?php esc_html_e( 'Warehouse', 'woocommerce-shipwire' ) ?> : </strong></th>\n\t\t\t\t\t<td><?php echo esc_html( ( empty( $order->ship_from_warehouse ) ) ? __( 'N/A', 'woocommerce-shipwire' ) : $order->ship_from_warehouse ); ?></td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<th><strong><?php esc_html_e( 'Ship via', 'woocommerce-shipwire' ) ?> : </strong></th>\n\t\t\t\t\t<td><?php echo esc_html( ( empty( $order->shipper_full_name ) ) ? __( 'N/A', 'woocommerce-shipwire' ) : $order->shipper_full_name ); ?></td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<th><strong><?php esc_html_e( 'Expected Delivery', 'woocommerce-shipwire' ) ?> : </strong></th>\n\t\t\t\t\t<td><?php echo esc_html( empty( $order->expected_delivery_date ) ) ? __( 'N/A', 'woocommerce-shipwire' ) : date_i18n( wc_date_format(), strtotime( $order->expected_delivery_date ) ); ?></td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php $package_count = 1; ?>\n\n\t\t\t\t<?php foreach ( $order->tracking_packages as $id => $package ) : ?>\n\n\t\t\t\t\t<?php if ( 1 < count( $order->tracking_packages ) ) : ?>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th><strong><?php printf( __( 'Package %s', 'woocommerce-shipwire' ), $package_count + 1 ); ?></strong></th>\n\t\t\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t<?php $package_count++; ?>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th><strong><?php esc_html_e( 'Carrier', 'woocommerce-shipwire' ) ?> : </strong></th>\n\t\t\t\t\t\t<td><?php echo esc_html( $package['carrier'] ); ?></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th><strong><?php esc_html_e( 'Tracking Number', 'woocommerce-shipwire' ) ?> : </strong></th>\n\n\t\t\t\t\t\t<?php $tracking_number = esc_html( $package['tracking_number'] ); ?>\n\n\t\t\t\t\t\t<?php $tracking_number = ( $package['url'] ) ? '<a href=\"' . esc_url( $package['url'] ). '\" target=\"_blank\">' . $tracking_number . '</a>' : $tracking_number; ?>\n\n\t\t\t\t\t\t<td><?php echo $tracking_number; ?></td>\n\t\t\t\t\t</tr>\n\n\t\t\t\t<?php endforeach; ?>\n\n\t\t\t<?php endif; ?>\n\n\t\t</table><?php\n\t}", "function register_metabox() {\n\t\tadd_meta_box( 'it-exchange-recurring-payments-info', __( 'Recurring Payments Info', 'LION' ), array( $this, 'print_metabox' ), 'it_exchange_prod', 'it_exchange_normal', 'high' );\n\t}", "function notelypost_meta_box(){\r\n add_meta_box(\r\n 'notes'\r\n ,'Post Notes'\r\n ,array( &$this, 'meta_box_content' )\r\n ,'post'\r\n ,'side'\r\n ,'default'\r\n );\r\n }", "function adtheme_shortcodes_add_custom_box() {\r\n\r\n $screens = array( 'post' );\r\n\r\n foreach ( $screens as $screen ) {\r\n\r\n add_meta_box(\r\n 'adtheme_shortcodes_sectionid',\r\n __( 'ADTHEME SHORTCODES OPTIONS', 'adonepage' ),\r\n 'adtheme_shortcodes_inner_custom_box',\r\n $screen, 'normal', 'high'\r\n );\r\n }\r\n}", "public function add_meta_box( $post )\n {\n $this->custom = get_post_custom($post->ID);\n ?>\n <div class=\"copter-metabox\">\n <div class=\"copter-input-container\" id=\"copter-general\">\n <table class=\"copter-inputs\">\n <?php\n\n foreach ($this->meta_fields as $meta) {\n if (isset($meta['placeholder'])) {\n $placeholder = $meta['placeholder'];\n } else {\n $placeholder = NULL;\n }\n\n $this->add_field(\n $meta['slug'], \n $meta['label'], \n $meta['type'], \n $placeholder\n );\n }\n\n ?>\n </table><!-- .copter-inputs -->\n </div><!-- .copter-input-container#copter-general -->\n </div><!-- end .copter-metabox -->\n <?php\n }", "function add_meta_box($id, $title, $callback, $screen = \\null, $context = 'advanced', $priority = 'default', $callback_args = \\null)\n{\n}", "function jspdx_register_pacorp_metabox( ) {\n\n\t// Start with an underscore to hide fields from custom fields list\n\t$pa_prefix = '_pacorp_';\n\n\t$meta_boxes = new_cmb2_box( array(\n\t\t'id' => 'pacorp',\n\t\t'title' => __( 'Page Options', 'cmb2' ),\n\t\t'object_types' => array( 'page' ), // post type\n\t\t'show_on' => array( 'key' => 'page-template', 'value' => 'page-templates/pulsair-corporate.php' ),\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t// 'cmb_styles' => false, // false to disable the CMB stylesheet\n\t\t// 'closed' => true, // Keep the metabox closed by default\n\t));\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Title Display (Replace existing page title)', 'cmb2' ),\n//\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $pa_prefix . 'title',\n\t\t'type' => 'text',\n\t\t'show_on_cb' => 'cmb2_hide_if_no_cats',\n\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Subtitle / Descriptive Content', 'cmb2' ),\n\t\t'id' => $pa_prefix . 'subtitle-replace',\n\t\t'desc' => __( 'A small amount of text - centered (appears below title)', 'cmb2' ),\n\t\t'type' => 'wysiwyg',\n\t\t'options' => array( 'textarea_rows' => 2, ),\n\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Content Above Grid (when in use)', 'cmb2' ),\n\t\t'id' => $pa_prefix . 'subtitle',\n\t\t'type' => 'wysiwyg',\n\t\t'options' => array( 'textarea_rows' => 10, ),\n\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Hero Image', 'cmb2' ),\n\t\t'id' => $pa_prefix . 'herobg',\n\t\t'type' => 'file',\n\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Hero Title', 'cmb2' ),\n\t\t'id' => $pa_prefix . 'herotitle',\n\t\t'type' => 'text',\n\t\t'show_on_cb' => 'cmb2_hide_if_no_cats',\n\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Hero Content', 'cmb2' ),\n\t\t'id' => $pa_prefix . 'herocontent',\n\t\t'type' => 'wysiwyg',\n\t\t'options' => array( 'textarea_rows' => 10, ),\n\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Hero Link', 'cmb2' ),\n\t\t'id' => $pa_prefix . 'herolink',\n\t\t'type' => 'text_url',\n\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Hero Link Text', 'cmb2' ),\n\t\t'default' => 'Learn More',\n\t\t'id' => $pa_prefix . 'herolinktext',\n\t\t'type' => 'text',\n\t\t'show_on_cb' => 'cmb2_hide_if_no_cats',\n\t) );\n\n//\t$meta_boxes->add_field( array(\n//\t\t'name' => __( 'Use light colored text in hero.', 'cmb2' ),\n//\t\t'id' => $pa_prefix . 'herocolor',\n//\t\t'type' => 'checkbox'\n//\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => 'Custom Text Color',\n\t\t'desc' => 'Select an option',\n\t\t'id' => $pa_prefix . 'herocolor',\n\t\t'type' => 'select',\n\t\t'show_option_none' => false,\n\t\t'default' => 'standard',\n\t\t'options' => array(\n\t\t\t'default' => __( 'Standard (dark)', 'cmb2' ),\n\t\t\t'white' => __( 'White', 'cmb2' ),\n\t\t\t'black' => __( 'Black', 'cmb2' ),\n\t\t\t'navy' => __( 'Navy', 'cmb2' ),\n\t\t\t'blue' => __( 'Blue', 'cmb2' ),\n\t\t\t'red' => __( 'Red', 'cmb2' ),\n\t\t\t'yellow' => __( 'Yellow', 'cmb2' ),\n\t\t\t'green' => __( 'Green', 'cmb2' ),\n\t\t),\n\t) );\n\n\t$meta_boxes->add_field( array(\n\t\t'name' => __( 'Display custom grid (from admin fields).', 'cmb2' ),\n\t\t'id' => $pa_prefix . 'grid',\n\t\t'type' => 'checkbox'\n\t) );\n\n}", "abstract protected function addMetaBox();", "function add_meta_boxes() {\n\n\t // Add metabox to Envira CPT\n\t add_meta_box( 'wp-quick-bulk-edit', __( 'Custom Fields', 'envira-gallery' ), array( $this, 'output_custom_fields' ), 'page', 'normal', 'high' );\n\n\t}", "public abstract function addmetaBoxes();", "function add_box() {\r\n global $post_type;\r\n\r\n\t\tforeach ( $this->page as $page ) {\r\n\t\t\tadd_meta_box( $this->id, $this->title, array( $this, 'meta_box_callback' ), $page, 'normal', $this->priority, array( 'post_type' => $post_type ) );\r\n\t\t\t\r\n\t\t\t/* if it's not a post type add a side metabox with a save button */\r\n\t\t\tif( isset( $_GET['page'] ) )\r\n\t\t\t\tadd_meta_box( 'page-save-metabox', __( 'Save' ), array( $this, 'page_save_meta_box' ), $page, 'side' );\r\n\t\t}\r\n\t}", "public function render_meta_box($post)\n {\n\n echo '<div class=\"tn-metabox tn-admin-form\">';\n\n // Nonce field\n\n wp_nonce_field('tn_meta_nonce_action', 'tn_meta_nonce');\n\n // Fields loop\n\n foreach ($this->fields as $field) {\n\n if ($field['type'] == 'heading') {\n\n echo '<h3 class=\"tn-field-heading\">' . esc_html(__($field['title'], TNA_PLUGIN_NAME)) . '</h3>';\n\n } else { // Not a heading\n\n $css_classes = $required = $errors = '';\n\n // Input\n\n $field_value = get_post_meta($post->ID, $field['id'], true);\n\n // Check if required\n\n if (isset($field['validate']['required'])) {\n\n $css_classes .= ' required-field';\n $required = ' required';\n\n if (get_post_status($post->ID) == 'publish' && empty($field_value)) { // Do not display the note if post is not created yet\n $errors .= '<span class=\"tn-error required-field\">' . __('This field is required', TNA_PLUGIN_NAME) . '</span>';\n }\n\n }\n\n // Begin output\n\n echo '<div class=\"tn-field tn-field-' . esc_attr($field['type']) . $css_classes . '\">';\n\n // Label\n\n echo '<div class=\"tn-label\"><label for=\"' . esc_attr($field['id']) . '\">' . esc_html(__($field['title'], TNA_PLUGIN_NAME)) . '</label></div>';\n\n // Additional CSS classes for extra styling\n\n if (isset($field['validate']['class'])) {\n $css_classes .= ' ' . $field['validate']['class'];\n }\n\n // Field output\n\n echo '<div class=\"tn-input\">';\n\n switch ($field['type']) {\n\n case 'checkbox':\n ?>\n <div class=\"ui-toggle\">\n <input type=\"checkbox\"\n name=\"<?php esc_attr_e($field['id']); ?>\"\n id=\"<?php esc_attr_e($field['id']); ?>\"\n value=\"1\" <?php checked($field_value, 1); ?>>\n <label for=\"<?php esc_attr_e($field['id']); ?>\">\n <div></div>\n <?php\n break;\n\n case 'text':\n if (isset($field['validate']['number'])) {\n $pattern = ' pattern=\"[0-9.,]+\"';\n } else {\n $pattern = '';\n }\n echo '<input type=\"text\" id=\"' . esc_attr($field['id']) . '\" ' . $pattern . ' name=\"' . esc_attr($field['id']) . '\" value=\"' . esc_html($field_value) . '\"' . $required . '>';\n break;\n\n case 'textarea':\n echo '<textarea rows=\"3\" id=\"' . esc_attr($field['id']) . '\" name=\"' . esc_attr($field['id']) . '\"' . $required . '>' . esc_textarea($field_value) . '</textarea>';\n break;\n\n case 'wysiwyg':\n wp_editor(htmlspecialchars_decode($field_value), esc_attr($field['id']), $settings = array('wpautop' => true, 'textarea_name' => esc_attr($field['id'])));\n break;\n\n default:\n echo __('Unsupported field type', TNA_PLUGIN_NAME);\n break;\n\n }\n\n // Close the extra label for checkbox and radios\n\n if ($field['type'] == 'checkbox' || $field['type'] == 'radio') echo '</label></div>';\n\n // Optional description\n\n if (isset($field['desc'])) {\n echo '<div class=\"tn-desc\">' . __($field['desc'], TNA_PLUGIN_NAME) . '</div>';\n }\n\n // If there are any notifications to be displayed\n\n if ($errors != '') echo $errors;\n\n echo '</div></div>';\n\n }\n\n // Field end\n\n }\n\n echo '</div>';\n\n }", "public function add_meta_box() {\n\n\t\t\t$tax = get_taxonomy( $this->taxonomy );\n\n\t\t\tadd_meta_box( $this->taxonomy, $tax->labels->name, array(\n\t\t\t\t$this,\n\t\t\t\t'metabox_inner'\n\t\t\t), $this->post_type, 'side', 'core' );\n\t\t}", "function tt_add_meta_box_property_payment() {\n add_meta_box( 'meta-box', __('Property Payment Details', 'tt' ), 'tt_meta_box_property_payment', 'property', 'normal', 'core' );\n}" ]
[ "0.7756115", "0.7077102", "0.700246", "0.69542503", "0.6942081", "0.6937844", "0.6931036", "0.6881025", "0.6859388", "0.68585294", "0.68522173", "0.68416965", "0.68387324", "0.6824408", "0.681947", "0.6817257", "0.68115306", "0.6810486", "0.68071777", "0.6803376", "0.67670435", "0.67513853", "0.67036295", "0.6700528", "0.669778", "0.6691554", "0.66885364", "0.66872704", "0.6679629", "0.66613024", "0.6657832", "0.66528505", "0.66485536", "0.6631156", "0.66255885", "0.6598077", "0.65890545", "0.65826714", "0.6582621", "0.6562849", "0.65622604", "0.6558469", "0.655041", "0.6549051", "0.65441906", "0.65392125", "0.65366954", "0.6521344", "0.650044", "0.6496951", "0.64871496", "0.6482829", "0.64801764", "0.6478599", "0.6474773", "0.6471898", "0.6469651", "0.64696264", "0.64690715", "0.6463973", "0.6463504", "0.64564794", "0.6454586", "0.64528555", "0.64476186", "0.6445361", "0.6432271", "0.6427994", "0.6419204", "0.6418672", "0.6418402", "0.64183384", "0.6414116", "0.6410065", "0.6400071", "0.63999766", "0.6398569", "0.6397076", "0.6395085", "0.639131", "0.638351", "0.6380603", "0.63775647", "0.63715607", "0.6363743", "0.6363211", "0.6362883", "0.6362267", "0.63604194", "0.6358645", "0.63577795", "0.6353016", "0.63474697", "0.63363224", "0.6331257", "0.6325966", "0.632389", "0.63201195", "0.6319631", "0.6318884" ]
0.75651187
1
woocommerce_pip_alter_order_actions function. Insert buttons to orders page
Функция woocommerce_pip_alter_order_actions. Вставка кнопок на страницу заказов
function woocommerce_pip_alter_order_actions( $order ) { ?> <a class="button tips pip-link" data-tip="<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>" href="<?php echo wp_nonce_url( admin_url( '?print_pip=true&post='.$order->id.'&type=print_invoice'), 'print-pip' ); ?>"><img src="<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/invoice-icon.png'; ?>" alt="<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>" width="14"></a> <a class="button tips pip-link" data-tip="<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>" href="<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $order->id.'&type=print_packing' ), 'print-pip' ); ?>"><img src="<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/packing-list-icon.png'; ?>" alt="<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>" width="14"></a> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wc_get_account_orders_actions($order)\n {\n }", "public function add_order_bulk_actions() {\n\t\tglobal $post_type, $post_status;\n\n\t\tif ( $post_type == 'shop_order' && $post_status != 'trash' ) {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery( document ).ready( function ( $ ) {\n\t\t\t\t\t\t$( 'select[name^=action]' ).append(\n\t\t\t\t\t\t\t$( '<option>' ).val( 'export_to_shipwire' ).text( '<?php _e( 'Export to Shipwire', 'woocommerce-shipwire' ); ?>' ),\n\t\t\t\t\t\t\t$( '<option>' ).val( 'update_tracking' ).text( '<?php _e( 'Update Tracking', 'woocommerce-shipwire' ); ?>' )\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "function hook_order_actions($order) {\n $actions = array();\n $module_path = base_path() . drupal_get_path('module', 'uc_shipping');\n if (user_access('fulfill orders')) {\n $result = db_query(\"SELECT nid FROM {uc_order_products} WHERE order_id = %d AND data LIKE '%%s:9:\\\"shippable\\\";s:1:\\\"1\\\";%%'\", $order->order_id);\n if (db_num_rows($result)) {\n $title = t('Package order !order_id products.', array('!order_id' => $order->order_id));\n $actions[] = array(\n 'name' => t('Package'),\n 'url' => 'admin/store/orders/'. $order->order_id .'/packages',\n 'icon' => '<img src=\"'. $module_path .'/images/package.gif\" alt=\"'. $title .'\" />',\n 'title' => $title,\n );\n $result = db_query(\"SELECT package_id FROM {uc_packages} WHERE order_id = %d\", $order->order_id);\n if (db_num_rows($result)) {\n $title = t('Ship order !order_id packages.', array('!order_id' => $order->order_id));\n $actions[] = array(\n 'name' => t('Ship'),\n 'url' => 'admin/store/orders/'. $order->order_id .'/shipments',\n 'icon' => '<img src=\"'. $module_path .'/images/ship.gif\" alt=\"'. $title .'\" />',\n 'title' => $title,\n );\n }\n }\n }\n return $actions;\n}", "function woocommerce_pip_my_orders_action( $actions, $order ) {\n\n\tif ( in_array( $order->status, array( 'processing', 'completed' ) ) ) {\n\t\t$actions[] = array(\n\t\t\t'url'\t => wp_nonce_url( site_url( '?print_pip_invoice=true&post='.$order->id ), 'client-print-pip' ),\n\t\t\t'name' => __( 'View invoice', 'woocommerce-pip' )\n\t\t);\n\t}\n\treturn $actions;\n}", "public function add_order_actions( $order ) {\n\n\t\t$order = new WC_Shipwire_Order( $order->id );\n\n\t\tif ( ! $order->is_exported ) {\n\n\t\t\t$url = wp_nonce_url( admin_url( 'admin-ajax.php?action=wc_shipwire_export_order&order_id=' . $order->id ), 'wc_shipwire_export_order' );\n\t\t\t$name = __( 'Export to Shipwire', 'woocommerce-shipwire' );\n\n\t\t\tprintf( '<a class=\"button tips export_to_shipwire\" href=\"%1$s\" data-tip=\"%2$s\">%2$s</a>', esc_url( $url ), $name );\n\t\t}\n\t}", "public function orders_actions($actions, $order)\n {\n if ($this->opt['woo_pdf_display_orders_page_button']) {\n\n $invoice = $this->get_invoice($order->id);\n\n // Show invoice link\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled'] && $this->opt['woo_pdf_allow_download'] && apply_filters('woo_pdf_allow_regular_invoice_download', true, $order, 'list')) {\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n $title = $this->opt['woo_pdf_document_name'];\n }\n\n // Show proforma link\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && $this->opt['woo_pdf_allow_proforma_download'] && $order->status != 'completed' && apply_filters('woo_pdf_allow_proforma_invoice_download', true, $order, 'list')) {\n $download_url = home_url('/?wpd_proforma='.$order->id);\n $title = $this->opt['woo_pdf_proforma_name'];\n }\n\n if (isset($download_url) && isset($title)) {\n $actions['invoice'] = array(\n 'url' => $download_url,\n 'name' => $title,\n );\n }\n }\n\n return $actions;\n }", "public function add_order_meta_box_actions( $actions ) {\n\t\tglobal $theorder;\n\n\t\t$order = new WC_Shipwire_Order( $theorder->id );\n\n\t\t// add update tracking action\n\t\t$actions['wc_shipwire_update_tracking'] = __( 'Update Shipwire tracking info', 'woocommerce-shipwire' );\n\n\t\t// add export order action if not already exported\n\t\tif ( ! $order->is_exported ) {\n\t\t\t$actions['wc_shipwire_export_order'] = __( 'Export order to Shipwire', 'woocommerce-shipwire' );\n\t\t}\n\n\t\treturn $actions;\n\t}", "function wc_render_action_buttons($actions)\n {\n }", "public function hookActionGetAdminOrderButtons(array $params)\n {\n $order = new Order($params['id_order']);\n\n /** @var \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router $router */\n $router = $this->get('router');\n\n /** @var \\PrestaShopBundle\\Controller\\Admin\\Sell\\Order\\ActionsBarButtonsCollection $bar */\n $bar = $params['actions_bar_buttons_collection'];\n\n $viewCustomerUrl = $router->generate('admin_customers_view', ['customerId'=> (int)$order->id_customer]);\n $bar->add(\n new \\PrestaShopBundle\\Controller\\Admin\\Sell\\Order\\ActionsBarButton(\n 'btn-secondary', ['href' => $viewCustomerUrl], 'View customer'\n )\n );\n $bar->add(\n new \\PrestaShopBundle\\Controller\\Admin\\Sell\\Order\\ActionsBarButton(\n 'btn-info', ['href' => 'https://www.prestashop.com/'], 'Go to prestashop'\n )\n );\n $bar->add(\n new \\PrestaShopBundle\\Controller\\Admin\\Sell\\Order\\ActionsBarButton(\n 'btn-dark', ['href' => 'https://github.com/PrestaShop/example-modules/tree/master/demovieworderhooks'], 'Go to GitHub'\n )\n );\n $createAnOrderUrl = $router->generate('admin_orders_create');\n $bar->add(\n new \\PrestaShopBundle\\Controller\\Admin\\Sell\\Order\\ActionsBarButton(\n 'btn-link', ['href' => $createAnOrderUrl], 'Create an order'\n )\n );\n }", "private function generate_actions() {\n add_action('after_setup_theme', [$this, 'theme_setup']);\n add_action('widgets_init', [$this, 'widgets_setup']);\n }", "function woocommerce_pip_order_bulk_action() {\n\n\t$wp_list_table = _get_list_table( 'WP_Posts_List_Table' );\n\t$action = $wp_list_table->current_action();\n\n\tif ( $action == 'print_invoice' || $action=='print_packing' ) {\n\t\t$posts = '';\n\n\t\tforeach( $_REQUEST['post'] as $post_id ) {\n\t\t\tif ( empty( $posts ) ) {\n\t\t\t\t$posts = $post_id;\n\t\t\t} else {\n\t\t\t\t$posts .= ','.$post_id;\n\t\t\t}\n\t\t}\n\n\t\t$forward = wp_nonce_url( admin_url(), 'print-pip' );\n\t\t$forward = add_query_arg( array( 'print_pip' => 'true', 'post' => $posts, 'type' => $action ), $forward );\n\t\twp_redirect( $forward );\n\t\texit();\n\t}\n}", "function it_exchange_authorizenet_plugin_row_actions( $actions, $plugin_file, $plugin_data, $context ) {\n\n\t$actions['setup_addon'] = '<a href=\"' . esc_url( admin_url( 'admin.php?page=it-exchange-addons&add-on-settings=authorizenet' ) ) . '\">' . __( 'Setup Add-on', 'it-l10n-exchange-addon-authorize-net' ) . '</a>';\n\n\treturn $actions;\n\n}", "public function process_order_meta_box_actions( $order ) {\n\n\t\t$order = new WC_Shipwire_Order( $order->id );\n\n\t\tif ( 'woocommerce_order_action_wc_shipwire_export_order' === current_filter() ) {\n\t\t\t$order->export();\n\t\t} else {\n\t\t\t$order->update_tracking();\n\t\t}\n\t}", "function woo_prod_custom_bulk_action() {\r\n\t\t\tglobal $typenow;\r\n\t\t\t$post_type = $typenow;\r\n\r\n\t\t\tif($post_type == 'shop_order') {\r\n\r\n\t\t\t\t// get the action\r\n\t\t\t\t$wp_list_table = _get_list_table('WP_Posts_List_Table'); // depending on your resource type this could be WP_Users_List_Table, WP_Comments_List_Table, etc\r\n\t\t\t\t$action = $wp_list_table->current_action();\r\n\r\n\t\t\t\t$allowed_actions = array(\"prod_labels\");\r\n\t\t\t\tif(!in_array($action, $allowed_actions)) return;\r\n\r\n\t\t\t\t// security check\r\n\t\t\t\tcheck_admin_referer('bulk-posts');\r\n\r\n\t\t\t\t// make sure ids are submitted. depending on the resource type, this may be 'media' or 'ids'\r\n\t\t\t\tif(isset($_REQUEST['post'])) {\r\n\t\t\t\t\t$post_ids = array_map('intval', $_REQUEST['post']);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(empty($post_ids)) return;\r\n\r\n\t\t\t\t// this is based on wp-admin/edit.php\r\n\t\t\t\t$sendback = remove_query_arg( array('prod_labels', 'untrashed', 'deleted', 'ids'), wp_get_referer() );\r\n\t\t\t\tif ( ! $sendback )\r\n\t\t\t\t\t$sendback = admin_url( \"edit.php?post_type=$post_type\" );\r\n\r\n\t\t\t\t$pagenum = $wp_list_table->get_pagenum();\r\n\t\t\t\t$sendback = add_query_arg( 'paged', $pagenum, $sendback );\r\n\r\n\t\t\t\tswitch($action) {\r\n\t\t\t\t\tcase 'prod_labels':\r\n\r\n\t\t\t\t\t\t// if we set up user permissions/capabilities, the code might look like:\r\n\t\t\t\t\t\t//if ( !current_user_can($post_type_object->cap->export_post, $post_id) )\r\n\t\t\t\t\t\t//\twp_die( __('You are not allowed to export this post.') );\r\n\r\n\t\t\t\t\t\t$printed = 0;\r\n\t\t\t\t\t\tforeach( $post_ids as $post_id ) {\r\n\r\n\t\t\t\t\t\t\tif ( !$this->perform_export($post_id) )\r\n\t\t\t\t\t\t\t\twp_die( __('Error exporting post.') );\r\n\r\n\t\t\t\t\t\t\t$printed++;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$pdf_file_url = '';\r\n\t\t\t\t\t\t$output_html = wooprod_generate_products_label_html('', '', '', $post_ids);\r\n\t\t\t\t\t\t$output_css = wooprod_generate_products_label_css();\r\n\t\t\t\t\t\t$generate_result = generate_products_label_pdf($output_css, $output_html);\r\n\t\t\t\t\t\tif(isset($generate_result['pdf_url'])){\r\n\t\t\t\t\t\t\t$pdf_file_url = $generate_result['pdf_url'];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$sendback = add_query_arg( array('prod_labels' => $printed, 'pdf_url' => $pdf_file_url, 'ids' => join(',', $post_ids) ), $sendback );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault: return;\r\n\t\t\t\t}\r\n\r\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 );\r\n\r\n\t\t\t\twp_redirect($sendback);\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t}", "public function add_order_bulk_actions() {\n\t\tglobal $post_type;\n\n\t\tif( $post_type !== \"shop_order\" )\n\t\t\treturn;\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function() {\n\t\t\t\tvar optGroup = '<optgroup label=\\'<?php _e( \"Svea Webpay Actions\", \"sveawebpay\" ); ?>\\'>'\n\t\t\t\t\t\t\t + '<option value=\"svea_deliver\"><?php _e( \"Deliver order\", \"sveawebpay\" ); ?></option>'\n\t\t\t\t\t\t\t + '<option value=\"svea_credit\"><?php _e( \"Credit order\", \"sveawebpay\" ); ?></option>'\n\t\t\t\t\t\t\t + '<option value=\"svea_cancel\"><?php _e( \"Cancel order\", \"sveawebpay\" ); ?></option>'\n\t\t\t\t\t\t\t + '</optgroup>';\n\t\t\t\tjQuery(\"select[name='action'], select[name='action2']\").append(optGroup);\n\t\t\t});\n\t\t</script>\n\t\t<?php\n\t}", "private function setup_action_buttons() {\n\n\t\t\t// slug = the action, array is the meta data\n\t\t\t$this->buttons = array(\n\t\t\t\t'edit' => array(\n\t\t\t\t\t'title' => __( 'Edit' , 'store-locator-le' ),\n\t\t\t\t\t'class' => 'dashicons-welcome-write-blog',\n\t\t\t\t),\n\t\t\t\t'delete' => array(\n\t\t\t\t\t'title' => __( 'Delete' , 'store-locator-le' ),\n\t\t\t\t\t'class' => 'dashicons-trash' ,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Filter to Build the action buttons HTML string on the first column of the manage locations panel.\n\t\t\t *\n\t\t\t * @filter slp_manage_locations_buttons\n\t\t\t *\n\t\t\t * @used-by \\SLP_Power_Pages_Admin::add_action_buttons\n\t\t\t *\n\t\t\t * @params array buttons\n\t\t\t */\n\t\t\t$this->buttons = apply_filters( 'slp_manage_locations_buttons', $this->buttons );\n\t\t}", "public function request_button( $actions, $order ) {\n $allowed_status = dokan_get_option( 'rma_order_status', 'dokan_rma', 'wc-completed' );\n\n if ( $allowed_status != 'wc-' . $order->get_status() ) {\n return $actions;\n }\n\n $url = esc_url_raw( wc_get_account_endpoint_url( 'request-warranty' ) . $order->get_id() ) ;\n $actions['request_warranty'] = array( 'url' => $url, 'name' => __( 'Request Warranty', 'dokan' ) );\n return $actions;\n }", "protected function wc_setup_activate_actions()\n {\n }", "function dia_add_order_again_to_my_orders_actions( $actions, $order ) {\n\tif ( $order->has_status( 'completed' ) ) {\n\t\t$actions['order-again'] = array(\n\t\t\t'url' => wp_nonce_url( add_query_arg( 'order_again', $order->id ) , 'woocommerce-order_again' ),\n\t\t\t'name' => __( 'Order Again', 'woocommerce' )\n\t\t);\n\t}\n\treturn $actions;\n}", "public static function get_order_preview_actions_html($order)\n {\n }", "public function btnOrder(){\n return '<i class=\"orderList fa fa-arrows\"></i>';\n }", "public function add_actions_button( $product) {\n\n\t\t\t$cart = get_option( 'yith-wacp-show-go-cart' ) == 'yes';\n\t\t\t$checkout = get_option( 'yith-wacp-show-go-checkout' ) == 'yes';\n\t\t\t$continue = get_option( 'yith-wacp-show-continue-shopping' ) == 'yes';\n\n\t\t\tif( ! $cart && ! $checkout && ! $continue ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url();\n\t\t\t$checkout_url = function_exists( 'wc_get_checkout_url' ) ? wc_get_checkout_url() : WC()->cart->get_checkout_url();\n\n\t\t\t// let user filter url\n\t\t\t$args = array(\n\t\t\t\t'cart' => $cart,\n\t\t\t\t'cart_url' => apply_filters( 'yith_wacp_go_cart_url', $cart_url ),\n\t\t\t\t'checkout' => $checkout,\n\t\t\t\t'checkout_url' => apply_filters( 'yith_wacp_go_checkout_url', $checkout_url ),\n\t\t\t\t'continue' => $continue,\n\t\t\t\t'continue_shopping_url' => apply_filters( 'yith_wacp_continue_shopping_url', '#' )\n\t\t\t);\n\n\t\t\tob_start();\n\t\t\twc_get_template( 'yith-wacp-popup-action.php', $args, '', YITH_WACP_TEMPLATE_PATH . '/' );\n\t\t\t$html = ob_get_clean();\n\n\t\t\techo apply_filters( 'yith_wacp_actions_button_html', $html, $product );\n\t\t}", "public function display_admin_action_buttons() {\n\t\tglobal $post;\n\n\t\tif( is_null( $post ) || ! isset( $post->ID ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$order = wc_get_order( $post->ID );\n\n\t\tif( ! $order ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$svea_order_id = ( $value = get_post_meta( $order->get_id(), \"_svea_order_id\", true ) ) \n\t\t\t? $value : wc_get_order_item_meta( $order->get_id(), \"svea_order_id\" );\n\n\t\tif( strlen( $svea_order_id ) <= 0 )\n\t\t\treturn;\n\n\t\t$payment_method = $order->get_payment_method();\n\n\t\tif( $payment_method === WC_Gateway_Svea_Direct_Bank::GATEWAY_ID )\n\t\t\t$action_buttons_function = 'WC_Gateway_Svea_Direct_Bank::display_admin_action_buttons';\n\t\telse if( $payment_method === WC_Gateway_Svea_Invoice::GATEWAY_ID )\n\t\t\t$action_buttons_function = 'WC_Gateway_Svea_Invoice::display_admin_action_buttons';\n\t\telse if( $payment_method === WC_Gateway_Svea_Card::GATEWAY_ID )\n\t\t\t$action_buttons_function = 'WC_Gateway_Svea_Card::display_admin_action_buttons';\n\t\telse\n\t\t\treturn;\n\n\t\tcall_user_func( $action_buttons_function );\n\t}", "public function woocommerce_filter_order_actions($order_actions)\n\t\t{\n\t\t\tglobal $theorder;\n\n\t\t\t/** backward compatible with WooCommerce v2.x series **/\n\t\t\t$payment_method = version_compare( WC()->version, '3.0.0', '>=' ) ? $theorder->get_payment_method() : $theorder->payment_method;\n\n\t\t\tif ( $theorder->get_meta( 'is_awaiting_capture' ) === 'yes' ) {\n\t\t\t\t$order_actions[ $payment_method . '_charge_capture'] = __( 'Opn Payments: Capture this order', 'omise' );\n\t\t\t}\n\n\t\t\t$order_actions[ $payment_method . '_sync_payment'] = __( 'Opn Payments: Manual sync payment status', 'omise' );\n\n\t\t\treturn $order_actions;\n\t\t}", "function deleteButtons(){\n /*\n * Remove all buttons.\n */\n remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);\n \n /*\n * Reinitialize products buttons.\n */\n add_action('woocommerce_after_shop_loop_item', array(&$this, 'displayButtons'), 11);\n }", "function ava_beaver_tunnels_actions( $actions = array() ) {\n\t$actions[] = array(\n\t\t'title' => esc_html__( 'Ava', 'ava' ),\n\t\t'actions' => array(\n\t\t\t'ava_before_page',\n\t\t\t'ava_after_page',\n\t\t\t'ava_before_header',\n\t\t\t'ava_header',\n\t\t\t'ava_after_header',\n\t\t\t'ava_before_footer',\n\t\t\t'ava_footer',\n\t\t\t'ava_after_footer',\n\t\t\t'ava_before_colophon',\n\t\t\t'ava_after_colophon',\n\t\t\t'ava_before_footer_widgets',\n\t\t\t'ava_after_footer_widgets',\n\t\t\t'ava_before_first_footer_col',\n\t\t\t'ava_after_first_footer_col',\n\t\t\t'ava_before_second_footer_col',\n\t\t\t'ava_after_second_footer_col',\n\t\t\t'ava_before_third_footer_col',\n\t\t\t'ava_after_third_footer_col',\n\t\t\t'ava_before_fourth_footer_col',\n\t\t\t'ava_after_fourth_footer_col',\n\t\t\t'ava_shop_minibar_right',\n\t\t\t'ava_before_single_product_carousel',\n\t\t),\n\t);\n\treturn $actions;\n}", "function my_give_add_custom_payment_bulk_actions( $actions ) {\n\n\t$actions['set-status-under-review'] = __( 'Set To Under Review', 'give' );\n\t$actions['set-status-pending-approval'] = __( 'Set To Pending Approval', 'give' );\n\n\treturn $actions;\n}", "public function render_authorized_action_buttons( WC_Order $order ) {\n\t\t$gateway = wc_get_payment_gateway_by_order( $order );\n\t\tif ( $gateway instanceof WC_PostFinanceCheckout_Gateway ) {\n\t\t\t$transaction_info = WC_PostFinanceCheckout_Entity_Transaction_Info::load_by_order_id( $order->get_id() );\n\t\t\tif ( $transaction_info->get_state() == \\PostFinanceCheckout\\Sdk\\Model\\TransactionState::AUTHORIZED ) {\n\t\t\t\tif ( WC_PostFinanceCheckout_Entity_Completion_Job::count_running_completion_for_transaction(\n\t\t\t\t\t$transaction_info->get_space_id(),\n\t\t\t\t\t$transaction_info->get_transaction_id()\n\t\t\t\t) > 0 || WC_PostFinanceCheckout_Entity_Void_Job::count_running_void_for_transaction(\n\t\t\t\t\t$transaction_info->get_space_id(),\n\t\t\t\t\t$transaction_info->get_transaction_id()\n\t\t\t\t) > 0 ) {\n\t\t\t\t\techo '<span class=\"postfinancecheckout-action-in-progress\">' . esc_html__( 'There is a completion/void in progress.', 'woo-postfinancecheckout' ) . '</span>';\n\t\t\t\t\techo '<button type=\"button\" class=\"button postfinancecheckout-update-order\">' . esc_html__( 'Update', 'woo-postfinancecheckout' ) . '</button>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<button type=\"button\" class=\"button postfinancecheckout-void-show\">' . esc_html__( 'Void', 'woo-postfinancecheckout' ) . '</button>';\n\t\t\t\t\techo '<button type=\"button\" class=\"button button-primary postfinancecheckout-completion-show\">' . esc_html__( 'Completion', 'woo-postfinancecheckout' ) .\n\t\t\t\t\t\t\t '</button>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static function get_available_order_actions_for_order($order)\n {\n }", "protected function create_shortcode_button( array $shortcode, $sort_order, $templ_id, $element_id )\n\t\t{\n\t\t\t$edit = av_backend_icon( array( 'args' => array( 'icon' => 'ue836', 'font' => 'entypo-fontello' ) ) );\n\t\t\t$delete = av_backend_icon( array( 'args' => array( 'icon' => 'ue813', 'font' => 'entypo-fontello' ) ) );\n\t\t\t$clone = av_backend_icon( array( 'args' => array( 'icon' => 'ue83c', 'font' => 'entypo-fontello' ) ) );\n\n\t\t\t/**\n\t\t\t * Add a 4th action button\n\t\t\t *\n\t\t\t * @used_by\t\t\tavia_WPML\t\t\t\t10\n\t\t\t * @since 4.8\n\t\t\t */\n\t\t\t$additional = apply_filters( 'avf_cet_additional_sc_action_btn', '', $element_id );\n\n\t\t\t$icons = '';\n\t\t\t$icons .=\t'<div class=\"avia-custom-elements-actions-overlay avia-font-' . $edit['font'] . '\" data-element_id=\"' . $element_id . '\" data-el_template=\"element_' . $templ_id . '\" data-template=\"' . $templ_id . '\">';\n\t\t\t$icons .=\t\t'<div class=\"element-sc-action-button element-edit\" title=\"' . esc_html__( 'Edit Custom Element', 'avia_framework' ) . '\"><span>' . $edit['display_char'] . '</span></div>';\n\t\t\t$icons .=\t\t'<div class=\"element-sc-action-button element-delete\" title=\"' . esc_html__( 'Delete Custom Element', 'avia_framework' ) . '\"><span>' . $delete['display_char'] . '</span></div>';\n\t\t\t$icons .=\t\t'<div class=\"element-sc-action-button element-clone\" title=\"' . esc_html__( 'Clone Custom Element', 'avia_framework' ) . '\"><span>' . $clone['display_char'] . '</span></div>';\n\t\t\t$icons .=\t\t$additional;\n\t\t\t$icons .=\t\t'<div class=\"avia-sc-button-loading avia_loading\"></div>';\n\t\t\t$icons .=\t'</div>';\n\n\t\t\t$btn = Avia_Builder()->create_shortcode_button( $shortcode, $sort_order, $templ_id );\n\n\t\t\treturn str_replace( '</a>', $icons . '</a>', $btn );\n\t\t}", "function addWPActions ()\n\t{\n\t\t\n\t\t// Register Shortcode\n\t\tadd_shortcode( 'ek-a-z', array( 'ek_az_draw', 'drawAZ' ) );\n\t\t\n\t\t//Add Front End Jquery and CSS\n\t\tadd_action( 'wp_footer', array( $this, 'frontendEnqueues' ) );\t\t\n\t\t\n\t\t//Admin Menu\n\t\tadd_action( 'init', array( $this, 'create_CPTs' ) );\t\t\n\t\tadd_action( 'add_meta_boxes_az_link', array( $this, 'addAZ_LinkMetaBox' ));\t\t\n\t\tadd_action( 'add_meta_boxes_page', array( $this, 'addPageAZ_metabox' ));\t\t\n\n\n\t\t\n\t\t// Save additional meta for the custom post\n\t\tadd_action( 'save_post', array($this, 'savePostMeta' ), 10 );\t\t\n\t\tadd_action( 'save_post', array($this, 'savePageMeta' ), 10 );\n\t\t\n\t}", "public static function product_buttons()\n {\n }", "public function process_order_bulk_actions() {\n\t\tglobal $typenow;\n\n\t\tif ( 'shop_order' == $typenow ) {\n\n\t\t\t// get the action\n\t\t\t$wp_list_table = _get_list_table( 'WP_Posts_List_Table' );\n\t\t\t$action = $wp_list_table->current_action();\n\n\t\t\t// return if not processing our actions\n\t\t\tif ( ! in_array( $action, array( 'export_to_shipwire', 'update_tracking' ) ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// security check\n\t\t\tcheck_admin_referer( 'bulk-posts' );\n\n\t\t\t// make sure order IDs are submitted\n\t\t\tif ( isset( $_REQUEST['post'] ) ) {\n\t\t\t\t$order_ids = array_map( 'absint', $_REQUEST['post'] );\n\t\t\t}\n\n\t\t\t// return if there are no orders to export\n\t\t\tif ( empty( $order_ids ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// give ourselves an unlimited timeout if possible\n\t\t\t@set_time_limit( 0 );\n\n\t\t\tforeach ( $order_ids as $order_id ) {\n\n\t\t\t\t$order = new WC_Shipwire_Order( $order_id );\n\n\t\t\t\tif ( 'export_to_shipwire' === $action ) {\n\t\t\t\t\t$order->export();\n\t\t\t\t} else {\n\t\t\t\t\t$order->update_tracking();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function setup_actions() {\n\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'action_wp_enqueue_scripts' ) );\n\n\t\tadd_action( 'template_redirect', array( $this, 'bypass_is_last_batch_in_footer' ), 9, 0 );\n\n\t\tadd_action( 'template_redirect', array( $this, 'remove_bypass_is_last_batch_in_footer' ), 11, 0 );\n\t}", "public function __construct() {\n add_action( 'woocommerce_checkout_create_order_line_item', [ $this, 'order_item_meta' ], 10, 3 );\n add_action( 'woocommerce_order_status_changed', [ $this, 'order_status_changed' ], 10, 4 );\n\n if ( is_admin() ) {\n add_action( 'woocommerce_before_order_itemmeta', [ $this, 'render_order_item_warranty' ], 10, 3 );\n add_action( 'woocommerce_order_item_meta_end', [ $this, 'render_order_item_warranty' ], 10, 3 );\n }\n\n // My account page custom rewrite for order\n add_action( 'init', [ $this, 'rewrite_endpoint' ] );\n add_filter( 'query_vars', [ $this, 'add_query_vars' ] );\n add_filter( 'the_title', [ $this, 'endpoint_title' ] );\n add_filter( 'woocommerce_account_menu_items', [ $this, 'dokan_rma_requests_link' ], 50 );\n add_action( 'woocommerce_account_request-warranty_endpoint', [ $this, 'content_request_warranty' ] );\n add_action( 'woocommerce_account_rma-requests_endpoint', [ $this, 'content_rma_requests' ] );\n add_action( 'woocommerce_account_view-rma-requests_endpoint', [ $this, 'content_rma_requests_view' ] );\n\n // My order list table actions\n add_filter( 'woocommerce_my_account_my_orders_actions', [ $this, 'request_button' ], 10, 2 );\n add_filter( 'dokan_my_account_my_sub_orders_actions', [ $this, 'request_button' ], 10, 2 );\n }", "function my_quotes_stuff_button($wp_admin_bar) {\n if( current_user_can('shop_manager') || current_user_can('administrator') ) {\n $dia_user = wp_get_current_user();\n $dia_user_id = esc_html( $dia_user->ID );\n $URL = site_url();\n $args = array(\n 'id' => 'my_quotes_button',\n 'title' => 'My Quotes',\n 'href' => $URL.'/wp-admin/edit.php?&post_type=shop_order&_current_user='.$dia_user_id,\n 'meta' => array(\n 'title' => 'View Quotes That I Created'\n )\n );\n $wp_admin_bar -> add_node($args);\n\n $other_args = array(\n 'id' => 'ns_quotes_button',\n 'title' => 'Nursing School Quotes',\n 'href' => $URL.'/wp-admin/edit.php?post_type=shop_order&dia_order_quote_header_drop_option=nursing_school',\n 'meta' => array(\n 'title' => 'Hey Jon, How\\'s your roomate(s)'\n )\n );\n $wp_admin_bar -> add_node($other_args);\n\n $ot_args = array(\n 'id' => 'hos_quotes_button',\n 'title' => 'Hospital Team Quotes',\n 'href' => $URL.'/wp-admin/edit.php?post_type=shop_order&dia_order_quote_header_drop_option=hospital_mm',\n 'meta' => array(\n 'title' => 'Justin is not funny. At all.'\n )\n );\n $wp_admin_bar -> add_node($ot_args);\n }\n}", "function orderProductAction()\r\n {\r\n\t\treturn Orders::getObject($this->sets)->orderProduct();\r\n }", "public static function install_actions()\n {\n }", "public function getProcessButton(Orders $order, Request $request);", "function action_woocommerce_thankyou( $order_id ) { \n \n}", "abstract public function setOrderManagement($action);", "function kleo_woo_orders_screen() {\n\t\tadd_action( 'bp_template_content', 'kleo_woo_orders_screen_content' );\n\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}", "private function setup_actions() {\n\t\tadd_filter( 'shortcode_ui_fields', array( $this, 'filter_shortcode_ui_fields' ) );\n\t\tadd_action( 'enqueue_shortcode_ui', array( $this, 'action_enqueue_shortcode_ui' ) );\n\t\tadd_action( 'wp_ajax_shortcode_ui_term_field', array( $this, 'action_wp_ajax_shortcode_ui_term_field' ) );\n\t\tadd_action( 'shortcode_ui_loaded_editor', array( $this, 'action_shortcode_ui_loaded_editor' ) );\n\t}", "function add_link_back_to_order($order, $is_admin)\n{\n\tif ($order->get_status() !== \"completed\") return;\n\t// Open the section with a paragraph so it is separated from the other content\n\t$link = '<p style=\"text-align: center;\">';\n\n\t// Add the anchor link with the admin path to the order page\n\t$link .= '<a href=\"https://wapo.ie/my-account-2\">';\n\n\t$buttonStyles = '\n\t\tbackground-color: #59bcb8;\n\t\tpadding: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder: none;';\n\n\t// Clickable text\n\t$link .= '<button style=\"' . $buttonStyles . '\">View Purchase</button>';\n\n\t// Close the link\n\t$link .= '</a>';\n\n\t// Close the paragraph\n\t$link .= '</p>';\n\n\t// Return the link into the email\n\techo $link;\n}", "function add_actions()\n {\n }", "function make_cart_payment_button($order_id,$currency)\n{\n\t$_items=$GLOBALS['SITE_DB']->query_select('shopping_order_details',array('p_name','p_price','p_quantity'),array('order_id'=>$order_id));\n\t$items=array();\n\tforeach ($_items as $item)\n\t{\n\t\t$items[]=array(\n\t\t\t'PRODUCT_NAME'=>$item['p_name'],\n\t\t\t'PRICE'=>float_to_raw_string($item['p_price']),\n\t\t\t'QUANTITY'=>strval($item['p_quantity']),\n\t\t);\n\t}\n\n\t$via=get_option('payment_gateway');\n\n\trequire_code('hooks/systems/ecommerce_via/'.filter_naughty_harsh($via));\n\n\t$object=object_factory('Hook_'.$via);\n\n\tif (!method_exists($object,'make_cart_transaction_button'))\n\t{\n\t\t$amount\t=\t$GLOBALS['SITE_DB']->query_value('shopping_order','tot_price',array('id'=>$order_id));\n\t\treturn $object->make_transaction_button($order_id,do_lang('CART_ORDER',strval($order_id)),strval($order_id),$amount,$currency);\n\t}\n\n\treturn $object->make_cart_transaction_button($items,$currency,$order_id);\n}", "function change_order(){\n\t\tinclude_once(ABSPATH . \"acc/counter.php\");\n\t\t//global $the_order;\n\t\tglobal $wpdb;\n\t\tglobal $pre_lines;\n\t\tglobal $pre_order_id;\n\t\t$order_change = 0;\n\t\t$order_id = absint( $_POST['order_id'] );\n if ( $order_id == '' ){\n $order_id = $pre_order_id;\n }\n\n\t\t// Parse the jQuery serialized items\n\t\t$items = array();\n\t\tparse_str( $_POST['items'], $items );\n\t\t$order = wc_get_order( $order_id );\n\t\t$data = get_post_meta( $order_id );\n\n\t\t// Get the payment gateway\n\t\t$payment_gateway = wc_get_payment_gateway_by_order( $order );\n\n\t\t// Get line items\n\t\t$line_items = $order->get_items( apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) );\n\t\t$line_items_fee = $order->get_items( 'fee' );\n\t\t$line_items_shipping = $order->get_items( 'shipping' );\n\n\t\tif ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {\n\t\t\t$order_taxes = $order->get_taxes();\n\t\t\t$tax_classes = array_filter( array_map( 'trim', explode( \"\\n\", get_option( 'woocommerce_tax_classes' ) ) ) );\n\t\t\t$classes_options = array();\n\t\t\t$classes_options[''] = __( 'Standard', 'woocommerce' );\n\n\t\t\tif ( $tax_classes ) {\n\t\t\t\tforeach ( $tax_classes as $class ) {\n\t\t\t\t\t$classes_options[ sanitize_title( $class ) ] = $class;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Older orders won't have line taxes so we need to handle them differently :(\n\t\t\t$tax_data = '';\n\t\t\tif ( $line_items ) {\n\t\t\t\t$check_item = current( $line_items );\n\t\t\t\t$tax_data = maybe_unserialize( isset( $check_item['line_tax_data'] ) ? $check_item['line_tax_data'] : '' );\n\t\t\t} elseif ( $line_items_shipping ) {\n\t\t\t\t$check_item = current( $line_items_shipping );\n\t\t\t\t$tax_data = maybe_unserialize( isset( $check_item['taxes'] ) ? $check_item['taxes'] : '' );\n\t\t\t} elseif ( $line_items_fee ) {\n\t\t\t\t$check_item = current( $line_items_fee );\n\t\t\t\t$tax_data = maybe_unserialize( isset( $check_item['line_tax_data'] ) ? $check_item['line_tax_data'] : '' );\n\t\t\t}\n\n\t\t\t$legacy_order = ! empty( $order_taxes ) && empty( $tax_data ) && ! is_array( $tax_data );\n\t\t\t$show_tax_columns = ! $legacy_order || sizeof( $order_taxes ) === 1;\n\t\t}\n\t\t$counter = new Counter;\n\t\t$the_order = wc_get_order( $order_id );\n\t\t$user_info = get_userdata( $the_order->user_id );\n\t\t$username = $user_info->user_login;\n\t\t$order_date = date_parse($the_order->order_date);\n\t\t//$vendors = get_vendors( $the_order );\n\t\t$delim = '*';\n\t\t$eoldelim = \"~\\r\\n\";\n\t\t\t$StringToWrite = \"ISA\" . $delim . \"00\" . $delim . ' ' . $delim . \"00\" . $delim . ' ' . $delim;\n\t\t\t$StringToWrite .= 'ZZ' . $delim . str_pad(\"HAWSUSA\", 15) . $delim . \"01\" . $delim . str_pad(\"005211974\", 15) . $delim;\n\t\t\t$StringToWrite .= date(\"ymd\") . $delim . date(\"Hi\") . $delim . 'U' . $delim . '00401' . $delim . str_pad($counter->increment('ISA'),9,'0', STR_PAD_LEFT) . $delim;\n\t\t\t$StringToWrite .= '0' . $delim . 'P' . $delim . '>' . $eoldelim;\n\t\t\t$StringToWrite .=\t\"GS\" . $delim . \"PC\" . $delim . \"HAWSUSA\" . $delim . \"005211974\" . $delim;\n\t\t\t$StringToWrite .= date(\"Ymd\") . $delim . date(\"Hi\") . $delim . $counter->increment('GS') . $delim . 'X' . $delim . '004010' . $eoldelim;\n\t\t\t\n\t\t\t$StringToWrite .= \"ST\" . $delim . \"860\" . $delim . str_pad($counter->increment('ST'),4,'0', STR_PAD_LEFT) . $eoldelim;\n\t\t\t\n\t\t\t$StringToWrite .= \"BCH\" . $delim . '04' . $delim . 'SA' . $delim . $order_id . $delim . '' . $delim . '1' . $delim . $order_date['year'] . str_pad($order_date['month'],2,'0', STR_PAD_LEFT) . str_pad($order_date['day'],2,'0', STR_PAD_LEFT) . $delim . '' . $delim . '' . $delim . '' . $delim . '' . $delim . date(\"Ymd\") . $eoldelim;\n\t\t\t$StringToWrite .= \"REF\" . $delim . 'IA' . $delim . '0002835697' . $eoldelim;\n\t\t\t\n\t\t\t// Ship To / Bill To---------------------------------------------------------------------------------------------\n\t\t\t$StringToWrite .= \"N1\" . $delim . 'ST' . $delim . $the_order->shipping_first_name . ' ' . $the_order->shipping_last_name . $eoldelim;\n\t\t\t$StringToWrite .= \"N3\" . $delim . $the_order->shipping_address_1;\n\t\t\t$the_order->shipping_address_2 != '' ? $StringToWrite .= $delim . $the_order->shipping_address_2 . $eoldelim : $StringToWrite .= $eoldelim;\n\t\t\t$StringToWrite .= \"N4\" . $delim . $the_order->shipping_city . $delim . $the_order->shipping_state. $delim . $the_order->shipping_postcode . $eoldelim;\n\t\t\t/*\n\t\t\t$StringToWrite .= \"N1\" . $delim . 'BT' . $delim . $the_order->billing_first_name . ' ' . $the_order->billing_last_name . $eoldelim;\n\t\t\t$StringToWrite .= \"N3\" . $delim . $the_order->billing_address_1;\n\t\t\t$the_order->billing_address_2 != '' ? $StringToWrite .= $delim . $the_order->billing_address_2 . $eoldelim : $StringToWrite .= $eoldelim;\n\t\t\t$StringToWrite .= \"N4\" . $delim . $the_order->billing_city . $delim . $the_order->billing_state. $delim . $the_order->billing_postcode . $eoldelim;\n */\n //-------------------------------------------------------------------------------------------------------------------\n\t\t\t// Line Items--------------------------------------------------------------------------------------------------------\n\t\t\ttry{\n\t\t\t\t$connection = new mysqli('localhost', 'orders_admin', 'orderspass', 'orders');\n\t\t\t} catch (Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t\t$linesTotal = 0;\n $ITRitems = $the_order->get_items();\n foreach( $ITRitems as $item ){\n $found = FALSE;\n foreach( $pre_lines as $pre_item ){\n if($item['variation_id'] == $pre_item['variation_id']){\n if( $item['qty'] != $pre_item['qty'] ){\n $product_id = $item['variation_id'];\n $_product = apply_filters( 'woocommerce_order_item_product', $the_order->get_product_from_item( $item ), $item );\n $price = get_post_meta($product_id, '_regular_price', true);\n $StringToWrite .= 'POC' . $delim . absint($linesTotal + 1) . $delim . 'PQ' . $delim . absint( $item['qty'] ) . $delim . absint( $item['qty'] ) . $delim . 'EA' . $delim . $price . $delim;\n $StringToWrite .= 'UP' . $delim;\n $StringToWrite .= get_post_meta($product_id, '_upc', true);\n $StringToWrite .= $eoldelim;\n $description = substr($description, 0, 79);\n if($description != ''){ $StringToWrite .= 'PID' . $delim . 'F' . $delim . '' . $delim . '' . $delim . '' . $delim . str_replace(\"\\n\", '', $description) . $eoldelim; }\n $linesTotal++;\n $order_change = 1;\n }\n $found = TRUE;\n }\n }\n if ( ! $found ){\n //ADDED\n $product_id = $item['variation_id'];\n $_product = apply_filters( 'woocommerce_order_item_product', $the_order->get_product_from_item( $item ), $item );\n $price = get_post_meta($product_id, '_regular_price', true);\n $StringToWrite .= 'POC' . $delim . absint($linesTotal + 1) . $delim . 'AI' . $delim . absint( $item['qty'] ) . $delim . absint( $item['qty'] ) . $delim . 'EA' . $delim . $price . $delim;\n $StringToWrite .= 'UP' . $delim;\n $StringToWrite .= get_post_meta($product_id, '_upc', true);\n $StringToWrite .= $eoldelim;\n $linesTotal++;\n $order_change = 1;\n }\n }\n foreach( $pre_lines as $pre_item ){\n $found = FALSE;\n foreach( $ITRitems as $item ){\n if ( $item['variation_id'] == $pre_item['variation_id'] ){\n $found = TRUE;\n }\n }\n if ( ! $found ){\n //DELETED\n $product_id = $item['variation_id'];\n $_product = apply_filters( 'woocommerce_order_item_product', $the_order->get_product_from_item( $pre_item ), $pre_item );\n $price = get_post_meta($product_id, '_regular_price', true);\n $StringToWrite .= 'POC' . $delim . absint($linesTotal + 1) . $delim . 'DI' . $delim . '0' . $delim . '0' . $delim . 'EA' . $delim . $price . $delim;\n $StringToWrite .= 'UP' . $delim;\n $StringToWrite .= get_post_meta($product_id, '_upc', true);\n $StringToWrite .= $eoldelim;\n $linesTotal++;\n $order_change = 1;\n }\n }\n\t\t\t$StringToWrite .= \"CTT\" . $delim . $linesTotal . $eoldelim;\n\t\t\tob_start();\n\t\t\tvar_dump($pre_lines, $the_order->get_items());\n\t\t\t$tmp = ob_get_clean();\n\t\t\t//-------------------------------------------------------------------------------------------------------------------\n\t\t\t$a=0;\n\t\t\t$textAr = explode($eoldelim, $StringToWrite);\n\t\t\tforeach ($textAr as $i) {\n\t\t\t\t$a++;\n\t\t\t}\n\t\t\t$a = $a-2;\n\t\t\t$StringToWrite .= \"SE\" . $delim . $a . $delim . str_pad($counter->getCounter('ST'),4,'0', STR_PAD_LEFT) . $eoldelim;\t\t\n\t\t\t$StringToWrite .= \"GE\" . $delim . '1' . $delim . $counter->getCounter('GS') . $eoldelim;\n\t\t\t$StringToWrite .= \"IEA\" . $delim . '1' . $delim . str_pad($counter->getCounter('ISA'),9,'0', STR_PAD_LEFT) . $eoldelim;\n\t\tif($order_change == 1){ \n\t\t\t$filetowrite = \"/home/strongbo/public_html/\" . 'haws2' . '/outToSB/' . $username . \"-\" . date(\"md-Hms\") . \".860\";\n\t\t\t$fh = fopen($filetowrite,'w') or die(\"Can't open file\");\n\t\t\tfwrite($fh, $StringToWrite);\n\t\t\tfclose($fh);\n\t\t\t$filetowrite = \"/home/strongbo/docs/edi/\" . $counter->increment('doccounter');\n\t\t\t$fh = fopen($filetowrite,'w') or die(\"Can't open file\");\n\t\t\tfwrite($fh, $StringToWrite);\n\t\t\tfclose($fh);\n\t\t\t /* Make connection to database */ \n\t\t\t$ordersConnection = mysql_connect('localhost', 'orders_admin', 'orderspass') or die(mysql_error());\n\t\t\tmysql_select_db('orders', $ordersConnection) or die(mysql_error());\n\t\t\t$q2 = \"INSERT INTO orders_status (associated_order, order_status, edi_file, sequence_num, user) \"\n\t\t\t. \"VALUES ('\". $order_id .\"', 'Order Changed', '\".$counter->getCounter('doccounter').\"', '1', '\" . $username . \"')\";\n\t\t\t$newResult = mysql_query($q2, $ordersConnection); \n\t\t\tmysql_close($ordersConnection);\n\t\t}\n\t\t return $StringToWrite;\n\t\t\n\t}", "function mje_render_order_button($mjob_post, $text = '') {\n\t$disable_class = 'mjob-order-action';\n\tif (in_array($mjob_post->post_status, array('pause', 'pending', 'draft', 'reject', 'archive'))) {\n\t\t$disable_class = 'mjob-order-disable';\n\t}\n\t$text = !empty($text) ? $text : __('ORDER NOW', 'enginethemes');\n\t$price_mjob = mje_shorten_price(mje_get_price_after_commission_for_buyer($mjob_post->et_budget));\n\t?>\n <button class=\"<?php mje_button_classes(array('btn-order', 'waves-effect', 'waves-light'))?> <?php echo $disable_class; ?>\" >\n <?php echo sprintf(__('%s (<span class=\"mjob-price mje-price-text\">%s</span>)', 'enginethemes'), $text, $price_mjob); ?>\n </button>\n <?php\n}", "public function add_actions() {\n // Add the menu screen for inserting license information\n add_action( 'admin_menu', array( $this, 'add_license_settings_page' ), 150 );\n add_action( 'admin_init', array( $this, 'register_license_settings' ) );\n add_action( 'admin_init', array( $this, 'activate_license' ) );\n add_action( 'admin_init', array( $this, 'deactivate_license' ) );\n add_action( 'admin_init', array( $this, 'delete_license' ) );\n add_action( 'admin_notices', array( $this, 'admin_notices' ) );\n\n add_action( 'fa_render_licenses_form', array( $this, 'render_license_form' ) );\n\n add_action( \"site_transient_update_plugins\", array( $this, 'update_plugins' ), 10, 2 );\n add_action( \"in_plugin_update_message-{$this->plugin}\", array( $this, 'update_notice' ) );\n }", "function mce_buttons($buttons) {\n\t\t\t\tarray_push( $buttons, 'separator', 'wikinvestStockQuotes' );\t\n\t\t\t\treturn $buttons;\n\t\t\t}", "function addMoreActionsButtons($parameters, &$object, &$action, $hookmanager)\n\t{\n\t\tglobal $conf;\n\n\t\t$TContexts = explode(':', $parameters['context']);\n\n\t\t// Add more cols on card lines table\n\t\t$this->addMoreColsOnCardTable($parameters, $object, $action, $hookmanager);\n\n\n\t\tif (in_array('ordersuppliercard', $TContexts)) {\n\t\t\t$id = GETPOST('id');\n\t\t\t$targetUrl = dol_buildpath('/dispatch/reception.php', 2) . '?id=' . $id;\n\t\t\t?>\n\t\t\t<script>\n\t\t\t\t$(document).ready(function () {\n\t\t\t\t\t$('a[href*=\"fourn/commande/dispatch.php\"]').attr('href', '<?php print dol_escape_js($targetUrl, 1); ?>');\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\n\t\tif (in_array('expeditioncard', $TContexts) && $object->statut == Expedition::STATUS_VALIDATED && !empty($conf->global->DISPATCH_BLOCK_SHIPPING_CLOSING_IF_PRODUCTS_NOT_PREPARED)) {\n\t\t\tif (!defined('INC_FROM_DOLIBARR'))\n\t\t\t\tdefine('INC_FROM_DOLIBARR', true);\n\t\t\tdol_include_once('/dispatch/config.php');\n\t\t\tdol_include_once('/dispatch/lib/dispatch.lib.php');\n\n\t\t\tlist($canBeClosed, $msg) = dispatch_shipment_can_be_closed($object);\n\n\t\t\tif (empty($canBeClosed)) {\n\t\t\t\tglobal $langs;\n\n\t\t\t\t$langs->load('dispatch@dispatch');\n\n\t\t\t\t$message = dol_escape_js($langs->transnoentities('ShipmentCannotBeClosed', $msg), 1);\n\t\t\t\t?>\n\t\t\t\t<script>\n\t\t\t\t\t$(document).ready(function () {\n\t\t\t\t\t\t$('a.butAction[href*=action\\\\=classifyclosed]').removeClass('butAction').addClass('butActionRefused').prop('href', '#').prop('title', '<?php echo $message; ?>');\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "public function hookDisplayProductActions(array $params)\n {\n $this->smarty->assign([\n 'blockwishlist' => $this->displayName,\n 'url' => $this->context->link->getModuleLink('blockwishlist', 'action', ['action' => 'deleteProductFromWishlist']),\n ]);\n\n return $this->fetch('module:blockwishlist/views/templates/hook/product/add-button.tpl');\n }", "private static function hooks() {\r\n\t\t// Define meta fields to hide from user\r\n\t\tadd_filter( 'woocommerce_hidden_order_itemmeta', array( __CLASS__, 'hide_order_item_meta' ), 10, 1 );\r\n\r\n\t\tif ( version_compare( WOOCOMMERCE_VERSION, '2.2', '>=' ) ) {\r\n\t\t\t// Sets correct shipping tax total for newly created order\r\n\t\t\tadd_action( 'woocommerce_order_add_shipping', array( __CLASS__, 'add_shipping_tax' ), 12, 3 );\r\n\t\t\r\n\t\t\t// Sets tax totals for the WooTax tax item ID\r\n\t\t\tadd_action( 'woocommerce_order_add_tax', array( __CLASS__, 'add_order_tax_rate' ), 12, 3 );\r\n\t\t} else {\r\n\t\t\t// Store tax item ID (2.1.x)\r\n\t\t\tadd_action( 'woocommerce_checkout_update_order_meta', array( __CLASS__, 'store_tax_item_id' ), 10, 1 );\r\n\t\t}\r\n\r\n\t\t// Add WooTax meta when order is created\r\n\t\tadd_action( 'woocommerce_new_order', array( __CLASS__, 'add_order_meta' ), 10, 1 );\r\n\r\n\t\t// Add meta to order items when order is created\r\n\t\tadd_action( 'woocommerce_add_order_item_meta', array( __CLASS__, 'add_cart_item_meta' ), 10, 3 );\r\n\t\tadd_action( 'woocommerce_add_order_fee_meta', array( __CLASS__, 'add_fee_meta' ), 10, 4 );\r\n\t\tadd_action( 'woocommerce_add_shipping_order_item', array( __CLASS__, 'add_shipping_meta' ), 10, 3 );\r\n\r\n\t\t// Calculate taxes from \"Edit Order\" screen\r\n\t\tadd_action( 'wp_ajax_woocommerce_calc_line_taxes', array( __CLASS__, 'ajax_update_order_tax' ), 1 );\r\n\r\n\t\t// Calculate recurring taxes from \"Edit Order\" screen\r\n\t\tif ( WT_SUBS_ACTIVE ) {\r\n\t\t\tadd_action( 'wp_ajax_woocommerce_subscriptions_calculate_line_taxes', array( __CLASS__, 'ajax_update_recurring_tax' ), 1 );\r\n\t\t}\r\n\r\n\t\t// Send AuthorizedWithCapture request to TaxCloud when an order is marked as completed\r\n\t\tadd_action( 'woocommerce_order_status_completed', array( __CLASS__, 'capture_order' ), 10, 1 );\r\n\t\t\r\n\t\t// Send Returned request to TaxCloud when an order's status is changed to refunded or cancelled\r\n\t\tadd_action( 'woocommerce_order_status_refunded', array( __CLASS__, 'refund_order' ), 10, 1 );\r\n\t\tadd_action( 'woocommerce_order_status_cancelled', array( __CLASS__, 'refund_order' ), 10, 1 );\r\n\t}", "public function setup_actions() {\n\t\tadd_action( 'admin_menu', array( $this, 'action_admin_menu' ) );\n\t}", "function generate_buttons_code($order = null)\n\t{\t\n\t\tforeach ($this->arrKnownButtons as $button_name) {\n\t\t\t$defaultOrder[$button_name] = $this->pluginDefaultSettings[$button_name];\n\t\t}\n\t\t\n\t\t$order = wp_parse_args($order, $defaultOrder);\n\n\t\t// define empty buttons code to use\n\t\t$sse_buttonscode = ''; \n\n\t\t// get post permalink and title\n\t\t$permalink = is_front_page() ? get_bloginfo('url') : get_permalink();\n\t\t$title = get_the_title();\n\n\t\t//Sorting the buttons\n\t\t$arrButtons = array();\n\t\tforeach($this->arrKnownButtons as $button_name) {\n\t\t\tif(!empty($order[$button_name]) && (int)$order[$button_name] != 0) {\n\t\t\t\t$arrButtons[$button_name] = $order[$button_name];\n\t\t\t}\n\t\t}\n\t\t@asort($arrButtons);\n\n\t\t$arrButtonsCode = array();\n\t\tforeach($arrButtons as $button_name => $button_sort) {\t\t\n\t\t\tswitch($button_name) {\n\t\t\t\tcase 'googleplus':\n\t\t\t\t\t$arrButtonsCode[] = '<div class=\"simplesocialexpandable sse-button-googleplus\"><!-- Google Plus One--><div class=\"g-plusone\" data-size=\"medium\" data-href=\"'.$permalink.'\"></div></div>';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'fblike':\n\t\t\t\t\t$arrButtonsCode[] = '<div class=\"simplesocialexpandable sse-button-fblike\"><!-- Facebook like--><div id=\"fb-root\"></div><div class=\"fb-like\" data-href=\"'.$permalink.'\" data-send=\"false\" data-layout=\"button_count\" data-width=\"100\" data-show-faces=\"false\"></div></div>';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'twitter':\n\t\t\t\t\t$arrButtonsCode[] = '<div class=\"simplesocialexpandable sse-button-twitter\"><!-- Twitter--><a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-count=\"horizontal\" data-lang=\"en\" data-text=\"'.$title.'\" data-url=\"'.$permalink.'\" ' . ((!empty($this->settings['twitterusername'])) ? 'data-via=\"'.$this->settings['twitterusername'].'\" ' : '') . 'rel=\"nofollow\"></a></div>';\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'pinterest':\n\t\t\t\t\t\n\t\t\t\t\t$attachments = get_post($post->ID);\n\t\t\t\t\t$post_content = $attachments->post_content;\t\n\t\t\t\t\t\n\t\t\t\t\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post_content, $matches);\n \t\t\t\t\t$first_image = $matches[0][0];\n\t\t\t\t\tpreg_match_all('/(alt|title|src)=(\"[^\"]*\")/i',$first_image, $img);\n\t\t\t\t\n\t\t\t\t\t $atr_array = @array_combine($img[1], $img[2]);\n\t\t\t\t\t\n\t\t\t\t\t// Don't show 'Pin It' button, if post dont have thumbnail \n\t\t\t\t\tif (empty($atr_array)) break;\n\t\t\t\t\t\n\t\t\t\t\t$thumb_title = str_replace('\"', '',$atr_array['title']);\n\t\t\t\t\t$thumb_src = str_replace('\"', '',$atr_array['src']);\n\t\t\t\t\t$thumb_alt = str_replace('\"', '',$atr_array['alt']);\n\t\t\t\t\t// Getting thumbnail url\n\t\t\t\t\t$thumb_src = (isset($thumb_src)) ? $thumb_src : null;\n\t\t\t\t\t\n\t\t\t\t\t$thumb_alt = (isset($thumb_alt)) ? $thumb_alt : null;\n\t\t\t\t\t\n\t\t\t\t\t// if there isn't thumbnail alt, take a post title as a description\n\t\t\t\t\t$description = ($thumb_alt!=\"\") ? $thumb_alt.' '.$permalink : $thumb_title.' '.$permalink;\n\t\t\t\t\t\n\t\t\t\t\t$arrButtonsCode[] = '<div class=\"simplesocialexpandable sse-button-pinterest\"><!-- Pinterest--><a href=\"http://pinterest.com/pin/create/button/?url='.urlencode($permalink).'&media='.urlencode($thumb_src).'&description='.urlencode($description).'\" class=\"pin-it-button\" count-layout=\"horizontal\" rel=\"nofollow\"><img border=\"0\" src=\"//assets.pinterest.com/images/PinExt.png\" title=\"Pin It\" /></a></div>';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*****Google Plus Follow Button***********/\n\t\tif(!empty($this->settings['googlelink'])){\n\t\t\t$arrFollowButtonsCode[] = '<div class=\"simplesocialexpandable sse-followbutton-googleplus\"><!-- Place this code where you want the badge to render. --><a href=\"'.$this->settings['googlelink'].'?prsrc=3\" target=\"_blank\" rel=\"publisher\" style=\"text-decoration:none;\"><img src=\"'.plugins_url().'/simple-social-expandable/google.png\" alt=\"Google+\" /></a></div>';\n\t\t}\n\t\t\n\t\t/************ Youtube Link ***************/\n\t\tif(!empty($this->settings['youtubelink'])){\n\t\t\t$arrFollowButtonsCode[] = '<div class=\"simplesocialexpandable sse-followbutton-youtube\"><a href=\"'.$this->settings['youtubelink'].'\" target=\"_blank\"><img src=\"'.plugins_url().'/simple-social-expandable/youtube.png\" alt=\"Subscribe to me on YouTube\"/></a><img src=\"//www.youtube-nocookie.com/gen_204?feature=creators_cornier-//s.ytimg.com/yt/img/creators_corner/YouTube/40x40_yt_red.png\" style=\"display: none\"/></div>';\n\t\t}\n\t\t\n\t\t/******************Facebook Follow *****************/\n\t\tif(!empty($this->settings['facebooklink'])){\n\t\t\t$arrFollowButtonsCode[] = '<div class=\"simplesocialexpandable sse-followbutton-fblike\" ><!-- Facebook like--><a href=\"'.$this->settings['facebooklink'].'\" target=\"_blank\"><img src=\"'.plugins_url().'/simple-social-expandable/facebook.png\" alt=\"Facebook Follow\" /></a></div>';\n\t\t}\n\n\t\t/************ Twitter **************/\n\t\tif(!empty($this->settings['twitterusername'])){\n\t\t\t$arrFollowButtonsCode[] = '<div class=\"simplesocialexpandable sse-followbutton-twitter\"><!-- Twitter--><a href=\"https://twitter.com/'.$this->settings['twitterusername'].'\" target=\"_blank\"><tt><img src=\"'.plugins_url().'/simple-social-expandable/twitter.png\" alt=\"Twitter Follow\" /></tt></a></div>';\n\t\t}\n\t\t\n\t\t/**************** Pinterest ************/\n\t\tif(!empty($this->settings['pinterestlink'])){\n\t\t\t$arrFollowButtonsCode[] = '<div class=\"simplesocialexpandable sse-followbutton-pinterest\"><a href=\"'.$this->settings['pinterestlink'].'\" target=\"_blank\"><img src=\"'.plugins_url().'/simple-social-expandable/pinterest-icon.png\" alt=\"Pinterest\" /></a></div>';\n\t\t}\n\n\t\t$sse_buttonscode = '<div class=\"border-round\">';\n\t\tif(count($arrButtonsCode) > 0) {\n\t\t\t$sse_buttonscode .= '<div class=\"simplesocialexpandables\">';\n\t\t\t$sse_buttonscode .= implode(\"\", $arrButtonsCode);\n\t\t\tif($this->settings['follow_button']==0){\n\t\t\t\t$sse_buttonscode .= \"</div>\";\n\t\t\t}\n\t\t\tif($this->settings['follow_button']==1){\n\t\t\t\t$sse_buttonscode .= '<div class=\"simplesocialexpandable follow\" style=\"width:70px\"><a class=\"btnToggleplus\" href=\"javascript:void(0)\" class=\"slideToggle\" style=\"color:black;text-decoration:none;font-size:10px;\" >Follow Us</a>'.\"</div></div>\\n\";\n\t\t\t\t$sse_buttonscode .= '<div class=\"followsimplesocialexpandables\">'.\"\";\n\t\t\t\t$sse_buttonscode .= implode(\"\", $arrFollowButtonsCode) . \"\";\n\t\t\t\t$sse_buttonscode .= '</div>';\n\t\t\t}\n\t\t}else if($this->settings['follow_button']==1){\n\t\t\t$sse_buttonscode .= '<div class=\"simplesocialexpandables\" style=\"height:40px;\">'.\"\";\n\t\t\t$sse_buttonscode .= implode(\"\", $arrFollowButtonsCode) . \"\";\n\t\t\t$sse_buttonscode .= '</div>';\n\t\t}\n\t\t$sse_buttonscode .= '</div>';\n\t\t\n\t\treturn $sse_buttonscode;\n\t}", "function woocommerce_order_again_button($order)\n {\n }", "function hook_order_pane_alter(&$panes) {\n foreach ($panes as &$pane) {\n if ($pane['id'] == 'payment') {\n $pane['callback'] = 'my_custom_module_callback';\n }\n }\n}", "function addWPActions ()\n\t{\n\t\t//Admin Menu\n\t\tadd_action( 'init', array( $this, 'create_CPTs' ) );\n\n\t\t// Remove and add columns in the projects table\n\t\tadd_filter( 'manage_agreed-marking_posts_columns', array( $this, 'my_custom_post_columns' ), 10, 2 );\n\t\tadd_action('manage_agreed-marking_posts_custom_column', array($this, 'customColumnContent'), 10, 2);\n\n add_action( 'admin_menu', array( $this, 'create_AdminPages' ));\n\n add_action( 'save_post', array($this, 'savePostMeta' ), 10 );\n\n add_action( 'add_meta_boxes_agreed-marking', array( $this, 'addMetaBoxes' ));\n\n\n // Add duplicate options\n add_filter( 'post_row_actions', array($this, 'custom_quick_links'), 10, 2 );\n\n //Check for Duplciate\n add_action( 'plugins_loaded', array($this, 'checkForAgreedmarkingActions') );\n\n\n\n\t}", "function addWPActions ()\n\t{\n\t\t\n\t\t\n\t\t//Admin Menu\n\t\tadd_action( 'init', array( $this, 'create_CPT' ) );\n\t\t\n\t\t// Save additional meta for the custom post\n\t\tadd_action( 'save_post', array($this, 'savePostMeta' ), 10 );\n\t\t\n\t\t// Add metaboxes\n\t\tadd_action( 'add_meta_boxes_imperial_drawing', array( $this, 'addMetaBoxes' ));\n\t\t\n\t\t// Remove and add columns in the admin table\n\t\tadd_filter( 'manage_imperial_drawing_posts_columns', array( $this, 'my_custom_post_columns' ), 10, 2 );\t\t\n\t\tadd_action('manage_imperial_drawing_posts_custom_column', array($this, 'customColumnContent'), 10, 2);\t\n\t\t\n\n\t\t\t\t\t\t\n\t}", "function hook_order_pane() {\n $panes[] = array(\n 'id' => 'payment',\n 'callback' => 'uc_order_pane_payment',\n 'title' => t('Payment'),\n 'desc' => t('Specify and collect payment for an order.'),\n 'class' => 'pos-left',\n 'weight' => 4,\n 'show' => array('view', 'edit', 'customer'),\n );\n return $panes;\n}", "function wc_get_pay_buttons()\n {\n }", "function salesOrdersGridAction() {\n\t\t\t$this->_initWarehouse( );\n\t\t\t$this->_gridAction( 'sales_order', true );\n\t\t}", "function woo_prod_custom_bulk_admin_footer() {\r\n\t\t\tglobal $post_type;\r\n\r\n\t\t\tif($post_type == 'shop_order') {\r\n\t\t\t\t?>\r\n\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\t\t\t\tjQuery('<option>').val('prod_labels').text('<?php _e('Product Labels')?>').appendTo(\"select[name='action']\");\r\n\t\t\t\t\t\t\tjQuery('<option>').val('prod_labels').text('<?php _e('Product Labels')?>').appendTo(\"select[name='action2']\");\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t</script>\r\n\t\t\t\t<?php\r\n\t\t\t\t}\r\n\t\t}", "function _wpsc_theme_engine_v1_has_actions() {\n\n\t/**\n\t * A list of all actions used in the 1.0 theme engine templates.\n\t * If any of these are hooked into by plugins or the active theme, we load 1.0.\n\t *\n\t * @var array\n\t */\n\t$actions = array(\n\t\t'wpsc_start_display_user_log_form_fields',\n\t\t'wpsc_pre_purchase_logs',\n\t\t'wpsc_user_log_after_order_status',\n\t\t'wpsc_before_cart_widget_item_name',\n\t\t'wpsc_after_cart_widget_item_name',\n\t\t'wpsc_top_of_products_page',\n\t\t'wpsc_product_form_fields_begin',\n\t\t'wpsc_product_form_fields_end',\n\t\t'wpsc_theme_footer',\n\t\t'wpsc_product_before_description',\n\t\t'wpsc_product_addons',\n\t\t'wpsc_before_checkout_cart_row',\n\t\t'wpsc_before_checkout_cart_item_image',\n\t\t'wpsc_after_checkout_cart_item_image',\n\t\t'wpsc_before_checkout_cart_item_name',\n\t\t'wpsc_after_checkout_cart_item_name',\n\t\t'wpsc_after_checkout_cart_row',\n\t\t'wpsc_after_checkout_cart_rows',\n\t\t'wpsc_before_shipping_of_shopping_cart',\n\t\t'wpsc_before_form_of_shopping_cart',\n\t\t'wpsc_inside_shopping_cart',\n\t\t'wpsc_bottom_of_shopping_cart',\n\t\t'wpsc_additional_user_profile_links',\n\t\t'wpsc_user_profile_section_purchase_history',\n\t\t'wpsc_user_profile_section_edit_profile',\n\t\t'wpsc_user_profile_section_downloads',\n\t);\n\n\t/**\n\t * A list of all actions that are hooked into in core.\n\t * We don't actually want to load 1.0 if the only actions hooking into 1.0 templates are from core.\n\t *\n\t * @var array\n\t */\n\t$core_exceptions = array(\n\t\t'wpsc_start_display_user_log_form_fields' => 'wpsc_deprecated_filter_user_log_get',\n\t\t'wpsc_theme_footer' => 'wpsc_fancy_notifications',\n\t\t'wpsc_before_shipping_of_shopping_cart' => array( '_wpsc_calculate_shipping_quotes_before_product_page', '_wpsc_action_init_shipping_method' ),\n\t\t'wpsc_before_form_of_shopping_cart' => '_wpsc_shipping_error_messages',\n\t\t'wpsc_user_profile_section_purchase_history' => '_wpsc_action_purchase_history_section',\n\t\t'wpsc_user_profile_section_edit_profile' => '_wpsc_action_edit_profile_section',\n\t\t'wpsc_user_profile_section_downloads' => '_wpsc_action_downloads_section'\n\t);\n\n\t$has_actions = array();\n\n\tforeach ( $actions as $action ) {\n\n\t\tif ( isset( $core_exceptions[ $action ] ) ) {\n\n\t\t\tif ( is_array( $core_exceptions[ $action ] ) ) {\n\n\t\t\t\tforeach ( $core_exceptions[ $action ] as $core_hook ) {\n\t\t\t\t\t// Admitted hack until we build a better detection API.\n\t\t\t\t\t$priority = ( '_wpsc_calculate_shipping_quotes_before_product_page' == $core_hook ) ? 1 : 10;\n\t\t\t\t\tremove_action( $action, $core_hook, $priority );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tremove_action( $action, $core_exceptions[ $action ] );\n\n\t\t\t}\n\t\t}\n\n\t\tif ( has_action( $action ) ) {\n\t\t\t$has_actions[] = $action;\n\t\t}\n\t}\n\n\treturn $has_actions;\n}", "public function handleActions() {\n\t\tglobal $wpdb;\n\t\t\n\t\tif (isset($_GET['wc_action'])) {\n\t\t\tforeach ($this->tabs as $tabKey => $tabCaption) {\n\t\t\t\t$tabObject = $this->getTabObject($tabKey);\n\t\t\t\t$actionMethod = $_GET['wc_action'].'Action';\n\t\t\t\tif (method_exists($tabObject, $actionMethod)) {\n\t\t\t\t\t$tabObject->$actionMethod();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$redirURL = admin_url(\"options-general.php?page=\".self::MENU_SLUG).(isset($_GET['tab']) ? '#wc_tab='.urlencode($_GET['tab']) : '');\n\t\t\techo '<script type=\"text/javascript\">location.replace(\"' . $redirURL . '\");</script>';\n\t\t} else {\n\t\t\t$this->showUpdatedMessage();\n\t\t\t$this->showErrorMessage();\n\t\t}\n\t}", "public function bulk_admin_order_actions() {\n\t\tif( ! isset( $_GET['post'] ) || ! is_array( $_GET['post'] ) )\n\t\t\treturn;\n\n\t\t$wp_list_table = _get_list_table('WP_Posts_List_Table');\n\t\t$action = $wp_list_table->current_action();\n\n\t\tcheck_admin_referer( 'bulk-posts' );\n\n\t\t$sendback = admin_url();\n\n\t\tswitch( $action ) {\n\t\t\tcase 'svea_deliver':\n\n\t\t\t$orders_delivered = 0;\n\n\t\t\tforeach( $_GET['post'] as $post_id ) {\n\t\t\t\t$wc_order = new WC_Order( $post_id );\n\n\t\t\t\tif( is_null( $wc_order ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$svea_order_id = ( $value = get_post_meta( $wc_order->get_id(), \"_svea_order_id\", true ) ) \n\t\t\t\t\t? $value : wc_get_order_item_meta( $wc_order->get_id(), \"svea_order_id\" );\n\n\t\t if( ! $svea_order_id || strlen( $svea_order_id ) <= 0 ) {\n\t\t continue;\n\t\t }\n\n\t\t\t\t$payment_method_id = $wc_order->get_payment_method();\n\n\t\t\t\tif( $payment_method_id === WC_Gateway_Svea_Card::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Card::init()->deliver_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Invoice::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Invoice::init()->deliver_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Part_Pay::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Part_Pay::init()->deliver_order( $wc_order, $svea_order_id );\n\t\t\t\t} else\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif( is_array( $response ) && isset( $response[\"success\"] ) && $response[\"success\"] )\n\t\t\t\t\t++$orders_delivered;\n\t\t\t}\n\n\t\t\tif( $orders_delivered > 0 ) {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\tsprintf( _n( 'Delivered %s order', 'Delivered %s orders', $orders_delivered, self::PLUGIN_SLUG ), $orders_delivered )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\t__( 'No orders were delivered', self::PLUGIN_SLUG )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$sendback = admin_url( 'edit.php?post_type=shop_order' );\n\n\t\t\tbreak;\n\t\t\tcase 'svea_cancel':\n\n\t\t\t$orders_cancelled = 0;\n\n\t\t\tforeach( $_GET['post'] as $post_id ) {\n\t\t\t\t$wc_order = new WC_Order( $post_id );\n\n\t\t\t\tif( is_null( $wc_order ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$svea_order_id = ( $value = get_post_meta( $wc_order->get_id(), \"_svea_order_id\", true ) ) \n\t\t\t\t\t? $value : wc_get_order_item_meta( $wc_order->get_id(), \"svea_order_id\" );\n\n\t\t if( ! $svea_order_id || strlen( $svea_order_id ) <= 0 ) {\n\t\t continue;\n\t\t }\n\n\t\t $payment_method_id = $wc_order->get_payment_method();\n\n\t\t\t\tif( $payment_method_id === WC_Gateway_Svea_Card::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Card::init()->cancel_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Invoice::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Invoice::init()->cancel_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Part_Pay::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Part_Pay::init()->cancel_order( $wc_order, $svea_order_id );\n\t\t\t\t} else\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif( is_array( $response ) && isset( $response[\"success\"] ) && $response[\"success\"] )\n\t\t\t\t\t++$orders_cancelled;\n\t\t\t}\n\n\t\t\tif( $orders_cancelled > 0 ) {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\tsprintf( _n( 'Cancelled %s order', 'Cancelled %s orders', $orders_cancelled, self::PLUGIN_SLUG ), $orders_cancelled )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\t__( 'No orders were cancelled', self::PLUGIN_SLUG )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$sendback = admin_url( 'edit.php?post_type=shop_order' );\n\n\t\t\tbreak;\n\t\t\tcase 'svea_credit':\n\n\t\t\t$orders_credited = 0;\n\n\t\t\tforeach( $_GET['post'] as $post_id ) {\n\t\t\t\t$wc_order = new WC_Order( $post_id );\n\n\t\t\t\tif( is_null( $wc_order ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$svea_order_id = ( $value = get_post_meta( $wc_order->get_id(), \"_svea_order_id\", true ) ) \n\t\t\t\t\t? $value : wc_get_order_item_meta( $wc_order->get_id(), \"svea_order_id\" );\n\n\t\t if( ! $svea_order_id || strlen( $svea_order_id ) <= 0 ) {\n\t\t continue;\n\t\t }\n\n\t\t $payment_method_id = $wc_order->get_payment_method();\n\n\t\t\t\tif( $payment_method_id === WC_Gateway_Svea_Card::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Card::init()->credit_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Invoice::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Invoice::init()->credit_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Direct_Bank::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Direct_Bank::init()->credit_order( $wc_order, $svea_order_id );\n\t\t\t\t} else\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif( is_array( $response ) && isset( $response[\"success\"] ) && $response[\"success\"] )\n\t\t\t\t\t++$orders_credited;\n\t\t\t}\n\n\t\t\tif( $orders_credited > 0 ) {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\tsprintf( _n( 'Credited %s order', 'Credited %s orders', $orders_credited, self::PLUGIN_SLUG ), $orders_credited )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\t__( 'No orders were credited', self::PLUGIN_SLUG )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$sendback = admin_url( 'edit.php?post_type=shop_order' );\n\n\t\t\tbreak;\n\t\t\tdefault: return;\n\t\t}\n\n\t\twp_redirect( $sendback );\n\n\t\texit;\n\t}", "function template_manual_pm_actions()\n{\n\t// TODO : Write this.\n}", "function mb_filter_views_edit_shop_order($data){ \n\t\n\t$new_order = array(\n\t\t'all' => $data['all'],\n\t\t'wc-processing' => $data['wc-processing'],\n\t\t'wc-completed' => $data['wc-completed'],\n\t\t'wc-cancelled' => $data['wc-cancelled'],\n\t\t'wc-refunded' => refunded($data['wc-refunded']),\n\t\t'wc-failed' => wc_failed($data['wc-failed']),\n\t\t'wc-pending' => wc_pending($data['wc-pending']),\n\t\t'wc-on-hold' => $data['wc-on-hold'],\n\t\t'trash' => $data['trash']\n\t);\n\treturn $new_order;\n}", "private\tfunction setup_actions() {\r\n\t\t\r\n\t\tadd_action( 'admin_menu', array( $this, 'menus' ) );\r\n\t\tadd_action( 'init', array( $this, 'load_plugin_textdomain' ) );\r\n\t\t\r\n\t}", "protected function register_actions(){\n\t\tadd_action(\"widgets_init\", array($this, \"action_register_widgets\"));\n\t\tadd_action(\"admin_menu\", array($this, \"action_menu_declutter\"), 9999);\n\t}", "function listOrders() {\n\t\t$delete = t3lib_div :: _GP(\"delete\");\n\t\t$del_order = t3lib_div :: _GP(\"del_order\");\n\t\t$complete = t3lib_div :: _GP(\"complete\");\n\t\t$pageNumber = t3lib_div :: _GP(\"pageNumber\");\n\t\t$orderId = t3lib_div :: _GP(\"orderId\");\n\t\t$ordersubmit = t3lib_div :: _GP(\"ordersubmit\");\n\t\t$order = t3lib_div :: _GP(\"order\");\n\n\t\tif ($pageNumber == \"\")\n\t\t\t$pageNumber = 1;\n\n\t\tif ($delete) {\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_extendedshop_orders', 'uid=' . $del_order . ' AND deleted<>1', '', '', '');\n\t\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tt_content', 'pid=' . $row[\"pid\"]);\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery('pages', 'uid=' . $row[\"pid\"]);\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_extendedshop_orders', 'uid=' . $del_order);\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_extendedshop_rows', 'ordercode=' . $del_order);\n\t\t}\n\t\tif ($complete) {\n\t\t\t$updateFields[\"complete\"] = \"1\";\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_extendedshop_orders', 'uid=' . $orderId, $updateFields);\n\t\t}\n\t\tif (isset ($ordersubmit)) {\n\t\t\tforeach ($order as $key => $value) {\n\t\t\t\t$updateField[\"status\"] = $value[\"status\"];\n\t\t\t\t$updateField[\"ordernote\"] = $value[\"ordernote\"];\n\t\t\t\t$data = explode(\"-\", $value[\"deliverydate\"]);\n\t\t\t\tif ($data[0] > 0 && $data[0] < 13 && $data[1] > 0 && $data[1] < 32 && $data[2] > 1970 && $data[2] < 2200)\n\t\t\t\t\t$deliveryDate = mktime(0, 0, 0, $data[0], $data[1], $data[2]);\n\t\t\t\telse\n\t\t\t\t\t$deliveryDate = 0;\n\t\t\t\t$updateField[\"deliverydate\"] = $deliveryDate;\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_extendedshop_orders', 'uid=' . $key, $updateField);\n\t\t\t}\n\t\t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_extendedshop_orders', 'complete<>1 AND deleted<>1', 'date DESC', '', '');\n\n\t\t$num_orders = $GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\t// NUMERO DI ORDINI PER PAGINA\n\t\t$num_orders_for_page = $this->num_orders_for_page;\n\n\t\t// Numero di pagine\n\t\t$num_pages = ceil($num_orders / $num_orders_for_page);\n\n\t\t$content = \"<form name='ordermanagement' method='post'><table width=100% padding=3>\";\n\n\t\t$pageLink = \"<a href='index.php?id=0&pageNumber=all&SET[function]=2'>show all</a> |\";\n\t\tfor ($i = 1; $i <= $num_pages; $i++) {\n\t\t\tif ($i == $pageNumber) {\n\t\t\t\t$pageLink .= \" <b>\" . $i . \"</b>\";\n\t\t\t} else {\n\t\t\t\t$pageLink .= \" <a href='index.php?id=0&pageNumber=\" . $i . \"&SET[function]=2'>\" . $i . \"</a>\";\n\t\t\t}\n\t\t}\n\t\t$content .= \"<tr><td colspan='7' align='right'>\" . $pageLink . \"</td></tr>\";\n\t\t$content .= \"<tr><td colspan=7><hr /></td></tr>\";\n\t\t$content .= \"<tr><td><b>Number</b></td><td><b>Order date</b></td><td><b>Customer name</b></td><td><b>Shipping</b></td><td><b>Payment</b></td><td align=right><b>Total</b></td><td></td></tr>\";\n\t\t$content .= \"<tr><td colspan=7><hr /></td></tr>\";\n\n\t\t// Scarta i primi ordini se sono in pagine successive\n\t\tif ($pageNumber != \"all\" && $pageNumber > 1) {\n\t\t\tfor ($i = 0; $i < ($pageNumber -1) * $num_orders_for_page; $i++) {\n\t\t\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t\t}\n\t\t} else\n\t\t\tif ($pageNumber == \"all\") {\n\t\t\t\t$num_orders_for_page = $num_orders;\n\t\t\t}\n\n\t\t// Prepara la select per gli stati degli ordini\n\t\t$resStatus = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_extendedshop_status', 'sys_language_uid=0 AND hidden<>1 AND deleted<>1', 'priority ASC', '', '');\n\t\t$selectStatus = \"<select name='order[###UID###][status]'>\";\n\t\twhile ($rowStatus = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resStatus)) {\n\t\t\t$selectStatus .= \"<option value='\" . $rowStatus[\"uid\"] . \"'###\" . $rowStatus[\"uid\"] . \"###>\" . $rowStatus[\"status\"] . \"</option>\";\n\t\t}\n\t\t$selectStatus .= \"</select>\";\n\n\t\t//while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t\t{\n\t\tfor ($i = 0; $i < $num_orders_for_page && $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); $i++) {\n\t\t\t$resUser = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_users', 'uid=' . $row['customer'], '', '', '');\n\t\t\t$rowUser = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resUser);\n\n\t\t\t$totalProducts = 0;\n\t\t\t$resProd = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_extendedshop_rows', 'ordercode=' . $row[\"uid\"], '', '', '');\n\t\t\twhile ($rowProd = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resProd)) {\n\t\t\t\t$totalProducts += $rowProd[\"price\"] * $rowProd[\"quantity\"];\n\t\t\t}\n\t\t\t$priceShipping = trim(substr($row[\"shipping\"], strrpos($row[\"shipping\"], \"-\") + 1));\n\t\t\tif ($priceShipping == \"\")\n\t\t\t\t$priceShipping = \"0,00\";\n\t\t\t$pricePayment = trim(substr($row[\"payment\"], strrpos($row[\"payment\"], \"-\") + 1));\n\t\t\tif ($pricePayment == \"\")\n\t\t\t\t$pricePayment = \"0,00\";\n\t\t\t$totale = $this->priceFormat($totalProducts + $pricePayment + $priceShipping);\n\t\t\t$tot = $totalProducts + $pricePayment + $priceShipping;\n\t\t\t// Aggiorna il totale...\n\t\t\tif ($tot != $row['total']) {\n\t\t\t\t$update[\"total\"] = $tot;\n\t\t\t\t$resUpdate = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_extendedshop_orders', 'uid=' . $row[\"uid\"], $update);\n\t\t\t}\n\n\t\t\t// Gestione dello status\n\t\t\t$status = str_replace(\"###UID###\", $row[\"uid\"], $selectStatus);\n\t\t\t$status = str_replace(\"###\" . $row[\"status\"] . \"###\", \" selected\", $status);\n\t\t\t$status = ereg_replace(\"###[0-9]###\", '', $status);\n\n\t\t\tif ($i % 2 == 0)\n\t\t\t\t$color = \"#CCCCCC\";\n\t\t\telse\n\t\t\t\t$color = \"#FFFFFF\";\n\n\t\t\t$deliveryDate = $row[\"deliverydate\"];\n\t\t\tif ($deliveryDate == 0 || $deliveryDate == \"\") {\n\t\t\t\t$deliveryDate = mktime(0, 0, 0, date(\"m\", $row[\"date\"]), date(\"d\", $row[\"date\"]) + $this->daysToDelivery, date(\"Y\", $row[\"date\"]));\n\t\t\t}\n\t\t\tif ($deliveryDate < time())\n\t\t\t\t$colorAlert = \" style='background-color: #FF3333;'\";\n\t\t\telse\n\t\t\t\t$colorAlert = \"\";\n\n\t\t\t$content .= \"<tr style='background-color:\" . $color . \";'><td><b>\" . $row['code'] . \"</b></td><td>\" . date(\"d M Y - H:i:s\", $row['date']) . \"</td><td>\" . $rowUser['name'] . \"</td><td>\" . $row[\"shipping\"] . \"</td><td>\" . $row[\"payment\"] . \"</td><td align=right>\" . $this->currency . \" \" . $totale . \"</td>\";\n\t\t\tif ($row[\"tx_wfinvoice_num_fatture\"] == '') {\n\t\t\t\t$content .= \"<td><a href='index.php?id=0&delete=true&del_order=\" . $row['uid'] . \"&SET[function]=2' title='Delete' onClick='return displayConfirm(\\\"Delete order?\\\");'><img src='../res/delete.gif' border=0></a> <a href='index.php?id=0&complete=true&orderId=\" . $row['uid'] . \"&SET[function]=2' title='Complete' onClick='return displayConfirm(\\\"Order completed?\\\");'><img src='../res/check.gif' border=0></a></td>\";\n\t\t\t} else {\n\t\t\t\t$content .= \"<td></td>\";\n\t\t\t}\n\t\t\t$content .= \"</tr>\";\n\t\t\t$content .= \"<tr style='background-color:\" . $color . \";'><td></td><td colspan='2'>Order status: \" . $status . \"</td><td colspan='2'\" . $colorAlert . \">Expected delivery date: <input type='text' size='12' maxlength='10' name='order[\" . $row[\"uid\"] . \"][deliverydate]' value='\" . date(\"m-d-Y\", $deliveryDate) . \"'> <i>(mm-dd-yyyy)</i></td><td align=right></td><td><a href='../../../../index.php?id=\" . $row[\"pid\"] . \"' target=_blank><img src='../res/page.gif' border=0></a></td></tr>\";\n\t\t\t$content .= \"<tr style='vertical-align: top; background-color:\" . $color . \";'><td></td><td colspan='4'>Seller note:&nbsp;&nbsp; <textarea style='vertical-align:top;' cols='74' name='order[\" . $row[\"uid\"] . \"][ordernote]'>\" . $row[\"ordernote\"] . \"</textarea></td><td align=right></td><td></td></tr>\";\n\t\t\t$content .= \"<tr><td colspan=7><hr /></td></tr>\";\n\t\t}\n\t\t$content .= \"</table><br /><input type='submit' name='ordersubmit' value='Update'></form>\";\n\t\treturn $content;\n\t}", "function plugin_action_links( $actions, $plugin_file, $plugin_data, $context ) {\n \tif ( !current_user_can( 'manage_options' ) ) { return $actions; }\n\n $admin_url = admin_url( 'options-general.php?page=styles' );\n\n $actions[ sizeof( $actions ) ] = '<a href=\"' . $admin_url . '\" title=\"' . esc_html__( 'Styles Licenses', 'styles' ) . '\">' . esc_html__( 'Licenses', 'styles' ) . '</a>';\n \n return $actions;\n }", "public static function actions()\n\t{\n\t\tadd_action('admin_init', function() {\n\t\t\tif ( !is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n\t\t\t\tdeactivate_plugins('cgp-test/cgp-test.php');\n\t\t\t}\n\t\t});\n\n\t\t//Enqueue plugin js\n\t\tadd_action('wp_enqueue_scripts', [ __CLASS__, 'scripts' ]);\n\t}", "public function setup_actions() {\n\t\tadd_action( 'init', array( $this, 'register_strings' ) );\n\n\t\tadd_filter( 'theme_mod_cta-text', array( $this, 'pll__' ) );\n\t\tadd_filter( 'theme_mod_copyright', array( $this, 'pll__' ) );\n\t}", "protected function generateButtons() {}", "public function hookAdminItemsPanelButtons($args)\r\n\t{\r\n\t\t// item or adding a new item. When editing or duplicating, pressing the Cancel button takes the user back to\r\n\t\t// the Show page for the item. When adding a new item, it takes them to the Dashboard.\r\n\t\t$itemId = $args['record']->id;\r\n\t\t$url = $itemId ? 'items/show/' . $itemId : '.';\r\n\t\techo '<a href=' . html_escape(admin_url($url)) . ' class=\"big blue button\">' . __('Cancel') . '</a>';\r\n\t}", "function add_hooks() {\r\n #add_action(\"admin_head\", array(&$this, \"load_tiny_mce\"));\r\n add_action('admin_print_scripts', array(&$this, \"load_scripts\"));\r\n add_action('admin_print_styles', array(&$this, 'load_styles'));\r\n\r\n if (isset($this->actions['show_donate_box']) && $this->actions['show_donate_box']) {\r\n add_action('admin_footer', array(&$this, 'donate_popup'));\r\n }\r\n }", "function addWPActions ()\n\t{\n\t\t\n\t\t\n\t\t//Admin Menu\n\t\tadd_action( 'init', array( $this, 'create_CPT' ) );\t\t\n\t\t\n\t\t\n\t\t// Save additional meta for the custom post\n\t\tadd_action( 'save_post', array($this, 'savePostMeta' ), 10 );\n\t\t\n\t\t// Add metaboxes\n\t\tadd_action( 'add_meta_boxes_imperial_data', array( $this, 'addMetaBoxes' ));\n\t\t\n\t\n\t\t// Remove and add columns in the admin table\n\t\tadd_filter( 'manage_imperial_data_posts_columns', array( $this, 'my_custom_post_columns' ), 10, 2 );\t\t\n\t\tadd_action('manage_imperial_data_posts_custom_column', array($this, 'customColumnContent'), 10, 2);\t\n\t\t\n\t\t// Create Results Pages\n\t\tadd_action( 'admin_menu', array( $this, 'create_AdminPages' ));\n\t\t\t\t\n\n\t\t\t\t\t\t\n\t}", "public function add_admin_actions() {\n\t\t$icon_url = 'dashicons-googleplus';\n\t\t$position = ( ++$GLOBALS['_wp_last_utility_menu'] );\n\t\t\n\t\tadd_menu_page( __('Google API', 'googleapi'), 'Google API', 'manage_options', 'branzel_googleapi', array( $this, 'render_adminpage'), $icon_url, $position );\n\t}", "private function setup_actions() {\n\n if ( is_admin() ):\n // Add options page\n add_action( 'admin_menu', array( $this, '_hello_menu_page' ) );\n add_action( 'admin_init', array( $this, '_hellobar_meta_data' ) );\n add_action( 'save_post', array( $this, 'save_hellobar_data' ), 10, 2 );\n add_filter('user_can_richedit', array( $this, '_hellobar_disable_visual_editor') );\n\n endif;\n\n add_action( 'init', array( $this, '_hellobar_post_type' ), 0 );\n add_action( 'rss_item', array( $this, '_hellobar_rss_fields' ) );\n add_action( 'atom_entry', array( $this, '_hellobar_rss_fields' ) );\n add_action( 'rss2_item', array( $this, '_hellobar_rss_fields' ) );\n\n }", "function pre_change_order(){\n\t\tinclude_once(ABSPATH . \"acc/counter.php\");\n\t\t//global $the_order;\n\t\tglobal $wpdb;\n\t\t$order_id = absint( $_POST['order_id'] );\n if ( $order_id == '' ){\n $order_item_ids = $_POST['order_item_ids'];\n\n if ( ! is_array( $order_item_ids ) && is_numeric( $order_item_ids ) ) {\n $order_item_ids = array( $order_item_ids );\n }\n $item_id = $order_item_ids[0];\n $order_id = $wpdb->get_results(\"Select order_id from \" . $wpdb->prefix . \"woocommerce_order_items WHERE order_item_id='\".$item_id.\"';\", ARRAY_N)[0][0];\n }\n\t\t$the_order = wc_get_order( $order_id );\n\t\t$GLOBALS['pre_lines'] = $the_order->get_items();\n\t\t$GLOBALS['pre_order_id'] = $order_id;\n\t}", "protected function _addButtons()\n\t{\n\t\t$oUser = Core_Entity::factory('User', 0)->getCurrent();\n\n\t\t$iCreatorUserId = 0;\n\n\t\tif ($this->_object->id)\n\t\t{\n\t\t\t$aEvent_Users = $this->_object->Event_Users->findAll();\n\n\t\t\tforeach ($aEvent_Users as $oEvent_User)\n\t\t\t{\n\t\t\t\t// Идентификатор создателя дела\n\t\t\t\t$oEvent_User->creator && $iCreatorUserId = $oEvent_User->user_id;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$iCreatorUserId = $oUser->id;\n\t\t}\n\n\t\tif ($this->_object->id && $iCreatorUserId != $oUser->id)\n\t\t{\n\t\t\t// Кнопки\n\t\t\t$oAdmin_Form_Entity_Buttons = Admin_Form_Entity::factory('Buttons');\n\n\t\t\t$sOperaion = $this->_Admin_Form_Controller->getOperation();\n\t\t\t$sOperaionSufix = $sOperaion == 'modal'\n\t\t\t\t? 'Modal'\n\t\t\t\t: '';\n\n\t\t\tif ($sOperaionSufix == '')\n\t\t\t{\n\t\t\t\t// Кнопка Назад\n\t\t\t\t$oAdmin_Form_Entity_Button_Back = Admin_Form_Entity::factory('Button')\n\t\t\t\t\t->name('back')\n\t\t\t\t\t->class('btn btn-yellow')\n\t\t\t\t\t->value(Core::_('Event.back'))\n\t\t\t\t\t->onclick(\n\t\t\t\t\t\t$this->_Admin_Form_Controller->getAdminLoadAjax($this->_Admin_Form_Controller->getPath(), NULL, NULL, '')\n\t\t\t\t\t);\n\n\t\t\t\t$oAdmin_Form_Entity_Buttons->add($oAdmin_Form_Entity_Button_Back);\n\t\t\t}\n\n\t\t\t// Кнопка Применить\n\t\t\t$oAdmin_Form_Entity_Button_Apply = Admin_Form_Entity::factory('Button')\n\t\t\t\t->name('apply')\n\t\t\t\t->class('btn btn-palegreen')\n\t\t\t\t->type('submit')\n\t\t\t\t->value(Core::_('Admin_Form.apply'))\n\t\t\t\t->onclick(\n\t\t\t\t\t$this->_Admin_Form_Controller->getAdminSendForm(NULL, 'apply' . $sOperaionSufix)\n\t\t\t\t);\n\n\t\t\t$oAdmin_Form_Entity_Buttons->add($oAdmin_Form_Entity_Button_Apply);\n\t\t}\n\t\telseif ($this->_object->id && $iCreatorUserId == $oUser->id\n\t\t\t&& $this->_Admin_Form_Controller->getOperation() == 'modal')\n\t\t{\n\t\t\t$oAdmin_Form_Entity_Buttons = Admin_Form_Entity::factory('Buttons');\n\n\t\t\t$sOperaion = $this->_Admin_Form_Controller->getOperation();\n\t\t\t$sOperaionSufix = $sOperaion == 'modal'\n\t\t\t\t? 'Modal'\n\t\t\t\t: '';\n\n\t\t\t// Кнопка Сохранить\n\t\t\t$oAdmin_Form_Entity_Button_Save = Admin_Form_Entity::factory('Button')\n\t\t\t\t->name('save')\n\t\t\t\t->class('btn btn-blue')\n\t\t\t\t->value(Core::_('admin_form.save'))\n\t\t\t\t->onclick(\n\t\t\t\t\t$this->_Admin_Form_Controller->getAdminSendForm(NULL, 'save' . $sOperaionSufix)\n\t\t\t\t);\n\n\t\t\t$oAdmin_Form_Entity_Button_Apply = Admin_Form_Entity::factory('Button')\n\t\t\t\t->name('apply')\n\t\t\t\t->class('btn btn-palegreen')\n\t\t\t\t->type('submit')\n\t\t\t\t->value(Core::_('admin_form.apply'))\n\t\t\t\t->onclick(\n\t\t\t\t\t$this->_Admin_Form_Controller->getAdminSendForm(NULL, 'apply' . $sOperaionSufix)\n\t\t\t\t);\n\n\t\t\t// $windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t\t// Кнопка Удалить\n\t\t\t$oAdmin_Form_Entity_Button_Delete = Admin_Form_Entity::factory('Button')\n\t\t\t\t->name('markDeleted')\n\t\t\t\t->class('btn btn-darkorange pull-right')\n\t\t\t\t->type('submit')\n\t\t\t\t->value(Core::_('Admin_Form.delete'))\n\t\t\t\t->onclick(\n\t\t\t\t\t\"res = confirm('\" . Core::_('Admin_Form.confirm_dialog', htmlspecialchars(Core::_('Admin_Form.delete'))) . \"'); if (res) {\" . $this->_Admin_Form_Controller->getAdminSendForm(NULL, 'markDeleted') . \"} else { return false; }\"\n\t\t\t\t);\n\n\t\t\t$oAdmin_Form_Entity_Buttons\n\t\t\t\t->add($oAdmin_Form_Entity_Button_Save)\n\t\t\t\t->add($oAdmin_Form_Entity_Button_Apply)\n\t\t\t\t->add($oAdmin_Form_Entity_Button_Delete);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$oAdmin_Form_Entity_Buttons = TRUE;\n\t\t}\n\n\t\treturn $oAdmin_Form_Entity_Buttons;\n\t}", "function cta_arrow_register_mce_button( $buttons ) {\n array_push( $buttons, 'cta_arrow_mce_button' );\n return $buttons;\n}", "protected function set_hooks() {\n\t\t// Price conversion\n\t\tadd_filter('affwp_get_woocommerce_order', array($this, 'affwp_get_woocommerce_order'), 10, 2);\n\t}", "function theme_orders_page() {\n if(isset($_GET['action']) and $_GET['action'] == 'view-detail'){\n require_once 'class-orders-detail-list-table.php';\n\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Chi tiết đơn hàng</h2>\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPOrders_Detail_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</div>';\n }else{\n require_once 'class-orders-list-table.php';\n \n $product_id = 0;\n if(isset($_REQUEST['product_id']) and intval($_REQUEST['product_id']) > 0){\n $product_id = intval($_REQUEST['product_id']);\n }\n\n $btn2Excel = '<a class=\"button\" href=\"' . get_template_directory_uri() . '/export2excel.php'. (($product_id > 0) ? '?product_id=' . $product_id : '') .'\">Xuất ra Excel</a>';\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Danh sách đơn hàng $btn2Excel</h2>\n <ul class=\"subsubsub\">\nHTML;\n echo '<li><a class=\"', (!isset($_GET['status'])) ? 'current' : '' ,'\" href=\"?page=nvt_orders', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Chờ duyệt</a> | </li>';\n //echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == \"0\") ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=0', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Chờ duyệt</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == 1) ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=1', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Đã duyệt</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == 2) ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=2', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Đã hủy</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == \"all\") ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=all', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Tất cả</a></li>';\n echo <<<HTML\n </ul>\n <form action=\"\" method=\"get\">\n <input type=\"hidden\" name=\"page\" value=\"nvt_orders\" />\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPOrders_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</form></div>';\n }\n}", "public static function bulk_actions($actions){\n $actions['create_invoice'] = __('Bill');\n return $actions;\n }", "public function hookDisplayAdminOrderTabOrder($params)\n {\n if (version_compare(_PS_VERSION_, '1.7.7.4', '>=')) {\n $order = new Order($params['id_order']);\n } else {\n $order = $params['order'];\n }\n\n if ($order->module != 'stripe_official') {\n return;\n }\n\n return $this->display(__FILE__, 'views/templates/hook/admin_tab_order.tpl');\n }", "function woocommerce_button_proceed_to_checkout()\n {\n }", "function ccfm_init_actions() {\n //detect WooCommerce settings changes\n add_action( 'woocommerce_settings_saved', 'ccfm_clear_cache_for_woocommerce');\n \n if ( ccfm_option( 'btn_admin_bar', 1 ) == 1 ) {\n $needed_cap = ccfm_option( 'btn_cap', 'manage_options' );\n if ( current_user_can( $needed_cap ) || current_user_can( 'manage_options' ) ) {\n add_action( 'admin_bar_menu', 'ccfm_toolbar_link', 99 );\n }\n }\n\n do_action( 'ccfm_init_actions' );\n}", "public function setup_actions() {\n\n\t}", "protected function addToolbar() {\n require_once JPATH_COMPONENT . '/helpers/easysdi_shop.php';\n\n $state = $this->get('State');\n $canDo = Easysdi_shopAdminHelper::getActions($state->get('filter.category_id'));\n\n JToolBarHelper::title(JText::_('COM_EASYSDI_SHOP_TITLE_ORDERS'), 'orders.png');\n\n //Check if the form exists before showing the add/edit buttons\n $formPath = JPATH_COMPONENT_ADMINISTRATOR . '/views/order';\n \n if ($canDo->get('core.edit.state')) {\n\n if (isset($this->items[0]->state)) {\n JToolBarHelper::divider();\n } else if (isset($this->items[0])) {\n //If this component does not use state then show a direct delete button as we can not trash\n //JToolBarHelper::deleteList('', 'orders.delete','JTOOLBAR_DELETE');\n }\n\n // use delete\n JToolBarHelper::deleteList('', 'orders.delete', 'JTOOLBAR_DELETE');\n\n if (isset($this->items[0]->checked_out)) {\n JToolBarHelper::custom('orders.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);\n }\n }\n\n if ($canDo->get('core.admin')) {\n JToolBarHelper::preferences('com_easysdi_shop');\n }\n\n //Set sidebar action - New in 3.0\n JHtmlSidebar::setAction('index.php?option=com_easysdi_shop&view=orders');\n $this->extra_sidebar = '';\n\n // get order model\n $orderModel = JModelLegacy::getInstance('orders', 'Easysdi_shopModel', array());\n\n //add Filter ordertype INPUT\n $ordertypeList = $orderModel->getOrderTypes();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_ORDERTYPE'), 'filter_ordertype', JHtml::_('select.options', $ordertypeList, \"id\", \"value\", $this->state->get('filter.ordertype'), true)\n );\n\n //add Filter orderstate INPUT\n $orderstateList = $orderModel->getOrderStates();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_STATE'), 'filter_orderstate', JHtml::_('select.options', $orderstateList, \"id\", \"value\", $this->state->get('filter.orderstate'), true)\n );\n \n //add Filter order archived status INPUT\n $orderarchivedList = $orderModel->getOrderArchived();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_ARCHIVED'), 'filter_orderarchived', JHtml::_('select.options', $orderarchivedList, \"id\", \"value\", $this->state->get('filter.orderarchived'), true)\n );\n\n //add Filter orderuser INPUT\n $orderuserList = $orderModel->getOrderUsers();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_USER'), 'filter_orderuser', JHtml::_('select.options', $orderuserList, \"id\", \"name\", $this->state->get('filter.orderuser'), true)\n );\n \n //add Filter orderuserorganism INPUT\n $orderuserorganismList = $orderModel->getOrderUsersOrganisms();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_USER_ORGANISM'), 'filter_orderuserorganism', JHtml::_('select.options', $orderuserorganismList, \"id\", \"name\", $this->state->get('filter.orderuserorganism'), true)\n ); \n\n //add Filter orderprovider INPUT\n $orderproviderList = $orderModel->getOrderProviders();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_PROVIDER'), 'filter_orderprovider', JHtml::_('select.options', $orderproviderList, \"id\", \"name\", $this->state->get('filter.orderprovider'), true)\n );\n\n //add Filter diffusionName INPUT\n $orderdiffusion = $orderModel->getOrderDiffusion();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_DIFFUSION'), 'filter_orderdiffusion', JHtml::_('select.options', $orderdiffusion, \"id\", \"name\", $this->state->get('filter.orderdiffusion'), true)\n );\n\n //add Filter sent INPUT\n $ordersent = Easysdi_shopAdminHelper::getRangeOptions();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_SENT'), 'filter_ordersent', JHtml::_('select.options', $ordersent, \"value\", \"text\", $this->state->get('filter.ordersent'), true)\n );\n\n //add Filter completed INPUT\n $ordercompleted = Easysdi_shopAdminHelper::getRangeOptions();\n JHtmlSidebar::addFilter(\n JText::_('COM_EASYSDI_SHOP_FILTER_SELECT_ORDERS_COMPLETED'), 'filter_ordercompleted', JHtml::_('select.options', $ordercompleted, \"value\", \"text\", $this->state->get('filter.ordercompleted'), true)\n );\n }", "function fn_cp_place_order_manually(&$cart, $params, $customer_auth, $action, $issuer_id, $force_notification)\n{\n unset(Tygh::$app['session']['shipping_rates']);\n\n // update totals and etc.\n fn_update_cart_by_data($cart, $params, $customer_auth);\n\n if (!empty($params['shipping_ids'])) {\n fn_checkout_update_shipping($cart, $params['shipping_ids']);\n }\n \n $cart['calculate_shipping'] = false;\n // recalculate cart content after update\n list($cart_products, $product_groups) = fn_calculate_cart_content($cart, $customer_auth, false);\n\n $cart['notes'] = !empty($params['customer_notes']) ? $params['customer_notes'] : '';\n $cart['payment_info'] = !empty($params['payment_info']) ? $params['payment_info'] : array();\n \n list($order_id, $process_payment) = fn_place_order($cart, $customer_auth, $action, $issuer_id);\n\n return [$order_id, $action];\n}", "private function set_custom_action() {\n\t\t$tmp = new stdClass();\n\t\t$tmp->name = 'Ubah';\n\t\t$tmp->function_name = 'edit';\n\t\t$tmp->button_style = 'info';\n\t\t$tmp->icon_name = 'fa fa-edit';\n\t\tarray_push($this->custom_action, $tmp);\n\t\tunset($tmp);\n\t\t\n\t\t$tmp = new stdClass();\n\t\t$tmp->name = 'Hapus';\n\t\t$tmp->function_name = 'delete';\n\t\t$tmp->button_style = 'danger';\n\t\t$tmp->icon_name = 'fa fa-trash-o';\n\t\tarray_push($this->custom_action, $tmp);\n\t\tunset($tmp);\n\t}", "function hwoo_myaccount_show_orders($data = array()) {\r\n wc_get_template( 'myaccount/my-orders.php' );\r\n }", "function add_actions(){\n\t\tadd_action( 'after_setup_theme', array( $this, 'init' ) );\n\t\tadd_action( 'customize_register', array( $this, 'customize_register' ) );\n\n\t\tadd_action( 'customize_preview_init', array( $this, 'enqueue_preview' ) );\n\t\tadd_action( 'wp_head', array( $this, 'display_custom_css' ), 11 );\n\t}", "public function add_button() {\n\t\t\tglobal $post;\n\n\t\t\t$this->_positions = apply_filters( 'yith_wcwl_positions', $this->_positions );\n\n\t\t\tif ( ! isset( $post ) || ! is_object( $post ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the link \"Add to wishlist\"\n\t\t\t$position = get_option( 'yith_wcwl_button_position' );\n\t\t\t$position = empty( $position ) ? 'add-to-cart' : $position;\n\n\t\t\tif ( $position != 'shortcode' ) {\n\t\t\t\tadd_action( $this->_positions[$position]['hook'], array( $this, 'print_button' ), $this->_positions[$position]['priority'] );\n\t\t\t}\n\n\t\t\t// Free the memory. Like it needs a lot of memory... but this is rock!\n\t\t}", "public function sort_button()\r\n\t{\r\n\t //$attributes = array('type'=>'button', 'class'=>'btn btn-default','onClick'=>'openModalBox(\\'' . url_for('app/sortItems?t=' . $this->module . $this->add_url_params('&') ,true) . '\\')');\r\n //return $f->render('',__('Sort'),$attributes);\r\n \r\n return '<button class=\"btn btn-default\" onClick=\"openModalBox(\\'' . url_for('app/sortItems?t=' . $this->module . $this->add_url_params('&') ,true) . '\\')\">' . __('Sort') . '</button>';\r\n }", "protected function doActionsList()\n\t{\n\t\t$this->processBuyAction();\n\t\t$this->processAddToBasketAction();\n\t\t$this->processSubscribeAction();\n\t}", "function make_transaction_button($product,$item_name,$purchase_id,$amount,$currency,$via=NULL)\n{\n\tif (is_null($via)) $via=get_option('payment_gateway');\n\trequire_code('hooks/systems/ecommerce_via/'.filter_naughty_harsh($via));\n\t$object=object_factory('Hook_'.$via);\n\treturn $object->make_transaction_button($product,$item_name,$purchase_id,$amount,$currency);\n}", "public function track_add_order_from_edit()\n {\n }" ]
[ "0.7125076", "0.712278", "0.7047335", "0.700667", "0.6959651", "0.68122387", "0.6764015", "0.67309713", "0.66472346", "0.64080906", "0.63861394", "0.62955207", "0.6291838", "0.6243846", "0.62108207", "0.6197844", "0.61773956", "0.6153738", "0.6149615", "0.61325866", "0.60961926", "0.6074305", "0.6067948", "0.601216", "0.6010112", "0.6002018", "0.59799385", "0.5966659", "0.5947939", "0.5893683", "0.589169", "0.5877907", "0.5857994", "0.58320796", "0.5796316", "0.5789615", "0.57787156", "0.5762124", "0.57496405", "0.5736666", "0.57340497", "0.57307446", "0.572635", "0.5724161", "0.57137585", "0.57008225", "0.56977785", "0.5697763", "0.5696717", "0.5675386", "0.5649977", "0.5647372", "0.5646661", "0.562821", "0.5622231", "0.56201804", "0.5616806", "0.56162435", "0.56053734", "0.558163", "0.557182", "0.55715585", "0.55704343", "0.55657846", "0.5554327", "0.55530244", "0.55465317", "0.5541396", "0.5521142", "0.55183804", "0.5518285", "0.54957527", "0.5488674", "0.5484453", "0.5482503", "0.5478381", "0.547819", "0.5471126", "0.5442781", "0.54407793", "0.54344475", "0.5432711", "0.5431666", "0.5425941", "0.5422817", "0.5414614", "0.54142904", "0.541259", "0.54051685", "0.5404191", "0.5399289", "0.539924", "0.5398317", "0.53848386", "0.5370901", "0.5370899", "0.53700274", "0.5369729", "0.5363204", "0.5362302" ]
0.8323474
0
woocommerce_pip_order_items_table function. Output items for display
Функция woocommerce_pip_order_items_table. Вывод элементов для отображения
function woocommerce_pip_order_items_table( $order, $show_price = FALSE ) { $return = ''; foreach( $order->get_items() as $item ) { // get the product; if this variation or product has been deleted, this will return null... $_product = $order->get_product_from_item( $item ); $sku = $variation = ''; if ( $_product ) $sku = $_product->get_sku(); $item_meta = new WC_Order_Item_Meta( version_compare( get_option( 'woocommerce_db_version' ), '2.4', '<' ) ? $item['item_meta'] : $item ); // first, is there order item meta avaialble to display? $variation = $item_meta->display( true, true ); if ( ! $variation && $_product && isset( $_product->variation_data ) ) { // otherwise (for an order added through the admin) lets display the formatted variation data so we have something to fall back to $variation = wc_get_formatted_variation( $_product->variation_data, true ); } if ( $variation ) { $variation = '<br/><small>' . $variation . '</small>'; } $return .= '<tr> <td style="text-align:left; padding: 3px;">' . $sku . '</td> <td style="text-align:left; padding: 3px;">' . apply_filters( 'woocommerce_order_product_title', $item['name'], $_product ) . $variation . '</td> <td style="text-align:left; padding: 3px;">'.$item['qty'].'</td>'; if ( $show_price ) { $return .= '<td style="text-align:left; padding: 3px;">'; if ( $order->display_cart_ex_tax || !$order->prices_include_tax ) { $ex_tax_label = ( $order->prices_include_tax ) ? 1 : 0; $return .= wc_price( $order->get_line_subtotal( $item ), array( 'ex_tax_label' => $ex_tax_label ) ); } else { $return .= wc_price( $order->get_line_subtotal( $item, TRUE ) ); } $return .= ' </td>'; } else { $return .= '<td style="text-align:left; padding: 3px;">'; $return .= ( $_product && $_product->get_weight() ) ? $_product->get_weight() * $item['qty'] . ' ' . get_option( 'woocommerce_weight_unit' ) : __( 'n/a', 'woocommerce-pip' ); $return .= '</td>'; } $return .= '</tr>'; } $return = apply_filters( 'woocommerce_pip_order_items_table', $return ); return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function myc_email_order_items_table( $output, $order ) {\n \tstatic $run = 0;\n\n \t// if we've already run this filter, bail out\n \tif ( $run ) {\n \t\treturn $output;\n \t}\n\n $args = array(\n 'show_sku' => true,\n 'show_image' => false,\n 'image_size' => array( 100, 100 ),\n );\n\n \t// increment our flag so we don't run again\n \t$run++;\n\n \t// if first run, give WooComm our updated table\n \treturn $order->email_order_items_table( $args );\n }", "public function buildOrderItemList() {}", "public function reportItemsOrdered()\n\t{\n\t\t//Reports of items on order available to everyone as of now\n\t\tif(!$access_level=$this->access_level(self::GUEST, \"run an On Order Report\"))\n\t\t\treturn $access_level;\n\t\t\n\t\t\n\t\t$query=\"SELECT orders.order_id, storerooms.storeroom_name, order_line_items.NSN, items.item_name, order_line_items.quantity, orders.date_ordered, order_line_items.date_received\n\t\tFROM orders, order_line_items, items, storerooms\n\t\tWHERE orders.order_id=order_line_items.order_id \n\t\tAND order_line_items.NSN=items.NSN\n\t\tAND storerooms.storeroom_id=orders.storeroom_id;\";\n\t\t$result = $this->db->query($query);\n\t\t$html= \"<div class='container'><div class='row'><div class='col-md-12'>\n\t\t\t\t<table class='table table-bordered table-striped table-condensed table-responsive'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>Order Number</th>\n\t\t\t\t\t\t\t<th>Storeroom</th>\n\t\t\t\t\t\t\t<th>NSN</th>\n\t\t\t\t\t\t\t<th>Item Name</th>\n\t\t\t\t\t\t\t<th>Quantity</th>\n\t\t\t\t\t\t\t<th>Date Ordered</th>\n\t\t\t\t\t\t\t<th>Date Received</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\";\n\t\twhile ($row = $result->fetch_row())\n\t\t{\n\t\t\t$html .= \"<tr>\";\n\t\t\tfor($i=0; $i<sizeof($row); $i++)\n\t\t\t{\n\t\t\t\t$html .= \"<td> $row[$i] </td>\";\n\t\t\t}\n\t\t\t$html .= \"</tr>\";\n\t\t}\n\t\t$html .= \"\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t</div></div></div>\";\n\t\techo $html;\n\t}", "public function email_order_items_table($args = array())\n {\n }", "public function getAllOrderItems()\n {\n }", "public function getTemplateOrderItems($items)\n {\n\n try {\n $data = array();\n foreach($items as $item) {\n $_item = array();\n $product = $item->getProduct();\n $options = $product->getTypeInstance(true)->getOrderOptions($product)['attributes_info'];\n if (!$options) {\n $options = $item->getProductOptions()[\"attributes_info\"];\n }\n\n $_item['options'] = $this->getVars($options, true);\n $_item['sku'] = $product->getSku();\n $_item['title'] = $product->getName();\n $_item['url'] = $product->getProductUrl();\n $_item['qty'] = intval($item->getQtyOrdered());\n $_item['url'] = $item->getProduct()->getProductUrl();\n $_item['price'] = $item->getProduct()->getFinalPrice();\n\n // NOTE: Thumbnail comes from cache, so if cache is flushed the THUMBNAIL may be inaccurate.\n $_item['image'] = Mage::helper('sailthruemail')->getProductImages($product);\n\n if ($tags = Mage::helper('sailthruemail')->getTags($item->getProduct())) {\n $_item['tags'] = $tags;\n }\n\n $data[] = $_item;\n }\n\n return $data;\n } catch (Exception $e) {\n Mage::log(\"EXCEPTION: {$e->getMessage()}\", null, \"sailthru.log\");\n Mage::logException($e);\n return false;\n }\n }", "public function DisplayItems()\n\t{\tob_start();\n\t\t$discounts = array();\n\t\t$total_discounts = 0;\n\t\t\n\t\tif(!$user instanceof Student){\n\t\t\t$orderer = new Student($this->details['sid']);\n\t\t}\n\t\t\n\t\techo '<table class=\"itemsTable\"><tr><th rowspan=\"2\">Type</th><th rowspan=\"2\">Item name</th><th rowspan=\"2\">Qty</th><th colspan=\"2\">Unit Price</th><th colspan=\"2\">Total Price</th></tr><tr><th class=\"num\">Before tax</th><th class=\"num\">After tax</th><th class=\"num\">Before tax</th><th class=\"num\">After tax</th></tr>';\n\t\tforeach ($this->GetItems() as $item)\n\t\t{\t\n\t\t\techo '<tr><td>', $this->InputSafeString($item['ptype']), '</td><td>', $this->InputSafeString(preg_replace(\"/\\(\\([^)]+\\)\\)/\",\"\",$item['title']));\n\t\t\t\n\t\t\tswitch ($item['ptype'])\n\t\t\t{\tcase 'store':\n\t\t\t\t\t$product = new StoreProduct($item['pid']);\n\t\t\t\t\techo '&nbsp;<span class=\"prodItemCode\">Code: ', $product->ProductID(), '</span>', $product->ListCustomDownloads($orderer), $product->ListCustomPurchasedMM($orderer);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'course':\n\t\t\t\t\t$ticket = new CourseTicket($item['pid']);\n\t\t\t\t\t$course = new Course($ticket->details['cid']);\n\t\t\t\t\techo '&nbsp;<span class=\"prodItemCode\">Code: ', $course->ProductID(), '</span>';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo '</td><td>', (int)$item['qty'], '</td><td class=\"num\">', number_format($item['price'], 2), '</td><td class=\"num\">', number_format($item['pricetax'], 2), '</td><td class=\"num\">', number_format($item['totalprice'], 2), '</td><td class=\"num\">', number_format($item['totalpricetax'], 2), '</td></tr>';\n\t\t\t$totalprice += $item['totalprice'];\n\t\t\t$totalpricetax += $item['totalpricetax'];\n\t\t\tforeach ($item['discounts'] as $item_discount)\n\t\t\t{\tif (!$discounts[$item_discount['discid']])\n\t\t\t\t{\t$discounts[$item_discount['discid']] = new DiscountCode($item_discount['discid']);\n\t\t\t\t}\n\t\t\t\techo '<tr class=\"itemsTableSubRow\"><td>Discount</td><td colspan=\"5\">', $this->InputSafeString($discounts[$item_discount['discid']]->details['discdesc']), '</td><td class=\"num\">&minus; ', number_format($item_discount['discamount'], 2), '</td></tr>';\n\t\t\t\t$total_discounts += $item_discount['discamount'];\n\t\t\t}\n\t\t}\n\t\tif ($attendees = $this->GetAttendees())\n\t\t{\tforeach ($attendees as $attendee)\n\t\t\t{\tif ($item = $this->items[$attendee['itemid']])\n\t\t\t\t{\techo '<tr class=\"itemsTableSubRow\"><td>registration</td><td>for ', $this->InputSafeString($item['title']), '</td><td colspan=\"2\">';\n\t\t\t\t\tif ($attendee['userid'])\n\t\t\t\t\t{\techo '<a href=\"member.php?id=', $attendee['userid'], '\">', $this->InputSafeString($attendee['email']), '</a>';\n\t\t\t\t\t} else\n\t\t\t\t\t{\techo $this->InputSafeString($attendee['email']);\n\t\t\t\t\t}\n\t\t\t\t\techo '<br />', $this->InputSafeString($attendee['firstname'] . ' ' . $attendee['surname']), '</td><td colspan=\"2\">';\n\t\t\t\t\tif ($attendee['bookid'])\n\t\t\t\t\t{\techo '<a href=\"booking.php?id=', $attendee['bookid'], '\">booking created</a>';\n\t\t\t\t\t}\n\t\t\t\t\techo '</td><td></td></tr>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach ($this->GetAllReferrerRewards() as $reward)\n\t\t{\techo '<tr><td>reward</td><td>for refer-a-friend</td><td></td><td class=\"num\"></td><td class=\"num\">&minus; ', number_format($reward['amount'], 2), '</td><td class=\"num\"></td><td class=\"num\">&minus; ', number_format($reward['amount'], 2), '</td></tr>';\n\t\t\t$totalprice -= $reward['amount'];\n\t\t\t$totalpricetax -= $reward['amount'];\n\t\t}\n\t\tforeach ($this->GetAllAffRewards() as $reward)\n\t\t{\techo '<tr><td>reward</td><td>alliliate scheme</td><td></td><td class=\"num\"></td><td class=\"num\">&minus; ', number_format($reward['amount'], 2), '</td><td class=\"num\"></td><td class=\"num\">&minus; ', number_format($reward['amount'], 2), '</td></tr>';\n\t\t\t$totalprice -= $reward['amount'];\n\t\t\t$totalpricetax -= $reward['amount'];\n\t\t}\n\t\tforeach ($this->GetBundles() as $bundle)\n\t\t{\techo '<tr><td>bundle</td><td>', $this->InputSafeString($bundle['bname']), '</td><td>', (int)$bundle['qty'], '</td><td class=\"num\">&minus; ', number_format($bundle['discount'], 2), '</td><td class=\"num\">&minus; ', number_format($bundle['discount'], 2), '</td><td class=\"num\">&minus; ', number_format($bundle['totaldiscount'], 2), '</td><td class=\"num\">&minus; ', number_format($bundle['totaldiscount'], 2), '</td></tr>';\n\t\t\t$totalprice -= $bundle['totaldiscount'];\n\t\t\t$totalpricetax -= $bundle['totaldiscount'];\n\t\t}\n\t\tif ($total_discounts)\n\t\t{\t//echo '<tr><td>Discount</td><td colspan=\"5\">', $this->InputSafeString($discount->details['discdesc']), '</td></td><td class=\"num\">&minus; ', number_format($this->details['discamount'], 2), '</td></tr>';\n\t\t\t$totalprice -= $total_discounts;\n\t\t\t$totalpricetax -= $total_discounts;\n\t\t}\n\t\tif ($this->details['delivery_price'])\n\t\t{\techo '<tr><td>delivery</td><td colspan=\"5\">', ($this->details['delivery_id'] && ($deloption = new DeliveryOption($this->details['delivery_id'])) && $deloption->id) ? $this->InputSafeString($deloption->details['title']) : '','</td><td class=\"num\">', number_format($this->details['delivery_price'], 2), '</td></tr>';\n\t\t\t$totalpricetax += $this->details['delivery_price'];\n\t\t\t$totalprice += $this->details['delivery_price'];\n\t\t}\n\t\tif ($this->details['txfee'] > 0)\n\t\t{\techo '<tr><td></td><td colspan=\"5\">Transaction fee</td><td class=\"num\">', number_format($this->details['txfee'], 2), '</td></tr>';\n\t\t\t$totalpricetax += $this->details['txfee'];\n\t\t\t$totalprice += $this->details['txfee'];\n\t\t}\n\t\techo '<tr><th colspan=\"5\">Totals</th><th class=\"num\">', number_format($totalprice, 2), '</th><th class=\"num\">', number_format($totalpricetax, 2), '</th></tr></table>';\n\t\treturn ob_get_clean();\n\t}", "function buildOrderItemList() ;", "function prepare_items() {\n global $wpdb;\n\t\t$per_page = 10;\n \n\t\t$columns = $this->get_columns();\n $hidden = array();\n $sortable = $this->get_sortable_columns();\n \n $this->_column_headers = array($columns, $hidden, $sortable);\n\t\t$this->process_bulk_action();\n\t\t$current_page = $this->get_pagenum();\n\t\t\n\t\tparse_str($_SERVER['QUERY_STRING'], $output);\n\t\t\n\t\tif(!empty($output['show_orders_for'])) {\n\t\t\t$sql = \"SELECT * FROM \".$wpdb->prefix.\"basalcart_orders WHERE userid=\".$output['show_orders_for'].\" AND deleted=0\";\n\t\t}\n\t\telseif(!empty($output['orderby']) && !empty($output['order'])) {\n\t\t\t$sql = \"SELECT * FROM \".$wpdb->prefix.\"basalcart_orders WHERE deleted=0 ORDER BY \".$output['orderby'].\" \".strtoupper($output['order']);\n\t\t} else {\n\t\t\t$sql = \"SELECT * FROM \".$wpdb->prefix.\"basalcart_orders WHERE deleted=0\";\n\t\t}\n\t\t$data = $wpdb->get_results($sql, ARRAY_A);\n\t\t\n\t\tif(is_array($data)) {\n\t\t\t$total_items = count($data);\n\t\t\t$data = array_slice($data,(($current_page-1)*$per_page),$per_page);\n\t\t\t$this->items = $data;\n\t\t}\n\t\t\n\t\t$this->set_pagination_args(array(\n\t\t\t'total_items' => $total_items,\n\t\t\t'per_page' => $per_page,\n\t\t\t'total_pages' => ceil($total_items/$per_page)\n\t\t));\n\t}", "function wc_get_email_order_items($order, $args = array())\n {\n }", "protected function get_order_item_data($item)\n {\n }", "protected function renderItems(): string\n {\n $columns = $this->renderColumns();\n\n $content = array_filter([\n $this->columnsGroupEnabled ? $this->renderColumnGroup($columns) : false,\n $this->headerTableEnabled ? $this->renderTableHeader($columns) : false,\n $this->footerEnabled ? $this->renderTableFooter($columns) : false,\n $this->renderTableBody($columns),\n ]);\n\n return Html::tag('table', PHP_EOL . implode(PHP_EOL, $content) . PHP_EOL, $this->tableAttributes)\n ->encode(false)\n ->render();\n }", "public function prepare_items() {\n\t\tglobal $wpdb;\n\n\t\t$current_page = $this->get_pagenum();\n\t\t$per_page = 50;\n\t\t$orderby = ! empty( $_REQUEST['orderby'] ) ? sanitize_text_field( $_REQUEST['orderby'] ) : 'user_id';\n\t\t$order = empty( $_REQUEST['order'] ) || $_REQUEST['order'] === 'asc' ? 'ASC' : 'DESC';\n\t\t$order_id = ! empty( $_REQUEST['order_id'] ) ? absint( $_REQUEST['order_id'] ) : '';\n\t\t$user_id = ! empty( $_REQUEST['user_id'] ) ? absint( $_REQUEST['user_id'] ) : '';\n\t\t$product_id = ! empty( $_REQUEST['product_id'] ) ? absint( $_REQUEST['product_id'] ) : '';\n\t\t$this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );\n\t\t$where = array( 'WHERE 1=1' );\n\n\t\tif ( $order_id ) {\n\t\t\t$where[] = 'AND order_id=' . $order_id;\n\t\t}\n\t\tif ( $user_id ) {\n\t\t\t$where[] = 'AND user_id=' . $user_id;\n\t\t}\n\t\tif ( $product_id ) {\n\t\t\t$where[] = 'AND product_id=' . $product_id;\n\t\t}\n\n\t\t$where = implode( ' ', $where );\n\t\t$max = $wpdb->get_var( \"SELECT COUNT(id) FROM {$wpdb->prefix}wcpl_user_packages $where;\" );\n\t\t$this->items = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}wcpl_user_packages $where ORDER BY `{$orderby}` {$order} LIMIT %d, %d\", ( $current_page - 1 ) * $per_page, $per_page ) );\n\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $max,\n\t\t\t'per_page' => $per_page,\n\t\t\t'total_pages' => ceil( $max / $per_page ),\n\t\t) );\n\t}", "function wc_save_order_items($order_id, $items)\n {\n }", "public function renderItems()\n {\n return '<div class=\"table-responsive\">'.parent::renderItems().'</div>';\n }", "private function get_legacy_import_one_column_per_line_item( $order_data, WC_Order $order ) {\n\n\t\t$count = 1;\n\n\t\t// add line items\n\t\tforeach ( $order->get_items() as $_ => $item ) {\n\n\t\t\t// sku/qty/price\n\t\t\t$product = $order->get_product_from_item( $item );\n\n\t\t\tif ( ! is_object( $product ) ) {\n\t\t\t\t$product = new WC_Product( 0 );\n\t\t\t}\n\n\t\t\t$sku = $product->get_sku();\n\n\t\t\t// note that product ID must be prefixed with `product_id:` so the importer can properly parse it vs. the SKU\n\t\t\t$product_id = SV_WC_Plugin_Compatibility::product_get_id( $product );\n\n\t\t\t$line_item = array(\n\t\t\t\t$sku ? $sku : \"product_id:{$product_id}\",\n\t\t\t\t$item['qty'],\n\t\t\t\t$order->get_line_total( $item )\n\t\t\t);\n\n\t\t\t// Add item meta\n\t\t\t$item_meta = new WC_Order_Item_Meta( $item );\n\t\t\t$formatted_meta = $item_meta->get_formatted();\n\n\t\t\tif ( ! empty( $formatted_meta ) ) {\n\n\t\t\t\tforeach ( $formatted_meta as $meta_key => $meta ) {\n\n\t\t\t\t\t// remove newlines\n\t\t\t\t\t$label = str_replace( array( \"\\r\", \"\\r\\n\", \"\\n\" ), '', $meta['label'] );\n\t\t\t\t\t$value = str_replace( array( \"\\r\", \"\\r\\n\", \"\\n\" ), '', $meta['value'] );\n\n\t\t\t\t\t// escape reserved chars (:;|)\n\t\t\t\t\t$label = str_replace( array( ': ', ':', ';', '|' ), array( '\\: ', '\\:', '\\;', '\\|' ), $meta['label'] );\n\t\t\t\t\t$value = str_replace( array( ': ', ':', ';', '|' ), array( '\\: ', '\\:', '\\;', '\\|' ), $meta['value'] );\n\n\t\t\t\t\t$line_item[] = wp_kses_post( $label . ': ' . $value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$order_data[ \"order_item_{$count}\" ] = implode( '|', $line_item );\n\n\t\t\t$count++;\n\t\t}\n\n\t\t$count = 1;\n\n\t\tforeach ( $order->get_items( 'shipping' ) as $_ => $shipping_item ) {\n\n\t\t\t$order_data[ \"shipping_method_{$count}\" ] = $shipping_item['method_id'];\n\t\t\t$order_data[ \"shipping_cost_{$count}\" ] = wc_format_decimal( $shipping_item['cost'], 2 );\n\n\t\t\t$count++;\n\t\t}\n\n\t\t// fix customer user\n\t\t$user = get_user_by( 'id', $order_data['customer_id'] );\n\t\t$order_data['customer_id'] = $user ? $user->user_email : '';\n\n\t\treturn $order_data;\n\t}", "function outputListItems()\n {\n global $application;\n $retval = '';\n $orders = modApiFunc(\"Checkout\", \"getOrdersIDForDelete\");\n foreach ($orders as $orderId)\n {\n $this->_Template_Contents = array();\n $order_id = sprintf(\"%d\", $orderId);\n $currency_id = modApiFunc(\"Localization\", \"whichCurrencyToDisplayOrderIn\", $order_id);\n modApiFunc(\"Localization\", \"pushDisplayCurrency\", $currency_id, $currency_id);\n $orderInfo = modApiFunc(\"Checkout\", \"getOrderInfo\", $order_id, $currency_id);\n\n $request = new Request();\n $request->setView ('OrderInfo');\n $request->setAction('SetCurrentOrder');\n $request->setKey('order_id', $orderInfo[\"ID\"]);\n $request->setKey('delete', 'true');\n $OrderInfoLink = $request->getURL();\n\n $customer_obj = &$application->getInstance('CCustomerInfo',modApiFunc('Customer_Account','getCustomerAccountNameByCustomerID',$orderInfo['PersonId']));\n\n $request = new Request();\n $request->setView('PopupWindow');\n $request->setKey('page_view', 'CustomerAccountInfo');\n $request->setKey('customer_id', $orderInfo['PersonId']);\n $CustomerInfoLink = $request->getURL();\n\n $this->_Template_Contents['OrderId'] = $orderInfo[\"ID\"];\n $this->_Template_Contents['OrderInfoLink'] = $OrderInfoLink;\n $this->_Template_Contents['Customer'] = prepareHTMLDisplay($customer_obj->getDisplayAccountName());\n $this->_Template_Contents['CustomerInfoLink'] = $CustomerInfoLink;\n $this->_Template_Contents['OrderDate'] = modApiFunc(\"Localization\", \"date_format\", $orderInfo[\"Date\"]);\n $this->_Template_Contents['OrderAmount'] = modApiFunc(\"Localization\", \"currency_format\", $orderInfo[\"Total\"]);\n $this->_Template_Contents['OrderStatus'] = $orderInfo[\"Status\"];\n $this->_Template_Contents['PaymentStatus'] = $orderInfo[\"PaymentStatus\"];\n\n $application->registerAttributes($this->_Template_Contents);\n $retval.= modApiFunc('TmplFiller', 'fill', \"checkout/delete-orders/\",\"item.tpl.html\", array());\n modApiFunc(\"Localization\", \"popDisplayCurrency\");\n }\n\n return $retval;\n }", "public function getOrderItems()\n {\n if ($quote = $this->getQuote()) {\n $items = $quote->getAllItems();\n $storeId = $quote->getStoreId();\n } elseif ($order = $this->getOrder()) {\n $items = $order->getAllItems();\n $storeId = $order->getStoreId();\n }\n\n $itemsArray = [];\n\n // @var Mage_Sales_Model_Order_Item $oItem\n foreach ($items as $item) {\n if (!$item->getProduct()->getIsVirtual()) {\n $this->_isVirtual = false;\n }\n\n if ($item->getParentItemId()) {\n continue; // Only sends parent items to zipMoney\n }\n\n $orderItem = new OrderItem;\n\n $description = $item->getDescription();\n\n if (!isset($description) || empty($description)) {\n // Check product description\n $description = $this->_getDescription($item, $storeId);\n }\n\n if ($quote) {\n $qty = $item->getQty();\n } elseif ($order) {\n $qty = $item->getQtyOrdered();\n }\n //API do not handle long SKU exception so we have to handle in plugin\n $sku = (strlen($item->getSku())) > 49 ? substr($item->getSku(), 0, 49) : $item->getSku();\n\n $orderItem->setName($item->getName())\n ->setAmount($item->getPriceInclTax() ? (float)$item->getPriceInclTax() : 0.00)\n ->setReference((string)$item->getId())\n ->setDescription($description)\n ->setQuantity(round($qty))\n ->setType(\"sku\")\n ->setImageUri($this->_getProductImage($item))\n ->setItemUri($item->getProduct()->getProductUrl())\n ->setProductCode($sku);\n $itemsArray[] = $orderItem;\n }\n\n $this->_logger->debug(sprintf(\"Shipping Required:- %s\", !$this->_isVirtual ? \"Yes\" : \"No\"));\n\n return $itemsArray;\n }", "function wc_format_list_of_items($items)\n {\n }", "public function OrderItem();", "function aopmc_custom_order_items_meta_display( $output, $order_items_meta ) {\r\n\t\t\r\n\t\t\t$output = '';\r\n\t\t\t$flat \t\t= false; \r\n\t\t\t$hideprefix = '_';\r\n\t\t\t\r\n\t\t\t$formatted_meta = $order_items_meta->get_formatted( $hideprefix );\r\n\t\t\tif ( ! empty( $formatted_meta ) ) {\r\n\t\t\t\t$meta_list = array();\r\n\t\t\t\tforeach ( $formatted_meta as $meta ) {\r\n\t\t\t\t\tif ( $flat ) {\r\n\t\t\t\t\t\t$meta_list[] = wp_kses_post( $meta['label'] . ': ' . $meta['value'] );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$meta_key = (array_key_exists( 'key', $meta ))?$meta['key']:strtolower($meta['label']);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( $meta_key == 'user_custom_deliveryDate' ){\r\n\t\t\t\t\t\t\t$meta_lable = 'Delivery date';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$meta_lable = $meta['label'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$meta_list[] = '\r\n\t\t\t\t\t\t\t<dt class=\"variation-' . sanitize_html_class( sanitize_text_field( $meta_key ) ) . '\">' . $meta_lable . ':</dt>\r\n\t\t\t\t\t\t\t<dd class=\"variation-' . sanitize_html_class( sanitize_text_field( $meta_key ) ) . '\">' . wp_kses_post( wpautop( make_clickable( $meta['value'] ) ) ) . '</dd>\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\tif ( ! empty( $meta_list ) ) {\r\n\t\t\t\t\tif ( $flat ) {\r\n\t\t\t\t\t\t$output .= implode( $delimiter, $meta_list );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$output .= '<dl class=\"variation\">' . implode( '', $meta_list ) . '</dl>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $output;\r\n\t\t}", "public function getItems()\n {\n // Note that if the total (price * quantity) of items doesn't match total amount, this won't work\n }", "function displayItems(){\n if (isset($_SESSION['cart'])) {\n echo \"<table border = '1' align='center' width='100%'>\";\n foreach ($_SESSION['cart'] as $item) {\n $itemId = $item['id'];\n $itemQuant = $item['quantity'];\n \n echo '<tr>';\n \n \n echo \"<td><img src='\". $item['img'] .\"'></td>\";\n echo \"<td><h4>\". $item['name'] .\"</h4></td>\";\n echo \"<td><h4>\". $itemQuant .\"</h4></td>\";\n echo \"<td><h4>$\". $item['price'] .\"</h4></td>\";\n echo \"</tr>\";\n }\n echo \"</table>\";\n }\n }", "function BuildTable($items, $coupon, $class) {\n\t\t$items = ApplyItemDiscounts($items, $coupon);\n\t\t$OrderInfo = GetOrderTotals($items, $coupon);\n\t\t\n\t\t$output = Chr(10);\n\t\t$output .= '<table class=\"' . $class . '\" >\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t<tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<th class=\"cap_left\" >Your Order Summary</th>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<th>Notes</th>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<th>Quantity</th>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<th>Unit Price</th>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<th class=\"cap_right\">Total Price</th>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t</tr>\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\t' . Chr(10);\n\t\tforeach ($items as $item) {\n\t\t\t$output .= '\t<tr class=\"standard\" >\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td>' . $item['name'] . '</td>\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td>' . str_replace(chr(10), '<br />', $item['notes']) . '</td>\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td>' . $item['qty'] . '</td>\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td>$' . number_format($item['finalprice'], 2, '.', '') . '</td>\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td>$' . number_format($item['finalprice'] * $item['qty'], 2, '.', '') . '</td>\t\t' . Chr(10);\n\t\t\t$output .= '\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t}\n\t\t\n\t\tif ($OrderInfo['monthlybillable'] > 0) {\n\t\t\t$output .= '\t<tr> <!--- Monthly Billable Value --->\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td colspan=3 ></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_text\" >Monthly Billed:</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_value\" >$' . number_format($OrderInfo['monthlybillable'], 2, '.', '') . '</td>\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t</tr>\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' . Chr(10);\n\t\t}\n\t\t\n\t\tif ($OrderInfo['newbroker'] > 0) {\n\t\t\t$output .= '\t<tr> <!--- Total Billable --->\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td colspan=3 ></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_text\" >Current Billable:</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_value\" >$' . number_format($OrderInfo['adtotal'], 2, '.', '') . '</td>\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t</tr>\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' . Chr(10);\n\t\t\t$output .= '\t<tr> <!--- Broker Billable Value --->\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td colspan=3 ></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_text\" >Broker Charged:</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_value\" >-$' . number_format($OrderInfo['newbroker'], 2, '.', '') . '</td>\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t</tr>\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' . Chr(10);\n\t\t}\n\t\t\n\t\tif (strlen($OrderInfo['couponapplied']) > 0) {\n\t\t\t$output .= '\t<tr> <!--- Coupon Code --->\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td colspan=3 ></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_text\" >Coupon Applied:</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_value\">' . $OrderInfo['couponapplied'] . '</td>\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t}\n\t\t\n\t\tif (strlen($OrderInfo['notes']) > 0) {\n\t\t\t$output .= '\t<tr> <!--- Notes --->\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td colspan=3 ></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_text\" >Notes:</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t\t<td class=\"total_value\">' . $OrderInfo['notes'] . '</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t\t$output .= '\t</tr>\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' . Chr(10);\n\t\t}\n\t\t\n\t\t$output .= '\t<tr> <!--- Subtotal --->\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td colspan=3 ></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td class=\"total_text\" >Subtotal:</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td class=\"total_value\" >$' . number_format($OrderInfo['newsubtotal'], 2, '.', '') . '</td>\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t</tr>\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' . Chr(10);\n\t\t$output .= '\t<tr> <!--- Sales Tax --->\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td colspan=3 ></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td class=\"total_text\" >Sales Tax:</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td class=\"total_value\" >$' . number_format($OrderInfo['newtax'], 2, '.', '') . '</td>\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t</tr>\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' . Chr(10);\n\t\t$output .= '\t<tr> <!--- Total --->\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td colspan=3 ></td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td class=\"total_text\" >Total:</td>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t\t<td class=\"total_value\" >$' . number_format($OrderInfo['newtotal'], 2, '.', '') . '</td>\t\t\t\t\t\t\t' . Chr(10);\n\t\t$output .= '\t</tr>\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' . Chr(10);\n\t\t$output .= '</table>\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' . Chr(10);\n\t\t$output .= '<input id=\"grandtotal\" type=\"hidden\" value=\"' . ($OrderInfo['newtotal'] + $OrderInfo['monthlybillable']) . '\" />\t\t\t\t\t' . Chr(10);\n\t\t\n\t\treturn $output;\n\t}", "function BENZ_wc_order_email_skus( $table, $order ) {\n\n\tob_start();\n\n\t$template = $plain_text ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php';\n\twc_get_template( $template, array(\n\t\t'order' => $order,\n\t\t'items' => $order->get_items(),\n\t\t'show_sku' => true\n\t) );\n\n\treturn ob_get_clean();\n}", "public function generate_iteminfotable() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\tif ($this->json['error']) {\n\t\t\t\treturn $bootstrap->alertpanel('warning', $this->json['errormsg']);\n\t\t\t} else {\n\t\t\t\t$tb = new Table('class=table table-striped table-bordered table-condensed table-excel');\n\t\t\t\t$tb->tr()->td('', $bootstrap->b('', 'Item ID:'))->td('', $this->json['itemid'])->td('colspan=2', $this->json['desc1']);\n\t\t\t\t$tb->tr()->td('', $bootstrap->b('', 'Sales UoM:'))->td('', $this->json['sale uom'])->td('colspan=2', $this->json['desc2']);\n\t\t\t\t$tb->tr()->td('', $bootstrap->b('', 'Last Sale Date:'))->td('colspan=3', $this->json['last sale date']);\n\t\t\t\t$tb->tr()->td('', $bootstrap->b('', 'Last Usage Date:'))->td('colspan=3', $this->json['last usage date']);\n\t\t\t\treturn $tb->close();\n\t\t\t}\n\t\t}", "function prepare_items() {\n global $wpdb;\n\t\t$per_page = 10;\n \n\t\t$columns = $this->get_columns();\n $hidden = array();\n $sortable = $this->get_sortable_columns();\n \n $this->_column_headers = array($columns, $hidden, $sortable);\n\t\t$current_page = $this->get_pagenum();\n\t\t\n\t\tparse_str($_SERVER['QUERY_STRING'], $output);\n\t\t\n\t\tif(!empty($output['orderby']) && !empty($output['order'])) {\n\t\t\t$sql = \"SELECT * FROM \".$wpdb->prefix.\"basalcart_also_bought ORDER BY \".$output['orderby'].\" \".strtoupper($output['order']);\n\t\t} else {\n\t\t\t$sql = \"SELECT * FROM \".$wpdb->prefix.\"basalcart_also_bought\";\n\t\t}\n\t\t$data = $wpdb->get_results($sql, ARRAY_A);\n\t\t\n\t\tif(is_array($data)) {\n\t\t\t$total_items = count($data);\n\t\t\t$data = array_slice($data,(($current_page-1)*$per_page),$per_page);\n\t\t\t$this->items = $data;\n\t\t}\n\t\t\n\t\t$this->set_pagination_args(array(\n\t\t\t'total_items' => $total_items,\n\t\t\t'per_page' => $per_page,\n\t\t\t'total_pages' => ceil($total_items/$per_page)\n\t\t));\n\t}", "function demorati_get_user_orders_and_items($uid) {\n $sql = array();\n \n $sql[] = \"SELECT o.oid,\";\n $sql[] = \" o.type,\";\n $sql[] = \" o.status,\";\n $sql[] = \" o.created,\";\n $sql[] = \" p.amount_subtotal,\";\n $sql[] = \" GROUP_CONCAT(DISTINCT i.title ORDER BY i.title SEPARATOR ', ') AS items\";\n $sql[] = \"FROM demorati_order o\";\n $sql[] = \"LEFT JOIN demorati_order_item i ON o.oid = i.oid\";\n $sql[] = \"LEFT JOIN demorati_order_payment p ON o.oid = p.oid\";\n $sql[] = \"WHERE o.uid = :uid\";\n $sql[] = \"AND o.status IN ('processing', 'pending', 'complete')\";\n $sql[] = \"AND i.deleted IS NULL\";\n $sql[] = \"GROUP BY o.oid,\";\n $sql[] = \" o.type,\";\n $sql[] = \" o.status,\";\n $sql[] = \" o.created,\";\n $sql[] = \" p.amount_subtotal\";\n $sql[] = \"ORDER BY oid DESC\";\n \n $params = array(\n ':uid' => $uid\n );\n \n return db_query(\n implode(PHP_EOL, $sql), \n $params\n )->fetchAll();\n }", "public function getOrderContents()\n {\n $items = [];\n $quote = $this->getQuote();\n foreach ($quote->getAllVisibleItems() as $item) {\n $itemData = [\n 'Description' => $item->getName(),\n 'ItemValue' => [\n 'CurrencyCode' => $quote->getQuoteCurrencyCode(),\n 'Value' => (float) $item->getPriceInclTax()\n ],\n 'ProductCode' => $item->getSku(),\n 'Quantity' => $item->getQty()\n ];\n $dimensions = $this->_getItemDimensions($item);\n if (!empty($dimensions)) {\n $itemData = array_merge($itemData, $dimensions);\n }\n $customFields = $this->_getItemCustomFields($item);\n if (!empty($customFields)) {\n $itemData['customItemFields'] = $customFields;\n }\n $items[] = $itemData;\n }\n\n return $items;\n }", "function prepare_items() {\n global $wpdb;\n\t\t$per_page = 10;\n \n\t\t$columns = $this->get_columns();\n $hidden = array('lastname','zipcode','detailedaddress','user_login');\n $sortable = $this->get_sortable_columns();\n \n $this->_column_headers = array($columns, $hidden, $sortable);\n\t\t$current_page = $this->get_pagenum();\n\t\t\n\t\tparse_str($_SERVER['QUERY_STRING'], $output);\n\t\t\n\t\tif(!empty($output['show_customers_for'])) {\n\t\t\t$sql = \"SELECT * FROM \".$wpdb->prefix.\"basalcart_customers WHERE id=\".$output['show_customers_for'];\n\t\t}\n\t\telseif(!empty($output['orderby']) && !empty($output['order'])) {\n\t\t\t$sql = \"SELECT * FROM \".$wpdb->prefix.\"basalcart_customers ORDER BY \".$output['orderby'].\" \".strtoupper($output['order']);\n\t\t} else {\n\t\t\t$sql = \"SELECT * FROM \".$wpdb->prefix.\"basalcart_customers\";\n\t\t}\n\t\t$data = $wpdb->get_results($sql, ARRAY_A);\n\t\t\n\t\tif(is_array($data)) {\n\t\t\t$total_items = count($data);\n\t\t\t$data = array_slice($data,(($current_page-1)*$per_page),$per_page);\n\t\t\t$this->items = $data;\n\t\t}\n\t\t\n\t\t$this->set_pagination_args(array(\n\t\t\t'total_items' => $total_items,\n\t\t\t'per_page' => $per_page,\n\t\t\t'total_pages' => ceil($total_items/$per_page)\n\t\t));\n\t}", "function process_test()\n{\n\t\n\t$order_id = 2;\n\tif (isset($_GET['order'])){\n\t\t$order_id = $_GET['order'];\n\t}\n\t$order = new WC_Order( $order_id );\n\t//echo \"string2 : \".$nom_gen = 19 - strlen($order_id);\n\n\t$order_item = $order->get_items();\n\n\t//echo \"Test : \".$order-> prices_include_tax;\n\t$cart = '';\n\tforeach ($order_item as $product) {\n\t\techo \"Test : \".$product['name'].\" | \".$product['line_subtotal'].\" | \".$product['qty'].\" <br>\";\n\t\t$data_product = new WC_Product($product['product_id']);\n\t\t$url = get_the_guid ( $data_product->get_image_id() );\n\t\tif (empty($url)){\n\t\t\t$url = 'http://portal.trees.id/images/lots/00/000/073/636/Legok%20Awi%201.jpg';\n\t\t}\n\n\t\t$cart .= $product['name'].','.$data_product->get_price().','.$product['qty'].','.$product['line_subtotal'].','.$url.';;';\n\t\t\n\t\t//echo \"|ini:\".$data_product->get_image_id();\n\n\t}\n\n\t$cart = rtrim($cart,\";;\");\n\techo \"Cart : $cart\";\n\t//$products->get_image_id()\n\techo \"<pre>\";\n\tprint_r($order_item);\n\techo \"</pre>\";\n\tdie();\n}", "public function items()\n {\n return $this->belongsToMany(Item::class, 'order_items')->withPivot('quantity');\n }", "protected function get_formatted_item_data($order)\n {\n }", "function ciniki_wineproduction_purchaseOrderPullItems(&$ciniki, $tnid, $order_id) {\n\n //\n // Load the purchase order and existing items\n //\n $strsql = \"SELECT po.id, \"\n . \"po.status, \"\n . \"po.supplier_id, \"\n . \"items.product_id, \"\n . \"items.id AS item_id, \"\n . \"items.quantity_ordered \"\n . \"FROM ciniki_wineproduction_purchaseorders AS po \"\n . \"LEFT JOIN ciniki_wineproduction_purchaseorder_items AS items ON (\"\n . \"po.id = items.order_id \"\n . \"AND items.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"WHERE po.id = '\" . ciniki_core_dbQuote($ciniki, $order_id) . \"' \"\n . \"AND po.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.wineproduction', array(\n array('container'=>'po', 'fname'=>'id', 'fields'=>array('id', 'status', 'supplier_id')),\n array('container'=>'items', 'fname'=>'product_id', 'fields'=>array('id'=>'item_id', 'quantity_ordered')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.175', 'msg'=>'Unable to load order', 'err'=>$rc['err']));\n }\n if( !isset($rc['po'][$order_id]) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.176', 'msg'=>'Order not found'));\n }\n\n //\n // FIXME: Restrict on add/update only 1 product on each PO\n // - update purchaseOrderAdd, purchaseOrderUpdate\n //\n $purchaseorder = $rc['po'][$order_id];\n $ordered = isset($purchaseorder['items']) ? $purchaseorder['items'] : array();\n\n //\n // Load the ordered wines for the supplier and current inventory\n //\n $strsql = \"SELECT products.id, \"\n . \"products.name, \"\n . \"products.supplier_item_number, \"\n . \"products.package_qty, \"\n . \"products.cost, \"\n . \"products.taxtype_id, \"\n . \"products.inventory_current_num, \"\n . \"COUNT(orders.id) AS num_required \"\n . \"FROM ciniki_wineproduction_products AS products \"\n . \"INNER JOIN ciniki_wineproductions AS orders ON (\"\n . \"products.id = orders.product_id \"\n . \"AND orders.status = 10 \"\n . \"AND orders.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"WHERE products.supplier_id = '\" . ciniki_core_dbQuote($ciniki, $purchaseorder['supplier_id']) . \"' \"\n . \"AND products.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"GROUP BY products.id \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.wineproduction', array(\n array('container'=>'products', 'fname'=>'id', \n 'fields'=>array('id', 'name', 'supplier_item_number', 'package_qty', \n 'cost', 'taxtype_id', 'inventory_current_num', 'num_required',\n )),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.174', 'msg'=>'Unable to load products', 'err'=>$rc['err']));\n }\n $required = isset($rc['products']) ? $rc['products'] : array();\n\n //\n // Check existing order items if anything needs to be updated\n //\n foreach($ordered as $product_id => $item) {\n //\n // Check if order item is in the required list\n //\n if( isset($required[$product_id]) ) {\n if( $required[$product_id]['inventory_current_num'] < 0 ) {\n $qty_required = $required[$product_id]['num_required'];\n } else {\n $qty_required = ($required[$product_id]['num_required'] - $required[$product_id]['inventory_current_num']);\n }\n //\n // Check if there are multiple in package\n //\n if( $required[$product_id]['package_qty'] > 1 ) {\n $qty_required = ceil($qty_required/$required[$product_id]['package_qty']);\n }\n if( $qty_required > $item['quantity_ordered'] ) {\n //\n // Update the quantity ordered\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.wineproduction.purchaseorderitem', $item['id'], array(\n 'quantity_ordered' => $qty_required\n ), 0x04);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.187', 'msg'=>'Unable to update the purchaseorderitem'));\n }\n }\n }\n }\n\n //\n // Check for products that don't exist in the order yet\n //\n foreach($required as $product_id => $item) {\n if( !isset($ordered[$product_id]) ) {\n if( $item['inventory_current_num'] < 0 ) {\n $qty_required = $item['num_required'];\n } else {\n $qty_required = ($item['num_required'] - $item['inventory_current_num']);\n }\n //\n // Check if there are multiple in package\n //\n if( $required[$product_id]['package_qty'] > 1 ) {\n $qty_required = ceil($qty_required/$required[$product_id]['package_qty']);\n }\n //\n // Add item to order\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n $rc = ciniki_core_objectAdd($ciniki, $tnid, 'ciniki.wineproduction.purchaseorderitem', array(\n 'order_id' => $order_id,\n 'product_id' => $product_id,\n 'sku' => $item['supplier_item_number'],\n 'description' => $item['name'],\n 'quantity_ordered' => $qty_required,\n 'quantity_received' => 0,\n 'unit_amount' => $item['cost'],\n 'taxtype_id' => $item['taxtype_id'],\n ), 0x04);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.wineproduction.188', 'msg'=>'Unable to add the purchaseorderitem'));\n }\n \n }\n\n }\n\n return array('stat'=>'ok');\n}", "public function items()\n {\n return $this->hasMany(Orderitem::class);\n }", "function woocommerce_order_details_table($order_id)\n {\n }", "protected function get_items_query_order()\n {\n }", "protected function _writeOrderItems($writer, $order) \n {\n $writer->startElement('OrderItems');\n //foreach($order->getItemsCollection() as $item) {\n foreach($order->getAllVisibleItems() as $item) {\n //$totalNet = $item->getQtyOrdered() * $item->getPrice(); // basePrice breaks with multi-currency\n //$to = Varien_Object_Mapper::accumulateByMap($from, $to, $map); // example mapper\n /*$data = array(\n 'Id' => $item->getId(),\n 'Sku' => $this->_getItemSkuCode($item),\n 'Name' => $item->getName(),\n 'QtyOrdered' => $item->getQtyOrdered(),\n 'TaxRate' => $item->getData('tax_percent'),\n 'UnitPrice' => $item->getPrice(),\n 'UnitDiscountAmount' => $item->getData('discount_amount'),\n 'UnitDiscountPercentage'=> $item->getData('discount_percent'),\n );*/\n \n $data = $item->getData();\n $writer->writeArray($data, 'Item');\n }\n $writer->endElement(); // OrderItems\n }", "function get_items_manage_table_data_rows($items, $controller) {\n $CI = & get_instance();\n $table_data_rows = '';\n $total_item_qty = '';\n foreach ($items->result() as $item) {\n\t \t$item_id = $item->item_id;\n\t \t// calculate stock follow by items_report function view()\n\t\t\t$get_all_po = $CI->Item_products->get_po($item_id)->row();\n\t\t\t$po = array(\n\t\t\t\t'p_qty' => $get_all_po->allQty,\n\t\t\t\t'p_dollar' => $get_all_po->total_dollar,\n\t\t\t\t'p_riel' => $get_all_po->total_riel,\n\t\t\t\t'p_baht' => $get_all_po->total_baht\n\t\t\t);\n\t\t\t$get_all_delivery = $CI->Item_products->get_delivery($item_id)->row();\n\t\t\t$delivery = array(\n\t\t\t\t'qty' => $get_all_delivery->allQty,\n\t\t\t\t'dollar' => $get_all_delivery->total_dollar,\n\t\t\t\t'riel' => $get_all_delivery->total_riel,\n\t\t\t\t'baht' => $get_all_delivery->total_baht\n\t\t\t);\n\t\t\t$get_average = (($po['p_dollar'] - $delivery['dollar']) / ($po['p_qty'] - $delivery['qty']));\n\t\t\t$result_avg = ($get_average <= 0)? 0: $get_average;\n\t\t\t$current = array(\n\t\t\t\t'current_qty' => $po['p_qty'] - $delivery['qty'],\n\t\t\t\t'average_cost' => $result_avg\n\t\t\t);\n\t $table_data_rows.=get_item_data_row($item, $controller, $current);\n }\n\n if ($items->num_rows() == 0) {\n $table_data_rows.=\"<tr><td colspan='17'><span class='col-md-12 text-center text-warning' >\" . lang('items_no_items_to_display') . \"</span></tr>\";\n }\n\n return $table_data_rows;\n}", "function export_items()\n\t{\n\t\t $this->items_model->export_items();\n\t}", "public function getOrderItems()\n {\n return $this->hasMany(OrderItems::className(), ['item_id' => 'id']);\n }", "public function getOrderItems()\n {\n return $this->hasMany(OrderItems::className(), ['order_id' => 'id']);\n }", "public function prepare_items() {\n $wpdb = Follow_Up_Emails::instance()->wpdb;\n\n $columns = $this->get_columns();\n $hidden = array();\n\n $sortable = $this->get_sortable_columns();\n $this->_column_headers = array($columns, $hidden, $sortable);\n\n $per_page = 20;\n $page = empty( $_GET['paged'] ) ? 1 : absint( $_GET['paged'] );\n $start = ( $per_page * $page ) - $per_page;\n\n $sql = \"SELECT SQL_CALC_FOUND_ROWS *\n FROM {$wpdb->prefix}followup_email_orders eo, {$wpdb->posts} p\n WHERE 1=1\n AND eo.is_sent = 0\n AND p.ID = eo.email_id\n AND eo.status IN (\". FUE_Sending_Queue_Item::STATUS_SUSPENDED .\",\". FUE_Sending_Queue_Item::STATUS_ACTIVE .\")\";\n\n if ( !empty($_GET['_customer_user']) ) {\n // filter by user id/user email\n $user = new WP_User( $_GET['_customer_user'] );\n $user_email = $user->billing_email;\n\n if ( empty( $user_email ) ) {\n $user_email = $user->user_email;\n }\n\n $sql .= \" AND (\n user_id = \". esc_sql( absint( $user->ID ) ) .\" OR\n user_email = '\". esc_sql( sanitize_email( $user_email ) ) .\"'\n )\";\n }\n\n $order = 'desc';\n $order_column = 'send_on';\n\n if ( !empty( $_GET['orderby'] ) ) {\n $order_column = $_GET['orderby'];\n $order = strtolower( $_GET['order'] == 'asc' ) ? 'asc' : 'desc';\n\n if ( !isset( $sortable[ $order_column ] ) ) {\n $order_column = 'send_on';\n }\n\n if ( $order_column == 'user_id' ) {\n $order_column = \"user_id {$order}, user_email\";\n }\n }\n\n $sql .= \" ORDER BY {$order_column} {$order} LIMIT {$start},{$per_page}\";\n\n $this->items = $wpdb->get_results( $sql, ARRAY_A );\n\n $total_items = $wpdb->get_var(\"SELECT FOUND_ROWS()\");\n\n $this->set_pagination_args( array(\n 'total_items' => $total_items,\n 'per_page' => $per_page\n ) );\n\n }", "public function items()\n {\n return $this->hasMany(OrderItem::class)\n ->with('product');// Always fetch the product with the item info\n }", "public function getOrderedItemDetail($orderItems, $orderId) {\n $items = array ();\n $catalogProduct = Mage::getModel ( static::CATALOG_PRO );\n foreach ( $orderItems as $item ) {\n $product = array ();\n if ($item ['parent_item_id'] == '') {\n /**\n * load the product ID\n */\n \n $product ['entity_id'] = $item->product_id;\n $product ['price'] = number_format ( $item->getPrice (), 2, '.', '' );\n $product ['name'] = $item->getName ();\n $_product = Mage::getModel ( static::CATALOG_PRO )->load ( $item->product_id );\n $product ['image_url'] = ( string ) Mage::helper ( 'catalog/image' )->init ( $_product, 'thumbnail' );\n $product ['qty'] = strval ( $item ['qty_ordered'] );\n $product ['row_total'] = number_format ( $item ['base_row_total'], 2, '.', '' );\n \n $product_options = $item ['product_options'];\n $super_attribute = unserialize ( $product_options );\n if (isset ( $super_attribute [static::ATTR_INFO] )) {\n $product [static::ATTR_INFO] = $super_attribute ['attributes_info'];\n } else {\n $product [static::ATTR_INFO] = array ();\n }\n if (isset ( $super_attribute [static::OPTIONS] )) {\n $product [static::OPTIONS] = $super_attribute [static::OPTIONS];\n } else {\n $product [static::OPTIONS] = array ();\n }\n if (Mage::getStoreConfig ( 'marketplace/marketplace/activate' )) {\n \n $catalogProduct->load ( $item->product_id );\n /**\n * Get the Seller ID\n */\n $sellerId = $catalogProduct->getSellerId ();\n /**\n * Get the Item order status\n */\n $sellerStatus = $this->getMarketplaceStatus ( $sellerId, $item->product_id, $orderId );\n $product [static::SELLER_STATUS] = $sellerStatus [static::SELLER_STATUS];\n $product [static::SELLER_ID] = $sellerStatus [static::SELLER_ID];\n }\n \n $items [] = $product;\n }\n }\n return $items;\n }", "public function items(): HasMany\n {\n return $this->hasMany(OrderItem::class);\n }", "private function get_products(){\n\n //Get product lines\n $order_items = $this->order->get_items();\n $items = array();\n \n foreach($order_items as $data){\n \n \n $_tax = new WC_Tax();\n $_product = get_product( $data['variation_id'] ? $data['variation_id'] : $data['product_id'] );\n $rates = array_shift( $_tax->get_rates( $_product->get_tax_class() ) );\n $product_dph = round( array_shift( $rates ) );\n\n $item = array(\n 'price' => $this->order->get_item_subtotal( $data, true, true ),\n 'name' => $this->item_name( $data ),\n 'code' => $data['product_id'],\n 'count' => $data['qty'],\n 'vat' => $product_dph,\n 'including_vat' => true,\n );\n\n if ( isset( $data['variation_id'] ) && $data['variation_id'] > 0 )\n $product_id = $data['variation_id'];\n else\n $product_id = $data['product_id'];\n\n $product = wc_get_product( $product_id );\n $virtual = $product->is_virtual(); \n if( $virtual ){\n $item['electronically_supplied_service'] = true;\n }else{\n $item['electronically_supplied_service'] = false;\n } \n\n $items[] = $item;\n\n }\n\n return $items;\n }", "function theme_xero_lineitems($items, $subtotal, $tax, $total) {\n $header = array(t('Description'), t('Quantity'), t('Unit Price'), t('Tax'), t('Amount'), t('Account'), t('Category'));\n $rows = array();\n\n foreach ($items as $item) {\n $row = array();\n $categories = '';\n\n $row[] = check_plain($item['Description']);\n $row[] = $item['Quantity'];\n $row[] = $item['UnitAmount'];\n $row[] = $item['TaxAmount'];\n $row[] = $item['LineAmount'];\n $row[] = $item['AccountCode'];\n\n if (!empty($item['Tracking'])) {\n foreach ($item['Tracking']['TrackingCategory'] as $category) {\n $categories .= check_plain($category['Option']);\n }\n $row[] = $categories;\n }\n\n $rows[] = $row;\n }\n\n $rows[] = array('', '', '', $tax, $subtotal);\n $rows[] = array('', '', '', '', '<b>' . $total . '</b>');\n\n return theme('table', $header, $rows, array('class' => 'xero-lineitems'), t('Line Items'));\n}", "public function woo_vou_get_product_details( $orderid, $items = array() ) {\r\r\n\r\r\n\t\t// If order id is empty then return\r\r\n\t\tif( empty($orderid) ) return false;\r\r\n\r\r\n\t\t// Taking some defaults\r\r\n\t\t$result_item = array();\r\r\n\r\r\n\t\t//Get Order\r\r\n\t\t$woo_order\t= new WC_Order( $orderid );\r\r\n\r\r\n\t\t// If item is empty or not passed then get from order.\r\r\n\t\tif( empty($items) || !is_array($items) ) {\r\r\n\t\t\t$woo_order_details \t= $woo_order;\r\r\n\t\t\t$items \t\t\t\t= $woo_order_details->get_items();\r\r\n\t\t}\r\r\n\r\r\n\t\tif( !empty( $items ) ) {\r\r\n\r\r\n\t\t\tforeach ( $items as $item_key => $item_val ) {\r\r\n\r\r\n\t\t\t\tif( isset( $item_val['product_id'] ) || $item_val['variation_id'] ) {\r\r\n\r\r\n\t\t\t\t\tif( !empty( $item_val['variation_id'] ) ) {\r\r\n\t\t\t\t\t\t$product_id = $item_val['variation_id'];\r\r\n\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t$product_id = $item_val['product_id'];\r\r\n\t\t\t\t\t}\r\r\n\r\r\n\t\t\t\t\t//Product name\r\r\n\t\t\t\t\t$result_item[$product_id]['product_name']\t= !empty($item_val['name']) ? $item_val['name'] : '';\r\r\n\t\t\t\t\t$result_item[$product_id]['item_key'] \t\t= $item_key;\r\r\n\r\r\n\t\t\t\t\t//Product price\r\r\n\t\t\t\t\tif( !empty( $item_val['qty'] ) ) {\r\r\n\t\t\t\t\t\t$product_price = ( $item_val['line_total'] / $item_val['qty'] );\r\r\n\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t$product_price = '';\r\r\n\t\t\t\t\t}\r\r\n\r\r\n\t\t\t\t\t$result_item[$product_id]['product_price']\t= $product_price;\r\r\n\t\t\t\t\t$result_item[$product_id]['product_formated_price']\t= $this->woo_vou_get_formatted_product_price( $orderid, $item_val);\r\r\n\r\r\n\t\t\t\t\t// Total order price\r\r\n\t\t\t\t\t$result_item[$product_id]['product_price_total'] = isset($item_val['line_total']) ? $item_val['line_total'] : '';\r\r\n\r\r\n\t\t\t\t\t$result_item[$product_id]['recipient_name'] = isset($item_val['woo_vou_recipient_name']) ? $item_val['woo_vou_recipient_name'] : '';\r\r\n\t\t\t\t\t$result_item[$product_id]['recipient_email'] = isset($item_val['woo_vou_recipient_email']) ? $item_val['woo_vou_recipient_email'] : '';\r\r\n\t\t\t\t\t$result_item[$product_id]['recipient_message'] = isset($item_val['woo_vou_recipient_message']) ? $item_val['woo_vou_recipient_message'] : '';\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t} // End of if \r\r\n\r\r\n\t\treturn apply_filters( 'woo_vou_get_product_details', $result_item, $orderid, $items );\r\r\n\t}", "public function prepare_items() {\n\t\t/** @var Give_Logging $give_logs */\n\t\tglobal $give_logs;\n\n\t\t$columns = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\t\t$current_page = $this->get_pagenum();\n\t\t$this->items = $this->get_logs();\n\t\t$total_items = $give_logs->get_log_count( $this->get_filtered_give_form(), 'sale', $this->get_meta_query() );\n\n\t\t$this->set_pagination_args( array(\n\t\t\t\t'total_items' => $total_items,\n\t\t\t\t'per_page' => $this->per_page,\n\t\t\t\t'total_pages' => ceil( $total_items / $this->per_page ),\n\t\t\t)\n\t\t);\n\t}", "public function getOrderItems()\n {\n return $this->hasMany(OrderItem::className(), ['order_id' => 'id']);\n }", "public function getOrderItems()\n {\n return $this->hasMany(OrderItem::className(), ['order_id' => 'id']);\n }", "function wc_csv_export_modify_row_data( $order_data, $item, $order, $csv_generator ) {\n\n\t\t// Determine the product ID from the SKU, and use that to find the fund and appeal code\n\t\t$pid = wc_get_product_id_by_sku($item[sku]);\n\t\t$fund = wc_get_product_terms( $pid, 'pa_fund' );\n\t\t$appeal = wc_get_product_terms( $pid, 'pa_appeal-code' );\n\t\t$lwrgifts = wc_get_product_terms( $pid, 'pa_att-lwrgifts' );\n\t\t$prod_cats = wc_get_product_terms( $pid, 'product_cat' );\n\t\t\n\t\t\tforeach ($prod_cats as $prod_cat) {\n\t\t\t\t$cat_parent = $prod_cat->parent;\n\t\t\t}\n\t\t\tif ($cat_parent != '0' ) {\n\t\t\t\t$parent_cat = get_term_by( 'id', $cat_parent, 'product_cat' ); // implode( ', ', $cat_name );\n\t\t\t\t$cats = $parent_cat->name;\n\t\t\t} else {\n\t\t\t\t$cats = $prod_cat->name;\n\t\t\t}\n\n\t\t$date = $order->order_date;\n\t\t$new_date = date('n-d-Y', strtotime($date) );\n\t\t\n\t\t\t\t\t\t\t\n\t\t// Add the fund & appeal code to the order_data & return each line\n\t\t$order_data['order_date'] = $new_date;\n\t\t$order_data['fund'] = $fund[0];\n\t\t$order_data['appeal'] = $appeal[0];\n\t\t$order_data['lwrgifts'] = $lwrgifts[0];\n\t\t$order_data['prod_cats'] = $cats;\n\t\t$order_data['addl_info'] = $item['meta'];\n\t\t\n\t\t// print_r($parent_cat);\n\t\treturn $order_data;\n\t\t\t\n\t}", "public function items(): HasMany\n {\n return $this->hasMany(Item::class, 'order_id', 'id');\n }", "function poItems($id)\n\t{\n\t\t$sql_item=\"select * from `purchase_orders_items` where `po_id`='\".$id.\"' ORDER BY FIELD(`type`, 'accomodation', 'accomodation_ed', 'holidayDiscount','adminFee','holidayAdminFeeDiscount','custom')\";\n\t\t $queryItem=$query=$this->db->query($sql_item);\n\t\treturn $queryItem->result_array();\n\t}", "function wc_get_formatted_cart_item_data($cart_item, $flat = \\false)\n {\n }", "public function prepare_item_for_export($item);", "public function orderItems()\n\t{\n\t\treturn $this->hasMany('App\\Models\\OrderItem');\n\t}", "function demorati_get_user_order_items($oid) {\n $sql = array();\n \n $sql[] = \"SELECT i.title,\";\n $sql[] = \" i.quantity,\";\n $sql[] = \" i.cost,\";\n $sql[] = \" i.quantity * i.cost as total\";\n $sql[] = \"FROM demorati_order_item i\";\n $sql[] = \"WHERE i.oid = :oid\";\n $sql[] = \"AND i.deleted IS NULL\";\n \n $params = array(\n ':oid' => $oid\n );\n \n return db_query(\n implode(PHP_EOL, $sql), \n $params\n )->fetchAll();\n }", "public function testGatherOrderItemsData()\n {\n $expected = [15 => ['qty_shipped' => 1050, 'qty_returned' => 100500]];\n $this->assertEquals($expected, $this->grid->getOrderItemsData());\n }", "function cuspricecal_price_table(){\n\t\tglobal $product; \n\t\t$product_id = $product->get_id();\n\t\t$_cuspricecalPdata = get_post_meta( $product_id, '_cuspricecalPdata', true );\n\t\tif ($_cuspricecalPdata['pluginStatus']) {\n\t\t\t?>\n\t\t\t<div>\n\t\t\t\t<h3><?php echo _e('Priceing Table', 'cus-price-cal');?></h3>\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th><?php echo _e('Qty', 'cus-price-cal');?>: </th>\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\tforeach ($_cuspricecalPdata['qty_rang'] as $pqty) {\n\t\t\t\t\t\t\t\tif (!empty($pqty)) {\n\t\t\t\t\t\t\t\t\techo '<th>'.$pqty.'</th>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</tr>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th><?php echo _e('Price', 'cus-price-cal');?>: </th>\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\tforeach ($_cuspricecalPdata['price'] as $pqtyprice) {\n\t\t\t\t\t\t\tif (!empty($pqtyprice)) {\n\t\t\t\t\t\t\techo '<th>'.$pqtyprice.'</th>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}", "protected function _getOrderItemsData()\n {\n if (is_null($this->_itemsData)) {\n $productIds = array();\n $itemData = array();\n $order = $this->_getOrder();\n if ($order->getId()) {\n foreach ($order->getAllItems() as $item) {\n $productIds[] = $item->getProductId();\n }\n if (count($productIds)) {\n $productSkus = Mage::helper('cueconnect/product')->getProductSkusByIds($productIds);\n }\n foreach ($order->getAllItems() as $item) {\n $productId = $item->getProductId();\n $productSku = array_key_exists($productId, $productSkus) ? $productSkus[$productId] : false;\n if (is_null($this->_firstProductSku)) {\n $this->_firstProductSku = $productSku;\n }\n if ($productSku) {\n $itemData[$productSku] = $item->getQtyOrdered() * 1;\n }\n }\n }\n $this->_itemsData = $itemData;\n }\n\n return $this->_itemsData;\n }", "function prepare_items() {\n\t\ttry {\n\t\t\tglobal $wpdb;\n\t\t\t$table_name = $this->table_name;\n\n\t\t\t$per_page = 5; // constant, how much records will be shown per page\n\n\t\t\t$columns = $this->get_columns();\n\t\t\t$hidden = array();\n\t\t\t$sortable = $this->get_sortable_columns();\n\n\t\t\t// here we configure table headers, defined in our methods\n\t\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\n\t\t\t// will be used in pagination settings\n\t\t\t$total_items = $wpdb->get_var( \"SELECT COUNT(rdb_id) FROM $table_name\" );\n\n\t\t\t// prepare query params, as usual current page, order by and order direction\n\t\t\t$paged = isset( $_REQUEST['paged'] ) ? max( 0, intval( $_REQUEST['paged'] ) - 1 ) : 0;\n\t\t\t$orderby = ( isset( $_REQUEST['orderby'] ) && in_array( $_REQUEST['orderby'], array_keys( $this->get_sortable_columns() ) ) ) ? $_REQUEST['orderby'] : 'created_at';\n\t\t\t$order = ( isset( $_REQUEST['order'] ) && in_array( $_REQUEST['order'], array( 'asc', 'desc' ) ) ) ? $_REQUEST['order'] : 'asc';\n\n\t\t\t// [REQUIRED] define $items array\n\t\t\t// notice that last argument is ARRAY_A, so we will retrieve array\n\t\t\t$this->items = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $table_name ORDER BY $orderby $order LIMIT %d OFFSET %d\", array( $per_page, $paged ) ), ARRAY_A );\n\n\t\t\t// [REQUIRED] configure pagination\n\t\t\t$this->set_pagination_args( array(\n\t\t\t\t'total_items' => $total_items, // total items defined above\n\t\t\t\t'per_page' => $per_page, // per page constant defined at top of method\n\t\t\t\t'total_pages' => ceil( $total_items / $per_page ) // calculate pages count\n\t\t\t) );\n\t\t} catch ( Exception $ex ) {\n\t\t\tFormidable2RdbManager::handle_exception( $ex->getMessage() );\n\t\t}\n\t}", "private function get_legacy_single_column_line_item( $order_data, WC_Order $order ) {\n\n\t\t$line_items = array();\n\n\t\tforeach ( $order->get_items() as $_ => $item ) {\n\n\t\t\t$product = $order->get_product_from_item( $item );\n\n\t\t\tif ( ! is_object( $product ) ) {\n\t\t\t\t$product = new WC_Product( 0 );\n\t\t\t}\n\n\t\t\t$line_item = $item['name'];\n\n\t\t\tif ( $product->get_sku() ) {\n\t\t\t\t$line_item .= ' (' . $product->get_sku() . ')';\n\t\t\t}\n\n\t\t\t$line_item .= ' x' . $item['qty'];\n\n\t\t\t$item_meta = new WC_Order_Item_Meta( $item );\n\t\t\t$variation = $item_meta->display( true, true );\n\n\t\t\tif ( $variation ) {\n\t\t\t\t$line_item .= ' - ' . str_replace( array( \"\\r\", \"\\r\\n\", \"\\n\" ), '', $variation );\n\t\t\t}\n\n\n\t\t\t$line_items[] = str_replace( array( '&#8220;', '&#8221;' ), '', $line_item );\n\t\t}\n\n\t\t$order_data['order_items'] = implode( '; ', $line_items );\n\n\t\t// convert country codes to full name\n\t\tif ( isset( WC()->countries->countries[ $order->billing_country ] ) ) {\n\t\t\t$order_data['billing_country'] = WC()->countries->countries[ $order->billing_country ];\n\t\t}\n\n\t\tif ( isset( WC()->countries->countries[ $order->shipping_country ] ) ) {\n\t\t\t$order_data['shipping_country'] = WC()->countries->countries[ $order->shipping_country ];\n\t\t}\n\n\t\t// set order ID to order number\n\t\t$order_data['order_id'] = ltrim( $order->get_order_number(), _x( '#', 'hash before the order number', 'woocommerce-customer-order-csv-export' ) );\n\n\t\treturn $order_data;\n\t}", "function prepare_items() \n {\n $per_page = 10;\n $columns = $this->get_columns();\n $hidden = array();\n $sortable = $this->get_sortable_columns();\n $this->_column_headers = array($columns, $hidden, $sortable);\n $this->process_bulk_action();\n \n $this->example_data = $this->get_users_points();\n $data = $this->example_data;\n \n usort($data, array($this, 'mwb_wpr_usort_reorder'));\n \n $current_page = $this->get_pagenum();\n $total_items = count($data);\n $data = array_slice($data,(($current_page-1)*$per_page),$per_page);\n $this->items = $data;\n $this->set_pagination_args( array(\n 'total_items' => $total_items, \n 'per_page' => $per_page, \n 'total_pages' => ceil($total_items/$per_page) \n ) ); \n \n }", "public function prepare_items() {\n\t\tglobal $orderby, $order, $s;\n\t\twp_reset_vars( array( 'orderby', 'order', 's' ) );\n\n\t\t// Maybe search in the items.\n\t\tif ( $s ) {\n\t\t\t$this->items = array_filter( $this->items, array( $this, '_search_callback' ) );\n\t\t}\n\n\t\t// Load actual tables after search for less memory consumption.\n\t\tforeach ( $this->items as &$item ) {\n\t\t\t// Don't load data nor table options.\n\t\t\t$item = TablePress::$model_table->load( $item, false, false );\n\t\t}\n\t\t// Break reference in foreach iterator.\n\t\tunset( $item );\n\n\t\t// Maybe sort the items.\n\t\t$_sortable_columns = $this->get_sortable_columns();\n\t\tif ( $orderby && ! empty( $this->items ) && isset( $_sortable_columns[ \"table_{$orderby}\" ] ) ) {\n\t\t\tusort( $this->items, array( $this, '_order_callback' ) );\n\t\t}\n\n\t\t// Number of records to show per page.\n\t\t$per_page = 15; // hard-coded, as there's no possibility to change this in the Thickbox\n\t\t// Page number the user is currently viewing.\n\t\t$current_page = $this->get_pagenum();\n\t\t// Number of records in the array.\n\t\t$total_items = count( $this->items );\n\n\t\t// Slice items array to hold only items for the current page.\n\t\t$this->items = array_slice( $this->items, ( ( $current_page - 1 ) * $per_page ), $per_page );\n\n\t\t// Register pagination options and calculation results.\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $total_items, // Total number of records/items\n\t\t\t'per_page' => $per_page, // Number of items per page\n\t\t\t'total_pages' => ceil( $total_items / $per_page ), // Total number of pages\n\t\t) );\n\t}", "protected function getSendquoteItems($quotation)\n {\n $tableHtml = '<table>';\n $tableHtml.= '<td>'.__('Sku').'</td>';\n $tableHtml.= '<td>'.__('Name').'</td>';\n $tableHtml.= '<td>'.__('Description').'</td>';\n $tableHtml.= '<td>'.__('Price Quote').'</td>';\n $tableHtml.= '</tr>';\n foreach($quotation->getItemCollection() as $_item){\n $tableHtml.= '<tr>';\n $tableHtml.= '<td>'.$_item->getProduct()->getData('sku').'</td>';\n $tableHtml.= '<td>'.$_item->getProduct()->getData('name').'</td>';\n $tableHtml.= '<td>'.$_item->getDescription().'</td>';\n $tableHtml.= '<td>'.($_item->getQty()*1).'</td>';\n $tableHtml.= '<td>'.$this->getFormatedPrice($_item->getCustomPrice()).'</td>';\n $tableHtml.= '</tr>';\n }\n $tableHtml.= '</table>';\n return $tableHtml;\n }", "function wc_get_account_orders_columns()\n {\n }", "function cart_items_info()\n\t{\n\t\tglobal $TMPL, $REGX, $FNS;\n\n\t\t$this->_session_start();\n\n\t\t$items = $this->_get_cart_items(FALSE, $TMPL->fetch_param('orderby'), $TMPL->fetch_param('sort'));\n\t\t\n\t\t$limit = $TMPL->fetch_param('limit');\n\t\t\n\t\t$offset = $TMPL->fetch_param('offset');\n\n\t\t$return_data = '';\n\n\t\t$total_results = count($items);\n\n\t\t$count = 0;\n\n\t\t$absolute_count = 0;\n\n\t\t$cart_data = array(\n\t\t\t'total_unique_items'=>$this->total_unique_items(),\n\t\t\t'total_items'=>$this->total_items(),\n\t\t\t'cart_total'=>$this->cart_total(),\n\t\t\t'cart_subtotal'=>$this->cart_subtotal(),\n\t\t\t'cart_tax'=>$this->cart_tax(),\n\t\t\t'cart_tax_name'=>$this->_get_tax_name(),\n\t\t\t'cart_discount'=>$this->cart_discount(),\n\t\t\t'cart_tax_rate'=>$this->_get_tax_rate(TRUE,( ! empty($this->settings['tax_use_shipping_address'])) ? 'shipping_' : ''),\n\t\t\t'cart_shipping'=>$this->cart_shipping(),\n\t\t\t'shipping_option'=>$this->_get_shipping_option()\n\t\t);\n\t\t\n\t\t$this->_load_typography();\n\n\t\tforeach ($items as $row_id => $item)\n\t\t{\n\t\t\t$absolute_count++;\n\t\t\t\n\t\t\tif ($offset !== FALSE && $absolute_count <= $offset)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$count++;\n\n\t\t\t$tagdata = $TMPL->tagdata;\n\n\t\t\t$cond = array();\n\n\t\t\tforeach ($cart_data as $key => $value)\n\t\t\t{\n\t\t\t\t$cond[$key] = (bool) ((float) $this->_sanitize_number($value));\n\t\t\t}\n\n\t\t\t// thanks to JamieR\n\t\t\tforeach ($item as $key => $value)\n\t\t\t{\n\t\t\t\tif ($key == 'item_options') \n\t\t\t {\n\t\t\t\t\tforeach ($item[$key] as $option => $option_val)\n\t\t\t\t\t{\n\t\t\t\t\t$cond[$key . ':' . $option] = TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$cond[$key] = (bool) ((float) $this->_sanitize_number($value));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t$entry_id = $item['entry_id'];\n\n\t\t\t$data = array_merge($this->_get_item_data($entry_id), $cart_data);\n\n\t\t\t$data['cart_count'] = $data['count'] = $count;\n\n\t\t\t$data['quantity'] = $item['quantity'];\n\n\t\t\t$data['index'] = $data['row_id'] = $row_id;\n\n\t\t\t$data['item_subtotal'] = $data['product_subtotal'] = $this->view_formatted_number($this->_get_item_price($entry_id, $row_id) * $item['quantity']);\n\n\t\t\t$data['item_weight'] = $data['product_weight'] = $this->_get_item_weight($entry_id, $row_id);\n\n\t\t\t$data['item_shipping'] = $data['product_shipping'] = $this->view_formatted_number($this->_calculate_item_shipping($entry_id, $row_id, $item['quantity']));\n\n\t\t\t$data['item_price'] = $data['product_price'] = $this->view_formatted_number($this->_get_item_price($entry_id, $row_id));\n\n\t\t\t$price_field = ( ! empty($item['weblog_id'])) ? $this->_get_price_field($item['weblog_id'], 'name') : NULL;\n\n\t\t\tif ($price_field && isset($data[$price_field]))\n\t\t\t{\n\t\t\t\t$data[$price_field] = $data['item_price'];\n\t\t\t}\n\n\t\t\t$price_mods = $this->_get_all_price_modifiers($entry_id);\n\n\t\t\tforeach ($TMPL->var_single as $key => $val)\n\t\t\t{\n\t\t\t\tif (isset($data[$val]))\n\t\t\t\t{\n\t\t\t\t\t$tagdata = $TMPL->swap_var_single($val, $data[$val], $tagdata);\n\t\t\t\t}\n\n\t\t\t\tif (preg_match('/^switch/', $key))\n\t\t\t\t{\n\t\t\t\t\t$sparam = $FNS->assign_parameters($key);\n\n\t\t\t\t\t$sw = '';\n\n\t\t\t\t\tif (isset($sparam['switch']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$sopt = @explode(\"|\", $sparam['switch']);\n\t\t\t\t\t\t$sw = $sopt[($count + count($sopt)) % count($sopt)];\n\t\t\t\t\t}\n\n\t\t\t\t\t$tagdata = $TMPL->swap_var_single($key, $sw, $tagdata);\n\t\t\t\t}\n\n\t\t\t\tif (preg_match('/row_id_path(.*)?/', $key, $match))\n\t\t\t\t{\n\t\t\t\t\t$tagdata = $TMPL->swap_var_single($key, $FNS->create_url($FNS->extract_path($match[1]).'/'.$row_id), $tagdata);\n\t\t\t\t}\n\n\t\t\t\tif (preg_match('/entry_id_path(.*)?/', $key, $match))\n\t\t\t\t{\n\t\t\t\t\t$tagdata = $TMPL->swap_var_single($key, $FNS->create_url($FNS->extract_path($match[1]).'/'.$entry_id), $tagdata);\n\t\t\t\t}\n\n\t\t\t\tif (preg_match('/^item_options?:(.*)/', $key, $match))\n\t\t\t\t{\n\t\t\t\t\t$item_options_key = $match[1];\n\n\t\t\t\t\tif (preg_match('/^(select:|input:)/', $item_options_key))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (preg_match('/(.+):(option_name|option_label|label|name)/', $item_options_key, $match))\n\t\t\t\t\t{\n\t\t\t\t\t\t$item_options_key = $match[1];\n\n\t\t\t\t\t\t$item_options_value = isset($item['item_options'][$item_options_key]) ? $item['item_options'][$item_options_key] : '';\n\n\t\t\t\t\t\t$option_name = '';\n\n\t\t\t\t\t\tif ( ! empty($data[$item_options_key]) && isset($item['item_options'][$item_options_key]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($price_mods as $price_mod)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($item_options_key == $price_mod['option_name'] && $item['item_options'][$item_options_key] == $price_mod['option'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$option_name = $price_mod['option_label'];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($item_options_value && isset($_SESSION['cartthrob']['item_option_names'][$item_options_key][$item_options_value]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$option_name = $_SESSION['cartthrob']['item_option_names'][$item_options_key][$item_options_value];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$tagdata = $TMPL->swap_var_single($key, $option_name, $tagdata);\n\t\t\t\t\t}\n\t\t\t\t\telse if (preg_match('/(.+):price/', $item_options_key, $match))\n\t\t\t\t\t{\n\t\t\t\t\t\t$item_options_key = $match[1];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$price = '';\n\n\t\t\t\t\t\tif ( ! empty($data[$item_options_key]) && isset($item['item_options'][$item_options_key]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($price_mods as $price_mod)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($item_options_key == $price_mod['option_name'] && $item['item_options'][$item_options_key] == $price_mod['option'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$price = $this->view_formatted_number($price_mod['price']);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$tagdata = $TMPL->swap_var_single($key, $price, $tagdata);\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$item_options_value = isset($item['item_options'][$item_options_key]) ? $item['item_options'][$item_options_key] : '';\n\n\t\t\t\t\t\t$tagdata = $TMPL->swap_var_single($key, $item_options_value, $tagdata);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($TMPL->var_pair as $key => $val)\n\t\t\t{\n\t\t\t\tif (preg_match('/^categories/', $key))\n\t\t\t\t{\n\t\t\t\t\tif (preg_match(\"/\".LD.\"$key\".RD.\"(.*?)\".LD.SLASH.'categories'.RD.\"/s\", $tagdata, $matches))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp = $matches[1];\n\n\t\t\t\t\t\t$output = '';\n\n\t\t\t\t\t\tforeach ($data['categories'] as $category)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output .= $temp;\n\n\t\t\t\t\t\t\tforeach ($category as $cat_key => $cat_val)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$output = str_replace(LD.$cat_key.RD, $cat_val, $output);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$tagdata = preg_replace(\"/\".LD.\"$key\".RD.\"(.*?)\".LD.SLASH.'categories'.RD.\"/s\", $output, $tagdata);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif (preg_match('/^number_format/', $key))\n\t\t\t\t{\n\t\t\t\t\t$search_key = str_replace('$', '\\$', $key);\n\t\t\t\t\t$search_key = str_replace('?', '\\?', $search_key);\n\n\t\t\t\t\tif (preg_match_all(\"/\".LD.$search_key.RD.\"(.*?)\".LD.SLASH.'number_format'.RD.\"/s\", $tagdata, $matches))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($matches[1] as $match)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$number = trim($match);\n\n\t\t\t\t\t\t\tif ($number[0] == LD && preg_match(\"/\".LD.\"(.*?)\".RD.\"/s\", $number, $num_matches) && isset($data[$num_matches[1]]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$number = $TMPL->swap_var_single($num_matches[1], $data[$num_matches[1]], $number);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$number = $this->_sanitize_number($number);\n\n\t\t\t\t\t\t\t$decimals = (isset($TMPL->var_pair[$key]['decimals']) && $TMPL->var_pair[$key]['decimals']) ? (int) $TMPL->var_pair[$key]['decimals'] : $this->number_format_defaults['decimals'];\n\t\t\t\t\t\t\t$dec_point = (isset($TMPL->var_pair[$key]['dec_point']) && $TMPL->var_pair[$key]['dec_point']) ? $TMPL->var_pair[$key]['dec_point'] : $this->number_format_defaults['dec_point'];\n\t\t\t\t\t\t\t$thousands_sep = (isset($TMPL->var_pair[$key]['thousands_sep']) && $TMPL->var_pair[$key]['thousands_sep']) ? $TMPL->var_pair[$key]['thousands_sep'] : $this->number_format_defaults['thousands_sep'];\n\t\t\t\t\t\t\t$prefix = (isset($TMPL->var_pair[$key]['prefix']) && $TMPL->var_pair[$key]['prefix']) ? $TMPL->var_pair[$key]['prefix'] : $this->number_format_defaults['prefix'];\n\t\t\t\t\t\t\t$prefix = (isset($TMPL->var_pair[$key]['space_after_prefix']) && $TMPL->var_pair[$key]['space_after_prefix']) ? $TMPL->var_pair[$key]['space_after_prefix'] : $this->number_format_defaults['space_after_prefix'];\n\n\t\t\t\t\t\t\t$output = str_replace('$', '\\$', str_replace('?', '\\?', $prefix.number_format($number, $decimals, $dec_point, $thousands_sep)));\n\n\t\t\t\t\t\t\t$tagdata = preg_replace(\"/\".LD.$search_key.RD.$match.LD.SLASH.'number_format'.RD.\"/s\", $output, $tagdata);\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$tagdata = $TMPL->swap_var_single('total_results', $total_results, $tagdata);\n\n\t\t\t$cond = array_merge(\n\t\t\t\t$cond,\n\t\t\t\tarray(\n\t\t\t\t\t'first_row'=>($count == 1),\n\t\t\t\t\t'last_row'=>($count == $total_results),\n\t\t\t\t\t'discounted'=>(bool) $this->_sanitize_number($cart_data['cart_discount']),\n\t\t\t\t\t'is_on_the_fly'=>$this->_is_item_on_the_fly($item),\n\t\t\t\t\t'has_item_options'=>isset($item['item_options']),\n\t\t\t\t\t'no_item_options'=>empty($item['item_options'])\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ($this->_purchased_items_weblog && $this->_purchased_items_id_field)\n\t\t\t{\n\t\t\t\t$cond['has_purchased'] = $this->_has_purchased($entry_id);\n\t\t\t}\n\n\t\t\t$tagdata = $FNS->prep_conditionals($tagdata, $cond);\n\n\t\t\t$item['row_id'] = $row_id;\n\n\t\t\t$tagdata = $this->_parse_item_option_inputs($tagdata, $item, $data);\n\t\t\t\n\t\t\t$tagdata = $this->TYPE->parse_file_paths($tagdata);\n\n\t\t\t$return_data .= $tagdata;\n\t\t\t\n\t\t\tif ($limit !== FALSE && $count >= $limit)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! count($_SESSION['cartthrob']['items']))\n\t\t{\n\t\t\t$return_data .= $TMPL->no_results;\n\t\t}\n\n\t\treturn $return_data;\n\t}", "public function getLineItems();", "public function renderItems()\n {\n $models = $this->dataProvider->getModels();\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach (array_values($models) as $index => $model) {\n /* $this->groupCounter++;\n if($this->groupCounter == 3){\n $this->groupTriger = true;\n\n array_push($rows, \"<div class=\\\"product_group\\\">\");\n //.'<div class=\"product_group\">';\n $this->groupCounter = 0;\n var_dump($rows);\n }\n*/\n $key = $keys[$index];\n if (($before = $this->renderBeforeItem($model, $key, $index)) !== null) {\n $rows[] = $before;\n }\n\n $rows[] = $this->renderItem($model, $key, $index);\n\n if (($after = $this->renderAfterItem($model, $key, $index)) !== null) {\n $rows[] = $after;\n }\n /* if($this->groupTriger){\n $this->groupTriger = false;\n array_push($rows, \"</div>\");\n //$rows = $rows .'</div>';\n\n }\n */\n }\n\n return implode($this->separator, $rows);\n }", "function wc_add_order_item($order_id, $item_array)\n {\n }", "function generate_checkout_list($array) {\n $conn = setup_connect_to_db();\n\n $total_price = 0;\n\n foreach($array as $item_id => $quantity) {\n generate_checkout_item($total_price, $item_id, $quantity, $conn);\n }\n\n $total_price_disp = number_format($total_price, 2);\n \n $output = <<<HEREDOC\n <tr class=\"total\">\n <td class=\"left\">Total:</td>\n <td class=\"right\">&#36;$total_price_disp</td>\n </tr>\nHEREDOC;\n\n echo $output;\n }", "public function prepare_items() {\n $columns = $this->get_columns(); // NHUNG GI CAN HIEN THI TREN BANG \n $hidden = $this->get_hidden_columns(); // NHUNG COT TA SE AN DI\n $sorttable = $this->get_sortable_columns(); // CAC COT DC SAP XEP TANG HOAC GIAM DAN\n\n $this->_column_headers = array($columns, $hidden, $sorttable); //DUA 3 GIA TRI TREN VAO DAY DE SHOW DU LIEU\n $this->items = $this->table_data(); // LAY DU LIEU TU DATABASE\n\n $total_items = $this->total_items(); // TONG SO DONG DA LIEU\n $per_page = $this->_pre_page; // SO TRANG \n $total_pages = ceil($total_items / $per_page); // TONG SO TRANG\n// PHAN TRANG\n $args = array(\n 'total_items' => $total_items,\n 'per_page' => $per_page,\n 'total_pages' => $total_pages\n );\n $this->set_pagination_args($args);\n }", "function get_items_manage_table($items, $controller) {\n $CI = & get_instance();\n // $has_cost_price_permission = $CI->Employee->has_module_action_permission('items', 'see_cost_price', $CI->Employee->get_logged_in_employee_info()->person_id);\n $table = '<table class=\"table tablesorter table-bordered table-striped table-hover\" id=\"sortable_table\">';\n\n $headers = array('<input type=\"checkbox\" id=\"select_all\" />',\n $CI->lang->line('items_unique_id'),\n $CI->lang->line('items_name'),\n $CI->lang->line('items_name_kh'),\n $CI->lang->line('items_category'),\n $CI->lang->line('items_model'),\n $CI->lang->line('items_current_stock'),\n $CI->lang->line('items_average'),\n $CI->lang->line('common_view'),\n $CI->lang->line('common_action'),\n );\n $table.='<thead><tr>';\n $count = 0;\n foreach ($headers as $header) {\n $count++;\n\n if ($count == 1) {\n $table.=\"<th class='leftmost'>$header</th>\";\n } elseif ($count == count($headers)) {\n $table.=\"<th class='rightmost'>$header</th>\";\n } else {\n $table.=\"<th>$header</th>\";\n }\n }\n $table.='</tr></thead><tbody id=\"bodyDrop\">';\n $table.=get_items_manage_table_data_rows($items, $controller);\n $table.='</tbody></table>';\n return $table;\n}", "public function getOrderItems()\n {\n return $this->hasMany(OrderItems::className(), ['orderId' => 'orderId']);\n }", "function print_orders($value, $key){\n global $orders;\n echo \"<tr>\" .\n \"<td>$key</td>\" .\n \"<td>$value</td>\" .\n \"</tr>\";\n }", "protected function prepare_line_items($order)\n {\n }", "public function getItems()\n {\n return $this->order->getItems();\n }", "public function prepare_items() {\n\n $columns = $this->get_columns();\n $hidden_columns = $this->get_hidden_columns();\n $sortable = $this->get_sortable_columns();\n\n $data = $this->get_table_data();\n\n $this->set_pagination_args( array(\n 'total_items' => $this->total_items,\n 'per_page' => $this->items_per_page\n ));\n\n $this->_column_headers = array( $columns, $hidden_columns, $sortable );\n $this->items = $data;\n\n }", "public function orderItems(){\n return $this->hasMany(OrderItem::class);\n }", "public static function save_order_items()\n {\n }", "function store_cart_list_products() {\n global $post;\n\n\t\t$products = get_post_meta($post->ID, '_store_cart_products', true);\n\n\t\t// List out created options as a table\n\t\tif ( is_array($products) ) : ?>\n\n\t\t\t<div id=\"store-attached-table-wrapper\">\n\t\t\t\t<table class=\"wp-list-table widefat fixed pages\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"col\" id=\"cb\" class=\"manage-column column-cb check-column\">\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th scope=\"col\" id=\"title\" class=\"manage-column column-title\" style=\"\">\n\t\t\t\t\t\t\t\t<span>Product</span>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th scope=\"col\" class=\"manage-column\">Options</th>\n\t\t\t\t\t\t\t<th scope=\"col\" class=\"manage-column\">\n\t\t\t\t\t\t\t\t<span>Qty.</span>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th scope=\"col\" class=\"manage-column\">\n\t\t\t\t\t\t\t\t<span>Price</span>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\n\t\t\t\t\t\t<?php $count = 0;\n\t\t\t\t\t\t\tforeach ( $products as $prod_id => $prod_qty ) :\n\t\t\t\t\t\t\t$product = get_post($prod_id); $count++; ?>\n\n\t\t\t\t\t\t\t<tr id=\"post-<?php $product->ID; ?>\" class=\"post-<?php $product->ID; ?> <?php echo $count % 2 == 0 ? 'alternate' : '';?>\">\n\t\t\t\t\t\t\t\t<th scope=\"row\" class=\"check-column\">\n\t\t\t\t\t\t\t\t\t<?php if ( true ) : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"dashicons dashicons-yes store-variant-enabled\" style=\"margin-left: 5px;\"></div>\n\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t<td class=\"post-title page-title column-title\">\n\t\t\t\t\t\t\t\t\t<?php $root_id = store_get_product_id($product); ?>\n\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t<?php echo get_the_title($root_id); ?>\n\t\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td><?php echo get_the_title($product->ID); ?></td>\n\t\t\t\t\t\t\t\t<td><?php echo $prod_qty; ?></td>\n\t\t\t\t\t\t\t\t<td><?php echo number_format( ($product->_store_price / 100), 2, '.', '') ; ?></td>\n\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t<?php endforeach; ?>\n\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t<?php endif;\n\n }", "function get_items_manage_table($items,$controller)\n{\n\t$CI =& get_instance();\n\t$table='<table class=\"tablesorter\" id=\"sortable_table\">';\n\n\t$headers = array('<input type=\"checkbox\" id=\"select_all\" />',\n//\t$CI->lang->line('items_item_number'),\n\t$CI->lang->line('items_name'),\n\t$CI->lang->line('items_category'),\n\t$CI->lang->line('items_cost_price'),\n\t$CI->lang->line('items_unit_price'),\n//\t$CI->lang->line('items_tax_percents'),\n//\t$CI->lang->line('items_quantity'),\n\t'&nbsp;',\n//\t$CI->lang->line('items_inventory')\n\t);\n\n\t$table.='<thead><tr>';\n\tforeach($headers as $header)\n\t{\n\t\t$table.=\"<th>$header</th>\";\n\t}\n\t$table.='</tr></thead><tbody>';\n\t$table.=get_items_manage_table_data_rows($items,$controller);\n\t$table.='</tbody></table>';\n\treturn $table;\n}", "protected function getItemTableQuery()\n {\n \t// Create a new query object.\n \t$db\t\t= $this->getDbo();\n \t$query\t= $db->getQuery(true);\n \n \t// Select the required fields from the table.\n \t//\n \t//\t\t\n \t\n \t$query->select('i.id, i.order_id, i.product_id, i.product_sku, c.title as category, \n \t\t\tpp.title as parent, i.product_name, i.file_name, i.product_quantity, i.product_item_price,\n \t\t\ti.end_date, i.downloads, i.created, i.modified, i.product_in_stock, os.name as status_name,\n \t\t\tu.name, u.email');\n \t$query->from('`#__mymuse_order_item` AS i');\n \t$query->join('LEFT', '#__mymuse_order as o ON i.order_id=o.id');\n \t$query->join('LEFT', '#__users as u on u.id=o.user_id');\n \t$query->join('LEFT', '#__mymuse_product as p on p.id=i.product_id');\n \t$query->join('LEFT', '#__categories as c on c.id=p.catid');\n \t$query->join('LEFT', '#__mymuse_product as pp on pp.id=p.parentid');\n \t\n \n \t// Join over the order_status for the status name.\n \t$query->select('os.name AS status_name');\n \t$query->join('LEFT', '#__mymuse_order_status AS os ON os.code=o.order_status');\n \n \n \t// Filter by order_status\n \t$order_status = $this->getState('filter.order_status');\n \tif (is_string($order_status) && $order_status != '0') {\n \t\t$query->where('o.order_status = \"'.$order_status.'\"');\n \t} else if ($order_status === '') {\n \t\t//$query->where('(a.order_status IN (SELECT code from #__mymuse_order_status))');\n \t}\n \n \t//filter by date\n \t$start_date = $this->getState('filter.start_date');\n \t$end_date = $this->getState('filter.end_date');\n \t$datenow = JFactory::getDate();\n \t$now = $datenow->format(\"%Y-%m-%d\");\n \n \tif($start_date== $now && $end_date == $now ){\n \t\t$start_date = '';\n \t\t$end_date = '';\n \t}\n \n \t$where = array();\n \tif($start_date){\n \t\t$query->where(\"i.created >= '$start_date 00:00:00'\");\n \t}\n \tif($end_date){\n \t\t$query->where(\"i.created <= '$end_date 23:59:59'\");\n \t}\n \t \n \t//filter by cat and product\n \t$catid = $this->getState('filter.catid');\n \t \n \tif($catid){\n \t\t \n \t\t$prodids = $this->getState('list.prodids');\n \t\tif($prodids){\n \t\t\t$query->where(\"(i.product_id IN $prodids)\");\n \t\t}\n \t\t//$query->group('i.id');\n \t\t \n \t}\n \n \t// Filter by search in title\n \t$search = $this->getState('filter.search');\n \tif (!empty($search)) {\n \t\tif (stripos($search, 'id:') === 0) {\n \t\t\t$query->where('i.id = '.(int) substr($search, 3));\n \t\t} else {\n \t\t\t$search = $db->Quote('%'.$db->escape($search, true).'%');\n \t\t\t$query->where(\"u.name LIKE $search\");\n \t\t}\n \t}\n \n \t// Add the list ordering clause.\n \t$query->order($db->escape('i.id ASC'));\n //echo \"1. $query <br /><br />\"; exit;\n \treturn $query;\n }", "public function bodyLine($item) {\n\t\t$out = '<tr>';\n\t\tif (!empty($this->list_display)) {\n\t\t\t$i = 0;\n\t\t\tforeach ($this->list_display as $key=>$col) {\n\t\t\t\t$text = '';\n\t\t\t\tif (!is_array($col)) {\n\t\t\t\t\t$text = Gatuf_esc($item->$key);\n\t\t\t\t} else {\n\t\t\t\t\tif (is_null($this->extra)) {\n\t\t\t\t\t\t$text = $col[1]($col[0], $item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$text = $col[1]($col[0], $item, $this->extra);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($i == 0) {\n\t\t\t\t\t$text = $this->getEditAction($text, $item);\n\t\t\t\t}\n\t\t\t\t$class = (isset($this->extra_classes[$i]) and $this->extra_classes[$i] != '') ? ' class=\"'.$this->extra_classes[$i].'\"' : '';\n\t\t\t\t$out.='<td'.$class.'>'.$text.'</td>';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Exception('Paginador: oops, no se han definido la lista de campos a desplegar');\n\t\t\t$out.='<td>'.$this->getEditAction(Gatuf_esc($item), $item).'</td>';\n\t\t}\n\t\t$out .= '</tr>'.\"\\n\";\n\t\treturn $out;\n\t}", "function rsbp_display_order_item_meta( $item_id, $values, $cart_item_key ) {\n\t$discount = ld_woo_get_item_data( $cart_item_key, 'bulk_discount' );\n\t\n\tif ( $discount ) wc_add_order_item_meta( $item_id, 'bulk_discount', $discount );\n}", "function viewItemList(){\n $OrderProductID = $this->orderproductid[$this->j];\n\n $sql = \"SELECT * FROM quotation INNER JOIN delivery ON delivery.Q_ID = quotation.Q_ID\n WHERE delivery.D_ID = '{$OrderProductID}' \";\n\n return DB::run($sql);\n }", "public function prepare_items() {\n\t\t$total_items = $this->option( 'total_items' );\n\t\t$this->items = $this->table_data;\n\n\t\tif ( wponion_is_callable( $this->table_data ) ) {\n\t\t\t$this->items = wponion_callback( $this->table_data, array( $this->get_pagenum(), $this ) );\n\t\t}\n\n\t\tif ( false === $this->option( 'total_items' ) ) {\n\t\t\t$total_items = count( $this->items );\n\t\t} elseif ( wponion_is_callable( $this->option( 'total_items' ) ) ) {\n\t\t\t$total_items = wponion_callback( $this->option( 'total_items' ), array( $this->get_pagenum(), $this ) );\n\t\t}\n\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $total_items,\n\t\t\t'per_page' => $this->option( 'per_page' ),\n\t\t) );\n\t}", "public function prepare_items(){\n\n $per_page = $this->get_items_per_page( 'customer_list_per_page', 5 );\n\n $this->process_bulk_action();\n\n $data = $this->table_data();\n \n //search box\n $user_search_key = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';\n if( $user_search_key ) { \n $data = $this->filter_table_data( $data, $user_search_key );\n }\n \n $this->_column_headers = $this->get_column_info();\n\n //Paginate\n $table_page = $this->get_pagenum(); \n $this->items = array_slice( $data, ( ( $table_page - 1 ) * $per_page ), $per_page );\n $totalItems = count( $data );\n $this->set_pagination_args( array (\n 'total_items' => $totalItems,\n 'per_page' => $per_page,\n 'total_pages' => ceil( $totalItems/$per_page )\n ) );\n\n }", "public function getOrderItem() {\n return $this->orderItem;\n }", "function getInvItems(Request $req)\r\n{\r\n $inventories= DB::table('inventory')->where('archive',0)->orderBy('item_code','ASC')->get();\r\n $output = '';\r\n $count=0;\r\n foreach($inventories as $inventory){\r\n $output.=\"<tr id='trID_\".$inventory->Item_ID.\"'>\";\r\n\r\n if($inventory->Item_Quantity<=$inventory->Alarm_Quantity){\r\n $output.=\"<td><p style='color:red'><b>\".$inventory->Item_Code.\"</b></p></td>\";\r\n }\r\n else{\r\n $output.=\"<td><p><b>\".$inventory->Item_Code.\"</b></p></td>\";\r\n }\r\n $output.=\"<td>\".$inventory->Item_Description.\"</td>\r\n <td>\";\r\n \r\n $brand = \\DB::table('item_brands')->where('brand_id',$inventory->Item_Brand)->value('brand_name');\r\n \r\n $output.=$brand.\"\r\n </td>\r\n <td>\";\r\n \r\n $category = \\DB::table('item_categories')->where('category_id',$inventory->Item_Category)->value('item_category');\r\n \r\n $output.=$category.\r\n \"</td>\r\n <td>\";\r\n \r\n if($inventory->Item_Type==0){\r\n $output.=\"Item\";\r\n }\r\n else{\r\n $output.= \"Package\";\r\n }\r\n \r\n $output.=\"</td>\r\n <td>\".$inventory->Item_Quantity.\" \".$inventory->Item_Unit.\"s</td>\r\n <td>₱\".$inventory->Item_Price.\"</td>\r\n <td>\".$inventory->Alarm_Quantity.\" \".$inventory->Item_Unit.\"s</td>\r\n <td>\r\n <button class='view_btn btn btn-primary btn-action-invt'>\r\n <i class='fa fa-eye'></i>\r\n </button>\";\r\n\r\n if($inventory->Item_Type==0){\r\n $output.=\"<button class='update_item_btn btn btn-primary btn-action-invt'>\r\n <i class='fa fa-edit'></i>\r\n </button>\";\r\n }\r\n else{\r\n $output.=\"<button class='update_pckg_btn btn btn-primary btn-action-invt'>\r\n <i class='fa fa-edit'></i>\r\n </button>\";\r\n }\r\n $output.=\"<button class='archive_btn btn btn-danger btn-action-invt'>\r\n <i class='fa fa-times'></i>\r\n </button>\r\n </td></tr>\";\r\n }\r\n$record = array(\r\n 'notification' => $output,\r\n 'unseen_notification' => $count\r\n);\r\n\r\necho json_encode($record);\r\n}", "public function getItems()\n {\n $items = array();\n $date = Mage::getModel('core/date')->date('m/d/Y H:i:s', $this->_order->getCreatedAt());\n\n foreach ($this->_order->getItemsCollection() as $item) {\n $items [] = array(\n 'price' => (float)$item->getRowTotalInclTax(),\n 'item_id' => $item->getProductId(),\n 'email' => $this->_order->getCustomerEmail(),\n 'timestamp' => $date,\n 'action_type' => 1 // action_type 1 is a purchase in SimpleRelevance's API\n );\n }\n\n return $items;\n }", "private function renderItems()\n {\n $items = [];\n\n foreach ($this->items as $k => $item) {\n $currentItemOptions = ArrayHelper::getValue($item, 'options', ['class' => 'col-md-2']);\n $itemOptions = ArrayHelper::merge($this->itemOptions, $currentItemOptions);\n\n if (ArrayHelper::getValue($item, 'disabled', $this->disabled)) {\n $itemFilterClass = substr($this->clientOptions['filter'], 1);\n Html::addCssClass($itemOptions, [$filterItem, $this->disabledClass]);\n }\n\n $itemTag = ArrayHelper::remove($itemOptions, 'tag', 'div');\n $content = is_string($item) ? $item : ArrayHelper::getValue($item, 'content', 'Item ' . $k);\n $items[] = Html::tag($itemTag, $content, $itemOptions);\n }\n\n return implode(PHP_EOL, $items);\n }", "public static function load_order_items()\n {\n }", "function prepare_items() {\n global $wpdb;\n\n /**\n * First, lets decide how many records per page to show\n */\n $per_page = 30;\n\n /**\n * Now we need to define our column headers.\n */\n $columns = $this->get_columns();\n $hidden = array();\n $sortable = $this->get_sortable_columns();\n\n /**\n * REQUIRED. Finally, we build an array to be used by the class for column\n * headers. The $this->_column_headers property takes an array which contains\n * 3 other arrays. One for all columns, one for hidden columns, and one\n * for sortable columns.\n */\n $this->_column_headers = array($columns, $hidden, $sortable);\n\n /* -- Preparing your query -- */\n $kocf_signup_table_name = $wpdb->prefix . KOCF_SIGNUP_TABLE;\n $query = \"SELECT * FROM $kocf_signup_table_name\";\n\n /* -- Ordering parameters -- */\n //Parameters that are going to be used to order the result\n $orderby = !empty($_REQUEST[\"orderby\"]) ? $_REQUEST[\"orderby\"] : 'user_id';\n $order = !empty($_REQUEST[\"order\"]) ? $_REQUEST[\"order\"] : 'asc';\n $orderByString = sanitize_sql_orderby($orderby. ' ' .$order);\n if(!empty($orderby) & !empty($order)){ $query.=' ORDER BY '.$orderByString; }\n\n /* -- Pagination parameters -- */\n /**\n * REQUIRED for pagination. Let's figure out what page the user is currently\n * looking at. We'll need this later, so you should always include it in\n * your own package classes.\n */\n $current_page = $this->get_pagenum();\n\n /**\n * REQUIRED for pagination. Let's check how many items are in our data array.\n * In real-world use, this would be the total number of items in your database,\n * without filtering. We'll need this later, so you should always include it\n * in your own package classes.\n */\n //Number of elements in your table?\n $total_items = $wpdb->query($query); //return the total number of affected rows\n //How many to display per page?\n /**\n * REQUIRED. We also have to register our pagination options & calculations.\n */\n $this->set_pagination_args( array(\n 'total_items' => $total_items, //WE have to calculate the total number of items\n 'per_page' => $per_page, //WE have to determine how many items to show on a page\n 'total_pages' => ceil($total_items/$per_page) //WE have to calculate the total number of pages\n ) );\n\n /* -- Fetch the items -- */\n $this->items = $wpdb->get_results($query);\n }", "public function orderItems()\n {\n return $this->hasMany('App\\Models\\WebOrderItem','order_id');\n }", "public function getItemListToCart()\n {\n\n // get the order items\n $order_items = $this->items->load();\n\n $items = array();\n foreach ($order_items as $item) {\n\n /** @var OrderableInterface $model */\n $model = $item->item_data;\n\n $items[] = (object)array(\n 'quantity' => $item->quantity,\n 'amount' => $item->price,\n 'tax' => $item->tax,\n 'type' => $model->getOrderType(),\n 'currency' => $item->currency,\n 'name' => $model->getName()\n );\n }\n\n $sub_total = $this->sub_total;\n $tax = $this->tax;\n $order_total = $this->order_total;\n $currency = $this->currency;\n\n return compact('items', 'sub_total', 'tax', 'order_total', 'currency');\n }", "public function basketItems()\r\n {\r\n $this->tools();\r\n }", "public function renderItems()\n {\n $models = $this->dataProvider->getModels();\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n $bsCol = 0;\n foreach (array_values($models) as $index => $model) {\n $key = $keys[$index];\n if ($bsCol === 0) {\n $rows[] = '<div class=\"row\">';\n }\n $bsCol++;\n $rows[] = '<div class=\"col-sm-3\">';\n if (($before = $this->renderBeforeItem($model, $key, $index)) !== null) {\n $rows[] = $before;\n }\n\n $rows[] = $this->renderItem($model, $key, $index);\n\n if (($after = $this->renderAfterItem($model, $key, $index)) !== null) {\n $rows[] = $after;\n }\n $rows[] = \"</div>\";\n if ($bsCol === 4) {\n $rows[] = '</div>';\n $bsCol = 0;\n }\n }\n if ($bsCol !== 0) {\n $rows[] = '</div>';\n }\n\n return implode($this->separator, $rows);\n }" ]
[ "0.72410417", "0.6332113", "0.63251895", "0.6311477", "0.63068706", "0.63020736", "0.6268949", "0.6245759", "0.6215201", "0.62109804", "0.619153", "0.618872", "0.6148176", "0.6144151", "0.61172354", "0.6116874", "0.6041587", "0.6036071", "0.6008412", "0.6000804", "0.5992787", "0.59897125", "0.596755", "0.59545064", "0.59509593", "0.5928891", "0.59231466", "0.5919985", "0.59075886", "0.5904855", "0.5890299", "0.5886424", "0.58791274", "0.58753353", "0.58577406", "0.5841564", "0.58397806", "0.5829672", "0.5816702", "0.58138037", "0.5795302", "0.5790247", "0.5786612", "0.5783348", "0.5779796", "0.5768411", "0.5765451", "0.57558936", "0.57477343", "0.5743668", "0.57379013", "0.57379013", "0.5737098", "0.5725426", "0.5724919", "0.5722581", "0.57074904", "0.5706988", "0.5704801", "0.56911343", "0.5688805", "0.5686791", "0.56800187", "0.5678044", "0.5674968", "0.56674576", "0.56629854", "0.56592023", "0.56453896", "0.5644492", "0.56423825", "0.5642207", "0.5641816", "0.56379473", "0.5629662", "0.56237644", "0.5616746", "0.5612386", "0.56035763", "0.55994916", "0.5595254", "0.55949265", "0.55847824", "0.5581197", "0.5580417", "0.5577001", "0.5576855", "0.5573956", "0.5568686", "0.55621517", "0.55564183", "0.55533504", "0.5543835", "0.55408686", "0.5540164", "0.5539511", "0.552827", "0.55282414", "0.552527", "0.5517143" ]
0.77402335
0
woocommerce_pip_template function. Get template directory
Функция woocommerce_pip_template. Получение каталога шаблонов
function woocommerce_pip_template( $type, $template ) { $templates = array(); if ( file_exists( trailingslashit( get_stylesheet_directory() ) . 'woocommerce/woocommerce-pip-template/' . $template ) ) { $templates['uri'] = trailingslashit( get_stylesheet_directory_uri() ) . 'woocommerce/woocommerce-pip-template/'; $templates['dir'] = trailingslashit( get_stylesheet_directory() ) . 'woocommerce/woocommerce-pip-template/'; } else { $templates['uri'] = woocommerce_pip_get_plugin_url() . '/woocommerce-pip-template/'; $templates['dir'] = woocommerce_pip_get_plugin_path() . '/woocommerce-pip-template/'; } return $templates[$type]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function template_path()\n {\n return apply_filters('CW_TEMPLATE_PATH', 'codeswholesale-woocommerce/');\n }", "function auxin_woocommerce_template_path(){\n return 'templates/woocommerce/';\n}", "public function template_path(){\n\t\treturn apply_filters( 'wcic_template_path', '/' );\n\t}", "function wc_get_template($template_name, $args = array(), $template_path = '', $default_path = '')\n {\n }", "function getTemplatePath();", "function custom_mails_getTemplateDir() {\n\treturn __DIR__ . '/../woocommerce/templates/emails/';\n}", "public function getTemplatePath(): string;", "public static function getTemplatePath();", "public function getThemeTemplatePath();", "public function getTemplatePath();", "public function getTemplatePathAndFilename() {}", "public function getTemplatePathAndFilename() {}", "public function get_template_directory()\n {\n }", "public function template_path() {\n\t\t\treturn apply_filters( 'www_template_path', 'wolf-woocommerce-wishlist/' );\n\t\t}", "function wc_get_template_html($template_name, $args = array(), $template_path = '', $default_path = '')\n {\n }", "public function ts_get_template_path() {\n\t\t\n \treturn untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/';\n }", "function get_template_directory()\n{\n}", "function getTemplatePath() {\n\t\t$plugin =& $this->getThesisFeedPlugin();\n\t\treturn $plugin->getTemplatePath() . 'templates/';\n\t}", "function get_template_path() {\n $uri = parse_url( get_template_directory_uri() );\n return $uri[\"path\"];\n}", "protected function getTemplatePathAndFilename() {}", "abstract public function getTemplatePath();", "function getTemplateLocation() ;", "public function template_path()\n {\n return TDLW_TEMPLATES_DIR;\n }", "function gnj_locate_template($template_name, $template_path)\n {\n $template = locate_template($template_name);\n\n //Check woocommerce directory for older version\n if (!$template && class_exists('woocommerce')) {\n if (file_exists(WC()->plugin_path() . '/templates/' . $template_name)) {\n $template = WC()->plugin_path() . '/templates/' . $template_name;\n }\n }\n\n if (!$template) {\n $template = trailingslashit($template_path) . $template_name;\n }\n\n return $template;\n }", "protected function getTemplatePath()\n {\n\treturn $this->getPathByOptionOrConfig('templatePath', 'view_template_path');\n }", "public function getTemplatesDir(): string;", "public function template_path() {\n return apply_filters( 'store_api_template_path', 'store-api/' );\n }", "function wc_get_theme_slug_for_templates()\n {\n }", "function meager_get_template( ) {\n\tglobal $special_templates;\n\tglobal $config;\n\tif ( isset( $_REQUEST[ 'template' ] ) and is_dir( 'meager/templates/'.($template = str_replace( '/', '', $_REQUEST[ 'template' ]))))\n\t\treturn $_REQUEST[ 'template' ];\n\tforeach( $special_templates as $template => $active )\n\t\tif ( $active )\n\t\t\treturn $template;\n\treturn $config[ 'template' ];\n}", "public function getTemplatesDir();", "function wc_locate_template($template_name, $template_path = '', $default_path = '')\n {\n }", "protected function getModuleTemplatePath()\n {\n return __DIR__.'/../Generators/templates/modules/structure/';\n }", "public function template_path()\n {\n }", "public function getTemplateDir () {\n return __DIR__.'/../templates/';\n }", "public function template_path() {\n return apply_filters( 'wp_instagram_template_path', 'instagram/' );\n }", "public function getTemplateDir()\n {\n return $this->template_dir;\n }", "public function get_theme_template_file($template)\n {\n }", "public function templateDirectory(): String\n {\n return $this->templateDirectory;\n }", "public function getTemplateDir(): string\n {\n return $this->templateDir ? \\Swoft::getAlias($this->templateDir) : '';\n }", "function getTemplatePath()\n\t{\n\t\treturn $this->template_path;\n\t}", "public static function get_template_path() {\n return DIR.'app/templates/'.Session::get('template').'/';\n }", "public function getTemplatePath(): string\n {\n return $this->templatePath;\n }", "public function getTemplatePath()\n {\n // get template filename\n $useRepositoryLayer = config('generator.use_repository_layer', false);\n $useServiceLayer = config('generator.use_service_layer', false);\n\n if ($useServiceLayer && $useRepositoryLayer) {\n $templateFilename = 'Controller_Service';\n } elseif ($useRepositoryLayer) {\n $templateFilename = 'Controller_Repository';\n } else {\n $templateFilename = 'Controller_Request';\n }\n return 'scaffold/' . $templateFilename;\n }", "private function getTemplatePath($template) {\n if ($this->theme_overloading) {\n if ($file = locate_template([$template])) {\n return $file;\n }\n }\n\n return $this->template_directory . $template;\n }", "public static function getTemplate()\n {\n return Config::getInstance()->getDir()->template;\n }", "public final function getTemplatePath()\n\t{\n\t\treturn $this->getTemplateDir(0) . $this->getTemplatesDir() . DIRECTORY_SEPARATOR;\n\t}", "public function get_settings_template () {\n\t\treturn get_option( 'woo_template', array() );\n\t}", "protected function getTemplatePath()\n {\n return base_path('vendor/pradility/seedera/src/Templates/seeder.txt');\n }", "function get_template_directory_child() {\n $directory_template = get_template_directory_uri(); \n $directory_child = str_replace('storefront', '', $directory_template) . 'woostudies';\n return $directory_child;\n}", "function getTemplatePath()\r\n {\r\n \r\n if($this->status) return false;\r\n \r\n $file = explode(\".\", $this->row['file']);\r\n array_pop($file); \r\n //return preg_replace(\"@([^:])//+@\", \"$1/\", $_BASE.\"/cms/templates/\".implode(\".\", $file).\"/\");\r\n return make_base( \"/cms/templates/\".implode(\".\", $file) );\r\n }", "protected function getTemplatePath()\n {\n return $this->config->get('laroute.template');\n }", "function get_sTemplate($template) {\r\n\tif (file_exists(plugin_sDIR() . 'templates/' . strtolower(basename(TEMPLATEPATH)) . '/' . $template))\r\n\t\t$templatePath = plugin_sDIR() . 'templates/' . strtolower(basename(TEMPLATEPATH)) . '/' . $template;\r\n\telseif (file_exists(plugin_sDIR() . 'templates/' . $template))\r\n\t\t$templatePath = plugin_sDIR() . 'templates/' . $template;\r\n\telse\r\n\t\t$templatePath = '';\r\n\t\r\n\treturn (string) $templatePath;\r\n}", "public function getTemplatePath()\n {\n\n if ($this->tplInCode)\n return PATH_GW.'/';\n else\n return PATH_GW.'templates/';\n \n }", "public function getTemplatesPath()\n {\n return realpath( join($this->directory_separator, [ __DIR__ , '..', 'templates'] ));\n }", "public function getTemplatePath()\n {\n\n return $this->template_path;\n }", "protected function getTemplatePath() {\r\n\t\ttry {\r\n\t\t\treturn LBoxUtil::fixPathSlashes($this->templatePath .\"/\". $this->getTemplateFileName());\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "public static function getTemplatePath()\n\t{\n\t\treturn (static::$templatePath);\n\t}", "public function getTemplatePath() {\n\t\treturn $this->_options['templatePath'];\n\t}", "function get_template()\n{\n}", "private function resolveTemplate()\n\t{\t\t\t\n\t\t$templatePath = Helpers::JoinPaths([Config::$templatesFolder, $this->name . '.php']);\n\t\t\n\t\tif(!file_exists($templatePath))\n\t\t{\n\t\t\t# default template to config value\t\t\t\n\t\t\t$templatePath = Helpers::JoinPaths([Config::$templatesFolder, Config::$defaultTemplate]);\n\t\t}\n\n\t\treturn $templatePath;\t\t\n\t}", "public function getTemplateFile();", "public function getTemplatePath()\n {\n return $this->templatePath;\n }", "public function getTemplatePath()\n {\n return $this->templatePath;\n }", "public function getTemplatePath()\n {\n return $this->templatePath;\n }", "public function getTemplate()\n {\n if( isset($_POST['template']) ) {\n include_once(dirname(dirname(__DIR__)) . '/frontend/views/templates/' . $_POST['template'] . '.php');\n }\n \twp_die();\n }", "private function getTemplateFileName()\n\t{\n\t\t$template = \"inhalt.html\";\n\n\t\treturn array_reduce([\n\t\t\tPAPOO_ABS_PFAD.\"/styles/{$GLOBALS[\"cms\"]->style_dir}/templates/$template\",\n\t\t\tPAPOO_ABS_PFAD.\"/styles_default/templates/$template\"\n\t\t], function ($template, $filename) {\n\t\t\treturn $template !== false ? $template : (is_file($filename) ? $filename : $template);\n\t\t}, false);\n\t}", "function nm_woocommerce_disable_template_path() {\r\n\t\t\t// Returning an invalid template-path will ensure the default WooCommerce templates are used\r\n\t\t\treturn 'nm-woocommerce-disable/';\r\n\t\t}", "public function getTemplatePath(): string\n\t{\n\t\treturn \"Widget/{$this->type}.tpl\";\n\t}", "function thim_lp_template_path() {\n\t\tif ( thim_is_new_learnpress( '3.0' ) ) {\n\t\t\treturn 'learnpress-v3';\n\t\t}\n\n\t\treturn 'learnpress';\n\t}", "public function getTemplatePath()\n {\n return _PS_MODULE_DIR_.$this->module->name.'/views/templates/front/';\n }", "public function getTemplatePath(): string\n {\n return '@Core/components/carousel.html';\n }", "function template_loader( $template ) {\n\n\t\t$find = array( 'woocommerce.php' );\n\t\t$file = '';\n\n\t\tif ( is_tax( 'product_brand' ) ) {\n\n\t\t\t$term = get_queried_object();\n\n\t\t\t$file \t\t= 'taxonomy-' . $term->taxonomy . '.php';\n\t\t\t$find[] \t= 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';\n\t\t\t$find[] \t= $this->template_url . 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php';\n\t\t\t$find[] \t= $file;\n\t\t\t$find[] \t= $this->template_url . $file;\n\n\t\t}\n\n\t\tif ( $file ) {\n\t\t\t$template = locate_template( $find );\n\t\t\tif ( ! $template ) $template = $this->plugin_path() . '/templates/' . $file;\n\t\t}\n\n\t\treturn $template;\n\t}", "function et_get_template_include( $template )\n{\n\tglobal $et_mobile_path;\n\t$et_mobile_template_path = $et_mobile_path; //get_option('et_mobile_template_path');\n\tif(empty($et_mobile_template_path))\n\t\treturn $template;\n\telse\n\t\treturn dirname( $template ) . '/' . $et_mobile_template_path . '/' . basename($template);\n}", "public function get_template_path($template)\n {\n if (isset($this->templateCache[$template])) {\n return $this->templateCache[$template];\n }\n\n // the current module\n $modname = ModUtil::getName();\n\n foreach ($this->module as $module => $modinfo) {\n // prepare the values for OS\n $module = $modinfo['name'];\n\n $os_modname = DataUtil::formatForOS($modname);\n $os_module = DataUtil::formatForOS($module);\n $os_theme = DataUtil::formatForOS($this->theme);\n $os_dir = $modinfo['type'] == ModUtil::TYPE_MODULE ? 'modules' : 'system';\n\n $ostemplate = DataUtil::formatForOS($template);\n\n $relativepath = \"$os_dir/$os_module/templates\";\n $templatefile = \"$relativepath/$ostemplate\";\n $override = self::getTemplateOverride($templatefile);\n if ($override === false) {\n // no override present\n if (!System::isLegacyMode()) {\n if (is_readable($templatefile)) {\n $this->templateCache[$template] = $relativepath;\n return $relativepath;\n } else {\n return false;\n }\n }\n } else {\n if (is_readable($override)) {\n $path = substr($override, 0, strrpos($override, $ostemplate));\n $this->templateCache[$template] = $path;\n return $path;\n }\n }\n\n // The rest of this code is scheduled for removal from 1.4.0 - drak\n\n // check the module for which we're looking for a template is the\n // same as the top level mods. This limits the places to look for\n // templates.\n if ($module == $modname) {\n $search_path = array(\n \"themes/$os_theme/templates/modules/$os_module\", // themepath\n \"config/templates/$os_module\", //global path\n \"$os_dir/$os_module/templates\", // modpath\n \"$os_dir/$os_module/pntemplates\", // modpath old\n );\n } else {\n $search_path = array(\"themes/$os_theme/templates/modules/$os_module/$os_modname\", // themehookpath\n \"themes/$os_theme/templates/modules/$os_module\", // themepath\n \"config/templates/$os_module/$os_modname\", //globalhookpath\n \"config/templates/$os_module\", //global path\n \"$os_dir/$os_module/templates/$os_modname\", //modhookpath\n \"$os_dir/$os_module/templates\", // modpath\n \"$os_dir/$os_module/pntemplates/$os_modname\", // modhookpathold\n \"$os_dir/$os_module/pntemplates\", // modpath old\n );\n }\n\n foreach ($search_path as $path) {\n if (is_readable(\"$path/$ostemplate\")) {\n $this->templateCache[$template] = $path;\n return $path;\n }\n }\n }\n\n // when we arrive here, no path was found\n return false;\n }", "function fa_template_path( $template ){\t\n\t$file = 'template-' . $template . '.php'; \n\treturn fa_view_path($file);\t\n}", "protected function get_template(): string {\n\t\t$templates = apply_filters( 'siw_carousel_post_type_templates', [] );\n\t\treturn $templates[ $this->post_type ] ?? '';\n\t}", "function get_template( $template_name ) {\n $path_to_file = wp_normalize_path(UCMS_DIR . 'templates/' . $template_name . '.hbs');\n if(!file_exists($path_to_file)) {\n return '';\n }\n return file_get_contents($path_to_file);\n }", "function getTemplatesPath() {\n return __DIR__ . \"/templates/routing\";\n }", "function nbst_locate_template( $template_name, $template_path = '', $default_path = '' ) {\n\n\t// Set variable to search in localisation folder of theme.\n\tif ( ! $template_path ) :\n\t\t$template_path = 'nabi-share-tools/';\n\tendif;\n\n\t// Set default plugin templates path.\n\tif ( ! $default_path ) :\n\t\t$default_path = plugin_dir_path( __FILE__ ) . 'template/'; // Path to the template folder\n\tendif;\n\n\t// Search template file in theme folder.\n\t$template = locate_template( array(\n\t\t$template_path . $template_name,\n\t\t$template_name\n\t) );\n\n\t// Get plugins template file.\n\tif ( ! $template ) :\n\t\t$template = $default_path . $template_name;\n\tendif;\n\n\treturn apply_filters( 'nbst_locate_template', $template, $template_name, $template_path, $default_path );\n}", "public function getTemplatePath() {\n\t\treturn $this->templatePath;\n\t}", "function tif_template_path($template_name) {\n return \"tif-modules/templates/$template_name/$template_name.php\";\n}", "protected function getTemplateTemplate() : string\n {\n return static::TEMPLATE_TEMPLATE_SOURCE;\n }", "public function templatesDir()\n {\n return config('llstarscreamll.CrudGenerator.config.templates');\n }", "public function getTemplatePath()\n {\n return 'tpl/pages/';\n }", "public static function get_template_directory () {\r\n\t\t\tstatic $dir;\r\n\r\n\t\t\tif ( ! $dir ) {\r\n\t\t\t\t$dir = \\get_template_directory();\r\n\t\t\t}\r\n\r\n\t\t\treturn $dir;\r\n\t\t}", "protected function getSetupTemplate() : string\n {\n return static::TEMPLATE_SETUP_SOURCE;\n }", "function getTemplatePath() {\n\t\treturn $this->_templatePath;\n\t}", "function wolf_discography_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n\n\tif ( $args && is_array($args) )\n\t\textract( $args );\n\n\t$located = wolf_discography_locate_template( $template_name, $template_path, $default_path );\n\n\tdo_action( 'wolf_discography_before_template_part', $template_name, $template_path, $located, $args );\n\n\tinclude( $located );\n\n\tdo_action( 'wolf_discography_after_template_part', $template_name, $template_path, $located, $args );\n}", "function get_resource ($path) {\r\n return get_template_directory_uri() . $path;\r\n}", "public function getTemplatePath() {\n return $this->getPath() . '/template/' . APPLICATION_TEMPLATE;\n }", "private function getPathTemplate() {\n\n return sprintf('%s/%s.html.twig', $this->pathTemplate, $this->motivo);\n }", "public function getTemplatePath(): string\n {\n return (string)$this->templatePath;\n }", "function wpo_get_template_part( $slug, $name = '' ) {\n\t$template = '';\n\n\t// Look in yourtheme/slug-name.php and yourtheme/woocommerce/slug-name.php\n\tif ( $name ) {\n\t\t$template = locate_template( array( \"{$slug}-{$name}.php\", WC()->template_path() . \"{$slug}-{$name}.php\" ) );\n\t}\n\n\t// Get default slug-name.php\n\tif ( ! $template && $name && file_exists( WC()->plugin_path() . \"/templates/{$slug}-{$name}.php\" ) ) {\n\t\t$template = WC()->plugin_path() . \"/templates/{$slug}-{$name}.php\";\n\t}\n\n\t// If template file doesn't exist, look in yourtheme/slug.php and yourtheme/woocommerce/slug.php\n\tif ( ! $template ) {\n\t\t$template = locate_template( array( \"{$slug}.php\", WC()->template_path() . \"{$slug}.php\" ) );\n\t}\n\n\t// Allow 3rd party plugin filter template file from their plugin\n\t$template = apply_filters( 'wc_get_template_part', $template, $slug, $name );\n\n\tif ( $template ) {\n\t\tload_template( $template, false );\n\t}\n}", "function sa_get_template_part($slug, $name = '')\n{\n $template = '';\n\n // Look in yourtheme/slug-name.php and yourtheme/store-api/slug-name.php\n if ($name) {\n $template = locate_template(array(\"{$slug}-{$name}.php\", wpsa()->template_path() . \"{$slug}-{$name}.php\"));\n }\n\n // Get default slug-name.php\n if (!$template && $name && file_exists(wpsa()->plugin_path() . \"/templates/{$slug}-{$name}.php\")) {\n $template = wpsa()->plugin_path() . \"/templates/{$slug}-{$name}.php\";\n }\n\n // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/store-api/slug.php\n if (!$template) {\n $template = locate_template(array(\"{$slug}.php\", wpsa()->template_path() . \"{$slug}.php\"));\n }\n\n // Allow 3rd party plugins to filter template file from their plugin.\n $template = apply_filters('sa_get_template_part', $template, $slug, $name);\n\n if ($template) {\n load_template($template, false);\n }\n}", "public function getTemplate(){\n return $this->template.'.html.twig';\n }", "private function getTemplate() {\n $menuItem = $this->request->getMenuItem();\n \n $templateNameDef = empty($menuItem['template']) ? '' : $this->theme->templatePath . str_replace('.tpl', '', str_replace('.php', '', $menuItem['template'])) . '.tpl.php';\n $templateNameUrl = empty($menuItem['url']) ? '' : $this->theme->templatePath . 'page-' . str_replace('/', '-', $menuItem['url']) . '.tpl.php';\n $templateName = $this->theme->templatePath . 'page.tpl.php';\n if(file_exists($templateNameDef)) {\n $templateName = $templateNameDef;\n }\n elseif (file_exists($templateNameUrl)) {\n $templateName = $templateNameUrl; \n }\n \n return $templateName;\n }", "private function getTemplateConfig()\n\t{\n\t\treturn $this->config['templateDir'] . DIRECTORY_SEPARATOR . $this->config['template'] . DIRECTORY_SEPARATOR . 'config.neon';\n\t}", "function sa_get_template($template_name, $args = array(), $template_path = '', $default_path = '')\n{\n if (!empty($args) && is_array($args)) {\n extract($args);\n }\n\n $located = sa_locate_template($template_name, $template_path, $default_path);\n\n if (!file_exists($located)) {\n _doing_it_wrong(__FUNCTION__, sprintf('<code>%s</code> does not exist.', $located), '2.1');\n return;\n }\n\n // Allow 3rd party plugin filter template file from their plugin.\n $located = apply_filters('sa_get_template', $located, $template_name, $args, $template_path, $default_path);\n\n do_action('store_api_before_template_part', $template_name, $template_path, $located, $args);\n\n include($located);\n\n do_action('store_api_after_template_part', $template_name, $template_path, $located, $args);\n}", "function woocommerce_pip_get_plugin_path() {\n\n\treturn untrailingslashit( plugin_dir_path( __FILE__ ) );\n}", "public function getTemplatePath()\n {\n return $this->pathResolver->getTemplatePath();\n }" ]
[ "0.77598965", "0.7660577", "0.7592057", "0.7429807", "0.73109317", "0.7290803", "0.7283729", "0.72636396", "0.72473705", "0.72284496", "0.72230387", "0.7223022", "0.7215006", "0.71790254", "0.7178665", "0.716081", "0.7153282", "0.7148593", "0.7068757", "0.7054103", "0.7046362", "0.6989117", "0.6930051", "0.6922335", "0.69146293", "0.690254", "0.6875087", "0.6863224", "0.68122137", "0.68103737", "0.6799238", "0.67740697", "0.6756692", "0.67547864", "0.6751432", "0.67471594", "0.6744632", "0.67410856", "0.6738977", "0.67263895", "0.6725696", "0.6711567", "0.6689683", "0.66701597", "0.6665664", "0.6648907", "0.6645926", "0.6626766", "0.6621467", "0.66190505", "0.6608143", "0.66061234", "0.6596922", "0.6584722", "0.6577685", "0.6566384", "0.65651226", "0.6562574", "0.65611815", "0.65605056", "0.6558842", "0.6544158", "0.6544158", "0.6544158", "0.65384054", "0.6530911", "0.6529956", "0.6524006", "0.65111613", "0.6504137", "0.6501526", "0.6495112", "0.64904106", "0.6488561", "0.64782286", "0.64767766", "0.64578664", "0.6452525", "0.64495426", "0.64451045", "0.644007", "0.6438754", "0.6431982", "0.64204615", "0.6416732", "0.64157987", "0.64099497", "0.6394775", "0.6387711", "0.638158", "0.63678265", "0.6366126", "0.63609165", "0.63599044", "0.63593364", "0.63562727", "0.6349858", "0.6345222", "0.6342421", "0.6338737" ]
0.80633664
0
woocommerce_pip_preview function. Output preview if needed
Функция woocommerce_pip_preview. Выводить предварительный просмотр, если это необходимо
function woocommerce_pip_preview() { if ( get_option( 'woocommerce_pip_preview' ) != 'enabled' ) { return 'onload="window.print()"'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function productpreviewmodal() { \n\t\tob_start(); \n\t\tglobal $yith_wcwl, $theme_settings;\n\t\t$productid = $_GET['productid']; \n\t\t$loading_location = $_GET['loading_location']; \n\t\t$temp = $post;\n\t\t$productpost = get_post( $productid );\n\t\tsetup_postdata( $post );\n\t\t$product_sku = get_post_meta($productid,'_sku', true);\n\t\t$product_price = get_post_meta($productid,'_regular_price', true);\n\t\t$currency = 'Rs. ';\n\t\t$product_sale_price = get_post_meta($productid,'_sale_price', true);\n\t\t$product_discount = get_post_meta($productid,'_product_discount', true);\n\t\t$images = get_post_meta($productid, '_product_image_gallery', true);\n\t\t$terms = get_the_terms( $productid, 'product-discount' );\n\t\t$product_author = $productpost->post_author;\n\t\t$product_deal = get_post_meta($productid,'product_deal', true);\n\t\t$product_mallid = get_post_meta($productid,'mall',true);\n\t\t$product_mall = get_the_title($product_mallid);\n\t\t$product_shopid = get_post_meta($productid,'shop',true);\n\t\t$product_shop = get_the_title($product_shopid);\n\t\t$merchant_preview_product = '';\n\t\t$content = $productpost->post_excerpt;\n\t\t$phoneno = get_post_meta($product_shopid, 'shop_phone_num', true);\n\t\t$size_chart = get_post_meta($productid, 'clothing_size_chart', true);\n\t\t\n $product_view_count = get_post_meta($productid, 'product_views', true);\n $product_view_count++;\n update_post_meta($productid, 'product_views', $product_view_count);\n \n\t\t$lat1 = isset($_COOKIE['me_lat']) ? $_COOKIE['me_lat'] : '';\n\t\t$lng1 = isset($_COOKIE['me_lng']) ? $_COOKIE['me_lng'] : '';\n\t\t$lat2 = get_post_meta($product_shopid, 'latitude', true);\n\t\t$lng2 = get_post_meta($product_shopid, 'longitude', true);\n\t\t$unitdistance = 'K';\n\n//\t\t$distance_flag = calc_distance($lat1, $lng1, $lat2, $lng2, $unitdistance);\t\t\n\n\t\tif($loading_location=='merchant') {\n\t\t\t$merchant_preview_product = 'merchant_preview_product';\n\t\t}\n\t\t$attributes = get_post_meta($productid);\n\t\t$url = site_url().'/wp-content/plugins/yith-woocommerce-wishlist/yith-wcwl-ajax.php?action=mm_add_to_wishlist&add_to_wishlist='.$productid;\n\t\t?>\n\t\t<div class=\"product_view_wrap <?php echo $merchant_preview_product; ?>\">\n\t\t\t<div class=\"modal fade\" id=\"productview<?php echo $productid; ?>\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"productviewmodal\" aria-hidden=\"true\">\n\t\t\t <div class=\"modal-dialog modal-lg\">\n\t\t\t <div class=\"modal-content\">\n\t\t\t\t \t<div class=\"modal-header\">\n\t\t\t\t \t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/close-btn-prod.png\"></span><span class=\"sr-only\"></span></button>\n\t\t\t\t </div>\n\t\t\t\t <div class=\"modal-body\">\n\t\t\t\t\t <div class=\"product_info row\">\n\t\t\t\t\t \t<?php \n\t\t\t\t\t \t$urlview = get_permalink($theme_settings['wishlistpage']);\n\t\t\t\t\t \tif(!$yith_wcwl->is_product_in_wishlist( $productid )) { ?>\n\t\t\t\t\t \t \t<div class=\"product_wishlist add_product_to_wishlist\" style=\"cursor:pointer;\" data-action=\"<?php echo $url; ?>\" title=\"Add To Wishlist\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist.png\" /><i class=\"fa fa-cog fa-spin wishlistajaxloader\"></i></div>\n\t\t\t\t\t \t \t<a href=\"<?php echo $urlview; ?>\" class=\"product_wishlist_added\" title=\"View Wishlist\" style=\"cursor:pointer; display: none;\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist-red.png\" /></a>\n\t\t\t\t\t \t \t<?php } else { ?>\n\t\t\t\t\t \t \t<a href=\"<?php echo $urlview; ?>\" class=\"product_wishlist_added\" title=\"View Wishlist\" style=\"cursor:pointer; text-decoration: none;\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist-red.png\" /></a>\n\t\t\t\t\t \t \t<?php } ?>\n\t\t\t\t\t \t \t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t \t \t<div class=\"product_slider col-sm-4\">\n\t\t\t\t\t\t \t \t <div class=\"row\">\n<!--\t\t\t\t\t\t\t \t \t <div class=\"vericalwrap col-sm-4\">\n\t\t\t\t\t\t\t\t \t \t\t<ul id=\"productvertical<?php echo $productid; ?>\" class=\"elastislide-list\">\n\t\t\t\t\t\t\t\t \t \t\t \t<?php\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$sliderhtml = '';\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$thumb_id = get_post_thumbnail_id($productid);\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$first_thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t$first_thumb_url = $first_thumb_url_array[0];\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .='<li slideto=\"0\" style=\"cursor: pointer;\" class=\"active_product_thumb\">';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '<img src=\"'.$first_thumb_url.'\" />';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '</li>';\n//\t\t\t\t\t\t\t\t \t \t\t \t\t\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$images = get_post_meta($productid, '_product_image_gallery', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t$images_array = explode(\",\", $images);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t if ( $images!=\"\" ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t \t$ic=1;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t foreach ( $images_array as $image ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $thumb_url_array = wp_get_attachment_image_src($image, 'thumbnail', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $thumb_url = $thumb_url_array[0];\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .='<li slideto=\"'.$ic.'\" style=\"cursor: pointer;\">';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '<img src=\"'.$thumb_url.'\" />';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '</li>';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $ic++;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t }\n//\t\t\t\t\t\t\t\t\t\t\t\t\t } \n//\t\t\t\t\t\t\t\t\t\t\t\t\t echo $sliderhtml;\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</ul> carousevertical end \n\t\t\t\t\t\t\t \t \t</div>-->\n\t\t\t\t\t\t\t \t \t\t<div class=\"full_product_slider col-sm-12\">\n\t\t\t\t\t\t\t \t \t\t\t<!-- <div id=\"carousel-product<?php echo $productid; ?>\" class=\"carousel slide\" data-ride=\"carousel\">\n\t\t\t\t\t\t\t \t \t\t\t\t<div class=\"carousel-inner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t<?php //echo $this->product_slider($productid); ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t \t \t\t\t</div> -->\n\t\t\t\t\t\t\t \t \t\t\t<div class=\"product_images_slider\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo $this->mobile_product_slider($productid); ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t \t \t\t\t\n\n\t\t\t\t\t\t\t \t \t\t</div> <!-- full_product_slider end -->\n\t\t\t\t\t\t\t \t \t</div>\n\t\t\t\t\t\t \t \t</div> <!-- product_slider end -->\n\t\t\t\t\t\t \t \t<div class=\"product_description col-sm-8\">\n\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t \t \t\t<h2 class=\"product_title\"><a href=\"<?php echo get_permalink($productid); ?>\"><?php echo get_the_title($productid); ?></a></h2>\n\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t \t \t\t<?php if($product_sku != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_id\">Product Id: <span><?php echo $product_sku; ?></span></div> <!-- product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?> \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<?php //if($product_mall != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<!--<div class=\"product_mall\"><i class=\"fa fa-building-o\"></i><b> Location:</b> <span><?php //echo $product_mall; ?></span></div> product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php //} ?>\n\n\t\t\t\t\t\t \t \t\t<?php if($product_shop != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_shop\"><i class=\"fa fa-bank\"></i><b> Shop:</b> <span><?php echo $product_shop; ?></span></div> <!-- product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<?php if($phoneno != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<!--<div class=\"phoneno\"><i class=\"fa fa-phone\"></i><b> Phone No:</b> <span><?php // echo $phoneno; ?></span></div> product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t \t \t\t<div class=\"product_size\">\n\t\t\t\t\t\t \t \t\t\t<?php \n//\t\t\t\t\t\t \t \t\t\t\tif(!empty($attributes) || $attributes!=\"\") {\n//\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $attributes as $attribute ) :\n//\t\t\t\t\t\t\t\t\t\t\t\t\t$taxonomy_object = get_taxonomy( $attribute['name'] );\n//\t\t\t\t \t\t\t\t\t\tif($attribute['name'] == 'pa_size' || $attribute['name'] == 'pa_shoes-sizes'){\t\n//\t\t\t\t\t \t\t\t\t\t\t$label = $taxonomy_object->label;\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\techo 'Size: '; \n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( $attribute['is_taxonomy'] ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$values = wc_get_product_terms( $productid, $attribute['name'], array( 'fields' => 'names', 'orderby' => 'term_order' ) );\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasort($values);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($values as $value) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<span class=\"size\" style=\"cursor:pointer;\">' .$value.'</span>';\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} else {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Convert pipes to commas and display values\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$values = array_map( 'trim', explode( WC_DELIMITER, $attribute['value'] ) );\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<span class=\"size\" style=\"cursor:pointer;\">' .implode( ', ', $values ).'</span>';\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\tif(trim(strip_tags($size_chart)) !=''){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<p class=\"sizechartlink\" style=\"margin-top: 10px;\"><a href=\"'.get_permalink($productid).'#sizechart\">Size Help</a></p>';\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n//\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\telse{}\n//\t\t\t\t\t\t\t\t\t\t\t\t\tendforeach; \n//\t\t\t\t\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<!--<input type=\"hidden\" class=\"selected_csize\" value=\"\" />-->\n\t\t\t\t\t\t \t \t\t</div><!-- product_size end -->\n\n\t\t\t\t\t\t \t \t\t<?php\n//\t\t\t\t\t\t \t \t\tif($distance_flag!='error') {\n//\t\t\t\t\t\t \t \t\t?>\t\n<!--\t\t\t\t\t\t \t \t\t<div class=\"distance_from_your_location\">\n\t\t\t\t\t\t \t \t\t\t<label>Distance From Your Location : </label> //<?php // echo round($distance_flag, 2).' KM'; ?>\n\t\t\t\t\t\t \t \t\t\t<a href=\"https://maps.google.com?saddr=//<?php // echo $lat1.','.$lng1; ?>&daddr=<?php // echo $lat2.','.$lng2; ?>\" target=\"_blank\">Get Direction</a>\n\t\t\t\t\t\t \t \t\t</div>-->\n\t\t\t\t\t\t \t \t\t<?php\n//\t\t\t\t\t\t \t \t\t}\n\t\t\t\t\t\t \t \t\t?>\n\t\t\t\t\t\t \t \t\t\t\n\t\t\t\t\t\t \t \t\t<?php if($content !='' ){ ?>\n\t\t\t\t\t\t\t \t \t\t<div class=\"product_detail_info\">\n\t\t\t\t\t\t\t \t \t\t\t\n\t\t\t\t\t\t\t\t \t \t\t\t<div class=\"show_product_detailed_desc\" change_desc_text1=\"Detailed Product Description\" change_desc_text2=\"Show Detailed Product Description...\" open_close=\"open\" style=\"cursor: pointer;\">Show Detailed Product Description...</div>\n\t\t\t\t\t\t\t\t \t \t\t\t<div class=\"product_detail_info_inner\" style=\"display: none;\">\n\t\t\t\t\t\t\t\t \t \t\t\t\t<?php \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(!empty($attributes) || $attributes!=\"\") {\n// echo '</pre>';\n//// print_r($attributes);\n// echo '</pre>';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $attributes as $key => $attribute ) :\n////\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$taxonomy_object = get_taxonomy( $attribute['name'] );\n// \n// //$label = $taxonomy_object->label;\n// if(!empty($attribute[0])){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<div><b>'.htmlspecialchars($key).' :- </b>'; \n// foreach ( $attribute as $attribute) :\n// echo $attribute; \n// endforeach;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</div>';\n// }\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendforeach; \n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \n \n\t\t\t\t\t\t\t\t \t \t\t\t\tif($content != ''){ ?>\n\t\t\t\t\t\t\t\t \t \t\t\t\t<div><b>Detailed:- </b> <?php \n\t\t\t\t\t\t\t\t \t \t\t\t\t\t$words = explode(\" \",$content);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"popup-details\">'; echo implode(\" \",array_splice($words, 0 , 25)).\"... <a href='\".get_permalink($productid).\"'>Read More</a>\"; echo '</div>';\n\t\t\t\t\t\t\t\t \t \t\t\t\t?> </div>\n\t\t\t\t\t\t\t\t \t \t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t \t \t\t\t</div>\n\t\t\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t\t\t \t \t</div> <!-- product_detail_info end -->\n\t\t\t\t\t\t\t \t \t<?php } else{ } ?>\n\t\t\t\t\t\t \t \t\t<div class=\"product_price\">\n\t\t\t\t\t\t \t \t\t\t<?php\n setlocale(LC_MONETARY, 'en_IN');\n $product_price1 = money_format('%!.0n', $product_price);\n if($product_sale_price!='') {\n \n $product_sale_price1 = money_format('%!.0n', $product_sale_price);\n \n ?>\n\t \t\t\t\t\t\t<div class=\"discount_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_sale_price != ''){ echo $currency . $product_sale_price1.\"/-\" ;}?></div>\n\t \t\t\t\t\t\t\t <div class=\"original_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_price != ''){ echo $currency . $product_price1.\"/-\"; }?></div>\n\t \t\t\t\t\t<?php } else { ?>\n\t \t\t\t\t\t<div class=\"discount_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_price != ''){ echo $currency . $product_price1.\"/-\" ;}?></div>\n\t \t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\t<?php if($product_deal!=''){$dealcol = 'col-xs-5';} else{$dealcol = 'col-xs-4';} ?>\n\t\t\t\t\t\t \t \t\t\t<div class=\"discount col-sm-4 col-md-6 <?php echo $dealcol; ?>\">\n\t\t\t\t\t\t\t \t \t\t\t<?php \n\t\t \t\t\t\t\t\tif($product_deal!='') { ?>\n\t\t\t\t\t\t\t \t \t\t\t\t<span><?php echo $product_deal; ?></span>\n\t\t\t\t\t\t\t \t \t\t\t<?php\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\telse if($product_discount !=''){ ?>\n\t\t \t\t\t\t\t\t<span><?php echo $product_discount.''; ?> </span>\n\t\t\t\t\t\t\t \t \t\t\t<?php } \n\t\t \t\t\t\t\telse{}\n\t\t \t\t\t\t?>\n\t\t\t\t\t\t \t \t\t\t</div>\n\t\t\t\t\t\t \t \t\t</div>\n\t\t\t\t\t\t \t \t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"product_malling_delivery\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_malling product_malling_delivery_tooltip col-sm-6 col-xs-6\" data-action=\"malling\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Generate coupon and pick up ur order\">Malling</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_delivery product_malling_delivery_tooltip col-sm-6 col-xs-6\" data-action=\"gd\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Get it delivered with Rs 100 Laziness Charge\">Feeling Lazy</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t</div> <!-- end product_malling_delivery -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"product_enquiry col-sm-12\">\n\t\t\t\t\t\t\t\t\t\t\t<span>How do we connect with you? </span>\n\t\t\t\t\t\t\t\t\t\t\t<ul class=\"success_error\"></ul>\n\t\t\t\t\t\t\t\t\t\t\t<form class=\"get_coupon\" action=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p><input type=\"text\" name=\"user_phone\" placeholder=\"enter your phone number\" /></p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"product_enquiry_option\">or</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p><input type=\"text\" name=\"user_email\" placeholder=\"enter your email address\" required /></p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"product_enquiry_button\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-cog fa-spin cgd_loader\"></i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary malling_gd\" data-malling=\"Generate Coupon\" data-gd=\"Shopkeeper will connect with you\">Generate Coupon</button>\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"product_author\" value=\"<?php echo $product_author; ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"product_id\" value=\"<?php echo $productid; ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"form-action\" class=\"form-action\" value=\"malling\" />\n\t\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t</div><!-- end product_enquiry-->\n\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\n\t\t\t\t\t\t \t \t</div> <!-- product_description end -->\n\t\t\t\t\t\t \t\n\t\t\t\t \t </div><!-- product_info end -->\n\t\t\t\t </div> <!-- end modal-body -->\n\t\t\t </div> <!-- end modal-content -->\n\t\t\t </div><!-- end modal-dialog -->\n\t\t\t</div><!-- end modal -->\n\t\t</div><!-- end product_view_wrap -->\n\n\t\t<?php\t\n\t\twp_reset_postdata();\n\t\t$post = $temp;\n\t\t$modal = ob_get_clean();\n\t\techo json_encode(array('modal'=>$modal));\n\t\tdie(0);\n\t}", "public function renderPreview();", "function companies_preview_shortcode( $atts, $content = null ) {\n ob_start();\n get_template_part( 'templates/companies', 'preview' );\n return ob_get_clean();\n}", "function sophia_preview()\n{\n if ( isset( $_GET['preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification\n wp_die( esc_html( sophia_compat_message() ) );\n }\n}", "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t$orders = explode( ',', $_GET['post'] );\n\t\t$action = $_GET['type'];\n\t\t$number_of_orders = count( $orders );\n\t\t$order_loop = 0;\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\t// Loop through all orders (bulk printing).\n\t\tforeach ( $orders as $order_id ) {\n\t\t\t$order_loop++;\n\t\t\t$order = new WC_Order( $order_id );\n\t\t\tob_start();\n\t\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t\t$content .= ob_get_clean();\n\t\t\tif ( $number_of_orders > 1 && $order_loop < $number_of_orders ) {\n\t\t\t\t$content .= '<p class=\"pagebreak\"></p>';\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "function plastical_preview() {\n\tif (isset($_GET['preview'])) {\n\t\twp_die(__('Plastical requires the REST API plugin. Please install the plugin and try again.', 'plastical'));\n\t}\n}", "function coworkers_preview_shortcode( $atts, $content = null ) {\n ob_start();\n get_template_part( 'templates/coworkers', 'preview' );\n return ob_get_clean();\n}", "public function printPreview();", "public function preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n {\n }", "public function preview()\n {\n }", "function woocommerce_pip_client_window() {\n\tif ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\t\t$order_id = $_GET['post'];\n\t\t$order = new WC_Order( $order_id );\n\t\t$current_user = wp_get_current_user();\n\t\t$action = 'print_invoice';\n\t\t$client = true;\n\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'client-print-pip' ) || ! is_user_logged_in() || $order->user_id != $current_user->ID ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows (actually this one might not be needed, are the customers in the admin for this?)\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\tob_start();\n\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t$content .= ob_get_clean();\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "public function wc_slider_preview() {\n\t \n\t\theader( \"Content-Type: application/json\" );\n\t\t\n\t\t// verify nonce\n\t\tif ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], \"msp_panel\") ) {\n\t\t\techo json_encode( array( 'success' => false, 'message' => __( \"Authorization failed!\", MSWP_TEXT_DOMAIN ) ) );\n\t\t\texit;\n\t\t}\n\n\t\tif ( ! msp_is_plugin_active( 'woocommerce/woocommerce.php' ) ){\n\t\t\techo json_encode( array( 'success' => false, 'message' => __( \"Please install and activate WooCommerce plugin.\", MSWP_TEXT_DOMAIN ) ) );\n\t\t}\n\n\t\t$wcs = msp_get_wc_slider_class();\n\t\t$posts_result = $wcs->parse_and_get_posts_result();\n\t\t$template_tags = $wcs->get_first_post_template_tags_value();\n\n\t\tif( empty( $posts_result ) )\n\t\t\t$template_tags = null;\n\t\t\n\t echo json_encode( array( 'success' => true, 'type' => 'preview' , 'message' => '', 'preview_results' => $posts_result, 'template_tags' => $template_tags ) );\n\t exit;// IMPORTANT\n\t}", "public function viewPreview() {\n\t\t$preview = $this->getControllerData();\n\n\t\techo $preview->compileOutput()->getCompiledOutput();\n\t}", "function wpgurus_preview() {\n\tif ( isset( $_GET['preview'] ) ) {\n\t\twp_die( __( 'WPGurus requires WordPress 4.7 or higher. Please update your site and try again.', 'wpgurus-vuejs-theme' ) );\n\t}\n}", "function Modo_Marketing_preview()\n{\n\tif (isset($_GET['preview'])) { // phpcs:ignore WordPress.Security.NonceVerification\n\t\twp_die(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: WordPress Version. */\n\t\t\t\tesc_html__('This theme requires WordPress 5.3 or newer. You are running version %s. Please upgrade.', 'twentytwentyone'),\n\t\t\t\tesc_html($GLOBALS['wp_version'])\n\t\t\t)\n\t\t);\n\t}\n}", "function _preview_theme_template_filter()\n{\n}", "public function getPreview();", "public function getPreview();", "function woo_vou_preview_pdf() {\r\r\n\t\r\r\n\tglobal $woo_vou_model, $pdf_voucodes;\r\r\n\t\r\r\n\t$model = $woo_vou_model;\r\r\n\t\r\r\n\t$pdf_args = array();\r\r\n\t\r\r\n\tif( isset( $_GET['voucher_id'] ) && !empty( $_GET['voucher_id'] )\r\r\n\t\t&& isset( $_GET['woo_vou_pdf_action'] ) && $_GET['woo_vou_pdf_action'] == 'preview' ) {\r\r\n\t\t\r\r\n\t\t// Getting voucher character support\r\r\n\t\t$voucher_char_support = get_option( 'vou_char_support' );\r\r\n\t\t\r\r\n\t\t$voucher_template_id = $_GET['voucher_id'];\r\r\n\t\t\r\r\n\t\t$pdf_args['vou_template_id'] = $voucher_template_id;\t\t\r\r\n\t\t\t\t\r\r\n\t\t$codes \t\t\t= __( '[The voucher code will be inserted automatically here]', 'woovoucher' );\r\r\n\t\t\r\r\n\t\t$content_post \t\t\t= get_post( $voucher_template_id );\r\r\n\t\t$content \t\t\t\t= isset( $content_post->post_content ) \t? $content_post->post_content \t: '';\r\r\n\t\t$content\t\t\t\t= apply_filters( 'woo_vou_voucher_template_content', $content, $voucher_template_id );\r\r\n\t\t$post_title \t\t\t= isset( $content_post->post_title ) \t? $content_post->post_title \t: '';\r\r\n\t\t$voucher_template_html \t= do_shortcode( $content );\t\t\t\t\r\r\n\t\t\r\r\n\t\t// add filter to modify generated preview pdf voucher HTML OR to replace shortcodes with values\r\r\n\t\t$voucher_template_html\t= apply_filters( 'woo_vou_pdf_template_preview_html', $voucher_template_html, $voucher_template_id );\r\r\n\t\t\r\r\n\t\t//Set pdf name\r\r\n\t\t$post_title = str_replace( ' ', '-', strtolower( $post_title ) );\r\r\n\t\t$pdf_args['pdf_name'] \t\t= $post_title . __( '-preview-', 'woovoucher' ) . $voucher_template_id;\r\r\n\t\t$pdf_args['vou_codes'] \t\t= $codes;\r\r\n\t\t$pdf_args['char_support']\t= (!empty($voucher_char_support) && $voucher_char_support == 'yes' ) ? 1 : 0; // Character support\r\r\n\t\t\r\r\n\t\twoo_vou_generate_pdf_by_html( $voucher_template_html, $pdf_args );\r\r\n\t}\r\r\n}", "function meta_box_widget_preview(){\n if ($this->post_id)\n {\n // queries in widgets can cause problems, even when executed correctly\n global $post;\n $tmp = clone $post;\n\n // buffer all of this in case of php errors\n ob_start();\n $widget = $this->ww->get_single_widget($this->post_id);\n $widget->in_preview = TRUE;\n $preview_corral_slug = get_post_meta($this->post_id, 'ww-preview-corral-slug', TRUE);\n \n // set some data so the preview is as accurate as possible\n if ($preview_corral_slug){\n global $wp_registered_sidebars;\n $corral_sidebar_map = $this->ww->display->corrals_to_wpsidebars_map();\n \n // get the sidebar widget args if context is set\n if (isset($corral_sidebar_map[$preview_corral_slug]) && isset($wp_registered_sidebars[$corral_sidebar_map[$preview_corral_slug]])){\n $this_sidebar = $wp_registered_sidebars[$corral_sidebar_map[$preview_corral_slug]];\n \n // get the id of the corral selected if it exists within the sidebar\n $sidebars_widgets = wp_get_sidebars_widgets();\n if (isset($sidebars_widgets[$this_sidebar['id']])){\n $corral_widgets = $sidebars_widgets[$this_sidebar['id']];\n }\n $widget->wp_widget_args = $this_sidebar;\n $widget->wp_widget_args['before_widget'] = sprintf($this_sidebar['before_widget'], $corral_widgets[0], 'widget-wrangler-widget-classname');\n // replace id and classes as done during output\n $widget = $this->ww->display->_replace_wp_widget_args($widget);\n }\n \n $this->ww->display->doing_corral = TRUE;\n $this->ww->display->doing_corral_slug = $preview_corral_slug;\n }\n print $this->ww->display->theme_single_widget($widget);\n $preview = ob_get_clean();\n \n\t\t\t$preview_balance = balanceTags($preview, true);\n ?>\n <div id=\"ww-preview\">\n <label><strong><?php _e(\"Preview Corral Context\", 'widgetwrangler'); ?>:</strong></label>\n <p><em><?php _e(\"This setting only affects the preview on this page, and helps provide accurate template suggestions.\", 'widgetwrangler'); ?></em></p>\n <select id=\"ww-preview-corral\" name=\"ww-data[ww-preview-corral-slug]\" class=\"widefat\" style=\"width:100%;\">\n <option value='0'>- <?php _e(\"No Corral\", 'widgetwrangler'); ?> -</option>\n <?php\n foreach($this->ww->corrals as $corral_slug => $corral)\n {\n $selected = (isset($this->ww->display->doing_corral_slug) && $corral_slug == $this->ww->display->doing_corral_slug) ? 'selected=\"selected\"': \"\";\n ?>\n <option <?php print $selected; ?> value=\"<?php print $corral_slug; ?>\"><?php print $corral; ?></option>\n <?php\n }\n ?>\n </select>\n <p><em><?php _e(\"This preview does not include your theme's CSS stylesheet, nor corral or sidebar styling.\", 'widgetwrangler'); ?></em></p>\n </div>\n <hr />\n <?php\tprint $preview_balance; ?>\n \n\t\t\t\t<?php if ($preview != $preview_balance) { ?>\n\t\t\t\t\t<div style=\"border-top: 1px solid #bbb; margin-top: 12px; padding-top: 8px;\">\n\t\t\t\t\t\t<span style=\"color: red; font-style: italic;\"><?php _e(\"Your widget may contain some broken or malformed html.\", 'widgetwrangler'); ?></span> <?php _e(\"Wordpress balanced the tags in this preview in an attempt to prevent the page from breaking, but it will not do so on normal widget display.\", 'widgetwrangler'); ?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php } ?>\n <hr />\n <div id=\"ww-preview-html-toggle\"><?php _e(\"View Output HTML\"); ?></div><pre id=\"ww-preview-html-content\"><?php\n print htmlentities($preview); ?></pre>\n <?php\n\n // restore original post\n $post = $tmp;\n }\n }", "public function order_preview_template()\n {\n }", "function anva_customizer_preview() {\n\n\tglobal $wp_customize;\n\n\t// Check if customizer is running.\n\tif ( ! is_a( $wp_customize, 'WP_Customize_Manager' ) ) {\n\t\treturn;\n\t}\n\n\t$wp_customize->is_preview();\n\n}", "function preview_theme()\n{\n}", "function dt_woocommerce_get_product_preview_icons() {\n\t\treturn apply_filters( 'dt_woocommerce_get_product_preview_icons', '' );\n\t}", "public function meta_box_preview( $post ) {\n\t\t?>\n\t\t\t<label class=\"screen-reader-text\" for=\"excerpt\"><?php _e( 'Front-End Preview', 'conductor-query-builder' ) ?></label>\n\t\t\t<p><?php _e( 'The following is a preview of what this query will output on the front-end. Note: This preview will only show the first result of the query and is not styled to match the front-end (CSS).', 'conductor-query-builder' ); ?></p>\n\t\t\t<hr />\n\n\t\t\t<div id=\"conductor-query-builder-preview\" class=\"conductor-query-builder-preview\">\n\t\t\t\t<?php\n\t\t\t\t\t// Grab the post ID\n\t\t\t\t\t$post_id = get_post_field( 'ID', $post );\n\n\t\t\t\t\t// Grab the Conductor Widget instance\n\t\t\t\t\t$conductor_widget = Conduct_Widget();\n\n\t\t\t\t\t// Grab the query builder mode\n\t\t\t\t\t$query_builder_mode = $this->get_query_builder_mode();\n\n\t\t\t\t\t// Setup the query builder mode preview data reference\n\t\t\t\t\t$this->preview_data['query_builder_mode'] = $query_builder_mode;\n\n\t\t\t\t\t// Setup the post meta\n\t\t\t\t\t$this->preview_data['post_meta'] = $this->get_post_meta( $post_id );\n\n\t\t\t\t\t// Setup the Conductor Widget instance POST data (POST data is required for get_simple_query_builder_data())\n\t\t\t\t\t$_POST['widget-' . $conductor_widget->id_base] = array();\n\t\t\t\t\t$_POST['widget-' . $conductor_widget->id_base][0] = $this->get_conductor_widget_instance( $post_id );\n\t\t\t\t\t$_POST['widget-' . $conductor_widget->id_base][0]['output'] = wp_json_encode( $_POST['widget-' . $conductor_widget->id_base][0]['output'] );\n\n\t\t\t\t\t// Grab the simple query builder data\n\t\t\t\t\t$simple_conductor_query_builder_data = $this->get_simple_query_builder_data( $_POST );\n\n\t\t\t\t\t// Setup the Conductor Widget instance preview data reference\n\t\t\t\t\t$this->preview_data['conductor_widget_instance'] = $simple_conductor_query_builder_data;\n\n\t\t\t\t\t// Setup the query arguments\n\t\t\t\t\t$this->preview_data['query_args'] = $this->get_query_args( $post_id );\n\n\t\t\t\t\t// Preview this Conductor Query\n\t\t\t\t\t$this->render_preview( $post_id );\n\n\t\t\t\t\t// Remove the POST data reference\n\t\t\t\t\tunset( $_POST['widget-' . $conductor_widget->id_base] );\n\t\t\t\t?>\n\t\t\t</div>\n\t\t<?php\n\t\t}", "function post_preview()\n{\n}", "function public_preview_markup($post) {\n\t\t// WP Nonce Hook (required)\n wp_nonce_field(basename(__FILE__), \"_publicpreview-nonce\");\n\n\t\t// Get post Preview Meta\n\t $current_preview_key = get_post_meta($post->ID, '_publicpreview_key', true);\n\t $current_preview_status = get_post_meta($post->ID, '_publicpreview_toggle', true);\n\n\t // If post does not have a current key\n\t if($current_preview_key) {\n\t \t$preview_key = $current_preview_key;\n\t } else {\n\t \t$preview_key = public_preview_key_generator();\n\t }\n\n\t // If preview is enabled\n\t if($current_preview_status != 'false'){\n\t \t$checked = 'checked';\n\t } else {\n\t \t$checked = '';\n\t }\n\n\t // Echo out all markup\n\t\techo '<p><label for=\"publicpreview\"><input type=\"checkbox\" name=\"publicpreview_toggle\" id=\"publicpreview\" value=\"true\" ' . $checked . '> Enable Public Preview</label></p>';\n\t\techo '<input type=\"hidden\" name=\"publicpreview_key\" value=\"' . $preview_key . '\">';\n\t\techo '<input style=\"width:100%; padding:.5rem 1rem;\" type=\"text\" value=\"' . get_preview_post_link( $post->ID ) . '&_publicpreview=' . $preview_key . '\" />';\n\t\techo '<p style=\"margin-top:.5rem\"><i>If enabled, use this link to provide a public preview link. This will allow someone to view \"Draft\" status posts without a login or account.</i></p>';\n\t}", "public function preview()\n {\n if (!$this->session->userdata('logged_in')) {\n $uri = urlencode(uri_string());\n redirect('/');\n }\n\n $data = $this->get_page_info(array('page_id' => $this->input->get('page_id')));\n if ($data == null) {\n $this->error404();\n return;\n }\n\n $data[\"related_pages\"] = [];\n\n //Load local theme Controller\n echo $this->themeController->render($data);\n }", "public function preview($vars = null) {\n\n\t\tif (get_option('cortex_generate_previews') == false) {\n\t\t\t$this->display($vars);\n\t\t\treturn;\n\t\t}\n\n\t\t$hash = CortexPreview::generate_preview_hash($this->id, $this->post, $vars);\n\n\t\t$preview_hash = CortexPreview::get_preview_hash($this->id, $this->post);\n\t\t$preview_size = CortexPreview::get_preview_size($this->id, $this->post);\n\t\t$preview_src = CortexPreview::get_preview_src($this->id, $this->post);\n\t\t$preview_url = CortexPreview::get_preview_url($this->id, $this->post);\n\n\t\tif ($preview_hash != $hash || is_readable($preview_src) == false) {\n\n\t\t\t$preview_hash = $hash;\n\t\t\t$preview_url = '';\n\t\t\t$preview_src = '';\n\n\t\t\t/*\n\t\t\t * This will set the preview data to render the preview with. If\n\t\t\t * we don't don this, the preview will use the previously saved\n\t\t\t * data which might be out of sync with the current data.\n\t\t\t */\n\n\t\t\tCortexPreview::set_preview_vars($this->id, $this->post, $vars);\n\t\t}\n\n\t\t$preview_w = $preview_size[0];\n\t\t$preview_h = $preview_size[1];\n\t\t$ratio = 0;\n\n\t\tif ($preview_w &&\n\t\t\t$preview_h) {\n\t\t\t$ratio = $preview_h / $preview_w * 100;\n\t\t}\n\n\t\t?>\n\t\t\t<div\n\t\t\t\tclass=\"cortex-preview\"\n\t\t\t\tdata-hash=\"<?php echo $hash ?>\"\n\t\t\t\tdata-preview-width=\"<?php echo $preview_w ?>\"\n\t\t\t\tdata-preview-height=\"<?php echo $preview_h ?>\">\n\n\t\t\t\t<?php if ($preview_url): ?>\n\n\t\t\t\t\t<div class=\"cortex-preview-image\" style=\"background-image: url('<?php echo $preview_url ?>')\"></div>\n\n\t\t\t\t<?php else: ?>\n\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t(function() {\n\t\t\t\t\t\t\tCortex.generatePreview(\"<?php echo $this->id ?>\", \"<?php echo $this->post ?>\", \"<?php echo $hash ?>\", \"<?php echo $this->get_preview_link() ?>\");\n\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t</script>\n\n\t\t\t\t\t<div class=\"cortex-preview-spinner\">\n\n\t\t\t\t\t</div>\n\n\t\t\t\t<?php endif ?>\n\n\t\t\t</div>\n\n\t\t<?php\n\t}", "function view_preview()\n {\n // fail early, fail often\n if (!array_key_exists(\"{$this->_class}_Preview\", $_GET))\n return;\n \n // sending the headers\n header(\"Content-type: text/html; charset=UTF-8\");\n header(\"Pragma: no-cache\");\n header(\"Cache-Control: no-cache\");\n header('Expires: ' . gmdate('D, d M Y H:i:s', strtotime('-1 years')) . ' GMT');\n \n // the actual PREVIEW code\n $this->widget(array(), $_GET);\n die();\n }", "function cus_preview_js() {\n wp_enqueue_script( 'cus_preview', get_template_directory_uri() . '/js/cus_preview.js', array(), '1.0', true);\n}", "function _show_post_preview()\n{\n}", "public function getPreview()\n {\n return true;\n }", "public function preview()\n {\n Requirements::clear();\n // Should contain text styles of the page by Silverstripe theme conventions.\n Requirements::css('themes/' . Config::inst()->get('SSViewer', 'theme') . '/css/editor.css');\n return $this->renderWith('PreviewFrame');\n }", "public function export_preview_data()\n {\n }", "public function export_preview_data()\n {\n }", "public function export_preview_data()\n {\n }", "function wp_ajax_imgedit_preview()\n{\n}", "public function preview(): string;", "private function preview_handler()\n\t{\n\t\t$preview = ee()->input->post('PRV', TRUE);\n\t\tif (empty($preview))\n\t\t{\n\t\t\tee()->lang->loadfile('email');\n\t\t\t$error[] = lang('em_no_preview_template_specified');\n\t\t\treturn ee()->output->show_user_error('general', $error);\n\t\t}\n\n\t\t// Clean return value, segments only\n\t\t$clean_preview = str_replace(ee()->functions->fetch_site_index(), '', $preview);\n\t\t$clean_return = str_replace(ee()->functions->fetch_site_index(), '', ee()->input->post('RET', TRUE));\n\n\t\tee()->functions->clear_caching('all', $clean_preview);\n\t\tee()->functions->clear_caching('all', $clean_return);\n\n\t\t$segments = (strpos($clean_preview, '/') === FALSE) ? '' : explode('/', $clean_preview);\n\n\t\t// this makes sure the query string is seen correctly by tags on the template\n\t\tee()->load->library('template', NULL, 'TMPL');\n\t\tee()->TMPL->parse_template_uri();\n\t\tee()->TMPL->run_template_engine($segments[0], $segments[1]);\n\t}", "function woocommerce_pip_create_box_content() {\n\n\tglobal $post_id;\n\n\t?>\n\t<table class=\"form-table\">\n\t\t<?php if ( get_post_meta( $post_id, '_pip_invoice_number', true ) ) { ?>\n\t\t<tr>\n\t\t\t<td><?php _e( 'Invoice: #', 'woocommerce-pip' ); echo get_post_meta( $post_id, '_pip_invoice_number', true ); ?></td>\n\t\t</tr>\n\t\t<?php } ?>\n\t\t<tr>\n\t\t\t<td><a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_invoice' ), 'print-pip' ); ?>\"><?php _e('Print Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_packing' ), 'print-pip' ); ?>\"><?php _e( 'Print Packing List', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { ?>\n\t\t\t\t<a class=\"button pip-email\" href=\"<?php echo wp_nonce_url( admin_url( '?email_pip=true&post=' . $post_id ), 'email-pip' ); ?>\"><?php _e( 'Send Email Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php } ?>\n\t\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php\n}", "public static function live_preview() {\r\n wp_enqueue_script( \r\n 'mytheme-themecustomizer', // Give the script a unique ID\r\n get_template_directory_uri() . '/frontend/js/theme-customizer.js', // Define the path to the JS file\r\n array( 'jquery', 'customize-preview' ), // Define dependencies\r\n '', // Define a version (optional) \r\n true // Specify whether to put in footer (leave this true)\r\n );\r\n }", "function print_preview($site, $data){\n $text = strip_tags($data[\"text\"]);\n if(strlen($text)>70) $text = mb_substr($text, 0 ,70).'..';\n $fout = '\n <div class=\"content_block\">\n ';\n if(!empty($data[\"img\"])){\n $fout .= '\n <div vr-control id=\"content_'.md5($data[\"url\"]).'\" class=\"content_img\" style=\"background-image: url(\\''.$_SERVER[\"DIR\"].'/img/data/thumb/'.$data[\"img\"].'\\');\"\n onClick=\\'document.getElementById(\"'.$data[\"url\"].'\").click();\\'>\n &nbsp;\n </div>';\n }else{\n $fout .= '\n <div vr-control id=\"content_'.md5($data[\"url\"]).'\" class=\"content_img\" style=\"background-image: url(\\''.$_SERVER[\"DIR\"].'/img/no-image.jpg\\');\"\n onClick=\\'document.getElementById(\"'.$data[\"url\"].'\").click();\\'>\n &nbsp;\n </div>';\n }\n $fout .= '\n <a vr-control id=\"'.$data[\"url\"].'\" href=\"'.$_SERVER[\"DIR\"].'/content/'.$data[\"url\"].'\"><h3>'.mb_substr(strip_tags($data[\"caption\"]),0,100).'</h3></a>\n <p class=\"content_block_text\">\n '.$text.'\n </p>\n </div>';\n return $fout;\n}", "public function preview()\n {\n // Enable theme for preview (may be needed for Shortcodes)\n Config::nest();\n Config::modify()->set(SSViewer::class, 'theme_enabled', true);\n\n $content = $this->customise([\n 'Body' => $this->record->getEmailBodyContent(),\n 'HideFormData' => (bool) $this->record->HideFormData,\n 'Fields' => $this->getPreviewFieldData()\n ])->renderWith($this->record->EmailTemplate);\n\n Config::unnest();\n\n return $content;\n }", "public function getPreviewUrl()\n\t{\n\t\tif ($this->isPending()) {\n\t\t\treturn Mage::helper('wordpress')->getUrl('?p=' . $this->getId() . '&preview=1');\n\t\t}\n\t\t\n\t\treturn '';\n\t}", "public function get_preview_url()\n {\n }", "public function getPreviewHTML() {\n\t\treturn \"<div class=\\\"vimeomodule-preview preview-controls-sideways\\\">\".$this->getVideoCode(700, 394).\"</div>\";\n\t}", "public function preview(Request $request)\n {\n if ($request->ajax()) {\n try {\n $products = $request->get('products');\n $print = $request->get('print');\n $barcode_setting = $request->get('barcode_setting');\n $business_id = $request->session()->get('user.business_id');\n\n $barcode_details = Barcode::find($barcode_setting);\n //print_r($barcode_details);exit;\n $business_name = $request->session()->get('business.name');\n\n $product_details = [];\n $total_qty = 0;\n foreach ($products as $value) {\n $details = $this->productUtil->getDetailsFromVariation($value['variation_id'], $business_id, null, false);\n $product_details[] = ['details' => $details, 'qty' => $value['quantity']];\n $total_qty += $value['quantity'];\n }\n\n $page_height = null;\n if ($barcode_details->is_continuous) {\n $rows = ceil($total_qty/$barcode_details->stickers_in_one_row) + 0.4;\n $barcode_details->paper_height = $barcode_details->top_margin + ($rows*$barcode_details->height) + ($rows*$barcode_details->row_distance);\n }\n\n $html = view('labels.partials.preview')\n ->with(compact('print', 'product_details', 'business_name', 'barcode_details', 'page_height'))->render();\n\n $output = ['html' => $html,\n 'success' => true,\n 'msg' => ''\n ];\n } catch (\\Exception $e) {\n \\Log::emergency(\"File:\" . $e->getFile(). \"Line:\" . $e->getLine(). \"Message:\" . $e->getMessage());\n\n $output = ['html' => '',\n 'success' => false,\n 'msg' => __('lang_v1.barcode_label_error')\n ];\n }\n\n return $output;\n }\n }", "public static function live_preview() {\r\n\t\t wp_enqueue_script( \r\n\t\t\t 'manual-themecustomizer', // Give the script a unique ID\r\n\t\t\t get_template_directory_uri() . '/js/customize-preview.js', // Define the path to the JS file\r\n\t\t\t array( 'jquery', 'customize-preview' ), // Define dependencies\r\n\t\t\t '', // Define a version (optional) \r\n\t\t\t true // Specify whether to put in footer (leave this true)\r\n\t\t );\r\n\t }", "public function settings_previewed()\n {\n }", "public function preview()\n \t{\n \t\twp_enqueue_script('customizer', get_template_directory_uri().'/assets/js/customizer.min.js', array('jquery', 'customize-preview'), '1.0.0', true);\n \t}", "function woocommerce_pip_page() {\n\n\t//Check the user capabilities\n\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce-pip' ) );\n\t}\n\t//Load needed WP resources for media uploader\n\twp_enqueue_media();\n\n\t//Save the field values\n\tif ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) {\n\t\tforeach ( $_POST as $key => $value ) {\n\t\t\tif ( $key == 'woocommerce_pip_invoice_start' && isset( $_POST['woocommerce_pip_reset_start'] ) ) {\n\t\t\t\tif ( $_POST['woocommerce_pip_reset_start'] == 'Yes' ) {\n\t\t\t\t\tupdate_option( $key, ltrim( $value, '0') );\n\t\t\t\t}\n\t\t\t} elseif ( $key == 'woocommerce_pip_reset_start' ) {\n\t\t\t} else {\n\t\t\t\tif ( get_option( $key ) != $value ) {\n\t\t\t\t\tupdate_option( $key, $value );\n\t\t\t\t} else {\n\t\t\t\t\tadd_option( $key, $value, '', 'no' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t?>\n\t<div class=\"wrap\">\n\t\t<div id=\"icon-options-general\" class=\"icon32\">\n\t\t\t<br />\n\t\t</div>\n\t\t<h2><?php _e( 'WooCommerce - Print invoice/packing list settings', 'woocommerce-pip' ); ?></h2>\n\t\t<?php if ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) { ?>\n\t\t<div id=\"message\" class=\"updated fade\"><p><strong><?php _e( 'Your settings have been saved.', 'woocommerce-pip' ); ?></strong></p></div>\n\t\t<?php } ?>\n\t\t<p><?php _e( 'Change settings for print invoice/packing list.', 'woocommerce-pip' ); ?></p>\n\t\t<div id=\"content\">\n\t\t\t <form method=\"post\" action=\"\" id=\"pip_settings\">\n\t\t\t\t<input type=\"hidden\" name=\"pip_fields_submitted\" value=\"submitted\">\n\t\t\t\t<div id=\"poststuff\">\n\t\t\t\t\t<div class=\"postbox\">\n\t\t\t\t\t\t<h3 class=\"hndle\"><?php _e( 'Settings', 'woocommerce-pip' ); ?></h3>\n\t\t\t\t\t\t<div class=\"inside pip-preview\">\n\t\t\t\t\t\t\t <table class=\"form-table\">\n\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_name\"><b><?php _e( 'Company name:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_company_name\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_company_name' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom company name for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_logo\"><b><?php _e( 'Custom logo:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input id=\"woocommerce_pip_logo\" type=\"text\" size=\"36\" name=\"woocommerce_pip_logo\" value=\"<?php echo get_option( 'woocommerce_pip_logo' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<input id=\"upload_image_button\" type=\"button\" value=\"<?php _e( 'Upload Image', 'woocommerce-pip' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom logo for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to use a custom logo.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_extra\"><b><?php _e( 'Company extra info:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_company_extra\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_company_extra' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Some extra info that is displayed under company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print the info.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_return_policy\"><b><?php _e( 'Returns Policy, Conditions, etc.:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_return_policy\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_return_policy' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Here you can add some policies, conditions etc. For example add a returns policy in case the client would like to send back some goods.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print any policy.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_footer\"><b><?php _e( 'Custom footer:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_footer\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_footer' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom footer for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a footer.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_start\"><b><?php _e( 'Invoice counter start:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"woocommerce_pip_reset_start\" name=\"woocommerce_pip_reset_start\" value=\"Yes\" /> <?php _e( 'Reset invoice numbering', 'woocommerce-pip' ); ?><br />\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" readonly=\"true\" id=\"woocommerce_pip_invoice_start\" name=\"woocommerce_pip_invoice_start\" class=\"regular-text\" value=\"<?php echo wp_kses_stripslashes( get_option( 'woocommerce_pip_invoice_start' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Reset the invoice counter to start your custom position for example 103. Leading zeros will be trimmed. Use prefix instead.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'You need to check the checkbox to actually reset the value.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_prefix\"><b><?php _e( 'Invoice numbering prefix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_prefix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_prefix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom prefix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_suffix\"><b><?php _e( 'Invoice numbering suffix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_suffix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_suffix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom suffix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Preview before printing:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_preview' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Send invoice as HTML email:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t <p class=\"submit\">\n\t\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', 'woocommerce-pip' ); ?>\" />\n\t\t\t </p>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<?php\n}", "public static function live_preview() {\n wp_enqueue_script( \n 'mytheme-themecustomizer', // Give the script a unique ID\n get_template_directory_uri() . '/js/theme-customizer.js', // Define the path to the JS file\n array( 'jquery', 'customize-preview' ), // Define dependencies\n '', // Define a version (optional) \n true // Specify whether to put in footer (leave this true)\n );\n }", "public function get_preview_structure()\n {\n $optin_form_fonts = $this->get_optin_form_fonts();\n\n // set body padding-top to 0 if optin is bar.\n $body_padding_top = in_array($this->optin_campaign_type, ['bar']) ? 0 : '10%';\n ob_start();\n\n printf('<title>%s</title>', OCR::get_optin_campaign_name($this->optin_campaign_id));\n wp_head();\n\n echo \"<body style='background: #f3f3f3 !important;padding-top:$body_padding_top;'>\";\n\n if (in_array($this->optin_campaign_type,\n ['sidebar', 'inpost'])) { // ensure sidebar and inpost optin has a max width for preview sake.\n echo '<div style=\"max-width:900px;margin: auto\">';\n }\n\n echo $this->get_optin_form_structure();\n\n if (in_array($this->optin_campaign_type, ['sidebar', 'inpost'])) {\n echo '</div>';\n }\n\n if (is_customize_preview()) {\n echo '<style id=\"mo-customizer-preview-custom-css\"></style>';\n // hide any element that might have been injected to footer by any plugin.\n echo '<div style=\"display:none\">';\n wp_footer();\n echo '</div>';\n // script below is below wp_footer() because jquery must have been loaded by now.\n if ( ! empty($optin_form_fonts)) {\n echo \"<script type='text/javascript'>jQuery(function(){if(typeof WebFont!=='undefined'){WebFont.load({google: {families: [$optin_form_fonts]}})}});</script>\";\n }\n }\n echo '</body>';\n\n return ob_get_clean();\n }", "public function generatePreviewImage()\n {\n }", "static function get_wrapper_preview(){\n\t\t\t\t\n\t\t\t\tif( !check_ajax_referer('gdlr_core_page_builder', 'security', false) ){\n\t\t\t\t\tdie(json_encode(array(\n\t\t\t\t\t\t'status' => 'failed',\n\t\t\t\t\t\t'head' => esc_html__('Invalid Nonce', 'goodlayers-core'),\n\t\t\t\t\t\t'message'=> esc_html__('Please refresh the page and try again.' ,'goodlayers-core')\n\t\t\t\t\t)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( !empty($_POST['type']) ){\n\t\t\t\t\t$value = empty($_POST['value'])? array(): gdlr_core_process_post_data($_POST['value']); \n\t\t\t\t\t$content = call_user_func(self::$pb_elements[$_POST['type']] . '::get_template', $value, 'gdlr_core_page_builder::get_page_builder_item');\n\t\t\t\t\n\t\t\t\t\tdie(json_encode(array(\n\t\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t\t'preview_content' => $content\n\t\t\t\t\t))); \n\t\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\t}", "function _set_preview($post)\n{\n}", "public function createPreviewCode()\n {\n if(strlen($this->title) > 15)\n $titlePreview = substr($this->title, 0, 15) . \"...\";\n else\n $titlePreview = $this->title;\n\n if(strlen($this->description) > 120)\n $descriptionPreview = substr($this->description, 0, 120) . \"...\";\n else\n $descriptionPreview = $this->description;\n\n $code = dechex(($this->PK * 7));\n\n $output = \"<div class='col-md-6'>\\n\n \\t<div class='col-md-6'>\\n\";\n\n if($this->pictures == null)\n $output = $output . \"\\t\\t<img src='/images/no-image.png' class='previewImage' alt='Picture of the product'/>\\n\";\n else\n $output = $output . \"\\t\\t<img src='/images/uploads/\" . $this->pictures[0][0] . \"' class='previewImage' alt='Picture of the product'/>\\n\";\n\n\n $output = $output . \"\\t</div>\\n\n \\t<div class='col-md-6'>\\n\n \\t\\t<h2><a href='/advert.php?advert=\" . $code . \"'>$titlePreview</a></h2>\\n\n \\t\\t<p><strong>Price:</strong> £$this->price</p>\\n\n \\t\\t<p>$descriptionPreview</p>\\n\n \\t</div>\\n\n \\t<div class=\\\"col-xs-12\\\" style=\\\"height:50px;\\\"></div>\\n\n </div>\\n\\n\";\n return $output;\n }", "public function customize_preview_base()\n {\n }", "public function builder_module_preview( $atts, $content = null ) {\n extract( $this->get_sanitized_attributes( $atts ) );\n $o = null;\n if ( $ids ) {\n $o .= '<ul class=\"cloud-list has-clearfix spacing-1\">';\n foreach ( explode( ',', $ids ) as $id ) {\n $img_data = wp_get_attachment_image_src( $id, 'thumbnail' );\n $o .= '<li><img height=\"40\" width=\"40\" style=\"display:block;height:40px;width:40px;\" src=\"' .$img_data[0] . '\" alt=\"' . cv_get_attachment_alt( $id ) . '\" /></li>';\n }\n $o .= '</ul>';\n }\n return $o;\n }", "public function preview($args) {\n }", "public static function live_preview() {\r\n wp_enqueue_script( \r\n 'mytheme-themecustomizer', // Give the script a unique ID\r\n get_stylesheet_directory_uri() . '/assets/js/theme-customizer.js', // Define the path to the JS file\r\n array( 'jquery', 'customize-preview' ), // Define dependencies\r\n '', // Define a version (optional) \r\n true // Specify whether to put in footer (leave this true)\r\n );\r\n }", "public function getPreview()\n {\n return $this->preview;\n }", "public static function live_preview()\n {\n wp_enqueue_script(\n 'scoop-themecustomizer',\n get_stylesheet_directory_uri() . '/assets/scripts/customizer.js',\n array('jquery', 'customize-preview'),\n '',\n true\n );\n }", "public function loadPreview(){\r\n\r\n $values = array();\r\n $themeName = $this->request->getParam(\"theme\");\r\n\r\n $theme = new Theme($themeName);\r\n $configXmlPath = Config::GetValue(\"AppRoot\").\"/data/tmp/XSparrow/{$theme->_shortname}/configuration.xml\";\r\n $docxapXslPath = Config::GetValue(\"AppRoot\").\"/data/tmp/XSparrow/{$theme->version}/{$theme->projectName}/docxap.xsl\";\r\n \r\n $domDoc = new DOMDocument();\r\n $domDoc->preserveWhiteSpace = false;\r\n $domDoc->validateOnParse = true;\r\n $domDoc->formatOutput = true;\r\n\r\n $xsltHandler = new XSLT();\r\n\r\n error_log(\"$configXmlPath ====== $docxapXslPath\");\r\n $xsltHandler->setXML($configXmlPath);\r\n $xsltHandler->setXSL($docxapXslPath);\r\n\r\n $content = $xsltHandler->process();\r\n $domDoc->loadHTML($content);\r\n $document = $domDoc->saveHTML();\r\n\r\n $replacement=Config::GetValue(\"UrlRoot\").\"/data/tmp/XSparrow/{$theme->_shortname}/$1\";\r\n $content = preg_replace(\"/@@@RMximdex.dotdot\\((.+)\\)@@@/\", $replacement, $content);\r\n if ($content){\r\n print_r($content);\r\n die(); \r\n }else{\r\n $template = \"preview\";\r\n $this->render($values, $template, 'basic_html.tpl');\r\n }\r\n\r\n }", "function page_preview($atts,$pageid = null) {\nextract(shortcode_atts(array(\n\t\t\"pageid\" => '0'\n\t), $atts));\nreturn '<div class=\"page-preview\">' . '<h3>' . get_the_title( $pageid) . '</h3>' . get_the_post_thumbnail( $pageid, 'preview' ) . get_post_field('post_content', $pageid) . '</div>';\n//return 'heya';\n}", "function preview($code = '')\n\t{\n\t\tConfigure::write(\"debug\", 0);\n\t\t$tmpname = tempnam(\"/tmp\", \"hd_product_preview_\");\n\t\t#HOW HANDLE WARNING???\n\n\t\t$basedir = dirname(__FILE__).\"/../../images/products/blanks\";\n\t\t$vertical_dir = \"$basedir/$code/vertical\";\n\t\t$horiz_dir = \"$basedir/$code/horizontal\";\n\n\t\t# Determine based off of IMAGE ORIENTATION XXX TODO\n\n\t\t#\n\t\t$dir = \"\";\n\t\t#error_log(\"VD=$vertical_dir\");\n\t\t#error_log(\"HD=$horiz_dir\");\n\t\tif (file_exists($vertical_dir)) { $dir = $vertical_dir; }\n\t\telse if (file_exists($horiz_dir)) { $dir = $horiz_dir; }\n\n\t\t$svgfile = \"$dir/svg/$code.svg\"; \n\t\tif (!file_exists($svgfile))\n\t\t{\n\t\t\t$svgfile = \"$dir/svg/$code.png\";\n\t\t}\n\n\t\t#error_log(\"SVGFILE=$svgfile\");\n\n\t\t$svg_raw_content = file_get_contents($svgfile);\n\t\t$svg_content = $svg_raw_content;\n\n\t\t#error_log(\"TMPNAME=$tmpname\");\n\n\t\t$svghandle = fopen(\"$tmpname.svg\", \"w\");\n\t\tfwrite($svghandle, $svg_content);\n\t\tfclose($svghandle);\n\n\t\t#$raw_image = shell_exec(\"convert $tmpname.svg png:-\");\n\t\t$raw_image = shell_exec(\"convert -resize 100x $tmpname.svg png:-\");\n\t\t# MAY BE FAULTY, freezing....\n\n\t\tunlink(\"$tmpname.svg\");\n\t\n\t\theader(\"Content-Type: image/png\");\n\t\t#header(\"Content-Type: text/plain\");\n\t\t$size = count($raw_image);\n\t\theader(\"Length: $size\");\n\t\techo $raw_image;\n\t\t#echo \"CRAP=$size\";\n\n\t\texit(0);\n\t}", "public function inPreview();", "public function forcePreview() {}", "public function customize_preview_enqueue()\n {\n }", "public function preview(){\n\t\t\t// Retrieve image\n\t\t\t\t$pobj = Photo::fetch($_GET['id']);\n\t\t\t\t$pobj->show('preview');\n\t\t\texit();\t\n\t\t}", "function attachment_preview($original) {\r\n $file = str_replace(get_site_url().'/','' ,$original);\r\n $file = str_replace('//','/',ABSPATH . $file);\r\n // check if file exists\r\n if (file_exists($file) && ($file != ABSPATH)) {\r\n $thumb = wp_get_attachment_image( $this->get_attachment_id($original), array(80,80),1);\r\n\r\n $ext = pathinfo($original, PATHINFO_EXTENSION);\r\n // If the file hasnt been upload through wordpress\r\n if (($this->get_attachment_id($original) == '') && ( in_array($ext ,$this->image_extensions))) {\r\n\r\n $size = getimagesize($file);\r\n\r\n if (($size[0] < 80) && ( $size[1] < 80)) {\r\n $thumb = \"<img src='\" . $original . \"' />\";\r\n } else {\r\n $thumb = \"<img src='\" . wp_create_thumbnail( $file, 40 ) . \"' />\";\r\n }\r\n //print var_export(wp_create_thumbnail( $file, 4 ),true);\r\n\r\n } \r\n print \"<div class='option_preview' ><a href='\" . $original . \"'>\" . $this->filetourl($thumb) . \"\" .basename($original) . \"</a></div>\";\r\n }\r\n }", "public function is_preview()\n {\n }", "public function is_preview()\n {\n }", "public function is_preview()\n {\n }", "public function process_email_preview() {\n\n\t\tif ( ! $this->is_preview() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$email = new Email( (int) $_GET['email_id'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotValidated\n\n\t\t// It's a raw HTML (with html/body tags), so print as is.\n\t\techo $email->is_html() ? $email->get_content() : nl2br( esc_html( $email->get_content() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\n\t\texit;\n\t}", "public function preview_js() {\n\t\t// Ensure dependencies have been output by now.\n\t\twp_print_scripts( array( 'jquery', 'customize-preview' ) );\n\n\t\t?>\n\t\t<script>\n\t\t\t( function( $ ){\n\n\t\t\t\t<?php echo apply_filters( 'styles_customize_preview', '' ) ?>\n\n\t\t\t} )( jQuery );\n\t\t</script>\n\t\t<?php\n\t}", "public function adminPreview()\n {\n }", "public function setPreview($preview);", "public function get_preview() {\n\n\t\tcheck_ajax_referer( 'get-csv-preview', 'security' );\n\n\t\t$delimiter = isset( $_GET['delimiter'] ) ? $_GET['delimiter'] : ',';\n\t\t$file = isset( $_GET['file'] ) ? $_GET['file'] : '';\n\n\t\tif ( ! $file ) {\n\t\t\twp_die();\n\t\t}\n\n\t\tlist( $data, $headers ) = WC_CSV_Import_Suite_Parser::parse_sample_data( $file, $delimiter );\n\n\t\t$data = array( 1 => $headers ) + $data;\n\n\t\techo WC_CSV_Import_Suite_Parser::generate_html_rows( $data );\n\n\t\twp_die();\n\t}", "function cltvo_show_product_details() {\n\t\twc_get_template( 'single-product/product-details.php' );\n\t}", "public static function live_preview() {\n\t\twp_enqueue_script(\n\t\t\t'FCN_themecustomizer',\n\t\t\tget_template_directory_uri().'/js/theme-customizer.js',\n\t\t\t\tarray('jquery', 'customize-preview'),\n\t\t\t\t'',\n\t\t\t\ttrue\n\t\t\t);\n\t}", "protected function preview()\n {\n return $this->objectUrl($this->value);\n }", "function custom_ph_product_excerpt(){\r\n ob_start();\r\n ?>\r\n\r\n <div class=\"post-submission--form-row post-submission--form-row-tagline post-category\">\r\n <label class=\"form--label\" for=\"tagline\">\r\n <span class=\"form--label-icon\">\r\n <svg width=\"16\" height=\"6\" viewBox=\"0 0 16 6\" xmlns=\"http://www.w3.org/2000/svg\"><title>Slice 1</title><path d=\"M0 0h11v2H0V0zm0 4h16v2H0V4z\" fill=\"#BBB\" fill-rule=\"evenodd\"></path>\r\n </svg>\r\n </span>\r\n <span><?php _e('Tagline','pluginhunt');?></span></label><div class=\"form--field\">\r\n <input class=\"form--input\" maxlength=\"300\" name=\"tagline\" placeholder=\"<?php _e(\"Describe the product briefly\",\"pluginhunt\");?>\" type=\"text\" id=\"tagline\" value=\"\">\r\n </div>\r\n </div>\r\n\r\n <?php\r\n $content = ob_get_contents();\r\n ob_end_clean();\r\n echo $content;\r\n}", "public function start_previewing_theme()\n {\n }", "function tmpl_show_custom_fields_onpreview($session,$cur_post_type){\r\n\tglobal $post,$upload;\r\n\t\r\n\t$heading_type = fetch_heading_per_post_type($cur_post_type);\r\n\tif(count($heading_type) > 0)\r\n\t{\r\n\t\t/* Fetch the custom fields as per a different heading type */\r\n\t\tforeach($heading_type as $_heading_type)\t\t\r\n\t\t\t$post_meta_info_arr[$_heading_type] = tmpl_show_on_detail($cur_post_type,$_heading_type);\r\n\t}\r\n\telse\r\n\t\t$post_meta_info_arr[] = tmpl_show_on_detail($cur_post_type,'');\r\n\t\r\n\techo \"<div class='grid02 rc_rightcol clearfix'>\";\r\n\techo \"<ul class='list'>\";\r\n\tif($post_meta_info_arr)\r\n\t{\t\r\n\t\tforeach($post_meta_info_arr as $key=> $post_meta_info)\r\n\t\t {\r\n\t\t\t$activ = fetch_active_heading($key);\r\n\t\t\t$j=0;\r\n\t\t\twhile ($post_meta_info->have_posts()) : $post_meta_info->the_post();\r\n\t\t\t\tif($post->post_name != 'post_content' && $post->post_name != 'post_title' && $post->post_name != 'category' && $post->post_name != 'post_images' && $post->post_name != 'post_excerpt')\r\n\t\t\t\t{\r\n\t\t\t\t\tif($j==0){\r\n\t\t\t\t\t\tif($activ):\r\n\t\t\t\t\t\t\tif($key == '[#taxonomy_name#]'):\r\n\t\t\t\t\t\t\t\techo '<div class=\"sec_title\"><h3>'.$cur_post_type.__(' Information','templatic').'</h3></div>';\r\n\t\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\t\techo \"<li><h3>\".$key.\"</h3></li>\";\r\n\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\t$j++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(isset($session[$post->post_name]) && $session[$post->post_name]!=\"\"){\r\n\t\t\t\t\t\tif(get_post_meta($post->ID,\"ctype\",true) == 'multicheckbox')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach($session[$post->post_name] as $value)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$_value .= $value.\",\";\t \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\techo \"<li><p>\".$post->post_title.\": \".substr($_value,0,-1).\"</p></li>\"; \r\n\t\t\t\t\t\t}else\r\n\t\t\t\t\t\t{\r\n\t\t\r\n\t\t\t\t\t\t\t echo \"<li><p>\".$post->post_title.\": \".stripslashes($session[$post->post_name]).\"</p></li>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\tif(get_post_meta($post->ID,\"ctype\",true) == 'upload')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$upload[] = $post->post_name;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tendwhile;\r\n\t\t}\r\n\t}\r\n\techo \"</ul>\";\r\n\techo \"</div>\";\r\n}", "function mytheme_customizer_live_preview()\n{\n wp_enqueue_script(\n 'mytheme-themecustomizer', //Give the script an ID\n get_template_directory_uri().'/js/theme-customizer.js',//Point to file\n array( 'jquery','customize-preview' ), //Define dependencies\n '', //Define a version (optional)\n true //Put script in footer?\n );\n}", "function dd_base_customize_preview_js() {\n\twp_enqueue_script( 'dd_base-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true );\n}", "public function getPreviewHtml()\n {\n return $this->_previewHtml;\n }", "public function previewOutputMarkup($sliderID,$output = null){\n\n\t\t\tif($sliderID == \"empty_output\"){\n\t\t\t\t$this->loadingMessageOutput();\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif($output == null)\n\t\t\t\t$output = new RevSliderOutput();\n\n\t\t\t$slider = new RevSlider();\n\t\t\t$slider->initByID($sliderID);\n\t\t\t$isWpmlExists = UniteWpmlRev::isWpmlExists();\n\t\t\t$useWpml = $slider->getParam(\"use_wpml\",\"off\");\n\t\t\t$wpmlActive = false;\n\t\t\tif($isWpmlExists && $useWpml == \"on\"){\n\t\t\t\t$wpmlActive = true;\n\t\t\t\t$arrLanguages = UniteWpmlRev::getArrLanguages(false);\n\n\t\t\t\t//set current lang to output\n\t\t\t\t$currentLang = UniteFunctionsRev::getPostGetVariable(\"lang\");\n\n\t\t\t\tif(empty($currentLang))\n\t\t\t\t\t$currentLang = UniteWpmlRev::getCurrentLang();\n\n\t\t\t\tif(empty($currentLang))\n\t\t\t\t\t$currentLang = $arrLanguages[0];\n\n\t\t\t\t$output->setLang($currentLang);\n\n\t\t\t\t$selectLangChoose = UniteFunctionsRev::getHTMLSelect($arrLanguages,$currentLang,\"id='select_langs'\",true);\n\t\t\t}\n\n\n\t\t\t$output->setPreviewMode();\n\n\t\t\t//put the output html\n\t\t\t$urlPlugin = \"http://yourpluginpath/\";\n\t\t\t$urlPreviewPattern = UniteBaseClassRev::$url_ajax_actions.\"&client_action=preview_slider&only_markup=true&sliderid=\".$sliderID.\"&lang=[lang]&nonce=[nonce]\";\n\t\t\t$nonce = wp_create_nonce(\"revslider_actions\");\n\n\t\t\t$setBase = (is_ssl()) ? \"https://\" : \"http://\";\n\n\t\t\t$f = new ThemePunch_Fonts();\n\t\t\t$my_fonts = $f->get_all_fonts();\n\n\n\t\t\t?>\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t\t<script type='text/javascript' src='<?php echo $setBase; ?>ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>\n\t\t\t</head>\n\t\t\t<body style=\"padding:0px;margin:0px;\">\n\t\t\t\t<?php if($wpmlActive == true):?>\n\t\t\t\t\t<div style=\"margin-bottom:10px;text-align:center;\">\n\t\t\t\t\t<?php _e(\"Choose language\",REVSLIDER_TEXTDOMAIN)?>: <?php echo $selectLangChoose?>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tvar g_previewPattern = '<?php echo $urlPreviewPattern?>';\n\t\t\t\t\t\tjQuery(\"#select_langs\").change(function(){\n\t\t\t\t\t\t\tvar lang = this.value;\n\t\t\t\t\t\t\tvar nonce = \"<?php echo $nonce; ?>\";\n\t\t\t\t\t\t\tvar pattern = g_previewPattern;\n\t\t\t\t\t\t\tvar urlPreview = pattern.replace(\"[lang]\",lang).replace(\"[nonce]\",nonce);\n\t\t\t\t\t\t\tlocation.href = urlPreview;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tjQuery('body').on('click', '#rev_replace_images', function(){\n\t\t\t\t\t\t\tvar from = jQuery('input[name=\"orig_image_path\"]').val();\n\t\t\t\t\t\t\tvar to = jQuery('input[name=\"replace_image_path\"]').val();\n\n\t\t\t\t\t\t\tjQuery('#rev_script_content').val(jQuery('#rev_script_content').val().replace(from, to));\n\t\t\t\t\t\t\tjQuery('#rev_the_content').val(jQuery('#rev_the_content').val().replace(from, to));\n\t\t\t\t\t\t\tjQuery('#rev_style_content').val(jQuery('#rev_style_content').val().replace(from, to));\n\t\t\t\t\t\t\tjQuery('#rev_head_content').val(jQuery('#rev_head_content').val().replace(from, to));\n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>\n\t\t\t\t<?php endif?>\n\t\t\t<?php\n\t\t\t//UniteBaseClassRev::$url_plugin\n\n\t\t\tob_start();\n\t\t\t?><link rel='stylesheet' href='<?php echo $urlPlugin?>css/settings.css?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>' type='text/css' media='all' />\n<?php\n\t\t$http = (is_ssl()) ? 'https' : 'http';\n\n\t\tif(!empty($my_fonts)){\n\t\t\tforeach($my_fonts as $c_font){\n\t\t\t\t?><link rel='stylesheet' href=\"<?php echo $http.'://fonts.googleapis.com/css?family='.strip_tags($c_font['url']); ?>\" type='text/css' /><?php\n\t\t\t\techo \"\\n\";\n\t\t\t}\n\t\t}\n\t\t?>\n<script type='text/javascript' src='<?php echo $urlPlugin?>js/jquery.themepunch.tools.min.js?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>'></script>\n<script type='text/javascript' src='<?php echo $urlPlugin?>js/jquery.themepunch.revolution.min.js?rev=<?php echo GlobalsRevSlider::SLIDER_REVISION; ?>'></script>\n<?php\n\t\t\t$head_content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\tob_end_clean();\n\n\t\t\tob_start();\n\n\t\t\t$custom_css = RevOperations::getStaticCss();\n\t\t\techo $custom_css.\"\\n\\n\";\n\n\t\t\techo '/*****************'.\"\\n\";\n\t\t\techo ' ** '.__('CAPTIONS CSS', REVSLIDER_TEXTDOMAIN).\"\\n\";\n\t\t\techo ' ****************/'.\"\\n\\n\";\n\t\t\t$db = new UniteDBRev();\n\t\t\t$styles = $db->fetch(GlobalsRevSlider::$table_css);\n\t\t\techo UniteCssParserRev::parseDbArrayToCss($styles, \"\\n\");\n\n\t\t\t$style_content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\tob_end_clean();\n\n\t\t\tob_start();\n\n\t\t\t$output->putSliderBase($sliderID);\n\n\t\t\t$content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\tob_end_clean();\n\n\t\t\t$script_content = substr($content, strpos($content, '<script type=\"text/javascript\">'), strpos($content, '</script>') + 9 - strpos($content, '<script type=\"text/javascript\">'));\n\t\t\t$content = htmlentities(str_replace($script_content, '', $content));\n\t\t\t$script_content = str_replace('\t\t\t\t', '', $script_content);\n\t\t\t$script_content = str_replace(array('<script type=\"text/javascript\">', '</script>'), '', $script_content);\n\n\t\t\t?>\n\t\t\t<style>\n\t\t\t\tbody \t { font-family:sans-serif; font-size:12px;}\n\t\t\t\ttextarea { background:#f1f1f1; border:#ddd; font-size:10px; line-height:16px; margin-bottom:40px; padding:10px;}\n\t\t\t\t.rev_cont_title { color:#000; text-decoration:none;font-size:14px; line-height:24px; font-weight:800;background: #D5D5D5;padding: 10px;}\n\t\t\t\t.rev_cont_title a,\n\t\t\t\t.rev_cont_title a:visited { margin-left:25px;font-size:12px;line-height:12px;float:right;background-color:#8e44ad; color:#fff; padding:8px 10px;text-decoration:none;}\n\t\t\t\t.rev_cont_title a:hover\t { background-color:#9b59b6}\n\t\t\t</style>\n\t\t\t<p><?php $dir = wp_upload_dir(); ?>\n\t\t\t\t<?php _e('Replace image path:', REVSLIDER_TEXTDOMAIN); ?> <?php _e('From:', REVSLIDER_TEXTDOMAIN); ?> <input type=\"text\" name=\"orig_image_path\" value=\"<?php echo @$dir['baseurl']; ?>\" /> <?php _e('To:', REVSLIDER_TEXTDOMAIN); ?> <input type=\"text\" name=\"replace_image_path\" value=\"\" /> <input id=\"rev_replace_images\" type=\"button\" name=\"replace_images\" value=\"<?php _e('Replace', REVSLIDER_TEXTDOMAIN); ?>\" />\n\t\t\t</p>\n\n\t\t\t<div class=\"rev_cont_title\"><?php _e('Header', REVSLIDER_TEXTDOMAIN); ?> <a class=\"button-primary revpurple export_slider_standalone copytoclip\" data-idt=\"rev_head_content\" href=\"javascript:void(0);\" original-title=\"\"><?php _e('Mark to Copy', REVSLIDER_TEXTDOMAIN); ?></a><div style=\"clear:both\"></div></div>\n\t\t\t<textarea id=\"rev_head_content\" readonly=\"true\" style=\"width: 100%; height: 100px; color:#3498db\"><?php echo $head_content; ?></textarea>\n\t\t\t<div class=\"rev_cont_title\"><?php _e('CSS', REVSLIDER_TEXTDOMAIN); ?><a class=\"button-primary revpurple export_slider_standalone copytoclip\" data-idt=\"rev_style_content\" href=\"javascript:void(0);\" original-title=\"\"><?php _e('Mark to Copy', REVSLIDER_TEXTDOMAIN); ?></a></div>\n\t\t\t<textarea id=\"rev_style_content\" readonly=\"true\" style=\"width: 100%; height: 100px;\"><?php echo $style_content; ?></textarea>\n\t\t\t<div class=\"rev_cont_title\"><?php _e('Body', REVSLIDER_TEXTDOMAIN); ?><a class=\"button-primary revpurple export_slider_standalone copytoclip\" data-idt=\"rev_the_content\" href=\"javascript:void(0);\" original-title=\"\"><?php _e('Mark to Copy', REVSLIDER_TEXTDOMAIN); ?></a></div>\n\t\t\t<textarea id=\"rev_the_content\" readonly=\"true\" style=\"width: 100%; height: 100px;\"><?php echo $content; ?></textarea>\n\t\t\t<div class=\"rev_cont_title\"><?php _e('Script', REVSLIDER_TEXTDOMAIN); ?><a class=\"button-primary revpurple export_slider_standalone copytoclip\" data-idt=\"rev_script_content\" href=\"javascript:void(0);\" original-title=\"\"><?php _e('Mark to Copy', REVSLIDER_TEXTDOMAIN); ?></a></div>\n\t\t\t<textarea id=\"rev_script_content\" readonly=\"true\" style=\"width: 100%; height: 100px;\"><?php echo $script_content; ?></textarea>\n\n\t\t\t<script>\n\t\t\t\tjQuery('body').on('click','.copytoclip',function() {\n\t\t\t\t\tjQuery(\"#\"+jQuery(this).data('idt')).select();\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\t<?php\n\t\t\texit();\n\t\t}", "public function customize_preview_settings()\n {\n }", "function ivan_vc_customizer_output() {\r\n\r\n\tglobal $elite_addons_vc_support;\r\n\r\n\tif( $elite_addons_vc_support == true )\r\n\t\treturn;\r\n\r\n\t$output = '';\r\n\r\n\tob_start();\r\n\r\n\t//\r\n\t// Primary Color\r\n\t//\r\n\t$accentBG = ivan_vc_get_option('ivan_vc_primary_bg');\r\n\t$accentColor = '#fff'; // Default\r\n\tif( '' != ivan_vc_get_option('ivan_vc_primary_color') && null != ivan_vc_get_option('ivan_vc_primary_color') )\r\n\t\t$accentColor = ivan_vc_get_option('ivan_vc_primary_color');\r\n\r\n\tif($accentBG != '' && $accentBG != null) :\r\n\r\n\t\t// Adjusted Accent Bg\r\n\t\t$darkenAccentBG = iv_vc_adjustColor($accentBG, -13);\r\n\t?>\r\n\t\t.ivan-staff-wrapper .social-icons a:hover,\r\n\t\t.ivan-call-action.primary-bg.with-icon .call-action-icon i,\r\n\t\t.ivan-button.outline:hover,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.big-price .top-section .adquire-plan .signup:hover,\r\n\t\t.ivan-pricing-table.description-support .bottom-section .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.black-bg .signup:hover,\r\n\t\t.marker-icon.ivan-gmap-marker,\r\n\t\t.ivan-title-wrapper.primary-bg .icon-above i,\r\n\t\t.ivan-title-wrapper.primary-bg strong,\r\n\t\t.ivan-title-wrapper.primary-bg a,\r\n\t\t.ivan-title-wrapper.primary-bg a:hover,\r\n\t\t.ivan-service .main-icon,\r\n\t\t.ivan-service.primary-bg .fa-stack .main-icon,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg a:hover,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack .stack-holder,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack.with-link:hover .stack-holder,\r\n\t\t.ivan-icon-list.primary-bg i,\r\n\t\t.ivan-list.primary-bg.number ul > li:before {\r\n\t\t\tcolor: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.outline:hover hr,\r\n\t\t.ivan-button.no-border:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-projects .ivan-project.hide-entry .entry,\r\n\t\t.ivan-projects .ivan-project.outer-square .entry,\r\n\t\t.ivan-projects .ivan-project.lateral-cover .entry,\r\n\t\t.ivan-projects .ivan-project.smooth-cover .entry,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-service .fa-stack,\r\n\t\t.ivan-service.primary-bg,\r\n\t\t.ivan-progress.primary-bg .ivan-progress-inner,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square,\r\n\t\t.ivan-icon-list.primary-bg.circle i,\r\n\t\t.ivan-list.primary-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-list.primary-bg.circle ul > li:before,\r\n\t\t.ivan-quote.primary-bg blockquote,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.ivan-vc-separator.primary-bg,\r\n\t\t.ivan-pricing-table.default.primary-bg,\r\n\t\t.ivan-pricing-table.subtitle .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg,\r\n\t\t.ivan-pricing-table.small-desc .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square.with-link:hover,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active {\r\n\t\t\tbackground-color: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.outline:hover,\r\n\t\t.ivan-button.no-border:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-button.primary-bg.outline.text-separator.with-icon .text-btn,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.big-price .top-section .adquire-plan .signup:hover,\r\n\t\t.ivan-pricing-table.description-support .bottom-section .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.black-bg .signup:hover,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-service .fa-stack,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tab {\r\n\t\t\tborder-color: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-button.primary-bg:hover,\r\n\t\t.ivan-button.primary-bg.with-icon.icon-cover .icon-simple,\r\n\t\t.ivan-pricing-table.default.primary-bg h3,\r\n\t\t.ivan-pricing-table.default.primary-bg li,\r\n\t\t.ivan-pricing-table.default.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.default.primary-bg li a,\r\n\t\t.ivan-pricing-table.default.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg h3,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li a,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg h3,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li a,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .featured-table-text,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content a,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content a:hover,\r\n\t\t.ivan-service .fa-stack .main-icon,\r\n\t\t.ivan-service.primary-bg .service-title,\r\n\t\t.ivan-service.primary-bg .main-icon,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack .main-icon,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg a,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square i,\r\n\t\t.ivan-icon-list.primary-bg.circle i,\r\n\t\t.ivan-list.primary-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-quote.primary-bg blockquote h5,\r\n\t\t.ivan-quote.primary-bg blockquote .author,\r\n\t\t.ivan-quote.primary-bg blockquote .pull-left,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active .toggle-mark .toggle-mark-icon,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active a,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active .accordion-mark .accordion-mark-icon {\r\n\t\t\tcolor: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover hr,\r\n\t\t.ivan-button.primary-bg hr,\r\n\t\t.ivan-button.primary-bg:hover hr,\r\n\t\t.ivan-service.primary-bg .fa-stack {\r\n\t\t\tbackground-color: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-pricing-table.default.primary-bg .signup,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup:hover,\r\n\t\t.ivan-service.primary-bg .fa-stack {\r\n\t\t\tborder-color: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t// Darken Accent Bg\r\n\t\t.ivan-button.primary-bg:hover,\r\n\t\t.ivan-button.primary-bg.outline hr,\r\n\t\t.ivan-button.primary-bg.outline:hover hr,\r\n\t\t.ivan-button.primary-bg.outline.icon-cover.with-icon .icon-simple,\r\n\t\t.ivan-pricing-table.default.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .featured-table-text {\r\n\t\t\tbackground-color: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.primary-bg:hover {\r\n\t\t\tborder-color: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.primary-bg.outline,\r\n\t\t.ivan-button.primary-bg.outline:hover {\r\n\t\t\tcolor: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-service.primary-bg .content-section-holder li,\r\n\t\t.ivan-service.primary-bg .content-section-holder p {\r\n\t\t border-color: <?php echo iv_vc_adjustColor($accentBG, -7); ?>;\r\n\t\t}\r\n\r\n\t<?php\r\n\tendif;\r\n\r\n\t//\r\n\t// Dark Color\r\n\t//\r\n\t$darkBG = ivan_vc_get_option('ivan_vc_dark_bg');\r\n\t$darkColor = '#fff'; // Default\r\n\tif( '' != ivan_vc_get_option('ivan_vc_dark_color') && null != ivan_vc_get_option('ivan_vc_dark_color') )\r\n\t\t$darkColor = ivan_vc_get_option('ivan_vc_dark_color');\r\n\r\n\tif($darkBG != '' && $darkBG != null) :\r\n\t\t// Adjusted Dark Bg\r\n\t\t$darkenDarkBG = iv_vc_adjustColor($darkBG, -13);\r\n\t?>\r\n\r\n\t\t.ivan-call-action.dark-bg.boxed,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-title-wrapper.dark-bg .ivan-vc-separator.small,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart-content .ivan-vc-separator,\r\n\t\t.ivan-service.dark-bg,\r\n\t\t.ivan-progress.dark-bg .ivan-progress-outer,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.dark-bg,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square,\r\n\t\t.ivan-icon-list.dark-bg.circle i,\r\n\t\t.ivan-list.dark-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-list.dark-bg.circle ul > li:before,\r\n\t\t.ivan-quote.dark-bg blockquote,\r\n\t\t.ivan-vc-separator.dark-bg,\r\n\t\t.ivan-pricing-table.default.dark-bg,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square.with-link:hover {\r\n\t\t\tbackground-color: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-call-action.dark-bg.opaque.with-icon .call-action-icon i,\r\n\t\t.ivan-call-action.dark-bg.opaque .call-action-text-inner .call-action-heading-text,\r\n\t\t.ivan-call-action.dark-bg.opaque .call-action-text-inner .call-action-text,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content a,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content a:hover,\r\n\t\t.ivan-testimonial.dark-bg .author-name,\r\n\t\t.ivan-testimonial.dark-bg .author-desc,\r\n\t\t.ivan-title-wrapper.dark-bg .title-heading,\r\n\t\t.ivan-title-wrapper.dark-bg .sub,\r\n\t\t.ivan-title-wrapper.dark-bg i,\r\n\t\t.ivan-title-wrapper.dark-bg strong,\r\n\t\t.ivan-title-wrapper.dark-bg a,\r\n\t\t.ivan-title-wrapper.dark-bg a:hover,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart-content .pie-chart-heading,\r\n\t\t.ivan-pie-chart-holder.dark-bg .pie-chart-content-inner,\r\n\t\t.ivan-service.dark-bg .fa-stack .main-icon,\r\n\t\t.ivan-progress.dark-bg .progress-title-holder,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-text-holder .icon-box-title,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-content,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .main-icon,\r\n\t\t.ivan-icon-box.dark-bg a,\r\n\t\t.ivan-icon-box.dark-bg a:hover,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg a,\r\n\t\t.ivan-icon-wrapper .dark-bg a:hover,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack .stack-holder,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack.with-link:hover .stack-holder,\r\n\t\t.ivan-icon-list.dark-bg p,\r\n\t\t.ivan-icon-list.dark-bg i,\r\n\t\t.ivan-list.dark-bg li,\r\n\t\t.ivan-list.dark-bg.number ul > li:before {\r\n\t\t\tcolor: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-progress.dark-bg .ivan-progress-outer,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-box.dark-bg hr,\r\n\t\t.ivan-icon-boxed-holder.dark-bg {\r\n\t\t\tborder-color: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-call-action.dark-bg.boxed.with-icon .call-action-icon i,\r\n\t\t.ivan-call-action.dark-bg.boxed .call-action-text-inner .call-action-heading-text,\r\n\t\t.ivan-call-action.dark-bg.boxed .call-action-text-inner .call-action-text,\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-button.dark-bg:hover,\r\n\t\t.ivan-button.dark-bg.with-icon.icon-cover .icon-simple,\r\n\t\t.ivan-pricing-table.default.dark-bg h3,\r\n\t\t.ivan-pricing-table.default.dark-bg li,\r\n\t\t.ivan-pricing-table.default.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.default.dark-bg li a,\r\n\t\t.ivan-pricing-table.default.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup,\r\n\t\t.ivan-pricing-table.default.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg h3,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li a,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg h3,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li a,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .featured-table-text,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content a,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content a:hover,\r\n\t\t.ivan-service.dark-bg .content-section-holder li,\r\n\t\t.ivan-service.dark-bg .content-section-holder p,\r\n\t\t.ivan-service.dark-bg .content-section-holder a,\r\n\t\t.ivan-service.dark-bg .content-section-holder a:hover,\r\n\t\t.ivan-service.dark-bg .service-title,\r\n\t\t.ivan-service.dark-bg .main-icon,\r\n\t\t.ivan-service.primary-bg .content-section-holder li,\r\n\t\t.ivan-service.primary-bg .content-section-holder p,\r\n\t\t.ivan-service.primary-bg .content-section-holder a,\r\n\t\t.ivan-service.primary-bg .content-section-holder a:hover,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack .main-icon,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .icon-box-title,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .icon-box-content,\r\n\t\t.ivan-icon-boxed-holder.dark-bg a,\r\n\t\t.ivan-icon-boxed-holder.dark-bg a:hover,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square i,\r\n\t\t.ivan-icon-list.dark-bg.circle i,\r\n\t\t.ivan-list.dark-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-quote.dark-bg blockquote h5,\r\n\t\t.ivan-quote.dark-bg blockquote .author,\r\n\t\t.ivan-quote.dark-bg blockquote .pull-left {\r\n\t\t\tcolor: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.dark-bg hr,\r\n\t\t.ivan-button.dark-bg:hover hr,\r\n\t\t.ivan-service.dark-bg .fa-stack,\r\n\t\t.ivan-progress.dark-bg .ivan-progress-inner,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack {\r\n\t\t\tbackground-color: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-pricing-table.default.dark-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup,\r\n\t\t.ivan-service.dark-bg .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack {\r\n\t\t\tborder-color: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t// Darken Dark Bg\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-button.dark-bg:hover {\r\n\t\t\tborder-color: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-pricing-table.default.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .featured-table-text,\r\n\t\t.ivan-button.dark-bg:hover,\r\n\t\t.ivan-button.dark-bg.outline hr,\r\n\t\t.ivan-button.dark-bg.outline:hover hr,\r\n\t\t.ivan-button.dark-bg.outline.icon-cover.with-icon .icon-simple {\r\n\t\t\tbackground: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.dark-bg.outline,\r\n\t\t.ivan-button.dark-bg.outline:hover {\r\n\t\t\tcolor: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-service.dark-bg .content-section-holder li,\r\n\t\t.ivan-service.dark-bg .content-section-holder p {\r\n\t\t border-color: <?php echo iv_vc_adjustColor($darkBG, -7); ?>;\r\n\t\t}\r\n\t\t\t\r\n\t<?php\r\n\tendif;\r\n\r\n\t$output = ob_get_contents();\r\n\tob_end_clean();\r\n\t// Check if can print something...\r\n\tif('' != $output) :\r\n\t\techo '<style type=\"text/css\">' . $output . '</style>';\r\n\tendif;// end main check\r\n\r\n}", "public function displayPreview()\r\n {\r\n $previewHtml = '';\r\n\r\n if (!empty($this->title))\r\n {\r\n $previewHtml .= \"<div class='title' style='text-align: center;'>\";\r\n $previewHtml .= \"<h2>\";\r\n $previewHtml .= $this->title;\r\n $previewHtml .= \"</h2>\";\r\n $previewHtml .= \"</div>\";\r\n }\r\n\r\n return $previewHtml;\r\n }", "function plumbing_parts_woocommerce_wrapper_start() {\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !plumbing_parts_storage_empty('shop_mode') ? plumbing_parts_storage_get('shop_mode') : 'thumbs'; ?>\">\n\t\t\t<?php\n\t\t}\n\t}", "public function preview() {\n if($this->srcMap == null) {\n return \"\";\n }\n return $this->srcMap->preview();\n }", "function fh_theme_manualcrop_croptool_inline($variables) {\n $output = '<div ' . drupal_attributes($variables['attributes']) . '>';\n\n $output .= '<div class=\"manualcrop-image-holder\">';\n $output .= theme('image', $variables['image']);\n $output .= '</div>';\n\n $output .= '<div class=\"clearfix\">';\n\n if ($variables['crop_info']) {\n $output .= '<div class=\"manualcrop-selection-info hidden\">';\n $output .= '<div class=\"manualcrop-selection-label manualcrop-selection-xy\">';\n $output .= '<div class=\"manualcrop-selection-label-content\">';\n $output .= '<span class=\"manualcrop-selection-x\">-</span> x <span class=\"manualcrop-selection-y\">-</span>';\n $output .= '</div>';\n $output .= '</div>';\n $output .= '<div class=\"manualcrop-selection-label manualcrop-selection-width\">';\n $output .= '<div class=\"manualcrop-selection-label-content\">-</div>';\n $output .= '</div>';\n $output .= '<div class=\"manualcrop-selection-label manualcrop-selection-height\">';\n $output .= '<div class=\"manualcrop-selection-label-content\">-</div>';\n $output .= '</div>';\n $output .= '</div>';\n }\n\n if ($variables['instant_preview']) {\n $style = '';\n $url = '';\n if(isset($_POST['field_bild']['und'][0]['fid'])){\n $fu_image = file_load($_POST['field_bild']['und'][0]['fid']);\n $url = image_style_url('ansicht_bild_portal', $fu_image->uri);\n $style = 'style=\"background-image:url('.$url.');background-size: cover;\"';\n }else{\n $nid = explode('/',$_GET['q'])[1];\n if(is_numeric($nid)){\n $nid = (int) $nid;\n $node = node_load($nid);\n if(isset($node->field_bild['und'][0])){\n $fu_image = $node->field_bild['und'][0];\n $url = image_style_url( 'ansicht_bild_portal', $fu_image['uri']);\n $style = 'style=\"background-image:url('.$url.');background-size: cover;\"';\n }\n }\n }\n\n $output .= \"<div class='manualcrop-instantpreview' data-url='\".$url.\"' \".$style.\"></div>\";\n }\n\n if ($variables['crop_info']) {\n $output .= '<div class=\"manualcrop-style-info\">';\n $output .= t('Image style') . ': <span class=\"manualcrop-style-name\">&nbsp;</span><br />';\n $output .= '</div>';\n }\n $output .= '<div class=\"manualcrop-buttons\">';\n $output .= '<input type=\"button\" value=\"' . t('Abbrechen') . '\" class=\"manualcrop-button manualcrop-cancel form-submit btn btn-danger\" onmousedown=\"ManualCrop.closeCroptool(true);\" />';\n $output .= '<input type=\"button\" value=\"' . t('Speichern') . '\" class=\"manualcrop-button manualcrop-close form-submit btn btn-success\" onmousedown=\"ManualCrop.closeCroptool();\" />';\n $output .= '</div>';\n $output .= '</div>';\n $output .= '</div>';\n\n return $output;\n}" ]
[ "0.68315536", "0.678385", "0.66594744", "0.66220164", "0.659892", "0.659141", "0.6547507", "0.654166", "0.6511209", "0.650775", "0.650775", "0.650775", "0.650775", "0.6500137", "0.64942384", "0.6434024", "0.6426141", "0.6372182", "0.6331557", "0.63000345", "0.6298024", "0.6298024", "0.6290096", "0.6186575", "0.61811376", "0.6180947", "0.61591816", "0.6141059", "0.61098975", "0.6107224", "0.6088905", "0.6086838", "0.6073728", "0.60735875", "0.6069074", "0.60688096", "0.60678244", "0.6061086", "0.6056234", "0.6056234", "0.6056234", "0.60559845", "0.60434604", "0.6039485", "0.59964", "0.59917027", "0.5988504", "0.59879076", "0.5982946", "0.59818494", "0.59756047", "0.5974983", "0.5974487", "0.5970824", "0.5962246", "0.5959392", "0.59588027", "0.5955101", "0.5941673", "0.5936761", "0.59264845", "0.59239084", "0.59092987", "0.5907577", "0.59025776", "0.5891547", "0.58848643", "0.5871024", "0.5869444", "0.58414453", "0.5840302", "0.58325213", "0.5825615", "0.5819003", "0.58177", "0.58013767", "0.579654", "0.579654", "0.579654", "0.5794038", "0.57856804", "0.57764274", "0.5770058", "0.57580215", "0.5748062", "0.5747774", "0.5747064", "0.57427794", "0.57414883", "0.5728107", "0.5727064", "0.57151085", "0.571105", "0.5709758", "0.57069665", "0.57045805", "0.57004327", "0.5698372", "0.5697785", "0.5689081" ]
0.79446405
0
woocommerce_pip_print_logo function. Output logo if needed
Функция woocommerce_pip_print_logo. Вывод логотипа, если это необходимо
function woocommerce_pip_print_logo() { if ( get_option( 'woocommerce_pip_logo' ) != '' ) { return '<img src="' . get_option( 'woocommerce_pip_logo' ) . '" /><br />'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function outputLogo()\n {\n $configuration = $this->configuration;\n\n if ($this->modifyOutputLogo == false) {\n if (!empty($configuration['custom_logo'])) {\n // Give him his custom logo.\n $logo = $this->mod->logo($this->CDN . '/', $this->CDN . '/' . $configuration['custom_logo'], $configuration['scripts_name_version'], $configuration['scripts_name_version']);\n } else {\n // Ok so we have no set logo, does the developer want a custom logo?\n if (!empty($this->db->pluginLogo)) {\n // Ok lets get the logo that the user wishes to display.\n $logo = $this->mod->logo($this->CDN . '/', \"{$this->CDN}/plugins/{$this->db->pluginLogo}/images/logo.png\", $configuration['scripts_name_version'], $configuration['scripts_name_version']);\n } else if (!empty($configuration['scripts_name_version'])) {\n $logo = $this->mod->logoText($configuration['scripts_name_version']);\n } else {\n // Oops we have no logo, so lets just default to the orginal PHPDevShell logo.\n $logo = $this->mod->logo($this->CDN . '/', \"{$this->CDN}/plugins/AdminTools/images/logo.png\", $configuration['scripts_name_version'], $configuration['scripts_name_version']);\n }\n }\n // Ok return the logo.\n print $logo;\n } else {\n print $this->modifyOutputLogo;\n }\n }", "function hoagtwenty_the_custom_logo() {\n\t\tif ( function_exists( 'the_custom_logo' ) ) {\n\t\t\t$custom_logo_id = get_theme_mod( 'custom_logo' );\n\t\t\t$image_logo = wp_get_attachment_image_src( $custom_logo_id , 'small' );\n\t\t\t//load logo as data uri\n\t\t\t$b64image = base64_encode(file_get_contents($image_logo[0]));\n\t\t\techo '<img class=\"custom-logo\" height=\"'.$image_logo[2].'\" width=\"'.$image_logo[1].'\" alt=\"'.get_bloginfo('name').'\" src=\"data:image/png;base64,'.$b64image.'\" />';\n\t\t}else{\n\t\t\techo '<h1>'.get_bloginfo('name').'</h1>';\n\t\t}\n }", "function tool_delivery_print_logo(&$pdf) {\n global $CFG;\n\n $fs = get_file_storage();\n $systemcontext = context_system::instance();\n\n $files = $fs->get_area_files($systemcontext->id, 'tool_delivery', 'tooldeliveryreportlogo', 0);\n\n if (!empty($files)){\n $logofile = array_pop($files);\n } else {\n return;\n }\n\n $contenthash = $logofile->get_contenthash();\n $pathhash = tool_delivery_get_path_from_hash($contenthash);\n $realpath = $CFG->dataroot.'/filedir/'.$pathhash.'/'.$contenthash;\n\n $size = getimagesize($realpath);\n\n // converts 72 dpi images into mm\n $pdf->Image($realpath, 20, 20, $size[0] / 2.84, $size[1] / 2.84);\n}", "function mytheme_custom_logo() {\n $output = '';\n if (function_exists('get_custom_logo'))\n $output = get_custom_logo();\n \n // Nothing in the output: Custom Logo is not supported, or there is no selected logo\n // In both cases we display the site's name\n if (empty($output))\n $output = '<h1><a href=\"' . esc_url(home_url('/')) . '\">' . get_bloginfo('name') . '</a></h1>';\n \n echo $output;\n }", "function janelove_logo()\n{\n\t$custom_logo_id = get_theme_mod( 'custom_logo' );\n\t$logo = wp_get_attachment_image( $custom_logo_id , 'full' );\n\tif ( $custom_logo_id ) {\n echo '<a class=\"site-logo\" href=' . esc_url(home_url('/')) . ' rel=\"home\">' . $logo . '</a>';\n\t} else {\n\t\techo '<h1 class=\"theme-logo\"><a class=\"site-logo\" href=' . esc_url(home_url('/')) . ' rel=\"home\">' . get_bloginfo('name') . '</a></h1>';\n\t}\n \n}", "public function logo() {\n\n\t\t\tif( $this->settings->get_option( 'logo', 'ae_tools_maintenance', 'on' ) == 'on' ) {\n\t\t\t\treturn get_custom_logo();\n\t\t\t}\n\n\t\t}", "function pg_starter_the_custom_logo() {\n\n \tif ( function_exists( 'the_custom_logo' ) ) {\n \t\tthe_custom_logo();\n \t}\n\n }", "public function _render_custom_logo_partial()\n {\n }", "function start_site_logo() {\n\t$output = '';\n\tif ( get_field( 'site_logo', 'option' ) ) :\n\t\t$output .= '<a href=\"' . esc_url( home_url( '/' ) ) . '\"><img src=\"' . get_field( 'site_logo', 'option' ) . '\"></a>';\n\telse :\n\t\t$output .= '<a href=\"' . esc_url( home_url( '/' ) ) . '\">' . get_bloginfo( 'name' ) . '</a>';\n\tendif;\n\n\treturn $output;\n}", "function zaxu_navigation_logo() {\n\t\t\t$logo = get_theme_mod('zaxu_logo');\n\t\t\t$is_logo = is_file( $_SERVER['DOCUMENT_ROOT'] . '/' . parse_url($logo, PHP_URL_PATH) );\n\t\t\t$logo_height = esc_attr( get_theme_mod('zaxu_logo_height', 30) );\n\t\t\t$placeholder_img = \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3C/svg%3E\";\n\t\t\tif ($logo && $is_logo) {\n\t\t\t\t$filetype = wp_check_filetype($logo)['ext'];\n\t\t\t\tif ($filetype == \"svg\") {\n\t\t\t\t\t$svg_inline_content = file_get_contents( $_SERVER['DOCUMENT_ROOT'] . '/' . parse_url($logo, PHP_URL_PATH) );\n\t\t\t\t\t$svg_inline_content_new = str_replace(\"<svg\", \"<svg preserveAspectRatio='xMinYMid'\", $svg_inline_content);\n\t\t\t\t\techo '\n\t\t\t\t\t\t<span class=\"link-title\">' . esc_attr( get_bloginfo('name') ) . '</span>\n\t\t\t\t\t';\n\t\t\t\t\techo $svg_inline_content_new;\n\t\t\t\t} else {\n\t\t\t\t\tif (get_theme_mod('zaxu_lazyload', 'enabled') == \"enabled\") {\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<img src=\"' . $placeholder_img . '\" data-src=\"' . $logo . '\" alt=\"' . esc_attr( get_bloginfo('name') ) . '\" itemprop=\"logo\" style=\"height: ' . $logo_height . 'px\" class=\"zaxu-lazy\" />\n\t\t\t\t\t\t';\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<img src=\"' . $logo . '\" alt=\"' . esc_attr( get_bloginfo('name') ) . '\" itemprop=\"logo\" style=\"height: ' . $logo_height . 'px\" />\n\t\t\t\t\t\t';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo '\n\t\t\t\t\t<h2>\n\t\t\t\t\t\t<span itemprop=\"name\">' . esc_attr( get_bloginfo('name') ) . '</span>\n\t\t\t\t\t</h2>\n\t\t\t\t';\n\t\t\t}\n\t\t}", "function cyberchimps_header_logo() {\n\n\t$url = ( cyberchimps_get_option( 'custom_logo_url' ) == '1' ) ? cyberchimps_get_option( 'custom_logo_url_link' ) : esc_url( home_url() );\n\tif ( cyberchimps_get_option( 'custom_logo' ) == '1' ) {\n\t\t$logo = cyberchimps_get_option( 'custom_logo_uploader' );\n\t\t?>\n\t\t<div id=\"logo\">\n\t\t\t<a href=\"<?php echo $url; ?>\" title=\"<?php echo get_bloginfo( 'name' ); ?>\"><img src=\"<?php echo stripslashes( $logo ); ?>\" alt=\"<?php echo get_bloginfo( 'name' ); ?>\"></a>\n\t\t</div>\n\t\t<?php\n\t} else {\n\t\tif ( function_exists( 'cyberchimps_header_site_title' ) ) {\n\t\t\tcyberchimps_header_site_title();\n\t\t}\n\t}\n}", "function fhlug_the_custom_logo() {\n\t$logo = '';\n\tif ( function_exists( 'the_custom_logo' ) ) {\n\t\t$logo = get_custom_logo();\n\t}\n\n\tif ( $logo !== '' ) : echo $logo; else : ?>\n<a href=\"<?php echo esc_url( home_url( '/' ) ); ?>\" rel=\"home\"><?php bloginfo( 'name' ); ?></a>\n<?php endif;\n}", "function seed_logo() {\n\tif($GLOBALS['s_logo_path'] != 'none') {\n\t\techo '<a href=\"' . esc_url( home_url( '/' ) ) .'\" rel=\"home\">';\n\t\techo '<img src=\"' . get_stylesheet_directory_uri() . '/'. $GLOBALS['s_logo_path']. '\" width=\"'. $GLOBALS['s_logo_width'] . '\" height=\"'. $GLOBALS['s_logo_height'] . '\" alt=\"Logo\">';\n\t\techo '</a>';\n\t} else {\n\t\tthe_custom_logo();\n\t} \n}", "function kreativ_custom_logo() {\n //if ( function_exists( 'the_custom_logo' ) ) {\n if (has_custom_logo()) {\n the_custom_logo();\n } else{\n echo '<h2>' . get_theme_mod('wohc_cta_nav') . '</h2>';\n }\n}", "function wp_inspire_display_inspiration_logo() {\n\t\t$inspiration_logo = get_field( 'logo' );\n\n\t\tif ( $inspiration_logo ) :\n\t\t\t?>\n\t\t\t<div class=\"col-md-4\">\n\t\t\t\t<?php echo wp_get_attachment_image( $inspiration_logo, 'medium' ); ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\tendif;\n\t}", "function custom_wordpress_login_logo() {\n\t\t\t$options = get_option('wsthemeoptions');\n\t\t\t$wsthemeoptions_wordpress_login_logo = $options['wsthemeoptions_wordpress_login_logo'];\n\t\t\tif (!empty($wsthemeoptions_wordpress_login_logo)) {\n\n\t\t\t\techo \"<style type='text/css'>h1 a { width: 168px !important; height: 168px !important;background-image: url(\" . $wsthemeoptions_wordpress_login_logo . \") !important; background-size: 100% !important; }</style>\";\n\t\t\t}\n\t\t}", "function sflu_replace_logo() {\n\t$sf_get_logo = get_theme_mod( 'sflu_logo' );\n \tif ( get_theme_mod( 'sflu_logo' ) )\n \t\techo '<div class=\"site-logo\"><a href=\"' . site_url() . '\"><img src=\"' . $sf_get_logo .'\"></a></div>';\n}", "function ndotone_the_custom_logo() {\n\t\tif ( function_exists( 'the_custom_logo' ) ) {\n\t\t\tthe_custom_logo();\n\t\t}\n\t}", "function threza_the_custom_logo() {\n\tif ( function_exists( 'the_custom_logo' ) ) {\n\t\tthe_custom_logo();\n\t}\n}", "function WPBikeRent_Theme_logo_display(){ \n\t\t$testlogo1 = 'img_site_logo';\n\t\techo $this->WPBikeRent_Theme_image_uploader_field( $testlogo1, get_option('img_site_logo') );\n\t}", "function neobeat_get_header_logo_image() {\n\t\t$logo_image = '<img itemprop=\"logo\" class=\"qodef-header-logo-image qodef--main\" src=\"' . esc_url( NEOBEAT_ASSETS_ROOT . '/img/logo.png' ) . '\" alt=\"' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '\" />';\n\t\t$customizer_logo = get_custom_logo();\n\t\t\n\t\tif ( ! empty( $customizer_logo ) ) {\n\t\t\t$customizer_logo_id = get_theme_mod( 'custom_logo' );\n\t\t\t\n\t\t\tif ( $customizer_logo_id ) {\n\t\t\t\t$customizer_logo_id_attr = array(\n\t\t\t\t\t'class' => 'qodef-header-logo-image qodef--main',\n\t\t\t\t\t'itemprop' => 'logo',\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$image_alt = get_post_meta( $customizer_logo_id, '_wp_attachment_image_alt', true );\n\t\t\t\tif ( empty( $image_alt ) ) {\n\t\t\t\t\t$customizer_logo_id_attr['alt'] = get_bloginfo( 'name', 'display' );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$logo_image = wp_get_attachment_image( $customizer_logo_id, 'full', false, $customizer_logo_id_attr );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn apply_filters( 'neobeat_filter_header_logo_image', $logo_image );\n\t}", "function insight_custom_logo() {\n if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {\n the_custom_logo();\n } else {\n $name = get_bloginfo( 'name' );\n $description = get_bloginfo( 'description' );\n echo \"<div class='insight-site-title'>\";\n printf(\n '<h2 class=\"site-title\"><a href=\"%1$s\" rel=\"home\" itemprop=\"url\">%2$s</a></h2>',\n esc_url( get_site_url() ),\n esc_html( get_bloginfo( 'name' ) )\n );\n if ( $description ) {\n echo \"<span>\" . esc_html( $description ) . \"</span>\";\n }\n echo \"</div>\";\n }\n}", "function get_cartthrob_logo()\n\t{\n\t\tglobal $LANG;\n\n\t\treturn '<a href=\"javascript:window.open(\\'http://www.cartthrob.com\\',\\'cartthrob\\');\" title=\"'.$LANG->line('powered_by_title').'\"><img src=\"http://cartthrob.com/images/powered_by_logos/powered_by_cartthrob.png\" alt=\"'.$LANG->line('powered_by_title').'\" /></a> ';\n\t}", "function anva_customizer_preview_logo() {\n\n\t// Global option name\n\t$option_name = anva_get_option_name();\n\n\t// Setup for logo\n\t$logo_options = anva_get_option('logo');\n\t\n\t$logo_atts = array(\n\t\t'type' \t\t\t\t\t\t=> '',\n\t\t'site_url'\t\t\t\t=> home_url(),\n\t\t'title'\t\t\t\t\t\t=> get_bloginfo( 'name' ),\n\t\t'tagline'\t\t\t\t\t=> get_bloginfo( 'description' ),\n\t\t'custom' \t\t\t\t\t=> '',\n\t\t'custom_tagline' \t=> '',\n\t\t'image' \t\t\t\t\t=> '',\n\t);\n\n\tforeach ( $logo_atts as $key => $value ) {\n\t\tif ( isset( $logo_options[ $key ] ) ) {\n\t\t\t$logo_atts[ $key ] = $logo_options[ $key ];\n\t\t}\n\t}\n\n\t// Begin output\n\t?>\n\t// Logo atts object\n\tLogo = <?php echo json_encode( $logo_atts ); ?>;\n\n\t/* Logo - Type */\n\twp.customize('<?php echo $option_name; ?>[logo][type]', function( value ) {\n\t\tvalue.bind( function( value ) {\n\t\t\t// Set global marker. This allows us to\n\t\t\t// know the currently selected logo type\n\t\t\t// from any other option.\n\t\t\tLogo.type = value;\n\n\t\t\t// Remove classes specific to type so we\n\t\t\t// can add tehm again depending on new type.\n\t\t\t$('#logo').removeAttr('class');\n\n\t\t\t// Display markup depending on type of logo selected.\n\t\t\tif ( value == 'title' )\n\t\t\t{\n\t\t\t\t$('#logo').addClass('logo-text');\n\t\t\t\t$('#logo').html('<h1 class=\"text-logo\"><a href=\"'+Logo.site_url+'\" title=\"'+Logo.title+'\">'+Logo.title+'</a></h1>');\n\t\t\t}\n\t\t\telse if ( value == 'title_tagline' )\n\t\t\t{\n\t\t\t\t$('#logo').addClass('logo-tagline');\n\t\t\t\t$('#logo').addClass('logo-has-tagline');\n\t\t\t\t$('#logo').html('<h1 class=\"text-logo\"><a href=\"'+Logo.site_url+'\" title=\"'+Logo.title+'\">'+Logo.title+'</a></h1><span class=\"logo-tagline\">'+Logo.tagline+'</span>');\n\t\t\t}\n\t\t\telse if ( value == 'custom' )\n\t\t\t{\n\t\t\t\tvar html = '<h1 class=\"text-logo\"><a href=\"'+Logo.site_url+'\" title=\"'+Logo.custom+'\">'+Logo.custom+'</a></h1>';\n\t\t\t\tif (Logo.custom_tagline)\n\t\t\t\t{\n\t\t\t\t\t$('#logo').addClass('logo-has-tagline');\n\t\t\t\t\thtml = html+'<span class=\"logo-tagline\">'+Logo.custom_tagline+'</span>';\n\t\t\t\t}\n\t\t\t\t$('#logo').addClass('logo-text');\n\t\t\t\t$('#logo').html(html);\n\t\t\t}\n\t\t\telse if ( value == 'image' )\n\t\t\t{\n\t\t\t\tvar html;\n\t\t\t\tif (Logo.image)\n\t\t\t\t{\n\t\t\t\t\thtml = '<a href=\"'+Logo.site_url+'\" title=\"'+Logo.title+'\"><img src=\"'+Logo.image+'\" alt=\"'+Logo.title+'\" /></a>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\thtml = '<strong>Oops! You still need to upload an image.</strong>';\n\t\t\t\t}\n\t\t\t\t$('#logo').addClass('logo-image logo-has-image');\n\t\t\t\t$('#logo').html(html);\n\t\t\t}\n\t\t});\n\t});\n\n\t/* Logo - Custom Title */\n\twp.customize('<?php echo $option_name; ?>[logo][custom]',function( value ) {\n\t\tvalue.bind(function(value) {\n\t\t\t// Set global marker\n\t\t\tLogo.custom = value;\n\n\t\t\t// Only do if anything if the proper logo\n\t\t\t// type is currently selected.\n\t\t\tif ( Logo.type == 'custom' ) {\n\t\t\t\t$('#logo h1 a').text( value );\n\t\t\t}\n\t\t});\n\t});\n\n\t/* Logo - Custom Tagline */\n\twp.customize('<?php echo $option_name; ?>[logo][custom_tagline]',function( value ) {\n\t\tvalue.bind(function(value) {\n\t\t\t// Set global marker\n\t\t\tLogo.custom_tagline = value;\n\n\t\t\t// Remove previous tagline if needed.\n\t\t\t$('#logo').removeAttr('class');\n\t\t\t$('#logo .logo-tagline').remove();\n\n\t\t\t// Only do if anything if the proper logo\n\t\t\t// type is currently selected.\n\t\t\tif ( Logo.type == 'custom' ) {\n\t\t\t\tif (value)\n\t\t\t\t{\n\t\t\t\t\t$('#logo').addClass('logo-has-tagline');\n\t\t\t\t\t$('#logo').append('<span class=\"logo-tagline\">'+value+'</span>');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\n\t/* Logo - Image */\n\twp.customize('<?php echo $option_name; ?>[logo][image]',function( value ) {\n\t\tvalue.bind( function( value ) {\n\t\t\t// Set global marker\n\t\t\tLogo.image = value;\n\n\t\t\t// Only do if anything if the proper logo\n\t\t\t// type is currently selected.\n\t\t\tif ( Logo.type == 'image' ) {\n\t\t\t\tvar html;\n\t\t\t\tif ( value )\n\t\t\t\t{\n\t\t\t\t\thtml = '<a href=\"'+Logo.site_url+'\" title=\"'+Logo.title+'\"><img src=\"'+Logo.image+'\" alt=\"'+Logo.title+'\" /></a>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\thtml = '<strong>Oops! You still need to upload an image.</strong>';\n\t\t\t\t}\n\t\t\t\t$('#logo').removeAttr('class');\n\t\t\t\t$('#logo').addClass('logo-image logo-has-image');\n\t\t\t\t$('#logo').html(html);\n\t\t\t}\n\t\t});\n\t});\n\t<?php\n}", "function advance_the_custom_logo() {\n\tif ( function_exists( 'the_custom_logo' ) ) {\n\t\tthe_custom_logo();\n\t}\n}", "function wp_login_fluency_custom_logo() {\n\techo get_option('fluency_login_logo')!='' ? '<style type=\"text/css\">#login h1 a { background-image:url('.get_option('fluency_login_logo').') !important; }</style>' : null;\n}", "function custom_logo_image() {\n\t$logoID = get_field('logo','options');\n\n\tif($logoID) {\n\t\t$meta = wp_get_attachment_metadata($logoID);\n\t\t?>\n\t\t<style>\n\t\t\tbody.login #login h1 a {\n\t\t\t\tbackground: url(<?php echo esc_attr(wp_get_attachment_url($logoID)); ?>) no-repeat center top transparent;\n\t\t\t\theight: <?php echo $meta['height']; ?>px;\n\t\t\t\twidth: <?php echo $meta['width']; ?>px;\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}\n}", "public function get_logo_image() {\n\t\t\t$image_url = ETHEME_BASE_URI.'theme/assets/images/logo-setup.png';\n\t\t\treturn apply_filters( 'envato_setup_logo_image', $image_url );\n\t\t}", "public function _action_login_logo()\n {\n $imageUrl = flotheme_get_option('logo_url')\n ? flotheme_get_option('logo_url') . '?' . time()\n : get_bloginfo('template_directory') . '/images/logo.png';\n $imageInfo = @getimagesize($imageUrl);\n if (!empty($imageInfo))\n {\n $marginLeft = $imageInfo[0] > 320 ? ($imageInfo[0]-320)/2 : null ;\n $width = $imageInfo[0] > 320 ? $imageInfo[0] : '326px';\n echo '<style type=\"text/css\">\n body { background-color: #e7e7e7 !important }\n\t\t\t\th1 a { background-image: url('.$imageUrl.') !important;\n\t\t\t\tmargin-bottom:1em;\n\t\t\t\theight: '.$imageInfo[1].'px;\n\t\t\t\twidth: '.$width.'px;\n\t\t\t\t'.($marginLeft ? 'margin-left: -'.$marginLeft.'px' : '').\n '} </style>';\n }\n }", "function quadro_custom_login_logo() {\n\t// Retrieve Theme Options\n\tglobal $quadro_options;\n\n\tif ( isset($quadro_options['custom_login_img']) && $quadro_options['custom_login_img'] != '' ) {\n\t\techo '<style type=\"text/css\">';\n\t\techo '.login h1 a { width: auto; background-size: auto 100%; }';\n\t\techo 'h1 a { background-image:url(\\'' . esc_url( $quadro_options['custom_login_img'] ) . '\\') !important; }';\n\t\t// ...and for retina:\n\t\techo '@media (-webkit-min-device-pixel-ratio: 2), ';\n\t\techo '(min-resolution: 192dpi) { ';\n\t\techo 'h1 a { background-image:url(\\'' . esc_url( $quadro_options['custom_login_img_retina'] ) . '\\') !important; }';\n\t\techo ' }';\n\t\techo '</style>';\n\t}\n}", "function thmplt_custom_login_logo() {\r\n\t\r\n\t\r\n\tif ( thmplt_option('logon_logo', false)) {\r\n\t\r\n\t\techo '<style type=\"text/css\">\r\n\t\t\th1 a { \r\n\t\t\t\tbackground-image: url('.thmplt_option('logon_logo', false).') !important; \r\n\t\t\t\tpadding-bottom:30px!important; \r\n\t\t\t\tbackground-size: auto auto!important;\r\n\t\t\t\twidth:auto!important;\r\n\t\t\t}\r\n\t\t</style>';\t\t\r\n\t\t\r\n\t}\r\n\r\n}", "function thmplt_logo_url() {\r\n\r\n\treturn thmplt_option('logo', false);\r\n\r\n}", "function um_theme_header_logo() {\n if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) :\n um_theme_custom_logo();\n else : ?>\n <p class=\"site-title\">\n <a href=\"<?php echo esc_url( home_url( '/' ) ); ?>\" rel=\"home\">\n <?php bloginfo( 'name' ); ?>\n </a>\n </p>\n <?php endif;\n }", "function mbt_the_custom_logo() {\n\t// get logo media id\n\t$custom_logo_id = get_theme_mod('custom_logo');\n\n\t// get URL to logo\n\t$logo_url = wp_get_attachment_image_src($custom_logo_id, 'full');\n\n\t// do we have a custom logo set?\n\tif (has_custom_logo()) {\n\t\t// yes, we have a logo that we should display\n\t\techo '<img src=\"' . $logo_url[0] . '\" class=\"img-fluid\" alt=\"Site Logo\" title=\"' . get_bloginfo('name') . '\">';\n\t} else {\n\t\t// no, user has not set a logo so we should display the site title instead\n\t\tbloginfo('name');\n\t}\n}", "public function _action_admin_logo() {\n\t\techo '<style type=\"text/css\">#header-logo { background-image: url(' . get_template_directory_uri() . '/images/admin-icon.png) !important; }</style>';\n\t}", "function clanpress_the_logo_image( $size = 'thumbnail' ) {\n $settings = Clanpress_Settings::instance()->get_values( 'admin' );\n if ( !empty( $settings['logo'] ) ) {\n echo clanpress_get_image( (int) $settings['logo'], $size );\n }\n}", "function my_custom_login_logo() {\n if(ot_get_option(\"login_logo\")!=\"\") {\n\t echo '<style type=\"text/css\">\n\t h1 a { '.ot_get_option(\"login_logo\").' !important; }\n\t </style>';\n }\n}", "public function settings_stripe_checkout_logo() {\r\n\t\t/* Translators: 1. Open link tag. 2. Close link tag. */\r\n\t\t$html = sprintf( esc_html__( 'Logo can be configured on %1$sStripe\\'s branding page%2$s.', 'gravityformsstripe' ), '<a href=\"https://dashboard.stripe.com/account/branding\" target=\"_blank\">', '</a>' );\r\n\r\n\t\techo $html;\r\n\t}", "function custom_logo(){\n\tglobal $up_options;\n\treturn $up_options->site_logo;\n}", "function foundation_q_the_logo($place){\n if ( $place == 'header' )\n $new_logo = foundation_q_get_option('website_logo_header');\n if ( $place == 'footer' )\n $new_logo = foundation_q_get_option('website_logo_footer');\n\n if( isset( $new_logo ) && $new_logo['url'] != '' ):\n $logo_src = $new_logo['url'];\n $logo_width = $new_logo['width'];\n $logo_height = $new_logo['height'];\n echo '<img src=\"' . $logo_src . '\" class=\"img-responsive\">';\n else:\n echo '<p>Faça o upload da imagem do logo, nas <a href=\"' . get_admin_url() . 'admin.php?page=_options&tab=0\">opções do tema</a>.</p>';\n endif;\n}", "function _make_logo()\n\t{\n\t\t$title=get_page_title('_LOGOWIZARD',true,array(integer_format(2),integer_format(3)));\n\t\t$GLOBALS['HELPER_PANEL_PIC']='pagepics/logowizard';\n\n\t\t$preview=do_template('LOGOWIZARD_2_SCREEN',array('NAME'=>post_param('name'),'TITLE'=>post_param('title'),'THEME'=>post_param('theme')));\n\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:make_logo',do_lang_tempcode('LOGOWIZARD'))));\n\n\t\trequire_code('templates_confirm_screen');\n\t\treturn form_confirm_screen($title,$preview,'__make_logo','make_logo');\n\t}", "function wpex_custom_login_logo() {\r\n\r\n global $data;\r\n if($data['custom_login_logo'] !='') {\r\n $custom_login_logo_css = '';\r\n $custom_login_logo_css .= '<style type=\"text/css\">';\r\n $custom_login_logo_css .= 'h1 a {';\r\n $custom_login_logo_css .= 'background-image:url('. $data['custom_login_logo'] .') !important;width: auto !important;background-size: auto !important;';\r\n if($data['custom_login_logo_height']) {\r\n $custom_login_logo_css .= 'height: '.$data['custom_login_logo_height'].' !important;';\r\n }\r\n $custom_login_logo_css .= '}</style>';\r\n\r\n echo $custom_login_logo_css;\r\n }\r\n}", "function wpex_header_logo() {\n get_template_part( 'partials/header/header-logo' );\n}", "function gridbox_site_logo() {\r\n\r\n\t\tif ( function_exists( 'the_custom_logo' ) ) {\r\n\r\n\t\t\tthe_custom_logo();\r\n\r\n\t\t}\r\n\t}", "function lop_custom_login_logo() {\n\tglobal $data;\n\tif ( $data['lop_custom_login'] ) {\n\techo '<style type=\"text/css\">h1 a { background-image:url('.$data['lop_custom_login'].') !important; } </style>'; }\n}", "function ZPDBRAND_login_logo() {\n $logo_url = ZPDBRAND_PLUGIN_URL . 'img/zpd-login-logo.png';\n echo \"\n\t<style>\n\tbody.login #login h1 a {\n\t\tbackground: url('\" . $logo_url . \"') no-repeat scroll center top transparent !important;\n\t\theight: 64px;\n\t\twidth: 100%;\n\t}\n\t</style>\n\t\";\n}", "private function logo()\n {\n if (Proyecto::find(Context::getId())->tiene_logo == 2) {\n $dataURI = \"data:image/png;base64,\" . Proyecto::find(Context::getId())->logo;\n $dataPieces = explode(',', $dataURI);\n $encodedImg = $dataPieces[1];\n $decodedImg = base64_decode($encodedImg);\n\n\n // Check if image was properly decoded\n if ($decodedImg !== false) {\n \n // Save image to a temporary location\n if (file_put_contents(public_path('img/logo_temp.png'), $decodedImg) !== false) {\n \n // Open new PDF document and print image\n //$this->image($dataURI, $this->WidthTotal - 1.3, 0.5, 2.33, 1.5);\n $this->image(public_path('img/logo_temp.png'), $this->WidthTotal - 1.3, 0.5, 2.33, 1.5);\n //dd(\"image\");\n // Delete image from server\n unlink(public_path('img/logo_temp.png'));\n }\n }\n } else {\n $this->image(public_path('img/logo_hc.png'), $this->WidthTotal - 1.3, 0.5, 2.33, 1.5);\n }\n }", "function get_site_logo() {\n\t\t$spt_logo = get_option(SPT_OPTION_LOGO);\n\t\t$spt_logo = ($spt_logo)? $spt_logo : get_bloginfo('name');\n\t\t?>\n\t\t<h1 class=\"grid_6 logo\"><a href=\"<?=SPT_HOME;?>\"><?php echo $spt_logo; ?></a></h1>\n\t\t<?php\n\t}", "function hcode_login_logo() { \n $admin_logo = hcode_option('hcode_header_logo');\n if( $admin_logo['url'] ):\n ?>\n <style type=\"text/css\">\n .login h1 a {\n background-image: url(<?php echo $admin_logo['url'];?> ) !important;\n background-size: contain !important;\n height: 48px !important;\n width: 100% !important;\n }\n </style>\n <?php \n endif;\n }", "function helix_masthead_logo() {\n\tif ( get_dna('masthead_logo') ) {\n\t\techo '<style> a#masthead-logo { background: url(\"' . get_dna('masthead_logo') . '\") no-repeat 0 0; } </style>';\n\t}\n}", "public function getLogo()\n {\n\n return '';\n }", "protected function getLogo()\n {\n $id_shop = (int) $this->shop->id;\n\n $invoiceLogo = Configuration::get('PS_LOGO_INVOICE', null, null, $id_shop);\n if ($invoiceLogo && file_exists(_PS_IMG_DIR_ . $invoiceLogo)) {\n return $invoiceLogo;\n }\n\n $logo = Configuration::get('PS_LOGO', null, null, $id_shop);\n if ($logo && file_exists(_PS_IMG_DIR_ . $logo)) {\n return $logo;\n }\n\n return null;\n }", "public function getLogo()\r\n {\r\n }", "function truethemes_custom_login_logo(){\n\t\t$loginlogo = get_option('ge_loginlogo');\n echo '<style type=\"text/css\">\n h1 a { background-image:url('.$loginlogo.') !important; }\n </style>';\n}", "function wpb_custom_logo() {\n echo '\n <style type=\"text/css\">\n\t\t\t#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {\n\t\t\t\tbackground-image: url(' . get_bloginfo('stylesheet_directory') . '/images/logo-Fotograf-Iasi-Daniel-Condurachi---patrat-60x60.jpg) !important;\n\t\t\t\tbackground-position: 0 0;\n\t\t\t\tcolor:rgba(0, 0, 0, 0);\n\t\t\t}\n\t\t\t#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {\n\t\t\t\tbackground-position: 0 0;\n\t\t\t}\n </style>\n ';\n}", "function footer_logo($num = 1)\n{\n if ($logo = get_theme_option(\"Footer Logo$num\")) {\n $storage = Zend_Registry::get('storage');\n $uri = $storage->getUri($storage->getPathByType($logo, 'theme_uploads'));\n return \"<img class='footer-logo' src='$uri'/>\";\n }\n}", "function the_brand_logo( $link = true ) {\n echo get_the_brand_logo( $link );\n}", "function login_logo_prosites(){\n\techo '<style type=\"text/css\">h1 a{outline: none !important;box-shadow: none !important;background-image:url('.get_bloginfo('template_directory').'/img/logo-webber.svg) !important;background-size: 150px 155px !important;width:150px !important;height:155px !important;}.wp-core-ui .button-primary{border:0;border-radius:0;}</style>';}", "function _remove_custom_logo() {\n\t\tremove_theme_mod( 'custom_logo' );\n\t}", "function smarty_function_logoHtml($params, &$smarty)\n{\n\tif(!isset($params['metadata']['logo']))\n\t{\n\t\treturn;\n\t}\n\t$width = $height = $alt = '';\n\tif(isset($params['metadata']['logoWidth']))\n\t{\n\t\t$width = \"width=\".$params['metadata']['logoWidth'];\n\t}\n\tif(isset($params['metadata']['logoHeight']))\n\t{\n\t\t$height = \"height=\".$params['metadata']['logoHeight'];\n\t}\n\tif(isset($params['alt']))\n\t{\n\t\t$alt = \"title='\".$params['alt'].\"' alt='\".$params['alt'].\"'\";\n\t}\n\treturn \" <img $alt $width $height src=\".$params['metadata']['logo'].\" />\";\n}", "function _set_custom_logo() {\n\t\tif ( ! $this->custom_logo_id ) {\n\t\t\t$this->_insert_custom_logo();\n\t\t}\n\n\t\tset_theme_mod( 'custom_logo', $this->custom_logo_id );\n\t}", "public function getLogo();", "function change_ot_header_logo_link() {\n return '';\n}", "public function getLogoFilename();", "function theme_login_logo() {\n $custom_logo_id = get_theme_mod( 'custom_logo' );\n $image = wp_get_attachment_image_src( $custom_logo_id , 'full' );\n\n echo '<style type=\"text/css\">\n body.login { background: #000; }\n .login h1 a {\n background-image:url(' . $image[0] . ') !important;\n background-size: contain !important;\n width: 320px !important; height: 80px !important; }\n </style>';\n}", "function bfg_replace_login_logo() {\n\n\t?><style type=\"text/css\">\n\t\tbody.login h1 a {\n\t\t\tbackground-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/login-logo.svg);\n\n\t\t\t/* Adjust to the dimensions of your logo. WP Default: 84px 84px */\n\t\t\tbackground-size: 84px 84px;\n\t\t\twidth: 84px;\n\t\t\theight: 84px;\n\t\t}\n\t</style>\n\t<?php\n\n}", "public function getLogo(): string;", "function printHeaderLogo(){\n\t\n\tglobal $DB;\n\t\n \t$imageurl = $DB->get_field('block_signinsheet', 'field_value', array('id'=>1), $strictness=IGNORE_MISSING);\n\techo '<img src=\"'.$imageurl.'\"/><br><div style=\"height:30px\"></div>';\n\t\n}", "public function loginLogo()\n\t{\n\t\t$defaultLogo = SSM_CORE_URL . \"assets/images/login-logo.png\";\n\t\t$background_image = get_option(\"ssm_core_login_logo\") != NULL ? get_option(\"ssm_core_login_logo\") : $defaultLogo;\n\n if ( $GLOBALS[\"pagenow\"] === \"wp-login.php\" ):\n \n ?>\n <style type=\"text/css\">\n body.login div#login h1 a {\n background-image: url(<?php echo $background_image; ?>) !important;\n background-repeat: no-repeat;\n background-size: contain;\n width: auto;\n height: 90px;\n margin-bottom: 15px;\n }\n </style>\n\n <?php\n\n\t endif;\n }", "private function drawLogo() {\n\t\t\n\t\t// Really wish we could align right, but aligning right will not respect the\n\t\t// $x parameter in TCPDF::Image(), so we must manually set the off-set. That's ok\n\t\t// because we're setting the width anyway.\n\t\tif ($this->meta['display_logo'] == \"true\" && file_exists($this->meta['logo']))\n\t\t\t$this->Image($this->meta['logo'], 432, 35, 140);\n\t}", "function wpbase_preload_custom_logo() {\n // Check if custom logo has been set and preload it\n $custom_logo_id = get_theme_mod( 'custom_logo' );\n \n if( $custom_logo_id ){\n\n $custom_logo_url = wp_get_attachment_image_src( $custom_logo_id , 'full' );\n ?><link rel=\"preload\" href=\"<?php echo esc_url( $custom_logo_url[0]);?>\" as=\"image\"><?php\n } else {\n return;\n }\n }", "function customize_toolbar_logo() {\n echo '\n <style type=\"text/css\">\n #header-logo { background-image: url(' . get_bloginfo('template_directory') . '/images/admin-toolbar-logo.png) !important; }\n </style>\n ';\n}", "function getLogoData()\r\n{\r\n\r\n\t$settings = woo_get_dynamic_values( array( 'logo' => '' ) );\r\n\tif ( ( '' != $settings['logo'] ) ) {\r\n\r\n\t$site_title = get_bloginfo( 'name' );\r\n\t$site_url = home_url( '/' );\r\n\t$site_description = get_bloginfo( 'description' );\r\n\r\n\t$logo_url = $settings['logo'];\r\n\tif ( is_ssl() ) $logo_url = str_replace( 'http://', 'https://', $logo_url );\r\n\r\n//\t$size = getimagesize($logo_url);\r\n//\t$w = $size[0];\r\n//\t$h = $size[1];\r\n $size = array(0 , 0);\r\n $w = 0;\r\n $h = 0;\r\n\r\n\t$nav_mb = ceil($w * 0.7);\r\n\t$nav_padding = ceil($w/2);\r\n\t$logo_top = ceil($h/2);\r\n\r\n\t$item_replace = 'style=\"margin-left:' . $w . 'px;\" class=\"logo_margin ';\r\n\r\n\t$logo_block = '\r\n\t<a href=\"' . esc_url( $site_url ) . '\" title=\"' . esc_attr( $site_description ) . '\">\r\n\t<img src=\"' . esc_url( $logo_url ) . '\" alt=\"' . esc_attr( $site_title ) . '\" />\r\n\t</a>' . \"\\n\";\r\n\r\n\treturn array(\r\n\t\t'size'=>$size,\r\n\t\t'w'=>$w,\r\n\t\t'h'=>$h,\r\n\t\t'nav_mb'=>$nav_mb,\r\n\t\t'nav_padding'=>$nav_padding,\r\n\t\t'logo_top'=>$logo_top,\r\n\t\t'item_replace'=>$item_replace,\r\n\t\t'logo_block'=>$logo_block,\r\n\t\t);\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}", "function make_logo()\n\t{\n\t\tif (!function_exists('imagepng')) warn_exit(do_lang_tempcode('GD_NEEDED'));\n\n\t\t$title=get_page_title('_LOGOWIZARD',true,array(integer_format(1),integer_format(3)));\n\t\t$GLOBALS['HELPER_PANEL_PIC']='pagepics/logowizard';\n\n\t\t$post_url=build_url(array('page'=>'_SELF','type'=>'_make_logo'),'_SELF');\n\t\t$theme_image_url=build_url(array('page'=>'admin_themes','type'=>'edit_image','id'=>'logo/-logo','lang'=>user_lang(),'theme'=>$GLOBALS['FORUM_DRIVER']->get_theme('')),get_module_zone('admin_themes'));\n\t\t$text=do_lang_tempcode('LOGOWIZARD_1_DESCRIBE',escape_html($theme_image_url->evaluate()));\n\t\t$submit_name=do_lang_tempcode('PROCEED');\n\n\t\trequire_code('form_templates');\n\t\t$fields=new ocp_tempcode();\n\t\t$fields->attach(form_input_line(do_lang_tempcode('NAME'),do_lang_tempcode('DESCRIPTION_LOGO_NAME'),'name',get_option('site_name'),true));\n\t\t$a=$GLOBALS['SITE_DB']->query_value('zones','zone_title',array('zone_name'=>''));\n\t\t$fields->attach(form_input_line(do_lang_tempcode('TITLE'),do_lang_tempcode('DESCRIPTION_LOGO_SLOGAN'),'title',get_translated_text($a),true));\n\n\t\t// Find the most appropriate theme to edit for\n\t\t$theme=$GLOBALS['SITE_DB']->query_value_null_ok('zones','zone_theme',array('zone_name'=>'site'));\n\t\tif (is_null($theme)) // Just in case the 'site' zone no longer exists\n\t\t\t$theme=$GLOBALS['SITE_DB']->query_value('zones','zone_theme',array('zone_name'=>''));\n\t\tif ($theme=='-1')\n\t\t{\n\t\t\t$theme=preg_replace('#[^A-Za-z\\d]#','_',get_site_name());\n\t\t}\n\t\tif (!file_exists(get_custom_file_base().'/themes/'.$theme)) $theme='default';\n\t\trequire_code('themes2');\n\n\t\t$fields->attach(form_input_list(do_lang_tempcode('THEME'),do_lang_tempcode('DESCRIPTION_LOGOWIZARD_THEME'),'theme',nice_get_themes($theme,true)));\n\n\t\tbreadcrumb_set_self(do_lang_tempcode('LOGOWIZARD'));\n\n\t\treturn do_template('FORM_SCREEN',array('_GUID'=>'08449c0ae8edf5c0b3510611c9ac9618','SKIP_VALIDATION'=>true,'TITLE'=>$title,'FIELDS'=>$fields,'URL'=>$post_url,'TEXT'=>$text,'SUBMIT_NAME'=>$submit_name,'HIDDEN'=>''));\n\t}", "function print_logo()\n{\n\t$logo = 'iVBORw0KGgoAAAANSUhEUgAAARIAAAA/CAYAAAAsckd/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ\nbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdp\nbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6\neD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEz\nNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJo\ndHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlw\ndGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEu\nMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVz\nb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1N\nOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCOUQxRjE1QTQ4MkFFMjExQTA4NkUzMzhGRjVD\nMTc2QiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3REVCQkQ4QTJBNDkxMUUyQjkwNDg0MUNF\nRDJCNTJDQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3REVCQkQ4OTJBNDkxMUUyQjkwNDg0\nMUNFRDJCNTJDQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3Mi\nPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCQkQxRjE1QTQ4\nMkFFMjExQTA4NkUzMzhGRjVDMTc2QiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCOUQxRjE1\nQTQ4MkFFMjExQTA4NkUzMzhGRjVDMTc2QiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRG\nPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pvo8fvoAAA8bSURBVHja7F29bhtJEm4t\n/ADkE1jWBhcuDV4uGpAE3CWiAzq1lFChpMjMLGVSJCk0E9HpKjAVHSQTMJ0vYTq8A5bmPgH5Br5p\noUosFvt3Zvhjb33AgBKnp6anp+vrr2p6mms7OztqAViHreIp10+2IXzOHXd3d0ogEGTHkzkSRzXZ\nNoE8CilsdIFQ3i+KWAQCwfKJpADkcZhsJaYy9PaVEEKXHVuC41G5IAHp7QhUSjvZruBvgUDwkxFJ\nAZz9kCgP7fS38DkOsGFTHKhq9uAcemuBSunK7RMIfg4iOSEEognjNNkuPeSBqoNibCGTNmzHQCav\n4XMPCOVUFIpA8OMSiQ5FruHTRSDroCp+g7Ilj10klM+gOKjqaMGmw523QCZVcm6BQLAk/JJShXwB\nUtAO/Ay+G1sI5wKcvhRgu0CI4lOyjdRsolaTy4tk24f/L6BsQW6nQLD6RKId9QM4+Ric+ZgQCKoP\nHpqMM9Sv6zi+BSTWBfL5FkhWAoFgSURSgFG/CqHHMxJ2FECRfLOognaG+t0avquqSY4FCe2U1VEg\nEKwYkaCDlkAFPCcqoQJhzlsHadymrNsYzmfCNyAvGm7tE9W0J7dWIFgdIuEkss+c9xNRBy1LGJI2\nvGk7vh+rSR6lQM6PJHctYY5AsDpE8sFCItdEhYQojzThzXvHvhZRRJ8Iaeiw6yX8/UnIRCBYPpFc\ngKO2DSSyZwhD2ilJwYShck84o/ZKjDS6JMy5VvI0RyBYGpHohOURjPA+ElGOXIYizj3MIaxRRHkM\nDSEYDbMu1WS+i0AgWDCRFIjz7atJfuNC2ZOY73MgB4qrFPYw0YoK5BgIp6rkSY5AsHAiuQBnPFWT\naeuoUGzqoO8JkWLCm75HvRw57HEF8pIoKQlxBIIFEUkJVId25BODQolVI/hCXymAIELUiA5d3noI\nh5LeUE3mmBzJ7RYIFkMkFySkUYGjuStkwZDidUR447NXIHZtpPOW1PkSCOVQVIlAMH8i0aN9RU2/\nLFfx5BfaHpWxywjFF9745pwgIW16SKdASHEsqkQgWByRYMhwavjOhltPGFIlf2N4008ZJqENSkxD\nh709NTtZTlSJQDAHPCEjeFVNz9+oKPcaq765I1WDmsClE0sZ7VFistlDItwnYdBbsNPCAmtra9IL\nBGpnZ6eWfNST7fz+/r4jLeLH9+/fZ4gEcw9UjRzmFIZQIjiG4y4icyMmexUgEps9VCX4hnILiGSX\nEsl//6U+Wo7t/OM/6jy0URM7xeTjd9O+xM62dLuVhyaSrWQb6HsvzZEutNllzlxQ/rkXoWEI/84W\njlxF2ntNwptugJLB81ZZeNOBzlOGjoTbGyCHUNTZ8WXplD+MGtkAInkglOT/orRKOiLB0X1oCUs4\nQp3XpireG+z1I+2VCCG4SG3XQH4VohbOk+0g+bPBjiuSzhVKJBQNbTdG1QiWqkbS3ncBEAk6ZNfi\nfCqHMIQTQjtCjaSxZyMhvMZNQ7mbAHKwhTVagWwE2BOsJupp7rtgmkhwdP7M8g8uxIYhvvCmndIe\nEp4vUYvX0ydqhucxRobjyglJlCNHNJc9weqFNaZBoJx8X5bWCYdOtj4l4QU6rusRqW+Gqi8swqc3\nmoyulf+FvmrgvltH2QpRI90AouSj04FDjRTTjmCgZHSyV4dXjXnf7OR8GwancWGU1Ku36E654HrW\nHN/3HDkVX/1G9/f3vb8TkZTYaL3uOeZ9AFEoj/Pj05vrnOy1iT0TnrJ8TFRHSzp2w6EwssjgGrHR\ncDjWm+TjzGFHP2HaTsp9txVI9q/B+c4i6qeTxb96nN5Wt4YrP5Qc987UdvOqp4UQaD6kCX8XA+5J\nUP3g53B1iNvkj5STfdZ2S8qeO2wa2y05Zs1h87GfJOW2LeV6yb5/BtbxwVaybdPQhjuXbzGgVsow\nhJcZEwLIYm8zILyh5PhXQPhGb7ov+ZZWjVC7xeR/lx3dGV8ZRsgRqCXs8NvwHd3fwBsOieU1cBqK\nJpRrwN9oI0QV2OpWD7z2Rweacz1thIDEcc7yWsXEkYzXoB1dO66jfudAbniOj0AAmdqNEd9Mu0X0\nE1O5cmAdua1HRUJlv1L+92rGGcIaHt7s52CvwtRSHksG6AbcYje3aQlNsBPrxi6n7MQKzte0qAnd\nKQfJ+UYQCiG0wzUtNjUZvrIoqXPWYW+Sch1yXdrmHyEX4ajbRvJdLdl/E3DtNxb1kls9PYOAHo0H\niSN12Pms94QQx1T9iPJosBG9nvyvw50GkNFDu+nveLvpyXHJ/qB2o+rFYVMTXzOgnK5jD8tayk3Z\n4ookFFnDEE4QvrVcDwNslQKIjpYJWT92wEYnW9K1Zikf04lpCLXhcVo+J6VnCRWaOtSxhWPg/Da1\n8NGVH4iomyv/ULddx7zryfIcZTJwKHBees4alFMWZeI8Nzg57RdvuD3LLNpM7WawGVpO44wnmlk5\no60YIvE9GQkJQ2LKlgLyNSZVYqojVVn9CFVivYksydpMkUwsR3QgZ4iUbH+QujRgXkxa4GS6AxoD\npw0dODkCIefxRCRrPetMWdjue9Y5JY0UofAMgYFzL+JJ0sMM7dhJeTFE4ps7EhtShDzdSQOTahpa\nSMc1ws6MTmyma93R+UI78YAxfGy+pQzSvgyx63baCXDa4UHV4PX3LCojTR4ic05pDvWskfBgFDqA\nxALCgx4jwIW3WwBoHTWJ/R5LJKE/FXGVs+PnTUyIrpp9MjNMaavJmLpuuLE3Lgnu6SRN1nE3IO8S\nijOSo9nO4Pg6TPgzx846MjmAJcm68HrCC3rYbjoHsIUb3OcBy1lsZWyPASP/qHazJFnzxjknPMjx\nBBNJn4UZQ8uI3s8prMHwop9TWGPKe7RTHBMc3rAka5Qa0QlIdmwzJyn9LvLdID4aDXLslJwca+Ta\niuAwvSXWkxLDGyAoum3kHN700rQbEF4e7RZK/q8YmZ2ROgSFNgUPkfiSrLHqIa+krS3vcevY/1to\nrgSUhkkxPCZZLU8lQtRIDzpsmYc3EYTAR7o/A2fizsTxyXX8qlRuk+J4WFjnKo512IXVE0Z3rEdH\nTR4n821KHWR8kW9jye0WE4bx/Nq7kFm+mkg+ExVgc7DWCoc1bUt4Q/EXU08xv/zXNKiStElWKlHL\nZAQspxwB+fN8bf9jZHhEiTPPFwxp22yBKimnabec60nDogOYEzKzWe57WpQj1EmThRe5tVsgmdwY\n+tS7ECIZMiIZM1XS9eQYYsMa3/KMsWHNbYBK6TL7/YhO22GjRM1BMqGdeGQYAQdpOi041YGBTNJ2\n/A52dm0jgx2u1DB518tp2n3aeuL968AIHDqApApvQMnEEIm13RY15R6ItBOY13kkEnSyTYvj5R3W\n+H5UPEbduH5ofEjKIHFU4PNzhtH18bsUL+bReR7ndGPnKMeEKDAp7YDJXp0zOYvtRDD/BEekd2kd\nyBAWpiXf3OrJHqE2A2T+lDOlfJGv7iEK03nn1m4ReBWTj0JFMlTTj0VvI8KQw0jHzzOsOXXs+2qo\n/64l9FFsvsNGwE28ccXBhvkTNEEbYq/uqePUOYFM+HyKN/RRqcPOlqFMlBJhNouWaxqR70zl513P\nR0VomTkadU8Mk9WKbL8uT8n8xvDOTe7tZqjXRkC5IiM0TL4GEwk6Fg1R2mS0H+cYhrRztKdVxmWk\nAqrC+bsOyTsjY0F5UOcfsKnapsdzNbb/jI3WphF8KsFnUCU1l2NByDAzAUrPAmVOWTOU0aSzBduZ\nUtFqZqb9DHNx9KPyEVzXVH0sCebc6gmPcB+JJDB5yhVnnT0K5vXTM1f1ZDL9+ZHlFnrK/Bb5TLsZ\nZtg+zHUBRTTVbpbrqPkI2NfnoR62Os9gDd5Q1A72ARzzGPZdgxO6FIReKzXmJx5eKPfKajH2fLZO\nQC0VCUl9AXJ8WBD67u5O/e/fax+hTNnQiR4cUzsoeeVfwXfnMBrWHDdqoCbLOBb597iWK0z3tr2a\n3oGtZolVB+CgDXCsmrI/JRiR+gTnIlxrzkIb1A02UaKPiLMfONprBPmTbYfN6HqCQ7vu7w1/d8Rx\nDD029CmOLvsQutKJb6BWcms3eKvX1W4DuNaG79z4PhCpK339YhtVlWnxZ0yA7hEiOVb+pxsxYcjQ\n4/gx9loBtjSuDCHYrcFRXbHrCJOuSQcfgJM2ScN3lH9d1qz7UdreeEbOgSeWRgeIeWTtS/ANHHUb\nwbWdgZ0OnL+TwWZsPX33d5DimOA6OVakX0a7jQLPzdEA0in7FAmO4PjzDa2ARsIRPhRU7WS190z5\nZ6sekdBMz5P5Bn8/wwJakQgEguz4hY3ySvl/FIvmKNZge24gnyGEH1jmOKM9Wm4YUD+a3zlSsz+3\nIRAIcsIT5vgtCG/2iCMXlHmeSJ84qv77MxznCmXoyu8+e18t5W4Drw1trUNYMwxUWgKBIAORYF5E\n5yku1OQJyxj+L0Xaruh8zApc4wWQ17HcboFg/qENjuJX4Hh0/VPfSmaLxNNIMquCwhE1IhAsiEg0\nTtTkF+mqJNRYlRF9T4XNNdFk+IEQoUAgWCCRUAVyTUKa1go55AflXluWljlVEe/WCASC/IgEFQiG\nOIUVIxN8VHwE4QsnlWs1WdT6RG6zQLAcIkHSuASn/bSCZKLDG51I5e/6HEH4o8nwpdxigWC5RKJA\nlbQsZPJCLT8BewpkgfXYA3IZs+8FAsESiUSpyUxXTiY6bNCzRNtLqPcQiOyEhTPXQB4vVPp1WgUC\nwRyIhJPJNzVZcgBH/kU57hhUyHM1mexWAILDcOa5kuSqQLCSRIJkckwcl6oBVCf7cyIUJJBncF4M\nWSqE2LqiRASC1ScSjUvirPqdnC9qekGkFjg7viuT1anbQE6cQPBpEoZap2o1cjYCwd8ST1Ic0wWi\n0ERyBM7cBbWCIQX+rq+CcEiTjV69fZ1sXHHguzZfwV7XcO4CnPMQ/sbzSCgjEPxgRIKOr4njFgil\nAupEO/+Vmk7A9nNw9BKQRxUIZKzClzsQCAQrSiRUnXSBSJBQKmqyNust7E8TcqCtXTWZXTuEMKYl\nYYxA8PMQCSeUdaIc9tRkWYGhml4agIctGO48hc8K299S/mUfBQLBkkBXSMsbmBvZVPGLRHfVZI2T\nuZGHrJAmEKyWIjEBcyOXLFzhKqTLjpGQRSD4wfB/AQYA+VOfPu64EsgAAAAASUVORK5CYII=';\n\n\theader('Content-Type: image/png');\n\techo base64_decode($logo);\n\n}", "function __make_logo()\n\t{\n\t\t$title=get_page_title('_LOGOWIZARD',true,array(integer_format(3),integer_format(3)));\n\t\t$GLOBALS['HELPER_PANEL_PIC']='pagepics/logowizard';\n\n\t\t$theme=post_param('theme');\n\n\t\t// Do it\n\t\trequire_code('themes2');\n\t\t$rand=uniqid('',true);\n\t\tforeach (array($theme,'default') as $logo_save_theme)\n\t\t{\n\t\t\t$path='themes/'.$logo_save_theme.'/images_custom/'.$rand.'.png';\n\t\t\t$img=generate_logo(post_param('name'),post_param('title'),false,$logo_save_theme,'logo-template');\n\t\t\t@imagepng($img,get_custom_file_base().'/'.$path) OR intelligent_write_error($path);\n\t\t\timagedestroy($img);\n\t\t\tactual_edit_theme_image('logo/-logo',$logo_save_theme,user_lang(),'logo/-logo',$path);\n\t\t\tif (addon_installed('collaboration_zone'))\n\t\t\t\tactual_edit_theme_image('logo/collaboration-logo',$logo_save_theme,user_lang(),'logo/collaboration-logo',$path);\n\t\t\t$rand=uniqid('',true);\n\t\t\t$path='themes/'.$logo_save_theme.'/images_custom/'.$rand.'.png';\n\t\t\t$img=generate_logo(post_param('name'),post_param('title'),false,NULL,'trimmed-logo-template');\n\t\t\t@imagepng($img,get_custom_file_base().'/'.$path) OR intelligent_write_error($path);\n\t\t\timagedestroy($img);\n\t\t\tactual_edit_theme_image('logo/trimmed-logo',$logo_save_theme,user_lang(),'logo/trimmed-logo',$path);\n\t\t}\n\t\tpersistant_cache_delete('THEME_IMAGES');\n\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:make_logo',do_lang_tempcode('START'))));\n\n\t\t$message=do_lang_tempcode('LOGOWIZARD_3_DESCRIBE',escape_html($theme));\n\t\treturn inform_screen($title,$message);\n\t}", "function inhabitent_login_logo() {\n\techo '<style>\n\t\t#login h1 a {\n\t\t\tbackground: url(' . get_template_directory_uri() . '/images/logos/inhabitent-logo-text-dark.svg) no-repeat !important;\n\t\t\tbackground-size: 300px 53px !important; width: 300px !important; height: 53px !important;\n\t\t}\n\t\t#login .button.button-primary {\n\t\t\tbackground-color: #248A83;\n\t\t}\n\t</style>';\n}", "function wp_custom_login_logo() {\n echo '<style type=\"text/css\">\n .login h1 a {\n background: url('.get_bloginfo('template_directory').'/img/logo2.png) no-repeat left center !important;\n background: url('.get_bloginfo('template_directory').'/img/logo2.svg) no-repeat left center,\n linear-gradient(transparent, transparent) !important;\n background-size: 160px 110px !important;\n height: 110px !important;\n width: 160px !important;\n }\n </style>';\n}", "function login_logo_url_title() {\n\treturn esc_html__( 'CÔNG TY TNHH CÔNG NGHỆ VÀ TRUYỀN THÔNG PHOENIXDIGI VIỆT NAM - PHOENIXDIGI.VN', 'phoenixdigi' );\n}", "public function ui_focalsoft_small_logo()\n\t\t\t{\n\t\t\t\treturn '\n\t\t\t\t<a href=\"'.$this->hoster.'\">\n\t\t\t\t\t<div class=\"ui-focalsoft-small-logo cf\">\n\t\t\t\t\t\tFS\n\t\t\t\t\t</div>\n\t\t\t\t</a>';\n\t\t\t}", "function alienship_do_header_image() {\n\n\t$output = alienship_get_header_image();\n\tif ( $output )\n\t\techo apply_filters( 'alienship_header_image_output', $output['output'] );\n}", "public function railyard_login_logo() {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\tbody.login div#login h1 a {\n\t\t\t\tbackground-image: url(/wp-content/mu-plugins/custom/railyard/static/railyard-logo.png);\n\t\t\t}\n\t\t</style>\n\t<?php\n\t}", "function pg_starter_custom_logo_setup() {\n\n add_theme_support( 'custom-logo', array(\n \t'height' => 120,\n \t'width' => 120,\n \t'flex-height' => true,\n \t'flex-width' => true,\n \t// 'header-text' => array( 'site-title', 'site-description' ),\n ) );\n\n }", "public function getPOSLogo() {\n $showGiftLabel = Mage::getStoreConfig('webpos/general/webpos_logo', $this->getStoreId());\n if ($showGiftLabel)\n return Mage::getStoreConfig('webpos/general/webpos_logo', $this->getStoreId());\n return null;\n }", "function get_the_brand_logo( $link = true ) {\n $html = '';\n\n if ( $link == true ) {\n $html .= '<a href=\"' . home_url() . '\">';\n }\n\n if ( $logo = ssm_get_field('brand_logo', 'options') ) {\n if ( $icon = ssm_get_field('brand_icon', 'options') ) {\n $html .= '<img src=\"' . $logo['url'] . '\" alt=\"' . $logo['alt'] . '\" class=\"logo show-for-medium\">';\n $html .= '<img src=\"' . $icon['url'] . '\" alt=\"' . $icon['alt'] . '\" class=\"icon hide-for-medium\">';\n } else {\n $html .= '<img src=\"' . $logo['url'] . '\" alt=\"' . $logo['alt'] . '\" class=\"logo\">';\n }\n } else {\n $html .= '<span class=\"site-title\">' . get_bloginfo('name') . '</span>';\n }\n\n if ( $link == true ) {\n $html .= '</a>';\n }\n\n return $html;\n}", "function eccu_custom_logo_url() {\n\n\tadd_filter( 'genesis_seo_title', 'be_logo_url', 10, 3 );\n\tfunction be_logo_url( $title, $inside, $wrap ) {\n\n\t\t\t$site_title = genesis_get_option( 'wsm_site_title', 'cpk-settings' );\n\t\t\t$site_url = genesis_get_option( 'wsm_site_url', 'cpk-settings' );\n\t\t\t$site_url_target = genesis_get_option( 'wsm_site_url_target', 'cpk-settings' );\n\n\t\t\t// Title\n\t\t\t$cpk_title = '';\n\t\t\tif ( $site_title ) { $cpk_title = $site_title ; }\n\t\t\telse { $cpk_title = get_bloginfo( 'name' ); }\n\n\t\t\t// URL\n\t\t\t$cpk_url_target = '';\n\t\t\tif ( $site_url ) { $cpk_url = $site_url; }\n\t\t\telse { $cpk_url = get_bloginfo( 'url' ); }\n\n\t\t\t// URL Target\n\t\t\t$cpk_url_target = '';\n\t\t\tif ( $site_url_target ) { $cpk_url_target = 'target=\"_blank\"'; }\n\t\t\telse { $cpk_url_target= 'target=\"_self\"'; }\n\n\n\t\t$inside = sprintf( '<a href=\"%s\" title=\"%s\" '. $cpk_url_target .'>%s</a>', esc_url( $cpk_url ) , esc_attr( $cpk_title ), $cpk_title );\n\t\t$title = sprintf( '<%s class=\"site-title\" itemprop=\"headline\">%s</%s>', $wrap, $inside, $wrap );\n\t\treturn $title;\n\n\n\t}\n}", "function WPBikeRent_Theme_map_icon(){ \n\t\t$testlogo2 = 'img_map_logo';\n\t\techo $this->WPBikeRent_Theme_image_uploader_field( $testlogo2, get_option('img_map_logo') );\n\t}", "function pluton_cac_has_custom_logo() {\n\tif ( has_custom_logo() ) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "private function\n\t\tget_oedipus_logo_image()\n\t{\n\t\treturn $this->load_png(\n\t\t\tPROJECT_ROOT \n\t\t\t. \"/project-specific/public-html/images/oedipus-logo-with-head.png\"\n\t\t);\n\t}", "public function get_logo_html()\n {\n global $SITE;\n\n $logoorsitename = \\theme_remui\\toolbox::get_setting('logoorsitename');\n $siteicon = \\theme_remui\\toolbox::get_setting('siteicon');\n $checklogo = \\theme_remui\\toolbox::setting_file_url('logo', 'logo');\n $logohtml = '';\n if (!empty($checklogo)) {\n $logo = $checklogo;\n } else {\n $logo = \\theme_remui\\toolbox::image_url('logo', 'theme');\n }\n\n $checklogomini = \\theme_remui\\toolbox::setting_file_url('logomini', 'logomini');\n if (!empty($checklogomini)) {\n $logomini = $checklogomini;\n } else {\n $logomini = \\theme_remui\\toolbox::image_url('logomini', 'theme');\n }\n\n if ($logoorsitename == 'logo') {\n ?>\n $logohtml .= \"<a href='$CFG->wwwroot;' class='logo'>\n <span class='navbar-brand-logo' style='background-image: url($logomini);background-position: center; height:50px; background-size: contain; background-repeat: no-repeat;'></span>\n <span class='navbar-brand-logo-mini' style='background-image: url($logomini);\n background-position: center; height:50px; background-size: contain; background-repeat: no-repeat;'></span>\n </a>\";\n <?php\n\n } elseif ($logoorsitename == 'sitename') {\n ?>\n <a class=\"logo\" href=\"<?php echo $CFG->wwwroot; ?>\">\n <span class=\"logo-mini\"><i class=\"fa fa-<?php echo $siteicon; ?>\"></i></span>\n <span class=\"logo-lg\">\n <?php echo format_string($SITE->shortname); ?>\n </span>\n </a>\n <?php\n\n } else {\n ?>\n <a class=\"logo\" href=\"<?php echo $CFG->wwwroot; ?>\">\n <span class=\"logo-mini\"><i class=\"fa fa-<?php echo $siteicon; ?>\"></i></span>\n <span class=\"logo-lg\">\n <i class=\"fa fa-<?php echo $siteicon; ?>\"></i>\n <?php echo format_string($SITE->shortname); ?>\n </span>\n </a>\n <?php\n\n }\n\n // $logo = $this->get_compact_logo_url();\n // return !empty($logo) && !$this->should_display_main_logo();\n\n echo $logohtml;\n }", "function the_custom_logo($blog_id = 0)\n{\n}", "public function getLogoPath()\n {\n return '';\n }", "function wp_inspire_customize_logos( $wp_customize ) {\n\t// Add a setting for an alternate logo that displays in the sticky nav.\n\t$wp_customize->add_setting(\n\t\t'wp_inspire_alternate_logo',\n\t\tarray(\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t)\n\t);\n\n\t// Add a control to upload the Alternate Logo.\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize,\n\t\t\t'wp_inspire_alternate_logo',\n\t\t\tarray(\n\t\t\t\t'description' => esc_html__( 'Upload an alternate logo which will display in the footer.', 'wp_inspire' ),\n\t\t\t\t'label' => esc_html__( 'Alternate Logo', 'wp_inspire' ),\n\t\t\t\t'section' => 'title_tagline',\n\t\t\t\t'settings' => 'wp_inspire_alternate_logo',\n\t\t\t)\n\t\t)\n\t);\n}", "public function logo();", "function my_login_logo() { \r\n\t$admin_logo_image = diagonalizer('admin_logo_image');\r\n\tif ( !empty($admin_logo_image['url']) && $admin_logo_image['url'] != '' ) {\r\n?>\r\n <style type=\"text/css\">\r\n body.login div#login h1 a {\r\n background-image: url(<?php echo $admin_logo_image['url']?>);\r\n }\r\n </style>\r\n<?php } }", "function custom_login_logo() {\n\techo '<style type=\"text/css\">\n\th1 a { background-image: url('.get_bloginfo('template_directory').'/images/custom-login-logo.png) !important; }\n\t</style>';\n}", "function custom_login_logo() {\n\techo '<style type=\"text/css\">\n\th1 a { background-image: url('.get_bloginfo('template_directory').'/images/custom-login-logo.png) !important; }\n\t</style>';\n}", "function custom_header_inline_logo( $title, $inside, $wrap ) {\n\tif ( function_exists( 'has_custom_logo' ) && has_custom_logo() ) {\n\t\t$inside = sprintf( '<span class=\"screen-reader-text\">%s</span>%s', esc_html( get_bloginfo( 'name' ) ), get_custom_logo() );\n\t} else {\n\t\t// If no custom logo, wrap around the site name.\n\t\t$inside\t= sprintf( '<a href=\"%s\">%s</a>', trailingslashit( home_url() ), esc_html( get_bloginfo( 'name' ) ) );\n\t}\n\n\t// Build the title.\n\t$title = genesis_markup( array(\n\t\t'open' => sprintf( \"<{$wrap} %s>\", genesis_attr( 'site-title' ) ),\n\t\t'close' => \"</{$wrap}>\",\n\t\t'content' => $inside,\n\t\t'context' => 'site-title',\n\t\t'echo' => false,\n\t\t'params' => array(\n\t\t\t'wrap' => $wrap,\n\t\t),\n\t) );\n\n\treturn $title;\n}", "function konrad_login_logo() { ?>\n\t\t<style type=\"text/css\">\n\t\t\t#login h1 a, .login h1 a {\n\t\t\t\tbackground-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png);\n\t\t\t\twidth:243px;\n\t\t\t\theight:70px;\n\t\t\t\tbackground-size: 243px 70px;\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\t/*padding-bottom: 30px;*/\n\t\t\t}\n\t\t</style>\n\t<?php }", "function athen_top_header_logo(){\n get_template_part('partials/site-header/top-header/top-header-logo');\n}" ]
[ "0.7042311", "0.70288974", "0.7006704", "0.70014304", "0.689733", "0.6894708", "0.6861725", "0.68311125", "0.6816205", "0.6792968", "0.6787921", "0.67817324", "0.6774807", "0.67696327", "0.67433816", "0.6681306", "0.6660187", "0.66479707", "0.66392374", "0.6620145", "0.6582657", "0.6561439", "0.6559915", "0.6551565", "0.6548043", "0.65447927", "0.65299076", "0.6519257", "0.65125674", "0.6479571", "0.6475046", "0.6474747", "0.64731866", "0.6464995", "0.64597297", "0.644443", "0.64360225", "0.63997513", "0.6386694", "0.63600016", "0.6347726", "0.63213897", "0.6301645", "0.62968296", "0.62922806", "0.6282932", "0.6273877", "0.6239167", "0.62261367", "0.6216395", "0.6188672", "0.6184685", "0.61798364", "0.61791307", "0.6172971", "0.6169008", "0.61528873", "0.61460173", "0.6130644", "0.612149", "0.61167115", "0.6107852", "0.6099475", "0.608759", "0.6076138", "0.606759", "0.6066757", "0.6066102", "0.6056389", "0.6055923", "0.6052991", "0.6035669", "0.60350114", "0.60323286", "0.60293674", "0.6021767", "0.60202193", "0.60151845", "0.6009498", "0.6009091", "0.60075915", "0.59953594", "0.5992203", "0.5991344", "0.5985266", "0.5980186", "0.59769064", "0.59668434", "0.595852", "0.59417725", "0.59289604", "0.592851", "0.59268403", "0.59185654", "0.5912413", "0.5904117", "0.5904117", "0.5900676", "0.5896442", "0.5893202" ]
0.8985393
0
woocommerce_pip_print_company_name function. Output company name if needed
Функция woocommerce_pip_print_company_name. Выводить название компании при необходимости
function woocommerce_pip_print_company_name() { if ( get_option( 'woocommerce_pip_company_name' ) != '' ) { return get_option( 'woocommerce_pip_company_name' ) . '<br />'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_print_company_extra() {\n\n\tif ( get_option( 'woocommerce_pip_company_extra' ) != '' ) {\n\t\t return nl2br( stripslashes( get_option( 'woocommerce_pip_company_extra' ) ) );\n\t }\n}", "public function company_name()\n\t{\n\t\treturn $this->customer->company_name;\n\t}", "public function getCompanyName()\n {\n return $this->scopeConfig->getValue(\n self::XML_PATH_THE_COMPANY_NAME,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\r\n\r\n\t{\r\n\r\n\t\treturn $this->companyName;\r\n\r\n \t}", "public function getCompanyName() {\r\n return $this->_company_name;\r\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompany(): string\n {\n return $this->company;\n }", "public function getCompanyName() {\n return $this->companyName;\n }", "public function getCompanyName()\n {\n if (array_key_exists(\"companyName\", $this->_propDict)) {\n return $this->_propDict[\"companyName\"];\n } else {\n return null;\n }\n }", "public function getCompanyName() \n {\n return $this->CompanyName;\n }", "public function creamyHeaderName() {\n\t\t$customName = $this->db->getSettingValueForKey(CRM_SETTING_COMPANY_NAME);\n\t\treturn (!empty($customName) ? $customName : \"GOautodial Inc.\");\n\t}", "public function __toString()\n {\n return $this->getCompanyName();\n }", "public function getCompanyNameIdentifier();", "public function getCompanyName(): ?string\n {\n return $this->companyName;\n }", "public function getCompanyName(): ?string\n {\n return $this->companyName;\n }", "public function getCompanyName(): ?string\n {\n return $this->companyName;\n }", "public function getShippingCompanyName()\n {\n return $this->shipping_company->name;\n }", "public function getCompany(){\n return \"\";\n }", "public function getCompany()\n {\n $value = $this->get(self::COMPANY);\n return $value === null ? (string)$value : $value;\n }", "function svbk_rcp_profile_company_fields() {\n\t?>\n\t\n\t</fieldset>\n\t<fieldset id=\"billing-info\">\n\t\t<legend><?php esc_html_e( 'Billing Info', 'svbk-rcp-company-details' ); ?></legend>\n\t\t<?php svbk_rcp_print_company_fields();\n}", "public function getName()\n {\n return 'form_confirm_company';\n }", "public function getCompany() {}", "public function getCompany()\n\t{\n\t\treturn $this->fields->get('COMPANY');\n\t}", "public function getCompanyName()\n { \n $companies = $this->getCompany(); \n\n $result = [];\n foreach($companies as $company){\n $result[$company->id] = $company->name; \n } \n return $result;\n }", "public function getName()\n {\n return $this->company->getRuc().'-'.$this->getXmlId();\n }", "abstract public function getCompany() : String;", "function _clientx_offers_theme_company($company) {\n $field = array(\n 'label' => t('Company/Agency'),\n 'items' => array(),\n 'classes_array' => array(\n 'field',\n 'field-name-field-companys-and-agencies',\n 'field-type-entityreference',\n 'field-label-inline',\n 'clearfix',\n ),\n 'classes' => 'field field-name-field-companys-and-agencies field-type-entityreference field-label-inline clearfix',\n 'theme_hook_original' => 'field',\n 'label_hidden' => FALSE,\n 'attributes' => '',\n 'title_attributes' => '',\n 'content_attributes' => '',\n 'item_attributes' => array('0' => ''),\n );\n\n if (isset($company['url'])) {\n // Display as link to Company/Agency node.\n $field['items'][0] = array(\n '#type' => 'link',\n '#title' => $company['title'],\n '#href' => $company['url'],\n );\n }\n else {\n // Display as a Company ID.\n $field['items'][0] = array(\n '#markup' => $company['title'],\n );\n }\n\n return array(\n '#theme' => 'clientx_company_name',\n '#field' => $field,\n );\n}", "public function getDisplayNameAttribute()\n {\n //check to see if we have a company name\n if($company = $this->billing->company)\n return $company;\n\n\n $name = $this->billing->firstName;\n\n //if we have a last name, then also include that\n if($this->billing->lastName)\n $name .= ' '.$this->billing->lastName;\n\n return $name;\n }", "abstract public function getECommerceName();", "public function getCompany();", "public function getCorporateName() {\r\n return $this->corporateName;\r\n }", "function company_details() {\n if (!$this->request->isAsyncCall()) {\n $this->httpError(HTTP_ERR_BAD_REQUEST);\n } // if\n \n $client_id = $this->request->get('company_id');\n $client_company = Companies::findById($client_id);\n if (!instance_of($client_company, 'Company')) {\n $this->httpError(HTTP_ERR_NOT_FOUND,' ');\n } // if\n \n $company_address = CompanyConfigOptions::getValue('office_address', $client_company);\n echo $company_address;\n die();\n }", "public function get_product_name()\n {\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n if (array_key_exists(\"company\", $this->_propDict)) {\n return $this->_propDict[\"company\"];\n } else {\n return null;\n }\n }", "public function getCompany($product)\n {\n $company=$product->companies()->get()->toArray();\n \n return $company[0]['company_name'];\n }", "static function getCompanyNameForUser($user)\r\n\t{\r\n\t\t$companyName = null;\r\n\t\t\r\n\t\tif ( NULL !== $user && $user->isLoaded() )\r\n\t\t{\r\n\t\t\t$companyAddress = static::getCompanyAddress($user);\r\n\r\n\t\t\t$companyName = $companyAddress->company_name;\r\n\t\t}\r\n\r\n\t\treturn $companyName;\r\n\t}", "public function getDisplayName() {\n\t\t$displayName = \"{$this->first_name} {$this->last_name}\";\n\n\t\tif ($this->company_name !== null && $this->company_name !== '') {\n\t\t\t$displayName .= \" ({$this->company_name})\";\n\t\t}\n\n\t\treturn $displayName;\n\t}", "function getCompany()\n\t{\n\t\treturn $this->company;\n\t}", "public function getCompany() {\n\t\treturn $this->company;\n\t}", "function woocommerce_pip_print_logo() {\n\n\tif ( get_option( 'woocommerce_pip_logo' ) != '' ) {\n\t\treturn '<img src=\"' . get_option( 'woocommerce_pip_logo' ) . '\" /><br />';\n\t}\n}", "function svbk_rcp_print_company_fields($user_id = null) {\n\n\t$fields = svbk_rcp_company_fields();\n\n\tforeach ( $fields as $field_name => $field_label ) {\n\t\t$field_value = get_user_meta( get_current_user_id(), $field_name, true ); ?>\n\t\t\n\t\t\t<?php do_action('svbk_rcp_company_field_before', $field_name, $field_value, $field_label); ?>\n\t\t\t <p>\n\t\t\t\t<label for=\"rcp_<?php echo esc_attr( $field_name ); ?>\"><?php echo esc_attr( $field_label ); ?></label>\n\t\t\t\t<?php \n\t\t\t\tif ( ( 'billing_country' === $field_name ) && ( $countries = apply_filters( 'svbk_rcp_company_details_countries', array() ) ) ): ?>\t\t\t\n\t\t\t\t<select name=\"rcp_<?php echo esc_attr( $field_name ); ?>\" id=\"rcp_<?php echo esc_attr( $field_name ); ?>\">\n\t\t\t\t\t<option value=\"\" <?php selected( '', $field_value ) ?>><?php echo esc_html__( '- Select -', 'svbk-rcp-company-details' ); ?></option>\n\t\t\t\t\t<?php foreach( $countries as $country ) : ?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $country ); ?>\" <?php selected( $country, $field_value ) ?>><?php echo esc_html( $country ) ?></option>\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</select>\n\t\t\t\t<?php else: ?>\n\t\t\t\t<input name=\"rcp_<?php echo esc_attr( $field_name ); ?>\" id=\"rcp_<?php echo esc_attr( $field_name ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $field_value ); ?>\"/>\n\t\t\t\t<?php endif; ?>\n\t\t\t</p>\n\t\t\t<?php do_action('svbk_rcp_company_field_after', $field_name, $field_value, $field_label); ?>\n\t\t\t\t\n\t<?php }\n}", "public function getCompanyName($id)\n\t{\n\t\t$companyName = Ticker::findOrFail($id)->ticker_full_name;\n\t\treturn $companyName;\n\t}", "public function getFieldCompany()\n {\n return $this->fieldCompany;\n }", "private function getOwnerLabel() {\n\t\t$owner = $this->getOwner();\n\n\t\treturn ($owner->hasCompany() ? $owner->getCompany() : $owner->getName());\n\t}", "public function getName()\n {\n return Craft::t('Customer Referral Program');\n }", "function get_company($conn){\r\n $output=\"\";\r\n $who_email = $_SESSION[\"username\"];\r\n $get_cn = \"SELECT so_companyname FROM product_info WHERE who_email = '$who_email'\";\r\n $r_cn = mysqli_query($conn,$get_cn);\r\n if (mysqli_num_rows($r_cn) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($r_cn)) {\r\n $output .= \"<option value=\".$row['so_companyname'].\">\".$row['so_companyname'].\"</option>\";\r\n \r\n }\r\n return $output;\r\n }\r\n }", "function list_active_companies() {\n\tglobal $wpdb;\n\n\t$companies = $wpdb->get_results('SELECT DISTINCT company_id FROM wp_Company_answer');\n\t$test = '';\n\n\t$test .= '<ul>';\n foreach ( $companies as $single ) {\n $id = $single->company_id;\n // Check if the user is actually a company\n $user = get_userdata( $id );\n $user_roles = $user->roles;\n if ( in_array( 'company', $user_roles, true ) ) {\n $company_name = $wpdb->get_var(\"SELECT user_nicename FROM wp_users INNER JOIN wp_usermeta WHERE ID = $single->company_id\");\n $test .= '<li><a href=\"#\" onclick=\"return giveCompanyCookie(' . $id . ')\"> ' . $company_name . '</a></li>';\n $test .= \"\\r\\n\";\n }\n\n }\n\t$test .= '</ul>';\n\techo $test;\n\tdie();\n}", "function corporate_zing_customize_partial_blogname() {\n\tbloginfo( 'name' );\n}", "public function get_name() {\n if(get_config(constants::M_COMPONENT,'customname')){\n return get_config(constants::M_COMPONENT,'customname');\n }else {\n return get_string('cloudpoodll', constants::M_COMPONENT);\n }\n }", "public function getCompanyNumber()\n {\n return $this->companyNumber;\n }", "public function getCompanyNumber()\n {\n return $this->companyNumber;\n }", "public function get_plugin_name() {\n\t\treturn __( 'WooCommerce Authorize.net CIM Gateway', self::TEXT_DOMAIN );\n\t}", "public function setCompanyName($company_name) {\r\n if (isset($company_name)) {\r\n $this->_company_name = htmlspecialchars($company_name, ENT_COMPAT | ENT_HTML5, 'UTF-8');\r\n } else {\r\n $this->_company_name = '';\r\n }\r\n }", "public function getComposerName()\n {\n return $this->getOptionValue(self::COMPOSER_NAME);\n }", "protected function get_checkout_name() {\n\n\t\treturn file_get_contents( 'name.txt' );\n\t}", "function rcw_cleanproductname()\r\n{\r\n}", "public function getName()\n\t{\n\t\tif( isset( $this->values['order.base.service.name'] ) ) {\n\t\t\treturn (string) $this->values['order.base.service.name'];\n\t\t}\n\n\t\treturn '';\n\t}", "public function getInvCompany()\n {\n return $this->inv_company;\n }", "public function getCompany()\n {\n if (is_null($this->company)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_COMPANY);\n if (is_null($data)) {\n return null;\n }\n $this->company = (string) $data;\n }\n\n return $this->company;\n }", "public function get_name() {\n\t\treturn __( 'boutique-products', 'boutique' );\n\t}", "function company_name()\n{\n$options = get_option('company_details');\necho \"<input id='company_name' name='company_details[company_name]' size='40' type='text' value='{$options['company_name']}' />\";\n}", "public function getBizProdName()\n {\n return $this->bizProdName;\n }", "public function getProductname(): string\n {\n return $this->productname;\n }", "public function getAuthorcompany() {}", "public function get_plugin_name() {\n\t\treturn __( 'WooCommerce Elavon', self::TEXT_DOMAIN );\n\t}", "private function _formatCompanyName(&$name)\n {\n $name = $this->_baseFormat(preg_replace('/[^A-zÀ-ÿ0-9&. ]/', '', $name));\n }", "public function getCobrandName()\n {\n return $this->cobrandName;\n }", "function eq_customize_partial_blogname()\n{\n\tbloginfo('name');\n}", "public function getDisplayName() {}", "public function get_shop_name() {\n\t\t$default = get_bloginfo( 'name' );\n\t\treturn $this->get_settings_text( 'shop_name', $default, false );\n\t}", "function woocommerce_get_formatted_product_name($product)\n {\n }", "function getDisplayName() {\n\t\treturn __('plugins.themes.OsloMetParent.name');\n\t}", "public function get_company_name($cmid){\n\t\t$query = $this->db->query(\"SELECT name AS cm_company\n\t\t\t\tFROM company\n\t\t\t\tWHERE id = '$cmid'\");\n\t\treturn $query->result();\n\t}", "public function Company() {\n return $this->_makeGetRequest('Company');\n }", "public function getCurrentCompany() { return $this->_company; }", "public function getCompanypapernumber()\n\t{\n\t\treturn $this->companypapernumber;\n\t}", "public function getCompanypapernumber()\n\t{\n\t\treturn $this->companypapernumber;\n\t}", "public function get_name() {\n\t\treturn esc_html__( 'Distribution', 'jasperfm' );\n\t}", "function calc_battle_customize_partial_blogname() {\n\tbloginfo( 'name' );\n}", "function custom_product_title_name( $cart_item_name, $cart_item, $cart_item_key ){\r\n $product = $cart_item['data'];\r\n $product_permalink = $product->is_visible() ? $product->get_permalink( $cart_item ) : '';\r\n\r\n // The parent product name and data\r\n if( isset( $cart_item['grouped_product'] ) ){\r\n $group_product = $cart_item['grouped_product'];\r\n $group_prod_link = $group_product['link'];\r\n\r\n if ( ! $group_prod_link )\r\n return $group_product['name'] . ' > ' . $product->get_name();\r\n else\r\n return sprintf(\r\n '<a href=\"%s\">%s</a><br>%s',\r\n esc_url( $group_prod_link ),\r\n $group_product['name'],\r\n $product->get_name(),\r\n );\r\n }\r\n else\r\n return $cart_item_name;\r\n}", "function getCompanyName($entrpID)\n{\n\t$companyName \t= 'Not Specified';\n\t//SELECT company_profiles.company_name FROM entrp_company_members LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid WHERE entrp_company_members.clientid=1\n\t$qry = \"SELECT company_profiles.company_name \n\t\t\t FROM entrp_company_members \n\t\t\t LEFT JOIN company_profiles ON company_profiles.id=entrp_company_members.companyid \n\t\t\t WHERE entrp_company_members.clientid=\".$entrpID.\"\";\n $res=getData($qry);\n $count_res=mysqli_num_rows($res);\n if($count_res > 0)\n {\n while($row = mysqli_fetch_array($res))\n {\n \t$companyName \t= $row['company_name'];\n\t\t}\n } \n\treturn $companyName;\n}", "public function getCompanyKey()\n {\n return $this->companyKey;\n }", "public function custom_author_name() {\n\t\treturn $this->meta( 'wprm_author_name', '' );\n\t}", "function px_head_title()\n{\n\t$site_name = get_bloginfo( 'name' );\n\t$site_description = get_field( 'site_description', 'options');\n\n\t$output = $site_name;\n\n\tif( is_front_page() ) :\n\t\t$output .= ' - ' . $site_description;\n\n\telse :\n\t\t$page_title = get_the_title();\n\t\t$output = $page_title . ' - ' . $output;\n\n\tendif;\t\n\n\treturn $output;\n}", "protected function getName() {\n\t\treturn method_exists( $this->product, 'get_name' ) ? $this->product->get_name() : get_the_title();\n\t}", "public function getCLineCompany()\n {\n return $this->cLineCompany;\n }", "public function getProdName()\n\t\t{\n\t\t\treturn $_prodName;\t\n\t\t}", "function political_customize_partial_blogname() {\n bloginfo( 'name' );\n}", "public function getProdName()\n {\n return $this->prod_name;\n }", "function starter_customize_partial_blogname() {\n\tbloginfo( 'name' );\n}", "function svbk_rcp_company_fields() {\n\treturn array(\n\t\t'tax_id' => __( 'Your Tax ID', 'svbk-rcp-company-details' ),\n\t\t'company_name' => __( 'Company Name', 'svbk-rcp-company-details' ),\n\t\t'tax_code' => __( 'Tax Code', 'svbk-rcp-company-details' ),\n\t\t'company_phone' => __( 'Phone', 'svbk-rcp-company-details' ),\n\t\t'billing_address' => __( 'Address', 'svbk-rcp-company-details' ),\n\t\t'biling_city' => __( 'City', 'svbk-rcp-company-details' ),\n\t\t'billing_state' => __( 'State/Province', 'svbk-rcp-company-details' ),\n\t\t'billing_postal_code' => __( 'Postal Code', 'svbk-rcp-company-details' ),\n\t\t'billing_country' => __( 'Country', 'svbk-rcp-company-details' ),\n\t);\n}", "public function getBillingCompany()\n {\n return $this->object->getBillingCompany();\n }" ]
[ "0.72828436", "0.7114076", "0.7111271", "0.7097665", "0.7097665", "0.7097665", "0.7074218", "0.7026494", "0.6984426", "0.6984426", "0.6907229", "0.687638", "0.6870956", "0.6822782", "0.68014705", "0.66316885", "0.6406278", "0.6323963", "0.6323963", "0.6323963", "0.629132", "0.6204204", "0.616321", "0.607179", "0.6067256", "0.6055376", "0.601551", "0.5976286", "0.5959409", "0.5953531", "0.59424406", "0.5903334", "0.5881471", "0.585988", "0.5853889", "0.5845782", "0.5826937", "0.58250016", "0.58250016", "0.58250016", "0.58250016", "0.5813688", "0.5772003", "0.57442933", "0.574044", "0.5716666", "0.57028276", "0.5699857", "0.56856316", "0.5667201", "0.56548756", "0.56543934", "0.5623692", "0.5620041", "0.55995655", "0.559714", "0.5587408", "0.5578652", "0.5578652", "0.5576492", "0.5571096", "0.5555706", "0.5548118", "0.5545304", "0.5534415", "0.55344015", "0.55302083", "0.5522262", "0.55141205", "0.5504734", "0.549215", "0.5482852", "0.5467905", "0.5464542", "0.54511666", "0.54493403", "0.54465127", "0.5443869", "0.54305637", "0.5422841", "0.5414063", "0.54045033", "0.54008126", "0.54002565", "0.54002565", "0.5398265", "0.53976375", "0.5397153", "0.5396851", "0.53913623", "0.53904355", "0.53841805", "0.5379229", "0.53778076", "0.53744245", "0.5372873", "0.53604835", "0.5356768", "0.53565454", "0.53560793" ]
0.9079394
0
woocommerce_pip_print_company_extra function. Output company extra if needed
Функция woocommerce_pip_print_company_extra. Вывод дополнительной информации о компании, если это необходимо
function woocommerce_pip_print_company_extra() { if ( get_option( 'woocommerce_pip_company_extra' ) != '' ) { return nl2br( stripslashes( get_option( 'woocommerce_pip_company_extra' ) ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_print_company_name() {\n\n\tif ( get_option( 'woocommerce_pip_company_name' ) != '' ) {\n\t\treturn get_option( 'woocommerce_pip_company_name' ) . '<br />';\n\t}\n}", "public function export_company_additional() {\n\n $additional_fields = $this->get_company_fields_by_section( 'additional' );\n\n $this->generate_crm_html_field( $additional_fields );\n }", "function svbk_rcp_profile_company_fields() {\n\t?>\n\t\n\t</fieldset>\n\t<fieldset id=\"billing-info\">\n\t\t<legend><?php esc_html_e( 'Billing Info', 'svbk-rcp-company-details' ); ?></legend>\n\t\t<?php svbk_rcp_print_company_fields();\n}", "public function export_company_other() {\n\n $other_fields = $this->get_company_fields_by_section( 'other' );\n\n $this->generate_crm_html_field( $other_fields );\n }", "function bizz_return_car_extras( $car_id='', $coupon_post='', $opt_s='') {\r\r\n\r\r\n\t// read cookie\r\r\n\t$carhire_cookie = array();\r\r\n\t$carhire_cookie = json_decode(stripslashes($_COOKIE['carhire']));\r\r\n\r\r\n\t// list extras\r\r\n\t$extras = get_terms( 'bizz_cars_extra', apply_filters( 'bizz_cars_extra_args', array( 'hide_empty' => 0 ) ) );\r\r\n\t$count = count( $extras );\r\r\n\t$car_extras[\"car_extras\"] = array();\r\r\n\t$custom = get_post_custom($car_id); #car id\r\r\n\t$car_extras = isset($custom[\"bizzthemes_car_extras\"]) ? $custom[\"bizzthemes_car_extras\"] : '';\r\r\n\t$car_extras = ( is_array($car_extras) ) ? $car_extras : array();\r\r\n\t\r\r\n\tif ($count > 0) {\r\r\n\t\r\r\n\t\tforeach ($extras as $extra) {\r\r\n\t\t\tif ( !in_array($extra->slug, $car_extras) ) #1476 for porsche\r\r\n\t\t\t\tcontinue;\r\r\n\r\r\n\t\t\t// thumbnail\r\r\n\t\t\t$extra_img = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_image');\r\r\n\t\t\t$extra_img = ( $extra_img ) ? $extra_img : get_template_directory_uri() . '/lib_theme/images/no-img.jpg';\r\r\n\t\t\t\r\r\n\t\t\t// count\r\r\n\t\t\t$extra_count = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_count');\r\r\n\t\t\t$extra_count = ( $extra_count ) ? $extra_count : 1;\r\r\n\t\t\t\r\r\n\t\t\t// required\r\r\n\t\t\t$extra_required = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_required');\r\r\n\t\t\t$extra_required = ( $extra_required ) ? $extra_required : 0;\r\r\n\t\t\t\r\r\n\t\t\t// field\r\r\n\t\t\t$extra_field = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_field');\r\r\n\t\t\t$extra_field = ( $extra_field ) ? $extra_field : 0;\r\r\n\t\t\t\r\r\n\t\t\t// field placeholder\r\r\n\t\t\t$extra_field_placeholder = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_field_placeholder');\r\r\n\t\t\t$extra_field_placeholder = ( $extra_field_placeholder ) ? $extra_field_placeholder : '';\r\r\n\t\t\t\r\r\n\t\t\t// bind to pickup location\r\r\n\t\t\t$extra_location = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_location');\r\r\n\t\t\t$extra_location = ( $extra_location ) ? $extra_location : array();\r\r\n\t\t\t$extra_location = ( is_array( $extra_location ) ) ? $extra_location : array ( $extra_location );\r\r\n\t\t\t\r\r\n\t\t\t// bind to return location\r\r\n\t\t\t$extra_location_return = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_location_return');\r\r\n\t\t\t$extra_location_return = ( $extra_location_return ) ? $extra_location_return : array();\r\r\n\t\t\t$extra_location_return = ( is_array( $extra_location_return ) ) ? $extra_location_return : array ( $extra_location_return );\r\r\n\t\t\t\r\r\n\t\t\t// bind to different location\r\r\n\t\t\t$extra_location_diff = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_location_diff');\r\r\n\t\t\t$extra_location_diff = ( $extra_location_diff ) ? $extra_location_diff : 0;\r\r\n\t\t\t\r\r\n\t\t\t// range\r\r\n\t\t\t$range = get_option('taxonomy_'.$extra->term_id.'_bizz_extra_price_s');\r\r\n\t\t\t$day_hour = ( $opt_s['pay_pricerange'] == 'perhour' ) ? __('per hour', 'bizzthemes') : __('per day', 'bizzthemes');\r\r\n\t\t\t$extra_range = ( $range == 'rental' ) ? __('per rental', 'bizzthemes') : $day_hour;\r\r\n\t\t\t$extra_price = float_to_currencystr(bizz_extra_price( $extra->term_id, $carhire_cookie, true, '', $opt_s, true ), true, $opt_s) . ' ' . $extra_range;\r\r\n\t\t\t$extra_price_disc = float_to_currencystr(bizz_extra_price( $extra->term_id, $carhire_cookie, true, $coupon_post, $opt_s, true ), true, $opt_s) . ' ' . $extra_range;\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t// skip if extra bound to pickup location and pickup location is different and should be same\r\r\n\t\t\tif ( count( $extra_location ) >= 1 && count( array_intersect( array( $carhire_cookie->location_of_pickup, $carhire_cookie->location_of_pickup_slug ), $extra_location ) ) == 0 ) {\r\r\n\t\t\t\tcontinue;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t// skip if extra bound to return location and return location is different and should be same\r\r\n\t\t\tif ( count( $extra_location_return ) >= 1 && count( array_intersect( array( $carhire_cookie->location_of_return, $carhire_cookie->location_of_return_slug ), $extra_location_return ) ) == 0 ) {\r\r\n\t\t\t\tcontinue;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t// skip if extra bound to location and location is same, but should be different\r\r\n\t\t\tif ( $extra_location_diff && $carhire_cookie->location_of_pickup == $carhire_cookie->location_of_return ) {\r\r\n\t\t\t\tcontinue;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$car_extras[\"car_extras\"][] = array(\r\r\n\t\t\t\t'id' => $extra->term_id,\r\r\n\t\t\t\t'slug' => $extra->slug,\r\r\n\t\t\t\t'name' => $extra->name,\r\r\n\t\t\t\t'description' => do_shortcode($extra->description),\r\r\n\t\t\t\t'cost' => float_to_currencystr(bizz_extra_price( $extra->term_id, $carhire_cookie, true, '', $opt_s ), true, $opt_s),\r\r\n\t\t\t\t'cost_disc' => float_to_currencystr(bizz_extra_price( $extra->term_id, $carhire_cookie, true, $coupon_post, $opt_s ), true, $opt_s),\r\r\n\t\t\t\t'cost_val' => float_to_currencystr(bizz_extra_price( $extra->term_id, $carhire_cookie, false, $coupon_post, $opt_s ), true, $opt_s),\r\r\n\t\t\t\t'cost_val_disc' => float_to_currencystr(bizz_extra_price( $extra->term_id, $carhire_cookie, false, '', $opt_s ), true, $opt_s),\r\r\n\t\t\t\t'cost_int' => $extra_price,\r\r\n\t\t\t\t'cost_int_disc' => $extra_price_disc,\r\r\n\t\t\t\t'cost_n' => bizz_extra_price( $extra->term_id, $carhire_cookie, false, $coupon_post, $opt_s ),\r\r\n\t\t\t\t'picture_src' => $extra_img,\r\r\n\t\t\t\t'currency' => get_bizz_currency($opt_s['pay_currency']),\r\r\n\t\t\t\t'count' => $extra_count,\r\r\n\t\t\t\t'required' => $extra_required,\r\r\n\t\t\t\t'availability' => 1,\r\r\n\t\t\t\t'field' => $extra_field,\r\r\n\t\t\t\t'field_placeholder' => $extra_field_placeholder,\r\r\n\t\t\t);\r\r\n\t\t\t\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\tif ( isset( $car_extras[\"car_extras\"] ) && ! class_exists( 'TheTaxonomySort' ) ) {\r\r\n\t\t\t$car_extras[\"car_extras\"] = apply_filters( 'bizz_extras_sort', bizz_list_sort( $car_extras[\"car_extras\"], 'required', 'asc' ), $car_extras[\"car_extras\"] );\r\r\n\t\t}\r\r\n\r\r\n\t}\r\r\n\r\r\n\treturn json_encode( $car_extras );\r\r\n}", "public function export_company_social() {\n\n $social_fields = $this->get_company_fields_by_section( 'social' );\n\n $this->generate_crm_html_field( $social_fields );\n }", "function svbk_rcp_add_company_fields() {\n\t?>\n\t\n\t<section id=\"billing\">\n\t\t<header class=\"section-header\">\n\t\t\t<h2><?php esc_html_e( 'Billing Info', 'svbk-rcp-company-details' ) ?></h2>\t\t\n\t\t\t<p class=\"subtitle\"><?php esc_html_e( 'Fields with * are required', 'svbk-rcp-company-details' ); ?></p>\n\t\t</header>\n\t\t\n\t\t<fieldset>\n\t\t<?php svbk_rcp_print_company_fields(); ?>\n\t\t</fieldset>\n\n\t</section>\t\n\t<?php\n}", "function _clientx_offers_theme_company($company) {\n $field = array(\n 'label' => t('Company/Agency'),\n 'items' => array(),\n 'classes_array' => array(\n 'field',\n 'field-name-field-companys-and-agencies',\n 'field-type-entityreference',\n 'field-label-inline',\n 'clearfix',\n ),\n 'classes' => 'field field-name-field-companys-and-agencies field-type-entityreference field-label-inline clearfix',\n 'theme_hook_original' => 'field',\n 'label_hidden' => FALSE,\n 'attributes' => '',\n 'title_attributes' => '',\n 'content_attributes' => '',\n 'item_attributes' => array('0' => ''),\n );\n\n if (isset($company['url'])) {\n // Display as link to Company/Agency node.\n $field['items'][0] = array(\n '#type' => 'link',\n '#title' => $company['title'],\n '#href' => $company['url'],\n );\n }\n else {\n // Display as a Company ID.\n $field['items'][0] = array(\n '#markup' => $company['title'],\n );\n }\n\n return array(\n '#theme' => 'clientx_company_name',\n '#field' => $field,\n );\n}", "function svbk_rcp_print_company_fields($user_id = null) {\n\n\t$fields = svbk_rcp_company_fields();\n\n\tforeach ( $fields as $field_name => $field_label ) {\n\t\t$field_value = get_user_meta( get_current_user_id(), $field_name, true ); ?>\n\t\t\n\t\t\t<?php do_action('svbk_rcp_company_field_before', $field_name, $field_value, $field_label); ?>\n\t\t\t <p>\n\t\t\t\t<label for=\"rcp_<?php echo esc_attr( $field_name ); ?>\"><?php echo esc_attr( $field_label ); ?></label>\n\t\t\t\t<?php \n\t\t\t\tif ( ( 'billing_country' === $field_name ) && ( $countries = apply_filters( 'svbk_rcp_company_details_countries', array() ) ) ): ?>\t\t\t\n\t\t\t\t<select name=\"rcp_<?php echo esc_attr( $field_name ); ?>\" id=\"rcp_<?php echo esc_attr( $field_name ); ?>\">\n\t\t\t\t\t<option value=\"\" <?php selected( '', $field_value ) ?>><?php echo esc_html__( '- Select -', 'svbk-rcp-company-details' ); ?></option>\n\t\t\t\t\t<?php foreach( $countries as $country ) : ?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $country ); ?>\" <?php selected( $country, $field_value ) ?>><?php echo esc_html( $country ) ?></option>\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</select>\n\t\t\t\t<?php else: ?>\n\t\t\t\t<input name=\"rcp_<?php echo esc_attr( $field_name ); ?>\" id=\"rcp_<?php echo esc_attr( $field_name ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $field_value ); ?>\"/>\n\t\t\t\t<?php endif; ?>\n\t\t\t</p>\n\t\t\t<?php do_action('svbk_rcp_company_field_after', $field_name, $field_value, $field_label); ?>\n\t\t\t\t\n\t<?php }\n}", "function woocommerce_output_related_products()\n {\n }", "protected function Print_extra_html() {\n\t\t}", "public function getCompany(): string\n {\n return $this->company;\n }", "function woocommerce_pip_print_footer() {\n\n\tif ( get_option( 'woocommerce_pip_footer' ) != '' ) {\n\t\treturn nl2br( stripslashes( get_option( 'woocommerce_pip_footer' ) ) );\n\t}\n}", "public function outputHeadExtra()\n\t{\n\t\t$this->outputJavascriptCode($this->app->extra_javascript['head']);\n\t\t$this->outputCssCode($this->app->extra_css['head']);\n\n\t\techo $this->app->extra_html['head'];\n\n\t\t$this->app->plugins->run('system_theme_output_head_extra', $this);\n\t}", "function woocommerce_pip_print_logo() {\n\n\tif ( get_option( 'woocommerce_pip_logo' ) != '' ) {\n\t\treturn '<img src=\"' . get_option( 'woocommerce_pip_logo' ) . '\" /><br />';\n\t}\n}", "function wooc_extra_register_fields() {\n \n//Company NAME\necho \"<p class='form-row form-row-wide'>\";\necho \"<label for='reg_billing_company_field'>\";\n_e( 'Company name', 'woocommerce' );\necho \"<span class='required'>*</span>\";\necho \"</label>\";\n$field = ( ! empty( $_POST['billing_company'] ) ) ? esc_attr_e( $_POST['billing_company'] ) : \"\";\necho \"<input type='text' class='input-text' name='billing_company' id='reg_billing_company_field' value='{$field}' />\";\necho \"</p>\";\n\n//FIRST NAME\necho \"<p class='form-row form-row-wide'>\";\necho \"<label for='reg_billing_first_name'>\";\n_e( 'First name', 'woocommerce' );\necho \"<span class='required'>*</span>\";\necho \"</label>\";\n$field = ( ! empty( $_POST['billing_first_name'] ) ) ? esc_attr_e( $_POST['billing_first_name'] ) : \"\";\necho \"<input type='text' class='input-text' name='billing_first_name' id='reg_billing_first_name' value='{$field}' />\";\necho \"</p>\";\n\n// LAST NAME\necho \"<p class='form-row form-row-wide'>\";\necho \"<label for='reg_billing_last_name'>\";\n_e( 'Last name', 'woocommerce' );\necho \"<span class='required'>*</span>\";\necho \"</label>\";\n$field = ( ! empty( $_POST['billing_last_name'] ) ) ? esc_attr_e( $_POST['billing_last_name'] ) : \"\";\necho \"<input type='text' class='input-text' name='billing_last_name' id='reg_billing_last_name' value='{$field}' />\";\necho \"</p>\";\n\n//TELEPHONE\necho \"<p class='form-row form-row-wide'>\";\necho \"<label for='reg_billing_phone'>\";\n_e( 'Phone', 'woocommerce' );\necho \"</label>\";\n$field = esc_attr_e( $_POST['billing_phone'] );\necho \"<input type='text' class='input-text' name='billing_phone' id='reg_billing_phone' value='{$field}' />\";\necho \"</p>\";\n\n//Company Country\n$countries_obj = new WC_Countries();\n$countries = $countries_obj->__get('countries');\n\necho \"<p class='form-row form-row-wide'>\";\necho \"<label for='reg_billing_country'>\";\n_e( 'Country', 'woocommerce' );\necho \"<span class='required'>*</span>\";\necho \"</label>\";\necho \"<select class='country_select' name='billing_country' id='reg_billing_country'>\";\nforeach ($countries as $key => $value):\necho \"<option value='{$key}'>{$value}</option>\";\nendforeach;\necho \"</select>\";\necho \"</p>\";\n \n//BTW VAT NUMMER\n\n$field = esc_attr_e( $_POST['vat_number'] );\nwoocommerce_form_field( 'vat_number', array(\n 'type' => 'text',\n 'class' => array( 'form-row form-row-wide') ,\n\t 'required' => true,\n 'label' => __( 'BTW /VAT Nummer' ),\n// 'placeholder' => __( 'BTW Nummer' ),\n ), $field);\n\n\n}", "function additionalDetailsQuote($fields) {\n\tstatic $mod_strings;\n\tif(empty($mod_strings)) {\n\t\tglobal $current_language;\n\t\t$mod_strings = return_module_language($current_language, 'Quotes');\n\t}\n\t\t\n\t$overlib_string = '';\n\t\n\tif(!empty($fields['PURCHASE_ORDER_NUM'])) $overlib_string .= '<b>'. $mod_strings['LBL_PURCHASE_ORDER_NUM'] . '</b> ' . $fields['PURCHASE_ORDER_NUM'] . '<br>';\n\tif(!empty($fields['ORIGINAL_PO_DATE'])) $overlib_string .= '<b>'. $mod_strings['LBL_ORIGINAL_PO_DATE'] . '</b> ' . $fields['ORIGINAL_PO_DATE'] . '<br>';\n\t\n\tif(!empty($fields['BILLING_ADDRESS_STREET']) || !empty($fields['BILLING_ADDRESS_CITY']) ||\n\t\t!empty($fields['BILLING_ADDRESS_STATE']) || !empty($fields['BILLING_ADDRESS_POSTALCODE']) ||\n\t\t!empty($fields['BILLING_ADDRESS_COUNTRY']))\n\t\t\t$overlib_string .= '<b>' . $mod_strings['LBL_BILLING_ADDRESS_STREET'] . '</b><br>';\n\tif(!empty($fields['BILLING_ADDRESS_STREET'])) $overlib_string .= $fields['BILLING_ADDRESS_STREET'] . '<br>';\n\tif(!empty($fields['BILLING_ADDRESS_CITY'])) $overlib_string .= $fields['BILLING_ADDRESS_CITY'] . ', ';\n\tif(!empty($fields['BILLING_ADDRESS_STATE'])) $overlib_string .= $fields['BILLING_ADDRESS_STATE'] . ' ';\n\tif(!empty($fields['BILLING_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['BILLING_ADDRESS_POSTALCODE'] . ' ';\n\tif(!empty($fields['BILLING_ADDRESS_COUNTRY'])) $overlib_string .= $fields['BILLING_ADDRESS_COUNTRY'] . '<br>';\n\tif(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) \n\t\t$overlib_string .= '<br>'; \n\t\n\tif(!empty($fields['SHIPPING_ADDRESS_STREET']) || !empty($fields['SHIPPING_ADDRESS_CITY']) ||\n\t\t!empty($fields['SHIPPING_ADDRESS_STATE']) || !empty($fields['SHIPPING_ADDRESS_POSTALCODE']) ||\n\t\t!empty($fields['SHIPPING_ADDRESS_COUNTRY']))\n\t\t\t$overlib_string .= '<b>' . $mod_strings['LBL_SHIPPING_ADDRESS_STREET'] . '</b><br>';\n\tif(!empty($fields['SHIPPING_ADDRESS_STREET'])) $overlib_string .= $fields['SHIPPING_ADDRESS_STREET'] . '<br>';\n\tif(!empty($fields['SHIPPING_ADDRESS_CITY'])) $overlib_string .= $fields['SHIPPING_ADDRESS_CITY'] . ', ';\n\tif(!empty($fields['SHIPPING_ADDRESS_STATE'])) $overlib_string .= $fields['SHIPPING_ADDRESS_STATE'] . ' ';\n\tif(!empty($fields['SHIPPING_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['SHIPPING_ADDRESS_POSTALCODE'] . ' ';\n\tif(!empty($fields['SHIPPING_ADDRESS_COUNTRY'])) $overlib_string .= $fields['SHIPPING_ADDRESS_COUNTRY'] . '<br>';\n\tif(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) \n\t\t$overlib_string .= '<br>'; \n\t\t\n\t$overlib_string .= '<table cellpadding=1 cellspacing=0 width=100%>';\n\tif(!empty($fields['SUBTOTAL'])) $overlib_string .= '<tr><td width=1%><b>'. $mod_strings['LBL_SUBTOTAL'] . '</b></td><td align=right>' . $fields['SUBTOTAL'] . '</td></tr>';\n if(!empty($fields['DISCOUNT'])) $overlib_string .= '<tr><td width=1%><b>'. $mod_strings['LBL_DISCOUNT_TOTAL'] . '</b></td><td align=right>' . $fields['DISCOUNT'] . '</td></tr>';\t\n if(!empty($fields['NEW_SUBTOTAL'])) $overlib_string .= '<tr><td width=1%><b>'. $mod_strings['LBL_NEW_SUBTOTAL'] . '</b></td><td align=right>' . $fields['NEW_SUBTOTAL'] . '</td></tr>'; \n if(!empty($fields['TAX'])) $overlib_string .= '<tr><td width=1%><b>'. $mod_strings['LBL_TAX'] . '</b></td><td align=right>' . $fields['TAX'] . '</td></tr>';\n\tif(!empty($fields['SHIPPING'])) $overlib_string .= '<tr><td width=1%><b>'. $mod_strings['LBL_SHIPPING'] . '</b></td><td align=right>' . $fields['SHIPPING'] . '</td></tr>';\n\tif(!empty($fields['TOTAL'])) $overlib_string .= '<tr><td width=1%><b>'. $mod_strings['LBL_TOTAL'] . '</b></td><td align=right>' . $fields['TOTAL'] . '</td></tr><br>';\n\t$overlib_string .= '</table>';\n\t\t\n\tif(!empty($fields['DESCRIPTION'])) {\n\t\t$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);\n\t\tif(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';\n\t}\t\n\n\treturn array('fieldToAddTo' => 'NAME', \n\t\t\t\t 'string' => $overlib_string, \n\t\t\t\t 'editLink' => \"index.php?action=EditView&module=Quotes&return_module=Quotes&record={$fields['ID']}\", \n\t\t\t\t 'viewLink' => \"index.php?action=DetailView&module=Quotes&return_module=Quotes&record={$fields['ID']}\");\n}", "function oxy_export_filter_export($export)\n{\n $theme_options = get_option(THEME_SHORT . '-options');\n\n global $oxy_theme;\n $export['final_setup'] = array(\n 'page_options' => array(\n 'page_for_posts' => get_option('page_for_posts'),\n 'page_on_front' => get_option('page_on_front'),\n ),\n 'options' => array(\n 'show_on_front' => get_option('show_on_front'),\n ),\n 'theme_mods' => array(\n 'background_color' => get_theme_mod('background_color'),\n 'background_image' => get_theme_mod('background_image')\n ),\n 'theme_options' => apply_filters('oxy-export-theme-options', $theme_options),\n );\n\n if (is_plugin_active('woocommerce/woocommerce.php')) {\n $woocommerce_option = array('shop', 'cart', 'checkout', 'myaccount');\n foreach ($woocommerce_option as $option) {\n $option = 'woocommerce_' . $option . '_page_id';\n if (isset($export['final_setup']['page_options'][$option])) {\n $export['final_setup']['page_options'][$option] = get_option($option);\n }\n }\n }\n\n return $export;\n}", "function company_details() {\n if (!$this->request->isAsyncCall()) {\n $this->httpError(HTTP_ERR_BAD_REQUEST);\n } // if\n \n $client_id = $this->request->get('company_id');\n $client_company = Companies::findById($client_id);\n if (!instance_of($client_company, 'Company')) {\n $this->httpError(HTTP_ERR_NOT_FOUND,' ');\n } // if\n \n $company_address = CompanyConfigOptions::getValue('office_address', $client_company);\n echo $company_address;\n die();\n }", "function cyon_woocommerce_output_related_products(){\n\twoocommerce_related_products( 4, 4 );\n}", "public function export_company_basic() {\n\n $basic_fields = $this->get_company_fields_by_section( 'basic' );\n\n $this->generate_crm_html_field( $basic_fields );\n }", "public function getExtraMeta(){\n\t\tprint $this->meta->getExtra();\n }", "public function getCompany() {}", "public function getAuthorcompany() {}", "public function getCompany(){\n return \"\";\n }", "function woocommerce_pip_client_window() {\n\tif ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\t\t$order_id = $_GET['post'];\n\t\t$order = new WC_Order( $order_id );\n\t\t$current_user = wp_get_current_user();\n\t\t$action = 'print_invoice';\n\t\t$client = true;\n\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'client-print-pip' ) || ! is_user_logged_in() || $order->user_id != $current_user->ID ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows (actually this one might not be needed, are the customers in the admin for this?)\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\tob_start();\n\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t$content .= ob_get_clean();\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "abstract public function get_the_company_gplus();", "public function export_contact_additional() {\n\n $additional_fields = $this->get_contact_fields_by_section( 'additional' );\n\n $this->generate_crm_html_field( $additional_fields );\n }", "function woocommerce_output_auth_footer()\n {\n }", "function woocommerce_output_related_products() {\n\t\twoocommerce_related_products( 3, 3 );\n\t}", "function woocommerce_product_additional_information_tab()\n {\n }", "function carawebs_additional_project_content() {\n\n $extra = get_field('extra_content');\n\n if( !empty($extra) ) {\n\n echo '<div class=\"extensive-content\">' . $extra . '</div>';\n\n }\n\n}", "function onExtra($name)\n\t{\n\t\t$output = NULL;\n\t\tif($name == \"footer\")\n\t\t{\n\t\t\t$pluginCdn = $this->yellow->config->get(\"tablesawPluginCdn\");\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$pluginCdn}tablesaw.stackonly.js\\\"></script>\\n\";\n\t\t}\n\t\treturn $output;\n\t}", "function svbk_rcp_company_fields() {\n\treturn array(\n\t\t'tax_id' => __( 'Your Tax ID', 'svbk-rcp-company-details' ),\n\t\t'company_name' => __( 'Company Name', 'svbk-rcp-company-details' ),\n\t\t'tax_code' => __( 'Tax Code', 'svbk-rcp-company-details' ),\n\t\t'company_phone' => __( 'Phone', 'svbk-rcp-company-details' ),\n\t\t'billing_address' => __( 'Address', 'svbk-rcp-company-details' ),\n\t\t'biling_city' => __( 'City', 'svbk-rcp-company-details' ),\n\t\t'billing_state' => __( 'State/Province', 'svbk-rcp-company-details' ),\n\t\t'billing_postal_code' => __( 'Postal Code', 'svbk-rcp-company-details' ),\n\t\t'billing_country' => __( 'Country', 'svbk-rcp-company-details' ),\n\t);\n}", "function admin_edit_company() {\n\t\t//\n\t}", "function add_book_author($arg1) {\n global $product;\n $author = $product->get_attribute('pa_autor');\n if($author) echo \"<p class=\\\"basista-loop-product__author\\\">$author</p>\";\n}", "function organics_woocommerce_output_related_products_args($args) {\n\t\t$ppp = $ccc = 0;\n\t\tif (organics_param_is_on(organics_get_custom_option('show_post_related'))) {\n\t\t\t$ccc_add = in_array(organics_get_custom_option('body_style'), array('fullwide', 'fullscreen')) ? 1 : 0;\n\t\t\t$ccc = organics_get_custom_option('post_related_columns');\n\t\t\t$ccc = $ccc > 0 ? $ccc : (organics_param_is_off(organics_get_custom_option('show_sidebar_main')) ? 3+$ccc_add : 2+$ccc_add);\n\t\t\t$ppp = organics_get_custom_option('post_related_count');\n\t\t\t$ppp = $ppp > 0 ? $ppp : $ccc;\n\t\t}\n\t\t$args['posts_per_page'] = $ppp;\n\t\t$args['columns'] = $ccc;\n\t\treturn $args;\n\t}", "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t$orders = explode( ',', $_GET['post'] );\n\t\t$action = $_GET['type'];\n\t\t$number_of_orders = count( $orders );\n\t\t$order_loop = 0;\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\t// Loop through all orders (bulk printing).\n\t\tforeach ( $orders as $order_id ) {\n\t\t\t$order_loop++;\n\t\t\t$order = new WC_Order( $order_id );\n\t\t\tob_start();\n\t\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t\t$content .= ob_get_clean();\n\t\t\tif ( $number_of_orders > 1 && $order_loop < $number_of_orders ) {\n\t\t\t\t$content .= '<p class=\"pagebreak\"></p>';\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "function fn_seo_get_company_data(&$company_id, &$lang_code, &$extra, &$fields, &$join, &$condition)\n{\n $fields[] = '?:seo_names.name as seo_name';\n $fields[] = '?:seo_names.path as seo_path';\n\n $join .= db_quote(\n \" LEFT JOIN ?:seo_names ON ?:seo_names.object_id = ?i ?p\",\n $company_id, fn_get_seo_join_condition('m', 'companies.company_id', $lang_code)\n );\n}", "public function renderExtra() {\n\t\t$options = [\n\t\t\t\"data-class\" => get_class($this),\n\t\t\t\"data-url\" => $this->createUrl()\n\t\t];\n\t\tprint CHtml::renderAttributes($options);\n\t}", "protected function showOptionalAdditionalInfo()\n {\n return;\n }", "public abstract function getAdditionalInfo();", "public function hookDisplayProductAdditionalInfo()\n {\n if (!$this->merchantIsValid()) {\n return '';\n }\n\n /** @var \\PrestaShop\\Module\\PrestashopCheckout\\FundingSource\\FundingSourceProvider $fundingSourceProvider */\n $fundingSourceProvider = $this->getService('ps_checkout.funding_source.provider');\n\n $count = 0;\n $paymentOptions = [];\n\n foreach ($fundingSourceProvider->getAll() as $fundingSource) {\n if ($count === 8) {\n break;\n }\n\n $count += $fundingSource->name === 'card'\n ? 3\n : 1;\n\n while ($count > 8) {\n array_pop($paymentOptions);\n --$count;\n }\n $paymentOptions[] = $fundingSource->name;\n }\n\n $width = 25;\n if ($count == 6) {\n $width = 33;\n }\n\n if ($count < 6) {\n $width = 20;\n }\n\n $this->context->smarty->assign([\n 'width' => $width,\n 'modulePath' => $this->getPathUri(),\n 'paymentOptions' => $paymentOptions,\n ]);\n\n return $this->display(__FILE__, 'views/templates/hook/displayProductAdditionalInfo.tpl');\n }", "public function __toString()\n {\n return $this->getCompanyName();\n }", "function getAdditionalPrintData(&$additional_print_data) {\n $additional_print_data['currencies'] = array();\n\n foreach(Currencies::find() as $currency) {\n $additional_print_data['currencies'][$currency->getId()] = $currency;\n } // foreach\n }", "function list_active_companies() {\n\tglobal $wpdb;\n\n\t$companies = $wpdb->get_results('SELECT DISTINCT company_id FROM wp_Company_answer');\n\t$test = '';\n\n\t$test .= '<ul>';\n foreach ( $companies as $single ) {\n $id = $single->company_id;\n // Check if the user is actually a company\n $user = get_userdata( $id );\n $user_roles = $user->roles;\n if ( in_array( 'company', $user_roles, true ) ) {\n $company_name = $wpdb->get_var(\"SELECT user_nicename FROM wp_users INNER JOIN wp_usermeta WHERE ID = $single->company_id\");\n $test .= '<li><a href=\"#\" onclick=\"return giveCompanyCookie(' . $id . ')\"> ' . $company_name . '</a></li>';\n $test .= \"\\r\\n\";\n }\n\n }\n\t$test .= '</ul>';\n\techo $test;\n\tdie();\n}", "function plumbing_parts_woocommerce_output_related_products_args($args) {\n\t\t$ppp = $ccc = 0;\n\t\tif (plumbing_parts_param_is_on(plumbing_parts_get_custom_option('show_post_related'))) {\n\t\t\t$ccc_add = in_array(plumbing_parts_get_custom_option('body_style'), array('fullwide', 'fullscreen')) ? 1 : 0;\n\t\t\t$ccc = plumbing_parts_get_custom_option('post_related_columns');\n\t\t\t$ccc = $ccc > 0 ? $ccc : (plumbing_parts_param_is_off(plumbing_parts_get_custom_option('show_sidebar_main')) ? 3+$ccc_add : 2+$ccc_add);\n\t\t\t$ppp = plumbing_parts_get_custom_option('post_related_count');\n\t\t\t$ppp = $ppp > 0 ? $ppp : $ccc;\n\t\t}\n\t\t$args['posts_per_page'] = $ppp;\n\t\t$args['columns'] = $ccc;\n\t\treturn $args;\n\t}", "public function outputFooterExtra()\n\t{\n\t\t$this->outputJavascriptCode($this->app->extra_javascript['footer']);\n\n\t\techo $this->app->extra_html['footer'];\n\n\t\t$this->app->plugins->run('system_theme_output_footer_extra', $this);\n\t}", "protected function include_extended_info(&$coupon_data, $query_args)\n {\n }", "abstract public function getCompany() : String;", "function getCompany()\n\t{\n\t\treturn $this->company;\n\t}", "function planmyday_woocommerce_output_related_products_args($args) {\n\t\t$ppp = $ccc = 0;\n\t\tif (planmyday_param_is_on(planmyday_get_custom_option('show_post_related'))) {\n\t\t\t$ccc_add = in_array(planmyday_get_custom_option('body_style'), array('fullwide', 'fullscreen')) ? 1 : 0;\n\t\t\t$ccc = planmyday_get_custom_option('post_related_columns');\n\t\t\t$ccc = $ccc > 0 ? $ccc : (planmyday_param_is_off(planmyday_get_custom_option('show_sidebar_main')) ? 3+$ccc_add : 2+$ccc_add);\n\t\t\t$ppp = planmyday_get_custom_option('post_related_count');\n\t\t\t$ppp = $ppp > 0 ? $ppp : $ccc;\n\t\t}\n\t\t$args['posts_per_page'] = $ppp;\n\t\t$args['columns'] = $ccc;\n\t\treturn $args;\n\t}", "function uc_coupon_print($coupon, $code = NULL, $op = 'view') {\n if ($code) {\n $codes = array($code);\n }\n elseif (!$coupon->bulk) {\n $codes = array($coupon->code);\n }\n else {\n $codes = array();\n for ($id = 0; $id < $coupon->data['bulk_number']; $id++) {\n $codes[] = uc_coupon_get_bulk_code($coupon, $id);\n }\n }\n\n $output = '';\n foreach ($codes as $code) {\n $output .= theme('uc_coupon_certificate', $coupon, $code);\n }\n\n drupal_add_css(drupal_get_path('module', 'uc_coupon') . '/uc_coupon.css', 'module');\n\n if ($op == 'print') {\n echo theme('uc_coupon_page', $output);\n exit;\n }\n\n return $output;\n}", "public function getCompany();", "function woocommerce_pip_print_return_policy() {\n\n\tif ( get_option( 'woocommerce_pip_return_policy' ) != '' ) {\n\t\treturn nl2br( stripslashes( get_option( 'woocommerce_pip_return_policy' ) ) );\n\t}\n}", "function order_info_markup( $atts ) {\n\n\t\tif ( ! _is_wcf_base_offer_type() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$output = '';\n\t\t$order_id = isset( $_GET['wcf-order'] ) ? intval( $_GET['wcf-order'] ) : '';\n\t\t$order_key = isset( $_GET['wcf-key'] ) ? wc_clean( wp_unslash( $_GET['wcf-key'] ) ) : '';\n\n\t\t$field = isset( $atts['field'] ) ? sanitize_text_field( $atts['field'] ) : '';\n\t\t$def_val = isset( $atts['default'] ) ? sanitize_text_field( $atts['default'] ) : '';\n\n\t\tif ( ! empty( $order_key ) && ! empty( $order_id ) ) {\n\n\t\t\t$order = wc_get_order( $order_id );\n\n\t\t\t// Validate order key.\n\t\t\tif ( ! $order || $order->get_order_key() !== $order_key ) {\n\t\t\t\treturn $output;\n\t\t\t}\n\n\t\t\t$order_data = $order->get_data();\n\t\t\t$type = isset( $atts['type'] ) ? sanitize_text_field( $atts['type'] ) : 'billing';\n\t\t\t$details = isset( $order_data[ $type ] ) ? $order_data[ $type ] : array();\n\n\t\t\tif ( '' !== $field ) {\n\n\t\t\t\tif ( ! empty( $details ) && isset( $details[ $field ] ) && '' !== $details[ $field ] ) {\n\t\t\t\t\t$output .= $details[ $field ];\n\t\t\t\t} else {\n\t\t\t\t\t$output .= $def_val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "function vcp_related_shortcode_func( $product_details ) {\n \n $text_from_attributes = \"Items similar to {$product_details[attribute_name]} \";\n $content_from_function = vcp_getproducts(2);\n \n $output = $text_from_attributes.$content_from_function;\n \n return $output;\n \n}", "public function export_company_bottom() {\n\n $bottom_fields = $this->get_company_fields_by_section( 'bottom' );\n\n $this->generate_crm_html_field( $bottom_fields );\n }", "protected function GetExtra()\n\t{\t\n\t}", "function plumbing_parts_woocommerce_importer_export($importer) {\n\t\tplumbing_parts_fpc(plumbing_parts_get_file_dir('core/core.importer/export/woocommerce.txt'), serialize( array(\n\t\t\t\"woocommerce_attribute_taxonomies\"\t\t\t\t=> $importer->export_dump(\"woocommerce_attribute_taxonomies\"),\n\t\t\t\"woocommerce_downloadable_product_permissions\"\t=> $importer->export_dump(\"woocommerce_downloadable_product_permissions\"),\n \"woocommerce_order_itemmeta\"\t\t\t\t\t=> $importer->export_dump(\"woocommerce_order_itemmeta\"),\n \"woocommerce_order_items\"\t\t\t\t\t\t=> $importer->export_dump(\"woocommerce_order_items\"),\n \"woocommerce_termmeta\"\t\t\t\t\t\t\t=> $importer->export_dump(\"woocommerce_termmeta\")\n ) )\n );\n\t}", "public function export_company_top() {\n\n $top_fields = $this->get_company_fields_by_section( 'top' );\n\n $this->generate_crm_html_field( $top_fields );\n }", "function woocommerce_rb_open_product_info() {\n \n echo '<div class=\"product-cart__info\">';\n \n\t}", "function woocommerce_pip_preview() {\n\n\tif ( get_option( 'woocommerce_pip_preview' ) != 'enabled' ) {\n\t\treturn 'onload=\"window.print()\"';\n\t}\n}", "function plumbing_parts_woocommerce_related_products_args($args) {\n if ($args['posts_per_page'] == 0)\n $args['post_type'] .= '_';\n return $args;\n }", "function print_commission($product_id){\r\n\tglobal $WCMp;\r\n\t$commission_percentage_per_poduct = get_post_meta( $product_id, '_commission_percentage_per_product', true);\r\n\t$commission_fixed_with_percentage_qty = get_post_meta( $product_id, '_commission_fixed_with_percentage_qty', true);\r\n\r\n\t$vendor_commission_percentage = get_user_meta(get_current_user_id(), '_vendor_commission_percentage', true);\r\n\t$vendor_commission_fixed_with_percentage = get_user_meta(get_current_user_id(), '_vendor_commission_fixed_with_percentage_qty', true);\r\n\r\n\t$general_commission_percentage = $WCMp->vendor_caps->payment_cap['default_percentage'];\r\n\t$general_commission_fixed = $WCMp->vendor_caps->payment_cap['fixed_with_percentage_qty'];\r\n\r\n\r\n\tif ($WCMp->vendor_caps->payment_cap['commission_type'] == 'fixed_with_percentage_qty') {\r\n\t\t\t$fixed = 0 ;\r\n\t\t\t$percentage = 0;\r\n\t\t\t// if there are commission of this product\r\n\t\t\tif($commission_percentage_per_poduct > 0 || $commission_fixed_with_percentage_qty > 0){\r\n\t\t\t\t// echo '1';\r\n\t\t\t\t$commission_percentage_per_poduct = !empty($commission_percentage_per_poduct)? $commission_percentage_per_poduct : 0 ;\r\n\t\t\t\t$commission_fixed_with_percentage_qty = !empty($commission_fixed_with_percentage_qty)? $commission_fixed_with_percentage_qty : 0 ;\r\n\t\t\t\t$fixed = $commission_fixed_with_percentage_qty ;\r\n\t\t\t\t$percentage = $commission_percentage_per_poduct;\r\n\t\t\t}\r\n\t\t\t// if there are commission for this vendor\r\n\t\t\telse if($vendor_commission_percentage > 0 || $vendor_commission_fixed_with_percentage > 0){\r\n\t\t\t\t$vendor_commission_percentage = !empty($vendor_commission_percentage)? $vendor_commission_percentage : 0 ;\r\n\t\t\t\t$vendor_commission_fixed_with_percentage = !empty($vendor_commission_fixed_with_percentage)? $vendor_commission_fixed_with_percentage : 0 ;\r\n\t\t\t\t$fixed = $vendor_commission_percentage ;\r\n\t\t\t\t$percentage = $vendor_commission_fixed_with_percentage;\r\n\t\t\t}\r\n\t\t\t// then use the general commission\r\n\t\t\telse{\r\n\t\t\t\t$general_commission_percentage = !empty($general_commission_percentage)? $general_commission_percentage : 0 ;\r\n\t\t\t\t$general_commission_fixed = !empty($general_commission_fixed)? $general_commission_fixed : 0 ;\r\n\t\t\t\t$fixed = $general_commission_percentage ;\r\n\t\t\t\t$percentage = $general_commission_fixed;\r\n\t\t\t}\r\n\t\t\t$currency = get_woocommerce_currency();\r\n\r\n\t\t\techo '<script>';\r\n\t\t\t// echo \"$('#product_type').change(function(){\r\n\t\t\t// \tvar val = $( this ).val();\";\r\n\t\t\t// echo \"if( val === 'simple'){\";\r\n\t\t\techo \"$('#regular_price').after('<span class=\\\"commission_span\\\" id =\\\"comm_reg\\\"></span><br>');\";\r\n\t\t\techo \"$('#sale_price').after('<span class=\\\"commission_span\\\" id =\\\"comm_s\\\"></span><br>');\";\r\n\t\t\techo generate_script_of_print_commission($fixed,$percentage,\"regular_price\",\"comm_reg\",$currency);\r\n\t\t\techo generate_script_of_print_commission($fixed,$percentage,\"sale_price\",\"comm_s\",$currency);\r\n\t\t\t// echo \"} \"; // variations_regular_price_0\r\n\t\t\t// echo \"if( val === 'variable'){ \";\r\n\t\t\t// echo \"$('#regular_price').after('<span class=\\\"commission_span\\\" id =\\\"comm_reg\\\"></span><br>');\";\r\n\t\t\t// echo \"$('#sale_price').after('<span class=\\\"commission_span\\\" id =\\\"comm_s\\\"></span><br>');\";\r\n\t\t\t// echo generate_script_of_print_commission($fixed,$percentage,\"regular_price\",\"comm_reg\",$currency);\r\n\t\t\t// echo generate_script_of_print_commission($fixed,$percentage,\"sale_price\",\"comm_s\",$currency);\r\n\t\t\t// echo \"}\";\r\n\t\t\techo '</script>';\r\n\t}\r\n}", "protected function include_extended_info(&$orders_data, $query_args)\n {\n }", "public function getAdditionalSetup(){\n return '';\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "function show_extra($surroundingtag, $class){\n if(trim(article_custom_field('extra')) == true){\n $extra=article_custom_field('extra');\n echo '<'.$surroundingtag.' class=\"'. $class .'\">'.$extra.'</'.$surroundingtag.'>';\n }\n}", "function add_member_custom_extended_profile() {\n\t$data_jobs = bp_get_member_profile_data( 'field=Branch' );\n\t$data_skills = bp_get_member_profile_data( 'field=Current Status' );\n\techo '<div class=\"item-meta\"><span class=\"profile-extend-meta\">';\n\tif($data_jobs) echo '<strong>Jobs</strong>' . ': ' . $data_jobs . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\n\tif($data_skills) echo '<strong>Skills</strong>' . ': ' . $data_skills . '';\n\techo '</span></div>';\n}", "function sparkling_footer_info() {\n\tglobal $sparkling_footer_info;\n\tprintf( esc_html__( 'Theme by %1$s Powered by %2$s', 'sparkling' ), '<a href=\"http://colorlib.com/\" target=\"_blank\">Colorlib</a>', '<a href=\"http://wordpress.org/\" target=\"_blank\">WordPress</a>' );\n}", "protected function includeCustomElements()\n {\n if ($elements = $this->getCustomElements())\n {\n foreach($elements as $element)\n {\n echo $element . PHP_EOL;\n }\n }\n }", "function show_extra_meta_pref() {\n global $bp;\n\n $extraElements = array(\n getFollowStr($bp),\n );\n\n foreach($extraElements as $value) {\n echo $value;\n }\n}", "function wooc_extra_register_fields() {\n\n $dig_reg_details = digit_get_reg_fields();\n\n $nameaccep = $dig_reg_details['dig_reg_name'];\n\n if($nameaccep>0) {\n ?>\n\n\n <p id=\"dig_cs_name\" class=\"woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide dig-custom-field\">\n <label for=\"reg_billing_first_name\"><?php _e('First Name', 'digits'); ?> <span\n class=\"required\">*</span></label>\n <input style=\"padding-left: 0.75em;\" type=\"text\" class=\"input-text\"\n name=\"tem_billing_first_name\"\n id=\"reg_billing_first_name\"\n value=\"<?php if (!empty($_POST['billing_first_name'])) esc_attr_e($_POST['billing_first_name']); ?>\" <?php if($nameaccep==2) echo'required';?> />\n </p>\n <?php\n }\n ?>\n\n\n\n\n <input type=\"hidden\" id=\"digit_name\" name=\"billing_first_name\" />\n <input type=\"hidden\" id=\"digit_emailaddress\" name=\"emailaddress\" />\n <input type=\"hidden\" id=\"digit_mobile\" name=\"mobile\" />\n\n\n\n\n\n\n <?php\n}", "public function includeThirdPartyConnections($company)\n {\n return $this->item($company, function($company) {\n return [\n 'eagleview' => (bool)$company->eagleview,\n 'google_sheet' => (bool)$company->google_sheet,\n 'quickbook' => (bool)$company->quickbook,\n 'hover' => (bool)$company->hover,\n 'skymeasure' => (bool)$company->skymeasure,\n 'company_cam' => (bool)$company->company_cam,\n 'facebook' => (bool)$company->facebook,\n 'twitter' => (bool)$company->twitter,\n 'linkedin' => (bool)$company->linkedin,\n 'quickbook_desktop' => (bool)$company->quickbook_desktop,\n 'abc_supplier' => (bool)$company->abc_supplier,\n 'srs_supplier' => (bool)$company->srs_supplier,\n 'quickbook_pay' => (bool)$company->quickbookpay\n ];\n });\n }", "function soyshop_copyright($html,$htmlObj){\r\n\r\nob_start();\r\n\r\necho <<<HTML\r\n<p><small>Copyright &copy; @@SOYSHOP_NAME@@, All Rights Reserved.</small></p>\r\nHTML;\r\n\r\nob_end_flush();\r\n\r\n}", "function ivan_vc_customizer_output() {\r\n\r\n\tglobal $elite_addons_vc_support;\r\n\r\n\tif( $elite_addons_vc_support == true )\r\n\t\treturn;\r\n\r\n\t$output = '';\r\n\r\n\tob_start();\r\n\r\n\t//\r\n\t// Primary Color\r\n\t//\r\n\t$accentBG = ivan_vc_get_option('ivan_vc_primary_bg');\r\n\t$accentColor = '#fff'; // Default\r\n\tif( '' != ivan_vc_get_option('ivan_vc_primary_color') && null != ivan_vc_get_option('ivan_vc_primary_color') )\r\n\t\t$accentColor = ivan_vc_get_option('ivan_vc_primary_color');\r\n\r\n\tif($accentBG != '' && $accentBG != null) :\r\n\r\n\t\t// Adjusted Accent Bg\r\n\t\t$darkenAccentBG = iv_vc_adjustColor($accentBG, -13);\r\n\t?>\r\n\t\t.ivan-staff-wrapper .social-icons a:hover,\r\n\t\t.ivan-call-action.primary-bg.with-icon .call-action-icon i,\r\n\t\t.ivan-button.outline:hover,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.big-price .top-section .adquire-plan .signup:hover,\r\n\t\t.ivan-pricing-table.description-support .bottom-section .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.black-bg .signup:hover,\r\n\t\t.marker-icon.ivan-gmap-marker,\r\n\t\t.ivan-title-wrapper.primary-bg .icon-above i,\r\n\t\t.ivan-title-wrapper.primary-bg strong,\r\n\t\t.ivan-title-wrapper.primary-bg a,\r\n\t\t.ivan-title-wrapper.primary-bg a:hover,\r\n\t\t.ivan-service .main-icon,\r\n\t\t.ivan-service.primary-bg .fa-stack .main-icon,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg a:hover,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack .stack-holder,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack.with-link:hover .stack-holder,\r\n\t\t.ivan-icon-list.primary-bg i,\r\n\t\t.ivan-list.primary-bg.number ul > li:before {\r\n\t\t\tcolor: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.outline:hover hr,\r\n\t\t.ivan-button.no-border:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-projects .ivan-project.hide-entry .entry,\r\n\t\t.ivan-projects .ivan-project.outer-square .entry,\r\n\t\t.ivan-projects .ivan-project.lateral-cover .entry,\r\n\t\t.ivan-projects .ivan-project.smooth-cover .entry,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-service .fa-stack,\r\n\t\t.ivan-service.primary-bg,\r\n\t\t.ivan-progress.primary-bg .ivan-progress-inner,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square,\r\n\t\t.ivan-icon-list.primary-bg.circle i,\r\n\t\t.ivan-list.primary-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-list.primary-bg.circle ul > li:before,\r\n\t\t.ivan-quote.primary-bg blockquote,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.ivan-vc-separator.primary-bg,\r\n\t\t.ivan-pricing-table.default.primary-bg,\r\n\t\t.ivan-pricing-table.subtitle .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg,\r\n\t\t.ivan-pricing-table.small-desc .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square.with-link:hover,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active {\r\n\t\t\tbackground-color: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.outline:hover,\r\n\t\t.ivan-button.no-border:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-button.primary-bg.outline.text-separator.with-icon .text-btn,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.big-price .top-section .adquire-plan .signup:hover,\r\n\t\t.ivan-pricing-table.description-support .bottom-section .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.black-bg .signup:hover,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-service .fa-stack,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tab {\r\n\t\t\tborder-color: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-button.primary-bg:hover,\r\n\t\t.ivan-button.primary-bg.with-icon.icon-cover .icon-simple,\r\n\t\t.ivan-pricing-table.default.primary-bg h3,\r\n\t\t.ivan-pricing-table.default.primary-bg li,\r\n\t\t.ivan-pricing-table.default.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.default.primary-bg li a,\r\n\t\t.ivan-pricing-table.default.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg h3,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li a,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg h3,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li a,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .featured-table-text,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content a,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content a:hover,\r\n\t\t.ivan-service .fa-stack .main-icon,\r\n\t\t.ivan-service.primary-bg .service-title,\r\n\t\t.ivan-service.primary-bg .main-icon,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack .main-icon,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg a,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square i,\r\n\t\t.ivan-icon-list.primary-bg.circle i,\r\n\t\t.ivan-list.primary-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-quote.primary-bg blockquote h5,\r\n\t\t.ivan-quote.primary-bg blockquote .author,\r\n\t\t.ivan-quote.primary-bg blockquote .pull-left,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active .toggle-mark .toggle-mark-icon,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active a,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active .accordion-mark .accordion-mark-icon {\r\n\t\t\tcolor: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover hr,\r\n\t\t.ivan-button.primary-bg hr,\r\n\t\t.ivan-button.primary-bg:hover hr,\r\n\t\t.ivan-service.primary-bg .fa-stack {\r\n\t\t\tbackground-color: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-pricing-table.default.primary-bg .signup,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup:hover,\r\n\t\t.ivan-service.primary-bg .fa-stack {\r\n\t\t\tborder-color: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t// Darken Accent Bg\r\n\t\t.ivan-button.primary-bg:hover,\r\n\t\t.ivan-button.primary-bg.outline hr,\r\n\t\t.ivan-button.primary-bg.outline:hover hr,\r\n\t\t.ivan-button.primary-bg.outline.icon-cover.with-icon .icon-simple,\r\n\t\t.ivan-pricing-table.default.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .featured-table-text {\r\n\t\t\tbackground-color: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.primary-bg:hover {\r\n\t\t\tborder-color: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.primary-bg.outline,\r\n\t\t.ivan-button.primary-bg.outline:hover {\r\n\t\t\tcolor: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-service.primary-bg .content-section-holder li,\r\n\t\t.ivan-service.primary-bg .content-section-holder p {\r\n\t\t border-color: <?php echo iv_vc_adjustColor($accentBG, -7); ?>;\r\n\t\t}\r\n\r\n\t<?php\r\n\tendif;\r\n\r\n\t//\r\n\t// Dark Color\r\n\t//\r\n\t$darkBG = ivan_vc_get_option('ivan_vc_dark_bg');\r\n\t$darkColor = '#fff'; // Default\r\n\tif( '' != ivan_vc_get_option('ivan_vc_dark_color') && null != ivan_vc_get_option('ivan_vc_dark_color') )\r\n\t\t$darkColor = ivan_vc_get_option('ivan_vc_dark_color');\r\n\r\n\tif($darkBG != '' && $darkBG != null) :\r\n\t\t// Adjusted Dark Bg\r\n\t\t$darkenDarkBG = iv_vc_adjustColor($darkBG, -13);\r\n\t?>\r\n\r\n\t\t.ivan-call-action.dark-bg.boxed,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-title-wrapper.dark-bg .ivan-vc-separator.small,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart-content .ivan-vc-separator,\r\n\t\t.ivan-service.dark-bg,\r\n\t\t.ivan-progress.dark-bg .ivan-progress-outer,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.dark-bg,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square,\r\n\t\t.ivan-icon-list.dark-bg.circle i,\r\n\t\t.ivan-list.dark-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-list.dark-bg.circle ul > li:before,\r\n\t\t.ivan-quote.dark-bg blockquote,\r\n\t\t.ivan-vc-separator.dark-bg,\r\n\t\t.ivan-pricing-table.default.dark-bg,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square.with-link:hover {\r\n\t\t\tbackground-color: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-call-action.dark-bg.opaque.with-icon .call-action-icon i,\r\n\t\t.ivan-call-action.dark-bg.opaque .call-action-text-inner .call-action-heading-text,\r\n\t\t.ivan-call-action.dark-bg.opaque .call-action-text-inner .call-action-text,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content a,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content a:hover,\r\n\t\t.ivan-testimonial.dark-bg .author-name,\r\n\t\t.ivan-testimonial.dark-bg .author-desc,\r\n\t\t.ivan-title-wrapper.dark-bg .title-heading,\r\n\t\t.ivan-title-wrapper.dark-bg .sub,\r\n\t\t.ivan-title-wrapper.dark-bg i,\r\n\t\t.ivan-title-wrapper.dark-bg strong,\r\n\t\t.ivan-title-wrapper.dark-bg a,\r\n\t\t.ivan-title-wrapper.dark-bg a:hover,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart-content .pie-chart-heading,\r\n\t\t.ivan-pie-chart-holder.dark-bg .pie-chart-content-inner,\r\n\t\t.ivan-service.dark-bg .fa-stack .main-icon,\r\n\t\t.ivan-progress.dark-bg .progress-title-holder,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-text-holder .icon-box-title,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-content,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .main-icon,\r\n\t\t.ivan-icon-box.dark-bg a,\r\n\t\t.ivan-icon-box.dark-bg a:hover,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg a,\r\n\t\t.ivan-icon-wrapper .dark-bg a:hover,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack .stack-holder,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack.with-link:hover .stack-holder,\r\n\t\t.ivan-icon-list.dark-bg p,\r\n\t\t.ivan-icon-list.dark-bg i,\r\n\t\t.ivan-list.dark-bg li,\r\n\t\t.ivan-list.dark-bg.number ul > li:before {\r\n\t\t\tcolor: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-progress.dark-bg .ivan-progress-outer,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-box.dark-bg hr,\r\n\t\t.ivan-icon-boxed-holder.dark-bg {\r\n\t\t\tborder-color: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-call-action.dark-bg.boxed.with-icon .call-action-icon i,\r\n\t\t.ivan-call-action.dark-bg.boxed .call-action-text-inner .call-action-heading-text,\r\n\t\t.ivan-call-action.dark-bg.boxed .call-action-text-inner .call-action-text,\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-button.dark-bg:hover,\r\n\t\t.ivan-button.dark-bg.with-icon.icon-cover .icon-simple,\r\n\t\t.ivan-pricing-table.default.dark-bg h3,\r\n\t\t.ivan-pricing-table.default.dark-bg li,\r\n\t\t.ivan-pricing-table.default.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.default.dark-bg li a,\r\n\t\t.ivan-pricing-table.default.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup,\r\n\t\t.ivan-pricing-table.default.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg h3,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li a,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg h3,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li a,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .featured-table-text,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content a,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content a:hover,\r\n\t\t.ivan-service.dark-bg .content-section-holder li,\r\n\t\t.ivan-service.dark-bg .content-section-holder p,\r\n\t\t.ivan-service.dark-bg .content-section-holder a,\r\n\t\t.ivan-service.dark-bg .content-section-holder a:hover,\r\n\t\t.ivan-service.dark-bg .service-title,\r\n\t\t.ivan-service.dark-bg .main-icon,\r\n\t\t.ivan-service.primary-bg .content-section-holder li,\r\n\t\t.ivan-service.primary-bg .content-section-holder p,\r\n\t\t.ivan-service.primary-bg .content-section-holder a,\r\n\t\t.ivan-service.primary-bg .content-section-holder a:hover,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack .main-icon,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .icon-box-title,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .icon-box-content,\r\n\t\t.ivan-icon-boxed-holder.dark-bg a,\r\n\t\t.ivan-icon-boxed-holder.dark-bg a:hover,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square i,\r\n\t\t.ivan-icon-list.dark-bg.circle i,\r\n\t\t.ivan-list.dark-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-quote.dark-bg blockquote h5,\r\n\t\t.ivan-quote.dark-bg blockquote .author,\r\n\t\t.ivan-quote.dark-bg blockquote .pull-left {\r\n\t\t\tcolor: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.dark-bg hr,\r\n\t\t.ivan-button.dark-bg:hover hr,\r\n\t\t.ivan-service.dark-bg .fa-stack,\r\n\t\t.ivan-progress.dark-bg .ivan-progress-inner,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack {\r\n\t\t\tbackground-color: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-pricing-table.default.dark-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup,\r\n\t\t.ivan-service.dark-bg .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack {\r\n\t\t\tborder-color: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t// Darken Dark Bg\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-button.dark-bg:hover {\r\n\t\t\tborder-color: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-pricing-table.default.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .featured-table-text,\r\n\t\t.ivan-button.dark-bg:hover,\r\n\t\t.ivan-button.dark-bg.outline hr,\r\n\t\t.ivan-button.dark-bg.outline:hover hr,\r\n\t\t.ivan-button.dark-bg.outline.icon-cover.with-icon .icon-simple {\r\n\t\t\tbackground: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.dark-bg.outline,\r\n\t\t.ivan-button.dark-bg.outline:hover {\r\n\t\t\tcolor: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-service.dark-bg .content-section-holder li,\r\n\t\t.ivan-service.dark-bg .content-section-holder p {\r\n\t\t border-color: <?php echo iv_vc_adjustColor($darkBG, -7); ?>;\r\n\t\t}\r\n\t\t\t\r\n\t<?php\r\n\tendif;\r\n\r\n\t$output = ob_get_contents();\r\n\tob_end_clean();\r\n\t// Check if can print something...\r\n\tif('' != $output) :\r\n\t\techo '<style type=\"text/css\">' . $output . '</style>';\r\n\tendif;// end main check\r\n\r\n}", "function woocommerce_output_content_wrapper()\n {\n }", "private function deliveryorderTermOfCredit()\n {\n $termOfCredit = $this->confPdf[ 'deliveryorder.' ][ 'content.' ][ 'termOfCredit.' ];\n $this->writeTextblock( $termOfCredit, 'deliveryorderTermOfCredit' );\n }", "function plumbing_parts_woocommerce_importer_export_fields($importer) {\n\t\t$importer->show_exporter_fields(array(\n\t\t\t'slug' => 'woocommerce',\n\t\t\t'title' => esc_html__('WooCommerce', 'plumbing-parts')\n\t\t\t));\n\t}", "function edit_woocommerce_checkout_page($order){\r\n global $post_id;\r\n $order = new WC_Order( $post_id );\r\n echo '<p><strong>'.__('HCPID').':</strong> ' . get_post_meta($order->get_id(), 'hcpid', true ) . '</p>';\r\n}", "public static function renderCustomsTermsInput($args)\n {\n $options = get_option('dpdconnect_company_info');\n // output the field\n ?>\n <select id=\"<?php echo esc_attr($args['label_for']); ?>\"\n data-custom=\"<?php echo esc_attr($args['dpdconnect_custom_data']); ?>\"\n name=\"dpdconnect_company_info[<?php echo esc_attr($args['label_for']); ?>]\"\n >\n <option value=\"DAPDP\" <?php echo isset($options[ $args['label_for'] ]) ? ( selected($options[ $args['label_for'] ], 'DAPDP', false) ) : ( '' ); ?>>\n <?php esc_html_e('DAP DP - D&T paid by sender', 'dpdconnect'); ?>\n </option>\n <option value=\"DAPNP\" <?php echo isset($options[ $args['label_for'] ]) ? ( selected($options[ $args['label_for'] ], 'DAPNP', false) ) : ( '' ); ?>>\n <?php esc_html_e('DAP NP - D&T paid by receiver', 'dpdconnect'); ?>\n </option>\n </select>\n <?php\n }", "function rcw_getproduct_desc($custom_fields)\r\n{\r\n\t$rcw_desc = $custom_fields['rcw_desc'];\r\n\tif(isset($custom_fields['rcw_desc']))\r\n\t{\r\n\t\tforeach ( $rcw_desc as $key => $value )\r\n\t\t{\r\n\t\t\t$desc = $value;\r\n\t\t}\r\n\t\treturn $desc;\t\r\n\t}\r\n}", "function brisk_woocommerce_callback() {\n echo '<p class=\"brisk-subheading\">' . __('Disable specific elements of WooCommerce.', 'brisk') . '</p>';\n}", "function freshio_credit()\n\t{\n\t\t?>\n\t\t<div class=\"site-info\">\n\t\t\t<?php echo apply_filters('freshio_copyright_text', $content = esc_html__('Coppyright', 'freshio') . ' &copy; ' . date('Y') . ' ' . '<a class=\"site-url\" href=\"' . site_url() . '\">' . get_bloginfo('name') . '</a>' . esc_html__('. All Rights Reserved.', 'freshio')); ?>\n\t\t</div><!-- .site-info -->\n\t\t<?php\n\t}", "function autoparts_woocommerce_output_related_products_args($args) {\n\t\t$args['posts_per_page'] = max(0, min(9, autoparts_get_theme_option('related_posts')));\n\t\t$args['columns'] = max(1, min(4, autoparts_get_theme_option('related_columns')));\n\t\treturn $args;\n\t}", "function planmyday_woocommerce_importer_export($importer) {\n\t\tplanmyday_fpc(planmyday_get_file_dir('core/core.importer/export/woocommerce.txt'), serialize( array(\n\t\t\t\"woocommerce_attribute_taxonomies\"\t\t\t\t=> $importer->export_dump(\"woocommerce_attribute_taxonomies\"),\n\t\t\t\"woocommerce_downloadable_product_permissions\"\t=> $importer->export_dump(\"woocommerce_downloadable_product_permissions\"),\n \"woocommerce_order_itemmeta\"\t\t\t\t\t=> $importer->export_dump(\"woocommerce_order_itemmeta\"),\n \"woocommerce_order_items\"\t\t\t\t\t\t=> $importer->export_dump(\"woocommerce_order_items\"),\n \"woocommerce_termmeta\"\t\t\t\t\t\t\t=> $importer->export_dump(\"woocommerce_termmeta\")\n ) )\n );\n\t}", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "function show_fields_for_checkout(){\r\n\t\tadd_filter( 'woocommerce_checkout_fields' , [$this,'override_checkout_fields'] );\r\n\r\n\r\n\t\t/**\r\n\t\t * Define special custom fields which are displayed after order notes\r\n\t\t * \r\n\t\t */\r\n\t\tadd_action( 'woocommerce_after_order_notes', [$this,'custom_special_fields'] );\r\n\t}", "function planmyday_woocommerce_importer_export_fields($importer) {\n\t\t$importer->show_exporter_fields(array(\n\t\t\t'slug' => 'woocommerce',\n\t\t\t'title' => esc_html__('WooCommerce', 'planmyday')\n\t\t\t));\n\t}", "public function creamyHeaderName() {\n\t\t$customName = $this->db->getSettingValueForKey(CRM_SETTING_COMPANY_NAME);\n\t\treturn (!empty($customName) ? $customName : \"GOautodial Inc.\");\n\t}", "function extraProdInfo() {\n\t\t\t\t\t\t\tglobal $prods;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tswitch($prods) {\n\t\t\t\t\t\t\t\tcase \"Networking Dev Kit\":\n\t\t\t\t\t\t\t\t\t$orgCost = 19.99;\n\t\t\t\t\t\t\t\t\t$inStock = 9000;\t// Note: The value in $inStock is the base amount that's in stock (meaning it will never change due to more being added in stock)\n\t\t\t\t\t\t\t\t\t$itemDisc = .03;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"Networking Dev Kit Pro\":\n\t\t\t\t\t\t\t\t\t$orgCost = 29.99;\n\t\t\t\t\t\t\t\t\t$inStock = 500;\n\t\t\t\t\t\t\t\t\t$itemDisc = .10;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"Network Creation Center\":\n\t\t\t\t\t\t\t\t\t$orgCost = 39.99;\n\t\t\t\t\t\t\t\t\t$inStock = 5000;\n\t\t\t\t\t\t\t\t\t$itemDisc = .15;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"Net Developer Tools\":\n\t\t\t\t\t\t\t\t\t$orgCost = 49.99;\n\t\t\t\t\t\t\t\t\t$inStock = 200;\n\t\t\t\t\t\t\t\t\t$itemDisc = .20;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"Net Developer Tools Pro\":\n\t\t\t\t\t\t\t\t\t$orgCost = 59.99;\n\t\t\t\t\t\t\t\t\t$inStock = 3000;\n\t\t\t\t\t\t\t\t\t$itemDisc = .35;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"Netware\":\n\t\t\t\t\t\t\t\t\t$orgCost = 69.99;\n\t\t\t\t\t\t\t\t\t$inStock = 50000;\n\t\t\t\t\t\t\t\t\t$itemDisc = .45;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"Netsoft\":\n\t\t\t\t\t\t\t\t\t$orgCost = 67.99;\n\t\t\t\t\t\t\t\t\t$inStock = 100000;\n\t\t\t\t\t\t\t\t\t$itemDisc = .45;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"Net\":\n\t\t\t\t\t\t\t\t\t$orgCost = 99.99;\n\t\t\t\t\t\t\t\t\t$inStock = 10000;\n\t\t\t\t\t\t\t\t\t$itemDisc = .55;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"Social Network\":\n\t\t\t\t\t\t\t\t\t$orgCost = 199.99;\n\t\t\t\t\t\t\t\t\t$inStock = 200000;\n\t\t\t\t\t\t\t\t\t$itemDisc = .65;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$arrExtraInfo = array($orgCost, $inStock, $itemDisc);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn $arrExtraInfo;\n\t\t\t\t\t\t}", "public static function affiliates_affiliate_stats_renderer_column_output( $output, $key, $result ) {\n\t\t$output = '';\n\t\tswitch ( $key ) {\n\t\t\tcase 'extra_info' :\n\t\t\t\tif( isset( $result->post_id ) ) {\n\t\t\t\t\tif( get_post_type( $result->post_id ) == 'shop_order' ) {\n\t\t\t\t\t\t// Order id\n\t\t\t\t\t\t$order = new WC_Order( $result->post_id );\n\t\t\t\t\t\t$output .= 'Order #' . $result->post_id;\n\t\t\t\t\t\t$output .= '<br />';\n\n\t\t\t\t\t\t// Order items\n\t\t\t\t\t\tif ( sizeof( $order->get_items() ) > 0 ) {\n\t\t\t\t\t\t\tforeach ( $order->get_items() as $item ) {\n\t\t\t\t\t\t\t\t$product = self::get_the_product_from_item( $item );\n\t\t\t\t\t\t\t\tif ( $product !== null ) {\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\" ' . get_permalink( $product->get_id() ) . ' \" >';\n\t\t\t\t\t\t\t\t\t$output .= $product->get_name();\n\t\t\t\t\t\t\t\t\t$output .= '</a>';\n\t\t\t\t\t\t\t\t\t$output .= '<br />';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Customer details\n\t\t\t\t\t\t$customer_id = $order->get_customer_id();\n\t\t\t\t\t\t// $output .= $customer_id;\n\t\t\t\t\t\t// $output .= '<br />';\n\t\t\t\t\t\tif ( $customer = get_user_by( 'ID', $customer_id ) ) {\n\t\t\t\t\t\t\t$output .= 'First name: ' . $customer->first_name;\n\t\t\t\t\t\t\t$output .= '<br />';\n\t\t\t\t\t\t\t$output .= 'Last name: ' . $customer->last_name;\n\t\t\t\t\t\t\t$output .= '<br />';\n\t\t\t\t\t\t\t$output .= 'Email: ' . $customer->user_email;\n\t\t\t\t\t\t\t$output .= '<br />';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$output .= 'First name: ' . $order->get_billing_first_name();\n\t\t\t\t\t\t\t$output .= '<br />';\n\t\t\t\t\t\t\t$output .= 'Last name: ' . $order->get_billing_last_name();\n\t\t\t\t\t\t\t$output .= '<br />';\n\t\t\t\t\t\t\t$output .= 'Email: ' . $order->get_billing_email();\n\t\t\t\t\t\t\t$output .= '<br />';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Coupon details\n\t\t\t\t\t\t$coupon_codes = $order->get_used_coupons();\n\t\t\t\t\t\tif ( count( $coupon_codes ) > 0 ) {\n\t\t\t\t\t\t\tforeach ( $coupon_codes as $coupon_code ) {\n\t\t\t\t\t\t\t\tif ( class_exists( 'Affiliates_Attributes_WordPress' ) ) {\n\t\t\t\t\t\t\t\t\tif ( null !== Affiliates_Attributes_WordPress::get_affiliate_for_coupon( $coupon_code ) ) {\n\t\t\t\t\t\t\t\t\t\tif ( $result->affiliate_id == Affiliates_Attributes_WordPress::get_affiliate_for_coupon( $coupon_code ) ) {\n\t\t\t\t\t\t\t\t\t\t\t$output .= 'Referred by coupon: ';\n\t\t\t\t\t\t\t\t\t\t\t$output .= $coupon_code;\n\t\t\t\t\t\t\t\t\t\t\t$output .= '<br />';\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}\n\n\t\t\t\t\t\t// Order status\n\t\t\t\t\t\t$output .= 'Order status: ' . $order->get_status();\n\t\t\t\t\t\t$output .= '<br />';\n\n\t\t\t\t\t\t// Affiliate info\n\t\t\t\t\t\tif ( class_exists( 'Affiliates_Multi_Tier' ) ) {\n\t\t\t\t\t\t\t$data_result = unserialize( $result->data );\n\t\t\t\t\t\t\tif ( $data_result ) {\n\t\t\t\t\t\t\t\t$referral_origin = 'affiliate';\n\t\t\t\t\t\t\t\t$referral_origin_value = '';\n\t\t\t\t\t\t\t\tif ( isset( $data_result ) && isset( $data_result['tier_level'] ) ) {\n\t\t\t\t\t\t\t\t\t$referral_origin = 'tier level';\n\t\t\t\t\t\t\t\t\t$referral_origin_value = $data_result['tier_level']['value'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$output .= sprintf( '<strong>Referral origin:</strong> %s %s', $referral_origin, $referral_origin_value );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} // post type order\n\t\t\t\t}\n\t\t\tbreak;\n\t\t} // switch\n\t\treturn $output;\n\t}", "function wpt_if_no_woocommerce($atts){\n echo '<a title=\"Tell us: if need Help\" href=\"mailto:bealinawaz@gmail.com\" style=\"color: #d00;padding: 10px;\">[WOO Product Table] WooCommerce not Active/Installed</a>';\n}", "function client_side_print_compose_head() {\n $this->head_print_js_css();\n // wp_print_scripts( array( 'sack' )); // Define custom A J A X respond at Client side\n }" ]
[ "0.7115399", "0.6653143", "0.60681486", "0.5908668", "0.581418", "0.5674654", "0.5646758", "0.55763507", "0.5541551", "0.5511208", "0.54042834", "0.5396641", "0.5356744", "0.53145486", "0.5304406", "0.52892184", "0.5284251", "0.526566", "0.5263607", "0.5245156", "0.5231996", "0.52262145", "0.5214037", "0.51805264", "0.516713", "0.51355255", "0.5116235", "0.5093262", "0.5086328", "0.50743127", "0.50720733", "0.5060799", "0.50562197", "0.50265235", "0.50212765", "0.5017956", "0.5015872", "0.5015221", "0.5011824", "0.501143", "0.50113386", "0.5007141", "0.49877942", "0.49754554", "0.4973058", "0.49682903", "0.49655432", "0.4956561", "0.49427503", "0.49364522", "0.49227655", "0.4914135", "0.4909229", "0.490617", "0.49059802", "0.48890704", "0.4888592", "0.48885113", "0.4886795", "0.48840117", "0.48813784", "0.48808593", "0.4875331", "0.4873721", "0.48726696", "0.48692885", "0.4862595", "0.48596883", "0.48596883", "0.48596883", "0.48596883", "0.48476782", "0.4846143", "0.48413008", "0.48359987", "0.48230433", "0.48201644", "0.48183396", "0.4812487", "0.48067546", "0.4803231", "0.48012504", "0.480058", "0.47904745", "0.4779949", "0.47796166", "0.4777535", "0.47728714", "0.4769626", "0.47666278", "0.47651473", "0.47651473", "0.47651473", "0.4760366", "0.47598228", "0.47540092", "0.4752351", "0.47506455", "0.47499278", "0.47485623" ]
0.8363369
0
woocommerce_pip_print_return_policy function. Output return policy if needed
Функция woocommerce_pip_print_return_policy. Вывод политики возврата, если это необходимо
function woocommerce_pip_print_return_policy() { if ( get_option( 'woocommerce_pip_return_policy' ) != '' ) { return nl2br( stripslashes( get_option( 'woocommerce_pip_return_policy' ) ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t$orders = explode( ',', $_GET['post'] );\n\t\t$action = $_GET['type'];\n\t\t$number_of_orders = count( $orders );\n\t\t$order_loop = 0;\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\t// Loop through all orders (bulk printing).\n\t\tforeach ( $orders as $order_id ) {\n\t\t\t$order_loop++;\n\t\t\t$order = new WC_Order( $order_id );\n\t\t\tob_start();\n\t\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t\t$content .= ob_get_clean();\n\t\t\tif ( $number_of_orders > 1 && $order_loop < $number_of_orders ) {\n\t\t\t\t$content .= '<p class=\"pagebreak\"></p>';\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "function woocommerce_pip_client_window() {\n\tif ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\t\t$order_id = $_GET['post'];\n\t\t$order = new WC_Order( $order_id );\n\t\t$current_user = wp_get_current_user();\n\t\t$action = 'print_invoice';\n\t\t$client = true;\n\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'client-print-pip' ) || ! is_user_logged_in() || $order->user_id != $current_user->ID ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows (actually this one might not be needed, are the customers in the admin for this?)\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\tob_start();\n\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t$content .= ob_get_clean();\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "private static function get_refunds_return_policy_page_content()\n {\n }", "public function getReturnPolicyDetails()\n {\n return $this->returnPolicyDetails;\n }", "function woocommerce_pip_preview() {\n\n\tif ( get_option( 'woocommerce_pip_preview' ) != 'enabled' ) {\n\t\treturn 'onload=\"window.print()\"';\n\t}\n}", "function wc_print_notices($return = \\false)\n {\n }", "function cpe_orders_print_view()\n{\n\n /*dd(var_export(wp_verify_nonce($_GET['_wpnonce'], \"cpe_print_invoice-{$_GET['order']}\"), true));\n\n if (!wp_verify_nonce($nonce, \"cpe_print_invoice-{$_GET['order']}\")) {\n wp_die(\n __(\"Sorry! Something went wrong. Please contact site administrator or go back and retry.\"),\n __(\"Not Allowed!\"),\n array(\n \"response\" => 403,\n \"back_link\" => true\n )\n );\n }*/\n\n // Do we have an order ID?\n if (empty($_GET['order'])) {\n wp_redirect(admin_url('admin.php?page=pmpro-orders'));\n exit;\n }\n\n // Get order and membership level.\n $order = new MemberOrder($_GET['order']);\n\n if (!isset($order->id)) {\n wp_die(\n __(\"Sorry! Something went wrong. Please contact site administrator or go back and retry.\"),\n __(\"Not Allowed!\"),\n array(\n \"response\" => 403,\n \"back_link\" => true\n )\n );\n }\n\n $level = pmpro_getLevel($order->membership_id);\n\n // Load template\n $template = CPE_DIR . '/paid-memberships-pro/pages/orders-print.php';\n \n require_once($template);\n\n ?>\n <script>\n window.print();\n </script>\n\n <?php\n exit;\n}", "public function getReturnPolicyProfile()\n {\n return $this->returnPolicyProfile;\n }", "public function getReturnPolicyProfile()\n {\n return $this->returnPolicyProfile;\n }", "function wc_checkout_privacy_policy_text()\n {\n }", "function woocommerce_pip_alter_order_actions( $order ) {\n\n\t\t\t?>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post='.$order->id.'&type=print_invoice'), 'print-pip' ); ?>\"><img src=\"<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/invoice-icon.png'; ?>\" alt=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" width=\"14\"></a>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $order->id.'&type=print_packing' ), 'print-pip' ); ?>\"><img src=\"<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/packing-list-icon.png'; ?>\" alt=\"<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>\" width=\"14\"></a>\n\t\t\t<?php\n}", "public function refund_policy()\n\t{\n\t\t$title = t('Refund Policy');\n\t\treturn view('frontend.refund_policy', compact('title'));\n\t}", "function woocommerce_pip_print_footer() {\n\n\tif ( get_option( 'woocommerce_pip_footer' ) != '' ) {\n\t\treturn nl2br( stripslashes( get_option( 'woocommerce_pip_footer' ) ) );\n\t}\n}", "function ipn_response() {\r\n $original_order_id = $_GET['goodsid'];\r\n $order = wc_get_order($_GET['goodsid']);\r\n if (!$order) {\r\n die('The order is Invalid!');\r\n }\r\n\r\n $payment = wc_get_payment_gateway_by_order($order);\r\n $payment->init_configs(true);\r\n $pingback_params = $_GET;\r\n $pingback = new Paymentwall_Pingback($pingback_params, $this->getRealClientIP());\r\n\r\n if ($pingback->validate(true)) {\r\n if (paymentwall_subscription_enable()) {\r\n $subscriptions = wcs_get_subscriptions_for_order($original_order_id, array('order_type' => 'parent'));\r\n $subscription = array_shift($subscriptions);\r\n $subscription_key = get_post_meta($original_order_id, '_subscription_id');\r\n }\r\n\r\n if ($pingback->isDeliverable()) {\r\n\r\n if ($order->get_status() == PW_ORDER_STATUS_PROCESSING) {\r\n die(PW_DEFAULT_SUCCESS_PINGBACK_VALUE);\r\n }\r\n\r\n if ($this->is_valid_renewal_pingback($pingback_params, $original_order_id)) {\r\n $subscription->update_status('on-hold');\r\n $subscription->add_order_note(__('Subscription renewal payment due: Status changed from Active to On hold.', PW_TEXT_DOMAIN));\r\n $new_order = wcs_create_renewal_order($subscription);\r\n $new_order->add_order_note(__('Payment approved by Paymentwall - Transaction Id: ' . $pingback->getReferenceId(), PW_TEXT_DOMAIN));\r\n update_post_meta(!method_exists($new_order, 'get_id') ? $new_order->id : $new_order->get_id(), '_subscription_id', $pingback->getReferenceId());\r\n $new_order->set_payment_method($subscription->payment_gateway);\r\n $new_order->payment_complete($pingback->getReferenceId());\r\n } else {\r\n $order->add_order_note(__('Payment approved by Paymentwall - Transaction Id: ' . $pingback->getReferenceId(), PW_TEXT_DOMAIN));\r\n $order->payment_complete($pingback->getReferenceId());\r\n }\r\n\r\n if (!empty($subscriptions)) {\r\n $action_args = array('subscription_id' => !method_exists($subscription, 'get_id') ? $subscription->id : $subscription->get_id());\r\n $hooks = array(\r\n 'woocommerce_scheduled_subscription_payment',\r\n );\r\n\r\n foreach ($hooks as $hook) {\r\n $result = wc_unschedule_action($hook, $action_args);\r\n }\r\n }\r\n\r\n } elseif ($pingback->isCancelable()) {\r\n $order->cancel_order(__('Reason: ' . $pingback->getParameter('reason'), PW_TEXT_DOMAIN));\r\n $order->update_status('wc-refunded');\r\n } elseif ($pingback->isUnderReview()) {\r\n $order->update_status('on-hold');\r\n } elseif (\r\n $pingback->getType() == Paymentwall_Pingback::PINGBACK_TYPE_SUBSCRIPTION_CANCELLATION\r\n && !empty($subscription)\r\n ) {\r\n $subscription->update_status('wc-pending-cancel');\r\n $order->update_status('completed');\r\n }\r\n\r\n die(PW_DEFAULT_SUCCESS_PINGBACK_VALUE);\r\n } else {\r\n die($pingback->getErrorSummary());\r\n }\r\n }", "function mediz_privacypolicy() {\n\n\t\t$templates = new MEDIZ_Template_Loader;\n\n\t\tob_start();\n\t\t$templates->get_template_part( 'mediz_privacypolicy', 'mediz_privacypolicy' );\n\t\treturn ob_get_clean();\n\n\t}", "function wc_print_r($expression, $return = \\false)\n {\n }", "public function adminOrderAccess() {\n global $purchlogitem;\n\n if ($purchlogitem->extrainfo->gateway == 'wpevelocity_cc' && $purchlogitem->extrainfo->processed != 7) {\n echo '<a href=\"options-general.php?page=wpevelocity-refund&id=' \n . base64_encode(json_encode($purchlogitem)) . '\"><img src=\"' \n . plugins_url(\"assets/images/return.png\", __FILE__) \n . '\" style=\"width:20px; height:20px;margin-right:10px;\" />Velocity Online Refund</a>';\n } else if ($purchlogitem->extrainfo->gateway == 'wpevelocity_cc' && $purchlogitem->extrainfo->processed == 7) {\n echo '<span style=\"opacity:.5;pointer-events: none;\"><img src=\"' \n . plugins_url(\"assets/images/return.png\", __FILE__) \n . '\" style=\"width:20px; height:20px;margin-right:10px;\" />Velocity Online Refund</span>';\n }\n }", "public function hasProductReturnPolicy($hasProductReturnPolicy)\n {\n return $this->setProperty('hasProductReturnPolicy', $hasProductReturnPolicy);\n }", "function print_commission($product_id){\r\n\tglobal $WCMp;\r\n\t$commission_percentage_per_poduct = get_post_meta( $product_id, '_commission_percentage_per_product', true);\r\n\t$commission_fixed_with_percentage_qty = get_post_meta( $product_id, '_commission_fixed_with_percentage_qty', true);\r\n\r\n\t$vendor_commission_percentage = get_user_meta(get_current_user_id(), '_vendor_commission_percentage', true);\r\n\t$vendor_commission_fixed_with_percentage = get_user_meta(get_current_user_id(), '_vendor_commission_fixed_with_percentage_qty', true);\r\n\r\n\t$general_commission_percentage = $WCMp->vendor_caps->payment_cap['default_percentage'];\r\n\t$general_commission_fixed = $WCMp->vendor_caps->payment_cap['fixed_with_percentage_qty'];\r\n\r\n\r\n\tif ($WCMp->vendor_caps->payment_cap['commission_type'] == 'fixed_with_percentage_qty') {\r\n\t\t\t$fixed = 0 ;\r\n\t\t\t$percentage = 0;\r\n\t\t\t// if there are commission of this product\r\n\t\t\tif($commission_percentage_per_poduct > 0 || $commission_fixed_with_percentage_qty > 0){\r\n\t\t\t\t// echo '1';\r\n\t\t\t\t$commission_percentage_per_poduct = !empty($commission_percentage_per_poduct)? $commission_percentage_per_poduct : 0 ;\r\n\t\t\t\t$commission_fixed_with_percentage_qty = !empty($commission_fixed_with_percentage_qty)? $commission_fixed_with_percentage_qty : 0 ;\r\n\t\t\t\t$fixed = $commission_fixed_with_percentage_qty ;\r\n\t\t\t\t$percentage = $commission_percentage_per_poduct;\r\n\t\t\t}\r\n\t\t\t// if there are commission for this vendor\r\n\t\t\telse if($vendor_commission_percentage > 0 || $vendor_commission_fixed_with_percentage > 0){\r\n\t\t\t\t$vendor_commission_percentage = !empty($vendor_commission_percentage)? $vendor_commission_percentage : 0 ;\r\n\t\t\t\t$vendor_commission_fixed_with_percentage = !empty($vendor_commission_fixed_with_percentage)? $vendor_commission_fixed_with_percentage : 0 ;\r\n\t\t\t\t$fixed = $vendor_commission_percentage ;\r\n\t\t\t\t$percentage = $vendor_commission_fixed_with_percentage;\r\n\t\t\t}\r\n\t\t\t// then use the general commission\r\n\t\t\telse{\r\n\t\t\t\t$general_commission_percentage = !empty($general_commission_percentage)? $general_commission_percentage : 0 ;\r\n\t\t\t\t$general_commission_fixed = !empty($general_commission_fixed)? $general_commission_fixed : 0 ;\r\n\t\t\t\t$fixed = $general_commission_percentage ;\r\n\t\t\t\t$percentage = $general_commission_fixed;\r\n\t\t\t}\r\n\t\t\t$currency = get_woocommerce_currency();\r\n\r\n\t\t\techo '<script>';\r\n\t\t\t// echo \"$('#product_type').change(function(){\r\n\t\t\t// \tvar val = $( this ).val();\";\r\n\t\t\t// echo \"if( val === 'simple'){\";\r\n\t\t\techo \"$('#regular_price').after('<span class=\\\"commission_span\\\" id =\\\"comm_reg\\\"></span><br>');\";\r\n\t\t\techo \"$('#sale_price').after('<span class=\\\"commission_span\\\" id =\\\"comm_s\\\"></span><br>');\";\r\n\t\t\techo generate_script_of_print_commission($fixed,$percentage,\"regular_price\",\"comm_reg\",$currency);\r\n\t\t\techo generate_script_of_print_commission($fixed,$percentage,\"sale_price\",\"comm_s\",$currency);\r\n\t\t\t// echo \"} \"; // variations_regular_price_0\r\n\t\t\t// echo \"if( val === 'variable'){ \";\r\n\t\t\t// echo \"$('#regular_price').after('<span class=\\\"commission_span\\\" id =\\\"comm_reg\\\"></span><br>');\";\r\n\t\t\t// echo \"$('#sale_price').after('<span class=\\\"commission_span\\\" id =\\\"comm_s\\\"></span><br>');\";\r\n\t\t\t// echo generate_script_of_print_commission($fixed,$percentage,\"regular_price\",\"comm_reg\",$currency);\r\n\t\t\t// echo generate_script_of_print_commission($fixed,$percentage,\"sale_price\",\"comm_s\",$currency);\r\n\t\t\t// echo \"}\";\r\n\t\t\techo '</script>';\r\n\t}\r\n}", "protected function manually_priced() {\r\n $account_product = new AccountProduct();\r\n\r\n $products = $account_product->get_manually_priced_by_account( $this->user->account->id );\r\n\r\n $this->resources->javascript( 'products/manually-priced' );\r\n\r\n $response = $this->get_template_response( 'manually-priced' )\r\n ->kb( 142 )\r\n ->add_title( _('Manually Priced Products') )\r\n ->menu_item( 'products/products/manually-priced' )\r\n ->set( compact( 'products' ) );\r\n\r\n return $response;\r\n }", "public function getPolicyString()\n {\n return $this->_policyString;\n\n }", "public function getPolicy()\n\t{\n\t\treturn $this->policy;\n\t}", "function wc_print_notice($message, $notice_type = 'success', $data = array(), $return = \\false)\n {\n }", "public function getPolicy()\n {\n return $this->policy;\n }", "public function getPolicy()\n {\n return $this->policy;\n }", "function woocommerce_pip_page() {\n\n\t//Check the user capabilities\n\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce-pip' ) );\n\t}\n\t//Load needed WP resources for media uploader\n\twp_enqueue_media();\n\n\t//Save the field values\n\tif ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) {\n\t\tforeach ( $_POST as $key => $value ) {\n\t\t\tif ( $key == 'woocommerce_pip_invoice_start' && isset( $_POST['woocommerce_pip_reset_start'] ) ) {\n\t\t\t\tif ( $_POST['woocommerce_pip_reset_start'] == 'Yes' ) {\n\t\t\t\t\tupdate_option( $key, ltrim( $value, '0') );\n\t\t\t\t}\n\t\t\t} elseif ( $key == 'woocommerce_pip_reset_start' ) {\n\t\t\t} else {\n\t\t\t\tif ( get_option( $key ) != $value ) {\n\t\t\t\t\tupdate_option( $key, $value );\n\t\t\t\t} else {\n\t\t\t\t\tadd_option( $key, $value, '', 'no' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t?>\n\t<div class=\"wrap\">\n\t\t<div id=\"icon-options-general\" class=\"icon32\">\n\t\t\t<br />\n\t\t</div>\n\t\t<h2><?php _e( 'WooCommerce - Print invoice/packing list settings', 'woocommerce-pip' ); ?></h2>\n\t\t<?php if ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) { ?>\n\t\t<div id=\"message\" class=\"updated fade\"><p><strong><?php _e( 'Your settings have been saved.', 'woocommerce-pip' ); ?></strong></p></div>\n\t\t<?php } ?>\n\t\t<p><?php _e( 'Change settings for print invoice/packing list.', 'woocommerce-pip' ); ?></p>\n\t\t<div id=\"content\">\n\t\t\t <form method=\"post\" action=\"\" id=\"pip_settings\">\n\t\t\t\t<input type=\"hidden\" name=\"pip_fields_submitted\" value=\"submitted\">\n\t\t\t\t<div id=\"poststuff\">\n\t\t\t\t\t<div class=\"postbox\">\n\t\t\t\t\t\t<h3 class=\"hndle\"><?php _e( 'Settings', 'woocommerce-pip' ); ?></h3>\n\t\t\t\t\t\t<div class=\"inside pip-preview\">\n\t\t\t\t\t\t\t <table class=\"form-table\">\n\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_name\"><b><?php _e( 'Company name:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_company_name\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_company_name' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom company name for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_logo\"><b><?php _e( 'Custom logo:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input id=\"woocommerce_pip_logo\" type=\"text\" size=\"36\" name=\"woocommerce_pip_logo\" value=\"<?php echo get_option( 'woocommerce_pip_logo' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<input id=\"upload_image_button\" type=\"button\" value=\"<?php _e( 'Upload Image', 'woocommerce-pip' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom logo for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to use a custom logo.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_extra\"><b><?php _e( 'Company extra info:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_company_extra\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_company_extra' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Some extra info that is displayed under company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print the info.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_return_policy\"><b><?php _e( 'Returns Policy, Conditions, etc.:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_return_policy\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_return_policy' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Here you can add some policies, conditions etc. For example add a returns policy in case the client would like to send back some goods.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print any policy.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_footer\"><b><?php _e( 'Custom footer:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_footer\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_footer' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom footer for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a footer.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_start\"><b><?php _e( 'Invoice counter start:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"woocommerce_pip_reset_start\" name=\"woocommerce_pip_reset_start\" value=\"Yes\" /> <?php _e( 'Reset invoice numbering', 'woocommerce-pip' ); ?><br />\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" readonly=\"true\" id=\"woocommerce_pip_invoice_start\" name=\"woocommerce_pip_invoice_start\" class=\"regular-text\" value=\"<?php echo wp_kses_stripslashes( get_option( 'woocommerce_pip_invoice_start' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Reset the invoice counter to start your custom position for example 103. Leading zeros will be trimmed. Use prefix instead.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'You need to check the checkbox to actually reset the value.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_prefix\"><b><?php _e( 'Invoice numbering prefix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_prefix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_prefix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom prefix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_suffix\"><b><?php _e( 'Invoice numbering suffix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_suffix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_suffix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom suffix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Preview before printing:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_preview' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Send invoice as HTML email:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t <p class=\"submit\">\n\t\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', 'woocommerce-pip' ); ?>\" />\n\t\t\t </p>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<?php\n}", "function simplypay(){\r\n\t if(isset($_GET['i'])){\r\n\t global $wpdb;\r\n\t $sql_result = $wpdb->get_results(\r\n\t 'select\r\n p.order_id,\r\n p.order_item_id,\r\n p.order_item_name,\r\n p.order_item_type,\r\n pm.meta_value \r\n from\r\n '.$wpdb->prefix.'woocommerce_order_items as p,\r\n '.$wpdb->prefix.'woocommerce_order_itemmeta as pm\r\n where order_item_type = \\'line_item\\' \r\n and p.order_item_id = pm.order_item_id\r\n and pm.meta_key = \\'product-ivnum\\' \r\n and p.order_item_id = pm.order_item_id \r\n and pm.meta_value = \\''.$_GET['i'].'\\'\r\n group by\r\n p.order_item_id'\r\n );\r\n\t if(sizeof($sql_result)>0){\r\n\t if(empty($_GET['debug'])) {\r\n wp_die(__('This invoice had already been payed!', 'simply'));\r\n $url = home_url() . '/duplicate-invoice';\r\n wp_redirect($url);\r\n exit;\r\n }\r\n }\r\n\t\t $cart_item_data['_other_options']['product-ivnum'] = $_GET['i'] ;\r\n\t\t // get the customer info according to the IVNUM\r\n $customer_info = [\r\n 'docno' => $_GET['i'],\r\n 'price' => $_GET['pr']\r\n ];\r\n // need to filter here\r\n $customer_info = apply_filters( 'simply_request_customer_data', $customer_info );\r\n $cart_item_data['_other_options']['product-price'] = $customer_info['price'] ;\r\n\t\t WC()->session->set(\r\n\t\t\t 'session_vars',\r\n\t\t\t array(\r\n\t\t\t\t 'ordertype' => 'Recipe',\r\n 'custname' => isset($_GET['c']) ? $_GET['c'] : null,\r\n 'first_name' => $customer_info['first_name'],\r\n 'last_name' => $customer_info['last_name'],\r\n 'street_address' => $customer_info['street'],\r\n 'postcode' => $customer_info['postcode'],\r\n 'city' => $customer_info['city'],\r\n 'phone' => $customer_info['phone'],\r\n 'email' => $customer_info['email'],\r\n 'data' => $customer_info['data'] // for extra custom fields\r\n )\r\n\t\t );\r\n\t\t return $cart_item_data;\r\n\t }\r\n }", "function wc_privacy_policy_text($type = 'checkout')\n {\n }", "public function get_product_policy($product_id=\"\"){\n\t\t $result = $this->db->from(\"product_policy\")->where(array(\"product_id\"=>$product_id))->get();\n\t\t return $result;\n\t}", "public function getCurrentPolicy() { }", "function woocommerce_pip_my_orders_action( $actions, $order ) {\n\n\tif ( in_array( $order->status, array( 'processing', 'completed' ) ) ) {\n\t\t$actions[] = array(\n\t\t\t'url'\t => wp_nonce_url( site_url( '?print_pip_invoice=true&post='.$order->id ), 'client-print-pip' ),\n\t\t\t'name' => __( 'View invoice', 'woocommerce-pip' )\n\t\t);\n\t}\n\treturn $actions;\n}", "private static function _get_return_notices()\n {\n }", "function expected_output(){\n\t\t$html = '<div id=\"message\" class=\"error\">';\n\t\t$html .= '<p>Hide Reviews for WooCommerce expects WooCommerce to be active. This plugin has been deactivated.</p>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "public function hookPaymentReturn($params) {\n //PBX_REFUSE,PBX_EFFECTUE,PBX_ANNULE \n \n $status = Tools::getValue('status','');\n \n switch ($status){\n case 'PBX_EFFECTUE' : // a priori paiement effectué\n // verif si commande enregistrée et payée\n break;\n default :\n break;\n // paiement non effectué\n }\n \n // url de retour du client vers le site\n \n \n \n\t\treturn $this->display(__FILE__, 'payment_return.tpl');\n\t}", "function wc_get_privacy_policy_text($type = '')\n {\n }", "public static function processOpenidPolicy() {\n $output = file_get_contents(dirname(__FILE__) . \"/resources/openid_policy.html\");\n print $output;\n die();\n }", "public function content_request_warranty() {\n dokan_get_template_part( 'rma/customer-order', '', array(\n 'is_rma' => true,\n ) );\n }", "private function getConfiguredPolicy()\n { return eval('return ' . $this->config()->access_control_policy . ';');\n }", "function brisk_woocommerce_callback() {\n echo '<p class=\"brisk-subheading\">' . __('Disable specific elements of WooCommerce.', 'brisk') . '</p>';\n}", "function receipt_page( $order ) {\r\n\t\t\techo '<p>' . __( 'Thank you - your order is now pending payment. You should be automatically redirected to Interswitch to make payment.', 'woocommerce' ) . '</p>';\r\n\t\t\techo $this->generate_webpay_form( $order );\r\n\t\t}", "function wc_registration_privacy_policy_text()\n {\n }", "function wpm($var, $max_levels = 20, $return_as_string = FALSE) {\n \n // Complex variable? Change it to print_r.\n $str = $var;\n if (is_array($str) || is_object($str)) {\n $str = \"<div class='ws-html-print-r-wrapper'>\" . ws_html_print_r($str, \"\", 0, $max_levels) . \"</div>\";\n } \n\n $arr = debug_backtrace();\n //pretty_print($arr);\n $file = $arr[0][\"file\"];\n if (strlen($file) > 70) {\n $file = \"...\" . substr($file, strlen($file) - 70);\n }\n $str .= \"<div class='ws-message-backtrace'>line {$arr[0][\"line\"]}: $file</div>\";\n\n \n $rtn = \"\";\n \n if (@$GLOBALS[\"ws_already_wspm_styles\"] != TRUE) {\n \n // We haven't put in our styles yet, so let's add them now.\n $rtn .= \"<style>\n \n .ws-html-print-r-wrapper {\n font-size: 0.9em;\n font-family: Arial, Verdana, sans serif; \n }\n \n .ws-html-print-r-multi-row {\n background-color: lightcyan;\n border: 1px solid #bbb;\n padding: 5px; \n }\n \n .ws-html-print-r-multi-row .ws-html-print-r-selector {\n cursor: pointer; \n }\n \n .ws-html-print-r-multi-row > .ws-html-print-r-var-value {\n padding-left: 30px;\n }\n \n .ws-html-print-r-single-row {\n border-top: 1px solid #bbb;\n }\n \n .ws-html-print-r-var-name {\n color: #404000;\n font-weight: bold;\n }\n \n .ws-html-print-r-var-type {\n font-style: italic;\n }\n \n .ws-html-print-r-single-row .ws-html-print-r-var-value {\n font-weight: bold;\n }\n \n </style>\n \n <script type='text/javascript'>\n \n \n // Similar to jquery toggle.\n function ws_toggle_element(id) {\n \n var e = document.getElementById(id);\n if (e.style.display != 'none') {\n e.style.display = 'none';\n }\n else {\n e.style.display = 'block';\n }\n \n }\n \n \n </script>\n \n \n \";\n \n $GLOBALS[\"ws_already_wspm_styles\"] = TRUE;\n }\n \n \n $rtn .= \"<div class='wspm-message'>&bull; $str</div>\";\n\n \n if ($return_as_string) return $rtn;\n \n print $rtn;\n \n \n}", "function premium_content_for_popups(){\n ?><div id=\"printLoyoutModal\" class=\"modal\" >\n <div class=\"modal-header\">\n <!--a class=\"close\" data-dismiss=\"modal\">&times;</a-->\n\n <div style=\"text-align:right;\">\n\n <a href=\"javascript:void(0);\"\n onclick=\"javascript:\n jQuery( '#print_loyout_content_action' ).print();\n //window.print();\n jQuery('#printLoyoutModal').modal('hide');\n jQuery('#print_loyout_content').html('');\n \"\n class=\"button button-primary\" >\n <?php _e('Print' ,'booking'); ?>\n </a>\n <a href=\"javascript:void(0)\" class=\"button\" data-dismiss=\"modal\"><?php _e('Close' ,'booking'); ?></a>\n </div>\n <h3 style=\"margin-top:-27px;\"><?php _e('Print bookings' ,'booking'); ?></h3>\n </div>\n <div class=\"modal-body\">\n <div id=\"print_loyout_content_action\" class=\"\">\n <div id=\"print_loyout_content\" class=\"wpdevbk\"> ------ </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n </div>\n </div><?php\n }", "function wc_downloadable_product_permissions($order_id, $force = \\false)\n {\n }", "public function sitestoreproductGutterPrint($row) {\n if (!Engine_Api::_()->core()->hasSubject('sitestoreproduct_product')) {\n return false;\n }\n\n //GET SUBJECT\n $sitestoreproduct = Engine_Api::_()->core()->getSubject('sitestoreproduct_product');\n\n return array(\n 'class' => 'buttonlink icon_sitestoreproducts_printer',\n 'route' => \"sitestoreproduct_specific\",\n 'action' => 'print',\n 'target' => '_blank',\n 'params' => array(\n 'product_id' => $sitestoreproduct->getIdentity(),\n ),\n );\n }", "public function getInternationalReturnPolicyDetails()\n {\n return $this->internationalReturnPolicyDetails;\n }", "function wc_get_price_to_display($product, $args = array())\n {\n }", "function wc_get_loop_product_visibility($product_id)\n {\n }", "function print_notice($header_text = '', $body_text = '', $return_url = '', $return_name = '', $custom = '', $crumb = '')\n{\n global $ilance, $myapi, $phrase, $breadcrumb, $page_title, $area_title, $ilconfig, $ilpage, $show; \n $header = $header_text; $body = $body_text; $return = $return_url; $returnname = $return_name;\n \n global $header_text, $body_text, $return_url, $return_name, $show;\n $header_text = $header; $body_text = $body; $return_url = $return; $return_name = $returnname;\n \n $show['widescreen'] = false;\n \n $area_title = $header_text;\n $page_title = SITE_NAME . ' - ' . $header_text;\n \n if (is_array($custom) AND !empty($custom))\n {\n $text = '<div style=\"padding-top:12px\"><hr size=\"1\" width=\"100%\" style=\"color:#cccccc; margin-bottom:6px\" /><strong>' . $phrase['_detailed_permissions_information'] . '</strong></div><div style=\"padding-top:3px\"><span class=\"gray\">' . $phrase['_subscription_permission_required_for_this_resource'] . '</span> <span class=\"blue\"><strong>' . ucwords($custom['text']) . '</strong></span></div><div><em>&quot;' . $custom['description'] . '&quot;</em></div>';\n $body_text .= $text;\n }\n\t\t\n\t\t if($crumb == '1')\n \n {\n $breadcrumbtrail = '';\n\t\t\n\t\t $breadcrumbfinal = '';\n\t\t \n\t\t $pprint_array = array('body_text','header_text','return_url','return_name','login_include','headinclude','onload','area_title','page_title','site_name','https_server','http_server','lanceads_header','lanceads_footer','breadcrumbtrail','breadcrumbfinal');\n\t\t \n\t\t}\n\t\t\n\t\telse\n\t\t\n\t\t{ \n\t\t\n \n $pprint_array = array('body_text','header_text','return_url','return_name','login_include','headinclude','onload','area_title','page_title','site_name','https_server','http_server','lanceads_header','lanceads_footer');\n\t\t\n\t\t}\n \n ($apihook = $ilance->api('print_notice_end')) ? eval($apihook) : false;\n \n $ilance->template->fetch('main', 'print_notice.html');\n $ilance->template->parse_hash('main', array('ilpage' => $ilpage));\n $ilance->template->parse_if_blocks('main');\n $ilance->template->pprint('main', $pprint_array);\n exit();\n}", "function wc_display_product_attributes($product)\n {\n }", "public function get_policy()\n\t{\n\t\treturn base64_encode($this->json_policy);\n\t}", "function erp_hr_leave_get_policies( $args = array() ) {\n global $wpdb;\n\n $defaults = array(\n 'number' => 99,\n 'offset' => 0,\n 'orderby' => 'id',\n 'order' => 'ASC',\n 'department_id' => '',\n 'location_id' => '',\n 'designation_id' => '',\n 'gender' => '',\n 'marital' => '',\n 'f_year' => '0',\n );\n\n $args = wp_parse_args( $args, $defaults );\n\n // sanitize inputs\n array_walk_recursive( $args, function( &$value, $key ) {\n $value = wp_unslash( $value );\n switch ( $key ) {\n case 'number':\n case 'offset':\n case 'department_id':\n case 'location_id':\n case 'designation_id':\n case 'f_year':\n $value = intval( $value );\n break;\n\n case 'orderby':\n case 'order':\n case 'gender':\n case 'marital':\n $value = sanitize_text_field( $value );\n break;\n\n default:\n $value = sanitize_text_field( $value );\n break;\n }\n } );\n\n $cache_key = 'erp-get-policies-' . md5( serialize( $args ) );\n $policies = wp_cache_get( $cache_key, 'erp' );\n\n if ( false === $policies ) {\n $policies = Leave_Policy::select( \\WeDevs\\ORM\\Eloquent\\Facades\\DB::raw( 'SQL_CALC_FOUND_ROWS *' ))\n ->skip( $args['offset'] )\n ->take( $args['number'] )\n ->orderBy( $args['orderby'], $args['order'] );\n\n if ( $args['department_id'] ) {\n $policies->where( 'department_id', '=', $args['department_id'] );\n }\n\n if ( $args['location_id'] ) {\n $policies->where( 'location_id', '=', $args['location_id'] );\n }\n\n if ( $args['designation_id'] ) {\n $policies->where( 'designation_id', '=', $args['designation_id'] );\n }\n\n if ( $args['gender'] ) {\n $policies->where( 'gender', '=', $args['gender'] );\n }\n\n if ( $args['marital'] ) {\n $policies->where( 'marital', '=', $args['marital'] );\n }\n\n if ( $args['f_year'] ) {\n $policies->where( 'f_year', '=', $args['f_year'] );\n }\n\n $policies = $policies->get();\n\n $total_row_found = absint( $wpdb->get_var( \"SELECT FOUND_ROWS()\" ) );\n\n $formatted_data = array();\n\n foreach( $policies as $key => $policy ) {\n $department = empty( $policy->department ) ? esc_attr__('All', 'erp') : $policy->department->title;\n $designation = empty( $policy->designation ) ? esc_attr__('All', 'erp') : $policy->designation->title;\n $gender = $policy->gender == '-1' ? esc_attr__('All', 'erp') : ucwords( $policy->gender );\n $marital = $policy->marital == '-1' ? esc_attr__('All', 'erp') : ucwords( $policy->marital );\n $location = $policy->location_id == '-1' ? esc_attr__('All', 'erp') : $policy->location->name;\n\n $formatted_data[$key]['id'] = $policy->id;\n $formatted_data[$key]['leave_id'] = $policy->leave_id;\n $formatted_data[$key]['name'] = $policy->leave->name;\n $formatted_data[$key]['description'] = $policy->description;\n $formatted_data[$key]['days'] = $policy->days;\n $formatted_data[$key]['color'] = $policy->color;\n $formatted_data[$key]['department_id'] = $policy->department_id;\n $formatted_data[$key]['department'] = $department;\n $formatted_data[$key]['designation_id'] = $policy->designation_id;\n $formatted_data[$key]['designation'] = $designation;\n $formatted_data[$key]['location'] = $location;\n $formatted_data[$key]['f_year'] = $policy->financial_year->fy_name;\n $formatted_data[$key]['gender'] = $gender;\n $formatted_data[$key]['marital'] = $marital;\n }\n\n $policies = erp_array_to_object( $formatted_data );\n wp_cache_set( $cache_key, $policies, 'erp' );\n }\n\n return array( 'data' => $policies, 'total' => $total_row_found );\n}", "function toolbelt_cookie_message() {\n\n\t// Privacy policy message.\n\t/* Translators: %s = privacy policy link */\n\t$message = esc_html__( 'By using this website, you agree to our %s', 'wp-toolbelt' );\n\t$link = esc_html__( 'cookie policy', 'wp-toolbelt' );\n\n\t// If there's a privacy policy page then link to it.\n\t$privacy_policy_link = get_the_privacy_policy_link();\n\tif ( ! empty( $privacy_policy_link ) ) {\n\t\t$link = $privacy_policy_link;\n\t}\n\n\t// Merge the message and the link.\n\t$message = sprintf( $message, $link );\n\n\treturn apply_filters( 'toolbelt_cookie_message', $message );\n\n}", "function woocommerce_output_auth_footer()\n {\n }", "public function getItemPolicy()\n {\n return $this->getValueObject('item_policy');\n }", "public function hyperterms($id){\n\t$product = DB::table('product')->where('id',$id)->first();\n\t$hyperterms = \"\";\n\tif(!is_null($product)){\n\t\t$hyperterms = $product->return_policy;\n\t}\n\treturn $hyperterms;\n}", "public function printReceipt() {\n\t\t?>\n\t\t<!-- Hide the Order Panel -->\n\t\t<style type=\"text/css\">#orderPanel { display:none; } </style>\n\t\t<?php\n\t\t\n\t\t$strHTML = \"<h3>Thanks for ordering!</h3><table class='gridtable'>\";\n\t\t$strHTML .= \"<tr><th>Product:</th><td>\".$this->product.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Name:</th><td>\".$this->first_name .\" \". $this->last_name.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Unit Price:</th><td>\" . $this->unit_price .\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Discount Rate:</th><td>\".$this->discount_rate.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Order Total:</th><td>\".$this->getTotal().\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Order Date:</th><td>\".$this->order_date.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Payment Type:</th><td>\".$this->payment_type.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Payment Info:</th><td>\". $this->processPayment() .\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Today's Date:</th><td>\".date('F j, Y').\"</td></tr>\";\n\t\t$strHTML .= \"</table><br/>\";\n\t\t$strHTML .= \"<p><form action='/portfolio/projects/loanproject/product_order.php'>\";\n\t\t$strHTML .= \"<input type='submit' value='Place New Order' /></form></p>\";\n\t\treturn $strHTML;\t\n\t}", "function wc_paying_customer($order_id)\n {\n }", "public function getRecoupmentPolicyDetails()\n {\n return $this->recoupmentPolicyDetails;\n }", "function wc_get_orders($args)\n {\n }", "function woocommerce_pip_create_box_content() {\n\n\tglobal $post_id;\n\n\t?>\n\t<table class=\"form-table\">\n\t\t<?php if ( get_post_meta( $post_id, '_pip_invoice_number', true ) ) { ?>\n\t\t<tr>\n\t\t\t<td><?php _e( 'Invoice: #', 'woocommerce-pip' ); echo get_post_meta( $post_id, '_pip_invoice_number', true ); ?></td>\n\t\t</tr>\n\t\t<?php } ?>\n\t\t<tr>\n\t\t\t<td><a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_invoice' ), 'print-pip' ); ?>\"><?php _e('Print Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_packing' ), 'print-pip' ); ?>\"><?php _e( 'Print Packing List', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { ?>\n\t\t\t\t<a class=\"button pip-email\" href=\"<?php echo wp_nonce_url( admin_url( '?email_pip=true&post=' . $post_id ), 'email-pip' ); ?>\"><?php _e( 'Send Email Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php } ?>\n\t\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php\n}", "function process_verotel_response() {\r\n\t\t\t@ob_clean();\r\n\t \r\n\t\t\t$responseAction = $_REQUEST['Action'] != null ? $_REQUEST['Action'] : '';\r\n\t\t\t$eventAction = ( isset($_REQUEST['event']) ) ? $_REQUEST['event'] : ''; // Subscriptions have events associated with the action\r\n\r\n\t\t\tglobal $woocommerce;\r\n\t\t\t\r\n\t\t\tswitch(strToLower($responseAction)) \r\n\t\t\t{\r\n\t\t\t case 'checkoutsuccess':\r\n\t\t\t\twp_die('<p>Thank you for your order. Your payment has been approved.</p><p><a href=\"' . get_permalink( get_option('woocommerce_myaccount_page_id') ) . '\" title=\"' . _e('My Account','woothemes') . '\">My Account</a></p><p><a href=\"?\">Return Home</a></p>', array( 'response' => 200 ) );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t case 'approval_post':\r\n\r\n\t\t\t \t\t// We may have a transactionID or a referenceID\r\n\t\t\t\t\t$referenceID = 0;\r\n\r\n\t\t\t\t\tif( isset($_REQUEST['transactionID']) )\r\n\t\t\t\t\t\t$referenceID = $_REQUEST['transactionID'];\r\n\r\n\t\t\t\t\tif( isset($_REQUEST['referenceID']) ) // Always fallback to a referenceID\r\n\t\t\t\t\t\t$referenceID = $_REQUEST['referenceID'];\r\n\r\n\t\t\t\t\t$order = new WC_Order( $referenceID );\r\n\r\n\r\n\t\t\t\t\tif( $order === false || !$order->id > 0 )\r\n\t\t\t\t\t\twp_die( \"Unable to find the requested order\", \"Verotel API\", array( 'response' => 200 ) );\r\n\r\n\t\t\t\t\t// No action is a standard request\r\n\t\t\t \t\tif( $eventAction == '' )\r\n\t\t\t \t\t{\r\n\t\t\t\t\t\t$order->add_order_note( __( 'PDT payment completed', 'woocommerce' ) .\"\\nVerotel Payment Reference: \".$_REQUEST['saleID']);\r\n\t\t\t\t\t\t$order->payment_complete();\r\n\t\t\t\t\t\tprint \"OK\"; \r\n\t\t\t\t\t\texit;\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$response = null;\r\n\r\n\r\n\t\t\t \t\t\tswitch(strToLower($eventAction))\r\n\t\t\t \t\t\t{\r\n\t\t\t \t\t\t\tcase 'initial':\r\n\t\t\t \t\t\t\tcase 'rebill': // Gateway has sent a subscription renewal request\r\n\t\t\t \t\t\t\t\t$response = $this->gateway_subscription_payment($order);\r\n\t\t\t \t\t\t\t\tbreak;\r\n\r\n\t\t\t \t\t\t\tcase 'chargeback':\r\n\t\t\t \t\t\t\tcase 'cancel':\r\n\t\t\t \t\t\t\t\t$response = $this->gateway_cancel_payment($order);\r\n\t\t\t \t\t\t\t\tbreak;\r\n\t\t\t \t\t\t}\r\n\r\n\t\t\t \t\t\tif( $response === true )\r\n\t\t\t \t\t\t{\r\n\t\t\t \t\t\t\tprint \"OK\";\r\n\t\t\t \t\t\t\texit;\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\tif( $response === null )\r\n\t\t\t \t\t\t\t{\r\n\t\t\t\t\t\t\t\twp_die( \"Unknown Event Action Given: \" . $eventAction, \"Verotel API\", array( 'response' => 200 ) );\r\n\t\t\t \t\t\t\t}\r\n\t\t\t \t\t\t\telse \r\n\t\t\t \t\t\t\t{\r\n\t\t\t \t\t\t\t\twp_die( \"Renewal failure\", \"Verotel API\", array( 'response' => 200 ) );\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}\r\n\r\n\t\t\t \t\t}\r\n\t\t\t\t\t \r\n\t\t\t\tbreak;\r\n\r\n\t\t\t default: \r\n\t\t\t \twp_die( \"Unknown Action Given\", \"Verotel API\", array( 'response' => 200 ) );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "function wpsc_product_rater() {\n\tglobal $wpsc_query;\n\t$product_id = get_the_ID();\n\t$output = '';\n\tif ( get_option( 'product_ratings' ) == 1 ) {\n\t\t$output .= \"<div class='product_footer'>\";\n\n\t\t$output .= \"<div class='product_average_vote'>\";\n\t\t$output .= \"<strong>\" . __( 'Avg. Customer Rating', 'wpsc' ) . \":</strong>\";\n\t\t$output .= wpsc_product_existing_rating( $product_id );\n\t\t$output .= \"</div>\";\n\n\t\t$output .= \"<div class='product_user_vote'>\";\n\n\t\t$output .= \"<strong><span id='rating_\" . $product_id . \"_text'>\" . __( 'Your Rating', 'wpsc' ) . \":</span>\";\n\t\t$output .= \"<span class='rating_saved' id='saved_\" . $product_id . \"_text'> \" . __( 'Saved', 'wpsc' ) . \"</span>\";\n\t\t$output .= \"</strong>\";\n\n\t\t$output .= wpsc_product_new_rating( $product_id );\n\t\t$output .= \"</div>\";\n\t\t$output .= \"</div>\";\n\t}\n\treturn $output;\n}", "public function privacy_policy_content() {\r\n\t\tif ( ! function_exists( 'wp_add_privacy_policy_content' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$content = sprintf(\r\n\t\t\t'<h3>%s</h3><p>%s</p>',\r\n\t\t\t__( 'Third parties', 'wphb' ),\r\n\t\t\tsprintf(\r\n\t\t\t\t/* translators: %s: start of a href tag, %s: end of a tag */\r\n\t\t\t\t__( 'Hummingbird uses the Stackpath Content Delivery Network (CDN). Stackpath may store web log information of site visitors, including IPs, UA, referrer, Location and ISP info of site visitors for 7 days. Files and images served by the CDN may be stored and served from countries other than your own. Stackpath’s privacy policy can be found %1$shere%2$s.', 'wphb' ),\r\n\t\t\t\t'<a href=\"https://www.stackpath.com/legal/privacy-statement/\" target=\"_blank\">',\r\n\t\t\t\t'</a>'\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\twp_add_privacy_policy_content(\r\n\t\t\t__( 'Hummingbird', 'wphb' ),\r\n\t\t\twp_kses_post( wpautop( $content, false ) )\r\n\t\t);\r\n\t}", "function wc_privacy_policy_page_id()\n {\n }", "function woocommerce_pip_print_logo() {\n\n\tif ( get_option( 'woocommerce_pip_logo' ) != '' ) {\n\t\treturn '<img src=\"' . get_option( 'woocommerce_pip_logo' ) . '\" /><br />';\n\t}\n}", "function check_webpay_response( $posted ){\r\n\t\t\tglobal $woocommerce;\r\n\r\n\t\t\tif( isset( $_GET['reference'] ) ){\r\n\r\n\t\t\t\t$txnref \t\t= $_GET['reference'];\r\n\t\t\t\t$order_details \t= explode('_', $txnref);\r\n\t\t\t\t$txn_ref \t\t= $order_details[0];\r\n\t\t\t\t$order_id \t\t= $order_details[1];\r\n\r\n\t\t\t\t$order_id \t\t= (int) $order_id;\r\n\r\n\t\t $order \t\t\t= new WC_Order($order_id);\r\n\t\t $order_total\t= $order->get_total();\r\n\r\n\t\t $total = $order_total * 100;\r\n\r\n//\t\t $response = $this->tbz_webpay_transaction_details( $txnref, $total);\r\n\r\n//\t\t\t\t$response_code \t= $response['ResponseCode'];\r\n//\t\t\t\t$amount_paid = $response['Amount'] / 100;\r\n//\t\t\t\t$response_desc = $response['ResponseDescription'];\r\n\r\n $response_code \t= '00';\r\n\t\t\t\t$amount_paid = 15;\r\n\t\t\t\t$response_desc = 'hz hz';\r\n\r\n\t\t\t\t// after payment hook\r\n do_action('tbz_wc_webpay_after_payment', $_POST, $response );\r\n\r\n\t\t\t\t//process a successful transaction\r\n\t\t\t\tif( '00' == $response_code){\r\n\r\n\t\t\t\t\t// check if the amount paid is equal to the order amount.\r\n\t\t\t\t\tif($order_total != $amount_paid)\r\n\t\t\t\t\t{\r\n\r\n\t\t //Update the order status\r\n\t\t\t\t\t\t$order->update_status('on-hold', '');\r\n\r\n\t\t\t\t\t\t//Error Note\r\n\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your payment transaction was successful, but the amount paid is not the same as the total order amount.<br />Your order is currently on-hold.<br />Kindly contact us for more information regarding your order and payment status.<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t\t$message_type = 'notice';\r\n\r\n\t\t\t\t\t\t//Add Customer Order Note\r\n\t $order->add_order_note( $message, 1 );\r\n\r\n\t //Add Admin Order Note\r\n\t $order->add_order_note('Look into this order. <br />This order is currently on hold.<br />Reason: Amount paid is less than the total order amount.<br />Amount Paid was &#8358; '.$amount_paid.' while the total order amount is &#8358; '.$order_total.'<br />Transaction Reference: '.$txnref);\r\n\r\n\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t$woocommerce->cart->empty_cart();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\r\n\t\t if($order->status == 'processing'){\r\n\t\t $order->add_order_note('Payment Via Interswitch Webpay<br />Transaction Reference: '.$txnref);\r\n\r\n\t\t //Add customer order note\r\n\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is currently being processed.<br />We will be shipping your order to you soon.<br /Transaction Reference: '.$txnref, 1);\r\n\r\n\t\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t\tWC()->cart->empty_cart();\r\n\r\n\t\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is currently being processed.<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t\t\t$message_type = 'success';\r\n\t\t }\r\n\t\t else{\r\n\r\n\t\t \tif( $order->has_downloadable_item() ){\r\n\r\n\t\t \t\t//Update order status\r\n\t\t\t\t\t\t\t\t$order->update_status( 'completed', 'Payment received, your order is now complete.' );\r\n\r\n\t\t\t //Add admin order note\r\n\t\t\t $order->add_order_note('Payment Via Interswitch Webpay<br />Transaction Reference: '.$txnref);\r\n\r\n\t\t\t //Add customer order note\r\n\t\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is now complete.<br />Transaction Reference: '.$txnref, 1);\r\n\r\n\t\t\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is now complete.<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t\t\t\t$message_type = 'success';\r\n\r\n\t\t \t}\r\n\t\t \telse{\r\n\r\n\t\t \t\t//Update order status\r\n\t\t\t\t\t\t\t\t$order->update_status( 'processing', 'Payment received, your order is currently being processed.' );\r\n\r\n\t\t\t\t\t\t\t\t//Add admin order noote\r\n\t\t\t $order->add_order_note('Payment Via Interswitch Webpay<br />Transaction Reference: '.$txnref);\r\n\r\n\t\t\t //Add customer order note\r\n\t\t\t \t\t\t\t\t$order->add_order_note('Payment Received.<br />Your order is currently being processed.<br />We will be shipping your order to you soon.<br />Transaction Reference: '.$txnref, 1);\r\n\r\n\t\t\t\t\t\t\t\t$message = 'Thank you for shopping with us.<br />Your transaction was successful, payment was received.<br />Your order is currently being processed.<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t\t\t\t$message_type = 'success';\r\n\t\t \t}\r\n\r\n\t\t\t\t\t\t\t// Reduce stock levels\r\n\t\t\t\t\t\t\t$order->reduce_order_stock();\r\n\r\n\t\t\t\t\t\t\t// Empty cart\r\n\t\t\t\t\t\t\tWC()->cart->empty_cart();\r\n\t\t }\r\n\t }\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//process a failed transaction\r\n\t \t$message = \t'Thank you for shopping with us. <br />However, the transaction wasn\\'t successful, payment wasn\\'t received.<br />Reason: '. $response_desc.'<br />Transaction Reference: '.$txnref;\r\n\t\t\t\t\t$message_type = 'error';\r\n\r\n\t\t\t\t\t//Add Customer Order Note\r\n \t$order->add_order_note( $message, 1 );\r\n\r\n //Add Admin Order Note\r\n \t$order->add_order_note( $message );\r\n\r\n\t //Update the order status\r\n\t\t\t\t\t$order->update_status('failed', '');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n \t$message = \t'Thank you for shopping with us. <br />However, the transaction wasn\\'t successful, payment wasn\\'t received.';\r\n\t\t\t\t$message_type = 'error';\r\n\r\n\t\t\t}\r\n\r\n $notification_message = array(\r\n \t'message'\t=> $message,\r\n \t'message_type' => $message_type\r\n );\r\n\r\n\t\t\tif ( version_compare( WOOCOMMERCE_VERSION, \"2.2\" ) >= 0 ) {\r\n\t\t\t\tadd_post_meta( $order_id, '_transaction_id', $txnref, true );\r\n\t\t\t}\r\n\r\n\t\t\tupdate_post_meta( $order_id, '_tbz_interswitch_wc_message', $notification_message );\r\n\r\n $redirect_url = $this->get_return_url( $order );\r\n\r\n wp_redirect( $redirect_url );\r\n exit;\r\n\t\t}", "function print_auction_bit($projectid = 0, $filtered_auctiontype = '', $project_details = '', $project_state = '', $buynow_price = '', $buynow_qty = '', $reserve = 0, $cid = 0)\n{\n\tglobal $ilance, $myapi, $phrase, $show, $ilconfig;\n \n $html = '';\n \n if ($project_state == 'product')\n {\n if ($project_details == 'unique')\n {\n $html = $phrase['_lowest_unique_bid__single_item'];\n }\n else\n {\n if ($filtered_auctiontype == 'fixed')\n {\n $html = $phrase['_fixed_price_event__multiple_buy_now_option'];\n }\n else if ($filtered_auctiontype == 'regular')\n {\n $other = '';\n if ($reserve > 0)\n {\n $other = $phrase['_plus_reserve_price'];\n }\n if ($buynow_price AND $buynow_qty > 0)\n {\n $other .= ' ' . $phrase['_plus_buy_now_option']; \n }\n \n $html = $phrase['_regular_auction__single_item'] . ' ' . $other;\n } \n }\n }\n else if ($project_state == 'service')\n {\n $html = $phrase['_reverse_auction']; \n }\n \n ($apihook = $ilance->api('print_auction_bit_end')) ? eval($apihook) : false;\n \n\treturn $html;\n}", "function woocommerce_output_all_notices()\n {\n }", "function pmpro_lpv_wp() {\n\tglobal $current_user;\n\tif ( function_exists( 'pmpro_has_membership_access' ) ) {\n\t\t/*\n\t\t\tIf we're viewing a page that the user doesn't have access to...\n\t\t\tCould add extra checks here.\n\t\t*/\n\t\tif ( ! pmpro_has_membership_access() ) {\n\t\t\t/**\n\t\t\t * Filter which post types should be tracked by LPV\n\t\t\t *\n\t\t\t * @since .4\n\t\t\t */\n\t\t\t$pmprolpv_post_types = apply_filters( 'pmprolpv_post_types', array( 'post' ) );\n\t\t\t$queried_object = get_queried_object();\n\t\t\t\n\t\t\tif ( empty( $queried_object ) || empty( $queried_object->post_type ) || ! in_array( $queried_object->post_type, $pmprolpv_post_types, true ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$hasaccess = apply_filters( 'pmprolpv_has_membership_access', true, $queried_object );\n\t\t\tif ( false === $hasaccess ) {\n\t\t\t\tpmpro_lpv_redirect();\n\t\t\t}\n\n\t\t\t// if we're using javascript, just give them access and let JS redirect them.\n\t\t\tif ( defined( 'PMPRO_LPV_USE_JAVASCRIPT' ) && PMPRO_LPV_USE_JAVASCRIPT ) {\n\t\t\t\twp_enqueue_script( 'wp-utils', includes_url( '/js/utils.js' ) );\n\t\t\t\tadd_action( 'wp_footer', 'pmpro_lpv_wp_footer' );\n\t\t\t\tadd_filter( 'pmpro_has_membership_access_filter', '__return_true' );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// PHP is going to handle cookie check and redirect.\n\t\t\t$thismonth = date( 'n', current_time( 'timestamp' ) );\n\t\t\t$level = pmpro_getMembershipLevelForUser( $current_user->ID );\n\t\t\tif ( ! empty( $level->id ) ) {\n\t\t\t\t$level_id = $level->id;\n\t\t\t} else {\n\t\t\t\t$level_id = null;\n\t\t\t}\n\n\t\t\t// check for past views.\t\t\t\n\t\t\tif ( ! empty( $_COOKIE['pmpro_lpv_count'] ) ) {\n\t\t\t\t$month = $thismonth;\n\t\t\t\t$parts = explode( ';', sanitize_text_field( $_COOKIE['pmpro_lpv_count'] ) );\n\t\t\t\tif ( count( $parts ) > 1 ) { // just in case.\n\t\t\t\t\t$month = $parts[1];\n\t\t\t\t} else { // for one-time cookie format migration.\n\t\t\t\t\t$parts[0] = '0,0';\n\t\t\t\t}\n\t\t\t\t$limitparts = explode( ',', $parts[0] );\n\t\t\t\t$levellimits = array();\n\t\t\t\t$length = count( $limitparts );\n\t\t\t\tfor ( $i = 0; $i < $length; $i++ ) {\n\t\t\t\t\tif ( $i % 2 === 1 ) {\n\t\t\t\t\t\t$levellimits[ $limitparts[ $i -1 ] ] = $limitparts[ $i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $month == $thismonth && array_key_exists( $level_id, $levellimits ) ) {\n\t\t\t\t\t$count = $levellimits[ $level_id ] + 1; // same month as other views.\n\t\t\t\t\t$levellimits[ $level_id ]++;\n\t\t\t\t} elseif ( $month == $thismonth ) { // same month, but we haven't ticked yet.\n\t\t\t\t\t$count = 1;\n\t\t\t\t\t$levellimits[ $level_id ] = 1;\n\t\t\t\t} else {\n\t\t\t\t\t$count = 1; // new month.\n\t\t\t\t\t$levellimits = array();\n\t\t\t\t\t$levellimits[ $level_id ] = 1;\n\t\t\t\t\t$month = $thismonth;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// new user.\n\t\t\t\t$count = 1;\n\t\t\t\t$levellimits = array();\n\t\t\t\t$levellimits[ $level_id ] = 1;\n\t\t\t\t$month = $thismonth;\n\t\t\t}\n\n\t\t\t// if count is above limit, redirect, otherwise update cookie.\n\t\t\tif ( defined( 'PMPRO_LPV_LIMIT' ) && $count > PMPRO_LPV_LIMIT ) {\n\t\t\t\tpmpro_lpv_redirect();\n\t\t\t} else {\n\t\t\t\t// give them access and track the view.\n\t\t\t\tadd_filter( 'pmpro_has_membership_access_filter', '__return_true' );\n\n\t\t\t\tif ( defined( 'PMPRO_LPV_LIMIT_PERIOD' ) ) {\n\t\t\t\t\tswitch ( PMPRO_LPV_LIMIT_PERIOD ) {\n\t\t\t\t\t\tcase 'hour':\n\t\t\t\t\t\t\t$expires = current_time( 'timestamp', true ) + HOUR_IN_SECONDS;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'day':\n\t\t\t\t\t\t\t$expires = current_time( 'timestamp', true ) + DAY_IN_SECONDS;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'week':\n\t\t\t\t\t\t\t$expires = current_time( 'timestamp', true ) + WEEK_IN_SECONDS;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'month':\n\t\t\t\t\t\t\t$expires = current_time( 'timestamp', true ) + ( DAY_IN_SECONDS * 30 );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$expires = current_time( 'timestamp', true ) + ( DAY_IN_SECONDS * 30 );\n\t\t\t\t}\n\n\t\t\t\t// put the cookie string back together with updated values.\n\t\t\t\t$cookiestr = '';\n\t\t\t\tforeach ( $levellimits as $curlev => $curviews ) {\n\t\t\t\t\t$cookiestr .= \"$curlev,$curviews\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsetcookie( 'pmpro_lpv_count', $cookiestr . ';' . $month, $expires, '/' );\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}", "function print_action_success($notice = '', $admurl = '')\n{\n\tglobal $ilance, $login_include_admin, $iltemplate, $ilanceversion, $phrase, $v3nav, $page_title, $area_title, $ilconfig, $ilpage, $show;\n \n $notice_temp = $notice; $admurl_temp = $admurl;\n global $notice, $admurl;\n \n $area_title = 'AdminCP - ' . $phrase['_administrative_action_complete'] . ' ' . $phrase['_for'] . ' ' . $_SESSION['ilancedata']['user']['username'];\n $page_title = SITE_NAME . ' - AdminCP - ' . $phrase['_administrative_action_complete'];\n \n ($apihook = $ilance->api('print_action_success')) ? eval($apihook) : false;\n \n $admurl = $admurl_temp; $notice = $notice_temp;\n \n $pprint_array = array('ilanceversion','login_include_admin','notice','admurl','input_style','title','description','bid_controls','buyer_incomespent','buyer_stars','project_title','description','project_type','project_details','project_distance','project_id','bid_details','pmb','project_buyer','projects_posted','projects_awarded','project_currency','project_attachment','distance','subcategory_name','text','prevnext','prevnext2','remote_addr','rid','default_exchange_rate','login_include','headinclude','area_title','page_title','site_name','https_server','http_server','lanceads_header','lanceads_footer');\n \n ($apihook = $ilance->api('admincp_access_success_end')) ? eval($apihook) : false;\n \n $ilance->template->fetch('main', 'action_success.html', 1);\n $ilance->template->parse_hash('main', array('ilpage' => $ilpage));\n $ilance->template->parse_loop('main', 'v3nav');\n $ilance->template->parse_if_blocks('main');\n $ilance->template->pprint('main', $pprint_array);\n exit();\n}", "public function getPolicy()\n {\n return $this->getStaticContent(self::STATIC_POLICY);\n }", "public function printerfriendlyAction() {\n \t\n }", "function lawzone_amount_and_wishlist(){\n \twc_get_template( 'single-product/amount-wishlist.php' );\n }", "private function checkPolicy()\n {\n if (!Gate::getPolicyFor($this->repo)) {\n Gate::policy(get_class($this->repo), $this->getPolicy());\n }\n\n return;\n }", "function wpt_if_no_woocommerce($atts){\n echo '<a title=\"Tell us: if need Help\" href=\"mailto:bealinawaz@gmail.com\" style=\"color: #d00;padding: 10px;\">[WOO Product Table] WooCommerce not Active/Installed</a>';\n}", "public function actionPrivacyPolicy()\n {\n return $this->render('//privacypolicy');\n }", "function get_wc_rbp() {\n\n\t$output = null;\n\t$wc_rbp_general = get_option( 'wc_rbp_general' );\n\n\tif ( function_exists( 'woocommerce_role_based_price' ) && $wc_rbp_general ) {\n\t\t$wc_rbp_allowed_roles = isset( $wc_rbp_general['wc_rbp_allowed_roles'] ) ? $wc_rbp_general['wc_rbp_allowed_roles'] : '';\n\t\t$wc_rbp_allowed_price = isset( $wc_rbp_general['wc_rbp_allowed_price'] ) ? $wc_rbp_general['wc_rbp_allowed_price'] : '';\n\n\t\tif ( $wc_rbp_allowed_roles ) {\n\t\t\t$output = array();\n\t\t\tforeach ( $wc_rbp_allowed_roles as $role ) {\n\t\t\t\tforeach ( $wc_rbp_allowed_price as $price_type ) {\n\t\t\t\t\t$field_name = $price_type . '_' . $role;\n\t\t\t\t\t$price_list = get_option( 'wcifd_' . $field_name );\n\n\t\t\t\t\t$output[ $role ][ $price_type ] = $price_list;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $output;\n}", "protected function manually_priced_lock_all() {\r\n if ( !$this->verified() )\r\n return new RedirectResponse( '/products/ ');\r\n\r\n $account_product = new AccountProduct();\r\n $account_product->lock_prices_by_account( $this->user->account->id );\r\n\r\n $this->log( 'manually-price-lock-all', $this->user->contact_name . ' locked all products as manually-priced on ' . $this->user->account->title );\r\n\r\n return new RedirectResponse( '/products/manually-priced/' );\r\n }", "public function myPolicy()\r\n {}", "function woocommerce_pip_print_company_extra() {\n\n\tif ( get_option( 'woocommerce_pip_company_extra' ) != '' ) {\n\t\t return nl2br( stripslashes( get_option( 'woocommerce_pip_company_extra' ) ) );\n\t }\n}", "public function DisplayPayment()\n\t{\tob_start();\n\t\techo '<div id=\"orderPmtContainer\">', $this->DisplayPaymentContents(), '</div>';\n\t\treturn ob_get_clean();\n\t}", "public function getPolicy(): Policy\n {\n return $this->policy;\n }", "protected function createAfterSalesServiceReturnPolicyUsingPOSTRequest($return_policy_request)\n {\n // verify the required parameter 'return_policy_request' is set\n if ($return_policy_request === null || (is_array($return_policy_request) && count($return_policy_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_policy_request when calling createAfterSalesServiceReturnPolicyUsingPOST'\n );\n }\n\n $resourcePath = '/after-sales-service-conditions/return-policies';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($return_policy_request)) {\n $_tempBody = $return_policy_request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/vnd.allegro.public.v1+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.allegro.public.v1+json'],\n ['application/vnd.allegro.public.v1+json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires 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 }", "public function process_pre_order_release_payment( $order ) {\r\n\r\n writeLog( get_class($this). '->' .__FUNCTION__. ' -> order id ->'.$order->id );\r\n\r\n $Paycertify_Process = new Paycertify_API( $order, $this->settings );\r\n $Ret = $Paycertify_Process->do_transaction();\r\n\r\n writeLog( get_class($this). '->' .__FUNCTION__. ' -> response ->'.print_r($Ret,true) );\r\n\r\n // PNRef number\r\n $PNRef = $Ret['data']['PNRef'] ? $Ret['data']['PNRef'] : '';\r\n update_post_meta( $order_id, 'PNRef', $PNRef );\r\n\r\n\r\n if( isset( $Ret['success'] ) && $Ret['success'] == 1 ) {\r\n $order->payment_complete();\r\n\r\n $order->add_order_note( __('PNRef:'.$Ret['data']['PNRef'].' payment completed', 'paycertify') );\r\n // Remove cart\r\n $woocommerce->cart->empty_cart();\r\n\r\n // Return thankyou redirect\r\n return array(\r\n 'result' => 'success',\r\n 'redirect' => $this->get_return_url( $order )\r\n );\r\n }\r\n else {\r\n $error = '';\r\n $i = 1;\r\n foreach($Ret['error'] as $k=>$v) {\r\n if(count($Ret['error']) == $i )\r\n $join = \"\";\r\n else\r\n $join = \", <br>\";\r\n\r\n $error.= $v.$join;\r\n $i++;\r\n }\r\n // Mark as on-hold (we're awaiting the payment)\r\n $order->update_status( 'on-hold', __( 'Awaiting offline payment', 'paycertify' ) );\r\n $order->add_order_note( __('Payment Error : ', 'paycertify') . $error );\r\n\r\n return new WP_Error( __('Paycertify Payment Error : ', 'paycertify') . $error );\r\n\r\n }\r\n }", "public function woo_vou_get_partially_redeem_details( $args = array() ) {\r\r\n\t\t\r\r\n\t\t$prefix = WOO_VOU_META_PREFIX;\r\r\n\t\t\r\r\n\t\t$post_status\t= isset( $args['post_status'] ) ? $args['post_status'] : 'publish';\r\r\n\r\r\n\t\t$vouargs = array( 'post_type' => WOO_VOU_PARTIAL_REDEEM_POST_TYPE, 'post_status' => $post_status );\r\r\n\r\r\n\t\t$vouargs = wp_parse_args( $args, $vouargs );\r\r\n\r\r\n\t\t//return only id\r\r\n\t\tif(isset($args['fields']) && !empty($args['fields'])) {\r\r\n\t\t\t$vouargs['fields'] = $args['fields'];\r\r\n\t\t}\r\r\n\r\r\n\t\t//return based on post ids\r\r\n\t\tif(isset($args['post__in']) && !empty($args['post__in'])) {\r\r\n\t\t\t$vouargs['post__in'] = $args['post__in'];\r\r\n\t\t}\r\r\n\r\r\n\t\t//return based on author\r\r\n\t\tif(isset($args['author']) && !empty($args['author'])) {\r\r\n\t\t\t$vouargs['author'] = $args['author'];\r\r\n\t\t}\r\r\n\r\r\n\t\t//return based on meta query\r\r\n\t\tif(isset($args['meta_query']) && !empty($args['meta_query'])) {\r\r\n\t\t\t$vouargs['meta_query'] = $args['meta_query'];\r\r\n\t\t}\r\r\n\r\r\n\t\t//show how many per page records\r\r\n\t\tif(isset($args['posts_per_page']) && !empty($args['posts_per_page'])) {\r\r\n\t\t\t$vouargs['posts_per_page'] = $args['posts_per_page'];\r\r\n\t\t} else {\r\r\n\t\t\t$vouargs['posts_per_page'] = '-1';\r\r\n\t\t}\r\r\n\r\r\n\t\t//get by post parent records\r\r\n\t\tif(isset($args['post_parent']) && !empty($args['post_parent'])) {\r\r\n\t\t\t$vouargs['post_parent']\t=\t$args['post_parent'];\r\r\n\t\t}\r\r\n\r\r\n\t\t//show per page records\r\r\n\t\tif(isset($args['paged']) && !empty($args['paged'])) {\r\r\n\t\t\t$vouargs['paged']\t=\t$args['paged'];\r\r\n\t\t}\r\r\n\r\r\n\t\t//get order by records\r\r\n\t\t$vouargs['order']\t= 'DESC';\r\r\n\t\t$vouargs['orderby']\t= 'date';\r\r\n\r\r\n\t\t//show how many per page records\r\r\n\t\tif(isset($args['order']) && !empty($args['order'])) {\r\r\n\t\t\t$vouargs['order'] = $args['order'];\r\r\n\t\t}\r\r\n\r\r\n\t\t//show how many per page records\r\r\n\t\tif(isset($args['orderby']) && !empty($args['orderby'])) {\r\r\n\t\t\t$vouargs['orderby'] = $args['orderby'];\r\r\n\t\t}\r\r\n\r\r\n\t\t//fire query in to table for retriving data\r\r\n\t\t$result = new WP_Query( $vouargs );\t\t\r\r\n\t\r\r\n\t\tif(isset($args['getcount']) && $args['getcount'] == '1') {\r\r\n\t\t\t$postslist = $result->post_count;\t\r\r\n\t\t} else {\r\r\n\t\t\t//retrived data is in object format so assign that data to array for listing\r\r\n\t\t\t$postslist = $this->woo_vou_object_to_array($result->posts);\r\r\n\r\r\n\t\t\t// if get list for voucher list then return data with data and total array\r\r\n\t\t\tif( isset($args['woo_vou_list']) && $args['woo_vou_list'] ) {\r\r\n\r\r\n\t\t\t\t$data_res\t= array();\r\r\n\r\r\n\t\t\t\t$data_res['data'] \t= $postslist;\r\r\n\r\r\n\t\t\t\t//To get total count of post using \"found_posts\" and for users \"total_users\" parameter\r\r\n\t\t\t\t$data_res['total']\t= isset($result->found_posts) ? $result->found_posts : '';\r\r\n\r\r\n\t\t\t\treturn $data_res;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\treturn apply_filters( 'woo_vou_get_partially_redeem_details', $postslist, $args );\r\r\n\t}", "public function preview_payout_message() {\n\t\t?>\n\t\t<h2><?php esc_html_e( 'Note', 'affiliate-wp' ); ?></h2>\n\t\t<p><?php echo esc_html( _x( 'It takes approximately two weeks for each payout to be deposited into each affiliates bank account when the Payouts Service invoice has been paid.', 'Note shown on the preview payout page for a Payouts Service payout', 'affiliate-wp' ) ); ?></p>\n\t\t<p><?php echo esc_html( _x( 'For affiliates located in the United States, it takes approximately a week.', 'Note shown on the preview payout page for a Payouts Service payout', 'affiliate-wp' ) ); ?></p>\n\t\t<?php\n\t}", "function privacy_policy()\n {\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 's'));\n\n # Pick all assigned data\n $data = assign_to_data($urldata);\n\n $data = add_msg_if_any($this, $data);\n $this->load->view('page/privacy_policy_view', $data);\n }", "public static function get_suggested_policy_text()\n {\n }", "function ggw_backend_invoice_payment_details($order) {\r\n if($order->order_status == 'pos_completed' || $order->order_status == 'pos_return_closed') {\r\n $ticket_ar = ggw_backend_invoice_credit_amount($order->order_id);\r\n if($ticket_ar) {\r\n $consumption_date = db_result(db_query(\"SELECT utcu.consumption_date FROM {user_term_credits_usages} utcu WHERE utcu.order_id = '%d'\", $order->order_id));\r\n $credit = _user_term_credits_getCredits($order->uid, $consumption_date);\r\n $payment_remaining = theme('table', array('Starting Balance', 'Ending Balance'), array(\r\n array(uc_currency_format($credit->pending_payments), uc_currency_format($credit->pending_payments+$ticket_ar))\r\n ));\r\n }\r\n\r\n $content = '';\r\n $content .= '<div class=\"last-item\">';\r\n\r\n if($order->order_status == 'pos_return_closed') {\r\n $content .= '<div class=\"line-items\">'.str_replace('Total', 'Refund Total', uc_order_pane_line_items('view', $order)).'</div>';\r\n }\r\n\r\n if($order->billing_zone == '0') {\r\n $content .= '<div class=\"payment-details\">'.ggw_backend_transaction_details($order->order_id).'</div>';\r\n } else {\r\n $content .= '<div class=\"payment-details\">'.ggw_backend_transaction_details_dp($order->order_id).'</div>';\r\n }\r\n\r\n if(isset($payment_remaining)) {\r\n $content .= '<div class=\"payment-details\">';\r\n $content .= '<p>'.$payment_remaining.'</p>';\r\n $content .= '</div>';\r\n }\r\n\r\n $content .= '</div>';\r\n\r\n return $content;\r\n }\r\n}", "function goodwish_edge_give_btn($output){\n\t\t$form_id = get_the_ID();\n\t\t$display_label_field = get_post_meta( $form_id, '_give_reveal_label', true );\n\n\t\t$display_label = $display_label_field !== '' ? $display_label_field : esc_html__( 'Donate', 'goodwish' );\n\n\t\tif (get_post_meta( $form_id, '_give_payment_display', true ) == 'modal' || get_post_meta( $form_id, '_give_payment_display', true ) == 'button'){\n\t\t\t$output = '<button type=\"button\" class=\"give-btn edgtf-btn edgtf-btn-medium edgtf-btn-solid give-btn-modal\">' . $display_label . '</button>';\n\t\t}\n\n\t\treturn $output;\n\t}", "public function privacyPolicy() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'privacy_policy';\n\t\t$data['moduleName'] = 'Privacy Policy';\n\t\t$data['page_data'] = $this->page_model->getPageData(PRIVACY_POLICY_ID);\n\n\t\t$template['body_content'] = $this->load->view('frontend/pages/privacy-policy', $data, true);\t\n\t\t$this->load->view('frontend/layouts/template', $template, false);\t\t\n\t}", "public function mcash_woocommerce_callback();", "function wc_get_order($the_order = \\false)\n {\n }", "function wp_dashboard_quick_press_output()\n{\n}", "public function capturePayment();", "public function capturePayment();", "public function handleOrderPaid()\n {\n return $this->processPayment();\n }", "public function getPrintUrl()\n {\n /*if (Mage::getSingleton('customer/session')->isLoggedIn()) {\n return $this->getUrl('sales/order/print', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId()));\n }\n return $this->getUrl('sales/guest/printOrder', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId()));*/\n return $this->getUrl('sales/order/print', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId()));\n }", "function wc_print_js()\n {\n }" ]
[ "0.6443647", "0.63141865", "0.61625105", "0.6100994", "0.6063424", "0.5832454", "0.57084316", "0.5571052", "0.5571052", "0.55699396", "0.5557613", "0.54589385", "0.5434608", "0.5425917", "0.5408282", "0.5373772", "0.5362841", "0.53514063", "0.532091", "0.5283827", "0.52380395", "0.52132595", "0.52112114", "0.5176694", "0.5176694", "0.5176388", "0.51713103", "0.51698333", "0.5156714", "0.5156667", "0.5152989", "0.51329285", "0.5068971", "0.5059409", "0.50420696", "0.50313586", "0.5028935", "0.49968788", "0.49908218", "0.49569044", "0.49567157", "0.49360397", "0.4928105", "0.4925505", "0.4924165", "0.49217597", "0.49209118", "0.4879537", "0.48782277", "0.48771158", "0.48727033", "0.48690477", "0.48681378", "0.48636496", "0.4856663", "0.48411864", "0.4839726", "0.483376", "0.48316178", "0.482828", "0.48193297", "0.48167095", "0.48155746", "0.48093", "0.48039836", "0.48029757", "0.4801329", "0.4801324", "0.4800874", "0.47999987", "0.47919384", "0.47902468", "0.4789561", "0.47817189", "0.47653776", "0.47619057", "0.47605017", "0.47574872", "0.47549853", "0.4754017", "0.47519228", "0.47514465", "0.47478998", "0.47430018", "0.4738804", "0.4736108", "0.47340882", "0.4733498", "0.4729018", "0.47289756", "0.47273204", "0.47235668", "0.47193635", "0.47171244", "0.4716246", "0.47154462", "0.47154462", "0.47051063", "0.47049695", "0.4704803" ]
0.8531329
0
woocommerce_pip_print_footer function. Output footer if needed
Функция woocommerce_pip_print_footer. Вывод footer, если это необходимо
function woocommerce_pip_print_footer() { if ( get_option( 'woocommerce_pip_footer' ) != '' ) { return nl2br( stripslashes( get_option( 'woocommerce_pip_footer' ) ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_output_auth_footer()\n {\n }", "function cfct_wp_footer() {\n\techo cfct_get_option('wp_footer');\n}", "function wpex_footer() {\n get_template_part( 'partials/footer/footer-layout' );\n}", "function wcus_amp_footer() {\n\t?>\n\t<footer class=\"page-footer\">\n\t\t<small>&copy;&nbsp;<?php echo esc_html( date( 'Y' ) ); ?>, <a href=\"<?php echo esc_url( get_site_url() ); ?>\"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a>&nbsp;|&nbsp;<a href=\"<?php echo esc_url( __( 'https://wordpress.org/', 'wcus-amp' ) ); ?>\"><?php echo esc_html( sprintf( __( 'Proudly powered by %s', 'wcus-amp' ), 'WordPress' ) ); ?></a></small>\n\t</footer>\n\t<?php\n}", "function printFooter() {\n\t$this->makeFooter();\n\tprint $this->footer;\n}", "function print_upgrade_footer()\r\n{\r\n\tglobal $vbulletin;\r\n\r\n\tunset($vbulletin->debug);\r\n\tprint_cp_footer();\r\n}", "function printFooter() {\n\n\t$this->makeFooter();\n\n\tprint $this->footer;\n\n}", "function refined_magazine_footer_end()\r\n {\r\n ?>\r\n </footer><!-- #colophon -->\r\n <?php\r\n }", "function my_theme_footer_render() {\n $footer_ids = FLThemeBuilderLayoutData::get_current_page_footer_ids();\n // If we have a footer, remove the theme footer and hook in Theme Builder's.\n if ( ! empty( $footer_ids ) ) {\n remove_action( 'b4st_footer', 'b4st_do_footer' );\n add_action( 'b4st_footer', 'FLThemeBuilderLayoutRenderer::render_footer' );\n }\n}", "function wp_print_footer_scripts()\n{\n}", "function refined_magazine_footer_start()\r\n {\r\n ?>\r\n <footer id=\"colophon\" class=\"site-footer\">\r\n <?php\r\n }", "function wp_footer() {\n\t\\do_action( 'gnist/wp/footer' );\n}", "function print_install_footer()\n{\n\t$html = '</div>\t\t\t\n\t<div class=\"block3-footer\">\n\t\t<div class=\"block3-right\">\n\t\t\t<div class=\"block3-left\"></div>\n\t\t</div>\n\t</div>\t\t\t\n\t</div>\n\t</div>\n\t</div>\n\t</div>\n\t</div>\n\t<!-- / content area table -->\n\t<br />\n\t<div align=\"center\">\n\t <div class=\"smaller\" align=\"center\">\n\t <!-- Do not remove copyright notice without branding removal -->\n\t Powered by: ILance&reg; Version ' . VERSION . '<br />\n\t Copyright &copy;2002 - ' . date('Y') . ', ILance Inc.\n\t <!-- Do not remove copyright notice without branding removal -->\n\t <br />\n\t </div>\n\t <br />\n\t</div>\n\t</body>\n\t</html>';\n\treturn $html;\n}", "function print_footer() {\n global $OUTPUT;\n echo $OUTPUT->footer();\n }", "public function printFooter() {\n print_r( '\n \n ' );\n }", "static function footer() {\r\n ?>\r\n <!-- End page content -->\r\n </div>\r\n <!-- Footer -->\r\n <footer class=\"w3-center w3-light-grey w3-padding-32\">\r\n <p><a href=\"https://www.beautyathome.ca\" title=\"BeautyAtHome\" target=\"_blank\" class=\"w3-hover-text-green\">www.BeautyAtHome.ca</a></p>\r\n </footer>\r\n </body>\r\n </html>\r\n <?php\r\n }", "function mediz_footer() {\n\n\t\t$templates = new MEDIZ_Template_Loader;\n\n\t\tob_start();\n\t\t$templates->get_template_part( 'mediz_footer', 'mediz_footer' );\n\t\treturn ob_get_clean();\n\n\t}", "public function themefooter()\n {\n // end output buffering and get module output\n $maincontent = ob_get_contents();\n ob_end_clean();\n\n $event = new Zikula_Event('theme.prefooter', $this, array(), $maincontent);\n $maincontent = $this->eventManager->notify($event)->getData();\n\n // add the module wrapper\n if (!$this->system && (!isset($this->themeconfig['modulewrapper']) || $this->themeconfig['modulewrapper'])) {\n $maincontent = '<div id=\"z-maincontent\" class=\"z-module-' . DataUtil::formatForDisplay(strtolower($this->toplevelmodule)) . '\">' . $maincontent . '</div>';\n }\n\n // Assign the main content area to the template engine\n $this->assign_by_ref('maincontent', $maincontent);\n\n // render the page using the correct template\n $this->display($this->themeconfig['page'], $this->pageid);\n }", "function wpl_admin_ui_footer()\n{\n\t// HOOKABLE:\n\tdo_action( \"wpl_admin_ui_footer_start\" );\n\n\tGLOBAL $WORDPRESS_PIXELPIN_LOGIN_VERSION;\n?>\n\t</div> <!-- ./wpl_admin_tab_content -->\n\n<div class=\"clear\"></div>\n\n<?php\n\twpl_admin_help_us_localize_note();\n\n\t// HOOKABLE:\n\tdo_action( \"wpl_admin_ui_footer_end\" );\n\n\tif( get_option( 'wpl_settings_development_mode_enabled' ) )\n\t{\n\t\twpl_display_dev_mode_debugging_area();\n \t}\n}", "public static function esig_footer() {\n\n remove_all_actions('wp_footer');\n wp_print_styles(self::esig_footer_styles());\n wp_print_scripts(self::esig_footer_scripts());\n\n do_action('esig_footer');\n // delete transient after loading footer\n delete_transient('esig_document_id');\n delete_transient('esig_invite');\n }", "public function footer() {\n global $CFG, $DB, $USER;\n\n $output = $this->container_end_all(true);\n\n $footer = $this->opencontainers->pop('header/footer');\n\n if (debugging() and $DB and $DB->is_transaction_started()) {\n // TODO: MDL-20625 print warning - transaction will be rolled back\n }\n\n // Provide some performance info if required\n $performanceinfo = '';\n if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {\n $perf = get_performance_info();\n if (defined('MDL_PERFTOLOG') && !function_exists('register_shutdown_function')) {\n error_log(\"PERF: \" . $perf['txt']);\n }\n if (defined('MDL_PERFTOFOOT') || debugging() || $CFG->perfdebug > 7) {\n $performanceinfo = bootstrap3_brum1975_performance_output($perf);\n }\n }\n\n $footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);\n\n $footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);\n\n $this->page->set_state(moodle_page::STATE_DONE);\n\n if(!empty($this->page->theme->settings->persistentedit) && property_exists($USER, 'editing') && $USER->editing && !$this->really_editing) {\n $USER->editing = false;\n }\n\n return $output . $footer;\n }", "protected function generatePageFooter()\n {\n // to do: output common end of HTML code\n }", "public static function footer_output() {\n\t\t$script = get_theme_mod( 'custom_js_footer', '' );\n\n\t\tif ( ! empty( $script ) ) {\n\t\t\techo PHP_EOL . $script . PHP_EOL;\n\t\t}\n\t}", "public function print_footer_scripts()\n {\n }", "public function footer() {\n global $CFG, $DB, $USER;\n\n $output = $this->container_end_all(true);\n\n $footer = $this->opencontainers->pop('header/footer');\n\n if (debugging() and $DB and $DB->is_transaction_started()) {\n // TODO: MDL-20625 print warning - transaction will be rolled back\n }\n\n // Provide some performance info if required\n $performanceinfo = '';\n if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {\n $perf = get_performance_info();\n if (defined('MDL_PERFTOLOG') && !function_exists('register_shutdown_function')) {\n error_log(\"PERF: \" . $perf['txt']);\n }\n if (defined('MDL_PERFTOFOOT') || debugging() || $CFG->perfdebug > 7) {\n $performanceinfo = essential_performance_output($perf);\n }\n }\n\n $footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);\n\n $footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);\n\n $this->page->set_state(moodle_page::STATE_DONE);\n\n if(!empty($this->page->theme->settings->persistentedit) && property_exists($USER, 'editing') && $USER->editing && !$this->really_editing) {\n $USER->editing = false;\n }\n\n return $output . $footer;\n }", "function shop_isle_footer_wrap_close() {\n\t\techo '</div><!-- .bottom-page-wrap -->';\n\t}", "public function outputFooter()\n {\n // Check if output should be modified.\n if ($this->modifyOutputFooter == false) {\n print $this->configuration['footer_notes'];\n } else {\n print $this->modifyOutputFooter;\n }\n }", "function zp_footer() { ?>\n<div id=\"credit\"><?php\n\tif (zp_loggedin()) {\n\tprintUserLogin_out($before='', $after='|', $showLoginForm=NULL, $logouttext=NULL, $show_user=NULL);\n\t} else {\n\t\tprintLink(WEBPATH . '/' . ZENFOLDER .'/admin.php', 'Admin');\n\t}\n?><?php printZenphotoLink(); ?> <?php printVersion();?></a> | Using \"Side Of Chili Theme\" by: <a href=\"http://www.chilifrei.net\" title=\"How Do You Like Your Chili?\">ChiliFrei64</a></div>\n<?php }", "function wpex_footer_callout() {\n get_template_part( 'partials/footer/footer-callout' ); \n}", "function PageFooter() {\n global $c;\n echo <<<FOOTERTABLE\n<div id=\"page_footer\">\nWRMS: $c->code_major.$c->code_minor.$c->code_patch, DB: $c->schema_major.$c->schema_minor.$c->schema_patch\n</div>\nFOOTERTABLE;\n }", "function my_footer_shh() {\n \n remove_filter( 'update_footer', 'core_update_footer' ); \n\n}", "function print_footer()\n{\n print <<<END\n </body>\n </html>\nEND;\n}", "function do_install_page_footer_block() {\n\tglobal $_nl, $ThisVersion;\n\n\t$_out = '</td>'.$_nl;\n\t$_out .= '</tr>'.$_nl;\n\t$_out .= '<!-- End Content Area : End Row 2 -->'.$_nl;\n\n\t$_out .= '<!-- Start Footer Row -->'.$_nl;\n\t$_out .= '<tr height=\"20\"><td valign=\"middle\" colspan=\"2\">'.$_nl;\n\t$_out .= '<div align=\"center\" valign=\"middle\">'.$_nl;\n\n\t$_out .= '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td>'.$_nl;\n\t$_out .= '<table border=\"0\" cellpadding=\"5\" cellspacing=\"1\" width=\"100%\"><tr><td class=\"BLK_FTR_CLEAR_C\" valign=\"middle\">'.$_nl;\n\n\t$_out .= 'Powered By <a href=\"http://www.phpcoin.com\" target=\"_blank\">phpCOIN</a> v'.$ThisVersion.$_nl;\n\t$_out .= '</td></tr></table>'.$_nl;\n\t$_out .= '</td></tr></table>'.$_nl;\n\n\t$_out .= '</div>'.$_nl;\n\t$_out .= '</td></tr>'.$_nl;\n\t$_out .= '<!-- End Footer Row -->'.$_nl;\n\n\treturn $_out;\n}", "public function printFooter() {\n echo \"<div id='footer'><div class='text_box'>\" .\n \"&copy;2018 SJSU CS160 SP18 - <a href='/about'>TEAM ONE</a></div></div>\";\n }", "function wpc_remove_version_footer() {\n remove_filter('update_footer', 'core_update_footer');\n}", "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t$orders = explode( ',', $_GET['post'] );\n\t\t$action = $_GET['type'];\n\t\t$number_of_orders = count( $orders );\n\t\t$order_loop = 0;\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\t// Loop through all orders (bulk printing).\n\t\tforeach ( $orders as $order_id ) {\n\t\t\t$order_loop++;\n\t\t\t$order = new WC_Order( $order_id );\n\t\t\tob_start();\n\t\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t\t$content .= ob_get_clean();\n\t\t\tif ( $number_of_orders > 1 && $order_loop < $number_of_orders ) {\n\t\t\t\t$content .= '<p class=\"pagebreak\"></p>';\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "function printFooterJS(){\n\t}", "public function renderFooter()\r\n\t{\r\n\t\t// Be sure we can do this...\r\n\t\tif (! $this->_permissionCheck( false ) ) return null;\r\n\t\t\r\n\t\t$lic\t= dunloader( 'license', 'themer' );\r\n\t\t\r\n\t\t// Don't bother if they dont have branding\r\n\t\tif (! $lic->isBranded() ) return null;\r\n\t\t\r\n\t\treturn '<div class=\"whmcscontainer\"><p style=\"font-size: smaller; text-align: center\">Theme Rendered with <a href=\"https://www.gohigheris.com/\" target=\"_blank\">WHMCS Themer</a></p></div>';\r\n\t}", "function print_footer_scripts()\n{\n}", "function appthemes_footer() {\n\t/**\n\t * Invokes the footer section called in footer.php\n\t */\n\tdo_action( 'appthemes_footer' );\n}", "public function wp_footer() {\n\t\tif ( self::is_tml_page() ) {\n\t\t\t// This is already attached to \"wp_footer\"\n\t\t\tremove_action( 'login_footer', 'wp_print_footer_scripts', 20 );\n\n\t\t\tdo_action( 'login_footer' );\n\t\t}\n\t}", "function woocommerce_output_content_wrapper_end()\n {\n }", "function wuc_footer_code()\n{\n $footer_code = get_field(\"wuc_footer_code\", \"options\");\n echo \"\\n<!-- WP User Code - Footer Start -->\";\n echo \"\\n\".$footer_code;\n echo \"\\n<!-- WP User Code - Footer End -->\\n\";\n}", "function cp_print_endPage(){\r\n echo '</main>',\r\n '<footer>',\r\n '<p> &copy; Licence Informatique - Janvier 2020 - Tous droits réservés</p>',\r\n '</footer>',\r\n '</body>',\r\n '</html>'; \r\n}", "function outputFooter()\r\n{\r\n echo '\r\n <footer class=\"text-white text-center text-lg-start footer_class\" style=\"background-color:#22303E;\">\r\n <!-- Grid container -->\r\n <div class=\"container p-4\">\r\n <!--Grid row-->\r\n <div class=\"row\">\r\n <!--Grid column-->\r\n <div class=\"col-lg-6 col-md-12 mb-4 mb-md-0\">\r\n <h5 class=\"text-uppercase\">FancyShop</h5>\r\n \r\n <p>\r\n FancyShop is a gameshop, created for coursework2, where will sell, games for next gen consoles\r\n such as: PS5, Xbox series X, PS4 and Xbox one.\r\n Many games available for the consoles available.\r\n </p>\r\n </div>\r\n <!--Grid column-->\r\n <div class=\"col-lg-3 col-md-6 mb-4 mb-md-0\">\r\n <h5 class=\"text-uppercase\">Products</h5>\r\n \r\n <ul class=\"list-unstyled my-2\">\r\n <li>\r\n <a href=\"products.php\" class=\"text-white\">All available</a>\r\n </li>\r\n <li>\r\n <a href=\"consoles.php\" class=\"text-white\">Consoles available</a>\r\n </li>\r\n <li>\r\n <a href=\"games.php\" class=\"text-white\">Games available</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <!--Grid column-->\r\n <div class=\"col-lg-3 col-md-6 mb-4 mb-md-0\">\r\n <h5 class=\"text-uppercase mb-0\">Contact</h5>\r\n \r\n <ul class=\"list-unstyled my-2\">\r\n <li>\r\n <a href=\"contact.php\" class=\"text-white\">Contact</a>\r\n </li>\r\n\r\n </ul>\r\n </div>\r\n <!--Grid column-->\r\n </div>\r\n <!--Grid row-->\r\n </div>\r\n <!-- Grid container -->\r\n \r\n <!-- Copyright -->\r\n <div class=\"text-center p-3 text-white\" style=\"background-color:#1D2934;\">\r\n © 2021 Copyright:\r\n <a class=\"text-white\" href=\"#\">FancyShop Copyright</a>\r\n </div>\r\n <!-- Copyright -->\r\n </footer>';\r\n\r\n\r\n echo '</body>';\r\n echo '</html>';\r\n}", "function bf_archive_postfooter() {\r\n\tglobal $post;\r\n\t\r\n\t$postfooter = '';\r\n\t\r\n\techo apply_filters('bf_archive_postfooter', $postfooter);\r\n}", "function athen_footer() {\n\t$obj = athen_global_obj();\n $header_style = $obj->header_style;\n\tif ( $obj->has_footer && $header_style !== \"three\" ) {\n\t\tget_template_part( 'partials/footer/footer-layout' );\n\t}\n}", "function _upg_footer()\n{\n $lang = ZLanguage::getLanguageCode();\n echo '</div></div>' . \"\\n\";\n echo '<div id=\"footer\">' . \"\\n\";\n echo '<p id=\"notice\">' . __f('For more information about the upgrade process, please read the <a href=\"docs/%1$s/UPGRADING\">upgrade documentation</a>, visit our <a href=\"http://community.zikula.org/Wiki.htm\">wiki</a> or the <a href=\"http://community.zikula.org/module-Forum.htm\">support forum</a>.', $lang) . '</p>';\n echo '</div>' . \"\\n\";\n echo '</div></body>' . \"\\n\";\n echo '</html>';\n exit();\n}", "public function update_footer() {\n\n remove_filter( 'update_footer', 'core_update_footer' );\n }", "function ssquiz_print_footer(){\n\t?>\n\t<div>\n\t\t<p><?php echo __( 'If you have questions, suggestions or want to know about my upcoming projects, visit', 'ssquiz')?> \n\t\t\t<a href=\"http://www.100vadim.com\">100vadim.com</a>\n\t\t</p>\n\t</div>\n\t<?php\n}", "function clanpress_the_footer() {\n $settings = Clanpress_Settings::instance()->get_values( 'admin' );\n if ( !empty( $settings['footer'] ) ) {\n echo nl2br( esc_html( $settings['footer'] ) );\n }\n}", "function carawebs_footer_layout(){\n\n $layout_option = get_field( 'select_footer_layout', 'option' );\n\n if( 'quarters' == $layout_option ){\n\n ob_start();\n ?>\n <div id=\"footer\">\n \t<div id=\"footer_page_wrapper\" class=\"columns_211 page_wrapper page_background\">\n \t\t<div class=\"footer_top_border\"></div>\n <div class=\"half left\">\n <div class=\"nested_halves\">\n \t\t<div class=\"half left\">\n \t\t\t<div itemscope itemtype=\"http://schema.org/Organization\">\n <div itemprop=\"address\" itemscope itemtype=\"http://schema.org/PostalAddress\">\n <p>\n <span itemprop=\"name\">Expedition Engineering</span><br/>\n <span itemprop=\"streetAddress\"><?php the_field('address_line_1', 'option')?></span><br/>\n <span itemprop=\"streetAddress\"><?php the_field('address_line_2', 'option')?></span><br/>\n <span itemprop=\"addressLocality\"><?php the_field('town', 'option')?></span>,&nbsp;\n <span itemprop=\"postalCode\"><?php the_field('postcode', 'option')?></span>\n </p>\n </div>\n <p>\n <span itemprop=\"telephone\"><span class=\"address_titles\">Phone:</span><?php the_field('phone_number', 'option'); ?></span><br/>\n <span itemprop=\"fax\"><span class=\"address_titles\">Fax:</span><?php the_field('fax_number', 'option'); ?></span><br/>\n <span itemprop=\"email\"><span class=\"address_titles\">Email:</span><a href=\"mailto: <?php the_field('contact_email', 'option'); ?>\"><?php the_field('contact_email', 'option'); ?></a></span>\n </p>\n </div>\n <div class=\"social_menu_wrapper\">\n <?php\n if (has_nav_menu('social_menu')) :\n wp_nav_menu(['theme_location' => 'social_menu', 'walker' => new \\Walker_Nav_Menu(), 'menu_class' => 'menu', 'menu_id' => 'menu-social-menu']);\n endif;\n ?>\n \t\t\t</div>\n <p>Site by <a href=\"http://carawebs.com\">Carawebs</a></p>\n \t\t</div>\n \t\t<div class=\"half right\">\n \t\t\t<?php the_field( 'ust_link', 'option' ); ?>\n \t\t</div>\n </div><!-- end nested columns_211 -->\n </div>\n \t\t<div class=\"half right footer_box\">\n <?php the_field( 'company_description', 'option' ); ?>\n \t\t</div>\n \t</div>\n </div><?php\n $var = ob_get_clean();\n\n echo $var;\n }\n\n if ( 'thirds' == $layout_option ){\n\n ob_start();\n ?>\n <div id=\"footer\">\n \t<div id=\"footer_page_wrapper\" class=\"page_wrapper page_background\">\n \t\t<div class=\"footer_top_border\"></div>\n <div class=\"third first\">\n <div itemscope itemtype=\"http://schema.org/Organization\">\n <div itemprop=\"address\" itemscope itemtype=\"http://schema.org/PostalAddress\">\n <p>\n <span itemprop=\"name\">Expedition Engineering</span><br/>\n <span itemprop=\"streetAddress\"><?php the_field('address_line_1', 'option')?></span><br/>\n <span itemprop=\"streetAddress\"><?php the_field('address_line_2', 'option')?></span><br/>\n <span itemprop=\"addressLocality\"><?php the_field('town', 'option')?></span>,&nbsp;\n <span itemprop=\"postalCode\"><?php the_field('postcode', 'option')?></span>\n </p>\n <p>\n <span itemprop=\"telephone\"><span class=\"address_titles\">Phone:</span><?php the_field('phone_number', 'option'); ?></span><br/>\n <span itemprop=\"fax\"><span class=\"address_titles\">Fax:</span><?php the_field('fax_number', 'option'); ?></span><br/>\n <span itemprop=\"email\"><span class=\"address_titles\">Email:</span><a href=\"mailto: <?php the_field('contact_email', 'option'); ?>\"><?php the_field('contact_email', 'option'); ?></a></span>\n </p>\n </div>\n </div>\n <div class=\"social_menu_wrapper\">\n <?php\n if (has_nav_menu('social_menu')) :\n wp_nav_menu(['theme_location' => 'social_menu', 'walker' => new \\Walker_Nav_Menu(), 'menu_class' => 'menu', 'menu_id' => 'menu-social-menu']);\n endif;\n ?>\n \t\t\t</div>\n <p>Site by <a href=\"http://carawebs.com\">Carawebs</a></p>\n </div>\n <div class=\"third\">\n \t\t\t<?php the_field( 'ust_link', 'option' ); ?>\n </div>\n \t<div class=\"third footer_box\">\n <?php the_field( 'company_description', 'option' ); ?>\n \t</div>\n \t</div>\n </div><?php\n $var = ob_get_clean();\n\n echo $var;\n }\n\n}", "function wpo_remove_version_footer() {\n\tremove_filter( 'update_footer', 'core_update_footer' );\n}", "function wpex_footer_bottom() {\n if ( get_theme_mod( 'footer_bottom', true ) ) {\n get_template_part( 'partials/footer/footer-bottom' );\n }\n}", "public function footer() {\n\t\t\tdo_action( self::HOOK_FOOTER, $this->id );\n\t\t}", "function cp_footer_style_1_without_upper_footer(){ ?>\n\t\t<!--Footer Start-->\n <footer id=\"footer\"> \n <!--Footer Section 1 Start-->\n <section class=\"footer-section-1\">\n <div class=\"container\">\n <div class=\"row\">\n <?php dynamic_sidebar('sidebar-footer'); ?>\n </div>\n </div>\n </section>\n <!--Footer Section 1 End--> \n \n <!--Footer Section 2 Start-->\n <section class=\"footer-section-2\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-6\"><?php echo esc_attr(cp_get_themeoption_value('copyright_code','general_settings'));?></div>\n <div class=\"col-md-6\">\n\t\t\t<?php cp_footer_menu('footer-menu','footer-nav');?>\n </div>\n </div>\n </div>\n </section>\n <!--Footer Section 2 End--> \n </footer>\n <!--Footer End--> \n\t<?php }", "function print_footer() {\n echo \"</body>\";\n echo \"</html>\";\n\n}", "function ramza_print_post_footer() {\n // Do nothing for pages.\n if ( 'post' !== get_post_type() ) {\n return;\n }\n\n $categories_list = get_the_category_list( ', ' );\n $tags_list = get_the_tag_list( '', ', ' );\n\n echo '<div class=\"c-post__meta c-post__meta--footer\">';\n if ( $categories_list && ramza_categorized_blog() ) {\n printf( '<div class=\"c-post__cats\"><i class=\"fa fa-folder\"></i>' . esc_html__( 'Posted in %1$s', 'ramza' ) . '</div>', $categories_list ); // WPCS: XSS OK.\n }\n if ( $tags_list ) {\n printf( '<div class=\"c-post__tags\"><i class=\"fa fa-tags\"></i>' . esc_html__( 'Tagged %1$s', 'ramza' ) . '</div>', $tags_list ); // WPCS: XSS OK.\n }\n echo '</div><!-- c-post__meta -->';\n}", "function crmpress_do_footer() {\n\n\t\tdo_action( 'crmpress_credits' );\n\n}", "protected function footer()\n {\n $this->extraScripts();\n?>\n <!-- MathBinView::footer -->\n <div id=\"footer\">\n <div id=\"copyright\">\n <p>\n Dark theme and contributions by <a target=\"_blank\" href=\"//github.com/jahan-addison/mathb\">jahan</a>.\n </p>\n <p><a href=\"http://mathb.in/5\">License</a>\n </p>\n\n </div>\n </div>\n<?php\n }", "function footer()\n\t{\n\t\tstatic $footer_done=0;\n\t\tif ($footer_done++) return;\t// prevent multiple footers, not sure we still need this (RalfBecker)\n\n\t\tif (!isset($GLOBALS['egw_info']['flags']['nofooter']) || !$GLOBALS['egw_info']['flags']['nofooter'])\n\t\t{\n\t\t\t// get the (depricated) application footer\n\t\t\t$content = $this->_get_app_footer();\n\n\t\t\t// run the hook navbar_end\n\t\t\t// ToDo: change to return the content\n\t\t\tob_start();\n\t\t\t$GLOBALS['egw']->hooks->process('navbar_end');\n\t\t\t$content .= ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\t// eg. javascript, which need to be at the end of the page\n\t\t\tif ($GLOBALS['egw_info']['flags']['need_footer'])\n\t\t\t{\n\t\t\t\t$content .= $GLOBALS['egw_info']['flags']['need_footer'];\n\t\t\t}\n\n\t\t\t// do the template sets footer, former parse_navbar_end function\n\t\t\t// this closes the application area AND renders the closing body- and html-tag\n\t\t\tif (self::$navbar_done)\n\t\t\t{\n\t\t\t\tif (!is_a($this->tpl,'Template')) $this->tpl = new Template(EGW_TEMPLATE_DIR);\n\t\t\t\t$this->tpl->set_file(array('footer' => 'footer.tpl'));\n\t\t\t\t$this->tpl->set_var($this->_get_footer());\n\t\t\t\t$content .= $this->tpl->fp('out','footer');\n\t\t\t}\n\t\t\telseif (!isset($GLOBALS['egw_info']['flags']['noheader']) || !$GLOBALS['egw_info']['flags']['noheader'] ||\n\t\t\t\tself::$header_done || !empty($_GET['nonavbar']) ||\n\t\t\t\t$GLOBALS['egw_info']['flags']['currentapp'] == 'admin' && empty($_GET['ajax']))\n\t\t\t{\n\t\t\t\t$content .= \"</body>\\n</html>\\n\";\t// close body and html tag, eg. for popups\n\t\t\t}\n\t\t\treturn $content;\n\t\t}\n\t}", "function wp_footer() {\n\t\t\treturn ;\n if ( ( get_option( 'wpdev_mc_copyright' ) == 'On' ) && (! defined('WPDEV_COPYRIGHT')) ) {\n printf(__('Uses wordpress plugins developed by %swww.wp-premiumplugins.com%s'),'<a href=\"http://www.wp-premiumplugins.com\" target=\"_blank\">','</a>','&amp;');\n define('WPDEV_COPYRIGHT', 1 );\n }\n }", "function codeless_show_footer(){ \n ?>\n <div id=\"footer-wrapper\" class=\"<?php echo esc_attr( codeless_extra_classes( 'footer_wrapper' ) ) ?>\"> \n <?php\n if( codeless_get_mod( 'show_footer', true ) )\n get_template_part( 'template-parts/footer/main' );\n if( codeless_get_mod( 'show_copyright', true ) )\n get_template_part( 'template-parts/footer/copyright' );\n ?>\n </div><!-- #footer-wrapper -->\n <?php\n}", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "private function affiche_footer() {\n\t\techo '\n\t\t<!-- Footer -->\n\t\t\t<footer>\n\n </footer>\n\t\t';\n\t}", "private function affiche_footer() {\n\t\techo '\n\t\t<!-- Footer -->\n\t\t\t<footer>\n\n </footer>\n\t\t';\n\t}", "function wp_fluency_footer(){\n\techo '<span id=\"fluency-footer\"><a href=\"http://deanjrobinson.com/projects/fluency-admin/\">Fluency Admin '.FLUENCY_VERSION.'</a> '.__('is a plugin by', 'fluency-admin').' <a href=\"http://deanjrobinson.com\">Dean Robinson</a> - <a href=\"http://deanjrobinson.com/donate/\">'.__('Donate', 'fluency-admin').'</a></span><br/>';\n}", "function theme_print_pdf_tcpdf_footer($vars) {\n $pdf = $vars['pdf'];\n preg_match('!<div class=\"print-footer\">(.*?)</div>!si', $vars['html'], $tpl_footer);\n\n if (isset($tpl_footer[1])) {\n $footer = trim(preg_replace('!</?div[^>]*?>!i', '', $tpl_footer[1]));\n\n // set footer font\n $vars['font'][2] *= 0.8;\n $pdf->setFooterFont($vars['font']);\n // set footer margin\n $pdf->SetFooterMargin(10);\n // set footer data\n $pdf->setFooterContent($footer);\n }\n\n return $pdf;\n}", "public function do_footer_items()\n {\n }", "public function do_footer_items()\n {\n }", "function tpl_function_footer( $params, &$smarty )\n{\n\tglobal $system;\n\t\t\t\t$system =& $system;\n\t\t\t\t$output =& $system->loadModel( \"system/frontend\" );\n\t\t\t\t$tmpdata = $system->getConf( \"im.setting\" );\n\t\t\t\t$data = unserialize( $tmpdata );\n\t\t\t\t$theme_dir = $system->base_url( ).\"themes/\".$output->theme;\n\t\t\t\techo $smarty->_fetch_compile_include( \"shop:common/footer.html\", array(\n\t\t\t\t\t\t\t\t\"theme_dir\" => $theme_dir,\n\t\t\t\t\t\t\t\t\"certtext\" => \"<a href=\\\"http://www.miibeian.gov.cn/ \\\" target=\\\"blank\\\">\".$system->getConf( \"site.certtext\" ).\"</a>\",\n\t\t\t\t\t\t\t\t\"mini_cart\" => $system->getConf( \"site.buy.target\" ) == 3,\n\t\t\t\t\t\t\t\t\"preview_theme\" => $system->in_preview_theme,\n\t\t\t\t\t\t\t\t\"im_setting\" => $data,\n\t\t\t\t\t\t\t\t\"system_url\" => $system->base_url( ),\n\t\t\t\t\t\t\t\t\"stateString\" => \"cron=\".urlencode( $system->request['action']['controller'].\":\".$system->request['action']['method'] ).\"&p=\".urlencode( $system->request['action']['args'][0] )\n\t\t\t\t) );\n\t\t\t\tif ( constant( \"SHOP_DEVELOPER\" ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$html .= $system->_debugger['log'];\n\t\t\t\t}\n\t\t\t\tif ( $system->getConf( \"shopex.wss.show\" ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$wssjs = $system->getConf( \"shopex.wss.js\" );\n\t\t\t\t}\n\t\t\t\tif ( $system->getConf( \"certificate.channel.status\" ) )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$channel = $system->getConf( \"certificate.channel.service\" ).\"<a href=\\\"\".$system->getConf( \"certificate.channel.url\" ).\"\\\" target=\\\"_blank\\\">\".$system->getConf( \"certificate.channel.name\" );\n\t\t\t\t\t\t\t\t$channel .= \"</a>\";\n\t\t\t\t}\n\t\t\t\tif ( $system->getConf( \"site.shopex_certify\" ) == 0 )\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$ref = $_SERVER['HTTP_HOST'];\n\t\t\t\t\t\t\t\t$check = md5( $ref.\"ShopEx@Store\" );\n\t\t\t\t\t\t\t\t$str = urlencode( $system->getConf( \"certificate.str\" ) );\n\t\t\t\t\t\t\t\tif ( !$str )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$str = urlencode( __( \"无\" ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( constant( \"SAAS_MODE\" ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$versionStr = \"\";\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\t\t\t$versionStr = \"v\".$system->_app_version;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( $system->use_gzip )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$gzip = \"enabled\";\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\t\t\t$gzip = \"disabled\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$themeFoot = \"<div class=\\\"themefoot\\\">\".$system->getConf( \"system.foot_edit\" ).\"</div>\";\n\t\t\t\t\t\t\t\t$PoweredStr = \"<div style=\\\"font-family:Verdana;line-height:20px!important;height:auto!important;font-size:11px!important;text-align:center;overflow:none!important;text-indent:0!important;\\\">\";\n\t\t\t\t\t\t\t\tif ( $system->getConf( \"certificate.auth_type\" ) == \"commercial\" )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$greencard = $system->getConf( \"store.greencard\" );\n\t\t\t\t\t\t\t\t\t\t\t\tif ( !isset( $greencard ) || $greencard )\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$PoweredStr .= \"<a href='http://service.shopex.cn/show/certinfo.php?certi_id=\".$system->getConf( \"certificate.id\" ).\"&url=\".rawurlencode( $system->base_url( ) ).\"' target='_blank'><img src='statics/bottom-authorize.gif'></a><br>\";\n\t\t\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\t\t//$PoweredStr .= \"<a href=\\\"http://store.shopex.cn/rating/store_detail.php?ref=\".$ref.\"&check=\".$check.\"&str=\".$str.\"\\\" target=\\\"_blank\\\" style=\\\"color:#666;text-decoration:none;cursor:pointer\\\">\";\n\t\t\t\t\t\t\t\t//$PoweredStr .= \"Powered&nbsp;by&nbsp;<b style=\\\"color:#5c719e\\\">Shop</b><b style=\\\"color:#f39000\\\">Ex</b>\";\n\t\t\t\t\t\t\t\t//$PoweredStr .= \"</a>\";\n\t\t\t\t\t\t\t\t//$PoweredStr .= \"<span style=\\\"font-size:9px;\\\">&nbsp;\".$versionStr.\"</span>\";\n\t\t\t\t\t\t\t\t//$PoweredStr .= \"<span style=\\\"color:#999;display:none\\\">&nbsp|Gzip \".$gzip.\"</span>&nbsp;\";\n\t\t\t\t\t\t\t\tif ( $channel )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$PoweredStr .= \"<br/><span>\".$channel.\"</span>&nbsp;\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( $system->getConf( \"site.certtext\" ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$PoweredStr .= \"<a href=\\\"http://www.miibeian.gov.cn/\\\" target=\\\"blank\\\" style=\\\"color:#666;text-decoration:none;cursor:pointer;display:block;\\\" class=\\\"textcenter\\\">\".$system->getConf( \"site.certtext\" ).\"</a>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( $wssjs )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$PoweredStr .= \"<span style=\\\"display:none\\\">\".$wssjs.\"</span>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$PoweredStr .= \"</div>\";\n\t\t\t\t}\n\t\t\t\treturn $html.$themeFoot.$PoweredStr;\n}", "function print_footer() {\n\n\t\tglobal $DOCUMENT_ROOT;\n\t\tinclude(\"$DOCUMENT_ROOT/es/includes/footer.inc\");\n\n\t\techo \" </body>\\n\";\n\t\techo \" </html>\\n\";\n\t}", "function footer_wp_version() {\n\tremove_filter( 'update_footer', 'core_update_footer' );\n}", "public function scripts_at_product_cat_screen_footer()\n {\n }", "function code_for_footer() {\n\n ?>\n <!-- code for footer like Google Analytics. -->\n <?php\n\n}", "function do_install_page_close() {\n\t# Call footer block function- does copyright and tag close out\n\t\t$_out = do_install_page_footer_block();\n\n\t# Call page closeout function- does page tag close outs\n\t\t$_out .= do_install_page_closeout();\n\n\t# Return results\n\t\treturn $_out;\n}", "function carolina_footer (){\n remove_action('storefront_footer', 'storefront_credit', 20);\n add_action('storefront_after_footer', 'carolina_new_footer', 10);\n}", "function hime_html_footer($can_query = true) {\n\t?>\n\t</main>\n\t<footer id=\"footer\" role=\"contentinfo\">\n\t\t<ul>\n\t\t\t<li><a href=\"https://pomf.hebia.me\">Hime Pomf</a></li>\n\t\t\t<li><a href=\"#\">Paste</a></li>\n\t\t\t<li><a href=\"/\">URL Shortener</a></li>\n\t\t</ul>\n\t\t<?php\n\t\t$footer = yourls_s( '' );\n\t\techo yourls_apply_filter( 'html_footer_text', $footer );\n\t\t?>\n\t</footer>\n\t<?php if( defined( 'YOURLS_DEBUG' ) && YOURLS_DEBUG == true ) {\n\t\techo '<div style=\"text-align:left\"><pre>';\n\t\techo join( \"\\n\", yourls_get_debug_log() );\n\t\techo '</div>';\n\t} ?>\n\t<?php yourls_do_action( 'html_footer', yourls_get_html_context() ); ?>\n\t</body>\n\t</html>\n\t<?php\n}", "function custom_footer() {\n ?>\n <!-- Place HTML content Here -->\n <?php\n}", "function make_footer() {\n\tglobal $footer, $themetemplates, $user_vars, $item_id;\n\t$tplext = TPL_EXT;\n\tgrab_title('footer');\n\t$footer = inject_variables($footer, $user_vars['footer']);\n\t$footer = inject_variables($footer, $user_vars['loops']);\n\t$footer = applyOzone('footer', $footer);\n\treturn sprintt($footer, safe_tpl(\"$themetemplates/@footer{$tplext}\"));\n}", "function alienship_entry_footer_markup_close() {\n\techo '</footer>';\n}", "private function affiche_footer() {\r\n\t\techo '\r\n\t\t\t<footer class=\"bottom\">\r\n\t\t\t\t<div class=\"container\">\r\n\t\t\t\t\t<p class=\"text-center\">Magmasters - Kaliemie 2016.</p>\r\n\t\t\t\t</div>\r\n\t\t\t</footer>';\r\n\t}", "function page_footer()\n{\n?>\n\t\t</div>\n\t\t<div id=\"footer\">\n\t\t\t<p>\n\t\t\t\tTeam Boxcat, 2012<br />\n\t\t\t\tCoral, Henry, Laure\n\t\t\t</p>\n\t\t</div>\n\t</body>\n</html>\n<?php\n}", "function footer()\n{\n ?>\n <footer>\n <p>&copy; 2005 - <?php echo date('Y'); ?> <?php echo get_company_info('name'); ?> All Rights Reserved.</p>\n <p><em><?php shell_exec(\"git log -1 --pretty=format:'%h - %s (%ci)' --abbrev-commit\"); ?></em></p>\n </footer>\n <?php\n}", "function appthemes_after_footer() {\n\t/**\n\t * Called in the footer.php after the footer section.\n\t */\n\tdo_action( 'appthemes_after_footer' );\n}", "public function printPageFooter($footer = WS_FOOTER) {\n echo <<< EOD\n <footer>\n <p>{$footer}</p>\n </footer>\n</body>\n</html>\nEOD;\n }", "function gazebo_ubc_clf_visual_identity_footer($variables) {\n\n $output = '<div id=\"UbcBottomInfoWrapper\">\n <div id=\"UbcBottomInfo\" class=\"UbcContainer\">\n <div id=\"UbcBottomLeft\" >\n <p>';\n $image = array(\n 'path' => base_path() . path_to_theme() . '/_ubc_clf/img/footer/logo.gif', \n 'alt' => t('A place of mind, The University of British Columbia'),\n 'title' => t('A place of mind, The University of British Columbia'),\n );\n \n $output .= '<a href=\"http://www.ubc.ca\">' . theme('image', $image) . '</a>'; \n $output .= '</p>\n </div><!-- End UbcBottomLeft -->\n <div id=\"UbcBottomCenter\">';\n $output .= variable_get('clf_umbrella_hcard');\n $output .= '</div><!-- End UbcBottomCenter -->\n <div id=\"UbcBottomRight\">';\n $output .= variable_get('clf_unit_hcard'); \n $output .= '</div><!-- End UbcBottomRight -->\n </div><!-- End UbcBottomInfo UbcContainer -->\n </div><!-- End UbcBottomInfoWrapper -->';\n \n return $output;\n}", "protected function footer() {\r\n\t\tif (Maps_Marker_Pro::$settings['whitelabelBackend']) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t?>\r\n\t\t<div class=\"wrap mmp-wrap\">\r\n\t\t\t<div class=\"mmp-footer\">\r\n\t\t\t\t<div class=\"mmp-footer-links\">\r\n\t\t\t\t\tMaps Marker Pro<sup>&reg;</sup> <a href=\"https://www.mapsmarker.com/v<?= Maps_Marker_Pro::$version ?>\" target=\"_blank\" title=\"<?= esc_attr__('View release notes', 'mmp') ?>\">v<?= Maps_Marker_Pro::$version ?></a>\r\n\t\t\t\t\t<a href=\"https://www.mapsmarker.com/\" target=\"_blank\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/website-home.png', __DIR__) ?>\" /> MapsMarker.com\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://affiliates.mapsmarker.com/\" target=\"_blank\" title=\"<?= esc_attr__('MapsMarker affiliate program - sign up now and receive commissions up to 50%!', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/affiliates.png', __DIR__) ?>\" /> <?= esc_html__('Affiliates', 'mmp') ?>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://www.mapsmarker.com/reseller/\" target=\"_blank\" title=\"<?= esc_attr__('MapsMarker reseller program - re-sell with a 20% discount!', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/resellers.png', __DIR__) ?>\" /> <?= esc_html__('Resellers', 'mmp') ?>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://www.mapsmarker.com/reviews/\" target=\"_blank\" title=\"<?= esc_attr__('Please review this plugin on wordpress.org', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/star.png', __DIR__) ?>\" /> <?= esc_html__('Reviews', 'mmp') ?>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://translate.mapsmarker.com/\" target=\"_blank\" title=\"<?= esc_attr__('Help translate Maps Marker Pro', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/translations.png', __DIR__) ?>\" /> <?= esc_html__('Translations', 'mmp') ?>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://www.mapsmarker.com/hackerone/\" target=\"_blank\" title=\"<?= esc_attr__('Bounty Hunters wanted - find security bugs to earn cash and licenses!', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/hackerone.png', __DIR__) ?>\" /> hackerone\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://twitter.com/mapsmarker/\" target=\"_blank\" title=\"<?= esc_attr__('Follow @MapsMarker on Twitter', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/twitter.png', __DIR__) ?>\" /> Twitter\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://facebook.com/mapsmarker/\" target=\"_blank\" title=\"<?= esc_attr__('Follow MapsMarker on Facebook', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/facebook.png', __DIR__) ?>\" /> Facebook\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://www.mapsmarker.com/changelog/pro/\" target=\"_blank\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/changelog.png', __DIR__) ?>\" /> <?= esc_html__('Changelog', 'mmp') ?>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"http://www.mapsmarker.com/feed/\" target=\"_blank\" title=\"<?= esc_attr__('News via RSS', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/rss.png', __DIR__) ?>\" /> RSS\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"https://feedburner.google.com/fb/a/mailverify?uri=MapsMarker\" target=\"_blank\" title=\"<?= esc_attr__('News via email', 'mmp') ?>\">\r\n\t\t\t\t\t\t<img src=\"<?= plugins_url('images/icons/rss-email.png', __DIR__) ?>\" /> RSS (<?= esc_html__('via email', 'mmp') ?>)\r\n\t\t\t\t\t</a>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "function output_footer($pageName){\n echo \t\t'<div class=\"footer-main-div\">';\n echo \t\t'</div>';\n echo \t\t'<div class=\"footer-bottom\">';\n echo \t\t\t'<p> Copyright© E-Commerce Website.All rights reserved</p>';\n echo \t\t'</div>';\n echo \t'</body>';\n echo '</html>';\n}", "public function outputFooterExtra()\n\t{\n\t\t$this->outputJavascriptCode($this->app->extra_javascript['footer']);\n\n\t\techo $this->app->extra_html['footer'];\n\n\t\t$this->app->plugins->run('system_theme_output_footer_extra', $this);\n\t}", "function footer() {\n }", "public function getFooter()\n {\n $shop_address = $this->getShopAddress();\n\n $id_shop = (int) $this->shop->id;\n\n $this->smarty->assign(array(\n 'available_in_your_account' => $this->available_in_your_account,\n 'shop_address' => $shop_address,\n 'shop_fax' => Configuration::get('PS_SHOP_FAX', null, null, $id_shop),\n 'shop_phone' => Configuration::get('PS_SHOP_PHONE', null, null, $id_shop),\n 'shop_email' => Configuration::get('PS_SHOP_EMAIL', null, null, $id_shop),\n 'free_text' => Configuration::get('PS_INVOICE_FREE_TEXT', (int) Context::getContext()->language->id, null, $id_shop),\n ));\n\n return $this->smarty->fetch($this->getTemplate('footer'));\n }", "private function getFooter() {\n\t\t$this->data['oxfooter']\t= '<div style=\"text-align:center; color:#666666; margin-top:5px\">'\n\t\t. ucfirst( $this->_name ) . ' v.' .$this->_version. ' &copy; ' . date( 'Y' )\n\t\t. ' by <a href=\"http://osworx.net\" onclick=\"window.open(this);return false;\" title=\"OSWorX\">OSWorX</a>'\n\t\t. '</div>';\n\t}", "public function footer() {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\nif (true)\n{\n$IPBHTML .= <<<HTML\n\t\t<br /><br />\n\t\t<div style='float:right; margin:10px;'>\n\t\t\t<tr style='text-align:center;'>\n\t\t\t\t<td style='padding:5px;'>ibEconomy {$this->caches['app_cache']['ibEconomy']['app_version']} &copy; 2011 &nbsp;\n\t\t\t\t<a style='text-decoration:none;' href='http://emoneycodes.com/forums/' title='emoneyCodes.com - (e$) Mods'><span class='ipsBadge badge_green' style='text-decoration:none;'>(e$) Mods</span></a></td>\n\t\t\t</tr>\n\t\t</div>\nHTML;\n}\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function output_footer()\n {\n echo<<<_END\n </div> <!-- end of content -->\n</div> <!-- end admin_box2 (funtions display area)-->\n<div class=\"cleaner\"></div>\n\n</div>\n <div class=\"cleaner\"></div>\n\n</div> <div id=\"templatemo_content_wrapper_bottom\"></div> <!-- end of content_wrapper -->\n\n<div id=\"templatemo_footer\">\n\n \t\t\t<ul class=\"footer_menu\">\n <li><a href=\"index.html\">Home</a></li>\n <li><a href=\"products.php\">Products</a></li>\n <li><a href=\"blog.php\">Blog</a></li>\n <li><a href=\"about.html\">About us</a></li>\n <li class=\"last_menu\"><a href=\"contact.html\">Contact</a></li>\n </ul>\n\n Copyright © 2014 <a href=\"#\">Your Company Name</a> |\n Website created by <a href=\"http://www.brightprogrammes.com\" target=\"_blank\"> Bright Programmes</a></div>\n\n</body>\n</html>\n_END;\n }", "function print_footer() {\n echo<<<END\n<div id=\"footer\"> </div>\n</body>\n</html>\nEND;\n}" ]
[ "0.7687916", "0.7128028", "0.7018685", "0.7011328", "0.69738835", "0.6973523", "0.6965601", "0.68954587", "0.6894889", "0.686678", "0.6859481", "0.6852378", "0.68458015", "0.6822705", "0.68172896", "0.6816714", "0.6736312", "0.6730286", "0.6717845", "0.6710537", "0.6706773", "0.6693296", "0.66932255", "0.66915727", "0.66868156", "0.6654364", "0.664898", "0.66393435", "0.663587", "0.6635822", "0.66286266", "0.6615766", "0.6596533", "0.65933007", "0.65666324", "0.6562367", "0.6552498", "0.655069", "0.6540679", "0.6529694", "0.6528106", "0.65151507", "0.6512043", "0.6511131", "0.6510261", "0.6507871", "0.6505512", "0.6500346", "0.64996743", "0.6491968", "0.64898676", "0.6484727", "0.6483349", "0.6482588", "0.6472974", "0.646147", "0.6458324", "0.6454838", "0.64472336", "0.6442502", "0.6442224", "0.64380544", "0.64332235", "0.6425439", "0.6425439", "0.6425439", "0.6425439", "0.6425439", "0.6421437", "0.6421437", "0.6418774", "0.6413235", "0.63772863", "0.63772863", "0.63762707", "0.63739413", "0.6368428", "0.6361991", "0.6361784", "0.6360762", "0.6355951", "0.63517416", "0.6345109", "0.63375884", "0.6321377", "0.6320531", "0.6312001", "0.63060856", "0.6303995", "0.6293045", "0.62895924", "0.6288412", "0.6282992", "0.6282262", "0.62816596", "0.6273614", "0.62706614", "0.62640405", "0.6261757", "0.6260801" ]
0.85744286
0
woocommerce_pip_invoice_number function. Output invoice number if needed
Функция woocommerce_pip_invoice_number. Вывод номера счета, если это необходимо
function woocommerce_pip_invoice_number( $order_id ) { $invoice_number = get_option( 'woocommerce_pip_invoice_start', 1 ); if ( add_post_meta( $order_id, '_pip_invoice_number', get_option( 'woocommerce_pip_invoice_prefix' ) . $invoice_number . get_option( 'woocommerce_pip_invoice_suffix' ), true) ) { update_option( 'woocommerce_pip_invoice_start', $invoice_number + 1 ); } return get_post_meta( $order_id, '_pip_invoice_number', true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_invoice_number() {\n\t\treturn $this->invoice_number;\n\t}", "public function invoice_number_callback()\n {\n printf(\n '<input type=\"text\" id=\"invoice_number\" name=\"hbl_option_name[invoice_number]\" value=\"%s\" />',\n isset($this->options['invoice_number']) ? esc_attr($this->options['invoice_number']) : ''\n );\n }", "public function getInvoiceNumber()\n {\n return isset($this->data[3]) ? $this->data[3] : '';\n }", "public function getInvoiceNumber()\n {\n return $this->_fields['InvoiceNumber']['FieldValue'];\n }", "public function getInvoiceNumber(): int;", "private function invoiceNumbers()\n {\n $numbers = $this->confPdf[ 'invoice.' ][ 'content.' ][ 'numbers.' ];\n\n// LOOP : fields, the elements of a product\n foreach ( array_keys( ( array ) $numbers ) as $key )\n {\n if ( !stristr( $key, '.' ) )\n {\n continue;\n }\n\n $this->writeTextblock( $numbers[ $key ], 'invoice.numbers.' . $key );\n }\n }", "public function getInvoiceNumber(): ?string\n {\n return $this->invoiceNumber;\n }", "public static function invoiceID($pid) {\n return 'drupal_paypal_payment_ipn-' . self::hashPID($pid) . '-' . $pid;\n }", "function slInvoiceNumber(&$out) {\n $invnumber = $out['our_claim_id'];\n $atmp = preg_split('/[ -]/', $invnumber);\n $acount = count($atmp);\n\n $pid = 0;\n $encounter = 0;\n if ($acount == 2) {\n $pid = $atmp[0];\n $encounter = $atmp[1];\n }\n else if ($acount == 3) {\n $pid = $atmp[0];\n $brow = sqlQuery(\"SELECT encounter FROM billing WHERE \" .\n \"pid = '$pid' AND encounter = '\" . $atmp[1] . \"' AND activity = 1\");\n \n $encounter = $brow['encounter'];\n }\n else if ($acount == 1) {\n $pres = sqlStatement(\"SELECT pid FROM patient_data WHERE \" .\n \"lname LIKE '\" . addslashes($out['patient_lname']) . \"' AND \" .\n \"fname LIKE '\" . addslashes($out['patient_fname']) . \"' \" .\n \"ORDER BY pid DESC\");\n while ($prow = sqlFetchArray($pres)) {\n if (strpos($invnumber, $prow['pid']) === 0) {\n $pid = $prow['pid'];\n $encounter = substr($invnumber, strlen($pid));\n break;\n }\n }\n }\n\n if ($pid && $encounter) $invnumber = \"$pid.$encounter\";\n return array($pid, $encounter, $invnumber);\n }", "public function generateInvoice()\n {\n $order = Order::orderBy('created_at', 'DESC');\n //jika sudah terdapat records\n if ($order->count() > 0) {\n //mengambil data pertama yang sdh dishort DESC\n $order = $order->first();\n //explode invoice untuk mendapatkan angkanya\n $explode = explode('-', $order->invoice);\n $hasil = 'INV-' . ($explode[1] + 1);\n //angka dari hasil explode di +1\n return $hasil;\n }\n //jika belum terdapat records maka akan me-return INV-1\n return 'INV-1';\n }", "Public Static function getNewInvoiceNumber() {\n $q = date(\"dmy\");\n $options = [\n 'type' => 'object',\n 'subtype' => AgoraSale::SUBTYPE,\n 'metadata_name_value_pairs' => [\n ['name' => 'bill_number', 'value' => $q.'%', 'operand' => 'like'],\n ],\n 'limit' => 1,\n ];\n $entities = elgg_get_entities($options);\n \n if ($entities) {\n $last_invoice_no = (int) substr($entities[0]->bill_number, -5);\n $last_invoice_no++;\n $new_invoice_no = $q.AgoraOptions::addLeadingZero($last_invoice_no);\n }\n else {\n $new_invoice_no = $q.AgoraOptions::addLeadingZero(1);\n } \n \n return $new_invoice_no;\n }", "public function generate_invoice()\n {\n if (!class_exists('WC_Order')) {\n return;\n }\n\n // Load order\n $order = new WC_Order($_GET['wpd_generate_invoice']); \n\n if (!$order) {\n return;\n }\n\n // Check if user has rights to generate invoices\n $current_user = wp_get_current_user();\n $user_ok = false;\n\n if ($current_user instanceof WP_User) {\n if (in_array('administrator', $current_user->roles) || in_array('shop_manager', $current_user->roles)) {\n $user_ok = true;\n }\n }\n\n if (!$user_ok) {\n return;\n }\n\n // Check maybe we already have invoice for this order\n $invoice_id = get_post_meta($order->id, 'woo_pdf_invoice_id', true);\n if (!empty($invoice_id)) {\n wp_redirect(admin_url('/post.php?post='.$_GET['wpd_generate_invoice'].'&action=edit'));\n exit;\n }\n\n // If not - create a new one\n $this->make_invoice($order);\n\n // Redirect back to order page\n wp_redirect(admin_url('/post.php?post='.$_GET['wpd_generate_invoice'].'&action=edit'));\n exit;\n }", "public function push_invoice()\n {\n $invoice = explode('|', base64_decode($_GET['wpd_invoice']));\n\n if (count($invoice) != 4) {\n exit;\n }\n\n // Get file path\n $upload_dir = wp_upload_dir();\n $location = $upload_dir['basedir'] . '/' . 'woocommerce_pdf_invoices';\n $file_path = $location . '/' . $invoice[2] . '.pdf';\n\n // Push file to browser\n if ($fp = fopen($file_path, 'rb')) {\n header('Content-Type: application/pdf');\n header('Content-Length: ' . filesize($file_path));\n header('Content-disposition: attachment; filename=\"'._x($this->opt['woo_pdf_title_filename_prefix'], 'file name prefix', 'woo_pdf') . (!empty($invoice[1]) ? $invoice[1] . '_' : '') . $invoice[0] . (!empty($invoice[3]) ? '_' . $invoice[3] : '') . '.pdf\"');\n fpassthru($fp);\n }\n\n exit;\n }", "function woocommerce_pip_client_window() {\n\tif ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\t\t$order_id = $_GET['post'];\n\t\t$order = new WC_Order( $order_id );\n\t\t$current_user = wp_get_current_user();\n\t\t$action = 'print_invoice';\n\t\t$client = true;\n\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'client-print-pip' ) || ! is_user_logged_in() || $order->user_id != $current_user->ID ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows (actually this one might not be needed, are the customers in the admin for this?)\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\tob_start();\n\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t$content .= ob_get_clean();\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "public function setInvoiceNumber($value)\n {\n $this->_fields['InvoiceNumber']['FieldValue'] = $value;\n return $this;\n }", "public function generateInvoice()\n {\n $order = Order::orderBy('created_at', 'desc');\n\n //jika sudah ada records\n if($order->count() > 0){\n //ambil data pertama yang sudah disort desc\n $order = $order->first();\n //explode invoice untuk dapat angkanya\n $explode = explode('-', $order->invoice);\n $count = $explode[1] + 1;\n //angka dari hasil explode +1\n return 'INV-' .$count;\n }\n //kalo belum ada record\n return 'INV-1';\n }", "public function generateInvoiceReference()\n {\n $date = date('Y_m_d');\n return $this->invoice_reference = strtoupper(uniqid($date.'_'));\n }", "function ora_woocommerce_order_number( $oldnumber, $order ) {\n return 'WC-' . $order->id;\n}", "public function getInvoiceId();", "function getInvoiceId() {\n\t\treturn $this->getSchedConfId() . '-' . $this->getUserId() . '-' . $this->getAssocId() . '-' . $this->getPaymentId();\n\t}", "public function getInvoice(): ?string\n {\n return $this->invoice;\n }", "public function getPurchaseInvoiceID()\n {\n return $this->purchaseInvoiceID;\n }", "function generateInvoiceId() {\n $pattern = ConfigOptions::getValue('invoicing_number_pattern');\n $padding = (integer) ConfigOptions::getValue('invoicing_number_counter_padding');\n\n // retrieve counters\n list($total_counter, $year_counter, $month_counter) = Invoices::getDateInvoiceCounters();\n $total_counter++; $year_counter++; $month_counter++;\n\n // Apply padding, if needed\n $prepared_total_counter = $padding ? str_pad($total_counter, $padding, '0', STR_PAD_LEFT) : $total_counter;\n $prepared_year_counter = $padding ? str_pad($year_counter, $padding, '0', STR_PAD_LEFT) : $year_counter;\n $prepared_month_counter = $padding ? str_pad($month_counter, $padding, '0', STR_PAD_LEFT) : $month_counter;\n\n // retrieve variables\n $variable_year = date('Y');\n $variable_month = date('n');\n $variable_month_short = date('M');\n $variable_month_long = date('F');\n\n $generated_invoice_id = str_ireplace(array(\n INVOICE_NUMBER_COUNTER_TOTAL,\n INVOICE_NUMBER_COUNTER_YEAR,\n INVOICE_NUMBER_COUNTER_MONTH,\n INVOICE_VARIABLE_CURRENT_YEAR,\n INVOICE_VARIABLE_CURRENT_MONTH,\n INVOICE_VARIABLE_CURRENT_MONTH_SHORT,\n INVOICE_VARIABLE_CURRENT_MONTH_LONG,\n ), array(\n $prepared_total_counter,\n $prepared_year_counter,\n $prepared_month_counter,\n $variable_year,\n $variable_month,\n $variable_month_short,\n $variable_month_long,\n ), $pattern);\n\n return $generated_invoice_id;\n }", "function set_invoice_number($number='')\n\t{\n\t\t$this->invoice_number = $number;\n\t\treturn true;\n\t}", "public function getInvoice()\n {\n return $this->invoice;\n }", "public function getInvoice()\n {\n return $this->invoice;\n }", "public function invoice_no_generator($invoice_type = 0) // 0-purchase, 1-sells\n {\n $this->db->select(\"purchase_invoice_prefix,sell_invoice_prefix\");\n $this->db->from(\"company_setup\");\n $this->db->where(\"id\", 1);\n $query = $this->db->get();\n $result = $query->row();\n\n if($invoice_type == 0){\n $order_default_prefix = $result->purchase_invoice_prefix;\n }else{\n $order_default_prefix = $result->sell_invoice_prefix;\n }\n\n // Now get the last invoice info\n $this->db->select('invoice_no');\n $this->db->like('invoice_no', $order_default_prefix);\n $this->db->from('invoices');\n $this->db->where('invoice_type', $invoice_type);\n $this->db->order_by(\"id\", \"desc\");\n $this->db->limit(1);\n $query = $this->db->get();\n $num_rows = $query->num_rows();\n\n if ($num_rows > 0) {\n $row = $query->row();\n $invoice_no = $row->invoice_no;\n $str_to_arr = explode($order_default_prefix, $invoice_no);\n $only_number_val = $str_to_arr[1];\n $only_number_val = $only_number_val + 1;\n $length_of_total_number = strlen($str_to_arr[1]);\n $generated_number = str_pad($only_number_val,$length_of_total_number,\"0\",STR_PAD_LEFT);\n } else {\n $generated_number= \"000001\";\n }\n\n return $order_default_prefix.$generated_number;\n }", "public function getInvoiceId(): int\n {\n return $this->invoiceId;\n }", "function generateInvoiceNumber($inv_len = 7)\r\n{\r\n $max_inv_id = \\App\\Invoice::max('id');\r\n if (empty($max_inv_id))\r\n $max_inv_id = 1;\r\n return $dbValue = str_pad($max_inv_id, $inv_len, \"0\", STR_PAD_LEFT);\r\n}", "public static function _generateInvoiceNumber($a_user_id = 0)\n\t{\n\t\tglobal $ilSetting;\n\t\t\n\t\tif($a_user_id == 0)\n\t\t{\n\t\t\tglobal $ilUser;\n\t\t\t$a_user_id = $ilUser->getId();\n\t\t}\n\n\t\t$inst_id = $ilSetting->get('inst_id');\n\t\t$cur_time = time();\n\n\t\tinclude_once './Services/Payment/classes/class.ilUserDefinedInvoiceNumber.php';\n\t\t$invObj = new ilUserDefinedInvoiceNumber();\n\n\t\tif($invObj->getUDInvoiceNumberActive() == 1)\n\t\t{\n\t\t\t$next_number = ilUserDefinedInvoiceNumber::_nextIncCurrentValue();\n\t\t\t\n\t\t\t$invoice_number = $invObj->getInvoiceNumberText();\n\n\t\t\t$invoice_number = str_replace('[CURRENT_TIMESTAMP]', $cur_time, $invoice_number);\n\t\t\t$invoice_number = str_replace('[INSTALLATION_ID]', $inst_id, $invoice_number);\n\t\t\t$invoice_number = str_replace('[USER_ID]', $a_user_id, $invoice_number);\n\t\t\t$invoice_number = str_replace('[DAY]', date('d', $cur_time), $invoice_number);\n\t\t\t$invoice_number = str_replace('[MONTH]', date('m', $cur_time), $invoice_number);\n\t\t\t$invoice_number = str_replace('[YEAR]', date('Y', $cur_time), $invoice_number);\n\t\t\t$invoice_number = str_replace('[INCREMENTAL_NUMBER]', $next_number, $invoice_number);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$inst_id_time = $inst_id.'_'.$a_user_id.'_'.substr((string) $cur_time,-3);\n\t\t\t$invoice_number = $inst_id_time.substr(md5(uniqid(rand(), true)), 0, 4);\n\t\t}\n\t\t\n\t\treturn $invoice_number;\n\t}", "public function get_next_invoice_number()\n {\n // Maybe reset counter each year\n $reset_internal_sequence = false;\n\n if ($this->opt['woo_pdf_reset_each_year']) {\n if ($last_invoice_year = get_option('woo_pdf_last_invoice_year')) {\n if ((int) $last_invoice_year < (int) date('Y')) {\n $reset_internal_sequence = true;\n }\n }\n }\n\n // Track invoice numbers when generating invoices in batches\n if ($this->batch_invoice_id_counter !== null) {\n $this->batch_invoice_id_counter = $this->batch_invoice_id_counter;\n }\n else {\n $this->batch_invoice_id_counter = ($reset_internal_sequence ? 1 : $this->opt['woo_pdf_next_invoice_number']);\n }\n\n $next_invoice_number = $this->batch_invoice_id_counter;\n\n // Increment for next invoice\n $this->batch_invoice_id_counter++;\n\n // Store next invoice number in options storage\n $this->update_options(array('woo_pdf_next_invoice_number' => ($next_invoice_number + 1)));\n\n // Track year of last invoice generated for counter reset functionality\n update_option('woo_pdf_last_invoice_year', date('Y'));\n\n return $next_invoice_number;\n }", "public function getInvoiceLine()\n {\n return $this->invoiceLine;\n }", "function getPurchaseOrderNumber() {\n return $this->getVarcharField2();\n }", "public function getInvoice()\n\t{\n\t\treturn $this->tran->invoice;\n\t}", "public function getInvoice()\n\t{\n\t\treturn $this->tran->invoice;\n\t}", "public static function generateReferenceNumber($invoiceNumber)\n {\n $reversed = strrev($invoiceNumber);\n $coefficient = array(7, 3, 1);\n $num = 0;\n for ($i = 0; $i < strlen($reversed); $i++) {\n $num += $reversed[$i] * $coefficient[$i % 3];\n }\n $controlNumber = (10 - ($num % 10)) % 10;\n $referenceNumber = $invoiceNumber . $controlNumber;\n return $referenceNumber;\n }", "private function getClientNumber($invoice)\n {\n $address = $invoice->getBillingAddress();\n $vat = $address->getVatId();\n\n if (!$address->getCountryId() == 'PT') {\n Mage::log(\"Winvoice | O NIF do cliente \".$vat.\" eh invalido\", null, 'winvoice.log', true);\n Mage::throwException('Numero de contribuinte invalido: '.Mage::helper('adminhtml')->__($vat));\n }\n if (!$this->isValidNif($vat)) {\n Mage::log(\"Winvoice | O NIF do cliente \".$vat.\" eh invalido\", null, 'winvoice.log', true);\n Mage::throwException('Numero de contribuinte invalido: '.Mage::helper('adminhtml')->__($vat));\n }\n\n $customer = Mage::getModel('customer/customer')->load($invoice->getOrder()->getCustomerId());\n\n Mage::log(\"Winvoice | Os dados do cliente na invoice são:\", null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Nome:\".$invoice->getOrder()->getCustomerName(), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | ID:\".$invoice->getOrder()->getCustomerId(), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | NIF:\".$address->getVatId()/*$invoice->getOrder()->getCustomerTaxvat()*/, null, 'winvoice.log', true);\n Mage::log(\"Winvoice | WSClient do cliente:\".$customer->getWsclient(), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | WSClient da encomenda:\".$invoice->getOrder()->getCustomerWsclient(), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Morada: \".$address->getStreetFull(), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Codigo Postal: \".$address->getPostcode(), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Cidade: \".$address->getCity(), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Pais: \".$address->getCountryId(), null, 'winvoice.log', true);\n\n if (is_numeric($customer->getWsclient())) {\n return $customer->getWsclient();\n }\n\n $useCURL = isset($_POST['usecurl']) ? $_POST['usecurl'] : '0';\n $err = $this->client->getError();\n\n if ($err) {\n Mage::log(\"Winvoice | Erro ao criar factura.\", null, 'winvoice.log', true);\n Mage::throwException(Mage::helper('adminhtml')->__('Erro ao criar factura.'));\n exit();\n }\n\n $this->client->setUseCurl($useCURL);\n $this->client->soap_defencoding = 'UTF-8';\n\n if (is_numeric($vat)) {\n $vatnumber = $vat;\n } else {\n $vatnumber = '999999900';\n }\n\n $AddClientIn = array (\n 'code' => \"MAG\".$invoice->getOrder()->getCustomerId().rand(1, 999999),\n 'name' => $invoice->getOrder()->getCustomerName(),\n 'nif' => $vatnumber,\n // email string Endereço de email\n // url string Página web\n 'address' => $address->getStreetFull(),\n 'postcode' => $address->getPostcode(),\n 'city' => $address->getCity(),\n 'country' => $address->getCountryId(),\n // telephone string Telefone do cliente (ex: 212109902)\n // mobile string Telemóvel do cliente\n // fax string Fax do cliente\n // description string Descrição\n );\n\n $params = array(\n 'data' => $AddClientIn,\n 'password'=> $this->password,\n );\n\n $result = $this->client->call(\"AddClient\", $params);\n\n if ($this->client->fault) {\n Mage::log(\"Winvoice | Erro ao criar factura.\", null, 'winvoice.log', true);\n Mage::throwException(Mage::helper('adminhtml')->__('Erro ao criar factura.'));\n } else {\n $err = $this->client->getError();\n\n if ($err) {\n Mage::log(\"Winvoice | Erro ao criar factura.\", null, 'winvoice.log', true);\n Mage::throwException(Mage::helper('adminhtml')->__('Erro ao criar factura.'));\n } else {\n if ($invoice->getOrder()->getCustomerId()) {\n $customer = Mage::getModel('customer/customer')->load($invoice->getOrder()->getCustomerId());\n $customer->setWsclient($result['description1']);\n $customer->save();\n } else {\n Mage::log(\"Winvoice | Erro ao criar factura.\", null, 'winvoice.log', true);\n Mage::log(\"Winvoice | One time costumer processed.\", null, 'winvoice.log', true);\n }\n\n Mage::log(\"Winvoice | Foi criado um novo WSClient com o numero \".$result['description1'], null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Codigo API do novo WSClient: \".$result['answer'], null, 'winvoice.log', true);\n\n return $result['description1'];\n }\n }\n }", "function wpo_wcpdf_custom_filename($filename, $template_type, $order_ids, $context)\n{\n // prepend your shopname to the file\n $invoice_string = _n('invoice', 'invoices', count($order_ids), 'woocommerce-pdf-invoices-packing-slips');\n $new_prefix = \"Pedido-\";\n $new_filename = str_replace($invoice_string, $new_prefix, $filename);\n\n return $new_filename;\n}", "public function customer_invoice($order)\n {\n }", "public function get_order_number() {\n\n if(is_order_received_page() && did_action('woocommerce_before_thankyou') && !did_action('woocommerce_thankyou')){\n return (string) apply_filters( 'woocommerce_order_number', $this->get_parent_id(), $this );\n\n }\n return (string) apply_filters( 'woocommerce_order_number', $this->get_id(), $this );\n }", "function send_customer_invoice($request) { #API\r\n if(!validate_request($request)) {\r\n return invalid_request_response();\r\n }\r\n \r\n if(!isset($request['orderid']))\r\n return \"ERROR: Missing email\";\r\n\r\n $order = wc_get_order(absint($request['orderid']));\r\n if(!$order) \r\n return \"ERROR: Couldn't find order '\".$request['orderid'].\"'\";\r\n\r\n $wc = WC();\r\n if(!$wc) return \"ERROR: Couldn't get WC?\";\r\n $mailer = $wc->mailer();\r\n if(!$mailer) return \"ERROR: Couldn't get mailer?\";\r\n $mailer->customer_invoice($order);\r\n\r\n return \"Probably OK\";\r\n}", "function getInvoiceNum()\n{\n\t\n\t$res = executeQuery(\"SHOW TABLE STATUS LIKE 'orders'\");\n\treturn (int)$res[0]['Auto_increment'];\n}", "protected function getExternalId(Mage_Sales_Model_Order_Invoice $invoice)\n {\n $incrementId = $invoice->getIncrementId();\n if (! empty($incrementId)) {\n return $incrementId;\n } else {\n return uniqid($invoice->getOrderId() . '-');\n }\n }", "public function withInvoiceNumber($value)\n {\n $this->setInvoiceNumber($value);\n return $this;\n }", "public function woo_pdf_metabox_content()\n {\n global $post;\n\n if (!$post) {\n return;\n }\n\n $order = new WC_Order($post->ID);\n\n if (!$order) {\n return;\n }\n\n $invoice = $this->get_invoice($post->ID);\n\n echo '<table class=\"form-table\">';\n\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled']) {\n\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n $delete_url = home_url('/?wpd_delete_invoice='.$download_code.'&order_id='.$post->ID);\n\n ?>\n <tr>\n <td>\n <a class=\"button tips\" href=\"<?php echo $download_url; ?>\" data-tip=\"<?php _e('Download regular invoice', 'woo_pdf'); ?>\"><?php _e('Invoice', 'woo_pdf'); ?></a>\n <?php if ($this->opt['woo_pdf_allow_delete']): ?>\n <a class=\"button tips\" href=\"<?php echo $delete_url; ?>\" data-tip=\"<?php _e('Delete invoice so you can regenerate it if needed', 'woo_pdf'); ?>\"><?php _e('Delete Invoice', 'woo_pdf'); ?></a>\n <?php endif; ?>\n </td>\n </tr>\n <?php\n }\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && ($order->status != 'completed' || $this->opt['woo_pdf_enabled'])) {\n\n $download_url = home_url('/?wpd_proforma='.$post->ID);\n $generate_url = home_url('/?wpd_generate_invoice='.$post->ID);\n\n ?>\n <tr>\n <td>\n <?php if ($order->status != 'completed'): ?>\n <a class=\"button tips\" href=\"<?php echo $download_url; ?>\" data-tip=\"<?php _e('Download proforma invoice', 'woo_pdf'); ?>\"><?php _e('Proforma', 'woo_pdf'); ?></a>\n <?php endif; ?>\n <?php if ($this->opt['woo_pdf_enabled']): ?>\n <a class=\"button tips\" href=\"<?php echo $generate_url; ?>\" data-tip=\"<?php _e('Manually generate regular invoice', 'woo_pdf'); ?>\"><?php _e('Generate Invoice', 'woo_pdf'); ?></a>\n <?php endif; ?>\n </td>\n </tr>\n <?php\n }\n else if ($this->opt['woo_pdf_enabled']) {\n\n $generate_url = home_url('/?wpd_generate_invoice='.$post->ID);\n\n ?>\n <tr>\n <td>\n <a class=\"button tips\" href=\"<?php echo $generate_url; ?>\" data-tip=\"<?php _e('Manually generate regular invoice', 'woo_pdf'); ?>\"><?php _e('Generate Invoice', 'woo_pdf'); ?></a>\n </td>\n </tr>\n <?php\n }\n\n echo '</table>';\n }", "function getInvoiceName() {\n\t\treturn $this->m_invoiceName;\n\t}", "public function makeInvoice();", "public function invoice($invoice_id) {\n\n\t\treturn view('hotelmanager.tripInvoice');\n\t}", "public function orderInvoice()\n\t{\n\t\t$data=array();\n\t _adminLayout(\"order-mgmt/order-invoice\",$data);\t\n\t}", "public function getInvoiceIdForPaymentGateway()\n {\n return\n implode(str_split(str_pad($this->getSeller()->getId(), 6, 0, STR_PAD_LEFT),3), '-')\n .' / '\n .implode(str_split(str_pad($this->getId(), 6, 0, STR_PAD_LEFT),3), '-')\n .' / '\n .$this->getSeller()->getName();\n }", "public function print_invoice_info(&$billdata = null) {\n echo get_string($this->name.'paymodeinvoiceinfo', 'shoppaymodes_paypal', '');\n }", "function GetInvoiceId() \n\t{\n\t\t$tmp_code = date(\"ymdHis\").rand(1000, 9999);\n\t\t\n\t\t// Check if is already been used\n\t\t$ver\t=\t$this->find('first',array(\n\t\t\t'fields'\t\t=> 'invoice_id',\n\t\t\t'conditions'\t=> array('invoice_id' => $tmp_code)\n\t\t));\n\t\t\n\t\tif(is_array($ver))\n\t\t{\n\t\t\t$tmp_code = $this->GetTrxId();\n\t\t}\n\t\treturn $tmp_code;\n\t}", "public function generateReceiptNo()\n\t\t{\n\t\t\t$digits = 6;\n\t\t\t$raw_num = ++$this->_receipt_no;\n\t\t\t$number = str_pad($raw_num, $digits, '0', STR_PAD_LEFT);\n\t\t\t$this->_receipt_no = $number;\n\t\t}", "public function invoice($first_name, $last_name, $email, $shipping_amount, $prorow, $order_no, $payment_status, $total,$address_1,$address_2,$pincode,$city,$state,$pay_mode,$discount)\n {\n $amount_paid = $total+$shipping_amount;\n $tablehead = '<table border=\"1\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Product Name</th>\n\t\t\t<th>Product Quantity</th>\n\t\t\t<th>Gross Amount</th>\n\t\t\t<th>Product Color</th>\n\t\t\t<th>Product Size</th>\n <th>Product Discount</th>\n <th>Total Amount</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>';\n $tbalefooter = '</tbody>\n\t<tfoot>\n \n\t\t<tr>\n\t\t\t<td colspan=\"6\">Shipping Charge:-</td>\n\t\t\t<td>'.$shipping_amount.'</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"6\">Amount to paid:-</td>\n\t\t\t<td>'.$amount_paid.'</td>\n\t\t</tr>\n\t</tfoot>\n</table>';\n $prorows = $tablehead.implode('<br/>', $prorow).$tbalefooter;\n \n //echo $prorows;\n //pr($prorow);\n //exit;\n $from = \"info@pepealoans.com\";\n $to = $email;\n $email_template = EmailTemplate::where('slug', '=', 'order-invoice')->first();\n $email_type = $email_template->email_type;\n $subject = $email_template->subject;\n $body = $email_template->body;\n $to = $email;\n \n $body = str_replace(array(\n '{FIRST_NAME}',\n '{LAST_NAME}',\n '{SHIPPING_CHARGE}',\n '{PRO_ROWS}',\n '{ORDER_NO}',\n '{TOTAL}',\n '{PAYMENT_MOD}',\n '{PAYMENT_STATUS}',\n '{ADDRESS}',\n '{PINCODE}',\n '{CITY}',\n '{STATE}',\n ), array(\n ucfirst($first_name),\n ucfirst($last_name),\n $shipping_amount,\n $prorows,\n $order_no,\n $total,\n $pay_mode,\n $payment_status,\n $address_1.', '.$address_2,\n $pincode,\n $city,\n $state\n ), $body);\n $subject = str_replace(array(\n '{FIRST_NAME}',\n '{LAST_NAME}',\n '{SHIPPING_CHARGE}',\n '{PRO_ROWS}',\n '{ORDER_NO}',\n '{TOTAL}',\n '{PAYMENT_MOD}',\n '{PAYMENT_STATUS}',\n '{ADDRESS}',\n '{PINCODE}',\n '{CITY}',\n '{STATE}',\n ), array(\n ucfirst($first_name),\n ucfirst($last_name),\n $shipping_amount,\n $prorows,\n $order_no,\n $total,\n $pay_mode,\n $payment_status,\n $address_1.', '.$address_2,\n $pincode,\n $city,\n $state\n ), $subject);\n//pr($body);exit;\n EmailHelper::sendMail($to, $from, '', $subject, 'default', $body, $email_type);\n}", "function getCurrentInvoiceNumber() {\n\t\t$epochStart = strtotime( $this->conf->epochStart );\n\t\treturn $this->timeInMonths( time() ) - $this->timeInMonths( $epochStart ) + 1;\n\t}", "public function GenerateInvoiceNo($estid) {\n $estimate = explode(\"_\", $estid);\n $model_report = new InvoiceNumber();\n $close_estimate = CloseEstimate::findOne($estimate[0]);\n $arr1 = ['1' => 'A', '2' => 'B', '3' => 'C', '4' => 'D', '5' => 'E', '6' => 'F', '7' => 'G', '8' => 'H', '9' => 'I', '10' => 'J', '11' => 'K', '12' => 'L'];\n $last = InvoiceNumber::find()->orderBy(['id' => SORT_DESC])->where(['invoice_type' => $close_estimate->invoice_type])->one();\n $last_report_saved = InvoiceNumber::find()->orderBy(['id' => SORT_DESC])->where(['appointment_id' => $close_estimate->apponitment_id, 'invoice_type' => $close_estimate->invoice_type])->one();\n $model_report->appointment_id = $close_estimate->apponitment_id;\n $model_report->invoice_type = $close_estimate->invoice_type;\n $model_report->principal_id = $close_estimate->principal;\n $model_report->estimate_id = implode(\",\", $estimate);\n $model_report->report = Yii::$app->session['fda'];\n if (!empty($last)) {\n if (empty($last_report_saved)) {\n $model_report->invoice_number = $last->invoice_number + 1;\n } else {\n $model_report->invoice_number = $last_report_saved->invoice_number;\n }\n } else {\n if ($close_estimate->invoice_type == 1) {\n $model_report->invoice_number = 85;\n } elseif ($close_estimate->invoice_type == 3) {\n $model_report->invoice_number = 87;\n } elseif ($close_estimate->invoice_type == 7) {\n $model_report->invoice_number = 91;\n } elseif ($close_estimate->invoice_type == 8) {\n $model_report->invoice_number = 48;\n } else {\n return;\n }\n }\n $sub_invoice_saved = InvoiceNumber::find()->orderBy(['id' => SORT_DESC])->where(['appointment_id' => $close_estimate->apponitment_id, 'invoice_type' => $close_estimate->invoice_type])->all();\n $key = count($sub_invoice_saved);\n if ($key == 0) {\n $model_report->sub_invoice = $model_report->invoice_number;\n } else {\n $model_report->sub_invoice = $model_report->invoice_number . $arr1[$key];\n }\n return $model_report;\n }", "private function deliveryorderNumbers()\n {\n $numbers = $this->confPdf[ 'deliveryorder.' ][ 'content.' ][ 'numbers.' ];\n\n// LOOP : fields, the elements of a product\n foreach ( array_keys( ( array ) $numbers ) as $key )\n {\n if ( !stristr( $key, '.' ) )\n {\n continue;\n }\n\n $this->writeTextblock( $numbers[ $key ], 'deliveryorder.numbers.' . $key );\n }\n }", "public function process_invoice($invoice_id , $req_response , $itemid)\n\t{\n\t\t$response = Rb_EcommerceApi::invoice_process($invoice_id , $req_response);\n\t\t\n\t\t//assign serial number to paid invoice when its paid online \t\t\n \t\t//don't do anything if it is an offline payment, because in offline payment, invoice serial would be assigned when it would be marked paid\n \t\t\n \t\tif($response && ($response->get('payment_status') == Rb_EcommerceResponse::PAYMENT_COMPLETE))\n \t\t{\n \t\t\tPayInvoiceHelperInvoice::setInvoiceSerial($itemid);\n \t\t}\n \t\t\n \t\treturn $response;\n\t}", "public function getInvoiceTitle()\n {\n return $this->invoice_title;\n }", "function customer_invoice($proposal_hash,$invoice_hash,$mult=0) {\r\n\t\t$proposal = new proposals($_SESSION['id_hash']);\r\n\t\t$valid = $proposal->fetch_master_record($proposal_hash);\r\n\t\t$invoice = new customer_invoice($_SESSION['id_hash']);\r\n\t\t$valid2 = $invoice->fetch_invoice_record($invoice_hash);\r\n\r\n\t\tif (!$valid || !$valid2)\r\n\t\t\tdie('Invalid proposal or invoice hash.');\r\n\t\t// Start the PDF document ( A4 size x:595.28 y:841.89 )\r\n\t\tif ($mult == 0)\r\n\t\t\t$this->pdf = new Cezpdf('Letter');\r\n\r\n\t\t// Get margins from system vars if they are defined\r\n\t\t$sys_var = fetch_sys_var('INVOICE_MARGIN');\r\n\t\tif ($sys_var) {\r\n\t\t\t$margins = explode(\":\",$sys_var);\r\n\t\t\t$this->pdf->ezSetMargins($margins[0],$margins[1],$margins[2],$margins[3]);\r\n\t\t} else\r\n\t\t\t$this->pdf->ezSetMargins(30,30,30,30);\r\n\r\n\t\t// Width of page adjusted for margins\r\n\t\t$adjWidth = $this->pdf->ez['pageWidth'] - $this->pdf->ez['leftMargin'] - $this->pdf->ez['rightMargin'];\r\n\r\n\t\t//If we're printing multiple documents back to back\r\n\t\tif ($mult > 0) {\r\n\t\t\t$this->pdf->ez['topMargin'] = ($margin[0] ? $margin[0] : 30);\r\n\t\t\t$this->pdf->stopObject($this->headfoot);\r\n\t\t\t$this->pdf->stopObject($this->bottomFoot);\r\n\t\t\t$this->pdf->ezNewPage();\r\n\t\t\t$this->pdf->ezStopPageNumbers(1,0,$mult - 1);\r\n\t\t}\r\n\r\n\t\t$title = ($this->print_pref['title'] && $this->print_pref['title'] != \"Invoice\" ? $this->print_pref['title'] : $this->template->current_template['title']['value']).\" \".$invoice->current_invoice['invoice_no'];\r\n\t\t$author = stripslashes($proposal->current_proposal['sales_rep']);\r\n\t\t$users = new system_config();\r\n\t\t$users->fetch_user_record($_SESSION['id_hash']);\r\n\t\t$producer = $users->current_user['full_name'];\r\n\t\t$creation_date = date(TIMESTAMP_FORMAT,time());\r\n\r\n\t\t$this->pdf->addInfo('Title',$title);\r\n\t\t$this->pdf->addInfo('Author',$author);\r\n\t\t$this->pdf->addInfo('Producer',$producer);\r\n\t\t$this->pdf->addInfo('CreationDate',$creation_date);\r\n\t\t$title = ($this->print_pref['title'] && $this->print_pref['title'] != \"Invoice\" ? $this->print_pref['title'] : $this->template->current_template['title']['value']);\r\n\r\n\t\t$customers = new customers($_SESSION['id_hash']);\r\n\t\tif ($invoice->current_invoice['transmit_type'] == 'M' && $invoice->current_invoice['transmit_to']) {\r\n\t\t\t$customer_info = $invoice->current_invoice['transmit_to'];\r\n\t\t\tif ($invoice->current_invoice['invoice_to'] == 'V') {\r\n\t\t\t\t$obj = new vendors($this->current_hash);\r\n\t\t\t\t$class = 'vendors';\r\n\t\t\t\t$obj->fetch_master_record($invoice->current_invoice['customer_hash']);\r\n\t\t\t\t$customer_name = stripslashes($obj->current_vendor['vendor_name']);\r\n\r\n\t $customer_info = stripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}[strrev(substr(strrev($class),1)).\"_name\"]) . \"\\n\" .\r\n\t ( $obj->{\"current_\".strrev(substr(strrev($class),1))}['street'] ?\r\n\t stripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}['street']) . \"\\n\" : NULL\r\n\t ) .\r\n\t stripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}['city']) . \", {$obj->{'current_'.strrev(substr(strrev($class),1))}['state']} {$obj->{'current_'.strrev(substr(strrev($class),1))}['zip']}\";\r\n\r\n\t\t\t\tif (in_array(\"customer_contact\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\t\t\tif ($_POST['customer_contact']) {\r\n\t\t\t\t\t\t$contact_name = stripslashes($_POST['customer_contact']);\r\n\t\t\t\t\t\t$customer_info .= \"\\n \\n\".$this->template->current_template['attention']['value'].\": \".$contact_name;\r\n\t\t\t\t\t} elseif ($obj->current_vendor['vendor_contact']) {\r\n\t\t\t\t\t\t$obj->fetch_contact_record($obj->current_vendor['vendor_contact']);\r\n\t\t\t\t\t\t$contact_name = stripslashes($obj->current_contact['contact_name']);\r\n\t\t\t\t\t\t$customer_info .= \"\\n \\n\".$this->template->current_template['attention']['value'].\": \".$contact_name;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$obj = new customers($this->current_hash);\r\n\t\t\t\t$obj->fetch_master_record($proposal->current_proposal['customer_hash']);\r\n\t\t\t\t$customer_name = $obj->current_customer['customer_name'];\r\n\t\t\t\t$customer_pay_days = $obj->current_customer['payment_terms'];\r\n\r\n\t\t\t\t//Fetch Customer Contact\r\n\t\t\t\tif (in_array(\"customer_contact\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\t\t\tif ($_POST['customer_contact']) {\r\n\t\t\t\t\t\t$customer_info .= \"\\n \\n\".$this->template->current_template['attention']['value'].\": \".stripslashes($_POST['customer_contact']);\r\n\t\t\t\t\t} elseif ($proposal->current_proposal['customer_contact']) {\r\n\t\t\t\t\t\t$obj->fetch_contact_record($proposal->current_proposal['customer_contact']);\r\n\t\t\t\t\t\tif ($obj->current_contact['contact_name'])\r\n\t\t\t\t\t\t\t$customer_info .= \"\\n \\n\".$this->template->current_template['attention']['value'].\": \".stripslashes($obj->current_contact['contact_name']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} elseif ($invoice->current_invoice['invoice_to'] == 'V') {\r\n\t\t\t$class = 'vendors';\r\n\t\t\t$id = $invoice->current_invoice['customer_hash'];\r\n\t\t\t$obj = new vendors($this->current_hash);\r\n\t\t\t$obj->fetch_master_record($id);\r\n\r\n\t\t\t//Fetch Vendor Contact\r\n\t\t\tif (in_array(\"customer_contact\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\t\tif ($_POST['customer_contact']) {\r\n\t\t\t\t\t$contact_name = stripslashes($_POST['customer_contact']);\r\n\t\t\t\t} elseif ($obj->current_vendor['vendor_contact']) {\r\n\t\t\t\t\t$obj->fetch_contact_record($obj->current_vendor['vendor_contact']);\r\n\t\t\t\t\t$contact_name = stripslashes($obj->current_contact['contact_name']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$customer_info = stripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}[strrev(substr(strrev($class),1)).\"_name\"]) . \"\\n\" .\r\n\t\t\t( $obj->{\"current_\".strrev(substr(strrev($class),1))}['street'] ?\r\n\t\t\t\tstripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}['street']) . \"\\n\" : NULL\r\n\t\t\t) .\r\n\t\t\tstripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}['city']) . \", {$obj->{'current_'.strrev(substr(strrev($class),1))}['state']} {$obj->{'current_'.strrev(substr(strrev($class),1))}['zip']}\";\r\n\t\t\t$customer_name = $obj->current_vendor['vendor_name'];\r\n\r\n\t\t} else {\r\n\t\t\t$customer_name = $proposal->current_proposal['customer'];\r\n\t\t\t//Fetch Customer Contact\r\n\t\t\tif (in_array(\"customer_contact\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\t\tif ($_POST['customer_contact']) {\r\n\t\t\t\t\t$contact_name = stripslashes($_POST['customer_contact']);\r\n\t\t\t\t} elseif ($proposal->current_proposal['customer_contact']) {\r\n\t\t\t\t\t$customers->fetch_contact_record($proposal->current_proposal['customer_contact']);\r\n\t\t\t\t\t$contact_name = stripslashes($customers->current_contact['contact_name']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ($proposal->current_proposal['customer_hash']) {\r\n\t\t\t\t$class = 'customers';\r\n\t\t\t\t$id = $proposal->current_proposal['customer_hash'];\r\n\t\t\t\tif ($proposal->current_proposal['bill_to_hash'])\r\n\t\t\t\t\t$loc_hash = $proposal->current_proposal['bill_to_hash'];\r\n\r\n\t\t\t\t$obj = new customers($this->current_hash);\r\n\t\t\t\t$obj->fetch_master_record($id);\r\n\t\t\t\t$customer_pay_days = $obj->current_customer['payment_terms'];\r\n\t\t\t\tif ($loc_hash) {\r\n\t\t\t\t\t$obj->fetch_location_record($loc_hash);\r\n\t\t\t\t\t$customer_info = stripslashes($obj->current_location['location_name']) . \"\\n\" .\r\n\t\t\t\t\t( $obj->current_location['location_street'] ?\r\n\t\t\t\t\t\tstripslashes($obj->current_location['location_street']) . \"\\n\" : NULL\r\n\t\t\t\t\t) .\r\n\t\t\t\t\tstripslashes($obj->current_location['city']) . \", {$obj->current_location['location_state']} {$obj->current_location['location_zip']}\";\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$customer_info = stripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}[strrev(substr(strrev($class),1)).\"_name\"]) . \"\\n\" .\r\n\t\t\t\t\t( $obj->{\"current_\".strrev(substr(strrev($class),1))}['street'] ?\r\n\t\t\t\t\t\tstripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}['street']) . \"\\n\" : NULL\r\n\t\t\t\t\t) .\r\n\t\t\t\t\tstripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}['city']) . \", {$obj->{'current_'.strrev(substr(strrev($class),1))}['state']} {$obj->{'current_'.strrev(substr(strrev($class),1))}['zip']}\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tunset($obj);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($proposal->current_proposal['install_addr_hash'] && in_array(\"install_addr\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\tlist($class,$id,$loc_hash) = explode(\"|\",$proposal->current_proposal['install_addr_hash']);\r\n\t\t\t$obj = new $class($_SESSION['id_hash']);\r\n\t\t\tif ($loc_hash) {\r\n\t\t\t\t$obj->fetch_location_record($loc_hash);\r\n\t\t\t\t$install_loc = stripslashes($obj->current_location['location_name']) . \"\\n\" .\r\n\t\t\t\t( $obj->current_location['location_street'] ?\r\n\t\t\t\t\tstripslashes($obj->current_location['location_street']) . \"\\n\" : NULL\r\n\t\t\t\t) .\r\n\t\t\t\tstripslashes($obj->current_location['location_city']) . \", {$obj->current_location['location_state']} {$obj->current_location['location_zip']}\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\t$obj->fetch_master_record($id);\r\n\t\t\t\t$install_loc = stripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}[strrev(substr(strrev($class),1)).\"_name\"]) . \"\\n\" .\r\n\t\t\t\t( $obj->{\"current_\".strrev(substr(strrev($class),1))}['street'] ?\r\n\t\t\t\t\tstripslashes($obj->{\"current_\".strrev(substr(strrev($class),1))}['street']) . \"\\n\" : NULL\r\n\t\t\t\t) .\r\n\t\t\t\t( $obj->{\"current_\".strrev(substr(strrev($class),1))}['city']) . \", {$obj->{'current_'.strrev(substr(strrev($class),1))}['state']} {$obj->{'current_'.strrev(substr(strrev($class),1))}['zip']}\";\r\n\t\t\t}\r\n\t\t\tunset($obj);\r\n\t\t}\r\n\t\t$direct_bill = 0;\r\n\t\tif ($invoice->current_invoice['direct_bill'])\r\n\t\t\t$direct_bill = 1;\r\n\r\n if ($invoice->current_invoice['currency']) {\r\n $this->db->define('convert_currency',1);\r\n $this->db->define('local_currency',$invoice->current_invoice['currency']);\r\n $this->db->define('local_exchange_rate',$invoice->current_invoice['exchange_rate']);\r\n }\r\n\r\n\t\t$lines = new line_items($invoice->proposal_hash);\r\n\t\t$item_cols = array(\"item_no\" => $this->template->current_template['item_no']['value'],\r\n\t\t\t\t\t\t \"item_descr\" => $this->template->current_template['item_descr']['value'],\r\n\t\t \"item_qty\" => $this->template->current_template['qty']['value'],\r\n\t\t\t\t\t\t \"list\"\t\t => $this->template->current_template['item_list']['value'],\r\n\t\t\t\t\t\t \"ext_list\" => $this->template->current_template['ext_list']['value']);\r\n\t\tif ($direct_bill) {\r\n\t\t\t$item_cols['comm'] = $this->template->current_template['item_comm']['value'];\r\n\t\t\t$item_cols['ext_sell'] = $this->template->current_template['ext_sell']['value'];\r\n\t\t\t$item_cols['ext_comm'] = $this->template->current_template['ext_comm']['value'];\r\n\t\t} else {\r\n\t\t\t$item_cols['sell'] = $this->template->current_template['item_sell']['value'];\r\n\t\t\t$item_cols['ext_sell'] = $this->template->current_template['ext_sell']['value'];\r\n\t\t}\r\n\t\t// Get print preferences for line items\r\n\t\t$line_no_print = in_array(\"line_no\",$this->print_pref['item_print_fields']);\r\n\t\t$item_no_print = in_array(\"item_no\",$this->print_pref['item_print_fields']);\r\n\t\t$zero_sell_print = in_array(\"zero_sell\",$this->print_pref['item_print_fields']);\r\n\r\n\t\t// Create the item data array\r\n for ($i = 0; $i < $invoice->current_invoice['total_items']; $i++) {\r\n $lines->fetch_line_item_record($invoice->current_invoice['line_items'][$i]);\r\n $line_array[$i] = $lines->current_line;\r\n }\r\n\r\n $group_hash_array = array();\r\n\t\t$print_array = array();\r\n\t\tfor ($i = 0; $i < $invoice->current_invoice['total_items']; $i++) {\r\n\t\t\tif ($direct_bill && $line_array[$i]['direct_bill_amt'] == 'S')\r\n\t\t\t\t$direct_bill_full_sell = 1;\r\n\r\n\t\t\tunset($disc);\r\n\t\t\tif (in_array('discounting',$this->print_pref['item_print_fields'])) {\r\n\t\t\t\t\t$disc = ($lines->line_info[$i]['discount1'] > 0 ?\r\n\t\t\t\t\t\t\t\t\t\"\\n\".$this->template->current_template['discount']['value'].\" 1: \".($line_array[$i]['discount1'] * 100).\"% \\n\" : NULL).($line_array[$i]['discount2'] > 0 ?\r\n\t\t\t\t\t\t\t\t\t\t$this->template->current_template['discount']['value'].\" 2: \".($line_array[$i]['discount2'] * 100).\"% \\n\" : NULL).($line_array[$i]['discount3'] > 0 ?\r\n\t\t\t\t\t\t\t\t\t\t\t$this->template->current_template['discount']['value'].\" 3: \".($line_array[$i]['discount3'] * 100).\"% \\n\" : NULL).($line_array[$i]['discount4'] > 0 ?\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->template->current_template['discount']['value'].\" 4: \".($line_array[$i]['discount4'] * 100).\"% \\n\" : NULL).($line_array[$i]['discount5'] > 0 ?\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->template->current_template['discount']['value'].\" 5: \".($line_array[$i]['discount5'] * 100).\"% \\n\" : NULL);\r\n\t\t\t}\r\n\r\n\t\t\tif ( in_array('list_discount', $this->print_pref['item_print_fields']) )\r\n $disc .=\r\n ( $disc && $line_array[$i]['gp_type'] == 'G' ?\r\n \t\t\t\t\"\\n\" : \"\\n\\n\"\r\n ) .\r\n \"{$this->template->current_template['list_discount']['value']}: \" .\r\n math::list_discount( array(\r\n\t 'list' => $line_array[$i]['list'],\r\n\t 'sell' => $line_array[$i]['sell']\r\n ) ) . \"%\";\r\n\r\n\t\t\t// Added for Trac #1274\r\n\t\t\tif (in_array('item_finish',$this->print_pref['item_print_fields'])) {\r\n\t\t\t\t$import_data = unserialize(stripslashes($line_array[$i]['import_data']));\r\n\t\t\t\tif (!$import_data)\r\n\t\t\t\t\t$import_data = unserialize($line_array[$i]['import_data']);\r\n\t\t\t\tunset($finishes);\r\n\t\t\t\t$finish =& $import_data['FINISH'];\r\n\t\t\t\tif (is_array($finish)) {\r\n\t\t\t\t\t$finishes .= \"\\n\\n\".$this->template->current_template['finishes']['value'].\":\\n\";\r\n\t\t\t\t\tfor ($j = 0; $j < count($finish); $j++) {\r\n\t\t\t\t\t\tunset($item_panel);\r\n\t\t\t\t\t\t$special_chars = array(\"â„¢\",\"™\");\r\n\t\t\t\t\t\tif ($finish[$j]['PANEL'])\r\n\t\t\t\t\t\t\t$item_panel = stripslashes($finish[$j]['PANEL']);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$finishes .= str_replace($special_chars,\"\",$finish[$j]['GROUP_DESCR']).\" : \".stripslashes(str_replace($special_chars,\"\",$finish[$j]['DESCR'])).\" \".($finish[$j]['NAME'] ? \"(\".stripslashes(str_replace($special_chars,\"\",$finish[$j]['NAME'])).\")\" : NULL).\"\\n\";\r\n\r\n\t\t\t\t\t\tif ($item_panel)\r\n\t\t\t\t\t\t\t$finishes .= \"\\n\".$this->template->current_template['panel_detail']['value'].\": \".$item_panel;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n $sign = $line_array[0]['symbol'];\r\n \t\t\tif (bccomp($line_array[$i]['ext_sell'],0) == 1 || (bccomp($line_array[$i]['ext_sell'],0) == 0 && $zero_sell_print) || bccomp($line_array[$i]['ext_sell'],0) == -1)\r\n\t\t\t\t$item_data[] = array(\"item_no\" \t\t\t\t\t\t\t\t\t=> ($line_no_print ?\r\n $this->template->current_template['line']['value'].\": \".$line_array[$i]['invoice_line_no'].\"\\n\" : NULL).\r\n\t\t\t\t ($item_no_print ?\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$line_array[$i]['item_no'] : NULL),\r\n\t\t\t\t\t\t\t\t\t \"item_descr\"\t\t\t\t\t\t\t\t=> (in_array(\"hide_vendor\",$this->print_pref['item_print_fields']) ? NULL : stripslashes($line_array[$i]['item_vendor'])).(in_array(\"product\",$this->print_pref['item_print_fields']) ? (in_array(\"hide_vendor\",$this->print_pref['item_print_fields']) ? NULL : \" - \").$line_array[$i]['item_product'] : NULL).\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t((in_array(\"hide_vendor\",$this->print_pref['item_print_fields']) && !in_array(\"product\",$this->print_pref['item_print_fields'])) ? NULL : \"\\n\").\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t stripslashes($line_array[$i]['item_descr']).$finishes.$disc,\r\n\t\t\t\t\t\t\t\t\t \"item_qty\"\t\t\t\t\t\t\t\t\t=> strrev(substr(strstr(strrev($line_array[$i]['qty']),'.'),1)).(str_replace('0','',substr(strrchr($line_array[$i]['qty'],'.'),1)) ?\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstr_replace('0','',strrchr($line_array[$i]['qty'],'.')) : NULL),\r\n\t\t\t\t\t\t\t\t\t \"list\"\t\t\t\t\t\t\t\t\t\t=> '$'.number_format($line_array[$i]['list'],2),\r\n\t\t\t\t\t\t\t\t\t \"ext_list\"\t\t\t\t\t\t\t\t\t=>\t'$'.number_format($line_array[$i]['ext_list'],2),\r\n\t\t\t\t\t\t\t\t\t \"comm\"\t\t\t\t\t\t\t\t\t\t=> '$'.number_format($line_array[$i]['sell'] - $line_array[$i]['cost'],2),\r\n\t\t\t\t\t\t\t\t\t ($direct_bill ? \"ext_sell\" : \"sell\")\t\t=> ($direct_bill && $line_array[$i]['direct_bill_amt'] == 'S' ?\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t '$'.number_format($line_array[$i]['ext_sell'],2) : (!$direct_bill ?\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t '$'.number_format($line_array[$i]['sell'],2) : NULL)),\r\n\t\t\t\t\t\t\t\t\t ($direct_bill ? \"ext_comm\" : \"ext_sell\")\t=> ($direct_bill && $line_array[$i]['direct_bill_amt'] == 'C' ?\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t '$'.number_format($line_array[$i]['ext_sell'] - $line_array[$i]['ext_cost'],2) : (!$direct_bill ?'$'.number_format($line_array[$i]['ext_sell'],2) : NULL)));\r\n\r\n if ($line_array[$i]['group_hash'])\r\n $group_totals[$line_array[$i]['group_hash']] += $line_array[$i]['ext_sell'];\r\n\t\t\telse\r\n\t\t\t\t$group_totals['misc_group'] += $line_array[$i]['ext_sell'];\r\n\r\n if (($line_array[$i]['group_hash'] != $line_array[$i+1]['group_hash'] && (in_array(\"group_total\",$this->print_pref['gen_print_fields']) || in_array(\"group_name\",$this->print_pref['gen_print_fields']) || in_array(\"group_break\",$this->print_pref['gen_print_fields']))) || !$line_array[$i+1]) {\r\n\r\n if(in_array($line_array[$i]['group_hash'],$group_hash_array)){\r\n\r\n }else{\r\n array_push($group_hash_array,$line_array[$i]['group_hash']);\r\n if (in_array(\"group_total\",$this->print_pref['gen_print_fields']) || in_array(\"group_name\",$this->print_pref['gen_print_fields']) || in_array(\"group_break\",$this->print_pref['gen_print_fields']) || $line_array[$i]['group_hash']){\r\n $group_array[count($print_array)] = array('title' => htmlspecialchars($line_array[$i]['group_descr']),\r\n 'total' => $group_totals[$line_array[$i]['group_hash']]);\r\n }\r\n }\r\n\r\n\r\n array_push($print_array,$item_data);\r\n unset($item_data);\r\n }\r\n\t\t}\r\n\t\t// Remove columns from printing according to preferences\r\n\t\tif (!$item_no_print && !$line_no_print)\r\n\t\t\tunset($item_cols['item_no']);\r\n\t\tif (!in_array(\"item_descr\",$this->print_pref['item_print_fields']) && !$line_no_print)\r\n\t\t\tunset($item_cols['item_descr']);\r\n\t\tif (!in_array(\"item_qty\",$this->print_pref['item_print_fields']))\r\n\t\t\tunset($item_cols['item_qty']);\r\n\t\tif (!in_array(\"list\",$this->print_pref['item_print_fields']))\r\n\t\t\tunset($item_cols['list']);\r\n\t\tif (!in_array(\"ext_list\",$this->print_pref['item_print_fields']))\r\n\t\t\tunset($item_cols['ext_list']);\r\n\t\tif (!in_array(\"sell\",$this->print_pref['item_print_fields']))\r\n\t\t\tunset($item_cols['sell']);\r\n\t\tif (!in_array(\"ext_sell\",$this->print_pref['item_print_fields']))\r\n\t\t\tunset($item_cols['ext_sell']);\r\n\t\tif ($direct_bill) {\r\n\t\t\tif (!$direct_bill_full_sell)\r\n\t\t\t\tunset($item_cols['ext_sell']);\r\n\t\t\telse\r\n\t\t\t\tunset($item_cols['comm']);\r\n\t\t}\r\n if (!$print_array[0] && $item_data)\r\n array_push($print_array,$item_data);\r\n\r\n\t\t// Show proposal comments based on preferences\r\n\t\tif (in_array(\"comments\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\tfor ($i = 0; $i < count($lines->proposal_comments); $i++) {\r\n\t\t\t\tif ($lines->proposal_comments[$i]['comment_action'] == 2)\r\n\t\t\t\t\t$comment_data[] = array('comments' => htmlspecialchars($lines->proposal_comments[$i]['comments']));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$headfoot = $this->pdf->openObject();\r\n\t\t$this->pdf->saveState();\r\n\t\t$this->pdf->selectFont('include/fonts/Helvetica.afm');\r\n\t\t$y_start = 825 - $this->h;\r\n\t\t$y = $this->pdf->y;\r\n\r\n\t\tif ($this->print_pref['print_logo'] && $this->img) {\r\n\t\t\t$this->pdf->ezImage($this->img,5,$this->w,'','left');\r\n\t\t\t$this->pdf->y = $y;\r\n\t\t}\r\n\r\n\t\t$y_start -= 30;\r\n\t\t$this->pdf->setStrokeColor(0,0.2,0.4);\r\n\t\t$this->pdf->setLineStyle(2,'round');\r\n\t\t$x_start = 40 + $this->w;\r\n\t\t$rightXpos = $this->pdf->ez['pageWidth'] - $this->pdf->ez['rightMargin'];\r\n\r\n\t\t//Customer\r\n\t\t$this->pdf->line($x_start,762,$rightXpos,762);\r\n\t\tif ((40 + $this->w + $this->pdf->getTextWidth(8,$this->template->current_template['customer']['value'].\": \".$proposal->current_proposal['customer'])) > ($rightXpos-$this->pdf->getTextWidth(20,$this->template->current_template['title']['value'])-10)) {\r\n\t\t\t$start_pos = ($rightXpos-$this->pdf->getTextWidth(20,$this->template->current_template['title']['value'])-10);\r\n\r\n\t\t\t$cust_name = $this->template->current_template['customer']['value'].\": \".$proposal->current_proposal['customer'];\r\n\t\t}\r\n\t\tif ($direct_bill)\r\n\t\t\t$title = $this->template->current_template['direct_bill_title']['value'];\r\n\t\t$text_width = $this->pdf->getTextWidth(20,$title);\r\n\t\t$width_customer_name = 525.28-$text_width-$this->w;\r\n\t\t$this->pdf->addTextWrap(40 + $this->w,766,$width_customer_name,10,$this->template->current_template['customer']['value'].\": \".stripslashes($customer_name));\r\n\r\n\t\t//Sales Rep\r\n\t\t$this->pdf->ezText($this->template->current_template['sales_rep']['value'].\": \".$author,10,array('left' => $this->w + 10));\r\n\r\n\t\t//Invoice title\r\n\t\t$text_width = $this->pdf->getTextWidth(20,$title);\r\n\t\t$this->pdf->addText($rightXpos-$text_width-10,765,20,$title);\r\n\t\t//Invoice number\r\n\t\t$text_width = $this->pdf->getTextWidth(15,$invoice->current_invoice['invoice_no']);\r\n\t\t$font_height = $this->pdf->getFontHeight(15);\r\n\t\t$this->pdf->addText($rightXpos-$text_width-10,762 - $font_height,15,$invoice->current_invoice['invoice_no']);\r\n\t\t//Proposal no\r\n\t\t$text_width = $this->pdf->getTextWidth(10,$this->template->current_template['proposal']['value'].\": \".$proposal->current_proposal['proposal_no']);\r\n\t\t$font_height = $this->pdf->getFontHeight(10);\r\n\t\t$this->pdf->addText($rightXpos-$text_width-10,744 - $font_height,$this->template->current_template['proposal']['font_size'],$this->template->current_template['proposal']['value'].\": \".$proposal->current_proposal['proposal_no']);\r\n\t\t//Invoice date\r\n\t\t$text_width = $this->pdf->getTextWidth($this->template->current_template['invoice_date']['font_size'],$this->template->current_template['invoice_date']['value'].\": \".date(DATE_FORMAT,strtotime($invoice->current_invoice['invoice_date'])));\r\n\t\t$font_height = $this->pdf->getFontHeight(10);\r\n\t\t$this->pdf->addText($rightXpos-$text_width-10,731 - $font_height,$this->template->current_template['invoice_date']['font_size'],$this->template->current_template['invoice_date']['value'].\": \".date(DATE_FORMAT,strtotime($invoice->current_invoice['invoice_date'])));\r\n\t\t//Due Date\r\n\t\t$text_width = $this->pdf->getTextWidth(10,$this->template->current_template['due_date']['value'].\": \".((is_numeric($customer_pay_days) && $customer_pay_days == 0) || (!is_numeric($customer_pay_days) && DEFAULT_CUST_PAY_TERMS == 0) ? $this->template->current_template['upon_receipt']['value'] : date(DATE_FORMAT,strtotime($invoice->current_invoice['invoice_date'].\" + \".(!$customer_pay_days ? DEFAULT_CUST_PAY_TERMS : $customer_pay_days).\" days\"))));\r\n\t\t$font_height = $this->pdf->getFontHeight(10);\r\n\t\t$this->pdf->addText($rightXpos-$text_width-10,718 - $font_height,10,$this->template->current_template['due_date']['value'].\": \".((is_numeric($customer_pay_days) && $customer_pay_days == 0) || (!is_numeric($customer_pay_days) && DEFAULT_CUST_PAY_TERMS == 0) ? $this->template->current_template['upon_receipt']['value'] : date(DATE_FORMAT,strtotime($invoice->current_invoice['invoice_date'].\" + \".(!$customer_pay_days ? DEFAULT_CUST_PAY_TERMS : $customer_pay_days).\" days\"))));\r\n\r\n\t\t$this->pdf->line($this->pdf->ez['leftMargin'],$this->pdf->ez['bottomMargin'],$rightXpos,$this->pdf->ez['bottomMargin']);\r\n\t\t$this->pdf->ezSetDy(-35);\r\n\t\t$this->pdf->restoreState();\r\n\t\t$this->pdf->closeObject();\r\n\r\n\t\t$this->pdf->addObject($headfoot,'all');\r\n\t\t$this->pdf->ezStartPageNumbers($rightXpos-15,22,6);\r\n\t\t$this->pdf->selectFont('include/fonts/Helvetica.afm');\r\n\r\n\t\t// Adjust height to prevent overlapping due to short logos. Added for Madden intially. Trac #774\r\n\t\tif ($this->h < 60) {\r\n\t\t\t$this->h = 60;\r\n\t\t}\r\n\r\n\t\t$xpos = 0;\r\n\t\t$this->pdf->ez['topMargin'] = 30 + $this->h;\r\n\t\t$this->pdf->ezSetY($this->pdf->ez['pageHeight']-$this->pdf->ez['topMargin']);\r\n\r\n\t\t//Show the customer and install information\r\n\t\t$data = array(array(\"customer\" => $customer_info, \"install\" => $install_loc));\r\n\t\t$cols = array(\"customer\" => $this->template->current_template['customer']['value'].\":\", \"install\" => $this->template->current_template['install']['value'].\":\");\r\n\t\t//Make it work with the window envelope\r\n\t\tif ($this->pdf->y > 690)\r\n\t\t\t$this->pdf->ezSetY(690);\r\n\r\n\t\t$this->pdf->ezSetDy(5);\r\n\t\t$y_title = $this->pdf->y;\r\n\t\t$this->pdf->ezText($this->template->current_template['customer']['value'].\":\",12,array('left'\t=>\t15));\r\n\t\t$this->pdf->ezSetDy(-5);\r\n\t\t$y_content = $this->pdf->y;\r\n\t\t$y = $this->pdf->ezText($customer_info,12,array('left'\t=>\t15));\r\n\r\n\t\tif (in_array(\"install_addr\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\t$this->pdf->ezSetY($y_title);\r\n\t\t\t$this->pdf->ezText($this->template->current_template['install']['value'].\":\",12,array('aleft'\t=>\t400));\r\n\t\t\t$this->pdf->ezSetDy(-5);\r\n\t\t\t$y2 = $this->pdf->ezText($install_loc,12,array('aleft'\t=>\t400));\r\n\t\t\tif ($y > $y2) {\r\n\t\t\t\t$y = $y2;\r\n\t\t\t} else {\r\n\t\t\t\t$this->pdf->ezSetY($y);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t$options = array('showLines' \t=> 0,\r\n\t\t\t\t\t\t 'shaded'\t\t=> 0,\r\n\t\t\t\t\t\t 'width'\t\t=> $adjWidth,\r\n\t\t\t\t\t\t 'xPos'\t\t\t=> $xpos,\r\n\t\t\t\t\t\t 'colGap'\t\t=> 15,\r\n\t\t\t\t\t\t 'fontSize'\t\t=> 12,\r\n\t\t\t\t\t\t 'xOrientation'\t=> 'right');\r\n\t\t$y = $this->pdf->ezTable($data,$cols,NULL,$options);\r\n\t\t*/\r\n\r\n\t\t$this->pdf->setStrokeColor(0,0.2,0.4);\r\n\t\t$this->pdf->setLineStyle(1);\r\n\t\t$this->pdf->line(30,$y - 10,$rightXpos,$y - 10);\r\n\r\n\t\t$this->pdf->ezSetDy(-15);\r\n\r\n\t\t// Add proposal description for Trac #1191\r\n\t\tif (in_array(\"proposal_descr\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\t$cols = array(\"descr\" => \"Proposal Description:\");\r\n\t\t\t$options = array('showLines' \t\t=> 0,\r\n\t\t\t\t\t\t\t 'shaded'\t\t\t=> 0,\r\n\t\t\t\t\t\t\t 'xPos'\t\t\t\t=> 30,\r\n\t\t\t\t\t\t\t 'showHeadings'\t\t=> 0,\r\n\t\t\t\t\t\t\t 'fontSize'\t\t\t=> 12,\r\n\t\t\t\t\t\t\t 'titleFontSize'\t=> 14,\r\n\t\t\t\t\t\t\t 'xOrientation' \t=> 'right',\r\n\t\t\t\t\t\t\t 'width'\t\t\t=> $adjWidth,\r\n\t\t\t\t\t\t\t 'maxWidth'\t\t\t=> $adjWidth);\r\n\t\t\t$proposal_descr[] = array(\"descr\" => $proposal->current_proposal['proposal_descr']);\r\n\t\t\t$y = $this->pdf->ezTable($proposal_descr,$cols,NULL,$options);\r\n\t\t\t$this->pdf->ezSetDy(-5);\r\n\r\n\t\t\t$this->pdf->setStrokeColor(0,0.2,0.4);\r\n\t\t\t$this->pdf->setLineStyle(1);\r\n\t\t\t$this->pdf->line($this->pdf->ez['leftMargin'],$y - 10,$this->pdf->ez['pageWidth'] - $this->pdf->ez['rightMargin'],$y - 10);\r\n\t\t\t$this->pdf->ezSetDy(-15);\r\n\t\t}\r\n\r\n\t\tif (is_array($comment_data)) {\r\n\t\t\t$cols = array(\"comments\" => \"Comments:\");\r\n\t\t\t$options = array('showLines' \t\t=> 0,\r\n\t\t\t\t\t\t\t 'shaded'\t\t\t=> 0,\r\n\t\t\t\t\t\t\t 'xPos'\t\t\t\t=> $this->pdf->ez['leftMargin'],\r\n\t\t\t\t\t\t\t 'showHeadings'\t\t=> 0,\r\n\t\t\t\t\t\t\t 'fontSize'\t\t\t=> $this->template->current_template['comments_data']['font_size'],\r\n\t\t\t\t\t\t\t 'titleFontSize'\t=> $this->template->current_template['comments']['font_size'],\r\n\t\t\t\t\t\t\t 'xOrientation' \t=> 'right',\r\n\t\t\t\t\t\t\t 'width'\t\t\t=> $adjWidth,\r\n\t\t\t\t\t\t\t 'maxWidth'\t\t\t=> $adjWidth);\r\n\t\t\t$this->pdf->ezText($this->template->current_template['comments']['value'].':',$this->template->current_template['comments']['font_size']);\r\n\t\t\t$y = $this->pdf->ezTable($comment_data,$cols,'',$options);\r\n\t\t}\r\n\r\n\t\t$this->pdf->ezSetDy(-5);\r\n\r\n\t\tif (in_array(\"customer_po\",$this->print_pref['gen_print_fields']) && $proposal->current_proposal['customer_po'])\r\n\t\t\t$this->pdf->ezText($this->template->current_template['customer_po']['value'].\": \".$proposal->current_proposal['customer_po']);\r\n\r\n\t\t$this->pdf->ezSetDy(-5);\r\n\t\t$colWidth = ($adjWidth - 320) / 3; // Width of columns other than item_no and item_descr\r\n\t\t//Show the line items\r\n\r\n\t\t$item_options = array(\"width\" \t\t=> $this->pdf->ez['pageWidth'] - $this->pdf->ez['leftMargin'] - $this->pdf->ez['rightMargin'],\r\n\t\t\t\t\t\t\t \"maxWidth\"\t=> $this->pdf->ez['pageWidth'] - $this->pdf->ez['leftMargin'] - $this->pdf->ez['rightMargin'],\r\n\t\t\t\t\t\t\t 'rowGap'\t\t=>\t4,\r\n\t\t\t\t\t\t\t 'showLines'\t=> 2,\r\n\t\t\t\t\t\t\t 'lineCol'\t\t=>\tarray(.8,.8,.8),\r\n\t\t\t\t\t\t\t 'shaded'\t\t=> 0,\r\n\t\t\t\t\t\t\t 'shadeCol'\t=> array(.94,.94,.94),\r\n\t\t\t\t\t\t\t \"cols\"\t\t=> array(\"item_no\" \t\t=>\tarray('justification'\t=>\t'left'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"item_descr\"\t=> array('justification'\t=>\t'left'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"item_qty\"\t\t=> array('justification'\t=>\t'right')\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t );\r\n\t\tif ($direct_bill) {\r\n\t\t\tif (!$direct_bill_full_sell)\r\n\t\t\t\t$item_options['cols']['comm'] = array('justification' => 'right');\r\n\t\t\telse\r\n\t\t\t\t$item_options['cols']['ext_sell'] = array('justification' => 'right');\r\n\r\n\t\t\t$item_options['cols']['ext_comm'] = array('justification' => 'right');\r\n\t\t} else {\r\n\t\t\t$item_options['cols']['list'] = array('justification' => 'right');\r\n\t\t\t$item_options['cols']['ext_list'] = array('justification' => 'right');\r\n\t\t\t$item_options['cols']['sell'] = array('justification' => 'right');\r\n\t\t\t$item_options['cols']['ext_sell'] = array('justification' => 'right');\r\n\t\t}\r\n\t\t$totals_options = array('xPos'\t\t\t\t\t=>\t$rightXpos - 10,\r\n\t\t\t\t\t\t\t\t'width'\t\t\t\t\t=>\t315.28,\r\n\t\t\t\t\t\t\t\t'xOrientation'\t\t\t=>\t'left',\r\n\t\t\t\t\t\t\t\t'showLines'\t\t\t\t=> 0,\r\n\t\t\t\t\t\t\t\t'lineCol'\t\t\t\t=> array(.8,.8,.8),\r\n\t\t\t\t\t\t\t\t'showHeadings'\t\t\t=> 0,\r\n\t\t\t\t\t\t\t\t'shaded'\t\t\t\t=>\t0,\r\n\t\t\t\t\t\t\t\t'fontSize'\t\t\t\t=>\t12,\r\n\t\t\t\t\t\t\t\t'rowGap'\t\t\t\t=>\t3,\r\n\t\t\t\t\t\t\t\t'colGap'\t\t\t\t=> 0,\r\n\t\t\t\t\t\t\t\t'cols'\t\t\t\t\t=>\tarray('field'\t=>\tarray('justification'\t=>\t'left',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'width'\t\t\t=>\t250),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'val'\t\t=>\tarray('justification'\t=>\t'right',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'width'\t\t\t=>\t100.28)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\r\n\t\t\t\t\t\t\t\t);\r\n\r\n if ($invoice->current_invoice['currency'] && $invoice->current_invoice['exchange_rate']) {\r\n $this->pdf->addText($this->pdf->ez['pageWidth'] - $this->pdf->ez['rightMargin'] - $this->pdf->getTextWidth(10,\"Currency\".$invoice->current_invoice['currency'].\" \".rtrim(trim($invoice->current_invoice['exchange_rate'], '0'), '.').\"%\") - 10,$this->pdf->y - 15,10,\"Currency: \".$invoice->current_invoice['currency'].\" \".rtrim(trim($invoice->current_invoice['exchange_rate'], '0'), '.').\"%\");\r\n if ($this->print_pref['invoice_detail'])\r\n\t\t\t\t$this->pdf->ezSetDy(-20);\r\n }\r\n\r\n if (is_array($print_array)) {\r\n for ($i = 0; $i < count($print_array); $i++) {\r\n \tif (!$this->print_pref['invoice_detail'] && (!is_numeric($group_array[$i]['total']) || ((is_numeric($group_array[$i]['total']) && $group_array[$i]['total'] != 0) || ($group_array[$i]['total'] == 0 && $zero_sell_print)))) {\r\n \t$this->pdf->ezText(($group_array[$i]['title'] && in_array(\"group_name\",$this->print_pref['gen_print_fields']) ? $group_array[$i]['title'].\":\" : NULL),12);\r\n\t\t\t\t\t$this->pdf->ezSetDy(-5);\r\n \t\t$y = $this->pdf->ezTable($print_array[$i],$item_cols,'',$item_options);\r\n \t}\r\n\r\n if ($group_array[$i]['title'] || $this->print_pref['invoice_detail']) {\r\n \t$group_title = ($group_array[$i]['title'] ? $group_array[$i]['title'] : $this->template->current_template['misc_items']['value']);\r\n\t\t\t\t\t$group_total = (is_numeric($group_array[$i]['total']) ? $group_array[$i]['total'] : $group_totals['misc_group']);\r\n if (in_array('group_total',$this->print_pref['gen_print_fields']) || $this->print_pref['invoice_detail']) {\r\n \t// Added for Trac #1325\r\n\t\t\t\t\t\tif (substr_count($group_title,\"\\n\") > 0) {\r\n\t\t\t\t\t\t\tunset($newlines);\r\n\t\t\t\t\t\t\tfor($j = 0; $j < substr_count($group_title,\"\\n\"); $j++)\r\n\t\t\t\t\t\t\t\t$newlines .= \"\\n\";\r\n\t\t\t\t\t\t\t$total_array = array(array('field'\t=>\t$this->template->current_template['group']['value'].\" \".$group_title.\" \".$this->template->current_template['total']['value'].': ',\r\n\t\t\t\t\t\t \t\t\t\t\t\t\t 'val' \t=> \t$newlines.$this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'$'.number_format($group_total,2)))).'$'.number_format($group_total,2)\r\n\t\t\t\t\t\t \t\t\t\t\t\t));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$total_array = array(array('field'\t=>\t$group_title.': '.$this->pdf->fill_void('.',(250 - $this->pdf->getTextWidth(12,$group_title.': '))),\r\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t'val' \t=> \t$this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'$'.number_format($group_total,2)))).'$'.number_format($group_total,2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t ));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif ((is_numeric($group_array[$i]['total']) && $group_array[$i]['total'] != 0) )\r\n\t\t\t\t\t\t\t$y = $this->pdf->ezTable($total_array,NULL,NULL,$totals_options);\r\n }\r\n if (in_array(\"group_break\",$this->print_pref['gen_print_fields']))\r\n $this->pdf->ezNewPage();\r\n else\r\n $this->pdf->ezSetDy(-10);\r\n } else\r\n $this->pdf->ezSetDy(-5);\r\n }\r\n }\r\n\t\t$this->pdf->ezSetDy(-15);\r\n\r\n\t\t$totals_options['rowGap'] = 2.5;\r\n\t\t$totals_options['width'] = 215.28;\r\n\t\t$totals_options['cols']['field']['width'] = 170;\r\n\r\n\t\tif ($invoice->current_invoice['currency'] && $invoice->current_invoice['exchange_rate']) {\r\n\t\t\t$invoice->current_invoice['amount'] = currency_exchange($invoice->current_invoice['amount'],$invoice->current_invoice['exchange_rate']);\r\n\t\t\t$invoice->current_invoice['tax'] = currency_exchange($invoice->current_invoice['tax'],$invoice->current_invoice['exchange_rate']);\r\n\t\t\t$invoice->current_invoice['finance_charges'] = currency_exchange($invoice->current_invoice['finance_charges'],$invoice->current_invoice['exchange_rate']);\r\n\t\t\t$invoice->current_invoice['deposit_applied'] = currency_exchange($invoice->current_invoice['deposit_applied'],$invoice->current_invoice['exchange_rate']);\r\n \t}\r\n \t\r\n\t\t//Added to display multiple subtotals\r\n\t\tif (in_array(\"sub_total\",$this->print_pref['gen_print_fields'])) {\r\n\t\t\t$total_sellSub = $invoice->current_invoice['amount'] - $invoice->current_invoice['tax'] - $invoice->current_invoice['finance_charges'];\r\n\t\t\t$subtotal_titles = array();\r\n\t\t\t$subtotal_values = array();\r\n\t\t\tfor ($i = 0; $i < $invoice->current_invoice['total_items']; $i++) {\r\n\t\t\t\t$vendors = new vendors($_SESSION['id_hash']);\r\n\t\t\t\t$vendors->fetch_product_record($line_array[$i]['product_hash']);\r\n\t\t\t\tif($vendors->current_product['product_subtotal']){\r\n\t\t\t\t\t$total_sellSub = bcsub($total_sellSub,$line_array[$i]['ext_sell']);\r\n\t\t\t\t\tif(!in_array($vendors->current_product['subtotal_title'], $subtotal_titles)){\r\n\t\t\t\t\t\t\t$subtotal_titles[] = $vendors->current_product['subtotal_title'];\r\n\t\t\t\t\t\t\t$subtotal_values[] = $line_array[$i]['ext_sell'];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$key = array_search($vendors->current_product['subtotal_title'], $subtotal_titles);\r\n\t\t\t\t\t\t\t$temp_val = $subtotal_values[$key];\r\n\t\t\t\t\t\t\t$subtotal_values[$key] = $temp_val + $line_array[$i]['ext_sell'];\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\t$invoice_total = $invoice->current_invoice['amount'];\r\n\t\t\t\r\n\t\t\tif($total_sellSub > 0){\r\n\t\t\t\t\t$totals_data[] = array('field' \t=>\t$this->template->current_template['subtotal']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['subtotal']['value']))),\r\n\t\t\t\t\t\t\t'val'\t\t=>\t$this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,$sign.number_format($total_sellSub,2)))).$sign.number_format($total_sellSub,2));\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t$s = 0;\r\n\t\t\twhile($s < count($subtotal_titles) ){\r\n\t\t\t\t$totals_data[] = array('field' \t=> $subtotal_titles[$s].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$subtotal_titles[$s]))),\r\n\t\t\t\t\t\t'val'\t\t=>\t$this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,$sign.number_format($subtotal_values[$s],2)))).$sign.number_format($subtotal_values[$s],2));\r\n\t\t\t\t$s++;\r\n\t\t\t}\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$invoice_total = $invoice->current_invoice['amount'];\r\n\t\t\t$totals_data[] = array('field' =>\t$this->template->current_template['subtotal']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['subtotal']['value']))),\r\n\t\t\t\t\t\t\t 'val'\t=>\t$this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'$'.number_format($invoice->current_invoice['amount'] - $invoice->current_invoice['tax'] - $invoice->current_invoice['finance_charges'],2)))).'$'.number_format($invoice->current_invoice['amount'] - $invoice->current_invoice['tax'] - $invoice->current_invoice['finance_charges'],2));\r\n\t\t}\r\n\r\n\t\tif (bccomp($invoice->current_invoice['tax'],0) == 1) {\r\n\t\t\tif ($lines->tax_country == 'CA')\r\n list($total_tax,$tax_rules,$tax_local,$indiv_tax) = $lines->fetch_invoice_tax($invoice->invoice_hash);\r\n\r\n if ($lines->tax_country == 'CA' && $indiv_tax) {\r\n\t while (list($tax_hash,$local_name) = each($tax_local))\r\n\t $totals_data[] = array('field' => $this->template->current_template['tax']['value'].' - '.strtoupper($local_name).$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['tax']['value'].' - '.strtoupper($local_name)))),\r\n\t 'val' => $this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'$'.number_format($tax_rules[$tax_hash],2)))).'$'.number_format($tax_rules[$tax_hash],2));\r\n\r\n } else\r\n\t $totals_data[] = array('field' => $this->template->current_template['tax']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['tax']['value']))),\r\n\t 'val' => $this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'$'.number_format($invoice->current_invoice['tax'],2)))).'$'.number_format($invoice->current_invoice['tax'],2));\r\n\t\t}\r\n\t\tif ($invoice->current_invoice['deposit_applied'] > 0) {\r\n\t\t\t$totals_data[] = array('field' =>\t$this->template->current_template['applied_deposit']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['applied_deposit']['value']))),\r\n\t\t\t\t\t\t\t\t 'val'\t=>\t$this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'($'.number_format($invoice->current_invoice['deposit_applied'],2).\")\"))).'($'.number_format($invoice->current_invoice['deposit_applied'],2).\")\");\r\n $invoice_total -= $invoice->current_invoice['deposit_applied'];\r\n\t\t}\r\n\t\tif ($invoice->current_invoice['finance_charges'] > 0)\r\n $totals_data[] = array('field' => $this->template->current_template['finance_charges']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['finance_charges']['value']))),\r\n 'val' => $this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'$'.number_format($invoice->current_invoice['finance_charges'],2)))).'$'.number_format($invoice->current_invoice['finance_charges'],2));\r\n\r\n\t\t$totals_data[] = array('field' =>\t$this->template->current_template['total_due']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['total_due']['value']))),\r\n\t\t\t\t\t\t\t 'val'\t=>\t$this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'$'.number_format($invoice_total,2)))).\"$\".number_format($invoice_total,2));\r\n\r\n\t\tif (defined('MULTI_CURRENCY') && $this->current_invoice['currency']) {\r\n $sys = new system_config();\r\n $currency = true;\r\n\t\t}\r\n\r\n $total_payments = 0;\r\n $total_credits = 0;\r\n\r\n $r = $this->db->query(\"SELECT t1.receipt_amount , t1.applied_from , t1.applied_type , t1.currency , t1.exchange_rate\r\n FROM customer_payment t1\r\n WHERE t1.invoice_hash = '\".$invoice->invoice_hash.\"' AND t1.deleted = 0\");\r\n while ($row = $this->db->fetch_assoc($r)) {\r\n \t$receipt_amount = $row['receipt_amount'];\r\n \tif ($currency && $row['currency'] && $row['currency'] != $sys->home_currency['code'])\r\n \t\t$receipt_amount = currency_exchange($row['receipt_amount'],$row['exchange_rate']);\r\n\r\n\t if ($row['applied_from'] && $row['applied_type'] == 'C')\r\n\t $total_credits = bcadd($total_credits,$row['receipt_amount'],2);\r\n\t else\r\n\t $total_payments = bcadd($total_payments,$row['receipt_amount'],2);\r\n\r\n }\r\n\t\tif ($total_payments || $total_credits) {\r\n $balance_total = $invoice_total;\r\n\r\n\t\t\tif ($total_credits != 0) {\r\n\t\t $totals_data[] = array('field' => $this->template->current_template['applied_credit']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['applied_credit']['value']))),\r\n\t\t 'val' => $this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'($'.number_format($total_credits,2).\")\"))).\"($\".number_format($total_credits,2).\")\");\r\n\t $balance_total -= $total_credits;\r\n\t\t\t}\r\n\t\t if ($total_payments != 0) {\r\n\t $totals_data[] = array('field' => $this->template->current_template['payment_received']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['payment_received']['value']))),\r\n\t 'val' => $this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,'($'.number_format($total_payments,2).\")\"))).\"($\".number_format($total_payments,2).\")\");\r\n\t\t \t$balance_total -= $total_payments;\r\n\t\t }\r\n $totals_data[] = array('field' => $this->template->current_template['balance_due']['value'].$this->pdf->fill_void('.',(170 - $this->pdf->getTextWidth(12,$this->template->current_template['balance_due']['value']))),\r\n 'val' => $this->pdf->fill_void('.',(100.28 - $this->pdf->getTextWidth(12,($balance_total < 0 ? '($'.number_format($balance_total * -1,2).')' : '$'.number_format($balance_total,2))))).($balance_total < 0 ? '($'.number_format($balance_total * -1,2).')' : '$'.number_format($balance_total,2)));\r\n\t\t}\r\n\r\n\t\t// Pull footer message from print prefs if printed, or from system config if from invoice generation screen. For Trac #1307\r\n\t\t$footer_msg = ($_GET['fp'] ? $this->print_pref['footer_msg'] : fetch_sys_var('invoice_footer_message'));\r\n\r\n\t\t// Find out if the footer message is very long, or has multiple new lines that would cause it to push to the next page.\r\n\t\t$is_long_footer = ((strlen($footer_msg) > 315) || substr_count($footer_msg,\"\\n\") >= 2);\r\n\r\n\t\t// Calculate if extra adjustments need to be factored in for long totals or remittance address. For #1305\r\n\t\t$remit_to_ex = explode(\"\\n\",$invoice->current_invoice['remit_to_addr']);\r\n\t\tif (count($remit_to_ex) > 4)\r\n\t\t\t$adj_down1 = ((count($remit_to_ex)) - 4) * 25;\r\n\t\tif (count($totals_data) > 4)\r\n\t\t\t$adj_down2 = ((count($totals_data)) - 4) * 30;\r\n\t\t$adj_down = ($adj_down1 > $adj_down2 ? $adj_down1 : $adj_down2);\r\n\r\n\t\t// Push pricing totals to next page if near bottom\r\n\t\tif ($this->pdf->y < ($is_long_footer ? (132 + $adj_down) : (112 + $adj_down))) {\r\n\t\t\t$this->pdf->ezNewPage();\r\n\t\t\t$new_page = true;\r\n\t\t\t$this->pdf->ezSetDy(-20);\r\n\t\t}\r\n\r\n // Display remit to address if it exists. Added for trac ticket #307\r\n if (in_array(\"remit_to\",$this->print_pref['gen_print_fields']) && $invoice->current_invoice['remit_to_addr']) {\r\n $this->pdf->addText($this->pdf->ez['leftMargin'],($this->pdf->y - 10),$this->template->current_template['please_remit']['font_size'],($this->template->current_template['please_remit']['value'] ? \"<b>\" : NULL).$this->template->current_template['please_remit']['value'].\": \".($this->template->current_template['please_remit']['value'] ? \"</b>\" : NULL));\r\n $y_pos = ($this->pdf->y - 15);\r\n for ($i = 0; $i < count($remit_to_ex); $i++) {\r\n $y_pos -= 13;\r\n \t$this->pdf->addText($this->pdf->ez['leftMargin'] + 10,$y_pos,$this->template->current_template['please_remit_data']['font_size'],$remit_to_ex[$i]);\r\n }\r\n }\r\n\r\n\t\t$y = $this->pdf->ezTable($totals_data,NULL,NULL,$totals_options);\r\n\t\t$this->pdf->ezSetDy(-10);\r\n\r\n\t\t$this->pdf->ezSetY($is_long_footer ? 102 : 72);\r\n\r\n\t\t// Print footer message\r\n\t\tif ($footer_msg)\r\n\t\t\t$y = $this->pdf->ezText(stripslashes($footer_msg));\r\n\t}", "function woocommerce_pip_create_box_content() {\n\n\tglobal $post_id;\n\n\t?>\n\t<table class=\"form-table\">\n\t\t<?php if ( get_post_meta( $post_id, '_pip_invoice_number', true ) ) { ?>\n\t\t<tr>\n\t\t\t<td><?php _e( 'Invoice: #', 'woocommerce-pip' ); echo get_post_meta( $post_id, '_pip_invoice_number', true ); ?></td>\n\t\t</tr>\n\t\t<?php } ?>\n\t\t<tr>\n\t\t\t<td><a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_invoice' ), 'print-pip' ); ?>\"><?php _e('Print Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_packing' ), 'print-pip' ); ?>\"><?php _e( 'Print Packing List', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { ?>\n\t\t\t\t<a class=\"button pip-email\" href=\"<?php echo wp_nonce_url( admin_url( '?email_pip=true&post=' . $post_id ), 'email-pip' ); ?>\"><?php _e( 'Send Email Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php } ?>\n\t\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php\n}", "public function getNextInvoiceNumber(Client $client, ?Invoice $invoice, $is_recurring = false) :string\n {\n return $this->getNextEntityNumber(Invoice::class, $client, $is_recurring);\n }", "public function user_invoice_link($order)\n {\n $invoice = $this->get_invoice($order->id);\n\n // Show invoice link\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled'] && $this->opt['woo_pdf_allow_download'] && apply_filters('woo_pdf_allow_regular_invoice_download', true, $order, 'single')) {\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n $download_button = '<p class=\"woo_pdf_download_link\" style=\"padding: 15px 0;\"><a id=\"woo_pdf_invoice_download_link\" href=\"'.$download_url.'\" data-tip=\"Invoice\">' .\n '<img style=\"position: relative; top: 4px;\" src=\"'.WOOPDF_PLUGIN_URL.'/assets/images/pdf.png'.'\" alt=\"Invoice\" width=\"20\" height=\"20\">' .\n '<span style=\"padding-left: 10px;\">' . $this->opt['woo_pdf_title_download_invoice'] . '</span>' .\n '</a></p>';\n echo $download_button;\n }\n\n // Show proforma link\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && $this->opt['woo_pdf_allow_proforma_download'] && $order->status != 'completed' && apply_filters('woo_pdf_allow_proforma_invoice_download', true, $order, 'single')) {\n $download_url = home_url('/?wpd_proforma='.$order->id);\n $download_button = '<p class=\"woo_pdf_download_link\" style=\"padding: 15px 0;\"><a id=\"woo_pdf_proforma_download_link\" href=\"'.$download_url.'\" data-tip=\"Invoice\">' .\n '<img style=\"position: relative; top: 4px;\" src=\"'.WOOPDF_PLUGIN_URL.'/assets/images/pdf.png'.'\" alt=\"Invoice\" width=\"20\" height=\"20\">' .\n '<span style=\"padding-left: 10px;\">' . $this->opt['woo_pdf_title_download_proforma'] . '</span>' .\n '</a></p>';\n echo $download_button;\n }\n }", "public function get_order_number()\n {\n }", "public function invoice($id)\n { \n $data = SimOrder::where('id',$id)->first();\n $sim = sim::where('id',$data->sim_id)->first();\n $customer = new Party([\n 'name' => 'Ashley Medina',\n 'address' => 'The Green Street 12',\n 'code' => '#22663214',\n 'custom_fields' => [\n 'order number' => '> 654321 <',\n ],\n ]);\n\n $operator = SimOperator::where('operator', $data->operator)->first();\n\n $digit = new NumberFormatter(\"en\", NumberFormatter::SPELLOUT);\n $price = '€ '.$data->sell_price;\n\n $item = (new InvoiceItem())->title('Invoice')->pricePerUnit(2)->first($data->first_name)->last($data->last_name)->dob($data->dob)->gender($data->gender)->codice($data->codice)->iccid($data->iccid)->price($data->nationality);\n\n $invoice = Invoice::make()\n ->logo('storage/'.$operator->img)\n ->operator($operator->operator)\n ->date($sim->created_at)\n ->price($price)\n ->buyer($customer)\n ->discountByPercent(10)\n ->taxRate(15)\n ->shipping(1.99)\n ->name('Invoice')\n ->notes('MODULO DI IDENTIFICAZIONE E ATTIVAZIONE DEL SERVIZIO MOBILE PREPAGATO SI DICHIARA A TUTTI GLI EFFETTI DI LEGGE CHE TUTTE LE INFORMAZIONE E I DATI INDICATI NEL PRESENTE DOCUMENTO SONO ACCURATI, COMPLETI VERITIERI,')\n ->addItem($item);\n\n\n return $invoice->stream();\n }", "function custom_override_order_billing_details_nif($billing_data) {\n $billing_data['fiscal_number'] = array('label' => __('Fiscal Number', 'wceasypay'), 'show' => true);\n return $billing_data;\n }", "function edit_woocommerce_checkout_page($order){\r\n global $post_id;\r\n $order = new WC_Order( $post_id );\r\n echo '<p><strong>'.__('HCPID').':</strong> ' . get_post_meta($order->get_id(), 'hcpid', true ) . '</p>';\r\n}", "public function getSalesInvoiceId()\n {\n return parent::getValue('sales_invoice_id');\n }", "public function getProductNumber()\n {\n }", "function sendinvoice($orderid) {\n $email = new WC_Email_Customer_Invoice();\n $email->trigger($orderid);\n}", "public function getInvoiceID()\n\t{\n $varWhereClause=' 1 = 1';\n $arrDataList = $this->select(ORDER_TABLE,array('MAX(invoice_no) as invoice_no'), $varWhereClause);\n return $arrDataList[0]['invoice_no'] + 1;\n }", "public function getPurchaseOrderNumber()\n {\n return $this->purchaseOrderNumber;\n }", "function template_preprocess_xero_invoice(&$variables) {\n $invoice = $variables['invoice'] = $variables[0];\n unset($variables[0]);\n\n $variables['currency'] = (isset($invoice['CurrencyCode'])) ? $invoice['CurrencyCode'] : ''; //USD, NZD\n\n $variables['type'] = strtolower($invoice['Type']);\n $variables['status'] = ucwords(strtolower($invoice['Status']));\n $variables['invoiceid'] = $invoice['InvoiceID'];\n $variables['number'] = check_plain($invoice['InvoiceNumber']);\n $variables['name'] = check_plain($invoice['Contact']['Name']);\n $variables['contactid'] = $invoice['Contact']['ContactID'];\n\n $date = new DateTime($invoice['Date']);\n $variables['date'] = $date->format('U');\n $duedate = new DateTime($invoice['DueDate']);\n $variables['duedate'] = $duedate->format('U');\n\n $variables['total'] = (isset($invoice['Total'])) ? $invoice['Total'] : '0.00';\n $variables['paid'] = (isset($invoice['AmountPaid'])) ? $invoice['AmountPaid'] : '0.00';\n $variables['due'] = (isset($invoice['AmountDue'])) ? $invoice['AmountDue'] : '0.00';\n $variables['credited'] = (isset($invoice['AmountCredited'])) ? $invoice['AmountCredited'] : '0.00';\n $variables['lineamounttypes'] = $invoice['LineAmountTypes'];\n\n $variables['lineitems'] = array();\n if (!empty($invoice['LineItems']['LineItem'])) {\n $variables['lineitems'] = $invoice['LineItems']['LineItem'];\n }\n\n $variables['payments'] = '';\n if (!empty($invoice['Payments']['Payment'])) {\n $header = array(t('Date'), t('Amount'));\n $rows = array();\n\n foreach ($invoice['Payments']['Payment'] as $payment) {\n $row = array();\n\n $date = new DateTime($payment['Date']);\n $row[] = format_date($date->format('U'), 'short');\n $row[] = $payment['Amount'];\n\n $rows[] = $row;\n }\n\n $variables['payments'] = theme('table', $header, $rows, array('class' => 'xero-payments'), t('Payments'));\n }\n\n}", "function wcgc_get_order_card_number($order_id = null)\n{\n $id = get_post_meta($order_id, 'wcgc_id', true);\n $number = get_the_title($id);\n\n return apply_filters('wcgc_get_order_card_number', $number, $order_id);\n}", "public function invoice($order_detail_id=''){ \n\t $this->_check_login(); //check login authentication\n\t $data['title']='Customer Invoice';\n\t $order_detail_id = base64_decode($order_detail_id);\n\t $data['order_info'] = $order_info = $this->common_model->get_orderdetails($order_detail_id, 2, user_id());\n\t if(empty($order_info)) redirect($_SERVER['HTTP_REFERER']);\n\t $data['order_detail_id'] = $order_detail_id;\n\t $this->load->view('order-invoices',$data);\n\n\t}", "function viewInvoices($invoice = null) {\n \n $curl = new Curl();\n $header = $this->getHeader(True);\n\n if(!is_null($invoice)) {\n $fullUrl = $this->getApiUrl() . '/account/invoices/' . $invoice;\n } else {\n $fullUrl = $this->getApiUrl() . '/account/invoices';\n }\n \n $invoice = $curl->curlGet($fullUrl, $header);\n return $invoice;\n }", "public function getIpenNumber() {\n // check if we have a legacy ipen-number\n if (strlen($this->ipen_number) > 7) {\n return $this->ipen_number;\n }\n // otherwhise return the correctly formatted, complete ipen number\n else {\n return $this->ipen_number . \"-\" . $this->getAccessionNumber();\n }\n }", "public function generate_invoice() {\n //$this->output->enable_profiler(TRUE);\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->tenant_id;\n $user_id = $this->session->userdata('userDetails')->user_id;\n $data['companies'] = $this->classTraineeModel->get_company_for_allinvoice($tenant_id);\n //$data['invoices'] = $this->get_invoice(1); ///commented by shubhranshu\n //$data['total_invoice'] = $this->classTraineeModel->total_enrol_invoice(); ///commented by shubhranshu\n $data['page_title'] = 'Accounting';\n $data['main_content'] = 'classtrainee/generateinvoice';\n $this->load->view('layout', $data);\n }", "static function IssueInvoice(OmniFlow\\ProcessItem $item)\n\t{\n\t\t$proc=$item->proc;\n\t\t$case=$proc->dataHandler;\n\t\t$amount = $case->GetValue(\"Amount\");\n\t\t\n\t\t$item->result=\"Invoice#5001 - amount $amount\";\n\t\t$case->SetValue(\"Invoice#\",\"5001\");\n\t}", "private function getInvoiceOrderId()\n {\n $config = ConfigurationService::getDefaultConfig();\n $request = WebPay::createOrder($config)\n ->addOrderRow(TestUtil::createOrderRow())\n ->addCustomerDetails(WebPayItem::individualCustomer()->setNationalIdNumber(194605092222))\n ->setCountryCode(\"SE\")\n ->setCustomerReference(\"33\")\n ->setOrderDate(\"2012-12-12\")\n ->setCurrency(\"SEK\")\n ->useInvoicePayment()\n ->doRequest();\n\n return $request->sveaOrderId;\n }", "public function getInvoiceId(): ?int;", "protected function invoicePayload() : string\n {\n return $this->preCheckoutQuery()->getInvoicePayload();\n }", "public function Check_For_Customer_Order_Number($id, $order){\n $admin_custom_number = get_post_meta($order->id, 'order_number', true);\n $customer_custom_number = get_post_meta($order->id, 'customer_order_number', true);\n if( is_empty($admin_custom_number) ){\n return is_empty($customer_custom_number) ? $id : _x( '#', 'hash before order number', 'woocommerce' ) . $customer_custom_number;\n } else{\n return _x( '#', 'hash before order number', 'woocommerce' ) . $admin_custom_number;\n }\n /*\n if ( current_user_can( 'edit_posts') ){\n $custom_number = get_post_meta($order->id, 'order_number', true);\n return is_empty($custom_number) ? $id : _x( '#', 'hash before order number', 'woocommerce' ) . $custom_number;\n } else {\n $custom_number = get_post_meta($order->id, 'customer_order_number', true);\n return is_empty($custom_number) ? $id : _x( '#', 'hash before order number', 'woocommerce' ) . $custom_number;\n }\n */\n }", "public function admin_invoice_link($content)\n {\n global $post;\n global $woocommerce;\n\n $order = new WC_Order($post->ID);\n\n if (!$order) {\n return $content;\n }\n\n $invoice = $this->get_invoice($post->ID);\n\n // WooCommerce styling fix (covering multiple versions...)\n if (isset($woocommerce->version) && version_compare($woocommerce->version, '2.1', '>=')) {\n $button_style = 'style=\"display:block;text-indent:-9999px;position:relative;padding:6px 4px;height:2em!important;width:2em;\"';\n }\n else {\n $button_style = '';\n }\n\n // Show invoice link\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled']) {\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n\n $download_button = '<a id=\"\" class=\"button tips\" ' . $button_style . ' href=\"'.$download_url.'\" data-tip=\"'.__('Invoice', 'woo_pdf').'\">' .\n '<img src=\"'.WOOPDF_PLUGIN_URL.'/assets/images/download.png'.'\" alt=\"'.__('Invoice', 'woo_pdf').'\" width=\"14\">' .\n '</a>';\n echo $download_button;\n }\n\n // Show proforma link\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && $order->status != 'completed') {\n $download_url = home_url('/?wpd_proforma='.$post->ID);\n $download_button = '<a id=\"\" class=\"button tips\" ' . $button_style . ' href=\"'.$download_url.'\" data-tip=\"'.__('Proforma', 'woo_pdf').'\">' .\n '<img src=\"'.WOOPDF_PLUGIN_URL.'/assets/images/download.png'.'\" alt=\"'.__('Proforma', 'woo_pdf').'\" width=\"14\">' .\n '</a>';\n echo $download_button;\n }\n\n return $content;\n }", "function JKY_invoice_partner($the_id) {\n\t$db\t\t= Zend_Registry::get('db');\n\t$domain\t= get_config_value('NFe Dyer', 'domain');\n\n\t$my_count = 0;\n\tJKY_echo_count($my_count);\n}", "public function setVendorInvoiceNumber(?string $value): void {\n $this->getBackingStore()->set('vendorInvoiceNumber', $value);\n }", "function invoice($invoice) {\n\t\t\t$this->invoice = $invoice;\n\t\t}", "public function invoice(Request $request)\n {\n $data = auth()->user();\n $datas = Orders::where('id',$request->id)->with(\n 'get_order_details',\n 'get_order_details.get_product',\n 'get_order_details.get_product.get_attribute'\n )->first();\n\n // return view('layouts.backend.invoice.order_invoice',[\n // 'data'=>$data,\n // 'datas'=>$datas\n // ]);\n\n $pdf = PDF::loadView('layouts.backend.invoice.order_invoice',['datas'=>$datas]);\n return $pdf->stream('invoice.pdf');\n }", "protected function createOrderNumber() {}", "public function detail($invoice = null){\n\tif (!$invoice==null){\n\t\techo base64_decode($invoice);\n\t}\n\telse{\n\t\tredirect();\n\t}\n}", "function generate_invoice_number($start, $count, $digits){\n /*\n $start: is number first invice\n (global) $count: how many reciept numbers want to generate(1 at a time)\n (global) $digits: how many digits the generated numbers should be\n */\n $invoice_number = array();\n for($n = $start; $n < $start + $count; $n++){\n\n $invoice_number = str_pad($n, $digits, \"0\", STR_PAD_LEFT);\n\n }\n return $invoice_number;\n\n }", "function getInvoiceAddress() {\n\t\treturn $this->m_invoiceAddress;\n\t}", "function fetch_invoice($field = '', $invoiceid = 0)\n{\n global $ilance, $phrase, $myapi;\n \n // valid invoice table fields\n $validfields = array('invoiceid','parentid','currency_id','currency_rate','subscriptionid','projectid','buynowid','user_id','p2b_user_id','p2b_paymethod','p2b_markedaspaid','storeid','orderid','description','amount','paid','totalamount','istaxable','taxamount','taxinfo','status','invoicetype','paymethod','paymentgateway','ipaddress','referer','createdate','duedate','paiddate','custommessage','transactionid','archive','ispurchasorder','isdeposit','depositcreditamount','iswithdraw','withdrawinvoiceid','withdrawdebitamount','isfvf','isif','isportfoliofee','isenhancementfee','isescrowfee','iswithdrawfee','isp2bfee','isdonationfee','ischaritypaid','charityid','isregisterbonus','indispute');\n \n \t// fetching field based on a user id parameter\n\t// this will also check for valid db fields before we obtain anything relevent\n\tif (in_array($field, $validfields))\n\t{\n\t\t$sql = $ilance->db->query(\"\n\t\t\tSELECT $field\n\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\tWHERE invoiceid = '\" . intval($invoiceid) . \"'\n\t\t\", 0, null, __FILE__, __LINE__);\n\t\tif ($ilance->db->num_rows($sql) > 0)\n\t\t{\n\t\t\t$res = $ilance->db->fetch_array($sql, DB_ASSOC);\n\t\t\treturn stripslashes($res[$field]);\n\t\t} \n\t}\n \n return '';\n}", "public function delete_invoice()\n {\n // Check if user has rights to delete invoices\n $current_user = wp_get_current_user();\n $user_ok = false;\n\n if ($current_user instanceof WP_User) {\n if (in_array('administrator', $current_user->roles) || in_array('shop_manager', $current_user->roles)) {\n $user_ok = true;\n }\n }\n\n if (!$user_ok) {\n return;\n }\n\n // Extract request data\n $invoice = explode('|', base64_decode($_GET['wpd_delete_invoice']));\n\n if (count($invoice) != 4) {\n return;\n }\n\n // Get all post attachments (to find the one that needs to be removed)\n $attachments = get_children($_GET['order_id']);\n\n if (!is_array($attachments) || empty($attachments)) {\n return;\n }\n\n // Find and delete post attachment that represents invoice\n foreach ($attachments as $attachment) {\n if ($attachment->post_mime_type == 'application/pdf' && preg_match('/^invoice\\-.+/', $attachment->post_name)) {\n wp_delete_attachment($attachment->ID);\n break;\n }\n }\n\n // Remove post meta from order post\n delete_post_meta($_GET['order_id'], 'woo_pdf_invoice_id');\n delete_post_meta($_GET['order_id'], 'woo_pdf_invoice_prefix');\n delete_post_meta($_GET['order_id'], 'woo_pdf_invoice_suffix');\n delete_post_meta($_GET['order_id'], 'woo_pdf_invoice_code');\n\n // Redirect back to order page\n wp_redirect(admin_url('/post.php?post='.$_GET['order_id'].'&action=edit'));\n exit;\n }", "function es_add_customer_number_my_account() {\n\t$user_id = get_current_user_id();\n\t$member_number = get_user_meta($user_id, 'old_customer_number', true);\n\n\tif ($member_number) {\n\t\t$customer_number = $member_number;\n\t}\n\telse {\n\t\t$customer_number = 'A'.$user_id;\n\t}\n\n\t?>\n\t<h2>Customer Number</h2>\n\t<div style=\"width: 150px;color:#ED1C24;border-width: 0px 1px 1px 0px;padding: 4px 8px;vertical-align: middle;border: 1px solid rgba(0, 0, 0, 0.1);font-size: 1.4em !important;\">\n\t\t<?php echo $customer_number;?>\n\t</div>\n\t<?php\n}", "public function invoiceprint(){\n $data['thispage']=\"72\";\n $data['title']=\"Invoices Print || WishingMart\";\n\n $url_invoice_view=base_api_url().\"dashboard/invoiceview/iid/\".$this->uri->segment(3).base_api_key();\n $data['invoice_view'] = self::getapi($url_invoice_view);\n //print_r($data['invoice_list']);exit();\n\n $this->load->view('dashboard/invoiceprint_view', $data);\n }", "public function getRreserveIncId()\n {\n $quote = $this->getQoute();\n $quote->reserveOrderId();\n $quote->save($quote);\n \n $invoiceNum = $quote->getReservedOrderId();\n if ($invoiceNum == '') {\n $invoiceNum = date(\"dmYhis\").'_'.random_int(10,99);\n }\n \n return $invoiceNum;\n }", "protected function getInvoiceLineHTMLTemplate(){\n return\n '<tr>\n <td align=\"left\" valign=\"left\" style=\"padding:15px;border-top:1px dashed #CCCCCC;\" width=\"50%\">\n <strong><<ITEM_NAME>></strong>\n <strong><<ITEM_NAME>></strong>\n <<ITEM_OPTION_SIZE>>\n <<ITEM_OPTION_SIZE>>\n </td>\n <td align=\"left\" valign=\"top\" style=\"padding:15px;border-top:1px dashed #CCCCCC;\" ><<ITEM_SKU>></td>\n <td align=\"center\" valign=\"top\" style=\"padding:15px;border-top:1px dashed #CCCCCC;\" ><<ITEM_QTY>></td>\n <td align=\"right\" valign=\"top\" style=\"padding:15px;border-top:1px dashed #CCCCCC;\" >\n <strong>'.$this->getCurrencySymbol().'<<ITEM_PRICE>></strong>\n </td>\n </tr>';\n }", "public function getProductIDs($invoice)\n\t{\n\t\tif($invoice && $invoice['invoice'] && count($invoice['invoice']['items'])>0){\n\t\t\tforeach($invoice['invoice']['items'] as $k=>$item){\n\t\t\t\t$prodID=$this->invoiceItem2productID($invoice['invoice']['order_id'], $item['item_id'], $item['description']);\n\t\t\t\tif($prodID)\n\t\t\t\t\t$invoice['invoice']['items'][$k]['productID'] = $prodID;\n\t\t\t}\n\t\t}\n\t\treturn $invoice;\n\t}", "public static function createInvoice(){\n\t\treturn self::create(self::TYPE_INVOICE);\n\t}" ]
[ "0.73482877", "0.7143626", "0.7097948", "0.6907359", "0.67078775", "0.6590001", "0.6546367", "0.64396703", "0.63542956", "0.62747127", "0.62382156", "0.62371", "0.6160486", "0.6157898", "0.6137259", "0.6095471", "0.60921806", "0.6064647", "0.6060021", "0.6038626", "0.60281146", "0.59876406", "0.59609735", "0.5948943", "0.5946871", "0.5946871", "0.5920002", "0.59056044", "0.58339775", "0.5793053", "0.5780047", "0.57438844", "0.5735091", "0.5722673", "0.5722673", "0.5704691", "0.56717604", "0.5671219", "0.5664263", "0.5645569", "0.56430465", "0.5642337", "0.56270695", "0.5620313", "0.5612669", "0.55999523", "0.5589037", "0.5581368", "0.5577701", "0.5573263", "0.5569977", "0.556973", "0.55356926", "0.5517067", "0.55165094", "0.5513435", "0.5512215", "0.55061436", "0.5486945", "0.54841536", "0.5467418", "0.54625696", "0.5462434", "0.5461943", "0.5455995", "0.54553646", "0.5429079", "0.5422498", "0.5416257", "0.5405595", "0.5401948", "0.53918445", "0.53847593", "0.5383104", "0.53702474", "0.5352441", "0.53415465", "0.5341349", "0.533802", "0.5330642", "0.5329621", "0.531932", "0.52920353", "0.5276431", "0.527479", "0.52673346", "0.52667683", "0.52516687", "0.5249987", "0.52473146", "0.524406", "0.5235616", "0.52323717", "0.52182025", "0.5215959", "0.5205642", "0.520538", "0.5197491", "0.51961505", "0.5189308" ]
0.8192451
0
woocommerce_pip_order_fees function. Output order fees if needed
Функция woocommerce_pip_order_fees. Выводить сборы за заказ, если это необходимо
function woocommerce_pip_order_fees( $order ) { $print_fees = ''; if ( $fees = $order->get_fees() ) { foreach( $fees as $id => $fee ) { $print_fees .= '<tr><th colspan="2" style="text-align:left; padding-top: 12px;">&nbsp;</th> <th scope="row" style="text-align:right;">' . $fee["name"] . '</th> <td style="text-align:left;">' . wc_price( $fee["line_total"] ) . '</td> </tr>'; } } return $print_fees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function calculate_fees()\n {\n }", "public function get_fees()\n {\n }", "public function get_fees()\n {\n }", "public static function add_order_fee()\n {\n }", "public function getFees()\n {\n return $this->fees;\n }", "public function get_total_fees()\n {\n }", "public function getFees()\n\t{\n\t\treturn $this->fees;\n\t}", "public function getFees()\n\t{\n\t\treturn $this->fees;\n\t}", "public static function get_day_fees_fields() {\n\t\tif ( ! is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tob_start();\n\n\t\t$day_fees = self::get_day_fees();\n\t\t$days = self::get_days();\n\t\t?>\n\t\t<table class=\"iconic-wds-table\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t<tbody>\n\t\t\t<?php foreach ( $day_fees as $day => $fee ) { ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"iconic-wds-table__column\">\n\t\t\t\t\t\t<input type=\"number\" id=\"general_setup_shipping_methods_<?php echo esc_attr( $day ); ?>\" name=\"jckwds_settings[datesettings_fees_days][<?php echo esc_attr( $day ); ?>]\" value=\"<?php echo ! empty( $fee ) ? esc_attr( $fee ) : ''; ?>\">\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"iconic-wds-table__column iconic-wds-table__column--label\">\n\t\t\t\t\t\t<label for=\"general_setup_shipping_methods_<?php echo esc_attr( $day ); ?>\"><?php echo esc_attr( $days[ $day ] ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t<?php } ?>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<?php\n\n\t\treturn ob_get_clean();\n\t}", "protected function get_fees_from_cart()\n {\n }", "function wc_autoship_fees_example_add_fees( $fees, $schedule_id ) {\n\t\t$schedule = new WC_Autoship_Schedule( $schedule_id );\n\t\t\n\t\t// Add a fee for each autoship schedule item\n\t\t$items = $schedule->get_items();\n\t\tforeach ( $items as $i => $item ) {\n\t\t\t// Get the WooCommerce product\n\t\t\t$product = $item->get_product();\n\t\t\tif ( ! empty( $product ) ) {\n\t\t\t\t// Create a fee for the product\n\t\t\t\t$fee = new stdClass();\n\t\t\t\t$fee->id = \"wc_autoship_example_fee_{$i}\";\n\t\t\t\t$fee->name = $product->get_title() . ' Fee';\n\t\t\t\t$fee->amount = 5.99;\n\t\t\t\t$fee->tax_class = '';\n\t\t\t\t$fee->taxable = false;\n\t\t\t\t$fee->tax = 0;\n\t\t\t\t$fee->tax_data = array();\n\t\t\t\t// Append the fee\n\t\t\t\t$fees[] = $fee;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Return fees\n\t\treturn $fees;\n\t}", "public function add_checkout_field_fees($cart)\n {\n // Make sure this is a correct request\n if (is_admin() && !is_ajax()) {\n return;\n }\n\n // Parse data if needed\n if (isset($_POST['post_data'])) {\n parse_str($_POST['post_data'], $posted);\n }\n else {\n $posted = $_POST;\n }\n\n // Do not proceed if there are no checkout fields set\n if (!is_array($posted) || empty($posted['wccf']['checkout_field'])) {\n return;\n }\n\n // Get applicable checkout fields\n $fields = WCCF_Checkout_Field_Controller::get_filtered();\n\n // Get sanitized field values\n $values = WCCF_Field_Controller::sanitize_posted_field_values('checkout_field', array(\n 'skip_invalid' => true,\n 'leave_no_trace' => true,\n 'fields' => $fields,\n 'posted' => $posted,\n ));\n\n // Check if we have any values\n if (empty($values) || !is_array($values)) {\n return;\n }\n\n // Get cart total to base percentage fees/discounts on\n $cart_total = $cart->prices_include_tax ? ($cart->cart_contents_total + $cart->tax_total) : $cart->cart_contents_total;\n\n // Get fees\n $fees = WCCF_Pricing::get_checkout_fees($cart_total, $fields, $values);\n\n // Iterate over fees\n foreach ($fees as $fee) {\n\n $fee_label = false;\n\n // Ensure fee label is unique, otherwise it won't be added\n do {\n\n $is_unique = true;\n\n // Get fee label\n if ($fee_label === false) {\n $fee_label = $fee['label'];\n }\n else {\n $fee_label .= apply_filters('wccf_duplicate_fee_label_suffix', ' 2');\n }\n\n // Get fee id from fee label\n $fee_id = sanitize_title($fee_label);\n\n // Check if fee id is really unique\n foreach ($cart->get_fees() as $cart_fee) {\n if ($cart_fee->id === $fee_id) {\n $is_unique = false;\n break;\n }\n }\n }\n while (!$is_unique);\n\n // Check if fee is taxable and get tax class\n $taxable = $fee['tax_class'] !== null;\n $tax_class = ($taxable && $fee['tax_class'] !== 'standard') ? $fee['tax_class'] : '';\n\n // Add fee to cart\n $cart->add_fee($fee_label, $fee['amount'], $taxable, $tax_class);\n }\n }", "public function get_region_delivery_fees () {\n\t\t\n\t\t\n\t\t$res = M('region_link')\n\t\t\t->join('`food_region` on `food_region_link`.region_id = `food_region`.id')\n\t\t\t->where('`food_region_link`.o_id = ' . $this->targetRegionID)\n\t\t\t->field(['`food_region`.`id`, `food_region`.`zipcode`', '`food_region_link`.`fee`'])\n\t\t\t->select();\n\t\t\n\t\t$this->return_data($res);\n\t}", "function wc_cart_totals_fee_html($fee)\n {\n }", "private function provideFixedFee()\n {\n return [\n 'fixed fee' => [\n 'fixed-fee.json',\n [\n 'Programming' => ['rate' => 100000 / 62.20, 'hours' => 62.20, 'revenue' => 100000],\n 'Marketing' => ['rate' => 100000 / 17.98, 'hours' => 17.98, 'revenue' => 100000],\n ],\n 200000,\n ],\n ];\n }", "public function setFees($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Io\\Token\\Proto\\Common\\Pricing\\TransferQuote\\Fee::class);\n $this->fees = $arr;\n\n return $this;\n }", "public function getHandlingFee();", "public function getExtraFees()\n {\n return 0;\n }", "function fetch_service_buyer_escrow_fee($amount = 0)\n{\n global $ilance, $myapi, $ilconfig;\n \n $fee = 0;\n if ($ilconfig['escrowsystem_escrowcommissionfees'])\n {\n // escrow commission fees to auction owner enabled\n if ($ilconfig['escrowsystem_servicebuyerfixedprice'] > 0)\n {\n // fixed escrow cost to merchant\n $fee = $ilconfig['escrowsystem_servicebuyerfixedprice'];\n }\n else\n {\n if ($ilconfig['escrowsystem_servicebuyerpercentrate'] > 0)\n {\n // percentage rate of total winning bid amount\n // which would be the same as the amount being forwarded into escrow\n $fee = ($amount * $ilconfig['escrowsystem_servicebuyerpercentrate'] / 100);\n }\n } \n }\n \n return sprintf(\"%01.2f\", $fee);\n}", "function awcdp_apifw_invoice_deposit( $custom_fields, $order_id ) {\n\n if(apply_filters('awcdp_show_in_apifw_invoice',true)){\n \t$order = wc_get_order($order_id);\n \t$has_deposit = $order->get_meta('_awcdp_deposits_order_has_deposit', true) === 'yes';\n\n \tif ($has_deposit){\n \t\t$awcdp_ts = get_option('awcdp_text_settings');\n \t\t$to_pay_text = ( isset($awcdp_ts['to_pay_text']) && ( $awcdp_ts['to_pay_text'] != '' ) ) ? $awcdp_ts['to_pay_text'] : esc_html__('Due Today', 'deposits-partial-payments-for-woocommerce' );\n \t\t$future_text = ( isset($awcdp_ts['future_payment_text']) && ( $awcdp_ts['future_payment_text'] != '' ) ) ? $awcdp_ts['future_payment_text'] : esc_html__('Future Payments', 'deposits-partial-payments-for-woocommerce' );\n \t\t$deposit_text = ( isset($awcdp_ts['deposit_amount_text']) && ( $awcdp_ts['deposit_amount_text'] != '' ) ) ? $awcdp_ts['deposit_amount_text'] : esc_html__('Deposit Amount', 'deposits-partial-payments-for-woocommerce' );\n\n \t\t\t$deposit_amount = floatval($order->get_meta('_awcdp_deposits_deposit_amount', true));\n \t\t\t$second_payment = floatval($order->get_meta('_awcdp_deposits_second_payment', true));\n\n \t\t\t\t\t$deposit_amount = wc_price($deposit_amount, array('currency' => $order->get_currency()));\n \t\t\t\t\t$future_amount = wc_price($second_payment, array('currency' => $order->get_currency()));\n\n \t\t\t\t\treturn '<br><span><small>('.esc_html($deposit_text).': '.$deposit_amount.'<br>'.esc_html($future_text).': '.$future_amount.')</small></span>';\n\n \t\t}\n }\n }", "public function getFeesTotal()\n {\n return $this->fees_total;\n }", "public function fee()\n {\n return $this->httpGet('/api/v4/wallet/fee', [], 'SIGN');\n }", "function getFees( $price ) {\n return number_format($price * 0.03, 2);\n }", "private\n function getFeesItem()\n {\n $carrier = new Carrier($this->order->id_carrier);\n $delivery = new Address($this->order->id_address_delivery);\n $product_reference = HipayHelper::getCarrierRef($carrier);\n $name = $carrier->name;\n $unit_price = is_bool($this->captureRefundFee) ? (float)$this->order->total_shipping : floatval(number_format($this->captureRefundFee, 2));\n $tax_rate = $carrier->getTaxesRate($delivery);\n $discount = 0.00;\n $total_amount = is_bool($this->captureRefundFee) ? (float)$this->order->total_shipping : floatval($this->captureRefundFee);\n $item = HiPay\\Fullservice\\Gateway\\Model\\Cart\\Item::buildItemTypeFees(\n $product_reference,\n $name,\n $unit_price,\n $tax_rate,\n $discount,\n $total_amount\n );\n // forced category\n $item->setProductCategory(1);\n\n\n //save capture items and quantity in prestashop\n if ($this->maintenanceData) {\n $captureData = array(\n \"hp_ps_order_id\" => $this->order->id,\n \"hp_ps_product_id\" => 0,\n \"operation\" => $this->operation,\n \"type\" => 'fees',\n \"attempt_number\" => $this->transactionAttempt + 1,\n \"quantity\" => 1,\n \"amount\" => $total_amount\n );\n $this->maintenanceData->addItem($captureData);\n }\n\n return $item;\n }", "public function getFee()\n {\n return $this->fee;\n }", "public function getFee()\n {\n return $this->fee;\n }", "public function fee($atts)\n {\n }", "public function fee($atts)\n {\n }", "public function getApproximateFees()\n\t{\n\t\treturn $this->approximateFees;\n\t}", "function convenience_fees() {\n\t\t$page_data ['post_data'] = $this->input->post ();\n\t\t$this->load->model ( 'transaction_model' );\n\t\tif (valid_array ( $page_data ['post_data'] ) == true) {\n\t\t\t$this->transaction_model->update_convenience_fees ( $page_data ['post_data'] );\n\t\t\tset_update_message ();\n\t\t\tredirect ( base_url () . 'index.php/utilities/convenience_fees' );\n\t\t}\n\t\t$convenience_fees = $this->transaction_model->get_convenience_fees ();\n\t\t$page_data ['convenience_fees'] = $this->format_convenience_fees ( $convenience_fees );\n\t\t$this->template->view ( 'utilities/convenience_fees', $page_data );\n\t}", "function calcPriceTaxFees(float $amount, bool $format = false)\n {\n $markup = $amount * MARKUP;\n $markedamount = $amount + $markup;\n $vat = $markedamount * VAT;\n $manicipality = $markedamount * MANICIPALITY_TAX;\n $fees = $vat + $manicipality;\n return $format ? round($fees, 2) . ' ' . userCurShort() : round($fees, 2);\n }", "function pt_add_handling_fee() {\n global $woocommerce;\n if ( is_admin() && ! defined( 'DOING_AJAX' ) )\n return;\n if ($woocommerce->cart->subtotal>=300){\n $fee = 0.00;\n } else {\n $fee = 30.00;\n }\n $title = 'Delivery Charge';\n $woocommerce->cart->add_fee( $title, $fee, TRUE, 'standard' );\n}", "protected function calculate_fee_totals()\n {\n }", "public function getFee()\n\t{\n\t\treturn $this->fee;\n\t}", "public function getFee()\n\t{\n\t\treturn $this->fee;\n\t}", "public static function laratablesCustomFee($order)\n {\n return $order->currency . ' ' . $order->fee;\n }", "function print_escrow_fees($mode = '', $amount = 0, $pid = 0)\n{\n global $ilance, $myapi, $ilconfig;\n \n\t$currencyid = fetch_auction('currencyid', $pid);\n\t\n if ($ilconfig['escrowsystem_escrowcommissionfees'])\n {\n if (isset($mode) AND !empty($mode))\n {\n switch ($mode)\n {\n case 'as_service_provider';\n {\n if ($ilconfig['escrowsystem_providerfixedprice'] > 0 OR $ilconfig['escrowsystem_providerpercentrate'] > 0)\n {\n $html = print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], $amount, $currencyid);\n }\n else\n {\n $html = print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], 0, $currencyid); \n }\n break;\n } \n case 'as_service_buyer';\n {\n if ($ilconfig['escrowsystem_servicebuyerfixedprice'] > 0 OR $ilconfig['escrowsystem_servicebuyerpercentrate'] > 0)\n {\n $html = print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], $amount, $currencyid);\n }\n else\n {\n $html = print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], 0, $currencyid); \n }\n break;\n } \n case 'as_merchant_provider';\n {\n if ($ilconfig['escrowsystem_merchantfixedprice'] > 0 OR $ilconfig['escrowsystem_merchantpercentrate'] > 0)\n {\n $html = print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], $amount, $currencyid);\n }\n else\n {\n $html = print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], 0, $currencyid); \n }\n break;\n } \n case 'as_merchant_buyer';\n {\n if ($ilconfig['escrowsystem_bidderfixedprice'] > 0 OR $ilconfig['escrowsystem_bidderpercentrate'] > 0)\n {\n $html = print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], $amount, $currencyid);\n }\n else\n {\n $html = print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], 0, $currencyid); \n }\n break;\n } \n case 'as_admin';\n {\n $html = $ilance->currency->format($amount, $currencyid);\n break;\n }\n }\n \n return $html;\n }\n }\n else\n {\n return print_currency_conversion($_SESSION['ilancedata']['user']['currencyid'], 0, $currencyid);\n }\n}", "public function fees_api()\n {\n }", "function fetch_merchant_escrow_fee($amount = 0)\n{\n global $ilance, $myapi, $ilconfig;\n $fee = 0;\n if ($ilconfig['escrowsystem_escrowcommissionfees'])\n {\n // escrow commission fees to auction owner enabled\n if ($ilconfig['escrowsystem_merchantfixedprice'] > 0)\n {\n // fixed escrow cost to merchant\n $fee = $ilconfig['escrowsystem_merchantfixedprice'];\n }\n else\n {\n if ($ilconfig['escrowsystem_merchantpercentrate'] > 0)\n {\n // percentage rate of total winning bid amount\n // which would be the same as the amount being forwarded into escrow\n $fee = ($amount * $ilconfig['escrowsystem_merchantpercentrate'] / 100);\n }\n } \n }\n \n return sprintf(\"%01.2f\", $fee);\n}", "public function getFeesPaidBy()\n {\n return $this->fees_paid_by;\n }", "function fetch_provider_escrow_fee($amount = 0)\n{\n global $ilance, $myapi, $ilconfig;\n \n $fee = 0;\n if ($ilconfig['escrowsystem_escrowcommissionfees'])\n {\n if ($ilconfig['escrowsystem_providerfixedprice'] > 0)\n {\n $fee = $ilconfig['escrowsystem_providerfixedprice'];\n }\n else\n {\n if ($ilconfig['escrowsystem_providerpercentrate'] > 0)\n {\n $fee = ($amount*$ilconfig['escrowsystem_providerpercentrate']/100);\n }\n } \n }\n return sprintf(\"%01.2f\", $fee);\n}", "function b2bcalcPriceTaxFees(float $amount, bool $format = false)\n {\n $markup = $amount * B2BMARKUP;\n $markedamount = $amount + $markup;\n $vat = $markedamount * VAT;\n $manicipality = $markedamount * MANICIPALITY_TAX;\n $fees = $vat + $manicipality;\n return $format ? round($fees, 2) . ' ' . userCurShort() : round($fees, 2);\n }", "public function feeCalculation(Product $product);", "public function create_order_fee_lines(&$order, $cart)\n {\n }", "protected function getFeesRoute()\n {\n return 'licence/fees';\n }", "function fetch_product_bidder_escrow_fee($userid = 0, $amount = 0)\n{\n global $ilance, $myapi, $ilconfig;\n \n $fee = 0;\n if ($ilconfig['escrowsystem_escrowcommissionfees'])\n {\n // escrow commission fees to auction owner enabled\n if ($ilconfig['escrowsystem_bidderfixedprice'] > 0)\n {\n // fixed escrow cost to provider for release of funds\n $fee = $ilconfig['escrowsystem_bidderfixedprice'];\n }\n else\n {\n if ($ilconfig['escrowsystem_bidderpercentrate'] > 0)\n {\n // percentage rate of total winning bid amount\n // which would be the same as the amount being forwarded into escrow\n $fee = ($amount * $ilconfig['escrowsystem_bidderpercentrate'] / 100);\n }\n } \n }\n \n return sprintf(\"%01.2f\", $fee);\n}", "public function get_fee_total()\n {\n }", "private function format_convenience_fees($convenience_fees) {\n\t\t$data = array ();\n\t\tforeach ( $convenience_fees as $k => $v ) {\n\t\t\t$data [$k] ['origin'] = $v ['origin'];\n\t\t\t$data [$k] ['module'] = strtoupper ( $v ['module'] );\n\t\t\t$fees = '';\n\t\t\tif ($v ['value_type'] == 'plus') {\n\t\t\t\t$fees = '+' . floatval ( $v ['value'] );\n\t\t\t} else {\n\t\t\t\t$fees = floatval ( $v ['value'] ) . '%';\n\t\t\t}\n\t\t\t$data [$k] ['fees'] = $fees;\n\t\t\t$data [$k] ['value'] = $v ['value'];\n\t\t\t$data [$k] ['value_type'] = $v ['value_type'];\n\t\t\t$data [$k] ['per_pax'] = $v ['per_pax'];\n\t\t}\n\t\treturn $data;\n\t}", "function custom_admin_order_totals_after_tax( $orderid ) {\n\t$label = __( 'Fee', 'sport_sp' );\n\t$fee = get_post_meta( $orderid, '_order_fee', true);\n\t$value = wc_price($fee);\n \n // Output\n ?>\n <tr>\n <td class=\"label\"><?php echo $label; ?>:</td>\n <td width=\"1%\"></td>\n <td class=\"custom-total\"><?php echo $value; ?></td>\n </tr>\n <?php\n}", "public function getPriceFee() {\n return $this->price + $this->price * Yii::$app->params['paypal.fee']/100;\n }", "public function getServiceFee($total=null)\n{\n $totalAmount = $total == null ? $this->getTotalOrder() : $total;\n return getFee($totalAmount, 'service_fee_type', 'service_fee_amount');\n}", "public function setFees($value = NULL)\n\t{\n\t\tif (NULL !== $value) {\n\t\t $this->fees = $value;\n\t\t}\n\t\treturn $this;\n\t}", "public function show(Fees $fees)\n {\n //\n }", "function learner_pays_fees_action(&$fees, $context = array()) {\n\n}", "function calculate_escrow_fee($amount = 0, $logictype = '')\n{\n\tglobal $ilance, $myapi, $ilconfig;\n \n\t$fee = 0;\n\tif ($ilconfig['escrowsystem_escrowcommissionfees'] AND $logictype != '')\n\t{\n\t\t$ilance->escrow = construct_object('api.escrow');\n \n\t\t$logic = $ilance->escrow->fetch_escrow_commission_logic($logictype);\n\t\tif ($logic == 'fixed')\n\t\t{\n\t\t\t// fixed service commission logic\n\t\t\t$fee = $ilance->escrow->fetch_escrow_commission($logictype);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// percentage of the overall cost logic\n\t\t\t$fee = ($amount * $ilance->escrow->fetch_escrow_commission($logictype) / 100);\n\t\t}\n \n $fee = $ilance->currency->string_to_number($fee);\n\t}\n \n\treturn $fee;\n}", "function cheque_calculate_fee($amount){\n\tglobal $secpayconf_cheques_flat_fees;\n\t$total = $amount + $secpayconf_cheques_flat_fees;\n\treturn $total;\n}", "public function test_FormatShippingFeeRows_includes_all_attributes_in_formatted_rows()\n {\n $config = ConfigurationService::getDefaultConfig();\n $order = WebPay::createOrder($config);\n $order->addFee(WebPayItem::shippingFee()\n ->setShippingId(\"0\")\n ->setName(\"Tess\")\n ->setDescription(\"Tester\")\n ->setAmountExVat(4)\n ->setVatPercent(25)\n ->setUnit(\"st\")\n );\n\n $formatter = new WebServiceRowFormatter($order);\n $resultRows = $formatter->formatRows();\n $testedRow = $resultRows[0];\n\n $this->assertEquals(\"0\", $testedRow->ArticleNumber);\n $this->assertEquals(\"Tess: Tester\", $testedRow->Description);\n $this->assertEquals(4.0, $testedRow->PricePerUnit);\n $this->assertEquals(25.0, $testedRow->VatPercent);\n $this->assertEquals(0, $testedRow->DiscountPercent);\n $this->assertEquals(1, $testedRow->NumberOfUnits);\n $this->assertEquals(\"st\", $testedRow->Unit);\n }", "public function getFee(): float\n {\n $fee = $this->configRepo->get('wallee.skrill_fee');\n if (! empty($fee)) {\n return (float) $fee;\n } else {\n return 0.00;\n }\n }", "function gestion_frais(){\r\n\r\n\t$prix_commande = 0; // Retrieve the price of the article in the database\r\n\t$poids = $_POST['poids_commande'];\r\n\t$frais_port = 0;\r\n\r\n\t// if the price is more than 350 euros the shipping costs are free\r\n\tif ($prix_commande >= 350){\r\n\t\t$frais_port = 0;\r\n\t}\r\n\r\n\t// calculate the price by weight\r\n\tif ($poids <= 2) {\r\n\t\t$frais_port = 8.80;\r\n\t}\r\n\r\n\telse if ($poids > 2 && $poids <= 5) {\r\n\t\t$frais_port = 13.15;\r\n\t}\r\n\r\n\telse if ($poids > 5 && $poids <= 10) {\r\n\t\t$frais_port = 19.20;\r\n\t}\r\n\r\n\telse if ($poids > 10 && $poids <= 30) {\r\n\t\t$frais_port = 27.30;\r\n\t}\r\n\r\n\t// if the weight is more then 30 kg we don't deliver\r\n\tif ($poids > 30) {\r\n\t\techo \"Nous ne livrons pas les produits de plus de 30Kg\";\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// error handling in case of negative weight\r\n\tif ($poids <= 0) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t$prix_total = $prix_commande + $frais_port;\r\n\r\n\t// premium handling\r\n\t$premium = false;\r\n\t$shipping_premium = $frais_port / 2;\r\n\r\n\t if ($premium == true) {\r\n\t\techo $shipping_premium;\r\n\t}\r\n}", "public function calculate_shipping( $package ) {\n\n $countries = new WC_Countries();\n \n $Freight_Quote_Shipping_Method = new Freight_Quote_Shipping_Method();\n $settings = $Freight_Quote_Shipping_Method->settings;\n\n if(empty($settings['username']) || empty($settings['password'])){\n\n $message = sprintf('Username or Password is missing for Freight Quote.');\n $messageType = \"error\";\n \n if( ! wc_has_notice( $message, $messageType ) ) {\n wc_add_notice( $message, $messageType );\n }\n }\n \n $credentails = array(\n 'username' => $settings['username'],\n 'password' => $settings['password']\n );\n $cost = 0;\n \n if(isset($package[\"destination\"])&&$package[\"destination\"]['postcode']&&$package[\"destination\"]['country']){\n $freightquote = new Freightquote($credentails);\n\n $requests = [];\n foreach ( $package['contents'] as $item_id => $values ) \n { \n $_product = $values['data']; \n $zipcode = $_product->get_attribute('pa_'.$settings['zipcode_field']) ? $_product->get_attribute('pa_'.$settings['zipcode_field']) : $settings['zipcode'];\n\n $product = [\n 'Weight' => $_product->get_weight(),\n 'Length' => $_product->get_length(),\n 'Height' => $_product->get_height(),\n 'Width' => $_product->get_width(),\n 'ProductDescription' => $_product->get_name(),\n 'PackageType' => 'Boxes',\n 'ContentType' => 'NewCommercialGoods',\n 'IsHazardousMaterial' => 'false',\n 'PieceCount' => $values['quantity'],\n ];\n\n if(isset($requests[$zipcode])){\n $requests[$zipcode]['QuoteShipment']['ShipmentProducts']['Product'][] = $product;\n continue;\n }\n\n $requests[$zipcode] = array(\n 'CustomerId'=> $settings['username'],\n 'QuoteType' => 'B2B',\n 'ServiceType' => 'LTL',\n 'QuoteShipment' => array(\n 'IsBlind' => 'false',\n 'ShipmentLocations' => array(\n 'Location' => array(\n array(\n 'LocationType' => 'Origin',\n 'LocationAddress' => array(\n 'PostalCode' => $zipcode,\n 'CountryCode' => $countries->get_base_country(),\n ),\n ),\n array(\n 'LocationType' => 'Destination',\n 'LocationAddress' => array(\n 'PostalCode' => $package[\"destination\"]['postcode'],\n 'CountryCode' => $package[\"destination\"]['country'],\n ),\n \n ),\n ),\n ),\n 'ShipmentProducts' => array(\n 'Product' => [$product]\n ),\n ),\n );\n \n }\n\n foreach ($requests as $request) {\n $response = $freightquote->getQuotes($request);\n // echo \"<pre>\";print_r($response);echo \"</pre>\";die();\n\n if($response && isset($response['status']) && $response['status']){\n $cost = $response['data']['QuoteCarrierOptions'][0]['CarrierOption'][0]['QuoteAmount'] + $cost;\n }elseif(isset($response['error'])){\n $message = sprintf(isset($response['error']['ErrorMessage'])?$response['error']['ErrorMessage']:'Error in FreightQuote Api');\n $messageType = \"error\";\n \n if( ! wc_has_notice( $message, $messageType ) ) {\n wc_add_notice( $message, $messageType );\n }\n }\n }\n\n if($cost){\n\n $rate = array(\n 'id' => $this->id,\n 'label' => $this->title,\n 'cost' => $cost\n );\n \n $this->add_rate( $rate );\n }\n }\n\n \n }", "private function fee_list(){\n $results = $this->dt->fee_list();\n echo $results;\n }", "abstract public function getMonthlyFee();", "public function fees() {\n\n return $this->hasOne(Fee::class);\n }", "protected function get_default_fee_props()\n {\n }", "public function getLeaguefees()\n\t{\n\t\treturn $this->leaguefees;\n\t}", "public static function get_recurring_fees() {\n\t\tglobal $woocommerce;\n\n\t\treturn isset( $woocommerce->cart->recurring_fees ) ? $woocommerce->cart->recurring_fees : array();\n\t}", "function get_transaction_fee($amount,$via)\n{\n\tif ($via=='') return 0.0;\n\tif ($via=='manual') return 0.0;\n\n\tif ((file_exists(get_file_base().'/sources/hooks/systems/ecommerce_via/'.$via.'.php')) || (file_exists(get_file_base().'/sources_custom/hooks/systems/ecommerce_via/'.$via.'.php')))\n\t{\n\t\trequire_code('hooks/systems/ecommerce_via/'.filter_naughty_harsh($via));\n\t\t$object=object_factory('Hook_'.$via);\n\t\treturn $object->get_transaction_fee($amount);\n\t}\n\n\treturn 0.0;\n}", "public function add_invoice_fee() {\n\t\t$current_gateway = WC_Gateway_Svea_Helper::get_current_gateway();\n\n\t\tif( ! $current_gateway ||\n\t\t\tget_class( $current_gateway ) != \"WC_Gateway_Svea_Invoice\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tWC_Gateway_Svea_Invoice::init()->add_invoice_fee();\n\t}", "public function getFeeItems()\n {\n return isset($this->feeItems) ? $this->feeItems : null;\n }", "public function getShippingFee()\n {\n $line = OrdersLinesQuery::create()\n ->filterByType('shipping.fee')\n ->filterByOrdersId($this->getId())\n ->findOne($this->getDBConnection());\n\n if ($line instanceof OrdersLines) {\n return $line->getPrice();\n }\n\n return 0.00;\n }", "function print_messages_for_calculated_shipping( $package ){\n\t$data = array();\n\n\t$restaurant_id \t\t\t\t\t= array_values( $package[\"contents\"])[0][\"data\"]->post->post_author;\n\n\tif( !$restaurant_id ){\n\t\t$data[\"limit\"] = __(\"Add a product to your cart to get a delivery fee.\", THEME_NAME);\n\n\t\treturn $data;\n\t}\n\n\t$shipping_id \t\t= get_field( \"dms_restaurant_shipping\", \"user_\" . $restaurant_id );\n\t$problem \t\t\t= get_field( \"dms_shipping_problem\", $shipping_id );\n\n\tif( $problem ){\n\t\t$problem_text \t= get_field( \"dms_shipping_problem_text\", $shipping_id );\n\t\t$data[\"limit\"] \t= $problem_text;\n\n\t\treturn $data;\n\t}\n\n\t$is_closed = check_restaurant_closed( $restaurant_id, $package );\n\tif( $is_closed ){\n\t\t$data[\"limit\"] = $is_closed[\"label\"];\n\n\t\treturn $data;\n\t}\n\n\trequire_once WP_PLUGIN_DIR . \"/woocommerce-distance-rate-shipping/includes/class-wc-shipping-distance-rate.php\";\n\t$distance_rate_class \t\t\t= new WC_Shipping_Distance_Rate();\n\n\t$center \t\t\t\t\t\t= get_field( \"dms_shipping_center\", $shipping_id );\n\t$radius \t\t\t\t\t\t= floatval( get_field( \"dms_shipping_radius\", $shipping_id ) );\n\t$sections \t\t\t\t\t\t= get_field( \"dms_shipping_section\", $shipping_id );\n\n\t$address_origin \t\t\t\t= $distance_rate_class->get_shipping_address_string( $package );\n\t$address_destination \t\t\t= $distance_rate_class->get_customer_address_string( $package );\n\n\t$rounding_precision \t\t\t= apply_filters( 'woocommerce_distance_rate_shipping_distance_rounding_precision', 1 );\n\n\t// CHECK IF CLIENT IN ZONE AND SAVE DISTANCE BETWEEN CLIENT AND CENTRAL\n\t$in_limit \t\t\t\t\t\t= false;\n\n\t$limit_distance \t\t\t\t= $distance_rate_class->get_api()->get_distance( $address_destination, $center, false, 'driving', 'none', 'metric' );\n\n\tif ( ! isset( $limit_distance->rows[0] ) || 'OK' !== $limit_distance->rows[0]->elements[0]->status ) {\n\t\t$data[\"limit\"] = __(\"We couldn't find your address. Please, try to write it more specifically.\");\n\n\t\treturn $data;\n\t}\n\n\t$limit_distance_value \t\t\t= $limit_distance->rows[0]->elements[0]->distance->value;\n\t$limit_distance \t\t\t\t= round( $limit_distance_value / 1000, $rounding_precision );\n\n\tif( $limit_distance <= $radius ){\n\t\t$in_limit = true;\n\t}\n\n\t$sugest_area_link = get_permalink( 3788 );\n\n\tif( !$in_limit ){\n\t\t// $data[\"limit\"] = __(\"We don't deliver to your address, but you can pick up your order at the restaurant. <a href='%s' target='_blank'>Tell us if you want a delivery to your area.</a>\", THEME_NAME);\n\t\t$data[\"limit\"] = sprintf( __( \"We don't deliver to your address, but you can pick up your order at the restaurant. <a href='%s' target='_blank'>Tell us if you want a delivery to your area.</a>\", THEME_NAME ), $sugest_area_link );\n\t\treturn $data;\n\t}\n\n\t$restaurant_map \t\t\t\t= get_field( \"dms_restaurant_map\", \"user_\" . $restaurant_id );\n\t$restaurant_latlng \t\t\t\t= $restaurant_map[\"lat\"] . \",\" . $restaurant_map[\"lng\"];\n\n\t// SAVE DISTANCE BETWEEN CLIENT AND RESTAURANT\n\t$distance \t\t\t\t\t\t= $distance_rate_class->get_api()->get_distance( $address_origin, $address_destination, false, 'driving', 'none', 'metric' );\n\n\tif ( ! isset( $distance->rows[0] ) || 'OK' !== $distance->rows[0]->elements[0]->status ) {\n\t\t$data[\"limit\"] = __(\"We couldn't find your address. Please, try to write it more specifically.\", THEME_NAME);\n\n\t\treturn $data;\n\t}\n\n\t$distance_text \t\t\t\t\t= ' (' . $distance->rows[0]->elements[0]->distance->text . ')';\n\t$distance_value \t\t\t\t= $distance->rows[0]->elements[0]->distance->value;\n\t$distance \t\t\t\t\t\t= round( $distance_value / 1000, $rounding_precision );\n\n\t// SAVE DISTANCE BETWEEN CENTRAL AND RESTAURANT\n\t$restaurant_distance \t\t\t= $distance_rate_class->get_api()->get_distance( $center, $address_origin, false, 'driving', 'none', 'metric' );\n\n\tif ( ! isset( $restaurant_distance->rows[0] ) || 'OK' !== $restaurant_distance->rows[0]->elements[0]->status ) {\n\t\t$data[\"limit\"] = __(\"We couldn't find your address. Please, try to write it more specifically.\", THEME_NAME);\n\n\t\treturn $data;\n\t}\n\n\t$restaurant_distance_value \t\t= $restaurant_distance->rows[0]->elements[0]->distance->value;\n\t$restaurant_distance \t\t\t= round( $restaurant_distance_value / 1000, $rounding_precision );\n\n\t$distance \t\t\t\t\t\t+= $restaurant_distance + $limit_distance;\n\n\t// CHECK DISTANCE FOR PRICE\n\t$order_cost = 0;\n\tforeach ( $package[\"contents\"] as $product ) {\n\t\t$order_cost += $product[\"line_total\"];\n\t}\n\n\tforeach ( $sections as $key => $rule ) {\n\n\t\tif( $rule_found ){\n\t\t\tcontinue;\n\t\t}\n\n\t\t$min_match = false;\n\t\t$max_match = false;\n\t\t$shipping_cost = null;\n\n\t\t$rule_distance_min \t= ( isset( $rule['dms_section_distance_minimum'] ) ) ? floatval( $rule['dms_section_distance_minimum'] ) : false;\n\t\t$rule_distance_max \t= ( isset( $rule['dms_section_distance_maximum'] ) ) ? floatval( $rule['dms_section_distance_maximum'] ) : false;\n\n\t\tif ( !$rule_distance_min || $distance >= $rule_distance_min ) {\n\t\t\t$min_match = true;\n\t\t}\n\n\t\tif ( !$rule_distance_max || $distance <= $rule_distance_max ) {\n\t\t\t$max_match = true;\n\t\t}\n\n\t\tif ( $min_match && $max_match ) {\n\n\t\t\t$rule_price_free = ( isset( $rule['dms_section_free'] ) ) ? floatval( $rule['dms_section_free'] ) : false;\n\t\t\t$rule_price_min = ( isset( $rule['dms_section_order'] ) ) ? floatval( $rule['dms_section_order'] ) : false;\n\n\t\t\tif( $rule_price_free && $order_cost < $rule_price_free ){\n\t\t\t\t$data[\"price_free\"] = sprintf( __( \"Free delivery on orders above %s€. Add %s€ to get free delivery.\", THEME_NAME ), $rule_price_free, ( $rule_price_free - $order_cost ) );\n\t\t\t}\n\n\t\t\tif ( $rule_price_min && $order_cost < $rule_price_min ) {\n\t\t\t\t$data[\"price_min\"] = sprintf( __( \"Minimum order cost to get a delivery service is %s€\", THEME_NAME ), $rule_price_min );\n\t\t\t}\n\n\t\t\t$rule_found = true;\n\t\t}\n\t}\n\n\tif( !$rule_found ){\n\n\t\tif( $distance >= $rule_distance_max ){\n\t\t\t// $data[\"limit\"] = __(\"We don't deliver to your address, choose a place nearer to the restaurant. Or you can pick up your order at the restaurant.\", THEME_NAME);\n\t\t\t$data[\"limit\"] = sprintf( __( \"We don't deliver to your address, choose a place nearer to the restaurant. Or you can pick up your order at the restaurant. <a href='%s' target='_blank'>Tell us if you want a delivery to your area.</a>\", THEME_NAME ), $sugest_area_link );\n\t\t}\n\n\t\tif( $distance <= $rule_distance_min ){\n\t\t\t$data[\"limit\"] = __(\"MIN: We don't deliver to your address, but you can pick up your order at the restaurant.\", THEME_NAME);\n\t\t}\n\n\t\tif( $order_cost == 0 ){\n\t\t\t$data[\"limit\"] = __(\"Add a product to your cart to get a delivery fee.\", THEME_NAME);\n\t\t}\n\t}\n\n\treturn $data;\n}", "private function best_with_fee( $installments, $product ) {\n\n $hook = self::hook();\n\n $best_with_fee = end( $installments );\n\n if ( false === $best_with_fee ) {\n return;\n }\n\n if ( 'main_price' == $hook ) {\n $text = self::$exibicao_texto_formatado_main_price;\n } else {\n $text = self::$exibicao_texto_formatado_loop;\n }\n\n $find = array_keys( self::strings_to_replace( $best_with_fee ) );\n $replace = array_values( self::strings_to_replace( $best_with_fee ) );\n $text = str_replace( $find, $replace, $text );\n\n return '<span class=\"wc-simulador-parcelas-parcelamento-info best-value ' . $best_with_fee['class'] . '\">' . apply_filters( 'wcsp_best_with_fee_' . $hook, $text, $best_with_fee, $product ) . '</span>';\n\n }", "public function display_fee( $referrals_total, $data ) {\n\n\t\tif ( empty( $data ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$body_args = array(\n\t\t\t'payout_data' => $data,\n\t\t\t'currency' => affwp_get_currency(),\n\t\t\t'affwp_version' => AFFILIATEWP_VERSION,\n\t\t);\n\n\t\t$vendor_id = affiliate_wp()->settings->get( 'payouts_service_vendor_id', 0 );\n\t\t$access_key = affiliate_wp()->settings->get( 'payouts_service_access_key', '' );\n\n\t\t$headers = array(\n\t\t\t'Authorization' => 'Basic ' . base64_encode( $vendor_id . ':' . $access_key ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'body' => $body_args,\n\t\t\t'headers' => $headers,\n\t\t\t'timeout' => 60,\n\t\t\t'sslverify' => false,\n\t\t);\n\n\t\t$request = wp_remote_get( PAYOUTS_SERVICE_URL . '/wp-json/payouts/v1/fee', $args );\n\n\t\t$response_code = wp_remote_retrieve_response_code( $request );\n\t\t$response = json_decode( wp_remote_retrieve_body( $request ) );\n\n\t\tif ( ! is_wp_error( $request ) && 200 === (int) $response_code ) {\n\n\t\t\t$payout_service_fee = $response->payout_service_fee;\n\t\t\t$payout_total = $referrals_total + $payout_service_fee;\n\n\t\t} else {\n\n\t\t\t$payout_total = $referrals_total;\n\t\t\t$payout_service_fee = __( 'Can&#8217;t retrieve Payouts Service fee at the moment', 'affiliate-wp' );\n\n\t\t}\n\n\t\t?>\n\n\t\t<tr class=\"form-row\">\n\n\t\t\t<th scope=\"row\">\n\t\t\t\t<?php esc_html_e( 'Payouts Service Fee', 'affiliate-wp' ); ?>\n\t\t\t</th>\n\n\t\t\t<td>\n\t\t\t\t<?php if ( is_numeric( $payout_service_fee ) ) : ?>\n\t\t\t\t\t<?php echo affwp_currency_filter( affwp_format_amount( $payout_service_fee ) ); ?>\n\t\t\t\t<?php else : ?>\n\t\t\t\t\t<?php echo esc_attr( $payout_service_fee ); ?>\n\t\t\t\t<?php endif; ?>\n\t\t\t</td>\n\n\t\t</tr>\n\n\t\t<tr class=\"form-row\">\n\n\t\t\t<th scope=\"row\">\n\t\t\t\t<?php echo esc_html( _x( 'Total', 'Total amount for a Payouts Service payout', 'affiliate-wp' ) ); ?>\n\t\t\t</th>\n\n\t\t\t<td>\n\t\t\t\t<?php echo affwp_currency_filter( affwp_format_amount( $payout_total ) ); ?>\n\t\t\t</td>\n\n\t\t</tr>\n\n\t\t<?php\n\n\t}", "public function setFeesTotal($var)\n {\n GPBUtil::checkString($var, True);\n $this->fees_total = $var;\n\n return $this;\n }", "public function get_fee($fee, $total)\n {\n }", "public function displayfees() {\n \t$this->fmresult = $this->common_model->get_list('fees_master');\n\t $this->logger->write_logmessage(\"view\",\" View fees list head wise\", \"Fees setting details...\");\n \t$this->logger->write_dblogmessage(\"view\",\" View fees list head wise\", \"Fees setting details...\");\n\t $this->load->view('setup/displayfees');\n }", "public function getSponsorFees()\n {\n return $this->sponsor_fees;\n }", "public function fee(): Collection\n {\n return $this->get('api/signatures/fee');\n }", "public function test_FormatInvoiceFeeRows_includes_all_attributes_in_formatted_rows()\n {\n $config = ConfigurationService::getDefaultConfig();\n $order = WebPay::createOrder($config);\n $order->addFee(WebPayItem::invoiceFee()\n ->setName(\"Tess\")\n ->setDescription(\"Tester\")\n ->setAmountExVat(4)\n ->setVatPercent(25)\n ->setUnit(\"st\")\n );\n\n $formatter = new WebServiceRowFormatter($order);\n $resultRows = $formatter->formatRows();\n $testedRow = $resultRows[0];\n\n $this->assertEquals(\"\", $testedRow->ArticleNumber);\n $this->assertEquals(\"Tess: Tester\", $testedRow->Description);\n $this->assertEquals(4.0, $testedRow->PricePerUnit);\n $this->assertEquals(25.0, $testedRow->VatPercent);\n $this->assertEquals(0, $testedRow->DiscountPercent);\n $this->assertEquals(1, $testedRow->NumberOfUnits);\n $this->assertEquals(\"st\", $testedRow->Unit);\n }", "public function getPaymentFeeArray ( $paymentcode, $quote )\n\t{\n\t \n\t\t$inctax = Mage::getStoreConfig( 'cgp/' . $paymentcode . '/payment_fee_inc_ex' );\n\t\t$paymentfee = Mage::getStoreConfig( 'cgp/' . $paymentcode . '/payment_fee' );\n\t\t$paymentfee_taxclass = Mage::getStoreConfig( 'cgp/' . $paymentcode . '/payment_fee_tax' );\n\t\t\n\t\tif ( $paymentfee == '' ) {\n\t\t\tMage::getSingleton( 'core/session' )->setCgpFeeInc( 0 );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$order_total = 0;\n\t\tforeach ( $quote->getAllAddresses() as $address ) {\n\t\t // YYY : getDiscountAmount is negative..\n\t\t $order_total+= ( $address->getSubtotalInclTax() + $address->getDiscountAmount() );\n\t\t}\n\t\t\n\t\t$paymentfee = str_replace(\",\", \".\", $paymentfee);\n\t\t$percentage = 0;\n\t\tif ( strpos( $paymentfee, ';' ) > 0 ) {\n\t\t\t$fees = explode( \";\", $paymentfee );\n\t\t\t$charge = 0;\n\t\t\tif ( $fees[0] > 0 ) {\n\t\t\t\t$charge += $fees[0];\n\t\t\t} else {\n\t\t\t $percentage = ( ( $fees[0] * - 1 ) / 100.0 );\n\t\t\t\t$charge += $order_total * ( ( $fees[0] * - 1 ) / 100.0 );\n\t\t\t}\n\t\t\t\n\t\t\tif ( $fees[1] > 0 ) {\n\t\t\t\t$charge += $fees[1];\n\t\t\t} else {\n\t\t\t $percentage = ( ( $fees[1] * - 1 ) / 100.0 );\n\t\t\t\t$charge += $order_total * ( ( $fees[1] * - 1 ) / 100.0 );\n\t\t\t}\n\t\t} elseif ( $paymentfee > 0 ) {\n\t\t\t$charge = $paymentfee;\n\t\t} elseif ( $paymentfee < 0 ) {\n\t\t $percentage = ( ( $paymentfee * - 1 ) / 100.0 );\n\t\t\t$charge = $order_total * ( ( $paymentfee * - 1 ) / 100.0 );\n\t\t}\n\t\t\n\t\t// YYY: Apply percentage on total charge too\n\t\tif ( $percentage > 0 ) {\n\t\t $charge = $charge + ( $charge * $percentage );\n\t\t}\n\t\t\n\t\t$address = $quote->getShippingAddress();\n\t\t$taxClassId = $quote->getCustomerTaxClassId();\n\t\t\n\t\t$store = Mage::app()->getStore();\n\t\t$calc = Mage::getSingleton( 'tax/calculation' );\n\t\t$rateRequest = $calc->getRateRequest( $address, $address, $taxClassId, $store );\n\t\t$rateRequest->setProductClassId( $paymentfee_taxclass );\n\t\t$rate = $calc->getRate( $rateRequest );\n\t\t\n\t\tif ( $inctax == '1' ) {\n\t\t\t$value = $calc->calcTaxAmount( $charge, $rate, true, false );\n\t\t\t$excl = ( $charge - $value );\n\t\t\t$feeArray = array( \n\t\t\t\t\t'excl' => $excl, \n\t\t\t\t\t'base_excl' => $this->calcBaseValue( $excl ), \n\t\t\t\t\t'incl' => $charge, \n\t\t\t\t\t'base_incl' => $this->calcBaseValue( $charge ), \n\t\t\t\t\t'taxamount' => $value, \n\t\t\t\t\t'base_taxamount' => $this->calcBaseValue( $value ), \n\t\t\t\t\t'rate' => $rate \n\t\t\t);\n\t\t} else {\n\t\t\t// Fee entered without tax\n\t\t\t$value = $calc->calcTaxAmount( $charge, $rate, false, false );\n\t\t\t$incl = ( $charge + $value );\n\t\t\t\n\t\t\t$feeArray = array( \n\t\t\t\t\t'excl' => $charge, \n\t\t\t\t\t'base_excl' => $this->calcBaseValue( $charge ), \n\t\t\t\t\t'incl' => $incl, \n\t\t\t\t\t'base_incl' => $this->calcBaseValue( $incl ), \n\t\t\t\t\t'taxamount' => $value, \n\t\t\t\t\t'base_taxamount' => $this->calcBaseValue( $value ), \n\t\t\t\t\t'rate' => $rate \n\t\t\t);\n\t\t}\n\t\t\n\t\tMage::getSingleton( 'core/session' )->setCgpFeeInc( $feeArray['incl'] );\n\t\t\n\t\treturn $feeArray;\n\t}", "private function getFeeByProductType()\n {\n return 0;\n }", "public function fee(){\n return 0;\n }", "public function edit(Fees $fees)\n {\n //\n }", "public function processRemoveData()\n {\n\n $order = $this->getOrder();\n if (!$order) {\n //something wrong with order, go ahead and allow removal\n return true;\n }\n\n if ($order->getStatus() == 'active' || $this->getStatus() == 'active') {\n //order is active, so custom fees paid for, so allow removal.\n return true;\n }\n if ($order->getAdmin()) {\n //Go ahead and let admin orders disapear...\n return true;\n }\n\n if ($order->get('custom_admin_fee')) {\n //this is special order, update the time on it\n $order->setCreated(geoUtil::time());\n\n $this->setCreated(geoUtil::time());\n\n $order->save();\n } else {\n //move this order item over to a custom admin fee order item!\n //find an order that is specifically for admin custom fees for this user.\n $db = DataAccess::getInstance();\n $sql = \"SELECT o.`id` FROM \" . geoTables::order . \" as o, \" . geoTables::order_registry . \" as oreg WHERE o.`buyer` = ? AND o.`admin` = 0 AND o.`status` = 'pending' AND oreg.order=o.id AND oreg.index_key = 'custom_admin_fee' AND oreg.val_string = '1' LIMIT 1\";\n $row = $db->GetRow($sql, array($listing->seller));\n\n $nOrder = false;\n if (isset($row['id']) && $row['id']) {\n $nOrder = geoOrder::getOrder($row['id']);\n }\n\n if (!$nOrder || !is_object($nOrder)) {\n $nOrder = new geoOrder();\n //identify itself as being for final fees only\n $nOrder->set('custom_admin_fee', '1');\n $nOrder->setSeller(0);\n $nOrder->setBuyer($order->getBuyer());\n $nOrder->setCreated(geoUtil::time());\n $nOrder->setStatus('pending');\n //make sure it has an id to attach to\n $nOrder->save();\n }\n $this->setOrder($nOrder);\n $nOrder->addItem($this);\n $nOrder->save();\n }\n return false;\n }", "private function provideTaskFeesBudget()\n {\n $projects = [];\n foreach ($this->billingTypes as $billingType) {\n $projects[\"task_fees + {$billingType}.json\"] = [\n \"task-fees-{$billingType}.json\",\n [\n 'Graphic Design' => ['rate' => 45000 / 77.13, 'hours' => 77.13, 'revenue' => 45000],\n 'Marketing' => ['rate' => 20000 / 27.5, 'hours' => 27.5, 'revenue' => 20000],\n 'Project Management' => ['rate' => 0, 'hours' => 13.17, 'revenue' => 0],\n 'Business Development' => ['rate' => 0, 'hours' => 2.1, 'revenue' => 0],\n ],\n ];\n }\n return $projects;\n }", "public function update_fee($item, $args)\n {\n }", "public function getHandlingFee()\n {\n return $this->handling_fee;\n }", "public function getHandlingFee()\n {\n return $this->handling_fee;\n }", "public function getTotalFee()\n {\n return $this->total_fee;\n }", "public function fee(): array\n {\n return $this->get('signatures/fee');\n }", "function display_fields_for_email(){\r\n\r\n\t\tadd_filter( 'woocommerce_email_order_meta_fields', [$this,'display_after_email_item_details'],10, 3 );\r\n\t}", "function mje_get_price_mjob_order_for_buyer($subtotal, $request){\n\n\t$subtotal = (float) $subtotal;\n\t$discount_amount = mje_get_discount_amount($subtotal, $request);\n\t$discount_amount = min( $subtotal, $discount_amount );\n\t$amount_after_discount = $subtotal - $discount_amount; //>=0;\n\n\t$commission_fee = mje_get_commission_amount_for_buyer($subtotal);\n\t$total = $amount_after_discount + $commission_fee;\n\n\treturn apply_filters('mje_get_total_mjob_order', $total, $subtotal); //@since 1.3.7.5 apply extra fee extension on this hook\n}", "public function getPaymentFee()\n {\n $line = OrdersLinesQuery::create()\n ->filterByType('payment.fee')\n ->filterByOrdersId($this->getId())\n ->findOne($this->getDBConnection());\n\n if ($line instanceof OrdersLines) {\n return $line->getPrice();\n }\n\n return 0.00;\n }", "public function get_fees_items($term = \"\", $year = \"\", $class = \"\", $student = \"\")\n {\n //Get a fee structure for the class, term and year\n $fees = $this -> db -> get_where('fees_structure', array(\"term\" => $term, \"yr\" => $year, \"class_id\" => $class));\n\n //Initialize creating a table body content of the single invoice payment information table\n $body = \"\";\n\n //Create rows of the fees_items table body if fee structure exists else give a not found message in the table body\n if ($fees -> num_rows() > 0) {\n //Get the primary key of the fees structure\n $fees_id = $fees -> row() -> fees_id;\n\n //Return the fee structure details of the id above\n $details_object = $this -> db -> get_where('fees_structure_details', array(\"fees_id\" => $fees_id));\n\n //Check if the fee structure has details else return items not found in the table body\n if ($details_object -> num_rows() > 0) {\n $details = $details_object -> result_object();\n\n //Check if there is unpaid invoice for the student in the fee structure term and year\n $invoice = $this -> db -> get_where('invoice',\n array('student_id' => $student, 'yr' => $year, 'term' => $term,'status'=>'unpaid'));\n\n $invoice_count = $invoice -> num_rows();\n\n if ($invoice_count === 0) {\n foreach ($details as $row) :\n $amount = $row -> amount;\n $detail_id = $row -> detail_id;\n $detail_name = $row -> name;\n $body .= $this->create_invoice_detail_row($year,$term,$class,$student,$detail_id,$detail_name,$amount);\n endforeach;\n } else {\n\n // Error td when student has an invoice unpaid in the fee structure term and year\n // Will never run since the invoice create form filters out such students\n $body .= \"<tr><td colspan='5' style='text-align:center;color:red;'>\" . get_phrase('student_already_has_an_invoice_in_the_term') . \"</td></tr>\";\n }\n }else{\n // Error td when fee structure lacks details\n // Will never run since invoice without details are restricted\n $body .= \"<tr><td colspan='5' style='text-align:center;color:red;'>\" . get_phrase('fee_structure_lacks_details') . \"</td></tr>\";\n }\n } else {\n $body .= \"<tr><td colspan='5' style='text-align:center;color:red;'>\" . get_phrase('fee_structure_is_missing') . \"</td></tr>\";\n }\n\n echo $body;\n }", "function fetch_product_bidder_escrow_fee_plus_tax($userid = 0, $amount = 0)\n{\n global $ilance, $myapi, $ilconfig;\n \n $fee = 0;\n if ($ilconfig['escrowsystem_escrowcommissionfees'])\n {\n $ilance->tax = construct_object('api.tax');\n \n // escrow commission fees to auction owner enabled\n if ($ilconfig['escrowsystem_bidderfixedprice'] > 0)\n {\n // fixed escrow cost to provider for release of funds\n $fee = $ilconfig['escrowsystem_bidderfixedprice'];\n }\n else\n {\n if ($ilconfig['escrowsystem_bidderpercentrate'] > 0)\n {\n // percentage rate of total winning bid amount\n // which would be the same as the amount being forwarded into escrow\n $fee = ($amount * $ilconfig['escrowsystem_bidderpercentrate'] / 100);\n }\n }\n \n if ($fee > 0)\n {\n $taxamount = 0;\n if ($ilance->tax->is_taxable(intval($userid), 'commission'))\n {\n // fetch tax amount to charge for this invoice type\n $taxamount = $ilance->tax->fetch_amount(intval($userid), $fee, 'commission', 0);\n }\n \n // exact amount to charge provider for release of funds\n $fee = ($fee + $taxamount);\n }\n }\n \n return sprintf(\"%01.2f\", $fee);\n}", "function wc_get_email_order_items($order, $args = array())\n {\n }", "public function getFormattedFeeAttribute()\n {\n return money($this->amount, $this->currency);\n }", "private function best_no_fee( $installments, $product ) {\n\n $hook = self::hook();\n\n foreach ( $installments as $key => $installment ) {\n if ( 'no-fee' != $installment['class'] ) {\n unset( $installments[ $key ] );\n }\n }\n\n $best_no_fee = end( $installments );\n\n if ( false === $best_no_fee ) {\n return;\n }\n\n if ( 'main_price' == $hook ) {\n $text = self::$exibicao_texto_formatado_main_price;\n } else {\n $text = self::$exibicao_texto_formatado_loop;\n }\n\n $find = array_keys( self::strings_to_replace( $best_no_fee ) );\n $replace = array_values( self::strings_to_replace( $best_no_fee ) );\n $text = str_replace( $find, $replace, $text );\n\n return '<span class=\"wc-simulador-parcelas-parcelamento-info best-value ' . $best_no_fee['class'] . '\">' . apply_filters( 'wcsp_best_no_fee_' . $hook, $text, $best_no_fee, $product ) . '</span>';\n\n }", "public function getFee() {\n\tif ($this->fee === null)\n\t\treturn 100 * count($this->operations);\n\n\treturn $this->fee;\n}", "public function settings_setup_fee( $field, $echo = true ) {\r\n\r\n\t\t// Prepare checkbox field settings.\r\n\t\t$enabled_field = array(\r\n\t\t\t'name' => $field['name'] . '_checkbox',\r\n\t\t\t'type' => 'checkbox',\r\n\t\t\t'horizontal' => true,\r\n\t\t\t'choices' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'label' => esc_html__( 'Enabled', 'gravityformsstripe' ),\r\n\t\t\t\t\t'name' => $field['name'] . '_enabled',\r\n\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t'onchange' => \"if(jQuery(this).prop('checked')){\r\n\t\t\t\t\t\tjQuery('#{$field['name']}_product').prop('disabled', false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tjQuery('#{$field['name']}_product').prop('disabled', true);\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// Get checkbox field markup.\r\n\t\t$html = $this->settings_checkbox( $enabled_field, false );\r\n\r\n\t\t// Get current form.\r\n\t\t$form = $this->get_current_form();\r\n\r\n\t\t// Get enabled state.\r\n\t\t$is_enabled = $this->get_setting( \"{$field['name']}_enabled\" );\r\n\r\n\t\t// Prepare setup fee select field settings.\r\n\t\t$product_field = array(\r\n\t\t\t'name' => $field['name'] . '_product',\r\n\t\t\t'type' => 'select',\r\n\t\t\t'choices' => $this->get_payment_choices( $form ),\r\n\t\t);\r\n\r\n\t\tif ( ! $is_enabled ) {\r\n\t\t\t$product_field['disabled'] = 'disabled';\r\n\t\t}\r\n\r\n\t\t// Add select field markup to checkbox field markup.\r\n\t\t$html .= '&nbsp' . $this->settings_select( $product_field, false );\r\n\r\n\t\t// Echo setting markup, if enabled.\r\n\t\tif ( $echo ) {\r\n\t\t\techo $html;\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\r\n\t}" ]
[ "0.67527866", "0.6701951", "0.67003137", "0.6540119", "0.6529971", "0.6515422", "0.6457328", "0.6457328", "0.641536", "0.6377136", "0.6359855", "0.62359416", "0.6214494", "0.6140636", "0.6102948", "0.6054337", "0.60519403", "0.59735036", "0.59560245", "0.5910496", "0.5879159", "0.58297515", "0.58127326", "0.5800092", "0.5782039", "0.5782039", "0.57795805", "0.57784456", "0.5774173", "0.57712287", "0.57560164", "0.57493114", "0.5745849", "0.5740904", "0.5740904", "0.57400435", "0.5738835", "0.5720019", "0.5714458", "0.568853", "0.56871814", "0.56802016", "0.5675423", "0.56588167", "0.5649062", "0.5630558", "0.55577666", "0.55481714", "0.5538877", "0.5519844", "0.5518293", "0.55178756", "0.54964066", "0.54633194", "0.5450955", "0.54493415", "0.5426139", "0.541932", "0.5416217", "0.5405835", "0.54033405", "0.53693503", "0.53658444", "0.53547937", "0.53538173", "0.53534263", "0.53521436", "0.533714", "0.53332824", "0.53306717", "0.5328627", "0.5326919", "0.5321655", "0.53162724", "0.5302533", "0.5300256", "0.52984613", "0.5295779", "0.52888834", "0.5272524", "0.52555215", "0.5215579", "0.5213292", "0.52081954", "0.5197697", "0.5196656", "0.51880926", "0.51880926", "0.5187473", "0.51759374", "0.5167165", "0.51577526", "0.51468873", "0.51341057", "0.5123455", "0.5120234", "0.51170564", "0.51142424", "0.51006234", "0.5099636" ]
0.8504394
0
woocommerce_pip_user_access function. Helper function to check access rights. Support for 1.6.6 and 2.0.
Функция woocommerce_pip_user_access. Вспомогательная функция для проверки прав доступа. Поддержка версий 1.6.6 и 2.0.
function woocommerce_pip_user_access() { $access = ( current_user_can( 'edit_shop_orders' ) || current_user_can( 'manage_woocommerce_orders' ) ) ? false : true; return $access; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wc_rest_check_user_permissions($context = 'read', $object_id = 0)\n {\n }", "private function updateAccessAllowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n }", "function userCanAccess() {\n $role = getUserRole();\n return $role === 'admin' || $role === 'ordinary';\n}", "function lh_checkAccess($accessRole = 0) {\n\t$showAccessDeniedPage = FALSE;\n\t$ci =& get_instance();\n\t$ci->load->model ( 'user_model' );\n\n\t//check logged in users\n\tif($accessRole >= 0){\n\t\tif(lh_isUserLoggedin() == FALSE){\n\t\t\t$showAccessDeniedPage = TRUE;\n\t\t}\n\t}\n\n\t//User Roles\n\t//1 = Admin\n\t//2 = Besteller\n\t//3 = Fotograf\n\t//4 = Veranstalter ! KEINE ROLLE! -.-\n\n\t//check if user is Photograph\n\tif($accessRole == 1){\n\t\tif($ci->session->userdata('user_role') != 1 && $ci->session->userdata('user_role') != 3){\n\t\t\t$showAccessDeniedPage = TRUE;\n\t\t}\n\n\t}\n\n\tif($accessRole == 2){\n\t\tif($ci->session->userdata('user_role') != 1 ){\n\t\t\t$showAccessDeniedPage = TRUE;\n\t\t}\n\t}\n\n\tif($showAccessDeniedPage){\n\t\techo $ci->load->template ( 'errors/html/error_access', array(), true );\n\n\t\texit();\n\t}\n}", "function fn_check_user_access($user_id, $permission)\n{\n static $user_access = array();\n $user_id = (int) $user_id;\n\n if ($user_id <= 0) {\n return false;\n }\n\n if (fn_allowed_for('ULTIMATE:FREE')) {\n return true;\n }\n\n if (!isset($user_access[$user_id])) {\n $sql = <<<SQL\nSELECT ?:usergroup_privileges.privilege\n FROM ?:usergroup_links\n LEFT JOIN ?:usergroup_privileges ON (?:usergroup_privileges.usergroup_id = ?:usergroup_links.usergroup_id)\n WHERE ?:usergroup_links.user_id = ?i AND ?:usergroup_links.status = ?s\nSQL;\n $user_access[$user_id] = db_get_fields($sql, $user_id, 'A');\n }\n\n if (empty($user_access[$user_id]) || in_array($permission, $user_access[$user_id])) {\n return true;\n }\n\n return false;\n}", "function checkAccessRight(){\r\n \t$res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*',$this->personTable,'feuser_id='.intval($GLOBALS['TSFE']->fe_user->user['uid']));\r\n \tif($res[0]['publadmin'] || $this->person['feuser_id']==intval($GLOBALS['TSFE']->fe_user->user['uid'])){\r\n \t\treturn true;\r\n \t}else{\r\n \t\treturn false;\r\n \t}\r\n }", "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "function leadify_user_access() {\r\n\r\n\t\t\tif ( is_user_logged_in() ) {\r\n\t\t\t\tif ( current_user_can( 'manage_options' ) ) {\r\n\r\n\t\t\t\t\tglobal $wp_roles;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//$wp_user_name\t:[administrator] => Administrator [editor] => Editor [author] => Author [contributor] => Contributor [subscriber] => Subscriber )\r\n\t \t\t\t\t$wp_user_name = $wp_roles->get_names();\r\n\t \t\t\t\t$roles = false;\r\n\t \t\t\t\tif(!$roles) {\r\n\t \t\t\t\t\t$roles = array();\r\n\t \t\t\t\t}\r\n\r\n\t \t\t\t\t// give access to administrator\r\n\t \t\t\t\t$roles[] = 'administrator';\r\n\r\n\t \t\t\t\tforeach ( $wp_user_name as $key => $value ) {\r\n\t \t\t\t\t\t$role = get_role( $key );\r\n\r\n\t \t\t\t\t\tif ( in_array( $key, $roles ) ) {\r\n\t \t\t\t\t\t\t//adds user capability\r\n\t \t\t\t\t\t\t$role->add_cap( 'leadify_access' );\r\n\t \t\t\t\t\t} else {\r\n\t \t\t\t\t\t\t$role->remove_cap( 'leadify_access' );\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}", "function check_access($userid = 0, $accessname = '')\n\t{\n\t\tglobal $ilance;\n\t\t$value = 'no';\n\t\t$userid = isset($userid) ? intval($userid) : 0;\n\t\tif ($userid > 0 AND !empty($accessname))\n\t\t{\n\t\t\t$sql = $ilance->db->query(\"\n\t\t\t\tSELECT user.subscriptionid, user.user_id, sub.subscriptiongroupid, perm.value\n\t\t\t\tFROM \" . DB_PREFIX . \"subscription_user user\n\t\t\t\tLEFT JOIN \" . DB_PREFIX . \"subscription sub ON (sub.subscriptionid = user.subscriptionid)\n\t\t\t\tLEFT JOIN \" . DB_PREFIX . \"subscription_permissions perm ON (perm.subscriptiongroupid = sub.subscriptiongroupid)\n\t\t\t\tWHERE user.user_id = '\" . intval($userid) . \"'\n\t\t\t\t\tAND sub.active = 'yes'\n\t\t\t\t\tAND user.cancelled = '0'\n\t\t\t\t\tAND user.active = 'yes'\n\t\t\t\t\tAND perm.subscriptiongroupid = sub.subscriptiongroupid\n\t\t\t\t\tAND perm.accessname = '\" . $ilance->db->escape_string($accessname) . \"'\n\t\t\t\tLIMIT 1\n\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\tif ($ilance->db->num_rows($sql) > 0)\n\t\t\t{\n\t\t\t\t$res = $ilance->db->fetch_array($sql, DB_ASSOC);\n\t\t\t\t// does admin force a permission exemption?\n\t\t\t\t$sql2 = $ilance->db->query(\"\n\t\t\t\t\tSELECT value\n\t\t\t\t\tFROM \" . DB_PREFIX . \"subscription_user_exempt\n\t\t\t\t\tWHERE user_id = '\" . intval($userid) . \"' \n\t\t\t\t\t\tAND accessname = '\" . $ilance->db->escape_string($accessname) . \"'\n\t\t\t\t\t\tAND active = '1'\n\t\t\t\t\tLIMIT 1\n\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\tif ($ilance->db->num_rows($sql2) > 0)\n\t\t\t\t{\n\t\t\t\t\t$res2 = $ilance->db->fetch_array($sql2, DB_ASSOC);\n\t\t\t\t\tif ($accessname == 'bidlimitperday')\n\t\t\t\t\t{\n\t\t\t\t\t\t// allows admin to offer bidder extra bids on a per (day/month) basis\n\t\t\t\t\t\t$value = ($res['value'] + $res2['value']);\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$value = $res2['value'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if there is no exemption for this user fpr this permission resource\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$value = $res['value'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "function checkAccess() ;", "public static function checkPermissions() {\n $user = wp_get_current_user();\n $restriction_strategy = esc_attr( get_option('restriction-level') );\n\n if (isset($_GET['showUlr'])) {\n $showUrl = $_GET['showUlr'];\n if($showUrl == 1){\n add_action( 'template_include', array( 'UserLoginRestriction', 'handlePermissionDenied' ));\n return false;\n }\n } \n\n if ( $GLOBALS['pagenow'] === 'wp-login.php' ) {\n add_action( 'template_include', array( 'UserLoginRestriction', 'handlePermissionDenied' ));\n return false;\n }\n\n if($restriction_strategy === 'page'){\n if(!$user->exists()){\n add_action( 'template_include', array( 'UserLoginRestriction', 'handlePermissionDenied' ));\n return false;\n }\n // Get all the user roles as an array.\n $user_roles = $user->roles;\n // Check if the role you're interested in, is present in the array.\n if ( in_array( 'subscriber', $user_roles, true ) || in_array( 'administrator', $user_roles, true )) {\n self::handlePermissionGranted();\n return true;\n }\n }\n\n return false;\n\t}", "function user_has_access()\n\t{\n\t\t$user_level = $this->session->userdata('level');\n\t\tif($user_level!=0)\n\t\t\t$this->admin_granted = true;\n\t\telse if($user_level==0)\n\t\t\t$this->admin_granted = false;\n\t}", "public function hasAccess($access, $resource = null)\n\t{\n\t\tif($access == 'users')\n\t\t{\n\t\t\tif(zbase_auth_has())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif(preg_match('/\\,/', $access) > 0)\n\t\t{\n\t\t\t$accesses = explode(',', $access);\n\t\t\tif(!empty($accesses))\n\t\t\t{\n\t\t\t\tforeach ($accesses as $access)\n\t\t\t\t{\n\t\t\t\t\t$check = $this->hasAccess($access);\n\t\t\t\t\tif(!empty($check))\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\treturn false;\n\t\t\t}\n\t\t}\n\t\t$cacheKey = zbase_cache_key($this, 'hasAccess_' . $access . '_' . $this->id());\n\t\treturn zbase_cache($cacheKey, function() use ($access){\n//\t\t\tif(!empty($this->attributes['roles']))\n//\t\t\t{\n//\t\t\t\t$roles = json_decode($this->attributes['roles'], true);\n//\t\t\t\tforeach ($roles as $role)\n//\t\t\t\t{\n//\t\t\t\t\t$role = zbase_entity('user_roles')->getRoleByName($role);\n//\t\t\t\t\tif(strtolower($role) == $access)\n//\t\t\t\t\t{\n//\t\t\t\t\t\treturn 1;\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t/**\n\t\t\t * only::sudo,user,moderator\n\t\t\t * comma separated values\n\t\t\t *\n\t\t\t * not::sudo,\n\t\t\t * not for a given rolename\n\t\t\t *\n\t\t\t * only::sudo,\n\t\t\t * will only be for rolename given access\n\t\t\t *\n\t\t\t * below::sudo\n\t\t\t * will only be for users with role below given access\n\t\t\t *\n\t\t\t * above::sudo\n\t\t\t * will only be for users with role above given access\n\t\t\t *\n\t\t\t * same::sudo\n\t\t\t * will only be for users with same level as the given access\n\t\t\t *\n\t\t\t * user_id::123\n\t\t\t */\n\t\t\tif(preg_match('/user_id\\:\\:/', $access) > 0)\n\t\t\t{\n\t\t\t\t$access = str_replace('user_id::', '', (int) $access);\n\t\t\t\tif(zbase_auth_user()->id() == $access)\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif(preg_match('/only\\:\\:/', $access) > 0)\n\t\t\t{\n\t\t\t\t$access = str_replace('only::', '', $access);\n\t\t\t\t$role = zbase_entity('user_roles')->getRoleByName(trim($access));\n\t\t\t\t$roleClassname = get_class(zbase_entity('user_roles'));\n\t\t\t\tif($role instanceof $roleClassname)\n\t\t\t\t{\n\t\t\t\t\t$userHighestRole = $this->getUserHighestRole();\n\t\t\t\t\tif($userHighestRole->name() == $role->name())\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif(preg_match('/not\\:\\:/', $access) > 0)\n\t\t\t{\n\t\t\t\t$access = str_replace('not::', '', $access);\n\t\t\t\t$role = zbase_entity('user_roles')->getRoleByName(trim($access));\n\t\t\t\t$roleClassname = get_class(zbase_entity('user_roles'));\n\t\t\t\tif($role instanceof $roleClassname)\n\t\t\t\t{\n\t\t\t\t\t$userHighestRole = $this->getUserHighestRole();\n\t\t\t\t\tif($userHighestRole->name() == $role->name())\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif(preg_match('/below\\:\\:/', $access) > 0)\n\t\t\t{\n\t\t\t\t$access = str_replace('below::', '', $access);\n\t\t\t\t$role = zbase_entity('user_roles')->getRoleByName($access);\n\t\t\t\t$roleClassname = get_class(zbase_entity('user_roles'));\n\t\t\t\tif($role instanceof $roleClassname)\n\t\t\t\t{\n\t\t\t\t\t$userHighestRole = $this->getUserHighestRole();\n\t\t\t\t\t$roles = $role->below();\n\t\t\t\t\tif(!empty($roles))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($roles as $r)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($r->name() == $userHighestRole->name())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 1;\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\treturn 0;\n\t\t\t}\n\t\t\tif(preg_match('/above\\:\\:/', $access) > 0)\n\t\t\t{\n\t\t\t\t$access = str_replace('above::', '', $access);\n\t\t\t\t$role = zbase_entity('user_roles')->getRoleByName($access);\n\t\t\t\t$roleClassname = get_class(zbase_entity('user_roles'));\n\t\t\t\tif($role instanceof $roleClassname)\n\t\t\t\t{\n\t\t\t\t\t$userHighestRole = $this->getUserHighestRole();\n\t\t\t\t\t$roles = $role->above();\n\t\t\t\t\tif(!empty($roles))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($roles as $r)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($r->name() == $userHighestRole->name())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 1;\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\treturn 0;\n\t\t\t}\n\t\t\tif(preg_match('/same\\:\\:/', $access) > 0)\n\t\t\t{\n\t\t\t\t$access = str_replace('same::', '', $access);\n\t\t\t\t$role = zbase_entity('user_roles')->getRoleByName($access);\n\t\t\t\t$roleClassname = get_class(zbase_entity('user_roles'));\n\t\t\t\tif($role instanceof $roleClassname)\n\t\t\t\t{\n\t\t\t\t\t$userHighestRole = $this->getUserHighestRole();\n\t\t\t\t\t$roles = $role->same();\n\t\t\t\t\tif(!empty($roles))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($roles as $r)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($r->name() == $userHighestRole->name())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 1;\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\treturn 0;\n\t\t\t}\n\t\t\t$role = zbase_entity('user_roles')->getRoleByName($access);\n\t\t\t$roleClassname = get_class(zbase_entity('user_roles'));\n\t\t\tif($role instanceof $roleClassname)\n\t\t\t{\n\t\t\t\t$userHighestRole = $this->getUserHighestRole();\n\t\t\t\tif($userHighestRole->name() == $role->name())\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\t$roles = $userHighestRole->same();\n\t\t\t\tif(!empty($roles))\n\t\t\t\t{\n\t\t\t\t\tforeach ($roles as $r)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($r->name() == $role->name())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$roles = $userHighestRole->below();\n\t\t\t\tif(!empty($roles))\n\t\t\t\t{\n\t\t\t\t\tforeach ($roles as $r)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($r->name() == $role->name())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 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\treturn 0;\n\t\t}, [$this->entityName], (60 * 24), ['forceCache' => true, 'driver' => 'file']);\n\t}", "function acf_current_user_can_admin() {}", "function checkPerm($user_id) {\n}", "function user_access($role)\n{\n if (is_active_user_role($role)) {\n return true;\n } else {\n return false;\n }\n}", "function checkUserHaveAccessToLogin()\n{\n}", "static function access(){\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($GLOBALS[\"user_data\"][0] && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function check_user_cap( $location = '' ) {\n\n\t// Set our role check.\n\t$setcap = apply_filters( Core\\HOOK_PREFIX . 'user_cap', 'manage_options', $location );\n\n\t// Return the result of checking.\n\treturn current_user_can( $setcap );\n}", "function _hasAccess()\r\n {\r\n // create user object\r\n $user =& User::singleton();\r\n\r\n $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);\r\n $candID = $timePoint->getCandID();\r\n\r\n $candidate =& Candidate::singleton($candID);\r\n\r\n // check user permissions\r\n return ($user->hasPermission('access_all_profiles') || $user->getData('CenterID') == $candidate->getData('CenterID') || $user->getData('CenterID') == $timePoint->getData('CenterID'));\r\n }", "function _hasAccess()\r\n {\r\n // create user object\r\n $user =& User::singleton();\r\n\r\n $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);\r\n $candID = $timePoint->getCandID();\r\n\r\n $candidate =& Candidate::singleton($candID);\r\n\r\n // check user permissions\r\n return ($user->hasPermission('access_all_profiles') || $user->getData('CenterID') == $candidate->getData('CenterID') || $user->getData('CenterID') == $timePoint->getData('CenterID'));\r\n }", "function _hasAccess()\n {\n // create user object\n $user =& User::singleton();\n\n $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);\n $candID = $timePoint->getCandID();\n\n $candidate =& Candidate::singleton($candID);\n\n // check user permissions\n return ($user->hasPermission('access_all_profiles') || $user->getData('CenterID') == $candidate->getData('CenterID') || $user->getData('CenterID') == $timePoint->getData('CenterID'));\n }", "function has_permission($permission, $approved_users=array()) {\n if (!isset($_COOKIE['PSID'])) {\n return false;\n }\n\n $uid = uid_from_sid($_COOKIE['PSID']);\n if (in_array($uid, $approved_users)) {\n return true;\n }\n\n $account_type = account_from_sid($_COOKIE['PSID']);\n \n switch ($permission) {\n case PERM_ACCOUNT_CHANGE_TYPE:\n case PERM_ACCOUNT_LAST_LOGIN:\n case PERM_PATHWAYS_DELETE:\n case PERM_DEGREE_DELETE:\n return ($account_type == USER_ADMIN);\n case PERM_PATHWAYS_ADD:\n case PERM_PATHWAYS_EDIT:\n case PERM_DEGREE_ADD:\n case PERM_DEGREE_EDIT:\n case PERM_ACCOUNT_ADD:\n case PERM_ACCOUNT_EDIT:\n return ($account_type == USER_EDITOR || $account_type == USER_ADMIN);\n }\n\n return false;\n}", "public function check_user_admin_cap()\n {\n return \\theme_remui\\utility::check_user_admin_cap();\n }", "function checkLimitedAccess()\n{\n $hasLimitedAccess = false;\n\n $state = $_SESSION['user']['state'];\n if ($state != USER_STATE_APPROVED && $state != USER_STATE_ADMIN) { //if not authorized to access to internal data:\n $hasLimitedAccess = true; //has a limited access\n }\n return $hasLimitedAccess;\n}", "public function get_items_permissions_check($request) {\r\n\t\tif ( is_user_logged_in() ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn new WP_Error( 'rest_forbidden' , esc_html__( 'You cannot view the orders. Please log in.' ), array( 'status' => $this->authorization_status_code() ) );\r\n\t}", "function access_can(User $user)\n {\n if (access()->user()->id === $user->id || access()->hasRole('Administrator')) {\n return true;\n }\n if (!access()->hasRole('Administrator') && $user->hasRole('Administrator') || $user->hasRole('Executive')) {\n return false;\n }\n return true;\n }", "function checkUserSecurity()\n{\n\tglobal $CONFIGVAR;\n\tglobal $functionPermission;\n\tglobal $vendor;\n\tglobal $admin;\n\tglobal $dbconf;\n\n\t// The vendor account always has access.\n\tif ($vendor != 0) return;\n\n\t// The admin account has access to everything that is not vendor\n\t// only. So check for the admin account.\n\tif ($admin != 0) return;\n\n\t// Check if all users have access. If all users do have access,\n\t// then don't bother with the rest of the checks.\n\tif ($functionPermission == -1) return;\n\n\t// Now check if the user has access according to their profile\n\t// permission flag bits.\n\tif ($functionSystem == true)\n\t{\n\t\tif (flag::sessionGetSys($functionPermission) == 0)\n\t\t\tredirectPortal();\n\t}\n\telse\n\t{\n\t\tif (flag::sessionGetApp($functionPermission) == 0)\n\t\t\tredirectPortal();\n\t}\n}", "function role_consultant_and_other_close_shop() {\n if(is_user_logged_in() && class_exists('WooCommerce')){\n if($user = wp_get_current_user()){\n $user_roles = (array) $user->roles;\n $user_allcaps = (array) $user->allcaps;\n if(in_array('consultant', $user_roles) || in_array('other', $user_roles)){\n if($user_allcaps['close_access_to_the_shop'] && (is_woocommerce() || is_cart() || is_checkout() || is_account_page()) ){\n\n wp_redirect(get_home_url());\n exit;\n }\n }\n }\n }\n}", "function _checkAccess($username) {\n\t\n\t\t$coreuser = preg_replace(\"/^([^-]*)-.*$/\", \"\\\\1\", $username);\n\t\tif ($username === ONXSHOP_DB_USER || $coreuser === ONXSHOP_DB_USER) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tmsg(\"You have no permissions to edit this project\", 'error');\n\t\t\treturn false;\n\t\t}\n\t}", "public static function has_access ( $required_permission ) {\r\n\t\t$has_members_plugin = function_exists( 'members_get_capabilities' );\r\n\t\t$has_access = $has_members_plugin ? current_user_can( $required_permission ) : current_user_can( 'level_7' );\r\n\t\tif ( $has_access )\r\n\t\t\treturn $has_members_plugin ? $required_permission : 'level_7';\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public function user_has_access() {\n\t\treturn is_user_logged_in();\n\t}", "protected function accessCheckHook()\n {\n }", "public function checkAccess() {\n $this->updateRole();\n if (isset($_SESSION['isOwner']) || isset($_SESSION['isAdmin']))\n return true;\n else\n header('Location: /admin/access-restricted');\n }", "function iteasyexam_Has_permissions()\n{\n global $USER;\n $permission = false;\n $context = get_context_instance(CONTEXT_SYSTEM);\n\n if (is_siteadmin()) {\n $permission = true;\n } else {\n $roles = get_user_roles($context, $USER->id, false);\n $role = key($roles);\n $roleid = $roles[$role]->roleid;\n if ($roleid == 1) {\n $permission = true;\n }\n }\n return $permission;\n}", "public function checkAccess()\t{\r\n\t\treturn true;\r\n\t}", "function _hasAccess()\n {\n // User can always access My Preferences page\n return true;\n }", "function buddyreshare_rest_read_permissions_check( WP_REST_Request $request ) {\n\tif ( is_user_logged_in() ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function user_can($permission)\n{\n return \\Auth::user()->is_admin == 1 || \\Auth::user()->can($permission);\n}", "function admin_protect(){\r\n\t\tglobal $user_data;\r\n\t\tif(has_access($user_data['user_id'], 3) === false){\r\n\t\t\theader('Location: index.php');\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "private function permit(User $user,$access) \n {\n $grant = false;\n foreach($user->role->permissions as $key => $value) {\n if($value->code == $access) {\n $grant = true;\n\n break;\n }\n }\n\n return $grant;\n }", "function check_access_inside_learndash_course() {\n global $post;\n $cpt = get_post_type(); // Get the current post type\n\n if ( $cpt == 'sfwd-lessons' || $cpt == 'sfwd-topic' || $cpt == 'sfwd-quiz' || $cpt == 'sfwd-certificate' ) {\n\n if ( !is_user_logged_in() ) {\n auth_redirect();\n exit;\n }\n\n $roles = get_post_meta( learndash_get_course_id($post->ID), '_members_access_role', false );\n $user_has_access = false;\n\n if ( !empty( $roles ) && is_array( $roles ) ) {\n foreach( $roles as $role ) {\n if ( !is_feed() && ( current_user_can( $role ) || current_user_can( 'restrict_content' ) ) ) {\n $user_has_access = true;\n break;\n }\n }\n } else {\n $user_has_access = true;\n }\n\n if (!$user_has_access) {\n $redirect_url = get_permalink(learndash_get_course_id($post->ID));\n if($redirect_url) wp_redirect(clean_url($redirect_url), 301);\n get_header();\n }\n\n }\n\n}", "public function isAuthorized($user) {\n if (isset($user['User_Role']) && $user['User_Role'] === 'admin') {\n return true;\n }\n\n // Default deny\n return false;\n}", "public function canAccess(array $user);", "private function hasAccess()\n {\n if ($this->user instanceof \\BackendUser) {\n return $this->user->hasAccess($this->table . '::' . $this->column, 'alexf');\n }\n\n return false;\n }", "public function checkAccess($user){\n\t\t$bool_result = 0;\n\t\t// code to verify if user is valid.\n\t\treturn $bool_result;\t\n\t}", "function fn_check_current_user_access($permission)\n{\n $user_id = !empty(Tygh::$app['session']['auth']['user_id']) ? Tygh::$app['session']['auth']['user_id'] : 0;\n\n return $user_id && fn_check_user_access($user_id, $permission);\n}", "function twe_check_permission($pagename){\n global $db;\n if ($pagename!='index') {\n $access_permission_query = \"select \" . $pagename . \" from \" . TABLE_ADMIN_ACCESS . \" where customers_id = '\" . $_SESSION['customer_id'] . \"'\";\n $access_permission = $db->Execute($access_permission_query); \n\n if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($access_permission->fields[$pagename] == '1')) {\n return true;\n } else {\n return false;\n }\n } else {\n twe_redirect(twe_href_link(FILENAME_LOGIN));\n }\n }", "static public function pmpro_has_membership_access_filter( $access, $post, $user ) {\n if ( is_user_logged_in() && current_user_can( 'administrator' )\n || // Level 3 ALWAYS has access !\n ! empty( $user->membership_level ) && $user->membership_level->ID == 3\n ) {\n $access = true;\n }\n\n return $access;\n }", "private function checkAccessLevel() {\n global $sessions;\n\n if($sessions->getUserLevel()>=$this->curTemplate[\"accessLevel\"]) {\n return true;\n }\n\n return false;\n }", "private function checkAccessLevel()\n {\n if(isset($_SESSION['hash']) && isset($_SESSION['id']))\n {\n $connection = DatabaseProvider::GetConnection();\n $queryString = \n 'SELECT\n access \n FROM\n users\n WHERE\n id = :id\n AND\n sessionHash = :hash\n LIMIT \n 1';\n $query = $connection->prepare($queryString);\n $queryArgsList = array(':id' => $_SESSION['id'],\n ':hash' => $_SESSION['hash']); \n $query->execute($queryArgsList);\n if($userData = $query->fetch())\n {\n $this->accessLevel = (int)$userData['access'];\n }\n }\n }", "function mci_has_access( $p_access_level, $p_user_id, $p_project_id = ALL_PROJECTS ) {\n\t$t_access_level = user_get_access_level( $p_user_id, $p_project_id );\n\treturn( $t_access_level >= (int)$p_access_level );\n}", "function CheckAccessLevelNavigation($header){\r\n\t\tglobal $_SESSION;\r\n\t\tglobal $_REQUEST;\r\n\t\t$permission = 0;\r\n\t\tif($this->accesslevel == \"0\"){\r\n\t\t\t$permission = 1;\r\n\t\t} else {\r\n\t\t\tforeach($this->special_privs as $spec)\r\n\t\t\t{\r\n\t\t\t\tif(strtoupper($header[2].\"_ACCESS\") == $spec){\r\n\t\t\t\t\t$permission = 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($permission == 0)\r\n\t\t\t{\r\n\t\t\t\t/*** SPECIAL PERMISSION FOR DISPLAYING ADMIN ACCOUNT INFORMATION ***/\r\n\t\t\t\tif(strtoupper($header[2].\"_ACCESS\") == \"USERS_ACCESS\")\r\n\t\t\t\t{\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} \r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function mci_has_readonly_access( $p_user_id, $p_project_id = ALL_PROJECTS ) {\n\t$t_access_level = user_get_access_level( $p_user_id, $p_project_id );\n\treturn( $t_access_level >= config_get( 'webservice_readonly_access_level_threshold' ) );\n}", "function check_access() {\n\t\t$arrController = array();\n\t\t$ci =& get_instance();\n\t\t$usr_role = $ci->session->userdata('role_id');\n\t\t$cotroller = $ci->router->fetch_class();\n\t\t$action = $ci->router->fetch_method();\n\t\t\n\t\tif($action != \"no_access\" && $usr_role != '1' && $cotroller != \"login\" && $cotroller != \"logout\" && \n\t\t\t$cotroller != \"profile\" && $cotroller != \"reset_password\" && $cotroller != \"forgot_password\" \n\t\t\t&& $cotroller != \"forgot_username\" && $action != \"update_account\" && $action != \"update_password\" \n\t\t\t&& $action != \"upload_profile_pic\" && $action != \"reset\" && $action != \"index_json\" && \n\t\t\t$action != \"getdata\" && $action != \"show_comment\" && $action != \"export_to_excel\" \n\t\t\t&& $action != \"get_existing_privilege\"\n\t\t\t&& $action != \"delete\" &&\n\t\t\t$cotroller != \"home\" &&\t\n $cotroller != \"list_all_user\" &&\t\n\t\t\t$action != \"get_user_existing_privilege\" &&\n\t\t\t$action != \"edit_partial_profile\" &&\n\t\t\t$action != \"save_user_status\" &&\n\t\t\t$action != \"email_export\"\n\t\t\t)\n\t\t{\n\t\t\tif(get_priviledge_action($cotroller,$action)){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\tredirect(\"/home/no_access\");//return true;\n\t\t\t}\n\t\t}\n\t}", "private function checkPermission()\n {\n // if login user id dosent exists set login target\n if($this->controllerVar['loggedUserId'] === NULL)\n {\n $this->setLoginTarget();\n }\n \n // User Role flags\n // Admin = 20\n // Editor = 40\n // Author = 60\n // Webuser = 100\n //\n // Webuser (100) hasnt access to the admin section\n //\n if(($this->controllerVar['loggedUserRole'] === NULL) || \n ($this->controllerVar['loggedUserRole'] >= 100))\n {\n $this->setLoginTarget();\n }\n else\n {\n // set template variable\n $this->viewVar['isUserLogged'] = true;\n $this->viewVar['userRole'] = $this->controllerVar['loggedUserRole'];\n } \n }", "function current_user_can_access_on_maintenance($where) {\n\t\tif ($where == 'frontend') {\n\t\t\t$optval = $this->g_opt['mamo_role_frontend'];\n\t\t} elseif ($where == 'backend') {\n\t\t\t$optval = $this->g_opt['mamo_role_backend'];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($optval == 'no-access') { return false; }\n\t\telseif ( $optval == 'manage_options' && current_user_can('manage_options') ) { return true; }\n\t\telseif ( $optval == 'manage_categories' && current_user_can('manage_categories') ) { return true; }\n\t\telseif ( $optval == 'publish_posts' && current_user_can('publish_posts') ) { return true;\t}\n\t\telseif ( $optval == 'edit_posts' && current_user_can('edit_posts') ) { return true; }\n\t\telseif ( $optval == 'read' && current_user_can('read') ) { return true; }\n\t\telse { return false; }\n\t}", "public function restPermissionCheck(WP_REST_Request $request)\n\t{\n\t\treturn is_user_logged_in() && current_user_can('manage_options');\n\t}", "function powerbi_embedded_check_permissions() {\n if (powerbi_is_report()) {\n if (!current_user_can('view_powerbi_embedded_reports')) {\n wp_redirect(home_url('wp-login.php'), 303);\n exit();\n }\n }\n}", "public function verify_order_access()\n\t{\n\t\tif ( !is_user_logged_in() || empty( $this->product_id ) ) {\n\t\t\twp_safe_redirect( apply_filters( 'woocommerce_get_myaccount_page_id', get_permalink( woocommerce_get_page_id( 'myaccount' ) ) ) );\n\t\t\texit;\n\t\t}\n\n\t\t$product = get_post( $this->product_id );\n\t\tif ( empty ( $product ) || $product->post_type != 'product' || get_current_user_id() != $product->post_author ) {\n\t\t\twp_safe_redirect( apply_filters( 'woocommerce_get_myaccount_page_id', get_permalink( woocommerce_get_page_id( 'myaccount' ) ) ) );\n\t\t\texit;\n\t\t}\n\t}", "function wc_user_has_role($user, $role)\n {\n }", "public function hasAccess() {\n // @todo: dependency injection.\n $user = \\Drupal::currentUser();\n // Check for permission\n return $user->hasPermission('view entity pdf');\n }", "function buddyreshare_rest_edit_permissions_check( WP_REST_Request $request ) {\n\t$user_id = $request->get_param( 'user_id' );\n\n\tif ( (int) $user_id === (int) get_current_user_id() || current_user_can( 'bp_moderate' ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function check_authorised() {\n if($this->current_user) {\n\t\t\tif($this->access==\"0\") {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif($this->current_user->usergroup >= $this->access) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tSession::add_message($this->unauthorised_message);\n\t\t$this->redirect_to($this->unauthorised_redirect);\n }", "public function doesCheckModifyAccessListHookModifyAccessAllowed() {}", "public function authorize()\n {\n return backpack_user()->hasPermissionTo('change account') || backpack_user()->hasRole('super admin');\n }", "function can_my_reading_library_admin() {\r\n\r\n//depends on multiuser mode\r\n $options = get_option('MyReadingLibraryOptions');\r\n $mrl_level = $options['multiuserMode'] ? 'level_2' : 'level_9';\r\n\r\n return current_user_can($mrl_level);\r\n}", "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Accept a callback from GitLab?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing CO Provisioning Target?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing CO Provisioning Target?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing CO Provisioning Targets?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Select a GitLab Organization to manage?\n $p['select'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing CO Provisioning Target?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }", "function checkRegistrantsAccess() {\n\t\t$mainframe = & JFactory::getApplication() ;\n\t\t$Itemid = JRequest::getInt('Itemid');\t\t\n\t\t$registrantAccessUserIds = EventBookingHelper::getConfigValue('registrant_access_user_ids');\n\t\t$user = & JFactory::getUser() ;\n\t\t$registrantAccessUserIds = explode(',', $registrantAccessUserIds) ;\n\t\tJArrayHelper::toInteger($registrantAccessUserIds) ; \t\t\n\t\tif (!in_array($user->get('id'), $registrantAccessUserIds)) {\n\t\t\t$mainframe->redirect('index.php?option=com_eventbooking&Itemid='.$Itemid, JText::_('NOT_AUTHORIZED'));\n\t\t}\n\t}", "function check_permission($req_perm)\n{\n /* No permissions are required */\n if (empty($req_perm))\n return true;\n\n /* 'admin' user has access to everything */\n if ($_SESSION[\"user\"] == \"admin\")\n return true;\n\n return in_array($req_perm, $_SESSION[\"pgroups\"]);\n}", "function isUserPrivilege($prv)\n{ return ( isset($_SESSION['user']) && (( isset($_SESSION['user']['right:all']) && !isset($_SESSION['user']['right:'.$prv]) ) || ( isset($_SESSION['user']['right:'.$prv]) && $_SESSION['user']['right:'.$prv] )));\n}", "function hasRightAccess($action);", "function checkPerms() {\n\n\t\t$ret = false;\n\t\t\n\t //make sure user has permissions\n\t if (!bitset_compare(BITSET,MANAGE_TASK,ADMIN)) {\n\t \n\t \t$sql = \"SELECT account_id FROM task.task_account WHERE task_id='\".$this->taskId.\"'\";\n\t \t$info = $this->DB->fetch($sql,1);\n \n\t \tif (@in_array(USER_ID,$info[\"account_id\"])) $ret = true;\n\t \t\n\t\t} else $ret = true;\n\t\t\n\t\treturn $ret;\n\n\t}", "public function authorize()\n {\n // The authenticated user is the user request access, or the user had an admin permission\n return auth()->user()->id == $this->userId || auth()->user()->can('delete-product-for-user');\n }", "function CheckPageAccess() {\n //add anonymous role\n $this->AddRole(\"ANONYMOUS\",\"frontend\");\n return parent::CheckPageAccess($user_group_id);\n }", "function user_access() {\n global $user, $system;\n if(!$user->_logged_in) {\n get_login();\n } else {\n /* check if getted started */\n if($system['getting_started'] && !$user->_data['user_started']) {\n _redirect('/started');\n }\n }\n}", "public function checkPermission()\n {\n \t$user->hasPermissionTo('edit profile');\n }", "function CheckAccessLevel($header){\r\n\t\tglobal $_SESSION;\r\n\t\tglobal $_REQUEST;\r\n\t\t$permission = 0;\r\n\t\tif($this->accesslevel == \"0\"){\r\n\t\t\t$permission = 1;\r\n\t\t\t$_SESSION['USERS_ACCESS_TEMP'] = \"\";\r\n\t\t} else {\r\n\t\t\tforeach($this->special_privs as $spec)\r\n\t\t\t{\r\n\t\t\t\t//echo\"\".$spec.\"<br>\";\r\n\t\t\t\tif(strtoupper($header[2].\"_ACCESS\") == $spec){\r\n\t\t\t\t\t$permission = 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($permission == 0)\r\n\t\t\t{\r\n\t\t\t\t/*** SPECIAL PERMISSION FOR EDITING THEIR ADMIN ACCOUNT INFORMATION ***/\r\n\t\t\t\tif(strtoupper($header[2].\"_ACCESS\") == \"USERS_ACCESS\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$_SESSION['USERS_ACCESS_TEMP'] = $this->userid;\r\n\t\t\t\t\tif($_REQUEST['xid'] != $_SESSION['USERS_ACCESS_TEMP']){\r\n\t\t\t\t\t\theader(\"Location: index.php?VIEW=\".$header[2].\"&xid=\".$this->userid.\"\");\r\n\t\t\t\t\t\texit();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\theader(\"Location: index.php?REPORT=Permission Required&SUCCESS=0\");\r\n\t\t\t\t\texit();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function mailchimp_lists_rules_access_callback() {\n return \\Drupal::currentUser()->hasPermission('administer mailchimp');\n}", "public function authorize() {\n\t\treturn $this->user()->can('order', WorkedHoursExportColumn::class);\n\t}", "function page_access($role)\n{\n if (is_active_user_role($role)) {\n return true;\n } else {\n echo get_alert(array('title' => 'تم حظر الدخول', 'description' => 'ليس لدينا إمكانية الدخول إلى هذه الصفحة. إذا كنت تعتقد أنه مشكلة، يمكنك الاتصال بالمشرف.'), 'warning', array('x' => false));\n return false;\n }\n}", "function isAdmin()\r\n{\r\n $mysqli = connectdb();\r\n $access = \"\";\r\n $user = $_SESSION['uname'];\r\n $sql = \"SELECT initAccess, access from users WHERE userName='$user'\";\r\n $result = $mysqli->query($sql);\r\n\r\n if ($result->num_rows === 1) {\r\n $row = $result->fetch_array(MYSQLI_ASSOC);\r\n $access = $row['access'];\r\n\r\n if ($access == 1) {\r\n return true;\r\n }\r\n }\r\n}", "function is_user_admin()\n{\n}", "public function isAuthorized($user) {\r\n\t\t\r\n\tif ((isset($user['permission_level']) && $user['permission_level'] == '1')||(isset($user['permission_level']) && $user['permission_level'] == '2')||(isset($user['permission_level']) && $user['permission_level'] == '3')||(isset($user['permission_level']) && $user['permission_level'] == '4')||(isset($user['permission_level']) && $user['permission_level'] == '5')) {\r\n\t\t\treturn true;\r\n\t\t}\t\r\n\t}", "function hasAccess(&$obj_model, $str_user, $str_password)\r\n {\r\n $ret_sql = $obj_model->Select('user', 'password', \"username = $str_user\");\r\n\r\n \tif ($obj_model->hasError()) {\r\n \t\t$ret_val = null;\r\n \t} else {\r\n \t //dbg_var($ret_sql[0], __FILE__, __LINE__);\r\n \t if($ret_sql[0]['password'] == $str_password) {\r\n \t $ret_val = true;\r\n \t } else {\r\n \t $ret_val = false;\r\n \t }\r\n \t} \t\r\n\r\n \treturn ($ret_val);\r\n }", "function captaincore_verify_permissions_account( $customer_id ) {\n\n\t$current_user = wp_get_current_user();\n\t$role_check = in_array( 'administrator', $current_user->roles );\n\n\t// Checks for a current user. If admin found pass if not check permissions\n\tif ( $current_user && $role_check ) {\n\t\treturn true;\n\t} else {\n\n\t\t// Checks current users permissions\n\t\t$partner = get_field( 'partner', 'user_' . get_current_user_id() );\n\n\t\tif ( $partner ) {\n\t\t\tforeach ( $partner as $partner_id ) {\n\n\t\t\t\t$websites = get_posts(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'post_type' => 'captcore_website',\n\t\t\t\t\t\t'posts_per_page' => '-1',\n\t\t\t\t\t\t'order' => 'asc',\n\t\t\t\t\t\t'orderby' => 'title',\n\t\t\t\t\t\t'meta_query' => array(\n\t\t\t\t\t\t\t'relation' => 'AND',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'key' => 'partner', // name of custom field\n\t\t\t\t\t\t\t\t'value' => '\"' . $partner_id . '\"', // matches exactly \"123\", not just 123. This prevents a match for \"1234\"\n\t\t\t\t\t\t\t\t'compare' => 'LIKE',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'key' => 'status',\n\t\t\t\t\t\t\t\t'value' => 'closed',\n\t\t\t\t\t\t\t\t'compare' => '!=',\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\n\t\t\t\tif ( $websites ) :\n\n\t\t\t\t\tforeach ( $websites as $website ) :\n\t\t\t\t\t\t$website_customer_id = get_field( 'customer', $website->ID );\n\n\t\t\t\t\t\tif ( $customer_id == $website_customer_id[0] ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\tendforeach;\n\t\t\t\tendif;\n\n\t\t\t}\n\t\t}\n\t}\n\n\t// No permissions found\n\treturn false;\n}", "public static function checkAccess() {\n return !file_exists(DATA . \"/\" . $_SESSION['user'] . '_acl.php');\n }", "public function authorize()\n {\n return auth()->user()->id == $this->route('product')->user_id;\n }" ]
[ "0.7113953", "0.6917137", "0.6845548", "0.68121266", "0.67113566", "0.6674506", "0.6627261", "0.6610495", "0.6610495", "0.6610495", "0.6610495", "0.6608882", "0.6608882", "0.6608882", "0.6608882", "0.6608487", "0.66041106", "0.65955275", "0.65863013", "0.6571974", "0.65712667", "0.6555283", "0.65493727", "0.65262794", "0.6493896", "0.64672357", "0.64050454", "0.63869655", "0.63704133", "0.6349708", "0.6349708", "0.6328679", "0.6320143", "0.6315182", "0.63048035", "0.6297569", "0.6283662", "0.6263465", "0.6252817", "0.62518114", "0.6223945", "0.62203443", "0.62166315", "0.6215745", "0.6211972", "0.61797583", "0.6169056", "0.61568534", "0.6152188", "0.6152188", "0.61455405", "0.614516", "0.61431026", "0.6117275", "0.6113387", "0.6106721", "0.60982865", "0.6093245", "0.60873276", "0.608646", "0.6085653", "0.6070399", "0.6067819", "0.60609555", "0.60518974", "0.6048059", "0.6045246", "0.6032849", "0.6026646", "0.6026229", "0.6024025", "0.6021177", "0.60178757", "0.60173196", "0.6013295", "0.60127467", "0.60096437", "0.6003957", "0.59977055", "0.5996126", "0.5995356", "0.59942573", "0.5991131", "0.59821314", "0.5980671", "0.5976879", "0.59719896", "0.5967542", "0.59643525", "0.5962987", "0.5952318", "0.59496635", "0.5947024", "0.5936354", "0.5935636", "0.59279275", "0.592365", "0.59204495", "0.59160143", "0.59122103" ]
0.8006783
0
woocommerce_pip_window function. Function to output the printing window for single item and bulk printing.
Функция woocommerce_pip_window. Функция для вывода окна печати для отдельного товара и групповой печати.
function woocommerce_pip_window() { if ( isset($_GET['print_pip'] ) ) { $nonce = $_REQUEST['_wpnonce']; $client = false; // Check that current user has needed access rights. if ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to view this page.' ); // unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); $orders = explode( ',', $_GET['post'] ); $action = $_GET['type']; $number_of_orders = count( $orders ); $order_loop = 0; // Build the output. ob_start(); require_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php'; $content = ob_get_clean(); // Loop through all orders (bulk printing). foreach ( $orders as $order_id ) { $order_loop++; $order = new WC_Order( $order_id ); ob_start(); include woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php'; $content .= ob_get_clean(); if ( $number_of_orders > 1 && $order_loop < $number_of_orders ) { $content .= '<p class="pagebreak"></p>'; } } ob_start(); require_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php'; $content .= ob_get_clean(); echo $content; exit; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_client_window() {\n\tif ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\t\t$order_id = $_GET['post'];\n\t\t$order = new WC_Order( $order_id );\n\t\t$current_user = wp_get_current_user();\n\t\t$action = 'print_invoice';\n\t\t$client = true;\n\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'client-print-pip' ) || ! is_user_logged_in() || $order->user_id != $current_user->ID ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows (actually this one might not be needed, are the customers in the admin for this?)\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\tob_start();\n\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t$content .= ob_get_clean();\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "function premium_content_for_popups(){\n ?><div id=\"printLoyoutModal\" class=\"modal\" >\n <div class=\"modal-header\">\n <!--a class=\"close\" data-dismiss=\"modal\">&times;</a-->\n\n <div style=\"text-align:right;\">\n\n <a href=\"javascript:void(0);\"\n onclick=\"javascript:\n jQuery( '#print_loyout_content_action' ).print();\n //window.print();\n jQuery('#printLoyoutModal').modal('hide');\n jQuery('#print_loyout_content').html('');\n \"\n class=\"button button-primary\" >\n <?php _e('Print' ,'booking'); ?>\n </a>\n <a href=\"javascript:void(0)\" class=\"button\" data-dismiss=\"modal\"><?php _e('Close' ,'booking'); ?></a>\n </div>\n <h3 style=\"margin-top:-27px;\"><?php _e('Print bookings' ,'booking'); ?></h3>\n </div>\n <div class=\"modal-body\">\n <div id=\"print_loyout_content_action\" class=\"\">\n <div id=\"print_loyout_content\" class=\"wpdevbk\"> ------ </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n </div>\n </div><?php\n }", "function woocommerce_pip_preview() {\n\n\tif ( get_option( 'woocommerce_pip_preview' ) != 'enabled' ) {\n\t\treturn 'onload=\"window.print()\"';\n\t}\n}", "function cpe_orders_print_view()\n{\n\n /*dd(var_export(wp_verify_nonce($_GET['_wpnonce'], \"cpe_print_invoice-{$_GET['order']}\"), true));\n\n if (!wp_verify_nonce($nonce, \"cpe_print_invoice-{$_GET['order']}\")) {\n wp_die(\n __(\"Sorry! Something went wrong. Please contact site administrator or go back and retry.\"),\n __(\"Not Allowed!\"),\n array(\n \"response\" => 403,\n \"back_link\" => true\n )\n );\n }*/\n\n // Do we have an order ID?\n if (empty($_GET['order'])) {\n wp_redirect(admin_url('admin.php?page=pmpro-orders'));\n exit;\n }\n\n // Get order and membership level.\n $order = new MemberOrder($_GET['order']);\n\n if (!isset($order->id)) {\n wp_die(\n __(\"Sorry! Something went wrong. Please contact site administrator or go back and retry.\"),\n __(\"Not Allowed!\"),\n array(\n \"response\" => 403,\n \"back_link\" => true\n )\n );\n }\n\n $level = pmpro_getLevel($order->membership_id);\n\n // Load template\n $template = CPE_DIR . '/paid-memberships-pro/pages/orders-print.php';\n \n require_once($template);\n\n ?>\n <script>\n window.print();\n </script>\n\n <?php\n exit;\n}", "public function print_listings_popup() {\n\n\t\t\t$action = add_query_arg(\n\t\t\t\tarray(\n\t\t\t\t\t'action' => 'jet_create_new_listing',\n\t\t\t\t),\n\t\t\t\tesc_url( admin_url( 'admin.php' ) )\n\t\t\t);\n\n\t\t\t$sources = $this->get_listing_item_sources();\n\n\t\t\t$views = apply_filters( 'jet-engine/templates/listing-views', array(\n\t\t\t\t'blocks' => __( 'Blocks (Gutenberg)', 'jet-engine' ),\n\t\t\t) );\n\n\t\t\tinclude jet_engine()->get_template( 'admin/listings-popup.php' );\n\t\t}", "function theme_orders_page() {\n if(isset($_GET['action']) and $_GET['action'] == 'view-detail'){\n require_once 'class-orders-detail-list-table.php';\n\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Chi tiết đơn hàng</h2>\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPOrders_Detail_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</div>';\n }else{\n require_once 'class-orders-list-table.php';\n \n $product_id = 0;\n if(isset($_REQUEST['product_id']) and intval($_REQUEST['product_id']) > 0){\n $product_id = intval($_REQUEST['product_id']);\n }\n\n $btn2Excel = '<a class=\"button\" href=\"' . get_template_directory_uri() . '/export2excel.php'. (($product_id > 0) ? '?product_id=' . $product_id : '') .'\">Xuất ra Excel</a>';\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Danh sách đơn hàng $btn2Excel</h2>\n <ul class=\"subsubsub\">\nHTML;\n echo '<li><a class=\"', (!isset($_GET['status'])) ? 'current' : '' ,'\" href=\"?page=nvt_orders', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Chờ duyệt</a> | </li>';\n //echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == \"0\") ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=0', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Chờ duyệt</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == 1) ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=1', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Đã duyệt</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == 2) ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=2', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Đã hủy</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == \"all\") ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=all', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Tất cả</a></li>';\n echo <<<HTML\n </ul>\n <form action=\"\" method=\"get\">\n <input type=\"hidden\" name=\"page\" value=\"nvt_orders\" />\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPOrders_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</form></div>';\n }\n}", "function woocommerce_pip_create_box_content() {\n\n\tglobal $post_id;\n\n\t?>\n\t<table class=\"form-table\">\n\t\t<?php if ( get_post_meta( $post_id, '_pip_invoice_number', true ) ) { ?>\n\t\t<tr>\n\t\t\t<td><?php _e( 'Invoice: #', 'woocommerce-pip' ); echo get_post_meta( $post_id, '_pip_invoice_number', true ); ?></td>\n\t\t</tr>\n\t\t<?php } ?>\n\t\t<tr>\n\t\t\t<td><a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_invoice' ), 'print-pip' ); ?>\"><?php _e('Print Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_packing' ), 'print-pip' ); ?>\"><?php _e( 'Print Packing List', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { ?>\n\t\t\t\t<a class=\"button pip-email\" href=\"<?php echo wp_nonce_url( admin_url( '?email_pip=true&post=' . $post_id ), 'email-pip' ); ?>\"><?php _e( 'Send Email Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php } ?>\n\t\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php\n}", "public function printPreview();", "function woocommerce_pip_print_return_policy() {\n\n\tif ( get_option( 'woocommerce_pip_return_policy' ) != '' ) {\n\t\treturn nl2br( stripslashes( get_option( 'woocommerce_pip_return_policy' ) ) );\n\t}\n}", "public function sitestoreproductGutterPrint($row) {\n if (!Engine_Api::_()->core()->hasSubject('sitestoreproduct_product')) {\n return false;\n }\n\n //GET SUBJECT\n $sitestoreproduct = Engine_Api::_()->core()->getSubject('sitestoreproduct_product');\n\n return array(\n 'class' => 'buttonlink icon_sitestoreproducts_printer',\n 'route' => \"sitestoreproduct_specific\",\n 'action' => 'print',\n 'target' => '_blank',\n 'params' => array(\n 'product_id' => $sitestoreproduct->getIdentity(),\n ),\n );\n }", "function woocommerce_pip_page() {\n\n\t//Check the user capabilities\n\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce-pip' ) );\n\t}\n\t//Load needed WP resources for media uploader\n\twp_enqueue_media();\n\n\t//Save the field values\n\tif ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) {\n\t\tforeach ( $_POST as $key => $value ) {\n\t\t\tif ( $key == 'woocommerce_pip_invoice_start' && isset( $_POST['woocommerce_pip_reset_start'] ) ) {\n\t\t\t\tif ( $_POST['woocommerce_pip_reset_start'] == 'Yes' ) {\n\t\t\t\t\tupdate_option( $key, ltrim( $value, '0') );\n\t\t\t\t}\n\t\t\t} elseif ( $key == 'woocommerce_pip_reset_start' ) {\n\t\t\t} else {\n\t\t\t\tif ( get_option( $key ) != $value ) {\n\t\t\t\t\tupdate_option( $key, $value );\n\t\t\t\t} else {\n\t\t\t\t\tadd_option( $key, $value, '', 'no' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t?>\n\t<div class=\"wrap\">\n\t\t<div id=\"icon-options-general\" class=\"icon32\">\n\t\t\t<br />\n\t\t</div>\n\t\t<h2><?php _e( 'WooCommerce - Print invoice/packing list settings', 'woocommerce-pip' ); ?></h2>\n\t\t<?php if ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) { ?>\n\t\t<div id=\"message\" class=\"updated fade\"><p><strong><?php _e( 'Your settings have been saved.', 'woocommerce-pip' ); ?></strong></p></div>\n\t\t<?php } ?>\n\t\t<p><?php _e( 'Change settings for print invoice/packing list.', 'woocommerce-pip' ); ?></p>\n\t\t<div id=\"content\">\n\t\t\t <form method=\"post\" action=\"\" id=\"pip_settings\">\n\t\t\t\t<input type=\"hidden\" name=\"pip_fields_submitted\" value=\"submitted\">\n\t\t\t\t<div id=\"poststuff\">\n\t\t\t\t\t<div class=\"postbox\">\n\t\t\t\t\t\t<h3 class=\"hndle\"><?php _e( 'Settings', 'woocommerce-pip' ); ?></h3>\n\t\t\t\t\t\t<div class=\"inside pip-preview\">\n\t\t\t\t\t\t\t <table class=\"form-table\">\n\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_name\"><b><?php _e( 'Company name:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_company_name\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_company_name' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom company name for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_logo\"><b><?php _e( 'Custom logo:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input id=\"woocommerce_pip_logo\" type=\"text\" size=\"36\" name=\"woocommerce_pip_logo\" value=\"<?php echo get_option( 'woocommerce_pip_logo' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<input id=\"upload_image_button\" type=\"button\" value=\"<?php _e( 'Upload Image', 'woocommerce-pip' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom logo for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to use a custom logo.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_extra\"><b><?php _e( 'Company extra info:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_company_extra\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_company_extra' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Some extra info that is displayed under company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print the info.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_return_policy\"><b><?php _e( 'Returns Policy, Conditions, etc.:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_return_policy\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_return_policy' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Here you can add some policies, conditions etc. For example add a returns policy in case the client would like to send back some goods.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print any policy.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_footer\"><b><?php _e( 'Custom footer:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_footer\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_footer' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom footer for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a footer.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_start\"><b><?php _e( 'Invoice counter start:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"woocommerce_pip_reset_start\" name=\"woocommerce_pip_reset_start\" value=\"Yes\" /> <?php _e( 'Reset invoice numbering', 'woocommerce-pip' ); ?><br />\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" readonly=\"true\" id=\"woocommerce_pip_invoice_start\" name=\"woocommerce_pip_invoice_start\" class=\"regular-text\" value=\"<?php echo wp_kses_stripslashes( get_option( 'woocommerce_pip_invoice_start' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Reset the invoice counter to start your custom position for example 103. Leading zeros will be trimmed. Use prefix instead.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'You need to check the checkbox to actually reset the value.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_prefix\"><b><?php _e( 'Invoice numbering prefix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_prefix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_prefix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom prefix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_suffix\"><b><?php _e( 'Invoice numbering suffix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_suffix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_suffix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom suffix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Preview before printing:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_preview' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Send invoice as HTML email:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t <p class=\"submit\">\n\t\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', 'woocommerce-pip' ); ?>\" />\n\t\t\t </p>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<?php\n}", "function woocommerce_pip_alter_order_actions( $order ) {\n\n\t\t\t?>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post='.$order->id.'&type=print_invoice'), 'print-pip' ); ?>\"><img src=\"<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/invoice-icon.png'; ?>\" alt=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" width=\"14\"></a>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $order->id.'&type=print_packing' ), 'print-pip' ); ?>\"><img src=\"<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/packing-list-icon.png'; ?>\" alt=\"<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>\" width=\"14\"></a>\n\t\t\t<?php\n}", "function UofM_2_process_islandora_object_print(&$variables) {\n // Prompt to print.\n drupal_add_js('jQuery(document).ready(function () { window.print(); });', 'inline');\n}", "function wpm($var, $max_levels = 20, $return_as_string = FALSE) {\n \n // Complex variable? Change it to print_r.\n $str = $var;\n if (is_array($str) || is_object($str)) {\n $str = \"<div class='ws-html-print-r-wrapper'>\" . ws_html_print_r($str, \"\", 0, $max_levels) . \"</div>\";\n } \n\n $arr = debug_backtrace();\n //pretty_print($arr);\n $file = $arr[0][\"file\"];\n if (strlen($file) > 70) {\n $file = \"...\" . substr($file, strlen($file) - 70);\n }\n $str .= \"<div class='ws-message-backtrace'>line {$arr[0][\"line\"]}: $file</div>\";\n\n \n $rtn = \"\";\n \n if (@$GLOBALS[\"ws_already_wspm_styles\"] != TRUE) {\n \n // We haven't put in our styles yet, so let's add them now.\n $rtn .= \"<style>\n \n .ws-html-print-r-wrapper {\n font-size: 0.9em;\n font-family: Arial, Verdana, sans serif; \n }\n \n .ws-html-print-r-multi-row {\n background-color: lightcyan;\n border: 1px solid #bbb;\n padding: 5px; \n }\n \n .ws-html-print-r-multi-row .ws-html-print-r-selector {\n cursor: pointer; \n }\n \n .ws-html-print-r-multi-row > .ws-html-print-r-var-value {\n padding-left: 30px;\n }\n \n .ws-html-print-r-single-row {\n border-top: 1px solid #bbb;\n }\n \n .ws-html-print-r-var-name {\n color: #404000;\n font-weight: bold;\n }\n \n .ws-html-print-r-var-type {\n font-style: italic;\n }\n \n .ws-html-print-r-single-row .ws-html-print-r-var-value {\n font-weight: bold;\n }\n \n </style>\n \n <script type='text/javascript'>\n \n \n // Similar to jquery toggle.\n function ws_toggle_element(id) {\n \n var e = document.getElementById(id);\n if (e.style.display != 'none') {\n e.style.display = 'none';\n }\n else {\n e.style.display = 'block';\n }\n \n }\n \n \n </script>\n \n \n \";\n \n $GLOBALS[\"ws_already_wspm_styles\"] = TRUE;\n }\n \n \n $rtn .= \"<div class='wspm-message'>&bull; $str</div>\";\n\n \n if ($return_as_string) return $rtn;\n \n print $rtn;\n \n \n}", "function gfwa_print_list_items( $instance ) {\n do_action( 'gfwa_print_list_items', $instance );\n}", "public function printItems()\n {\n return view('items.print');\n }", "function woocommerce_pip_order_bulk_action() {\n\n\t$wp_list_table = _get_list_table( 'WP_Posts_List_Table' );\n\t$action = $wp_list_table->current_action();\n\n\tif ( $action == 'print_invoice' || $action=='print_packing' ) {\n\t\t$posts = '';\n\n\t\tforeach( $_REQUEST['post'] as $post_id ) {\n\t\t\tif ( empty( $posts ) ) {\n\t\t\t\t$posts = $post_id;\n\t\t\t} else {\n\t\t\t\t$posts .= ','.$post_id;\n\t\t\t}\n\t\t}\n\n\t\t$forward = wp_nonce_url( admin_url(), 'print-pip' );\n\t\t$forward = add_query_arg( array( 'print_pip' => 'true', 'post' => $posts, 'type' => $action ), $forward );\n\t\twp_redirect( $forward );\n\t\texit();\n\t}\n}", "public function print_modals() {\n\n\t\t$release = new pkppgPluginRelease();\n\n\t\t$this->print_modal( 'pkp-release-modal', $release->get_form(), __( 'Release', 'pkp-plugin-gallery' ) );\n\t}", "private function generateWindow($arr_item)\r\n\t\t{\r\n\t\t\t//reverse window\r\n\t\t\tif ($this->reverse) {\r\n\t\t\t\t$window = \"<div class=\\\"windower_side\\\">\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_body\\\">\r\n\t\t\t\t\t\t\t\t\t\t<a href=\\\" \".$arr_item[2].\" \\\" class=\\\"windower_side_link\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<img src=\\\" \".$this->imgsUrl.$arr_item[3].\" \\\" class=\\\"windower_side_img\\\">\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_top\\\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>\".$arr_item[1].\"</h2>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\";\r\n\t\t\t} //common window\r\n\t\t\telse {\r\n\t\t\t\t$window = \"<div class=\\\"windower_side\\\">\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_top\\\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>\".$arr_item[1].\"</h2>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_body\\\">\r\n\t\t\t\t\t\t\t\t\t\t<a href=\\\" \".$arr_item[2].\" \\\" class=\\\"windower_side_link\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<img src=\\\" \".$this->imgsUrl.$arr_item[3].\" \\\" class=\\\"windower_side_img\\\">\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\";\r\n\t\t\t}\r\n\r\n\t\t\treturn $window;\r\n\t\t}", "function woocommerce_output_product_data_tabs()\n {\n }", "public function packagePrintAction()\n {\n $data = Mage::helper('enterprise_rma')->decodeTrackingHash($this->getRequest()->getParam('hash'));\n\n if ($data['key'] == 'rma_id') {\n $this->_loadValidRma($data['id']);\n }\n $model = Mage::getModel('enterprise_rma/shipping_info')\n ->loadPackage($this->getRequest()->getParam('hash'));\n\n if ($model) {\n $pdf = Mage::getModel('sales/order_pdf_shipment_packaging')\n ->setPackageShippingBlock(\n Mage::getBlockSingleton('enterprise_rma/adminhtml_rma_edit_tab_general_shippingmethod')\n )\n ->getPdf($model)\n ;\n\n $this->_prepareDownloadResponse(\n 'packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(),\n 'application/pdf'\n );\n }\n }", "function woocommerce_pip_add_box() {\n\n\tadd_meta_box( 'woocommerce-pip-box', __( 'Print invoice/packing list', 'woocommerce-pip' ), 'woocommerce_pip_create_box_content', 'shop_order', 'side', 'default' );\n}", "public function makeEditWindow()\r\n\t\t{\r\n\t\t\t$windowerUrl = $this->baseUrl . \"Windower/\";\r\n\t\t\t//$windowerUrl = filter_var($windowerUrl, FILTER_SANITIZE_URL);\r\n\r\n\t\t\t$windows = \"<div class=\\\"windower_main_\".$this->templateId.\"\\\">\";\r\n\r\n\t\t\t//if database is set\r\n\t\t\tif ($this->database != NULL) {\r\n\t\t\t\tforeach ($this->getRecordsFromDatabase(-1) as $arr_item) {\r\n\t\t\t\t\t$windows .= $this->generateEditWindow($arr_item, $windowerUrl);\r\n\t\t\t\t}\r\n\t\t\t} //if file is set\r\n\t\t\telse {\r\n\t\t\t\tforeach ($this->file as $line) {\r\n\t\t\t\t\tif (!ctype_space($line)) {\r\n\t\t\t\t\t\t$line = htmlspecialchars($line);\r\n\t\t\t\t\t\t$arr_item = explode(';', $line);\r\n\r\n\t\t\t\t\t\t$windows .= $this->generateEditWindow($arr_item, $windowerUrl);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn $windows .= \"</div>\";\r\n\t\t}", "function displayPrinterFriendly() {\n $vclNumber = $_SESSION['SJL_vclNumber'];\n $timeDesired = $_SESSION['SJL_timeDesired'];\n $dataStr = $_SESSION['SJL_dataStr'];\n\n /*\n Construct page:\n */\n site_headerPF('Shop Job List');\n\n $page_str = <<<EOPAGESTR\n\n<h2>SAMEH R LABIB, LLC.<br/>443-538-1746</h2>\n\n<p>vehicle number: $vclNumber <br/>target date: $timeDesired </p>\n\n<h3>Info. for Shop</h3>\n$dataStr\n\nEOPAGESTR;\n echo $page_str;\n site_footerPF();\n return;\n}", "function wc_print_js()\n {\n }", "function plumbing_parts_woocommerce_wrapper_start() {\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !plumbing_parts_storage_empty('shop_mode') ? plumbing_parts_storage_get('shop_mode') : 'thumbs'; ?>\">\n\t\t\t<?php\n\t\t}\n\t}", "function cbone_print_and_go($nid){\n\tcbone_auto_generated_slide_image($nid);\n\tglobal $user;\n\t$output = '';\n\t$photos = array();\n\t$x = 0;\n\t$listing_node = node_load($nid);\n\t$address = isset($listing_node->field_lms_listing_address['und']['0']['value']) ? $listing_node->field_lms_listing_address['und']['0']['value'] .', ': '';\n\t$city = isset($listing_node->field_lms_listing_city['und']['0']['value']) ? $listing_node->field_lms_listing_city['und']['0']['value'] .', ': '';\n\t$state = isset($listing_node->field_lms_listing_state['und']['0']['value']) ? $listing_node->field_lms_listing_state['und']['0']['value'] .', ': '';\n\t$zip = isset($listing_node->field_lms_listing_zip['und']['0']['value']) ? $listing_node->field_lms_listing_zip['und']['0']['value'] .', ': '';\n\t$listing_address = $address.$city.$state.$zip;\n\t\n\t//Query to get pdf brouchers, display document values\n\t$query=db_select('cbone_website_settings', 'cws')\n\t\t->fields('cws')\n\t\t->condition('nid', $nid, '=');\n\t$result= $query->execute()->fetchAll();\n\tif(!empty($result)){\n\t\tforeach($result as $value){\n\t\t\t$pdf_brochure = $value->print_and_go;\n\t\t\t$shared_pdf_brochure = $value->shared_lisitng;\n\t\t\t$active = $value->web_page_active;\n\t\t}\n\t}\n\telse{\n\t\t$pdf_brochure = 0;\n\t\t$shared_pdf_brochure = 0;\n\t\t$active = 0;\n\t}\n\t\t\n\t$variables = array(\n\t\t'listing_address' => $listing_address,\n\t\t'listing_nid' => $nid,\n\t\t'pdf_brochures'=>$pdf_brochure,\n\t\t'shared_pdf_brochures'=>$shared_pdf_brochure,\n\t\t'web_page_active' => $active,\n\t);\n\t\n\t$output = theme('print_and_go', array('var_name' => $variables));\n\treturn $output;\n}", "function pippin_sample_output_function() {\n\tdo_action('pippin_before_output');\n\techo '<div id=\"content\">This is just sample content</div>';\n\tdo_action('pippin_after_output');\n}", "static function printPartnerSlider(){\n print ('\t\n <!-- prs patner slider Start -->\n <div class=\"prs_patner_main_section_wrapper\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\n <div class=\"prs_heading_section_wrapper\">\n <h2>Our Patner’s</h2>\n </div>\n </div>\n <div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12\">\n <div class=\"prs_pn_slider_wraper\">\n <div class=\"owl-carousel owl-theme\">\n <div class=\"item\">\n <div class=\"prs_pn_img_wrapper\">\n <img src=\"images/content/p1.jpg\" alt=\"patner_img\">\n </div>\n </div>\n <div class=\"item\">\n <div class=\"prs_pn_img_wrapper\">\n <img src=\"images/content/p2.jpg\" alt=\"patner_img\">\n </div>\n </div>\n <div class=\"item\">\n <div class=\"prs_pn_img_wrapper\">\n <img src=\"images/content/p3.jpg\" alt=\"patner_img\">\n </div>\n </div>\n <div class=\"item\">\n <div class=\"prs_pn_img_wrapper\">\n <img src=\"images/content/p4.jpg\" alt=\"patner_img\">\n </div>\n </div>\n <div class=\"item\">\n <div class=\"prs_pn_img_wrapper\">\n <img src=\"images/content/p5.jpg\" alt=\"patner_img\">\n </div>\n </div>\n <div class=\"item\">\n <div class=\"prs_pn_img_wrapper\">\n <img src=\"images/content/p6.jpg\" alt=\"patner_img\">\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <!-- prs patner slider End -->\n\t ');\n }", "function woocommerce_output_content_wrapper()\n {\n }", "public function WinTool() {\n \treturn array('items'=>$this->items);\n }", "function kleo_woo_orders_screen() {\n\t\tadd_action( 'bp_template_content', 'kleo_woo_orders_screen_content' );\n\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}", "public function actionPrintList()\n\t{\n\t\tAudit::add('diary','print list');\n\n\t\tYii::app()->getClientScript()->registerCssFile(Yii::app()->createUrl(\n\t\t\tYii::app()->getAssetManager()->publish(\n\t\t\t\tYii::getPathOfAlias('application.modules.'.$this->getModule()->name.'.assets')\n\t\t\t).'/css/module.css'\n\t\t));\n\n\t\t$this->renderPartial('_print_list', array('bookings'=>$this->getBookingList($_POST)), false, true);\n\t}", "public static function print_receipts($purchases)\n {\n //init variables\n $format = 'printer';\n $printer = ['order_id'=>$purchases, 'restrictions'=>[], 'items'=>[], 'qty'=>0, 'total'=>0, 'info'=>[]];\n try {\n \n if(!empty($purchases))\n {\n $purchases = explode(',', $purchases);\n $items = DB::table('purchases')\n ->join('tickets', 'tickets.id', '=' ,'purchases.ticket_id')\n ->join('packages', 'packages.id', '=' ,'tickets.package_id')\n ->join('discounts', 'discounts.id', '=' ,'purchases.discount_id')\n ->join('show_times', 'show_times.id', '=', 'purchases.show_time_id')\n ->join('shows', 'shows.id', '=', 'show_times.show_id')\n ->join('venues', 'venues.id', '=', 'shows.venue_id')\n ->select(DB::raw('purchases.id, purchases.quantity, purchases.price_paid, tickets.ticket_type AS ticket_type_type, show_times.time_alternative,\n show_times.show_time, discounts.code, IF(packages.title!=\"None\", packages.title, \"\") AS title, tickets.inclusive_fee,\n shows.name AS show_name, shows.restrictions, \n venues.name AS venue_name, venues.ticket_info'))\n ->whereIn('purchases.id', $purchases)\n ->groupBy('purchases.id')->get(); \n \n //get info\n foreach ($items as $i)\n {\n \n if(!empty($i->restrictions) && $i->restrictions != 'None' && !in_array($i->restrictions, $printer['restrictions']))\n $printer['restrictions'][] = $i->restrictions;\n $printer['qty'] += $i->quantity;\n $printer['total'] += $i->price_paid;\n if(!empty($i->ticket_info) && !in_array($i->ticket_info, $printer['info']))\n $printer['info'][] = $i->ticket_info;\n $printer['items'][] = $i;\n }\n }\n } catch (Exception $ex) {\n \n } finally {\n return View::make('command.report_sales_receipt', compact('printer','format'))->render();\n }\n }", "function print_auction_bit($projectid = 0, $filtered_auctiontype = '', $project_details = '', $project_state = '', $buynow_price = '', $buynow_qty = '', $reserve = 0, $cid = 0)\n{\n\tglobal $ilance, $myapi, $phrase, $show, $ilconfig;\n \n $html = '';\n \n if ($project_state == 'product')\n {\n if ($project_details == 'unique')\n {\n $html = $phrase['_lowest_unique_bid__single_item'];\n }\n else\n {\n if ($filtered_auctiontype == 'fixed')\n {\n $html = $phrase['_fixed_price_event__multiple_buy_now_option'];\n }\n else if ($filtered_auctiontype == 'regular')\n {\n $other = '';\n if ($reserve > 0)\n {\n $other = $phrase['_plus_reserve_price'];\n }\n if ($buynow_price AND $buynow_qty > 0)\n {\n $other .= ' ' . $phrase['_plus_buy_now_option']; \n }\n \n $html = $phrase['_regular_auction__single_item'] . ' ' . $other;\n } \n }\n }\n else if ($project_state == 'service')\n {\n $html = $phrase['_reverse_auction']; \n }\n \n ($apihook = $ilance->api('print_auction_bit_end')) ? eval($apihook) : false;\n \n\treturn $html;\n}", "function print_item_photo_new($url = 'javascript:void(0)', $mode = '', $projectid = 0, $borderwidth = '0', $bordercolor = '#ffffff')\n{\n global $ilance, $myapi, $ilconfig, $ilpage, $phrase;\n \n $html = '';\n \n // query database for product image for preview\n $ufile = $ilance->db->query(\"\n SELECT attachid, filename, filehash, attachtype\n FROM \" . DB_PREFIX . \"attachment\n WHERE project_id = '\" . intval($projectid) . \"'\n AND (attachtype = 'itemphoto' OR attachtype = 'slideshow')\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($ufile) > 0)\n {\n $pictures = 0;\n while ($rfile = $ilance->db->fetch_array($ufile))\n {\n if ($rfile['attachtype'] == 'itemphoto')\n {\n switch ($mode)\n {\n case 'thumb':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"../' . $ilpage['attachment'] . '?cmd=thumb&amp;subcmd=results&amp;id=' . $rfile['filehash'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n\t\t\t\t\t\t\n ($apihook = $ilance->api('foto_thumb')) ? eval($apihook) : false;\n\t\t\t\t\t\t\n break;\n }\n\t\t\t\t\t\t\t\t\t\tcase 'thumbgallery':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' . $ilpage['attachment'] . '?cmd=thumb&amp;subcmd=resultsgallery&amp;id=' . $rfile['filehash'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n break;\n }\n\t\t\t\t\t\t\t\t\t\tcase 'thumbsnapshot':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' . $ilpage['attachment'] . '?cmd=thumb&amp;subcmd=resultssnapshot&amp;id=' . $rfile['filehash'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n break;\n }\n case 'full':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' . $ilpage['attachment'] . '?id=' . $rfile['filehash'] . '\" alt=\"\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" /></a>';\n break;\n }\n case 'checkup':\n {\n return '1';\n break;\n }\n }\n }\n else if ($rfile['attachtype'] == 'slideshow')\n {\n $pictures++;\n }\n }\n \n if ($mode == 'thumb' AND $pictures > 0)\n {\n $html1 = '\n <div class=\"gallery-thumbs-cell\">\t\t\t\n <div class=\"gallery-thumbs-entry\">\n <div class=\"gallery-thumbs-main-entry\">\n <div class=\"gallery-thumbs-wide-wrapper\">\n <div class=\"gallery-thumbs-wide-inner-wrapper\">';\n $html1 .= $html;\n $html1 .= '<div class=\"gallery-thumbs-corner-text\"><span>' . ($pictures + 1) . ' photos</span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ';\n \n $html = $html1;\n }\n }\n else \n {\n $html = '<img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'nophoto.gif\" alt=\"\" border=\"0\" />';\n }\n \n \n return $html;\n}", "public function productpreviewmodal() { \n\t\tob_start(); \n\t\tglobal $yith_wcwl, $theme_settings;\n\t\t$productid = $_GET['productid']; \n\t\t$loading_location = $_GET['loading_location']; \n\t\t$temp = $post;\n\t\t$productpost = get_post( $productid );\n\t\tsetup_postdata( $post );\n\t\t$product_sku = get_post_meta($productid,'_sku', true);\n\t\t$product_price = get_post_meta($productid,'_regular_price', true);\n\t\t$currency = 'Rs. ';\n\t\t$product_sale_price = get_post_meta($productid,'_sale_price', true);\n\t\t$product_discount = get_post_meta($productid,'_product_discount', true);\n\t\t$images = get_post_meta($productid, '_product_image_gallery', true);\n\t\t$terms = get_the_terms( $productid, 'product-discount' );\n\t\t$product_author = $productpost->post_author;\n\t\t$product_deal = get_post_meta($productid,'product_deal', true);\n\t\t$product_mallid = get_post_meta($productid,'mall',true);\n\t\t$product_mall = get_the_title($product_mallid);\n\t\t$product_shopid = get_post_meta($productid,'shop',true);\n\t\t$product_shop = get_the_title($product_shopid);\n\t\t$merchant_preview_product = '';\n\t\t$content = $productpost->post_excerpt;\n\t\t$phoneno = get_post_meta($product_shopid, 'shop_phone_num', true);\n\t\t$size_chart = get_post_meta($productid, 'clothing_size_chart', true);\n\t\t\n $product_view_count = get_post_meta($productid, 'product_views', true);\n $product_view_count++;\n update_post_meta($productid, 'product_views', $product_view_count);\n \n\t\t$lat1 = isset($_COOKIE['me_lat']) ? $_COOKIE['me_lat'] : '';\n\t\t$lng1 = isset($_COOKIE['me_lng']) ? $_COOKIE['me_lng'] : '';\n\t\t$lat2 = get_post_meta($product_shopid, 'latitude', true);\n\t\t$lng2 = get_post_meta($product_shopid, 'longitude', true);\n\t\t$unitdistance = 'K';\n\n//\t\t$distance_flag = calc_distance($lat1, $lng1, $lat2, $lng2, $unitdistance);\t\t\n\n\t\tif($loading_location=='merchant') {\n\t\t\t$merchant_preview_product = 'merchant_preview_product';\n\t\t}\n\t\t$attributes = get_post_meta($productid);\n\t\t$url = site_url().'/wp-content/plugins/yith-woocommerce-wishlist/yith-wcwl-ajax.php?action=mm_add_to_wishlist&add_to_wishlist='.$productid;\n\t\t?>\n\t\t<div class=\"product_view_wrap <?php echo $merchant_preview_product; ?>\">\n\t\t\t<div class=\"modal fade\" id=\"productview<?php echo $productid; ?>\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"productviewmodal\" aria-hidden=\"true\">\n\t\t\t <div class=\"modal-dialog modal-lg\">\n\t\t\t <div class=\"modal-content\">\n\t\t\t\t \t<div class=\"modal-header\">\n\t\t\t\t \t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/close-btn-prod.png\"></span><span class=\"sr-only\"></span></button>\n\t\t\t\t </div>\n\t\t\t\t <div class=\"modal-body\">\n\t\t\t\t\t <div class=\"product_info row\">\n\t\t\t\t\t \t<?php \n\t\t\t\t\t \t$urlview = get_permalink($theme_settings['wishlistpage']);\n\t\t\t\t\t \tif(!$yith_wcwl->is_product_in_wishlist( $productid )) { ?>\n\t\t\t\t\t \t \t<div class=\"product_wishlist add_product_to_wishlist\" style=\"cursor:pointer;\" data-action=\"<?php echo $url; ?>\" title=\"Add To Wishlist\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist.png\" /><i class=\"fa fa-cog fa-spin wishlistajaxloader\"></i></div>\n\t\t\t\t\t \t \t<a href=\"<?php echo $urlview; ?>\" class=\"product_wishlist_added\" title=\"View Wishlist\" style=\"cursor:pointer; display: none;\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist-red.png\" /></a>\n\t\t\t\t\t \t \t<?php } else { ?>\n\t\t\t\t\t \t \t<a href=\"<?php echo $urlview; ?>\" class=\"product_wishlist_added\" title=\"View Wishlist\" style=\"cursor:pointer; text-decoration: none;\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist-red.png\" /></a>\n\t\t\t\t\t \t \t<?php } ?>\n\t\t\t\t\t \t \t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t \t \t<div class=\"product_slider col-sm-4\">\n\t\t\t\t\t\t \t \t <div class=\"row\">\n<!--\t\t\t\t\t\t\t \t \t <div class=\"vericalwrap col-sm-4\">\n\t\t\t\t\t\t\t\t \t \t\t<ul id=\"productvertical<?php echo $productid; ?>\" class=\"elastislide-list\">\n\t\t\t\t\t\t\t\t \t \t\t \t<?php\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$sliderhtml = '';\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$thumb_id = get_post_thumbnail_id($productid);\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$first_thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t$first_thumb_url = $first_thumb_url_array[0];\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .='<li slideto=\"0\" style=\"cursor: pointer;\" class=\"active_product_thumb\">';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '<img src=\"'.$first_thumb_url.'\" />';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '</li>';\n//\t\t\t\t\t\t\t\t \t \t\t \t\t\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$images = get_post_meta($productid, '_product_image_gallery', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t$images_array = explode(\",\", $images);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t if ( $images!=\"\" ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t \t$ic=1;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t foreach ( $images_array as $image ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $thumb_url_array = wp_get_attachment_image_src($image, 'thumbnail', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $thumb_url = $thumb_url_array[0];\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .='<li slideto=\"'.$ic.'\" style=\"cursor: pointer;\">';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '<img src=\"'.$thumb_url.'\" />';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '</li>';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $ic++;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t }\n//\t\t\t\t\t\t\t\t\t\t\t\t\t } \n//\t\t\t\t\t\t\t\t\t\t\t\t\t echo $sliderhtml;\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</ul> carousevertical end \n\t\t\t\t\t\t\t \t \t</div>-->\n\t\t\t\t\t\t\t \t \t\t<div class=\"full_product_slider col-sm-12\">\n\t\t\t\t\t\t\t \t \t\t\t<!-- <div id=\"carousel-product<?php echo $productid; ?>\" class=\"carousel slide\" data-ride=\"carousel\">\n\t\t\t\t\t\t\t \t \t\t\t\t<div class=\"carousel-inner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t<?php //echo $this->product_slider($productid); ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t \t \t\t\t</div> -->\n\t\t\t\t\t\t\t \t \t\t\t<div class=\"product_images_slider\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo $this->mobile_product_slider($productid); ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t \t \t\t\t\n\n\t\t\t\t\t\t\t \t \t\t</div> <!-- full_product_slider end -->\n\t\t\t\t\t\t\t \t \t</div>\n\t\t\t\t\t\t \t \t</div> <!-- product_slider end -->\n\t\t\t\t\t\t \t \t<div class=\"product_description col-sm-8\">\n\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t \t \t\t<h2 class=\"product_title\"><a href=\"<?php echo get_permalink($productid); ?>\"><?php echo get_the_title($productid); ?></a></h2>\n\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t \t \t\t<?php if($product_sku != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_id\">Product Id: <span><?php echo $product_sku; ?></span></div> <!-- product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?> \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<?php //if($product_mall != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<!--<div class=\"product_mall\"><i class=\"fa fa-building-o\"></i><b> Location:</b> <span><?php //echo $product_mall; ?></span></div> product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php //} ?>\n\n\t\t\t\t\t\t \t \t\t<?php if($product_shop != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_shop\"><i class=\"fa fa-bank\"></i><b> Shop:</b> <span><?php echo $product_shop; ?></span></div> <!-- product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<?php if($phoneno != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<!--<div class=\"phoneno\"><i class=\"fa fa-phone\"></i><b> Phone No:</b> <span><?php // echo $phoneno; ?></span></div> product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t \t \t\t<div class=\"product_size\">\n\t\t\t\t\t\t \t \t\t\t<?php \n//\t\t\t\t\t\t \t \t\t\t\tif(!empty($attributes) || $attributes!=\"\") {\n//\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $attributes as $attribute ) :\n//\t\t\t\t\t\t\t\t\t\t\t\t\t$taxonomy_object = get_taxonomy( $attribute['name'] );\n//\t\t\t\t \t\t\t\t\t\tif($attribute['name'] == 'pa_size' || $attribute['name'] == 'pa_shoes-sizes'){\t\n//\t\t\t\t\t \t\t\t\t\t\t$label = $taxonomy_object->label;\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\techo 'Size: '; \n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( $attribute['is_taxonomy'] ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$values = wc_get_product_terms( $productid, $attribute['name'], array( 'fields' => 'names', 'orderby' => 'term_order' ) );\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasort($values);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($values as $value) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<span class=\"size\" style=\"cursor:pointer;\">' .$value.'</span>';\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} else {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Convert pipes to commas and display values\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$values = array_map( 'trim', explode( WC_DELIMITER, $attribute['value'] ) );\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<span class=\"size\" style=\"cursor:pointer;\">' .implode( ', ', $values ).'</span>';\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\tif(trim(strip_tags($size_chart)) !=''){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<p class=\"sizechartlink\" style=\"margin-top: 10px;\"><a href=\"'.get_permalink($productid).'#sizechart\">Size Help</a></p>';\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n//\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\telse{}\n//\t\t\t\t\t\t\t\t\t\t\t\t\tendforeach; \n//\t\t\t\t\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<!--<input type=\"hidden\" class=\"selected_csize\" value=\"\" />-->\n\t\t\t\t\t\t \t \t\t</div><!-- product_size end -->\n\n\t\t\t\t\t\t \t \t\t<?php\n//\t\t\t\t\t\t \t \t\tif($distance_flag!='error') {\n//\t\t\t\t\t\t \t \t\t?>\t\n<!--\t\t\t\t\t\t \t \t\t<div class=\"distance_from_your_location\">\n\t\t\t\t\t\t \t \t\t\t<label>Distance From Your Location : </label> //<?php // echo round($distance_flag, 2).' KM'; ?>\n\t\t\t\t\t\t \t \t\t\t<a href=\"https://maps.google.com?saddr=//<?php // echo $lat1.','.$lng1; ?>&daddr=<?php // echo $lat2.','.$lng2; ?>\" target=\"_blank\">Get Direction</a>\n\t\t\t\t\t\t \t \t\t</div>-->\n\t\t\t\t\t\t \t \t\t<?php\n//\t\t\t\t\t\t \t \t\t}\n\t\t\t\t\t\t \t \t\t?>\n\t\t\t\t\t\t \t \t\t\t\n\t\t\t\t\t\t \t \t\t<?php if($content !='' ){ ?>\n\t\t\t\t\t\t\t \t \t\t<div class=\"product_detail_info\">\n\t\t\t\t\t\t\t \t \t\t\t\n\t\t\t\t\t\t\t\t \t \t\t\t<div class=\"show_product_detailed_desc\" change_desc_text1=\"Detailed Product Description\" change_desc_text2=\"Show Detailed Product Description...\" open_close=\"open\" style=\"cursor: pointer;\">Show Detailed Product Description...</div>\n\t\t\t\t\t\t\t\t \t \t\t\t<div class=\"product_detail_info_inner\" style=\"display: none;\">\n\t\t\t\t\t\t\t\t \t \t\t\t\t<?php \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(!empty($attributes) || $attributes!=\"\") {\n// echo '</pre>';\n//// print_r($attributes);\n// echo '</pre>';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $attributes as $key => $attribute ) :\n////\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$taxonomy_object = get_taxonomy( $attribute['name'] );\n// \n// //$label = $taxonomy_object->label;\n// if(!empty($attribute[0])){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<div><b>'.htmlspecialchars($key).' :- </b>'; \n// foreach ( $attribute as $attribute) :\n// echo $attribute; \n// endforeach;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</div>';\n// }\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendforeach; \n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \n \n\t\t\t\t\t\t\t\t \t \t\t\t\tif($content != ''){ ?>\n\t\t\t\t\t\t\t\t \t \t\t\t\t<div><b>Detailed:- </b> <?php \n\t\t\t\t\t\t\t\t \t \t\t\t\t\t$words = explode(\" \",$content);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"popup-details\">'; echo implode(\" \",array_splice($words, 0 , 25)).\"... <a href='\".get_permalink($productid).\"'>Read More</a>\"; echo '</div>';\n\t\t\t\t\t\t\t\t \t \t\t\t\t?> </div>\n\t\t\t\t\t\t\t\t \t \t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t \t \t\t\t</div>\n\t\t\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t\t\t \t \t</div> <!-- product_detail_info end -->\n\t\t\t\t\t\t\t \t \t<?php } else{ } ?>\n\t\t\t\t\t\t \t \t\t<div class=\"product_price\">\n\t\t\t\t\t\t \t \t\t\t<?php\n setlocale(LC_MONETARY, 'en_IN');\n $product_price1 = money_format('%!.0n', $product_price);\n if($product_sale_price!='') {\n \n $product_sale_price1 = money_format('%!.0n', $product_sale_price);\n \n ?>\n\t \t\t\t\t\t\t<div class=\"discount_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_sale_price != ''){ echo $currency . $product_sale_price1.\"/-\" ;}?></div>\n\t \t\t\t\t\t\t\t <div class=\"original_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_price != ''){ echo $currency . $product_price1.\"/-\"; }?></div>\n\t \t\t\t\t\t<?php } else { ?>\n\t \t\t\t\t\t<div class=\"discount_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_price != ''){ echo $currency . $product_price1.\"/-\" ;}?></div>\n\t \t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\t<?php if($product_deal!=''){$dealcol = 'col-xs-5';} else{$dealcol = 'col-xs-4';} ?>\n\t\t\t\t\t\t \t \t\t\t<div class=\"discount col-sm-4 col-md-6 <?php echo $dealcol; ?>\">\n\t\t\t\t\t\t\t \t \t\t\t<?php \n\t\t \t\t\t\t\t\tif($product_deal!='') { ?>\n\t\t\t\t\t\t\t \t \t\t\t\t<span><?php echo $product_deal; ?></span>\n\t\t\t\t\t\t\t \t \t\t\t<?php\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\telse if($product_discount !=''){ ?>\n\t\t \t\t\t\t\t\t<span><?php echo $product_discount.''; ?> </span>\n\t\t\t\t\t\t\t \t \t\t\t<?php } \n\t\t \t\t\t\t\telse{}\n\t\t \t\t\t\t?>\n\t\t\t\t\t\t \t \t\t\t</div>\n\t\t\t\t\t\t \t \t\t</div>\n\t\t\t\t\t\t \t \t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"product_malling_delivery\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_malling product_malling_delivery_tooltip col-sm-6 col-xs-6\" data-action=\"malling\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Generate coupon and pick up ur order\">Malling</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_delivery product_malling_delivery_tooltip col-sm-6 col-xs-6\" data-action=\"gd\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Get it delivered with Rs 100 Laziness Charge\">Feeling Lazy</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t</div> <!-- end product_malling_delivery -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"product_enquiry col-sm-12\">\n\t\t\t\t\t\t\t\t\t\t\t<span>How do we connect with you? </span>\n\t\t\t\t\t\t\t\t\t\t\t<ul class=\"success_error\"></ul>\n\t\t\t\t\t\t\t\t\t\t\t<form class=\"get_coupon\" action=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p><input type=\"text\" name=\"user_phone\" placeholder=\"enter your phone number\" /></p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"product_enquiry_option\">or</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p><input type=\"text\" name=\"user_email\" placeholder=\"enter your email address\" required /></p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"product_enquiry_button\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-cog fa-spin cgd_loader\"></i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary malling_gd\" data-malling=\"Generate Coupon\" data-gd=\"Shopkeeper will connect with you\">Generate Coupon</button>\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"product_author\" value=\"<?php echo $product_author; ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"product_id\" value=\"<?php echo $productid; ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"form-action\" class=\"form-action\" value=\"malling\" />\n\t\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t</div><!-- end product_enquiry-->\n\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\n\t\t\t\t\t\t \t \t</div> <!-- product_description end -->\n\t\t\t\t\t\t \t\n\t\t\t\t \t </div><!-- product_info end -->\n\t\t\t\t </div> <!-- end modal-body -->\n\t\t\t </div> <!-- end modal-content -->\n\t\t\t </div><!-- end modal-dialog -->\n\t\t\t</div><!-- end modal -->\n\t\t</div><!-- end product_view_wrap -->\n\n\t\t<?php\t\n\t\twp_reset_postdata();\n\t\t$post = $temp;\n\t\t$modal = ob_get_clean();\n\t\techo json_encode(array('modal'=>$modal));\n\t\tdie(0);\n\t}", "public function report_print_page() {\n\n\t\t?>\n\t\t<!doctype html>\n\t\t<html>\n\t\t<head>\n\t\t\t<meta charset=\"utf-8\">\n\t\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n\t\t\t<title><?php esc_html_e( 'WPForms Survey Print Preview', 'wpforms-surveys-polls' ); ?> - <?php echo esc_html( sanitize_text_field( $this->form_data['settings']['form_title'] ) ); ?></title>\n\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t\t<meta name=\"robots\" content=\"noindex,nofollow,noarchive\">\n\t\t\t<?php\n\t\t\tdo_action( 'admin_enqueue_scripts' );\n\t\t\tdo_action( 'admin_print_scripts' );\n\t\t\tdo_action( 'admin_head' );\n\t\t\t?>\n\t\t</head>\n\t\t<body id=\"wpforms-survey-print-preview\">\n\t\t\t<h1 class=\"header\">\n\t\t\t\t<?php echo esc_html( sanitize_text_field( $this->form_data['settings']['form_title'] ) ); ?>\n\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t<button type=\"button\" id=\"wpforms-survey-print-close\"><?php esc_html_e( 'Close', 'wpforms-surveys-polls' ); ?></button>\n\t\t\t\t\t<button type=\"button\" id=\"wpforms-survey-print\"><?php esc_html_e( 'Print', 'wpforms-surveys-polls' ); ?></button>\n\t\t\t\t</div>\n\t\t\t</h1>\n\t\t\t<div id=\"wpforms-survey-report\">\n\t\t\t\t<?php echo $this->display_loader( ! empty( $_GET['field_id'] ) ); // WPCS: XSS ok. // WPCS: CSRF ok. ?>\n\t\t\t</div>\n\t\t\t<?php do_action( 'admin_print_footer_scripts' ); ?>\n\t\t</body>\n\t\t</html>\n\t\t<?php\n\t\texit();\n\t}", "public function printing($item_id){\n\n $obj=Items::get_field_from_id($item_id,'label');\n\n echo \"****************\\n\";\n echo $obj . \"\\n\";\n echo \"****************\\n\";\n }", "function cr_print_js_function(){\n\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tfunction printDiv(id){\n\t\t\t\tvar cdiv, tmpw;\n\t\t\t \n\t\t\t\tcdiv = document.getElementById(id);\t\t\t\t \n\t\t\t\ttmpw = window.open(\" \",\"Print\");\n\t\t\t \n\t\t\t\ttmpw.document.open();\n\t\t\t\ttmpw.document.write('<html><body>');\n\t\t\t\ttmpw.document.write(cdiv.innerHTML);\n\t\t\t\ttmpw.document.write('</body></html>');\n\t\t\t\ttmpw.document.close();\n\t\t\t\ttmpw.print();\n\t\t\t\ttmpw.close();\n\t\t\t}\n\t\t</script>\n\t<?php\n }", "function printbuttons($content) {\r\n\t\t\t\r\n\t\t\t$wpLoad = ABSPATH;\r\n\r\n\t\t\tif ((is_single() && get_option('print_button_posts') == 'on'))\r\n\t\t\t{ \t\r\n\t\t\t\t$content .=\"<a href=\".plugins_url().\"\".\"/Printer-Friendly-WP/print.php?arl=\".$wpLoad.\"&id=\".\"\". get_the_ID() .\"\".\" target=\".\"_blank\".\" rel='nofollow' class=\".\"print-button\".\"></a>\";\r\n\t\t\t\t\r\n\t\t\t\treturn $content;\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ((is_page() && get_option('print_button_pages') == 'on'))\r\n\t\t\t{\r\n\t\t\t\t$content .=\"<a href=\".plugins_url().\"\".\"/Printer-Friendly-WP/print.php?arl=\".$wpLoad.\"&id=page_id=\".\"\". get_the_ID() .\"\".\" target=\".\"_blank\".\" rel='nofollow' class=\".\"print-button\".\"></a>\";\r\n\t\t\t\t\r\n\t\t\t\treturn $content;\r\n\t\t\t}\r\n\t\t\t\r\n\treturn $content;\r\n}", "function tombolPrintAll(){\n\t\t//$paramFile=Yii::$app->getRequest()->getQueryParam('id');\n\t\t$title = Yii::t('app','Print All');\n\t\t$url = Url::toRoute(['/payroll/absen-daily/print-all']);\n\t\t$options1 = [\n\t\t\t\t\t'value'=>$url,\n\t\t\t\t\t'id'=>'payroll-printall',\n\t\t\t\t\t'data-pjax' => true,\t\t\t\t\t\n\t\t\t\t\t'class'=>\"btn btn-default btn-xs\",\n\t\t\t\t\t'title'=>'Print Slip gaji',\n\t\t\t\t\t//'style'=>['text-align'=>'left','color:red','margin-left'=>'0px','width'=>'100%', 'height'=>'25px','border'=> 'none'],\t\t\t\t\t\t\t\t\n\t\t];\n\t\t$icon1 = '\n\t\t\t<span class=\"fa-stack fa-xs\">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t<i class=\"fa fa-circle-thin fa-stack-2x \" ></i>\n\t\t\t\t<i class=\"fa fa-print fa-stack-1x\" style=\"color:black\"></i>\n\t\t\t</span>\n\t\t'; \n\t\t$label1 = $icon1 . ' ' . $title;\n\t\t$content = Html::button($label1,$options1);\n\t\treturn $content;\t\t\n\t\t//return '<li>'.$content.'</li>';\n\t}", "function custom_print($event,$added)\n\t{\n\t\t\t$vars = array(\n\t\t\t'menuaction' => 'bcalendar.bcalendar_uiforms.edit',\n\t\t\t'cal_id' => $event['id'],\n\t\t\t'print' => true,\n\t\t\t);\n\t\treturn \"window.open('\".egw::link('/index.php',$vars).\"','_blank','width=700,height=700,scrollbars=yes,status=no');\";\n\t}", "function kleo_woo_orders_screen_content() {\n\t\techo '<div class=\"woocommerce\">';\n\t\twc_get_template( 'myaccount/my-orders.php', array( 'order_count' => 'all' ) );\n\t\techo '</div>';\n\t}", "function showOrderDetails($arr)\n\t{\n\t\t$output=' <div class=\"title_fnt\">\n\t\t<h1>Order Details</h1>\n\t\t<span><a href=\"javascript:window.open (\\'?do=orderdetail&action=print&id='.$arr[0]['orders_id'].'\\',\\'mywindow\\',\\'location=1,status=1,scrollbars=1,width=920,height=700\\');void(0);\"><button name=\"color\" type=\"button\" class=\"btn btn-danger\" value=\"btn btn-danger\">Print</button></a>\n\t\t</span>\n\n\t\t\n\t\t</div>\n\t\t\n\t\t<div id=\"myaccount_div\">\n\t\t<div class=\"myacc_detail\">\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t<div class=\"row-fluid\">\n\t\t\t\t<div class=\"span6\"><h4>Order Information</h4>\n\t\t\t<table class=\"table table-striped table-bordered\">\n\t\t\t<tr>\n\t\t\t<td>Order Id</td>\n\t\t\t<th>#'.$arr[0]['orders_id'].'</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td>Order Status </td>\n\t\t\t<th><span class=\"label label-success\">'.$arr[0]['orders_status_name'].'</span></th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td> Order Total</td>\n\t\t\t<th>'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].''.$arr[0]['order_total'].'</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td>Order Date</td>\n\t\t\t<th>'.$arr[0]['purDate'].'</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td>Close Date</td>\n\t\t\t<th>'.$arr[0]['closeDate'].'</th>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\t<div class=\"span6\"><h4>Payment Details </h4>\n\t\t\t\t<table class=\"table table-striped table-bordered\">\n\t\t\t<tr>\n\t\t\t<td>Paid Through</td>\n\t\t\t<th>'.$arr[0]['gateway_name'].'</th>\n\t\t\t</tr>\n\t\t\t\n\t\t\t</table>\n\t\t\t</div>\n\t\t\t</div>\n \t\t<div class=\"row-fluid\">\n \t\t <div class=\"span6\"><h4>Billing Address</h4><ul class=\"addresslist\">\n\t\t\t<li><address>\n\t\t\t\n\t\t\t<p>'.$arr[0]['billing_name'].'</p>\n\t\t\t<p>'.$arr[0]['billing_company'].'</p>\n\t\t\t<p> '.$arr[0]['billing_street_address'].'</p>\n\t\t\t<p>'.$arr[0]['billing_city'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['billing_postcode'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['billing_state'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['billcountry'].'</p>\n\t\t\t</address></li></ul>\n\n \t </div>\n <div class=\"span6\"><h4>Shipping Address</h4>\n\t\t\t\t<ul class=\"addresslist\">\n\t\t\t<li><address>\n\t\t\t<p>'.$arr[0]['shipping_name'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['shipping_company'].'</p>\n\t\t\t\n\t\t\t<p> '.$arr[0]['shipping_street_address'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['shipping_city'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['shipping_postcode'].'</p>\n\t\t\n\t\t\t<p>'.$arr[0]['shipping_state'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['shipcountry'].'</p>\n\t\t\t</address></li></ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\t\n\t\t\n\t\t\t<h4>Item Details</h4>\n\t\t\t\n\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\n\t\t\t<table class=\"rt cf\" id=\"rt1\">\n\t\t\t<thead class=\"cf\">\n\t\t\t<tr>\n\t\t\t\t<th>Item Details</th>\n\t\t\t\t<th>Price</th>\n\t\t\t\t<th>Quantity</th>\n\t\t\t\t<th>Shipping Charge</th>\n\t\t\t\t<th>Total</th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>';\n\t\t\t$grand=0;\n\t\t\t$ship_cost=0;\n\t\t\tfor($i=0;$i<count($arr);$i++)\n\t\t\t{\n\t\t\t\t$total=$arr[$i]['product_unit_price']*$arr[$i]['product_qty'] ;\n\t\t\t\t$output.='<tr>\n\t\t\t\t\t<td>'.$arr[$i]['title'].'</td>\n\t\t\t\t\t<td><span class=\"label label-info\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($arr[$i]['product_unit_price'],2).'</span></td>\n\t\t\t\t\t<td>'.$arr[$i]['product_qty'].'</td>\n\t\t\t\t\t<td><span class=\"label label-warning\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($arr[$i]['shipping_cost'],2).'</span></td>\n\t\t\t\t\t<td><span class=\"label label-inverse\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($total,2).'</span></td>\n\t\t\t\t</tr>';\n\t\t\t\t$grand+=$total;\n\t\t\t\t$ship_cost+=$arr[$i]['shipping_cost'];\n\t\t\t}\n\t\t\t\t$output.='<tr>\n\t\t\t\t<td colspan=\"3\" rowspan=\"3\">&nbsp;</td>\n\t\t\t\t<td>Sub Total</td>\n\t\t\t\t<td><span class=\"label label-success\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($grand,2).'</span>\t</td>\n\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td>Shipping Amount</td>\n\t\t\t\t<td><span class=\"label label-inverse\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($ship_cost,2).'</span></td>\n\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td>Grand Total</td>\n\t\t\t\t<td><span class=\"label label-important\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($arr[0]['order_total']).'</span></td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>';\n\t\treturn $output;\t\n\t}", "private function printBaseInterface()\n\t\t{\n\t\t\tglobal $wpdb;\n?>\n\t\t<script type=\"text/javascript\" src=\"<?php echo $this->module_folder;?>app.class.js\" ></script>\n\t\t<div id=\"psp-wrapper\" class=\"fluid wrapper-psp\">\n\t\t\t<?php\n\t\t\t// show the top menu\n\t\t\tpspAdminMenu::getInstance()->make_active('monitoring|monitor_404')->show_menu();\n\t\t\t?>\n\t\t\t\n\t\t\t<div id=\"psp-lightbox-overlay\">\n\t\t\t\t<div id=\"psp-lightbox-container\">\n\t\t\t\t\t<h1 class=\"psp-lightbox-headline\">\n\t\t\t\t\t\t<img class=\"psp-lightbox-icon\" src=\"<?php echo $this->the_plugin->cfg['paths']['freamwork_dir_url'];?>images/light-bulb.png\">\n\t\t\t\t\t\t<span id=\"link-details\"><?php _e('Details:', 'psp');?></span>\n\t\t\t\t\t\t<span id=\"link-add-redirect\"><?php _e('Add to Link Redirect:', 'psp');?></span>\n\t\t\t\t\t\t<a href=\"#\" class=\"psp-close-btn\" title=\"<?php _e('Close Lightbox', 'psp'); ?>\"></a>\n\t\t\t\t\t</h1>\n\n\t\t\t\t\t<div class=\"psp-seo-status-container\">\n\t\t\t\t\t\t<div id=\"psp-lightbox-seo-report-response\"></div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div id=\"psp-lightbox-seo-report-response2\">\n\t\t\t\t\t\t\t<form class=\"psp-update-link-form\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"upd-itemid\" name=\"upd-itemid\" value=\"\" />\n\t\t\t\t\t\t\t\t<table width=\"100%\">\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td width=\"120\"><label><?php _e('URL:', 'psp');?></label></td>\n\t\t\t\t\t\t\t\t\t\t<td><span id=\"old_url_list\"></span></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><label><?php _e('URL Redirect:', 'psp');?></label></td>\n\t\t\t\t\t\t\t\t\t\t<td><input type=\"text\" id=\"new_url_redirect2\" name=\"new_url_redirect2\" value=\"\" class=\"psp-add-link-field\" /></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" class=\"psp-button green\" value=\"<?php _e('Add to Link Redirect', 'psp'); ?>\" id=\"psp-submit-to-builder2\">\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style=\"clear:both\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<!-- Main loading box -->\n\t\t\t<div id=\"psp-main-loading\">\n\t\t\t\t<div id=\"psp-loading-overlay\"></div>\n\t\t\t\t<div id=\"psp-loading-box\">\n\t\t\t\t\t<div class=\"psp-loading-text\"><?php _e('Loading', 'psp');?></div>\n\t\t\t\t\t<div class=\"psp-meter psp-animate\" style=\"width:86%; margin: 34px 0px 0px 7%;\"><span style=\"width:100%\"></span></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<!-- Content -->\n\t\t\t<div id=\"psp-content\">\n\t\t\t\t\n\t\t\t\t<h1 class=\"psp-section-headline\">\n\t\t\t\t\t<?php echo $this->module['monitor_404']['menu']['title'];?>\n\t\t\t\t\t<span class=\"psp-section-info\"><?php echo $this->module['monitor_404']['description'];?></span>\n\t\t\t\t\t<?php\n\t\t\t\t\t$has_help = isset($this->module['monitor_404']['help']) ? true : false;\n\t\t\t\t\tif( $has_help === true ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$help_type = isset($this->module['monitor_404']['help']['type']) && $this->module['monitor_404']['help']['type'] ? 'remote' : 'local';\n\t\t\t\t\t\tif( $help_type == 'remote' ){\n\t\t\t\t\t\t\techo '<a href=\"#load_docs\" class=\"psp-show-docs\" data-helptype=\"' . ( $help_type ) . '\" data-url=\"' . ( $this->module['monitor_404']['help']['url'] ) . '\">HELP</a>';\n\t\t\t\t\t\t} \n\t\t\t\t\t} \n\t\t\t\t\t?>\n\t\t\t\t</h1>\n\n\t\t\t\t<!-- Container -->\n\t\t\t\t<div class=\"psp-container clearfix\">\n\n\t\t\t\t\t<!-- Main Content Wrapper -->\n\t\t\t\t\t<div id=\"psp-content-wrap\" class=\"clearfix\">\n\n\t\t\t\t\t\t<!-- Content Area -->\n\t\t\t\t\t\t<div id=\"psp-content-area\">\n\t\t\t\t\t\t\t<div class=\"psp-grid_4\">\n\t \t<div class=\"psp-panel\">\n\t \t\t<div class=\"psp-panel-header\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"psp-panel-title\">\n\t\t\t\t\t\t\t\t\t\t\t<?php /*<img src=\"<?php echo $this->the_plugin->cfg['paths']['plugin_dir_url'];?>/modules/Social_Stats/assets/menu_icon.png\">*/ ?>\n\t\t\t\t\t\t\t\t\t\t\t<?php _e('Monitor Page Not Found Errors', 'psp');?>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"psp-panel-content\">\n\t\t\t\t\t\t\t\t\t\t<form class=\"psp-form\" id=\"1\" action=\"#save_with_ajax\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"psp-form-row psp-table-ajax-list\" id=\"psp-table-ajax-response\">\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\tpspAjaxListTable::getInstance( $this->the_plugin )\n\t\t\t\t\t\t\t\t\t\t\t\t->setup(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'id' \t\t\t\t=> 'pspMonitor404',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_table'\t\t=> \"psp_monitor_404\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_table_force_action' => true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t//'deleted_field'\t\t=> true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'show_header' \t\t=> true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'items_per_page' \t=> '10',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'post_statuses' \t=> 'all',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'columns'\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'checkbox'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'th'\t=> 'checkbox',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'td'\t=> 'checkbox',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'th'\t=> __('ID', 'psp'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'td'\t=> '%id%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width' => '40'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hits'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'th'\t=> __('Hits', 'psp'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'td'\t=> '%hits%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width' => '40'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'bad_url'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'th'\t=> __('Bad URL', 'psp'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'td'\t=> '%bad_url%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'align' => 'left'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'referrers'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'th'\t=> __('Referrers', 'psp'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'td'\t=> '%referrers%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'align' => 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width' => '80'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'user_agents'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'th'\t=> __('User Agents', 'psp'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'td'\t=> '%user_agents%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'align' => 'center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width' => '80'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'last_date'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'th'\t=> __('Last Log Date', 'psp'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'td'\t=> '%last_date%',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width' => '120'\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\t'mass_actions' \t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_link' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'value' => __('Add to Link Redirect', 'psp'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'do_add_new_link',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color' => 'blue'\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'delete_404_rows' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'value' => __('Delete selected rows', 'psp'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'do_bulk_delete_404_rows',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color' => 'blue'\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\t->print_html();\n\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t </form>\n\t\t\t\t \t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n<?php\n\t\t}", "function print_it($type=NULL,$template_hash=NULL,$print_pref_hash=NULL) {\r\n\t\tglobal $db;\r\n\r\n\t\t$this->db =& $db;\r\n\t\t$this->db->query(\"SET NAMES latin1\");\r\n\t\tswitch ($type) {\r\n\t\t\tcase 'po':\r\n\t\t\t$class = \"po_print\";\r\n\t\t\t//if (!$this->print_pref['use_logo'])\r\n\t\t\t\t//$this->print_pref['use_logo'] =\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 'customer_invoice':\r\n\t\t\t$class = \"invoice_print\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 'delivery_ticket':\r\n\t\t\t$class = \"delivery_ticket_print\";\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 'proforma_invoice';\r\n\t\t\t$class = 'proforma_invoice';\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\tif ($_GET['punch'])\r\n\t\t\t\t$class = \"proposal_punch_print\";\r\n\t\t\telse\r\n\t\t\t\t$class = \"proposal_print\";\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t// Fetch the user template for this type of document\r\n\t\t$this->template = new templates($_SESSION['id_hash']);\r\n\t\t$this->template->fetch_master_record(($class == \"proposal_punch_print\" ? \"proposal_print\" : $class),$template_hash);\r\n\r\n\t\tif ($print_pref_hash && $print_pref_hash != 'custom') {\r\n\t\t\tif ($print_pref_hash == $template_hash)\r\n\t\t\t\t$print_pref = $this->template->current_template['print_prefs'];\r\n\t\t\telse\r\n\t\t\t\t$print_pref = $this->template->fetch_print_prefs($class,$print_pref_hash);\r\n\t\t} else\r\n\t\t\t$print_pref = fetch_user_data($class);\r\n\r\n\t\t$this->print_pref = __unserialize(stripslashes($print_pref));\r\n\r\n\t\tif ($this->print_pref['use_logo'] && $this->print_pref['print_logo']) {\r\n\t\t\t$this->img = $this->print_pref['use_logo'];\r\n\t\t\tif ($this->img) {\r\n\t\t\t\tlist($this->w,$this->h) = @getimagesize($this->img);\r\n\t\t\t\tif (($this->h / $this->w) > .85 && $this->h > 175) {\r\n\t\t\t\t\t$reduce_per = 175 / $this->h;\r\n\t\t\t\t\t$this->w = $this->w * $reduce_per;\r\n\t\t\t\t\t$this->h = 175;\r\n\t\t\t\t} elseif ($this->w > 225) {\r\n\t\t\t\t\t$reduce_per = 225 / $this->w;\r\n\t\t\t\t\t$this->h = $this->h * $reduce_per;\r\n\t\t\t\t\t$this->w = 225;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->h *= .75;\r\n\t\t\t\t\t$this->w *= .75;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!$this->w)\r\n\t\t\t\tunset($this->img);\r\n\t\t}\r\n\t}", "public function printBill($orders){\n $connector = new WindowsPrintConnector(\"EPSON LX-310\");\n $tax = Tax::find()->one();\n $printer = new Printer($connector);\n $printer -> setEmphasis(true);\n $printer-> setTextSize(2,2);\n $printer -> text(' Margao Central');\n $printer -> feed(1);\n $printer -> setEmphasis(false);\n $printer-> setTextSize(1,1);\n $printer -> setFont(Printer::FONT_A);\n $printer -> text(' C/o Konkan Railway Corporation Limited');\n $printer -> feed(1);\n $printer -> text(' Near Rawanfond Circle, Margao');\n $printer -> feed(1);\n $printer -> text(' Goa - 403601');\n $printer -> feed(1);\n $printer -> text(' PH: +91 9552592740');\n $printer -> feed(1);\n $printer -> text(' GSTIN: xxxxxxxxxx');\n $printer -> feed(1);\n $printer -> text(' '.$orders[0]->table->name.' '.date(\"Y-d-m H:i:s\"));\n $printer -> feed(1);\n $printer -> text(\" BILL ID: \".$this->bid.\" Waiter: \".$orders[0]->kot->waiter->name);\n $printer -> feed(1);\n $printer -> setEmphasis(true);\n $printer -> setFont(Printer::FONT_A);\n $printer -> feed(1);\n $printer-> setJustification(Printer::JUSTIFY_LEFT);\n $printer -> text(' _______________________________________________');\n $printer -> feed(1);\n $printer-> setJustification(Printer::JUSTIFY_LEFT);\n $printer -> text(' Item Qt Rate Amt');\n $printer -> feed(1);\n $printer -> text(' _______________________________________________');\n $printer -> setEmphasis(false);\n $printer -> feed(1);\n for($i = 0; $i < sizeof($orders); $i++){\n $printer -> text(' ');\n $itemName = $orders[$i]->item->name;\n $quantity = $orders[$i]->quantity;\n $quantityLength = strlen($quantity);\n $cost = $orders[$i]->item->cost;\n $costLength = strlen($cost);\n $total = $quantity * $cost;\n $totalLength = strlen($total);\n $itemLength = strlen($itemName);\n $printer -> text($itemName);\n for($j = 0; $j < (31-$itemLength); $j++){\n $printer -> text(' ');\n }\n $printer -> text(' ');\n for($j = 0; $j < (2-$quantityLength); $j++){\n $printer -> text(' ');\n }\n $printer -> text($quantity);\n $printer -> text(' ');\n for($j = 0; $j < (4-$costLength); $j++){\n $printer -> text(' ');\n }\n $printer -> text($cost);\n $printer -> text(' ');\n for($j = 0; $j < (6-$totalLength); $j++){\n $printer -> text(' ');\n }\n $printer -> text($total);\n $printer -> feed(1);\n }\n $printer -> text(' _______________________________________________');\n $printer -> feed(1);\n $printer -> feed(1);\n $printer -> text(' TOTAL + '.$this->amount);\n $printer -> feed(1);\n $printer -> text(' CGST @2.5 + '.$this->tax/2);\n $printer -> feed(1);\n $printer -> text(' SGST @2.5 + '.$this->tax/2);\n $printer -> feed(1);\n $printer -> text(' Discount - '.$this->discount_amount);\n $printer -> feed(1);\n $printer -> setEmphasis(true);\n $printer-> setTextSize(1,1);\n $printer -> text(' GRAND TOTAL Rs '.$this->total_amount);\n $printer -> feed(1);\n $printer -> feed(1);\n $printer -> feed(1);\n $printer -> cut();\n $printer->close();\n\n }", "public function printTicket($productos){\n\n try {\n\n //Fecha y hora actual\n date_default_timezone_set('America/Mexico_City');\n $fecha= date(\"d/m/Y H:i:s\");\n\n \n\n $connector = NULL;\n //El nombre de la impresora es POS-58\n $connector = new WindowsPrintConnector(\"POS-58\");\n $printer = new Printer($connector); \n\n //Establecemos los datos del TICKET a imprimir\n\n $printer -> setJustification(Printer::JUSTIFY_CENTER);\n $printer -> selectPrintMode(Printer::MODE_DOUBLE_WIDTH);\n $printer -> feed(2); \n $printer -> text(\"POLLERIA LOMA\\n\");\n $printer -> selectPrintMode(); // Reset \n\n $printer -> feed(1); \n $printer -> text(\"Calle Mexico #44\\n\");\n $printer -> text(\"Colonia Centro\\n\");\n $printer -> text(\"Loma Bonita Oaxaca\\n\");\n $printer -> text($fecha); \n $printer->text(\"\\n--------------------\\n\");\n $printer -> text($productos['cliente']);\n $printer->text(\"\\n--------------------\");\n $printer -> feed(1); \n \n $charset='UTF-8'; // o 'UTF-8' setea \n $toalapagar =0;\n $printer -> setJustification(Printer::JUSTIFY_LEFT);\n //*********************************************************************************\n foreach ($productos['detalles'] as $item) {\n //Asigno el abono guardado en la variable sesion\n $CantAbono = $productos['abono'];\n\n /*$descripcion = $item['cantidad'].\" \".$item['producto'].\" \".$item['kilos'].\" \".$item['precio'];\n */\n //Mayuscula la primer letra\n $nombreDescM=ucwords($item['producto']);\n //Elimino acentos y ñ \n $str = iconv($charset, 'ASCII//TRANSLIT', $nombreDescM);\n $nuevo = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $str);\n $printer -> text(\"Pollo: \"); \n $printer -> text(wordwrap(utf8_encode($nuevo), 29, \"\\n \" ,TRUE)); \n\n //$printer -> text(\"\\nPollo: \".$item['producto']); \n $printer -> text(\"\\nCantidad: \".$item['cantidad']);\n $printer -> text(\"\\nKilos: \".$item['kilos']); \n $printer -> text(\"\\nPrecio: \".$item['precio']); \n \n \n $printer -> feed(); \n $printer -> setJustification(Printer::JUSTIFY_RIGHT); \n $printer -> text(\"Importe $ \".number_format($item['importe'],2,\".\",\",\" ).\"\\n\");\n $printer -> text(\"\\n\"); \n $printer -> setJustification(); // Reset\n $toalapagar+=$item['importe'];\n }\n //*********************************************************************************\n $printer -> setJustification(Printer::JUSTIFY_RIGHT); \n $printer -> feed(2); \n $printer -> text(\"Subtotal $ \".number_format($toalapagar,2,\".\",\",\" ).\"\\n\");\n $printer -> text(\"Abono $ \".number_format($CantAbono,2,\".\",\",\" ).\"\\n\");\n $printer -> text(\"Restante $ \".number_format($toalapagar-$CantAbono,2,\".\",\",\" ).\"\\n\");\n $printer -> feed(2); \n $printer -> setJustification(Printer::JUSTIFY_CENTER);\n $printer -> selectPrintMode(Printer::MODE_DOUBLE_WIDTH);\n $printer -> text(\"Gracias por\\n\");\n $printer -> text(\"su compra\\n\");\n\n //$printer -> text(\"Loma Bonita Oaxaca\\n\"); \n $printer -> feed(5);\n /* Pulse Manda un PULSO y abre la caja registradora\n pulse($pin, $on_ms, $off_ms)\n Generate a pulse, for opening a cash drawer if one is connected. The default settings (0, 120, 240) should open an Epson drawer.*/\n $printer -> pulse();\n /* Close printer */\n $printer -> close();\n //$this->cart->destroy();\n // echo \"Ticket Impreso\";\n } catch (Exception $e) {\n echo \"No se pudo imprimir el Ticket\" . $e -> getMessage() . \"\\n\";\n }\n }", "public function PrintAction()\n {\n $productIds = $this->getRequest()->getPost('pending_products');\n\n $pdf = mage::helper('ProductReturn/pendingProducts')->PrintPendingProducts($productIds);\n $this->_prepareDownloadResponse(mage::helper('ProductReturn')->__('Pending products') . '.pdf', $pdf->render(), 'application/pdf');\n\n }", "public function window()\n\t{\n\t\t$this->template->set_filename('empty');\n\t\t$this->template->body = View::factory('live_timer/window');\n\t\t$this->template->title = 'Live Timer';\n\t\t$this->template->body->projects = Auto_Modeler_ORM::factory('project')->select_list('id', array('id', 'name'), 'id', array('complete' => FALSE));\n\t}", "public function displayPackageGrid()\n {\n echo \"\n <a href='javascript:prepareToRunPackage(\" . $this->id . \");' class='max-width-100 max-height-70 mrg10A btn vertical-button remove-border font-black bg-white border-black' title=''>\n <span class='glyph-icon icon-separator-vertical pad0A medium'>\n <img src='\" . $this->icon . \"' alt='\". $this->name .\"' />\n </span>\n <span class='button-content'>\" . $this->name . \"</span>\n </a>\n \";\n }", "public function printReceipt() {\n\t\t?>\n\t\t<!-- Hide the Order Panel -->\n\t\t<style type=\"text/css\">#orderPanel { display:none; } </style>\n\t\t<?php\n\t\t\n\t\t$strHTML = \"<h3>Thanks for ordering!</h3><table class='gridtable'>\";\n\t\t$strHTML .= \"<tr><th>Product:</th><td>\".$this->product.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Name:</th><td>\".$this->first_name .\" \". $this->last_name.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Unit Price:</th><td>\" . $this->unit_price .\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Discount Rate:</th><td>\".$this->discount_rate.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Order Total:</th><td>\".$this->getTotal().\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Order Date:</th><td>\".$this->order_date.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Payment Type:</th><td>\".$this->payment_type.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Payment Info:</th><td>\". $this->processPayment() .\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Today's Date:</th><td>\".date('F j, Y').\"</td></tr>\";\n\t\t$strHTML .= \"</table><br/>\";\n\t\t$strHTML .= \"<p><form action='/portfolio/projects/loanproject/product_order.php'>\";\n\t\t$strHTML .= \"<input type='submit' value='Place New Order' /></form></p>\";\n\t\treturn $strHTML;\t\n\t}", "function os2dagsorden_meeting_views_bullet_point_fields_print_link($bp_id, $sp_id) {\n global $base_url;\n print \"<div class='speaker-paper-print'>\";\n print '<input class=\"form-submit print-button\" type=\"button\" onclick=\"window.open(';\n print(\" ' \" . $base_url . '/print/bullet-point/' . $bp_id . '/speaker-paper/' . $sp_id . '/print' . \" ' \");\n print ')\" value=\"' . t('Print @speaker_paper', array('@speaker_paper' => strtolower(variable_get('os2dagsorden_title_meeting_comments', 'Talepapir')))) . '\">';\n print \"</div>\";\n}", "function print_buying_formats1($denomination)\r\n{\r\n\tglobal $ilance, $ilconfig, $phrase, $scriptpage, $php_self, $show, $clear_listtype_url;\r\n\t$html = '';\r\n\t\r\n\t$auction = (isset($ilance->GPC['auction']) AND $ilance->GPC['auction'] > 0) ? intval($ilance->GPC['auction']) : '';\r\n\t$buynow = (isset($ilance->GPC['buynow']) AND $ilance->GPC['buynow'] > 0) ? intval($ilance->GPC['buynow']) : '';\r\n\t$inviteonly = (isset($ilance->GPC['inviteonly']) AND $ilance->GPC['inviteonly'] > 0) ? intval($ilance->GPC['inviteonly']) : '';\r\n\t$scheduled = (isset($ilance->GPC['scheduled']) AND $ilance->GPC['scheduled'] > 0) ? intval($ilance->GPC['scheduled']) : '';\r\n\t$lub = (isset($ilance->GPC['lub']) AND $ilance->GPC['lub'] > 0 AND $ilconfig['enable_uniquebidding']) ? intval($ilance->GPC['lub']) : '';\r\n\t$penny = (isset($ilance->GPC['penny']) AND $ilance->GPC['penny'] > 0) ? intval($ilance->GPC['penny']) : '';\r\n\t$ilance->GPC['mode'] ='product';\r\n\t$removeurlall = rewrite_url($php_self, 'auction=' . $auction);\r\n\t$removeurlall = rewrite_url($removeurlall, 'buynow=' . $buynow);\r\n\t$removeurlall = rewrite_url($removeurlall, 'inviteonly=' . $inviteonly);\r\n\t$removeurlall = rewrite_url($removeurlall, 'scheduled=' . $scheduled);\r\n\t$removeurlall = rewrite_url($removeurlall, 'lub=' . $lub);\r\n\t$removeurlall = rewrite_url($removeurlall, 'penny=' . $penny);\r\n\t$clear_listtype_url = $removeurlall;\r\n\t\r\n\t// make sure our php_self string contains a ?\r\n\tif (strrchr($php_self, \"?\") == false)\r\n\t{\r\n\t\t// we'll include our master variable which should rewrite our urls nice and friendly\r\n\t\t$php_self = $php_self . '?mode=' . $ilance->GPC['mode'];\r\n\t}\r\n\telse\r\n\t{\r\n\t$php_self='denomination.php?denomination='.$denomination.'&amp;mode=' . $ilance->GPC['mode'];\r\n\t}\r\n\t\r\n\tif ($ilance->GPC['mode'] == 'product')\r\n\t{\r\n\t\t\r\n\t\t$html .= (isset($ilance->GPC['mode']) AND $ilance->GPC['mode'] == 'product')\r\n\t\t\t\r\n\t\t\t? '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedinclude.png\" border=\"0\" alt=\"\" id=\"\" name=\"sel_auctiontype0\" /></span><span class=\"blueonly\"><a href=\"' .$php_self . '\" onmouseover=\"rollovericon(\\'sel_auctiontype0\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedinclude.png\\')\" onmouseout=\"rollovericon(\\'sel_auctiontype0\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedinclude.png\\')\"><strong>' . $phrase['_any'] . '</strong></a></span></div>'\r\n\t\t: '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\" border=\"0\" alt=\"\" id=\"\" name=\"unsel_auctiontype0\" /></span><span class=\"blueonly\"><a href=\"' . $php_self . '&amp;all=1\" onmouseover=\"rollovericon(\\'unsel_auctiontype0\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselectedselect.png\\')\" onmouseout=\"rollovericon(\\'unsel_auctiontype0\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\\')\">' . $phrase['_any'] . '</a></span></div>';\r\n\t\t// forward auction\r\n\t\t$removeurl = rewrite_url($php_self, 'auction=' . $auction);\r\n\t\t$html .= (isset($ilance->GPC['auction']) AND $ilance->GPC['auction'] == '1')\r\n\t\t\t? '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\" border=\"0\" alt=\"\" id=\"\" name=\"sel_auctiontype1\" /></span><span class=\"blackonly\"><a href=\"' . $removeurl . '\" onmouseover=\"rollovericon(\\'sel_auctiontype1\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedclear.png\\')\" onmouseout=\"rollovericon(\\'sel_auctiontype1\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\\')\"><strong>' . $phrase['_forward_auction'] . '</strong></a></span></div>'\r\n\t\t\t: '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\" border=\"0\" alt=\"\" id=\"\" name=\"unsel_auctiontype1\" /></span><span class=\"blueonly\"><a href=\"' . $php_self . '&amp;auction=1\" onmouseover=\"rollovericon(\\'unsel_auctiontype1\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselectedselect.png\\')\" onmouseout=\"rollovericon(\\'unsel_auctiontype1\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\\')\">' . $phrase['_forward_auction'] . '</a></span></div>';\r\n\t\t\t\r\n\t\t$removeurl = rewrite_url($php_self, 'buynow=' . $buynow);\r\n\t\t$html .= (isset($ilance->GPC['buynow']) AND $ilance->GPC['buynow'] == '1')\r\n\t\t\t? '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\" border=\"0\" alt=\"\" id=\"\" name=\"sel_auctiontype5\" /></span><span class=\"blackonly\"><a href=\"' . $removeurl . '\" onmouseover=\"rollovericon(\\'sel_auctiontype5\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedclear.png\\')\" onmouseout=\"rollovericon(\\'sel_auctiontype5\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\\')\"><strong>' . $phrase['_buy_now'] . '</strong></a></span></div>'\r\n\t\t\t: '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\" border=\"0\" alt=\"\" id=\"\" name=\"unsel_auctiontype5\" /></span><span class=\"blueonly\"><a href=\"' . $php_self . '&amp;buynow=1\" onmouseover=\"rollovericon(\\'unsel_auctiontype5\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselectedselect.png\\')\" onmouseout=\"rollovericon(\\'unsel_auctiontype5\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\\')\">' . $phrase['_buy_now'] . '</a></span></div>';\r\n\t\t\r\n\t\t// lowest unique bid events\r\n\t\tif ($ilconfig['enable_uniquebidding'])\r\n\t\t{\r\n\t\t\t$removeurl = rewrite_url($php_self, 'lub=' . $lub);\r\n\t\t\t$html .= (isset($ilance->GPC['lub']) AND $ilance->GPC['lub'] == '1')\r\n\t\t\t\t? '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\" border=\"0\" alt=\"\" id=\"\" name=\"sel_auctiontype4\" /></span><span class=\"blackonly\"><a href=\"' . $removeurl . '\" onmouseover=\"rollovericon(\\'sel_auctiontype4\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedclear.png\\')\" onmouseout=\"rollovericon(\\'sel_auctiontype4\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\\')\"><strong>' . $phrase['_lowest_unique_bid'] . '</strong></a></span></div>'\r\n\t\t\t\t: '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\" border=\"0\" alt=\"\" id=\"\" name=\"unsel_auctiontype4\" /></span><span class=\"blueonly\"><a href=\"' . $php_self . '&amp;lub=1\" onmouseover=\"rollovericon(\\'unsel_auctiontype4\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselectedselect.png\\')\" onmouseout=\"rollovericon(\\'unsel_auctiontype4\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\\')\">' . $phrase['_lowest_unique_bid'] . '</a></span></div>';\r\n\t\t}\r\n\t\t\r\n\t\t/*$removeurl = rewrite_url($php_self, 'penny=' . $penny);\r\n\t\t$html .= (isset($ilance->GPC['penny']) AND $ilance->GPC['penny'] == '1')\r\n\t\t\t? '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\" border=\"0\" alt=\"\" id=\"\" name=\"sel_penny\" /></span><span class=\"blackonly\"><a href=\"' . $removeurl . '\" onmouseover=\"rollovericon(\\'sel_penny\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedclear.png\\')\" onmouseout=\"rollovericon(\\'sel_penny\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\\')\"><strong>' . $phrase['_penny_auctions'] . '</strong></a></span></div>'\r\n\t\t\t: '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\" border=\"0\" alt=\"\" id=\"\" name=\"unsel_penny\" /></span><span class=\"blueonly\"><a href=\"' . $php_self . '&amp;penny=1\" onmouseover=\"rollovericon(\\'unsel_penny\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselectedselect.png\\')\" onmouseout=\"rollovericon(\\'unsel_penny\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\\')\">' . $phrase['_penny_auctions'] . '</a></span></div>';*/\r\n\t\t\t\t\r\n\t}\r\n\telse if ($ilance->GPC['mode'] == 'service')\r\n\t{\r\n\t\t// reverse auction\r\n\t\t$removeurl = rewrite_url($php_self, 'auction=' . $auction);\r\n\t\t$html .= (isset($ilance->GPC['auction']) AND $ilance->GPC['auction'] == '1')\r\n\t\t\t? '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\" border=\"0\" alt=\"\" id=\"\" name=\"sel_auctiontype1\" /></span><span class=\"blackonly\"><a href=\"' . $removeurl . '\" onmouseover=\"rollovericon(\\'sel_auctiontype1\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedclear.png\\')\" onmouseout=\"rollovericon(\\'sel_auctiontype1\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\\')\"><strong>' . $phrase['_reverse_auction'] . '</strong></a></span></div>'\r\n\t\t\t: '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\" border=\"0\" alt=\"\" id=\"\" name=\"unsel_auctiontype1\" /></span><span class=\"blueonly\"><a href=\"' . $php_self . '&amp;auction=1\" onmouseover=\"rollovericon(\\'unsel_auctiontype1\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselectedselect.png\\')\" onmouseout=\"rollovericon(\\'unsel_auctiontype1\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\\')\">' . $phrase['_reverse_auction'] . '</a></span></div>';\r\n\t\t\r\n\t\t// invite only\r\n\t\t$removeurl = rewrite_url($php_self, 'inviteonly=' . $inviteonly);\t\t\r\n\t\t$html .= (isset($ilance->GPC['inviteonly']) AND $ilance->GPC['inviteonly'] == '1')\r\n\t\t\t? '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\" border=\"0\" alt=\"\" id=\"\" name=\"sel_auctiontype2\" /></span><span class=\"blackonly\"><a href=\"' . $removeurl . '\" onmouseover=\"rollovericon(\\'sel_auctiontype2\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedclear.png\\')\" onmouseout=\"rollovericon(\\'sel_auctiontype2\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\\')\"><strong>' . $phrase['_invite_only'] . '</strong></a></span></div>'\r\n\t\t\t: '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\" border=\"0\" alt=\"\" id=\"\" name=\"unsel_auctiontype2\" /></span><span class=\"blueonly\"><a href=\"' . $php_self . '&amp;inviteonly=1\" onmouseover=\"rollovericon(\\'unsel_auctiontype2\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselectedselect.png\\')\" onmouseout=\"rollovericon(\\'unsel_auctiontype2\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\\')\">' . $phrase['_invite_only'] . '</a></span></div>';\r\n\t\t\t\r\n\t}\r\n\t\r\n\t// upcoming scheduled\r\n\t$removeurl = rewrite_url($php_self, 'scheduled=' . $scheduled);\r\n\t$html .= (isset($ilance->GPC['scheduled']) AND $ilance->GPC['scheduled'] == '1')\r\n\t\t? '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\" border=\"0\" alt=\"\" id=\"\" name=\"sel_auctiontype3\" /></span><span class=\"blackonly\"><a href=\"' . $removeurl . '\" onmouseover=\"rollovericon(\\'sel_auctiontype3\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selectedclear.png\\')\" onmouseout=\"rollovericon(\\'sel_auctiontype3\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/selected.png\\')\"><strong>' . $phrase['_scheduled'] . '</strong></a></span></div>'\r\n\t\t: '<div style=\"padding-bottom:4px\"><span style=\"float:left; padding-right:7px; padding-top:2px\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\" border=\"0\" alt=\"\" id=\"\" name=\"unsel_auctiontype3\" /></span><span class=\"blueonly\"><a href=\"' . $php_self . '&amp;scheduled=1\" onmouseover=\"rollovericon(\\'unsel_auctiontype3\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselectedselect.png\\')\" onmouseout=\"rollovericon(\\'unsel_auctiontype3\\', \\'' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'leftnav/unselected.png\\')\">' . $phrase['_scheduled'] . '</a></span></div>';\r\n\tunset($php_self,$removeurl);\r\n\treturn $html;\r\n}", "public function hookAdminItemsShowSidebar()\n {\n $item = get_current_record('item');\n $itemId = $item->id;\n if (metadata('item', 'Collection Name')) {\n $collection = get_collection_for_item();\n $collectionId = metadata($collection, 'id');\n\n echo \"<div class=\\\"panel\\\"><h4>Export METS XML</h4><p><a class='button blue' style='width:100%;' href='\" . url('mets-export/export/mets?search=&advanced%5B0%5D%5Bjoiner%5D=and&advanced%5B0%5D%5Belement_id%5D=&advanced%5B0%5D%5Btype%5D=&advanced%5B0%5D%5Bterms%5D=&range=' . $itemId . '&collection=&type=&user=&tags=&public=&featured=&submit_search=Search+for+items&hits=0') . \"'><input style='background-color:transparent;color:white;border:none;' type='button' value='Export Item as METS XML' /></a></p><p><a class='button blue' style='width:100%;' href='\" . url('mets-export/export/mets?search=&advanced%5B0%5D%5Bjoiner%5D=and&range=&collection=' . $collectionId . '&type=&user=&tags=&public=&featured=&submit_search=Search+for+items&hits=0') . \"'><input style='background-color:transparent;color:white;border:none;' type='button' value='Export Set as METS XML' /></a></p></div>\"; \n } else {\n echo \"<div class=\\\"panel\\\"><h4>Export METS XML</h4><p><a class='button blue' style='width:100%;' href='\" . url('mets-export/export/mets?search=&advanced%5B0%5D%5Bjoiner%5D=and&advanced%5B0%5D%5Belement_id%5D=&advanced%5B0%5D%5Btype%5D=&advanced%5B0%5D%5Bterms%5D=&range=' . $itemId . '&collection=&type=&user=&tags=&public=&featured=&submit_search=Search+for+items&hits=0') . \"'><input style='background-color:transparent;color:white;border:none;' type='button' value='Export Item as METS XML' /></a></p>\";\n }\n\n }", "public function invoiceprint(){\n $data['thispage']=\"72\";\n $data['title']=\"Invoices Print || WishingMart\";\n\n $url_invoice_view=base_api_url().\"dashboard/invoiceview/iid/\".$this->uri->segment(3).base_api_key();\n $data['invoice_view'] = self::getapi($url_invoice_view);\n //print_r($data['invoice_list']);exit();\n\n $this->load->view('dashboard/invoiceprint_view', $data);\n }", "function print_item_photo($url = 'javascript:void(0)', $mode = '', $projectid = 0, $borderwidth = '0', $bordercolor = '#ffffff')\n{\n global $ilance, $myapi, $ilconfig, $ilpage, $phrase;\n \n $html = '';\n \n // query database for product image for preview\n $ufile = $ilance->db->query(\"\n SELECT attachid, filename, filehash, attachtype\n FROM \" . DB_PREFIX . \"attachment\n WHERE project_id = '\" . intval($projectid) . \"'\n AND (attachtype = 'itemphoto' OR attachtype = 'slideshow')\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($ufile) > 0)\n {\n $pictures = 1;\n while ($rfile = $ilance->db->fetch_array($ufile))\n {\n if ($rfile['attachtype'] == 'itemphoto')\n {\n switch ($mode)\n {\n case 'thumb':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' .HTTPS_SERVER. 'image/72/96/' . $rfile['filename'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n\t\t\t\t\t\t\n ($apihook = $ilance->api('foto_thumb')) ? eval($apihook) : false;\n\t\t\t\t\t\t\n break;\n }\n\t\t\t\t\t\t\t\t\t\tcase 'results_zoom':\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t $html = '<a href=\"' . $url . '\"><img src=\"' .HTTPS_SERVER. 'image/115/82/' . $rfile['filename'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t($apihook = $ilance->api('foto_thumb')) ? eval($apihook) : false;\n\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\t\tcase 'thumbgallery':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' .HTTPS_SERVER. 'image/150/150/' . $rfile['filename'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n break;\n }\n\t\t\t\t\t\t\t\t\t\tcase 'thumbsnapshot':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' .HTTPS_SERVER . 'image/72/96/' . $rfile['filename'] . '\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" class=\"gallery-thumbs-image-cluster\" /></a>';\n break;\n }\n case 'full':\n {\n $html = '<a href=\"' . $url . '\"><img src=\"' .HTTPS_SERVER. 'image.php?id=' . $rfile['filename'] . '\" alt=\"\" border=\"' . $borderwidth . '\" alt=\"\" style=\"border-color:' . $bordercolor . '\" /></a>';\n break;\n }\n case 'checkup':\n {\n return '1';\n break;\n }\n }\n }\n else if ($rfile['attachtype'] == 'slideshow')\n {\n $pictures++;\n }\n }\n \n if ($mode == 'thumb' AND $pictures > 0)\n {\n $html1 = '\n <div class=\"gallery-thumbs-cell\">\t\t\t\n <div class=\"gallery-thumbs-entry\">\n <div class=\"gallery-thumbs-main-entry\">\n <div class=\"gallery-thumbs-wide-wrapper\">\n <div class=\"gallery-thumbs-wide-inner-wrapper\">';\n $html1 .= $html;\n $html1 .= '<div class=\"gallery-thumbs-corner-text\"><span>' . ($pictures + 1) . ' photos</span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ';\n \n $html = $html1;\n }\n\t\t\t\telse if ($mode == 'results_zoom' AND $pictures > 0)\n {\n $html1 = '\n <div class=\"gallery-thumbs-cell\">\t\t\t\n <div class=\"gallery-thumbs-entry\">\n <div class=\"gallery-thumbs-main-entry\">\n <div class=\"gallery-thumbs-wide-wrapper_search\">\n <div class=\"gallery-thumbs-wide-inner-wrapper\">';\n $html1 .= $html;\n $html1 .= '<div class=\"gallery-thumbs-corner-text\"><span>' . ($pictures + 1) . ' photos</span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ';\n \n $html = $html1;\n }\n }\n else \n {\n $html = '<img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'nophoto.gif\" alt=\"\" border=\"0\" />';\n }\n \n \n return $html;\n}", "public function print() {\n \n echo \"\\n\";\n\n foreach ($this->order->getOrderItems() as $orderItem) {\n\n $product = $orderItem->getProduct();\n\n echo \"{$orderItem->getQuantity()} {$this->formattedName($product)}: \" .\n \"{$this->formatFloat($product->taxablePrice())}\\n\";\n }\n\n echo \"\\n\";\n\n echo \"Sales Taxes: {$this->formatFloat($this->order->allTaxes())}\\n\";\n echo \"Total: {$this->formatFloat($this->order->totalAmount())}\\n\";\n \n }", "function kleo_woo_downloads_screen_content() {\n\t\techo '<div class=\"woocommerce\">';\n\t\twc_get_template( 'myaccount/my-downloads.php' );\n\t\techo '</div>';\n\t}", "public function printInvoices()\n\t{\n\t\t$strMessage = '';\n\n\t\t$strReturn = '\n<div id=\"tl_buttons\">\n<a href=\"'.ampersand(str_replace('&key=print_invoices', '', $this->Environment->request)).'\" class=\"header_back\" title=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['backBT']).'\">'.$GLOBALS['TL_LANG']['MSC']['backBT'].'</a>\n</div>\n\n<h2 class=\"sub_headline\">'.$GLOBALS['TL_LANG']['tl_iso_orders']['print_invoices'][0].'</h2>\n<form action=\"'.$this->Environment->request.'\" id=\"tl_print_invoices\" class=\"tl_form\" method=\"post\">\n<input type=\"hidden\" name=\"FORM_SUBMIT\" value=\"tl_print_invoices\">\n<input type=\"hidden\" name=\"REQUEST_TOKEN\" value=\"'.REQUEST_TOKEN.'\">\n<div class=\"tl_formbody_edit\">\n<div class=\"tl_tbox block\">';\n\n\t\t$objWidget = new SelectMenu($this->prepareForWidget($GLOBALS['TL_DCA']['tl_iso_orders']['fields']['status'], 'status'));\n\n\t\tif ($this->Input->post('FORM_SUBMIT') == 'tl_print_invoices')\n\t\t{\n\t\t\t$objOrders = $this->Database->prepare(\"SELECT id FROM tl_iso_orders WHERE status=?\")->execute($this->Input->post('status'));\n\n\t\t\tif ($objOrders->numRows)\n\t\t\t{\n\t\t\t\t$this->generateInvoices($objOrders->fetchEach('id'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strMessage = '<p class=\"tl_gerror\">'.$GLOBALS['TL_LANG']['MSC']['noOrders'].'</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn $strReturn . $strMessage . $objWidget->parse() . '\n</div>\n</div>\n<div class=\"tl_formbody_submit\">\n<div class=\"tl_submit_container\">\n<input type=\"submit\" name=\"print_invoices\" id=\"ctrl_print_invoices\" value=\"'.$GLOBALS['TL_LANG']['MSC']['labelSubmit'].'\">\n</div>\n</div>\n</form>\n</div>';\n\t}", "function tombolPrint($model){\n\t\t//$paramFile=Yii::$app->getRequest()->getQueryParam('id');\n\t\t$title = Yii::t('app','Print');\n\t\t$url = Url::toRoute(['/payroll/absen-daily/print','id'=>$model['KAR_ID']]);\n\t\t$options1 = [\n\t\t//'value'=>$url,\n\t\t\t\t\t'id'=>'payroll-print',\n\t\t\t\t\t'data-pjax' => true,\n\t\t\t\t\t'target'=>'_blank',\n\t\t\t\t\t'class'=>\"btn btn-default btn-xs\",\n\t\t\t\t\t'title'=>'Print Slip gaji',\n\t\t\t\t\t'style'=>['text-align'=>'left','color:red','margin-left'=>'0px','width'=>'100%', 'height'=>'25px','border'=> 'none'],\t\t\t\t\t\t\t\t\n\t\t];\n\t\t$icon1 = '\n\t\t\t<span class=\"fa-stack fa-xs\">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t<i class=\"fa fa-circle-thin fa-stack-2x \" ></i>\n\t\t\t\t<i class=\"fa fa-print fa-stack-1x\" style=\"color:black\"></i>\n\t\t\t</span>\n\t\t'; \n\t\t$label1 = $icon1 . ' ' . $title;\n\t\t$content = Html::a($label1,$url,$options1);\t\t\n\t\treturn '<li>'.$content.'</li>';\n\t}", "public function get_wc_product_builder_page() {\n\t\t$this->include_template( 'templates/wcpb-builder-page.php' );\n\t}", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = '';\n\t\t\t$tb = new Table('class=table item-pricing table-striped table-condensed table-bordered print-hidden');\n\t\t\t$tb->tablesection('thead');\n\t\t\t\t$tb->tr();\n\t\t\t\tforeach($this->json['columns'] as $column => $name) {\n\t\t\t\t\t$tb->th(\"\", $name);\n\t\t\t\t}\n\t\t\t$tb->closetablesection('thead');\n\t\t\t$tb->tablesection('tbody');\n\t\t\t\tforeach($this->json['data'] as $warehouse) {\n\t\t\t\t\t$tb->tr();\n\t\t\t\t\tforeach($this->json['columns'] as $column => $name) {\n\t\t\t\t\t\tif (is_numeric($warehouse[$column])) {\n\t\t\t\t\t\t\t$tb->td(\"class=text-right\", $warehouse[$column]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tb->td(\"\", $warehouse[$column]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t$tb->closetablesection('tbody');\n\t\t\treturn $tb->close();\n\t\t}", "function dms_wc_print_mini_cart() {\n\tglobal $woocommerce, $wp_query;\n\n\tif ( ! defined('WOOCOMMERCE_CHECKOUT') ) {\n\t\tdefine( 'WOOCOMMERCE_CHECKOUT', true );\n\t}\n\n\t$map_instruction = get_field(\"dms_options_map_instruction\", 109);\n\n ?>\n <div id=\"dms-minicart\" class=\"state-initial\">\n\t <h2 class=\"cart-title cart-text calc-height\"><?php _e(\"Your order\", THEME_NAME); ?></h2>\n\n \t<?php\n\t\t\t$current_restaurant_id \t= ( $wp_query->query_vars[\"page_id\"] ) ? $wp_query->query_vars[\"page_id\"] : $wp_query->query_vars[\"author\"];\n\t\t\t$previous \t\t\t\t= get_field( \"dms_restaurant_previous\", \"user_\" . $current_restaurant_id );\n\t\t\t$has_preorder \t\t\t= ( isset( WC()->session->preorder ) ) ? true : false;\n\t\t\t$restaurant_closed \t\t= check_restaurant_closed( $current_restaurant_id );\n\t\t\t$closed_type \t\t\t= false;\n\n\t\t\tif( $restaurant_closed ){\n\t\t\t\tswitch ( $restaurant_closed[\"type\"] ) {\n\n\t\t\t\t\tcase 'closed_until':\n\t\t\t\t\t\t$closed_type = $restaurant_closed[\"type\"];\n\t\t\t\t\t\t$has_preorder = true;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'closed':\n\t\t\t\t\t\t$closed_type = $restaurant_closed[\"type\"];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n \t\tif( ( $previous || $previous == NULL ) && $closed_type != \"closed\" ){\n \t\t\t?>\n \t\t\t<div class=\"cart-previous cart-text calc-height\">\n \t\t\t\t<div class=\"order-type-selector\">\n \t\t\t\t\t<span class=\"mini-cart-radio\">\n \t\t\t\t\t\t<input type=\"radio\" name=\"dms_radio_previous_order\" id=\"radio_order_now\" <?php if( !$has_preorder ){ echo 'class=\"active\"'; checked( true ); } if( $closed_type == \"closed_until\" ){ disabled( true ); } ?> value=\"0\">\n \t\t\t\t\t\t<label for=\"radio_order_now\"><?php _e( \"Order now\", THEME_NAME ); ?></label>\n \t\t\t\t\t</span>\n \t\t\t\t\t<span class=\"mini-cart-radio\">\n \t\t\t\t\t\t<input type=\"radio\" name=\"dms_radio_previous_order\" id=\"radio_order_previous\" <?php if( $has_preorder ){ echo 'class=\"active\"'; checked( true ); } ?> value=\"1\">\n \t\t\t\t\t\t<label for=\"radio_order_previous\"><?php _e( \"Pre-Order\", THEME_NAME ); ?></label>\n \t\t\t\t\t</span>\n \t\t\t\t</div>\n \t\t\t\t<div class=\"order-time-selector <?php if( !$has_preorder ){ echo 'hidden'; } ?>\">\n \t\t\t\t\t<label for=\"dms_order_previous_hour\"><?php _e( \"Delivery from\", THEME_NAME ); ?></label>\n \t\t\t\t\t<?php echo print_restaurant_previous_order_time_select( $current_restaurant_id ); ?>\n \t\t\t\t</div>\n \t\t\t</div>\n \t\t\t<?php\n \t\t}\n \t?>\n\n\t <?php dms_cart_part_updatable(); ?>\n\n\t\t<div class=\"shipping-container popup-background\">\n\t\t\t<div class=\"user-shipping popup-box dms-container\">\n\t\t\t\t<a href=\"javascript:void(0)\" class=\"button_close_popup close-x\">&times;</a>\n\t\t\t\t<h2 class=\"popup-title\"><?php _e(\"Shipping address\", THEME_NAME); ?></h2>\n\t\t\t\t<form action=\"<?php echo WC()->cart->get_checkout_url(); ?>\" id=\"dms-goto-checkout-form\" method=\"post\">\n\t\t\t\t\t<input id=\"ship-to-different-address-checkbox\" class=\"input-checkbox\" name=\"ship_to_different_address\" value=\"1\" type=\"hidden\">\n\t\t\t\t\t<input id=\"make-previous-order\" class=\"input-checkbox\" name=\"make_previous_order\" value=\"0\" type=\"hidden\">\n\t\t\t\t\t<input id=\"previous-order-time\" class=\"input-checkbox\" name=\"previous_order_time\" value=\"\" type=\"hidden\">\n\t\t\t\t\t<div id=\"addresses\">\n\t\t\t\t \t<?php\n\t\t\t \t\tglobal $wma_current_address;\n\t\t\t\t\t\t$checkout = WC()->checkout();\n\t\t\t\t\t\t$shipFields = $checkout->checkout_fields['shipping'];\n\n\t\t\t \t\tif( is_user_logged_in() ){\n\t\t\t\t\t\t\tforeach ( $shipFields as $key => $field ) {\n\t\t\t\t\t\t\t\t$field['id'] = $key;\n\t\t\t\t\t\t\t\twoocommerce_form_field( $key, $field, $checkout->get_value( $field['id'] ) );\n\t\t\t\t\t\t\t}\n\t\t\t \t\t}else{\n\t\t\t\t\t\t\tforeach ( $shipFields as $key => $field ) {\n\t\t\t\t\t\t\t\t$field['id'] = $key;\n\n\t\t\t\t\t\t\t\tif( $key == \"shipping_state\" ){\n\t\t\t\t\t\t\t\t\twoocommerce_form_field( $key, $field, $checkout->get_value( $field['id'] ) );\n\t\t\t\t\t\t\t\t}elseif( $key == \"shipping_country\" ){\n\t\t\t\t\t\t\t\t\twoocommerce_form_field( $key, $field, $checkout->get_value( $field['id'] ) );\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\twoocommerce_form_field( $key, $field, WC()->customer->__get( $field['id'] ) );\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\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php if( $map_instruction ){ ?><div class=\"shipping-instructions\"><?php echo $map_instruction; ?></div><?php } ?>\n\t\t\t\t\t<div id=\"mapCanvas\"></div>\n\t\t\t\t\t<div class=\"popup-buttons\">\n\t\t\t\t\t\t<input type=\"button\" id=\"button_set_shipping_address\" class=\"button-simple\" value=\"<?php _e('Confirm address', THEME_NAME); ?>\">\n\t\t\t\t\t\t<input type=\"button\" class=\"button_close_popup button-simple\" value=\"<?php _e('Cancel', THEME_NAME); ?>\">\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t </div>\n\t\t</div>\n\t</div>\n <?php\n}", "private function printItem($i,$row,$headerType){\n $actionDateTime = strtotime($row['NoteCreated']);\n $actionDateTime = date(\"m/d/Y h:i a\", $actionDateTime);\n $actionCompete = \"\";\n $OriginalActionItemID = $row['OriginalActionItemID'];\n $NoteID = $row['NoteID'];\n $originalDate = $row['ActionItemCreated'];\n $actionItemID = $row['ActionItemID'];\n $businessPhone = $row['BusinessPhone'];\n $employeePhone = $row['PhoneNumber'];\n $businessPhone = \"(\".substr($businessPhone, 0, 3).\") \".substr($businessPhone, 3, 3).\"-\".substr($businessPhone,6);\n $employeePhone = \"(\".substr($employeePhone, 0, 3).\") \".substr($employeePhone, 3, 3).\"-\".substr($employeePhone,6);\n\n if (!is_null($actionItemID)) {\n if (!is_null($row['actionComplete'])) {\n $actionCompete = \" complete\";\n }\n }\n\n // this array prevents an item from getting printed more than once.\n // this happens when a user is assigned an action item, forwards it to someone else\n // and then it gets forwarded back to themselves. In this instance the original action\n // item assigned to them will show up as the first item in the history of the current one,\n // not as a separate action item on it's own line.\n // because the list is printed in DESC order the history items are always found first.\n array_push($this->alreadyPrintedNotes,$row['NoteID']);\n\n // this section prints the header, which is the visible part the user clicks to expand the information\n print \"\n <ul class='actionItemsList'>\n <li class='interactionHeader $headerType $actionCompete'>\n <a href='#' name='ExpandAI$headerType$i' class='AIClass'>\n <div>\" . $actionDateTime . \" >> \" . $row['BusinessName'] . \" >> \" . substr($row['Note'],0,20) . \"</div>\n </a>\n </li>\n </ul>\";\n\n // this section prints the static information associated with each header.\n // every item is giving a unique name and ID. The javascript grabs this unique name from the header\n // then adds 'to' to the front to find the corresponding collapsed tag in order to display it\n // the javascript uses the name field. The ID tag exists so that when a user clicks new interaction\n // from the dashboard, only the correct 'add new interaction' expands.\n print\"<ul name='toExpandAI$headerType$i' class='DashAI displayOff $headerType'>\n <li style='float:right;'><b>Employee:</b> <a href='employee.php?EmployeeID=\" . $row['employeeID'] . \"'>\" . ($row['FirstName'] != '' ? $row['FirstName'] : 'None') . \" \" . $row['LastName'] . \"</a></li>\n <li><b>Business: </b><a href='business.php?BusinessID=\" . $row['BusinessID'] . \"'>\" . $row['BusinessName'] . \"</a></li>\n <li style='float:right;'><b>Email:</b> <a href='mailto:\" . $row['Email'] . \"'>\" . ($row['Email'] != '' ? $row['Email'] : 'None') . \"</a></li>\n <li><b>Phone #:</b> \" . ($row['PhoneNumber'] == \"\" ? $businessPhone : $employeePhone . \" ext: \" . $row['Extension']) . \"</li>\n <li style='float:right;'>\";\n if ($actionItemID != NULL) {\n print\"<b>Assigned To: </b><a href='user.php?UserID=\" . $row['AssignedToUserID'] . \"'>\" . $row['AssignedToName'] . \"</a></li>\";\n } else {\n print\"<b>Created By: \" . \"</b><a href='user.php?UserID=\" . $row['UserID'] . \"'>\" . $row['CreatedName'] . \"</a></li>\";\n }\n print\"<li><b>Interaction Type:</b> \" . $row['InteractionType'] . \"</li>\n <li><div class='notes'> \" . $row['Note'] . \"</div>\";\n if (is_null($row['actionComplete'])) { // this means that it is either an open action or note\n if ($row['actionComplete'] == NULL && $headerType == \"action\") { // this means it is indeed an open action item\n if ($row['AssignedToUserID'] == $_SESSION['userID'] || $_SESSION[\"admin\"]) { // this means the user is authorized to edit this action item by either being the user assigned or an admin\n $this->printEditBox($headerType, $i, $row['UserID'], $row['BusinessID'], $row['BusinessName'], $row['employeeID'],$row['InteractionType'],$OriginalActionItemID,$actionItemID);\n }\n }\n }\n print\"</li>\n </ul>\n \";\n\n // this section adds the history of every action item\n if ($headerType == \"action\") { // if action item print history\n require('includes/mysqli_connect.php');\n // Pull all associated Action Item Data\n\n $assocActionItemsQuery = pullAssocActionItems($OriginalActionItemID, $NoteID, $originalDate);\n\n if($assocActionItems = mysqli_query($dbc, $assocActionItemsQuery)) {\n $numHistoryItems = mysqli_num_rows($assocActionItems);\n if(mysqli_num_rows($assocActionItems) == 0) {\n } else {\n for($j=1; $j <= $numHistoryItems; $j++) { // loop through all history items found\n if($assocRow = mysqli_fetch_array($assocActionItems)) {\n // Convert DateTime to something usable\n $AIDateTime = strtotime($assocRow['AIDate']);\n $AIDateTime = date(\"m/d/Y h:i a\", $AIDateTime);\n $pUserName = $assocRow['pUserFirstName'] . \" \" . $assocRow['pUserLastName'];\n array_push($this->alreadyPrintedNotes,$assocRow['NoteID']);\n\n // Print History items related to this action item\n print \"\n <ul name='toExpandAIaction$i' class='actionItemsList displayOff AIHClass'>\n <li><a href='#' name='ExpandAIH$i$j' class='AIHClass'>\" . substr($assocRow['Note'],0,40) . \"</a></li>\n </ul>\n <ul name='toExpandAIH$i$j' class='DashAI displayOff DashAIH toExpandAIaction$i'>\n <li><b>UC Staff:</b><a href='user.php?UserID=\" . $assocRow['AssignedToUserID'] . \"'> $pUserName</a> &nbsp&nbsp&nbsp <b>Date:</b> $AIDateTime</li>\n <li><b>Notes: </b><br /><div class='notes'> \" . $assocRow['Note'] . \"</div></li>\n </ul>\n \";\n }\n }\n }\n }\n }\n }", "public function output($pgen,$brotherid) {\n\tglobal $qqs,$qqi,$qqu;\n\t\n\t$pm=new mod_prodmain;\n\t$pi=new mod_prodinfo;\n\t\n\techo \"<div{$qqi->idcstr($this->longname)}>\";\n\techo \"<h2>On Hold</h2>\";\n\tif (False === ($ids=$pm->onHoldItems())) {\n\t\techo \"<p>(No Items on Hold)</p>\";\n\t} else {\n\t\techo \"<table>\";\n\t\tforeach ($ids as $id) {\n\t\t\tif (False === ($info=$pi->getProdInfo($id))) {\n\t\t\t\t$info['mfr']='(unknown)';\n\t\t\t\t$info['title']='';\n\t\t\t}\n\t\t\t$maininfo=$pm->getProductInfo($id);\n\t\t\t$href=\"prodedit/{$id}\";\n\t\t\techo \"<tr>\";\n\t\t\techo \"<td>{$info['mfr']}</td>\";\n\t\t\t$title=strlen($info['title']) > 0 ? $info['title'] : \"({$maininfo['invdesc']})\"; \n\t\t\techo \"<td>\".link::anchorHTML($href,\"Edit Product\").$qqu->creolelite2html($title).\"</a></td>\";\n\t\t\techo \"<td>{$maininfo['notes']}</td>\";\n\t\t\techo \"</tr>\";\n\t\t}\n\t\techo \"</table>\";\n\t}\n\techo \"<h2>Noted Items</h2>\";\n\techo \"<h2>Items Missing Shipping Data</h2>\";\n\t\n\t\n\techo '</div>';\n}", "public static function get_modal_content_func() {\n\n /*********LOAD GLOBAL POST**********/\n\n global $post;\n\n /************************\n GET POST URL, SET POST ID,\n GET PRODUCT, GET BUTTON URL\n ***********************/\n\n $postURL = $_GET['post_url'];\n $postID = url_to_postid($postURL);\n $product = get_product($postID);\n $buttonURL = \"<a href='\" . $product->add_to_cart_url() .\"'>add to cart</a>\";\n $thePost;\n\n /*******************\n POST EXISTS VALIDATION\n *******************/\n\n if ($postID == 0){\n echo \"Invalid Input\";\n die();\n }\n\n /****************\n QUERY DB FOR PRODUCT\n ******************/\n\n $the_query = new WP_query(array('p' => $postID, 'post_type' => 'product'));\n\n if ($the_query->have_posts()) : while ($the_query->have_posts()) : $the_query->the_post();\n get_template_part( 'woocommerce/content', 'single-product' );\n endwhile;\n else :\n echo \"There were no posts found\";\n endif;\n die();\n }", "function showorder($request) {\r\n\t\tif(isset($_REQUEST[\"print\"])) {\r\n\t\t\tRequirements::clear();\r\n\t\t\tRequirements::themedCSS(\"typography\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"OrderReport\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"Order_Invoice\", \"print\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\treturn $this->renderWith(\"Invoice\");\r\n\t\t}\r\n\t\telseif(isset($_REQUEST[\"packingslip\"])) {\r\n\t\t\tRequirements::clear();\r\n\t\t\tRequirements::themedCSS(\"typography\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"OrderReport\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"Order_PackingSlip\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\treturn $this->renderWith(\"PackingSlip\");\r\n\t\t}\r\n\t\treturn array();\r\n\t}", "function woocommerce_pip_print_footer() {\n\n\tif ( get_option( 'woocommerce_pip_footer' ) != '' ) {\n\t\treturn nl2br( stripslashes( get_option( 'woocommerce_pip_footer' ) ) );\n\t}\n}", "function organics_woocommerce_wrapper_start() {\n\t\tglobal $ORGANICS_GLOBALS;\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !empty($ORGANICS_GLOBALS['shop_mode']) ? $ORGANICS_GLOBALS['shop_mode'] : 'thumbs'; ?>\">\n\t\t\t<?php\n\t\t}\n\t}", "function planmyday_woocommerce_open_item_wrapper($cat='') {\n\t\t?>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"post_content\">\n\t\t<?php\n\t}", "function shopLoop()\n {\n global $product;\n $this->display($product->id, 'shoploop');\n }", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = $this->generate_salesusagetable();\n\t\t\t\n\t\t\tforeach (array_keys($this->json['data']['24month']) as $warehouse) {\n\t\t\t\tif ($warehouse != 'zz') {\n\t\t\t\t\t$content .= $this->generate_warehousediv($warehouse);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content .= $this->generate_warehousediv('zz');\n\t\t\treturn $content;\n\t\t}", "function productloop_start(){\n\t\t$columns = $this->product_columns;\n\t\techo '<div class=\"woocommerce columns-' . $columns . '\">';\n\t}", "public function getPrintUrl()\n {\n /*if (Mage::getSingleton('customer/session')->isLoggedIn()) {\n return $this->getUrl('sales/order/print', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId()));\n }\n return $this->getUrl('sales/guest/printOrder', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId()));*/\n return $this->getUrl('sales/order/print', array('order_id'=>Mage::getSingleton('checkout/session')->getLastOrderId()));\n }", "public function PrintProcessedAction()\n {\n $productIds = $this->getRequest()->getPost('pending_products');\n\n //process products\n mage::helper('ProductReturn/pendingProducts')->processProducts($productIds);\n\n //print\n $pdf = mage::helper('ProductReturn/pendingProducts')->PrintPendingProducts($productIds);\n $this->_prepareDownloadResponse(mage::helper('ProductReturn')->__('Pending products') . '.pdf', $pdf->render(), 'application/pdf');\n\n }", "public function write()\n {\n $str = \"PRODUCTS:\\n\";\n foreach($this->products as $shopProduct)\n {\n $str .= $shopProduct->getSummaryLine(). \"\\n\";\n }\n\n print $str;\n }", "public function MultiMediaPurchaseDisplay()\n\t{\tob_start();\n\t\techo '<div class=\"mmdisplay\"><div id=\"mmdContainer\">', $this->MultiMediaPurchaseTable(), '</div><script type=\"text/javascript\">$().ready(function(){$(\"body\").append($(\".jqmWindow\"));$(\"#rlp_modal_popup\").jqm();});</script>',\n\t\t\t'<!-- START instructor list modal popup --><div id=\"rlp_modal_popup\" class=\"jqmWindow\" style=\"padding-bottom: 5px; width: 640px; margin-left: -320px; top: 10px; height: 600px; \"><a href=\"#\" class=\"jqmClose submit\">Close</a><div id=\"rlpModalInner\" style=\"height: 500px; overflow:auto;\"></div></div></div>';\n\t\treturn ob_get_clean();\n\t}", "function studio_print_styles() {\n add_theme_support( 'print-style' );\n}", "function plumbing_parts_woocommerce_close_item_wrapper($cat='') {\n\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\tplumbing_parts_storage_set('in_product_item', false);\n\t}", "function jardiwinery_woocommerce_wrapper_start() {\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !jardiwinery_storage_empty('shop_mode') ? jardiwinery_storage_get('shop_mode') : 'thumbs'; ?>\">\n\t\t\t<?php\n\t\t}\n\t}", "function gencwooc_single_product_loop() {\n\n\tdo_action( 'woocommerce_before_main_content' );\n\n\t// Let developers override the query used, in case they want to use this function for their own loop/wp_query\n\t$wc_query = false;\n\n\t// Added a hook for developers in case they need to modify the query\n\t$wc_query = apply_filters( 'gencwooc_custom_query', $wc_query );\n\n\tif ( ! $wc_query) {\n\n\t\tglobal $wp_query;\n\n\t\t$wc_query = $wp_query;\n\t}\n\n\tif ( $wc_query->have_posts() ) while ( $wc_query->have_posts() ) : $wc_query->the_post(); ?>\n\n\t\t<?php do_action('woocommerce_before_single_product'); ?>\n\n\t\t<div itemscope itemtype=\"http://schema.org/Product\" id=\"product-<?php the_ID(); ?>\" <?php post_class(); ?>>\n\n\t\t\t<?php do_action( 'woocommerce_before_single_product_summary' ); ?>\n\n\t\t\t<div class=\"summary\">\n\n\t\t\t\t<?php do_action( 'woocommerce_single_product_summary'); ?>\n\n\t\t\t</div>\n\n\t\t\t<?php do_action( 'woocommerce_after_single_product_summary' ); ?>\n\n\t\t</div>\n\n\t\t<?php do_action( 'woocommerce_after_single_product' );\n\n\tendwhile;\n\n\tdo_action( 'woocommerce_after_main_content' );\n}", "function printLink($params)\n{\n extract($params);\n $strResult = \"<a href=\\\"javascript:openWindowDialog('training_request_print.php?dataID=\" . $record['id'] . \"');\\\">\" . getWords(\n \"print\"\n ) . \"</a>\";\n return $strResult;\n}", "public function single_entry_print($single_entry_id){\n\n //$print_qry = \"select t.* from LZ_MANIFEST_DET t where t.lz_manifest_id=$lz_manifest_id and t.STICKER_PRINT = 0\";\n // $print_qry = \"SELECT B.UNIT_NO, B.BARCODE_NO IT_BARCODE, B.PRINT_STATUS, V.ITEM_CONDITION, V.ITEM_MT_DESC, V.MANUFACTURER, V.MFG_PART_NO, V.UPC, V.AVAIL_QTY, V.ITEM_ID, V.LZ_MANIFEST_ID, V.PURCH_REF_NO, V.LAPTOP_ITEM_CODE FROM LZ_BARCODE_MT B, (SELECT IM.ITEM_DESC ITEM_MT_DESC, IM.ITEM_MT_MANUFACTURE MANUFACTURER, IM.ITEM_MT_BBY_SKU, IM.ITEM_MT_UPC UPC, IM.ITEM_MT_MFG_PART_NO MFG_PART_NO, IM.ITEM_CONDITION, LD.LAPTOP_ITEM_CODE, LM.LZ_MANIFEST_ID, LM.PURCH_REF_NO, LM.PURCHASE_DATE, IM.ITEM_ID, LM.LOADING_NO, LM.LOADING_DATE, SUM(LD.PO_DETAIL_RETIAL_PRICE * NVL(LD.AVAILABLE_QTY, 0)) PO_DETAIL_RETIAL_PRICE, SUM(NVL(LD.AVAILABLE_QTY, 0)) AVAIL_QTY, IM.ITEM_CODE FROM LZ_MANIFEST_MT LM, LZ_MANIFEST_DET LD, ITEMS_MT IM WHERE LM.LZ_MANIFEST_ID = LD.LZ_MANIFEST_ID AND IM.ITEM_CODE = LD.LAPTOP_ITEM_CODE GROUP BY IM.ITEM_DESC, IM.ITEM_MT_MANUFACTURE, LD.LAPTOP_ITEM_CODE, IM.ITEM_ID, LM.LZ_MANIFEST_ID, LM.PURCH_REF_NO, LM.PURCHASE_DATE, LM.LOADING_NO, LM.LOADING_DATE, IM.ITEM_MT_BBY_SKU, IM.ITEM_MT_UPC, IM.ITEM_MT_MFG_PART_NO, IM.ITEM_CONDITION, IM.ITEM_CODE ) V WHERE B.ITEM_ID = V.ITEM_ID AND B.LZ_MANIFEST_ID = V.LZ_MANIFEST_ID AND B.LZ_MANIFEST_ID = $lz_manifest_id ORDER BY B.ITEM_ID, B.UNIT_NO\"; \n $print_qry = \"SELECT D.PRICE, D.ITEM_MT_DESC, B.BARCODE_NO FROM LZ_MANIFEST_DET D, LZ_MANIFEST_MT M, LZ_BARCODE_MT B WHERE D.LZ_MANIFEST_ID = M.LZ_MANIFEST_ID AND M.LZ_MANIFEST_ID = B.LZ_MANIFEST_ID AND M.SINGLE_ENTRY_ID = $single_entry_id\"; //print_r($print_qry);exit;\n $print_qry =$this->db->query($print_qry);\n\n return $print_qry->result_array();\n\n \n //======================== Print Sticker tab End =============================// \t\n }", "function lawzone_amount_and_wishlist(){\n \twc_get_template( 'single-product/amount-wishlist.php' );\n }", "function woocommerce_product_loop()\n {\n }", "function woocommerce_pip_my_orders_action( $actions, $order ) {\n\n\tif ( in_array( $order->status, array( 'processing', 'completed' ) ) ) {\n\t\t$actions[] = array(\n\t\t\t'url'\t => wp_nonce_url( site_url( '?print_pip_invoice=true&post='.$order->id ), 'client-print-pip' ),\n\t\t\t'name' => __( 'View invoice', 'woocommerce-pip' )\n\t\t);\n\t}\n\treturn $actions;\n}", "protected function get_product_screen($hook)\n {\n }", "public function _wp_wpPrintScripts()\r\n {\r\n $script = '\r\n <script type=\"text/javascript\">\r\n var _sxyZoomOpts = { mode:\"'.$this->options['mode'].'\", steps: '.$this->options['steps'].', damping: '.$this->options['damping'].', size: \"'.$this->options['size'].'\" }; \r\n </script>';\r\n \r\n echo $script;\r\n }", "public static function printOutput($title, $objectName, $objectId = null, $request = null, $response = null, $errorMessage = null)\n {\n if (PHP_SAPI == 'cli') {\n self::$printResultCounter++;\n printf(\"\\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\\n\");\n printf(\"(%d) %s\", self::$printResultCounter, strtoupper($title));\n printf(\"\\n-------------------------------------------------------------\\n\\n\");\n if ($objectId) {\n printf(\"Object with ID: %s \\n\", $objectId);\n }\n printf(\"-------------------------------------------------------------\\n\");\n printf(\"\\tREQUEST:\\n\");\n self::printConsoleObject($request);\n printf(\"\\n\\n\\tRESPONSE:\\n\");\n self::printConsoleObject($response, $errorMessage);\n printf(\"\\n-------------------------------------------------------------\\n\\n\");\n } else {\n if (self::$printResultCounter == 0) {\n include \"header.html\";\n echo '\n <div class=\"row header\"><div class=\"col-md-5 pull-left\"><br /><a href=\"../index.php\"><h1 class=\"home\">&#10094;&#10094; Back to Samples</h1></a><br /></div> <br />\n <div class=\"col-md-4 pull-right\"><img src=\"https://www.paypalobjects.com/webstatic/developer/logo2_paypal_developer_2x.png\" class=\"logo\" width=\"300\"/></div> </div>';\n echo '<div class=\"panel-group\" id=\"accordion\" role=\"tablist\" aria-multiselectable=\"true\">';\n }\n self::$printResultCounter++;\n echo '\n <div class=\"panel panel-default\">\n <div class=\"panel-heading '. ($errorMessage ? 'error' : '') .'\" role=\"tab\" id=\"heading-'.self::$printResultCounter.'\">\n <h4 class=\"panel-title\">\n <a data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#step-'. self::$printResultCounter .'\" aria-expanded=\"false\" aria-controls=\"step-'.self::$printResultCounter.'\">\n '. self::$printResultCounter .'. '. $title . ($errorMessage ? ' (Failed)' : '') . '</a>\n </h4>\n </div>\n <div id=\"step-'.self::$printResultCounter.'\" class=\"panel-collapse collapse\" role=\"tabpanel\" aria-labelledby=\"heading-'. self::$printResultCounter . '\">\n <div class=\"panel-body\">\n ';\n\n if ($objectId) {\n echo \"<div>\" . ($objectName ? $objectName : \"Object\") . \" with ID: $objectId </div>\";\n }\n\n echo '<div class=\"row hidden-xs hidden-sm hidden-md\"><div class=\"col-md-6\"><h4>Request Object</h4>';\n self::printObject($request);\n echo '</div><div class=\"col-md-6\"><h4 class=\"'. ($errorMessage ? 'error' : '') .'\">Response Object</h4>';\n self::printObject($response, $errorMessage);\n echo '</div></div>';\n\n echo '<div class=\"hidden-lg\"><ul class=\"nav nav-tabs\" role=\"tablist\">\n <li role=\"presentation\" ><a href=\"#step-'.self::$printResultCounter .'-request\" role=\"tab\" data-toggle=\"tab\">Request</a></li>\n <li role=\"presentation\" class=\"active\"><a href=\"#step-'.self::$printResultCounter .'-response\" role=\"tab\" data-toggle=\"tab\">Response</a></li>\n </ul>\n <div class=\"tab-content\">\n <div role=\"tabpanel\" class=\"tab-pane\" id=\"step-'.self::$printResultCounter .'-request\"><h4>Request Object</h4>';\n self::printObject($request) ;\n echo '</div><div role=\"tabpanel\" class=\"tab-pane active\" id=\"step-'.self::$printResultCounter .'-response\"><h4>Response Object</h4>';\n self::printObject($response, $errorMessage);\n echo '</div></div></div></div>\n </div>\n </div>';\n }\n flush();\n }", "public function printReceipt()\n {\n echo $this->buildReceiptRow(\"-\", null, true);\n \n $products = $this->getProducts();\n foreach ($products as $product) {\n echo $this->buildReceiptRow($product->name, $this->formatPrice($product->priceWas));\n }\n\n echo $this->buildReceiptRow(\"-\", null, true);\n echo $this->buildReceiptRow(\"Sub-Total\", $this->getSubTotal());\n echo $this->buildReceiptRow(\"Discounts\", $this->getDiscounts());\n echo $this->buildReceiptRow(\"-\", null, true);\n echo $this->buildReceiptRow(\"Grand Total\", $this->getGrandTotal());\n }", "public function print_url() {\n\t\tif ( get_option( 'permalink_structure' ) ) {\n\t\t\treturn home_url( '/wprm_print/' . $this->id() );\n\t\t} else {\n\t\t\treturn home_url( '?wprm_print=' . $this->id() );\n\t\t}\n\t}", "public function getPrintUrl()\n {\n return $this->getUrl('*/*/print', [\n 'requisition_id' => (int)$this->getRequest()->getParam('requisition_id')\n ]);\n }", "function print_flat_data($title, $flat_data, $limit, $callGraphButton) {\n\n $size = count($flat_data);\n if (!$limit) {\n $limit = $size;\n $display_link = \"\";\n } else {\n $display_link = \"<a href='\" . CurrentPageHelper::url(array('all' => 1))\n . \"' class='btn btn-sm btn-primary'>Display All</a>\";\n }\n\n print('<div class=\"panel panel-default panel-functions\">');\n\n print(\"<div class=\\\"panel-heading form-inline \\\"><h3 class=\\\"panel-title\\\" style='display:inline-block;'>$title</h3> \");\n SymbolSearchInputTemplate::render();\n echo \"$display_link $callGraphButton\";\n print(\"</div>\");\n print('<table class=\"table table-functions table-condensed table-bordered\">');\n \\Sugarcrm\\XHProf\\Viewer\\Templates\\Run\\SymbolsTable\\HeaderTemplate::prepareColumns(reset($flat_data));\n \\Sugarcrm\\XHProf\\Viewer\\Templates\\Run\\SymbolsTable\\HeaderTemplate::render();\n\n if ($limit >= 0) {\n $limit = min($size, $limit);\n for($i=0; $i < $limit; $i++) {\n print_function_info($flat_data[$i]);\n }\n } else {\n // if $limit is negative, print abs($limit) items starting from the end\n $limit = min($size, abs($limit));\n for($i=0; $i < $limit; $i++) {\n print_function_info($flat_data[$size - $i - 1]);\n }\n }\n print(\"</table>\");\n\n // let's print the display all link at the bottom as well...\n if ($display_link) {\n echo '<div class=\"panel-footer\">' . $display_link . '</div>';\n }\n\n print('</div>');\n\n}", "public function drawSpecificItem($item){\r\n global $print, $showClosedItems;\r\n if (! $print) $print=RequestHandler::getBoolean('print');\r\n $result=\"\";\r\n if ($item=='versions' or $item=='versionsWithProjects') {\r\n \t$page=\"objectDetail\";\r\n \tif (isset($_REQUEST['page'])) $page=substr( basename($_REQUEST['page']) , 0, strpos(basename($_REQUEST['page']),'.php'));\r\n \t$showClosedVersions=(Parameter::getUserParameter('showClosedVersions')!='0')?true:false;\r\n \tif ($page!='objectDetail') $showClosedVersions=(Parameter::getUserParameter('structureShowClosedItems')!='0')?true:false;\r\n $result .=\"<table><tr>\";\r\n //$result .=\"<td class='label' valign='top'><label>\" . i18n('versions') . \"&nbsp;:&nbsp;</label></td>\";\r\n $result .=\"<td>\";\r\n if ($this->id) {\r\n $vers=new ProductVersion();\r\n if(!$showClosedVersions){\r\n $crit=array('idProduct'=>$this->id,'idle'=>'0');\r\n }else{\r\n $crit=array('idProduct'=>$this->id);\r\n }\r\n \t$result .= $vers->drawVersionsList($crit,($item=='versionsWithProjects')?true:false);\r\n }\r\n $result.='</td></tr>';\r\n if (!$print) {\r\n\t $result.='<tr>';\r\n\t $result.='<td style=\"white-space:nowrap;padding-right:10px;\"><label for=\"showClosedVersions\" style=\"width:250px\">'.i18n('labelShowIdle').'&nbsp;</label>';\r\n\t $result.='<div id=\"showClosedVersions\" dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" '.(($showClosedVersions)?'checked':'').' >';\r\n\t $result.='<script type=\"dojo/connect\" event=\"onChange\" args=\"evt\">';\r\n\t $result.=' saveUserParameter(\"showClosedVersions\",((this.checked)?\"1\":\"0\"));';\r\n\t $result.=' if (checkFormChangeInProgress()) {return false;}';\r\n\t $result.=' loadContent(\"objectDetail.php\", \"detailDiv\", \"listForm\");';\r\n\t $result.='</script>';\r\n\t $result.='</div></td>';\r\n\t $result.='</tr>';\r\n }\r\n $result .=\"</table>\";\r\n return $result;\r\n } elseif ($item=='subproducts') {\r\n $result .=\"<table><tr>\";\r\n //$result .=\"<td class='label' valign='top'><label>\" . i18n('versions') . \"&nbsp;:&nbsp;</label></td>\";\r\n $result .=\"<td>\";\r\n if ($this->id) {\r\n $result .= $this->drawSubProductsList();\r\n \r\n }\r\n $result .=\"</td></tr></table>\";\r\n return $result;\r\n } else if ($item=='structure' and !$print and $this->id) {\r\n $result=parent::drawStructureButton('Product',$this->id);\r\n return $result;\r\n } else if ($item=='tenders') {\r\n Tender::drawListFromCriteria('id'.get_class($this),$this->id);\r\n } \r\n }", "function plumbing_parts_woocommerce_importer_show_params($importer) {\n\t\t$importer->show_importer_params(array(\n\t\t\t'slug' => 'woocommerce',\n\t\t\t'title' => esc_html__('Import WooCommerce', 'plumbing-parts'),\n\t\t\t'part' => 0\n\t\t\t));\n\t}", "function wc_format_stock_for_display($product)\n {\n }", "public function composite_write_panel_tabs() {\r\n\t\techo '<li class=\"bto_product_tab show_if_bonscomposite linked_product_options bons_composite_product_options\"><a href=\"#bons_composite_data\">'.__( 'Composiciones', 'wc-bonster-composite-products' ).'</a></li>';\r\n\t}", "public function printAllGoalsPage() {\n\t}" ]
[ "0.7482476", "0.61128896", "0.6000484", "0.5943042", "0.5934135", "0.5523278", "0.55012053", "0.54794145", "0.5433566", "0.54252625", "0.5409309", "0.53844994", "0.5364839", "0.5350684", "0.53317875", "0.5314007", "0.5274686", "0.52601665", "0.5248749", "0.5207501", "0.5195145", "0.51768154", "0.5157691", "0.5127698", "0.51268995", "0.5125906", "0.51192635", "0.5095881", "0.50955033", "0.50743645", "0.50360054", "0.5017354", "0.50094366", "0.50083923", "0.50032943", "0.49933535", "0.49907392", "0.49886826", "0.4983493", "0.49789372", "0.4978005", "0.49773985", "0.49761972", "0.49702114", "0.49623594", "0.49509376", "0.49495098", "0.49468932", "0.49432904", "0.4933526", "0.49255687", "0.49246982", "0.49173218", "0.49159053", "0.491349", "0.49051395", "0.49049318", "0.49024048", "0.4893604", "0.4890981", "0.48861688", "0.48848227", "0.48836857", "0.48783538", "0.48758158", "0.4869937", "0.4867635", "0.48467115", "0.48451054", "0.4844564", "0.48418126", "0.4841408", "0.4840576", "0.48330635", "0.48281708", "0.48267287", "0.48266515", "0.48153004", "0.48070157", "0.4803928", "0.47927585", "0.47918049", "0.47911558", "0.4790923", "0.47818318", "0.47762683", "0.47667173", "0.47666743", "0.4765549", "0.4757903", "0.47552526", "0.47528243", "0.47517058", "0.47503296", "0.47411543", "0.47344962", "0.4728716", "0.47187617", "0.47178197", "0.4710878" ]
0.80927664
0
woocommerce_pip_client_window function. Function to output the printing window for single item for customers.
Функция woocommerce_pip_client_window. Функция для вывода окна печати для отдельного товара для клиентов.
function woocommerce_pip_client_window() { if ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) { $nonce = $_REQUEST['_wpnonce']; $order_id = $_GET['post']; $order = new WC_Order( $order_id ); $current_user = wp_get_current_user(); $action = 'print_invoice'; $client = true; // Check that current user has needed access rights. if ( ! wp_verify_nonce( $nonce, 'client-print-pip' ) || ! is_user_logged_in() || $order->user_id != $current_user->ID ) die( 'You are not allowed to view this page.' ); // unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows (actually this one might not be needed, are the customers in the admin for this?) remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); // Build the output. ob_start(); require_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php'; $content = ob_get_clean(); ob_start(); include woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php'; $content .= ob_get_clean(); ob_start(); require_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php'; $content .= ob_get_clean(); echo $content; exit; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to view this page.' );\n\n\t\t// unhook the admin bar to compensate for crappy NextGEN Gallery by Photocrati which causes it to be rendered on our pip windows\n\t\tremove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );\n\n\t\t$orders = explode( ',', $_GET['post'] );\n\t\t$action = $_GET['type'];\n\t\t$number_of_orders = count( $orders );\n\t\t$order_loop = 0;\n\n\t\t// Build the output.\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-header.php' ) . 'template-header.php';\n\t\t$content = ob_get_clean();\n\n\t\t// Loop through all orders (bulk printing).\n\t\tforeach ( $orders as $order_id ) {\n\t\t\t$order_loop++;\n\t\t\t$order = new WC_Order( $order_id );\n\t\t\tob_start();\n\t\t\tinclude woocommerce_pip_template( 'dir', 'template-body.php' ) . 'template-body.php';\n\t\t\t$content .= ob_get_clean();\n\t\t\tif ( $number_of_orders > 1 && $order_loop < $number_of_orders ) {\n\t\t\t\t$content .= '<p class=\"pagebreak\"></p>';\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\trequire_once woocommerce_pip_template( 'dir', 'template-footer.php' ) . 'template-footer.php';\n\t\t$content .= ob_get_clean();\n\n\t\techo $content;\n\t\texit;\n\t}\n}", "function kleo_woo_orders_screen_content() {\n\t\techo '<div class=\"woocommerce\">';\n\t\twc_get_template( 'myaccount/my-orders.php', array( 'order_count' => 'all' ) );\n\t\techo '</div>';\n\t}", "function cpe_orders_print_view()\n{\n\n /*dd(var_export(wp_verify_nonce($_GET['_wpnonce'], \"cpe_print_invoice-{$_GET['order']}\"), true));\n\n if (!wp_verify_nonce($nonce, \"cpe_print_invoice-{$_GET['order']}\")) {\n wp_die(\n __(\"Sorry! Something went wrong. Please contact site administrator or go back and retry.\"),\n __(\"Not Allowed!\"),\n array(\n \"response\" => 403,\n \"back_link\" => true\n )\n );\n }*/\n\n // Do we have an order ID?\n if (empty($_GET['order'])) {\n wp_redirect(admin_url('admin.php?page=pmpro-orders'));\n exit;\n }\n\n // Get order and membership level.\n $order = new MemberOrder($_GET['order']);\n\n if (!isset($order->id)) {\n wp_die(\n __(\"Sorry! Something went wrong. Please contact site administrator or go back and retry.\"),\n __(\"Not Allowed!\"),\n array(\n \"response\" => 403,\n \"back_link\" => true\n )\n );\n }\n\n $level = pmpro_getLevel($order->membership_id);\n\n // Load template\n $template = CPE_DIR . '/paid-memberships-pro/pages/orders-print.php';\n \n require_once($template);\n\n ?>\n <script>\n window.print();\n </script>\n\n <?php\n exit;\n}", "private function generateWindow($arr_item)\r\n\t\t{\r\n\t\t\t//reverse window\r\n\t\t\tif ($this->reverse) {\r\n\t\t\t\t$window = \"<div class=\\\"windower_side\\\">\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_body\\\">\r\n\t\t\t\t\t\t\t\t\t\t<a href=\\\" \".$arr_item[2].\" \\\" class=\\\"windower_side_link\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<img src=\\\" \".$this->imgsUrl.$arr_item[3].\" \\\" class=\\\"windower_side_img\\\">\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_top\\\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>\".$arr_item[1].\"</h2>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\";\r\n\t\t\t} //common window\r\n\t\t\telse {\r\n\t\t\t\t$window = \"<div class=\\\"windower_side\\\">\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_top\\\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>\".$arr_item[1].\"</h2>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_body\\\">\r\n\t\t\t\t\t\t\t\t\t\t<a href=\\\" \".$arr_item[2].\" \\\" class=\\\"windower_side_link\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<img src=\\\" \".$this->imgsUrl.$arr_item[3].\" \\\" class=\\\"windower_side_img\\\">\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\";\r\n\t\t\t}\r\n\r\n\t\t\treturn $window;\r\n\t\t}", "function premium_content_for_popups(){\n ?><div id=\"printLoyoutModal\" class=\"modal\" >\n <div class=\"modal-header\">\n <!--a class=\"close\" data-dismiss=\"modal\">&times;</a-->\n\n <div style=\"text-align:right;\">\n\n <a href=\"javascript:void(0);\"\n onclick=\"javascript:\n jQuery( '#print_loyout_content_action' ).print();\n //window.print();\n jQuery('#printLoyoutModal').modal('hide');\n jQuery('#print_loyout_content').html('');\n \"\n class=\"button button-primary\" >\n <?php _e('Print' ,'booking'); ?>\n </a>\n <a href=\"javascript:void(0)\" class=\"button\" data-dismiss=\"modal\"><?php _e('Close' ,'booking'); ?></a>\n </div>\n <h3 style=\"margin-top:-27px;\"><?php _e('Print bookings' ,'booking'); ?></h3>\n </div>\n <div class=\"modal-body\">\n <div id=\"print_loyout_content_action\" class=\"\">\n <div id=\"print_loyout_content\" class=\"wpdevbk\"> ------ </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n </div>\n </div><?php\n }", "function woocommerce_pip_preview() {\n\n\tif ( get_option( 'woocommerce_pip_preview' ) != 'enabled' ) {\n\t\treturn 'onload=\"window.print()\"';\n\t}\n}", "public function getShowInWindow()\n {\n return ( $this->helper('breadcheckout')->getShowInWindowCP() ) ? 'true' : 'false';\n }", "public function sitestoreproductGutterPrint($row) {\n if (!Engine_Api::_()->core()->hasSubject('sitestoreproduct_product')) {\n return false;\n }\n\n //GET SUBJECT\n $sitestoreproduct = Engine_Api::_()->core()->getSubject('sitestoreproduct_product');\n\n return array(\n 'class' => 'buttonlink icon_sitestoreproducts_printer',\n 'route' => \"sitestoreproduct_specific\",\n 'action' => 'print',\n 'target' => '_blank',\n 'params' => array(\n 'product_id' => $sitestoreproduct->getIdentity(),\n ),\n );\n }", "public function makeEditWindow()\r\n\t\t{\r\n\t\t\t$windowerUrl = $this->baseUrl . \"Windower/\";\r\n\t\t\t//$windowerUrl = filter_var($windowerUrl, FILTER_SANITIZE_URL);\r\n\r\n\t\t\t$windows = \"<div class=\\\"windower_main_\".$this->templateId.\"\\\">\";\r\n\r\n\t\t\t//if database is set\r\n\t\t\tif ($this->database != NULL) {\r\n\t\t\t\tforeach ($this->getRecordsFromDatabase(-1) as $arr_item) {\r\n\t\t\t\t\t$windows .= $this->generateEditWindow($arr_item, $windowerUrl);\r\n\t\t\t\t}\r\n\t\t\t} //if file is set\r\n\t\t\telse {\r\n\t\t\t\tforeach ($this->file as $line) {\r\n\t\t\t\t\tif (!ctype_space($line)) {\r\n\t\t\t\t\t\t$line = htmlspecialchars($line);\r\n\t\t\t\t\t\t$arr_item = explode(';', $line);\r\n\r\n\t\t\t\t\t\t$windows .= $this->generateEditWindow($arr_item, $windowerUrl);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn $windows .= \"</div>\";\r\n\t\t}", "function kleo_woo_downloads_screen_content() {\n\t\techo '<div class=\"woocommerce\">';\n\t\twc_get_template( 'myaccount/my-downloads.php' );\n\t\techo '</div>';\n\t}", "function dms_wc_print_mini_cart() {\n\tglobal $woocommerce, $wp_query;\n\n\tif ( ! defined('WOOCOMMERCE_CHECKOUT') ) {\n\t\tdefine( 'WOOCOMMERCE_CHECKOUT', true );\n\t}\n\n\t$map_instruction = get_field(\"dms_options_map_instruction\", 109);\n\n ?>\n <div id=\"dms-minicart\" class=\"state-initial\">\n\t <h2 class=\"cart-title cart-text calc-height\"><?php _e(\"Your order\", THEME_NAME); ?></h2>\n\n \t<?php\n\t\t\t$current_restaurant_id \t= ( $wp_query->query_vars[\"page_id\"] ) ? $wp_query->query_vars[\"page_id\"] : $wp_query->query_vars[\"author\"];\n\t\t\t$previous \t\t\t\t= get_field( \"dms_restaurant_previous\", \"user_\" . $current_restaurant_id );\n\t\t\t$has_preorder \t\t\t= ( isset( WC()->session->preorder ) ) ? true : false;\n\t\t\t$restaurant_closed \t\t= check_restaurant_closed( $current_restaurant_id );\n\t\t\t$closed_type \t\t\t= false;\n\n\t\t\tif( $restaurant_closed ){\n\t\t\t\tswitch ( $restaurant_closed[\"type\"] ) {\n\n\t\t\t\t\tcase 'closed_until':\n\t\t\t\t\t\t$closed_type = $restaurant_closed[\"type\"];\n\t\t\t\t\t\t$has_preorder = true;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'closed':\n\t\t\t\t\t\t$closed_type = $restaurant_closed[\"type\"];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n \t\tif( ( $previous || $previous == NULL ) && $closed_type != \"closed\" ){\n \t\t\t?>\n \t\t\t<div class=\"cart-previous cart-text calc-height\">\n \t\t\t\t<div class=\"order-type-selector\">\n \t\t\t\t\t<span class=\"mini-cart-radio\">\n \t\t\t\t\t\t<input type=\"radio\" name=\"dms_radio_previous_order\" id=\"radio_order_now\" <?php if( !$has_preorder ){ echo 'class=\"active\"'; checked( true ); } if( $closed_type == \"closed_until\" ){ disabled( true ); } ?> value=\"0\">\n \t\t\t\t\t\t<label for=\"radio_order_now\"><?php _e( \"Order now\", THEME_NAME ); ?></label>\n \t\t\t\t\t</span>\n \t\t\t\t\t<span class=\"mini-cart-radio\">\n \t\t\t\t\t\t<input type=\"radio\" name=\"dms_radio_previous_order\" id=\"radio_order_previous\" <?php if( $has_preorder ){ echo 'class=\"active\"'; checked( true ); } ?> value=\"1\">\n \t\t\t\t\t\t<label for=\"radio_order_previous\"><?php _e( \"Pre-Order\", THEME_NAME ); ?></label>\n \t\t\t\t\t</span>\n \t\t\t\t</div>\n \t\t\t\t<div class=\"order-time-selector <?php if( !$has_preorder ){ echo 'hidden'; } ?>\">\n \t\t\t\t\t<label for=\"dms_order_previous_hour\"><?php _e( \"Delivery from\", THEME_NAME ); ?></label>\n \t\t\t\t\t<?php echo print_restaurant_previous_order_time_select( $current_restaurant_id ); ?>\n \t\t\t\t</div>\n \t\t\t</div>\n \t\t\t<?php\n \t\t}\n \t?>\n\n\t <?php dms_cart_part_updatable(); ?>\n\n\t\t<div class=\"shipping-container popup-background\">\n\t\t\t<div class=\"user-shipping popup-box dms-container\">\n\t\t\t\t<a href=\"javascript:void(0)\" class=\"button_close_popup close-x\">&times;</a>\n\t\t\t\t<h2 class=\"popup-title\"><?php _e(\"Shipping address\", THEME_NAME); ?></h2>\n\t\t\t\t<form action=\"<?php echo WC()->cart->get_checkout_url(); ?>\" id=\"dms-goto-checkout-form\" method=\"post\">\n\t\t\t\t\t<input id=\"ship-to-different-address-checkbox\" class=\"input-checkbox\" name=\"ship_to_different_address\" value=\"1\" type=\"hidden\">\n\t\t\t\t\t<input id=\"make-previous-order\" class=\"input-checkbox\" name=\"make_previous_order\" value=\"0\" type=\"hidden\">\n\t\t\t\t\t<input id=\"previous-order-time\" class=\"input-checkbox\" name=\"previous_order_time\" value=\"\" type=\"hidden\">\n\t\t\t\t\t<div id=\"addresses\">\n\t\t\t\t \t<?php\n\t\t\t \t\tglobal $wma_current_address;\n\t\t\t\t\t\t$checkout = WC()->checkout();\n\t\t\t\t\t\t$shipFields = $checkout->checkout_fields['shipping'];\n\n\t\t\t \t\tif( is_user_logged_in() ){\n\t\t\t\t\t\t\tforeach ( $shipFields as $key => $field ) {\n\t\t\t\t\t\t\t\t$field['id'] = $key;\n\t\t\t\t\t\t\t\twoocommerce_form_field( $key, $field, $checkout->get_value( $field['id'] ) );\n\t\t\t\t\t\t\t}\n\t\t\t \t\t}else{\n\t\t\t\t\t\t\tforeach ( $shipFields as $key => $field ) {\n\t\t\t\t\t\t\t\t$field['id'] = $key;\n\n\t\t\t\t\t\t\t\tif( $key == \"shipping_state\" ){\n\t\t\t\t\t\t\t\t\twoocommerce_form_field( $key, $field, $checkout->get_value( $field['id'] ) );\n\t\t\t\t\t\t\t\t}elseif( $key == \"shipping_country\" ){\n\t\t\t\t\t\t\t\t\twoocommerce_form_field( $key, $field, $checkout->get_value( $field['id'] ) );\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\twoocommerce_form_field( $key, $field, WC()->customer->__get( $field['id'] ) );\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\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php if( $map_instruction ){ ?><div class=\"shipping-instructions\"><?php echo $map_instruction; ?></div><?php } ?>\n\t\t\t\t\t<div id=\"mapCanvas\"></div>\n\t\t\t\t\t<div class=\"popup-buttons\">\n\t\t\t\t\t\t<input type=\"button\" id=\"button_set_shipping_address\" class=\"button-simple\" value=\"<?php _e('Confirm address', THEME_NAME); ?>\">\n\t\t\t\t\t\t<input type=\"button\" class=\"button_close_popup button-simple\" value=\"<?php _e('Cancel', THEME_NAME); ?>\">\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t </div>\n\t\t</div>\n\t</div>\n <?php\n}", "public function print_listings_popup() {\n\n\t\t\t$action = add_query_arg(\n\t\t\t\tarray(\n\t\t\t\t\t'action' => 'jet_create_new_listing',\n\t\t\t\t),\n\t\t\t\tesc_url( admin_url( 'admin.php' ) )\n\t\t\t);\n\n\t\t\t$sources = $this->get_listing_item_sources();\n\n\t\t\t$views = apply_filters( 'jet-engine/templates/listing-views', array(\n\t\t\t\t'blocks' => __( 'Blocks (Gutenberg)', 'jet-engine' ),\n\t\t\t) );\n\n\t\t\tinclude jet_engine()->get_template( 'admin/listings-popup.php' );\n\t\t}", "public function WinTool() {\n \treturn array('items'=>$this->items);\n }", "function woocommerce_pip_print_return_policy() {\n\n\tif ( get_option( 'woocommerce_pip_return_policy' ) != '' ) {\n\t\treturn nl2br( stripslashes( get_option( 'woocommerce_pip_return_policy' ) ) );\n\t}\n}", "public function get_wc_product_builder_page() {\n\t\t$this->include_template( 'templates/wcpb-builder-page.php' );\n\t}", "public function getShowInWindow()\n {\n return ( $this->helper('breadcheckout')->getShowInWindowPDP() ) ? 'true' : 'false';\n }", "public function getDeliveryWindow()\n {\n return $this->getData(self::DELIVERY_WINDOW);\n }", "function kleo_woo_orders_screen() {\n\t\tadd_action( 'bp_template_content', 'kleo_woo_orders_screen_content' );\n\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}", "function woocommerce_output_content_wrapper()\n {\n }", "function wc_print_js()\n {\n }", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = $this->generate_salesusagetable();\n\t\t\t\n\t\t\tforeach (array_keys($this->json['data']['24month']) as $warehouse) {\n\t\t\t\tif ($warehouse != 'zz') {\n\t\t\t\t\t$content .= $this->generate_warehousediv($warehouse);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content .= $this->generate_warehousediv('zz');\n\t\t\treturn $content;\n\t\t}", "function planmyday_woocommerce_open_item_wrapper($cat='') {\n\t\t?>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"post_content\">\n\t\t<?php\n\t}", "function displayPrinterFriendly() {\n $vclNumber = $_SESSION['SJL_vclNumber'];\n $timeDesired = $_SESSION['SJL_timeDesired'];\n $dataStr = $_SESSION['SJL_dataStr'];\n\n /*\n Construct page:\n */\n site_headerPF('Shop Job List');\n\n $page_str = <<<EOPAGESTR\n\n<h2>SAMEH R LABIB, LLC.<br/>443-538-1746</h2>\n\n<p>vehicle number: $vclNumber <br/>target date: $timeDesired </p>\n\n<h3>Info. for Shop</h3>\n$dataStr\n\nEOPAGESTR;\n echo $page_str;\n site_footerPF();\n return;\n}", "public function printItems()\n {\n return view('items.print');\n }", "public function export_customer_top( $item ) {\n $customer_fields = $this->get_customer_field_by_section( 'top' );\n $this->generate_accounting_html_field( $customer_fields, $item );\n }", "function organics_woocommerce_open_item_wrapper($cat='') {\n\t\t?>\n<!--\t\t\t\t</a>-->\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"post_content\">\n\t\t<?php\n\t}", "function view_bill($bill_id){\r\n\t$row_color = 1;\r\n\t$customers = get_customer_details($bill_id);\r\n\t$grandTotal = number_format($customers['grandTotal'],2);\r\n\techo\"\r\n\t\t<div id = 'title'>\r\n\t\t\t<h1>Power IT Computer</h1>\r\n\t\t\t<h4>Show Room: Shop No: 226, Alaka Nodi Bangla Shopping Center (1st Floor), Mymensingh</h4>\r\n\t\t\t<h4>Head Office: 51, Jail Road, Mymensingh</h4>\r\n\t\t\t<h4>Cell No: 01716 - 36 42 00 &nbsp; OR &nbsp; 01675 - 30 11 61</h4>\r\n\t\t\t<h4>E-mail: info@powertitbd.com</h4>\r\n\t\t\t<hr>\r\n\t\t</div>\r\n\t\";\r\n\techo \"\r\n\t<div id='print'>\r\n\t\t<fieldset class='fldst'>\r\n\t\t\t<legend>Customer Details</legend>\r\n\t\t\t<table align='center' width='98%' cellspacing='5' cellpadding='5' border='0'>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>Bill ID</td>\r\n\t\t\t\t\t<td>Date</td>\r\n\t\t\t\t\t<td>Time</td>\r\n\t\t\t\t\t<td>Prepared By</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{$bill_id}</td>\r\n\t\t\t\t\t<td>{$customers['billDate']}</td>\r\n\t\t\t\t\t<td>{$customers['billTime']}</td>\r\n\t\t\t\t\t<td>{$customers['preparedBy']}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr><td colspan='4'><br></td></tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>Customer Name</td>\r\n\t\t\t\t\t<td>Customer Address</td>\r\n\t\t\t\t\t<td>Customer Cell No</td>\r\n\t\t\t\t\t<td>Customer E-mail</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{$customers['customerName']}</td>\r\n\t\t\t\t\t<td>{$customers['customerAddress']}</td>\r\n\t\t\t\t\t<td>{$customers['customerCell']}</td>\r\n\t\t\t\t\t<td>{$customers['customerEmail']}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr><td colspan='4'><br></td></tr>\r\n\t\t\t</table>\r\n\t\t</fieldset>\r\n\t\t\";\r\n\t\t$due = number_format(($customers['grandTotal']-$customers['totalPaid']),2);\r\n\t\t$totalPaid = number_format($customers['totalPaid'],2);\r\n\t\t$product_set = get_sales_product_details($bill_id);\r\n\t\t\r\n\techo\"\r\n\t\t<fieldset class='fldst'>\r\n\t\t<legend>Cart Details</legend>\r\n\t\t<table align='center' width='98%' class='tbl' cellspacing='5' cellpadding='5' border='0'>\r\n\t\t\t<tr class='tblhead'>\r\n\t\t\t\t<td align='left'>Serial</td>\r\n\t\t\t\t<td align='left'>Product Name</td>\r\n\t\t\t\t<td align='left'>Product Type</td>\r\n\t\t\t\t<td align='left'>Product Code</td>\r\n\t\t\t\t<td>Warranty</td>\r\n\t\t\t\t<td>Quantity</td>\r\n\t\t\t\t<td align='right'>Unit Price</td>\r\n\t\t\t\t<td align='right'>Subtotal</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr><td><br></td></tr>\r\n\t\";\r\n\twhile($products = mysql_fetch_assoc($product_set)){\r\n\t\tif($row_color % 2==0){\r\n\t\t\t$tbl_class = \"tbldata_even\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$tbl_class=\"tbldata_odd\";\r\n\t\t}\r\n\t\t$unitPrice = number_format($products['unitPrice'],2);\r\n\t\t$subTotal = number_format($products['subTotal'],2);\r\n\t\techo\"\r\n\t\t<tr class='{$tbl_class}'>\r\n\t\t\t<td align='left'>{$row_color}</td>\r\n\t\t\t<td align='left'>{$products['productName']}</td>\r\n\t\t\t<td align='left'>{$products['productType']}</td>\r\n\t\t\t<td align='left'>{$products['productCode']}</td>\r\n\t\t\t<td align='center'>{$products['productWarranty']}</td>\r\n\t\t\t<td align='center'>{$products['productQuantity']}</td>\r\n\t\t\t<td align='right'>{$unitPrice}</td>\r\n\t\t\t<td align='right'>{$subTotal}</td>\r\n\t\t</tr>\r\n\t\t\";\r\n\t\t$row_color++;\r\n\t}\r\n\techo \"\r\n\t\t\t<tr><td><br></td></tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='7' align='right'>Installation / Service Charge</td>\r\n\t\t\t\t<td align='right'>0.00</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='7' align='right'>Value Added Tax</td>\r\n\t\t\t\t<td align='right'>0.00</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td align='left'>Total Paid</td>\r\n\t\t\t\t<td align='right' class='total'>{$totalPaid}</td>\r\n\t\t\t\t<td colspan='5' align='right'>Discount</td>\r\n\t\t\t\t<td align='right'>0.00</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='8'><br></td>\r\n\t\t\t</tr>\r\n\t\";\r\n\techo \"\r\n\t\t<tr>\r\n\t\t\t<td align='left'> Total Due</td>\r\n\t\t\t<td class='total' align='right'>{$due}</td>\r\n\t\t\t<td colspan='5' align='right'>Grand Total</td>\r\n\t\t\t<td align='right' class='total'>{$grandTotal}</td>\r\n\t\t</tr>\r\n\t\t<tr><td><br></td></tr>\r\n\t\t\";\r\n\techo \"\r\n\t\t</table>\r\n\t\t</fieldset>\r\n\t\";\r\n\techo \"\r\n\t\t<div id='sign'>\r\n\t\t\t<div class='cust_sign'>\r\n\t\t\t\t<hr>\r\n\t\t\t\tCustomer's Signature\r\n\t\t\t</div>\r\n\t\t\t<div class='auth_sign'>\r\n\t\t\t\t<hr>\r\n\t\t\t\tAuthorized Signature\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<br><br>\r\n\t\t<div class='nb'>\r\n\t\t\t<p>Notes: </p>\r\n\t\t\t<p>#1 : Warranty Will be void if sticker removed, Physically damaged and burn case. All kinds of valid warranty is measured in Months.</p>\r\n\t\t\t<p>#2 : No Warranty for - Keyboard, Mouse, Power Supply, Speaker, Headphone, Cartridge-Toner, Casing, Webcam, Digital Camera, Card Reader, Bluetooth, Hub, Remote Control, Adapter etc.</p>\r\n\t\t\t<p>#3 : In any case of sales return/servicing or other problem, you <b>MUST</b> bring the copy of Invoice/bill/payment receipt.</p>\r\n\t\t\t<p>#4 : VAT (Value Added Tax) is not included.</p>\r\n\t\t</div>\r\n\t\";\r\n\techo \"\r\n\t\t<div class='extended_msg'>\r\n\t\t\t<a href='javascript:window.print()' class='link_btn'>Print</a>\r\n\t\t\t<a href='home.php' class='link_btn'>Go Back</a>\r\n\t\t</div>\r\n\t\";\r\n\techo\"\r\n\t\t</div>\r\n\t\";\t\r\n}", "function showOrderDetails($arr)\n\t{\n\t\t$output=' <div class=\"title_fnt\">\n\t\t<h1>Order Details</h1>\n\t\t<span><a href=\"javascript:window.open (\\'?do=orderdetail&action=print&id='.$arr[0]['orders_id'].'\\',\\'mywindow\\',\\'location=1,status=1,scrollbars=1,width=920,height=700\\');void(0);\"><button name=\"color\" type=\"button\" class=\"btn btn-danger\" value=\"btn btn-danger\">Print</button></a>\n\t\t</span>\n\n\t\t\n\t\t</div>\n\t\t\n\t\t<div id=\"myaccount_div\">\n\t\t<div class=\"myacc_detail\">\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t<div class=\"row-fluid\">\n\t\t\t\t<div class=\"span6\"><h4>Order Information</h4>\n\t\t\t<table class=\"table table-striped table-bordered\">\n\t\t\t<tr>\n\t\t\t<td>Order Id</td>\n\t\t\t<th>#'.$arr[0]['orders_id'].'</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td>Order Status </td>\n\t\t\t<th><span class=\"label label-success\">'.$arr[0]['orders_status_name'].'</span></th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td> Order Total</td>\n\t\t\t<th>'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].''.$arr[0]['order_total'].'</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td>Order Date</td>\n\t\t\t<th>'.$arr[0]['purDate'].'</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td>Close Date</td>\n\t\t\t<th>'.$arr[0]['closeDate'].'</th>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\t<div class=\"span6\"><h4>Payment Details </h4>\n\t\t\t\t<table class=\"table table-striped table-bordered\">\n\t\t\t<tr>\n\t\t\t<td>Paid Through</td>\n\t\t\t<th>'.$arr[0]['gateway_name'].'</th>\n\t\t\t</tr>\n\t\t\t\n\t\t\t</table>\n\t\t\t</div>\n\t\t\t</div>\n \t\t<div class=\"row-fluid\">\n \t\t <div class=\"span6\"><h4>Billing Address</h4><ul class=\"addresslist\">\n\t\t\t<li><address>\n\t\t\t\n\t\t\t<p>'.$arr[0]['billing_name'].'</p>\n\t\t\t<p>'.$arr[0]['billing_company'].'</p>\n\t\t\t<p> '.$arr[0]['billing_street_address'].'</p>\n\t\t\t<p>'.$arr[0]['billing_city'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['billing_postcode'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['billing_state'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['billcountry'].'</p>\n\t\t\t</address></li></ul>\n\n \t </div>\n <div class=\"span6\"><h4>Shipping Address</h4>\n\t\t\t\t<ul class=\"addresslist\">\n\t\t\t<li><address>\n\t\t\t<p>'.$arr[0]['shipping_name'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['shipping_company'].'</p>\n\t\t\t\n\t\t\t<p> '.$arr[0]['shipping_street_address'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['shipping_city'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['shipping_postcode'].'</p>\n\t\t\n\t\t\t<p>'.$arr[0]['shipping_state'].'</p>\n\t\t\t\n\t\t\t<p>'.$arr[0]['shipcountry'].'</p>\n\t\t\t</address></li></ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\t\n\t\t\n\t\t\t<h4>Item Details</h4>\n\t\t\t\n\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\n\t\t\t<table class=\"rt cf\" id=\"rt1\">\n\t\t\t<thead class=\"cf\">\n\t\t\t<tr>\n\t\t\t\t<th>Item Details</th>\n\t\t\t\t<th>Price</th>\n\t\t\t\t<th>Quantity</th>\n\t\t\t\t<th>Shipping Charge</th>\n\t\t\t\t<th>Total</th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>';\n\t\t\t$grand=0;\n\t\t\t$ship_cost=0;\n\t\t\tfor($i=0;$i<count($arr);$i++)\n\t\t\t{\n\t\t\t\t$total=$arr[$i]['product_unit_price']*$arr[$i]['product_qty'] ;\n\t\t\t\t$output.='<tr>\n\t\t\t\t\t<td>'.$arr[$i]['title'].'</td>\n\t\t\t\t\t<td><span class=\"label label-info\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($arr[$i]['product_unit_price'],2).'</span></td>\n\t\t\t\t\t<td>'.$arr[$i]['product_qty'].'</td>\n\t\t\t\t\t<td><span class=\"label label-warning\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($arr[$i]['shipping_cost'],2).'</span></td>\n\t\t\t\t\t<td><span class=\"label label-inverse\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($total,2).'</span></td>\n\t\t\t\t</tr>';\n\t\t\t\t$grand+=$total;\n\t\t\t\t$ship_cost+=$arr[$i]['shipping_cost'];\n\t\t\t}\n\t\t\t\t$output.='<tr>\n\t\t\t\t<td colspan=\"3\" rowspan=\"3\">&nbsp;</td>\n\t\t\t\t<td>Sub Total</td>\n\t\t\t\t<td><span class=\"label label-success\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($grand,2).'</span>\t</td>\n\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td>Shipping Amount</td>\n\t\t\t\t<td><span class=\"label label-inverse\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($ship_cost,2).'</span></td>\n\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td>Grand Total</td>\n\t\t\t\t<td><span class=\"label label-important\">'.$_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'].'&nbsp;'.number_format($arr[0]['order_total']).'</span></td>\n\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>';\n\t\treturn $output;\t\n\t}", "function theme_orders_page() {\n if(isset($_GET['action']) and $_GET['action'] == 'view-detail'){\n require_once 'class-orders-detail-list-table.php';\n\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Chi tiết đơn hàng</h2>\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPOrders_Detail_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</div>';\n }else{\n require_once 'class-orders-list-table.php';\n \n $product_id = 0;\n if(isset($_REQUEST['product_id']) and intval($_REQUEST['product_id']) > 0){\n $product_id = intval($_REQUEST['product_id']);\n }\n\n $btn2Excel = '<a class=\"button\" href=\"' . get_template_directory_uri() . '/export2excel.php'. (($product_id > 0) ? '?product_id=' . $product_id : '') .'\">Xuất ra Excel</a>';\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Danh sách đơn hàng $btn2Excel</h2>\n <ul class=\"subsubsub\">\nHTML;\n echo '<li><a class=\"', (!isset($_GET['status'])) ? 'current' : '' ,'\" href=\"?page=nvt_orders', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Chờ duyệt</a> | </li>';\n //echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == \"0\") ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=0', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Chờ duyệt</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == 1) ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=1', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Đã duyệt</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == 2) ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=2', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Đã hủy</a> | </li>';\n echo '<li><a class=\"', (isset($_GET['status']) && $_GET['status'] == \"all\") ? 'current' : '' ,'\" href=\"?page=nvt_orders&status=all', ($product_id > 0) ? '&product_id=' . $product_id : '' ,'\">Tất cả</a></li>';\n echo <<<HTML\n </ul>\n <form action=\"\" method=\"get\">\n <input type=\"hidden\" name=\"page\" value=\"nvt_orders\" />\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPOrders_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</form></div>';\n }\n}", "function hwoo_myaccount_show_orders($data = array()) {\r\n wc_get_template( 'myaccount/my-orders.php' );\r\n }", "public function window()\n\t{\n\t\t$this->template->set_filename('empty');\n\t\t$this->template->body = View::factory('live_timer/window');\n\t\t$this->template->title = 'Live Timer';\n\t\t$this->template->body->projects = Auto_Modeler_ORM::factory('project')->select_list('id', array('id', 'name'), 'id', array('complete' => FALSE));\n\t}", "function outputListItems()\n {\n global $application;\n $retval = '';\n $orders = modApiFunc(\"Checkout\", \"getOrdersIDForDelete\");\n foreach ($orders as $orderId)\n {\n $this->_Template_Contents = array();\n $order_id = sprintf(\"%d\", $orderId);\n $currency_id = modApiFunc(\"Localization\", \"whichCurrencyToDisplayOrderIn\", $order_id);\n modApiFunc(\"Localization\", \"pushDisplayCurrency\", $currency_id, $currency_id);\n $orderInfo = modApiFunc(\"Checkout\", \"getOrderInfo\", $order_id, $currency_id);\n\n $request = new Request();\n $request->setView ('OrderInfo');\n $request->setAction('SetCurrentOrder');\n $request->setKey('order_id', $orderInfo[\"ID\"]);\n $request->setKey('delete', 'true');\n $OrderInfoLink = $request->getURL();\n\n $customer_obj = &$application->getInstance('CCustomerInfo',modApiFunc('Customer_Account','getCustomerAccountNameByCustomerID',$orderInfo['PersonId']));\n\n $request = new Request();\n $request->setView('PopupWindow');\n $request->setKey('page_view', 'CustomerAccountInfo');\n $request->setKey('customer_id', $orderInfo['PersonId']);\n $CustomerInfoLink = $request->getURL();\n\n $this->_Template_Contents['OrderId'] = $orderInfo[\"ID\"];\n $this->_Template_Contents['OrderInfoLink'] = $OrderInfoLink;\n $this->_Template_Contents['Customer'] = prepareHTMLDisplay($customer_obj->getDisplayAccountName());\n $this->_Template_Contents['CustomerInfoLink'] = $CustomerInfoLink;\n $this->_Template_Contents['OrderDate'] = modApiFunc(\"Localization\", \"date_format\", $orderInfo[\"Date\"]);\n $this->_Template_Contents['OrderAmount'] = modApiFunc(\"Localization\", \"currency_format\", $orderInfo[\"Total\"]);\n $this->_Template_Contents['OrderStatus'] = $orderInfo[\"Status\"];\n $this->_Template_Contents['PaymentStatus'] = $orderInfo[\"PaymentStatus\"];\n\n $application->registerAttributes($this->_Template_Contents);\n $retval.= modApiFunc('TmplFiller', 'fill', \"checkout/delete-orders/\",\"item.tpl.html\", array());\n modApiFunc(\"Localization\", \"popDisplayCurrency\");\n }\n\n return $retval;\n }", "function organics_woocommerce_close_item_wrapper($cat='') {\n\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\torganics_set_global('in_product_item', false);\n\t}", "public function productpreviewmodal() { \n\t\tob_start(); \n\t\tglobal $yith_wcwl, $theme_settings;\n\t\t$productid = $_GET['productid']; \n\t\t$loading_location = $_GET['loading_location']; \n\t\t$temp = $post;\n\t\t$productpost = get_post( $productid );\n\t\tsetup_postdata( $post );\n\t\t$product_sku = get_post_meta($productid,'_sku', true);\n\t\t$product_price = get_post_meta($productid,'_regular_price', true);\n\t\t$currency = 'Rs. ';\n\t\t$product_sale_price = get_post_meta($productid,'_sale_price', true);\n\t\t$product_discount = get_post_meta($productid,'_product_discount', true);\n\t\t$images = get_post_meta($productid, '_product_image_gallery', true);\n\t\t$terms = get_the_terms( $productid, 'product-discount' );\n\t\t$product_author = $productpost->post_author;\n\t\t$product_deal = get_post_meta($productid,'product_deal', true);\n\t\t$product_mallid = get_post_meta($productid,'mall',true);\n\t\t$product_mall = get_the_title($product_mallid);\n\t\t$product_shopid = get_post_meta($productid,'shop',true);\n\t\t$product_shop = get_the_title($product_shopid);\n\t\t$merchant_preview_product = '';\n\t\t$content = $productpost->post_excerpt;\n\t\t$phoneno = get_post_meta($product_shopid, 'shop_phone_num', true);\n\t\t$size_chart = get_post_meta($productid, 'clothing_size_chart', true);\n\t\t\n $product_view_count = get_post_meta($productid, 'product_views', true);\n $product_view_count++;\n update_post_meta($productid, 'product_views', $product_view_count);\n \n\t\t$lat1 = isset($_COOKIE['me_lat']) ? $_COOKIE['me_lat'] : '';\n\t\t$lng1 = isset($_COOKIE['me_lng']) ? $_COOKIE['me_lng'] : '';\n\t\t$lat2 = get_post_meta($product_shopid, 'latitude', true);\n\t\t$lng2 = get_post_meta($product_shopid, 'longitude', true);\n\t\t$unitdistance = 'K';\n\n//\t\t$distance_flag = calc_distance($lat1, $lng1, $lat2, $lng2, $unitdistance);\t\t\n\n\t\tif($loading_location=='merchant') {\n\t\t\t$merchant_preview_product = 'merchant_preview_product';\n\t\t}\n\t\t$attributes = get_post_meta($productid);\n\t\t$url = site_url().'/wp-content/plugins/yith-woocommerce-wishlist/yith-wcwl-ajax.php?action=mm_add_to_wishlist&add_to_wishlist='.$productid;\n\t\t?>\n\t\t<div class=\"product_view_wrap <?php echo $merchant_preview_product; ?>\">\n\t\t\t<div class=\"modal fade\" id=\"productview<?php echo $productid; ?>\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"productviewmodal\" aria-hidden=\"true\">\n\t\t\t <div class=\"modal-dialog modal-lg\">\n\t\t\t <div class=\"modal-content\">\n\t\t\t\t \t<div class=\"modal-header\">\n\t\t\t\t \t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\"><span aria-hidden=\"true\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/close-btn-prod.png\"></span><span class=\"sr-only\"></span></button>\n\t\t\t\t </div>\n\t\t\t\t <div class=\"modal-body\">\n\t\t\t\t\t <div class=\"product_info row\">\n\t\t\t\t\t \t<?php \n\t\t\t\t\t \t$urlview = get_permalink($theme_settings['wishlistpage']);\n\t\t\t\t\t \tif(!$yith_wcwl->is_product_in_wishlist( $productid )) { ?>\n\t\t\t\t\t \t \t<div class=\"product_wishlist add_product_to_wishlist\" style=\"cursor:pointer;\" data-action=\"<?php echo $url; ?>\" title=\"Add To Wishlist\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist.png\" /><i class=\"fa fa-cog fa-spin wishlistajaxloader\"></i></div>\n\t\t\t\t\t \t \t<a href=\"<?php echo $urlview; ?>\" class=\"product_wishlist_added\" title=\"View Wishlist\" style=\"cursor:pointer; display: none;\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist-red.png\" /></a>\n\t\t\t\t\t \t \t<?php } else { ?>\n\t\t\t\t\t \t \t<a href=\"<?php echo $urlview; ?>\" class=\"product_wishlist_added\" title=\"View Wishlist\" style=\"cursor:pointer; text-decoration: none;\"><img src=\"<?php echo plugins_url();?>/merchant-dashboard/assets/images/icon-wishlist-red.png\" /></a>\n\t\t\t\t\t \t \t<?php } ?>\n\t\t\t\t\t \t \t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t \t \t<div class=\"product_slider col-sm-4\">\n\t\t\t\t\t\t \t \t <div class=\"row\">\n<!--\t\t\t\t\t\t\t \t \t <div class=\"vericalwrap col-sm-4\">\n\t\t\t\t\t\t\t\t \t \t\t<ul id=\"productvertical<?php echo $productid; ?>\" class=\"elastislide-list\">\n\t\t\t\t\t\t\t\t \t \t\t \t<?php\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$sliderhtml = '';\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$thumb_id = get_post_thumbnail_id($productid);\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$first_thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t$first_thumb_url = $first_thumb_url_array[0];\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .='<li slideto=\"0\" style=\"cursor: pointer;\" class=\"active_product_thumb\">';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '<img src=\"'.$first_thumb_url.'\" />';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '</li>';\n//\t\t\t\t\t\t\t\t \t \t\t \t\t\n//\t\t\t\t\t\t\t\t \t \t\t \t\t$images = get_post_meta($productid, '_product_image_gallery', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t$images_array = explode(\",\", $images);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t if ( $images!=\"\" ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t \t$ic=1;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t foreach ( $images_array as $image ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $thumb_url_array = wp_get_attachment_image_src($image, 'thumbnail', true);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $thumb_url = $thumb_url_array[0];\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .='<li slideto=\"'.$ic.'\" style=\"cursor: pointer;\">';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '<img src=\"'.$thumb_url.'\" />';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $sliderhtml .= '</li>';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t $ic++;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t }\n//\t\t\t\t\t\t\t\t\t\t\t\t\t } \n//\t\t\t\t\t\t\t\t\t\t\t\t\t echo $sliderhtml;\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</ul> carousevertical end \n\t\t\t\t\t\t\t \t \t</div>-->\n\t\t\t\t\t\t\t \t \t\t<div class=\"full_product_slider col-sm-12\">\n\t\t\t\t\t\t\t \t \t\t\t<!-- <div id=\"carousel-product<?php echo $productid; ?>\" class=\"carousel slide\" data-ride=\"carousel\">\n\t\t\t\t\t\t\t \t \t\t\t\t<div class=\"carousel-inner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t<?php //echo $this->product_slider($productid); ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t \t \t\t\t</div> -->\n\t\t\t\t\t\t\t \t \t\t\t<div class=\"product_images_slider\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo $this->mobile_product_slider($productid); ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t \t \t\t\t\n\n\t\t\t\t\t\t\t \t \t\t</div> <!-- full_product_slider end -->\n\t\t\t\t\t\t\t \t \t</div>\n\t\t\t\t\t\t \t \t</div> <!-- product_slider end -->\n\t\t\t\t\t\t \t \t<div class=\"product_description col-sm-8\">\n\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t \t \t\t<h2 class=\"product_title\"><a href=\"<?php echo get_permalink($productid); ?>\"><?php echo get_the_title($productid); ?></a></h2>\n\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t \t \t\t<?php if($product_sku != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_id\">Product Id: <span><?php echo $product_sku; ?></span></div> <!-- product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?> \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<?php //if($product_mall != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<!--<div class=\"product_mall\"><i class=\"fa fa-building-o\"></i><b> Location:</b> <span><?php //echo $product_mall; ?></span></div> product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php //} ?>\n\n\t\t\t\t\t\t \t \t\t<?php if($product_shop != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_shop\"><i class=\"fa fa-bank\"></i><b> Shop:</b> <span><?php echo $product_shop; ?></span></div> <!-- product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<?php if($phoneno != ''){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<!--<div class=\"phoneno\"><i class=\"fa fa-phone\"></i><b> Phone No:</b> <span><?php // echo $phoneno; ?></span></div> product_id end -->\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t \t \t\t<div class=\"product_size\">\n\t\t\t\t\t\t \t \t\t\t<?php \n//\t\t\t\t\t\t \t \t\t\t\tif(!empty($attributes) || $attributes!=\"\") {\n//\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $attributes as $attribute ) :\n//\t\t\t\t\t\t\t\t\t\t\t\t\t$taxonomy_object = get_taxonomy( $attribute['name'] );\n//\t\t\t\t \t\t\t\t\t\tif($attribute['name'] == 'pa_size' || $attribute['name'] == 'pa_shoes-sizes'){\t\n//\t\t\t\t\t \t\t\t\t\t\t$label = $taxonomy_object->label;\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\techo 'Size: '; \n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( $attribute['is_taxonomy'] ) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$values = wc_get_product_terms( $productid, $attribute['name'], array( 'fields' => 'names', 'orderby' => 'term_order' ) );\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tasort($values);\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($values as $value) {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<span class=\"size\" style=\"cursor:pointer;\">' .$value.'</span>';\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} else {\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Convert pipes to commas and display values\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$values = array_map( 'trim', explode( WC_DELIMITER, $attribute['value'] ) );\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<span class=\"size\" style=\"cursor:pointer;\">' .implode( ', ', $values ).'</span>';\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\tif(trim(strip_tags($size_chart)) !=''){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<p class=\"sizechartlink\" style=\"margin-top: 10px;\"><a href=\"'.get_permalink($productid).'#sizechart\">Size Help</a></p>';\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n//\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\telse{}\n//\t\t\t\t\t\t\t\t\t\t\t\t\tendforeach; \n//\t\t\t\t\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<!--<input type=\"hidden\" class=\"selected_csize\" value=\"\" />-->\n\t\t\t\t\t\t \t \t\t</div><!-- product_size end -->\n\n\t\t\t\t\t\t \t \t\t<?php\n//\t\t\t\t\t\t \t \t\tif($distance_flag!='error') {\n//\t\t\t\t\t\t \t \t\t?>\t\n<!--\t\t\t\t\t\t \t \t\t<div class=\"distance_from_your_location\">\n\t\t\t\t\t\t \t \t\t\t<label>Distance From Your Location : </label> //<?php // echo round($distance_flag, 2).' KM'; ?>\n\t\t\t\t\t\t \t \t\t\t<a href=\"https://maps.google.com?saddr=//<?php // echo $lat1.','.$lng1; ?>&daddr=<?php // echo $lat2.','.$lng2; ?>\" target=\"_blank\">Get Direction</a>\n\t\t\t\t\t\t \t \t\t</div>-->\n\t\t\t\t\t\t \t \t\t<?php\n//\t\t\t\t\t\t \t \t\t}\n\t\t\t\t\t\t \t \t\t?>\n\t\t\t\t\t\t \t \t\t\t\n\t\t\t\t\t\t \t \t\t<?php if($content !='' ){ ?>\n\t\t\t\t\t\t\t \t \t\t<div class=\"product_detail_info\">\n\t\t\t\t\t\t\t \t \t\t\t\n\t\t\t\t\t\t\t\t \t \t\t\t<div class=\"show_product_detailed_desc\" change_desc_text1=\"Detailed Product Description\" change_desc_text2=\"Show Detailed Product Description...\" open_close=\"open\" style=\"cursor: pointer;\">Show Detailed Product Description...</div>\n\t\t\t\t\t\t\t\t \t \t\t\t<div class=\"product_detail_info_inner\" style=\"display: none;\">\n\t\t\t\t\t\t\t\t \t \t\t\t\t<?php \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(!empty($attributes) || $attributes!=\"\") {\n// echo '</pre>';\n//// print_r($attributes);\n// echo '</pre>';\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $attributes as $key => $attribute ) :\n////\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$taxonomy_object = get_taxonomy( $attribute['name'] );\n// \n// //$label = $taxonomy_object->label;\n// if(!empty($attribute[0])){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<div><b>'.htmlspecialchars($key).' :- </b>'; \n// foreach ( $attribute as $attribute) :\n// echo $attribute; \n// endforeach;\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '</div>';\n// }\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendforeach; \n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \n \n\t\t\t\t\t\t\t\t \t \t\t\t\tif($content != ''){ ?>\n\t\t\t\t\t\t\t\t \t \t\t\t\t<div><b>Detailed:- </b> <?php \n\t\t\t\t\t\t\t\t \t \t\t\t\t\t$words = explode(\" \",$content);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"popup-details\">'; echo implode(\" \",array_splice($words, 0 , 25)).\"... <a href='\".get_permalink($productid).\"'>Read More</a>\"; echo '</div>';\n\t\t\t\t\t\t\t\t \t \t\t\t\t?> </div>\n\t\t\t\t\t\t\t\t \t \t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t \t \t\t\t</div>\n\t\t\t\t\t\t\t\t \t \t\t\n\t\t\t\t\t\t\t\t \t \t</div> <!-- product_detail_info end -->\n\t\t\t\t\t\t\t \t \t<?php } else{ } ?>\n\t\t\t\t\t\t \t \t\t<div class=\"product_price\">\n\t\t\t\t\t\t \t \t\t\t<?php\n setlocale(LC_MONETARY, 'en_IN');\n $product_price1 = money_format('%!.0n', $product_price);\n if($product_sale_price!='') {\n \n $product_sale_price1 = money_format('%!.0n', $product_sale_price);\n \n ?>\n\t \t\t\t\t\t\t<div class=\"discount_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_sale_price != ''){ echo $currency . $product_sale_price1.\"/-\" ;}?></div>\n\t \t\t\t\t\t\t\t <div class=\"original_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_price != ''){ echo $currency . $product_price1.\"/-\"; }?></div>\n\t \t\t\t\t\t<?php } else { ?>\n\t \t\t\t\t\t<div class=\"discount_price col-sm-4 col-md-3 col-xs-4\"><?php if($product_price != ''){ echo $currency . $product_price1.\"/-\" ;}?></div>\n\t \t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\t<?php if($product_deal!=''){$dealcol = 'col-xs-5';} else{$dealcol = 'col-xs-4';} ?>\n\t\t\t\t\t\t \t \t\t\t<div class=\"discount col-sm-4 col-md-6 <?php echo $dealcol; ?>\">\n\t\t\t\t\t\t\t \t \t\t\t<?php \n\t\t \t\t\t\t\t\tif($product_deal!='') { ?>\n\t\t\t\t\t\t\t \t \t\t\t\t<span><?php echo $product_deal; ?></span>\n\t\t\t\t\t\t\t \t \t\t\t<?php\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\telse if($product_discount !=''){ ?>\n\t\t \t\t\t\t\t\t<span><?php echo $product_discount.''; ?> </span>\n\t\t\t\t\t\t\t \t \t\t\t<?php } \n\t\t \t\t\t\t\telse{}\n\t\t \t\t\t\t?>\n\t\t\t\t\t\t \t \t\t\t</div>\n\t\t\t\t\t\t \t \t\t</div>\n\t\t\t\t\t\t \t \t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"product_malling_delivery\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_malling product_malling_delivery_tooltip col-sm-6 col-xs-6\" data-action=\"malling\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Generate coupon and pick up ur order\">Malling</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"product_delivery product_malling_delivery_tooltip col-sm-6 col-xs-6\" data-action=\"gd\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Get it delivered with Rs 100 Laziness Charge\">Feeling Lazy</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t</div> <!-- end product_malling_delivery -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"product_enquiry col-sm-12\">\n\t\t\t\t\t\t\t\t\t\t\t<span>How do we connect with you? </span>\n\t\t\t\t\t\t\t\t\t\t\t<ul class=\"success_error\"></ul>\n\t\t\t\t\t\t\t\t\t\t\t<form class=\"get_coupon\" action=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t<p><input type=\"text\" name=\"user_phone\" placeholder=\"enter your phone number\" /></p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"product_enquiry_option\">or</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p><input type=\"text\" name=\"user_email\" placeholder=\"enter your email address\" required /></p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"product_enquiry_button\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-cog fa-spin cgd_loader\"></i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary malling_gd\" data-malling=\"Generate Coupon\" data-gd=\"Shopkeeper will connect with you\">Generate Coupon</button>\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"product_author\" value=\"<?php echo $product_author; ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"product_id\" value=\"<?php echo $productid; ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"form-action\" class=\"form-action\" value=\"malling\" />\n\t\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t</div><!-- end product_enquiry-->\n\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\n\t\t\t\t\t\t \t \t</div> <!-- product_description end -->\n\t\t\t\t\t\t \t\n\t\t\t\t \t </div><!-- product_info end -->\n\t\t\t\t </div> <!-- end modal-body -->\n\t\t\t </div> <!-- end modal-content -->\n\t\t\t </div><!-- end modal-dialog -->\n\t\t\t</div><!-- end modal -->\n\t\t</div><!-- end product_view_wrap -->\n\n\t\t<?php\t\n\t\twp_reset_postdata();\n\t\t$post = $temp;\n\t\t$modal = ob_get_clean();\n\t\techo json_encode(array('modal'=>$modal));\n\t\tdie(0);\n\t}", "function showorder($request) {\r\n\t\tif(isset($_REQUEST[\"print\"])) {\r\n\t\t\tRequirements::clear();\r\n\t\t\tRequirements::themedCSS(\"typography\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"OrderReport\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"Order_Invoice\", \"print\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\treturn $this->renderWith(\"Invoice\");\r\n\t\t}\r\n\t\telseif(isset($_REQUEST[\"packingslip\"])) {\r\n\t\t\tRequirements::clear();\r\n\t\t\tRequirements::themedCSS(\"typography\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"OrderReport\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\tRequirements::themedCSS(\"Order_PackingSlip\"); // LEAVE HERE - NOT EASY TO INCLUDE VIA TEMPLATE\r\n\t\t\treturn $this->renderWith(\"PackingSlip\");\r\n\t\t}\r\n\t\treturn array();\r\n\t}", "function woocommerce_pip_create_box_content() {\n\n\tglobal $post_id;\n\n\t?>\n\t<table class=\"form-table\">\n\t\t<?php if ( get_post_meta( $post_id, '_pip_invoice_number', true ) ) { ?>\n\t\t<tr>\n\t\t\t<td><?php _e( 'Invoice: #', 'woocommerce-pip' ); echo get_post_meta( $post_id, '_pip_invoice_number', true ); ?></td>\n\t\t</tr>\n\t\t<?php } ?>\n\t\t<tr>\n\t\t\t<td><a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_invoice' ), 'print-pip' ); ?>\"><?php _e('Print Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<a class=\"button pip-link\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $post_id . '&type=print_packing' ), 'print-pip' ); ?>\"><?php _e( 'Print Packing List', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { ?>\n\t\t\t\t<a class=\"button pip-email\" href=\"<?php echo wp_nonce_url( admin_url( '?email_pip=true&post=' . $post_id ), 'email-pip' ); ?>\"><?php _e( 'Send Email Invoice', 'woocommerce-pip' ); ?></a>\n\t\t\t\t<?php } ?>\n\t\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<?php\n}", "public function MultiMediaPurchaseDisplay()\n\t{\tob_start();\n\t\techo '<div class=\"mmdisplay\"><div id=\"mmdContainer\">', $this->MultiMediaPurchaseTable(), '</div><script type=\"text/javascript\">$().ready(function(){$(\"body\").append($(\".jqmWindow\"));$(\"#rlp_modal_popup\").jqm();});</script>',\n\t\t\t'<!-- START instructor list modal popup --><div id=\"rlp_modal_popup\" class=\"jqmWindow\" style=\"padding-bottom: 5px; width: 640px; margin-left: -320px; top: 10px; height: 600px; \"><a href=\"#\" class=\"jqmClose submit\">Close</a><div id=\"rlpModalInner\" style=\"height: 500px; overflow:auto;\"></div></div></div>';\n\t\treturn ob_get_clean();\n\t}", "function gfwa_print_list_items( $instance ) {\n do_action( 'gfwa_print_list_items', $instance );\n}", "public function printReceipt() {\n\t\t?>\n\t\t<!-- Hide the Order Panel -->\n\t\t<style type=\"text/css\">#orderPanel { display:none; } </style>\n\t\t<?php\n\t\t\n\t\t$strHTML = \"<h3>Thanks for ordering!</h3><table class='gridtable'>\";\n\t\t$strHTML .= \"<tr><th>Product:</th><td>\".$this->product.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Name:</th><td>\".$this->first_name .\" \". $this->last_name.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Unit Price:</th><td>\" . $this->unit_price .\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Discount Rate:</th><td>\".$this->discount_rate.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Order Total:</th><td>\".$this->getTotal().\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Order Date:</th><td>\".$this->order_date.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Payment Type:</th><td>\".$this->payment_type.\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Payment Info:</th><td>\". $this->processPayment() .\"</td></tr>\";\n\t\t$strHTML .= \"<tr><th>Today's Date:</th><td>\".date('F j, Y').\"</td></tr>\";\n\t\t$strHTML .= \"</table><br/>\";\n\t\t$strHTML .= \"<p><form action='/portfolio/projects/loanproject/product_order.php'>\";\n\t\t$strHTML .= \"<input type='submit' value='Place New Order' /></form></p>\";\n\t\treturn $strHTML;\t\n\t}", "function woocommerce_rb_open_product_info() {\n \n echo '<div class=\"product-cart__info\">';\n \n\t}", "public function drawSpecificItem($item){\r\n global $print, $showClosedItems;\r\n if (! $print) $print=RequestHandler::getBoolean('print');\r\n $result=\"\";\r\n if ($item=='versions' or $item=='versionsWithProjects') {\r\n \t$page=\"objectDetail\";\r\n \tif (isset($_REQUEST['page'])) $page=substr( basename($_REQUEST['page']) , 0, strpos(basename($_REQUEST['page']),'.php'));\r\n \t$showClosedVersions=(Parameter::getUserParameter('showClosedVersions')!='0')?true:false;\r\n \tif ($page!='objectDetail') $showClosedVersions=(Parameter::getUserParameter('structureShowClosedItems')!='0')?true:false;\r\n $result .=\"<table><tr>\";\r\n //$result .=\"<td class='label' valign='top'><label>\" . i18n('versions') . \"&nbsp;:&nbsp;</label></td>\";\r\n $result .=\"<td>\";\r\n if ($this->id) {\r\n $vers=new ProductVersion();\r\n if(!$showClosedVersions){\r\n $crit=array('idProduct'=>$this->id,'idle'=>'0');\r\n }else{\r\n $crit=array('idProduct'=>$this->id);\r\n }\r\n \t$result .= $vers->drawVersionsList($crit,($item=='versionsWithProjects')?true:false);\r\n }\r\n $result.='</td></tr>';\r\n if (!$print) {\r\n\t $result.='<tr>';\r\n\t $result.='<td style=\"white-space:nowrap;padding-right:10px;\"><label for=\"showClosedVersions\" style=\"width:250px\">'.i18n('labelShowIdle').'&nbsp;</label>';\r\n\t $result.='<div id=\"showClosedVersions\" dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" '.(($showClosedVersions)?'checked':'').' >';\r\n\t $result.='<script type=\"dojo/connect\" event=\"onChange\" args=\"evt\">';\r\n\t $result.=' saveUserParameter(\"showClosedVersions\",((this.checked)?\"1\":\"0\"));';\r\n\t $result.=' if (checkFormChangeInProgress()) {return false;}';\r\n\t $result.=' loadContent(\"objectDetail.php\", \"detailDiv\", \"listForm\");';\r\n\t $result.='</script>';\r\n\t $result.='</div></td>';\r\n\t $result.='</tr>';\r\n }\r\n $result .=\"</table>\";\r\n return $result;\r\n } elseif ($item=='subproducts') {\r\n $result .=\"<table><tr>\";\r\n //$result .=\"<td class='label' valign='top'><label>\" . i18n('versions') . \"&nbsp;:&nbsp;</label></td>\";\r\n $result .=\"<td>\";\r\n if ($this->id) {\r\n $result .= $this->drawSubProductsList();\r\n \r\n }\r\n $result .=\"</td></tr></table>\";\r\n return $result;\r\n } else if ($item=='structure' and !$print and $this->id) {\r\n $result=parent::drawStructureButton('Product',$this->id);\r\n return $result;\r\n } else if ($item=='tenders') {\r\n Tender::drawListFromCriteria('id'.get_class($this),$this->id);\r\n } \r\n }", "function showOrdersShowcase($titulo, $orders, $url = \"orders.php\"){\n global $client, $employee, $admin;\n ?>\n <div class=\"showcase order-showcase\">\n <div class=\"title\"><?=$titulo?><a class=\"button\" href=\"<?=$url?>\">Ver todas</a></div>\n <div class=\"order-container\">\n <?php\n if(sizeof($orders)){\n foreach($orders as $order){\n $orderState = $order->getState();\n $e = $order->getEmployee();\n $c = $order->getClient();\n ?>\n <a href=\"order.php?id=<?=$order->getID()?>\" class=\"order-item <?=$orderState->getCssClass()?>\">\n <div class=\"estate <?=$orderState->getCssClass()?>\"></div>\n <div class=\"order-info\">\n <div class=\"item-id a-center\">\n <span class=\"label\">ID: </span>\n <span class=\"content\"><?=str_pad($order->getID(), 6, \"0\", STR_PAD_LEFT)?></span>\n </div>\n <div class=\"item-id\">\n <span class=\"label\">Estado: </span>\n <span class=\"content label-box <?=$orderState->getCssClass()?>\"><?=$orderState->getName()?></span>\n </div>\n <?php \n if($admin || $employee) { \n ?>\n <div class=\"item-id\">\n <span class=\"label\">Asignado a: </span>\n <span class=\"content\"><?=$e->getName().\" \".$e->getSurname()?></span>\n </div> \n <div class=\"item-id\">\n <span class=\"label\">Cliente: </span>\n <span class=\"content\"><?=$c->getName().\" \".$c->getSurname()?></span>\n </div>\n <?php \n } \n ?>\n </div>\n <div class=\"order-fetch\">\n <div class=\"item-id\">\n <span class=\"label\">Entrada: </span>\n <span class=\"content\"><?=$order->getEnterDateString()?></span>\n </div>\n <?php\n if(!is_null($order->getWorkingDate())){\n ?>\n <div class=\"item-id\">\n <span class=\"label\">Inicio: </span>\n <span class=\"content\"><?=$order->getWorkingDateString()?></span>\n </div>\n <?php\n }\n if(!is_null($order->getFinishDate())){\n ?>\n <div class=\"item-id\">\n <span class=\"label\">Finalizado: </span>\n <span class=\"content\"><?=$order->getFinishDateString()?></span>\n </div>\n <?php\n }\n if(!is_null($order->getOutDate())){\n ?>\n <div class=\"item-id\">\n <span class=\"label\">Recogido: </span>\n <span class=\"content\"><?=$order->getOutDateString()?></span>\n </div>\n <?php\n }\n if(!is_null($order->getCancelDate())){\n ?>\n <div class=\"item-id\">\n <span class=\"label\">Cancelado: </span>\n <span class=\"content\"><?=$order->getCancelDateString()?></span>\n </div>\n <?php\n }\n ?>\n \n </div>\n <div class=\"order-desc\">\n <?=$order->getDescription()?>\n </div>\n </a>\n <?php \n }\n }else{\n ?>\n <a href=\"\" class=\"order-item\">No se han encontrado órdenes.</a>\n <?php\n }\n ?>\n </div> \n </div>\n <?php\n}", "public function mcash_woocommerce_callback();", "function organics_woocommerce_wrapper_start() {\n\t\tglobal $ORGANICS_GLOBALS;\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !empty($ORGANICS_GLOBALS['shop_mode']) ? $ORGANICS_GLOBALS['shop_mode'] : 'thumbs'; ?>\">\n\t\t\t<?php\n\t\t}\n\t}", "function output()\n\t{\n global $application;\n\n $this->MessageResources = &$application->getInstance('MessageResources');\n $this->TemplateFiller = $application->getInstance('TmplFiller');\n $application->registerAttributes(array(\n 'CustomerInfo'\n ,'BillingInfo'\n ,'ShippingInfo'\n ,'CreditCardInfo'\n ,'Orders'\n ,'OrderId'\n ,'OrderCustomerName'\n ,'OrderDate'\n ,'OrderPriceTotal'\n ,'OrderStatus'\n ,'OrderPaymentStatus'\n ,'GroupName'\n ,'GroupId'\n ,'GroupPersonInfoVariantId'\n ,'GroupCVVPurged'\n ,'Counter'\n ,'LastOrderId'\n ));\n\n $this->customer_id = modApiFunc('Checkout', 'getCurrentCustomerID');\n $this->_customer = modApiFunc('Checkout', 'getCustomerInfo', $this->customer_id, false);\n $this->_customer_encrypted = modApiFunc('Checkout', 'getCustomerInfo', $this->customer_id, true);\n return $this->TemplateFiller->fill(\"checkout/customer-info/\", \"container.tpl.html\", array());\n\t}", "function cr_print_js_function(){\n\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tfunction printDiv(id){\n\t\t\t\tvar cdiv, tmpw;\n\t\t\t \n\t\t\t\tcdiv = document.getElementById(id);\t\t\t\t \n\t\t\t\ttmpw = window.open(\" \",\"Print\");\n\t\t\t \n\t\t\t\ttmpw.document.open();\n\t\t\t\ttmpw.document.write('<html><body>');\n\t\t\t\ttmpw.document.write(cdiv.innerHTML);\n\t\t\t\ttmpw.document.write('</body></html>');\n\t\t\t\ttmpw.document.close();\n\t\t\t\ttmpw.print();\n\t\t\t\ttmpw.close();\n\t\t\t}\n\t\t</script>\n\t<?php\n }", "function displayCurrentClient($clients) {\n \n if (count($clients) < 1){\n echo \"Dabartinio kliento nėra.\";\n return;\n }\n \n $current_client = $clients[0];\n \n $output = \"Skaičius: <b>\".$current_client->client_id.\"</b><br>\";\n $output .= \"Vardas: <b>\".$current_client->name.\" \".$current_client->surname.\"</b><br>\";\n $output .= \"E.paštas: <b>\".$current_client->email.\"</b><br> Susitikimo tema: <b>\".$current_client->reason.\"</b><br>\";\n \n echo $output;\n \n}", "function custom_print($event,$added)\n\t{\n\t\t\t$vars = array(\n\t\t\t'menuaction' => 'bcalendar.bcalendar_uiforms.edit',\n\t\t\t'cal_id' => $event['id'],\n\t\t\t'print' => true,\n\t\t\t);\n\t\treturn \"window.open('\".egw::link('/index.php',$vars).\"','_blank','width=700,height=700,scrollbars=yes,status=no');\";\n\t}", "public function printTicket($productos){\n\n try {\n\n //Fecha y hora actual\n date_default_timezone_set('America/Mexico_City');\n $fecha= date(\"d/m/Y H:i:s\");\n\n \n\n $connector = NULL;\n //El nombre de la impresora es POS-58\n $connector = new WindowsPrintConnector(\"POS-58\");\n $printer = new Printer($connector); \n\n //Establecemos los datos del TICKET a imprimir\n\n $printer -> setJustification(Printer::JUSTIFY_CENTER);\n $printer -> selectPrintMode(Printer::MODE_DOUBLE_WIDTH);\n $printer -> feed(2); \n $printer -> text(\"POLLERIA LOMA\\n\");\n $printer -> selectPrintMode(); // Reset \n\n $printer -> feed(1); \n $printer -> text(\"Calle Mexico #44\\n\");\n $printer -> text(\"Colonia Centro\\n\");\n $printer -> text(\"Loma Bonita Oaxaca\\n\");\n $printer -> text($fecha); \n $printer->text(\"\\n--------------------\\n\");\n $printer -> text($productos['cliente']);\n $printer->text(\"\\n--------------------\");\n $printer -> feed(1); \n \n $charset='UTF-8'; // o 'UTF-8' setea \n $toalapagar =0;\n $printer -> setJustification(Printer::JUSTIFY_LEFT);\n //*********************************************************************************\n foreach ($productos['detalles'] as $item) {\n //Asigno el abono guardado en la variable sesion\n $CantAbono = $productos['abono'];\n\n /*$descripcion = $item['cantidad'].\" \".$item['producto'].\" \".$item['kilos'].\" \".$item['precio'];\n */\n //Mayuscula la primer letra\n $nombreDescM=ucwords($item['producto']);\n //Elimino acentos y ñ \n $str = iconv($charset, 'ASCII//TRANSLIT', $nombreDescM);\n $nuevo = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $str);\n $printer -> text(\"Pollo: \"); \n $printer -> text(wordwrap(utf8_encode($nuevo), 29, \"\\n \" ,TRUE)); \n\n //$printer -> text(\"\\nPollo: \".$item['producto']); \n $printer -> text(\"\\nCantidad: \".$item['cantidad']);\n $printer -> text(\"\\nKilos: \".$item['kilos']); \n $printer -> text(\"\\nPrecio: \".$item['precio']); \n \n \n $printer -> feed(); \n $printer -> setJustification(Printer::JUSTIFY_RIGHT); \n $printer -> text(\"Importe $ \".number_format($item['importe'],2,\".\",\",\" ).\"\\n\");\n $printer -> text(\"\\n\"); \n $printer -> setJustification(); // Reset\n $toalapagar+=$item['importe'];\n }\n //*********************************************************************************\n $printer -> setJustification(Printer::JUSTIFY_RIGHT); \n $printer -> feed(2); \n $printer -> text(\"Subtotal $ \".number_format($toalapagar,2,\".\",\",\" ).\"\\n\");\n $printer -> text(\"Abono $ \".number_format($CantAbono,2,\".\",\",\" ).\"\\n\");\n $printer -> text(\"Restante $ \".number_format($toalapagar-$CantAbono,2,\".\",\",\" ).\"\\n\");\n $printer -> feed(2); \n $printer -> setJustification(Printer::JUSTIFY_CENTER);\n $printer -> selectPrintMode(Printer::MODE_DOUBLE_WIDTH);\n $printer -> text(\"Gracias por\\n\");\n $printer -> text(\"su compra\\n\");\n\n //$printer -> text(\"Loma Bonita Oaxaca\\n\"); \n $printer -> feed(5);\n /* Pulse Manda un PULSO y abre la caja registradora\n pulse($pin, $on_ms, $off_ms)\n Generate a pulse, for opening a cash drawer if one is connected. The default settings (0, 120, 240) should open an Epson drawer.*/\n $printer -> pulse();\n /* Close printer */\n $printer -> close();\n //$this->cart->destroy();\n // echo \"Ticket Impreso\";\n } catch (Exception $e) {\n echo \"No se pudo imprimir el Ticket\" . $e -> getMessage() . \"\\n\";\n }\n }", "function lawzone_amount_and_wishlist(){\n \twc_get_template( 'single-product/amount-wishlist.php' );\n }", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = '';\n\t\t\t$tb = new Table('class=table item-pricing table-striped table-condensed table-bordered print-hidden');\n\t\t\t$tb->tablesection('thead');\n\t\t\t\t$tb->tr();\n\t\t\t\tforeach($this->json['columns'] as $column => $name) {\n\t\t\t\t\t$tb->th(\"\", $name);\n\t\t\t\t}\n\t\t\t$tb->closetablesection('thead');\n\t\t\t$tb->tablesection('tbody');\n\t\t\t\tforeach($this->json['data'] as $warehouse) {\n\t\t\t\t\t$tb->tr();\n\t\t\t\t\tforeach($this->json['columns'] as $column => $name) {\n\t\t\t\t\t\tif (is_numeric($warehouse[$column])) {\n\t\t\t\t\t\t\t$tb->td(\"class=text-right\", $warehouse[$column]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tb->td(\"\", $warehouse[$column]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t$tb->closetablesection('tbody');\n\t\t\treturn $tb->close();\n\t\t}", "function planmyday_woocommerce_wrapper_start() {\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !planmyday_storage_empty('shop_mode') ? planmyday_storage_get('shop_mode') : 'thumbs'; ?>\">\n\t\t\t<div class=\"sc_line_style_dot_line\"></div>\n\t\t\t<?php\n\t\t}\n\t}", "function simplypay(){\r\n\t if(isset($_GET['i'])){\r\n\t global $wpdb;\r\n\t $sql_result = $wpdb->get_results(\r\n\t 'select\r\n p.order_id,\r\n p.order_item_id,\r\n p.order_item_name,\r\n p.order_item_type,\r\n pm.meta_value \r\n from\r\n '.$wpdb->prefix.'woocommerce_order_items as p,\r\n '.$wpdb->prefix.'woocommerce_order_itemmeta as pm\r\n where order_item_type = \\'line_item\\' \r\n and p.order_item_id = pm.order_item_id\r\n and pm.meta_key = \\'product-ivnum\\' \r\n and p.order_item_id = pm.order_item_id \r\n and pm.meta_value = \\''.$_GET['i'].'\\'\r\n group by\r\n p.order_item_id'\r\n );\r\n\t if(sizeof($sql_result)>0){\r\n\t if(empty($_GET['debug'])) {\r\n wp_die(__('This invoice had already been payed!', 'simply'));\r\n $url = home_url() . '/duplicate-invoice';\r\n wp_redirect($url);\r\n exit;\r\n }\r\n }\r\n\t\t $cart_item_data['_other_options']['product-ivnum'] = $_GET['i'] ;\r\n\t\t // get the customer info according to the IVNUM\r\n $customer_info = [\r\n 'docno' => $_GET['i'],\r\n 'price' => $_GET['pr']\r\n ];\r\n // need to filter here\r\n $customer_info = apply_filters( 'simply_request_customer_data', $customer_info );\r\n $cart_item_data['_other_options']['product-price'] = $customer_info['price'] ;\r\n\t\t WC()->session->set(\r\n\t\t\t 'session_vars',\r\n\t\t\t array(\r\n\t\t\t\t 'ordertype' => 'Recipe',\r\n 'custname' => isset($_GET['c']) ? $_GET['c'] : null,\r\n 'first_name' => $customer_info['first_name'],\r\n 'last_name' => $customer_info['last_name'],\r\n 'street_address' => $customer_info['street'],\r\n 'postcode' => $customer_info['postcode'],\r\n 'city' => $customer_info['city'],\r\n 'phone' => $customer_info['phone'],\r\n 'email' => $customer_info['email'],\r\n 'data' => $customer_info['data'] // for extra custom fields\r\n )\r\n\t\t );\r\n\t\t return $cart_item_data;\r\n\t }\r\n }", "public function printPreview();", "function woo_order_lookup_dashboard_widget() { ?>\n\n <div class=\"form-field form-field-wide\">\n <input type=\"test\" style=\"width:100%;margin-bottom:8px;\" class=\"form-control\" id=\"woolookup\" placeholder=\"Enter an Order Number\">\n </div>\n <button id=\"openorder\" type=\"submit\" class=\"button button-primary\">Open Order</button>\n<script>\n\njQuery( \"#openorder\" ).click(function() {\n var ordernum = jQuery(\"#woolookup\").val();\n window.open(\n '<?php echo admin_url() ?>post.php?post='+ ordernum +'&action=edit',\n '_blank' // <- This is what makes it open in a new window.\n);\n});\n\njQuery(document).on('keypress',function(e) {\n var ordernum = jQuery(\"#woolookup\").val();\n if (ordernum.length > 3) {\n if(e.which == 13) {\n window.open(\n '<?php echo admin_url() ?>post.php?post='+ ordernum +'&action=edit',\n '_blank' // <- This is what makes it open in a new window.\n);\n }\n }\n\n});\n</script>\n <?php }", "public function print($id)\n {\n $this->_data['item'] = $this->_repository->getModel()::with(['customer:id,name,phone,address','store:id,name,phone,address'])->findOrFail($id);\n return view('backend.wms.export_print',$this->_data);\n }", "function hello_wpcare_requests() {\n\t$chosen = get_wpcare_link();\n\techo \"<p id='wpcare'>$chosen</p>\"; \n}", "function wc_get_orders($args)\n {\n }", "public function show(ReglementClient $reglementClient)\n {\n //\n }", "public function printInvoices()\n\t{\n\t\t$strMessage = '';\n\n\t\t$strReturn = '\n<div id=\"tl_buttons\">\n<a href=\"'.ampersand(str_replace('&key=print_invoices', '', $this->Environment->request)).'\" class=\"header_back\" title=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['backBT']).'\">'.$GLOBALS['TL_LANG']['MSC']['backBT'].'</a>\n</div>\n\n<h2 class=\"sub_headline\">'.$GLOBALS['TL_LANG']['tl_iso_orders']['print_invoices'][0].'</h2>\n<form action=\"'.$this->Environment->request.'\" id=\"tl_print_invoices\" class=\"tl_form\" method=\"post\">\n<input type=\"hidden\" name=\"FORM_SUBMIT\" value=\"tl_print_invoices\">\n<input type=\"hidden\" name=\"REQUEST_TOKEN\" value=\"'.REQUEST_TOKEN.'\">\n<div class=\"tl_formbody_edit\">\n<div class=\"tl_tbox block\">';\n\n\t\t$objWidget = new SelectMenu($this->prepareForWidget($GLOBALS['TL_DCA']['tl_iso_orders']['fields']['status'], 'status'));\n\n\t\tif ($this->Input->post('FORM_SUBMIT') == 'tl_print_invoices')\n\t\t{\n\t\t\t$objOrders = $this->Database->prepare(\"SELECT id FROM tl_iso_orders WHERE status=?\")->execute($this->Input->post('status'));\n\n\t\t\tif ($objOrders->numRows)\n\t\t\t{\n\t\t\t\t$this->generateInvoices($objOrders->fetchEach('id'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strMessage = '<p class=\"tl_gerror\">'.$GLOBALS['TL_LANG']['MSC']['noOrders'].'</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn $strReturn . $strMessage . $objWidget->parse() . '\n</div>\n</div>\n<div class=\"tl_formbody_submit\">\n<div class=\"tl_submit_container\">\n<input type=\"submit\" name=\"print_invoices\" id=\"ctrl_print_invoices\" value=\"'.$GLOBALS['TL_LANG']['MSC']['labelSubmit'].'\">\n</div>\n</div>\n</form>\n</div>';\n\t}", "function plumbing_parts_woocommerce_close_item_wrapper($cat='') {\n\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\tplumbing_parts_storage_set('in_product_item', false);\n\t}", "function jardiwinery_woocommerce_wrapper_start() {\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !jardiwinery_storage_empty('shop_mode') ? jardiwinery_storage_get('shop_mode') : 'thumbs'; ?>\">\n\t\t\t<?php\n\t\t}\n\t}", "function cltvo_show_product_details() {\n\t\twc_get_template( 'single-product/product-details.php' );\n\t}", "function clpr_send_receipt( $order ) {\n\n\t$recipient = get_user_by( 'id', $order->get_author() );\n\n\t$items_html = '';\n\tforeach ( $order->get_items() as $item ) {\n\t\t$ptype_obj = get_post_type_object( $item['post']->post_type );\n\t\tif ( ! $ptype_obj->public )\n\t\t\tcontinue;\n\n\t\tif ( $order->get_id() != $item['post']->ID ) {\n\t\t\t$items_html .= html( 'p', html_link( get_permalink( $item['post']->ID ), $item['post']->post_title ) );\n\t\t} else {\n\t\t\t$items_html .= html( 'p', APP_Item_Registry::get_title( $item['type'] ) );\n\t\t}\n\t}\n\n\t$table = new APP_Order_Summary_Table( $order );\n\tob_start();\n\t$table->show();\n\t$table_output = ob_get_clean();\n\n\t$content = '';\n\t$content .= html( 'p', sprintf( __( 'Hello %s,', APP_TD ), $recipient->display_name ) );\n\t$content .= html( 'p', __( 'This email confirms that you have purchased the following items:', APP_TD ) );\n\t$content .= $items_html;\n\t$content .= html( 'p', __( 'Order Summary:', APP_TD ) );\n\t$content .= $table_output;\n\n\t$blogname = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );\n\t$subject = sprintf( __( '[%1$s] Receipt for your order #%2$d', APP_TD ), $blogname, $order->get_id() );\n\n\t$email = array( 'to' => $recipient->user_email, 'subject' => $subject, 'message' => $content );\n\t$email = apply_filters( 'clpr_email_user_receipt', $email, $order );\n\n\tappthemes_send_email( $email['to'], $email['subject'], $email['message'] );\n}", "function receipt(){\r\n\tglobal $con ;\r\n\t$get_client = \"select * from clients\";\r\n\t\t$run_client = mysqli_query($con, $get_client);\r\n\t\t$row_client = mysqli_fetch_array($run_client);\r\n\t\t\t$cId = $row_client['c_id'];\r\n\techo \"<form action='receipt.php?clientId=$cId' method='POST' enctype='multipart/form-data'>\r\n\t\t\t\t<button name='print' class='btn btn-primary'>print</button>\r\n\t\t</form>\"; \r\n}", "function plumbing_parts_woocommerce_wrapper_start() {\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !plumbing_parts_storage_empty('shop_mode') ? plumbing_parts_storage_get('shop_mode') : 'thumbs'; ?>\">\n\t\t\t<?php\n\t\t}\n\t}", "function box_orders( $args, $assoc_args ) {\n\t\tlist( $user_id ) = $args;\n\t\t$customer = new CBCustomer($user_id, $interactive = false);\n\t\tWP_CLI::line(var_export($customer->get_box_orders(), true));\n\t}", "public function printing($item_id){\n\n $obj=Items::get_field_from_id($item_id,'label');\n\n echo \"****************\\n\";\n echo $obj . \"\\n\";\n echo \"****************\\n\";\n }", "function fashe_mini_cart_header(){\n\n wc_get_template( 'woocommerce/cart/mini-cart.php');\n}", "private function generateEditWindow($arr_item, $windowerUrl)\r\n\t\t{\r\n\t\t\t//reverse window\r\n\t\t\tif ($this->reverse) {\r\n\t\t\t\t$window = \"<div class=\\\"windower_side\\\">\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_body\\\">\r\n\t\t\t\t\t\t\t\t\t\t<a href=\\\" \".$this->editUrl.\"?id=\".$this->id.\"&mv=\".$arr_item[0].\" \\\" class=\\\"windower_side_edit_link\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<img src=\\\"\".$windowerUrl.\"/edit.png\\\" class=\\\"windower_side_edit_img\\\">\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t<a href=\\\" \".$this->editUrl.\"?id=\".$this->id.\"&rm=\".$arr_item[0].\" \\\" class=\\\"windower_side_edit_link\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<img src=\\\"\".$windowerUrl.\"/remove.png\\\" class=\\\"windower_side_edit_img\\\">\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_top\\\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>\".$arr_item[1].\"</h2>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\";\r\n\t\t\t} //common window\r\n\t\t\telse {\r\n\t\t\t\t$window = \"<div class=\\\"windower_side\\\">\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_top\\\">\r\n\t\t\t\t\t\t\t\t\t\t<h2>\".$arr_item[1].\"</h2>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\\\"windower_side_body\\\">\r\n\t\t\t\t\t\t\t\t\t\t<a href=\\\" \".$this->editUrl.\"?id=\".$this->id.\"&mv=\".$arr_item[0].\" \\\" class=\\\"windower_side_edit_link\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<img src=\\\"\".$windowerUrl.\"/edit.png\\\" class=\\\"windower_side_edit_img\\\">\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t<a href=\\\" \".$this->editUrl.\"?id=\".$this->id.\"&rm=\".$arr_item[0].\" \\\" class=\\\"windower_side_edit_link\\\">\r\n\t\t\t\t\t\t\t\t\t\t\t<img src=\\\"\".$windowerUrl.\"/remove.png\\\" class=\\\"windower_side_edit_img\\\">\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\";\r\n\t\t\t}\r\n\r\n\t\t\treturn $window;\r\n\t\t}", "function plumbing_parts_woocommerce_open_item_wrapper($cat='') {\n\t\t?>\n\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"post_content\">\n\n\t\t<?php\n\n if (is_object($cat) =='yes') {\n ?>\n <a href=\"<?php echo (get_term_link($cat->slug, 'product_cat')); ?>\">\n <?php\n }\n\t}", "function payment_receipt($bill_id,$payment_id){\r\n\t$customers = get_customer_details($bill_id);\r\n\t$grandTotal = number_format($customers['grandTotal'],2);\r\n\t$due = number_format(($customers['grandTotal']-$customers['totalPaid']),2);\r\n\techo\"\r\n\t\t<div id = 'title'>\r\n\t\t\t<h1>Power IT Computer</h1>\r\n\t\t\t<h4>Show Room: Shop No: 226, Alaka Nodi Bangla Shopping Center (1st Floor), Mymensingh</h4>\r\n\t\t\t<h4>Head Office: 51, Jail Road, Mymensingh</h4>\r\n\t\t\t<h4>Cell No: 01716 - 36 42 00 &nbsp; OR &nbsp; 01675 - 30 11 61</h4>\r\n\t\t\t<h4>E-mail: info@powertitbd.com</h4>\r\n\t\t\t<hr>\r\n\t\t</div>\r\n\t\";\r\n\techo \"\r\n\t<div id='print'>\r\n\t\t<fieldset class='fldst'>\r\n\t\t\t<legend>Customer Details</legend>\r\n\t\t\t<table align='center' width='98%' cellspacing='5' cellpadding='5' border='0'>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>Bill ID</td>\r\n\t\t\t\t\t<td>Sales Date</td>\r\n\t\t\t\t\t<td>Sales Time</td>\r\n\t\t\t\t\t<td>Prepared By</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{$bill_id}</td>\r\n\t\t\t\t\t<td>{$customers['billDate']}</td>\r\n\t\t\t\t\t<td>{$customers['billTime']}</td>\r\n\t\t\t\t\t<td>{$customers['preparedBy']}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr><td colspan='4'><br></td></tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>Customer Name</td>\r\n\t\t\t\t\t<td>Customer Address</td>\r\n\t\t\t\t\t<td>Customer Cell No</td>\r\n\t\t\t\t\t<td>Customer E-mail</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{$customers['customerName']}</td>\r\n\t\t\t\t\t<td>{$customers['customerAddress']}</td>\r\n\t\t\t\t\t<td>{$customers['customerCell']}</td>\r\n\t\t\t\t\t<td>{$customers['customerEmail']}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr><td colspan='4'><br></td></tr>\r\n\t\t\t</table>\r\n\t\t</fieldset>\r\n\t\t\";\r\n\t\t$payments = get_payment_details($payment_id);\r\n\t\t$paidAmount = number_format($payments['paidAmount'],2);\r\n\t\t$totalPaid = number_format($payments['totalPaid'],2);\r\n\t\t$totalDue = number_format($payments['totalDue'],2);\r\n\t\techo\"\r\n\t\t\t\t\t<fieldset class='fldst'>\r\n\t\t\t\t\t\t<legend>Payment Details</legend>\r\n\t\t\t\t\t\t<table align='center' width='98%' cellspacing='5' cellpadding='5' border='0'>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td>Payment ID</td>\r\n\t\t\t\t\t\t\t\t<td>Payment Date</td>\r\n\t\t\t\t\t\t\t\t<td>Total Payable</td>\r\n\t\t\t\t\t\t\t\t<td>Total Paid</td>\r\n\t\t\t\t\t\t\t\t<td>Total Due</td>\r\n\t\t\t\t\t\t\t\t<td>New Payment</td>\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\t<td>{$payments['payment_id']}</td>\r\n\t\t\t\t\t\t\t\t<td>{$payments['paymentDate']}</td>\r\n\t\t\t\t\t\t\t\t<td class='total'>{$grandTotal}</td>\r\n\t\t\t\t\t\t\t\t<td>{$totalPaid}</td>\r\n\t\t\t\t\t\t\t\t<td>{$totalDue}</td>\r\n\t\t\t\t\t\t\t\t<td class='total'>{$paidAmount}</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr><td colspan='4'><br></td></tr>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\";\r\n\techo \"\r\n\t\t<div id='sign'>\r\n\t\t\t<div class='cust_sign'>\r\n\t\t\t\t<hr>\r\n\t\t\t\tCustomer's Signature\r\n\t\t\t</div>\r\n\t\t\t<div class='auth_sign'>\r\n\t\t\t\t<hr>\r\n\t\t\t\tAuthorized Signature\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class='nb'>\r\n\t\t\t<br>\r\n\t\t</div>\r\n\t\";\r\n\techo \"\r\n\t\t<div class='extended_msg'>\r\n\t\t\t<a href='javascript:window.print()' class='link_btn'>Print</a>\r\n\t\t\t<a href='home.php' class='link_btn'>Go Back</a>\r\n\t\t</div>\r\n\t\";\r\n\techo\"\r\n\t\t</div>\r\n\t\";\r\n}", "function receipt(){\r\n\tglobal $con ;\r\n\t$get_client = \"select * from clients\";\r\n\t\t$run_client = mysqli_query($con, $get_client);\r\n\t\t$row_client = mysqli_fetch_array($run_client);\r\n\t\t\t$cId = $row_client['Id'];\r\n\techo \"<form action='receipt.php?clientId=$cId' method='POST' enctype='multipart/form-data'>\r\n\t\t\t\t<button name='print' class='btn btn-primary'>print</button>\r\n\t\t</form>\"; \r\n}", "public function openWindow();", "function planmyday_woocommerce_close_item_wrapper($cat='') {\n\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\tplanmyday_storage_set('in_product_item', false);\n\t}", "function top_part_of_order_details_open_container(){\n\t\techo '\n\t\t\t<div id=\"topPartOfOrderDetails\" class=\"container mb-5\">\n\t\t';\n\t}", "function woocommerce_pip_print_footer() {\n\n\tif ( get_option( 'woocommerce_pip_footer' ) != '' ) {\n\t\treturn nl2br( stripslashes( get_option( 'woocommerce_pip_footer' ) ) );\n\t}\n}", "private function get_popup_content( $product, $layout = '', $quantity = 1 ) {\n\n\t\t\t! $layout && $layout = get_option( 'yith-wacp-layout-popup', 'product' );\n\t\t\t// set args\n\t\t\t$args = apply_filters( 'yith_wacp_get_popup_content', array(\n\t\t\t\t'thumb' \t\t=> get_option( 'yith-wacp-show-thumbnail', 'yes' ) == 'yes',\n\t\t\t\t'cart_total' \t\t=> get_option( 'yith-wacp-show-cart-totals', 'yes' ) == 'yes',\n\t\t\t\t'cart_shipping' \t\t=> get_option( 'yith-wacp-show-cart-shipping', 'yes' ) == 'yes',\n\t\t\t\t'cart_tax' \t\t=> get_option( 'yith-wacp-show-cart-tax', 'yes' ) == 'yes',\n\t\t\t\t'product' \t\t=> $product,\n\t\t\t\t'quantity' \t\t=> $quantity,\n\t\t\t\t'last_cart_item_key'\t=> get_option( 'yith_wacp_last_cart_item_key', '' )\n\t\t\t) );\n\n\t\t\t// remove unnecessary option from db\n\t\t\tdelete_option( 'yith_wacp_last_cart_item_key' );\n\n\t\t\t// add to cart popup\n\t\t\tob_start();\n\n\t\t\tdo_action( 'yith_wacp_before_popup_content', $product );\n\n\t\t\twc_get_template( 'yith-wacp-popup-' . $layout . '.php', $args, '', YITH_WACP_TEMPLATE_PATH . '/' );\n\n\t\t\tdo_action( 'yith_wacp_after_popup_content', $product );\n\n\t\t\treturn ob_get_clean();\n\t\t}", "function gencwooc_single_product_loop() {\n\n\tdo_action( 'woocommerce_before_main_content' );\n\n\t// Let developers override the query used, in case they want to use this function for their own loop/wp_query\n\t$wc_query = false;\n\n\t// Added a hook for developers in case they need to modify the query\n\t$wc_query = apply_filters( 'gencwooc_custom_query', $wc_query );\n\n\tif ( ! $wc_query) {\n\n\t\tglobal $wp_query;\n\n\t\t$wc_query = $wp_query;\n\t}\n\n\tif ( $wc_query->have_posts() ) while ( $wc_query->have_posts() ) : $wc_query->the_post(); ?>\n\n\t\t<?php do_action('woocommerce_before_single_product'); ?>\n\n\t\t<div itemscope itemtype=\"http://schema.org/Product\" id=\"product-<?php the_ID(); ?>\" <?php post_class(); ?>>\n\n\t\t\t<?php do_action( 'woocommerce_before_single_product_summary' ); ?>\n\n\t\t\t<div class=\"summary\">\n\n\t\t\t\t<?php do_action( 'woocommerce_single_product_summary'); ?>\n\n\t\t\t</div>\n\n\t\t\t<?php do_action( 'woocommerce_after_single_product_summary' ); ?>\n\n\t\t</div>\n\n\t\t<?php do_action( 'woocommerce_after_single_product' );\n\n\tendwhile;\n\n\tdo_action( 'woocommerce_after_main_content' );\n}", "function UofM_2_process_islandora_object_print(&$variables) {\n // Prompt to print.\n drupal_add_js('jQuery(document).ready(function () { window.print(); });', 'inline');\n}", "function print_default_header($current_module = '') {\n echo '<div class=\"clientele-wrapper wrap\">';\n }", "function watson_print_header_items() {\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tvar watsonThemeMenuText = '<?php echo esc_js( __( 'Menu', 'watson' ) ); ?>';\n\t\t\t<?php watson_slider_javascript(); ?>\n\t\t</script>\n\t\t\t<?php echo watson_get_color_styles(); ?>\n\t\t<?php\n\t}", "function woocommerce_checkout_wrap() {\n\t\tget_template_part( \"templates-parts/woocommerce-checkout\", \"wrap\" );\n\t}", "public static function get_modal_content_func() {\n\n /*********LOAD GLOBAL POST**********/\n\n global $post;\n\n /************************\n GET POST URL, SET POST ID,\n GET PRODUCT, GET BUTTON URL\n ***********************/\n\n $postURL = $_GET['post_url'];\n $postID = url_to_postid($postURL);\n $product = get_product($postID);\n $buttonURL = \"<a href='\" . $product->add_to_cart_url() .\"'>add to cart</a>\";\n $thePost;\n\n /*******************\n POST EXISTS VALIDATION\n *******************/\n\n if ($postID == 0){\n echo \"Invalid Input\";\n die();\n }\n\n /****************\n QUERY DB FOR PRODUCT\n ******************/\n\n $the_query = new WP_query(array('p' => $postID, 'post_type' => 'product'));\n\n if ($the_query->have_posts()) : while ($the_query->have_posts()) : $the_query->the_post();\n get_template_part( 'woocommerce/content', 'single-product' );\n endwhile;\n else :\n echo \"There were no posts found\";\n endif;\n die();\n }", "public function window($value) {\n return $this->setProperty('window', $value);\n }", "private function printItem($i,$row,$headerType){\n $actionDateTime = strtotime($row['NoteCreated']);\n $actionDateTime = date(\"m/d/Y h:i a\", $actionDateTime);\n $actionCompete = \"\";\n $OriginalActionItemID = $row['OriginalActionItemID'];\n $NoteID = $row['NoteID'];\n $originalDate = $row['ActionItemCreated'];\n $actionItemID = $row['ActionItemID'];\n $businessPhone = $row['BusinessPhone'];\n $employeePhone = $row['PhoneNumber'];\n $businessPhone = \"(\".substr($businessPhone, 0, 3).\") \".substr($businessPhone, 3, 3).\"-\".substr($businessPhone,6);\n $employeePhone = \"(\".substr($employeePhone, 0, 3).\") \".substr($employeePhone, 3, 3).\"-\".substr($employeePhone,6);\n\n if (!is_null($actionItemID)) {\n if (!is_null($row['actionComplete'])) {\n $actionCompete = \" complete\";\n }\n }\n\n // this array prevents an item from getting printed more than once.\n // this happens when a user is assigned an action item, forwards it to someone else\n // and then it gets forwarded back to themselves. In this instance the original action\n // item assigned to them will show up as the first item in the history of the current one,\n // not as a separate action item on it's own line.\n // because the list is printed in DESC order the history items are always found first.\n array_push($this->alreadyPrintedNotes,$row['NoteID']);\n\n // this section prints the header, which is the visible part the user clicks to expand the information\n print \"\n <ul class='actionItemsList'>\n <li class='interactionHeader $headerType $actionCompete'>\n <a href='#' name='ExpandAI$headerType$i' class='AIClass'>\n <div>\" . $actionDateTime . \" >> \" . $row['BusinessName'] . \" >> \" . substr($row['Note'],0,20) . \"</div>\n </a>\n </li>\n </ul>\";\n\n // this section prints the static information associated with each header.\n // every item is giving a unique name and ID. The javascript grabs this unique name from the header\n // then adds 'to' to the front to find the corresponding collapsed tag in order to display it\n // the javascript uses the name field. The ID tag exists so that when a user clicks new interaction\n // from the dashboard, only the correct 'add new interaction' expands.\n print\"<ul name='toExpandAI$headerType$i' class='DashAI displayOff $headerType'>\n <li style='float:right;'><b>Employee:</b> <a href='employee.php?EmployeeID=\" . $row['employeeID'] . \"'>\" . ($row['FirstName'] != '' ? $row['FirstName'] : 'None') . \" \" . $row['LastName'] . \"</a></li>\n <li><b>Business: </b><a href='business.php?BusinessID=\" . $row['BusinessID'] . \"'>\" . $row['BusinessName'] . \"</a></li>\n <li style='float:right;'><b>Email:</b> <a href='mailto:\" . $row['Email'] . \"'>\" . ($row['Email'] != '' ? $row['Email'] : 'None') . \"</a></li>\n <li><b>Phone #:</b> \" . ($row['PhoneNumber'] == \"\" ? $businessPhone : $employeePhone . \" ext: \" . $row['Extension']) . \"</li>\n <li style='float:right;'>\";\n if ($actionItemID != NULL) {\n print\"<b>Assigned To: </b><a href='user.php?UserID=\" . $row['AssignedToUserID'] . \"'>\" . $row['AssignedToName'] . \"</a></li>\";\n } else {\n print\"<b>Created By: \" . \"</b><a href='user.php?UserID=\" . $row['UserID'] . \"'>\" . $row['CreatedName'] . \"</a></li>\";\n }\n print\"<li><b>Interaction Type:</b> \" . $row['InteractionType'] . \"</li>\n <li><div class='notes'> \" . $row['Note'] . \"</div>\";\n if (is_null($row['actionComplete'])) { // this means that it is either an open action or note\n if ($row['actionComplete'] == NULL && $headerType == \"action\") { // this means it is indeed an open action item\n if ($row['AssignedToUserID'] == $_SESSION['userID'] || $_SESSION[\"admin\"]) { // this means the user is authorized to edit this action item by either being the user assigned or an admin\n $this->printEditBox($headerType, $i, $row['UserID'], $row['BusinessID'], $row['BusinessName'], $row['employeeID'],$row['InteractionType'],$OriginalActionItemID,$actionItemID);\n }\n }\n }\n print\"</li>\n </ul>\n \";\n\n // this section adds the history of every action item\n if ($headerType == \"action\") { // if action item print history\n require('includes/mysqli_connect.php');\n // Pull all associated Action Item Data\n\n $assocActionItemsQuery = pullAssocActionItems($OriginalActionItemID, $NoteID, $originalDate);\n\n if($assocActionItems = mysqli_query($dbc, $assocActionItemsQuery)) {\n $numHistoryItems = mysqli_num_rows($assocActionItems);\n if(mysqli_num_rows($assocActionItems) == 0) {\n } else {\n for($j=1; $j <= $numHistoryItems; $j++) { // loop through all history items found\n if($assocRow = mysqli_fetch_array($assocActionItems)) {\n // Convert DateTime to something usable\n $AIDateTime = strtotime($assocRow['AIDate']);\n $AIDateTime = date(\"m/d/Y h:i a\", $AIDateTime);\n $pUserName = $assocRow['pUserFirstName'] . \" \" . $assocRow['pUserLastName'];\n array_push($this->alreadyPrintedNotes,$assocRow['NoteID']);\n\n // Print History items related to this action item\n print \"\n <ul name='toExpandAIaction$i' class='actionItemsList displayOff AIHClass'>\n <li><a href='#' name='ExpandAIH$i$j' class='AIHClass'>\" . substr($assocRow['Note'],0,40) . \"</a></li>\n </ul>\n <ul name='toExpandAIH$i$j' class='DashAI displayOff DashAIH toExpandAIaction$i'>\n <li><b>UC Staff:</b><a href='user.php?UserID=\" . $assocRow['AssignedToUserID'] . \"'> $pUserName</a> &nbsp&nbsp&nbsp <b>Date:</b> $AIDateTime</li>\n <li><b>Notes: </b><br /><div class='notes'> \" . $assocRow['Note'] . \"</div></li>\n </ul>\n \";\n }\n }\n }\n }\n }\n }", "function fashe_mini_cart_header(){\n\n the_widget( 'WC_Widget_Cart', 'title=' );\n\n}", "public function printReceipt()\n {\n echo $this->buildReceiptRow(\"-\", null, true);\n \n $products = $this->getProducts();\n foreach ($products as $product) {\n echo $this->buildReceiptRow($product->name, $this->formatPrice($product->priceWas));\n }\n\n echo $this->buildReceiptRow(\"-\", null, true);\n echo $this->buildReceiptRow(\"Sub-Total\", $this->getSubTotal());\n echo $this->buildReceiptRow(\"Discounts\", $this->getDiscounts());\n echo $this->buildReceiptRow(\"-\", null, true);\n echo $this->buildReceiptRow(\"Grand Total\", $this->getGrandTotal());\n }", "public function ReviewsDisplay()\n\t{\tob_start();\n\t\techo '<div class=\"mmdisplay\"><div id=\"mmdContainer\">', $this->ReviewsTable(), '</div><script type=\"text/javascript\">productID=', $this->id, ';$().ready(function(){$(\"body\").append($(\".jqmWindow\"));$(\"#rlp_modal_popup\").jqm();});</script>',\n\t\t\t'<!-- START instructor list modal popup --><div id=\"rlp_modal_popup\" class=\"jqmWindow\"><a href=\"#\" class=\"jqmClose submit\">Close</a><div id=\"rlpModalInner\"></div></div></div>';\n\t\treturn ob_get_clean();\n\t}", "function autoparts_woocommerce_wrapper_start() {\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item_single post_type_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !autoparts_storage_empty('shop_mode') ? autoparts_storage_get('shop_mode') : 'thumbs'; ?>\">\n\t\t\t\t<div class=\"list_products_header\">\n\t\t\t<?php\n\t\t}\n\t}", "function woocommerce_pip_page() {\n\n\t//Check the user capabilities\n\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce-pip' ) );\n\t}\n\t//Load needed WP resources for media uploader\n\twp_enqueue_media();\n\n\t//Save the field values\n\tif ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) {\n\t\tforeach ( $_POST as $key => $value ) {\n\t\t\tif ( $key == 'woocommerce_pip_invoice_start' && isset( $_POST['woocommerce_pip_reset_start'] ) ) {\n\t\t\t\tif ( $_POST['woocommerce_pip_reset_start'] == 'Yes' ) {\n\t\t\t\t\tupdate_option( $key, ltrim( $value, '0') );\n\t\t\t\t}\n\t\t\t} elseif ( $key == 'woocommerce_pip_reset_start' ) {\n\t\t\t} else {\n\t\t\t\tif ( get_option( $key ) != $value ) {\n\t\t\t\t\tupdate_option( $key, $value );\n\t\t\t\t} else {\n\t\t\t\t\tadd_option( $key, $value, '', 'no' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t?>\n\t<div class=\"wrap\">\n\t\t<div id=\"icon-options-general\" class=\"icon32\">\n\t\t\t<br />\n\t\t</div>\n\t\t<h2><?php _e( 'WooCommerce - Print invoice/packing list settings', 'woocommerce-pip' ); ?></h2>\n\t\t<?php if ( isset( $_POST['pip_fields_submitted'] ) && $_POST['pip_fields_submitted'] == 'submitted' ) { ?>\n\t\t<div id=\"message\" class=\"updated fade\"><p><strong><?php _e( 'Your settings have been saved.', 'woocommerce-pip' ); ?></strong></p></div>\n\t\t<?php } ?>\n\t\t<p><?php _e( 'Change settings for print invoice/packing list.', 'woocommerce-pip' ); ?></p>\n\t\t<div id=\"content\">\n\t\t\t <form method=\"post\" action=\"\" id=\"pip_settings\">\n\t\t\t\t<input type=\"hidden\" name=\"pip_fields_submitted\" value=\"submitted\">\n\t\t\t\t<div id=\"poststuff\">\n\t\t\t\t\t<div class=\"postbox\">\n\t\t\t\t\t\t<h3 class=\"hndle\"><?php _e( 'Settings', 'woocommerce-pip' ); ?></h3>\n\t\t\t\t\t\t<div class=\"inside pip-preview\">\n\t\t\t\t\t\t\t <table class=\"form-table\">\n\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_name\"><b><?php _e( 'Company name:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_company_name\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_company_name' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom company name for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_logo\"><b><?php _e( 'Custom logo:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input id=\"woocommerce_pip_logo\" type=\"text\" size=\"36\" name=\"woocommerce_pip_logo\" value=\"<?php echo get_option( 'woocommerce_pip_logo' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<input id=\"upload_image_button\" type=\"button\" value=\"<?php _e( 'Upload Image', 'woocommerce-pip' ); ?>\" />\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom logo for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to use a custom logo.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_company_extra\"><b><?php _e( 'Company extra info:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_company_extra\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_company_extra' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Some extra info that is displayed under company name.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print the info.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_return_policy\"><b><?php _e( 'Returns Policy, Conditions, etc.:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_return_policy\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_return_policy' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Here you can add some policies, conditions etc. For example add a returns policy in case the client would like to send back some goods.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print any policy.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_footer\"><b><?php _e( 'Custom footer:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"woocommerce_pip_footer\" cols=\"45\" rows=\"3\" class=\"regular-text\"><?php echo stripslashes( get_option( 'woocommerce_pip_footer' ) ); ?></textarea><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Your custom footer for the print.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Leave blank to not to print a footer.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_start\"><b><?php _e( 'Invoice counter start:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"woocommerce_pip_reset_start\" name=\"woocommerce_pip_reset_start\" value=\"Yes\" /> <?php _e( 'Reset invoice numbering', 'woocommerce-pip' ); ?><br />\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" readonly=\"true\" id=\"woocommerce_pip_invoice_start\" name=\"woocommerce_pip_invoice_start\" class=\"regular-text\" value=\"<?php echo wp_kses_stripslashes( get_option( 'woocommerce_pip_invoice_start' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Reset the invoice counter to start your custom position for example 103. Leading zeros will be trimmed. Use prefix instead.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t\techo '<br /><strong>' . __( 'Note:', 'woocommerce-pip' ) . '</strong> ';\n\t\t\t\t\t\t\t\t\t\t\techo __( 'You need to check the checkbox to actually reset the value.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_prefix\"><b><?php _e( 'Invoice numbering prefix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_prefix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_prefix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom prefix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_invoice_suffix\"><b><?php _e( 'Invoice numbering suffix:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"woocommerce_pip_invoice_suffix\" class=\"regular-text\" value=\"<?php echo stripslashes( get_option( 'woocommerce_pip_invoice_suffix' ) ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t<span class=\"description\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo __( 'Set your custom suffix for the invoice numbering.', 'woocommerce-pip' );\n\t\t\t\t\t\t\t\t\t\t?></span>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Preview before printing:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_preview' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"enabled\" id=\"pip-preview\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_preview\" value=\"disabled\" id=\"pip-preview\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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\t<tr>\n\t\t\t\t\t\t\t\t\t <th>\n\t\t\t\t\t\t\t\t\t\t<label for=\"preview\"><b><?php _e( 'Send invoice as HTML email:', 'woocommerce-pip' ); ?></b></label>\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<?php if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled') { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"enabled\" id=\"pip-send-email\" class=\"input-radio\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_preview\"><?php _e( 'Enabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"woocommerce_pip_send_email\" value=\"disabled\" id=\"pip-send-email\" class=\"input-radio\" checked=\"yes\" />\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"woocommerce_pip_send_email\"><?php _e( 'Disabled', 'woocommerce-pip' ); ?></label><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\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</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t <p class=\"submit\">\n\t\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', 'woocommerce-pip' ); ?>\" />\n\t\t\t </p>\n\t\t\t</form>\n\t\t</div>\n\t</div>\n\t<?php\n}", "function customer_view_page($customer) {\r\n $output = array('customer_headline' => array('#markup' => '<h2>' . $customer->name . '</h2>'));\r\n $output += customer_view($customer);\r\n \r\n drupal_set_title(t('Customer account for @name', array('@name' => $customer->name)));\r\n return $output;\r\n}", "function edit_woocommerce_checkout_page($order){\r\n global $post_id;\r\n $order = new WC_Order( $post_id );\r\n echo '<p><strong>'.__('HCPID').':</strong> ' . get_post_meta($order->get_id(), 'hcpid', true ) . '</p>';\r\n}", "function mode_theme_update_mini_cart() {\n echo wc_get_template( 'cart/mini-cart.php' );\n die();\n}", "function info_window($body){\n\t\t\tglobal $x7c, $txt;\n\t\t\t// Load the Window Template\n\t\t\t$skin = $x7c->settings['default_skin'];\n\t\t\t$theme_wt = file(\"./themes/$skin/info_box.tpl\");\n\t\t\t$theme_wt = implode(\"\",$theme_wt);\n\t\t\t$theme_wt = eregi_replace(\"<x7chat_body>\",$body,$theme_wt);\n\t\t\t$theme_wt = eregi_replace(\"<X>\",$txt[133],$theme_wt);\n\t\t\t\n\t\t\t// Output this data\n\t\t\t$this->add($theme_wt);\n\t\t}", "public function tool_page() {\n\t\t\tinclude_once WC_BOOKINGS_HELPER_ABSPATH . 'templates/tool-page.php';\n\t\t}", "public function printSearchInterface() {\n\t\t\t//$moduleValidateStat = $this->moduleValidation();\n\t\t\t//if ( !$moduleValidateStat['status'] || !is_object($this->the_plugin->get_ws_object( $this->the_plugin->cur_provider )) || is_null($this->the_plugin->get_ws_object( $this->the_plugin->cur_provider )) )\n\t\t\t//\techo $moduleValidateStat['html'];\n\t\t\t// MAIN ELSE\n\t\t\t//else{\n\t\t\t\t//WooZoneLite()->print_demo_request();\n\n\t\t\t$html = array();\n\t\t\t\n\t\t\t$html[] = WooZoneLite_asset_path( 'js', $this->module['folder_uri'] . 'amzmultikeys/amzmultikeys.js', false );\n\n\t\t\t// !!! CSS is in aa-framework/scss/_amazon.scss\n\t\t\t//$html[] = WooZoneLite_asset_path( 'css', $this->module['folder_uri'] . 'amzmultikeys/amzmultikeys.css', false );\n\n\t\t\t$html[] = WooZoneLite_asset_path( 'css', $this->the_plugin->cfg['paths']['freamwork_dir_url'] . 'js/jquery.simplemodal/basic.css', false );\n\n\t\t\t$html[] = \"<!-- preload the images --><div style='display:none'><img src='\" . $this->the_plugin->cfg['paths']['freamwork_dir_url'] . \"js/jquery.simplemodal/x.png' alt='' /></div>\";\n\n\t\t\techo implode( PHP_EOL, $html );\n\t\t?>\n\n<!-- Main Wrapper -->\n<div id=\"WooZoneLite-multikeys\" class=\"panel-body WooZoneLite-panel-body WooZoneLite-form-row __tab1 __subtab_amazon\">\n\n\t<?php\n\t\t// Lang Messages\n\t\t$lang = array(\n\t\t\t'loading' => __('Loading...', 'WooZoneLite'),\n\t\t\t'closing' => __('Closing...', 'WooZoneLite'),\n\t\t);\n\t?>\n\t<!-- Lang Messages -->\n\t<div id=\"WooZoneLite-lang-translation\" style=\"display: none;\"><?php echo htmlentities(json_encode( $lang )); ?></div>\n\n\t<!-- Templates -->\n\t<div id=\"WooZoneLite-multikeys-tpl\" style=\"display: none;\">\n\n\t\t<div id=\"WooZoneLite-tpl-delete-confirm\">\n\t\t\t<div class=\"WooZoneLite-multikeys-boxconfirm\">\n\t\t\t\t<span><?php _e('Are you sure you want to delete this pair of keys?'); ?></span>\n\t\t\t\t<input type=\"button\" value=\"Yes\" class=\"WooZoneLite-form-button-small WooZoneLite-form-button-info WooZoneLite-mk-action-delete-yes\">\n\t\t\t\t<input type=\"button\" value=\"No\" class=\"WooZoneLite-form-button-small WooZoneLite-form-button-danger WooZoneLite-mk-action-delete-no\">\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div id=\"WooZoneLite-tpl-add-confirm\">\n\t\t\t<div class=\"WooZoneLite-multikeys-boxconfirm\">\n\t\t\t\t<span><?php _e('This pair of keys don\\'t seem to be valid for the current selected amazon location.'); ?></span>\n\t\t\t\t<br />\n\t\t\t\t<span><?php _e('Are you sure you want to add this pair of keys?'); ?></span>\n\t\t\t\t<input type=\"button\" value=\"Yes\" class=\"WooZoneLite-form-button-small WooZoneLite-form-button-info WooZoneLite-mk-action-addkeys-yes\">\n\t\t\t\t<input type=\"button\" value=\"No\" class=\"WooZoneLite-form-button-small WooZoneLite-form-button-danger WooZoneLite-mk-action-addkeys-no\">\n\t\t\t</div>\n\t\t</div>\n\n\t</div>\n\n\t<!-- Wrapper -->\n\t<div class=\"WooZoneLite-multikeys-wrapp\">\n\t\t<div class=\"addnewkeys\">\n\t\t\t<?php _e('Add Multiple Amazon Keys', 'WooZoneLite'); ?>\n\t\t</div>\n\t\t<!-- Add New Keys -->\n\t\t<div class=\"WooZoneLite-multikeys-addkeys\">\n\t\t\t<input id=\"AccessKeyID\" name=\"AccessKeyID\" type=\"text\" value=\"\" placeholder=\"<?php _e('ENTER AMAZON AWS ACCESS KEY'); ?>\">\n\t\t\t<input id=\"SecretAccessKey\" name=\"SecretAccessKey\" type=\"text\" value=\"\" placeholder=\"<?php _e('ENTER AMAZON AWS SECRET KEY'); ?>\">\n\t\t\t<input type=\"button\" value=\"Check Amazon AWS Keys\" class=\"WooZoneLite-form-button WooZoneLite-form-button-info WooZoneLite-mk-action-checknew\">\n\t\t\t<input type=\"button\" value=\"Add Amazon AWS Keys\" class=\"WooZoneLite-form-button WooZoneLite-form-button-success WooZoneLite-mk-action-addkeys\">\n\t\t\t<div class=\"status-msg\"></div>\n\t\t</div>\n\n\t\t<div class=\"clear-float\"></div>\n\n\t\t<!-- Header -->\n\t\t<div class=\"WooZoneLite-multikeys-header\">\n\t\t\t<div class=\"left\">\n\t\t\t\t<?php _e('Amazon Access Keys', 'WooZoneLite'); ?>\n\t\t\t</div>\n\t\t\t<div class=\"right\">\n\t\t\t\t<input type=\"button\" value=\"Reload Keys List\" class=\"WooZoneLite-form-button-small WooZoneLite-form-button-info WooZoneLite-mk-action-reload\">\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"clear-float\"></div>\n\n\t\t<!-- List Keys Table -->\n\t\t<table cellspacing=\"10\" cellpadding=\"10\" class=\"WooZoneLite-multikeys-table\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Action</th>\n\t\t\t\t\t<th>Amazon Access Key</th>\n\t\t\t\t\t<th>Amazon Secret Key</th>\n\t\t\t\t\t<th>Total Req</th>\n\t\t\t\t\t<th>Success Ratio</th>\n\t\t\t\t\t<th>Last Request</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<?php echo $this->load_available_keys(); ?>\n\t\t\t</tbody>\n\t\t</table>\n\n\t\t\n\t\t<!-- Footer Text -->\n\t\t<div class=\"WooZoneLite-callout WooZoneLite-callout-secondary\"> \n\t\t\t<?php _e('Unpublished Keys are not used to make requests to Amazon API.', 'WooZoneLite'); ?> \n\t\t</div>\n\n\t\t<div class=\"WooZoneLite-callout WooZoneLite-callout-success\"> \n\t\t\t<?php _e('Don\\'t forget to <a href=\"#\" id=\"goto-save-settings\">Save the Settings</a> (at the bottom) after you finish managing your amazon keys or you\\'ve changed any other setting.', 'WooZoneLite'); ?> \n\t\t</div>\n\n\t\t<div class=\"clear-float\"></div>\n\n\t</div>\n\t<!-- End Wrapper -->\n\n</div>\n<!-- End Main Wrapper -->\n\n\t\t<?php\n\t\t\t//} // end else\n\t\t\t// END MAIN ELSE\n\t\t}", "function qode_listing_marker_info_template() {\n\n\t\t$html = '<script type=\"text/template\" class=\"qode-info-window-template\">\n\t\t\t\t<div class=\"qode-info-window\">\n\t\t\t\t\t<div class=\"qode-info-window-inner\">\n\t\t\t\t\t\t<a href=\"<%= itemUrl %>\"></a>\n\t\t\t\t\t\t<div class=\"qode-info-window-details\">\n\t\t\t\t\t\t\t<h6>\n\t\t\t\t\t\t\t\t<%= title %>\n\t\t\t\t\t\t\t</h6>\n\t\t\t\t\t\t\t<p><%= address %></p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<% if ( featuredImage ) { %>\n\t\t\t\t\t\t\t<div class=\"qode-info-window-image\">\n\t\t\t\t\t\t\t\t<img src=\"<%= featuredImage[0] %>\" alt=\"<%= title %>\" width=\"<%= featuredImage[1] %>\" height=\"<%= featuredImage[2] %>\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<% } %>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</script>';\n\n\t\tprint $html;\n\n\t}", "public function hookPublicItemsShow()\n {\n echo get_view()->dsp(get_current_record('item'));\n }", "public function invoiceprint(){\n $data['thispage']=\"72\";\n $data['title']=\"Invoices Print || WishingMart\";\n\n $url_invoice_view=base_api_url().\"dashboard/invoiceview/iid/\".$this->uri->segment(3).base_api_key();\n $data['invoice_view'] = self::getapi($url_invoice_view);\n //print_r($data['invoice_list']);exit();\n\n $this->load->view('dashboard/invoiceprint_view', $data);\n }" ]
[ "0.7148968", "0.55125535", "0.5507807", "0.5435086", "0.54224104", "0.54073733", "0.517119", "0.5151297", "0.5146144", "0.51407367", "0.5121745", "0.50992113", "0.5095851", "0.5095352", "0.5086687", "0.5071045", "0.5063289", "0.4998679", "0.49940446", "0.49895534", "0.4967057", "0.49652973", "0.4919502", "0.49152207", "0.4905499", "0.48678848", "0.48498207", "0.48287535", "0.48281902", "0.47870788", "0.4767225", "0.47366375", "0.47352353", "0.47313273", "0.47206646", "0.47202742", "0.47156397", "0.471384", "0.4713056", "0.47098866", "0.4706349", "0.470478", "0.4699551", "0.46981162", "0.4694431", "0.4690102", "0.4682047", "0.4670618", "0.46632653", "0.46606866", "0.46401593", "0.46387118", "0.46341324", "0.46310678", "0.46278068", "0.4627031", "0.4625078", "0.4623935", "0.46203172", "0.46140027", "0.4613671", "0.46110258", "0.46075854", "0.46061254", "0.46007678", "0.4599599", "0.4598013", "0.45943528", "0.4582749", "0.45777532", "0.45686498", "0.45617267", "0.45615235", "0.45552942", "0.4554377", "0.4548653", "0.45439625", "0.45409524", "0.45359388", "0.45353088", "0.45345566", "0.45315745", "0.45226902", "0.45211962", "0.451937", "0.4504753", "0.45040855", "0.45024738", "0.4495731", "0.4495484", "0.44944882", "0.4487943", "0.44844946", "0.44836187", "0.44788846", "0.4478573", "0.4474174", "0.4469826", "0.44665214", "0.44549373" ]
0.7836712
0
woocommerce_pip_order_bulk_action function. Process the new bulk actions for printing invoices and packing lists.
Функция woocommerce_pip_order_bulk_action. Обработка новых bulk-действий для печати счетов и упаковочных списков.
function woocommerce_pip_order_bulk_action() { $wp_list_table = _get_list_table( 'WP_Posts_List_Table' ); $action = $wp_list_table->current_action(); if ( $action == 'print_invoice' || $action=='print_packing' ) { $posts = ''; foreach( $_REQUEST['post'] as $post_id ) { if ( empty( $posts ) ) { $posts = $post_id; } else { $posts .= ','.$post_id; } } $forward = wp_nonce_url( admin_url(), 'print-pip' ); $forward = add_query_arg( array( 'print_pip' => 'true', 'post' => $posts, 'type' => $action ), $forward ); wp_redirect( $forward ); exit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function process_order_bulk_actions() {\n\t\tglobal $typenow;\n\n\t\tif ( 'shop_order' == $typenow ) {\n\n\t\t\t// get the action\n\t\t\t$wp_list_table = _get_list_table( 'WP_Posts_List_Table' );\n\t\t\t$action = $wp_list_table->current_action();\n\n\t\t\t// return if not processing our actions\n\t\t\tif ( ! in_array( $action, array( 'export_to_shipwire', 'update_tracking' ) ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// security check\n\t\t\tcheck_admin_referer( 'bulk-posts' );\n\n\t\t\t// make sure order IDs are submitted\n\t\t\tif ( isset( $_REQUEST['post'] ) ) {\n\t\t\t\t$order_ids = array_map( 'absint', $_REQUEST['post'] );\n\t\t\t}\n\n\t\t\t// return if there are no orders to export\n\t\t\tif ( empty( $order_ids ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// give ourselves an unlimited timeout if possible\n\t\t\t@set_time_limit( 0 );\n\n\t\t\tforeach ( $order_ids as $order_id ) {\n\n\t\t\t\t$order = new WC_Shipwire_Order( $order_id );\n\n\t\t\t\tif ( 'export_to_shipwire' === $action ) {\n\t\t\t\t\t$order->export();\n\t\t\t\t} else {\n\t\t\t\t\t$order->update_tracking();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function woo_prod_custom_bulk_action() {\r\n\t\t\tglobal $typenow;\r\n\t\t\t$post_type = $typenow;\r\n\r\n\t\t\tif($post_type == 'shop_order') {\r\n\r\n\t\t\t\t// get the action\r\n\t\t\t\t$wp_list_table = _get_list_table('WP_Posts_List_Table'); // depending on your resource type this could be WP_Users_List_Table, WP_Comments_List_Table, etc\r\n\t\t\t\t$action = $wp_list_table->current_action();\r\n\r\n\t\t\t\t$allowed_actions = array(\"prod_labels\");\r\n\t\t\t\tif(!in_array($action, $allowed_actions)) return;\r\n\r\n\t\t\t\t// security check\r\n\t\t\t\tcheck_admin_referer('bulk-posts');\r\n\r\n\t\t\t\t// make sure ids are submitted. depending on the resource type, this may be 'media' or 'ids'\r\n\t\t\t\tif(isset($_REQUEST['post'])) {\r\n\t\t\t\t\t$post_ids = array_map('intval', $_REQUEST['post']);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(empty($post_ids)) return;\r\n\r\n\t\t\t\t// this is based on wp-admin/edit.php\r\n\t\t\t\t$sendback = remove_query_arg( array('prod_labels', 'untrashed', 'deleted', 'ids'), wp_get_referer() );\r\n\t\t\t\tif ( ! $sendback )\r\n\t\t\t\t\t$sendback = admin_url( \"edit.php?post_type=$post_type\" );\r\n\r\n\t\t\t\t$pagenum = $wp_list_table->get_pagenum();\r\n\t\t\t\t$sendback = add_query_arg( 'paged', $pagenum, $sendback );\r\n\r\n\t\t\t\tswitch($action) {\r\n\t\t\t\t\tcase 'prod_labels':\r\n\r\n\t\t\t\t\t\t// if we set up user permissions/capabilities, the code might look like:\r\n\t\t\t\t\t\t//if ( !current_user_can($post_type_object->cap->export_post, $post_id) )\r\n\t\t\t\t\t\t//\twp_die( __('You are not allowed to export this post.') );\r\n\r\n\t\t\t\t\t\t$printed = 0;\r\n\t\t\t\t\t\tforeach( $post_ids as $post_id ) {\r\n\r\n\t\t\t\t\t\t\tif ( !$this->perform_export($post_id) )\r\n\t\t\t\t\t\t\t\twp_die( __('Error exporting post.') );\r\n\r\n\t\t\t\t\t\t\t$printed++;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$pdf_file_url = '';\r\n\t\t\t\t\t\t$output_html = wooprod_generate_products_label_html('', '', '', $post_ids);\r\n\t\t\t\t\t\t$output_css = wooprod_generate_products_label_css();\r\n\t\t\t\t\t\t$generate_result = generate_products_label_pdf($output_css, $output_html);\r\n\t\t\t\t\t\tif(isset($generate_result['pdf_url'])){\r\n\t\t\t\t\t\t\t$pdf_file_url = $generate_result['pdf_url'];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$sendback = add_query_arg( array('prod_labels' => $printed, 'pdf_url' => $pdf_file_url, 'ids' => join(',', $post_ids) ), $sendback );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault: return;\r\n\t\t\t\t}\r\n\r\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 );\r\n\r\n\t\t\t\twp_redirect($sendback);\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t}", "public function add_order_bulk_actions() {\n\t\tglobal $post_type, $post_status;\n\n\t\tif ( $post_type == 'shop_order' && $post_status != 'trash' ) {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery( document ).ready( function ( $ ) {\n\t\t\t\t\t\t$( 'select[name^=action]' ).append(\n\t\t\t\t\t\t\t$( '<option>' ).val( 'export_to_shipwire' ).text( '<?php _e( 'Export to Shipwire', 'woocommerce-shipwire' ); ?>' ),\n\t\t\t\t\t\t\t$( '<option>' ).val( 'update_tracking' ).text( '<?php _e( 'Update Tracking', 'woocommerce-shipwire' ); ?>' )\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "function process_bulk_action() {\n \n //Detect when a bulk action is being triggered...\n if( 'delete'===$this->current_action() ) {\n #wp_die('Items deleted (or they would be if we had items to delete)!');\n }\n \n }", "function process_bulk_action() {\n\t\tglobal $wpdb;\n\t\tif('delete' === $this->current_action()) {\n\t\t\tparse_str($_SERVER['QUERY_STRING'], $output);\n\t\t\tforeach($output['checkbox'] as $k=>$v) {\n\t\t\t\t$wpdb->update(\n\t\t\t\t\t$wpdb->prefix.'basalcart_orders',\n\t\t\t\t\tarray('deleted'=>1),\n\t\t\t\t\tarray('ID'=>$v),\n\t\t\t\t\tarray('%d')\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "function process_bulk_action() {\n\n //Detect when a bulk action is being triggered...\n if( 'delete'===$this->current_action() ) {\n wp_die('Items deleted (or they would be if we had items to delete)!');\n }\n\n }", "function process_bulk_action() {\n global $wbdb;\n \n //Detect when a bulk action is being triggered...\n if( 'delete'===$this->current_action() ) {\n #wp_die('Items deleted (or they would be if we had items to delete)!');\n #$wpdb->query(\"DELETE FROM {$wpdb->prefix}amazon_auctions WHERE id = ''\",)\n }\n\n if( 'update'===$this->current_action() ) {\n\t\t\t#echo \"<br>verify handler<br>\";\t\t\t\n }\n \n }", "public function bulk_admin_order_actions() {\n\t\tif( ! isset( $_GET['post'] ) || ! is_array( $_GET['post'] ) )\n\t\t\treturn;\n\n\t\t$wp_list_table = _get_list_table('WP_Posts_List_Table');\n\t\t$action = $wp_list_table->current_action();\n\n\t\tcheck_admin_referer( 'bulk-posts' );\n\n\t\t$sendback = admin_url();\n\n\t\tswitch( $action ) {\n\t\t\tcase 'svea_deliver':\n\n\t\t\t$orders_delivered = 0;\n\n\t\t\tforeach( $_GET['post'] as $post_id ) {\n\t\t\t\t$wc_order = new WC_Order( $post_id );\n\n\t\t\t\tif( is_null( $wc_order ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$svea_order_id = ( $value = get_post_meta( $wc_order->get_id(), \"_svea_order_id\", true ) ) \n\t\t\t\t\t? $value : wc_get_order_item_meta( $wc_order->get_id(), \"svea_order_id\" );\n\n\t\t if( ! $svea_order_id || strlen( $svea_order_id ) <= 0 ) {\n\t\t continue;\n\t\t }\n\n\t\t\t\t$payment_method_id = $wc_order->get_payment_method();\n\n\t\t\t\tif( $payment_method_id === WC_Gateway_Svea_Card::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Card::init()->deliver_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Invoice::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Invoice::init()->deliver_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Part_Pay::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Part_Pay::init()->deliver_order( $wc_order, $svea_order_id );\n\t\t\t\t} else\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif( is_array( $response ) && isset( $response[\"success\"] ) && $response[\"success\"] )\n\t\t\t\t\t++$orders_delivered;\n\t\t\t}\n\n\t\t\tif( $orders_delivered > 0 ) {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\tsprintf( _n( 'Delivered %s order', 'Delivered %s orders', $orders_delivered, self::PLUGIN_SLUG ), $orders_delivered )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\t__( 'No orders were delivered', self::PLUGIN_SLUG )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$sendback = admin_url( 'edit.php?post_type=shop_order' );\n\n\t\t\tbreak;\n\t\t\tcase 'svea_cancel':\n\n\t\t\t$orders_cancelled = 0;\n\n\t\t\tforeach( $_GET['post'] as $post_id ) {\n\t\t\t\t$wc_order = new WC_Order( $post_id );\n\n\t\t\t\tif( is_null( $wc_order ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$svea_order_id = ( $value = get_post_meta( $wc_order->get_id(), \"_svea_order_id\", true ) ) \n\t\t\t\t\t? $value : wc_get_order_item_meta( $wc_order->get_id(), \"svea_order_id\" );\n\n\t\t if( ! $svea_order_id || strlen( $svea_order_id ) <= 0 ) {\n\t\t continue;\n\t\t }\n\n\t\t $payment_method_id = $wc_order->get_payment_method();\n\n\t\t\t\tif( $payment_method_id === WC_Gateway_Svea_Card::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Card::init()->cancel_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Invoice::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Invoice::init()->cancel_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Part_Pay::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Part_Pay::init()->cancel_order( $wc_order, $svea_order_id );\n\t\t\t\t} else\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif( is_array( $response ) && isset( $response[\"success\"] ) && $response[\"success\"] )\n\t\t\t\t\t++$orders_cancelled;\n\t\t\t}\n\n\t\t\tif( $orders_cancelled > 0 ) {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\tsprintf( _n( 'Cancelled %s order', 'Cancelled %s orders', $orders_cancelled, self::PLUGIN_SLUG ), $orders_cancelled )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\t__( 'No orders were cancelled', self::PLUGIN_SLUG )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$sendback = admin_url( 'edit.php?post_type=shop_order' );\n\n\t\t\tbreak;\n\t\t\tcase 'svea_credit':\n\n\t\t\t$orders_credited = 0;\n\n\t\t\tforeach( $_GET['post'] as $post_id ) {\n\t\t\t\t$wc_order = new WC_Order( $post_id );\n\n\t\t\t\tif( is_null( $wc_order ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$svea_order_id = ( $value = get_post_meta( $wc_order->get_id(), \"_svea_order_id\", true ) ) \n\t\t\t\t\t? $value : wc_get_order_item_meta( $wc_order->get_id(), \"svea_order_id\" );\n\n\t\t if( ! $svea_order_id || strlen( $svea_order_id ) <= 0 ) {\n\t\t continue;\n\t\t }\n\n\t\t $payment_method_id = $wc_order->get_payment_method();\n\n\t\t\t\tif( $payment_method_id === WC_Gateway_Svea_Card::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Card::init()->credit_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Invoice::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Invoice::init()->credit_order( $wc_order, $svea_order_id );\n\t\t\t\t} else if( $payment_method_id === WC_Gateway_Svea_Direct_Bank::GATEWAY_ID ) {\n\t\t\t\t\t$response = WC_Gateway_Svea_Direct_Bank::init()->credit_order( $wc_order, $svea_order_id );\n\t\t\t\t} else\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif( is_array( $response ) && isset( $response[\"success\"] ) && $response[\"success\"] )\n\t\t\t\t\t++$orders_credited;\n\t\t\t}\n\n\t\t\tif( $orders_credited > 0 ) {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\tsprintf( _n( 'Credited %s order', 'Credited %s orders', $orders_credited, self::PLUGIN_SLUG ), $orders_credited )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tWC_Gateway_Svea_Helper::add_admin_notice(\n\t\t\t\t\t__( 'No orders were credited', self::PLUGIN_SLUG )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$sendback = admin_url( 'edit.php?post_type=shop_order' );\n\n\t\t\tbreak;\n\t\t\tdefault: return;\n\t\t}\n\n\t\twp_redirect( $sendback );\n\n\t\texit;\n\t}", "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}", "function woocommerce_pip_alter_order_actions( $order ) {\n\n\t\t\t?>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post='.$order->id.'&type=print_invoice'), 'print-pip' ); ?>\"><img src=\"<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/invoice-icon.png'; ?>\" alt=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" width=\"14\"></a>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post=' . $order->id.'&type=print_packing' ), 'print-pip' ); ?>\"><img src=\"<?php echo woocommerce_pip_get_plugin_url() . '/assets/images/packing-list-icon.png'; ?>\" alt=\"<?php esc_attr_e( 'Print Packing List', 'woocommerce-pip' ); ?>\" width=\"14\"></a>\n\t\t\t<?php\n}", "function ok_process_bulk_action() {\n $signupsListTable = new OK_Signups_List_Table();\n\n // Use it to fetch the current bulk action\n $action = $signupsListTable->current_action();\n\n // Detect when a bulk action is being triggered...\n if ( $action && 'export_signups' === $action ) {\n global $wpdb;\n\n $query = \"SELECT * FROM $wpdb->signups\";\n $data = $wpdb->get_results( $query, ARRAY_N );\n\n require_once( __DIR__ . '/lib/parsecsv/parsecsv.lib.php' );\n $csv = new parseCSV();\n $csv->output( 'signups.csv', $data );\n die();\n }\n}", "public function process_bulk_actions() {\n\n\t\t$ids = isset( $_GET['form_id'] ) ? array_map( 'absint', (array) $_GET['form_id'] ) : array(); // phpcs:ignore WordPress.Security.NonceVerification\n\t\t$action = ! empty( $_REQUEST['action'] ) ? sanitize_key( $_REQUEST['action'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification\n\n\t\tif ( $action === '-1' ) {\n\t\t\t$action = ! empty( $_REQUEST['action2'] ) ? sanitize_key( $_REQUEST['action2'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification\n\t\t}\n\n\t\t// Checking the sortable column link.\n\t\t$is_orderby_link = ! empty( $_REQUEST['orderby'] ) && ! empty( $_REQUEST['order'] );\n\n\t\tif ( empty( $ids ) || empty( $action ) || $is_orderby_link ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check exact action values.\n\t\tif ( ! in_array( $action, [ 'delete', 'duplicate' ], true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $_GET['_wpnonce'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check the nonce.\n\t\tif (\n\t\t\t! wp_verify_nonce( sanitize_key( $_GET['_wpnonce'] ), 'bulk-forms' ) &&\n\t\t\t! wp_verify_nonce( sanitize_key( $_GET['_wpnonce'] ), 'wpforms_' . $action . '_form_nonce' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check that we have a method for this action.\n\t\tif ( ! method_exists( $this, 'bulk_action_' . $action . '_forms' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$processed_forms = count( $this->{'bulk_action_' . $action . '_forms'}( $ids ) );\n\n\t\t// Unset get vars and perform redirect to avoid action reuse.\n\t\twp_safe_redirect(\n\t\t\tadd_query_arg(\n\t\t\t\t$action . 'd',\n\t\t\t\t$processed_forms,\n\t\t\t\tremove_query_arg( array( 'action', 'action2', '_wpnonce', 'form_id', 'paged', '_wp_http_referer' ) )\n\t\t\t)\n\t\t);\n\t\texit;\n\t}", "public function process_bulk_action() {\n\t\tif ( 'delete' === $this->current_action() ) {\n\t\t\t$this->delete_from_database( absint( $_GET['custom_element'] ) );\n\t\t}\n\n\t\t// If the delete bulk action is triggered\n\t\tif ( ( isset( $_GET['action'] ) && $_GET['action'] == 'bulk-delete' )\n\t\t\t|| ( isset( $_GET['action2'] ) && $_GET['action2'] == 'bulk-delete' )\n\t\t) {\n\t\t\t$delete_ids = esc_sql( $_GET['custom_element'] );\n\n\t\t\tif(empty($delete_ids))\n\t\t\t\treturn;\n\n\t\t\t// loop over the array of record IDs and delete them\n\t\t\tforeach ( $delete_ids as $id ) {\n\t\t\t\t$this->delete_from_database( absint( $id ) );\n\t\t\t}\n\t\t}\n\t}", "function process_bulk_action() {\r\n if( 'delete'===$this->current_action() ) {\r\n wp_die('Items deleted (or they would be if we had items to delete)!');\r\n }\r\n \r\n }", "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 }", "function process_bulk_action()\n {\n global $wpdb;\n $table_name = $wpdb->prefix . 'cte'; // tables prefix\n\n if ('delete' === $this->current_action()) {\n $ids = isset($_REQUEST['id']) ? $_REQUEST['id'] : array();\n if (is_array($ids)) $ids = implode(',', $ids);\n\n if (!empty($ids)) {\n $wpdb->query(\"DELETE FROM $table_name WHERE id IN($ids)\");\n }\n }\n }", "public function process_bulk_action() {\n\t\tif ( 'delete' === $this->current_action() ) {\n\n\t\t\t// In our file that handles the request, verify the nonce.\n\t\t\t$nonce = esc_attr( $_REQUEST['_wpnonce'] );\n\n\t\t\tif ( ! wp_verify_nonce( $nonce, 'xyr_delete_company' ) ) {\n\t\t\t\tdie( 'Go get a life script kiddies' );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tself::delete_company( absint( $_GET['customer'] ) );\n\n\t\t\t\t// esc_url_raw() is used to prevent converting ampersand in url to \"#038;\"\n\t\t\t\t// add_query_arg() return the current url\n\t\t\t\twp_redirect( esc_url_raw(add_query_arg()) );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}\n\n\t\t// If the delete bulk action is triggered\n\t\tif ( ( isset( $_POST['action'] ) && $_POST['action'] == 'bulk-delete' )\n\t\t || ( isset( $_POST['action2'] ) && $_POST['action2'] == 'bulk-delete' )\n\t\t) {\n\n\t\t\t$delete_ids = esc_sql( $_POST['bulk-delete'] );\n\n\t\t\t// loop over the array of record IDs and delete them\n\t\t\tforeach ( $delete_ids as $id ) {\n\t\t\t\tself::delete_company( $id );\n\n\t\t\t}\n\n\t\t\t// esc_url_raw() is used to prevent converting ampersand in url to \"#038;\"\n\t\t // add_query_arg() return the current url\n\t\t wp_redirect( esc_url_raw(add_query_arg()) );\n\t\t\texit;\n\t\t}\n\t}", "function process_bulk_action($redirect_to, $doaction, $ids) {\r\n\r\n if( 'delete'===$this->current_action() ) {\r\n\r\n wp_die('Items deleted (or they would be if we had items to delete)!');\r\n\r\n }\r\n\r\n\r\n\t\t\t\r\n\t\t\r\n\r\n }", "protected function get_bulk_actions()\n {\n }", "protected function get_bulk_actions()\n {\n }", "public function process_bulk_action()\n\t{\n\t\tif ('delete' === $this->current_action()) {\n\n\t\t\t// In our file that handles the request, verify the nonce.\n\t\t\t$nonce = esc_attr($_REQUEST['_wpnonce']);\n\n\t\t\tif (!wp_verify_nonce($nonce, 'sp_delete_post')) {\n\t\t\t\tdie('Go get a life script kiddies');\n\t\t\t} else {\n\t\t\t\tself::delete_post(absint($_GET['postid']));\n\n\t\t\t\t// esc_url_raw() is used to prevent converting ampersand in url to \"#038;\"\n\t\t\t\t// add_query_arg() return the current url\n\t\t\t\twp_redirect(esc_url_raw(add_query_arg()));\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t// If the delete bulk action is triggered\n\t\tif ((isset($_POST['action']) && $_POST['action'] == 'bulk-delete')\n\t\t\t|| (isset($_POST['action2']) && $_POST['action2'] == 'bulk-delete')\n\t\t) {\n\n\t\t\t$delete_ids = esc_sql($_POST['bulk-delete']);\n\n\t\t\t// loop over the array of record IDs and delete them\n\t\t\tforeach ($delete_ids as $id) {\n\t\t\t\tself::delete_post($id);\n\t\t\t}\n\n\t\t\t// esc_url_raw() is used to prevent converting ampersand in url to \"#038;\"\n\t\t\t// add_query_arg() return the current url\n\t\t\twp_redirect(esc_url_raw(add_query_arg()));\n\t\t\texit;\n\t\t}\n\t}", "public function process_bulk_action() {\n\n\t\tif( empty( $_REQUEST['_wpnonce'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-referrals' ) && ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'referral-nonce' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$ids = isset( $_GET['referral_id'] ) ? $_GET['referral_id'] : array();\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\t\t$action = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : false;\n\n\t\tif( empty( $ids ) || empty( $action ) ) {\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\taffwp_delete_referral( $id );\n\t\t\t}\n\n\t\t\tif ( 'reject' === $this->current_action() ) {\n\t\t\t\taffwp_set_referral_status( $id, 'rejected' );\n\t\t\t}\n\n\t\t\tif ( 'accept' === $this->current_action() ) {\n\t\t\t\taffwp_set_referral_status( $id, 'unpaid' );\n\t\t\t}\n\n\t\t\tif ( 'mark_as_paid' === $this->current_action() ) {\n\t\t\t\taffwp_set_referral_status( $id, 'paid' );\n\t\t\t}\n\n\t\t\tif ( 'mark_as_unpaid' === $this->current_action() ) {\n\t\t\t\taffwp_set_referral_status( $id, 'unpaid' );\n\t\t\t}\n\n\t\t\tdo_action( 'affwp_referrals_do_bulk_action_' . $this->current_action(), $id );\n\n\t\t}\n\n\t}", "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}", "function process_bulk_action() {\r\n\r\n if( 'delete' === $this->current_action() ) {\r\n\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t$items\t= $_GET['pdonation'];\r\n\r\n\t\t\tif( is_array( $items ) && $items ) {\r\n\t\t\t\tforeach( $items as $single_item ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//$wpdb->delete( $wpdb->prefix . \"donation_form_user\", array( 'id' => $single_item ) );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tglobal $is_donation_deleted;\r\n\t\t\t\t$is_donation_deleted\t= true;\t\r\n\t\t\t}\t\t\r\n\r\n\t\t\t//wp_die('Items deleted (or they would be if we had items to delete)!');\r\n } \r\n }", "function woocommerce_pip_my_orders_action( $actions, $order ) {\n\n\tif ( in_array( $order->status, array( 'processing', 'completed' ) ) ) {\n\t\t$actions[] = array(\n\t\t\t'url'\t => wp_nonce_url( site_url( '?print_pip_invoice=true&post='.$order->id ), 'client-print-pip' ),\n\t\t\t'name' => __( 'View invoice', 'woocommerce-pip' )\n\t\t);\n\t}\n\treturn $actions;\n}", "function my_give_process_custom_bulk_action( $id, $current_action ) {\n\n\tswitch ( $current_action ) {\n\t\tcase 'set-status-under-review':\n\t\t\tgive_update_payment_status( $id, 'under_review' );\n\t\t\tbreak;\n\t\tcase 'set-status-pending-approval':\n\t\t\tgive_update_payment_status( $id, 'pending_approval' );\n\t\t\tbreak;\n\t}\n\n}", "function process_bulk_action() {\n if ('delete' === $this->current_action()) {\n $deleteIds = esc_sql($_REQUEST['bulk-delete']);\n foreach ($deleteIds as $id) {\n $this->deleteUser($id);\n }\n }\n }", "function hook_order_actions($order) {\n $actions = array();\n $module_path = base_path() . drupal_get_path('module', 'uc_shipping');\n if (user_access('fulfill orders')) {\n $result = db_query(\"SELECT nid FROM {uc_order_products} WHERE order_id = %d AND data LIKE '%%s:9:\\\"shippable\\\";s:1:\\\"1\\\";%%'\", $order->order_id);\n if (db_num_rows($result)) {\n $title = t('Package order !order_id products.', array('!order_id' => $order->order_id));\n $actions[] = array(\n 'name' => t('Package'),\n 'url' => 'admin/store/orders/'. $order->order_id .'/packages',\n 'icon' => '<img src=\"'. $module_path .'/images/package.gif\" alt=\"'. $title .'\" />',\n 'title' => $title,\n );\n $result = db_query(\"SELECT package_id FROM {uc_packages} WHERE order_id = %d\", $order->order_id);\n if (db_num_rows($result)) {\n $title = t('Ship order !order_id packages.', array('!order_id' => $order->order_id));\n $actions[] = array(\n 'name' => t('Ship'),\n 'url' => 'admin/store/orders/'. $order->order_id .'/shipments',\n 'icon' => '<img src=\"'. $module_path .'/images/ship.gif\" alt=\"'. $title .'\" />',\n 'title' => $title,\n );\n }\n }\n }\n return $actions;\n}", "protected function process_action() {\n\t\t// Detect when a bulk action is being triggered.\n\t\tif ( 'delete' === $this->current_action() ) {\n\t\t\t$ids = isset($_REQUEST['id']) ? $_REQUEST['id'] : array();\n\n\t\t\tif (!is_array($ids)) \n\t\t\t\t$ids = array($ids);\n\n\t\t\tforeach($ids as $id)\n\t\t\t\t$this->repository->deleteForm($id);\n\t\t}\n\t}", "public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}", "public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}", "public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}", "public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}", "public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}", "public function index_onBulkAction()\n {\n if (\n ($bulkAction = post('action')) &&\n ($checkedIds = post('checked')) &&\n is_array($checkedIds) &&\n count($checkedIds)\n ) {\n\n foreach ($checkedIds as $userId) {\n if (!$person = Person::find($userId)) {\n continue;\n }\n\n switch ($bulkAction) {\n case 'delete':\n $person->forceDelete();\n break;\n\n case 'activate':\n $person->activate($person->activation_code);\n break;\n\n case 'deactivate':\n $person->deactivate();\n break;\n\n case 'ban':\n $person->ban();\n break;\n\n case 'unban':\n $person->unban();\n break;\n }\n }\n\n Flash::success('Действие успешно выполнено');\n }\n else {\n Flash::error('Произошла ошибка');\n }\n\n return $this->listRefresh();\n }", "public function process_bulk_action() {\r\n\r\n if ( 'delete' === $this->current_action() ) {\r\n\r\n $nonce = esc_attr( $_REQUEST['_wpnonce'] );\r\n\r\n if ( ! wp_verify_nonce( $nonce, 'opalmembership-delete-user' ) ) {\r\n wp_die( __( 'System could not delete user.', 'opalmembership' ) );\r\n } else {\r\n $this->delete_user( absint( $_GET['user'] ) );\r\n }\r\n }\r\n\r\n /**\r\n * delete multi users\r\n */\r\n if ( ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'bulk-delete' ) || ( isset( $_REQUEST['action2'] ) && $_REQUEST['action2'] === 'bulk-delete' ) ) {\r\n\r\n $delete_ids = esc_sql( $_REQUEST['bulk-delete'] );\r\n\r\n foreach ( $delete_ids as $id ) {\r\n $this->delete_user( $id );\r\n }\r\n\r\n }\r\n }", "function wprss_custom_feed_item_bulk_actions( $actions ){\n return apply_filters( 'wprss_custom_feed_item_bulk_actions', $actions );\n }", "public function actionBulk_action()\n {\n $mapping = DeliveryServer::getTypesMapping();\n $request = Yii::app()->request;\n $notify = Yii::app()->notify;\n \n $action = $request->getPost('bulk_action');\n $items = array_unique(array_map('intval', (array)$request->getPost('bulk_item', array())));\n \n if ($action == DeliveryServer::BULK_ACTION_DELETE && count($items)) {\n $affected = 0;\n foreach ($items as $item) {\n $_server = DeliveryServer::model()->findByPk((int)$item);\n if (!isset($mapping[$_server->type])) {\n continue;\n }\n\n $server = DeliveryServer::model($mapping[$_server->type])->findByPk((int)$_server->server_id);\n if (empty($server)) {\n continue;\n }\n\n if (!$server->getCanBeDeleted()) {\n continue;\n }\n\n $server->delete();\n $affected++;\n }\n if ($affected) {\n $notify->addSuccess(Yii::t('app', 'The action has been successfully completed!'));\n }\n }\n\n $defaultReturn = $request->getServer('HTTP_REFERER', array('delivery_servers/index'));\n $this->redirect($request->getPost('returnUrl', $defaultReturn));\n }", "public function process_bulk_action() {\n if (( isset( $_POST['action'] ) && $_POST['action'] == 'bulk-delete' ) ||\n ( isset( $_POST['action2'] ) && $_POST['action2'] == 'bulk-delete' )) {\n // If sponsor_id array not empty\n if(isset($_POST['sponsor_id']) && !empty($_POST['sponsor_id'])) { \n $delete_ids = esc_sql( $_POST['sponsor_id'] );\n foreach ( $delete_ids as $id ) {\n self::delete_season( $id );\n }\n }\n }\n }", "public function process_bulk_actions() {\n\n\t\t$ids = isset( $_GET['form_id'] ) ? $_GET['form_id'] : array();\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\t\t$action = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : false; // phpcs:ignore\n\n\t\t// Checking the sortable column link.\n\t\t$is_orderby_link = ! empty( $_REQUEST['orderby'] ) && ! empty( $_REQUEST['order'] );\n\n\t\tif ( empty( $ids ) || empty( $action ) || $is_orderby_link ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Delete one or multiple forms - both delete links and bulk actions.\n\t\tif ( 'delete' === $this->current_action() ) {\n\n\t\t\tif (\n\t\t\t\twp_verify_nonce( $_GET['_wpnonce'], 'bulk-forms' ) ||\n\t\t\t\twp_verify_nonce( $_GET['_wpnonce'], 'wpforms_delete_form_nonce' )\n\t\t\t) {\n\t\t\t\tforeach ( $ids as $id ) {\n\t\t\t\t\twpforms()->form->delete( $id );\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<div class=\"notice updated\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tif ( count( $ids ) === 1 ) {\n\t\t\t\t\t\t\tesc_html_e( 'Form was successfully deleted.', 'wpforms-lite' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tesc_html_e( 'Forms were successfully deleted.', 'wpforms-lite' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t} else {\n\t\t\t\t?>\n\t\t\t\t<div class=\"notice updated\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<?php esc_html_e( 'Security check failed. Please try again.', 'wpforms-lite' ); ?>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\n\t\t// Duplicate form - currently just delete links (no bulk action at the moment).\n\t\tif ( 'duplicate' === $this->current_action() ) {\n\n\t\t\tif ( wp_verify_nonce( $_GET['_wpnonce'], 'wpforms_duplicate_form_nonce' ) ) {\n\t\t\t\tforeach ( $ids as $id ) {\n\t\t\t\t\twpforms()->form->duplicate( $id );\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<div class=\"notice updated\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tif ( count( $ids ) === 1 ) {\n\t\t\t\t\t\t\tesc_html_e( 'Form was successfully duplicated.', 'wpforms-lite' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tesc_html_e( 'Forms were successfully duplicated.', 'wpforms-lite' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t} else {\n\t\t\t\t?>\n\t\t\t\t<div class=\"notice updated\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<?php esc_html_e( 'Security check failed. Please try again.', 'wpforms-lite' ); ?>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}", "public function add_order_bulk_actions() {\n\t\tglobal $post_type;\n\n\t\tif( $post_type !== \"shop_order\" )\n\t\t\treturn;\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function() {\n\t\t\t\tvar optGroup = '<optgroup label=\\'<?php _e( \"Svea Webpay Actions\", \"sveawebpay\" ); ?>\\'>'\n\t\t\t\t\t\t\t + '<option value=\"svea_deliver\"><?php _e( \"Deliver order\", \"sveawebpay\" ); ?></option>'\n\t\t\t\t\t\t\t + '<option value=\"svea_credit\"><?php _e( \"Credit order\", \"sveawebpay\" ); ?></option>'\n\t\t\t\t\t\t\t + '<option value=\"svea_cancel\"><?php _e( \"Cancel order\", \"sveawebpay\" ); ?></option>'\n\t\t\t\t\t\t\t + '</optgroup>';\n\t\t\t\tjQuery(\"select[name='action'], select[name='action2']\").append(optGroup);\n\t\t\t});\n\t\t</script>\n\t\t<?php\n\t}", "public function process_order_meta_box_actions( $order ) {\n\n\t\t$order = new WC_Shipwire_Order( $order->id );\n\n\t\tif ( 'woocommerce_order_action_wc_shipwire_export_order' === current_filter() ) {\n\t\t\t$order->export();\n\t\t} else {\n\t\t\t$order->update_tracking();\n\t\t}\n\t}", "protected function get_bulk_actions() {\n\t\treturn array();\n\t}", "public function processItems()\n {\n $sId = $this->getEditObjectId();\n\n /** @var oxOrder $oOrder */\n $oOrder = $this->getOrderFactory()->create();\n if (!$oOrder->load($sId)) {\n return;\n }\n\n $type = $this->getConfig()->getRequestParameter('actionType');\n\n $validator = $this->getValidator($type);\n if (!$validator->validateItems()) {\n $this->_aViewData['formError'][$type] = $this->getLanguage()->translateString($validator->getError());\n\n return;\n }\n\n //Send partial items request (ship, cancel, refund) to api\n $items = $validator->getItems();\n $response = $validator->getManager()->processItems($oOrder, $items);\n\n if (isset($response['error'])) {\n $this->_aViewData['formError'][$type] = $response['error'];\n }\n }", "function wc_get_account_orders_actions($order)\n {\n }", "public function customer_bulk_actions() {\n if ( ! isset( $_GET['page'] ) || $_GET['page'] !== JPID_Admin_Page_Customer_List::SLUG ) {\n return;\n }\n\n $wp_list_table = new WP_List_Table;\n $current_action = $wp_list_table->current_action();\n\n if ( $current_action === false ) {\n return;\n }\n\n switch ( $current_action ) {\n case 'delete_customers':\n break;\n }\n }", "public function process_export_orders( ){ \n\n\t\tif ( empty( $_GET[ 'orders_for_product' ] ) ) {\n\n\t\t\treturn __( 'You haven\\'t selected a product\\'s orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you\\'d like to view.', 'topgroupshops' );\n\t\t\n\t\t} else { \n\t\t\t$this->product_id = !empty( $_GET[ 'orders_for_product' ] ) ? (int) $_GET[ 'orders_for_product' ] : false;\n\t\t\t\n\t\t\t$products = array( $this->product_id );\n\n\t\t\t$_product = get_product( $this->product_id );\n\n\t\t\tif ( is_object( $_product ) ) { \n\n\t\t\t\t$children = $_product->get_children();\n\n\t\t\t\tif ( !empty( $children ) ) {\n\t\t\t\t\t$products = array_merge($products, $children);\n\t\t\t\t\t$products = array_unique($products);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t$this->orders = TGS_Queries::get_orders_for_products( $products, array( 'vendor_id' => get_current_user_id() ) );\n\t\t}\n\n\t\tif ( !$this->orders ) {\n\t\t\treturn __( 'No orders.', 'topgroupshops' );\n\t\t}\n\n\t\tif ( $this->can_export_csv && !empty( $_POST[ 'export_orders' ] ) ) {\n\t\t\t\t$this->download_csv();\n\t\t}\n\n\t}", "public function orders_actions($actions, $order)\n {\n if ($this->opt['woo_pdf_display_orders_page_button']) {\n\n $invoice = $this->get_invoice($order->id);\n\n // Show invoice link\n if (is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled'] && $this->opt['woo_pdf_allow_download'] && apply_filters('woo_pdf_allow_regular_invoice_download', true, $order, 'list')) {\n $data = $invoice['id'].'|'.$invoice['prefix'].'|'.$invoice['code'].'|'.$invoice['suffix'];\n $download_code = base64_encode($data);\n $download_url = home_url('/?wpd_invoice='.$download_code);\n $title = $this->opt['woo_pdf_document_name'];\n }\n\n // Show proforma link\n else if (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && $this->opt['woo_pdf_allow_proforma_download'] && $order->status != 'completed' && apply_filters('woo_pdf_allow_proforma_invoice_download', true, $order, 'list')) {\n $download_url = home_url('/?wpd_proforma='.$order->id);\n $title = $this->opt['woo_pdf_proforma_name'];\n }\n\n if (isset($download_url) && isset($title)) {\n $actions['invoice'] = array(\n 'url' => $download_url,\n 'name' => $title,\n );\n }\n }\n\n return $actions;\n }", "protected function doActionsList()\n\t{\n\t\t$this->processBuyAction();\n\t\t$this->processAddToBasketAction();\n\t\t$this->processSubscribeAction();\n\t}", "public static function bulk_actions($actions){\n $actions['create_invoice'] = __('Bill');\n return $actions;\n }", "private static function log_table_bulk_actions()\n {\n }", "public function bulk()\n\t{\n\t\t$action = Input::get('action');\n\t\t$ids = Input::get('id') ? Input::get('id') : Input::get('ids');\n\t\t$count = $this->invoiceRepo->bulk($ids, $action);\n\n \t\tif ($count > 0)\t\t\n \t\t{\n\t\t\t$message = Utils::pluralize('Successfully '.$action.'d ? invoice', $count);\n\t\t\tSession::flash('message', $message);\n\t\t}\n\n\t\treturn Redirect::to('invoices');\n\t}", "public function employee_bulk_action() {\n // Nonce validation\n if ( ! $this->verify_current_page_screen( 'erp-hr', 'bulk-employees' ) ) {\n return;\n }\n\n // Check permission if not hr manager then go out from here\n if ( ! current_user_can( 'erp_view_list' ) ) {\n wp_die( esc_html__( 'You do not have sufficient permissions to do this action', 'erp' ) );\n }\n\n $employee_table = new \\WeDevs\\ERP\\HRM\\Employee_List_Table();\n $action = $employee_table->current_action();\n\n if ( $action ) {\n\n $req_uri_bulk = ( isset( $_SERVER['REQUEST_URI'] ) ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';\n\n $redirect = remove_query_arg( array(\n '_wp_http_referer',\n '_wpnonce',\n 'filter_employee'\n ), $req_uri_bulk );\n\n switch ( $action ) {\n\n case 'delete' :\n\n if ( isset( $_GET['employee_id'] ) && ! empty( $_GET['employee_id'] ) ) {\n erp_employee_delete( array_map( 'sanitize_text_field', wp_unslash( $_GET['employee_id'] ) ), false );\n }\n\n wp_redirect( $redirect );\n exit();\n\n case 'permanent_delete' :\n if ( isset( $_GET['employee_id'] ) && ! empty( $_GET['employee_id'] ) ) {\n erp_employee_delete( array_map( 'sanitize_text_field', wp_unslash( $_GET['employee_id'] ) ), true );\n }\n\n wp_redirect( $redirect );\n exit();\n\n case 'restore' :\n if ( isset( $_GET['employee_id'] ) && ! empty( $_GET['employee_id'] ) ) {\n erp_employee_restore( array_map( 'sanitize_text_field', wp_unslash( $_GET['employee_id'] ) ) );\n }\n\n wp_redirect( $redirect );\n exit();\n\n case 'filter_employee':\n wp_redirect( $redirect );\n exit();\n\n case 'employee_search':\n $redirect = remove_query_arg( array( 'employee_search' ), $redirect );\n wp_redirect( $redirect );\n exit();\n }\n }\n }", "public function processPostOrderProcessingHooks() {\n \n // HOOK: allow multiple hooks to append individual action\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['orderProcessor_hooks']['postOrderProcessingHook'])) {\n foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['orderProcessor_hooks']['postOrderProcessingHook'] as $funcName) {\n $params = array(\n 'orderWrapperObj' => $this->orderWrapperObj,\n );\n t3lib_div::callUserFunction($funcName, $params, $this, '');\n if (TYPO3_DLOG) t3lib_div::devLog(sprintf('Processing hook \"%s\" for \"postOrderProcessingHook\"', $funcName), $this->extKey, 1, array('params' => $params));\n }\n } \n }", "function get_bulk_actions() {\n $actions = array(\n\t\t\t\t\t\t\t'delete' => __('Delete', 'blog-designer-pack')\n\t\t\t\t\t\t);\n return apply_filters('bdpp_shrt_tmpl_list_bulk_act', $actions);\n\t}", "public function ordersAction()\n {\n \t// Change maximum execution time \n set_time_limit(0);\n \n echo Ireus_Controller_Export::getInstance()\n ->setOrderColumns($this->_ordersColumns)\n ->exportOrdersCsv(Mage::getModel('Sales/Order_Item')->getCollection()->getData());\n\n exit;\n }", "public function multiOrderProcess() {\n $errorMessage = $this->checkDirectory();\n\n /** Make sure method was called by AJAX */\n if(!$this->getRequest()->isXmlHttpRequest()) {\n return $this->generateRedirectFromRoute('admin.order.list');\n }\n\n $request = $this->getRequest()->request;\n\n $turn = (int)$request->get('turn');\n $orders = $request->get('orders');\n $offset = 10 * $turn;\n $limit = $offset + 10;\n\n $htmltopdf = new Html2Pdf('P', 'A4', 'fr');\n\n while ($offset < $limit && $offset < count($orders)) {\n $htmlInvoice = $this->returnHTMLInvoice($orders[$offset], 'invoice');\n $htmltopdf->writeHTML($htmlInvoice);\n\n $invoiced = PdfInvoiceQuery::create()->filterByOrderId($orders[$offset]);\n $invoiced\n ->findOneOrCreate()\n ->setOrderId($orders[$offset])\n ->setInvoiced(1)\n ->save();\n\n $offset++;\n }\n\n $currentUserId = $this->getSecurityContext()->getAdminUser()->getId();\n\n $fileName = THELIA_LOCAL_DIR . 'invoices/' . $currentUserId . '/ordersInvoice_' . $turn . '.pdf';\n $htmltopdf->output($fileName, 'F');\n\n /** JsonResponse for the AJAX call */\n return new JsonResponse([\n \"status\" => $errorMessage ? 'error' : 'success',\n \"message\" => $errorMessage ? $errorMessage : $this->getTranslator()->trans(\n \"Part $turn of invoicing : Done\",\n [],\n ProcessAndInvoice::DOMAIN_NAME\n )\n ], $errorMessage ? 500 : 200);\n }", "public function entitlement_bulk_action() {\n if ( ! $this->verify_current_page_screen( 'erp-hr', 'bulk-entitlements' ) ) {\n return;\n }\n\n // Check permission\n if ( ! current_user_can( 'erp_leave_manage' ) ) {\n wp_die( esc_html__( 'You do not have sufficient permissions to do this action', 'erp' ) );\n }\n\n $employee_table = new \\WeDevs\\ERP\\HRM\\Entitlement_List_Table();\n $action = $employee_table->current_action();\n\n if ( $action ) {\n\n $req_uri = ( isset( $_SERVER['REQUEST_URI'] ) ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';\n\n $redirect = remove_query_arg( array(\n '_wp_http_referer',\n '_wpnonce',\n 'filter_entitlement'\n ), $req_uri );\n\n if ( $action == 'filter_entitlement' ) {\n wp_redirect( $redirect );\n exit();\n }\n\n if ( $action == 'entitlement_delete' ) {\n if ( isset( $_GET['entitlement_id'] ) && ! empty( $_GET['entitlement_id'] ) ) {\n $array = array_map( 'sanitize_text_field', wp_unslash( $_GET['entitlement_id'] ) );\n foreach ( $array as $key => $ent_id ) {\n erp_hr_delete_entitlement( $ent_id, 0, $ent_id );\n }\n }\n\n wp_redirect( $redirect );\n exit();\n\n }\n }\n }", "public function designation_bulk_action() {\n if ( ! $this->verify_current_page_screen( 'erp-hr', 'bulk-designations' ) ) {\n return;\n }\n\n // Check permission if not hr manager then go out from here\n if ( ! current_user_can( erp_hr_get_manager_role() ) ) {\n wp_die( esc_html__( 'You do not have sufficient permissions to do this action', 'erp' ) );\n }\n\n $employee_table = new \\WeDevs\\ERP\\HRM\\Designation_List_Table();\n $action = $employee_table->current_action();\n\n if ( $action ) {\n\n $req_uri_bulk = ( isset( $_SERVER['REQUEST_URI'] ) ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';\n $redirect = remove_query_arg( array(\n '_wp_http_referer',\n '_wpnonce',\n 'action',\n 'action2'\n ), $req_uri_bulk );\n\n switch ( $action ) {\n\n case 'designation_delete' :\n\n if ( isset( $_GET['desig'] ) && ! empty( $_GET['desig'] ) ) {\n $not_deleted_item = erp_hr_delete_designation( array_map( 'sanitize_text_field', wp_unslash( $_GET['desig'] ) ) );\n }\n\n if ( ! empty ( $not_deleted_item ) ) {\n $redirect = add_query_arg( array( 'desig_delete' => implode( ',', $not_deleted_item ) ), $redirect );\n }\n\n wp_redirect( $redirect );\n exit();\n }\n }\n }", "function bbloomer_get_custom_order_status_bulk( $bulk_actions ) {\n $bulk_actions['mark_custom-status'] = 'Change status to paid';\n return $bulk_actions;\n}", "public function get_bulk_actions() {\n\t\t$actions = array(\n\t\t\t'accept' => __( 'Accept', 'affiliate-wp' ),\n\t\t\t'reject' => __( 'Reject', 'affiliate-wp' ),\n\t\t\t'mark_as_paid' => __( 'Mark as Paid', 'affiliate-wp' ),\n\t\t\t'mark_as_unpaid' => __( 'Mark as Unpaid', 'affiliate-wp' ),\n\t\t\t'delete' => __( 'Delete', 'affiliate-wp' ),\n\t\t);\n\n\t\treturn apply_filters( 'affwp_referrals_bulk_actions', $actions );\n\t}", "protected function bulk_actions($which = '')\n {\n }", "function bulk_action_handler() {\r\n\t\t\tcheck_admin_referer( 'bulk-media' );\r\n\r\n\t\t\tif ( empty( $_REQUEST['media'] ) || ! is_array( $_REQUEST['media'] ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$ids = implode( ',', array_map( 'intval', $_REQUEST['media'] ) );\r\n\r\n\t\t\t// Can't use wp_nonce_url() as it escapes HTML entities\r\n\t\t\t$url = admin_url( 'upload.php' );\r\n\t\t\t$url = add_query_arg(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'page' => 'wp-smpro-admin',\r\n\t\t\t\t\t'goback' => 1,\r\n\t\t\t\t\t'ids' => $ids,\r\n\t\t\t\t\t'_wpnonce' => wp_create_nonce( 'wp-smpro-admin' )\r\n\t\t\t\t),\r\n\t\t\t\t$url\r\n\t\t\t);\r\n\t\t\twp_redirect( $url );\r\n\t\t\texit();\r\n\t\t}", "function units_batch_actions(&$args) {\r\n\t\t\r\n\t\t/*\r\n\t\t * Q: How do I return other custom batch commands not defined in mass_update plugin?\r\n\t\t * \r\n\t\t * A: Define your commands ABOVE the 'Inserted by Mass Update' comment above \r\n\t\t * in an array named $custom_actions_top to display them above the commands \r\n\t\t * created by the mass_update plugin.\r\n\t\t * \r\n\t\t * You can also define commands in an array named $custom_actions_bottom\r\n\t\t * (also ABOVE the 'Inserted by Mass Update' comment block) to display them \r\n\t\t * below the commands created by the mass_update plugin.\r\n\t\t * \r\n\t\t*/\r\n\r\n\t\tif(!isset($custom_actions_top) || !is_array($custom_actions_top))\r\n\t\t\t$custom_actions_top = array();\r\n\r\n\t\tif(!isset($custom_actions_bottom) || !is_array($custom_actions_bottom))\r\n\t\t\t$custom_actions_bottom = array();\r\n\r\n\t\t$command = array(\r\n\t\t\t'02ra72cumuxuqy0sm1hq' => array(\r\n\t\t\t\t'title' => \"Change status\",\r\n\t\t\t\t'function' => 'massUpdateCommand_02ra72cumuxuqy0sm1hq',\r\n\t\t\t\t'icon' => 'tags'\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$mi = getMemberInfo();\r\n\t\tswitch($mi['group']) {\r\n\t\t\tdefault:\r\n\t\t\t\t/* for all other logged users, enable the following commands */\r\n\t\t\t\tif($mi['username'] && $mi['username'] != 'guest')\r\n\t\t\t\t\treturn array_merge(\r\n\t\t\t\t\t\t$custom_actions_top,\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t$command['02ra72cumuxuqy0sm1hq']\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t$custom_actions_bottom\r\n\t\t\t\t\t);\r\n\t\t}\r\n\r\n\r\n\t\t/* End of Mass Update code */\r\n\r\n\r\n\t\treturn array();\r\n\t}", "public function add_order_actions( $order ) {\n\n\t\t$order = new WC_Shipwire_Order( $order->id );\n\n\t\tif ( ! $order->is_exported ) {\n\n\t\t\t$url = wp_nonce_url( admin_url( 'admin-ajax.php?action=wc_shipwire_export_order&order_id=' . $order->id ), 'wc_shipwire_export_order' );\n\t\t\t$name = __( 'Export to Shipwire', 'woocommerce-shipwire' );\n\n\t\t\tprintf( '<a class=\"button tips export_to_shipwire\" href=\"%1$s\" data-tip=\"%2$s\">%2$s</a>', esc_url( $url ), $name );\n\t\t}\n\t}", "public function process_bulk_routine() {\n\n // Run a security check first to ensure we initiated this action.\n check_ajax_referer( $this->plugin_slug, 'nonce' );\n\n // Prepare variables.\n $step = absint( $_POST['step'] );\n $steps = absint( $_POST['steps'] );\n $ppp = $this->num;\n $offset = 1 == $step ? 0 : $ppp * ($step - 1) - 1;\n $done = false;\n\n // Possibly return early if the offset exceeds the total steps and the $ppp is equal to the difference.\n if ( $offset > ($steps - ($this->num * 2)) && $ppp == ($offset - $steps) ) {\n die( json_encode( array( 'success' => true ) ) );\n }\n\n // If our offset is greater than our steps but $ppp is different, set $ppp to the difference.\n if ( $offset > ($steps - ($this->num * 2)) ) {\n $ppp = $offset - $steps;\n $done = true;\n }\n \n // If we have matched our limit, set done to true.\n if ( ($step * $ppp) >= $steps ) {\n\t $done = true;\n }\n\n // Grab all of our data.\n $data = $this->get_query_data( $ppp, $offset );\n\n // If we have no data or it returns false, we are done!\n if ( empty( $data ) || ! $data ) {\n\t wp_cache_flush();\n die( json_encode( array( 'done' => true ) ) );\n }\n\n // Process our query data.\n $this->process_query_data( $data );\n \n // Flush the internal cache after every successful step.\n wp_cache_flush();\n\n // Send back our response to say we need to process more items.\n die( json_encode( array( 'done' => $done ) ) );\n\n }", "function get_bulk_actions( ) {\r\n\t\t$actions = array();\r\n\r\n\t\t$actions['edit'] = __( 'Edit', 'media-library-assistant' );\r\n\t\t$actions['delete'] = __( 'Delete/Revert Custom', 'media-library-assistant' );\r\n\r\n\t\treturn $actions;\r\n\t}", "function get_bulk_actions() {\n $actions = array(\n 'trash' => __( 'Move to Trash', 'wp-erp' ),\n );\n return $actions;\n }", "public function postActions(){\n $bulkAction = Input::get('bulk_action');\n $items = Input::get('tableItems');\n\n if(!$items){\n return Redirect::back()->with('error', NO_ITEMS_SELECTED);\n }\n\n if(in_array($bulkAction, ['delete'])){\n\n // Delete selected sizes.\n ProductPackage::whereIn('id', $items)->delete();\n }else{\n return Redirect::back()->with('error', NO_ACTION_SELECTED);\n }\n\n return Redirect::back()->with('success', DONE);\n }", "public function bulk($entityType = ENTITY_INVOICE)\r\n\t{\r\n\t\t$action = Input::get('action');\r\n\t\t$statusId = Input::get('statusId');\r\n\t\t$ids = Input::get('id') ? Input::get('id') : Input::get('ids');\r\n\t\tif($action == 'delete')\r\n\t\t{\r\n\t\t\t$invoices = Invoice::withTrashed()->scope($ids)->get();\r\n\t\t\tforeach ($invoices as $invoice)\r\n\t\t\t{\r\n\t\t\t\tBookSale::deleteBook($invoice);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//$count = $this->invoiceRepo->bulk($ids, $action, $statusId);\r\n\r\n \t\tif ($count > 0)\r\n \t\t{\r\n \t\t\t$key = $action == 'mark' ? \"updated_{$entityType}\" : \"{$action}d_{$entityType}\";\r\n\t\t\t$message = Utils::pluralize($key, $count);\r\n\t\t\tSession::flash('message', $message);\r\n\t\t}\r\n\r\n\t\treturn Redirect::to(\"{$entityType}\");\r\n\t}", "function my_give_add_custom_payment_bulk_actions( $actions ) {\n\n\t$actions['set-status-under-review'] = __( 'Set To Under Review', 'give' );\n\t$actions['set-status-pending-approval'] = __( 'Set To Pending Approval', 'give' );\n\n\treturn $actions;\n}", "public function bulk_delete()\n\t\t{\n\t\t\t$action = $this->current_action();\n\n\t\t\tif( 'delete' !== $action ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif( empty($_POST['onp_pl_products']) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trequire_once(PAYLOCKER_DIR . '/plugin/includes/classes/class.purchase.php');\n\n\t\t\tforeach($_POST['onp_pl_products'] as $productsIds) {\n\t\t\t\t$productsIds = explode('-', $productsIds);\n\n\t\t\t\tif( sizeof($productsIds) !== 3 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$purchase = OnpPl_Purchase::getInstance($productsIds[0], $productsIds[1], $productsIds[2]);\n\n\t\t\t\tif( $purchase && !$purchase->remove() ) {\n\t\t\t\t\twp_die(__('Неизвестная ошибка! Не удалось удалить некоторые покупки.', 'plugin-paylocker'));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected function process_bulk_action_bulk_truncate() {\n\n\t\t\t// Check is there is anything to truncate.\n\t\t\tif ( $this->process_bulk_action_check_action(\n\t\t\t\t'bulk-selected',\n\t\t\t\t__( 'No table defined', 'wp-data-access' )\n\t\t\t) ) {\n\t\t\t\t// Check if truncate is allowed.\n\t\t\t\tif ( $this->process_bulk_action_check_wpnonce( 'wpda-truncate-*', '_wpnonce4' ) ) {\n\t\t\t\t\t$bulk_tabs = isset( $_REQUEST['bulk-selected'] ) ? $_REQUEST['bulk-selected'] : ''; // input var okay; sanitization okay.\n\t\t\t\t\tforeach ( $bulk_tabs as $table_name ) {\n\t\t\t\t\t\t// Truncate table is not allowed for WordPress tables (double check).\n\t\t\t\t\t\t$truncate_table_name = sanitize_text_field( wp_unslash( $table_name ) ); // input var okay.\n\t\t\t\t\t\t$err_txt = ' ' . sprintf( __( '[cannot truncate WordPress table `%s`]', 'wp-data-access' ), $truncate_table_name );\n\t\t\t\t\t\tif ( $this->process_bulk_action_check_is_wp_table( $truncate_table_name, $err_txt ) ) {\n\t\t\t\t\t\t\t// Check if table exists.\n\t\t\t\t\t\t\t$err_txt = ' ' . sprintf( __( '[table `%s`]', 'wp-data-access' ), $truncate_table_name );\n\t\t\t\t\t\t\tif ( $this->process_bulk_action_check_table_exists( $truncate_table_name, $err_txt ) ) {\n\t\t\t\t\t\t\t\t$dbo_type = $this->get_dbo_type( $truncate_table_name );\n\t\t\t\t\t\t\t\tif ( false === $dbo_type || 'VIEW' === $dbo_type || 'SYSTEM VIEW' === $dbo_type ) {\n\t\t\t\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t'message_text' => sprintf( __( 'Cannot truncate `%s`', 'wp-data-access' ), $truncate_table_name ),\n\t\t\t\t\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t\t\t\t\t'message_is_dismissible' => false,\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\t$msg->box();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// Truncate table.\n\t\t\t\t\t\t\t\t\tif ( $this->truncate_table( $truncate_table_name ) ) {\n\t\t\t\t\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t'message_text' => sprintf( __( 'Table `%s` truncated', 'wp-data-access' ), $truncate_table_name ),\n\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t$msg->box();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "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}", "public function get_bulk_actions() {\n\n\t\t$actions = array(\n\t\t\t'activate' => __( 'Activate', 'affiliate-wp' ),\n\t\t\t'deactivate' => __( 'Deactivate', 'affiliate-wp' ),\n\t\t\t'delete' => __( 'Delete', 'affiliate-wp' )\n\t\t);\n\n\t\t/**\n\t\t * Filters the bulk actions to return in the creatives list table.\n\t\t *\n\t\t * @since 2.1.7\n\t\t *\n\t\t * @param array $actions Bulk actions.\n\t\t */\n\t\treturn apply_filters( 'affwp_creative_bulk_actions', $actions );\n\t}", "function bulk_actions( $which = '' ) {\n\t\tgive_log_views();\n\t}", "function qc_register_bulk_action( $bulk_actions ) {\r\n\r\n $bulk_actions[ 'mark_update_klaviyo_profile' ] = 'Update klaviyo Profile'; // <option value=\"mark_awaiting_shipping\">Change status to awaiting shipping</option>\r\n return $bulk_actions;\r\n\r\n}", "public function reporting_bulk_action() {\n\n if ( isset( $_REQUEST['filter_headcount'] ) ) {\n\n $req_uri_bulk = ( isset( $_SERVER['REQUEST_URI'] ) ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';\n\n if ( ! $this->verify_current_page_screen( 'erp-hr', 'epr-rep-headcount' ) ) {\n return;\n }\n\n $redirect = remove_query_arg( array(\n '_wp_http_referer',\n '_wpnonce',\n 'filter_headcount'\n ), $req_uri_bulk );\n\n wp_redirect( $redirect );\n }\n\n if ( isset( $_REQUEST['filter_leave_report'] ) ) {\n\n if ( ! $this->verify_current_page_screen( 'erp-hr-reporting', 'epr-rep-leaves' ) ) {\n return;\n }\n\n $redirect = remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'filter_leave_report' ), $req_uri_bulk );\n\n wp_redirect( $redirect );\n }\n\n }", "function salesOrdersGridAction() {\n\t\t\t$this->_initWarehouse( );\n\t\t\t$this->_gridAction( 'sales_order', true );\n\t\t}", "public function customSubmissionsBulkActionNotices() {\n\n\t\t\tglobal $post_type, $pagenow;\n\n\t\t\tif ( $pagenow == 'users.php' ) {\n\n\t\t\t\tif ( ( isset( $_REQUEST[ 'users_approved' ] ) && (int) $_REQUEST[ 'users_approved' ] ) ||\n\t\t\t\t\t( isset( $_REQUEST[ 'users_rejected' ] ) && (int) $_REQUEST[ 'users_rejected' ] ) ||\n\t\t\t\t\t( isset( $_REQUEST[ 'users_activated' ] ) && (int) $_REQUEST[ 'users_activated' ] ) ||\n\t\t\t\t\t( isset( $_REQUEST[ 'users_deactivated' ] ) && (int) $_REQUEST[ 'users_deactivated' ] ) ) {\n\n\t\t\t\t\tif ( $_REQUEST[ 'users_approved' ] ) {\n\n\t\t\t\t\t\t$action = \"approved\";\n\t\t\t\t\t\t$affected = $_REQUEST[ 'users_approved' ];\n\n\t\t\t\t\t} if ( $_REQUEST[ 'users_rejected' ] ) {\n\n\t\t\t\t\t\t$action = \"rejected\";\n\t\t\t\t\t\t$affected = $_REQUEST[ 'users_rejected' ];\n\n\t\t\t\t\t} if ( $_REQUEST[ 'users_activated' ] ) {\n\n\t\t\t\t\t\t$action = \"activated\";\n\t\t\t\t\t\t$affected = $_REQUEST[ 'users_activated' ];\n\n\n\t\t\t\t\t} if ( $_REQUEST[ 'users_deactivated' ] ){\n\n\t\t\t\t\t\t$action = \"deactivated\";\n\t\t\t\t\t\t$affected = $_REQUEST[ 'users_deactivated' ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$message = sprintf( _n( 'User %2$s.' , '%1$s users %2$s.' , $affected , 'woocommerce-wholesale-lead-capture' ) , number_format_i18n( $affected ) , $action );\n\t\t\t\t\techo \"<div class=\\\"updated\\\"><p>{$message}</p></div>\";\n\n\t\t\t\t} elseif ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == \"wwlc_approve\" ||\n\t\t\t\t\tisset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == \"wwlc_reject\" ||\n\t\t\t\t\tisset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == \"wwlc_activate\" ||\n\t\t\t\t\tisset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == \"wwlc_deactivate\" ) {\n\n\t\t\t\t\tif ( isset( $_REQUEST[ 'users' ] ) ) {\n\n\t\t\t\t\t\tif ( count( $_REQUEST[ 'users' ] ) > 0 ) {\n\n\t\t\t\t\t\t\tif ( $_REQUEST[ 'action' ] == \"wwlc_approve\" )\n\t\t\t\t\t\t\t\t$action = \"approved\";\n\t\t\t\t\t\t\tif ( $_REQUEST[ 'action' ] == \"wwlc_reject\" )\n\t\t\t\t\t\t\t\t$action = \"rejected\";\n\t\t\t\t\t\t\tif ( $_REQUEST[ 'action' ] == \"wwlc_activate\" )\n\t\t\t\t\t\t\t\t$action = \"activated\";\n\t\t\t\t\t\t\tif ( $_REQUEST[ 'action' ] == \"wwlc_deactivate\" )\n\t\t\t\t\t\t\t\t$action = \"deactivated\";\n\n\t\t\t\t\t\t\t$message = sprintf( _n( 'User %2$s.' , '%1$s users %2$s.' , count( $_REQUEST[ 'users' ] ) , 'woocommerce-wholesale-lead-capture' ) , number_format_i18n( count( $_REQUEST[ 'users' ] ) ) , $action );\n\t\t\t\t\t\t\techo \"<div class=\\\"updated\\\"><p>{$message}</p></div>\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}", "public function executeExportInvoices()\n {\n global $wpdb;\n $delimiter = $this->getParameter( 'export_invoices_delimiter', ',' );\n\n header( 'Content-Type: text/csv; charset=utf-8' );\n header( 'Content-Disposition: attachment; filename=invoices.csv' );\n\n $titles = array(\n 'name' => \\Bookly\\Lib\\Utils\\Common::getTranslatedOption( 'bookly_l10n_label_name' ),\n 'wp_user' => __( 'User', 'bookly' ),\n 'phone' => \\Bookly\\Lib\\Utils\\Common::getTranslatedOption( 'bookly_l10n_label_phone' ),\n 'email' => \\Bookly\\Lib\\Utils\\Common::getTranslatedOption( 'bookly_l10n_label_email' ),\n 'notes' => __( 'Notes', 'bookly' ),\n 'last_appointment' => __( 'Last appointment', 'bookly' ),\n 'total_appointments' => __( 'Total appointments', 'bookly' ),\n 'payments' => __( 'Payments', 'bookly' ),\n 'birthday' => __( 'Date of birth', 'bookly' ),\n );\n $header = array();\n $column = array();\n\n foreach ( $this->getParameter( 'exp' ) as $key => $value ) {\n $header[] = $titles[ $key ];\n $column[] = $key;\n }\n\n $output = fopen( 'php://output', 'w' );\n fwrite( $output, pack( 'CCC', 0xef, 0xbb, 0xbf ) );\n fputcsv( $output, $header, $delimiter );\n\n $rows = Lib\\Entities\\Invoice::query( 'c' )\n ->select( 'c.*, MAX(a.start_date) AS last_appointment,\n COUNT(a.id) AS total_appointments,\n COALESCE(SUM(p.total),0) AS payments,\n wpu.display_name AS wp_user' )\n ->leftJoin( 'invoiceAppointment', 'ca', 'ca.invoice_id = c.id' )\n ->leftJoin( 'Appointment', 'a', 'a.id = ca.appointment_id' )\n ->leftJoin( 'Payment', 'p', 'p.id = ca.payment_id' )\n ->tableJoin( $wpdb->users, 'wpu', 'wpu.ID = c.wp_user_id' )\n ->groupBy( 'c.id' )\n ->fetchArray();\n\n foreach ( $rows as $row ) {\n $row_data = array_fill( 0, count( $column ), '' );\n foreach ( $row as $key => $value ) {\n $pos = array_search( $key, $column );\n if ( $pos !== false ) {\n $row_data[ $pos ] = $value;\n }\n }\n fputcsv( $output, $row_data, $delimiter );\n }\n\n fclose( $output );\n\n exit;\n }", "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}", "public function doExecute( ipsRegistry $registry ) \n\t{\n\t\t//-----------------------------------------\n\t\t// Load HTML\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->html = $this->registry->output->loadTemplate( 'cp_skin_bulkimport' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up stuff\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->form_code\t= $this->html->form_code\t= 'module=tools&amp;section=bulkimport';\n\t\t$this->form_code_js\t= $this->html->form_code_js\t= 'module=tools&section=bulkimport';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Load Language\n\t\t//-----------------------------------------\n\t\t\n\t\tipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_bitracker' ) );\n\n\t\t$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'bit_bulk' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// What to do?\n\t\t//-----------------------------------------\n\t\t\n\t\tswitch( $this->request['do'] )\n\t\t{\n\t\t\tcase 'bulkZip':\n\t\t\t\t//-----------------------------\n\t\t\t\t// Get the zip library\n\t\t\t\t//-----------------------------\n\t\t\t\t\n\t\t\t\tdefine( 'PCLZIP_TEMPORARY_DIR', DOC_IPS_ROOT_PATH . 'cache/tmp/' );\n\n\t\t\t\tswitch( $this->request['op'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'del':\n\t\t\t\t\t\t$this->deleteZipFile();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'upload':\n\t\t\t\t\t\t$this->uploadZipFile();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'zipListAll':\n\t\t\t\t\t\t$this->zipListAll();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'zipIndexAdd':\n\t\t\t\t\t\t$this->zipIndexAdd();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->zipFile();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'bulkDir':\n\t\t\tdefault:\n\t\t\t\tswitch( $this->request['op'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'doBulkAdd':\n\t\t\t\t\t\t$this->doBulkAdd();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'viewDir':\n\t\t\t\t\t\t$this->bulkViewDir();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'viewDirFiles':\n\t\t\t\t\t\t$this->bulkViewFiles();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->bulkAddForm();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Pass to CP output hander\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();\n\t\t$this->registry->getClass('output')->sendOutput();\t\n\t}", "public function tracks_coupons_bulk_actions()\n {\n }", "public function get_bulk_actions() {\n\t\n\t\t$actions = array(\n\t\t\t'deactivate' => __( 'Deactivate', 'wpec-licensing' ),\n\t\t\t'activate' => __( 'Activate', 'wpec-licensing' ),\n\t\t\t'renew' => __( 'Extend', 'wpec-licensing' ),\n\t\t\t'delete' => __( 'Delete', 'wpec-licensing' )\n\t\t);\n\t\t\n\t\treturn $actions;\n\n\t}", "public function handle_bulk_actions( $redirect_url, $action, $post_ids ) {\n\t\tif ( ! is_array( $post_ids ) || empty( $post_ids ) || ! current_user_can( 'edit_others_posts' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// store updated post ids\n\t\t$updated = [];\n\n\t\t// approve listings action\n\t\tif ( $action === 'approve_listings' ) {\n\t\t\tforeach ( $post_ids as $post_id ) {\n\t\t\t\t$updated[] = wp_update_post( [\n\t\t\t\t\t'ID' => $post_id,\n\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t] );\n\t\t\t}\n\t\t}\n\n\t\t// expire listings action\n\t\tif ( $action === 'expire_listings' ) {\n\t\t\tforeach ( $post_ids as $post_id ) {\n\t\t\t\t$updated[] = wp_update_post( [\n\t\t\t\t\t'ID' => $post_id,\n\t\t\t\t\t'post_status' => 'expired',\n\t\t\t\t] );\n\t\t\t}\n\t\t}\n\n\t\t// redirect with notice\n\t\twp_redirect( add_query_arg(\n\t\t\t'updated',\n\t\t\tcount( array_filter( $updated ) ),\n\t\t\tremove_query_arg( 'action', $redirect_url )\n\t\t) );\n\n\t\texit;\n\t}", "public function department_bulk_action() {\n // Check nonce validation\n if ( ! $this->verify_current_page_screen( 'erp-hr', 'bulk-departments' ) ) {\n return;\n }\n\n // Check permission if not hr manager then go out from here\n if ( ! current_user_can( erp_hr_get_manager_role() ) ) {\n wp_die( esc_html__( 'You do not have sufficient permissions to do this action', 'erp' ) );\n }\n\n\n $employee_table = new \\WeDevs\\ERP\\HRM\\Department_List_Table();\n $action = $employee_table->current_action();\n\n if ( $action ) {\n\n $req_uri_bulk = ( isset( $_SERVER['REQUEST_URI'] ) ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';\n $redirect = remove_query_arg( array(\n '_wp_http_referer',\n '_wpnonce',\n 'action',\n 'action2'\n ), $req_uri_bulk );\n $resp = [];\n\n switch ( $action ) {\n\n case 'delete_department' :\n\n if ( isset( $_GET['department_id'] ) ) {\n $array = array_map( 'sanitize_text_field', wp_unslash( $_GET['department_id'] ) );\n foreach ( $array as $key => $dept_id ) {\n $resp[] = erp_hr_delete_department( $dept_id );\n }\n }\n\n if ( in_array( false, $resp ) ) {\n $redirect = add_query_arg( array( 'department_delete' => 'item_deleted' ), $redirect );\n }\n\n wp_redirect( $redirect );\n exit();\n }\n }\n }", "public function bulk_actions( $which = '' ) {\n\n\t\tif ( is_null( $this->_actions ) ) {\n\t\t\t$no_new_actions = $this->_actions = $this->get_bulk_actions();\n\t\t\t$this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );\n\t\t\t$two = '';\n\t\t} else {\n\t\t\t$two = '2';\n\t\t}\n\n\t\tif ( empty( $this->_actions ) )\n\t\t\treturn;\n\n\t\techo \"<select name='action$two'>\\n\";\n\t\techo \"<option value='-1' selected='selected'>\" . __( 'Bulk Actions', 'affiliate-wp' ) . \"</option>\\n\";\n\n\t\tforeach ( $this->_actions as $name => $title ) {\n\t\t\t$class = 'edit' == $name ? ' class=\"hide-if-no-js\"' : '';\n\n\t\t\techo \"\\t<option value='$name'$class>$title</option>\\n\";\n\t\t}\n\n\t\techo \"</select>\\n\";\n\n\t\tdo_action( 'affwp_referral_bulk_actions' );\n\n\t\tsubmit_button( __( 'Apply', 'affiliate-wp' ), 'action', false, false, array( 'id' => \"doaction$two\" ) );\n\t\techo \"\\n\";\n\n\t\t// Makes the filters only get output at the top of the page\n\t\tif( ! did_action( 'affwp_referral_filters' ) ) {\n\n\t\t\t$from = ! empty( $_REQUEST['filter_from'] ) ? $_REQUEST['filter_from'] : '';\n\t\t\t$to = ! empty( $_REQUEST['filter_to'] ) ? $_REQUEST['filter_to'] : '';\n\n\t\t\techo \"<input type='text' class='affwp-datepicker' autocomplete='off' name='filter_from' placeholder='\" . __( 'From - mm/dd/yyyy', 'affiliate-wp' ) . \"' value='\" . $from . \"'/>\";\n\t\t\techo \"<input type='text' class='affwp-datepicker' autocomplete='off' name='filter_to' placeholder='\" . __( 'To - mm/dd/yyyy', 'affiliate-wp' ) . \"' value='\" . $to . \"'/>&nbsp;\";\n\n\t\t\tdo_action( 'affwp_referral_filters' );\n\n\t\t\tsubmit_button( __( 'Filter', 'affiliate-wp' ), 'action', false, false );\n\t\t\techo \"\\n\";\n\n\t\t}\n\t}", "function get_bulk_actions() {\n $actions = array(\n 'delete' => __( 'Delete', 'wp-lister-for-amazon' )\n );\n return $actions;\n }", "function process_export() {\n\t$content = get_export_content();\n\tprocess_items( $content );\n}", "public function postProcess()\n\t{\n\t\tif (Tools::isSubmit('id_order') && Tools::getValue('id_order') > 0)\n\t\t{\n\t\t\t$order = new Order(Tools::getValue('id_order'));\n\n /* Change order state, add a new entry in order history and send an e-mail to the customer if needed */\n if (Tools::isSubmit('submitState') && isset($order))\n {\n if ($this->tabAccess['edit'] === '1')\n {\n $order_state = new OrderState(Tools::getValue('id_order_state'));\n\n $current_order_state = $order->getCurrentOrderState();\n if ($current_order_state->id != $order_state->id)\n {\n $statesEstornaveis = array(Configuration::get('AKATUS_STATUS_2'), Configuration::get('AKATUS_STATUS_0'));\n\n if (in_array($order->current_state, $statesEstornaveis)) {\n\n $json = $this->getJSON($order->id);\n $response = $this->akatusRefund($json);\n\n if ($response['resposta']['codigo-retorno'] == 0) {\n // Create new OrderHistory\n $history = new OrderHistory();\n $history->id_order = $order->id;\n $history->id_employee = (int)$this->context->employee->id;\n\n $use_existings_payment = false;\n if (!$order->hasInvoice())\n $use_existings_payment = true;\n $history->changeIdOrderState((int)$order_state->id, $order, $use_existings_payment);\n\n $carrier = new Carrier($order->id_carrier, $order->id_lang);\n $templateVars = array();\n if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number)\n $templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url));\n // Save all changes\n if ($history->addWithemail(true, $templateVars))\n {\n // synchronizes quantities if needed..\n if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))\n {\n foreach ($order->getProducts() as $product)\n {\n if (StockAvailable::dependsOnStock($product['product_id']))\n StockAvailable::synchronize($product['product_id'], (int)$product['id_shop']);\n }\n }\n\n }\n\n Tools::redirectAdmin(self::$currentIndex.'&id_order='.(int)$order->id.'&vieworder&token='.$this->token);\n\n } else {\n\n $this->errors[] = Tools::displayError('Não foi possível estornar a transação na Akatus: ' . $response['resposta']['mensagem']);\n }\n\n } else if ($order_state->id == Configuration::get('AKATUS_STATUS_7')) {\n \n $this->errors[] = Tools::displayError('Não é possível estornar o pedido devido ao status atual na loja.');\n } else {\n \n return parent::postProcess();\n }\n }\n }\n }\n }\n\n }", "public function bulkUpdateOrders($orders) {\t\tif ($this->config->get('openbay_amazon_status') != 1 || !defined('HTTPS_CATALOG')) {\n\t\t\treturn;\n\t\t}\n\t\t$this->load->model('extension/openbay/amazon');\n\n\t\t$log = new \\Log('amazon.log');\n\t\t$log->write('Called bulkUpdateOrders method');\n\n\t\t$request = array(\n\t\t\t'orders' => array(),\n\t\t);\n\n\t\tforeach ($orders as $order) {\n\t\t\t$amazon_order = $this->getOrder($order['order_id']);\n\t\t\t$amazon_order_products = $this->model_extension_openbay_amazon->getAmazonOrderedProducts($order['order_id']);\n\n\t\t\t$products = array();\n\n\t\t\tforeach ($amazon_order_products as $amazon_order_product) {\n\t\t\t\t$products[] = array(\n\t\t\t\t\t'amazon_order_item_id' => $amazon_order_product['amazon_order_item_id'],\n\t\t\t\t\t'quantity' => $amazon_order_product['quantity'],\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$order_info = array(\n\t\t\t\t'amazon_order_id' => $amazon_order['amazon_order_id'],\n\t\t\t\t'status' => $order['status'],\n\t\t\t\t'products' => $products,\n\t\t\t);\n\n\t\t\tif ($order['status'] == 'shipped' && !empty($order['carrier'])) {\n\t\t\t\tif ($order['carrier_from_list']) {\n\t\t\t\t\t$order_info['carrier_id'] = $order['carrier'];\n\t\t\t\t} else {\n\t\t\t\t\t$order_info['carrier_name'] = $order['carrier'];\n\t\t\t\t}\n\n\t\t\t\t$order_info['tracking'] = $order['tracking'];\n\t\t\t}\n\n\t\t\t$request['orders'][] = $order_info;\n\t\t}\n\n\t\t$log->write('order/bulkUpdate call: ' . print_r($request, 1));\n\n\t\t$response = $this->call('order/bulkUpdate', $request);\n\n\t\t$log->write('order/bulkUpdate response: ' . $response);\n\t}", "public function bulk_action() {\n\t\t$screen = get_current_screen();\n\n\t\tif ( $screen->id == 'users' ) {\n\n\t\t\t// get the action\n\t\t\t$wp_list_table = _get_list_table( 'WP_Users_List_Table' );\n\t\t\t$action = $wp_list_table->current_action();\n\n\t\t\t$allowed_actions = array( 'approve', 'deny' );\n\t\t\tif ( !in_array( $action, $allowed_actions ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// security check\n\t\t\tcheck_admin_referer( 'bulk-users' );\n\n\t\t\t// make sure ids are submitted\n\t\t\tif ( isset( $_REQUEST['users'] ) ) {\n\t\t\t\t$user_ids = array_map( 'intval', $_REQUEST['users'] );\n\t\t\t}\n\n\t\t\tif ( empty( $user_ids ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$sendback = remove_query_arg( array( 'approved', 'denied', 'deleted', 'ids', 'new_user_approve_filter', 'new_user_approve_filter2', 'pw-status-query-submit', 'new_role' ), wp_get_referer() );\n\t\t\tif ( !$sendback ) {\n\t\t\t\t$sendback = admin_url( 'users.php' );\n\t\t\t}\n\n\t\t\t$pagenum = $wp_list_table->get_pagenum();\n\t\t\t$sendback = add_query_arg( 'paged', $pagenum, $sendback );\n\n\t\t\tswitch ( $action ) {\n\t\t\t\tcase 'approve':\n\t\t\t\t\t$approved = 0;\n\t\t\t\t\tforeach ( $user_ids as $user_id ) {\n\t\t\t\t\t\tpw_new_user_approve()->update_user_status( $user_id, 'approve' );\n\t\t\t\t\t\t$approved++;\n\t\t\t\t\t}\n\n\t\t\t\t\t$sendback = add_query_arg( array( 'approved' => $approved, 'ids' => join( ',', $user_ids ) ), $sendback );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'deny':\n\t\t\t\t\t$denied = 0;\n\t\t\t\t\tforeach ( $user_ids as $user_id ) {\n\t\t\t\t\t\tpw_new_user_approve()->update_user_status( $user_id, 'deny' );\n\t\t\t\t\t\t$denied++;\n\t\t\t\t\t}\n\n\t\t\t\t\t$sendback = add_query_arg( array( 'denied' => $denied, 'ids' => join( ',', $user_ids ) ), $sendback );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn;\n\t\t\t}\n\n\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\twp_redirect( $sendback );\n\t\t\texit();\n\t\t}\n\t}", "function order_export()\n\t{\n\t\trequire_code('shopping');\n\n\t\trequire_code('form_templates');\n\n\t\t$title=get_screen_title('EXPORT_ORDER_LIST');\n\n\t\tbreadcrumb_set_parents(array(array('_SEARCH:admin_ecommerce:ecom_usage',do_lang_tempcode('ECOMMERCE')),array('_SELF:_SELF:misc',do_lang_tempcode('ORDERS')),array('_SELF:_SELF:show_orders',do_lang_tempcode('ORDER_LIST'))));\n\n\t\t$fields=new ocp_tempcode();\n\n\t\t$order_status_list=get_order_status_list();\n\n\t\t$fields->attach(form_input_list(do_lang_tempcode('ORDER_STATUS'),do_lang_tempcode('ORDER_STATUS_FILTER_DESCRIPTION'),'order_status',$order_status_list,NULL,false,false));\n\n\t\t// Dates\n\t\t$start_year=intval(date('Y'))-1;\n\t\t$start_month=intval(date('m'));\n\t\t$start_day=intval(date('d'));\n\t\t$start_hour=intval(date('H'));\n\t\t$start_minute=intval(date('i'));\n\n\t\t$end_year=$start_year+1;\n\t\t$end_month=$start_month;\n\t\t$end_day=$start_day;\n\t\t$end_hour=$start_hour;\n\t\t$end_minute=$start_minute;\n\n\t\t$fields->attach(form_input_date(do_lang_tempcode('ST_START_PERIOD'),do_lang_tempcode('ST_START_PERIOD_DESCRIPTION'),'start_date',false,false,true,array($start_minute,$start_hour,$start_month,$start_day,$start_year)));\n\n\t\t$fields->attach(form_input_date(do_lang_tempcode('ST_END_PERIOD'),do_lang_tempcode('ST_END_PERIOD_DESCRIPTION'),'end_date',false,false,true,array($end_minute,$end_hour,$end_month,$end_day,$end_year)));\n\n\t\treturn\tdo_template('FORM_SCREEN',array('SKIP_VALIDATION'=>true,'TITLE'=>$title,'SUBMIT_NAME'=>do_lang_tempcode('EXPORT_ORDER_LIST'),'TEXT'=>paragraph(do_lang_tempcode('EXPORT_ORDER_LIST_TEXT')),'URL'=>build_url(array('page'=>'_SELF','type'=>'_order_export'),'_SELF'),'HIDDEN'=>'','FIELDS'=>$fields));\n\t}", "public function handle(ActionFields $fields, Collection $models)\n {\n $ids = $models->pluck('id');\n $templateProcessor = new \\PhpOffice\\PhpWord\\TemplateProcessor(storage_path('/documents/list.docx'));\n $orders = \\App\\Order::whereIn('id', $ids)->whereIn('status', ['0','1'])->with('products')->get();\n $date = date('Y-m-d-H-i-s');\n $products = [];\n foreach ($orders as $order){\n foreach ($order->products as $product){\n $id = $product->id;\n if (isset($products[$id])){\n $products[$id]['quantity'] += $product->pivot->quantity;\n $products[$id]['total'] += $product->pivot->total; \n $products[$id]['orders'] .= ', #'. $order->id; \n }else{\n $products[$id] = [\n 'product' => $product,\n 'quantity' => $product->pivot->quantity,\n 'total' => $product->pivot->total,\n 'orders' => '#' . $order->id,\n 'cost' => $product->pivot->cost,\n 'discount' => 0\n ];\n }\n }\n }\n $templateProcessor->setValue('date', $date);\n\n $count = count($products);\n $templateProcessor->cloneRow('product_id', $count);\n $overal = 0;\n $i = 1;\n foreach ($products as $id => $item) { \n $templateProcessor->setValue('product_id#' . $i, $item['product']->id);\n $templateProcessor->setValue('product_title#' . $i, $item['product']->title);\n $templateProcessor->setValue('orders#' . $i, $item['orders']);\n $templateProcessor->setValue('quantity#' . $i, $item['quantity']);\n $templateProcessor->setValue('cost#' . $i, $item['cost']);\n $templateProcessor->setValue('discount#' . $i, $item['discount']);\n $templateProcessor->setValue('total#' . $i, $item['total']);\n $templateProcessor->setValue('vendor_market#' . $i, $item['product']->vendor_market);\n $overal += $item['total'];\n $i++;\n }\n $templateProcessor->setValue('overal', $overal);\n $templateProcessor->setValue('total_discount', 0);\n\n $templateProcessor->setValue('tax', 0);\n\n $file = \"{$date}-list.docx\";\n $url = \"/docs/products/\". $file;\n $file_path = \"app/public\" . $url;\n \n $templateProcessor->saveAs(storage_path($file_path));\n return Action::download(url('storage/'.$url), $file);\n }", "public function sendOrder()\n {\n if (Mage::helper('mulberry_warranty')->isActive()) {\n $collection = $this->getOrderCollection('order');\n $collection->setPageSize(20)\n ->setCurPage(1);\n\n Mage::log(\n Mage::helper('mulberry_warranty')->__('Starting SendOrder action processing. There are %1 records that will be processed',\n $collection->getSize())\n );\n\n foreach ($collection as $order) {\n Mage::getModel('mulberry_warranty/queue')->process($order, 'order');\n }\n\n Mage::log('Cronjob SendOrder is finished.');\n }\n }", "public function bulk_delete()\n\t\t{\n\t\t\tglobal $wpdb;\n\n\t\t\t$action = $this->current_action();\n\n\t\t\tif( 'delete' !== $action ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//more\n\t\t}", "protected function process_bulk_action_bulk_drop() {\n\n\t\t\t// Check is there is anything to drop.\n\t\t\tif ( $this->process_bulk_action_check_action(\n\t\t\t\t'bulk-selected',\n\t\t\t\t__( 'Empty bulk selected', 'wp-data-access' )\n\t\t\t) ) {\n\t\t\t\t// Check if drop is allowed.\n\t\t\t\tif ( $this->process_bulk_action_check_wpnonce( 'wpda-drop-*', '_wpnonce3' ) ) {\n\t\t\t\t\t$bulk_tabs = isset( $_REQUEST['bulk-selected'] ) ? $_REQUEST['bulk-selected'] : ''; // input var okay; sanitization okay.\n\t\t\t\t\tforeach ( $bulk_tabs as $table_name ) {\n\t\t\t\t\t\t// Drop table is not allowed for WordPress tables (double check).\n\t\t\t\t\t\t$drop_table_name = sanitize_text_field( wp_unslash( $table_name ) ); // input var okay.\n\t\t\t\t\t\t$err_txt = ' ' . sprintf( __( '[cannot drop WordPress table `%s`]', 'wp-data-access' ), $drop_table_name );\n\t\t\t\t\t\tif ( $this->process_bulk_action_check_is_wp_table( $drop_table_name, $err_txt ) ) {\n\t\t\t\t\t\t\t// Check if table exists.\n\t\t\t\t\t\t\t$err_txt = ' ' . sprintf( __( '[table `%s`]', 'wp-data-access' ), $drop_table_name );\n\t\t\t\t\t\t\tif ( $this->process_bulk_action_check_table_exists( $drop_table_name, $err_txt ) ) {\n\t\t\t\t\t\t\t\t$dbo_type = $this->get_dbo_type( $drop_table_name );\n\t\t\t\t\t\t\t\tif ( false === $dbo_type || 'SYSTEM VIEW' === $dbo_type ) {\n\t\t\t\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t'message_text' => sprintf( __( 'Cannot drop `%s`', 'wp-data-access' ), $drop_table_name ),\n\t\t\t\t\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t\t\t\t\t'message_is_dismissible' => false,\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\t$msg->box();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif ( 'VIEW' === $dbo_type ) {\n\t\t\t\t\t\t\t\t\t\t// Drop view.\n\t\t\t\t\t\t\t\t\t\tif ( $this->drop_view( $drop_table_name ) ) {\n\t\t\t\t\t\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t'message_text' => sprintf( __( 'View `%s` dropped', 'wp-data-access' ), $drop_table_name ),\n\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t$msg->box();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// Drop table.\n\t\t\t\t\t\t\t\t\t\tif ( $this->drop_table( $drop_table_name ) ) {\n\t\t\t\t\t\t\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t'message_text' => sprintf( __( 'Table `%s` dropped', 'wp-data-access' ), $drop_table_name ),\n\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t$msg->box();\n\n\t\t\t\t\t\t\t\t\t\t\t$this->post_drop_table( $drop_table_name );\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "protected function processActionsGrid(): void\n\t{\n\t\t$request = Context::getCurrent()->getRequest();\n\t\t$request->addFilter(new PostDecodeFilter);\n\n\t\t$actionName = 'action_button_' . $this->getGridProvider()->getId();\n\t\t$action = $request->getPost($actionName);\n\n\t\tif (isset($action))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$result = $this->processActionGrid($action, $request);\n\t\t\t\tif (isset($result) && !$result->isSuccess())\n\t\t\t\t{\n\t\t\t\t\t$this->sendErrorsResponse(\n\t\t\t\t\t\t$result->getErrorMessages()\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (AccessDeniedException $e)\n\t\t\t{\n\t\t\t\t$this->sendErrorsResponse([\n\t\t\t\t\tLoc::getMessage('IBLOCK_GRID_COMPONENT_ERROR_ACCESS_DENIED')\n\t\t\t\t]);\n\t\t\t}\n\t\t\tcatch (Throwable $e)\n\t\t\t{\n\t\t\t\t$this->sendErrorsResponse([\n\t\t\t\t\t$e->getMessage()\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "function jd_bulk_actions ( $actions ) {\n\n\t$actions['Duplicate'] = __('Duplicate', 'duplicate');\n\treturn $actions;\n\n}" ]
[ "0.8092855", "0.7940028", "0.7134971", "0.7056157", "0.69827443", "0.69605154", "0.68935674", "0.68538636", "0.67978716", "0.6694628", "0.6659671", "0.664118", "0.66050214", "0.6580459", "0.65199286", "0.6503217", "0.64940876", "0.6468511", "0.64237475", "0.64237475", "0.6394938", "0.63947266", "0.63470733", "0.6329406", "0.63279545", "0.61452633", "0.6135237", "0.612839", "0.608843", "0.6066835", "0.6066835", "0.6066835", "0.6066835", "0.6066835", "0.60051763", "0.60048515", "0.5997392", "0.5989385", "0.5927931", "0.59117484", "0.58991003", "0.58844614", "0.5881276", "0.58746225", "0.58573526", "0.58534247", "0.58385044", "0.58352745", "0.5830465", "0.5823905", "0.5820073", "0.57923657", "0.577228", "0.57633203", "0.57558817", "0.57531595", "0.57352895", "0.5726875", "0.57129586", "0.56668943", "0.56622326", "0.5656321", "0.5652697", "0.5628461", "0.5615738", "0.5611667", "0.5608534", "0.55979395", "0.5593514", "0.55594784", "0.55450773", "0.55019146", "0.5496468", "0.5493545", "0.54931825", "0.5491893", "0.5474236", "0.5473877", "0.54545015", "0.54473776", "0.5442402", "0.5424137", "0.54201114", "0.5406109", "0.5400061", "0.5383283", "0.53776467", "0.5373068", "0.53703296", "0.53592616", "0.5357802", "0.53547364", "0.53519136", "0.5350735", "0.53483856", "0.5338374", "0.53369707", "0.5321307", "0.53165746", "0.5312601" ]
0.8496925
0
woocommerce_pip_send_email function. Function to send invoice as email
Функция woocommerce_pip_send_email. Функция для отправки счета по электронной почте
function woocommerce_pip_send_email( $order_id ) { if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { // Build email information $order = new WC_Order( $order_id ); $to = $order->billing_email; $subject = __( 'Order invoice', 'woocommerce-pip' ); $subject = '[' . get_bloginfo('name') . '] ' . $subject; $attachments = ''; // Read the file ob_start(); require_once woocommerce_pip_template( 'dir', 'email-template.php' ) . 'email-template.php'; $message = ob_get_clean(); // Send the mail wc_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendinvoice($orderid) {\n $email = new WC_Email_Customer_Invoice();\n $email->trigger($orderid);\n}", "function send_customer_invoice($request) { #API\r\n if(!validate_request($request)) {\r\n return invalid_request_response();\r\n }\r\n \r\n if(!isset($request['orderid']))\r\n return \"ERROR: Missing email\";\r\n\r\n $order = wc_get_order(absint($request['orderid']));\r\n if(!$order) \r\n return \"ERROR: Couldn't find order '\".$request['orderid'].\"'\";\r\n\r\n $wc = WC();\r\n if(!$wc) return \"ERROR: Couldn't get WC?\";\r\n $mailer = $wc->mailer();\r\n if(!$mailer) return \"ERROR: Couldn't get mailer?\";\r\n $mailer->customer_invoice($order);\r\n\r\n return \"Probably OK\";\r\n}", "public function sendInvoiceEmail(Email $email, Invoice $invoice){\n }", "public function sendEmail()\n {\n $mail = new Mail;\n $order = $this->order->getByName($_POST['label']);\n \n $subject = 'mshaian.com Purchase';\n \n $message = '<h3>Operation: ' . $_POST['operation_id'] . '</h3>';\n $message .= '<p>Thanks for purchasing ' . $_POST['label']\n . ' The ordered file is attached to this message.</p>';\n $message .= '<p>If you have any questions, '\n . 'use the contact form on our website: '\n . '<a href=\"https://mshaian.com\">mshaian.com</a></p>';\n \n $service_message = 'Purchase: ' . $_POST['label'] . '<br>';\n $service_message .= 'Amount: ' . $_POST['amount'] . '<br>';\n $service_message .= 'Email: ' . $_POST['email'] . '<br>';\n $service_message .= 'Operation ID: ' . $_POST['operation_id'] . '<br>';\n \n $email = $_POST['email'];\n \n $attachment = 'products/'.$order['product_id'].'/'.$order['file_link'];\n \n $mail->sendEmail($subject, $message, $email, $attachment);\n $mail->sendNotification($service_message);\n \n }", "public function invoice($first_name, $last_name, $email, $shipping_amount, $prorow, $order_no, $payment_status, $total,$address_1,$address_2,$pincode,$city,$state,$pay_mode,$discount)\n {\n $amount_paid = $total+$shipping_amount;\n $tablehead = '<table border=\"1\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Product Name</th>\n\t\t\t<th>Product Quantity</th>\n\t\t\t<th>Gross Amount</th>\n\t\t\t<th>Product Color</th>\n\t\t\t<th>Product Size</th>\n <th>Product Discount</th>\n <th>Total Amount</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>';\n $tbalefooter = '</tbody>\n\t<tfoot>\n \n\t\t<tr>\n\t\t\t<td colspan=\"6\">Shipping Charge:-</td>\n\t\t\t<td>'.$shipping_amount.'</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"6\">Amount to paid:-</td>\n\t\t\t<td>'.$amount_paid.'</td>\n\t\t</tr>\n\t</tfoot>\n</table>';\n $prorows = $tablehead.implode('<br/>', $prorow).$tbalefooter;\n \n //echo $prorows;\n //pr($prorow);\n //exit;\n $from = \"info@pepealoans.com\";\n $to = $email;\n $email_template = EmailTemplate::where('slug', '=', 'order-invoice')->first();\n $email_type = $email_template->email_type;\n $subject = $email_template->subject;\n $body = $email_template->body;\n $to = $email;\n \n $body = str_replace(array(\n '{FIRST_NAME}',\n '{LAST_NAME}',\n '{SHIPPING_CHARGE}',\n '{PRO_ROWS}',\n '{ORDER_NO}',\n '{TOTAL}',\n '{PAYMENT_MOD}',\n '{PAYMENT_STATUS}',\n '{ADDRESS}',\n '{PINCODE}',\n '{CITY}',\n '{STATE}',\n ), array(\n ucfirst($first_name),\n ucfirst($last_name),\n $shipping_amount,\n $prorows,\n $order_no,\n $total,\n $pay_mode,\n $payment_status,\n $address_1.', '.$address_2,\n $pincode,\n $city,\n $state\n ), $body);\n $subject = str_replace(array(\n '{FIRST_NAME}',\n '{LAST_NAME}',\n '{SHIPPING_CHARGE}',\n '{PRO_ROWS}',\n '{ORDER_NO}',\n '{TOTAL}',\n '{PAYMENT_MOD}',\n '{PAYMENT_STATUS}',\n '{ADDRESS}',\n '{PINCODE}',\n '{CITY}',\n '{STATE}',\n ), array(\n ucfirst($first_name),\n ucfirst($last_name),\n $shipping_amount,\n $prorows,\n $order_no,\n $total,\n $pay_mode,\n $payment_status,\n $address_1.', '.$address_2,\n $pincode,\n $city,\n $state\n ), $subject);\n//pr($body);exit;\n EmailHelper::sendMail($to, $from, '', $subject, 'default', $body, $email_type);\n}", "public function sendInvoiceViaEmail(Request $request){\n $invoice = Invoice::where('id', $request->id)->where('tenant_id', Auth::user()->tenant_id)->first();\n //$client = Client::where('client_id', $invoice->client_id)->where('tenant_id', Auth::user()->tenant_id)->first();\n \\Mail::to($invoice->client->email)->send(new SendInvoice($invoice));\n #Register log\n $log = new ClientLog;\n $log->tenant_id = Auth::user()->tenant_id;\n $log->client_id = $invoice->client_id;\n $log->user_id = Auth::user()->id;\n $log->log = Auth::user()->first_name.' '.Auth::user()->surname.' sent invoice('.$invoice->invoice_no.\") via mail.\";\n $log->save();\n return response()->json(['message'=>'Sent!']);\n }", "Public function sendinvmail (Request $request)\n {\n $e = $request->invoice_id;\n $email = $request->email;\n\n $com_info = DB::table('company_info')->first();\n \n $inv = DB::table('invoices')\n ->leftJoin('customers', 'invoices.cust_id', '=', 'customers.cust_id')\n ->where('invoices.invoice_id', $e)\n ->first();\n \n $inv_name = DB::table('inv_settings')->first();\n \n $in_pay_s = DB::table('inv_payment_details')->where('inv_id', $e)->sum('amount');\n \n $sum_total = ($inv->final_total - $in_pay_s);\n \n\n // $email = 'fahadamin@outlook.com';\n \n $title = 'Invoice '.$inv_name->inv_name.$inv->invoice_code.' from '.$com_info->display_name.' for '.$inv->display_name;\n \n // $d['top'] = '<img src=\"'.asset($com_info->com_logo).'\">';\n \n $d['first_chp'] = 'Here\\'s invoice '.$inv_name->inv_name.$inv->invoice_code.' For '.$inv->final_total.'.';\n \n $d['second_chp'] = 'The amount outstanding of '.$sum_total.' is due on'.$inv->due_date.'.';\n \n $d['third_chp'] = 'View your bill online: http://cubeapps.co.za/cubebooks/view-invoice/1';\n \n $d['fourth_chp'] = 'Form your online bill can print a PDF, or create a free login and view your outstanding bills.';\n \n $d['fifth_chp'] = 'If you have any questions, please let us know.';\n \n $d['six_chp'] = 'Thanks,';\n $d['sev_chp'] = $com_info->display_name;\n \n $message = \"Hi,\\r\\n \\r\\n\".$d['first_chp'].\"\\r\\n \\r\\n\".$d['second_chp'].\"\\r\\n \\r\\n\".$d['third_chp'].\"\\r\\n \\r\\n\".$d['fourth_chp'].\"\\r\\n \\r\\n\".$d['fifth_chp'].\"\\r\\n \\r\\n\".$d['six_chp'].\"\\r\\n\".$d['sev_chp'];\n\n // mail($email,$title,$message);\n\n // $data = array(\n // 'name' => 'Fahad Amin',\n // 'message' => 'Fahad Amin'\n // );\n\n // Mail::to('fahadamin@outlook.com')->send(new SendMail($data));\n\n\n //********************************* Send Mail Start *********************************//\n \n $company_info = DB::table('company_info')->where('user_id', Auth::user()->id)->first();\n\n $d['attachment'] = '';\n\n $flname = '';\n\n \n $to = $email; \n $from = $company_info->com_email;\n $fromName = $company_info->display_name; \n $msg = $message;\n $subject = $title;\n \n \n if(isset($d['attachment']) and $d['attachment'] != ''){\n \n $fileatt = $flname; \n $fileatt_type = \"application/pdf\"; \n \n $file_name_array = explode('/',$fileatt);\n \n $fileatt_name = $file_name_array[count($file_name_array)-1];\n \n $email_from = $company_info->display_name; \n \n \n $email_subject = $title; \n \n \n $email_message = '<html> \n <head> \n <title>'.$title.'</title> \n </head> \n <body> \n '.$msg.'\n </body> \n </html>'; \n \n $email_to = $email;\n \n $headers = \"From: \".$email_from;\n \n //no need to change anything else under this point\n \n $file = fopen($fileatt,'rb'); \n $data = fread($file,filesize($fileatt)); \n fclose($file); \n \n $semi_rand = md5(time()); \n $mime_boundary = \"==Multipart_Boundary_x{$semi_rand}x\"; \n \n $headers .= \"\\nMIME-Version: 1.0\\n\" . \n \"Content-Type: multipart/mixed;\\n\" . \n \" boundary=\\\"{$mime_boundary}\\\"\"; \n \n $email_message .= \"This is a multi-part message in MIME format.\\n\\n\" . \n \"--{$mime_boundary}\\n\" . \n \"Content-Type:text/html; charset=\\\"utf-8\\\"\\n\" . \n \"Content-Transfer-Encoding: 7bit\\n\\n\" . \n $email_message .= \"\\n\\n\"; \n \n $data = chunk_split(base64_encode($data)); \n \n $email_message .= \"--{$mime_boundary}\\n\" . \n \"Content-Type: {$fileatt_type};\\n\" . \n \" name=\\\"{$fileatt_name}\\\"\\n\" . \n //\"Content-Disposition: attachment;\\n\" . \n //\" filename=\\\"{$fileatt_name}\\\"\\n\" . \n \"Content-Transfer-Encoding: base64\\n\\n\" . \n $data .= \"\\n\\n\" . \n \"--{$mime_boundary}--\\n\"; \n \n @mail($email_to, $email_subject, $email_message, $headers); \n \n }else {\n \n \n $htmlContent = ' \n <html> \n <head> \n <title>'.$company_info->display_name.'</title> \n </head> \n <body> \n '.$message.'\n </body> \n </html>'; \n \n // Set content-type header for sending HTML email \n \n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\"; \n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\"; \n \n // Additional headers \n $headers .= 'From: '.$fromName.'<'.$from.'>' . \"\\r\\n\"; \n // $headers .= 'Cc: welcome@example.com' . \"\\r\\n\"; \n // $headers .= 'Bcc: welcome2@example.com' . \"\\r\\n\"; \n \n // Send email \n // if(){ \n // echo 'Email has sent successfully.'; \n // }else{ \n // echo 'Email sending failed.'; \n // }\n \n // dd($msg);\n \n mail($to, $subject, $htmlContent, $headers);\n \n }\n \n //********************************* Send Mail End **********************************//\n\n echo \"1\";\n // echo $e;\n }", "public function sendEmail()\n {\n $customer_email = Tools::getValue('email');\n $code = Tools::getValue('code');\n $slice_no = Tools::getValue('slice_no');\n $spin_wheel = array();\n $sql = 'select slice_type, slice_label, coupon_value, coupon_type from ' . _DB_PREFIX_ . 'wheel_slices where slice_no=' . pSQL($slice_no);\n $query = db::getInstance()->getRow($sql);\n $spin_wheel['type'] = $query['slice_type'];\n $spin_wheel['label'] = $query['slice_label'];\n $spin_wheel['coupon_value'] = $query['coupon_value'];\n $spin_wheel['coupon_type'] = $query['coupon_type'];\n if ($spin_wheel['coupon_type'] == 'Fixed') {\n $coupon_value = $spin_wheel['coupon_value'];\n $mail_coupon_value = Tools::displayPrice($coupon_value);\n } else {\n $mail_coupon_value = $spin_wheel['coupon_value'] . '%';\n }\n\n if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {\n $custom_ssl_var = 1;\n }\n\n if ((bool) Configuration::get('PS_SSL_ENABLED') && $custom_ssl_var == 1) {\n $ps_base_url = _PS_BASE_URL_SSL_;\n } else {\n $ps_base_url = _PS_BASE_URL_;\n }\n\n $template_vars = array(\n '{amount}' => $mail_coupon_value,\n '{coupon_code}' => $code\n );\n $select_customer_info = 'select firstname, lastname from ' . _DB_PREFIX_ . 'customer\n\t\t\twhere email=\"' . pSQL($customer_email) . '\"\n\t\t\tand id_lang=' . (int) $this->context->language->id . ' and id_shop=' . (int) $this->context->shop->id;\n $customer_info = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($select_customer_info);\n $customer_name = $customer_info['firstname'] . ' ' . $customer_info['lastname'];\n if (empty($customer_name)) {\n $customer_name = 'Guest';\n }\n $spin_wheel_settings = unserialize(Configuration::get('SPIN_WHEEL'));\n $email_template = $spin_wheel_settings['email_templates'];\n $query = 'SELECT * FROM ' . _DB_PREFIX_ . 'wheel_email WHERE template_name =\"' . pSQL($email_template) . '\" AND '\n . 'id_lang=\"' . (int) $this->context->language->id . '\" AND id_shop=\"' . (int) $this->context->shop->id . '\"';\n $email_data = Db::getInstance()->getRow($query);\n $email_subject = $email_data['subject'];\n\n $is_mail_send = Mail::Send(\n $this->context->language->id,\n $email_template,\n Tools::htmlentitiesDecodeUTF8($email_subject),\n $template_vars,\n $customer_email,\n $customer_name,\n Configuration::get('PS_SHOP_EMAIL'),\n Configuration::get('PS_SHOP_NAME'),\n null,\n null,\n _PS_MODULE_DIR_ . 'spinwheel/mails/',\n false,\n $this->context->shop->id\n );\n return $is_mail_send;\n }", "public function sendPurchaseOrderEmail()\n\t\t{\n\t\t\t$this->subject = \"An order is being processed on the website\";\n\t\t\t$body = \"<table width='100%'>\";\n\t\t\t$body .= \"<tr>\";\n\t\t\t$body .= \"<th bgColor='#8f7a63' colspan='3'>\";\n\t\t\t$body .= \"<center><img src='http://www.sinsationalsmile.com/img/inquiry-header.png' width='100%'></center>\";\n\t\t\t$body .= \"</th>\";\n\t\t\t$body .= \"</tr>\";\n\n\t\t\t$body .= \"<tr>\";\n\t\t\t$body .= \"<td colspan='3'>Below are the details associated with an order being processed through the Sinsational Smile Website. You will receive \";\n\t\t\t$body .= \"notification from Paypal pertaining to this order as well.\\n\\n</td>\";\n\t\t\t$body .= \"</tr>\";\n\t\t\t$body .= \"<tr>\";\n\t\t\t$body .= \"<table border='1' bordercolor='#000000' width='100%'>\";\n\t\t\t$body .= \"<tr>\";\n\t\t\t$body .= \"<th colspan='1'><strong>Qty.</strong></th><th colspan='1'><strong>Product Name</strong></th><th colspan='1'><strong>Price</strong></th>\";\n\t\t\t$body .= \"</th>\";\n\t\t\t$body .= \"</tr>\";\n\t\t\tforeach($_SESSION[PUBLIC_SITE]['cart'] as $key => $value)\n\t\t\t\t$body .= \"<tr><td colspan='1'>{$value['qty']}</td><td colspan='1'>{$value['name']}</td><td colspan='1'>{$value['price']}</td>\";\n\t\t\t$body .= \"</table>\";\n\t\t\t$body .= \"<tr><td colspan='3' width='100%'><center><img src='http://www.sinsationalsmile.com/img/inquiry-footer.png' width='100%'></center>\";\n\t\t\t$body .= \"<center>Copyright &copy; Sinsational Smile \".date('Y').\". All Rights Reserved.</center></td></tr></table>\";\n\t\t\t// var_dump($body);\n\n\t\t\t$this->content = new SendGrid\\Content(\"text/html\", $body);\n\t\t\t$this->mail = new SendGrid\\Mail($this->emailFrom, $this->subject, $this->emailTo, $this->content);\t\t\t\n\t\t\t$this->resp = $this->sg->client->mail()->send()->post($this->mail);\n\t\t}", "function send_invoice_mail($member_id,$id)\n{\n\t// Send out notification\n\trequire_code('notifications');\n\t$_url=build_url(array('page'=>'invoices','type'=>'misc'),get_module_zone('invoices'),NULL,false,false,true);\n\t$url=$_url->evaluate();\n\tdispatch_notification('invoice',NULL,do_lang('INVOICE_SUBJECT',strval($id),NULL,NULL,get_lang($member_id)),do_lang('INVOICE_MESSAGE',$url,get_site_name(),NULL,get_lang($member_id)),array($member_id));\n}", "function email(){\n //\n //Get the emailer\n $emailer = $this->invoice->emailer;\n //\n //Initialize the address list\n $emailer->ClearAddresses();\n //\n //The email is sent to the client's email address. This means that the \n //record's driver data must return an email.\n $address = $this->result['email'];\n $emailer->addAddress($address);\n //\n //The subject is invoice/statement for the current period -- the same bit\n //that appears in the invoice header\n $ref = [];\n $emailer->Subject = $this->try_ref($ref) \n ? $ref['type'].\" \".$ref['code']\n :\"No posted data found\";\n //\n //The message comes from the display of the record. Collect the message\n //data\n //\n //Start output buffering\n ob_start();\n //\n //Display the invoice\n $this->display();\n //\n //Get the output and stop buffering\n $info = ob_get_clean();\n //\n //Compile the message as a complete HTML report\n $message = \"\n <html>\n <head>\n <style>\"\n //\n //The style comes from the mutall_rental.css. This is a shared\n //resource, \n . file_get_contents($this->invoice->get_cssfile())\n //\n .\"</style>\n </head>\n <body>\n $info\n </body>\n </html>\n \";\n //\n //Initialize the message body by converting the given html into plain text \n //alternative body and referenced images to embedded versions. The \n //base directory used for resolving relative paths to images is...\n $emailer->msgHTML($message, $this->invoice->basedir);\n //\n //\n //send the message, check for errors\n if (!$emailer->send()) {\n echo \"Mailer Error: \" . $emailer->ErrorInfo;\n } else {\n echo \"$emailer->Subject sent to $address<br/>\";\n }\n }", "public function sendMailEReceipt($email, $NAMA, $SHIPPING_CODE, $STR_NAMA_PENGIRIM, $STR_NO_TELP_PENGIRIM, \n $STR_ALAMAT_PENGIRIM, $STR_NAMA_PENERIMA, $STR_NO_TELP_PENERIMA, $STR_ALAMAT_PENERIMA, \n $STR_JUMLAH_HARGA, $STR_ASURANSI, $STR_TOTAL_HARGA){\n $receivers = [TIPSMailChimp::create_email_receiver($email, $NAMA)];\n TIPSMailChimp::send_chimp(\n \"TIPS: e-Receipt $SHIPPING_CODE\",\n TIPSMailChimp::$TMP_RECEIPT,\n [\n TIPSMailChimp::create_template_data('STR_NAMA', $NAMA),\n\n TIPSMailChimp::create_template_data('STR_NAMA_PENGIRIM', $STR_NAMA_PENGIRIM),\n TIPSMailChimp::create_template_data('STR_NO_TELP_PENGIRIM', $STR_NO_TELP_PENGIRIM),\n TIPSMailChimp::create_template_data('STR_ALAMAT_PENGIRIM', $STR_ALAMAT_PENGIRIM),\n\n TIPSMailChimp::create_template_data('STR_NAMA_PENERIMA', $STR_NAMA_PENERIMA),\n TIPSMailChimp::create_template_data('STR_NO_TELP_PENERIMA', $STR_NO_TELP_PENERIMA),\n TIPSMailChimp::create_template_data('STR_ALAMAT_PENERIMA', $STR_ALAMAT_PENERIMA),\n\n TIPSMailChimp::create_template_data('STR_JUMLAH_HARGA', $STR_JUMLAH_HARGA),\n TIPSMailChimp::create_template_data('STR_ASURANSI', $STR_ASURANSI),\n TIPSMailChimp::create_template_data('STR_TOTAL_HARGA', $STR_TOTAL_HARGA),\n ],\n $receivers\n );\n // exec(\"sh send_post.sh 'http://127.0.0.1/api/send_email' 'type' 'kirim' 'code' '8' 'email' '$email' 'NAMA' '$NAMA' 'SHIPPING_CODE' '$SHIPPING_CODE' 'RECIPIENT_NAME' '$RECIPIENT_NAME' >> /var/www/html/tips/zz/logcurlx.txt > /dev/null 2>&1 &\");\n }", "public function sendMailToClient($invoice_id)\n\t{\n\t\t// get instance of front end email view\n\t\t$email_controller \t= PayInvoiceFactory::getInstance('email', 'controller', 'PayInvoicesite');\n\t\t$email_view \t\t= $email_controller->getView();\n\t\t\n\t\t$rb_invoice = $this->get_rb_invoice($invoice_id);\n\t\t\n\t\t$email_view->assign('rb_invoice', \t$rb_invoice);\n\t\t$email_view->assign('invoice', \t\tPayInvoiceInvoice::getInstance($invoice_id)->toArray());\n\t\t$email_view->assign('status_list', \tPayInvoiceInvoice::getStatusList());\n\t\t$email_view->assign('config_data', \tPayInvoiceFactory::getHelper('config')->get());\n\t\t$email_view->assign('buyer', \t\tPayInvoiceFactory::getHelper('buyer')->get($rb_invoice['buyer_id']));\n\t\t\n\t\t//XITODO : Currency Symbol not shown in email template\t\n\t\t//$currency = $this->getHelper('format')->getCurrency($rb_invoice['currency'], 'symbol');\n\t\t//$email_view->assign('currency', $currency);\n\t\t\n\t\t$email_view->assign('tax', \t\t\t$this->get_tax($rb_invoice['invoice_id']));\n\t\t$email_view->assign('discount', \t$this->get_discount($rb_invoice['invoice_id']));\n\t\t$email_view->assign('subtotal', \t$this->get_subtotal($rb_invoice['invoice_id']));\n\t\t\n // md5 key generated for authentication\t\t\n\t\t$key\t= md5($rb_invoice['created_date']);\n\t\t$url\t= JUri::root().'index.php?option=com_payinvoice&view=invoice&invoice_id='.$invoice_id.'&key='.$key;\n\t\t$email_view->assign('pay_url', $url);\n\t\t\n\t\t// email content\n\t\t$body \t = $email_view->loadTemplate('invoice');\n\t\t$subject = JText::_('COM_PAYINVOICE_INVOICE_SEND_EMAIL_SUBJECT');\n\t\t$user \t = PayInvoiceFactory::getUser($rb_invoice['buyer_id']);\t\t\n\t\t\n\t\t// attach Pdf Invoice with email\t\t\n\t\t$args\t\t\t= array($rb_invoice['object_id'], &$user->email, &$subject, &$body, &$attachment);\n\t\tRb_HelperPlugin::trigger('onPayInvoiceEmailBeforSend', $args, '' ,$this);\n\n\t\t$result = PayInvoiceFactory::getHelper('utils')->sendEmail($user->email, $subject, $body, $attachment);\n\t\t$msg = JText::_('COM_PAYINVOICE_INVOICE_EMAIL_SENT');\n\t\t$sentEmail\t= true;\n\t\tif(!$result){\n\t\t\t$msg = JText::_('COM_PAYINVOICE_INVOICE_ERROR_SEND_ERROR');\t\n\t\t\t$sentEmail\t= false;\t\t\t\t\t\n\t\t}\n\t\telseif($result instanceof Exception){\n\t\t\t$msg = JText::_('COM_PAYINVOICE_INVOICE_ERROR_SEND_ERROR');\n\t\t\t$msg .= \"<br/><div class='alert alert-error'>\".$result->getMessage().\"</div>\";\n\t\t\t$sentEmail\t= false;\n\t\t}\n\t\t\n\t\t// Save parameter to ensure email being sent or not\n\t\t$invoice = PayInvoiceInvoice::getInstance($invoice_id);\n\t\t$invoice->setParam('emailSent' , $sentEmail);\n\t\t$invoice->save();\n\t\t\n\t\t$mail_status = array('sentEmail' => $sentEmail , 'msg' => $msg);\n\t\treturn $mail_status;\n\t}", "public function sendOrderConfirmationEmail() {\n\n // prepare confirmation email data\n $httpHost = t3lib_div::getIndpEnv('HTTP_HOST'); // this is empty in CLI mode\n $orderHost = (!empty($httpHost) ? $httpHost : $this->gsaShopConfig['shopName']);\n $mailRecipient = $this->orderWrapperObj->get_feCustomerObj()->get_feUserObj()->get_email1();\n $mailSubject = sprintf(tx_pttools_div::getLLL(__CLASS__.'.orderEmailSubject', $this->llArray), $orderHost);\n \n // prepare email body\n $orderPresentatorObj = new tx_ptgsashop_orderPresentator($this->orderWrapperObj->get_orderObj());\n $mailBody = $orderPresentatorObj->getPlaintextPresentation($this->gsaShopConfig['templateFileFinalOrderMail'], $this->orderWrapperObj->get_relatedDocNo()); // get final order as plaintext\n if (is_int(stripos($mailBody, 'Smarty error'))) {\n throw new tx_pttools_exception('Error in smarty template'); // recognize error in mail body\n }\n #die('<pre>'.$mailBody.'</pre>'); // for development only: display mail body and die (outcomment this line in production environment!!)\n\n // prepare mail object\n $mail = new tx_ptmail_mail($this, 'orderConfirmation'); \n $mail->set_subject($mailSubject); \n $mail->set_body($mailBody);\n $mail->set_to(new tx_ptmail_addressCollection(new tx_ptmail_address($mailRecipient))); \n \n // additional email configuration (from, cc, bcc, reply-to) is done via typoscript, basic config see pt_gsashop/static/pt_mail_config/setup.txt\n /*\n $mailSender = (!empty($this->gsaShopConfig['orderEmailSender']) ? $this->gsaShopConfig['orderEmailSender'] : $this->extKey.'@'.$orderHost); \n $mail->set_from(new tx_ptmail_address($mailSender));\n if (!empty($this->gsaShopConfig['orderEmailRecipient'])) {\n $mail->set_cc(new tx_ptmail_addressCollection(new tx_ptmail_address($this->gsaShopConfig['orderEmailRecipient'])));\n }\n if (!empty($this->gsaShopConfig['orderConfirmationEmailBcc'])) {\n $mail->set_bcc(new tx_ptmail_addressCollection(new tx_ptmail_address($this->gsaShopConfig['orderConfirmationEmailBcc'])));\n }\n if (!empty($this->gsaShopConfig['orderConfirmationEmailReplyTo'])) {\n $mail->set_reply(new tx_ptmail_address($this->gsaShopConfig['orderConfirmationEmailReplyTo']));\n }\n */\n \n // TODO: charsets? language?\n \n // send mail\n $result = $mail->sendMail();\n tx_pttools_assert::isTrue($result, array('message' => 'Error while sending the order confirmation email!'));\n \n }", "function rdm_notify_supplier($ID, $post ) { \n \n $user_email_address = $_POST['rdm_supplier_email'];\n \n // Purchase author\n $author = $post->post_author; /* Post author ID. */\n \n $title = $post->post_title;\n $permalink = get_permalink( $ID );\n $content = $post->post_content;\n $edit = get_edit_post_link( $ID, '' );\n \n // separate the users array \n $send_to = $user_email_address;\n\n $subject = sprintf( 'RDM GREGG New Purchase order: %s'. $title );\n $message = sprintf ('Hi There, this is RDM Gregg Purchases department, please find attached our %s order “%s”' . \"\\n\\n\" . $title, $content );\n $message .= sprintf( 'View: %s', $permalink );\n // create the from details \n $headers[] = 'From: RDM <info@rdmgregg.co.uk>';\n // lets cc in the head just because we can \n $headers[] = '';\n\n // The data of the purchase/pdf are stored on DB and are base64 encoded\n // So just get that data from DB , decode it using base64 , and you have the purchase data \n\n // Add attachments to wp_mail from codex\n // $attachments = array( WP_CONTENT_DIR . '/uploads/file_to_attach.zip' ); \n\n\n\n wp_mail($send_to, $subject, $message, $headers, $attachments );\n return $post_ID;\n}", "public function SendInvoice($email)\n\t{\n\t\tif(isset($_SERVER['HTTP_REFERER']))\n\t\t{\n\t\t\t/* Check word paypal must exists */\n\t\t\tif(strpos($_SERVER['HTTP_REFERER'], 'paypal'))\n\t\t\t{\n\t\t\t\t/* if set payper email address index */\n\t\t\t\tif(isset($_POST[$email]))\n\t\t\t\t{\n\t\t\t\t\t/* Set every details to for pdf file */\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* We need php mailer class to send the email with attachment */\n\t\t\n\t}", "public function sendReceiptEmail($args)\n\t\t{\n\t\t\t$name = $args[\"fName\"]. \" \".$args[\"lName\"];\n\t\t\t$emailTo = new SendGrid\\Email($name, $args['email']);\n\t\t\t$this->subject = \"Your inquiry for Sinsational Smile has been received \";\n\t\t\t$body = \"<table width='100%'>\";\n\t\t\t$body .= \"<tr>\";\n\t\t\t$body .= \"<th bgColor='#8f7a63' colspan='3'>\";\n\t\t\t$body .= \"<center><img src='http://www.sinsationalsmile.com/img/inquiry-header.png' width='100%'></center>\";\n\t\t\t$body .= \"</th>\";\n\t\t\t$body .= \"</tr>\";\n\t\t\t$body .= \"<tr>\";\n\t\t\t$body .= \"<td colspan='1' width='10%'>&nbsp;</td>\";\n\t\t\t$body .= \"<td colspan='1' padding-left='10%' padding-right='10%'>\";\n\t\t\t$body .= \"<center><h1>Your inquiry to Sinsational Smile<sup><font size='2pt'>&copy;</font></sup> has been received!</h1></center>\";\n\t\t\t$body .= \"<hr>\";\n\t\t\t$body .= \"<p>We would like to thank you for taking the time to reach out to us and to let you know we will be in touch shortly.</p>\";\n\t\t\t$body .= \"<p>For the time being, please don't hesitate to continue browsing our website at <a href='http://www.sinsationalsmile.com'>www.sinsationalsmile.com</a></p>\";\n\t\t\t$body .= \"<p>Thanks again!</p>\";\n\t\t\t$body .= \"<p>Sincerely,</p>\";\n\t\t\t$body .= \"<p>Sinsational Smile&copy;</p>\";\n\t\t\t$body .= \"</td><td colspan='1' width='10%'>&nbsp;</td></tr>\";\n\t\t\t$body .= \"<tr><td colspan='3' width='100%'><center><img src='http://www.sinsationalsmile.com/img/inquiry-footer.png' width='100%'></center>\";\n\t\t\t$body .= \"<center>Copyright &copy; Sinsational Smile \".date('Y').\". All Rights Reserved.</center></td></tr></table>\";\n\n\t\t\t$this->content = new SendGrid\\Content(\"text/html\", $body);\n\t\t\t$this->mail = new SendGrid\\Mail($this->emailFrom, $this->subject, $emailTo, $this->content);\t\t\t\n\t\t\t$this->resp = $this->sg->client->mail()->send()->post($this->mail);\n\t\t}", "public function sendEmailToCustomer() {\n\n if($this->state == 0) {\n //Send Email\n $template = new \\Template();\n $mail = new PHPMailer(true);\n\n $template->assign(\"orderID\", $this->orderID);\n switch ($this->payment) {\n case 0:\n $template->assign(\"displayBar\", \"\");\n $template->assign(\"displayPaypal\", \"display: none;\");\n $template->assign(\"displayUberweisung\", \"display: none;\");\n break;\n case 1:\n $template->assign(\"displayBar\", \"display: none;\");\n $template->assign(\"displayPaypal\", \"display: none;\");\n $template->assign(\"displayUberweisung\", \"\");\n break;\n case 2:\n $template->assign(\"displayBar\", \"display: none;\");\n $template->assign(\"displayPaypal\", \"\");\n $template->assign(\"displayUberweisung\", \"display: none;\");\n break;\n }\n //$template->assign(\"displayPaypal\", \"\");\n //$template->assign(\"displayUberweisung\", \"\");\n //$template->assign(\"displayBar\", \"\");\n\n $mail->setFrom(\"noreply@shop.rheinhessenriders.tk\", \"RheinhessenRiders Shop\");\n $mail->addAddress($this->customer->getEmail(), $this->customer->getFirstname() . \" \" . $this->customer->getLastname());\n $mail->addEmbeddedImage('../../../img/reimann.jpg', 'reimann');\n $mail->addEmbeddedImage('../../../img/title.jpg', 'title');\n $mail->addAttachment(\"../../invoices/\" . $this->orderID . \"-rechnung.pdf\", $this->orderID . \"-rechnung.pdf\");\n\n\n $mail->isHTML(true);\n //Todo add plain text version\n $mail->Subject = \"RR Shop - Deine Bestellung #\" . $this->orderID . \" ist eingegangen.\";\n $mail->Body = $template->parse(\"../../email.html\");\n $mail->AltBody = \"\";\n\n $mail->send();\n }\n //TODO add other state update Mails\n }", "function generateAndMailInvoice($Paymentinfo, $sendMail = true){\r\n\tglobal $InvoiceNum;\r\n\tif($Paymentinfo){\r\n\t\t$info\t\t\t\t\t\t=\tgetInfoFrom('user_details','profile',$Paymentinfo['CustomerID']);\r\n\t\t$Email\t\t\t\t\t\t=\t$info['Username'];\r\n\t\t$InvoiceUserOrganisation\t=\t$info['Organization'];\r\n\t\t$InvoiceUserAmount\t\t\t=\t$Paymentinfo['AmountPaid'];\r\n\t\t$InvoiceID \t\t\t\t\t=\t$Paymentinfo['Payment_ModeID'];\r\n\t\t$InvoiceNum\t\t\t\t\t=\t$Paymentinfo['InvoiceNum'];\r\n\t}\r\n\r\n\tif(IfValid($info['phoneOffice'])){\r\n\t\t$Telephone\t=\t\t$info['phoneOffice'];\r\n\t}\r\n\telse\r\n\t\t$Telephone\t=\t\t$info['phonePersonal'];\r\n\t\r\n\tif($Paymentinfo['Pay_Mode']\t==\tPayPal)\r\n\t\t$paymentMode\t=\t'Paypal';\r\n\telse\r\n\t\t$paymentMode\t=\t'Voucher';\r\n\t\t\t\r\n\t//Below set of variables is required in pdf generation\r\n\tglobal $InvoiceDate, $UserName, $UserAddress, $UserCompany;\r\n\tglobal $UserTelephone, $UserCity, $UserZip, $UserEmail, $UserCountry;\r\n\tglobal $ItemAmount, $TotalAmount, $PurchaseDate, $PurchaseMode, $TransactionID;\r\n\t$InvoiceNum;\r\n\t$InvoiceDate\t=\tcurrentDate();\r\n\t$UserName\t\t=\t$info['Name'];\r\n\t$UserAddress\t=\t$info['Address'];\r\n\t$UserCompany\t=\t$info['Organization'];\r\n\t$UserTelephone\t=\t$Telephone;\r\n\t$UserCity\t\t=\t$info['City'];\r\n\t$UserZip\t\t=\t$info['PinCode'];\r\n\t$UserEmail\t\t=\t$Email;\r\n\t$UserCountry\t=\t$info['Country'];\r\n\t$ItemAmount\t\t=\t$InvoiceUserAmount;\r\n\t$TotalAmount\t=\t$InvoiceUserAmount;\r\n\t$PurchaseDate\t=\t$Paymentinfo['PayDate'] . ' UTC';\r\n\t$PurchaseMode\t=\t$paymentMode;\r\n\t$TransactionID\t=\t$Paymentinfo['TransactionID'];\r\n\r\n\t$NewInvoiceMailBody\t\t=\tgetEmailBody('NewInvoice', array('NewInvoiceID' => $InvoiceID,'NewInvoiceUserOrganisation' => $InvoiceUserOrganisation, 'NewInvoiceAmount' => $InvoiceUserAmount));\r\n\t$NewInvoiceMailSubject\t=\tgetEmailSubject('NewInvoice', array('NewInvoiceID' => $InvoiceID));\r\n\t\r\n\t$pdfHtmlBody\t\t\t=\t$NewInvoiceMailBody;\t//As per old pdf html\r\n\t$ProjectName\t\t\t=\t'Pulsar Pay-Per-Use';\t//variable required inside of html\r\n\t$customerInvoiceHtmlFile=\tsampleInterfaces.'CustomerInvoice.html';\r\n\t$pdfHtmlBody\t\t\t=\thtmlWithPhpContent($customerInvoiceHtmlFile);\r\n\t$NewInvoiceMailBody\t\t=\t$pdfHtmlBody;\r\n\t\t\r\n\t$pdfFilename\t\t\t=\t$InvoiceNum.'.pdf';\r\n\tif(!file_exists(UserDataFilePath.$pdfFilename))\r\n\t\t$pdfName\t\t\t=\tgeneratePDF($pdfHtmlBody, UserDataFilePath.$pdfFilename);\r\n\r\n\t$output\t\t=\t$pdfFilename;\r\n\tif($sendMail) {\r\n\t\t$mailResult\t=\tsend_Email($Email, $NewInvoiceMailSubject , $NewInvoiceMailBody, '' ,UserDataFilePath.$pdfFilename);\r\n\t\tif($mailResult)\r\n\t\t\t\t$output\t =\t'1';\r\n\t\telse\r\n\t\t\t$output\t =\tSetErrorCodes(18, __LINE__, __FILE__);// failed to send email\r\n\t}\t\t\r\n\treturn $output;\r\n}", "private function sendEmail(){\n\t\t$emails = explode(',',$this->_paramountDelivery->email);\n\n\t\t$attachments = [];\n\n\t\tif (file_exists($this->getTempLocalZipPath()))\n\t\t\t$attachments[] = [\n\t\t\t\t'name' => basename($this->getTempLocalZipPath()),\n\t\t\t\t'mimeType' => 'application/octet-stream',\n\t\t\t\t'data' => file_get_contents($this->getTempLocalZipPath()),\n\t\t\t];\n\n\t\tif ($this->getTempLocalExcelPath()){\n\t\t\t$attachments[] = array(\n\t\t\t\t'name' => basename($this->getTempLocalExcelPath()),\n\t\t\t\t'mimeType' => 'application/octet-stream',\n\t\t\t\t'data' => file_get_contents($this->getTempLocalExcelPath()),\n\t\t\t);\n\t\t}\n\n\t\t$content = $this->_paramountDelivery->text . '<br/><br/>';\n\n\t\t$orderTable = false;\n\t\ttry {\n\t\t\t$orderTable = PRMMailHelper::factory()->getOrderTable($this->_paramountDelivery->order_mail_uid, explode(',', $this->_paramountDelivery->project_jobs));\n\t\t}catch (Exception $e){}\n\n\t\tif ($orderTable)\n\t\t\t$content .=$orderTable;\n\n\t\treturn Yii::app()->amazonSes->sendMessage($emails, $this->_paramountDelivery->subject, $content, null, $attachments);\n\t}", "public function sendReceiptViaEmail(Request $request){\n $receipt = Receipt::where('id', $request->id)->where('tenant_id', Auth::user()->tenant_id)->first();\n \\Mail::to($receipt->client->email)->send(new SendReceipt($receipt));\n #Register log\n $log = new ClientLog;\n $log->tenant_id = Auth::user()->tenant_id;\n $log->client_id = $receipt->client_id;\n $log->user_id = Auth::user()->id;\n $log->log = Auth::user()->first_name.' '.Auth::user()->surname.' sent receipt('.$receipt->receipt_no.\") via mail.\";\n $log->save();\n return response()->json(['message'=>'Sent!']);\n }", "public function mail(){\n $this->read();\n // make e-mail template\n $template = new Template(Configuration::get('base_dir').DS.'templates'.DS.'mail.php');\n $template->replaceFromPHPFile(\n 'content', \n Configuration::get('base_dir').DS.'templates'.DS.'invoice-list.php',\n array('invoice'=>$this->toClone())\n );\n // send e-mail\n $config = Configuration::getInstance();\n $header = \"From: {$config['user']['name']} <{$config['user']['email']}>\";\n return mail($this->client_email, \"An invoice has been published\", $template->toString(), $header);\n }", "public function sendInvoiceToUser(): void\n {\n $mailableClass = config('netcore.module-invoice.mailable_class', \\App\\Mail\\InvoiceEmail::class);\n\n Mail::to($this->user)->send(new $mailableClass($this));\n }", "private function invoiceMail($id)\n\t{\n\t\t$data = $this->recurringjobModel->getInoviceView($id);\n\t\t$info = $this->recurringjobModel->getOrganization();\n\t\t$data['id'] = str_pad($data['id'], 4, '0', STR_PAD_LEFT);\n\t\t$template = $this->recurringjobModel->getTemplate('newinvoice');\n\t\t$site_link = '<a href=\"'.URL_CLIENTS.DIR_ROUTE.'invoice/view&id='.$id.'\">Click Here</a>';\n\t\t\n\t\t$message = $template['message'];\n\t\t$message = str_replace('{company}', $data['company'], $message);\n\t\t$message = str_replace('{inv_id}', 'INV-'.$data['id'], $message);\n\t\t$message = str_replace('{amount}', $data['currency_abbr'].$data['amount'], $message);\n\t\t$message = str_replace('{paid}', $data['currency_abbr'].$data['paid'], $message);\n\t\t$message = str_replace('{due}', $data['currency_abbr'].$data['due'], $message);\n\t\t$message = str_replace('{due_date}', $data['duedate'], $message);\n\t\t$message = str_replace('{business_name}', $info['name'], $message);\n\t\t$message = str_replace('{inv_url}', $site_link, $message);\n\t\t\n\t\t$mailer = new Mailer();\n\t\t$useornot = $mailer->getData();\n\t\tif (!$useornot) {\n\t\t\t$mailer->mail->setFrom($info['email'], $info['name']);\n\t\t}\n\t\t$mailer->mail->addAddress($data['email'], $data['company']);\n\t\t$mailer->mail->addBCC($info['email'], $info['name']);\n\t\t$mailer->mail->addAttachment(DIR.'public/uploads/pdf/invoice-'.$id.'.pdf','Invoice.pdf');\n\t\t$mailer->mail->isHTML(true);\n\t\t$mailer->mail->Subject = $template['subject'];\n\t\t$mailer->mail->Body = html_entity_decode($message);\n\t\t$mailer->mail->AltBody = 'Hello '.$data['customer'].'.\n\t\tYour Invoice has been created on '.$data['date_of_joining'].'\n\t\tYour Invoice ID : '.$data['id'].'';\n\t\t$mailer->sendMail();\n\t}", "function send_email($aff_id, $whom, $vendor_profit, $affiliate_profit)\n {\n // don't load into production, yet\n // if (!PDC_TESTING) { return; }\n\n\t\t$vendor = sql_get_row('select members.username, members.email, members.name from members, products where members.id=products.member_id and products.id=?', $this->ipn['pdc_productid']);\n \n // Load Template and munge data\n $data = $this->ipn; // data to replace in template\n $data['vendors_name'] = $vendor['name'];\n $data['vendors_username'] = $vendor['username'];\n $data['vendors_email'] = $vendor['email'];\n \n\n if ($aff_id > 0) {\n $affiliate = sql_get_row('select members.username, members.email, members.name from members where members.id=?', $aff_id);\n $data['affiliate_name'] = $affiliate['name'];\n $data['affiliate_username'] = $affiliate['username'];\n $data['affiliate_email'] = $affilate['email'];\n $data['affiliate_amount'] = $affiliate_profit;\n }\n\n\n $data['pdc_fee'] = number_format($this->calc_fee($this->ipn['mc_gross']), 2, '.', '');\n# $data['profit'] = number_format($data['mc_gross'] - $data['pdc_fee'], 2, '.', '');\n \n $data['buyer_name'] = $data['first_name'] . \" \" . $data['last_name'];\n\n # map the correct IPN fields to the arbitrary ones used\n # in the templates. \n \n $map['product_id'] = 'pdc_productid';\n $map['product_name'] = 'item_name';\n $map['product_amount'] = 'mc_gross';\n $map['pay_proc'] = 'pdc_source';\n $map['buyer_address'] = 'address_street';\n $map['buyer_city'] = 'address_city';\n $map['buyer_zip'] = 'address_zip';\n $map['buyer_country'] = 'address_country';\n $map['buyer_email'] = 'payer_email';\n \n foreach ($map as $templatename => $realkey) {\n $data[$templatename] = $data[$realkey]; // copy over to make template happy\n }\n\t\n\t\tswitch ($whom)\n\t\t{\n\t\t\tcase \"vendor\":\n if ($aff_id == 0) { // No affiliate\n\t\t\t\t$subject=get_setting(\"vendor_sale_only_subject\");\n\t\t\t\t$body=get_setting(\"vendor_sale_only_body\");\n } else { // we have an affiliate\n\t\t\t\t$subject=get_setting(\"affiliate_sale_vendor_subject\");\n\t\t\t\t$body=get_setting(\"affiliate_sale_vendor_body\");\n $temp = $data['product_amount'] - $data['pdc_fee'] - $vendor_profit;\n $data['affiliate_amount'] = number_format($temp, 2, '.', '');\n }\n $data['profit'] = number_format($vendor_profit, 2, '.', '');\n $to = $vendor;\n break;\n\t\t\tcase \"affiliate\":\n $subject=get_setting(\"affiliate_sale_aff_subject\");\n $body=get_setting(\"affiliate_sale_aff_body\");\n $data['profit'] = number_format($affiliate_profit, 2, '.', '');\n $to = $affiliate; \n\t\t\tbreak;\n\t\t}\n\n\n $data['profit'] = number_format($data['profit'], 2, '.', '');\n if ($subject == \"\") {\n error_log(\"Warning: No email template for: $whom - email not sent\");\n return;\n }\n \n $subject = tpl_persist($subject, $data);\n $body = tpl_persist($body, $data);\n $mailto = $to['email'];\n \n # DON'T EVER SEND LIVE EMAIL FROM TESTING! \n if (! PDC_TESTING) {\n @mail($mailto, $subject, $body, \"From: PayDotCom <service@paydotcom.com>\");\n }\n\n if (PDC_TESTING) {\n # Send all emails so we can see what people are getting\n $vars = sabrayla_sprint_r($data); \n $body = \"$body\\n\\n\\n==DEBUG==\\n\\nTESTING TO: $mailto\\n\\n$x\\n\\n$vars\";\n\n @mail(\"ionut@gmail.com\", $subject, $body, \"From: PayDotCom <service@paydotcom.com>\");\n @mail(\"nickt@nicktemple.com\", $subject, $body, \"From: PayDotCom <service@paydotcom.com>\"); \t\t\n }\n\n }", "public function sendOrderEmail($productsOrdered, $orderTotals) {\n include(OSC_INCLUDES_PATH . 'includes/languages/english/checkout_process.php');\n\n $emailText = STORE_NAME . \"\\n\" . \n EMAIL_SEPARATOR . \"\\n\" . \n EMAIL_TEXT_ORDER_NUMBER . ' ' . $this->fields['orders_id'] . \"\\n\" .\n EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $this->fields['orders_id'], 'SSL', false) . \"\\n\" .\n EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . \"\\n\\n\";\n if ($this->fields['comments']) {\n $emailText .= tep_db_output($this->fields['comments']) . \"\\n\\n\";\n }\n $emailText .= EMAIL_TEXT_PRODUCTS . \"\\n\" . \n EMAIL_SEPARATOR . \"\\n\" . \n $productsOrdered . \n EMAIL_SEPARATOR . \"\\n\";\n\n for ($i=0, $n=sizeof($orderTotals); $i<$n; $i++) {\n $emailText .= strip_tags($orderTotals[$i]['title']) . ' ' . strip_tags($orderTotals[$i]['text']) . \"\\n\";\n }\n\n extract($this->getShippingAddress());\n $emailText .= \"\\n\" . EMAIL_TEXT_DELIVERY_ADDRESS . \"\\n\" . \n EMAIL_SEPARATOR . \"\\n\" .\n\"$name\n$street_address\\n\" .\n($suburb ? $suburb.\"\\n\" : \"\") .\n\"$city, $state $postcode\n$country\\n\\n\";\n \n\n extract($this->getShippingAddress());\n $emailText .= \"\\n\" . EMAIL_TEXT_BILLING_ADDRESS . \"\\n\" .\n EMAIL_SEPARATOR . \"\\n\" .\n\"$name\n$street_address\\n\" .\n($suburb ? $suburb.\"\\n\" : \"\") .\n\"$city, $state $postcode\n$country\\n\\n\";\n// print_r($this);\n// die($emailText);\n\n\n tep_mail($this->fields['customers_firstname'] . ' ' . $this->fields['customers_lastname'], $this->fields['customers_email_address'], EMAIL_TEXT_SUBJECT, $emailText, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);\n\n if (SEND_EXTRA_ORDER_EMAILS_TO != '') {\n tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $emailText, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);\n }\n }", "public function sendMail(SendMailEvent $event) {\n// $query = (new Query)->from('invoice')->where(['code' => (int) $this->data])->one();\n $setting = $this->_setting;\n \\Yii::$app->mailer->setTransport([\n 'class' => 'Swift_SmtpTransport',\n 'host' => $setting->smtp_host,\n 'username' => $setting->smtp_username,\n 'password' => trim($setting->smtp_password),\n 'port' => $setting->smtp_port,\n 'encryption' => $setting->smtp_encryption,\n 'streamOptions' => [\n 'ssl' => [\n 'allow_self_signed' => true,\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n ],\n ]\n ]);\n $send = \\Yii::$app->mailer->compose('@common/mail/invoice', ['data' => $event->result['invoice']])\n ->setFrom([$setting->email => $setting->name])\n ->setSubject(\"Don hang\")\n ->setTo($event->fromAddress)\n ->send();\n }", "function send_recurring_payment_email($ipn_data, $cart_items){\r\n\tglobal $wpdb,$slm_debug_logger;\r\n\t\r\n\t$slm_data = \"\";\r\n\t$license_table = $wpdb->prefix . \"lic_key_tbl\";\r\n\t$transaction_id = $ipn_data[\"txn_id\"];\r\n\t$email_subject = get_option('eStore_rp_email_subj');\r\n\t$email_body = get_option('eStore_rp_email_body');\r\n\t\r\n\t$result = $wpdb->get_row(\"SELECT * FROM $license_table where txn_id = '$transaction_id'\",ARRAY_A);\r\n\t$slm_data = $result[\"license_key\"];\r\n\t\r\n\t$tags = array(\"{first_name}\", \"{last_name}\", \"{slm_data}\");\r\n\t$values = array($ipn_data['first_name'], $ipn_data['last_name'],$slm_data);\r\n\t\r\n\t$to = (string)$ipn_data[\"payer_email\"];\r\n\t$subject = str_replace($tags, $values, $email_subject);\r\n $body = stripslashes(str_replace($tags, $values, wpautop($email_body)));\r\n\t\r\n\t$download_email = get_option('eStore_download_email_address');\r\n\t$site_title = get_bloginfo( 'name' );\r\n\t$headers = 'From: '.$site_title.' <' . $download_email . \">\\r\\n\"; \r\n\t$headers .= 'Reply-To:' . $download_email . \"\\r\\n\";\r\n\t$headers .= \"Content-Type: text/html; charset=UTF-8 \\r\\n\";\r\n\t\r\n\temail_template($to,$body,$subject,$headers);\r\n}", "public function mailQuote($quote, $customer, $products, $agent)\r\n {\r\n\r\n $names = ucwords(strtolower($customer->name));\r\n $preview_link_content = '<p>Dear ' . $names . ',</p><p>Hope this finds you well.</p><p>We have prepared offer no. ' . $quote->id . ' for you. To review the offer,please click on the link below:</p><a href=\\\"' . Url::base() . Url::route('/quote/actions/{link}', ['link' => Help::encrypt($quote->id)]) . '\\\">Quote Preview</a><p>If you have any questions regarding the offer, please don\\'t hesitate to contact me.</p><p>Best regards,<br/>' . $agent->names . '<br/>Email: ' . $agent->email_address . '<br/>Telephone: ' . $agent->telephone_number;\r\n $pdf_content = '<p>Dear ' . $names . ',</p><p>Hope this finds you well.</p><p>We have prepared offer no. ' . $quote->id . ' for you to review</p><p>Please click on the link below:</p><p><a href=\\\"' . Url::base() . Url::route('/quote/actions/{link}', ['link' => Help::encrypt($quote->id)]) . '\\\">Quote Preview</a></p> The offer is in the PDF attached to this email.</p></p>If you have any questions regarding the offer, please don\\'t hesitate\\nto contact me.</p><p>Best regards,<br/>' . $agent->names . '<br/>Email: ' . $agent->email_address . '<br/>Telephone: ' . $agent->telephone_number . '</p>';\r\n\r\n //get own company\r\n $owncompany = Elements::call('Companies/CompaniesController')->ownCompany(TRUE);\r\n $email_schema = [\r\n 'preventjQuery' => TRUE,\r\n 'preventZebraJs' => TRUE,\r\n 'method' => 'POST',\r\n 'action' => '/customer/quote/sendemail',\r\n 'controls' => [\r\n '{id}' => ['hidden', 'id', $quote->id],\r\n '{customer}' => ['hidden', 'customer_name', $names],\r\n '{replyname}' => ['hidden', 'replyname', $agent->names],\r\n '{replyto}' => ['hidden', 'replyto', $agent->email_address],\r\n '{owncompany}' => ['hidden', 'owncompany', $owncompany->name],\r\n '{ownemail}' => ['hidden', 'ownemail', $owncompany->email_address],\r\n 'Send Mode*' => ['select', 'sendmode', '', [\r\n '1' => 'Email linking to direct quote page',\r\n '2' => 'Email with Quote PDF attachment'\r\n ], ['class' => 'modal_required']],\r\n 'Email Address*' => ['text', 'email', $customer->email, ['class' => 'modal_required']],\r\n 'Subject*' => ['text', 'subject', 'Your ' . $products['name'] . ' Insurance Offer: Please review your quotation', ['class' => 'modal_required']],\r\n 'Message*' => ['textarea', 'content', '', ['class' => 'email_content modal_required']],\r\n '{submit}' => ['submit', 'btnsubmit', 'Send Email']\r\n ]\r\n ];\r\n $emailform = Generate::Form('emailform', $email_schema)->render('vertical', TRUE);\r\n\r\n $modal_settings = [\r\n 'formid' => 'emailform',\r\n 'role' => 'dialog',\r\n 'size' => 'large',\r\n 'title' => 'Send Email Quotation',\r\n 'buttons' => [\r\n 'Cancel' => [\r\n 'class' => 'btn btn-default',\r\n 'data-dismiss' => 'modal'\r\n ],\r\n 'Send Quotation' => [\r\n 'type' => 'submit',\r\n 'class' => 'btn btn-primary mail',\r\n 'id' => 'save_button'\r\n ]\r\n ]\r\n ];\r\n\r\n $addform = Overlays::ModalDialog($modal_settings, $emailform, true);\r\n\r\n $this->set('id', $quote->id);\r\n $this->set('addform', $addform);\r\n $this->set('preview_link_content', $preview_link_content);\r\n $this->set('pdf_content', $pdf_content);\r\n $this->setViewPanel('email-quote-form');\r\n }", "function send_products_email( $options, $post, $registration ){\n $extra_items = $registration['extra_items'];\n $extra_items = 4 < strlen( $extra_items ) ? true : false;\n if($options['user_products_email'] && $extra_items):\n\n // Get Additional Products.\n $products = unserialize($registration['extra_items']);\n $organizer = get_post_meta($registration['eid'], 'sigma_event_organizer', true);\n\n // No additional products?\n if( ! $products ) return;\n\n foreach( $products as $product ):\n // Setup 'pid' tag for email templates.\n $this->replace_array['pid'] = $product[0];\n\n // Setup 'pname' tag for email templates.\n $this->replace_array['pname'] = $product[2];\n\n // Get Product Meta Data (Email Template)\n $event_id = $product[0];\n $email_template = get_post_meta($event_id, 'sigma_email_template', true);\n\n $to = $registration['email'];\n $subject = preg_replace_callback('!\\{\\{(\\w+)\\}\\}!',\n array($this, 'replace_value'), $email_template['subject']);\n\n if($post['resultado'] == 'paid'):\n $message = preg_replace_callback('!\\{\\{(\\w+)\\}\\}!',\n array($this, 'replace_value'), $email_template['message_approved']);\n $message = apply_filters('the_content', $message);\n\n $headers = null;\n $headers[] = 'From: ' . $options['send_name'] . ' <' . $options['send_email'] . '>';\n\n // Copy Organizer?\n if($options['enable_organizer_user_product_email'])\n $headers[] = 'Cc: ' . $organizer['name'] . ' <' . $organizer['mail'] . '>';\n\n $attachment = array($email_template['attachment']);\n\n $r = wp_mail($to, $subject, $message, $headers, $attachment);\n endif;\n endforeach;\n endif;\n }", "public function sendEmail($params) {\n $admin = Mage::getModel(\"admin/user\")->getCollection()->getData();\n\n //Create an array of variables to assign to template\n $vars = array();\n\n $this->quoteId = (int) $this->getRequest()->getParam('id');\n /* @var $_quoteadv Ophirah_Qquoteadv_Model_Qqadvcustomer */\n $_quoteadv = Mage::getModel('qquoteadv/qqadvcustomer')->load($this->quoteId);\n\n $vars['quote'] = $_quoteadv;\n $vars['customer'] = Mage::getModel('customer/customer')->load($_quoteadv->getCustomerId());\n\n $template = Mage::getModel('core/email_template');\n\n\t$quoteadv_param = Mage::getStoreConfig('qquoteadv/emails/proposal', $_quoteadv->getStoreId());\n if ($quoteadv_param) {\n $templateId = $quoteadv_param;\n } else {\n $templateId = self::XML_PATH_QQUOTEADV_REQUEST_PROPOSAL_EMAIL_TEMPLATE;\n }\n\t\t\t\t\n\t\t\t\t// get locale of quote sent so we can sent email in that language\t\n\t\t\t\t$storeLocale = Mage::getStoreConfig('general/locale/code', $_quoteadv->getStoreId());\n\t\t\t\t\n if (is_numeric($templateId)) {\n $template->load($templateId);\n } else {\n $template->loadDefault($templateId, $storeLocale);\n }\n\n $vars['attach_pdf'] = $vars['attach_doc'] = false;\n\n //Create pdf to attach to email\n\n if (Mage::getStoreConfig('qquoteadv/attach/pdf', $_quoteadv->getStoreId())) {\n $pdf = Mage::getModel('qquoteadv/pdf_qquote')->getPdf($_quoteadv);\n $realQuoteadvId = $_quoteadv->getIncrementId() ? $_quoteadv->getIncrementId() : $_quoteadv->getId();\n\t\t\ttry{\n\t\t\t\t$file = $pdf->render();\n\t\t\t\t$name = Mage::helper('qquoteadv')->__('Price_proposal_%s', $realQuoteadvId);\n\t\t\t\t$template->getMail()->createAttachment($file,'application/pdf',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $name.'.pdf');\n\t\t\t\t$vars['attach_pdf'] = true;\n\n\t\t\t}catch(Exception $e){ Mage::log($e->getMessage()); }\n\t\t\t\n }\n\n if ($doc = Mage::getStoreConfig('qquoteadv/attach/doc', $_quoteadv->getStoreId())) { \n \t$pathDoc = Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA). DS .'quoteadv'. DS .$doc; \t \n \ttry{\n $file = file_get_contents($pathDoc);\n\n $info = pathinfo($pathDoc);\n //$extension = $info['extension']; \n $basename = $info['basename'];\n $template->getMail()->createAttachment($file, '' ,Zend_Mime::DISPOSITION_ATTACHMENT,Zend_Mime::ENCODING_BASE64,$basename); \n $vars['attach_doc'] = true; \n }catch(Exception $e){ Mage::log($e->getMessage()); }\n }\n $remark = Mage::getStoreConfig('qquoteadv/general/qquoteadv_remark', $_quoteadv->getStoreId());\n if ( $remark ) {\n $vars['remark'] = $remark;\n }\n \n $adm_name = $this->getAdminName($_quoteadv->getUserId()); \n $adm_name = trim($adm_name); \n if ( empty($adm_name)) { $adm_name = $this->getAdminName(Mage::getSingleton('admin/session')->getUser()->getId()); } \n if ( !empty($adm_name)) {\n $vars['adminname'] = $adm_name;\n } \n\n $subject = $template['template_subject'];\n\n $vars['link'] = Mage::getUrl(\"qquoteadv/view/view/\", array('id' => $this->quoteId));\n\n\t$sender = $_quoteadv->getEmailSenderInfo();\n $template->setSenderName($sender['name']);\n $template->setSenderEmail($sender['email']);\n\n $template->setTemplateSubject($subject);\n\t$bcc = Mage::getStoreConfig('qquoteadv/emails/bcc', $_quoteadv->getStoreId());\n if ($bcc) {\n $bccData = explode(\";\", $bcc);\n $template->addBcc($bccData);\n }\n\n if((bool) Mage::getStoreConfig('qquoteadv/emails/send_linked_sale_bcc', $_quoteadv->getStoreId())) {\n $template->addBcc(Mage::getModel('admin/user')->load($_quoteadv->getUserId())->getEmail());\n }\n\n $template->setDesignConfig(array('store' => $_quoteadv->getStoreId()));\n\n /**\n * Opens the qquote_request.html, throws in the variable array\n * and returns the 'parsed' content that you can use as body of email\n */\n $processedTemplate = $template->getProcessedTemplate($vars);\n\n /*\n * getProcessedTemplate is called inside send()\n */\n $res = $template->send($params['email'], $params['name'], $vars);\n\n return $res;\n }", "public static function email_receipts($subject,$receipts,$type_email,$change=null,$promotor_copy=false,$receipt_view=false,$resend_to=null,$only_receipt=false)\n {\n try {\n if(is_array($receipts) && count($receipts) && is_string($subject) && is_string($type_email))\n { \n //init variables\n $rows_html = $totals_html = $coupon_code = '';\n $pdf_receipts = $pdf_tickets = $purchases = $ticket_info = [];\n $totals = ['qty'=>0,'processing_fee'=>0,'retail_price'=>0,'printed_fee'=>0,'sales_taxes'=>0,'discount'=>0];\n $top = $banners = '';\n //set customer\n $customer = $receipts[0]['customer'];\n //loop receipts\n foreach ($receipts as $receipt)\n {\n if($receipt['purchase']->qty>0)\n {\n $purchases[] = $receipt['purchase'];\n\n //receipt\n $purchase = array_merge((array)$receipt['customer'],(array)$receipt['purchase']);\n if(!empty($receipt['purchase']->s_ticket_info) && !isset($ticket_info[$receipt['purchase']->show_id]))\n $ticket_info[$receipt['purchase']->show_id] = $receipt['purchase']->s_ticket_info;\n \n //create pdf receipt\n $format = 'pdf';\n $pdfUrlR = '/tmp/Receipt_'.$receipt['purchase']->id.'_'.preg_replace('/[^a-zA-Z0-9\\_]/','_',$receipt['purchase']->ticket_type).'_'.date(\"m_d_Y_h_i_a\",strtotime($receipt['purchase']->show_time)).'.pdf';\n $pdf_receipt = View::make('command.report_sales_receipt', compact('purchase','format'));\n if(file_exists($pdfUrlR)) unlink($pdfUrlR);\n PDF::loadHTML($pdf_receipt->render())->setPaper('a4', 'portrait')->setWarnings(false)->save($pdfUrlR);\n $pdf_receipts[] = $pdfUrlR;\n\n //create pdf tickets if no printed tickets \n if($receipt['purchase']->printed_tickets<1 || ($receipt['purchase']->printed_tickets==1 && empty($receipt['purchase']->printed_fee)) )\n {\n $tickets = $receipt['tickets'];\n $type = 'C';\n $pdfUrlT = '/tmp/Tickets_'.$receipt['purchase']->id.'_'.preg_replace('/[^a-zA-Z0-9\\_]/','_',$receipt['purchase']->ticket_type).'_'.date(\"m_d_Y_h_i_a\",strtotime($receipt['purchase']->show_time)).'.pdf';\n $pdf_ticket = View::make('command.report_sales_receipt_tickets', compact('tickets','type','format'));\n if(file_exists($pdfUrlT)) unlink($pdfUrlT);\n PDF::loadHTML($pdf_ticket->render())->setPaper('a4', 'portrait')->setWarnings(false)->save($pdfUrlT);\n $pdf_tickets[] = $pdfUrlT;\n }\n //send email for print tickets by mail\n else if($receipt['purchase']->printed_fee>0)\n {\n //send email\n $msg = '<h1>Order #'.$receipt['purchase']->id.' paid $'.$receipt['purchase']->printed_fee.' to print the ticket(s) and mail it(them).<br>Please, enter into TicketBat.com, print them and sent by mail.';\n $msg.= '<br><br>If you already send them, ignore this email, maybe someone re-sent the receipt and trigger this email.</h1>';\n \n $email = new EmailSG(null, env('MAIL_PRINTED_TICKETS_TO','admin@ticketbat.com') , 'Ticketbat :: Printed tickets request.');\n $email->category('Important');\n $email->body('custom',['body'=>$msg]);\n $email->template('46388c48-5397-440d-8f67-48f82db301f7');\n $email->send();\n }\n\n if($type_email != 'reminder')\n {\n if($receipt['purchase']->inclusive_fee>0)\n $purchase['processing_fee']=0;\n //row on email to each purchase\n $rows_html.='<tr>'\n . '<td align=\"center\">'.$receipt['purchase']->ticket_type_type.' For '.$receipt['purchase']->show_name.'<br/>On '.date('l, F jS - g:i A',strtotime($receipt['purchase']->show_time)).'</td> '\n . '<td align=\"center\">'.$receipt['purchase']->quantity.'</td> '\n . '<td align=\"center\">'.number_format($purchase['price_each'],2).'</td> '\n . '<td align=\"center\">'.number_format($purchase['retail_price'],2).'</td> '\n . '<td align=\"center\">'.number_format($purchase['processing_fee'],2).'</td> </tr>';\n //sum values to show\n $totals['qty']+=$receipt['purchase']->quantity;\n $totals['processing_fee']+=$purchase['processing_fee'];\n $totals['retail_price']+=$receipt['purchase']->retail_price;\n $totals['discount']+=$receipt['purchase']->savings;\n $totals['printed_fee']+=$receipt['purchase']->printed_fee;\n $totals['sales_taxes']+=$receipt['purchase']->sales_taxes;\n //show on top if change status\n if($change=='CANCELED')\n $top = '<h1><b style=\"color:red\">THIS PURCHASE HAS BEEN CANCELLED</b></h1>' ;\n /*else if($change=='REFUNDED')\n $top = '<h1><b style=\"color:red\">THIS PURCHASE HAS BEEN REFUNDED</b></h1>' ;*/\n else if($change=='ACTIVATED')\n $top = '<h1><b style=\"color:green\">THIS PURCHASE HAS BEEN ACTIVATED</b></h1>' ;\n else\n $top = '';\n }\n //show on top if change date\n if($type_email == 'changed')\n {\n $top = 'This purchase of '.$receipt['purchase']->quantity.' '.$receipt['purchase']->ticket_type_type.' ticket(s) for '.\n $receipt['purchase']->show_name.' on '.date('l, F jS - g:i A',strtotime($change)).\n ' has been changed to '.date('l, F jS - g:i A',strtotime($receipt['purchase']->show_time)).\n '.<br>The updated receipt and tickets are attached.<br><br>' ;\n }\n //show coupon code used\n if(empty($coupon_code))\n $coupon_code = $receipt['purchase']->code;\n }\n }\n //table on email to show all totals\n $totals['total'] = $totals['retail_price'] + $totals['processing_fee'] - $totals['discount'] + $totals['printed_fee'] + $totals['sales_taxes'];\n $totals_html = '<tr> <td align=\"right\" width=\"80%\">Subtotal:</td> <td width=\"20%\" align=\"right\">$ '.number_format($totals['retail_price'],2).'</td> </tr>\n <tr> <td align=\"right\">Processing Fee:</td> <td align=\"right\">$ '.number_format($totals['processing_fee'],2).'</td> </tr>';\n if($totals['discount'] > 0)\n $totals_html.='<tr> <td align=\"right\">Discount (<b>'.$coupon_code.'</b>):</td> <td align=\"right\">- $ '.number_format($totals['discount'],2).'</td> </tr>';\n if($totals['printed_fee'] > 0)\n $totals_html.='<tr> <td align=\"right\">Printer fee:</td> <td align=\"right\">$ '.number_format($totals['printed_fee'],2).'</td> </tr>';\n $totals_html.='<tr> <td align=\"right\">Sales taxes:</td> <td align=\"right\">$ '.number_format($totals['sales_taxes'],2).'</td> </tr>';\n $totals_html.='<tr> <td align=\"right\" style=\"color:#1F9F0B;\"><b>GRAND TOTAL</b>:</td> <td align=\"right\" style=\"color:#1F9F0B;\">$ '.number_format($totals['total'],2).'</td> </tr>';\n\n //banners\n if(!empty($receipt['banners']))\n foreach ($receipt['banners'] as $b)\n $banners .= '<div><a href=\"'.$b->url.'\"><img src=\"'.$b->file.'\"/></a></div>';\n \n //ticket_info\n if(!empty($ticket_info))\n $top .= '<b>'.implode('<br>', $ticket_info).'</b>';\n\n //send email\n $send_to = ($resend_to && filter_var($resend_to, FILTER_VALIDATE_EMAIL))? $resend_to : $customer->email;\n $email = new EmailSG(null, $send_to , $subject);\n $email->category('Receipts');\n if($only_receipt)\n $email->attachment($pdf_receipts);\n else\n $email->attachment(array_merge($pdf_receipts,$pdf_tickets));\n //check type of email to send\n if($type_email === 'reminder')\n {\n $email->body('reminder',['purchase'=>$purchases,'customer'=>$customer]);\n $email->template('330de7c4-3d1c-47b5-9f48-ca376cbbea99');\n }\n else\n {\n //info to send by email content\n $email->body('receipt',['rows'=>$rows_html,'totals'=>$totals_html,'banners'=>$banners,'top'=>$top]);\n $email->template('98066597-4797-40bf-b95a-0219da4ca1dc');\n }\n $response = $email->send();\n\n //send copy to event promotor if available option\n if($promotor_copy)\n {\n $p = $receipts[0]['purchase'];\n if($p->s_individual_emails == 1 && !empty($p->emails))\n {\n /*if($change=='REFUNDED')\n {\n $subject = 'TicketBat :: Credit Card Dispute # '.$receipt['purchase']->id;\n $top_copy = '<b style=\"color:red\">Credit Card Dispute<br><br>';\n $top_copy .= 'Please verify that this guest picked up their tickets and attended the show by providing the signed header card and Seat Retrieval Report showing they entered the showroom.<br><br>';\n $top_copy .= 'If the guest was a no show, DO NOT RETURN the tickets. The Settlement Team will make the adjustment.<br><br>';\n $top_copy .= 'Please reply to this email.</b><br><br>';\n }\n else */if($type_email=='changed')\n {\n $subject = 'TicketBat :: Date Changed for order #'.$receipt['purchase']->id;\n $top_copy = $top ;\n $to_e1 = explode(',', $p->emails);\n $to_e2 = explode(',', env('MAIL_ACCOUNTING_TO','') );\n $p->emails = array_unique( array_merge($to_e1,$to_e2) );\n }\n else \n {\n $subject = $subject.' (BO Receipt)';\n $top_copy = $top;\n }\n $email = new EmailSG(null, $p->emails , $subject);\n $email->category('Receipts');\n $email->attachment(array_merge($pdf_receipts,$pdf_tickets));\n //check type of email to send\n if($type_email === 'reminder')\n {\n $email->body('reminder',['purchase'=>$purchases,'customer'=>$customer]);\n $email->template('330de7c4-3d1c-47b5-9f48-ca376cbbea99');\n }\n else\n {\n //info to send by email content\n $email->body('receipt',['rows'=>$rows_html,'totals'=>$totals_html,'banners'=>$banners,'top'=>$top_copy]);\n $email->template('98066597-4797-40bf-b95a-0219da4ca1dc');\n }\n $email->send();\n }\n }\n //clean up and return\n foreach(array_merge($pdf_receipts,$pdf_tickets) as $link)\n if(file_exists($link)) unlink($link);\n return $response;\n }\n else return false;\n } catch (Exception $ex) {\n return false;\n }\n }", "function cmdeals_pay_for_order_customer_notification( $the_order ) {\n\t\n\tglobal $order_id, $order, $email_heading;\n\t\n\t$order = $the_order;\n\t$order_id = $order->id;\n\t\n\t$email_heading = sprintf(__('Invoice for Order #%s', 'cmdeals'), $order_id);\n\n\t$subject = sprintf(__('[%s] Pay for Order', 'cmdeals'), get_bloginfo('name'));\n\n\t// Buffer\n\tob_start();\n\t\n\t// Get mail template\n\tcmdeals_get_template('emails/customer_pay_for_order.php', false);\n\t\n\t// Get contents\n\t$message = ob_get_clean();\n\n\t// Send the mail\t\n\tcmdeals_mail( $order->user_email, $subject, $message );\n}", "function send_reminder($invoice_id,$user_id) {\n $db = $this->connect_db();\n $user_details = $db->get_where( 'crm_accounts' , array('id'=>$user_id,'school_id'=>$this->school_id) )->result_array();\n $user_details = array_shift($user_details);\n $user_details['parent_email'];\n $message = \"Greetings,<br>\n This is a billing reminder that your invoice no. \".$invoice_id.\" \nIf you have any questions or need assistance, please don't hesitate to contact us.\nBest Regards,\";\n $email_credentials = array(\n 'toemail' =>$user_details['parent_email'],\n 'ccemail' =>'',\n 'bccemail' =>'sharadtechnologies@gmail.com',\n 'subject' =>'Fee Reminder Notification',\n 'message' =>$message,\n 'toname' =>$user_details['company'],\n 'i_cid' =>$user_id,\n 'i_iid' =>$invoice_id\n );\n \n $post = $email_credentials;\n //echo print_r($post);exit;\n $url = \"http://\".CURRENT_IP_ADDR.\"/beta_ag/fi/?ng=finance_automata\";\n fire_api_by_curl($url,$post);\n }", "private function sendOutOfStockEmail($product_variation_id=''){\n $email_template = $this->common_model->get_row('email_templates', array('id'=>14));\n if(!empty($email_template)){\n\n $product_variations = $this->common_model->get_row('product_variations', array('product_variation_id' => $product_variation_id));\n if(!empty($product_variations)){\n $product_info = $this->common_model->get_row('products_info', array('product_info_id' => $product_variations->product_info_id));\n $seller_info = $this->common_model->get_row('users', array('user_id' => $product_variations->seller_id));\n if(!empty($product_info) && !empty($seller_info)){\n\n $productTypeName = ($product_variations->type_of_product==1) ? \"Single Product\" : \"Variation Product\"; \n //==-----------===Send Email==-----------\n if($email_template->template_email_enable==1){\n\n $userRole = 1; //for Seller\n $to = $seller_info->email;\n $param = array(\n 'site_name' => SITE_NAME,\n 'seller_name' => ucfirst($seller_info->user_name),\n 'product_title' => ucfirst($product_info->title),\n 'product_id' => $product_variations->product_ID,\n 'product_type' => $productTypeName,\n 'product_detail_link' => '<a target=\"_blank\" href=\"'.base_url('seller/products/edit_product_basic_info/'.$product_variations->product_info_id.'/'.$product_variations->product_variation_id.'/'.$product_variations->type_of_product).'\">Click here to view/edit the details of this product</a>'\n );\n $sendEmail = sendEmail($email_template, $to, $param, $userRole);\n\n\n $userRole = 0; //for Admin\n $adminEMAIl= get_option_url('EMAIl');\n $to = (!empty($adminEMAIl)) ? $adminEMAIl : SUPPORT_EMAIL;\n $param = array(\n 'site_name' => SITE_NAME,\n 'seller_name' => ucfirst($seller_info->user_name),\n 'product_title' => ucfirst($product_info->title),\n 'product_id' => $product_variations->product_ID,\n 'product_type' => $productTypeName,\n 'product_detail_link' => '<a target=\"_blank\" href=\"'.base_url('backend/products/edit_product_basic_info/'.$product_variations->product_info_id.'/'.$product_variations->product_variation_id.'/'.$product_variations->type_of_product).'\">Click here to view the details of this product</a>'\n );\n $sendEmailAdmin = sendEmail($email_template, $to, $param, $userRole);\n }\n\n //==-----------===Send SMS==-----------===\n if($email_template->template_sms_enable==1){\n\n $userRole = 1; //for Customer\n $to = ($seller_info->country_code) ? '+'.$seller_info->country_code.''.$seller_info->mobile : $seller_info->mobile;\n $param = array(\n 'site_name' => SITE_NAME,\n 'seller_name' => ucfirst($seller_info->user_name),\n 'product_title' => ucfirst($product_info->title),\n 'product_id' => $product_variations->product_ID,\n 'product_type' => $productTypeName,\n 'product_detail_link' => '<a target=\"_blank\" href=\"'.base_url('seller/products/edit_product_basic_info/'.$product_variations->product_info_id.'/'.$product_variations->product_variation_id.'/'.$product_variations->type_of_product).'\">Click here to view/edit the details of this product</a>'\n );\n $sendSMS = sendSMS($email_template, $to, $param, $userRole);\n\n\n $userRole = 0; //for Admin\n $to = get_option_url('PHONE');\n $param = array(\n 'site_name' => SITE_NAME,\n 'seller_name' => ucfirst($seller_info->user_name),\n 'product_title' => ucfirst($product_info->title),\n 'product_id' => $product_variations->product_ID,\n 'product_type' => $productTypeName,\n 'product_detail_link' => '<a target=\"_blank\" href=\"'.base_url('backend/products/edit_product_basic_info/'.$product_variations->product_info_id.'/'.$product_variations->product_variation_id.'/'.$product_variations->type_of_product).'\">Click here to view the details of this product</a>'\n );\n $sendSMSAdmin = sendSMS($email_template, $to, $param, $userRole);\n }\n\n }\n\n }\n }\n //-------------**For Send email AND SMS-----------\n\t}", "public function reference_in_mail($order, $sent_to_admin)\n {\n if($order->get_payment_method() == 'easypay_split') {\n global $wpdb;\n if (!$sent_to_admin) {\n // Log\n $this->log('A new mail for client');\n // Search entity, reference and value in database for this $order->get_id()\n $row = $wpdb->get_row( $wpdb->prepare(\n \"\n SELECT *\n FROM \" . $wpdb -> prefix . \"easypay_notifications\n WHERE t_key = %d;\n \",\n $order->get_id()\n ));\n if ($row != null) {\n // Do a log\n $result = 'Data correctly search from database:' . PHP_EOL;\n $result .= 'Order ID: ' . $order->get_id() . ';' . PHP_EOL;\n $result .= 'Entity: ' . $row->ep_entity . ';' . PHP_EOL;\n $result .= 'Value: ' . $row->ep_value . ';' . PHP_EOL;\n $result .= 'Reference: ' . $row->ep_reference . ';' . PHP_EOL;\n $this->log($result);\n // Output the reference, entity and value in email\n ?>\n <br/>\n <table cellspacing=\"0\" cellpadding=\"6\" style=\"width: 100%; border: 1px solid #eee;\" bordercolor=\"#eee\">\n <tr>\n <td colspan=\"5\">\n <img\n src=\"http://store.easyp.eu/img/easypay_logo_nobrands-01.png\"\n style=\"max-width:120px;\"\n title=\"Se quer pagar uma referência multibanco utilize a easypay\"\n alt=\"Se quer pagar uma referência multibanco utilize a easypay\"\n >\n </td>\n </tr>\n <tr>\n <td></td>\n <td></td>\n <td></td>\n <td><strong>Entidade: </strong></td>\n <td><?= $row->ep_entity ?></td>\n </tr>\n <tr>\n <td></td>\n <td></td>\n <td></td>\n <td><strong>Referência: </strong></td>\n <td><?= $row->ep_reference ?></td>\n </tr>\n <tr>\n <td></td>\n <td></td>\n <td></td>\n <td><strong>Valor: </strong></td>\n <td><?= $row->ep_value ?>&nbsp;&euro;</td>\n </tr>\n </table>\n <?php\n } else {\n $result = 'Error while search data in database:' . PHP_EOL;\n $result .= 'Order ID: ' . $order->get_id() . ';' . PHP_EOL;\n $this->log($result);\n die(\"Error while search data in database...\");\n }\n } else {\n // Log\n $this->log('A new mail for administrator');\n }\n }\n return;\n }", "public function toMail($notifiable)\n {\n\n\n $mail = new MailMessage();\n\n $templateId = Option::getValue('new_order_mail_template', 'orders');\n $template = get_mail_template_by_id($templateId, 'new_order');\n if ($template) {\n\n $carItems = $this->_getCartItemsTable($this->order->id);\n\n $twig = new \\MicroweberPackages\\View\\TwigView();\n\n $data = ['cart_items' => $carItems,\n 'order_status' => $this->order->order_status,\n 'email' => $this->order->email,\n 'first_name' => $this->order->first_name,\n 'last_name' => $this->order->last_name,\n 'phone' => $this->order->phone,\n 'id' => $this->order->id,\n 'order_id' => $this->order->id,\n 'amount' => $this->order->amount,\n 'transaction_id' => $this->order->transaction_id,\n 'shipping' => $this->order->shipping,\n 'shipping_service' => $this->order->shipping_service,\n 'currency' => $this->order->currency,\n 'currency_code' => $this->order->currency_code,\n 'country' => $this->order->country,\n 'city' => $this->order->city,\n 'state' => $this->order->state,\n 'zip' => $this->order->zip,\n 'address' => $this->order->address,\n 'address2' => $this->order->address2,\n 'is_paid' => $this->order->is_paid,\n 'url' => url('/'),\n 'created_at' => date('Y-m-d H:i:s')];\n\n $twig_settings = [\n 'autoescape' => false\n ];\n $parsedEmail = $twig->render($template['message'],\n $data,\n $twig_settings\n );\n\n //cart_items\n $mail->subject($template['subject']);\n $mail->view('app::email.simple', ['content' => $parsedEmail]);\n } else {\n $mail->line('Thank you for your order.');\n $mail->action('Visit our website', url('/'));\n }\n\n return $mail;\n }", "protected function sendToEmailJob() { }", "function send_product_linesheet($post_ary)\n\t{\n\t\t$recipients_name = $post_ary['recipients_name'];\n\t\t$email = $post_ary['email'];\n\t\t$bcc_email = $post_ary['bcc_email'];\n\t\t$comments_overall = $post_ary['comments_overall'];\n\t\t$w_prices = $post_ary['w_prices'];\n\t\t\n\t\t$sales_agent = ucfirst($this->session->userdata('admin_sales_user')).' '.ucfirst($this->session->userdata('admin_sales_lname'));\n\t\t$sales_email = $this->session->userdata('admin_sales_email');\n\t\t$from_email = 'info@basixblacklabel.com';\n\t\t\n\t\tif (ENVIRONMENT !== 'development')\n\t\t{\n\t\t\t// load library\n\t\t\t$this->load->library('email', $config);\n\t\t\t\n\t\t\tif (ENVIRONMENT === 'development')\n\t\t\t{\n\t\t\t\t$this->email->set_crlf(\"\\r\\n\"); // ---> some code to fix the email sending\n\t\t\t\t$this->email->set_newline(\"\\r\\n\"); // ---> some code to fix the email sending\n\t\t\t}\n\t\t\t\n\t\t\t// from site info email\n\t\t\t//$this->email->from($from_email, 'Basix Black Label');\n\t\t\t$this->email->from($sales_email, $sales_agent);\n\t\t\t\n\t\t\t// from site info email\n\t\t\t$this->email->reply_to($sales_email, $sales_agent);\n\t\t\t\n\t\t\t// subject\n\t\t\t$this->email->subject('Basix Black Label Products');\n\t\t\t\n\t\t\t$this->email->to($email); // ----> recipients email\n\t\t\t//$this->email->to($this->config->item('dev1_email')); // ----> for debugging purposes\n\t\t\t\n\t\t\t$this->email->cc($sales_email); // copy of sender\n\t\t\t\n\t\t\t$bcc_list = array($bcc_email, $this->config->item('dev1_email'), $this->config->item('dev2_email'), 'joe@innerconcept.com');\n\t\t\t$this->email->bcc($bcc_list);\n\t\t\t\n\t\t\t// access default message content\n\t\t\trequire ('sa_email_template.php');\n\t\t\t\n\t\t\t// content\n\t\t\t$this->email->message($email_content);\n\t\t\t\n\t\t\t// attachment\n\t\t\tforeach ($this->cart->contents() as $item):\n\t\t\t\t$item_no = $item['id'];\n\t\t\t\t$this->email->attach($item['options']['image_url'].'product_linesheet/'.$item_no.'.jpg');\n\t\t\tendforeach;\n\t\t\t\n\t\t\tif ( ! $this->email->send())\n\t\t\t{\n\t\t\t\techo \"Email was not sent!\";\n\t\t\t\tif (ENVIRONMENT == 'development')\n\t\t\t\t{\n\t\t\t\t\techo br().$this->email->print_debugger();\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// --> debugging purposes\n\t\t\t\n\t\t\t// access default message content\n\t\t\trequire ('sa_email_template.php');\n\t\t\techo $w_prices.'<br />';\n\t\t\techo $email_content;\n\t\t\tdie();\n\t\t}\n\t\t\n\t\t// will need to add a log function before destroying cart\n\t\t$this->log_sales_package($post_ary);\n\t\t\n\t\t// destroy cart\n\t\t$this->cart->destroy();\n\t}", "public function sendEmail3() {\n $prodid=request('item');\n $prod=\\App\\Product::where('id',$prodid)->get(['name','price']);\n $email=request('email');\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)===false) {\n $sender=request('name');\n // E-mail sender:\n \\Mail::to($email)->send(new ContactMail('','',\n \"Hi {$sender}.\n \n Thank you for your interest in {$prod[0]->name} I am selling for &pound;{$prod[0]->price}.\n \n I will be in contact asap.\"));\n\n // Send one to me:\n $email2=\\App\\Content::where('name','email')->get(['content']);\n \\Mail::to($email2[0]->content)->send(new ContactMail($sender,$email,\n \"{$sender} has made contact via their e-mail address regarding {$prod[0]->name}\"));\n }\n }", "public function send_doi_mail($sweepstake_id='',$email_data=array()) {\n $status=false;\n if($sweepstake_id>0 && !empty($email_data) && isset($email_data['lead_info_id']) && $email_data['lead_info_id']>0 && isset($email_data['email']) && $email_data['email']!='') {\n $lead_info_id=$email_data['lead_info_id'];\n $email=$email_data['email'];\n $salutation=isset($email_data['salutation']) ? $email_data['salutation'] : \"\";\n $first_name=isset($email_data['first_name']) ? $email_data['first_name'] : \"\";\n $last_name=isset($email_data['last_name']) ? $email_data['last_name'] : \"\";\n\n $sweepstake_details=$this->CI->sweepstake_model->get_sweepstake_admin_configuration_details($sweepstake_id);\n $doi_configuration_email_template_id=isset($sweepstake_details[0]['doi_configuration_email_template_id']) ? $sweepstake_details[0]['doi_configuration_email_template_id'] : 0;\n if($doi_configuration_email_template_id>0) {\n $doi_details=$this->CI->global_management_model->get_doi_configuration_details($doi_configuration_email_template_id);\n if(!empty($doi_details)) {\n $mail_data=array();\n $subject=$doi_details[0]['subject'];\n $from_email=$doi_details[0]['sender_email'];\n $mail_data['message']=$doi_details[0]['email_body'];\n $mail_data['sender_name']=$doi_details[0]['sender_name'];\n $mail_data['salutation']=$salutation;\n $mail_data['first_name']=$first_name;\n $mail_data['last_name']=$last_name;\n\n $sweepstake_url=base_url();\n $user_id=$email_data['user_id'];\n $activation_code=$email_data['activation_key'];\n $total_email_ids=$email_data['total_email_ids'];\n $converted_last_modified_date=$email_data['last_date_modified']->sec; // to know for which email DOI has been updated\n $imprint_url=$sweepstake_url.\"sweepstakes/publish_sweepstake/publish/\".$sweepstake_id.\"-\".$this->country.\"/\".\"imprint_\".$sweepstake_id.\"_1.php\";\n $activation_link=$sweepstake_url.\"sweepstakes/publish_sweepstake/register_user/\".$sweepstake_id.\"/doi_page/\".$user_id.\"/\".$activation_code.\"/\".$total_email_ids.\"/\".$converted_last_modified_date.\"/\".$this->country;\n $unsubscribe_link=$sweepstake_url.\"sweepstakes/publish_sweepstake/unsubscribe/\".$sweepstake_id.\"/\".$user_id.\"/\".$activation_code.\"/\".$total_email_ids.\"/\".$this->country;\n $mail_data['imprint_url']=$imprint_url;\n $mail_data['activation_link']=$activation_link;\n $mail_data['unsubscribe_link']=$unsubscribe_link;\n\n $response=$this->CI->custom_email->send_mail($from_email,$email,\"\",\"\",$subject,$mail_data);\n //Rohit=> 1513->Storing SES Response in table\n ses_mail_tracker($this->country,'doi_email',$email,$lead_info_id,$response);\n $status=true;\n }\n }\n }\n return $status;\n }", "public function sendInvoiceByMail()\r\n\t{\r\n $mails = array();\r\n $contactos = \"\";\r\n foreach (Input::get('contactos') as $key => $con) {\r\n if(isset($con['checked'])){\r\n array_push($mails, $con['mail']);\r\n $contactos.= \"<br><b>\".$con['name'].\"</b> - \".$con['mail'];\r\n }\r\n }\r\n //return 0;\r\n $invoices = Invoice::where('account_id',Auth::user()->account_id)->orderBy('public_id', 'DESC')->get();\r\n $this->sendInvoiceToContact(Input::get('id'),Input::get('date'),Input::get('nit'),$mails);\r\n if($contactos!=\"\"){\r\n $this->addNote(Input::get('id'), \"<b>Enviada</b> - \".Auth::user()->first_name.\" \".Auth::user()->last_name.\": La factura ah sido enviada exitosamente a: \".$contactos,2);\r\n \t//Session::flash('message',\"Enviado corréctamente\");\r\n \t}\r\n \t//else\r\n //\t\tSession::flash('error',\"No ingresó el mail del remitente\");\r\n return View::make('factura.index', array('invoices' => $invoices));\r\n\t}", "function dms_send_mail_to_customer_on_rest_accepted( $order_id ){\n\t$order \t\t\t= wc_get_order( $order_id );\n\t$custom_email \t= $order->billing_email;\n\t$shipping_items = $order->get_items( 'shipping' );\n\t$restaurant \t= get_field( \"dms_order_restaurant\", $order_id );\n\t$restaurant_id \t= $restaurant[\"ID\"];\n\n\t$time_extra \t\t\t= get_field( \"dms_order_time_extra\", $order_id );\n\t$time_extra_default \t= ( get_field( 'dms_restaurant_time', \"user_\" . $restaurant_id ) ) ? get_field( 'dms_restaurant_time', \"user_\" . $restaurant_id ) : 0;\n\t$time_extra_delivery \t= 15;\n\n\t$email_from = \"info@zascomidaentuboca.com\";\n\t$email_bcc \t= \"\";\n\n\t$subject = \"Tu pedido #\" . $order_id . \" ha sido aceptado.\";\n\t$message = \"El restaurante ha aceptado tu pedido y procederá a prepararlo.\";\n\n\tforeach( $shipping_items as $el ){\n\t\t$order_shipping_method_id = $el['method_id'];\n\t}\n\n\tif( $order_shipping_method_id == \"local_pickup\" ){\n\t\t$time_extra_full = intval( $time_extra ) + intval( $time_extra_default );\n\t\t$message \t\t.= \"<br/>Lo podrás recoger aproximadamente en \" . $time_extra_full . \" minutos.\";\n\t}else{\n\t\t$time_extra_full = intval( $time_extra ) + intval( $time_extra_default ) + intval( $time_extra_delivery );\n\t\t$message \t\t.= \"<br/>Lo tendras en casa aproximadamente en \" . $time_extra_full . \" minutos.\";\n\n\t\t$restaurant_delivery_id = get_field( \"dms_restaurant_delivery\", \"user_\" . $restaurant_id );\n\t\tif( true == get_field( \"dms_delivery_delay\", $restaurant_delivery_id ) ){\n\t\t\t$message .= \"<br/><br/>AVISO: \" . get_field( \"dms_delivery_delay_text\", $restaurant_delivery_id );\n\t\t}\n\t}\n\n\tglobal $dms_emails;\n\t$dms_emails->send( $subject, \"ZAS Comida en tu boca\", $email_from, $email_bcc, $custom_email, $message );\n}", "public function sendInvoice($ID_SUBSCRIPTION)\n\t{\n\n\t}", "function send_receipt($recipient_email, $payment_id, $amount) {\n\t\n\t\t$message = \"We have received your payment for $\".sprintf(\"%02.2f\", $amount).\". Your transaction reference number, should you have any enquiries, is: $payment_id.\";\n\n\t\t$bcc = bloginfo('admin_email');\n\n\t\twp_mail($recipient_email, \"Your payment receipt\", $message, array(\"Bcc: $bcc\"));\n\t\n\t}", "function sendMailForOrder()\r\n\t\t{\r\n\t\t\tglobal $CFG,$objSmarty;\r\n\t\t\t$header_info =$this->getHeadercontent($this->filterInput($_SESSION['domain_id']));\r\n\t\t \t$shipping_address = $this->filterInput($_SESSION['address']);\r\n\t\t\t$shipping_city= $this->filterInput($_SESSION['city']);\r\n\t\t\t$shipping_state=$this->filterInput($_SESSION['state']);\r\n\t\t\t$shipping_country=$this->filterInput($_SESSION['country']);\r\n\t\t\t$shipping_zip=$this->filterInput($_SESSION['zipcode']);\r\n\t\t\t$billing=$this->getStoreInfoForMail($this->filterInput($_SESSION['domain_id'])); \r\n\t\t\t$billing_companyname=$this->filterInput($billing[0]['company_name']);\r\n\t\t\t$billing_street=$this->filterInput($billing[0]['street']);\r\n\t\t\t$billing_postal=$this->filterInput($billing[0]['postal']);\r\n\t\t\t$billing_country=$this->filterInput($billing[0]['country']);\r\n\t\t\t$billing_state=$this->filterInput($billing[0]['state']);\r\n\t\t\t$footer_info =$this->getFootercontent($this->filterInput($_SESSION['domain_id']));\r\n\t\t\t$product_name=$this->getProductName($this->filterInput($_SESSION['product_id']));\r\n\t\t\t$order_id=$this->getOrderId($this->filterInput($_SESSION['product_id']));\r\n\t\t\t$sale_price=$this->filterInput($_SESSION['sale_price']);\r\n\t\t\t$shipping_price=$this->filterInput($_SESSION['ship_value']);\r\n\t\t\t$tax=$this->getTaxRate($this->filterInput($_SESSION['domain_id']));\r\n\t\t\t$to_email=$this->getEmail($this->filterInput($_SESSION['domain_id']));\r\n\t\t\t$from_email=$this->getAdminEmail($this->filterInput($_SESSION['domain_id']));\r\n\t\t\t$total=$this->filterInput($shipping_price)+$this->filterInput($tax);\r\n\t\t \t$from_name \t\t\t= $CFG['site']['site_main_domain'];\r\n\t\t\t$mailsubject = $CFG['site']['sitename'].\" Order Confirmation Mail\";\r\n\t\t\t$mail_content = $this->readfilecontent($CFG['site']['emailtpl_path'].\"/emailOrderConfirmation.tpl\");\r\n\t $mail_content = str_replace('{SITE_URL}',$CFG['site']['base_url'],$mail_content);\r\n\t $mail_content = str_replace('{SITE_TITLE}',$CFG['site']['site_main_domain'],$mail_content);\r\n\t $mail_content = str_replace('{SITE_LOGO}',$CFG['site']['logoname'],$mail_content);\r\n\t $mail_content = str_replace('{HEADER}',$header_info,$mail_content);\r\n\t $mail_content = str_replace('{FOOTER}',$footer_info,$mail_content);\r\n\t $mail_content = str_replace('{ORDER_ID}',$order_id,$mail_content);\r\n\t $mail_content = str_replace('{SHIPPING_ADDRESS}',$shipping_address,$mail_content);\r\n\t $mail_content = str_replace('{SHIPPING_CITY}',$shipping_city,$mail_content);\r\n\t $mail_content = str_replace('{SHIPPING_COUNTRY}',$shipping_country,$mail_content);\r\n\t $mail_content = str_replace('{SHIPPING_STATE}',$shipping_state,$mail_content);\r\n\t $mail_content = str_replace('{SHIPPING_ZIP}',$shipping_zip,$mail_content);\r\n\t $mail_content = str_replace('{BILLING_COMPANY}',$billing_companyname,$mail_content);\r\n\t $mail_content = str_replace('{BILLING_STREET}',$billing_street,$mail_content);\r\n\t $mail_content = str_replace('{BILLING_POSTAL}',$billing_postal,$mail_content);\r\n\t $mail_content = str_replace('{BILLING_COUNTRY}',$billing_country,$mail_content);\r\n\t $mail_content = str_replace('{BILLING_STATE}',$billing_state,$mail_content);\r\n\t $mail_content = str_replace('{PRODUCT_NAME}',$product_name,$mail_content);\r\n\t $mail_content = str_replace('{SALE_PRICE}',$sale_price,$mail_content);\r\n\t $mail_content = str_replace('{SHIPPING_PRICE}',$shipping_price,$mail_content);\r\n\t $mail_content = str_replace('{TAX}',$tax,$mail_content);\r\n\t $mail_content = str_replace('{TOTAL}',$total,$mail_content);\r\n\t //echo $from_email;\r\n\t\t\t//echo '<br>';\r\n\t\t\t//echo $to_email; \r\n\t\t\t//echo '<br>';\r\n\t //echo $mail_content;die();\r\n\t\t\t//$ok=$this->sendMail('Webbxyz',$from_email,$to_email,$mailsubject,$mail_content);\r\n\t\t\t$ok=1;\r\n\t\t \tif($ok)\r\n\t\t\t\t{\r\n\t\t\t\t \t$reciever_email\t=\t$this->filterInput($from_email);\r\n\t\t\t\t\t$sender_email\t=\t$this->filterInput($to_email);\r\n\t\t\t\t \t$mail_content = $this->readfilecontent($CFG['site']['emailtpl_path'].\"/emailOrderConfirmation.tpl\");\r\n\t\t\t $mail_content = str_replace('{SITE_URL}',$CFG['site']['base_url'],$mail_content);\r\n\t\t\t $mail_content = str_replace('{SITE_TITLE}',$CFG['site']['site_main_domain'],$mail_content);\r\n\t\t\t $mail_content = str_replace('{SITE_LOGO}',$CFG['site']['logoname'],$mail_content);\r\n\t\t\t $mail_content = str_replace('{HEADER}',$header_info,$mail_content);\r\n\t\t\t $mail_content = str_replace('{FOOTER}',$footer_info,$mail_content);\r\n\t\t\t $mail_content = str_replace('{SHIPPING_ADDRESS}',$shipping_address,$mail_content);\r\n\t\t\t $mail_content = str_replace('{SHIPPING_CITY}',$shipping_city,$mail_content);\r\n\t\t\t $mail_content = str_replace('{SHIPPING_COUNTRY}',$shipping_country,$mail_content);\r\n\t\t\t $mail_content = str_replace('{SHIPPING_STATE}',$shipping_state,$mail_content);\r\n\t\t\t $mail_content = str_replace('{SHIPPING_ZIP}',$shipping_zip,$mail_content);\r\n\t\t\t $mail_content = str_replace('{BILLING_COMPANY}',$billing_companyname,$mail_content);\r\n\t\t\t $mail_content = str_replace('{BILLING_STREET}',$billing_street,$mail_content);\r\n\t\t\t $mail_content = str_replace('{BILLING_POSTAL}',$billing_postal,$mail_content);\r\n\t\t\t $mail_content = str_replace('{BILLING_COUNTRY}',$billing_country,$mail_content);\r\n\t\t\t $mail_content = str_replace('{BILLING_STATE}',$billing_state,$mail_content);\r\n\t\t\t $mail_content = str_replace('{PRODUCT_NAME}',$product_name,$mail_content);\r\n\t\t\t $mail_content = str_replace('{SALE_PRICE}',$sale_price,$mail_content);\r\n\t\t\t $mail_content = str_replace('{SHIPPING_PRICE}',$shipping_price,$mail_content);\r\n\t\t\t $mail_content = str_replace('{TAX}',$tax,$mail_content);\r\n\t\t\t $mail_content = str_replace('{TOTAL}',$total,$mail_content);\r\n\t\t\t //echo $reciever_email;\r\n\t\t\t\t\t//echo '<br>';\r\n\t\t\t\t\t//echo $sender_email; \r\n\t\t\t\t\t//echo '<br>';\r\n\t\t\t\t\t//echo $mail_content;die();\r\n\t\t\t\t\t$ok=$this->sendMail($to_name,$sender_email,$reciever_email,$mailsubject,$mail_body);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t \t\t\t\t\t\r\n\t\t}", "function wdm_send_order_to_ext( $order_id ){\nrequire_once ('/var/www/pw.php');\n\n // get order object and order details\n $order = new WC_Order( $order_id );\n $userEmail = $order->billing_email;\n $phone = $order->billing_phone;\n\t\t//$name = $order->get_billing_first_name();\n $shipping_type = $order->get_shipping_method();\n $shipping_cost = $order->get_total_shipping();\n\n // set the address fields\n $user_id = $order->user_id;\n $address_fields = array(\n\t\t\t\t'country',\n 'title',\n 'first_name',\n 'last_name',\n 'company',\n 'address_1',\n 'address_2',\n 'address_3',\n 'address_4',\n 'city',\n 'state',\n 'postcode');\n\n $address = array();\n if(is_array($address_fields)){\n foreach($address_fields as $field){\n $address['billing_'.$field] = get_user_meta( $user_id, 'billing_'.$field, true );\n $address['shipping_'.$field] = get_user_meta( $user_id, 'shipping_'.$field, true );\n }\n }\n\n // get coupon information (if applicable)\n $cps = array();\n $cps = $order->get_items( 'coupon' );\n\n $coupon = array();\n foreach($cps as $cp){\n // get coupon titles (and additional details if accepted by the API)\n $coupon[] = $cp['name'];\n }\n\n // get product details\n $items = $order->get_items();\n\n $item_name = array();\n $item_qty = array();\n $item_price = array();\n $item_sku = array();\n\n foreach( $items as $key => $item){\n $item_name[] = $item['name'];\n $item_qty[] = $item['qty'];\n $item_price[] = $item['line_total'];\n\n $item_id = $item['product_id'];\n $product = new WC_Product($item_id);\n $item_sku[] = $product->get_sku();\n }\n\n /* for online payments, send across the transaction ID/key. If the payment is handled offline, you could send across the order key instead */\n $transaction_key = get_post_meta( $order_id, '_transaction_id', true );\n $transaction_key = empty($transaction_key) ? $_GET['key'] : $transaction_key;\n\n // to test out the API, set $api_mode as ‘sandbox’\n\t//$api_mode = 'sandbox';\n\tif($api_mode == 'sandbox'){\n\t\t\t// sandbox URLs\n\t\t\t$sessionEndpoint = \"api-testing-endpoint.com\";\n\t\t\t$usersEndpoint = \"api-testing-endpoint.com\";\n\t}\n\telse{\n\t\t\t// production URLs\n\t\t\t$sessionEndpoint = \"http://localhost:8082/api/session\";\n\t\t\t$usersEndpoint = \"http://localhost:8082/api/users\";\n\t}\n\n\t\t\t// Password generator code\n\t\t\t// needs to be changed to hashing method for security.\n\t\t\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t\t\t$userPassword = substr(str_shuffle($chars), 0, 10);\n\n \t\t\t// setup the data which has to be sent\n\t\t\t$data = json_encode(array(\n\n\t\t\t\t\t'attributes' => array('speedUnit' => 'kmh'),\n\t\t\t\t\t'name' => $address['billing_first_name'],\n\t\t\t\t\t'email' => $userEmail,\n\t\t\t\t\t'phone' => $phone,\n\t\t\t\t\t'readonly' => false,\n\t\t\t\t\t'administrator' => false,\n\t\t\t\t\t'map' => 'osm',\n\t\t\t\t\t'latitude' => 0,\n\t\t\t\t\t'longitude' => 0,\n\t\t\t\t\t'zoom' => 0,\n\t\t\t\t\t'twelveHourFormat' => false,\n\t\t\t\t\t'coordinateFormat' => 'dd',\n\t\t\t\t\t'disabled' => false,\n\t\t\t\t\t'expirationTime' => null,\n\t\t\t\t\t'deviceLimit' => -1,\n\t\t\t\t\t'userLimit' => 0,\n\t\t\t\t\t'deviceReadonly' => false,\n\t\t\t\t\t'limitCommands' => false,\n\t\t\t\t\t'poiLayer' => '',\n\t\t\t\t\t'password' => $userPassword\n\n\t\t\t));\n\n // Send the API commands to Traccar using CURL.\n\n\t\t// Create session for Traccar\n\t\t$ch = curl_init();\n\n\t\tcurl_setopt($ch, CURLOPT_URL, $sessionEndpoint);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));\n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, \"/tmp/cookieFileName\");\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, 'email='.$adminEmail.'&password='.$adminPassword);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\n\t\t$response = curl_exec ($ch);\n\n \tcurl_close ($ch);\n\n\n\t\t// Log into Traccar and create a new user, using the session created above.\n\n\t\t$ch = curl_init();\n\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, \"/tmp/cookieFileName\");\n\t\tcurl_setopt($ch, CURLOPT_URL, $usersEndpoint);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\n\t\t$response = curl_exec ($ch);\n\n\t\tcurl_close ($ch);\n\n // the handle response\n if (strpos($response,'ERROR') !== false) {\n print_r($response);\n } else {\n // success\n }\n\n\t\t\t\t// Send username/password over email.\n // This email should only be sent if the email/account does not appear within traccar.\n // Work in progress.\n\t\t\t\trequire_once \"Mail.php\";\n \n $traccarAdminEmail = \"hello@hellohello.com\"\n\n\t\t\t $from = $traccarAdminEmail;\n\t\t\t $to = $userEmail;\n\t\t\t $subject = \"Thankyou for signing up to the Traccar Tracking Portal\";\n\t\t\t $body = \"Hello \".$userEmail.\",\\n\\nThank you for signing up to the Traccar Portal\\n\\nYour log in details are below\\n\\nTraccar Portal: https://your.portal.com \\n\\nLogin: \".$userEmail.\"\\n\\nPassword: \".$userPassword;\n\n\t\t\t $headers = array\n\t\t\t\t\t('From' => $from,\n\t\t\t 'To' => $to,\n\t\t\t 'Subject' => $subject);\n\t\t\t $smtp = Mail::factory('smtp',\n\t\t\t array ('host' => $host,\n\t\t\t 'port' => $port,\n\t\t\t 'auth' => true,\n\t\t\t 'username' => $username,\n\t\t\t 'password' => $password));\n\n\t\t\t $mail = $smtp->send($to, $headers, $body);\n\n\t\t\t if (PEAR::isError($mail)) {\n\t\t\t echo(\"<p>\" . $mail->getMessage() . \"</p>\");\n\t\t\t } else {\n\t\t\t echo(\"<p>Message successfully sent!</p>\");\n\t\t\t }\n }", "private function sentEmail(){\n }", "public function send()\n {\n $published_contracts = $this->contract->all();\n $subscribers = $this->subscriber->all();\n $this->createEmailReport($subscribers, $published_contracts);\n }", "public function send_by_email($attachments, $email_type = null, $order = null)\n {\n // Check if required properties were passed from WooCommerce\n if (!isset($email_type) || !isset($order->id)) {\n return $attachments;\n }\n\n // Allow developers to cancel attaching invoices (e.g. to only send invoices with certain payment methods)\n if (!apply_filters('woo_pdf_send_by_email', true, $order, $email_type, $attachments)) {\n return $attachments;\n }\n\n // Is this manual customer invoice email?\n if ($email_type == 'customer_invoice') {\n\n // Check if we already have regular invoice for this order\n $invoice_id = get_post_meta($order->id, 'woo_pdf_invoice_id', true);\n\n // We do not have invoice - send proforma\n if (empty($invoice_id)) {\n if ($this->opt['woo_pdf_proforma_enabled']) {\n $manual_customer_processing_order = true;\n }\n }\n // Send regular\n else {\n $manual_customer_completed_order = true;\n }\n }\n\n // Send to admin?\n if ($email_type == 'new_order' && $this->opt['woo_pdf_attach_to_new_order']) {\n $admin_new_order_email = true;\n }\n\n // Attach regular invoice\n if ($this->opt['woo_pdf_enabled'] && ($email_type == 'customer_completed_order' || isset($manual_customer_completed_order))) {\n\n // Check if \"Send by email\" is enabled\n if (!$this->opt['woo_pdf_send_email'] && !isset($manual_customer_completed_order)) {\n return $attachments;\n }\n\n // Get invoice details\n $invoice = $this->get_invoice($order->id);\n\n // Get invoice path\n $upload_dir = wp_upload_dir();\n $location = $upload_dir['basedir'] . '/' . 'woocommerce_pdf_invoices';\n $invoice_path = $location . '/' . $invoice['code'] . '.pdf';\n\n $original_file = file_get_contents($invoice_path);\n\n // Use our own /tmp directory to store a copy (to avoid open_basedir / safe_mode errors)\n $temp_location = $location . '/' . 'tmp';\n if (!file_exists($temp_location)) {\n mkdir($temp_location, 0755, true);\n }\n\n // Create temporary file with human-readable file name\n $file_name = _x($this->opt['woo_pdf_title_filename_prefix'], 'file name prefix', 'woo_pdf') . ($invoice['prefix'] != '' ? $invoice['prefix'] . '_' : '') . $invoice['id'] . ($invoice['suffix'] != '' ? '_' . $invoice['suffix'] : '') . '.pdf';\n $temp_file = $temp_location . '/' . $file_name;\n\n // Push to attachments\n if (file_put_contents($temp_file, $original_file)) {\n if (gettype($attachments) == 'string') {\n if ($attachments == '') {\n $attachments = $temp_file;\n }\n else {\n $attachments = PHP_EOL . $temp_file;\n }\n }\n else if (gettype($attachments) == 'array') {\n array_push($attachments, $temp_file);\n }\n }\n\n // Make sure to delete temporary file\n register_shutdown_function(array($this, 'delete_email_file'), $temp_file);\n\n }\n\n // Else attach proforma invoice\n else if ($this->opt['woo_pdf_proforma_enabled'] && ($email_type == 'customer_processing_order' || isset($manual_customer_processing_order) || isset($admin_new_order_email))) {\n\n if (!$this->opt['woo_pdf_send_proforma_email'] && !isset($manual_customer_processing_order) && !isset($admin_new_order_email)) {\n return $attachments;\n }\n\n // Get (temporary) proforma invoice path\n $proforma_path = $this->get_proforma($order->id);\n\n // Push to attachments\n if ($proforma_path) {\n if (gettype($attachments) == 'string') {\n if ($attachments == '') {\n $attachments = $proforma_path;\n }\n else {\n $attachments = PHP_EOL . $proforma_path;\n }\n }\n else if (gettype($attachments) == 'array') {\n array_push($attachments, $proforma_path);\n }\n }\n\n // Make sure to delete temporary file\n register_shutdown_function(array($this, 'delete_email_file'), $proforma_path);\n }\n\n return $attachments;\n }", "private function send_email ()\n\t\t{\n\t\t}", "public function send_receipt($id){\n $data = Transaction::where('transaction_number', $id)->first();\n $request = new Request();\n $request->request->add(['status', $data->transaction_status]);\n $pdf = $this->print($request,$data->transaction_number,'PDF',1);\n $pdf2 = $this->print_itinerary($request,1, $data->planning->id,'PDF',1);\n Mail::to($data->customer->email)->send(new TransactionMail($data));\n return redirect('transaction/'.$data->transaction_number)->with('message','Send Receipt Email Successfull');\n }", "function paymentStatusEmail($paymentId){\r\n\t\t\t$payment = new payment();\t\r\n\t\t\t$payment->selectOne($paymentId);\t\r\n\t\t\t\r\n\t\t\tpesoFormat($payment->getprice()); \r\n\t\t\t\r\n\t\t\t//properties\r\n\t\t\t$properties = new properties();\t\r\n\t\t\t$properties->selectOne($payment->getproperties_id());\r\n\t\t\t \r\n\t\t\t//get ticket\r\n\t\t\t$ticket = new ticket();\t\t\t\t\r\n\t\t\t$ticket->selectOne($payment->getticket_id());\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//user\r\n\t\t\t$userId = new user();\t\r\n\t\t\t$userId->selectOne($payment->getuser_id());\r\n\t\t\t\r\n\t\t\t//get from ticket\r\n\t\t\t$pbfr = new pbfr();\t\r\n\t\t\t$pbfr->selectOne($ticket->getpbfr_id());\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$mailCustomer = new PHPMailer;\r\n\t\t\t$mailCustomer->From = fromSystemEmail;\r\n\t\t\t$mailCustomer->FromName = 'Suntrust';\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t$mailCustomer->addAddress($userId->getemail()); //send to customer\r\n\t\t\t$mailCustomer->isHTML(true);// Set email format to HTML\t\t\t\t\t\t\t\r\n\t\t\t$mailCustomer->Subject = 'Payment Information Notification';\r\n\t\t\t$mailCustomer->Body = '\r\n\t\t\t\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"http://suntrustph.com/images/logo.png\" class=\"suntrust\"> </br>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tYour payment option for '. $properties->gettitle() .' has been changed.\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t'. billCalcu($payment->getprice(),$payment->gettype_of_payment()) .'\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t</table>\t\t\t\r\n\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<table>\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tDetails\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tTracking Id :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $payment->getticket_id() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr> \r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tCustomer username :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $userId->getusername() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tCustomer Email :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $userId->getemail() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tProperty Name :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $properties->gettitle() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tProperty Unit Type :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $properties->getunit_type() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tProperty location :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $properties->getlocation() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tProperty Price :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . pesoFormat($properties->getprice()) .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tBuilding :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $pbfr->getbuilding() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tFloor :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $pbfr->getfloor() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tRoom :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . $pbfr->getroom() .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\tDate Updated :\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t' . date('Y-m-d H:i:s') .'\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\t\r\n\t\t\t\t\t\t\t\t\t</table>\r\n\r\n\t\t\t\t\t\t\t\t\t</br></br>\r\n\t\t\t\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"http://suntrustph.com/images/iconbox.jpg\" class=\"suntrust\">\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t&nbsp;Copyright 2015. Suntrust Properties, Inc. All Rights Reserved.\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</tr>\t\r\n\t\t\t\t\t\t\t\t\t</table>'\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t;\t\t\t\t\t\t\r\n\t\t\t\t$mailCustomer->send();\r\n\t\r\n\t}", "function sendAbandonedCartEmail($email, $orderId, $sender, $subject, $apiKey, $clientId, $cli) {\n\n\n if (!$orderId) {\n $cli->error(\"Cannot find $orderId for $email\");\n return false;\n }\n\n $order = eZOrder::fetch( $orderId );\n $siteaccess = getSiteAccessForOrder($order);\n $SAarray = explode('_', $siteaccess);\n if (in_array($SAarray[1], array('ca-en','ca-fr'))){\n $cli->error(\"Canadian order $orderId - skip email\");\n return false;\n }\n\n if ($siteaccess) {\n // switch to siteaccess of user in order to generate localized, internationalized, translated HTML\n eZSiteAccess::load(\n array( 'name' => $siteaccess,\n 'type' => eZSiteAccess::TYPE_STATIC,\n 'uri_part' => array()));\n $cli->notice(\"Switched to siteaccess $siteaccess\");\n } else {\n $cli->error(\"Cannot find a siteaccess for $orderId\");\n return false;\n }\n\n $cm_ini = eZINI::instance('campaign_monitor.ini');\n if($cm_ini->variable('AbandonedCartEmail', 'SendEmail') != 'enabled') {\n $cli->notice(\"Send for this siteaccess disabled in campaign_monitor.ini\");\n return false;\n }\n\n eZTemplate::resetInstance();\n $tpl = eZTemplate::factory();\n $tpl->setVariable( \"order\", $order );\n $locale = getLocaleForSiteAccess($siteaccess);\n $tpl->setVariable( \"locale\", $locale);\n\n $html = $tpl->fetch(EMAIL_TEMPLATE_NAME);\n if (!$html) {\n $cli->error(\"Could not render email for $email (siteaccess $siteaccess). This is probably because no design in that siteaccess includes \" . EMAIL_TEMPLATE_NAME);\n return false;\n }\n\n if ($tpl->hasVariable(\"subject\")) {\n $subject = $tpl->variable(\"subject\");\n }\n\n if (!$html) {\n $cli->notice(\"Error when rendering \" . EMAIL_TEMPLATE_NAME . \" . for email: $email. order ID: $orderId\");\n return false;\n }\n\n if (!$cli->isQuiet()) {\n $cli->notice(\"Sending Abandoned Cart Email to $email. Order ID: $orderId\");\n }\n\n $message = array(\n 'From' => $sender,\n 'ReplyTo' => null,\n 'To' => array(\n $email\n ),\n 'CC' => null,\n 'BCC' => null,\n 'Subject' => $subject,\n 'Html' => $html,\n 'Text' => null, // let campaign monitor autogenerate the text part from the HTML\n 'Attachments' => null\n );\n \n // send\n $campaignMonitorAPI = new CS_REST_Transactional_ClassicEmail($apiKey);\n $campaignMonitorAPI->set_client($clientId);\n $response = $campaignMonitorAPI->send($message, CAMPAIGN_MONITOR_GROUP);\n\n if (!$cli->isQuiet()) {\n $formattedResponse = print_r($response, true);\n $cli->notice(\"Response: $formattedResponse\");\n }\n\n return $response->http_status_code >= 200 && $response->http_status_code < 300;\n}", "function clpr_send_receipt( $order ) {\n\n\t$recipient = get_user_by( 'id', $order->get_author() );\n\n\t$items_html = '';\n\tforeach ( $order->get_items() as $item ) {\n\t\t$ptype_obj = get_post_type_object( $item['post']->post_type );\n\t\tif ( ! $ptype_obj->public )\n\t\t\tcontinue;\n\n\t\tif ( $order->get_id() != $item['post']->ID ) {\n\t\t\t$items_html .= html( 'p', html_link( get_permalink( $item['post']->ID ), $item['post']->post_title ) );\n\t\t} else {\n\t\t\t$items_html .= html( 'p', APP_Item_Registry::get_title( $item['type'] ) );\n\t\t}\n\t}\n\n\t$table = new APP_Order_Summary_Table( $order );\n\tob_start();\n\t$table->show();\n\t$table_output = ob_get_clean();\n\n\t$content = '';\n\t$content .= html( 'p', sprintf( __( 'Hello %s,', APP_TD ), $recipient->display_name ) );\n\t$content .= html( 'p', __( 'This email confirms that you have purchased the following items:', APP_TD ) );\n\t$content .= $items_html;\n\t$content .= html( 'p', __( 'Order Summary:', APP_TD ) );\n\t$content .= $table_output;\n\n\t$blogname = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );\n\t$subject = sprintf( __( '[%1$s] Receipt for your order #%2$d', APP_TD ), $blogname, $order->get_id() );\n\n\t$email = array( 'to' => $recipient->user_email, 'subject' => $subject, 'message' => $content );\n\t$email = apply_filters( 'clpr_email_user_receipt', $email, $order );\n\n\tappthemes_send_email( $email['to'], $email['subject'], $email['message'] );\n}", "private function _send_email_refund($product, $plan, $email, $transaction_id, $price)\n\t{\n\t\t$emailBodyHtml = \"\n\n\t\tThis is an automated message to confirm that a\n\t\trefund has been processed. <br><br>\n\n\t\tREFUND DETAILS: <br><br>\n\n\t\tProduct: $product - $plan <br>\n\t\tPrice: $\".$price.\" <br>\n\t\tTransaction ID: $transaction_id <br><br>\n\n\t\tNeed Product Support? <br><br>\n\n\t\t* If you have any issues or concerns, please create\n\t\ta support ticket at our help desk. <br><br>\n\n\t\tPlease visit: <br>\n\t\thttp://support.digitalkickstart.com <br><br>\n\n\t\t==================================================== <br>\n\t\tDO NOT REPLY TO THIS EMAIL <br>\n\t\tThis is an automated message from DigitalKickstart.com <br>\n\t\tSee http://www.digitalkickstart.com for more information.\";\n\t\n\t\t// Set POST variables\n\t\t$url = 'http://api.postmarkapp.com/email';\n\t\t\n\t\t$data = array(\n\t\t\t\"From\" => \"$product <\".Config::get('project.postmark_sender_email').\">\",\n\t\t\t\"To\" => \"$email\",\n\t\t\t\"Tag\" => \"Payment Refund\",\n\t\t\t\"Subject\" => \"$product Refund Confirmation\",\n\t\t\t\"HtmlBody\" => \"$emailBodyHtml\",\n\t\t\t\"ReplyTo\" => Config::get('project.postmark_sender_email')\n\t\t);\n\t\t\n\t\t$headers = array(\n\t 'Accept: application/json',\n\t 'Content-Type: application/json',\n\t 'X-Postmark-Server-Token: ' . Config::get('project.postmark_key')\n\t );\n\t\t\n\t\t// Open connection\n\t\t$ch = curl_init();\n\t\t\n\t\t// Set the url, number of POST vars, POST data\n\t\tcurl_setopt($ch,CURLOPT_URL, $url); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n\t curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));\n\t curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t\t\n\t\t// Execute post\n\t\t$result = curl_exec($ch);\n\t\t\n\t\t// Close connection\n\t\tcurl_close($ch);\n\t\t\n\t\treturn $result;\n\t}", "private function sendSendEmail($order_type){\n\t\tif($order_type == self::SERVICE_ORDER){\n\t\t\t$email = Mage::getModel('core/email_template')->loadDefault('sma_email_template');\n\t\t\t$email->setTemplateSubject('Order #' . $this->order->getIncrementId() .\n\t\t\t\t' SMA Information - ' . Mage::getStoreConfig('general/store_information/name'));\n\t\t}else{\n\t\t\t$email = Mage::getModel('core/email_template')->loadDefault('rma_email_template');\n\t\t\t$email->setTemplateSubject('Order #' . $this->order->getIncrementId() .\n\t\t\t\t' RMA Information - ' . Mage::getStoreConfig('general/store_information/name'));\n\t\t}\n\n\t\t$email_vars = array();\n\t\t$email_vars['store'] = $this->store;\n\t\t$email_vars['order'] = $this->order;\n\t\t$processedTemplate = $email->getProcessedTemplate($email_vars);\n\n\t\t$email->setSenderName(Mage::getStoreConfig('trans_email/ident_support/name'));\n\t\t$email->setSenderEmail(Mage::getStoreConfig('trans_email/ident_support/email'));\n\n\t\t$attachment = $email->getMail()->createAttachment($this->parsePdf(), 'application/pdf');\n\t\t$attachment->filename = 'Shipping_Instructions.pdf';\n\n\t\t$email->send($email_vars['order']->getData('customer_email'), $email_vars['order']->getCustomerName(), $email_vars); \n\t}", "function orderThankYouMail(){\n global $functions,$productClass,$dbF;\n $date = date('Y-m-d H:i:s',strtotime(\"-15 days\"));\n\n $saleTriggerLetter = 'orderThankYouMail';\n //get letter id\n $sql = \"SELECT id FROM email_letters WHERE `email_type` = '$saleTriggerLetter'\";\n $dataLetter = $dbF->getRow($sql);\n if(empty($dataLetter)){\n return false;\n }\n $letterId = $dataLetter['id'];\n\n //check is data has or not\n $sql = \"SELECT sender_name,sender_email,order_invoice_id\n FROM `order_invoice_info` WHERE order_invoice_id\n IN (SELECT order_invoice_pk FROM `order_invoice`\n WHERE invoice_date = '$date' ) GROUP BY order_invoice_id\";\n $data = $dbF->getRow($sql);\n if(empty($data)){\n return false;\n }\n\n $sql = \"INSERT INTO email_letter_queue(`letter_id`,`grp`,`email_name`,`email_to`,`p_id`,`status` )\n SELECT '$letterId','orderThankYouMail',sender_name,sender_email,order_invoice_id,'1'\n FROM `order_invoice_info` WHERE order_invoice_id\n IN (SELECT order_invoice_pk FROM `order_invoice`\n WHERE invoice_date = '$date' ) GROUP BY order_invoice_id\";\n $dbF->setRow($sql);\n if(!$dbF->rowCount){\n return false;\n }\n //run cron job\n $functions->cronJob();\n echo \"order ThankYouMail Execute Successfully <br>\";\n}", "private function sendCompletionNotice()\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n\n // make a copy so changes are local to this notice\n $aTplOpts = $this->aTplOpts;\n $aDeliveryOpts = $this->aDeliveryOpts;\n $aQueueOpts = $this->aQueueOpts;\n\n // template vars\n if($this->batchType == 'link') {\n $aDeliveryOpts['subject'] = $this->aDeliveryOpts['emailSubjectLink'];\n $aTplOpts['htmlTemplate'] = $this->aTplOpts['emailTemplateLink'];\n }\n\n $aTplOpts['invoiceList'] = $this->aInvoices;\n $aTplOpts['errorList'] = $this->aInvoices;\n $aTplOpts['totalErrors'] = $this->getTotalErrors();\n $aTplOpts['totalInvoices'] = $this->getTotalInvoices();\n\n // loop through the users and email each\n $users = $this->aUsers;\n foreach($users AS $userId => $userData) {\n\n $userName = $userData['invoiceUserName'];\n $email = $userData['invoiceUserEmail'];\n\n // check to see if the To properties have been overridden\n $aDeliveryOpts['toEmail'] = isset($aDeliveryOpts['simulateToEmail']) ? $aDeliveryOpts['simulateToEmail'] : $email;\n $aDeliveryOpts['toRealName'] = isset($aDeliveryOpts['simulateToRealName']) ? $aDeliveryOpts['simulateToRealName'] : $userName;\n\n\n $ok = SGL_Emailer2::send($aDeliveryOpts, $aTplOpts, $aQueueOpts);\n SGL::logMessage(var_export($aDeliveryOpts,true).var_export($aTplOpts,true).var_export($aQueueOpts,true),PEAR_LOG_DEBUG);\n if(PEAR::isError($ok)) {\n SGL::raiseError('Email Confirmation Notice Failed. '.$ok->getMessage().var_export($aDeliveryOpts,true));\n }\n\n }\n\n }", "private function sendwithSendgrid()\n\t{\n\n\t\tWP_Filesystem();\n\t\tglobal $wp_filesystem;\n\n\t\t$sengridSettings = json_decode(get_option(\"magicform_sendgrid_settings\"));\n\t\t$email = new \\SendGrid\\Mail\\Mail();\n\t\t$email->setFrom($sengridSettings->verifymailaddress,$this->sender);\n\t\t$email->setSubject($this->subject);\n\t\t// Add a recipient\n\t\tforeach ($this->to as $address) {\n\t\t\t$email->addTo($address);\n\t\t}\n\t\t\n\t\tif(is_array($this->cc) && count($this->cc)>0){\n\t\t\tforeach($this->cc as $address){\n\t\t\t\t$email->addCC($address);\n\t\t\t}\n\t\t}\n\n\t\tif(is_array($this->bcc) && count($this->bcc)>0){\n\t\t\tforeach($this->bcc as $address){\n\t\t\t\t$email->addBCC($address);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->isEmail($this->replyTo)) {\n\t\t\t$email->setReplyTo($this->replyTo);\n\t\t}\n\n\t\t$email->addContent(\"text/html\", $this->body);\n\n\t\t// Attachments\n\t\tforeach ($this->attachments as $attachment) {\n\t\t\tswitch ($attachment[\"type\"]) {\n\t\t\t\tcase \"generatedPdf\":\n\t\t\t\t\t$email->addAttachment(\n\t\t\t\t\t\t$wp_filesystem->get_contents($attachment[\"attachment\"]),\n\t\t\t\t\t\t\"application/pdf\",\n\t\t\t\t\t\t$attachment[\"filename\"],\n\t\t\t\t\t\t\"attachment\"\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"upload\":\n\t\t\t\t\t$file_encoded = $wp_filesystem->get_contents($attachment[\"attachment\"]);\n\t\t\t\t\t$email->addAttachment(\n\t\t\t\t\t\t$file_encoded,\n\t\t\t\t\t\t$attachment[\"mimetype\"],\n\t\t\t\t\t\t$attachment[\"filename\"],\n\t\t\t\t\t\t\"attachment\"\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\":\n\t\t\t\t\t$file_encoded = $wp_filesystem->get_contents($attachment[\"attachment\"]);\n\t\t\t\t\t$email->addAttachment(\n\t\t\t\t\t\t$file_encoded,\n\t\t\t\t\t\t$attachment[\"mimetype\"],\n\t\t\t\t\t\t$attachment[\"filename\"],\n\t\t\t\t\t\t\"attachment\"\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sendgrid = new \\SendGrid($sengridSettings->apikey);\n\t\ttry {\n\t\t\t$response = $sendgrid->send($email);\n\t\t\tif(strpos($response->statusCode(),\"20\")===0){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$responseBody = json_decode($response->body());\n\t\t\t\tif(isset($responseBody->errors) && is_array($responseBody->errors)){\n\t\t\t\t\tthrow new Exception(\"Sendgrid: \".$responseBody->errors[0]->message.\" \".$responseBody->errors[0]->field);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(\"Sendgrid: An error occurred\");\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception $e) \n\t\t{\n\t\t\tthrow new Exception($e->getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "public function sendInvoiceToClient(Request $request)\n {\n //dd($request->toArray());\n $request->validate([\n 'client_id' => 'required',\n 'emails' => 'required',\n 'invoice_id' => 'required',\n ]);\n\n $invoiceIdArr = explode(',', rtrim($request->invoice_id, ','));\n\n $client = Client::find($request->client_id)->first();\n $invoices = Invoice::whereIn('id',$invoiceIdArr)->get();\n $email_data['client'] = $client->toArray();\n //$email_data['invoices'] = $invoices->toArray();\n $emails = explode(',',$request->emails);\n //dd($invoices->toArray());\n\n Mail::send('emails.invoice', $email_data, function($message) use($emails, $invoices)\n {\n $message->from(\"hr@soarlogic.com\", \"HR\");\n $message->to($emails)->subject('Client Invoice');\n foreach($invoices as $invoice){\n $message->attach(asset('storage/app/invoices/'.$invoice->invoice));\n }\n });\n\n return redirect()->route('invoice.send')->with('flash_message', 'Invoice successfully sent!');\n }", "function order_completed( $order_id ) {\n \n $order = new WC_Order( $order_id );\n $to_email = $order[\"billing_address\"];\n \n //adding the vendor email to the css\n @session_start();\n $vendor_email_arr = json_decode($_SESSION['VENDOR_EMAILS']);\n if(count($vendor_email_arr)>0){\n foreach($vendor_email_arr as $email){\n $headers = 'Cc: '.$email.' <'.$email.'>' . \"\\r\\n\"; \n }\n }\n \n wp_mail($to_email, 'subject', 'message', $headers );\n\n }", "public function send(array $invoiceData);", "public function sendEmail($id)\n\t{\n\t\t// try{\n\n\t\t\t$id = Input::get('id');\n\t\t\t$order = Order::with('client')->find($id);\n\n\t\t\t$productsperorder = OrdersProducts::with('productServices')->where('order_id', $order->id)->get();\n\n\t\t\t$employeeinfo = User::with(['userCity', 'userRegion'])->find($order['client'][0]->id);\n\n\t\t\t$totalprice = 0;\n\n\t\t\tforeach($productsperorder as $singleproduct){\n\n\t\t\t\t$totalprice += $singleproduct->price * $singleproduct->quantity;\n\t\t\t}\n\n\n\t\t\t$ordersdata[] = compact('order', 'employeeinfo', 'productsperorder', 'totalprice');\n\t\t\t\n\t\t\t$datetitle = date('d-m-Y');\n\n\t\t\t$currdate = date('d. m. Y');\n\n\t\t\t$pdfname = 'narudzba_' . $order->order_id . '-' . $datetitle;\n\n\t\t\t$pdfreportfullpath = public_path() . \"/uploads/backend/orders/\" . $pdfname . '.pdf';\n\n\t\t\t//call createPdf method to create pdf\n\n\n\t\t\t$pdf = PDF::loadView('backend.order.orderspdf', compact('ordersdata', 'productsperorder', 'currdate'));\n\n\t\t\tMail::send('backend.email.ordermail', array( 'comment' => Input::get('order_comment'), 'first_name' => $order->first_name, 'last_name' => $order->last_name, 'number' => $order->order_id), function($message) use($pdf, $order, $pdfname)\n\t\t\t{\n\t\t\t $message->from('info@crm.go.hr', 'info@crm.go.hr');\n\n\t\t\t $message->to($order->email)->subject('Narudžba ' . $order->order_id);\n\n\t\t\t $message->attachData($pdf->output(), $pdfname . '.pdf');\n\t\t\t});\n\t\t\t//goDie($pdf);\n\n\t\t\treturn Redirect::route('admin.orders.index')->with('success_message', Lang::get('core.msg_success_email_sent'));\n\n\t\t// }\n\n\t\t// catch (Exception $exp)\n\t\t// {\n\t\t// \treturn Redirect::route('admin.orders.index')->with('error_message', Lang::get('messages.msg_error_getting_entry'));\n\t\t// }\n\t \n\t}", "public function sendInvoiceCreatedEmail($invoice_id) {\n $attachment = array();\n if($this->PMDR->getConfig('invoice_email_pdf')) {\n if($data = $this->getPDF($invoice_id,false)) {\n $attachment = array(\n 'data'=>$data,\n 'name'=>'Invoice_'.$invoice_id.'.pdf',\n 'type'=>'application/pdf'\n );\n }\n }\n return $this->PMDR->get('Email_Templates')->send('invoice_created',array('invoice_id'=>$invoice_id,'attachment'=>$attachment));\n }", "function shop_send_sold_email($code) {\r\n\r\n if(osc_is_web_user_logged_in()) {\r\n return false;\r\n }\r\n\r\n $mPages = new Page() ;\r\n $aPage = $mPages->findByInternalName('email_shop_sold_buyer') ;\r\n $locale = osc_current_user_locale() ;\r\n $content = array();\r\n if(isset($aPage['locale'][$locale]['s_title'])) {\r\n $content = $aPage['locale'][$locale];\r\n } else {\r\n $content = current($aPage['locale']);\r\n }\r\n $seller = User::newInstance()->findByPrimaryKey($code['fk_i_user_id']);\r\n $buyer = User::newInstance()->findByPrimaryKey($code['fk_i_buyer_id']);\r\n $item_url = osc_item_url( ) ;\r\n $item_url = '<a href=\"' . $item_url . '\" >' . $item_url . '</a>';\r\n $from = osc_contact_email() ;\r\n $from_name = osc_page_title() ;\r\n \r\n \r\n\r\n $words = array();\r\n $words[] = array('{CONTACT_NAME}', '{USER_NAME}', '{USER_EMAIL}', '{USER_PHONE}',\r\n '{WEB_URL}', '{ITEM_TITLE}','{ITEM_URL}', '{INSTRUCTIONS}','{PRICE}', '{TXN_CODE}');\r\n\r\n $words[] = array($item['s_contact_name'], $buyer['s_name'], $buyer['s_name'],\r\n ($buyer['s_phone_land']==''?$buyer['s_phone_mobile']:$buyer['s_phone_land']), '<a href=\"'.osc_base_url().'\" >'.osc_base_url().'</a>', $item['s_title'], $item_url, $instructions, $price, $code['s_code'] );\r\n\r\n $title = osc_mailBeauty(osc_apply_filter('email_title', osc_apply_filter('email_shop_sold_buyer_title', $content['s_title'])), $words);\r\n $body = osc_mailBeauty(osc_apply_filter('email_description', osc_apply_filter('email_shop_sold_buyer_description', $content['s_text'])), $words);\r\n\r\n $emailParams = array (\r\n 'from' => $from\r\n ,'from_name' => $from_name\r\n ,'subject' => $title\r\n ,'to' => $buyer['s_email']\r\n ,'to_name' => $buyer['s_name']\r\n ,'body' => $body\r\n ,'alt_body' => $body\r\n ,'reply_to' => $from\r\n ) ;\r\n\r\n osc_sendMail($emailParams);\r\n }", "function deliver_red_flag_mail() {\n global $product;\n if ( isset($_POST[\"red-flag-protocol-submitted$product->id\"]) ) {\n global $woocommerce, $product;\n\n $_user = wp_get_current_user();\n $_name = esc_html( $_user->user_firstname );\n $_email = esc_html( $_user->user_email );\n\n $subject = \"DiaMedical Website Price Conflict [Urgent]\";\n\n $message = '<p>Hey Jeff, This is a <span style=\"font-weight:bold;color:red\">price conflict</span> alert!</p>';\n $message .='<p>The product is question is <strong>' . $product->get_title() . '</strong></p>';\n $message .='<p>The current online price is <strong>' . $product->get_price() . '</strong></p>';\n $message .='<p><a href=\"https://diamedicalusa.com/?s=' . $product->get_sku() . '&amp;post_type=product\">Here is a link to the Search Results Page</a></p>';\n $message .='<p><a href=\"https://diamedicalusa.com/wp-admin/post.php?post=' . $product->id . '&amp;action=edit\">Here is a link to the Edit Product Page</a></p>';\n $message .='<p>Please address immediately</p>';\n $message .='<p>Thanks, <br /> ' . $_name . '</p>';\n\n\t\t$to = 'jambrose@diamedicalusa.com';\n\n\t\t$headers[] = \"From: $_name <orders@diamedicalusa.com>\" . \"\\r\\n\";\n $headers[] = \"Bcc: Rob Benz <rbenz@diamedicalusa.com>\" . \"\\r\\n\";\n $headers[] = \"Bcc: Travis Morris <tmorris@diamedicalusa.com>\".\"\\r\\n\";\n\n\t\t// If everything worked -- display a success message\n\t\tif ( wp_mail( $to, $subject, $message, $headers ) ) {\n\t\t\techo '<p>sent</p>';\n\t\t} else {\n\t\t\techo 'An unexpected error occurred';\n\t\t}\n // reset wp_mail_content_type\n remove_filter( 'wp_mail_content_type', 'set_html_red_flag_content_type' );\n\t}\n\n}", "function get_invoice_email_conment($db,$orders_id)\n{\n\tob_start();\n\tinclude(dirname(__FILE__).'/template_invoice_email.php');\n\t$msg_body = ob_get_clean();\n\t\n\treturn $msg_body;\n}", "public static function adminElectronicPurchase ()\n {\n\n $user = array(\n 'email'=>Config::get('mail.admin.address'),\n 'name'=>Config::get('mail.admin.name'),\n 'book_title' => $book->title\n );\n\n $data = array(\n 'buyer_email' => Auth::user()->email,\n 'buyer_first' => Auth::user()->first_name,\n 'buyer_last' => Auth::user()->last_name,\n 'book_id' => $bookID,\n 'type_id' => $typeID,\n 'amount' => $amount,\n 'title' => $book->title\n\n );\n\n // use Mail::send function to send email passing the data and using the $user variable in the closure\n Mail::queue('emails.purchase_admin', $data, function($message) use ($user) {\n $message->to($user['email'], $user['name'])->subject('Book Purchase: '. $user['book_title']);\n });\n }", "function notify() {\n $this->wireframe->print_button = false;\n \n if($this->active_invoice->isNew()) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n \n if(!$this->active_invoice->canEdit($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n $company = $this->active_invoice->getCompany();\n if(!instance_of($company, 'Company')) {\n $this->httpError(HTTP_ERR_CONFLICT);\n } // if\n \n $notify_url = assemble_url('invoice_notify', array('invoice_id' => $this->active_invoice->getId()));\n $users = $company->getUsers();\n $this->smarty->assign(array(\n 'users' => $users,\n 'company' => $company,\n 'notify_url' => $notify_url\n ));\n \n $issue_data = $this->request->post('issue');\n \n if ($this->request->isSubmitted()) {\n if(isset($issue_data['send_emails']) && $issue_data['send_emails']) {\n $issue_to = Users::findById($issue_data['user_id']);\n if (instance_of($issue_to, 'User')) {\n $filename_name = 'invoice_'.$this->active_invoice->getId().'.pdf';\n $filename = WORK_PATH.'/' . $filename_name;\n \n require_once(INVOICING_MODULE_PATH.'/models/InvoicePdf.class.php');\n InvoicePDF::save($this->active_invoice, $filename);\n \n ApplicationMailer::send($issue_to, 'invoicing/issue', array(\n 'issued_by_name' => $this->logged_user->getDisplayName(),\n 'issued_by_url' => $this->logged_user->getViewUrl(),\n 'invoice_number' => $this->active_invoice->getNumber(), \n 'invoice_url' => $this->active_invoice->getCompanyViewUrl(),\n 'pdf_url' => $this->active_invoice->getCompanyPdfUrl(),\n ), null, array(\n array('path' => $filename)\n ));\n @unlink($filename);\n flash_success('Email sent successfully');\n } else {\n flash_error('User does not exists');\n $this->redirectToUrl($notify_url);\n } // if\n } // if\n $this->redirectToUrl($this->active_invoice->getViewUrl());\n } // if\n \n }", "function email_brand_nudge_shipping( $order_id ) {\n\n $influencer_id = get_order_influencer( $order_id );\n $influencer_data = get_userdata( $influencer_id );\n $first_name = $influencer_data->first_name;\n $last_name = $influencer_data->last_name;\n $insta_handle = get_user_meta( $influencer_id, 'social_prism_user_instagram', true );\n\n $campaign_id = get_order_campaign( $order_id );\n $campaign_title = get_the_title( $campaign_id );\n\n $brand_id = get_post_meta( $campaign_id, 'brand', true );\n $brand_name = get_the_title($brand_id);\n $brand_contacts = get_brand_contacts($brand_id);\n\n foreach($brand_contacts as $contact) {\n if(!$contact['email_opt_out']) {\n ob_start();\n ?>\n <h1>Shipment info needed</h1>\n\n <p>Dear <?php echo esc_html($brand_name); ?>,</p>\n\n <p><?php echo esc_html( $first_name . ' ' . $last_name ); ?> here, just looking for the tracking details so I can complete my Shoutout on time for you!</p>\n\n <p>Please send me the updated tracking information at your earliest convenience <a href=\"<?php echo get_site_url() . '/brand-account/'; ?>\">here</a>.</p>\n\n <p>Thank you kindly!<br><a href=\"<?php echo 'https://www.instagram.com/' . $insta_handle; ?>\">@<?php echo $insta_handle; ?></a></p>\n <?php\n\n $msg = ob_get_clean();\n\n $body = generate_email_body($msg, '');\n\n // To send HTML mail, the Content-type header must be set\n $headers[] = 'MIME-Version: 1.0';\n $headers[] = 'Content-type: text/html; charset=iso-8859-1';\n\n // Additional headers\n $headers[] = 'From: Shop and Shout <brands@shopandshout.com>';\n\n $subject = esc_html( $first_name . ' ' . $last_name ) . ' has not recieved their ' . $campaign_title . ' yet!';\n\n if( !SAS_TEST_MODE ) {\n\n mail( $contact['email'], $subject, $body, implode( \"\\r\\n\", $headers ) );\n\n } else {\n\n mail ( 'dev@shopandshout.com', $subject, $body, implode( \"\\r\\n\", $headers ) );\n }\n }\n }\n}", "public function push_invoice()\n {\n $invoice = explode('|', base64_decode($_GET['wpd_invoice']));\n\n if (count($invoice) != 4) {\n exit;\n }\n\n // Get file path\n $upload_dir = wp_upload_dir();\n $location = $upload_dir['basedir'] . '/' . 'woocommerce_pdf_invoices';\n $file_path = $location . '/' . $invoice[2] . '.pdf';\n\n // Push file to browser\n if ($fp = fopen($file_path, 'rb')) {\n header('Content-Type: application/pdf');\n header('Content-Length: ' . filesize($file_path));\n header('Content-disposition: attachment; filename=\"'._x($this->opt['woo_pdf_title_filename_prefix'], 'file name prefix', 'woo_pdf') . (!empty($invoice[1]) ? $invoice[1] . '_' : '') . $invoice[0] . (!empty($invoice[3]) ? '_' . $invoice[3] : '') . '.pdf\"');\n fpassthru($fp);\n }\n\n exit;\n }", "private function _send_email() {\n\n if ($this->send_notification)\n $this->_do_notify();\n if ($this->send_reciept)\n $this->_do_receipt();\n }", "public function sendMail($task){\n\t\t$ISP = ISP::getByCustomerId($task['customer_id']);\n\t\t\n\t\tif ( !$ISP || !isset($ISP['isp_id']) || !is_numeric($ISP['isp_id']) ) {\n\t\t\t// ISP not found, can't send mail\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Get the service details\n\t\t$service = OrdersItems::getAllInfo($task['orderitem_id']);\n\t\t\n\t\t// If the setup has been written by the task action then ...\n\t\tif(!empty($service['setup'])){\n\t\t\t$setup = json_decode($service['setup'], true);\n\t\t\t\t\n\t\t\t// Get the service/product name\n\t\t\t$productname = !empty($service['Products']['ProductsData'][0]['name']) ? $service['Products']['ProductsData'][0]['name'] : \"\";\n\t\t\t$welcome_mail = (!empty($service['Products']['welcome_mail_id']) && intval($service['Products']['welcome_mail_id']) > 0) ? intval($service['Products']['welcome_mail_id']) : 'new_hosting'; // new_hosting = fallback to old method if no template is set\n\n\t\t\t// Check if the customer is present in the service and if there is a welcome_mail set for the bought product \n\t\t\tif( !empty($service['Orders']['Customers']) ){\n\t\t\t\t\n\t\t\t\t// Getting the customer\n\t\t\t\t$customer = $service['Orders']['Customers'];\n\t\t\t\t\n\t\t\t\t$strSetup = \"\";\n\t\t\t\tforeach ($setup as $section => $details) {\n\t\t\t\t\t$strSetup .= strtoupper($section) . \"<hr/>\";\n\t\t\t\t\tforeach ($details as $label => $detail){\n\t\t\t\t\t\t$strSetup .= \"$label: \" . $detail . \"<br/>\"; \n\t\t\t\t\t}\n\t\t\t\t\t$strSetup .= \"<br/>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tShineisp_Commons_Utilities::sendEmailTemplate($ISP ['email'], $welcome_mail, array(\n\t\t\t\t\t'setup' => $strSetup\n\t\t\t\t ,'fullname' => $customer ['firstname'] . \" \" . $customer ['lastname']\n ,'hostingplan' => $productname\n\t\t\t\t ,'controlpanel' => $ISP ['website'].\":8080\"\n\t\t\t\t ,'signature' => $ISP ['company']\n\t\t\t\t), null, null, null, $ISP, $customer['language_id']);\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\n\t}", "public function send_test_email()\n {\n // if not in admin dashboard, bail\n if ( ! is_admin()) {\n return;\n }\n\n check_ajax_referer('mailoptin-send-test-email-nonce', 'security');\n\n if ( ! current_user_has_privilege()) {\n return;\n }\n\n $admin_email = mo_test_admin_email();\n $email_campaign_id = absint($_REQUEST['email_campaign_id']);\n $campaign_subject = Misc::parse_email_subject(EmailCampaignRepository::get_customizer_value($email_campaign_id, 'email_campaign_subject'));\n\n if (EmailCampaignRepository::is_newsletter($email_campaign_id)) {\n $campaign_subject = Misc::parse_email_subject(EmailCampaignRepository::get_customizer_value($email_campaign_id, 'email_campaign_title'));\n }\n\n $campaign_type = EmailCampaignRepository::get_email_campaign_type($email_campaign_id);\n\n $plugin_settings = new Settings();\n $from_name = $plugin_settings->from_name();\n $from_email = $plugin_settings->from_email();\n $headers = [\"Content-Type: text/html\", \"From: $from_name <$from_email>\"];\n\n /** call appropriate method to get template preview. Eg @see self::new_publish_post_preview() */\n $data = $this->{\"{$campaign_type}_preview\"}($email_campaign_id, $campaign_subject);\n\n $content_html = $data[0];\n $formatted_email_subject = $data[1];\n\n $response = wp_mail($admin_email, $formatted_email_subject, $content_html, $headers);\n\n if ( ! $response) {\n $headers = [\"Content-Type: text/html\"];\n $response = wp_mail($admin_email, $formatted_email_subject, $content_html, $headers);\n }\n\n wp_send_json(array('success' => (bool)$response));\n }", "function emailReceipt($id, $dbc)\n{\n\techo\"We are in the email receipt function\";\n\t$q = \"SELECT retailer_order.retailer_order_id, retailer_order.date, retailer_order.total, retailer_order.shipping_method, retailer_order.order_cost, retailer_order.shipping_cost, retailer_order.tracking_number, retailer_order.purchase_order, retailer_address.company, retailer_address.attention, retailer_address.address_1, retailer_address.address_2, retailer_address.city, retailer_address.state, retailer_address.postal_code, retailer_address.country, retailer_contact.email, retailer_item.retailer_item_id, retailer_item.quantity, retailer_item.price, style.style, style.upc \nFROM retailer_order, retailer_address, retailer_item, retailer_contact, style\nWHERE retailer_order.retailer_address_id = retailer_address.retailer_address_id AND retailer_contact.retailer_id = retailer_order.retailer_id AND retailer_order.retailer_order_id = retailer_item.retailer_order_id AND retailer_item.style_id = style.style_id AND retailer_order.retailer_order_id = '\".$id.\"';\";\n\t//echo \"the query is \".$q;\n\t//echo \"the shipping cost is \".$result['shipping_cost'];\n\t$r = mysqli_query($dbc, $q);\n\tif($r)\n\t{\n\n\t\t$result = mysqli_fetch_assoc($r);\n\t\tprint_r($result);\n\t\t//echo \"The address is \".$result['address1'];\n\t\t//format the address\n\t\t$address = \"\";\n\t\t$address = $address.\"<p style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em;'>\".$result['company'].\"<br>\";\n\t\tif($result['attention'] != \"\")\n\t\t{\n\t\t\t$address = $address . \"Attn: \".$result['attention'].\"<br>\";\n\t\t}\n\t\t$address = $address . $result['address_1'].\"<br>\";\n\t\tif($result['address_2'] != \"\")\n\t\t{\n\t\t\t$address = $address . $result['address_2'].\"<br>\";\n\t\t}\n\t\t$address = $address . $result['city'].\", \";\n\t\tif($result['country'] == \"US\")\n\t\t{\n\t\t\t$address = $address . $result['state'] . \" \";\n\t\t}\n\t\t$address = $address.$result['postal_code'].\"<br>\";\n\t\t$address = $address.$result['country'].\"</p>\";\n\t\t\n\t\t$shipment = \" \t<table border='0' width='100%' cellpadding='0' cellspacing='0'> \n \t\t\t\t\t<tr> \n \t<td width='260' valign='top'>\n \t<table cellpadding='0' cellspacing='0' border='1' width='100%'>\n \t<tr>\n \t<td style='text-align:center; font-family: 'Times New Roman', Times, Serif; font-size:1.5em;' > \n \t\t<p style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em;'>Shipping</p> \n \t</td> \n \t</tr>\n <tr>\n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\"; \n $shipping_method = $result['shipping_method'];\n $shipping_cost = \"$\".$result['shipping_cost'];\n \t//not sure why this part is not working\n \tif($shipping_method == \"standard\"){\n\t $shipping_method = \"Standard\";\n\t if($shipping_cost == 0){\n\t \t\t$shipping_cost = \"Complimentary\";\n\t }\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_cost = \"$\".$shipping_cost;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if($shipping_method == \"expediated\"){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$shipping_method = \"Expediated\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_cost = \"$\".$shipping_cost;\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 }\n $shipment = $shipment . $address . \"<br><br>Shipping Method: $shipping_method <br> Shipping Cost: \".$shipping_cost;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if($result['tracking_number'] != \"\")\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\t \t\t$shipment = $shipment . \"<br>Shipment USPS tracking number is \".$result['tracking_number'].\".\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n $shipment = $shipment . \"</td> \n </tr>\n </table>\";\n\t\t\t$title = \"\";\n\t\t\tif($result['purchase_order'] != \"\")\n\t\t\t{\n\t\t\t\t$title = $title . \"Purchase Order: \".$result['purchase_order'].\" has shipped\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$title = $title . \"Card Happening Retailer Order #\".$id.\" has shipped\";\n\t\t\t}\n\t\t\n\t\t\t$dateplaced = \"\";\n\t\t\t$timestamp = $result['date'];\n\t\t\t$timestamp = explode(\" \", $timestamp);\n\t\t\t$timestamp = explode(\"-\", $timestamp[0]);\n\t\t\t$dateplaced = $timestamp[2].\" \".nameMonth($timestamp['1']).\" \".$timestamp[0];\n\t\t\t\n\t\t\t$order = \"\";\n\t\t\t$order = $order . \" \n\t\t\t\t <tr> \n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\";\n $order = $order . $result['style'];\n $order = $order . \" \n </td>\n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\";\n $order = $order . $result['upc']; \n $order = $order . \" </td>\n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\";\n\t\t\t\t$order = $order . $result['quantity'];\n\t\t\t\t$order = $order . \" \n </td>\n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\";\n \n $order = $order .\"$\". $result['price']; \n $order = $order . \" </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t$to = $result['email'];\n\t\t\t\t$total = \"$\".$result['total'];\n\t\t\tif($result['purchase_order'] != \"\")\n\t\t\t{\n\t\t\t\t$subject = $result['purchase_order'].\" Card Happening Retailer Order Shipment\";\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$subject = \"Card Happening Retailer Order #\".$result['retailer_order_id'].\" Shipment\";\n\t\t\t}\n\t\t\twhile($result = mysqli_fetch_assoc($r))\n\t\t\t{\n\t\t\t$order = $order . \" \n\t\t\t\t <tr> \n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\";\n $order = $order . $result['style'];\n $order = $order . \" \n </td>\n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\";\n $order = $order . $result['upc']; \n $order = $order . \" </td>\n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\";\n\t\t\t\t$order = $order . $result['quantity'];\n\t\t\t\t$order = $order . \" \n </td>\n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\";\n \n $order = $order .\"$\". $result['price']; \n $order = $order . \" </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t}\n\t$message = \"\n\t<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\n\t\t\t<head>\n \t \t\t<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />\n \t\t<meta name='viewport' content='width=device-width, initial-scale=1.0'/>\n \t\t\t<title>\";\n\t$message = $message . $title;\t\t\t\n\t$message =\t $message.\"</title>\n\t\t\t</head>\n\t\t\t<body style='margin: 0; padding: 0;'>\n \t\t\t<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n \t<tr>\n \t<td bgcolor='#E6EAFA'>\n \t\t\t\t<table align='center' border='0' cellpadding='0' cellspacing='0' width='600' style='border-collapse: collapse;' bgcolor='#E6EAFA'>\n \t<tr>\n \t<td>\n \t<img style='max-height:120px; display:block; margin-left:auto; margin-right:auto;' class='logo' src='https://www.cardhappening.com/images/logo.jpg' alt='Card Happening'></img>\n \t</td>\n \t</tr>\n \t<tr>\n \t<td bgcolor='#E6EAFA'>\n \t<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n \t<tr>\n \t<td style='text-align: center; font-family: 'Times New Roman', Times, Serif; font-size:2em; padding-top:20px; padding-bottom:10px;'>\n <p style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:2em;'><b>Your order has shipped!</b></p>\n \t\t\t\t</td>\n \t\t\t\t\t\t\t\t</tr>\n \t<tr>\n \t<td style='text-align: center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\n \tShipment Date: \";\n \t$today = getdate();\n \t$date = $today['mday'].\" \".$today['month'].\" \".$today['year'];\n \t$message = $message . $date;\n $message = $message . \"\n \t\t</td>\n \t\t</tr>\n \t\t<tr>\n \t<td>\n \t\t\t<img src='https://www.cardhappening.com/images/pedicab-blue.jpg' alt='Your order has shipped!' style='display:block; margin-left:auto; margin-right:auto;'></img> \n \t</td>\n \t</tr>\n \t<tr>\n \t<td>\n\t\t\t\t\t\t\t\t\t\t\t\";//here we add the shipment/address info\n\t\t\t\t\t\t\t\t\t\t\t$message = $message . $shipment;\n\t\t\t\t\t\t\t\t\t\t\t$message = $message .\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n <td width='20' style='font-size: 0; line-height:0;'>d\n &nbsp;\n </td>\n <td width='260' valign='top'>\n <table cellpadding='0' cellspacing='0' border='1' width='100%'>\n <tr>\n <td style='text-align:center; font-family: 'Times New Roman', Times, Serif; font-size:1.5em;' > \n <p style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em;'>Order Summary </p>\n </td> \n </tr>\n <tr>\n <td style='padding-top:10px;'> \n <table border='1' width='100%' cellpadding='0' cellspacing='0'>\n <tr>\n <th style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\n Style\n </th>\n <th style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\n UPC\n </th>\n <th style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\n Quantity\n </th>\n <th style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\n Price\n </th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\n\n \t\t\t\t\t\t\t $message = $message . $order;\n $message = $message .\" <!--order information goes here-->\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\n </td> \n </tr>\n </table>\n \n </td>\n \t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t</table>\n \t\t\t\t\t\t\t\t</td>\n \t</tr>\n <tr>\n <td style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px;'>\n\t\t\t\t\t\t\t\t\t\t\tOrder Total: \";\n\t\t\t\t\t\t\t\t\t\t\t$message = $message .$total;\n\t\t\t\t\t\t\t//currently taking all payments upfront\n\t\t\t\t\t\t\t//$message = $message . $paid;\n\t\t\t\t\t\t\t$message = $message . \"<br>\n \t\t\t\t\t\t\t\t</td>\n \t\t\t\t\t\t\t</tr>\n \t\t\t\t\t\t</table>\n </td>\n </tr>\n <tr>\n <td style='padding-top:20px; text-align:center; font-family: Arial, Helvetica, sans-serif; font-size:1em; padding-top:10px'>\n Please email all concerns to william@cardhappening.com <br></br>\n Card Happening LLC <br>\n P.O. Box 300326<br>\n \t\t\t\t\t\t Austin, TX 78703<br>\n <br><b> Find more fine hand-painted cards at www.cardhappening.com </b><br> \n \n </td>\n </tr>\n \t</table>\n \t\t</td>\n </tr> \n \t\t</table>\n\t</body>\n</html>\";\n\t\t\techo $message;\n\t\t\t$message = wordwrap($message, 70, \"\\r\\n\");\t\t\t\n\t\t\t$header = \"From:cardhappening@cardhappening.com \\r\\n\";\n\t\t\t$header = $header . \"Bcc: receipts@cardhappening.com \\r\\n\";\n\t\t\t$header = $header . \"Reply-To: william@cardhappening.com \\r\\n\";\n\t\t\t$header = $header . \"MIME-Version: 1.0 \\r\\n\";\n\t\t\t$header = $header . \"Content-type:text/html; charset=UTF-8 \\r\\n\";\n\t\t\t$i = mail($to, $subject, $message, $header);\n\t\t\tif($i)\n\t\t\t{\n\t\t\t\techo \"It worked\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"it failed\";\n\t\t\t}\n\t}\t\t\n}", "protected function _sendEmails($order, $invoice)\n {\n switch (Mage::getStoreConfig('payment/' . $this->_code . '/emailstosend', $this->getStore())) {\n case MageBase_DpsPaymentExpress_Model_Method_Common::EMAIL_SEND_INVOICE: // send invoice email only\n $invoice->sendEmail();\n break;\n case MageBase_DpsPaymentExpress_Model_Method_Common::EMAIL_SEND_BOTH: // send both\n $order->sendNewOrderEmail();\n $invoice->sendEmail();\n break;\n case MageBase_DpsPaymentExpress_Model_Method_Common::EMAIL_SEND_ORDER: // default - send order email only\n default:\n $order->sendNewOrderEmail();\n break;\n }\n }", "public function send_message() {\n\n $errors = array();\n\n if ( ! isset( $_POST['rqa_name'] ) ) {\n return;\n }else {\n\n\n $regex = '/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$/';\n\n if ( empty( $_POST['rqa_name'] ) ) {\n $errors[] = '<p>' . __( 'Please enter a name', 'yith-woocommerce-request-a-quote' ) . '</p>';\n }\n\n if ( ! isset( $_POST['rqa_email'] ) || empty( $_POST['rqa_email'] ) || ! preg_match( $regex, $_POST['rqa_email'] ) ) {\n $errors[] = '<p>' . __( 'Please enter a valid email', 'yith-woocommerce-request-a-quote' ) . '</p>';\n }\n\n if ( WC()->cart->get_cart_contents_count() == 0 ) {\n $errors[] = '<p>' . __( 'Your list is empty, add products to the list to send a request', 'yith-woocommerce-request-a-quote' ) . '</p>';\n }\n\n if ( empty( $errors ) ) {\n\n $args = array(\n 'user_name' => $_POST['rqa_name'],\n 'user_email' => $_POST['rqa_email'],\n 'user_message' => nl2br( $_POST['rqa_message'] ),\n 'raq_content' => YITH_Request_Quote()->get_raq_return()\n );\n\n do_action( 'ywraq_process', $args );\n do_action( 'send_raq_mail', $args );\n wp_redirect( YITH_Request_Quote()->get_raq_page_url(), 301 );\n exit();\n }\n }\n\n yith_ywraq_add_notice( $this->get_errors( $errors ), 'error' );\n\n }", "public function sendProductRegEmail($args)\n\t\t{\n\t\t\t$name = $args['fname'].\" \".$args['lname'];\n\t\t\t$this->subject = \"A Sinsational Smile product has been registered\";\n\t\t\t$body = \"<table width='100%'>\";\n\t\t\t$body .= \"<tr>\";\n\t\t\t$body .= \"<th bgColor='#8f7a63' colspan='3'>\";\n\t\t\t$body .= \"<center><img src='http://www.sinsationalsmile.com/img/inquiry-header.png' width='100%'></center>\";\n\t\t\t$body .= \"</th>\";\n\t\t\t$body .= \"</tr>\";\n\t\t\t$body .= \"<tr>\";\n\t\t\t$body .= \"<td colspan='1' width='10%'>&nbsp;</td>\";\n\t\t\t$body .= \"<td colspan='1' padding-left='10%' padding-right='10%'>\";\n\t\t\t$body .= \"<center><h1>The following Sinsational Smile<sup><font size='2pt'>&copy;</font></sup> product has been registered:</h1></center>\";\n\t\t\t$body .= \"<hr>\";\n\t\t\t$body .= \"<h2>Contact Information</h2>\";\n\t\t\t$body .= \"<p>Name: \".$name.\"</p>\";\n\t\t\t$body .= \"<p>Office Email: \".$args['email'].\"</p>\";\n\t\t\t$body .= \"<p>Office Phone: \".$args['phone'].\"</p>\";\n\t\t\t$body .= \"<h2>Company Information</h2>\";\n\t\t\t$body .= \"<p>Dr. Name: \".$args['doctor_name'].\"</p>\";\n\t\t\t$body .= \"<p>Practice Name: \".$args['practice'].\"</p>\";\n\t\t\t$body .= \"<p>Address: \".$args['address-one'];\n\t\t\tif($args['address-two'])\n\t\t\t\t$body .= \"<p>Address: \".$args['address-two'];\n\t\t\t$body .= \"</p>\";\n\t\t\t$body .= \"<p>City, State Zip: \".$args['city'].\", \".$args['state'].\" \".$args['zip'].\"</p>\";\n\t\t\t$body .= \"<p>Website: \".$args['website'].\"</p>\";\n\t\t\t$body .= \"<p>Dealer/Distribution Co.: \".$args['distribution_co'].\"</p>\";\n\t\t\t$body .= \"<p>Serial Number: \".$args['serial_number'].\"</p>\";\n\t\t\t$body .= \"</td><td colspan='1' width='10%'>&nbsp;</td></tr>\";\n\t\t\t$body .= \"<tr><td colspan='3' width='100%'><center><img src='http://www.sinsationalsmile.com/img/inquiry-footer.png' width='100%'></center>\";\n\t\t\t$body .= \"<center>Copyright &copy; Sinsational Smile \".date('Y').\". All Rights Reserved.</center></td></tr></table>\";\n\n\t\t\t$this->content = new SendGrid\\Content(\"text/html\", $body);\n\t\t\t$this->mail = new SendGrid\\Mail($this->emailFrom, $this->subject, $this->emailTo, $this->content);\t\t\t\n\t\t\t$this->resp = $this->sg->client->mail()->send()->post($this->mail);\n\t\t\t\n\t\t\t$this->sendRegConfirmationEmail($name, $args['email']);\n\t\t}", "public function sendOrderPlacedEmailToAdminOrCustomer($o_id=''){\n $email_template = $this->common_model->get_row('email_templates', array('id'=>15));\n if(!empty($email_template)){\n\n \t$data['order_info'] = $this->common_model->get_row('orders',array('o_id'=>$o_id, 'user_id'=>user_id()));\t\n\t\t\t$data['orders_details'] = $this->common_model->get_result('order_details',array('order_table_id'=>$o_id));\n\n\t\t\tif(!empty($data['order_info']) && !empty($data['orders_details'])){\n\n\t\t\t\t$shipping_addresess = json_decode($data['order_info']->shipping_address);\n\t\t\t\t//==-----------===Send Email==-----------\n\t if($email_template->template_email_enable==1){\n\n\t $userRole = 2; //for Customer\n\t $to = $shipping_addresess->email_id;\n\t $param = array(\n\t 'site_name' => SITE_NAME,\n\t 'user_role' => \"Customer\",\n\t 'short_description' => \"Your Order has been placed successfully. Below are the details of your Item's\",\n\t 'item_details' => trim($this->load->view('templates/email/order_placed',$data,true))\n\t );\n\t $sendEmail = sendEmail($email_template, $to, $param, $userRole);\n\n\n\t $userRole = 0; //for Admin\n\t $adminEMAIl= get_option_url('EMAIl');\n\t $to = (!empty($adminEMAIl)) ? $adminEMAIl : SUPPORT_EMAIL;\n\t $param = array(\n\t 'site_name' => SITE_NAME,\n\t 'user_role' => SITE_NAME.\" Administrator\",\n\t 'short_description' => \"New Order has been placed. Below are the details of the Item's\",\n\t 'item_details' => trim($this->load->view('templates/email/order_placed',$data,true))\n\t );\n\t $sendEmailAdmin = sendEmail($email_template, $to, $param, $userRole);\n\t }\n\n\t //==-----------===Send SMS==-----------===\n\t if($email_template->template_sms_enable==1){\n\n\t $userRole = 2; //for Customer\n\t $to = ($shipping_addresess->country_code) ? '+'.$shipping_addresess->country_code.''.$shipping_addresess->phone_no : $shipping_addresess->phone_no;\n\t $param = array(\n\t 'site_name' => SITE_NAME,\n\t 'user_role' => \"Customer\",\n\t 'short_description' => \"Your Order has been placed successfully. Below are the details of your Item's\",\n\t 'item_details' => trim($this->load->view('templates/email/order_placed',$data,true))\n\t );\n\t $sendSMS = sendSMS($email_template, $to, $param, $userRole);\n\n\n\t $userRole = 0; //for Admin\n\t $to = get_option_url('PHONE');\n\t $param = array(\n\t 'site_name' => SITE_NAME,\n\t 'user_role' => SITE_NAME.\" Administrator\",\n\t 'short_description' => \"New Order has been placed. Below are the details of the Item's\",\n\t 'item_details' => trim($this->load->view('templates/email/order_placed',$data,true))\n\t );\n\t $sendSMSAdmin = sendSMS($email_template, $to, $param, $userRole);\n\t }\n\t\t\t}\n }\n //-------------**For Send email AND SMS-----------\n\t}", "function shipped_email($store_id)\n\t{\n\t\t$this->load->model('vc_orders');\n\t\t$base_url = base_url();\n\t\t$mail_info = $this->vc_orders->shipped_mail_details($store_id);\n\t\tif ($mail_info != 0) {\n\t\t\t$count_order = count($mail_info);\n\t\t\tfor ($j = 0; $j < $count_order; $j++) {\n\t\t\t\t$shipped_email_id = $mail_info[$j]['shipping_emailid'];\n\t\t\t\t$buyer_name = $mail_info[$j]['buyer_name'];\n\t\t\t\t$product_name = $mail_info[$j]['product_name'];\n\t\t\t\t$order_no = $mail_info[$j]['order_id'];\n\t\t\t\t$txnid = $mail_info[$j]['txnid'];\n\t\t\t\t$shipping_address = $mail_info[$j]['shipped_address'];\n\t\t\t\t$awb_no = $mail_info[$j]['awb_no'];\n\t\t\t\t$shipping_company = $mail_info[$j]['shipping_company'];\n\t\t\t\tif ($shipping_company == 'Fedex')\n\t\t\t\t\t$track_link = 'http://www.fedex.com/Tracking?cntry_code=in&lid=/Track/Track_Number';\n\t\t\t\telseif ($shipping_company == 'Blue Dart')\n\t\t\t\t\t$track_link = 'http://www.bluedart.com/htotrack.html'; elseif ($shipping_company == 'GATI')\n\t\t\t\t\t$track_link = 'http://www.gati.com/html/my-gati_track-your-shipment_track-online.html'; else\n\t\t\t\t\t$track_link = '';\n\t\t\t\t$payment_mode = $mail_info[$j]['payment_mode'];\n\t\t\t\tif ($payment_mode == 'COD')\n\t\t\t\t\t$payment_mode = 'Cash on Delivery';\n\t\t\t\telseif ($payment_mode == 'CC')\n\t\t\t\t\t$payment_mode = 'Credit Card'; elseif ($payment_mode == 'DC')\n\t\t\t\t\t$payment_mode = 'Debit Card'; elseif ($payment_mode == 'NB')\n\t\t\t\t\t$payment_mode = 'Net Banking';\n\t\t\t\tinclude 'mail_5.php';\n\t\t\t\t$this->load->library('email');\n\t\t\t\t$this->email->clear(TRUE);\n\t\t\t\t$this->email->from('support@buyandbrag.in', 'BuynBrag');\n\t\t\t\t$this->email->to($shipped_email_id);\n\t\t\t\t$this->email->bcc('bnb.vitallabs@gmail.com');\n\t\t\t\t$this->email->subject(\"BuynBrag: Order Shipped,Order Id:$order_no\");\n\t\t\t\t$this->email->message($shipped_message);\n\t\t\t\t$this->email->attach('./invoice/' . $txnid . '/shipping_label_order_' . $order_no . '.pdf');\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\tif ($this->email->send()) {\n\t\t\t\t\t$this->vc_orders->ship_canc_mail_success($order_no);\n\t\t\t\t}\n\t\t\t\t//end email send\n\t\t\t\t$this->email->clear(TRUE);\n\t\t\t}\n\t\t\t//end for\n\t\t}\n\t\t//end if mail_info !=0\n\t}", "function _SendCommissionEmail($db, $member_id, $aff_id, $product_name, $tier, $amt) {\n\n\t$member_row = GetRowMember($db, $member_id);\n\t$aff_row = GetRowMember($db, $aff_id);\n\t$aff_firstname = WriteFirstName($aff_row['name']);\n\t$amt_string = WriteDollarCents($amt);\n\t# Email Affiliate Unless the $amt is too low of they have notifications turned off\n\tif ($aff_row['notify_comms'] && $amt >= $aff_row['notify_comms_min']) {\n\t\t$subject = \"You're making money! Celebrate a new Tier $tier $product_name sale\";\n\t\t$msg = \"Congratulations $aff_firstname,\n\t\nYour Digital Altitude system is working with you and for you.\nToday you can celebrate making some more money with this latest\nTier $tier $product_name Commission.\n\nName: {$member_row['name']}\nUsername: {$member_row['username']} \n\nYour Commission: $amt_string\n\nYou can find more details about your commissions here in the\nMy Business > My Earnings section of your Digital Altitude back office:\n\nhttp://my.digitalaltitude.co/my-business/my-earnings.php\n\nKeep up the GREAT work!\n\n~Michael Force\nFounder\n\n\nUNSUBSCRIBE: You can choose to unsubscribe or adjust your subscription to \nthese notifications in your Digital Altitude account here:\nhttp://my.digitalaltitude.co/my-account/my-notifications.php\n\n\nDISCLAIMER: We aim to send you accurate information in these emails, however, please\nnote that they are system generated and may have errors from time-to-time. So please don't\nconsider this email as a guarantee of any sales or commissions.\n\";\n\t\tSendEmail($db, $sponsor_row['email'], $subject, $msg, \"Digital Altitude <support@digitalaltitude.co>\");\n#\t\tmail($sponsor_row['email'], $subject, $msg, $header);\n\t}\n}", "public function toMail ($notifiable)\n {\n $invoiceData = \\Spark::invoiceDataFor($this->billable);\n\n $content = app(ZohoBooksRepositoryContract::class)->storeAndGetZohoInvoicePdf($this->localInvoice);\n\n $mailMessage = (new MailMessage)->subject($invoiceData['product'] . ' Invoice')\n ->greeting('Hi ' . explode(' ', $this->billable->name)[0] . '!')\n ->line('Thanks for your continued support. We\\'ve attached a copy of your invoice for your records. Please let us know if you have any questions or concerns!')\n ->attachData($content, 'invoice.pdf');\n\n return $mailMessage;\n }", "public function sendmail($emailTemplateVariables)\n {\n }", "function custom_woocommerce_email( $email_classes ) {\n\n\t// include our custom email class\n\trequire_once( 'includes/class-wc-custom-email.php' );\n\n\t// add the email class to the list of email classes that WooCommerce loads\n\t$email_classes['WC_Custom_Email'] = new WC_Custom_Email();\n\n\treturn $email_classes;\n\n}", "public function sendEmail($order){\n\n $orderasignada = OrdersMototaxi::findOrFail($order->id);\n $usuario= User::findOrFail($order->user_id);\n $localityF = Locality::findOrFail($order->locality_from_id);\n $localityT = Locality::findOrFail($order->locality_to_id);\n $costDelivery = DeliveriesCost::findOrFail($order->delivery_cost_id);\n $municipalityF= Municipie::findOrFail($costDelivery->from_municipality_id);\n $municipalityT= Municipie::findOrFail($costDelivery->to_municipality_id);\n $title = 'Su Orden Ha sido creada!!!! Gracias por elegir Abracadabra';\n\n $customer_details = [\n 'name' => $usuario->get('name'),\n 'email' => $usuario->get('email')\n ];\n $order_details = [\n 'Codigo' => $orderasignada->get('code'),\n 'Municipio de Origen' => $municipalityF->get('name'),\n 'Localidad de Origen' => $localityF->get('name'),\n 'Dirección de Origen' => $orderasignada->get('address_from'),\n 'Teléfono' => $orderasignada->get('cell'),\n 'Localidad Destino' => $localityT->get('name'),\n 'Municipio Destino' => $municipalityT->get('name'),\n 'Dirección Destino' => $orderasignada->get('address_to'),\n 'Costo de Transportacion' => $costDelivery->get('tranpostation_cost'),\n\n ];\n\n $sendmail = Mail::to($customer_details['email'])\n ->send(new SendMailMototaxi($title, $customer_details,$order_details));\n if (empty($sendmail)) {\n return response()->json(['message'\n => 'Mail Sent Sucssfully'], 200);\n }else{\n return response()->json(['message' => 'Mail Sent fail'], 400);\n }\n\n }", "function eddcg_send_payment_instructions_email( $payment_id = 0 ) {\n\n\t$email_body = edd_get_option( 'eddcg_pending_email' );\n\n\tif ( empty ( $email_body ) ) {\n\t\treturn;\n\t}\n\n\t$email_body = edd_do_email_tags( $email_body, $payment_id );\n\n\t$subject = edd_do_email_tags( edd_get_option( 'eddcg_pending_email_subject' , __( 'Your purchase is pending payment', 'eddcg' ) ), $payment_id );\n\n\t$user_info = edd_get_payment_meta_user_info( $payment_id );\n\n\tEDD()->emails->heading = edd_do_email_tags( edd_get_option( 'eddcg_pending_email_heading', false ), $payment_id );\n\n\tEDD()->emails->send( $user_info['email'], $subject, $email_body );\n}", "function j_InsertOrderToZohoInvoice($accountDetails, $auth, $userid, $crmTypeOrdI) {\n //\n $flag = FALSE;\n //Get Product id from Zoho id using Product Code(sku)\n $product_id = $accountDetails['ordered_products'][0]['sku'];\n $zoho_product_id = j_GetProductIDFromOrder($auth, $product_id);\n //\n $contactName = $accountDetails['customer_info']['first_name'] . ' ' . $accountDetails['customer_info']['last_name'];\n $accountName = $accountDetails['customer_info']['company'];\n $productDetail_name = $accountDetails['ordered_products'][0]['name'];\n $quantity = $accountDetails['ordered_products'][0]['quantity'];\n $amountList = $accountDetails['ordered_products'][0]['base_price'];\n $totalIncTax = $accountDetails['ordered_products'][0]['total_inc_tax'];\n $discountAmt = $totalIncTax - $amountList;\n $totalAfterDiscount = $totalIncTax - $discountAmt;\n $totalExTax = $accountDetails['ordered_products'][0]['total_ex_tax'];\n $tax = $totalIncTax - $totalExTax;\n $netTotal = $totalIncTax * $quantity;\n //\n $subject = 'big_' . $accountDetails['id'] . 'order for ' . $contactName;\n if (count($accountDetails['billing_address']) > 0) {\n $billingStreet = $accountDetails['billing_address']['street_1'] . ' ' . $accountDetails['billing_address']['street_2'];\n $billingCity = $accountDetails['billing_address']['city'];\n $billingState = $accountDetails['billing_address']['state'];\n $billingCountry = $accountDetails['billing_address']['country'];\n $billingZip = $accountDetails['billing_address']['zip'];\n //\n $shippingStreet = $accountDetails['billing_address']['street_1'] . ' ' . $accountDetails['billing_address']['street_2'];\n $shippingCity = $accountDetails['billing_address']['city'];\n $shippingState = $accountDetails['billing_address']['state'];\n $shippingCountry = $accountDetails['billing_address']['country'];\n $shippingZip = $accountDetails['billing_address']['zip'];\n } else {\n $billingStreet = 'NA';\n $billingCity = 'NA';\n $billingState = 'NA';\n $billingCountry = 'NA';\n $billingZip = 'NA';\n //\n $shippingStreet = 'NA';\n $shippingCity = 'NA';\n $shippingState = 'NA';\n $shippingCountry = 'NA';\n $shippingZip = 'NA';\n }\n\n try {\n $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <Invoices>\n <row no=\"1\">\n <FL val=\"Contact Name\">' . $contactName . '</FL> \n <FL val=\"Account Name\">' . $accountName . '</FL>\n <FL val=\"Product Details\">\n <product no=\"1\"> \n <FL val=\"Product Id\">' . $zoho_product_id . '</FL>\n <FL val=\"Product Name\">' . $productDetail_name . '</FL>\n <FL val=\"Quantity\">' . $quantity . '</FL>\n <FL val=\"Unit Price\">' . $totalIncTax . '</FL>\n <FL val=\"List Price\">' . $amountList . '</FL>\n <FL val=\"Discount\">' . $discountAmt . '</FL>\n <FL val=\"Total\">' . $totalIncTax . '</FL>\n <FL val=\"Total After Discount\">' . $totalAfterDiscount . '</FL>\n <FL val=\"Tax\">' . $tax . '</FL>\n <FL val=\"Net Total\">' . $netTotal . '</FL>\n </product>\n </FL> \n <FL val=\"Subject\">' . $subject . '</FL>\n <FL val=\"Billing Street\">' . $billingStreet . '</FL>\n <FL val=\"Shipping Street\">' . $shippingStreet . '</FL>\n <FL val=\"Billing City\">' . $billingCity . '</FL>\n <FL val=\"Shipping City\">' . $shippingCity . '</FL>\n <FL val=\"Billing State\">' . $billingState . '</FL>\n <FL val=\"Shipping State\">' . $shippingState . '</FL>\n <FL val=\"Billing Zip\">' . $billingZip . '</FL>\n <FL val=\"Shipping Zip\">' . $shippingZip . '</FL>\n <FL val=\"Billing Country\">' . $billingCountry . '</FL>\n <FL val=\"Shipping Country\">' . $shippingCountry . '</FL> \n </row>\n </Invoices>';\n\n //For Insert Records with duplicate checking.\n $url = \"https://crm.zoho.com/crm/private/xml/Invoices/insertRecords\";\n $query = \"authtoken=$auth&scope=crmapi&duplicateCheck=1&version=4&xmlData=$xml\";\n\n $ch = curl_init();\n /* set url to send post request */\n curl_setopt($ch, CURLOPT_URL, $url);\n /* allow redirects */\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n /* return a response into a variable */\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n /* times out after 30s */\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n /* set POST method */\n curl_setopt($ch, CURLOPT_POST, 1);\n /* add POST fields parameters */\n curl_setopt($ch, CURLOPT_POSTFIELDS, $query);\n //Execute cUrl session\n $response = curl_exec($ch);\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n //curl_close($ch);\n //check if it returns 200, or else return false\n if ($http_code === 200) {\n curl_close($ch);\n $flag = 1;\n $msg = $response;\n } else {\n $error = curl_error($ch);\n $flag = 0;\n $msg = $error;\n }\n $arr = array(\n 'flag' => $flag,\n 'msg' => $msg\n );\n if (strpos($response, '2000') !== false) {\n $flag = TRUE;\n } elseif (strpos($response, '2001') !== false) {\n $msg = 'Duplicate Record..';\n $flag = FALSE;\n } elseif (strpos($response, '2002') !== false) {\n $msg = 'Duplicate Record..';\n $flag = FALSE;\n } elseif (strpos($response, 'error') !== false) {\n $res = json_decode($response, TRUE);\n $msg = $res['response']['error']['message'];\n $flag = FALSE;\n }\n } catch (Exception $e) {\n //echo '<pre>';\n //print_r($e);\n $msg1 = $e;\n $flag = FALSE;\n }\n\n //Insert Error details in the Database.\n if ($flag == FALSE) {\n $flagErr = FALSE;\n $AccountHead = 'ORDER';\n $st = 'YES';\n $flagErr = SaveErrorDetails($userid, $crmTypeOrdI, $AccountHead, 'Error while adding order: ' . $subject . ' : ' . $msg, $st);\n }\n\n return $flag;\n}", "function email_inf_brand_tracking_link( $order_id, $campaign_id, $brand_id, $tracking_link ) {\n $influencer_id = get_order_influencer($order_id);\n $influencer_data = get_userdata($influencer_id);\n $influencer_first_name = $influencer_data->first_name;\n $influencer_email = $influencer_data->user_email;\n $brand_name = get_the_title($brand_id);\n $campaign_name = get_the_title($campaign_id);\n\n ob_start();\n ?>\n <h1><?php echo $brand_name; ?> is shipping to you!</h1>\n <p>Hi <?php echo $influencer_first_name ?>, <?php echo $brand_name ?> has shipped your product for the \"<b><?php echo $campaign_name ?></b>\" ShoutOut campaign!</p>\n\n <?php if( $tracking_link ) : ?>\n\n <p>You can track it by following this link: <a href=\"<?php echo $tracking_link ?>\"><?php echo $tracking_link ?></a></p>\n\n <?php endif; ?>\n <?php\n $msg = ob_get_clean();\n\n $body = generate_email_body($msg, '');\n\n // To send HTML mail, the Content-type header must be set\n $headers[] = 'MIME-Version: 1.0';\n $headers[] = 'Content-type: text/html; charset=iso-8859-1';\n\n // Additional headers\n $headers[] = 'From: Shop and Shout <influencers@shopandshout.com>';\n\n if( !SAS_TEST_MODE ) {\n // $headers[] = 'Cc: influencers@shopandshout.com';\n\n mail($influencer_email, $brand_name . ' has submitted a code for your ShoutOut', $body, implode(\"\\r\\n\", $headers));\n } else {\n mail( 'dev@shopandshout.com', $brand_name . ' has shipped to you', $body, implode(\"\\r\\n\", $headers));\n }\n}", "public function send() {\n\n\t\ttry {\n\t\t\t$api = new Api();\n\n\t\t\t$response = $api->get_smtp_client()->sendTransacEmail( $this->get_body() );\n\n\t\t\t$this->process_response( $response );\n\t\t}\n\t\tcatch ( \\SendinBlue\\Client\\ApiException $e ) {\n\t\t\t$error = json_decode( $e->getResponseBody() );\n\t\t\tif ( json_last_error() === JSON_ERROR_NONE ) {\n\t\t\t\tDebug::set(\n\t\t\t\t\t'Mailer: Sendinblue' . \"\\r\\n\" .\n\t\t\t\t\t'[' . sanitize_key( $error->code ) . ']: ' . esc_html( $error->message )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tcatch ( \\Exception $e ) {\n\t\t\tDebug::set(\n\t\t\t\t'Mailer: Sendinblue' . \"\\r\\n\" .\n\t\t\t\t$e->getMessage()\n\t\t\t);\n\n\t\t\treturn;\n\t\t}\n\t}", "public function toMail($notifiable)\n {\n //$url = url('/invoice/'.$this->invoice->id);\n return (new MailMessage)\n ->subject(__('CODE 101 - Nouveaux quarts de travail disponibles'))\n ->line(__(\"De nouveaux quarts de travail correspondants à votre profil sont actuellement disponibles\"))\n ->line(__('Nous vous invitons à consulter le calendrier des quarts de travail pour le poste suivant :'))\n ->line('Choisissez vite les quarts de travail qui vous conviennent')\n ->line('Merci de nous faire confiance,');\n \n }", "public function getSendInvoiceEmail()\n {\n return $this->scopeConfig->isSetFlag(\n self::XML_PATH_TEMPLATES_SEND_INVOICE_EMAIL,\n ScopeInterface::SCOPE_STORE,\n $this->storeId\n );\n }", "function handleOrderRequest($requestPayload){\n require 'Common.php';\n\n file_put_contents(\"OrderRequest.json\", $requestPayload);\n $jsonIterator = new RecursiveIteratorIterator(\n new RecursiveArrayIterator(json_decode($requestPayload, TRUE)),\n RecursiveIteratorIterator::SELF_FIRST);\n \n $attachments = attchmentsToArray(); // get potential attachments\n $attachments[] = \"OrderRequest.json\";\n $message = \"\";\n $client_email = \"\"; // send confirmation email to customer\n $orderNum = \"\"; // get uuid order number from request payload\n \n // append key value pair in JSON to the email message body\n foreach ($jsonIterator as $key => $val) {\n if (is_array($val)){\n $message.=$key;\n $message.=\"\\n\";\n }\n else {\n if (strpos($key, 'file')!==false){\n $tempArray = explode(':', $key, 3);\n if (count($tempArray)==3){\n $fileName = $tempArray[2];\n $fileName = substr($fileName, 1);\n $nameArray = explode('.', $fileName);\n $path = './uploads' . $fileName;\n $message.=$key;\n $message.=\"\\n\";\n $attachments[] = $path;\n continue;\n }else continue;\n \n }\n $message.=$key;\n $message.= \" : \";\n $message.=$val;\n $message.= \"\\n\";\n if ($key === 'email') $client_email = $val;\n if ($key === 'orderNum') $orderNum = $val;\n // echo($client_email);\n }\n }\n\n\n echo($message);\n\n // send email\n\n \n sendEmail(\"New Order Request: \". $orderNum, $message, \"anffoptofab.autotest@gmail.com\", $attachments);\n sendEmail(\"ANFF OptoFab Order Confirmation\", \"Your order has been received!\", $client_email);\n \n \n}", "public static function notifyInvoiceConfirmed($order_id)\n { \n $order = Order::find($order_id);\n $superAdmin_ids = User::whereHas('roles', function ($query) {\n $query->where('name', '=', 'superAdmin');\n })\n ->pluck('id')\n ->toArray();\n\n $driver_id = $order->driver_id;\n\n $notification = [\n 'notifyType' => 'invoice_confirmed',\n 'message' => $order->customer->fname. ' has confirmed invoice for Order #'.$order->id,\n 'model' => 'order',\n 'url' => $order->id\n ];\n\n // Send Invoice Confirmed Notification to All Superadmins\n foreach($superAdmin_ids as $id){\n User::find($id)->pushNotification($notification);\n }\n\n // Send Invoice Confirmed Notification to Pick Driver\n User::find($driver_id)->AppNotification($notification);\n\n // Email Notification to Customer\n $customer = User::find($order->customer_id);\n $customerMailData = [\n 'emailType' => 'invoice_confirmed',\n 'name' => $customer->full_name,\n 'email' => $customer->email,\n 'orderID' => $order_id,\n 'subject' => \"GO-RINSE: Order: #\".$order_id. \" shipped for laundry\",\n 'message' => \"Your Order #\".$order_id. \" has been shipped for laundry. We will contact you soon\",\n 'orderDetails' => $order->generateInvoiceForUser()\n ];\n \n // Notify Customer in email\n Mail::send(new notifyMail($customerMailData));\n\n return true;\n }", "static function send_confirmation_email($form_options, $submited_info_html, $user_email, $post_data) {\n //var_dump('$form_options:', $form_options);\n// var_dump('$user_email: ', $user_email);\n\n\n // if email confirmation is enabled\n if(isset($form_options['enable_email_confirmation']) && $form_options['enable_email_confirmation'] == 1 ) {\n\n $tomail = '';\n\n if(isset($form_options['email_confirmation_to']) ) {\n if( trim($form_options['email_confirmation_to']) == '%field_email%'){\n // if the 'email_confirmation_to' is set to '%field_email%', then we will use the value from the email field - which in this case is passed\n // by $user_email\n $tomail = $user_email;\n }else{\n // otherwise if any other value is entered, we will use it\n $tomail = $form_options['email_confirmation_to'];\n }\n\n }else{\n $tomail = $user_email;\n }\n\n if(strpos($tomail, ',')){\n $tomail = str_replace(' ', '', $tomail);\n $tomail = explode(',',$tomail);\n }\n\n $subject = '';\n if(isset($form_options['email_confirmation_subject'])) {\n $subject = $form_options['email_confirmation_subject'];\n }\n\n $headers = array();\n if( (isset($form_option['text_email']) && !$form_option['text_email']) || !isset($form_option['text_email']) ){\n $headers[] = 'Content-Type: text/html; charset=UTF-8';// send html email\n }\n\n $message = '';\n if(isset($form_options['email_confirmation_value'])) {\n $message = str_replace('%all_fields%', $submited_info_html, $form_options['email_confirmation_value']);\n $message = self::maybe_replace_subject($message,$post_data); // replace any %field_id%\n }\n\n //$maybe_send_email = wp_mail( $tomail, $subject, $message, $headers);\n\n $from = trim($form_options['send-to-email']);\n $maybe_send_email = Flo_Forms::wp_mail( $tomail, $subject, $message, $headers, $from);\n\n return $maybe_send_email;\n\n }\n\n return false;\n }", "public function trigger( $order_id, $force = false ) {\n\n\t\t\t// bail if no order ID is present\n\t\t\tif ( ! $order_id ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// setup order object\n\t\t\t$this->object = new WC_Order( $order_id );\n\t\t\t$order_items = Advanced_Reviews_Pro_Reminders::get_limited_ordered_products( $this->object->get_items() );\n\t\t\t$this->recipient = $this->object->get_billing_email();\n\t\t\t$can_send = $force ? $force : $this->can_send_email( $order_id );\n\n\t\t\tif ( ! $this->is_enabled() || ! $this->recipient || empty( $order_items ) || ! $can_send ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Replacements\n\t\t\t$this->placeholders['{order_date}'] = date_i18n( wc_date_format(), strtotime( $this->object->order_date ) );\n\t\t\t$this->placeholders['{order_id}'] = $this->object->get_order_number();\n\t\t\t$this->placeholders['{site_title}'] = arp_get_option( ARP_PREFIX . 'shop_name_text', 1, get_bloginfo( 'name' ) );\n\t\t\t$this->placeholders['{customer_first_name}'] = $this->object->get_billing_first_name();\n\t\t\t$this->placeholders['{customer_last_name}'] = $this->object->get_billing_last_name();\n\t\t\t$this->placeholders['{customer_full_name}'] = $this->object->get_billing_first_name() . ' ' . $this->object->get_billing_last_name();\n\t\t\t$this->placeholders['{list_of_products}'] = $this->get_links_ordered_items( $order_items );\n\t\t\t$this->placeholders['{review_link}'] = $this->get_links_ordered_items( $order_items, true );\n\n\t\t\t$this->heading = $this->format_string( arp_get_option( ARP_PREFIX . 'email_heading_text', 2 ) );\n\t\t\t$this->subject = $this->format_string( arp_get_option( ARP_PREFIX . 'email_subject_text', 2 ) );\n\n\t\t\tupdate_post_meta( $order_id, '_' . ARP_PREFIX . 'order_last_sent_email', current_time( 'timestamp' ) );\n\n\t\t\tdo_action_ref_array( 'arp_before_send_reminder_email', array( &$this ) );\n\n\t\t\t// Woohoo, send the email!\n\t\t\t$this->send( $this->recipient, $this->subject, $this->get_content(), $this->get_headers(), $this->get_attachments() );\n\n\t\t\tdo_action( 'arp_after_send_reminder_email', $order_id );\n\t\t}", "function email_brand_user_invite($email, $invite_string, $brand_id) {\n\n $brand = get_post($brand_id);\n\n $brand_name = $brand->post_title;\n\n $invite_url = get_site_url() . '/brand-signup/?invite=' . $invite_string;\n\n ob_start();\n ?>\n <p>Hi there, <?php echo esc_html($brand_name); ?> has invited you to join ShopandShout as a Brand representative</p>\n <p>Click the following link to sign up: <a href=\"<?php echo esc_url($invite_url) ?>\"><?php echo esc_url($invite_url) ?></a></p>\n <?php\n\n $msg = ob_get_clean();\n\n $body = generate_email_body($msg, '');\n\n // To send HTML mail, the Content-type header must be set\n $headers[] = 'MIME-Version: 1.0';\n $headers[] = 'Content-type: text/html; charset=iso-8859-1';\n\n // Additional headers\n $headers[] = 'From: Shop and Shout <brands@shopandshout.com>';\n\n $subject = 'You\\'re invited to ShopandShout';\n\n mail( $email, $subject, $body, implode( \"\\r\\n\", $headers ) );\n}", "public function send_mail_seller($post, $all_post)\n {\n // Use the messaging plugin, if it is enabled and we are not using the config file\n $use_messaging = Model_Plugin::is_enabled_for_role('Administrator', 'Messaging');\n\n $invoice_file_id = null;\n $data = (array) $post;\n $template_name = !empty($data['template_name']) ? $data['template_name'] : (!empty($all_post['template_name']) ? $all_post['template_name'] : '');\n\n if ($template_name && class_exists('Model_Document'))\n {\n if (isset($all_post['lines'])) {\n $cart_details = $all_post;\n $cart_id = $cart_details['id'];\n } else {\n $checkout_model = new Model_Checkout();\n $cart_details = $checkout_model->get_cart_details();\n $cart_id = $checkout_model->get_cart_id();\n }\n\n $shipping_surname = isset($data['shipping_surname']) ? ' '.$data['shipping_surname'] : '';\n $address = array_filter(array(str_replace(\"\\n\", ', ', $data['address_1']), $data['address_2'], $data['address_3'], $data['address_4']));\n $shipping_address = array_filter(array(str_replace(\"\\n\", ', ', $data['shipping_address_1']), $data['shipping_address_2'], $data['shipping_address_3'], $data['shipping_address_4'], $data['shipping_postcode']));\n\n $address_multiline = preg_replace('/[\\r\\n]+/', \"\\n\", $data['address_1'].\"\\n\".$data['address_2'].\"\\n\".$data['address_3'].\"\\n\".$data['address_4']);\n $shipping_address_multiline = preg_replace('/[\\r\\n]+/', \"\\n\", $data['shipping_address_1'].\"\\n\".$data['shipping_address_2'].\"\\n\".$data['shipping_address_3'].\"\\n\".$data['shipping_address_4'].\"\\n\".$data['shipping_postcode']);\n\n $template_data = array(\n 'address' => $address_multiline,\n 'address_1' => $data['address_1'],\n 'address_2' => $data['address_2'],\n 'address_3' => $data['address_3'],\n 'address_4' => $data['address_4'],\n 'address_with_commas' => implode(', ', $address),\n 'cart' => '',\n 'comments' => !empty($data['comments']) ? trim($data['comments']) : '',\n 'comments_heading' => trim($data['comments']) ? 'Comments' : '',\n 'customer_name' => $data['ccName'],\n 'doc_postfix' => '_'.$cart_id,\n 'email' => $data['email'],\n 'gift_card_text' => !empty($data['gift_card_text']) ? trim($data['gift_card_text']) : (!empty($data['giftcard_text']) ? trim($data['giftcard_text']) : ''),\n 'id' => $cart_id,\n 'payment_mode' => ($all_post['payment_type'] == 'realex') ? 'Credit Card' : $all_post['payment_type'],\n 'payment_type' => $all_post['payment_type'],\n 'phone' => $data['phone'],\n 'products' => '',\n 'shipping_address' => $shipping_address_multiline,\n 'shipping_address_1' => $data['shipping_address_1'],\n 'shipping_address_2' => $data['shipping_address_2'],\n 'shipping_address_3' => $data['shipping_address_3'],\n 'shipping_address_4' => $data['shipping_address_4'],\n 'shipping_address_with_commas' => implode(', ', $shipping_address),\n 'shipping_name' => trim($data['shipping_name'].$shipping_surname),\n 'shipping_postcode' => $data['shipping_postcode'],\n 'shipping_price' => '€'.(isset($cart_details->shipping_price) ? $cart_details->shipping_price : $cart_details['shipping_price']),\n 'size_guide' => !empty($data['size_guide_read']) ? $data['size_guide_read'] : 'No',\n 'subtotal2' => '€'.(isset($cart_details->subtotal2) ? $cart_details->subtotal2 : $cart_details['subtotal2']),\n 'template_name' => $template_name,\n 'today_date' => date('D jS M Y'),\n 'today_dd_mm_yyyy' => date('d-m-Y')\n );\n\n // If shipping information is not provided, assume the billing information is the shipping information\n $billing_parameters = array('address_1', 'address_2', 'address_3', 'address_4', 'address_with_commas');\n foreach ($billing_parameters as $parameter) {\n $template_data['shipping_'.$parameter] = !empty($template_data['shipping_'.$parameter]) ? $template_data['shipping_'.$parameter] : $template_data[$parameter];\n }\n $template_data['shipping_name'] = !empty($template_data['shipping_name']) ? $template_data['shipping_name'] : $template_data['customer_name'];\n\n $number = 0;\n $products_list = '';\n $lines = isset($cart_details->lines) ? $cart_details->lines : $cart_details['lines'];\n foreach ($lines as $product)\n {\n // Only continue if there is a product. (e.g. skip deleted cart items)\n if ($product->product->id)\n {\n $pdetails = new Model_Product($product->product->id);\n $pdetails = $pdetails->get_data();\n $products = array(\n 'id_'.$number => $product->product->id,\n 'details_'.$number => $product->product->title,\n 'quantity_'.$number => ' × '.$product->quantity,\n 'price_'.$number => ' = €'.$product->price\n );\n $options_text = '';\n\n if (!empty($pdetails['category_ids'])) {\n $pcats = array();\n foreach ($pdetails['category_ids'] as $cat_id) {\n $pcat = Model_Category::get($cat_id);\n $pcats[] = $pcat[0]['category'];\n }\n $options_text .= 'Category: ' . implode(', ', $pcats) . '; ';\n }\n\n foreach ($product->options as $option) {\n // Check if this option is a matrix combination\n if (strpos($option->group, '&times;') > -1 && strpos($option->label, '&times;') > -1) {\n $matrix_groups = explode('×', html_entity_decode($option->group));\n $matrix_labels = explode('×', html_entity_decode($option->label));\n foreach ($matrix_groups as $key => $matrix_group) {\n $group_label = explode('(', $matrix_group);\n $options_text .= trim($group_label[0]) . ': ' . trim($matrix_labels[$key]) . ', ';\n }\n }\n else {\n $group_label = explode('(', $option->group);\n $options_text .= trim($group_label[0]).': ' . $option->label . ', ';\n }\n }\n $options_text = trim($options_text, ', ');\n $options_text = $options_text ? ' ['.$options_text.']' : '';\n $products['details_'.$number] .= $options_text;\n\n $template_data['cart'] .= $products['details_'.$number].$products['quantity_'.$number].$products['price_'.$number].\"\\n\";\n $products_list .= '(' . $products['details_'.$number] . ') ' .$products['quantity_'.$number].' '.$products['price_'.$number].\"\\n\";\n $template_data = array_merge($template_data, $products);\n\n $number++;\n }\n }\n $template_data['products'] = Model_Document::maintain_multiline(trim($products_list));\n\n // If less than five items have been added to the cart, add blanks to fill up five lines in the document\n for (; $number <= 5; $number++)\n {\n $products = array(\n 'id_'.$number => '',\n 'details_'.$number => '',\n 'quantity_'.$number => '',\n 'price_'.$number => ''\n );\n $template_data = array_merge($template_data,$products);\n }\n $docgenerator = new Model_Document();\n try {\n $docgenerator->auto_generate_document($template_data, $direct = 0, $pdf = true);\n } catch (Exception $e) {\n Log::instance()->add(\"Error generating email attachment\\n\".Log::ERROR, $e->getMessage().$e->getTraceAsString());\n }\n\n $invoice_file_id = $docgenerator->lastFileId;\n }\n\n\t\tif ( ! $use_messaging)\n\t\t{\n\t\t\t$event_id = Model_Notifications::get_event_id(Kohana::$config->load('config')->get('successful_payment_seller'));\n\t\t}\n\n if ($use_messaging OR (isset($event_id) AND $event_id !== FALSE))\n {\n $checkout_model = new Model_Checkout();\n $canvas = Session::instance()->get('canvas');\n $files = array();\n if ( ! is_null($canvas))\n {\n foreach ($canvas as $product)\n {\n\t\t\t\t\t$files[] = '/var/tmp/'.$product['filename'];\n\t\t\t\t\t// $files[] = '/var/tmp/'.$product['filename_raster'];\n\t\t\t\t\t// $files[] = $product['canvas_image']; // .png of the canvas. This can be used for comparisons, during testing\n }\n }\n\n\t\t\tif (isset($post->store_id) AND $post->store_id != '')\n\t\t\t{\n\t\t\t\t$store = Model_Location::get($post->store_id);\n\t\t\t}\n\n $attachments = array();\n if ($invoice_file_id != null)\n {\n\n $document = DB::select('name')->from('plugin_files_file')->where('id','=',$invoice_file_id)->execute()->as_array();\n $files[]=$document[0]['name'];\n $attachments[] = array(\n 'file_id' => $invoice_file_id\n );\n }\n\n // This should really only come from \"$all_post\", but it needs to be confirmed that nowhere else relying on any of other locations\n $products = isset($post->lines) ? $post : (isset($all_post['lines']) ? (object) $all_post : $checkout_model->get_cart_details());\n\n\t\t\t$view = View::factory('email/payment_success_seller', array(\n\t\t\t\t\t'checkout' => $post,\n\t\t\t\t\t'products' => $products,\n\t\t\t\t\t'post' => self::clean_sensitive_data($all_post),\n\t\t\t\t\t'store' => (isset($store) ? $store : NULL)\n\t\t\t\t)\n\t\t\t)\n\t\t\t\t->set('skip_comments_in_beginning_of_included_view_file', TRUE)\n\t\t\t\t->render();\n\n\t\t\tif ($use_messaging)\n\t\t\t{\n $messaging_model = new Model_messaging;\n\t\t\t\t$messaging_model->send_template(\n 'successful_payment_seller',\n count($attachments) ? array('content' => $view, 'attachments' => $attachments) : $view\n );\n\t\t\t}\n\t\t\telseif (isset($event_id) AND $event_id !== FALSE)\n\t\t\t{\n\t\t\t\t$notifications_model = new Model_Notifications($event_id);\n\t\t\t\t$notifications_model->send($view, $files);\n\t\t\t}\n }\n }", "public function generateTaxInvoice($order_id)\n {\n $order = DB::connection('mysql2')->table('sales')->where('sale_id', '=', $order_id)->first();\n $sales_items = DB::connection('mysql2')->table('channel_sku')\n ->join('sku', 'channel_sku.sku_id', '=', 'sku.sku_id')\n ->join('products', 'products.product_id', '=', 'channel_sku.product_id')\n ->join('sales_items', 'channel_sku_id', '=', 'sales_items.product_id', 'right')\n ->where('sale_id', '=', $order_id)\n ->get();\n\n //$channel = Channels::where('channel_id', '=', $order->channel_id)->first();\n $channel = DB::connection('mysql2')->table('channels')->where('channel_id', '=', $order->channel_id)->first();\n \n $channel_type = '';\n $channel_types = config('globals.channel_type');\n for ($i = 0; $i <= count($channel_types)-1; $i++) {\n if ($channel->channel_type == $i) {\n $channel_type = $channel_types[$i];\n }\n }\n\n $member = DB::connection('mysql2')->table('members')->where('member_id', '=', $order->member_id)->first();\n $currency = (!empty($order->currency) ? $order->currency : $channel->channel_currency);\n $credits = DB::connection('mysql2')->table('store_credits_log')->where('sale_id', '=', $order_id)->get();\n if ($credits) {\n for ($i = 0; $i<= count($credits)-1; $i++) {\n for ($j = 0; $j<= count($sales_items)-1; $j++) {\n if ($credits[$i]->sale_item_id == $sales_items[$j]->item_id) {\n $sales_items[$j]->credits = (!empty($credits[$i]->amount) ? $credits[$i]->amount : '');\n }\n }\n }\n }\n\n $promotions = array();\n $order_items = array();\n foreach ($sales_items as $item) {\n if ($item->product_type == 'PromotionCode') {\n $promo = DB::connection('mysql2')->table('promotion_code')->select('promo_code')->where('code_id', '=', $item->product_id)->first();\n $promotions[] = $promo->promo_code;\n }\n if ($item->product_type == 'ChannelSKU') {\n $order_items[] = $item;\n if ($item->item_original_quantity != $item->item_quantity && $item->item_original_quantity != 0) {\n $returns = true;\n }\n }\n }\n\n $order->promotions = (!empty($promotions) ? implode(', ', $promotions) : 'None');\n $client = DB::connection('mysql2')->table('clients')->select('client_name')->where('client_id', '=', $order->client_id)->first();\n\n /**\n *\n * Temporarily store to local storage folder. \n * Future to upload to S3 and direct user to view the tax invoice for printing with print dialog.\n *\n */\n\n $type = ($channel->channel_name == 'Fabspy' ? 'fabspy' : 'hw');\n //return view('orders.tax_invoice', compact('order', 'sales_items', 'channel_type', 'member', 'currency'));\n $today = Carbon::now()->setTimezone('UTC')->format('Ymd');\n //$fileDate = 111;\n $fileDate = Carbon::createFromFormat('Y-m-d H:i:s', $order->created_at, 'UTC')->setTimezone('Asia/Kuala_Lumpur')->format('Ymd');\n\n $pdf = \\PDF::loadView('orders.tax_invoice_polohaus', compact('order', 'order_items', 'channel_type', 'member', 'currency'))->save(storage_path('tax-invoice/tax-invoice-'.str_replace(' ', '-', strtolower($client->client_name)).'-'.str_replace(' ', '-', strtolower($channel->channel_name)).'-'.$order_id\n .'-'.$fileDate.'.pdf'));\n }", "function send_pending_activation_email($email, $name, $user_id, $description, $site_country){\r\n\t\r\n$member_id = \"M\".($user_id+10000);\r\n\t\r\n\tswitch($site_country){\r\n\t\tcase \"AU\":\r\n\t\t\t$site_url = \"https://www.stickynumber.com.au/\";\r\n\t\t\t$main_logo = \"main-logo.png\";\r\n\t\t\t$help_desk_email = \"support@stickynumber.com.au\";\r\n\t\t\tbreak;\r\n\t\tcase \"COM\":\r\n\t\t\t$site_url = \"https://www.stickynumber.com/\";\r\n\t\t\t$main_logo = \"main-logo-r1.png\";\r\n\t\t\t$help_desk_email = \"support@stickynumber.com\";\r\n\t\t\tbreak;\r\n\t\tcase \"UK\":\r\n\t\t\t$site_url = \"https://www.stickynumber.uk/\";\r\n\t\t\t$main_logo = \"main-logo-uk.png\";\r\n\t\t\t$help_desk_email = \"support@stickynumber.uk\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treturn \"Error: Unknown site_country $site_country for user with email id: $email\";\r\n\t\t\tbreak;\r\n\t}\r\n\t\r\n\t$from_email = $help_desk_email;\r\n\r\n\t$subject_line = \"Your order is pending activation\";\r\n\t$email_html = '\r\n\t\t<html>\r\n\t\t\t<head>\r\n\t\t\t \t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\r\n\t\t\t\t<title>Your Order is Pending Activation Notification</title>\r\n\t\t\t \t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\r\n\t\t\t \t<link href=\"http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700\" rel=\"stylesheet\" type=\"text/css\">\r\n\t\t\t</head>\r\n\t\t\t<body>\r\n\t\t\t\t<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"background-color: transparent;margin:0 auto;font: 100%/1.6 \\'Open Sans\\',Verdana, Arial, Helvetica, sans-serif;\">\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td valign=\"middle\" style=\"background-color:#F5F5F5\">\r\n\t\t\t\t\t\t\t<img src=\"'.$site_url.'images/'.$main_logo.'\" style=\"text-align:center; margin:0 auto; display:block\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n \t\t\t\t\t<td style=\"padding:15px; background-color:#F5F5F5\">\r\n \t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"background-color:#e88300; color:#fff;\">\r\n \t\t\t\t\t\t\t<tr>\r\n \t\t\t\t\t\t\t\t<td style=\"text-align:center;\">\r\n \t\t\t\t\t\t\t\t\t<h1 style=\"margin-bottom:20px; font-size:40px; line-height:48px;\">Your Order is Pending Activation</h1>\r\n \t\t\t\t\t\t\t\t</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</td>\r\n \t\t\t\t</tr>\r\n \t\t\t\t<tr>\r\n \t\t\t\t\t<td style=\"padding:20px; background-color:#F5F5F5\"><h3 style=\"margin-bottom:0\">Hello '.$name.',</h3>\r\n \t\t\t\t\t\t<p>This online number is pending activation. Your order will be proccesed in the next 4 business hours.</p>\r\n \t\t\t\t\t</td>\r\n \t\t\t\t</tr>\r\n \t\t\t\t<tr>\r\n \t\t\t\t\t<td style=\"padding:15px 15px 50px 15px\">\r\n \t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n \t\t\t\t\t\t\t<tr>\r\n \t\t\t\t\t\t\t\t<td width=\"50%\" valign=\"top\" style=\"color:#4B5868\">\r\n \t\t\t\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-size:18px\">\r\n \t\t\t\t\t\t\t\t\t\t<tr>\r\n \t\t\t\t\t\t\t\t\t\t\t<td>\r\n \t\t\t\t\t\t\t\t\t\t\t\t<h3 style=\"font-size:20px; margin:0 0 10px 0;\">Customer ID# <span style=\"color:#090\">'.$member_id.'</span></h3>\r\n \t\t\t\t\t\t\t\t\t\t\t</td>\r\n \t\t\t\t\t\t\t\t\t\t</tr>\r\n \t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t \t<td>\r\n\t\t\t\t\t\t\t\t\t\t \t\t<p style=\"margin:0\">Status</p><p style=\"margin:0; color:#ff0000\"><strong>Pending Activation</strong></p>\r\n\t\t\t\t\t\t\t\t\t\t \t</td>\r\n\t\t\t\t\t\t\t\t\t\t \t</tr>\r\n\t\t\t\t\t\t\t\t\t\t \t<tr>\r\n\t\t\t\t\t\t\t\t\t\t \t\t<td style=\"padding-top:15px\">\r\n\t\t\t\t\t\t\t\t\t\t \t\t\t<p style=\"margin:0;\"><strong>'.$description.'</strong></p>\r\n\t\t\t\t\t\t\t\t\t\t \t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t \t</tr>\r\n \t\t\t\t\t\t\t\t\t</table>\r\n \t\t\t\t\t\t\t\t</td>\r\n \t\t\t\t\t\t\t\t<td width=\"50%\" valign=\"top\" style=\"background-color:#4A5865; padding:15px; color:#fff; text-align:center;\">\r\n \t\t\t\t\t\t\t\t\t<h1 style=\"font-size:44px; margin:0 0 20px 0;\">Need help?</h1>\r\n \t\t\t\t\t\t\t\t\t<p style=\"margin:0 0 20px 0; font-size:24px\">Our friendly support agents are ready to help. <br /><br />Chat | Phone | Email</p>\r\n \t\t\t\t\t\t\t\t</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</td>\r\n \t\t\t\t</tr>\r\n \t\t\t\t<tr>\r\n \t\t\t\t\t<td style=\"text-align:center; font-size:12px; padding:14px 0 8px 0; background:#eee;\">\r\n \t\t\t\t\t\tEstablished 2010 <a href=\"'.trim($site_url).'\">Sticky Number</a> All Rights Reserved. | <a href=\"'.trim($site_url).'terms/\">Terms of Service</a> & <a href=\"'.$site_url.'privacy-policy/\">Privacy Policy</a>.</p><p>Phone: (+61) 0291 192 986 | Email: <a href=\"mailto:'.$help_desk_email.'\">'.$help_desk_email.'</a></p>\r\n \t\t\t\t\t</td>\r\n \t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t</body>\r\n\t\t</html>\r\n\t';//$email_html ends here\r\n\t\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\n\t$headers .= 'From: Sticky Number <' . $from_email .'>' . \"\\r\\n\";\r\n\t$addl_params = '-f '. $from_email.' -r '.$from_email.\"\\r\\n\";\r\n\t$status = mail($email, $subject_line, $email_html, $headers, $addl_params);\r\n\tif($status==true){\r\n\t\t$status = create_client_notification($user_id, $from_email, $email, $subject_line, $email_html);\r\n\t\tif(is_numeric($status)==false && substr($status,0,6)==\"Error:\"){\r\n\t\t\techo $status;\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n}" ]
[ "0.7448659", "0.73390365", "0.7062401", "0.6870464", "0.6855523", "0.6851597", "0.6800982", "0.6787108", "0.67648876", "0.66204417", "0.6594", "0.6570266", "0.6549254", "0.6492535", "0.64895767", "0.64656407", "0.6438955", "0.64311403", "0.6420301", "0.64181757", "0.63867325", "0.6362094", "0.63585025", "0.6353431", "0.63467085", "0.63301444", "0.6311697", "0.6301445", "0.63005245", "0.6272348", "0.626597", "0.6255291", "0.62455624", "0.6213554", "0.61874914", "0.6092054", "0.608386", "0.608185", "0.6076145", "0.6056862", "0.6056359", "0.60527873", "0.60505295", "0.6050392", "0.603842", "0.6033971", "0.6017175", "0.6015382", "0.6013337", "0.6012045", "0.5969617", "0.59586686", "0.59576464", "0.59546715", "0.5952117", "0.59482723", "0.5938787", "0.59378153", "0.5926936", "0.5920777", "0.5915509", "0.5915297", "0.5907941", "0.58996993", "0.588676", "0.5882693", "0.5879105", "0.5875538", "0.5874472", "0.587414", "0.586895", "0.58650273", "0.58571106", "0.5847784", "0.58360916", "0.5833123", "0.5823619", "0.5823248", "0.5800785", "0.5798536", "0.57955056", "0.5786834", "0.57845914", "0.5775825", "0.57750547", "0.57709044", "0.5759724", "0.5757322", "0.5756605", "0.57551503", "0.5748256", "0.5746693", "0.57451403", "0.5745099", "0.5733818", "0.5731601", "0.57279503", "0.5722092", "0.571702", "0.57130605" ]
0.77047646
0
woocommerce_pip_get_plugin_url function. Gets the plugin url without a trailing slash, e.g.
Функция woocommerce_pip_get_plugin_url. Получает URL плагина без последнего слэша, например:
function woocommerce_pip_get_plugin_url() { return untrailingslashit( plugins_url( '/', __FILE__ ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_get_plugin_path() {\n\n\treturn untrailingslashit( plugin_dir_path( __FILE__ ) );\n}", "protected function getPluginURL(): string\n {\n return trim(App::getExtension($this->getExtensionClass())->getPluginURL(), '/');\n }", "public function get_plugin_url() {\n\t\tif ( isset( $this->plugin_url ) ) {\n\t\t\treturn $this->plugin_url;\n\t\t}\n\t\t$this->plugin_url = plugin_dir_url( dirname( __FILE__ ) );\n\t\treturn $this->plugin_url;\n\t}", "public function get_plugin_url() {\n\n\t\tif ( $this->plugin_url )\n\t\t\treturn $this->plugin_url;\n\n\t\treturn $this->plugin_url = plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) );\n\t}", "public function plugin_url() {\n\t\tif ( $this->plugin_url ) return $this->plugin_url;\n\t\treturn $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );\n\t}", "function GetPluginURL() {\r\n\t\t// function plugins_url() exists since WP 2.6.0\r\n\t\tif (function_exists('plugins_url')) {\r\n\t\t\treturn trailingslashit(plugins_url(basename(dirname($this->g_info['PluginFile']))));\r\n\t\t} else {\r\n\t\t\t// We do it manually; will not work if wp-content is renamed or redirected\r\n\t\t\t$result = str_replace(\"\\\\\", '/', dirname($this->g_info['PluginFile']));\r\n\t\t\t$result = trailingslashit(get_bloginfo('wpurl')) . trailingslashit(substr($result, strpos($result,'wp-content/')));\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t}", "public function get_plugin_url() {\n\t\tif ( isset( $this->plugin_url ) ) {\n\t\t\treturn $this->plugin_url;\n\t\t}\n\t\t$this->plugin_url = plugin_dir_url( __FILE__ );\n\t\treturn $this->plugin_url;\n\t}", "public function ts_get_plugin_url() {\n return plugins_url() . '/' . self::$plugin_folder . '/';\n }", "public function woo_bundles_plugin_url() {\n\t\t_deprecated_function( __METHOD__ . '()', '5.0.0', __CLASS__ . '::plugin_url()' );\n\t\treturn $this->plugin_url();\n\t}", "public function get_plugin_url() {\n\t\t\treturn $this->plugin_url;\n\t\t}", "public function get_plugin_url() {\n\t\t\treturn $this->plugin_url;\n\t\t}", "public function get_plugin_url() {\n\t\t\treturn $this->plugin_url;\n\t\t}", "public function plugin_url()\n {\n return untrailingslashit(plugins_url('/', __FILE__));\n }", "public function plugin_url() {\n return untrailingslashit( plugins_url( '/', __FILE__ ) );\n }", "public function plugin_url() {\n return untrailingslashit(plugins_url('/', $this->file()));\n }", "function GetPluginUrl() {\n\t\tif (function_exists('plugins_url')) return trailingslashit(plugins_url(basename(dirname(__FILE__))));\n\n\t\t//Try to find manually... can't work if wp-content was renamed or is redirected\n\t\t$path = dirname(__FILE__);\n\t\t$path = str_replace(\"\\\\\",\"/\",$path);\n\t\t$path = trailingslashit(get_bloginfo('wpurl')) . trailingslashit(substr($path,strpos($path,\"wp-content/\")));\n\t\treturn $path;\n\t}", "public static function plugin_url() {\n return untrailingslashit( plugins_url( '/', __FILE__ ) );\n }", "public function plugin_url()\n {\n return untrailingslashit(plugins_url('/', WC_CRM_FILE));\n }", "function plugin_url() {\n\t\t\tif ( $this->plugin_url ) {\n\t\t\t\treturn $this->plugin_url;\n\t\t\t}\n\n\t\t\treturn $this->plugin_url = plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) );\n\t\t}", "public function plugin_url() {\n\t\treturn untrailingslashit( plugins_url( '/', __FILE__ ) );\n\t}", "public static function plugin_url()\n {\n return untrailingslashit( plugins_url( '/', __FILE__ ) );\n }", "public static function plugin_url() {\r\n return plugin_dir_url( __FILE__ );\r\n }", "public static function get_plugin_url()\n {\n $page_id = MManiaDB::get_plugin_page_id();\n \n if($page_id)\n return get_permalink($page_id);\n \n return '';\n }", "public function plugin_url() {\n return untrailingslashit( plugins_url( '/', __FILE__ ) );\n }", "public function plugin_url() {\n\t\t\treturn untrailingslashit( plugins_url( '/', __FILE__ ) );\n\t\t}", "public function plugin_url() {\n\t\t\treturn untrailingslashit( plugins_url( '/', __FILE__ ) );\n\t\t}", "static function plugin_url() {\r\n\t\treturn untrailingslashit( plugin_dir_url( __FILE__ ) );\r\n\t}", "function _get_plugin_url() {\n\tstatic $plugin_url;\n\n\tif ( empty( $plugin_url ) ) {\n\t\t$plugin_url = plugins_url( null, __FILE__ );\n\t}\n\n\treturn $plugin_url;\n}", "function _get_plugin_url() {\n\tstatic $plugin_url;\n\n\tif ( empty( $plugin_url ) ) {\n\t\t$plugin_url = plugins_url( null, __FILE__ );\n\t}\n\n\treturn $plugin_url;\n}", "function _get_plugin_url() {\n\tstatic $plugin_url;\n\n\tif ( empty( $plugin_url ) ) {\n\t\t$plugin_url = plugins_url( null, __FILE__ );\n\t}\n\n\treturn $plugin_url;\n}", "function _get_plugin_url()\n{\n static $plugin_url;\n\n if (empty($plugin_url)) {\n $plugin_url = plugins_url(null, __FILE__);\n }\n\n return $plugin_url;\n}", "public function plugin_url()\n {\n return untrailingslashit(plugins_url('/', TDLW_FILE));\n }", "function ccwpPluginUrl(string $path = ''): string\n {\n $urlPath = plugin_dir_url(__FILE__);\n\n return trim(\"{$urlPath}{$path}\");\n }", "public static function getURL() {\n\t\treturn WP_CONTENT_URL.'/plugins/'.basename(dirname(__FILE__)) . '/';\n\t}", "public static function plugin_dir_url() {\n return plugin_dir_url( __FILE__ );\n }", "public function plugin_url() {\n return untrailingslashit( plugins_url( '/', GRAM_ABSPATH . '/wp-instagram.php' ) );\n }", "public function getUrl() {\n\t\treturn $this->config['plugin_url'];\n\t}", "function _cb_plugins_url_for_theme( string $url, string $path, string $plugin ): string {\n\t\t$theme_dir = wp_normalize_path( defined( 'THEME_PATH' ) ? THEME_PATH : get_stylesheet_directory() );\n\t\tif ( false !== strpos( $plugin, $theme_dir ) ) {\n\t\t\treturn \\wpinc\\abs_url( \\wpinc\\get_file_uri( dirname( $plugin ) ), $path );\n\t\t}\n\t\treturn $url;\n\t}", "public static function get_plugin_path()\n {/*{{{*/\n return self::get_siteurl().'/source/plugin/gwadmin';\n }", "public function get_plugin_path() {\n\t\treturn trailingslashit( dirname( $this->_plugin_file ) );\n\t}", "function plugins_url($path = '', $plugin = '')\n{\n}", "private function get_plugin_path() {\n if (isset($this->plugin_path)) {\n return $this->plugin_path;\n }\n $path = $this->plugin_path = plugin_dir_path( __FILE__ );\n\n return untrailingslashit($path);\n }", "public function get_plugin_path() {\n\t\t\treturn $this->plugin_path;\n\t\t}", "public function get_plugin_path() {\n\t\t\treturn $this->plugin_path;\n\t\t}", "public function get_plugin_path() {\n\t\t\treturn $this->plugin_path;\n\t\t}", "protected function get_plugin_path()\n {\n return dirname($this->get_ajax_base_uri());\n }", "public function get_plugin_path() {\n\n\t\tif ( $this->plugin_path )\n\t\t\treturn $this->plugin_path;\n\n\t\treturn $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );\n\t}", "function get_plugin_dir()\n{\n\treturn WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),\"\",plugin_basename(__FILE__));\n}", "function getCurrentPluginUrl(){ global $currentPlugin; return site_url.module_path.'/'.$currentPlugin.'/'; }", "protected function get_plugin_file_path() {\n $filename = $this->reflectionClass()->getFileName();\n if ( stristr( $filename, WP_PLUGIN_DIR ) === 0 ) {\n return $filename;\n }\n }", "protected static function getPluginPath(): string\n {\n $realClassDir = dirname(self::getFileName(), 3);\n $baseName = basename($realClassDir);\n\n return realpath(WP_PLUGIN_DIR . '/' . $baseName) ?: '';\n }", "public function plugin_url( $path = null ) {\n\n\t\t\tif ( ! $this->plugin_url ) {\n\t\t\t\t$this->plugin_url = trailingslashit( plugin_dir_url( __FILE__ ) );\n\t\t\t}\n\n\t\t\treturn $this->plugin_url . $path;\n\t\t}", "public function plugin_url( $path = null ) {\n\n\t\t\tif ( ! $this->plugin_url ) {\n\t\t\t\t$this->plugin_url = trailingslashit( plugin_dir_url( __FILE__ ) );\n\t\t\t}\n\n\t\t\treturn $this->plugin_url . $path;\n\t\t}", "public function plugin_url( string $path )\n {\n return plugins_url( $path, $this->setup->file );\n }", "public function plugin_path() {\n return untrailingslashit( plugin_dir_path( __FILE__ ) );\n }", "public function plugin_url()\n {\n }", "public function plugin_path() {\n return untrailingslashit( plugin_dir_path( GRAM_ABSPATH . '/wp-instagram.php' ) );\n }", "protected function getDestinationPath()\n {\n $plugin = $this->getPluginInput();\n\n $parts = explode('.', $plugin);\n $name = array_pop($parts);\n $author = array_pop($parts);\n\n return plugins_path(strtolower($author) . '/' . strtolower($name));\n }", "public function plugin_path() {\n return untrailingslashit(plugin_dir_path($this->file()));\n }", "function GetPluginPath() {\r\n\t\t$path = dirname($this->g_info['PluginFile']);\r\n\t\treturn trailingslashit(str_replace(\"\\\\\", \"/\", $path));\r\n\t}", "function plugin_path() {\n\t\tif ( $this->plugin_path ) return $this->plugin_path;\n\n\t\treturn $this->plugin_path = untrailingslashit( plugin_dir_path( dirname( __FILE__ ) ) );\n\t}", "public function plugin_path()\n {\n return untrailingslashit(plugin_dir_path(__FILE__));\n }", "function GetPluginOptionsURL() {\r\n\t\tif (function_exists('admin_url')) {\t// since WP 2.6.0\r\n\t\t\t$adminurl = trailingslashit(admin_url());\t\t\t\r\n\t\t} else {\r\n\t\t\t$adminurl = trailingslashit(get_settings('siteurl')).'wp-admin/';\r\n\t\t}\r\n\t\t\treturn $adminurl.'options-general.php'.'?page=' . basename($this->g_info['PluginFile']);\t\t\r\n\t}", "public function plugin_path() {\n\t\tif ( $this->plugin_path ) return $this->plugin_path;\n\n\t\treturn $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );\n\t}", "public function plugin_path() {\n return untrailingslashit( plugin_dir_path( __FILE__ ) );\n }", "public function get_plugin_slug() {\n return $this->plugin_slug;\n }", "function plugin_path() {\n\t\t\tif ( $this->plugin_path ) {\n\t\t\t\treturn $this->plugin_path;\n\t\t\t}\n\n\t\t\treturn $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );\n\t\t}", "function tmsc_get_baseurl() {\n\treturn plugin_dir_url( __FILE__ );\n}", "public function plugin_path() {\n\t\treturn untrailingslashit( plugin_dir_path( __FILE__ ) );\n\t}", "function learn_press_plugin_url( $sub_dir = '' ) {\n\treturn LP()->plugin_url( $sub_dir );\n}", "public static function plugin_path()\n {\n return untrailingslashit( plugin_dir_path( __FILE__ ) );\n }", "function builder_plugins_url($url) {\n $url = get_template_directory_uri().\"/xxx/xxx/xxx/\";\n\n return $url;\n}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function urlBase()\n {\n return kilvinCpUrl('plugins/'.$this->plugin_name);\n }", "public static function plugin_img_url() {\r\n return plugin_dir_url( __FILE__ );\r\n }", "public function get_plugin_path_from_slug($slug);", "public function plugin_path() {\n\t\t\treturn untrailingslashit( plugin_dir_path( __FILE__ ) );\n\t\t}", "public function plugin_path() {\n\t\t\treturn untrailingslashit( plugin_dir_path( __FILE__ ) );\n\t\t}", "public function pluginUrl(string $plugin = null): ?string\n {\n return $this->_mvc->pluginUrl($plugin ?: $this->pluginName($this->_plugin));\n }", "public function plugin_path()\n {\n return untrailingslashit(plugin_dir_path(WC_CRM_FILE));\n }", "function getPluginPath() {\n\t\t$plugin =& $this->getThesisFeedPlugin();\n\t\treturn $plugin->getPluginPath();\n\t}", "public function get_plugin_slug() {\n return static::$plugin_slug;\n }", "public static function eval_get_plugins_path() {\n\t\treturn \\WP_CLI::runcommand( 'eval \"if(defined(\\'WP_PLUGIN_DIR\\')) { echo WP_PLUGIN_DIR; } else { echo \\'\\'; }\"', array( 'return' => 'stdout' ) );\n\t}", "function video_plugin_path(){\n return path_join(WP_PLUGIN_URL, basename(dirname( __FILE__ )));\n}", "function plugin_dir_url($file)\n{\n}", "function plugin_sURL() {\r\n\treturn WP_PLUGIN_URL . '/' . str_replace('includes/' . basename(__FILE__), \"\", plugin_basename(__FILE__));\r\n}", "protected function get_base_url(){\n return plugins_url(null, __FILE__);\n }", "function _get_plugin_directory()\n{\n return __DIR__;\n}", "public function getPluginWebPath() {\n\t\treturn $this->sPluginWebPath;\n\t}", "function _get_plugin_directory() {\n\treturn __DIR__;\n}", "function _get_plugin_directory() {\n\treturn __DIR__;\n}", "function _get_plugin_directory() {\n\treturn __DIR__;\n}", "private function getPluginPath() {\n $plugindir = basename(dirname(__FILE__));\n $parentdir = basename(dirname(dirname(__FILE__)));\n $pluginpath = Path::tidy($this->site_root.'/'.$parentdir .'/' . $plugindir.\"/\");\n\n return $pluginpath;\n }", "function getPluginNameByUrl($url)\n{\n $urlPattern = 'https://wordpress.org/plugins/';\n\n // get the plugin name\n return strtok(str_replace($urlPattern, '', $url), '/');\n}", "function pc4uplugin_plugin_path() {\r\n \r\n // gets the absolute path to this plugin directory\r\n \r\n return untrailingslashit( plugin_dir_path( __FILE__ ) );\r\n}", "public static function plugin_url( $append = '' ){\n\n\t\tif( !self::$plugin_url ){\n\t\t\tself::$plugin_url = trailingslashit( plugins_url( basename( self::plugin_path() ), dirname( dirname( __FILE__ ) ) ) );\n\t\t}\n\n\t\treturn self::$plugin_url . $append;\n\t}", "public function url($path = ''): string\n {\n return $this->get('plugin.url') . ltrim($path, '/');\n }" ]
[ "0.7700563", "0.75723153", "0.7545768", "0.7526102", "0.75137776", "0.75137216", "0.7458966", "0.74484", "0.743688", "0.74199164", "0.74199164", "0.74199164", "0.7396475", "0.7359072", "0.7344821", "0.7333715", "0.7321908", "0.7319161", "0.7278856", "0.72667575", "0.72302735", "0.7221306", "0.7215664", "0.7211825", "0.71886766", "0.71886766", "0.7187653", "0.7172432", "0.7172432", "0.7172432", "0.70782775", "0.70556015", "0.7043075", "0.70016205", "0.699499", "0.6927102", "0.69142485", "0.68603474", "0.67796767", "0.67541456", "0.6735521", "0.66725457", "0.6656657", "0.6656657", "0.6656657", "0.6645743", "0.6612699", "0.66035384", "0.6583376", "0.65739185", "0.654822", "0.6531313", "0.6531313", "0.6525707", "0.65080136", "0.6468216", "0.64648515", "0.64531", "0.64278775", "0.6425159", "0.6416678", "0.6400092", "0.63963264", "0.6371971", "0.63610786", "0.63450235", "0.63419396", "0.6337095", "0.633122", "0.63266003", "0.6325472", "0.63213074", "0.6317131", "0.6317131", "0.6317131", "0.6317131", "0.6305532", "0.630406", "0.6300756", "0.62795347", "0.62795347", "0.6272493", "0.62682456", "0.6251727", "0.6251245", "0.62234133", "0.6216047", "0.6209228", "0.61918", "0.618233", "0.6164662", "0.61438066", "0.61417514", "0.61417514", "0.61417514", "0.6138283", "0.6134088", "0.61269253", "0.6123803", "0.61112577" ]
0.8907406
0
Get all restaurants for given city
Получить все рестораны для заданного города
public function index($city){ $count = request('page')*10; if(request('q')){ $data = $this->getRestaurants($city, $count, null, request('q')); } else{ $data = $this->getRestaurants($city, $count); } $result['noMoreData'] = $data['noMoreData']; $result['restaurants'] = $data['restaurants']; $result['city'] = $city; $result['filters'] = $this->getFilters($city); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filter($city){\n $page = request('page');\n $count = $page*10;\n $filter_data = json_decode(request('filters'), true);\n\n $filters = $this->createFilters($filter_data);\n\n $data = $this->getRestaurants($city, $count, $filters);\n\n $result['restaurants'] = $data['restaurants'];\n\n if( $data['noMoreData']){\n $result['status'] = 'ended';\n }\n\n return $result;\n\n }", "public function getAll()\n {\n return $this->city->all();\n }", "public function getRestaurants()\n {\n $restaurants = $this->restaurantRepo->getAllWithCategories();\n return response()->json([\n 'restaurants' => $restaurants\n ]);\n }", "public function getStoresByCity($city);", "public function getRestaurantByCity($city) {\n\t\tmysql_query(\"set names 'utf8'\");\n $result = mysql_query(\"SELECT * FROM Restaurants WHERE City LIKE '%$city%'\");\n\t\t$no_of_rows = mysql_num_rows($result);\n if ($no_of_rows > 0) {\n // restaurants existed \n return $result;\n } else {\n // user not existed\n return false;\n }\n }", "public function getAllCities(){\n $sql = 'SELECT * FROM zipcity';\n $result = $this->query($sql);\n\n $cities = array();\n\n while($row = $result->fetch_object()){\n $cities[] = new City($row->zipcode, $row->cityname);\n }\n\n return $cities;\n }", "public function get_all_city_list()\n\t{\n\t\t$result = $this->db->from(\"city\")->join(\"country\",\"country.country_id\",\"city.country_id\")->where(array(\"city_status\" => 1,\"country_status\" => 1))->orderby(\"city_name\", \"ASC\")->get();\n\t\treturn $result;\n\t}", "private function getRestaurantsByLocation($latitude, $longitude, $searchRadius){\n $constraints = getConstraints($latitude, $longitude, $searchRadius + 1000);\n $distanceFuntion = sprintf(DISTANCE_FUNCTION, $latitude, $longitude, $latitude);\n\n $restaurants = Restaurant::select('*', DB::raw($distanceFuntion))\n ->with('menus.sections.elements')\n ->where('latitude','>=',$constraints['min_lat'])\n ->where('latitude','<=',$constraints['max_lat'])\n ->where('longitude','>=',$constraints['min_lng'])\n ->where('longitude','<=',$constraints['max_lng'])\n ->orderBy('distance', 'ASC')\n ->limit(RESULTS_NUMBER)->offset(0)->get();\n\n return $restaurants;\n }", "public function loadMore($city){\n //TODO \n $filter_data = json_decode(request('filters'), true);\n $page = request('page');\n $count = $page*10;\n $filters = $this->createFilters($filter_data);\n\n if(count($filters['categories']) > 0 || count($filters['costs']) > 0 || count($filters['highlights']) > 0 || count($filters['cuisines']) > 0 || count($filters['types']) > 0 || count($filters['locations']) > 0) {\n\n $data = $this->getRestaurants($city, $count, $filters);\n }\n else{\n $data = $this->getRestaurants($city, $count);\n }\n \n $result['restaurants'] = $data['restaurants'];\n\n if( $data['noMoreData']){\n $result['status'] = 'ended';\n }\n\n return $result;\n }", "public static function query()\n {\n return app(City::class)\n ->filterByRole('countries')\n ->with('country', 'state', 'region');\n }", "public function getAllCountry($city)\r\n {\r\n// $select = $this->select()\r\n// ->setIntegrityCheck(false)\r\n// ->from(array('u' => $this->_name)) \r\n// ->order($order)\r\n// ->limit($count, $offset);\r\n// \r\n// return $this->fetchAll($select)->toArray();\r\n \r\n// \t$city = $this->getAdapter()->quote($city);\r\n $query = \" SELECT DISTINCT city\r\n \t\t\t\tFROM {$this->_name}\r\n \t\t\t\tWHERE city like '$city%' \t\t\t\t\r\n \t\t\t\tORDER BY city ASC\r\n \t\";\r\n// \tprint $query;die;\r\n \treturn $this->_db->fetchAll($query);\r\n }", "public static function find_all_by_city($city_id){\n\t\tglobal $database;\n\n\t\t$query = sprintf(\"SELECT * FROM \". self::$table_name. \" WHERE city_id = %s ORDER BY name ASC\",\n\t\t\t\t\t\t$database->escape_value($city_id)\n\t\t\t\t\t);\n\n\t\treturn self::find_by_sql($query);\n\t}", "public function getAllCities() {\r\n\t\t$this->db->select ( 'id,name,status' )->from ( TABLES::$CITY )->order_by ( 'name', 'asc' );\r\n\t\t$query = $this->db->get ();\r\n\t\t$result = $query->result_array ();\r\n\t\treturn $result;\r\n\t}", "public function findAllCities(){\n return $this->createQueryBuilder('v')\n //->select('nom')\n ->orderBy('v.nom', 'ASC');\n\n //return $qb->getQuery()->getResult();\n }", "public function getAllCity()\n {\n $headers = [\n \"key\"=>''.$this->api_key\n ];\n $client = new Client(['headers'=>$headers]);\n $request = $client->get($this->endpoint.'/city');\n $status = $request->getStatusCode();\n $response = $request->getBody();\n $hasil = json_decode($response, true);\n if($status==200){\n $data = json_decode($response, true)['rajaongkir']['results'];\n /*kode dibawah dikoment, hanya untuk load semua data ke tabel city\n sekarang tidak digunakan karena menggunakan seed, hanya digunakan pertama kali saja*/\n // for($i=0; $i < count($data); $i++){\n // City::create([\n // 'id' => $data[$i]['city_id'],\n // 'name' => $data[$i]['city_name'],\n // 'province_id' => $data[$i]['province_id'],\n // ]);\n // };\n return data;\n }\n }", "public function getall(){\n return DB::table('cities')\n ->orderBy('id', 'desc')\n ->get();\n }", "public function cities() {\n return $this->execByGeoBox('cities',[\n 'maxRows'=>$this->conn['settings']['maxRows']\n ]);\n }", "public function index()\n {\n $neighbourhoods = Neighbourhood::all();\n return CityResource::collection($neighbourhoods);\n }", "public function index()\n {\n return City::all();\n }", "function returnAllCities() {\n return\n \\util\\mysql\\query(\n sprintf(\n \"\n SELECT map_x, map_y from dw_map\n WHERE city <> ''\n AND city <> '-'\n ORDER by map_x, map_y\n \"\n )\n );\n}", "function getCityList()\n {\n $method = $this->newMethod(__FUNCTION__);\n return $this->call($method);\n }", "public function citysearch() {\n $hotels = City::where('name','like','%'.request('city').'%')->get();\n foreach($hotels as $hotel){\n return $hotel->name;\n }\n }", "public function getHotelInCity($city){\n\n $sql = \"SELECT * FROM hotel_info where city = :city\";\n\n $stm = $this->db->prepare($sql);\n $stm->bindValue(':city', $city, PDO::PARAM_STR);\n $stm->execute();\n\n $hotels = $stm->fetchAll();\n return $hotels;\n }", "public function index()\n {\n $cities = City::all();\n return CityResouce::collection($cities);\n }", "public function getAllCities()\n {\n try {\n return $this->city->orderBy('created_at')->get();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }", "public function city($city) {\n\n\t\tif ($city) {\n\t\t\t// dd('odintsovo', $city);\n\t\t\t/*$catalog = Catalog::whereCityId($city->id)\n\t\t\t\t->orderBy('sort', 'desc')\n\t\t\t\t->limit(6)\n\t\t\t\t->get();*/\n\n\t\t\t/*$city->with(['catalog' => function($q) {\n\t\t\t\treturn $q->orderBy('sort', 'desc')\n\t\t\t\t\t->limit(6)\n\t\t\t\t\t->get();\n\t\t\t}]);*/\n\n\t\t\t$catalog = $city->catalog()->orderBy('sort', 'desc')\n\t\t\t\t\t->limit(6)\n\t\t\t\t\t->get();\n\n\t\t\t// dd($catalog);\n\n\t\t\treturn view('map-all', compact('city', 'catalog'));\n\t\t} \n\n\t\t\n\t}", "public function index()\n {\n return OriginCity::latest()->paginate(10);\n }", "public function cities()\n {\n return response(LocationService::getCities());\n }", "public function index()\n { \n $cities = City::query()->limit(10)->get();\n dd($cities);\n }", "public function getCityList()\n\t{\n\t\t$result = $this->db->from(\"city\")\n\t\t\t->join(\"country\",\"country.country_id\",\"city.country_id\")\n\t\t\t->orderby(\"city.city_name\", \"ASC\")\n\t\t\t->where(array(\"city_status\" => 1,\"country.country_status\"=>1))\n\t\t\t->get();\n\n\t\treturn $result;\n\t}", "public function getcitylist() {\n\t\t\t$res_arr\t= \tarray();\n\t\t\t$qry \t\t= \t\"SELECT DISTINCT cities FROM tbl_zone_cities WHERE cities LIKE '\".$this->params['srchData'].\"%' LIMIT 10\";\n\t\t\t$res \t\t= \tparent::execQuery($qry,$this->conn_LOCAL);\n\t\t\tif(parent::numRows($res) > 0) {\n\t\t\t\twhile($row = parent::fetchData($res)){\n\t\t\t\t\t$res_arr['data'][] \t\t= $row;\n\t\t\t\t\t$res_arr['errorCode'] \t= 0;\n\t\t\t\t\t$res_arr['errorStatus'] = \"data found\";\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t$res_arr['errorCode'] = 1;\n\t\t\t\t$res_arr['errorStatus'] = \"No data found\";\n\t\t\t}\n\t\t\treturn $res_arr;\n\t\t}", "public function cityAction()\n {\n $searchText = $this->get('request')->query->get('query');\n\n $repository = $this->getDoctrine()\n ->getRepository('ListsCityBundle:City');\n\n $objects = $repository->getSearchQuery($searchText);\n\n $result = array();\n\n foreach ($objects as $object) {\n $result[] = $this->serializeObject($object);\n }\n\n return new Response(json_encode($result));\n }", "public function get_allkota(){\r\n\t\t$this->db->group_by('city');\r\n\t\treturn $this->db->get('ms_location');\r\n\t}", "public function listOfCities()\n {\n return $this->cities;\n }", "public function index(){\n return QueryBuilder::for(City::class)\n ->select('cities.*')\n ->paginate(15);\n }", "function get_city(){\n\t\t\treturn helper::select(\"*\",\"city\",\"1\");\n\t\t}", "public static function getNearbyRestaurants($longitude, $latitude, $distance = CONSTANTS::RESTAURANT_ONE_KILOMETER , $max_results = CONSTANTS::RESTAURANTS_GET_NEARBY_PAGINATION_LIMIT, $current_page = 1, $name_search = null, $cuisine_search = null, $sort_key = null)\n {\n\n $long1 = $longitude - $distance / abs(cos(deg2rad($latitude)) * 69);\n $long2 = $longitude + $distance / abs(cos(deg2rad($latitude)) * 69);\n $lat1 = $latitude - ($distance / 69);\n $lat2 = $latitude + ($distance / 69);\n\n //Compute the distance using coordinates\n $distance_computation = \"3956 * 2 * ASIN(SQRT(POWER(SIN((? - restaurants.latitude) * pi() / 180 / 2), 2) + COS(? * pi() / 180) * COS(restaurants.latitude * pi() / 180) * POWER(SIN((? - restaurants.longitude) * pi() / 180 / 2), 2)))\";\n\n $restaurants = DB::table(DB::raw('`restaurants`'))\n ->select('restaurants.id', 'restaurants.name', 'restaurants.address', 'restaurants.thumbnail', 'restaurants.rating', 'restaurants.budget', 'restaurants.longitude', 'restaurants.latitude', DB::raw($distance_computation . \" as distance\"))\n ->addBinding([$latitude, $latitude, $longitude], 'select')\n ->whereBetween('restaurants.longitude', array($long1, $long2))\n ->whereBetween('restaurants.latitude', array($lat1, $lat2))\n ->having('distance', '<', $distance);\n\n if ($name_search) {\n $restaurants->where('restaurants.name', 'like', \"%$name_search%\");\n }\n\n if ($cuisine_search) {\n $restaurants->rightJoin('restaurants_category', 'restaurants.id', '=', 'restaurants_category.restaurant_id')\n ->where('restaurants_category.category_id', '=', $cuisine_search);\n }\n\n if ($sort_key == 'budget') {\n $restaurants->orderBy('budget', CONSTANTS::ORDER_ASC);\n } elseif ($sort_key == 'rating') {\n $restaurants->orderBy('rating', CONSTANTS::ORDER_DESC);\n }\n\n $restaurants = $restaurants->whereNull('restaurants.deleted_at')\n ->orderBy('distance', CONSTANTS::ORDER_ASC)\n ->get();\n\n $total_restaurants = count($restaurants);\n\n if ($current_page > $total_restaurants || $current_page < CONSTANTS::FIRST_PAGE) {\n $current_page = CONSTANTS::FIRST_PAGE;\n }\n\n $offset = ($current_page * $max_results) - $max_results;\n $restaurants = array_slice($restaurants, $offset, $max_results);\n $paginated_restaurants = new LengthAwarePaginator($restaurants, $total_restaurants, $max_results);\n\n return $paginated_restaurants;\n }", "public function restaurants(Request $request)\n {\t\n\t\t\t$type = \"\";\n\t\t\t$keyword = \"\";\n\t\t\t$lat = \"\";\n\t\t\t$lng = \"\";\n\t\t\t$input = $request->all();\n\t\t\t\n\t\t\tif(isset($input['type']) && $input['type'] != \"\")\n\t\t\t\t$type = $input['type'];\n\t\t\telse\n\t\t\t\t$type = 1;\n\t\t\t\n\t\t\t// Search for keyword\n\t\t\tif($type == 1) {\n\t\t\t\t$rules = array(\n\t\t\t\t\t'keyword' \t=> 'required'\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$rules = array(\n\t\t\t\t\t'lat' \t=> 'required',\n\t\t\t\t\t'lng' \t=> 'required'\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t\t\t$validator = Validator::make($input, $rules);\n\t\t\tif ($validator->fails()) {\n\t\t\t\n\t\t\t\treturn response(array(\n\t\t\t\t\t\t'success' => false,\n\t\t\t\t\t\t'message' =>'Unable to retrieve data',\n\t\t\t\t\t\t'errorDtl' => $validator->errors()->all()\n\t\t\t\t\t), 200);\n\t\t\t\t\t\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tif($type == 1) \n\t\t\t\t\t{\n\t\t\t\t\t\t$keyword = $input['keyword'];\n\t\t\t\t\t\n\t\t\t\t\t\t// Split on 1+ whitespace & ignore empty (eg. trailing space)\n\t\t\t\t\t\t//$searchValues = preg_split('/\\s+/', $keyword, -1, PREG_SPLIT_NO_EMPTY); \n\t\t\t\t\t\t\n\t\t\t\t\t\t// List of words and phrases to be excluded in search\n\t\t\t\t\t\t$words = app('sharedSearchKeywords'); //Get the Search Keywords stored in AppServiceProvider\n\t\t\n\t\t\t\t\t\t$pattern = '/\\b(?:' . join('|', $words) . ')\\b/i';\n\t\t\t\t\t\t$keyword = preg_replace($pattern, '', $keyword);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$searchValues = preg_split('/\\s+/', $keyword, -1, PREG_SPLIT_NO_EMPTY); \n\t\t\t\t\t\t\n\t\t\t\t\t\t//$searchValues = preg_split('/((?<!(in|to|by|the|and|for))\\.|\\?|;) /', $keyword, -1, PREG_SPLIT_NO_EMPTY); \n\n\t\t\t\t\t\t\n\t\t\t\t\t\t$restaurants = Restaurant::where('active', '1')->where(function ($q) use ($searchValues) {\n\t\t\t\t\t\t\tforeach ($searchValues as $value) {\n\t\t\t\t\t\t\t$q->orWhere('place_name', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t$q->orWhere('place_street', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t$q->orWhere('place_locality', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t$q->orWhere('place_city', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t$q->orWhere('place_state', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t$q->orWhere('place_country', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t$q->orWhere('place_zipcode', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t$q->orWhere('place_vicinity', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t$q->orWhere('place_types', 'like', \"%{$value}%\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})->orderBy('created_at', 'desc')->paginate(20);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tif(count($restaurants) == 0) {\n\t\t\t\t\t\t\treturn response(array(\n\t\t\t\t\t\t\t\t'success' => false,\n\t\t\t\t\t\t\t\t'message' => 'No record found.'\n\t\t\t\t\t\t\t\t),200);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn response(array(\n\t\t\t\t\t\t\t\t'success' => true,\n\t\t\t\t\t\t\t\t'restaurants' =>$restaurants->toArray(),\n\t\t\t\t\t\t\t\t'message' => 'Record found.'\n\t\t\t\t\t\t\t\t),200);\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\t$radius = 10;\n\t\t\t\t\t\t$lat = $input['lat'];\n\t\t\t\t\t\t$lng = $input['lng'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql = \"SELECT * FROM (SELECT restaurants.*, (\".$radius.\" * acos(cos(radians($lat)) * cos(radians(place_lat)) * cos(radians(place_lng) - radians($lng)) + sin(radians($lat)) * sin(radians(place_lat)))) AS distance FROM restaurants) AS distances WHERE distance < \".$radius.\" ORDER BY distance\";\n\t\t\t\t\t\t$restaurants['current_page'] = 1;\n\t\t\t\t\t\t$restaurants['data'] = DB::select($sql);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(count($restaurants) == 0) {\n\t\t\t\t\t\t\treturn response(array(\n\t\t\t\t\t\t\t\t'success' => false,\n\t\t\t\t\t\t\t\t'message' => 'No record found.'\n\t\t\t\t\t\t\t\t),200);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn response(array(\n\t\t\t\t\t\t\t\t'success' => true,\n\t\t\t\t\t\t\t\t'restaurants' =>$restaurants,\n\t\t\t\t\t\t\t\t'message' => 'Record found.'\n\t\t\t\t\t\t\t\t),200);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (\\Illuminate\\Database\\QueryException $e) {\n\t\t\t\t\treturn response(array(\n\t\t\t\t\t\t'success' => false,\n\t\t\t\t\t\t'message' => 'Unable to process request, database error occurred.'\n\t\t\t\t\t\t),200);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\t\t \n\t}", "public function AllRestaurantes(Request $request){\n\n $restaurantes = Restaurante::where('departamento', $request->departamento)->where('ciudad', $request->ciudad)->get();\n\n return response()->json(['error'=>false, 'restaurantes' =>$restaurantes]);\n }", "public function getAllCities()\n {\n $cities = City::get();\n return response()->json($cities);\n }", "public function getCity()\n {\n $data = City::get();\n \n return $this->respondWithCollection(CityResource::collection($data));\n }", "public function getCityList()\n {\n return response()->json(Models\\City::getAllCity(), 200);\n }", "public function getAllCities(){\n\n $cities = City::all();\n\n if($cities->isEmpty()){\n return Response::json(['data' => null, \"status\" => \"success\", \"status_code\" => \"200\", \"message\" => \"No results found\"], 200);\n }\n\n return Response::json(['data' => $cities, \"status\" => \"success\", \"status_code\" => \"200\", \"message\" => \"Cities\"], 200);\n }", "public function getLocations()\n {\n return $this->hasMany(Locations::class, ['city_id' => 'id']);\n }", "public function getAll()\n\t{\n\t\treturn Cache::remember('airports', 2, function() {\n\t\t return \\App\\Models\\Airport::orderBy('city', 'ASC')->orderBy('name', 'ASC')->get(array('*'));\n\t\t});\n\t}", "function buscar_restaurantes($viagem) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\n\t\t$sql = \"select viagem_restaurante.*, restaurante.restaurante, cidade.cidade, estado.sigla\n\t\t\t\t\tfrom viagem_restaurante\n\t\t\t\t\t\tinner join restaurante on restaurante.id = viagem_restaurante.id_restaurante\n\t\t\t\t\t\tinner join cidade on cidade.id = restaurante.id_cidade\n\t\t\t\t\t\tinner join estado on estado.id = cidade.id_estado\n\t\t\t\t\t\t\twhere viagem_restaurante.id_viagem = \".$viagem;\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "public function index()\n {\n return City::with('state')->paginate();\n }", "function get_all_cities($params = array())\n {\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n if(!empty($params['search_val'])){\n\t\t\t\t$this->db->like('name',$params['search_val']);\n\t\t\t}\n }\n return $this->db->get('cities')->result_array();\n }", "public function fetchCountryCities()\n {\n $language = Config::get('languages')[Request::ip()]['admin'];\n $name = 'name_'.$language;\n $cities = City::where('country_id', $_GET['country_id'])->orderBy($name)->pluck($name, 'id');\n\n exit(json_encode($cities)) ;\n }", "public function searchLocation()\n {\n try {\n $s_request = new Request('GET', $this->url);\n $promise = $this->client->sendAsync($s_request)->then(function ($response) {\n $body = $response->getBody();\n $decoded_body = json_decode($body, true);\n \n foreach ($decoded_body as $city) {\n $l_request = new Request('GET', \"https://www.metaweather.com/api/location/{$city['woeid']}\");\n $promise = $this->client->sendAsync($l_request)->then(function ($response) {\n $body = $response->getBody();\n $decoded_body = json_decode($body, true);\n extract($decoded_body[\"consolidated_weather\"][0]);\n $result = array(\n 'city_name' => $decoded_body['title'],\n 'the_temp' => $the_temp,\n 'min_temp' => $min_temp,\n 'max_temp' => $max_temp,\n 'icon' => \"https://www.metaweather.com/static/img/weather/{$weather_state_abbr}.svg\",\n );\n array_push($this->weatherOfSearchedCities, $result);\n });\n $promise->wait();\n }\n });\n $promise->wait();\n return $this->weatherOfSearchedCities;\n } catch (\\Exception $e) {\n die(\"The following exceptions were encountered:\\n {$e->getMessage()} . \\n\");\n }\n }", "public function searchRestaurants(array $params = [])\n {\n $response = $this->client->request(\n 'GET',\n YelpController::SEARCH_ENDPOINT,\n ['query' => $params]\n );\n\n return json_decode($response->getBody(), true);\n }", "public function getRestaurants($limit) {\n $url_params = array();\n\n $url_params['location'] = self::DEFAULT_LOCATION;\n $url_params['limit'] = $limit?: self::SEARCH_LIMIT;\n $search_path = self::SEARCH_PATH . \"?\" . http_build_query($url_params);\n\n return $this->yelpRequest(self::API_HOST, $search_path);\n }", "public function cities($uf) \n {\n return $this->client->request(\n self::GET,\n Routes::modulateRoute()->routeData(\"localidades/cidades/operadora/1/tipovinculacao/Todos/estado/{$uf}/situacaohabilitacaoprestador/Ativo\")\n );\n }", "function getAllCities(){\n $query_string = 'SELECT DISTINCT city FROM erasmus_location';\n $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);\n\n //Execute query\n $result = $mysqli->query($query_string);\n\n //Creates empty array to store response\n $cities = array();\n\n //Adds every different country to the response array\n foreach( $result as $row){\n array_push($cities, $row['city']);\n }\n\n //Sends response to the client\n echo json_encode($cities);\n}", "public function searchRestaurantsDelivery($cityid = null, $lat = null, $lng = null, $cityid = null) {\n\t\treturn '1';\t\n\t}", "function getAllCities(){\n $cities=[];\n global $clink;\n $result=mysqli_query($clink,\"SELECT cityID, cityName FROM cities \");\n while($row=mysqli_fetch_row($result))\n {\n $cities[]=$row;\n }\n return $cities; \n}", "public function index()\n {\n $cities = City::with([\n 'state'\n ])\n ->withCount('userServices')\n ->orderBy('state_id', 'ASC')\n ->orderBy('name', 'ASC')\n ->paginate(20);\n\n return response($cities, 200);\n }", "public function city_data($city){\n $result = SearchData::select(['code','name'])->where('name', 'like', $city .'%')->get();\n return response()->json($result);\n }", "public function getStatesCities() {\n\n TODO:\n }", "public function search(Request $request){\n\n $city_locations = Location::where('city_id', $request->id)->lists('id')->toArray();\n\n $places = Place::whereIn('location_id', $city_locations)->where('name', 'like', '%'.$request->value.'%')->select(['id', 'name', 'address'])->get()->toArray();\n\n return $places;\n }", "public function getCities()\n {\n return $this->hasMany(City::className(), ['id' => 'city_id'])->viaTable('specials_to_city', ['specials_id' => 'id']);\n }", "function get_country_cities($country, $ordered = 'Population') {\n //$result[0] = array( 'name' => 'Zaragoza', 'district' => 'Aragon', 'population' => 768000);\n\n\t\t$result = $this->query('select * from City order by '. $ordered . ' asc');\n \n return $result; \n }", "public function getRestaurant($area_id,$tipe_direktory = 2)\r\n {\r\n $query = $this->select()\r\n ->from($this->_name)\r\n ->where('area_id = ?', $area_id)\r\n ->where('tipe_direktory = 2');\r\n return $query;\r\n }", "public static function cities($id)\n { \n return City::where('provincia_id', $id)->get();\n }", "function getAllReviewsFromRestaurant($idRestaurant){\n global $dbh;\n\n $stm = $dbh->prepare('SELECT * FROM review\n WHERE idRestaurant = ?');\n $stm->execute(array($idRestaurant));\n return $stm->fetchAll();\n }", "public function getCities(): Response\n {\n return response(City::get());\n }", "public function getCity();", "public function getCity();", "public function getCity();", "public function get_restaurants_info_inside($restaurant_search)\r\n \t{\r\n \t$restaurants = $this->db->query(\"SELECT * FROM restaurants AS t1\r\n\t\t\t\t\t\t\t \t\t WHERE t1.name LIKE '%{$restaurant_search['location']}%'\r\n\t\t\t\t\t\t\t\t\t\t OR t1.address LIKE '%{$restaurant_search['location']}%' \r\n\t\t\t\t\t\t\t\t\t\t OR t1.city LIKE '%{$restaurant_search['location']}%' \r\n\t\t\t\t\t\t\t\t\t\t OR t1.state LIKE '%{$restaurant_search['location']}%' \r\n\t\t\t\t\t\t\t\t\t\t OR t1.country LIKE '%{$restaurant_search['location']}%' \r\n\t\t\t\t\t\t\t\t\t\t OR t1.zip_code = '{$restaurant_search['location']}'\")->result_array();\r\n\r\n \tforeach($restaurants as $restaurant)\r\n \t{ \t\t\r\n\t \tif(! preg_match(\"/\\b{$restaurant_search['location']}\\b/i\", $restaurant['address']))\r\n\t \t{\r\n\t \t\t$restaurants_results_new[] = $restaurant;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t$restaurants_same[] = $restaurant;\r\n\t \t}\r\n \t}\r\n\r\n \tif(isset($restaurants_results_new))\r\n \t{\t\r\n\t \tfor($i = 0; $i<count($restaurants_results_new); $i++)\r\n\t \t{\t\r\n\t \t\t$restaurants_results_new[$i] += $this->get_restaurants_ratings_list($restaurants_results_new[$i]['id']); \t\t\r\n\t \t}\r\n\t \treturn $restaurants_results_new;\t\t\r\n \t}\r\n \telseif(isset($restaurants_same))\r\n \t{\r\n \t\tfor($i = 0; $i<count($restaurants_same); $i++)\r\n\t \t{\t\r\n\t \t\t$restaurants_same[$i] += $this->get_restaurants_ratings_list($restaurants_same[$i]['id']); \t\t\r\n\t \t}\r\n\t \treturn $restaurants_same;\r\n \t}\r\n \t}", "public function show($transporteur)\n {\n $cities = City::where('country_id',$transporteur)->get();\n return $cities ;\n }", "public function RestauantSearchGet()\n {\n $restaurant = Restaurant::select('name')->get();\n return response()->json(array('restaurant'=> $restaurant), 200);\n\n }", "public function get_restaurants_info($restaurant_search)\r\n {\r\n \t$restaurants = $this->db->query(\"SELECT * FROM restaurants AS t1\r\n\t\t\t\t\t\t\t \t\t WHERE t1.name LIKE '%{$restaurant_search['location']}%'\r\n\t\t\t\t\t\t\t\t\t\t OR t1.address LIKE '%{$restaurant_search['location']}%' \r\n\t\t\t\t\t\t\t\t\t\t OR t1.city LIKE '%{$restaurant_search['location']}%' \r\n\t\t\t\t\t\t\t\t\t\t OR t1.state LIKE '%{$restaurant_search['location']}%' \r\n\t\t\t\t\t\t\t\t\t\t OR t1.country LIKE '%{$restaurant_search['location']}%' \r\n\t\t\t\t\t\t\t\t\t\t OR t1.zip_code = '{$restaurant_search['location']}'\")->result_array();\r\n\r\n \tforeach($restaurants as $restaurant)\r\n \t{ \t\t\r\n\t \tif(! preg_match(\"/\\b{$restaurant_search['location']}\\b/i\", $restaurant['address']))\r\n\t \t{\r\n\t \t\t$restaurants_results_new[] = $restaurant;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t$restaurants_same[] = $restaurant;\r\n\t \t}\r\n \t}\r\n\r\n \tif(isset($restaurants_results_new))\r\n \t{\t\r\n\t \tfor($i = 0; $i<count($restaurants_results_new); $i++)\r\n\t \t{\t\r\n\t \t\t$restaurants_results_new[$i] += $this->get_restaurants_ratings_list($restaurants_results_new[$i]['id']); \t\t\r\n\t \t}\r\n\t \treturn $restaurants_results_new;\t\t\r\n \t}\r\n \telseif(isset($restaurants_same))\r\n \t{\r\n \t\tfor($i = 0; $i<count($restaurants_same); $i++)\r\n\t \t{\t\r\n\t \t\t$restaurants_same[$i] += $this->get_restaurants_ratings_list($restaurants_same[$i]['id']); \t\t\r\n\t \t}\r\n\t \treturn $restaurants_same;\r\n \t}\r\n }", "function getCity($sqlRq) {\n $db = connexionBD();\n\n $sql = \"SELECT *\n\t FROM villes_france_free V, departements D, regions R\n\t WHERE ville_departement = num_departement\n\t AND D.num_region = R.num_region\n AND ville_statut = 'A'\";\n $sql .= $sqlRq;\n $sql .= ' ORDER BY nom_r, num_departement, ville_nom';\n\n $response = $db->query($sql);\n $returnArray = getCityListFromStatement($response);\n\n// close cursor\n $response->closeCursor();\n return $returnArray;\n}", "public function listCities() {\n // Remove all comments\n unset($_SESSION['flash']);\n // restrict access to this page to users and admin\n // line $this->allowTo(.......) must be uncommented !!\n // $this->allowTo(array('admin','user'));\n // code here to list all constructions from DB\n // \n $model = new \\Model\\CityModel();\n // $countries recovers all data from method\n // getAllCountries()\n $cities = $model->getAllCities();\n // for dev purpose only\n // debug($cities);\n $this->show('city/listcountry', array(\n // an associative table must be given to pass “variables”\n 'allCities' => $cities\n ));\n }", "public function searchByCity(Request $request)\n {\n $per_page = 0;\n\n $request->get('per_page') ? $per_page = $request->get('per_page') : $per_page = 8;\n\n if ($request['city'] == 'todas-cidades') {\n $request['city'] = '';\n }\n\n $places = $this->repository\n ->scopeQuery(function ($query) use ($request) {\n return $query->where('confirmed', true)->where(function ($query) use ($request) {\n foreach ($request->all() as $key => $value) {\n\n if ($key === 'page') {\n continue;\n }\n\n if ($key === 'max_guests') {\n $query->where($key, '>=', $value);\n }\n\n if ($key === 'name' || $key === 'city') {\n $query->where($key, 'LIKE', '%' . $value . '%');\n }\n\n if ($key != 'max_guests' && $key != 'name' && $value && $key != 'city' && $key != 'per_page') {\n $query->where($key, $value);\n }\n }\n });\n })->with(['photos'])->orderBy('featured_position', 'DESC');\n\n\n $cerimonyCount = Place::where('confirmed', true)\n ->where('cerimony', true)\n ->where(function ($query) use ($request) {\n foreach ($request->all() as $key => $value) {\n\n if ($key === 'page') {\n continue;\n }\n\n if ($key === 'max_guests') {\n $query->where($key, '>=', $value);\n }\n\n if ($key === 'name' || $key === 'city') {\n $query->where($key, 'LIKE', '%' . $value . '%');\n }\n\n if ($key != 'max_guests' && $key != 'name' && $value && $key != 'city' && $key != 'per_page' && $key != 'party_space' && $key != 'cerimony') {\n $query->where($key, $value);\n }\n }\n })->count();\n\n $partyCount = Place::where('confirmed', true)\n ->where('party_space', true)\n ->where(function ($query) use ($request) {\n foreach ($request->all() as $key => $value) {\n\n if ($key === 'page') {\n continue;\n }\n\n if ($key === 'max_guests') {\n $query->where($key, '>=', $value);\n }\n\n if ($key === 'name' || $key === 'city') {\n $query->where($key, 'LIKE', '%' . $value . '%');\n }\n\n if ($key != 'max_guests' && $key != 'name' && $value && $key != 'city' && $key != 'per_page' && $key != 'party_space' && $key != 'cerimony') {\n $query->where($key, $value);\n }\n }\n })->count();\n\n $per_page == 'all' ? $places = $places->all() : $places = $places->paginate($per_page);\n\n if (request()->wantsJson()) {\n\n $data = new Class\n {\n };\n\n $data->cerimonyCount = $cerimonyCount;\n $data->partyCount = $partyCount;\n $data->places = $places;\n\n return response()->json($data);\n }\n }", "public function getCitiesByRegion($region_id)\n {\n return City::where('region_id', $region_id)->orderBy('name')->get();\n }", "public function getCityListOnly()\n {\n\t\t\t$result = $this->db->select(\"city_id,city_name\")->from(\"city\")\n\t\t\t->join(\"country\",\"country.country_id\",\"city.country_id\")\n\t\t\t->where(array(\"city_status\" => 1,\"country.country_status\" => 1))\n\t\t\t->orderby(\"city.city_name\", \"ASC\")\n\t\t\t->get();\n\t\t\treturn $result;\n }", "public function getCities() {\r\n\r\n $idCountry = $_REQUEST['country'];\r\n\r\n $cityModel = new CityModel();\r\n $results = $cityModel\r\n ->where('idCountry', $idCountry)\r\n ->findAll();\r\n\r\n\r\n echo json_encode($results);\r\n }", "function get_restaurants_by_cuisine($cuisine){\n GLOBAL $SERVER, $USERNAME, $PASSWORD, $DB;\n $conn = new mysqli($SERVER, $USERNAME, $PASSWORD, $DB);\n if ($conn->connect_error) {\n return(\"Connection failed: \" . $conn->connect_error);\n } \n $GLOBALS['last_error'] = '';\n try{\n $restaurants = array();\n $result = $conn->query(\n \"SELECT restaurant_id, name, boro, building, street, zipcode, phone, MAX(grade_date) as 'grade_date', grade FROM restaurant\n\tLEFT JOIN cuisine ON FK_cuisine_id = cuisine_id\n\tLEFT JOIN inspection ON restaurant_id = FK_restaurant_id\n\tWHERE (grade = 'A' OR grade = 'B') AND cuisine.description LIKE '%\".$cuisine.\"%'\n\tGROUP BY restaurant_id\");\n while($row = $result->fetch_assoc()) {\n $restaurants[] = $row;\n }\n return $restaurants;\n\n } catch(Exception $e){\n $GLOBALS['last_error'] = $e->getMessage();\n return FALSE;\n }\n}", "public function getByCity()\n {\n $data = $this->getJsonRequest($this->request);\n $validationContext = CityValidation::validate($data);\n if (!$validationContext->success()) {\n return $this->json($validationContext->toArray(), 422);\n }\n $url = 'weather?q=' . $data['city'] . '&units=metric';\n $data = OpenWeatherMapApiRequestService::get($url);\n\n if ($data['cod'] === 200) {\n $windDirectionService = new WindDirectionService();\n $data = CityService::format($data);\n $data['wurl'] = $windDirectionService->create($data['wdir']) . '?' . microtime(true);\n $status = 200;\n } else {\n $validationContext->setError('city', 'Stadt existiert nicht');\n $data = $validationContext->toArray();\n $status = 422;\n }\n return $this->json($data, $status);\n }", "function get_hotel_city_list($search_chars) {\r\n\t\t$raw_search_chars = $this->db->escape ( $search_chars );\r\n\t\t$r_search_chars = $this->db->escape ( $search_chars . '%' );\r\n\t\t$search_chars = $this->db->escape ( '%' . $search_chars . '%' );\r\n\t\t$query = 'Select * from all_api_hotel_cities as CT where city_name like ' . $search_chars . '\r\n\t\tOR country_name like ' . $search_chars . ' OR country_code like ' . $search_chars . '\r\n\t\tORDER BY city_name ASC, CASE\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $raw_search_chars . '\tTHEN 1\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $raw_search_chars . '\tTHEN 2\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $raw_search_chars . '\tTHEN 3\r\n\t\t\t\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $r_search_chars . '\tTHEN 4\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $r_search_chars . '\tTHEN 5\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $r_search_chars . '\tTHEN 6\r\n\t\t\t\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $search_chars . '\tTHEN 7\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $search_chars . '\tTHEN 8\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $search_chars . '\tTHEN 9\r\n\t\t\tELSE 10 END, \r\n\t\t\ttop_destination ASC\r\n\t\tLIMIT 0, 20';\r\n\t\t// with grn and oyo // working\r\n\t\t/*$query = 'Select * from all_api_hotel_city_master where city_name like ' . $search_chars . '\r\n\t\tOR country_name like ' . $search_chars . ' OR country_code like ' . $search_chars . '\r\n\t\tORDER BY city_name DESC, CASE\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $raw_search_chars . '\tTHEN 1\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $raw_search_chars . '\tTHEN 2\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $raw_search_chars . '\tTHEN 3\r\n\t\t\t\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $r_search_chars . '\tTHEN 4\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $r_search_chars . '\tTHEN 5\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $r_search_chars . '\tTHEN 6\r\n\t\t\t\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $search_chars . '\tTHEN 7\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $search_chars . '\tTHEN 8\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $search_chars . '\tTHEN 9\r\n\t\t\tELSE 10 END, \r\n\t\t\tcache_hotels_count DESC\r\n\t\tLIMIT 0, 20';*/\r\n\t\t// with all grn, rezlive, oyo\r\n\t\t\t/*$query = \"Select rz_city.*, hoc.origin as origin, hoc.grn_city_id as grn_city_id, hoc.grn_destination_id as grn_destination_id, hoc.country_name as country_name, rz_city.name as city_name, rz_city.name as name, hoc.country_code as rz_country_code, rz_city.name as rz_name from rz_city_list as rz_city \r\n\t\tleft join all_api_hotel_city_master as hoc ON (rz_city.country_code = hoc.country_code AND hoc.city_name LIKE \".$search_chars.\") \r\n\t\twhere rz_city.name like \".$search_chars.\"\r\n\t\tORDER BY CASE\r\n\t\t\tWHEN\trz_city.name\tLIKE\t\".$raw_search_chars.\"\tTHEN 1\r\n\t\t\tWHEN\thoc.country_name\tLIKE\t\".$raw_search_chars.\"\tTHEN 2\r\n\t\t\tWHEN\trz_city.country_code\t\t\tLIKE\t\".$raw_search_chars.\"\tTHEN 3\r\n\t\t\t\r\n\t\t\tWHEN\trz_city.name\tLIKE\t\".$r_search_chars.\"\tTHEN 4\r\n\t\t\tWHEN\thoc.country_name\tLIKE\t\".$r_search_chars.\"\tTHEN 5\r\n\t\t\tWHEN\trz_city.country_code\t\t\tLIKE\t\".$r_search_chars.\"\tTHEN 6\r\n\t\t\t\r\n\t\t\tWHEN\trz_city.name\tLIKE\t\".$search_chars.\"\tTHEN 7\r\n\t\t\tWHEN\thoc.country_name\tLIKE\t\".$search_chars.\"\tTHEN 8\r\n\t\t\tWHEN\trz_city.country_code\t\t\tLIKE\t\".$search_chars.\"\tTHEN 9\r\n\t\t\tELSE 10 END\";*/\r\n\t\treturn $this->db->query ( $query )->result_array ();\r\n\t}", "public function all($size)\n {\n return response()->json(City::with('state')\n ->latest('updated_at')\n ->paginate($size));\n }", "public function getAllCities($args) {\n Log::debug(\"Querying all cities matching \" . $args['name'] . \" \" . $args['country']);\n\n $query = City::where('name', $args['name']);\n\n if ($args['country']) {\n $query->where('country', $args['country']);\n }\n\n $cities = $query->orderBy('chosen', 'desc')\n ->get();\n\n return $cities;\n }", "public function search() {\n\n // if user get from index page \n if (request()->has('city_id')) {\n\n $hotels = City::find(request('city_id'))->hotels;\n\n return view('home.search.result', compact('hotels'));\n }\n\n $this->validate(request(),[\n 'city' => 'required',\n 'from' => 'required',\n 'to' => 'required',\n ]);\n \n $query = Hotel::query();\n $query->whereHas('city', function($q){\n $q->where('cities.name','like','%'.request('city').'%');\n });\n $query->where([\n ['from','<=',request('from')],\n ['to','>=',request('to')],\n ['rooms','>=',request('rooms')],\n ['adult','>=',request('adult')],\n ['children','>=',request('children')], \n ]);\n $hotels = $query->get();\n return view('home.search.result', compact('hotels'));\n }", "function city_by_region($id)\r\n{\r\n\tif(!isset($id))\r\n\t{\r\n\t\t$filtro = null;\r\n\t}else{\r\n\t\t$filtro['RegionId'] = $id;\r\n\t}\r\n\t\r\n\t$campos[]= 'CityId';\r\n\t$campos[]= 'City';\r\n\t\r\n\t$data = get_city($campos,$filtro);\r\n\t\r\n\treturn $data;\r\n}", "function getCities(){\n $query_string = 'SELECT City FROM cities WHERE Country LIKE %$city_search%';\n $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);\n\n //Execute query\n $result = $mysqli->query($query_string);\n\n //Creates empty array to store response\n $cities = array();\n\n //Adds every different country to the response array\n foreach( $result as $row){\n array_push($cities, $row['Country']);\n }\n\n //Sends response to the client\n echo json_encode($cities);\n }", "public function getPickRestaurants($dw = null, $defaulttime = null, $cityid = null, $sort = null) {\n\t\t\tif($defaulttime == null || $defaulttime == ''){\n \t\t\t$defaulttime = date('G:i');\n\t\t\t}\n\t\t\t$pickup_restaurants = $this->RestaurantOrderType->find('all',array(\n\t\t\t 'contain' => array(\n\t\t\t 'Restaurant'=>array('Cuisine'),\n\t\t\t 'Menu'=> array(\n\t\t\t \t'MenuHour'\n\t\t\t )\n\t\t\t ),\n\t\t\t 'joins' => array (\n\t\t\t\t array(\n\t\t\t\t 'table' => 'menus',\n\t\t\t\t 'alias' => 'menus',\n\t\t\t\t 'type' => 'INNER',\n\t\t\t\t 'conditions' => array( 'AND' => array(\n\t\t\t\t \t 'menus.restaurant_order_type_id=RestaurantOrderType.id',\n\t\t\t\t \t 'menus.active' => 1\n\t\t\t\t \t)\t\t \n\t\t\t \t )\n\t\t\t ),\n\t\t\t\t array(\n\t\t\t\t 'table' => 'menu_hours',\n\t\t\t\t 'alias' => 'menu_hours',\n\t\t\t\t 'type' => 'INNER',\n\t\t\t\t 'conditions' => array( 'AND' => array(\n\t\t\t\t \t'menu_hours.menu_id=menus.id'),\n\t\t\t\t \t'menu_hours.day'=>$dw,\n\t\t\t\t \t\"TIMEDIFF(`menu_hours`.`time_open`,ADDTIME('\".$defaulttime.\"',(CONCAT('00:',`menu_hours`.`lead_time`,':00')))) <\" => 0,\n\t\t\t\t \t\"TIMEDIFF(`menu_hours`.`time_closed`,ADDTIME('\".$defaulttime.\"',(CONCAT('00:',`menu_hours`.`lead_time`,':00')))) >\" => 0\t\t \n\t\t\t \t )\n\t\t\t )\t\t\t\t \n\t\t\t ),\n\t\t\t 'conditions' => array(\n\t\t\t 'AND' => array( \n\t\t\t 'city_id' => $cityid,\n\t\t\t 'po_pickup' => 1,\n\t\t\t\t 'order_type_id'=>1\n\t\t\t )\n\t\t\t ),\n\t\t\t\t\t'group'=>'restaurant_id',\n\t\t\t\t 'order' => array($sort)\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\treturn $pickup_restaurants;\n\t}", "function getCities() {\n global $host;\n global $user;\n global $password;\n global $db;\n $link = mysqli_connect($host, $user, $password, $db);\n\n $cityQuery = mysqli_query($link, \"SELECT * FROM cities\");\n $ret = array();\n for ($i = 0; $i < mysqli_num_rows($cityQuery); $i++) {\n $result = mysqli_fetch_array($cityQuery, MYSQLI_ASSOC);\n $city = array();\n $city['city_id'] = $result['id'];\n $city['cityName'] = $result['city_name'];\n $city['state'] = $result['state'];\n $city['airportCode'] = $result['airport_code'];\n $ret[] = $city;\n }\n \n return $ret;\n}", "function fn_rus_geolocation_select_cities($city_geolocation)\n{\n\t$data_city = db_get_row(\n 'SELECT a.city, b.city_id, b.state_code, b.country_code'\n . ' FROM ?:rus_city_descriptions as a LEFT JOIN ?:rus_cities as b ON a.city_id = b.city_id'\n . ' WHERE b.status = ?s AND a.city = ?s', 'A', $city_geolocation\n );\n\n if (!empty($data_city['country_code']) && !empty($data_city['state_code'])) {\n $country = db_get_field(\n 'SELECT d.country'\n . ' FROM ?:countries as c LEFT JOIN ?:country_descriptions as d ON c.code = d.code'\n . ' WHERE c.code = ?s AND c.status = ?s', $data_city['country_code'], 'A'\n );\n\n if (!empty($country)) {\n $data_city['code'] = $data_city['country_code'];\n $data_city['country'] = $country;\n }\n\n $state = db_get_field(\n 'SELECT b.state'\n . ' FROM ?:states as a LEFT JOIN ?:state_descriptions as b ON a.state_id = b.state_id'\n . ' WHERE a.code = ?s AND a.status = ?s AND a.country_code = ?s',\n $data_city['state_code'], 'A', $data_city['country_code']\n );\n $data_city['state'] = (!empty($state)) ? $state : '';\n }\n\n return $data_city;\n}", "public function getTaskCity($city)\n {\n $CountryCities = $this->cityRepo->getCountryCities($city);\n $arrCityName = [];\n foreach ($CountryCities as $city) {\n $arrCityName[] = $city->city;\n }\n return response()->json($arrCityName);\n }", "public function getCitiesAction()\n {\n \t$state_id=$this->_getParam(\"state_id\");\n \techo Zend_Json::encode(\\Extended\\city::getCityList($state_id));\n \tdie;\n }", "public function getGroupByCity ($city) {\r\n\t\t$qb = $this->createQueryBuilder(\"g\")\r\n\t\t->select('g')\r\n\t\t->from('CTRV\\CommonBundle\\Entity\\User','gu')\r\n\t\t->where(\"g.admin=gu.userid\")\r\n\t\t->andWhere(\"gu.city=?1\")\r\n\t\t->orderBy('g.addedDate', 'DESC')\r\n\t\t->setParameter(1,$city)\r\n\t\t;\r\n\t\treturn $qb->getQuery()->getResult();\r\n\t}", "public function can_return_cities()\n {\n factory(\\App\\Country::class, 1)->create();\n factory(\\App\\Region::class, 1)->create();\n factory(\\App\\Province::class, 1)->create();\n\n $cities = factory(\\App\\City::class, 2)->create();\n\n $response = $this->getJson($this->route);\n\n $response->assertJsonStructure([\n 'success', 'cities'\n ]);\n\n $data = $response->json('cities');\n\n $this->assertEquals(collect($data)->count(), $cities->count());\n\n $response->assertOk();\n }", "public function get_cinemas_city($_state, $_city){\n\t\t//recupera todos os cinemas de uma determinada cidade no google\n\t\t$city = urlencode($_city . ' ' . $_state);\n\t\t$url = \"http://www.google.com.br/movies?near=$city&num=2000\";\n\n\t\t$curl_handle=curl_init();\n\n\t\tcurl_setopt($curl_handle,CURLOPT_URL,$url);\n\t\tcurl_setopt($curl_handle, CURLOPT_USERAGENT, \"Mozilla/5.0 (X11; U; FreeBSDi386; en-US; rv:1.2a) Gecko/20021021\");\n\t\tcurl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7'));\n\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\n\t\tcurl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true); \n\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\n\t\t$buffer = curl_exec($curl_handle);\n\t\tcurl_close($curl_handle);\n\n\t\t$html = str_get_html($buffer);\n\t\t$cinemas = array();\n\n\t\tforeach($html->find('#movie_results .theater') as $div) {\n\t\t\ttry {\n\t\t\t\t$h2 = $div->find('h2 a',0);\n\t\t\t\t\n\t\t\t\tif (!$h2) {\n\t\t\t\t\t//excecao: nome do cinema sem link, tem q ir direto no arquivo e adicionar o tid do google na url\n\t\t\t\t\t$h2 = $div->find('h2',0);\n\t\t\t\t\t\n\t\t\t\t\t$first_movie_link = $div->find(\".movie a\",0);\n\t\t\t\t\t$href = \"http://www.google.com.br\" . $first_movie_link->href;\n\t\t\t\t\t$href = html_entity_decode($href);\n\t\t\t\t\t\n\t\t\t\t\t$nome = $h2->innertext;\n\t\t\t\t\t$cinema_url = $this->find_cinema_url($href, $nome);\n\t\t\t\t\t\n\t\t\t\t\t$h2->href = $cinema_url;\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$nome = $h2->innertext;\n\t\t\t\t$url = \"http://google.com.br\" . $h2->href;\n\t\t\t\t$url = html_entity_decode($url);\n\t\t\t\t\n\t\t\t\t$endereco = strip_tags($div->find('.info',0)->innertext);\n\t\t\t\t\n\t\t\t\t$endereco_formatado = Helper::format_address($endereco);\n\t\t\t\t$telefone = $endereco_formatado->phone;\n\t\t\t\t$endereco = $endereco_formatado->address;\n\t\t\t\t\n\t\t\t\t$id = Helper::get_url_param($url, 'tid');\n\t\t\t\t\n\t\t\t\t$cinema = new Cinema();\n\t\t\t\t$cinema->id = $id;\n\t\t\t\t$cinema->name = $nome;\n\t\t\t\t$cinema->address = $endereco;\n\t\t\t\t$cinema->phone = $telefone;\n\t\t\t\t$cinema->url = $url; \n\t\t\t\t\n\t\t\t\t//so incluir na lista de cinemas se ja não tiver um cinema com esse nome...\n\t\t\t\tif (!in_array($nome, $this->_cinemas_tmp)) {\n\t\t\t\t\t$this->_cinemas_tmp[] = $nome;\n\t\t\t\t\t$this->_cinemas[] = $cinema;\n\t\t\t\t}\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\tLog::write($e->getMessage() . \" - \" . $_city);\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// clean up memory\n\t\t$html->clear();\n\t}", "public function fetchCity() {\n $query = $this->find();\n $query->select(['city']);\n $query->distinct(['city']);\n $query->where(['city <>' => '']);\n// if(!empty($year)){\n// $query->where(['YEAR(complaint_id_genrate_date)' => $year]);\n// }\n $query->order(['city']);\n $city = $query->toArray();\n return $city;\n }", "public function getCityDetails () {\n $id = request('id');\n \n return [\n 'online' => Character::getOnline($id),\n 'city' => Neighbourhood::with(['places', 'indications'])->where('id', $id)->first(),\n 'neighbourhoods' => Neighbourhood::all(),\n 'actions' => Action::getActions(),\n ];\n }", "function getCity();", "public function findCity($title)\n {\n // default set\n $set = array();\n\n // the client object\n $client = $this->_getHttpClient()\n ->setUri(self::URI_CITY)\n ->setParameterGet('CityName', $title);\n\n // the xml object\n $xml = $this->_request($client);\n\n // have we error?\n if ($this->hasError()) {\n return false;\n }\n\n // normalization\n foreach ($xml->City as $city) {\n $set[] = (array)$city;\n }\n\n return $set;\n }", "public function getCitiesByRegion()\n\t{\n\t\t$idRegion = trim(Input::get('id_region')) ? : 0;\n\n\t\t$cities = Cache::tags('cities')->rememberForever('cities_region_'. $idRegion .'_'. App::getLocale(), function() use ($idRegion) {\n\t\t\treturn City::active()->byRegion($idRegion)->get();\n\t\t});\n\n\t\t$html = View::make('partials.popups.partials.select_city', compact('cities'))->render();\n\n\t\treturn Response::json(\n\t\t\tarray(\n\t\t\t\t'status' => true,\n\t\t\t\t'html' => $html\n\t\t\t)\n\t\t);\n\t}" ]
[ "0.68924123", "0.6828987", "0.6799864", "0.66124594", "0.6542584", "0.64303076", "0.6426254", "0.6385128", "0.6327331", "0.63225436", "0.631734", "0.6281431", "0.6274489", "0.62479264", "0.6247716", "0.624195", "0.6203962", "0.61905515", "0.61748016", "0.61630386", "0.612795", "0.6124467", "0.61208355", "0.609686", "0.60749257", "0.60610306", "0.60348725", "0.6012792", "0.5998087", "0.59771883", "0.5976288", "0.5974872", "0.59599435", "0.59366554", "0.5934463", "0.5927626", "0.5916883", "0.59001684", "0.5896136", "0.5858501", "0.58446044", "0.5828777", "0.58259857", "0.5824039", "0.58175087", "0.5801805", "0.5795814", "0.57877445", "0.5769054", "0.57686704", "0.57656467", "0.5761575", "0.5738585", "0.57328653", "0.57135785", "0.5699781", "0.5699602", "0.5697881", "0.5696959", "0.5694519", "0.56911296", "0.5689402", "0.5677889", "0.56726927", "0.567094", "0.56705487", "0.5663233", "0.5663233", "0.5663233", "0.56571126", "0.56484056", "0.5645157", "0.56425464", "0.564196", "0.5629211", "0.56289303", "0.56231153", "0.5622955", "0.5616257", "0.56116104", "0.56099266", "0.5606404", "0.5603631", "0.55994695", "0.5593036", "0.5587307", "0.55868083", "0.55651945", "0.5560712", "0.5557699", "0.5540371", "0.55346304", "0.55298203", "0.55286974", "0.55277", "0.55254143", "0.55196285", "0.55182254", "0.550113", "0.549807" ]
0.7104763
0
Get average rate for current place
Получить среднюю ставку для текущего места
public function avg_rate($place_id){ $rates = DB::table('rates')->where('place_id', $place_id)->select('mark')->get(); $sum = 0; foreach ($rates as $rate){ $sum = $sum + $rate->mark; } if(count($rates) > 0) return $sum/count($rates); else return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAverageRate(): float\n {\n $sum = 0;\n\n foreach ($this->getCounties() as $county) {\n $sum += $county->getTaxRate();\n }\n\n return $sum > 0 ? ($sum / $this->getCountiesCount()) : 0;\n }", "public function getAverageRating() {\n\t\t$average = 0;\n\t\t$ratings = $this->ratings->lists('value');\n\n\t\tif (count($ratings))\n\t\t{\n\t\t\t$average = array_sum($ratings) / count($ratings);\n\t\t}\n\t\treturn $average;\n\t}", "function getAverageRating()\n {\n \treturn $this->_artwork->getAverageRating();\n }", "public function getAvgRatings()\n {\n $sum = array_reduce($this->comments->toArray(), function($total, $comment) {\n return $total + $comment->getRate();\n }, 0);\n if(count($this->comments ) > 0 ) return $sum /count($this->comments);\n return 0;\n }", "public function averageRating()\n {\n return round($this->ratings()->get()->avg('rating'), 1);\n }", "public static function averageRating()\n {\n return round(self::active()->select('rating')->avg('rating'), 2);\n }", "public function getGlobalAverage() {\r\n return $this->getAverage();\r\n }", "function getAvgRating() {\n\t\treturn $this->_AvgRating;\n\t}", "public function getAverage();", "public function averageRating()\n {\n $ratings = $this->ratings;\n\n if (!$ratings->isEmpty()) {\n $sum = 0;\n\n foreach ($ratings as $rating) {\n $sum += $rating->rating;\n }\n\n return $sum / $ratings->count();\n }\n }", "public function getAvgRating() {\n // array_reduce() applique itérativement une fonction callback aux éléments du tableau array de manière a réduire le tableau à une simple valeur\n $sum = array_reduce($this->comments->toArray(), function($total, $comment){ // sauf que comments est une ArrayCollection et on attend un array, on utilise méthode des AC toArray\n return $total + $comment->getRating();\n }, 0); // on passe 0 pour $total, pour l'initialiser)\n\n if(count($this->comments) > 0) { // PREVENTION DIVISION PAR 0 !!\n return $sum / count($this->comments); \n }\n return 0;\n \n /* Manière classique\n $sum = 0;\n foreach($this->comments as $comment){\n $sum += $comment->getRating();\n }\n return $sum / count($this->comments); */\n }", "public function getAverageValue()\n {\n $value_area = 0;\n $value_range = 0;\n $currentResult = null;\n $nextResult = null;\n\n $this->rewind();\n $currentResult = $this->current();\n $nextResult = $this->next();\n $index = 0;\n while ($currentResult) {\n // start\n if ($currentResult && $nextResult) {\n $timeStart = $currentResult->getTimestamp();\n $timeStop = $nextResult->getTimestamp();\n $value = $currentResult->getValue();\n $state = $currentResult->getState();\n $timeRange = $timeStop - $timeStart;\n if (in_array($state, array(\n tx_caretaker_Constants::state_ok,\n tx_caretaker_Constants::state_warning,\n tx_caretaker_Constants::state_error,\n )) && $value > 0\n ) {\n $value_area += $timeRange * $value;\n $value_range += $timeRange;\n }\n }\n\n $index++;\n $currentResult = $nextResult;\n $nextResult = $this->next();\n }\n\n if ($value_range > 0) {\n return $value_area / $value_range;\n }\n return 0;\n }", "public function getAvgRating()\r\n\t{\r\n\t\treturn ReviewEntity::getAverageRating($this->reviews);\r\n\t}", "public function getAverage() {\n\t\treturn $this->average;\n\t}", "public function GetAverageScore()\n {\n $dAvgScore = 0;\n if ($this->Length() > 0) {\n $iPt = $this->getItemPointer();\n $this->GoToStart();\n $dScore = 0;\n while ($oitem = $this->Next()) {\n $dScore += $oitem->fieldRating;\n }\n $this->setItemPointer($iPt);\n\n $dAvgScore = $dScore / $this->Length();\n }\n\n return $dAvgScore;\n }", "public function averageRating()\n {\n return $this->reviews->where('approved_at', '!=', null)->avg('rating') == 0 ? 0 : round($this->reviews->where('approved_at', '!=', null)->avg('rating'));\n }", "public function getRate()\n {\n $rate = 0;\n $opinions = $this->opinions;\n foreach ($opinions as $opinion) {\n $rate += $opinion['rate'];\n }\n\n $opinionsCount = count($opinions);\n\n if ($opinionsCount) {\n $rate = round($rate / $opinionsCount, 1);\n }\n\n return $rate;\n }", "public function getRateAttribute()\n {\n return $this->restaurantReviews()->select(DB::raw('round(AVG(restaurant_reviews.rate),1) as rate'))->first('rate')->rate;\n }", "public function getAvgRatings() {\n // on commence par appeler le tableau comments qui est un array collection, on le transform en tableau avec to array et il est reduit avec array_reduce\n $sum = array_reduce($this->comments->toArray(), function($total, $comment) {\n return $total + $comment->getRating();\n }, 0);\n\n //Faire la division pour avoir la moyenne\n if(count($this->comments) > 0) return $sum /count($this->comments);\n \n return 0;\n }", "public function getAverageRating()\n {\n // get the total unique stars given for this product\n $total = $this->reviews->unique()->sum('stars');\n // count all unique reviews for this product\n $count = $this->getSingleProductReviewCount();\n // avoid division by 0\n if (empty($count)) {\n return 0;\n }\n\n return $total / $count;\n }", "public function getAverage() {\r\n\t\treturn array_sum($this->values) / $this->getNumOfValues();\r\n\t}", "public function averagePrice();", "public function average()\n {\n $precision = $this->EE->TMPL->fetch_param('decimals', 0);\n $data = $this->_get_data();\n\n if ($this->EE->TMPL->fetch_param('max'))\n {\n // Return a percentage between the max and min\n $max = $this->EE->TMPL->fetch_param('max');\n $min = $this->EE->TMPL->fetch_param('min') ? $this->EE->TMPL->fetch_param('min') : 0;\n $percent = ($data['average'] - $min) / ($max - $min) * 100;\n return round($percent, $precision);\n }\n else\n {\n return round($data['average'], $precision);\n }\n }", "public function getAvgWidgetData()\n {\n /** @var $helper Analytic_Dashboard_Helper_Data */\n $helper = Mage::helper('analytic_dashboard');\n $metricClass = $helper->getMetricsClass($this->getMetric());\n if ($metricClass) {\n $metric = new $metricClass;\n if ($helper->isMoneyMetric($this->getMetric())){\n return $helper->toMoney($metric->getAvgData());\n }\n\n return $helper->toNumber($metric->getAvgData());\n }\n\n return 0;\n }", "public function average()\n {\n $avg = array_sum($this->values) / sizeof($this->values);\n\n return round($avg, 1);\n }", "public function getVoteAverage()\n {\n $total = 0;\n $count = 0;\n foreach ($this->votes as $vote) {\n $count++;\n $total += $vote->getValue();\n }\n if ($count > 0) {\n return round($total/$count);\n } else {\n return 0;\n }\n }", "public function getTotalAvgSpeed(){\n\t\treturn $this->journey->stats->avgspeed;\n\t}", "public function getAverageRatings()\n {\n return $this->manager->createQuery('SELECT AVG(r.rating) FROM App\\Entity\\Rating r')->getSingleScalarResult();\n }", "public function average()\n {\n $avg = $this->sum() / sizeof($this->values);\n return $avg;\n }", "function average(){\n $total = 0;\n foreach ($this->grades as $value)\n $total += $value;\n return $total / count($this->grades);\n }", "public function getAverageUserRatingCurrent()\n {\n return $this->averageUserRatingCurrent;\n }", "public function getAverageOrderForAll()\n {\n return $this->sendResponse(Order::getTotalRevenue(), 'Average order value');\n }", "private function getExercisesGlobalAvgScore(){\r\n\t\t$sql = \"SELECT avg(suggested_score) as globalAvgScore FROM exercise_score \";\r\n\r\n\t\treturn ($result = $this->conn->_singleSelect($sql)) ? $result->globalAvgScore : 0;\r\n\t}", "function average() {\n $total = 0;\n foreach ($this->grades as $value)\n $total += $value;\n return $total / count($this->grades);\n }", "function average() {\n $total = 0;\n foreach ($this->grades as $value)\n $total += $value;\n return $total / count($this->grades);\n }", "function average() {\n $total = 0;\n foreach ($this->grades as $value)\n $total += $value;\n return $total / count($this->grades);\n }", "function average() {\n $total = 0;\n foreach ($this->grades as $value)\n $total += $value;\n return $total / count($this->grades);\n }", "public function averageRating(): string\n {\n return $this->ratings()->get()->avg('rating') ?? 0;\n }", "public function getOverheatedRate() : float\n {\n return ($this->raw_data['hot_weather'] / $this->raw_data['died']) * 100;\n }", "function average()\n {\n $total = 0;\n foreach ($this->grades as $value)\n $total += $value;\n return $total / count($this->grades);\n }", "function average() {\r\n $total = 0;\r\n foreach($this->grades as $value) {\r\n $total += $value;\r\n }\r\n return $total / count($this->grades);\r\n }", "public function getAverageRating()\n {\n $ratings = [];\n if ($this->hasExpertise()) {\n foreach ($this->expertise as $expertise) {\n if ($expertise->hasFeedback()) {\n $ratings[] = $expertise->getAverageRating();\n }\n }\n }\n return intval(collect($ratings)->avg());\n }", "function average() {\r\n $total = 0;\r\n foreach ($this->grades as $value)\r\n $total += $value;\r\n return $total / count($this->grades);\r\n }", "function average() {\r\n $total = 0;\r\n foreach ($this->grades as $value)\r\n $total += $value;\r\n return $total / count($this->grades);\r\n }", "public function getRated() {\n\t\t$rate = ProductRate::where('product_id', '=', $this->id)->first();\n\t\tif($rate) {\n\t\t\t$rate1 = $rate->sao1;\n\t\t\t$rate2 = $rate->sao2;\n\t\t\t$rate3 = $rate->sao3;\n\t\t\t$rate4 = $rate->sao4;\n\t\t\t$rate5 = $rate->sao5;\n\t\t\t$rate_count = $rate1 + $rate2 + $rate3 + $rate4 + $rate5;\n\t\t\t$rated = $rate_count != 0 ? ($rate1 + $rate2 * 2 + $rate3 * 3 + $rate4 * 4 + $rate5 * 5) / $rate_count : 0;\n\t\t} else {\n\t\t\t$rated = 0;\n\t\t}\n\n\t\treturn $rated;\n\t}", "function average() {\n $total = 0;\n foreach($this->grades AS $value) {\n $total += $value;\n }\n $count = count($this->grades);\n\n // check for divide by 0\n return $count > 0 ? $total / $count : 0.0;\n }", "public function getCurrentRate(){\n\n\t\t$_calc = \\Mage::getSingleton('tax/calculation');\n\t\t$_rates = $_calc->getRatesForAllProductTaxClasses($_calc->getRateRequest());\n\n\t\tforeach ($_rates as $_class=>$_rate) {\n\t\t $_result = $_rate;\n\t\t}\n\n\t\treturn floatval($_result);\n\t}", "public function getMean()\n {\n return $this->mean;\n }", "function wct_talks_the_average_rating() {\n\techo wct_talks_get_average_rating();\n}", "public function getRating() {\n if ($this->hasFinished()) {\n return DB::table($this->getRateableTable())->where($this->getForeignKey(), $this->getKey())->avg('rating');\n }\n\n $preEvent = $this->preEvent;\n if (!$preEvent) {\n return null;\n }\n $preEventRating = $preEvent->getRating();\n $prePreEventRatings = 0;\n $prePreEvents = 0;\n while ($preEvent->preEvent != null) {\n $preEvent = $preEvent->preEvent;\n $prePreEventRatings += $preEvent->getRating();\n $prePreEvents++;\n }\n\n if ($prePreEventRatings > 0 && $prePreEvents > 0) {\n return ($preEventRating + ($prePreEventRatings / $prePreEvents)) / 2;\n }\n\n return $preEventRating;\n }", "public function getAverageUserRating()\n {\n return $this->averageUserRating;\n }", "function average() {\n $total = 0;\n \n // sum grades\n foreach ($this->grades as $value) {\n $total += $value;\n }\n \n return $total / count($this->grades);\n }", "public function getAverageAmount(): int\n {\n $sum = $this->getOverallAmount();\n\n return $sum > 0 ? ($sum / $this->getCountiesCount()) : 0;\n }", "public function getRate();", "public function getRate();", "function average() {\n $total = 0;\n if (count($this->grades) == 0) {\n return 0;\n }\n foreach ($this->grades as $value) {\n $total += $value;\n }\n return $total / count($this->grades);\n }", "public function getTotalMeanValue()\n {\n return $this->getStat(\"MeanWT\");\n }", "public function getAverageOrderValue()\n {\n return (float)number_format(\n $this->object->getAverageOrderValue(),\n 2,\n '.',\n ''\n );\n }", "function getAverageRate($productId,$conn)\n {\n $sql=\"Select AVG(rate) as averagerate from rates where product_id=\".$productId;\n $result = mysqli_query($conn, $sql);\n $row = $result->fetch_assoc();\n return $row['averagerate'];\n }", "public function getAveragePrice (){\r\n\t\tif(!$this->averagePrice){\r\n\t\t\tif($this->unit == Website_Model_Component::CENTILITRE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerLitre() / 100 * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::MILLILITRE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerLitre() / 1000 * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::LITRE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerLitre() * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::GRAM){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerKilogram() / 1000 * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::KILOGRAM){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerKilogram() * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::PIECE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerPiece() * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::WHOLE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerWhole() * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::TEASPOON){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerLitre() / 203 * $this->amount;\r\n\t\t\t\t//throw new Zend_Exception('Recipes with Component::TEASPOON cannot be converted right now!');\r\n\t\t\t\t// print $this->amount.' TL ' .$this->getIngredient()->name.' teaspoon hit: '.$caloriesKcal.' <br />';\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::FLUID_OUNCE){\r\n\t\t\t\t// TODO:\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} else {\r\n\t\t\t\t// TODO: Exception hinzuf√ºgen und √ºbersetzen\r\n\t\t\t\tthrow new Website_Model_RecipeException('UnsupportedUnit');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->averagePrice;\r\n\t}", "public function getAverageRatings(){\n $sum = array_reduce($this->comments->toArray(),function($total,$comment){\n\n // on retourne le total plus la note de chaque commentaire\n\n return $total + $comment->getRating();\n\n },0);\n\n // on divise le total par le nombre de notes\n\n if (count($this->comments)>0) return $sum / count($this->comments);\n return 0;\n }", "public function getAverageRatingAttribute()\n {\n return $this->averageRating();\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate(): float;", "public function getAverageValue()\n {\n return $this->getAttribute('object.target.averageValue');\n }", "public function getAvg(): string\n {\n return gmdate('i:s', ($this->time_in_seconds / $this->distance));\n }", "public function getAveragePrecipitation()\n {\n return $this->averagePrecipitation;\n }", "public function getAverageCountyTaxRate()\n {\n $taxRatesTotal = array_reduce(\n $this->state->getCounties(),\n static function ($totalTaxRate, $county) {\n return $totalTaxRate + $county->getTaxRate();\n },\n 0\n );\n return $taxRatesTotal / count($this->state->getCounties());\n }", "public function getrawrates() {\n\n if ( $this->hasRates() ) {\n\n $rates = $this->data['clsProperty']['arrSeasonRates']['clsSeasonRates'];\n\n $this->rawrates = $rates;\n }\n\n return $this->rawrates;\n\n }", "public function getRate(): float\n {\n\n $command = new Commands\\Rate();\n return $command->getFormattedOutput();\n\n }", "function f_getAverage()\n\t{\n\t\tglobal $db;\n\n\t\t$sql_query = \"select avg_daily_requests as average from stats_for_web order by id desc limit 1\";\n\t\t$result = $db->query($sql_query) or die($db->error);\n\t\t$row = $result->fetch_assoc();\n\t\t$average = $row['average'];\n\n\t\treturn $average;\n\t}", "public function getRateValue(): float;", "public function average(): float\n {\n return round($this->sum() / sizeof($this->dices), 1);\n }", "function _sr_customer_rate_average($field_value, $date_max){\r\r\n\t$average_value = 0;\r\r\n\tif( $field_value ){\r\r\n\t\t$_date_min = strtotime('-3 weeks', strtotime($date_max));\r\r\n\t\t$_date_max = strtotime($date_max);\r\r\n\t\t\r\r\n\t\t$results = _sr_query_customer_rate_results(array($_date_min, $_date_max));\r\r\n\t\t\r\r\n\t\t$total = 0;\r\r\n\t\tif( !empty($results)){\r\r\n\t\t\tforeach( $results as $row ){\r\r\n\t\t\t\t$total += $row->customer_rate;\r\r\n\t\t\t}\r\r\n\t\t\t$average_value = $total > 0 ? round( ($total / 6), 2, PHP_ROUND_HALF_ODD) : 0;\t\r\r\n\t\t}\r\r\n\t}\r\r\n\treturn $average_value;\r\r\n}", "public function avgPrice(string $symbol)\n {\n $ticker = $this->httpRequest(\"v3/avgPrice\", \"GET\", [\"symbol\" => $symbol]);\n return $ticker['price'];\n }", "public function getRate(){\n return $this->rate;\n }", "public function avgAgeLivres()\n {\n $avg = 0;\n foreach ($this->collection as $key => $value)\n {\n $avg += $value->ageBook();\n }\n $avg = $avg / count($this->collection);\n return $avg;\n }", "public function Rating(){\n\t\t$memberId = $this->owner->ID;\n\t\treturn DB::query(\"SELECT ROUND(AVG(Rating),0) FROM UserRating where RatedForID = $memberId\")->value();\n\t}", "public function getAverageUtilization()\n {\n return $this->getAttribute('object.target.averageUtilization', 0);\n }", "public function getRate(){\n\n\t\t\t\treturn $this->rate;\n\n\t\t\t}", "public function average()\n {\n $rolls = $this->values;\n return array_sum($rolls) / sizeof($rolls);\n }", "public function getAveragePrice($typeid, $type) {\n\t\t// Get the xml object of the marketstat for the given typeid\n\t\t$averageData = simplexml_load_file('http://api.eve-central.com/api/marketstat?typeid='.$typeid);\n\t\t// Pull the average market price from the object and make sure it is a float and not a string\n\t\tif(strtoupper($type) == 'BUY')\n\t\t\t$average = (float)$averageData->marketstat->type->buy->avg;\n\t\telse\n\t\t\t$average = (float)$averageData->marketstat->type->sell->avg;\n\t\t\t\n\t\treturn $average;\n\t}", "public function avgPicRating(){\n\n\t}", "public function getStarvationRate() : float\n {\n return ($this->raw_data['starvation'] / $this->died) * 100;\n }", "public function getTotalAverageCrapIndex()\n {\n return $this->getTotalCrapIndex() / $this->getTotalLLOC();\n }", "public function getTickUsageAverage(): float {\n return round((array_sum($this->useAverage) / count($this->useAverage)) * 100, 2);\n }", "public function averageViewers()\n {\n return ceil($this->streamChunkMetrics()\n ->where('chunk_id', '>', 0)\n ->avg('views'));\n }", "public function getRate() : int\n {\n return $this->rate;\n }", "public function average() {\n\t\tif (empty($this->VerticalRatio)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!$this->Trackdata->has(Trackdata\\Entity::TIME)) {\n\t\t\treturn round(array_sum($this->VerticalRatio) / $this->Trackdata->num());\n\t\t}\n\n\t\t$Series = new TimeSeries($this->VerticalRatio, $this->Trackdata->time());\n\t\t$Series->calculateStatistic();\n\n\t\treturn round($Series->mean());\n\t}", "function px_avg($a,$average_type) {\n\tswitch($average_type) {\n\t\tcase 1: return round(arithmetic_mean($a));\n\t\tcase 2: return round(harmonic_mean($a));\n\t\tcase 3: return round(median($a));\n\t\tcase 4: return round(modal_score($a));\n\t}\n}", "private function get_image_rating_value()\n\t{\n\t\t/*if (phpbb_ext_gallery_core_contest::$mode == phpbb_ext_gallery_core_contest::MODE_SUM)\n\t\t{\n\t\t\treturn $this->image_data('image_rate_points');\n\t\t}\n\t\telse\n\t\t{*/\n\t\t\treturn ($this->image_data('image_rate_avg') / 100);\n\t\t//}\n\t}", "public function getAverageGamesPlayed()\n {\n return $this->averageGamesPlayed;\n }", "public function getAverageRating($resto){\n $reviews = Review::where('resto_id', \"=\" ,$resto->id)->get();\n $count = count($reviews);\n if ($count > 0){\n $sum = 0;\n \n foreach ($reviews as $review){\n $sum += $review->rating;\n }\n return ($sum/$count);\n }\n \n \n }", "public function getAverageOfAllReviews()\n {\n $reviews = $this->getTeacherReviews(1);\n $puntuality = 0;\n $knowledge = 0;\n $presentation = 0;\n $notes = 0;\n $assistance = 0;\n foreach($reviews as $review)\n {\n $puntuality = $puntuality + $review->puntuality;\n $knowledge = $knowledge + $review->knowledge;\n $presentation = $presentation + $review->presentation;\n $notes = $notes + $review->presentation;\n $assistance = $assistance + $review->assistance;\n }\n\n $totalReviews = $reviews->count();\n\n $rating = [\n \"puntuality\" => Round($puntuality/$totalReviews, 2),\n \"knowledge\" => Round($knowledge/$totalReviews, 2),\n \"presentation\" => Round($presentation/$totalReviews, 2),\n \"notes\" => Round($notes/$totalReviews, 2),\n \"assistance\" => Round($assistance/$totalReviews, 2),\n \"reviewsCount\" => $reviews->count(),\n ];\n\n return $rating;\n }" ]
[ "0.7211532", "0.69178826", "0.6854283", "0.68529594", "0.67901504", "0.6749923", "0.6700974", "0.6671901", "0.667105", "0.6634411", "0.65297085", "0.6525775", "0.6517655", "0.6511077", "0.6493195", "0.6439053", "0.6426072", "0.64050764", "0.6380357", "0.63769925", "0.633424", "0.62976426", "0.62754405", "0.6270746", "0.62664384", "0.6266358", "0.6236953", "0.6230658", "0.6223204", "0.6204503", "0.6190218", "0.61656165", "0.6162745", "0.61565745", "0.61565745", "0.61565745", "0.61565745", "0.61521363", "0.6150961", "0.6150485", "0.61467093", "0.61432487", "0.6142316", "0.6142316", "0.61412233", "0.6136023", "0.6111833", "0.6111197", "0.6108855", "0.6105254", "0.60988075", "0.6093461", "0.6078935", "0.6045085", "0.6045085", "0.6035007", "0.6034178", "0.60227", "0.6017379", "0.600513", "0.6004757", "0.5982722", "0.59811515", "0.59811515", "0.59811515", "0.59811515", "0.59811515", "0.59811515", "0.59811515", "0.5973475", "0.5967655", "0.5962819", "0.59565735", "0.59490854", "0.5936929", "0.59024966", "0.58901554", "0.58880347", "0.58730346", "0.5864487", "0.58604044", "0.5841068", "0.5831739", "0.58236516", "0.5820987", "0.5819263", "0.57936484", "0.57878125", "0.5778297", "0.5759187", "0.5757722", "0.5749682", "0.574476", "0.5736527", "0.57097834", "0.57092893", "0.5679236", "0.5675359", "0.5648808", "0.56369805" ]
0.82021713
0
get products for given menu
получить продукты для заданного меню
public function products($menu_id){ $products = Product::where('menu_id', $menu_id)->select(['title', 'description', 'price'])->get()->toArray(); return $products; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProducts() ;", "public function getProducts();", "public function getProducts();", "public function get_products($args = array());", "public function getProducts() {}", "static public function get_products($shopify,$logger){\n\n\t\t$output = $shopify->call('GET','/admin/products.json?fields=id,title,' , array('limit'=>250,'published_status'=>'published'));\n\t\t$product_array = array();\n\t\t//$logger->notice('get produtcts from shopify'. print_R($output,true));\n\t\tforeach ($output as $items){\n\t\t\t$product_array[''.intval($items['id'])] = $items['title'];\n\n\t\t}\n\t\t//$logger->notice('get produtcts modified'. print_R($product_array,true));\n\t\treturn $product_array;\n\n\n\t}", "function getProductList() ;", "public function get_products()\n {\n }", "public function get_products($args = array())\n {\n }", "function getProducts(){\n\treturn dbSelect('products');\n}", "public function sliderProducts() {\n\t\t\n\t\tif(Mage::getStoreConfig('madstack/madstack/activate')){\n\t\t\t\n\t\t\t$currentPID = Mage::registry('current_product')->getId();\n\t\t\n\t\t\t$data = array('productID' => $currentPID , 'uuid' => Mage::getModel('core/cookie')->get('MADid') , 'numberResult' => (Mage::getStoreConfig('madstack/madstack/count_result') + 20));\n\t\t\t\n\t\t\t$resultArray = Mage::helper('madstack')->curlFunc($data,'https://contusapi.madstreetden.com/more');\n\n\t\t\tif($resultArray['status'] == 'success'){\n\t\t\t\t$products = Mage::getModel('catalog/product')\n\t\t\t\t->getCollection()\n\t\t\t\t->addAttributeToSelect('name')\n\t\t\t\t->addAttributeToSelect('price')\n\t\t\t\t->addFinalPrice('final_price')\n\t\t\t\t->addAttributeToSelect('product_url')\n\t\t\t\t->addAttributeToSelect('small_image')\n\t\t\t\t->addAttributeToFilter('entity_id', array('in' => $resultArray['data']))\n\t\t\t\t->addAttributeToFilter('status', 1);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$products = array();\n\t\t\t}\n\t\t\t\n\t\t\treturn $products;\n\t\t}\n\t}", "function getProduct();", "function getProduct();", "public static function GetProducts()\r\n {\r\n $sql = 'SELECT * FROM products';\r\n $products = DatabaseHandler::GetAll($sql);\r\n //do something as an inventory objects\r\n\r\n return $products;\r\n }", "public function shopPageProducts($args)\n {\n // echo $_SESSION['linkservice'];\n if ($_REQUEST ['func'] == 'viewShopProducts') {\n return false;\n }\n\n if (!SecurityUtil::checkPermission('ZSELEX::', '::', ACCESS_ADMIN)) {\n if ($_SESSION ['linkservice'] == 'no') {\n return false;\n }\n }\n\n $shop_id = $_REQUEST ['shop_id'];\n $loguser = UserUtil::getVar('uid');\n\n $items = array();\n $id = (int) FormUtil::getPassedValue('id', '', 'REQUEST'); // normal shop id\n\n if (!empty($id)) {\n $shop_id = $id;\n } elseif (!empty($_REQUEST ['shop_id'])) {\n $shop_id = FormUtil::getPassedValue('shop_id', '', 'REQUEST'); // query string passed shop id\n } else {\n $shop_id = $_REQUEST ['shop_idnewItem']; // query string through newitem function\n }\n\n if (!empty($shop_id)) {\n // echo $shop_id;\n $id = $shop_id;\n $fields = array(\n 'shoptype_id'\n );\n $obj = DBUtil::selectObjectByID('zselex_shop', $id, 'shop_id');\n\n // echo \"<pre>\"; print_r($obj); echo \"</pre>\";\n // echo $obj['shoptype_id'];\n\n if ($obj ['shoptype_id'] == '2') { // ISHOP\n $sql = \"SELECT p.* FROM zselex_products p , zselex_shop s where s.shop_id=$id AND s.shop_id=p.shop_id ORDER BY RAND() limit 0,2\";\n $items = ModUtil::apiFunc('ZSELEX', 'admin', 'execteQuery', $sql);\n } elseif ($obj ['shoptype_id'] == '1') { // ZENCART\n $items = ModUtil::apiFunc('ZSELEX', 'user',\n 'getZenCartProducts', $args = $obj);\n }\n\n // echo \"<pre>\"; print_r($items); echo \"</pre>\";\n\n $this->view->assign('shoptype', $obj ['shoptype_id']);\n\n $this->view->assign('products', $items);\n // $this->view->assign('obj', $obj);\n return $this->view->fetch('user/shoppageproducts.tpl');\n }\n }", "public function products();", "public function getAllProducts();", "public function getProduct();", "public function getProduct();", "public function getProduct();", "public function get_on_sale_products();", "function getProducts(){\n\tglobal $client,$header,$messages;\n\n\t$zoql = array(\n\t\t\"queryString\"=>\"select Id, Name,SKU,Description,EffectiveEndDate,EffectiveStartDate from Product where EffectiveEndDate > \".date('Y-m-d').\"T00:00:00\"\n\t);\n\t$queryWrapper = array(\n \t\t\"query\"=>$zoql\n );\n\t$result = $client->__soapCall(\"query\", $queryWrapper, null, $header); \n\n\tif($result->result!=null) {\n\n\t\t$messages = $result->result->records;\n\t\techo \"<br>---------------------------------------------------Printing all Products--------------------------------------------------------</br>\";\n\t\t//print_r($messages);\n\t\t\n\t\t\techo \"<ul>\";\n \t\t\techo displayTree($messages);\n \t\techo \"</ul>\";\n\t\techo \"<br>---------------------------------------------------Printing all Prodcuts complete -----------------------------------------------</br>\";\n\t\t//echo $messages[0]->Id;\n\t\tgetProductDetail($messages[0]->Id);\n\t\t//getProductDetail('4028e69634172d0201341ff863e5617a');//Currently hardcoded. Change to RatePlanId from the product\n\t}\n\n}", "public function getProductList() {}", "public function getProductList() {}", "public function getProductList() {}", "public function getProductList() {}", "public function getProductList() {}", "protected function get_products($products)\n {\n }", "function getProducts(){\n\n global $db;\n $aWhere = array();\n\n /// Begin for Manufacturer ///\n\n if(isset($_REQUEST['man'])&&is_array($_REQUEST['man'])){\n\n foreach($_REQUEST['man'] as $sKey=>$sVal){\n\n if((int)$sVal!=0){\n\n $aWhere[] = 'manufacturer_id='.(int)$sVal;\n\n }\n\n }\n\n }\n\n\n /// Finish for Manufacturer ///\n\n /// Begin for Product Categories ///\n\n if(isset($_REQUEST['p_cat'])&&is_array($_REQUEST['p_cat'])){\n\n foreach($_REQUEST['p_cat'] as $sKey=>$sVal){\n\n if((int)$sVal!=0){\n\n $aWhere[] = 'Prod_cat_id='.(int)$sVal;\n\n }\n\n }\n\n }\n\n\n /// Finish for Product Categories ///\n\n /// Begin for Categories ///\n\n if(isset($_REQUEST['cat'])&&is_array($_REQUEST['cat'])){\n\n foreach($_REQUEST['cat'] as $sKey=>$sVal){\n\n if((int)$sVal!=0){\n\n $aWhere[] = 'Cat_id='.(int)$sVal;\n\n }\n\n }\n\n }\n\n\n /// Finish for Categories ///\n\n $per_page=12;\n\n if(isset($_GET['page'])){\n\n $page = $_GET['page'];\n\n }else{\n $page=1;\n }\n\n $start_from = ($page-1) * $per_page;\n $sLimit = \" order by 1 DESC LIMIT $start_from,$per_page\";\n $sWhere = (count($aWhere)>0?' WHERE '.implode(' or ',$aWhere):'').$sLimit;\n $get_products = \"select * from products \".$sWhere;\n $run_products = mysqli_query($db,$get_products);\n\n while($row_products=mysqli_fetch_array($run_products)){\n\n $pro_id = $row_products['Prod_id'];\n $pro_title = $row_products ['Prod_Title'];\n $pro_price = $row_products ['Prod_price'];\n $pro_sale_price = $row_products ['prod_sale'];\n $pro_MOQ = $row_products ['MOQ'];\n $pro_url = $row_products ['Prod_url'];\n $pro_img1 = $row_products ['Prod_img1'];\n $pro_label = $row_products ['prod_label'];\n $manufacturer_id = $row_products ['manufacturer_id'];\n\n $get_manufacturer = \"select * from manufacturers where manufacturer_id = '$manufacturer_id'\";\n $run_manufacturer = mysqli_query($db,$get_manufacturer);\n $row_manufacturer = mysqli_fetch_array($run_manufacturer);\n $manufacturer_title = $row_manufacturer['manufacturer_title'];\n\n if($pro_label == \"discount\"){\n\n $product_price = \" <del> RWF $pro_price </del> \";\n $product_sale_price = \"/ <strong>RWF $pro_sale_price</strong> \";\n\n }else{\n\n $product_price = \" <strong>RWF $pro_price</strong> \";\n $product_sale_price = \"\";\n\n }\n\n if($pro_label == \"\"){\n\n $product_label = $pro_label;\n\n }else{\n\n $product_label = \"\n\n <a href='#' class='label $pro_label'>\n\n <div class='theLabel'> $pro_label </div>\n <div class='labelBackground'> </div>\n\n </a>\n \";\n\n }\n\n echo \"\n <div class='col-md-4 col-sm-6 centre-responsive'>\n <div class='product'>\n <a href='$pro_url'>\n\n <img class='img-responsive' src='seller/product_images/$pro_img1'>\n </a>\n\n <div class= 'text'>\n\n <center>\n\n <p class='btn btn-primary'> $manufacturer_title </p>\n\n\n\n <h4>\n <a href='$pro_url'>\n\n $pro_title\n\n </a>\n </h4>\n\n <ul class='price'>\n\n $product_price &nbsp;$product_sale_price\n\n </ul>\n\n <ul class='MOQ'>\n\n MOQ: $pro_MOQ\n\n </ul>\n\n </center>\n\n <p class='button'>\n\n <a class= 'btn btn-default' href='$pro_url'>\n\n view Details\n </a>\n\n </p>\n\n </div>\n\n $product_label\n\n </div>\n\n </div>\n \";\n }\n\n}", "public function getAllProducts(){\n $sql = self::$connection->prepare(\"SELECT *\n FROM products join manufactures on products.manu_ID = manufactures.manu_ID\n join protypes on products.type_ID = protypes.type_ID\n order by ID desc\");\n return $this->select($sql);\n }", "function get_products ( )\n {\n $get_query = \"SELECT *\"\n . \"FROM `miniproject`\";\n \n return $this->query ( $get_query );\n }", "public function getProducts(){\n if( isset($this -> category) ){\n $this -> product_query = \n $this -> product_query . \" \" . \n \"INNER JOIN product_category\n ON product.product_id = product_category.product_id\n WHERE product_category.category_id = ?\";\n }\n //if pagination is enabled\n if( isset( $this -> page ) ){\n //append to the query to add pagination\n $this -> product_query = \n $this -> product_query . \" \" .\n \"AND product.product_id > ? \n ORDER BY product.product_id LIMIT ? \";\n }\n $statement = $this -> connection -> prepare( $this -> product_query );\n //if category is set we need to bind the category_id \n if( isset($this -> category) ){\n $statement -> bind_param( 'i' , $this -> category );\n }\n if( $statement -> execute() ){\n $result = $statement -> get_result();\n $products = array();\n $count = 0;\n while( $row = $result -> fetch_assoc() ){\n $count++;\n array_push( $products, $row );\n }\n }\n $this -> products['items'] = $products;\n $this -> products['total'] = $count;\n return $this -> products;\n }", "public function getproducts()\r\n {\r\n if($this->session->userdata('browserLanguage')=='ar')\r\n {\r\n\treturn $this->db->get('ar_products')->result_array();\r\n }\r\n else\r\n {\r\n\treturn $this->db->get('products')->result_array();\r\n }\r\n }", "public function getProducts()\n {\n return $this->makeRequest('GET', 'products');\n }", "public function getProducts(): array;", "private function getProducts() {\n $products = array();\n $currencies = CurrencyCore::getCurrencies();\n \n $result = $this->productsQuery();\n foreach($result as $row) {\n $link = new Link;\n $image_path = $link->getImageLink($row['link_rewrite'], $row['image_id'], 'home_default');\n \n $products[] = array(\n 'id' => $row['id_product'],\n 'image' => $image_path,\n 'name' => $row['name'],\n 'desc' => $row['description_short'],\n 'price' => Tools::displayPrice($row['price_without_reduction'], $currencies[0], true),\n 'link' => $row['link']\n );\n }\n return $products;\n }", "public function getProducts(){\r\n $dbquery= \"select * from products\";\r\n return $this->query ($dbquery);\r\n }", "function product( $args, $assoc_args ) {\n\t\tlist($args, $assoc_args) = $this->parse_args($args, $assoc_args);\n\t\t$results = array();\n\t\tforeach ($args as $id_or_sku) {\n\t\t//\ttry {\n\t\t\t\t$product = $this->api->get_product_by_sku(strval($id_or_sku));\n\t\t\t//} catch (Exception $e) {\n\t\t//\t\t$product = $this->api->get_product($id_or_sku);\n\t\t//\t}\n\t\t\tvar_dump($product);\n\t\t}\n\t}", "public function findAllProducts();", "public function getProduct($productId);", "public function getProduct($productId);", "function find_all_products($site_lang=false)\n{\n\t$_hooks=find_all_hooks('systems','ecommerce');\n\t$products=array();\n\tforeach (array_keys($_hooks) as $hook)\n\t{\n\t\trequire_code('hooks/systems/ecommerce/'.filter_naughty_harsh($hook));\n\t\t$object=object_factory('Hook_'.filter_naughty_harsh($hook),true);\n\t\tif (is_null($object)) continue;\n\t\t$_products=$object->get_products($site_lang);\n\t\tforeach ($_products as $product=>$details)\n\t\t{\n\t\t\tif (!array_key_exists(4,$details))\n\t\t\t{\n\t\t\t\t$details[4]=do_lang('CUSTOM_PRODUCT_'.$product,NULL,NULL,NULL,$site_lang?get_site_default_lang():NULL);\n\t\t\t}\n\t\t\t$details[]=$object;\n\t\t\t$products[$product]=$details;\n\t\t}\n\t}\n\treturn $products;\n}", "function get_home_products()\n\t{\t\n\t\t// fetch data & index by position\n\t\t$entries = $this->db_fetch('client_entries', array('where' => array('type' => '2', 'menu_id' => 999, 'status' => '1'), \n\t\t'order' => 'date', 'order_dir' => 'DESC'));\n\t\t// fetch data & index by position\n\t\t$media = index_array($this->db_fetch('client_files', array('where' => array('type' => 'image', 'key' => 'hero', 'status' => '1'), \n\t\t'order' => 'date', 'order_dir' => 'DESC')),'id');\n\t\t$m_keys = array_keys($media);\n\t\t//\n\t\tif( is_array($entries) && count($entries) > 0 )\n\t\t{\n\t\t\tforeach( $entries as $entry )\n\t\t\t{\n\t\t\t\t$key = array_intersect($entry['images'], $m_keys);\n\t\t\t\t//\n\t\t\t\tif( is_array($key) && count($key) > 0 )\n\t\t\t\t{\n\t\t\t\t\tif( ( isset($entry['store']) && count($entry['store']) > 0 ) || isset($entry['sales_start']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// check store or sales\n\t\t\t\t\t\tif( isset($entry['store']) && is_array($entry['store']) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$store = $entry['store'][key($entry['store'])];\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\tunset($store);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( isset($entry['sales_start']) && $entry['sales_start'] != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// explode date dd/mm/yy\n\t\t\t\t\t\t\t$start \t= explode('/',$entry['sales_start']);\n\t\t\t\t\t\t\t$end \t= explode('/',$entry['sales_end']);\n\t\t\t\t\t\t\t// check if sale is active\n\t\t\t\t\t\t\tif( mktime(0,0,0, $start[1], $start[0], $start[2]) <= time() && ( count($end) == 0 || mktime(0,0,0, $end[1], $end[0], $end[2]) >= time() ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$store = 'sale';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// add media\n\t\t\t\t\t\t$media[$key[key($key)]]['link'] = $store.'/#'.$entry['id'];\n\t\t\t\t\t\t$media[$key[key($key)]]['column'] = ' product-item';\n\t\t\t\t\t\t$media[$key[key($key)]]['home_image'] = $media[$key[key($key)]]['thumb_350'];\n\t\t\t\t\t\t$output['media'][] = $media[$key[key($key)]];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// return images\n\t\treturn variable($output);\n\t}", "public function getproduct_men()\n\t{\n\t\t$query = \"SELECT * FROM tbl_product \n\t\t\tWHERE brandId = '14' \n\t\t\torder by productId desc LIMIT 8 \";\n\t\t$result = $this->db->select($query);\n\t\treturn $result;\n\t}", "public function getList($products);", "public function getProductos(){\n //\n $sql =\"SELECT section_name_es as 'name', code as 'code' FROM product\n left join section on section.section_id = product.section_id\";\n\n $consulta = $this->db->query($sql);\n \n while($filas = $consulta->fetch(PDO::FETCH_ASSOC)){\n $this->productos[] = $filas;\n }\n return $this->productos; \n }", "public function fetchPrice( $menu ) {\n\t\t$name = $menu;\n \t\t$price = DB::table('menus')->where('name', $name)->value('price');\n \t\t\n \t\treturn response()->json(['name'=> $name, 'price'=> $price]);\n \t\t\n\t}", "function get_products($id)\n\t{\n\t\tglobal $log, $singlepane_view;\n $log->debug(\"Entering get_products(\".$id.\") method ...\");\n\t\trequire_once('modules/Products/Products.php');\n\t\tglobal $app_strings;\n\n\t\t$focus = new Products();\n\n\t\t$button = '';\n\t\tif($singlepane_view == 'true')\n\t\t\t$returnset = '&return_module=Accounts&return_action=DetailView&return_id='.$id;\n\t\telse\n\t\t\t$returnset = '&return_module=Accounts&return_action=CallRelatedList&return_id='.$id;\n\n//\t\t$query = \"SELECT ec_products.*,ec_products.productid as crmid FROM ec_products\n//\t\t\tINNER JOIN ec_accountproductrel\n//\t\t\t\tON ec_products.productid = ec_accountproductrel.productid\n//\t\t\tINNER JOIN ec_account\n//\t\t\t\tON ec_account.accountid = ec_accountproductrel.accountid\n//\t\t\tWHERE ec_account.accountid = \".$id.\"\n//\t\t\tAND ec_products.deleted = 0\";\n $query = \"select ec_products.*,ec_products.productid as crmid from ec_products\n\t\twhere productid in\n\t\t(select distinct productid from ec_inventoryproductrel where id in\n\t\t(select salesorderid from ec_salesorder where ec_salesorder.accountid=\".$id.\"))\";\n\n\t\t$log->debug(\"Exiting get_products method ...\");\n\t\treturn GetRelatedList('Accounts','Products',$focus,$query,$button,$returnset);\n\t}", "function get_products ( )\n {\n include_once '../models/product.php';\n $prod = new product ( );\n \n if ( $prod->get_products ( ) )\n {\n $row = $prod->fetch ( );\n echo ' { \"result\":1, \"products\": [';\n while ( $row )\n {\n echo '{\"prod_id\": \"'.$row[\"prod_id\"].'\", \"prod_name\": \"'.$row[\"prod_name\"].'\",'\n . '\"prod_description\": \"'.$row[\"prod_description\"].'\", \"prod_barcode\": \"'.$row[\"prod_barcode\"].'\"}';\n \n if ( $row = $prod->fetch ( ) )\n {\n echo ',';\n }\n \n }\n echo ']}';\n }\n else\n {\n echo ' { \"result\":0, \"message\": \"Failed to fetch data from database\"} ';\n }\n \n }", "function ozh_get_ozhands_products_list( ) {\n\tglobal $ozhands_site;\n\t\n\t$url = $ozhands_site.'/wp-json/dokan/get_products_list/v1';\n\treturn ozh_get_contents( $url );\n}", "function getProducts() {\n //This function acts like a model, but instead of querying, it just stores the products\n\n\t$products = array(\"product1\", \"product2\", \"product3\", \"product4\", \"product5\",);\n\n return $products;\n}", "public function getAllProducts2()\n {\n\n // stt trang bat dau\n\n $sql = \"SELECT * FROM `protypes` ,`products`,`manufactures` WHERE protypes.type_ID = products.type_ID AND manufactures.manu_ID = products.manu_ID ORDER BY ID DESC\";\n return self::$conn->query($sql);\n }", "function products()\n\t{\n\n\t\t// Get product by param or dynamically \n\t\t$product_id = $this->EE->TMPL->fetch_param('product_id');\n\t\t$url_title = $this->EE->TMPL->fetch_param('url_title');\n\t\t$featured = $this->EE->TMPL->fetch_param('featured');\n\t\t$templatedata = $this->EE->TMPL->tagdata;\n\t\t\n\t\t$where = array();\n\t\tif($featured == true)\n\t\t{\n\t\t\t$where[] = 'featured = 1';\n\t\t}\n\t\t\n\n\t\tif(!$product_data = $this->_get_products($where))\n\t\t{\n\t\t\t // Not a product page \n\t\t\t return false;\n\t\t}\n\t\t\n\t\tforeach($product_data AS $product_row)\n\t\t{\n\t\t\t$product = $this->_get_product($product_row['product_id']);\n\t\t\t$products_array[] = $product[0];\n\t\t\t\n\t\t}\n\t\t\t\n\t\treturn $this->EE->TMPL->parse_variables($templatedata, $products_array);\n\n\t}", "function wc_get_products($args)\n {\n }", "public function getMenu(){\n\t\t$items = array();\n\t\t$dom = $this->load($this->curl($this->url));\n\t\tforeach($dom->find('[class=restaurantDetailBox]') as $box){\n\t\t\t$title = @$box->find(\"[class=head] h2\",0) ? @$box->find(\"[class=head] h2\",0)->plaintext : @$box->find(\"[class=head] b\", 0)->plaintext;\n\t\t\t$desc = @$box->find(\"[class=head] h2\",0) ? @$box->find(\"[class=head] [class=description]\",0)->plaintext : @$box->find(\"[class=head] p\", 0)->plaintext;\n\t\t\t$list = array();\n\n\t\t\tforeach($box->find(\"[class=listBody] ul li\") as $menu){\n\t\t\t\t$temp = array();\n\t\t\t\t$temp[\"productName\"] = @$menu->find(\"[class=productName]\",0)->plaintext;\n\t\t\t\t$temp[\"productInfo\"] = @$menu->find(\"[class=productInfo] p\",0)->plaintext;\n\t\t\t\t$temp[\"productPrice\"] = @$menu->find(\"[class=newPrice]\",0)->plaintext;\n\t\t\t\tif(@$menu->find(\"[class=productName] a i\", 0)){\n\t\t\t\t\t$data = \"data-imagepath\";\n\t\t\t\t\t$temp[\"productImage\"] = \"http:\".@$menu->find(\"[class=productName] i\", 0)->$data;\n\t\t\t\t}\n\t\t\t\t$temp = array_filter($temp);\n\t\t\t\t$list[] = $temp;\n\t\t\t}\n\n\t\t\t$list = array_filter($list);\n\t\t\tif(count($list)){\n\t\t\t\t$items[] = array(\n\t\t\t\t\t\"title\" => $title,\n\t\t\t\t\t\"description\" => $desc,\n\t\t\t\t\t'list' => $list,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$items = array_filter($items);\n\t\treturn json_encode($items);\n\t}", "public function fetchProducts($uri);", "public function getProducts($filters);", "public function getProducts() {\n\t\t$sql = $this->db->query(\"SELECT id, name FROM products\");\n\t\treturn $sql->fetch_all(MYSQLI_ASSOC);\n\t}", "function get_products(){\n\t\t$products = $this->db->get('product_id, product_name, image, description, price', 'tb_products', 'hidden = 0');\n\t\treturn $products;\n\t}", "function getProducts(){\n $query = 'SELECT producto.id_producto,\n producto.nombre,\n producto.descripcion,\n categoria.nombre as categoria,\n producto.precio,\n producto.imagen,\n producto.pos_pagina\n FROM producto\n INNER JOIN categoria ON producto.id_categoria = categoria.id_categoria\n ORDER BY producto.id_producto ASC;';\n return $query;\n }", "function getProducts($link){\n\t\t$html=file_get_html($link);\n\t\t$data=[];\n\t\tforeach( $html->find(\".wrapper-main .container + div .em-col-main ul li .product-item\") as $products ) \n\t\t{\n\t\t\t$product=[];\n\t\t $title=$products->find('.product-shop p a',0)->plaintext;\n\t\t $product['Title']=$title;\n\t\t $price=$products->find('.product-shop .price-box .special-price .price',0)->plaintext;\n\t\t $product['Price']=$price;\n\t\t $image=$products->find('.top-product-shop a img',0)->{'src'};\n\t\t $product['Image']=$image;\n\t\t \n\t\t \n\t\t $data[]=$product;\n\t\t \n\t\t\t\n\t\t}\n\t\t$output = json_encode($data);\n\t\techo $output;\n\t}", "public function get_product()\n {\n }", "function getProducts() {\n\t\treturn $this->m_products;\n\t}", "function getAllFeatureProducts(){\n $sql = self::$connection->prepare(\"SELECT * FROM `products`,manufactures,protypes \n WHERE manufactures.manu_id=products.manu_id \n AND protypes.type_id = products.type_id\");\n $sql->execute();//return an object\n $items = array();\n $items = $sql->get_result()->fetch_all(MYSQLI_ASSOC);\n return $items; //return an array\n }", "function get_products()\n\t{\n\t\tif (get_forum_type()!='ocf') return array();\n\t\trequire_lang('customers');\n\t\t$products=array();\n\t\t$bundles=array(1,2,3,4,5,6,9,20,25,35,50,90,180,550);\n\t\tforeach ($bundles as $bundle)\n\t\t{\n\t\t\t$products[strval($bundle).'_CREDITS']=array(\n\t\t\t\tPRODUCT_PURCHASE_WIZARD,\n\t\t\t\tfloat_to_raw_string($bundle*floatval(get_option('support_credit_value'))),\n\t\t\t\t'handle_support_credits',\n\t\t\t\tNULL,\n\t\t\t\tdo_lang('CUSTOMER_SUPPORT_CREDIT')\n\t\t\t);\n\t\t}\n\n\t\treturn $products;\n\t}", "public function getManuProducts()\n {\n $sql = \"SELECT * FROM `manufactures`\";\n // thuc thi cau truy van\n $result = self::$conn->query($sql);\n return $this->getData($result);\n }", "function getAllProducts()\n {\n $sql = self::$connection->prepare(\"SELECT * FROM `products`, protypes WHERE `products`.`type_id` = `protypes`.`type_id` ORDER BY id DESC\");\n $sql->execute(); //return an object\n $items = array();\n $items = $sql->get_result()->fetch_all(MYSQLI_ASSOC);\n return $items; //return an array\n }", "function get_products($id)\n\t{\n\t\tglobal $log, $singlepane_view;\n $log->debug(\"Entering get_products(\".$id.\") method ...\");\n\t\tglobal $app_strings;\n\t\tglobal $current_user;\n\t\tglobal $adb;\n\t\t$query = \"select ec_salesorder.subject,ec_salesorder.orderdate,ec_salesorder.total,ec_salesorder.salesorderid,ec_products.productcode,ec_products.productid,\n\t\tec_products.productname,ec_inventoryproductrel.quantity as salesum,ec_inventoryproductrel.listprice as price,ec_products.detail_url from ec_products\n\t\tinner join ec_inventoryproductrel on ec_inventoryproductrel.productid = ec_products.productid \n\t\tinner join ec_salesorder on ec_salesorder.salesorderid = ec_inventoryproductrel.id where ec_salesorder.accountid = \".$id.\" and ec_salesorder.deleted=0 order by ec_salesorder.salesorderid asc\"; \n\n\t\t$list_result = $adb->getList($query);\n\t\t$num_rows = $adb->num_rows($list_result);\n\n\t\t$header = array();\n\t\t$header[] = \"订单编号\";\n\t\t$header[] = \"订单日期\";\n\t\t$header[] = \"订单总额\";\n\t\t$header[] = \"产品编号\";\n\t\t$header[] = \"产品名称\";\n\t\t$header[] = \"购买数量\";\n\t\t$header[] = \"价格\";\n $header[] = \"小计\";//added by ligangze 2013-08-12\n\t\t$header[] = \"商品URL\";\n\t\tif($num_rows && $num_rows > 0){\n\t\t\t$row_i = 1;\n\t\t\tforeach($list_result as $row){\n\t\t\t\t$entries = Array();\n\t\t\t\t$entries[] = \"<a href='index.php?action=DetailView&module=SalesOrder&record=\".$row['salesorderid'].\"' target='_blank'>\".$row['subject'].\"</a>\";\n\t\t\t\t$entries[] = $row['orderdate'];\n\t\t\t\t$entries[] = $row['total'];\n\t\t\t\t$entries[] = \"<a href='index.php?action=DetailView&module=Products&record=\".$row['productid'].\"' target='_blank'>\".$row['productcode'].\"</a>\";\n\t\t\t\t$entries[] = \"<a href='index.php?action=DetailView&module=Products&record=\".$row['productid'].\"' target='_blank'>\".$row['productname'].\"</a>\";\n\t\t\t\t$entries[] = $row['salesum'];\n\t\t\t\t$entries[] = $row['price'];\n $entries[] = number_format($row['salesum']*$row['price'],\"2\",\".\",\",\");//added by ligangze 2013-08-12\n\t\t\t\t$entries[] = \"<a href='\".$row['detail_url'].\"' target='_blank'>\".$row['detail_url'].\"</a>\";\n\t\t\t\t$entries_list[] = $entries;\n\t\t\t\t$row_i ++;\n\t\t\t}\n\t\t}\n\t\tif($num_rows>0){\n\t\t\t$return_data = array('header'=>$header,'entries'=>$entries_list);\n\t\t\t$log->debug(\"Exiting get_products method ...\");\n\t\t\treturn $return_data; \n\t\t}\n\t}", "public static function getProducts(){\n $app = Aplicacion::getSingleton();\n $conn = $app->conexionBd();\n $query = sprintf(\"SELECT `id` FROM `producto`\");\n $rs = $conn->query($query);\n $result = false;\n if ($rs) {\n if ($rs->num_rows > 0) {\n while( $row = mysqli_fetch_assoc($rs)) {\n $producto[] = GestionProducto::guardarProducto($row['id']);\n }\n $result = $producto;\n $rs->free();\n }\n } else {\n echo \"Error al consultar en la BD: (\" . $conn->errno . \") \" . utf8_encode($conn->error);\n exit();\n }\n return $result;\n }", "public function get_all_products()\n {\n return Product::get();\n }", "public function getProduct(){\n\t\treturn product::all();\n\t}", "public function searchProductByName(){\n\n\t\t$p = new AFFILIATES\\affiliateProduct();\n\n\t\t$products = $p -> searchProductByName('division');\n\n\n\t\treturn $products;\n\n\n\n\t}", "public function getProduct(Product $product);", "function panier_get_products() {\n\tglobal $panier;\n\t$ret = array();\n\tforeach ($panier as $product) {\n\t\t$p = array('product' => product($product['id']),\n\t\t\t\t 'nb' => $product['nb']);\n\t\t$ret[] = $p;\n\t}\n\treturn $ret;\n}", "function getAllProducts(){\n\t\t$query = \"SELECT p.*,c.name as 'c_name' FROM products p left join categories c on p.category_id = c.id\";\n\t\t$result = get($query);\n\t\treturn $result;\n\t}", "public function getItemsByMenu($menu, $status = 'publish')\n {\n $p = $this->getItems($status)\n ->andWhere('m.id = ? OR m.slug = ?', array($menu, $menu));\n\n return $p;\n }", "static function returnAllProducts(){\n\n $handler = self::openConnection();\n $query = $handler->query('SELECT * FROM marca as m INNER JOIN productos as p on m.idMarca=p.IdMarca');\n\n while($row = $query->fetch(PDO::FETCH_ASSOC)){\n $products[] = array('idMarca'=>$row['idMarca'], 'marca'=>$row['marca'], 'idProducto'=>$row['idProducto'], 'producto'=>$row['producto'], 'precio'=>$row['precio']);\n }\n\n return $products;\n }", "function getProducts(){\n\n /// getProducts function Code Starts ///\n\n global $db;\n\n $aWhere = array();\n\n /// Manufacturers Code Starts ///\n\n if(isset($_REQUEST['man'])&&is_array($_REQUEST['man'])){\n\n foreach($_REQUEST['man'] as $sKey=>$sVal){\n\n if((int)$sVal!=0){\n\n $aWhere[] = 'manufacturer_id='.(int)$sVal;\n\n }\n\n }\n\n }\n\n /// Manufacturers Code Ends ///\n\n /// Products Categories Code Starts ///\n\n if(isset($_REQUEST['p_cat'])&&is_array($_REQUEST['p_cat'])){\n\n foreach($_REQUEST['p_cat'] as $sKey=>$sVal){\n\n if((int)$sVal!=0){\n\n $aWhere[] = 'p_cat_id='.(int)$sVal;\n\n }\n\n }\n\n }\n\n/// Products Categories Code Ends ///\n\n/// Categories Code Starts ///\n\nif(isset($_REQUEST['cat'])&&is_array($_REQUEST['cat'])){\n\n foreach($_REQUEST['cat'] as $sKey=>$sVal){\n\n if((int)$sVal!=0){\n\n $aWhere[] = 'cat_id='.(int)$sVal;\n\n }\n\n }\n\n }\n\n/// Categories Code Ends ///\n\n$per_page=6;\n\n if(isset($_GET['page'])){\n\n $page = $_GET['page'];\n\n }else {\n\n $page=1;\n\n }\n\n$start_from = ($page-1) * $per_page ;\n\n$sLimit = \" order by 1 DESC LIMIT $start_from,$per_page\";\n\n$sWhere = (count($aWhere)>0?' WHERE '.implode(' or ',$aWhere):'').$sLimit;\n\n$get_products = \"select * from products \".$sWhere;\n\n$run_products = mysqli_query($db,$get_products);\n\nwhile($row_products=mysqli_fetch_array($run_products)){\n\n$pro_id = $row_products['product_id'];\n\n$pro_title = $row_products['product_title'];\n\n$pro_price = $row_products['product_price'];\n\n$pro_img1 = $row_products['product_img1'];\n\n$pro_label = $row_products['product_label'];\n\n$manufacturer_id = $row_products['manufacturer_id'];\n\n$get_manufacturer = \"select * from manufacturers where manufacturer_id='$manufacturer_id'\";\n\n$run_manufacturer = mysqli_query($db,$get_manufacturer);\n\n$row_manufacturer = mysqli_fetch_array($run_manufacturer);\n\n$manufacturer_name = $row_manufacturer['manufacturer_title'];\n\n$pro_psp_price = $row_products['product_psp_price'];\n\n$pro_url = $row_products['product_url'];\n\n\nif($pro_label == \"Sale\" or $pro_label == \"Gift\"){\n\n$product_price = \"<del> $$pro_price </del>\";\n\n$product_psp_price = \"| $$pro_psp_price\";\n\n}\nelse{\n\n$product_psp_price = \"\";\n\n$product_price = \"$$pro_price\";\n\n}\n\n\nif($pro_label == \"\"){\n\n\n}\nelse{\n\n$product_label = \"\n\n<a class='label sale' href='#' style='color:black;'>\n\n<div class='thelabel'>$pro_label</div>\n\n<div class='label-background'> </div>\n\n</a>\n\n\";\n\n}\n\n\necho \"\n\n<div class='col-md-4 col-sm-6 center-responsive' >\n\n<div class='product' >\n\n<a href='$pro_url' >\n\n<img src='admin_area/product_images/$pro_img1' class='img-responsive' >\n\n</a>\n\n<div class='text' >\n\n<center>\n\n<p class='btn btn-primary'> $manufacturer_name </p>\n\n</center>\n\n<hr>\n\n<h3><a href='$pro_url' >$pro_title</a></h3>\n\n<p class='price' > $product_price $product_psp_price </p>\n\n<p class='buttons' >\n\n<a href='$pro_url' class='btn btn-default' >View details</a>\n\n<a href='$pro_url' class='btn btn-primary'>\n\n<i class='fa fa-shopping-cart' data-price=$pro_price></i> Add to cart\n\n</a>\n\n\n</p>\n\n</div>\n\n$product_label\n\n\n</div>\n\n</div>\n\n\";\n\n}\n/// getProducts function Code Ends ///\n\n\n\n}", "function get_products() {\n\nglobal $conn;\n\n$aWhere = array();\n\n/// Manufacturers Code Starts ///\n\nif(isset($_REQUEST['man'])&&is_array($_REQUEST['man'])){\n\nforeach($_REQUEST['man'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'manufacturer_id='.(int)$sVal;\n\n}\n\n}\n\n}\n\n/// Manufacturers Code Ends ///\n\n/// Products Categories Code Starts ///\n\nif(isset($_REQUEST['p_cat'])&&is_array($_REQUEST['p_cat'])){\n\nforeach($_REQUEST['p_cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'p_cat_id='.(int)$sVal;\n\n}\n\n}\n\n}\n\n/// Products Categories Code Ends ///\n\n/// Categories Code Starts ///\n\nif(isset($_REQUEST['cat'])&&is_array($_REQUEST['cat'])){\n\nforeach($_REQUEST['cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'cat_id='.(int)$sVal;\n\n}\n\n}\n\n}\n\n/// Categories Code Ends ///\n\n$per_page=6;\n\nif(isset($_GET['page'])){\n\n$page = $_GET['page'];\n\n}else {\n\n$page=1;\n\n}\n\n$start_from = ($page-1) * $per_page ;\n\n$sLimit = \" order by 1 DESC LIMIT $start_from,$per_page\";\n\n$sWhere = (count($aWhere)>0?' WHERE '.implode(' or ',$aWhere):'').$sLimit;\n\n$get_products = \"select * from products \".$sWhere;\n\n$run_products = mysqli_query($conn,$get_products);\n\nwhile($row_products=mysqli_fetch_array($run_products)){\n\n$pro_id = $row_products['product_id'];\n\n$pro_title = $row_products['product_title'];\n\n$pro_price = $row_products['product_price'];\n\n$pro_img1 = $row_products['product_img1'];\n\n$pro_label = $row_products['product_label'];\n$manufacturer_id = $row_products['manufacturer_id'];\n$product_psp_price = $row_products['product_psp_price'];\n$pro_url = $row_products['product_url'];\n\n$get_manufacturer = \"SELECT * FROM manufacturers WHERE manufacturer_id = '$manufacturer_id'\";\n$run_manufacturer = mysqli_query($conn, $get_manufacturer);\n$row_manufacturer = mysqli_fetch_array($run_manufacturer);\n$manufacturer_name = $row_manufacturer['manufacturer_title'];\n\nif ($pro_label != \"New\") {\n\t$product_price = \"<del>$pro_price</del>\";\n\t$product_psp_price = \"| $product_psp_price\";\n} else {\n\t$product_price = \"$pro_price\";\n\t$product_psp_price = \"\";\n}\n\nif ($pro_label == \"\") {\n\t# code...\n} else {\n\t$pro_label = \"\n\t <a href='#' class='label sale' style='color:black;'>\n\t <div class='thelabel'>\".$pro_label.\"</div>\n\t <div class='label-background'></div>\n\t </a>\n\t\";\n}\n\n\n\n\necho '\n\n <div class=\"col-md-4\">\n\t\t\t<div class=\"product\">\n\t\t\t\t<a href=\"'.$pro_url.'\"> \n\t\t\t\t <img src=\"admin-area/product_images/'.$pro_img1.'\" alt=\"\" class=\"img-responsive\">\n\t\t\t\t</a>\n\n\t\t\t\t<div class=\"text\">\n\t\t\t\t <center>\n\t\t\t\t <p class=\"btn btn-info\">'.$manufacturer_name.'</p>\n\t\t\t\t </center>\n\t\t\t\t <hr>\n\t\t\t\t\t<h3><a href=\"'.$pro_url.'\">'.$pro_title.'</a></h3>\n\t\t\t\t\t<p class=\"price\">$'.$product_price.' '. $product_psp_price .'</p>\n\n\t\t\t\t\t<p class=\"buttons\">\n\t\t\t\t\t\t<a href=\"'.$pro_url.'\" class=\"btn btn-default\">View Details</a>\n\t\t\t\t\t\t<a href=\"'.$pro_url.'\" class=\"btn btn-info\">\n\t\t\t\t\t\t\t<i class=\"fa fa-shopping-cart\"></i>Add to cart\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\n\t\t\t\t'.$pro_label.'\n\t\t\t</div>\n\t\t</div>\n\n';\n\n}\n/// getProducts function Code Ends ///\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n function getPaginator() {\n\n/// getPaginator Function Code Starts ///\n\n$per_page = 6;\n\nglobal $conn;\n\n$aWhere = array();\n\n$aPath = '';\n\n/// Manufacturers Code Starts ///\n\nif(isset($_REQUEST['man'])&&is_array($_REQUEST['man'])){\n\nforeach($_REQUEST['man'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'manufacturer_id='.(int)$sVal;\n\n$aPath .= 'man[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Manufacturers Code Ends ///\n\n/// Products Categories Code Starts ///\n\nif(isset($_REQUEST['p_cat'])&&is_array($_REQUEST['p_cat'])){\n\nforeach($_REQUEST['p_cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'p_cat_id='.(int)$sVal;\n\n$aPath .= 'p_cat[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Products Categories Code Ends ///\n\n/// Categories Code Starts ///\n\nif(isset($_REQUEST['cat'])&&is_array($_REQUEST['cat'])){\n\nforeach($_REQUEST['cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'cat_id='.(int)$sVal;\n\n$aPath .= 'cat[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Categories Code Ends ///\n\n$sWhere = (count($aWhere)>0?' WHERE '.implode(' or ',$aWhere):'');\n\n$query = \"select * from products \".$sWhere;\n\n$result = mysqli_query($conn,$query);\n\n$total_records = mysqli_num_rows($result);\n\n$total_pages = ceil($total_records / $per_page);\n\necho \"<li><a href='shop.php?page=1\";\n\nif(!empty($aPath)){ echo \"&\".$aPath; }\n\necho \"' >\".'First Page'.\"</a></li>\";\n\nfor ($i=1; $i<=$total_pages; $i++){\n\necho \"<li><a href='shop.php?page=\".$i.(!empty($aPath)?'&'.$aPath:'').\"' >\".$i.\"</a></li>\";\n\n};\n\necho \"<li><a href='shop.php?page=$total_pages\";\n\nif(!empty($aPath)){ echo \"&\".$aPath; }\n\necho \"' >\".'Last Page'.\"</a></li>\";\n\n/// getPaginator Function Code Ends ///\n }\n\n }", "function getProductos() {\r\n return $this->productos;\r\n }", "public function getProducts($params = null){\n $products = $this->model->getProducts();\n if ($products) {\n $this->view->response($products, 200); \n } else {\n $this->view->response(\"No existen productos\", 404);\n }\n }", "public function getProducts()\n\t{\n\t\t$client = ContextusClient::clientConfiguration();\n\t\t$response = Endpoints::product()\n\t\t->getProducts()\n\t\t->build()->call($client);\n\t\tif ($response instanceof ErrorResponse) {\n\t\t return $response->getMessage();\n\t\t} else {\n\t\t\treturn $response->getProducts();\n\t\t}\n\t}", "public function getProducts()\n {\n $this->load->model('catalog/exchange');\n $this->load->model('catalog/product');\n $this->load->model('catalog/category');\n $this->load->model('catalog/product_factor');\n $page = (isset($this->request->get['pagethis']) ? $this->request->get['pagethis'] : 0);\n $page++;\n $response = $this->model_catalog_exchange->getCategory();\n if ($response && ($page == 1)) {\n $this->model_catalog_exchange->disableCategory();\n foreach ($response as $category) {\n $this->model_catalog_exchange->parseCategoryResponse($category);\n }\n }\n $flag = true;\n $response = $this->model_catalog_exchange->getNomenclature();\n if ($response) {\n foreach ($response as $product) {\n $this->model_catalog_exchange->parseNomenclatureResponse($product);\n }\n } else {\n $flag = false;\n }\n if ($flag) {\n $result = json_encode([\n 'result' => 1,\n 'url' => $page\n ]);\n } else {\n $result = json_encode([\n 'result' => 0,\n 'url' => 0\n ]);\n }\n echo $result;\n return;\n }", "public function products(){\n\t\t$this->redirect_unathorized($_SESSION['admin']);\n\t\t$this->data['city'] = UsersData::getAllCity();\n\t\t\n\t\t$this->data['all_products'] = ProductsData::all_products();\n\t\t$this->data['product_not_akcija'] = ProductsData::product_not_akcija();\n\t\t$this->data['product_on_akcija'] = ProductsData::product_on_akcija();\n\t\t$this->data['proizvodjaci'] = ProductsData::getAllProizvodjac();\n\t\t$this->data['atc'] = ProductsData::getATC();\n\t\t$this->data['symptoms'] = ProductsData::getSymptoms();\n\t\t$this->data['products'] = ProductsProcess::product_with_symptoms();\n\t\t$this->show_view('admin/products');\n\t}", "public function productsAction(){\n\t\t\t$params = $this->getRequest()->getParams();\n\t\t\tif (sizeof($params) == 1 && is_int(array_keys($params)[0])) {\n\t\t\t\t$product = Mage::getModel('catalog/product')->load(array_keys($params)[0]);\n\t\t\t\tif ($product->getId()){\n\t\t\t\t\t$data = $product->getData();\n\t\t\t\t\t$data['image_location'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product';\n\t\t\t\t\t$this->helper->buildJson($data,true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->helper->buildJson(null,false,\"Product ID does not exist.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$limit = (isset($params['limit'])) ? $params['limit'] : 10;\n\t\t\t\t$products = Mage::getModel('catalog/product')->getCollection()->setPageSize($limit)->setCurPage(1);\n\n\t\t\t\tif (isset($params['category_id']))\n\t\t\t\t{\n\t\t\t\t\t$products->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left');\n\t\t\t\t\t$products->addFieldToFilter('category_id',$params['category_id']);\n\t\t\t\t}\n\t\t\t\telse if (isset($params['category_url']))\n\t\t\t\t{\n\t\t\t\t\t$category_id = Mage::getModel('catalog/category')->getCollection()\n\t\t\t\t\t\t\t\t->addAttributeToFilter('url_key', $params['category_url'])->addAttributeToSelect('id')\n\t\t\t\t\t\t\t\t->getFirstItem()->getId();\n\t\t\t\t\t\n\t\t\t\t\tif ($category_id != null){\n\t\t\t\t\t\t$products->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left');\n\t\t\t\t\t\t$products->addFieldToFilter('category_id',$category_id);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->helper->buildJson(null,false,\"Category_url does not exist.\");\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//TODO: [Tech Debt] Make it parameterized\n\t\t\t\t$products->addAttributeToSelect('*');\n\n\t\t\t\t$data = [];\n\n\t\t\t\tforeach ($products as $product){\n\t\t\t\t\t$thisProduct = $product->getData();\n\t\t\t\t\t$thisProduct['image_location'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product';\n\t\t\t\t\t$data[] = $thisProduct;\n\t\t\t\t}\n\t\t\t\t$this->helper->buildJson($data,true);\n\t\t\t}\n\t\t}", "public function getProducts()\n {\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n // database query, getting all the info of the selected user (allows login via email address in the\n // username field)\n $sql = \"SELECT `Product_Name`\n FROM `product`\n WHERE 1;\";\n $productsinfo = $this->db_connection->query($sql);\n return $productsinfo;\n } else {\n $this->errors[] = \"Database connection problem.\";\n }\n }", "public function get_productos(){\n\t\t\n\t\t\n\t\t$consulta=$this->db->query(\"SELECT * FROM PRODUCTOS\");\n\t\t\n\t\t\n\t\twhile($filas=$consulta->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\n\t\t$this->productos[]=$filas;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->productos;\n\t\t\n\t\t\n\t}", "protected function _getProducts()\n\t\t{\n\t\t\t$this->Reviews->clear();\n\t\t\t// Uses the products table.\n\t\t\t$this->Reviews->table('products');\n\t\t\t$this->Reviews->select();\n\t\t\t// Returns the results of the products.\n\t\t\treturn $this->Reviews->fetch(true);\n\t\t}", "function product_list() {\n\t$sql = \"SELECT pid,product FROM products ORDER BY product\";\n\treturn $_ENV['dbi']->fetch_all($sql,'array');\n}", "function get_products_service($product_service){\n\t\tif(!$product_service)\n\t\t\t\treturn;\n\t\t$query = \" SELECT id, name \n\t\t\t\t\tFROM fs_products\n\t\t\t\t\tWHERE id IN (\".$product_service.\") \n\t\t\t\t\t ORDER BY POSITION(','+id+',' IN '\".$product_service.\"')\n\t\t\t\t\t\";\n\t\tglobal $db;\n\t\t$sql = $db->query($query);\n\t\t$result = $db->getObjectList();\n\t\treturn $result;\n\t}", "private function get_products () {\n\t\tglobal $woodojo;\n\t\t\n\t\t$products = array();\n\t\t$transient_key = $woodojo->base->token . '-products';\n\t\t\n\t\tif ( false === ( $products = get_transient( $transient_key ) ) ) {\n\t\t\t$args = array( 'action' => 'getwoodojoproducts' );\n\t\t\t$response = $this->request( $args );\n\t\t\t\n\t\t\tif ( isset( $response->response->code ) && ( $response->response->code == 1 ) && ( isset( $response->payload ) ) ) {\n\t\t\t\t$products = (array)$response->payload;\n\t\t\t\tset_transient( $transient_key, $products, $this->products_expire_time );\n\t\t\t}\n\t\t}\n\n\t\treturn $products;\n\t}", "private function getListOfItemsfromProduct()\n {\n $product=Product::pluck('id')->toArray();\n \n $response=array();\n for($i=0;$i<=rand(5,10);$i++){\n $response[]=array_rand($product,1);\n }\n $response=(implode(',',$response));\n return $response;\n }", "function menAccesoriesProducts(){ \n $menAccesoriesProducts = DB::select(\n \"select\n id_product, slug, stock, visible, sizes.size, genders.gender, brands.brand, product_types.product_type, product_types.description,\n product_types.sales_price, product_types.discount_price, sub_categories.sub_category,\n img_colors.url_img FROM products \n INNER JOIN sizes USING (id_size)\n INNER JOIN genders USING (id_gender)\n INNER JOIN brands USING (id_brand)\n INNER JOIN img_colors USING (id_img_color)\n INNER JOIN types_by_colors USING (id_types_by_color)\n INNER JOIN product_types USING (id_product_type)\n INNER JOIN colors USING (id_color)\n INNER JOIN sub_categories USING (id_sub_category)\n INNER JOIN categories USING (id_category)\n WHERE genders.gender = 'Hombre' AND categories.category = 'Accesorios'\");\n\n return response()->json(['results' => $menAccesoriesProducts], 200);\n }", "public function ajaxGetProductByDishType(Request $request) {\n $menuTypes = array($request->dish_id);\n $helper = new Helper();\n\n // \n $dishTypeLevel1 = $helper->getdDishTypeBy(null, $request->dish_id);\n\n if($dishTypeLevel1)\n {\n foreach($dishTypeLevel1 as $level1)\n {\n $menuTypes[] = $level1->dish_id;\n\n // \n $dishTypeLevel2 = $helper->getdDishTypeBy(null, $level1->dish_id);\n\n if($dishTypeLevel2)\n {\n foreach($dishTypeLevel2 as $level2)\n {\n $menuTypes[] = $level2->dish_id;\n }\n }\n }\n }\n \n // Get all products by dish\n $products = Product::select('product.product_id', 'product.product_name', 'product.product_description', 'product.small_image')\n ->join('dish_type','dish_type.dish_id','=','product.dish_type')\n ->join('product_price_list AS PPL', 'PPL.product_id', '=', 'product.product_id')\n // ->where('product.dish_type', $request->dish_id)\n ->whereIn('product.dish_type', array_unique($menuTypes))\n ->where('product.u_id', Auth::user()->u_id)\n ->where('PPL.store_id', Session::get('kitchenStoreId'))\n ->where('product.s_activ', '!=' , 2)\n ->where('dish_type.dish_activate',1)\n ->groupBy('product.product_id')\n ->orderBy('product_rank', 'ASC')\n ->orderBy('product_id')\n ->get();\n\n $data = array();\n\n if($products)\n {\n foreach($products as $key => $value)\n {\n $data[$key] = $value;\n\n if( strpos($value->small_image, '.png') == false && strpos($value->small_image, '.jpg') == false )\n {\n $data[$key]['small_image'] = asset('images/placeholder-image.png');\n }\n else\n {\n $data[$key]['small_image'] = $value->small_image;\n }\n\n // Get current product price detail\n $data[$key]['current_price'] = null;\n $current_date = Carbon::now()->format('Y-m-d h:i:00');\n\n $currentProductPrice = ProductPriceList::select('id', 'text', 'price', 'publishing_start_date', 'publishing_end_date')\n ->where('product_id', $value->product_id)\n ->where('store_id', Session::get('kitchenStoreId'))\n ->where('publishing_start_date', '<=', $current_date)\n ->where('publishing_end_date', '>=', $current_date)\n ->first();\n //->toSql();\n \n if($currentProductPrice)\n {\n $data[$key]['current_price'] = $currentProductPrice;\n }\n }\n }\n\n return response()->json(['products' => $data]);\n }", "public function searchProductsAction() {\r\n Shopware()->Plugins()->Controller()->ViewRenderer()->setNoRender();\r\n\r\n $params = $this->Request()->getParams();\r\n $pConfig = self::Plugin()->Config();\r\n if ($pConfig->enable_debug) {\r\n __d(\"searchProductsAction\");\r\n __d($params,\"params\");\r\n }\r\n switch ($params[\"get\"]) {\r\n case \"filter\":\r\n $filters = false;\r\n $filter = false;\r\n\r\n $filter->name = \"Produkt\";\r\n $filter->description = \"\";\r\n $filter->required = false;\r\n $filter->query_key = \"product\";\r\n $filter->type = \"input\";\r\n $filters[] = $filter;\r\n\r\n echo json_encode($filters);\r\n\r\n exit(0);\r\n\r\n break;\r\n case 'search':\r\n $items = false;\r\n\r\n $items->settings->type = \"product\";\r\n $items->settings->link_editable = false;\r\n $items->settings->link_text_editable = false;\r\n $items->settings->image_size_editable = false;\r\n\r\n $search = $this->Request()->product;\r\n $shopID = $this->Request()->getParam('shopID');\r\n\r\n $categoryID = Shopware()->Db()->fetchOne(\"SELECT category_id FROM s_core_shops WHERE id=?\", array($shopID));\r\n\r\n $this->shopCategories[] = $categoryID;\r\n $this->getCategories($categoryID);\r\n $this->shopCategories = join(\",\", $this->shopCategories);\r\n $search = \"%$search%\";\r\n $sql = \"\r\n SELECT articles.id\r\n FROM s_articles articles\r\n JOIN s_articles_categories ac ON ac.articleID = articles.id\r\n JOIN s_articles_details ad ON articles.id = ad.articleId\r\n WHERE (articles.name LIKE ? OR articles.description LIKE ? OR articles.description_long LIKE ?)\r\n AND articles.active = 1\r\n AND ad.active = 1\r\n AND ac.categoryID IN (\" . $this->shopCategories . \")\r\n \";\r\n $product_ids = Shopware()->Db()->fetchCol($sql, array($search,$search,$search));\r\n $product_ids = array_unique($product_ids);\r\n\r\n if (count($product_ids) == 0)\r\n exit(0);\r\n\r\n foreach ($product_ids as $product_id) {\r\n $out = false;\r\n\r\n $repository = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Shop');\r\n $shop = $repository->getActiveById($shopID);\r\n $shop->registerResources(Shopware()->Bootstrap());\r\n\r\n $url = Shopware()->Modules()->System()->sSYSTEM->sPathArticleImg;\r\n $url = str_replace('/media/image', '', $url);\r\n\r\n $product = Shopware()->System()->sMODULES['sArticles']->sGetArticleById($product_id);\r\n if ($product['linkDetailsRewrited'])\r\n //$url .= str_replace('http:///', '', $product['linkDetailsRewrited']);\r\n $url = $product['linkDetailsRewrited'];\r\n else\r\n $url .= $product['linkDetails'];\r\n\r\n $out->title = $product['articleName'];\r\n $out->description = $product['description_long'];\r\n if(self::Plugin()->assertVersionGreaterThenLocal(\"5.0.0\")){\r\n $out->image = $product['image']['thumbnails'][0]['source'];//2 is too large\r\n } else {\r\n $out->image = $product['image']['src'][2];\r\n }\r\n $out->price = $product['price'];\r\n $out->url = $url;\r\n\r\n $items->items[] = $out;\r\n }\r\n echo json_encode($items);\r\n\r\n exit(0);\r\n\r\n break;\r\n }\r\n }", "public function products($params){\n\t\t\n\t\t$info = parent::userInfoAndSession();\n\t\tparent::set('info', $info);\n\t\tparent::set('page', 'products');\n\t\t\n\t\t//Get categories\n\t\t$categories = $this->db->getCategories();\n\t\tparent::set('categories', $categories);\n\t\t\n\t\tif(isset($params['id']) && !empty($params['id'])){\n\t\t\t//Get product\n\t\t\t$product = $this->db->getProduct($params);\n\t\t\tparent::set('product', $product);\n\t\t}\n\t\t//Get products\n\t\t$products = $this->db->getProducts($_SESSION['ws-user']['id']);\n\t\tparent::set('products', $products);\n\t\n\t}", "public function getProducts() {\n $nids = $this->productQuery();\n\n /** @var $node_storage \\Drupal\\node\\NodeStorage */\n $node_storage = $this->entity_manager->getStorage('node');\n return $nodes = $node_storage->loadMultiple($nids);\n }", "public function product($urlkey = 'index'){\n\n $page = Slug::query()->where('slug_request', '=', $urlkey)\n ->with(['model' => function (MorphTo $morphTo) {\n $morphTo->morphWith([\n ProductEntity::class => [],\n ]);\n }])->first();\n\n $product = $page->slugmodel;\n // dd($page->toArray());\n\n $menu = Menu::with('menuItems')->first();\n // if(!isset($page->slugmodel)){\n // abort(404);\n // }\n\n return view('frontend.show', ['page' => $page->slugmodel, 'menu' => $menu, 'product' => $product ]);\n }", "function getAllProducts()\n {\n $dataService = new ProductDataService();\n return $dataService->getAllProducts();\n }", "public function getSearchMenu($param){\n\t\tswitch ($param){\n\t\t\tcase 'Suppliers':\n\t\t\t\trequire_once('include/CartManufacturer.php');\n\t\t\t\t$this->smarty->assign('selSupplier', @$_REQUEST[\"selSupplier\"]);\n\t\t\t\treturn CartManufacturer::getAllCartManufacturers();\n\t\t\t\tbreak;\n\t\t\tcase 'Categories':\n\t\t\t\t//Display the categories\n\t\t\t\trequire_once('include/CartCategory.php');\n\t\t\t\t$this->smarty->assign('selCategory', @$_REQUEST[\"selCategory\"]);\n\t\t\t\treturn CartCategory::getCartCategorys();\n\t\t\t\tbreak;\n\t\t\tcase 'ProductTypes':\n\t\t\t\trequire_once('include/CartProductType.php');\n\t\t\t\t$this->smarty->assign('selProductType', @$_REQUEST[\"selProductType\"]);\n\t\t\t\treturn CartProductType::getAllCartProductTypes();\n\t\t\t\tbreak;\n\t\t}\n\t}" ]
[ "0.7425984", "0.71359086", "0.71359086", "0.71298784", "0.698228", "0.6868677", "0.68686396", "0.6789475", "0.66810584", "0.6670295", "0.6657609", "0.6643897", "0.6643897", "0.6633743", "0.6606189", "0.6589287", "0.65813446", "0.6542351", "0.6542351", "0.6542351", "0.653726", "0.6534969", "0.6530386", "0.6530386", "0.6530386", "0.6530386", "0.6530386", "0.6521817", "0.6520598", "0.6508432", "0.6477156", "0.6455956", "0.6448648", "0.64425504", "0.6404046", "0.63736904", "0.6360645", "0.63559633", "0.63529897", "0.633307", "0.633307", "0.6325981", "0.63228816", "0.630117", "0.6292923", "0.6273047", "0.6241182", "0.62396187", "0.623814", "0.6237933", "0.62366974", "0.6229406", "0.62124515", "0.6210191", "0.62071955", "0.61987764", "0.61986965", "0.6193347", "0.6188396", "0.6187341", "0.6185014", "0.617865", "0.61758703", "0.6168053", "0.61672306", "0.6151286", "0.61475885", "0.61427635", "0.61406446", "0.6134882", "0.61326164", "0.61304885", "0.6124549", "0.6103542", "0.61014426", "0.6100583", "0.6096", "0.60927576", "0.60924447", "0.6089688", "0.60789335", "0.6073514", "0.6062844", "0.6057182", "0.6054311", "0.60498095", "0.60440326", "0.6041746", "0.6036427", "0.60361993", "0.6033304", "0.6030613", "0.6026777", "0.60267276", "0.60266924", "0.60249615", "0.60236514", "0.6020754", "0.6017694", "0.6009069" ]
0.75321215
0
get places by search
поиск мест
public function search(Request $request){ $city_locations = Location::where('city_id', $request->id)->lists('id')->toArray(); $places = Place::whereIn('location_id', $city_locations)->where('name', 'like', '%'.$request->value.'%')->select(['id', 'name', 'address'])->get()->toArray(); return $places; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search()\n {\n\n $q = trim(urldecode(Request::get(\"q\")));\n\n $places = Place::search($q)->where('status', 1)->get()->toArray();\n\n return json_encode($places);\n }", "public function searchPlace()\n\t{ \n\t\t$app = \\Slim\\Slim::getInstance();\n\t\t$body = $app->request()->getBody();\n\t\t$input = json_decode($body); \t\t\n\t\tif ( isset($input->query) && isset($input->startAt) && isset($input->maxResults) && isset($input->approved) && !empty($input->approved))\n\t\t{\n\t\t\tif ( $input->startAt >= 0 && $input->startAt < 10000 && $input->maxResults > 0 && $input->maxResults < 10000)\n\t\t\t{\n\t\t\t\t$orderBy = \"placeMark\";\n\t\t\t\tif ( isset($input->orderBy) && ( $input->orderBy == 'placeMark' || $input->orderBy == 'distance') )\n\t\t\t\t$orderBy = $input->orderBy;\t\n\t\t\t\tif ( $input->approved === \"false\")\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$headers = apache_request_headers();\n\t\t\t\t\tif ( isset($headers['Authorization']))\n\t\t\t\t\t$authid = BasicHttpAuthentication::authenticate($headers['Authorization']);\n\t\t\t\t\telse\n\t\t\t\t\t$authid = -1;\t\n\t\t\t\t\t\n\t\t\t\t\tif ( ! DalMySql::getInstance()->isAdmin($authid) )\n\t\t\t\t\t{ \n\t\t\t\t\t\t$app->response()->header('Content-Type', 'application/json ; charset=utf-8');\t\n\t\t\t\t\t\t$app->response()->status(401);\t\t\n\t\t\t\t\t\techo ('{\"error\":\"Only an admin can list not approved places\"}');\n\t\t\t\t\t\treturn;\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t$result = DalMySql::getInstance()->searchPlace($input->query,$input->startAt,$input->maxResults,$input->approved);\n\t\t\t\t$rs = $result->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\n\t\t\t\t// Geocoder to locate ip and calculate distance with address\t\t\n\t\t\t\t$ip = $app->request()->getIp();\t\t\t\t\n\t\t\t\t$geocoder = new \\Geocoder\\Geocoder();\n\t\t\t\t$adapter = new \\Geocoder\\HttpAdapter\\SocketHttpAdapter();\n\t\t\t\t$chain = new \\Geocoder\\Provider\\ChainProvider(array(\n\t\t\t\tnew \\Geocoder\\Provider\\GoogleMapsProvider($adapter, 'fr_FR', 'France', true),\n\t\t\t\tnew \\Geocoder\\Provider\\FreeGeoIpProvider($adapter)\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t));\n\t\t\t\t$geocoder->registerProvider($chain);\n\t\t\t\t$ret = array();\t\n\t\t\t\t$i=0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Locate and calculate marks\n\t\t\t\tforeach($rs as $row)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$georp = $geocoder->geocode($row['address']);\t\t\t\t\t\n\t\t\t\t\t$georc = $geocoder->geocode($ip);\t\t\t\t\t\t\t\t\n\t\t\t\t\t$distance = $this->getDistance($georp->getLatitude(),$georp->getLongitude(),$georc->getLatitude(),$georc->getLongitude());\n\t\t\t\t\t$ar = array( 'idPlace' => $row['idPlace'],\n\t\t\t\t\t'name' => $row['name'],\n\t\t\t\t\t'summary' => $row['summary'] ,\n\t\t\t\t\t'address' => $row['address'],\n\t\t\t\t\t'placeMark' => $row['placeMark'],\n\t\t\t\t\t'distance' => $distance,\n\t\t\t\t\t'approved' => $row['approved'],\n\t\t\t\t\t'idMember' => $row['idMember']);\n\t\t\t\t\t$i++;\n\t\t\t\t\t$ret[$i] = $ar;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ( $orderBy == 'distance' )\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$sorted = array();\n\t\t\t\t\tforeach ($ret as $key => $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sorted[$key] = $row['distance'];\n\t\t\t\t\t}\n\t\t\t\t\tarray_multisort($sorted, SORT_ASC, $ret);\n\t\t\t\t}\t\n\t\t\t\tif ( $orderBy == 'placeMark' )\n\t\t\t\t{\n\t\t\t\t\t$sorted = array();\n\t\t\t\t\tforeach ($ret as $key => $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sorted[$key] = $row['placeMark'];\n\t\t\t\t\t}\n\t\t\t\t\tarray_multisort($sorted, SORT_DESC, $ret);\n\t\t\t\t}\n\t\t\t\t$app->response()->header('Content-Type', 'application/json ; charset=utf-8');\t\n\t\t\t\t$app->response()->status(200);\t\t\t\n\t\t\t\techo json_encode($ret,JSON_UNESCAPED_UNICODE);\t\t\t\t\t\n\t\t\t\treturn;\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\t\n\t\t$app->response()->header('Content-Type', 'application/json ; charset=utf-8');\t\n\t\t$app->response()->status(409);\t\t\n\t\techo ('{\"error\":\"Bad json input\"}');\t\n\t}", "function search() {\r\n \tif (!empty($this->data['Place']['query'])){\r\n\t $query = Sanitize::clean($this->data['Place']['query']);\r\n\t\t\t$criteria = $this->data['Place']['criteria']; \t\r\n if(strlen($query) > 0){ \r\n $this->Place->unbindModel(array('hasMany' => array('Pcomment','Rating')));\r\n\t\t\t $result = $this->Place->find('all',array('conditions'=>\"Place.\".$criteria.\" LIKE '%\".$query.\"%'\"));\r\n\t\t\t $this->set('search',$result);\r\n }\r\n \r\n\t\t}\r\n\t}", "public function search(PlaceSearchRequest $request)\n {\n $useRadius = false;\n\n if(!empty($request['lat']) && !empty($request['lng']) )\n {\n //browser gps coordinates were supplied, so add them to the session.\n session([\n 'lat'=>$request['lat'],\n 'lng'=>$request['lng']\n ]);\n\n\n if(!empty($request['distance']))\n {//\n //translates a radius from the frontend to an actual max mileage\n //as a side effect, it protects against SQL injection when running the raw query\n $useRadius = true;\n switch($request['distance'])\n {\n case 0:\n $useRadius = false;\n break;\n case 1:\n $radius=1;\n break;\n case 2:\n $radius=3;\n break;\n case 3:\n $radius=5;\n break;\n case 4:\n $radius=10;\n break;\n case 5:\n $radius=20;\n break;\n default:\n $useRadius = false;\n }//switch\n }//if\n }//lat lng\n $places = Place::select('id','name','address','city','state_code','summary','latitude','longitude');\n\n $lat = !empty(session('lat')) ? session('lat'):37.6889;\n $lng = !empty(session('lng')) ? session('lng'):-97.336111;\n\n $userPoint = \"point({$lng},{$lat})\";\n $places->selectRaw(\"ST_Distance_Sphere(point(longitude,latitude), {$userPoint}) AS distance\");\n if(!empty($request['name']))\n {\n $places->where('name','like',\"%{$request['name']}%\");\n\n }//search by name\n\n if(!empty($request['vegan']))\n {\n $places->where('has_vegan_options',true);\n\n }//search vegan places\n\n if(!empty($request['glutenFree']))\n {\n $places->where('has_gluten_free_options',true);\n\n }//search gluten-free places\n\n\n if(!empty($request['alcohol']))\n {\n $places->where('serves_alcohol',true);\n\n }//search places serving alcohol\n\n\n if(!empty($request['wifi']))\n {\n $places->where('has_public_wifi',true);\n\n }//search places with wifi\n\n\n if(!empty($request['bikeRack']))\n {\n $places->where('has_bike_rack',true);\n\n }//search places with a bike rack\n\n\n if(!empty($request['meals']))\n {\n $places->where('serves_full_meals',true);\n\n }//search places with full meals\n //\n if(!empty($request['carryout']))\n {\n $places->where('has_carryout',true);\n\n }//search places with carryout\n\n\n if(!empty($request['delivery']))\n {\n $places->where('has_delivery',true);\n\n }//search places with delivery\n\n\n if(!empty($request['brunch']))\n {\n $places->where('serves_brunch',true);\n\n }//search places with brunch\n\n if(!empty($request['charger']))\n {\n $places->where('has_ev_charger',true);\n\n }//search places with ev charger\n\n if(!empty($request['parking']))\n {\n $places->where('has_free_parking',true);\n\n }//search places with free parking\n if(!empty($request['tags']))\n {\n\n $tagged = PlaceTag::select('place_id')\n ->whereIn('tag_id',$request['tags'])\n ->get()\n ->pluck('place_id')\n ->toArray();\n\n $places->whereIn('id',$tagged);\n\n }//search places with free parking\n\n if(!empty($request['favorited']))\n {\n $favorites = UserFavorite::where('user_id',Auth::id())\n ->get()\n ->pluck('place_id')\n ->toArray();\n $places->whereIn('id',$favorites);\n\n }//search places the user added to favorites\n\n if(!empty($request['saved']))\n {\n $saved = UserSavedForLater::where('user_id',Auth::id())\n ->get()\n ->pluck('place_id')\n ->toArray();\n $places->whereIn('id',$saved);\n\n }//search places the user added to saved for later list\n\n if($useRadius)\n {\n $haversine = \"(6371 * acos(cos(radians(\" . $request['lat'] . \"))\n * cos(radians(`latitude`))\n * cos(radians(`longitude`)\n - radians(\" . $request['lng'] . \"))\n + sin(radians(\" . $request['lat'] . \"))\n * sin(radians(`latitude`))))\";\n\n $places = $places->selectRaw(\"{$haversine} AS distance\")\n ->whereRaw(\"{$haversine} < ?\", [$radius]);\n }//search by radius\n\n $sort = !empty($request['sort']) ? $request['sort']:3;\n\n switch($sort)\n {\n case 1:\n $places->orderBy('name','asc');\n break;\n case 2:\n $places->orderBy('name','desc');\n break;\n case 3:\n $places->orderBy('distance','asc');\n break;\n case 4:\n $places->orderBy('distance','desc');\n break;\n default:\n $places->orderBy('distance','asc');\n }\n\n return $places->paginate(20);\n }", "public function search();", "public function search();", "public function searchAction()\n {\n// $view->setTerminal(true);\n $headers = $this->getResponse()->getHeaders();\n $headers->addHeaderLine(\n \"Access-Control-Allow-Origin: *\");\n $endPoint = \"https://maps.googleapis.com/maps/api/place/\";\n $mapKey = \"AIzaSyCQWpAtVowR7C1BRlml8_LeRMWSpKUZ1HQ\";\n $searchLocation = $this->getRequest()->getQuery('location');\n \n $searchUrl =\"{$endPoint}findplacefromtext/json?input={$searchLocation}&inputtype=textquery&fields=photos,formatted_address,name,rating,opening_hours,geometry&key={$mapKey}\";\n\n // echo $searchUrl;\n\n $responseLocation = json_decode(file_get_contents($searchUrl),true);\n $resultLatLng = $responseLocation[\"candidates\"][0][\"geometry\"][\"location\"];\n if(!$resultLatLng)\n return new JsonModel(['status'=>-1,\"message\"=>\"Location not found\"]);\n \n\n $searchResultUrl = \"{$endPoint}nearbysearch/json?location={$resultLatLng['lat']},{$resultLatLng['lng']}&radius=1500&type=restaurant&key={$mapKey}\";\n // echo $searchResultUrl;\n $responseList = json_decode(file_get_contents($searchResultUrl),true);\n // echo file_get_contents($placeUrl);\n return new JsonModel($responseList['results']);\n \n //https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=13.8206972,100.5239867&radius=1500&type=restaurant&key=AIzaSyCQWpAtVowR7C1BRlml8_LeRMWSpKUZ1HQ\n return;\n }", "public function search($search_key){\n $search_keys = $this->search_keys;\n $query = $this->where('street1', 'LIKE', '%'.$search_key.'%');\n foreach ($this->search_keys as $key) {\n $query = $query->orWhere($key, 'LIKE', '%'.$search_key.'%');\n }\n $results = $query->get();\n return $results;\n }", "public function search(){\n $cities = City::when(request('search'), function($query) {\n $query->join('states', 'states.id', '=', 'cities.state_id')->join('countries', 'countries.id', '=', 'states.country_id')\n ->where('states.name', 'LIKE', '%' . request('search') . '%')\n ->orWhere('countries.name','LIKE','%' . request('search') . '%')->select('cities.*', 'countries.name AS country_name','states.name AS state_name');\n\n })->orderBy('states.id', 'desc')->paginate(15);\n\n return response()->json([ 'cities' => $cities ],200);\n }", "public function search() {}", "public function search(Request $request)\n {\n $per_page = 0;\n\n $request->get('per_page') ? $per_page = $request->get('per_page') : $per_page = 8;\n\n $places = $this->repository\n ->scopeQuery(function ($query) use ($request) {\n return $query->where(function ($query) use ($request) {\n foreach ($request->all() as $key => $value) {\n if ($key === 'city') {\n $query->where($key, $value);\n }\n\n if ($key === 'max_guests') {\n $query->where($key, '>=', $value);\n }\n\n if ($key != 'city' && $key != 'max_guests') {\n $query->where($key, $value === 'true' ? true : false);\n }\n }\n });\n })->with(['photos'])->orderBy('featured_position', 'DESC');\n\n $per_page == 'all' ? $places = $places->all() : $places = $places->paginate($per_page);\n\n if (request()->wantsJson()) {\n\n return response()->json($places);\n }\n }", "public static function search( $params = array() ) {\n\n\t\t$skip = $params['skip'] ?? 0;\n\t\t$take = $params['take'] ?? 100;\n\t\t$userId = $params['user_id'] ?? null;\n\t\t$addressLatitude = $params['latitude'] ?? null;\n\t\t$addressLongitude = $params['latitude'] ?? null;\n\t\t$distance = $params['distance'] ?? null;\n\t\t$addressCity = $params['city'] ?? null;\n\t\t$name = $params['name'] ?? null;\n\n\t\tLog::info(json_encode($params));\n\n\t\t$query = VenueModel::where('venues.id', '>', 0);\n\n\t\tif ( !is_null($addressCity) || (!is_null($addressLongitude) && !is_null($addressLatitude)) ) {\n\t\t\t$query->join('addresses', 'addresses.id', '=', 'venues.address_id');\n\n\t\t\tif (!is_null($addressCity))\n\t\t\t\t$query->where('addresses.city', $addressCity);\n\t\t\t\t//$query->where('addresses.city', 'like', '%' . $addressCity . '%');\n\n\t\t\tif (!is_null($addressLongitude) && !is_null($addressLatitude)) {\n\n\t\t\t\t$extensionInKm = $distance * 0.033336;\n\n\t\t\t\tLog::info(\"Extension \" . $extensionInKm );\n\n\t\t\t\t$query->whereBetween('latitude',array( $addressLatitude - $extensionInKm, $addressLatitude + $extensionInKm ));\n\t\t\t\t$query->whereBetween('longitude',array( $addressLongitude - $extensionInKm, $addressLongitude + $extensionInKm ));\n\n\t\t\t\t//\tSELECT * FROM venues WHERE\n\t\t\t\t//\tlatitude BETWEEN ({$latitude} - ({$miles}*0.033336)) AND ({$latitude} + ({$miles}*0.033336)) AND\n\t\t\t\t//\tlongitude BETWEEN ({$longitude} - ({$miles}*0.033336)) AND ({$longitude} + ({$miles}*0.033336));\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (!is_null( $userId )) {\n\n\t\t\t$query->whereIn('venues.id',\n\t\t\t\tUserVenue::search(['user_id' => $userId])->items->map(function($item){\n\t\t\t\treturn $item->venue_id;\n\t\t\t}));\n\n\t\t}\n\n\t\tif (!is_null($name)) {\n\n\t\t\t$query->where('venues.name', $name );\n\n\t\t}\n\n\t\t$query->where('active', 1);\n\n\t\t$result = $query->skip( $skip )->take( $take )->get()\n\t\t ->filter( function ($item) {\n\t\t\t return $item;\n\t\t })\n\t\t ->map( function ( $item ) {\n\t\t\t return self::getFromModel( $item );\n\t\t });\n\n\t\tLog::info( $query->toSql() );\n\n\t\t$totalResults = $query->count();\n\n\t\treturn new QueryResult( $result, $totalResults, $result->count() + $skip < $totalResults );\n\n\t}", "public function searchByCity(Request $request)\n {\n $per_page = 0;\n\n $request->get('per_page') ? $per_page = $request->get('per_page') : $per_page = 8;\n\n if ($request['city'] == 'todas-cidades') {\n $request['city'] = '';\n }\n\n $places = $this->repository\n ->scopeQuery(function ($query) use ($request) {\n return $query->where('confirmed', true)->where(function ($query) use ($request) {\n foreach ($request->all() as $key => $value) {\n\n if ($key === 'page') {\n continue;\n }\n\n if ($key === 'max_guests') {\n $query->where($key, '>=', $value);\n }\n\n if ($key === 'name' || $key === 'city') {\n $query->where($key, 'LIKE', '%' . $value . '%');\n }\n\n if ($key != 'max_guests' && $key != 'name' && $value && $key != 'city' && $key != 'per_page') {\n $query->where($key, $value);\n }\n }\n });\n })->with(['photos'])->orderBy('featured_position', 'DESC');\n\n\n $cerimonyCount = Place::where('confirmed', true)\n ->where('cerimony', true)\n ->where(function ($query) use ($request) {\n foreach ($request->all() as $key => $value) {\n\n if ($key === 'page') {\n continue;\n }\n\n if ($key === 'max_guests') {\n $query->where($key, '>=', $value);\n }\n\n if ($key === 'name' || $key === 'city') {\n $query->where($key, 'LIKE', '%' . $value . '%');\n }\n\n if ($key != 'max_guests' && $key != 'name' && $value && $key != 'city' && $key != 'per_page' && $key != 'party_space' && $key != 'cerimony') {\n $query->where($key, $value);\n }\n }\n })->count();\n\n $partyCount = Place::where('confirmed', true)\n ->where('party_space', true)\n ->where(function ($query) use ($request) {\n foreach ($request->all() as $key => $value) {\n\n if ($key === 'page') {\n continue;\n }\n\n if ($key === 'max_guests') {\n $query->where($key, '>=', $value);\n }\n\n if ($key === 'name' || $key === 'city') {\n $query->where($key, 'LIKE', '%' . $value . '%');\n }\n\n if ($key != 'max_guests' && $key != 'name' && $value && $key != 'city' && $key != 'per_page' && $key != 'party_space' && $key != 'cerimony') {\n $query->where($key, $value);\n }\n }\n })->count();\n\n $per_page == 'all' ? $places = $places->all() : $places = $places->paginate($per_page);\n\n if (request()->wantsJson()) {\n\n $data = new Class\n {\n };\n\n $data->cerimonyCount = $cerimonyCount;\n $data->partyCount = $partyCount;\n $data->places = $places;\n\n return response()->json($data);\n }\n }", "function get_fb_place_search($get_key, $get_lat, $get_lng) {\n $keyword = $get_key;\n $type = 'place';\n \n $lat = $get_lat;\n $lng = $get_lng;\n\n $fb_graph_url = \"https://graph.facebook.com/v2.8/search?\";\n $fb_search = \"q=\" . $keyword . \"&\" . \"type=\" . $type; \n $fb_search_fields = \"&fields=id,name,picture.width(700).height(700)\";\n $fb_loc = \"&center=\" . $lat . \",\" . $lng;\n \n $fb_token = \"&access_token=EAAJs7tbNknIBAHtt4JmxWsaGiT7P8okJQHJPBEsM09igXxO9K948jKyYqxvLeNz5zUONYRG7I8TZBMqaRBizMjBL5mmthoFET6rVGL9ZCKerPdi3ZBIfUFGTk69YHc2cAemJZB1yZAd3o68Pd9Bi2JWmTfuxTslEZD\";\n\n $search_url = $fb_graph_url . $fb_search . $fb_search_fields . $fb_loc . $fb_token;\n return $search_url;\n}", "public function place_get_all() {\n $ch = $this->api_connect($this->url . 'place/get_all/');\n $ch = $this->api_options($ch, \"POST\", NULL);\n $result = curl_exec($ch);\n\n $result = json_decode($result, true);\n return $result['response'];\n }", "public static function search($query) {\n\t\tif($query) \n\t\t{\n\t\t\t# Eager load units\n\t\t\t$buildings = Building::with('units')\n\t\t\t\t->where('address', 'LIKE', \"%$query%\")\n\t\t\t\t->get();\n\t\t}\n\n\t\treturn $buildings;\t\n\t}", "public function search($search);", "public function getNearby();", "public function search(Request $request)\n {\n $validated = $request->validate([\n 'input' => 'required',\n ]);\n $params = [\n 'input' => $validated['input'],\n 'inputtype' => \"textquery\",\n 'fields' => \"photos,formatted_address,name,rating,opening_hours,geometry\",\n 'key' => $this->tokenKey,\n ];\n $url = \"https://maps.googleapis.com/maps/api/place/findplacefromtext/json?\";\n $client = new Client();\n $res = $client->get($url. http_build_query($params));\n\n Log::info($url. http_build_query($params));\n\n if ($res->getStatusCode() == \"200\") {\n return response()->json([\n 'error' => false,\n 'responseCode' => $res->getStatusCode(),\n 'data' => json_decode($res->getBody()),\n ]);\n }\n\n return response()->json([\n 'error' => true,\n 'responseCode' => $res->getStatusCode(),\n ]);\n\n //https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=โรงพยาบาลพยาไทย&inputtype=textquery&fields=photos,formatted_address,name,rating,opening_hours,geometry&key=AIzaSyDcYfddvWPrVm2xhcJXJzIiNfIZ7bjo2IM\n }", "public function getSearchCriteria();", "public function searchContractors(Request $search);", "function search(){\n\t\tif($this->dist_pv_id==\"\"){ $pv ='%';}//search by province_id\n\t\telse{ $pv = $this->dist_pv_id ;}\n\t\tif($this->dist_amph_id==\"\"){ $amph ='%';}//search by amphur_id\n\t\telse{ $amph = $this->dist_amph_id ;}\n\t\t$sql = \"SELECT *\n\t\t\t\tFROM \".$this->hr_db.\".hr_district \n\t\t\t\tWHERE dist_name LIKE '%\".$this->dist_name.\"%'\n\t\t\t\tAND dist_pv_id LIKE '\".$pv.\"'\n\t\t\t\tAND dist_amph_id LIKE '\".$amph.\"' \n\t\t\t\tAND dist_active='Y'\";\n\t\t$query = $this->hr->query($sql);\n\t\t//echo $this->hr->last_query();\n\t\treturn $query;\n\t}", "public function searchResults($name = '', $location = ''){ //echo $name . '<br>' . $location; die();\n\n $name = '%' . $name .'%'; $location = '%' . $location . '%';\n $data = array($name, $name, $location, $location); \n $result = data::getInstance();\n $result->query(\"SELECT \n company.name as company,\n company.slug as slug,\n company.street as street, \n company.housenumber as housenumber,\n category.name_en as category,\n city.name as city, \n county.name as county \n FROM company \n INNER JOIN category_company \n ON company.clientid = category_company.companyid \n JOIN category \n ON category.id = category_company.categorycode \n JOIN city ON company.city = city.id \n JOIN county ON company.county = county.id \n WHERE \n (company.name LIKE ? || category.name_en LIKE ?) && \n (county.name LIKE ? || city.name LIKE ?)\", $data);\n $this->fields = $result->results();\n return $this->fields; \n }", "function get_all_cities($params = array())\n {\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n if(!empty($params['search_val'])){\n\t\t\t\t$this->db->like('name',$params['search_val']);\n\t\t\t}\n }\n return $this->db->get('cities')->result_array();\n }", "public function search() {\n\t\t\t$Recherches = $this->Components->load( 'WebrsaRecherchesOrientsstructs' );\n\t\t\t$Recherches->search();\n\t\t}", "function get_sightseen_city_list($search_chars)\r\n {\r\n $raw_search_chars = $this->db->escape($search_chars);\r\n if(empty($search_chars)==false){\r\n $r_search_chars = $this->db->escape($search_chars.'%');\r\n $search_chars = $this->db->escape($search_chars.'%');\r\n }else{\r\n $r_search_chars = $this->db->escape($search_chars);\r\n $search_chars = $this->db->escape($search_chars);\r\n }\r\n \r\n $query = 'Select cm.origin,cm.destination_name as city_name from api_sightseeing_destination_list as cm where cm.destination_name like '.$search_chars.' \r\n ORDER BY cm.destination_name asc, CASE\r\n WHEN cm.destination_name LIKE '.$raw_search_chars.' THEN 1\r\n WHEN cm.destination_name LIKE '.$r_search_chars.' THEN 2 \r\n WHEN cm.destination_name LIKE '.$search_chars.' THEN 3\r\n ELSE 4 END LIMIT 0, 30\r\n ';\r\n \r\n \r\n return $this->db->query($query)->result_array();\r\n }", "public static function search(){\n \n }", "private function search()\n {\n //Load and store parameters\n $criteria = $this->Request->get('criteria');\n $criteria = $criteria ? json_decode($criteria, true) : array();\n $timestamp = $this->Request->get('timestamp');\n $this->responseSetParam('criteria', $criteria);\n $this->responseSetParam('timestamp', $timestamp);\n\n //Search for matching recipes\n $RecipesLib = new RecipesLib($this->DB, $this->User);\n $this->responseSetContent($RecipesLib->search($criteria));\n $this->responseSetParam('overflow', $RecipesLib->searchOverflow());\n }", "public function search_for($query);", "public function findNearbyStreets() {\n return $this->execByPosition('findNearbyStreets',[\n 'maxRows'=>$this->conn['settings']['maxRows'],\n ]);\n }", "function searchWorkplace($search){\r\n\t\t$cacheName = 'WorplaceSearch'.md5($search);\r\n\t\r\n\t\tif(!$result = Cache::read($cacheName,'1 hour')){\r\n\t\t\t$result = $this->find('all',\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'recursive'=>0,\r\n\t\t\t\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t\t\t\t\t\"Workplace.name LIKE\" => \"%\".$search.\"%\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'limit'=>20,\r\n\t\t\t\t\t\t\t'order' => array('Workplace.name')\r\n\t\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tCache::write($cacheName, $result,'1 week');\r\n\t\t}\r\n\t\treturn $result;\r\n\t\r\n\t}", "public function search_orders($term);", "function getBusinesses() {\n\n\t$partialQuery = \"\";\n\n\tif(array_key_exists('what', $_GET) > 0) { $what = $_GET['what']; $partialQuery = $partialQuery . \" `BusinessName`\n\tLIKE '%\" . $what . \"%'\"; }\n\t\n\t\tif($partialQuery != \"\") { $partialQuery = $partialQuery . \" AND \"; }\n\t\n\tif(array_key_exists('where', $_GET) > 0) { $where = $_GET['where']; $partialQuery = $partialQuery . \"\n\t`BusinessLocationCity` LIKE '%\" . $where . \"%'\"; }\n\n // use the data from $where and $what for the select \n if($partialQuery != \"\") { $partialQuery = \"WHERE \" . $partialQuery; }\n\n\t$business = getDatabase()->all('SELECT * FROM ' . DB_BUSINESSTABLE . ' ' . $partialQuery . ' LIMIT 50');\n\n return $business; \n}", "public function search_sports($keyword){\r\n\t\t\tglobal $db;\r\n\r\n\t\t\t$keyword = $db->escape_string($keyword);\r\n\r\n\t\t\t$sql = \"SELECT id FROM events \";\r\n\t\t\t$sql .= \" WHERE name LIKE '%{$keyword}%' \";\r\n\t\t\t$sql .= \" OR venue LIKE '%{$keyword}%' \";\r\n\t\t\t$sql .= \" OR city LIKE '%{$keyword}%' \";\r\n\t\t\t$sql .= \" OR overview LIKE '%{$keyword}%' \";\r\n\t\t\t$sql .= \" AND visible = 1 \";\r\n\t\t\t$sql .= \" AND event_type_id = 2 \";\r\n\r\n\r\n\t\t\t$result_set = $db->query($sql);\r\n\r\n\t\t\tconfirm($result_set);\r\n\r\n\t\t\treturn $result_set;\r\n\t\t}", "public function search($keyword);", "public function search($keyword);", "function get_address($keyword){\n\t\t$dist = explode(\" \",$keyword);\n\t\t$str = isset($dist[1]) ? \" and (amph_name like '%\".$dist[1].\"%' OR pv_name like '%\".$dist[1].\"%') \" : \"\";\n\t\t$sql = \"SELECT *\n\t\t\t\tFROM hr_district\n\t\t\t\tLEFT JOIN hr_amphur \n\t\t\t\t\tON dist_amph_id = amph_id\n\t\t\t\tLEFT JOIN hr_province\n\t\t\t\t\tON dist_pv_id = pv_id\n\t\t\t\tWHERE dist_name LIKE ? $str\n\t\t\t\tLIMIT 6\";\n\t\t\treturn $this->hr->query($sql,'%'.$dist[0].'%');\n\t}", "public function placeAutocomplete($input) {\n // Use http_build_query to get rid of unwanted characters\n $array = array(\n 'sensor' => 'false',\n 'key' => API_KEY,\n 'input' => $input\n );\n $param = http_build_query($array);\n $url = \"https://maps.googleapis.com/maps/api/place/autocomplete/json?\" . $param;\n\n $json = file_get_contents($url);\n\n $data = json_decode($json,TRUE);\n\n if(array_key_exists('predictions', $data)) {\n $predictions = $data['predictions'];\n $placeList = array();\n foreach($predictions as $place) {\n if(array_key_exists('description', $place)) {\n array_push($placeList, $place['description']);\n }\n }\n return $placeList;\n }\n return false;\n }", "public function search($data){\n\t\t\t$search = '%' . $data['search'] . '%';\n\t\t\t$list = $this:: whereLike('order_title|order_price|order_buyer|order_settime|order_complete_time',$search) -> paginate(15);\n\t\t\treturn $list;\n\t\t}", "public function get_search_list(){\n $this->SQL = \"SELECT * FROM kindergardens WHERE id = '$this->insert_search';\" ;\n \n $this->selecet_query();\n return $this->results;\n \n }", "public function search(){\n if ($search = \\Request::get('q')) {\n $consultations = Consultation::whereHas('customer', function ($query) use ($search) {\n $query->where('name', 'LIKE', \"%$search%\");\n })->with('customer')->orderBy('created_at', 'desc')->paginate(2);\n }else{\n $consultations = Consultation::with('customer')->orderBy('created_at', 'desc')->paginate(2);\n }\n return $consultations;\n }", "public function search($search, $per_page);", "function location_search()\n\t{\n\t\tsession_write_close();\n\t\t$suggestions = $this->Location->get_locations_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "function search($term){\n\t\t\t$key = \"AIzaSyD9GBj2m-_lwsXwZZdwS5X3tj6blyEtMM8\"; //disable this after project presentation!!!\n\t\t\t$engineId = \"014956187943969651346:2orik1kviv4\";\n\t\t\t$result = file_get_contents('https://www.googleapis.com/customsearch/v1?key=' . $key . '&cx=' .$engineId . '&q=' . $term);\n\t\t\treturn $result;\n\t\t}", "public function search() {\n\n // if user get from index page \n if (request()->has('city_id')) {\n\n $hotels = City::find(request('city_id'))->hotels;\n\n return view('home.search.result', compact('hotels'));\n }\n\n $this->validate(request(),[\n 'city' => 'required',\n 'from' => 'required',\n 'to' => 'required',\n ]);\n \n $query = Hotel::query();\n $query->whereHas('city', function($q){\n $q->where('cities.name','like','%'.request('city').'%');\n });\n $query->where([\n ['from','<=',request('from')],\n ['to','>=',request('to')],\n ['rooms','>=',request('rooms')],\n ['adult','>=',request('adult')],\n ['children','>=',request('children')], \n ]);\n $hotels = $query->get();\n return view('home.search.result', compact('hotels'));\n }", "public function findHotelsByName()\n {\n $q = request()->input('q', null);\n\n return Hotel::where('name', 'like', \"%$q%\")->paginate(null, ['id', 'name as text']);\n }", "function ajax_do_sycle_get_search_results() {\n\t\t\t// TODO validate token\n\t\t\t$request = array();\n\n\t\t\t// Setting defaults\n\t\t\t$proximity = array(); // todo look for and parse any locale data\n\t\t\t$proximity['zip'] = '34239'; // todo debug required\n\t\t\t$proximity['miles'] = '100'; // todo debug \t1-1000 required\n\n\t\t\tif (is_array($_POST['addressfield'])) {\n\t\t\t\tforeach ($_POST['addressfield'] as $adrfield) {\n\t\t\t\t\tif ($adrfield['types'][0]=='street_number') {\n\t\t\t\t\t\t$proximity['street1'] = $adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($adrfield['types'][0]=='route') {\n\t\t\t\t\t\t$proximity['street1'] .= ' '.$adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($adrfield['types'][0]=='postal_code') {\n\t\t\t\t\t\t$proximity['zip'] = $adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($adrfield['types'][0]=='administrative_area_level_2') {\n\t\t\t\t\t\t$proximity['city'] = $adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t\tif ($adrfield['types'][0]=='administrative_area_level_1') {\n\t\t\t\t\t\t$proximity['state'] = $adrfield['short_name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$request['token'] = $this->get_token();\n\t\t\t$request['proximity'] = $proximity;\n\n\t\t\t$result = $this->return_search_clinics_results($request);\n\n\t\t\t$clinics_list = json_decode($result);\n\n\t\t\t$output = array();\n\t\t\tif (is_array($clinics_list->clinic_details)) {\n\t\t\t\tforeach ($clinics_list->clinic_details as $clinic) {\n\t\t\t\t\t$output['clinic_details'][] = $this->return_clinic_markup($clinic,$request['token'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\techo json_encode($output);\n\t\t\tdie();\n\t\t}", "public function search(): array;", "public function search($query);", "function SearchWorkshopPlace($where,$Result_Set,$Per_Page)\r\n{\r\n\t$index = 0;\r\n\t$res=\"\";\r\n\t$unique_res=\"\";\r\n\t\r\n\t\r\n\t$query = \"SELECT id FROM locations WHERE \";\r\n\tif ($where != \"\") $query .= \"location = '$where' \"; \r\n\telse $query .= \"location LIKE '%' \"; \r\n\t$query .= \"\tORDER BY rank DESC \";\r\n\t\r\n\tif (!$Result_Set) \r\n\t { \r\n\t $Result_Set=0; \r\n\t $query.=\" LIMIT $Result_Set, $Per_Page\"; \r\n\t }\r\n\telse\r\n\t\t { $query.=\" LIMIT $Result_Set, $Per_Page\"; } \r\n\t\r\n\t$result = mysql_query($query) or die(mysql_error());\r\n\twhile ($row = mysql_fetch_row($result))\r\n\t{\r\n\t\t$temp = $row[0];\r\n\t\t$res[$index++] = $temp; // get the current field\r\n\t}\r\n\t\r\n\tif ($res != \"\")\t//we found requested workshops\r\n\t{\r\n\t\t$res = array_unique($res); \t//remove duplicate workshops (so we wont show the same workshop more then one time) \r\n\t\t$index = 0;\r\n\t\t$col = \"id\";\r\n\t\t\r\n\t\t//get the workshope by their id that we found.\r\n\t\tforeach ($res as $selectedworkshop)\r\n\t\t{\t\r\n\t\t\t$query = \"SELECT * FROM locations WHERE $col=$selectedworkshop \";\r\n\t\t\t$result = mysql_query($query) or die(mysql_error());\r\n\t\t\twhile ($row = mysql_fetch_row($result))\r\n\t\t\t{\r\n\t\t\t\t$unique_res[$index++] = $row; // get the current field\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $unique_res;\r\n}", "function search() {\n\n\t\t// breadcrumb urls\n\t\t$this->data['action_title'] = get_msg( 'prd_search' );\n\n\t\t// condition with search term\n\t\t$conds = array( 'searchterm' => $this->searchterm_handler( $this->input->post( 'searchterm' )) );\n\t\t$conds['status'] = 0;\n\n\t\t// pagination\n\t\t$this->data['rows_count'] = $this->Pending->count_all_by( $conds );\n\n\t\t// search data\n\t\t$this->data['pendings'] = $this->Pending->get_all_by( $conds, $this->pag['per_page'], $this->uri->segment( 4 ) );\n\n\t\t// load add list\n\t\tparent::search();\n\t}", "public function citysearch() {\n $hotels = City::where('name','like','%'.request('city').'%')->get();\n foreach($hotels as $hotel){\n return $hotel->name;\n }\n }", "public function search()\r\n {\r\n $criteria = new CDbCriteria;\r\n\r\n if ($this->id) {\r\n $criteria->compare('t.id', $this->id);\r\n }\r\n if ($this->title_ru) {\r\n $criteria->compare('title_ru', $this->title_ru, true);\r\n }\r\n if ($this->title_uk) {\r\n $criteria->compare('title_uk', $this->title_uk, true);\r\n }\r\n if ($this->created_at) {\r\n $criteria->compare('created_at', $this->created_at);\r\n }\r\n if ($this->updated_at) {\r\n $criteria->compare('updated_at', $this->updated_at);\r\n }\r\n if ($this->districtId == -1) {\r\n $criteria->addCondition('district_id IS NULL');\r\n }\r\n if ($this->districtId && $this->districtId != -1) {\r\n $criteria->compare('district_id', $this->districtId);\r\n }\r\n if ($this->is_deleted == 0 || $this->is_deleted == 1) {\r\n $criteria->compare('is_deleted', $this->is_deleted);\r\n }\r\n if ($this->address_uk == 'empty') {\r\n $criteria->addCondition('(address_uk = \"\" OR address_uk IS NULL)');\r\n }\r\n if ($this->address_uk == 'notempty') {\r\n $criteria->addCondition('(address_uk <> \"\" AND address_uk IS NOT NULL)');\r\n }\r\n if ($this->category_id) {\r\n $criteria->compare('placesCategories.category_id', $this->category_id);\r\n }\r\n if ($this->photo == 'notPhoto') {\r\n $criteria->addCondition('photos.place_id IS NULL');\r\n $criteria->together = true;\r\n }\r\n $criteria->together = true;\r\n $criteria->with = ['photos', 'placesCategories'];\r\n\r\n return new CActiveDataProvider($this,\r\n [\r\n 'criteria' => $criteria,\r\n 'sort' => [\r\n 'defaultOrder' => 'title_ru ASC',\r\n ],\r\n 'pagination' => [\r\n 'pageSize' => Yii::app()->params['admin']['pageSize'],\r\n ],\r\n ]);\r\n }", "function getSearchRes(){\r\n\t\t$tmpl = $this->cObj->getSubpart($this->template,'###searchResBox###');\r\n\t\t$this->getPi1($tmpl);\r\n\t\tif ($this->piVars['sword']) {\r\n\t\t\t$this->pi1->piVars['sword'] = $this->piVars['sword'];\r\n\t\t}\r\n\t\treturn $this->pi1->listBySubCategory($this->person['uid']);\r\n\t}", "private function search(){\n\t $this->feed_url = $this->feed_bin['twitter'];\n\t $this->query = 'search.json';\n\t $this->query .= '?q=from:'.$this->handle;\n\n\t $this->get();\n\t}", "public function searchByCityToMap(Request $request)\n {\n $places = Place::where('confirmed', true)->where('city', 'LIKE', '%' . $request->get('city') . '%')->select('id', 'address', 'name', 'city', 'slug')->get();\n\n if (request()->wantsJson()) {\n\n return response()->json($places);\n }\n }", "function flickr_places_get_by_woeid($woeid, $more=array()){\n\n\t\tif (! isset($more['force'])){\n\n\t\t\tif (isset($GLOBALS['flickr_places_cache'][$woeid])){\n\t\t\t\treturn $GLOBALS['flickr_places_cache'][$woeid];\n\t\t\t}\n\n\t\t\t# filter by date too?\n\n\t\t\t$enc_woeid = AddSlashes($woeid);\n\t\t\t$sql = \"SELECT * FROM Places WHERE woeid='{$enc_woeid}'\";\n\n\t\t\tif ($row = db_single(db_fetch($sql))){\n\n\t\t\t\t$place = json_decode($row['flickr_data'], \"as hash\");\n\t\t\t\t$GLOBALS['flickr_places_cache'][$woeid] = $place;\n\t\t\t\treturn $place;\n\t\t\t}\n\t\t}\n\n\t\t$rsp = _flickr_places_getinfo($woeid);\n\n\t\tif (! $rsp['ok']){\n\t\t\treturn null;\n\t\t}\n\n\t\t$place = $rsp['rsp']['place'];\n\n\t\t$insert = array(\n\t\t\t'woeid' => AddSlashes($woeid),\n\t\t\t'flickr_data' => AddSlashes(json_encode($place)),\n\t\t\t'date_created' => time(),\n\t\t);\n\n\t\t$rsp = db_insert('Places', $insert);\n\n\t\t$GLOBALS['flickr_places_cache'][$woeid] = $place;\n\t\treturn $place;\n\t}", "public function actionSearch()\n {\n if(isset($_GET['userid']) && $_GET['userid'] != null\n && isset($_GET['encrypted_data']) && $_GET['encrypted_data'] != null\n && isset($_GET['latitude']) && $_GET['latitude'] != null\n && isset($_GET['longitude']) && $_GET['longitude'] != null\n /*&& isset($_GET['radius']) && $_GET['radius'] != null*/)\n {\n $check_user = Yii::$app->mycomponent->validate_user($_GET['userid'],$_GET['encrypted_data']);\n \n $lat = $_GET['latitude'];\n $lng = $_GET['longitude'];\n \n $result['Station'] = array();\n \n $query = Feelingstation::find()->select(\"*,( 6371 * acos( cos( radians($lat) ) * cos( radians( latitude) ) * cos( radians( longitude ) - radians($lng) ) + sin( radians($lat) ) * sin( radians( latitude ) ) ) ) AS distance\")\n ->where(['is_active'=>'Y','is_deleted'=>'N'])\n ->orderBy(['distance' => SORT_ASC]);\n \n if(isset($_GET['radius']) && $_GET['radius'] != null)\n {\n $radius = $_GET['radius'];\n $query->andHaving(\"distance < $radius\");\n }\n \n if(isset($_GET['facility_ids']) && $_GET['facility_ids'] != '')\n {\n $exist = array();\n $faci[] = 'and';\n $arr = explode(',',$_GET['facility_ids']);\n foreach($arr as $w)\n {\n if(!in_array($w,$exist))\n {\n $faci[] = 'FIND_IN_SET(\"'.$w.'\",`facilities`)';\n $exist[] = $w;\n }\n }\n $query->andwhere($faci);\n }\n if(isset($_GET['service_ids']) && $_GET['service_ids'] != '')\n {\n $exist = array();\n $serv[] = 'and';\n $arr = explode(',',$_GET['service_ids']);\n foreach($arr as $w)\n {\n if(!in_array($w,$exist))\n {\n $serv[] = 'FIND_IN_SET(\"'.$w.'\",`services`)';\n $exist[] = $w;\n }\n }\n $query->andwhere($serv);\n }\n if(isset($_GET['product_ids']) && $_GET['product_ids'] != '')\n {\n $exist = array();\n $prod[] = 'and';\n $arr = explode(',',$_GET['product_ids']);\n foreach($arr as $w)\n {\n if(!in_array($w,$exist))\n {\n $prod[] = 'FIND_IN_SET(\"'.$w.'\",`products`)';\n $exist[] = $w;\n }\n }\n $query->andwhere($prod);\n }\n \n if(isset($_GET['station_id']) && $_GET['station_id'] != '')\n {\n $query->andwhere(['id'=>$_GET['station_id']]);\n }\n if(isset($_GET['region']) && $_GET['region'] != '')\n {\n $query->andwhere(['like', 'region', $_GET['region']]);\n }\n if(isset($_GET['keyword']) && $_GET['keyword'] != '')\n {\n $query->andwhere(['or',['like', 'name', $_GET['keyword']],['like', 'info', $_GET['keyword']]]);\n }\n \n $data = $query->all();\n \n if($data != array())\n {\n $i = 0;\n foreach($data as $list)\n {\n $result['Station'][$i]['id'] = $list->id;\n $result['Station'][$i]['name'] = $list->name;\n $result['Station'][$i]['region'] = $list->region;\n $result['Station'][$i]['address'] = $list->address;\n $result['Station'][$i]['latitude'] = $list->latitude;\n $result['Station'][$i]['longitude'] = $list->longitude;\n $result['Station'][$i]['info'] = $list->info;\n $result['Station'][$i]['phone_number'] = $list->phone_number;\n \n $result['Station'][$i]['working_hours'] = $list->working_hours;\n $result['Station'][$i]['map_link'] = ($list->map_link) ? $list->map_link : '';\n \n $result['Station'][$i]['distance'] = round($list->distance,2);\n $esti = 0;\n $start = $lat.\",\".$lng;\n $end = $list->latitude.\",\".$list->longitude;\n \n $request = 'https://maps.googleapis.com/maps/api/directions/json?origin='.$start.'&destination='.$end.'&sensor=false&mode=driving&key='.Yii::$app->params['google_api_key'];\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $request);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FRESH_CONNECT,true);\n curl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\"); \n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); \n $json = curl_exec($ch);\n curl_close($ch);\n $esti_data = json_decode($json);\n //echo '<pre>';print_r($esti_data);die;\n \n //$esti_data = json_decode(file_get_contents('http://maps.googleapis.com/maps/api/directions/json?origin='.$start.'&destination='.$end.'&sensor=false&mode=driving'));\n if(isset($esti_data->routes[0]->legs[0]->duration->value))\n $esti = (int)$esti_data->routes[0]->legs[0]->duration->value;\n \n //if(isset($esti_data->routes[0]->legs[0]->distance->value))\n //$result['Station'][$i]['distance'] = round(((int) $esti_data->routes[0]->legs[0]->distance->value)/1000,2);\n \n $result['Station'][$i]['estimated_time'] = $esti;\n \n $result['Station'][$i]['services'] = $list->getService($list->services);\n $result['Station'][$i]['products'] = $list->getProduct($list->products);\n $result['Station'][$i]['facilities'] = $list->getFacility($list->facilities);\n \n $result['Station'][$i]['avg_rating'] = $list->avg_rating;\n $result['Station'][$i]['rating_count'] = $list->rating_count;\n \n $i++;\n }\n }\n \n return $result;\n }\n else\n {\n $result['message'] = Yii::t('app',Yii::$app->params['response_text'][400]);\n Yii::$app->getResponse()->setStatusCode(400);\n return $result;\n }\n }", "public function search()\n {\n $search = $_POST['search'];\n $data = $this->tarea->like('name', $search)->findAll();\n echo json_encode($data);\n }", "function get_hotel_city_list($search_chars) {\r\n\t\t$raw_search_chars = $this->db->escape ( $search_chars );\r\n\t\t$r_search_chars = $this->db->escape ( $search_chars . '%' );\r\n\t\t$search_chars = $this->db->escape ( '%' . $search_chars . '%' );\r\n\t\t$query = 'Select * from all_api_hotel_cities as CT where city_name like ' . $search_chars . '\r\n\t\tOR country_name like ' . $search_chars . ' OR country_code like ' . $search_chars . '\r\n\t\tORDER BY city_name ASC, CASE\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $raw_search_chars . '\tTHEN 1\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $raw_search_chars . '\tTHEN 2\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $raw_search_chars . '\tTHEN 3\r\n\t\t\t\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $r_search_chars . '\tTHEN 4\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $r_search_chars . '\tTHEN 5\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $r_search_chars . '\tTHEN 6\r\n\t\t\t\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $search_chars . '\tTHEN 7\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $search_chars . '\tTHEN 8\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $search_chars . '\tTHEN 9\r\n\t\t\tELSE 10 END, \r\n\t\t\ttop_destination ASC\r\n\t\tLIMIT 0, 20';\r\n\t\t// with grn and oyo // working\r\n\t\t/*$query = 'Select * from all_api_hotel_city_master where city_name like ' . $search_chars . '\r\n\t\tOR country_name like ' . $search_chars . ' OR country_code like ' . $search_chars . '\r\n\t\tORDER BY city_name DESC, CASE\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $raw_search_chars . '\tTHEN 1\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $raw_search_chars . '\tTHEN 2\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $raw_search_chars . '\tTHEN 3\r\n\t\t\t\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $r_search_chars . '\tTHEN 4\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $r_search_chars . '\tTHEN 5\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $r_search_chars . '\tTHEN 6\r\n\t\t\t\r\n\t\t\tWHEN\tcity_name\tLIKE\t' . $search_chars . '\tTHEN 7\r\n\t\t\tWHEN\tcountry_name\tLIKE\t' . $search_chars . '\tTHEN 8\r\n\t\t\tWHEN\tcountry_code\t\t\tLIKE\t' . $search_chars . '\tTHEN 9\r\n\t\t\tELSE 10 END, \r\n\t\t\tcache_hotels_count DESC\r\n\t\tLIMIT 0, 20';*/\r\n\t\t// with all grn, rezlive, oyo\r\n\t\t\t/*$query = \"Select rz_city.*, hoc.origin as origin, hoc.grn_city_id as grn_city_id, hoc.grn_destination_id as grn_destination_id, hoc.country_name as country_name, rz_city.name as city_name, rz_city.name as name, hoc.country_code as rz_country_code, rz_city.name as rz_name from rz_city_list as rz_city \r\n\t\tleft join all_api_hotel_city_master as hoc ON (rz_city.country_code = hoc.country_code AND hoc.city_name LIKE \".$search_chars.\") \r\n\t\twhere rz_city.name like \".$search_chars.\"\r\n\t\tORDER BY CASE\r\n\t\t\tWHEN\trz_city.name\tLIKE\t\".$raw_search_chars.\"\tTHEN 1\r\n\t\t\tWHEN\thoc.country_name\tLIKE\t\".$raw_search_chars.\"\tTHEN 2\r\n\t\t\tWHEN\trz_city.country_code\t\t\tLIKE\t\".$raw_search_chars.\"\tTHEN 3\r\n\t\t\t\r\n\t\t\tWHEN\trz_city.name\tLIKE\t\".$r_search_chars.\"\tTHEN 4\r\n\t\t\tWHEN\thoc.country_name\tLIKE\t\".$r_search_chars.\"\tTHEN 5\r\n\t\t\tWHEN\trz_city.country_code\t\t\tLIKE\t\".$r_search_chars.\"\tTHEN 6\r\n\t\t\t\r\n\t\t\tWHEN\trz_city.name\tLIKE\t\".$search_chars.\"\tTHEN 7\r\n\t\t\tWHEN\thoc.country_name\tLIKE\t\".$search_chars.\"\tTHEN 8\r\n\t\t\tWHEN\trz_city.country_code\t\t\tLIKE\t\".$search_chars.\"\tTHEN 9\r\n\t\t\tELSE 10 END\";*/\r\n\t\treturn $this->db->query ( $query )->result_array ();\r\n\t}", "public static function searchAds($place = null, $ad = null)\n {\n if ($place && !$ad) return self::getAdsByPlace($place);\n // check if only ad name is set then return ads by name\n elseif ($ad && ! $place) return self::getAdsByName($ad);\n // check if place and ad name is set then return ads by name and by place\n else {\n $adsByPlace = self::getAdsByPlace($place);\n var_dump($adsByPlace); die();\n }\n }", "private function getSearches()\r\n\t{\r\n\t\t$user = $this->deps['user'];\r\n\r\n\t\t$searches = new SearchesModel($this->deps);\r\n\r\n\t\tif ($searches->read($user->id)) {\r\n\t\t\techo json_encode(array(\"status\"=>\"success\", \"searches\"=>$searches));\r\n\t\t} else {\r\n\t\t\techo json_encode(array(\"status\"=>\"failure\", \"errors\"=>$searches->errors));\r\n\t\t}\r\n\t}", "function search_anywhere(){\n\t\t\t$query = \"SELECT * FROM books NATURAL JOIN authors\n\t\t\t\t\t\t\t\tWHERE (title LIKE '%\" . $_GET['searchfor'] . \"%'\n\t\t\t\t\t\t\t\t\tOR isbn = '\" . $_GET['searchfor'] . \"'\n\t\t\t\t\t\t\t\t\tOR publisherName LIKE '%\" . $_GET['searchfor'] . \"%'\n\t\t\t\t\t\t\t\t\tOR Fname LIKE '%\" . $_GET['searchfor'] . \"%'\n\t\t\t\t\t\t\t\t\tOR Lname LIKE '%\" . $_GET['searchfor'] . \"%')\";\n\n\t\t\tif($_GET['category'] != 'all')\n\t\t\t\t$query .= \" AND category LIKE '%\" . $_GET['category'] . \"%'\";\n\t\t\treturn $query;\n\t\t}", "private function queryBoxplaces() {\n\t\t$boxplaces=$this->db->getBoxplaces();\n\t\t$this->boxplaces=array();\n\t\tforeach($boxplaces as $val) {\n\t\t\t$this->boxplaces[$val['template_id']][$val['id']]=$val['boxplace'];\n\t\t}\n\t}", "public function actionIndex() {\n $criteria = new CDbCriteria();\n if (isset($_GET['lat']) && isset($_GET['lng'])) {\n $criteria->select = '*, ( 6371 * acos( cos( radians(' . $_GET['lat'] . ') ) \n * cos( radians( latitude ) ) * cos( radians( longitude ) - \n radians(' . $_GET['lng'] . ') ) + sin( radians(' . $_GET['lat'] . ') ) \n * sin( radians( latitude ) ) ) ) * 1.609344 AS distance';\n $criteria->order = 'distance asc'; \n } elseif (isset($_GET['q'])) {\n $query = $_GET['q'];\n $criteria->compare('name', $query, true, 'OR', true);\n $criteria->compare('vicinity', $query, true, 'OR', true);\n }\n\n $criteria->limit = 20;\n $dataProvider = new CActiveDataProvider('Place', array('criteria' => $criteria));\n $dataProvider->setPagination(false);\n $this->render('index', array(\n 'dataProvider' => $dataProvider,\n ));\n\n }", "public function findNearby() {\n return $this->execByPosition('findNearby',[\n 'maxRows'=>$this->conn['settings']['maxRows'],\n\n 'style'=>$this->conn['settings']['style'],\n\n 'localCountry'=>$this->conn['settings']['localCountry'],\n\n 'featureClass'=>$this->conn['settings']['featureClass'],\n\n 'featureCode'=>$this->conn['settings']['featureCode'],\n 'EXCLUDEfeatureCode'=>$this->conn['settings']['EXCLUDEfeatureCode'],\n\n ]);\n }", "public function search($search = ''){\n\n\n $list_services = Service::where('the_status', 'open')->where('title', 'like', '%' . $search . '%')->paginate(15);\n\n return view('services/services', ['services' => $list_services]);\n }", "public function getSuggestions() {\n\t\t$search_query = isset($_REQUEST['query']) ? $_REQUEST['query'] : 'coca';\n\n\t\t// Escape the search query for SQL\n\t\t$search_query = $this->Database->escapeString($search_query);\n\n\t\t$suggestion_query = \"CALL `justcrave`.`search_suggestions`('$search_query')\";\n\n\t\t$suggestion_result = $this->Database->query($suggestion_query);\n\n\t\t// Check if the result is valid before this line!\n\t\t$suggestion_list = array_column($suggestion_result, 'commonName');\n\n\t\techo json_encode($suggestion_list, JSON_PRETTY_PRINT);\n\t}", "abstract function get_search_set();", "public function get_search_result($data)\n {\n $qry = \"SELECT venue.*,venue_address.*,venue_media.*,location.location_name,area.area_name from venue JOIN venue_address ON venue.venue_id = venue_address.venue_id LEFT JOIN venue_media ON venue_media.venue_id = venue_address.venue_id LEFT JOIN location ON location.location_id = venue_address.city_id LEFT JOIN area ON area.area_id = venue_address.area_id LEFT JOIN event_category ON event_category.event_category_id = venue_address.event_category_id LEFT JOIN venue_category ON venue_category.venue_category_id = venue_address.venue_address_id where venue.status=1 AND\";\n\n if(!empty($data['city_id']))\n {\n $qry .= \"(venue_address.city_id = '\".$data['city_id'].\"' AND venue_media.set_as_profile = 1) \";\n }\n\n if(!empty($data['locality_id']))\n {\n $qry .= \"AND (venue_address.area_id = '\".$data['locality_id'].\"' AND venue_media.set_as_profile = 1) \";\n }\n\n if(!empty($data['event_category_id']))\n {\n $qry .= \"AND (venue_address.event_category_id like '%\".$data['event_category_id'].\"%' AND venue_media.set_as_profile = 1) \";\n }\n\n if(!empty($data['venue_category_id']))\n {\n $qry .= \"AND (venue_address.venue_category_id like '%\".$data['venue_category_id'].\"%' AND venue_media.set_as_profile = 1)\";\n }\n\n $query = $this->db->query($qry);\n return $query->result_array();\n}", "public static function search_galery() {\n if (isset($_GET[\"place_id\"])) {\n $id = $_GET[\"place_id\"];\n $dbh = Conectar::con();\n //Consulta que se encarga de obtener los identiicadores de las imagenes de la galeriaa sociadas aun sitio y los comentarios\n $cs = \"SELECT i.id_archivo_imagen as image_id FROM sitio s inner join revision_informacion r on s.id_sitio = r.id_sitio inner join imagen_galeria i on r.id_revision_informacion\n= i.id_revision_informacion where s.id_sitio = '$id';\";\n $result = mysqli_query($dbh, $cs) or die(mysqli_error());\n $comentarios = array();\n $comentarios2 = array();\n foreach ($result as $res) {\n $comentarios[] = $res;\n }\n if ($comentarios == null) {\n $comentarios = $comentarios2;\n }\n return $comentarios;\n } else {\n header(\"HTTP/1.0 400 Bad Request\");\n die();\n }\n }", "public function getStartPlaces(){\n\n\n $query = \"SELECT DISTINCT from_place FROM tours\";\n $pdostmt = $this->db->prepare($query);\n $pdostmt->execute();\n $places = $pdostmt->fetchAll(PDO::FETCH_OBJ);\n return $places;\n\n }", "function search_locations($term, $options = array()) {\n\n\t$term = sanitize_string($term);\n\n\t$q = str_replace(array('_', '%'), array('\\_', '\\%'), $term);\n\n\t$options['metadata_names'] = array('location', 'temp_location');\n\t$options['group_by'] = \"v.string\";\n\t$options['wheres'] = array(\"v.string LIKE '%$q%'\");\n\n\treturn elgg_get_metadata($options);\n}", "public abstract function searchQuery();", "public function buscar()\n\t{\n\t\treturn $this->planesAbonoDao->search();\n\t}", "public static function getPlaces(){\n $db = DBInit::getInstance();\n $statement = $db->prepare(\"SELECT asset_place.*, employees.employee_name, employees.employee_surname FROM asset_place LEFT JOIN employees ON asset_place.employee_id = employees.employee_id\");\n $statement->execute();\n return $statement->fetchAll();\n }", "public function search() {\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\n\t\t$this->title = \"Search house\";\n\t\t$this->list = $this->Results();\t\r\n return $this->renderWith(array('House_results', 'App'));\r\n }", "public function search(){ \n\t\t$this->layout = false;\t\t\n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\t\t\t\n\t\t\t$this->Home->unBindModel(array('belongsTo' => array('User','Contact','ReqStatus')));\n\t\t\t$data = $this->Home->Client->find('all', array('fields' => array('Client.client_name'),\n\t\t\t'group' => array('Client.client_name'), 'conditions' => \tarray(\"OR\" => array ('Client.client_name like' => '%'.$q.'%'), \n\t\t\t'AND' => array('Client.is_deleted' => 'N'))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "function search_postings( $type, $params ){\n\t\t$db = dblogin::dbconnect();\n\t\tswitch ($type){\n\t\t\tcase 'furniture':\n\t\t\t\t$cat = 1;\n\t\t\t\tbreak;\n\t\t\tcase 'books':\n\t\t\t\t$cat = 2;\n\t\t\t\tbreak;\n\t\t\tcase 'appliances':\n\t\t\t\t$cat = 3;\n\t\t\t\tbreak;\n\t\t\tcase 'electronics':\n\t\t\t\t$cat = 4;\n\t\t\t\tbreak;\n\t\t\tcase 'wanted':\n\t\t\t\t$cat = 5;\n\t\t\t\tbreak;\n\t\t\tcase 'other':\n\t\t\t\t$cat = 6;\n\t\t\t\tbreak;\n\t\t}\n\t\t$return = array();\n\t\t$sql1 = \"SELECT * \n\t\t\t\tFROM Listings\n\t\t\t\tWHERE deleted = 0\n\t\t\t\tAND type_id = $cat\";\n\t\t$rows1 = $db->Execute( $sql1 );\n\t\t$return[0] = $rows1->GetRows();\n\t\t\n\t\tif( '' != $params ){\n\t\t\t$sql2 = \"SELECT * \n\t\t\t\t FROM Listings\n\t\t\t\t WHERE deleted = 0\n\t\t\t\t AND title LIKE '%$params%'\n\t\t\t\t OR description LIKE '%$params%'\";\n\t\t\t$rows2 = $db->Execute( $sql2 );\n\t\t\t$return[1] = $rows2->GetRows();\n\t\t}\n\t\treturn $return;\n\t}", "public function search(){\n\t\t$searchWord = $this->_get(\"search_word\", \"trim\", '');\n\t\t$id = $this->_get(\"id\", \"trim\", '');\n// \t\tdump($searchWord);\n\t\t$searchList = array('SDK下载','支付','登录回调','创建订单');\n\t\tif (empty($searchWord)) {\n\t\t\t$this->error ('关键字不能为空');;\n\t\t}\n\t\t$model = D('Article');\n\t\t$where = array();\n\t\t$where['title'] = array('like', '%'.$searchWord.'%');\n\t\t$info = $model->where($where)->select();\n\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('search_word', $searchWord);\n\t\t$this->assign('search_list', $searchList);\n// \t\tdump($info);\n\t\t$this->display(\"search\");\n\t}", "public function get_places(Request $request)\r\n {\r\n if ($error = $this->key($request->input('token'))) {\r\n return response()->json(['not valid key'], 200);\r\n }\r\n $user_id = $request->input('user_id');\r\n if ($data = $this->check_empty($user_id, 'Please provide user_id'))\r\n return response()->json($data, 200);\r\n\r\n\r\n //check blocked user\r\n if ($user = $this->is_blocked($user_id)) {\r\n return response()->json($user);\r\n }\r\n\r\n $home = DB::table('dn_favorite_places')\r\n ->where(['user_id' => $user_id,'place_name' => 'home'])\r\n ->orderBy('id','desc')\r\n ->get();\r\n\r\n $work = DB::table('dn_favorite_places')\r\n ->where(['user_id' => $user_id,'place_name' => 'work'])\r\n ->orderBy('id','desc')\r\n ->get();\r\n\r\n $other = DB::table('dn_favorite_places')\r\n ->where(['user_id' => $user_id,'place_name' => 'other'])\r\n ->orderBy('id','desc')\r\n ->get();\r\n\r\n $places_arr['home'] = $home;\r\n $places_arr['work'] = $work;\r\n $places_arr['other'] = $other;\r\n\r\n if ($places_arr) {\r\n return response()->json(['status' => 1, 'places' => $places_arr]);\r\n } else {\r\n return response()->json(['status' => 0, 'message' => 'No place found']);\r\n }\r\n\r\n\r\n }", "function getRestaurantBySearchValue($search,$page,$orderBy,$direction){\n// <start>\n\tglobal $dbConn;\n\t$params = array(); \n if($orderBy =='rate') $orderBy='id';\n if($orderBy == 'review'){\n// $query_hotels = \"SELECT h.*, i.id as i_id , i.filename as img , count(v.restaurant_id) as review FROM `discover_restaurants` as h INNER JOIN discover_restaurants_images as i on i.restaurant_id=h.id left JOIN discover_restaurants_reviews as v on v.restaurant_id=h.id AND v.published=1 WHERE h.name like '%$search%' or h.city like '%$search%' GROUP BY h.id order by $orderBy $direction LIMIT $page, 9\";\n $query_hotels = \"SELECT h.*, i.id as i_id , i.filename as img , count(v.restaurant_id) as review FROM `discover_restaurants` as h INNER JOIN discover_restaurants_images as i on i.restaurant_id=h.id left JOIN discover_restaurants_reviews as v on v.restaurant_id=h.id AND v.published=1 WHERE h.name like :Search or h.city like :Search GROUP BY h.id order by $orderBy $direction LIMIT :Page, 9\";\n }else{\n// $query_hotels = \"SELECT h.*, i.id as i_id , i.filename as img FROM `discover_restaurants` as h INNER JOIN discover_restaurants_images as i on i.restaurant_id=h.id WHERE h.name like '%$search%' or h.city like '%$search%' GROUP BY h.id order by $orderBy $direction LIMIT $page, 9\";\n $query_hotels = \"SELECT h.*, i.id as i_id , i.filename as img FROM `discover_restaurants` as h INNER JOIN discover_restaurants_images as i on i.restaurant_id=h.id WHERE h.name like :Search or h.city like :Search GROUP BY h.id order by $orderBy $direction LIMIT :Page, 9\";\n }\n $params[] = array( \"key\" => \":Search\",\n \"value\" =>\"%\".$search.\"%\");\n $params[] = array( \"key\" => \":Page\",\n \"value\" =>$page,\n \"type\" =>\"::PARAM_INT\");\n $hotels = array();//return $query_hotels;\n// $ret_hotels = db_query($query_hotels);\n $select = $dbConn->prepare($query_hotels);\n PDO_BIND_PARAM($select,$params);\n $ret_hotels = $select->execute();\n $hotels = $select->fetchAll();\n// while($row = db_fetch_array($ret_hotels)){\n// $hotels[] = $row_item;\n// }\n return $hotels;\n// Changed by Anthony Malak 18-05-2015 to PDO database\n// <end>\n}", "public function search(){\n $modelCass = $this->models[2];\n $field = $this->data['field'];\n $what = $this->data['recherche'];\n if(!empty($what) && !empty($field)){\n if($this->$modelCass->isDateUsFr($what)){\n $what = $this->$modelCass->dateUs($what);\n }\n $d['searchResults'] = $this->$modelCass->search(array('field' => $field,\n 'what' => $what));\n if($d['searchResults']){\n foreach ($d['searchResults'] as $key => $value){\n $d['searchResults'][$key]['date_sortie'] = $this->$modelCass->dateFr($value['date_sortie']);\n }\n }\n $this->set($d);\n }\n }", "public function search(){\n $searchKeyword = request()->query('q');\n $groups = Group::where('name', 'like', \"%{$searchKeyword}%\")->get();\n if ($groups) {\n $groupResource = GroupResource::collection($groups);\n return $groupResource;\n }\n else{\n return [\"response\"=>\"No results found !, Try Different Keywords \"];\n }\n\n }", "function searchDisplay($term) {\n $p = new PDOAgent(\"mysql\",DBUSER,DBPASSWD,\"localhost\", DBNAME);\n $p->connect();\n $bindParams = [];\n $results = $p->query(\"SELECT * FROM Owners;\",$bindParams);\n\n $p->disconnect();\n\n $term = strtolower($term);\n $searchList = [];\n\n foreach($results as $result) {\n if(strpos(strtolower($result->Name), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->City), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->Gender), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->FamilySize), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->OwnerID), $term) !== false){\n $searchList[] = $result;\n }\n }\n return $searchList;\n }", "public function index(Request $request)\n {\n $keyword = $request->query('keyword', 'Bang sue');\n\n $results = Cache::get($keyword, function () use ($keyword) {\n\n // Find location of search area\n $endpoint = \"https://maps.googleapis.com/maps/api/place/findplacefromtext/json\";\n $response = Http::get($endpoint, [\n 'input' => $keyword,\n 'inputtype' => 'textquery',\n 'locationbias' => 'circle@13.8186419,100.5386657',\n 'fields' => 'formatted_address,name,geometry',\n 'key' => env('API_KEY')\n ]);\n \n $response = $response->object();\n \n if($response->status !== 'OK'){\n return response()->json([]);\n }\n \n $location = $response->candidates[0]->geometry->location;\n \n // Find restaurant of area\n $endpoint = \"https://maps.googleapis.com/maps/api/place/nearbysearch/json\";\n $response = Http::get($endpoint, [\n 'location' => $location->lat.','.$location->lng,\n 'radius' => 2000,\n 'type' => 'restaurant',\n 'key' => env('API_KEY')\n ]);\n \n $response = $response->object();\n \n if($response->status == 'OK'){\n return response()->json($response->results);\n }\n\n });\n\n return $results;\n }", "function getByWildcard($search) {\n $prep_search = '%' . $search . '%'; //prepare the text $search so it will be a wildcard param\n if (is_numeric($search)) { //if $search is numeric also search the id field\n $sql = \"SELECT distinct(c.id), c.* FROM companys c WHERE name LIKE ? OR id = ? ORDER BY id DESC LIMIT 20\";\n $query = $this->db->query($sql, array($prep_search, $search));\n } else {\n $sql = \"SELECT distinct(c.id), c.* FROM companys c WHERE name LIKE ? ORDER BY id DESC LIMIT 20\";\n $query = $this->db->query($sql, array($prep_search));\n }\n //echo $this->db->last_query();\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $row) {\n $this->_moreInfo(&$row);\n $data[] = $row;\n }\n return $data;\n } else {\n return -1;\n }\n }", "private function request_find2()\n {\n \t$u = $this->util;\n \t// sindice,dbpedia,all\n \t$ep = $u->require_param('ep');\n \t// max number of results\n \t$limit = $u->require_param('limit');\n \t\n \t// key words for the search\n \tif(strlen($kw = $u->optional_param('kw','')) == 0) { \n \t\t$kw = $u->getKeywords();\n \t}\n \tif(count(trim($kw))==0) {\n \t\tthrow new Exception(\"no keywords given or found\");\n \t}\n \trequire_once 'search/SearchEngine.php';\n \t$engine = SearchEngine::getEngine($u, $ep, $kw, $limit);\n \ttry {\n \t\t$engine->probe();\n \t} catch(Exception $ex) {\n \t\tthrow new Exception(\"$ep failed to probe\");\n \t}\n \treturn $engine->search();\n }", "public function searchIngredient($search)\n {\n }", "public function shop_pages_stats_search_autocomplete() {\n\n if(empty($_GET['user_id']) || empty($_GET['query'])) {\n die();\n }\n\n $searchParam = 'url';\n $manager = ManagerHolder::get('PageVisit');\n\n $result = '{\"query\":\"%s\",\"suggestions\":[%s],\"data\":[%s]}';\n $suggestions = array();\n $suggestionsData = array();\n\n $entities = $manager->getAllWhere(array('user_id' => $_GET['user_id']), $searchParam, null, array(), null, $searchParam);\n if(!empty($entities)) {\n $count = 0;\n foreach ($entities as $e) {\n if($count == 5) {\n break;\n }\n if(strpos($e[$searchParam], $_GET['query']) === FALSE || strpos($e[$searchParam], '/магазин') === FALSE) {\n continue;\n }\n $e = array_make_plain_with_dots($e);\n $suggestion = htmlspecialchars($e[$searchParam]);\n $suggestionData = '';\n $suggestions[] = json_encode($suggestion);\n $suggestionsData[] = json_encode($suggestionData);\n $count++;\n }\n }\n\n $result = sprintf($result, $_GET[\"query\"], implode(',', $suggestions), implode(',', $suggestionsData));\n die($result);\n }", "public function findNearbyPlaceName() {\n return $this->execByPosition('findNearbyPlaceName',[\n 'maxRows'=>$this->conn['settings']['maxRows'],\n 'localCountry'=>$this->conn['settings']['localCountry'],\n 'cities'=>$this->conn['settings']['cities'],\n 'style'=>$this->conn['settings']['style'],\n ]);\n }", "public function search()\n {\n $qry = request('qry');\n $ads = Ad::where('title', 'LIKE', \"%{$qry}%\")->where(['user_id' => Auth::user()->id])->where(['deleted' => false])->get();\n return response()->json([\n 'ads' => $ads,\n 'message' => 'Success'\n ], 200);\n }", "public function getSearchedBooks() {\n request()->validate([\n 'query' => 'required'\n ]);\n\n $query = request('query');\n \n try {\n $books = DB::table('books')\n ->select('title', 'total_pages', 'created_date')\n ->where('title', 'like', '%'. $query .'%')\n ->get();\n\n return $this->respondSuccess('Get searched books succeed!', $books);\n } catch (Exception $e) {\n return $this->respondError($e);\n }\n\n }", "public function actionAutoComplete() {\n $res = array();\n $term = Yii::app()->getRequest()->getParam('term', false);\n if ($term) {\n // test table is for the sake of this example\n $sql = 'SELECT id, name FROM {{markers}} where LCASE(name) LIKE :name LIMIT 20';\n $cmd = Yii::app()->db->createCommand($sql);\n $cmd->bindValue(\":name\", \"%\" . strtolower($term) . \"%\", PDO::PARAM_STR);\n $res = $cmd->queryAll();\n }\n echo CJSON::encode($res);\n Yii::app()->end();\n }", "public static function find($search) {\n global $lC_Database, $lC_Language, $lC_Currencies;\n \n if ($search) {\n \n // start building the main <ul>\n $result['html'] = '' . \"\\n\";\n \n // return order data\n $Qorders = array(); \n $Qorders = $lC_Database->query(\"select o.orders_id, \n o.customers_name, \n o.customers_email_address, \n ot.text \n from :table_orders o \n left join :table_orders_total ot \n on (o.orders_id = ot.orders_id) \n where (convert(`customers_id` using utf8) regexp '\" . $search . \"' \n or convert(`customers_name` using utf8) regexp '\" . $search . \"' \n or convert(`customers_company` using utf8) regexp '\" . $search . \"' \n or convert(`customers_street_address` using utf8) regexp '\" . $search . \"' \n or convert(`customers_suburb` using utf8) regexp '\" . $search . \"' \n or convert(`customers_city` using utf8) regexp '\" . $search . \"' \n or convert(`customers_postcode` using utf8) regexp '\" . $search . \"' \n or convert(`customers_state` using utf8) regexp '\" . $search . \"' \n or convert(`customers_country` using utf8) regexp '\" . $search . \"' \n or convert(`customers_email_address` using utf8) regexp '\" . $search . \"' \n or convert(`customers_telephone` using utf8) regexp '\" . $search . \"') \n group by orders_id;\");\n \n $Qorders->bindTable(':table_orders', TABLE_ORDERS);\n $Qorders->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);\n $Qorders->execute();\n \n // set the orders data results as an array\n while($Qorders->next()) {\n $QorderResults[] = $Qorders->toArray();\n }\n \n // build the orders results <li> html for output\n // return <li> only if greater than 0 results from orders query \n if ($QorderResults > 0) {\n if ((int)($_SESSION['admin']['access']['orders'] > 0)) {\n $result['html'] .= ' <ul class=\"title-menu\">\n <li>Orders</li>\n </ul>' . \"\\n\";\n $result['html'] .= ' <ul class=\"orders-menu\">' . \"\\n\";\n function unique_id() {\n return substr(md5(uniqid(mt_rand(), true)), 0, 4);\n } \n foreach ($QorderResults as $key => $value) {\n $result['html'] .= ' <li class=\"bevel\" title=\"' . $lC_Language->get('order_view_details') . ' ' . $value['orders_id'] . '\">' . \"\\n\" . \n ' <a href=\"' . lc_href_link_admin(FILENAME_DEFAULT, 'orders&oID=' . $value['orders_id']) . '\">' . \"\\n\" .\n ' <span class=\"float-right align-right\" style=\"\">' . \"\\n\" . \n ' <b class=\"green\">' . $value['orders_id'] . '</b><br />' . \"\\n\" . \n ' ' . $value['text'] . \"\\n\" . \n ' </span>' . \"\\n\" . \n ' <time><i class=\"icon-price-tag icon-size2 icon-grey icon-pad-right\"></i></time>' . \"\\n\" . \n ' <span><b class=\"green\">' . strtoupper(unique_id()) . '-' . $value['orders_id'] . '</b></span><small>' . $value['customers_name'] . '</small>' . \"\\n\" . \n ' </a>' . \"\\n\" .\n ' </li>';\n }\n }\n $result['html'] .= ' </ul>' . \"\\n\";\n } else {\n $result['html'] .= '';\n }\n \n // return customer data\n $Qcustomers = array(); \n $Qcustomers = $lC_Database->query(\"select customers_id, \n customers_firstname, \n customers_lastname, \n customers_email_address \n from :table_customers \n where (convert(`customers_id` using utf8) regexp '\" . $search . \"' \n or convert(`customers_firstname` using utf8) regexp '\" . $search . \"' \n or convert(`customers_lastname` using utf8) regexp '\" . $search . \"' \n or convert(`customers_email_address` using utf8) regexp '\" . $search . \"' \n or convert(`customers_telephone` using utf8) regexp '\" . $search . \"' \n or convert(`customers_fax` using utf8) regexp '\" . $search . \"');\");\n \n $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);\n $Qcustomers->execute();\n \n // set the customers data results as an array\n while($Qcustomers->next()) {\n $QcustomerResults[] = $Qcustomers->toArray();\n } \n \n // build the customers results <li> html for output\n // return <li> only if greater than 0 results from customers query \n if ($QcustomerResults > 0) {\n if ((int)($_SESSION['admin']['access']['customers'] > 0)) {\n $result['html'] .= ' <ul class=\"title-menu\">\n <li>Customers</li>\n </ul>' . \"\\n\";\n $result['html'] .= ' <ul class=\"customers-menu\">' . \"\\n\";\n foreach ($QcustomerResults as $key => $value) { \n $result['html'] .= ' <li class=\"bevel\" title=\"' . $lC_Language->get('customer_view_details') . ' ' . $value['customers_firstname'] . ' ' . $value['customers_lastname'] . '\">' . \"\\n\" . \n ' <a href=\"' . lc_href_link_admin(FILENAME_DEFAULT, 'customers&cID=' . $value['customers_id']) . '\">' . \"\\n\" .\n ' <span class=\"float-right\">' . $value['customers_id'] . '</span>' . \"\\n\" . \n ' <time><i class=\"icon-user icon-size2 icon-grey\"></i></time>' . \"\\n\" . \n ' <span class=\"green\"><b>' . $value['customers_firstname'] . ' ' . $value['customers_lastname'] . '</b></span><small>' . $value['customers_email_address'] . '</small>' . \"\\n\" . \n ' </a>' . \"\\n\" .\n ' </li>';\n }\n }\n $result['html'] .= ' </ul>' . \"\\n\";\n } else {\n $result['html'] .= '';\n }\n \n // return products data\n $Qproducts = $lC_Database->query(\"select p.products_id, \n p.parent_id, \n p.products_price, \n p.products_model, \n p.has_children, \n pd.products_name, \n pd.products_keyword \n from :table_products p \n left join :table_products_description pd \n on (p.products_id = pd.products_id) \n where (convert(`products_name` using utf8) regexp '\" . $search . \"' \n or convert(`products_model` using utf8) regexp '\" . $search . \"' \n or convert(`products_keyword` using utf8) regexp '\" . $search . \"') \n order by pd.products_name;\");\n\n $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);\n $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);\n $Qproducts->bindInt(':language_id', $lC_Language->getID());\n $Qproducts->execute();\n\n // set the products data results as an array\n while ($Qproducts->next()) {\n $QproductResults[] = $Qproducts->toArray();\n }\n \n // build the products results <li> html for output\n // return <li> only if greater than 0 results from products query \n if ($QproductResults > 0) {\n if ((int)($_SESSION['admin']['access']['products'] > 0)) {\n $result['html'] .= ' <ul class=\"title-menu\">\n <li>Products</li>\n </ul>' . \"\\n\";\n $result['html'] .= ' <ul class=\"products-menu\">' . \"\\n\";\n foreach ($QproductResults as $key => $value) {\n // check for product variants if product has children\n if ($value['has_children'] > 0) {\n $Qvariants = array();\n $QvariantsCount = $lC_Database->query(\"select count(products_id) as variants from :table_products where parent_id = '\" . $value['products_id'] . \"'\");\n $QvariantsCount->bindTable(':table_products', TABLE_PRODUCTS);\n $QvariantsCount->execute();\n \n // set the variants count results as an array\n while ($QvariantsCount->next()) {\n $Qvariants[] = $QvariantsCount->toArray();\n }\n }\n \n $result['html'] .= ' <li class=\"bevel\" title=\"' . $lC_Language->get('product_view_details') . ' ' . $value['products_name'] . '\">' . \"\\n\" . \n ' <a href=\"' . lc_href_link_admin(FILENAME_DEFAULT, 'products=' . $value['products_id'] . '&action=save') . '\">' . \"\\n\" .\n ' <span class=\"float-right\">' . \"\\n\" . \n ' ' . ($value['has_children'] != 0 ? '<span title=\"This product has ' . $Qvariants[0]['variants'] . ' variants\">(' . $Qvariants[0]['variants'] . ') <span class=\"icon-path\"></span></span>' : $lC_Currencies->format($value['products_price'])) . '<br />' . \"\\n\" . \n ' </span>' . \"\\n\" . \n ' <time><span class=\"icon-bag icon-size2 icon-grey icon-pad-left\"></span></time>' . \"\\n\" . \n ' <span class=\"green\" title=\"' . $value['products_name'] . '\"><b>' . substr($value['products_name'], 0, 20) . '</b>...</span>' . ($value['has_children'] != 0 ? '' : '<small>Model: ' . $value['products_model'] . '</small>') . \"\\n\" . \n ' </a>' . \"\\n\" .\n ' </li>';\n \n $Qvariants = null;\n }\n }\n $result['html'] .= ' </ul>' . \"\\n\";\n } else {\n $result['html'] .= '';\n }\n \n return $result;\n \n } else {\n \n // we have nothing being sent from search field \n $result['html'] = '' . \"\\n\";\n \n return $result;\n \n }\n }", "function search()\n\t{\n\t\t$search=$this->input->post('search');\n\t\t$data_rows=get_people_manage_table_data_rows($this->Customer->search($search,$this->config->item('number_of_items_per_page') ? (int)$this->config->item('number_of_items_per_page') : 20),$this);\n\t\techo $data_rows;\n\t}", "public function search()\n {\n $word = request()->search_input;\n $services = Service::where('service_name', 'like', \"%$word%\")->paginate(6);\n return view(\"Public.services\", ['services' => $services, 'searched' => $word]);\n }", "public function search($params, $normalize = true) {\n \n if (!$this->dbh || !isset($params) || !isset($params['q'])) {\n return RestoLogUtil::httpError(400);\n }\n \n /*\n * Set output type - GeoJSON (default) or WKT\n */\n $this->outputAsWKT = isset($params['wkt']) ? filter_var($params['wkt'], FILTER_VALIDATE_BOOLEAN) : false;\n \n /*\n * Remove accents from query and split it into 'toponym' and 'modifier'\n */\n $query = $this->splitQuery($normalize ? $this->context->dbDriver->normalize($params['q']) : $params['q']);\n \n /*\n * Limit search to input type\n */\n $type = isset($params['type']) ? $params['type'] : null;\n switch ($type) {\n \n /*\n * State only\n */\n case 'state':\n $this->results = $this->getStates($query['toponym'], Gazetteer::STATE_PRECISION);\n break;\n /*\n * Region only\n */\n case 'region':\n $this->results = $this->getRegions($query['toponym'], Gazetteer::REGION_PRECISION);\n break;\n /*\n * Country only\n */\n case 'country':\n $this->results = $this->getCountries($query['toponym'], Gazetteer::COUNTRY_PRECISION);\n break;\n /*\n * Continent only\n */\n case 'continent':\n $this->results = $this->getContinents($query['toponym'], Gazetteer::CONTINENT_PRECISION);\n break;\n /*\n * Physical only\n */\n case 'physical':\n $this->results = $this->getPhysical($query['toponym'], Gazetteer::PHYSICAL_PRECISION);\n break;\n /*\n * Search for all\n */\n default:\n $this->results = $this->getToponyms($query['toponym'], array(\n 'bbox' => isset($params['bbox']) ? $params['bbox'] : null,\n 'modifier' => isset($query['modifier']) ? $query['modifier'] : null\n ));\n if (!isset($query['modifier'])) {\n $this->results = array_merge($this->results, $this->getContinents($query['toponym'], Gazetteer::CONTINENT_PRECISION));\n $this->results = array_merge($this->results, $this->getCountries($query['toponym'], Gazetteer::COUNTRY_PRECISION));\n $this->results = array_merge($this->results, $this->getRegions($query['toponym'], Gazetteer::REGION_PRECISION));\n $this->results = array_merge($this->results, $this->getStates($query['toponym'], Gazetteer::STATE_PRECISION));\n $this->results = array_merge($this->results, $this->getPhysical($query['toponym'], Gazetteer::PHYSICAL_PRECISION));\n }\n }\n \n /*\n * Close database handler\n */\n if ($this->closeDbh) {\n pg_close($this->dbh);\n }\n \n return RestoLogUtil::success(count($this->results) . ' toponym(s) found', array(\n 'query' => $params['q'],\n 'lang' => $this->context->dictionary->language,\n 'results' => $this->results\n ));\n }", "public function search_festivals($keyword){\r\n\t\t\tglobal $db;\r\n\r\n\t\t\t$keyword = $db->escape_string($keyword);\r\n\r\n\t\t\t$sql = \"SELECT id FROM events \";\r\n\t\t\t$sql .= \" WHERE name LIKE '%{$keyword}%' \";\r\n\t\t\t$sql .= \" OR venue LIKE '%{$keyword}%' \";\r\n\t\t\t$sql .= \" OR city LIKE '%{$keyword}%' \";\r\n\t\t\t$sql .= \" OR overview LIKE '%{$keyword}%' \";\r\n\t\t\t$sql .= \" AND visible = 1 \";\r\n\t\t\t$sql .= \" AND event_type_id = 3 \";\r\n\r\n\r\n\t\t\t$result_set = $db->query($sql);\r\n\r\n\t\t\tconfirm($result_set);\r\n\r\n\t\t\treturn $result_set;\r\n\t\t}", "static function search($q)\n {\n $base = 'http://ajax.googleapis.com/ajax/services/search/web';\n $args = array(\n 'q' => $q,\n 'v' => '1.0',\n 'key' => self::$API_KEY,\n 'rsz' => 'large',\n 'start' => 0,\n );\n $page = Radix_HTTP::get( sprintf('%s?%s',$base,http_build_query($args)) );\n $json = json_decode($page['body']);\n return $json;\n // Radix::dump($json,true);\n // if (!empty($json->responseData->cursor->estimatedResultCount)) {\n // $c = intval($json->responseData->cursor->estimatedResultCount);\n // }\n // $list = array();\n // if ( (!empty($json->responseData->results)) && (is_array($json->responseData->results)) ) {\n // foreach ($json->responseData->results as $i=>$x) {\n // $item = array(\n // 'q' => $q,\n // 'uri' => $x->url,\n // 'src' => 'google',\n // 'g-name' => $x->titleNoFormatting,\n // 'g-note' => $x->content,\n // 'g-rank' => (self::$_google_off + $i + 1),\n // );\n // self::_page_save($item);\n // self::$_google_off++;\n // }\n // }\n }" ]
[ "0.72165716", "0.6882841", "0.6831964", "0.6712017", "0.6661161", "0.6661161", "0.66240245", "0.6475147", "0.645967", "0.64276975", "0.6411667", "0.6407315", "0.6367694", "0.6323697", "0.631857", "0.6296662", "0.62910146", "0.6261245", "0.62497616", "0.6248021", "0.6220683", "0.6184827", "0.6170463", "0.61701167", "0.61466944", "0.61208206", "0.6120485", "0.6085824", "0.60625046", "0.6039357", "0.6032574", "0.60152996", "0.60022426", "0.59970057", "0.59924185", "0.59924185", "0.5986482", "0.59757984", "0.5971225", "0.5958942", "0.5951632", "0.5931753", "0.5921557", "0.5920735", "0.5910769", "0.5899462", "0.58972913", "0.5891357", "0.5881548", "0.58767986", "0.58664674", "0.5866379", "0.5865403", "0.5862742", "0.5855197", "0.58486265", "0.5847839", "0.5835699", "0.5835087", "0.5833673", "0.58320796", "0.5828535", "0.5819796", "0.58159155", "0.5812126", "0.5805017", "0.5800921", "0.57904273", "0.5786576", "0.5781387", "0.57781655", "0.5777274", "0.5772156", "0.5764113", "0.57545096", "0.5748121", "0.5747597", "0.57379603", "0.57372457", "0.5737139", "0.57361066", "0.57291526", "0.5728933", "0.5727693", "0.5725534", "0.5724543", "0.57182646", "0.5717754", "0.5715289", "0.5701833", "0.56875265", "0.568116", "0.56799954", "0.56735754", "0.5673373", "0.56704605", "0.5669532", "0.5667436", "0.5665289", "0.5665141" ]
0.711586
1
Returns connection name which is used for this builder.
Возвращает имя соединения, используемого для этого строителя.
public function getConnectionName() { return $this->connectionName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConnectionName() {\n return $this->connection_name;\n }", "public function getConnectionName()\n {\n return $this->connection;\n }", "public function getConnectionName()\n {\n return $this->connection;\n }", "public function getConnectionName()\n {\n return $this->connection;\n }", "private function getConnectionName()\n {\n $connection = config('cart.database.connection');\n\n return is_null($connection) ? config('database.default') : $connection;\n }", "public static function getConnectionName()\n {\n /** @var \\Illuminate\\Support\\Testing\\Fakes\\QueueFake $instance */\n return $instance->getConnectionName();\n }", "public function getConnectionName()\n {\n return config('telescope.storage.database.connection');\n }", "public function getConnectionName()\n {\n }", "public static function getName() {\n\t\treturn DB::connection()->getName();\n\t}", "public static function getName()\n { //Method inherited from \\Illuminate\\Database\\Connection \n /** @var \\Illuminate\\Database\\PostgresConnection $instance */\n return $instance->getName();\n }", "public function getConnectionName(): ?string\n {\n if (\n Config::has('laravel-scenario-logger.storage-driver-configuration.database.connection') &&\n Config::get('laravel-scenario-logger.storage-driver-configuration.database.connection') !== null) {\n return Config::get('laravel-scenario-logger.storage-driver-configuration.database.connection');\n }\n\n return parent::getConnectionName();\n }", "public static function defaultConnectionName()\n {\n return static::$_connectionName;\n }", "public function name(): string\n {\n return __('Connection');\n }", "protected static function getStaticConnectionName()\n {\n $reflection = new ReflectionClass(static::class);\n $properties = $reflection->getDefaultProperties();\n $connection = isset($properties['connection'])\n ? $properties['connection']\n : config('database.default');\n return $connection;\n }", "public function getConnectionName()\n {\n //\n }", "public function connection(): string\n {\n return $this->connection ?? Config::get('elastic_sync.connection', 'default');\n }", "public static function getDefaultConnectionName()\n {\n /** @var \\LaravelDoctrine\\ORM\\IlluminateRegistry $instance */\n return $instance->getDefaultConnectionName();\n }", "public function getConnectionName(): ?string\n {\n return $this->connection;\n }", "protected function getConnection(): string\n {\n return $this->options['connection'] ?? config('database.default');\n }", "protected static function getModelConnectionName()\n {\n $model = new static();\n return $model->getConnection();\n }", "public function getConnection(): string\n {\n return $this->connection;\n }", "function getName()\n {\n \tif($this->name == null)\n \t\treturn $this->dbname;\n \telse \n \t\treturn $this->name;\n }", "public function getConnectionString()\n {\n \treturn $this->_options['connection'][$this->getConnectionKey()]['string'];\n }", "public static function defaultConnectionName()\n {\n return 'cedr_custom';\n }", "public function getName()\n {\n return $this->database_name;\n }", "public static function defaultConnectionName()\n {\n return 'main';\n }", "public static function defaultConnectionName()\n {\n return 'voyager';\n }", "protected function getConnectionNamespace() {\n return $this->getDatabaseName();\n }", "protected function connectionName(): ?string\n {\n return null;\n }", "public static function defaultConnectionName(): string\n {\n return 'apps';\n }", "public static function defaultConnectionName(): string\n {\n return 'apps';\n }", "public static function defaultConnectionName(): string\n {\n return 'apps';\n }", "public function getDBConnectionDBName()\n\t{\n\t\treturn constant('SGBD_DB');\n\t}", "public static function defaultConnectionName() {\n return 'otherdb_name';\n }", "public function getDbName($connection=null) {\r\n\t\tif ($connection === null) {\r\n\t\t\t$dbName = $this->getDbConnection()->connectionString;\r\n\t\t} else {\r\n\t\t\t$dbName = $connection->connectionString;\r\n\t\t}\r\n\t\t$dbLoc = stripos($dbName, 'dbname=');\r\n\t\tif ($dbLoc === false) {\r\n\t\t\tthrow new CException('Cannot find DB Name, connection string: ' . $dbName);\r\n\t\t}\r\n\t\treturn trim(substr($dbName, $dbLoc+7));\r\n\t}", "public function getConnection(){\n return $this->connectionId;\n }", "public function getConnectionName()\n {\n return 'mysql-1';\n }", "protected function connectionId() {\n\t\t\treturn $this->sqlBoundConnectionExpressionSelect('connection_id()');\n\t\t}", "public static function getDatabaseName()\n { //Method inherited from \\Illuminate\\Database\\Connection \n /** @var \\Illuminate\\Database\\PostgresConnection $instance */\n return $instance->getDatabaseName();\n }", "public function getClassName()\n {\n $adapter = $this->getAdapter();\n\n if ($adapter) {\n return $adapter;\n }\n\n return ucfirst($this->dsn->scheme);\n }", "public function getLabel()\n {\n return 'database:connection';\n }", "public function getName() {\n\t\treturn $this->driver->getName();\n\t}", "public function getDbName()\n\t{\n\t\treturn $this->_backend->getDbName();\n\t}", "private function getContextKey(): string\n {\n return sprintf('mongodb.connection.%s', $this->poolName);\n }", "public function getDBConnectionUserName()\n\t{\n\t\treturn constant('SGBD_USER');\n\t}", "public function getDbName() {\n return $this->dbName;\n }", "public function getConnectionId()\n\t{\n\t\treturn $this->connectionId;\n\t}", "public function getDatabaseConnection()\n\t{\n\t\treturn $this->dbConnectionName;\n\t}", "public function getDbName()\n {\n return $this->dbName;\n }", "public function getName()\n\t{\n\t\t//\n\t\t// Check connection.\n\t\t//\n\t\tif( $this->mConnection instanceof \\MongoCollection )\n\t\t{\n\t\t\t//\n\t\t\t// Get full name.\n\t\t\t//\n\t\t\t$name = $this->mConnection->getName();\n\t\t\t\n\t\t\t//\n\t\t\t// Separate namespaces.\n\t\t\t//\n\t\t\t$name = explode( '.', $name );\n\t\t\t\n\t\t\treturn $name[ count( $name ) - 1 ];\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\n\t\t} // Has connection.\n\t\t\n\t\treturn parent::getName();\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\n\t}", "public static function getName($connection = null)\n {\n /** @var \\Illuminate\\Queue\\QueueManager $instance */\n return $instance->getName($connection);\n }", "public function getDbName() {\n\t\treturn $this->dbName;\n\t}", "protected function getDbName()\n\t{\n\t\treturn $this->getConfig()->olp_db->db_info['db'];\n\t}", "public function getConnectionKey()\n {\n return $this->_connectionKey;\n }", "public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }", "public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }", "public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }", "public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }", "public function getName() {\n\t\treturn $this->clientName;\n\t}", "protected function getDbnameAsString()\n {\n $password = $this->getConfig('password');\n\n if ($password) {\n $password = ':' . $password;\n }\n\n return sprintf(\n 'postgresql://%s%s@%s/%s',\n $this->getConfig('username'),\n $password,\n $this->getConfig('host'),\n $this->getConfig('database')\n );\n }", "public static function defaultConnectionName()\n\t{\n\t\treturn 'db_symfony';\n\t}", "public function getDBName()\n {\n return $this->isConnected() ? $this->idsn['dbname'] : false;\n }", "public function getName(): string {\n return $this->appName;\n }", "function connection($name = null)\n {\n if (null === $name) {\n return DB::connection()->getName();\n }\n\n return strtolower($name) === strtolower(DB::connection()->getName());\n }", "public function getCurrentDbName() {\n return $this->dbName;\n }", "public function getName()\r\n {\r\n return $this->builder->getName();\r\n }", "public function getName()\r\n {\r\n return $this->builder->getName();\r\n }", "protected function getConnectionDescription() {\n $host = $this->host;\n $port = $this->port ? ':'.$this->port : '';\n $db = $this->database ? '/'.$this->database : '';\n return $host.$port.$db;\n }", "public static function defaultConnectionName()\n {\n return 'npcdata';\n }", "public static function defaultConnectionName()\n {\n return 'GoldenList';\n }", "public function name(): ?string\n {\n return $this->database;\n }", "public function getDriverName()\n\t{\n\t if (($pos=strpos($this->connectionString, ':'))!==false)\n\t {\n\t return strtolower(substr($this->connectionString, 0, $pos));\n\t }\n\t return '';\n\t}", "public function getConnectionId();", "public function currentConnection(): string\n {\n return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://';\n }", "public static function dbName()\n {\n if (!static::$_config) {\n throw new BException('No connection selected');\n }\n return !empty(static::$_config['dbname']) ? static::$_config['dbname'] : null;\n }", "public function get_database_name();", "public function getName() {\n return trim(`hostname`) . ':' . getmypid() .\n (isset($this->params['label']) ? \" ({$this->params['label']})\" : '');\n }", "public function getDefaultConnection(): string;", "public function connection()\n {\n return $this->options['connection'] ?? null;\n }", "private function getCacheName()\n {\n return Connection::connection($this->connectionName)->getCacheName();\n }", "protected function getDatabaseName()\n {\n return trim($this->option('database-name')) ?: DB::getConfig('database');\n }", "public function getDatabaseName();", "public function getDatabaseName();", "public function getCacheName()\n {\n $connectionName = $this->connectionName;\n\n $cacheConfig = Nishchay::getSetting('cache.database');\n\n $cacheName = null;\n\n # Looking for if there's cache name set for this database connection.\n if (isset($cacheConfig->connection) && isset($cacheConfig->connection->{$connectionName})) {\n $cacheName = $cacheConfig->connection->{$connectionName};\n }\n\n # If this is set to false, we will not use cache.\n if ($cacheName === false) {\n return null;\n }\n\n # If its null, means it need to be used as defined in database cache\n # default config.\n if ($cacheName === null) {\n \n # Database connection default cache is null means not to use cache.\n if (!isset($cacheConfig->default) || $cacheConfig->default === null) {\n return null;\n }\n\n $cacheName = $cacheConfig->default;\n }\n\n return $cacheName;\n }", "public function name(): string\n {\n return $this['config']->get('app.name');\n }", "public function getSchemaName() {\n\t\treturn $this->config['schema'];\n\t}", "public function getName()\n {\n return defined($this->get('confcat_name')) ? constant($this->get('confcat_name')) : $this->get('confcat_name');\n }", "public static function getClientName()\n {\n return self::$clientName;\n }", "public function getDbName()\n {\n return $this->db->getDbName();\n }", "protected function getDBName()\n\t{\n\t\treturn $this->dbname;\n\t}", "public static function getDbName()\n {\n return self::getContainer()->hasParameter('database_name')\n ? (integer)self::getContainer()->getParameter('database_name')\n : false;\n }", "public function getClientName(): string\n {\n return $this->clientName;\n }", "public function getName()\n {\n return $this->backendConfig['name'];\n }", "public function getSchemaName(): string\n {\n return $this->schemaName;\n }", "public function getName()\n {\n return Arr::get($this->config, 'name');\n }", "public function getDbname()\n {\n return $this->dbname;\n }", "public function getDatabaseName()\n\t{\n\t\treturn $this->name;\n\t}", "public function getDatabaseName() : string\n {\n return $this->databaseName;\n }", "public function getDatabaseName() {\n return $this->database;\n }" ]
[ "0.8165289", "0.8096366", "0.8096366", "0.8096366", "0.771169", "0.76983356", "0.758984", "0.7545964", "0.74453056", "0.7443685", "0.73442936", "0.73398596", "0.73395747", "0.7322763", "0.726659", "0.7221333", "0.71726245", "0.70812935", "0.6992315", "0.69489306", "0.69397515", "0.6923101", "0.6905718", "0.6822935", "0.68095565", "0.6791176", "0.6770313", "0.6716004", "0.66626835", "0.6655599", "0.6655599", "0.6655599", "0.66430426", "0.6615392", "0.66078615", "0.6578733", "0.6565153", "0.6554037", "0.65448487", "0.6521011", "0.6512387", "0.6504599", "0.6504153", "0.6500516", "0.64962864", "0.64574337", "0.64563465", "0.6441755", "0.6420007", "0.6419547", "0.64175946", "0.6417432", "0.64147663", "0.6411489", "0.63994753", "0.63994753", "0.63994753", "0.63994753", "0.6382634", "0.63767356", "0.6370986", "0.6339245", "0.6309259", "0.62873614", "0.6283001", "0.627835", "0.627835", "0.6277481", "0.6272551", "0.6263721", "0.6254812", "0.6247125", "0.6237885", "0.6237693", "0.6235812", "0.6224844", "0.62236524", "0.62189907", "0.62157357", "0.6196593", "0.6193709", "0.6186667", "0.6186667", "0.6184624", "0.61825514", "0.61801004", "0.61782", "0.617506", "0.617329", "0.61709994", "0.6145423", "0.61451244", "0.6144637", "0.61331415", "0.612729", "0.61206925", "0.6118111", "0.6115761", "0.6109757" ]
0.8098846
1
Checks if value columns or multiple value column has been. If it not set then exception is thrown.
Проверяет, заданы ли значение колонки или несколько значений колонки. Если это не задано, выбрасывается исключение.
private function checkValueColumns() { if (empty($this->valueColumns)) { if ($this->mode !== AbstractBuilder::UPDATE && !empty($this->multipleValueColumns)) { return $this; } throw new ApplicationException('Column with its value are not set.', 2, null, 911086); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkValuesValidity(): void\n {\n parent::checkValuesValidity();\n if (! $this->value) {\n throw new Exception(\n get_class($this) . ' : Missing $value property. Please use the value() method to set a value.'\n );\n }\n }", "abstract protected function _validate($column, $value);", "private function ensureValue( $method )\n {\n if ( ! $this->hasValue ) {\n throw new Exception( \"Calling method \" . $method . \" without setting a field (call 'required' or 'optional' first!).\" );\n }\n }", "protected function alreadyHaveValue()\n {\n if (is_null($this->value) || !is_int($this->value)) {\n throw new ExchangeException(\"Set the value firstly!\");\n }\n }", "private function validateColumns()\n {\n if (empty($this->columns)) {\n throw new \\Exception('Invalid filler file.'.\"\\n\".'$columns property not set.');\n }\n }", "public function checkValueInvalid($column, $value) {\n if(null===($VVarr = $this->VV($column))) return false;\n if($this->getValueValid($column, $value, true)) return 0;\n elseif($this->getValueValid($column,$value,false)||array_search($value, $VVarr)!==false) return 1;\n else return 2;\n }", "public function valueIsClean($column) \n {\n if (!isset($this->values[$column])) {\n throw new DataSetException(\"Undefined column: \".$column);\n }\n return !isset($this->dirtyCols[$column]);\n }", "abstract public function hasValues();", "protected function checkColumns()\n\t{\n\t\t$success = false;\n\n\t\tif ( ! empty($this->form_input['columns']) )\n\t\t{\n\t\t\t$success = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->appendError(\"No_columns\",\"No column name setted: you need to fill atleast one \\\"column_\\\" field\");\n\t\t}\n\n\t\treturn $success;\n\t}", "public function verify() {\n\t\tforeach($this->rows as $index => $row) foreach($row as $heading => $column) if($headings[$heading] === true && empty($column)) throw new Exception(\"Row {$index} requires {$heading}, but no data is present\");\n\t}", "static private function checkValidValuesRule($class, &$values, $column, $valid_values)\n\t{\n\t\tif ($values[$column] === NULL) {\n\t\t\treturn;\t\n\t\t}\n\t\t\n\t\tif (!in_array($values[$column], $valid_values)) {\n\t\t\treturn self::compose(\n\t\t\t\t'%1$sPlease choose from one of the following: %2$s',\n\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column)),\n\t\t\t\tjoin(', ', $valid_values)\n\t\t\t);\n\t\t}\n\t}", "final public function catchValuesFromDatabaseIfNotDoneYet() {\n\t\tif (!$this->CatchedValues) {\n\t\t\t$this->catchValuesFromDatabase();\n\n\t\t\t$this->CatchedValues = true;\n\t\t}\n\t}", "protected function checkIfSet($value) {\n if (!isset($value)) {\n throw new NullArgumentException();\n }\n }", "public function validateSchemaColumns(mixed $key, mixed $value): bool\n {\n switch ($key) {\n case 'name':\n if ($value === '') {\n throw new DataSchemaInvalidArgumentException('');\n }\n break;\n case 'type':\n if (!in_array($value, $this->types)) {\n throw new DataSchemaInvalidArgumentException('');\n }\n break;\n case 'options':\n if (!is_array($value) or count($value) < 0) {\n throw new DataSchemaInvalidArgumentException('');\n }\n break;\n case 'length':\n if (!is_int($value)) {\n throw new DataSchemaInvalidArgumentException('');\n }\n break;\n case 'index':\n if (!in_array($value, ['primary', 'unique', 'index', 'fulltext'])) {\n throw new DataSchemaInvalidArgumentException('');\n }\n break;\n case 'null':\n case 'auto_increment':\n if (!is_bool($value)) {\n throw new DataSchemaInvalidArgumentException('');\n }\n break;\n case 'default':\n if (!in_array($value, ['none', 'null', 'CURRENT_TIMESTAMP', $value])) {\n throw new DataSchemaInvalidArgumentException('');\n }\n break;\n case 'attributes':\n if (!in_array($value, ['', 'binary', 'unsigned', 'unsigned zerofill', 'on update CURRENT_TIMESTAMP'])) {\n throw new DataSchemaInvalidArgumentException('');\n }\n break;\n }\n $this->row[$key] = $value;\n return true;\n }", "static private function checkOneOrMoreRule($schema, $class, &$values, $columns)\n\t{\n\t\tsettype($columns, 'array');\n\t\t\n\t\t$found_value = FALSE;\n\t\tforeach ($columns as $column) {\n\t\t\tif (self::hasValue($schema, $class, $values, $column)) {\n\t\t\t\t$found_value = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$found_value) {\n\t\t\t$column_names = array();\n\t\t\tforeach ($columns as $column) {\n\t\t\t\t$column_names[] = fORM::getColumnName($class, $column);\n\t\t\t}\n\t\t\treturn self::compose(\n\t\t\t\t'%sPlease enter a value for at least one',\n\t\t\t\tfValidationException::formatField(join(', ', $column_names))\n\t\t\t);\n\t\t}\n\t}", "public function hasValue()\r\n {\r\n $values = $this->_getDbValues();\r\n\r\n return !empty($values);\r\n }", "static private function checkAgainstSchema($object, $column, &$values, &$old_values)\n\t{\n\t\t$class = get_class($object);\n\t\t$table = fORM::tablize($class);\n\t\t\n\t\t$schema = fORMSchema::retrieve($class);\n\t\t$info = $schema->getColumnInfo($table, $column);\n\t\t// Make sure a value is provided for required columns\n\t\t$schema_not_null = $info['not_null'] && $info['default'] === NULL && $info['auto_increment'] === FALSE;\n\t\t$rule_not_null = isset(self::$required_rules[$class][$column]);\n\t\tif ($values[$column] === NULL && ($schema_not_null || $rule_not_null)) {\n\t\t\treturn self::compose(\n\t\t\t\t'%sPlease enter a value',\n\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column))\n\t\t\t);\n\t\t}\n\t\t\n\t\t$message = self::checkDataType($class, $column, $values[$column]);\n\t\tif ($message) { return $message; }\n\t\t\n\t\t// Make sure a valid value is chosen\n\t\tif (isset($info['valid_values']) && $values[$column] !== NULL && !in_array($values[$column], $info['valid_values'])) {\n\t\t\treturn self::compose(\n\t\t\t\t'%1$sPlease choose from one of the following: %2$s',\n\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column)),\n\t\t\t\tjoin(', ', $info['valid_values'])\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Make sure the value isn't too long\n\t\tif ($info['type'] == 'varchar' && isset($info['max_length']) && $values[$column] !== NULL && is_string($values[$column]) && fUTF8::len($values[$column]) > $info['max_length']) {\n\t\t\treturn self::compose(\n\t\t\t\t'%1$sPlease enter a value no longer than %2$s characters',\n\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column)),\n\t\t\t\t$info['max_length']\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Make sure the value is the proper length\n\t\tif ($info['type'] == 'char' && isset($info['max_length']) && $values[$column] !== NULL && is_string($values[$column]) && fUTF8::len($values[$column]) != $info['max_length']) {\n\t\t\treturn self::compose(\n\t\t\t\t'%1$sPlease enter exactly %2$s characters',\n\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column)),\n\t\t\t\t$info['max_length']\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Make sure the value fits in the numeric range\n\t\tif (self::stringlike($values[$column]) && in_array($info['type'], array('integer', 'float')) && $info['min_value'] && $info['max_value'] && ($info['min_value']->gt($values[$column]) || $info['max_value']->lt($values[$column]))) {\n\t\t\treturn self::compose(\n\t\t\t\t'%1$sPlease enter a number between %2$s and %3$s',\n\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column)),\n\t\t\t\t$info['min_value']->__toString(),\n\t\t\t\t$info['max_value']->__toString()\n\t\t\t);\n\t\t}\n\t\t\n\t\t$message = self::checkForeignKeyConstraints($class, $column, $values);\n\t\tif ($message) { return $message; }\n\t}", "public final function __set($column, $value) {\n $table = self::table();\n if ($this->_deleted) {\n $tableName = $table->name;\n throw new \\ExpectedErrorException(\"Cannot access deleted record column, $tableName: $column, $value\", self::ERRNO_SYS_INVALID_ARGUMENT);\n }\n\n if (in_array($column, $table->pk)) {\n throw new \\ExpectedErrorException(\"Primary key[$column] is readonly\", self::ERRNO_SYS_INVALID_ARGUMENT);\n }\n\n if (!array_key_exists($column, $this->_row)) {\n $tableName = $table->name;\n throw new \\ExpectedErrorException(\"Unknown column: $tableName: $column\", self::ERRNO_SYS_INVALID_ARGUMENT);\n }\n\n if ($this->_verColumn !== NULL && $column == $this->_verColumn->name) {\n throw new \\ExpectedErrorException(\"Cannot assign ver column: $column\", self::ERRNO_SYS_INVALID_ARGUMENT);\n }\n\n if ($table->columns[$column]->delta) {\n throw new \\ExpectedErrorException(\"Cannot assign delta column: $column, use increase()\", self::ERRNO_SYS_INVALID_ARGUMENT);\n }\n if ($table->columns[$column]->critical) {\n throw new \\ExpectedErrorException(\"Cannot assign critical column: $column, use serialUpdate()\", self::ERRNO_SYS_INVALID_ARGUMENT);\n }\n\n $this->_validateColumnValue($table, $column, $value);\n\n $setter = \"set_$column\"; // deadloop pitfall\n if (method_exists($this, $setter)) {\n $value = $this->$setter($value);\n if (is_null($value)) {\n $clz = get_called_class();\n throw new \\ExpectedErrorException(\"$clz::$setter forgot to return value\", self::ERRNO_SYS_INVALID_ARGUMENT);\n }\n }\n return $this->_assignColumnValue($column, $value);\n }", "protected function checkForTrouble()\n {\n // we have table of set values and list of values referenced\n // compare, looking for SET BUT NOT REFERENCED ATTRIBUTES\n if ( $this->attributes==null ) {\n return;\n }\n $names = $this->attributes->getKeys();\n // if in names and not in referenced attributes, trouble\n foreach ($names as $name) {\n if ( $this->referencedAttributes!=null &&\n !in_array($name, $this->referencedAttributes) )\n {\n $this->warning($this->getName().\": set but not used: \".$this->name);\n }\n }\n // can do the reverse, but will have lots of false warnings :(\n }", "function set_value($value, $row, $col){\r\n\r\n // Check if Value is a number\r\n if(!$this->check_number($value)){\r\n echo \"Error: Value is not a number\";\r\n return false;\r\n }\r\n\r\n // Check if Row is a number\r\n if(!$this->check_number($row)){\r\n echo \"Error: Row is not a number\";\r\n return false;\r\n }\r\n\r\n // Check if Col is a number\r\n if(!$this->check_number($col)){\r\n echo \"Error: Col is not a number\";\r\n return false;\r\n }\r\n\r\n // Check if row is out of bounds\r\n if($row > $this->rows || $row <= 0){\r\n echo \"Error: Out of Bounds on Rows\";\r\n return false;\r\n }\r\n\r\n // Check if col is out of bounds\r\n if($col > $this->cols || $col <= 0){\r\n echo \"Error: Out of Bounds on Cols\";\r\n return false;\r\n }\r\n\r\n // Set Data\r\n $this->data[$row-1][$col-1] = $value;\r\n }", "private function throwException(): void\n {\n if (empty($this->bindValues) || empty($this->bindKeys)) {\n throw new FillableNoValueException('No values added to either of the properties');\n }\n if ($keys = $this->count($this->bindKeys) && $values = $this->count($this->bindValues)) {\n if ($keys < $values) {\n throw new FillableOutOfRangeException('Your keys and values are out of range.');\n }\n }\n }", "public function hasValues(){\n return $this->_has(1);\n }", "private function _setColValues(&$colName, &$value, &$bindValue, &$sqlTxt){\n\t\t\n\t\t// ----------------------------------------------------------------------------\n\t\t// Now does this column have a value, and has not been assigned the null type\n\t\t// ----------------------------------------------------------------------------\n\t\tif (isset($value) && !is_null($value) && !is_array($value)){\n\t\t\t// ----------------------------------------------------\n\t\t\t// One more check for NULL assignment in the db\n\t\t\t// isset() != empty() these functions are not equal\n\t\t\t// since zero produces true on the empty() we check\n\t\t\t// that there is no zero, which is a legitimate value\n\t\t\t// ----------------------------------------------------\n\t\t\tif ($this->_spaceToNull && empty($value) && $value != '0') {\n\t\t\t\t$sqlTxt .= $colName.\"=NULL \";\n\t\t\t\t// we don't assign a value to the target, since nothing to bind\n\t\t\t} else {\n\t\t\t\t$sqlTxt .= $colName.\"=? \";\n\t\t\t\t$bindValue[] = $value;\n\t\t\t}\n\t\t}\n\t\t// If the column is to be passed through and is not a scalar (i.e. function)\n\t\t/// then the value will be an array\n\t\telse if (is_array($value) && isset($value[raw])){\n\t\t\t$sqlTxt .= $colName.\"=\".$value[raw];\n\t\t}\n\t\t// There is no value then we regard it as a null in the database\n\t\t// or if it was explicitly assinged a null type we make it null\n\t\telse {\n\t\t\t$sqlTxt .= $colName.\"=NULL \";\n\t\t}\n\t\t\n\t}", "public function testColumns()\n {\n $this->assertNotEmpty($this->validator->columns,\n \"[-] The `columns` can not be empty\"\n );\n\n // check assigned columns has type integer\n $this->assertContainsOnly('int', $this->validator->columns,\n \"[-] The `columns` property must have only (int) keys\"\n );\n\n // check count of types alowed to parse\n $this->assertCount(6, $this->validator->columns,\n \"[-] The `columns` property counted must be equals to 6\"\n );\n }", "public function testSqlValuesModeWithoutProperty()\n {\n $obj = $this->createExpression();\n\n $this->expectException(UnexpectedValueException::class);\n\n $obj->setMode('values')->setValues('1,2,3');\n $obj->sql();\n }", "public function testInvalidCols()\n {\n $this->executeReport($this->getResults(), array(\n 'cols' => array('foooo'),\n ));\n }", "protected function _getValidValues()\n {\n if( !isset( $this->_isDBChecked ) )\n $this->_checkDBIntegrity();\n\n return parent::_getValidValues();\n }", "public function testSqlValuesModeWithoutValues()\n {\n $obj = $this->createExpression();\n\n $this->expectException(UnexpectedValueException::class);\n\n $obj->setMode('values')->setProperty('test');\n $obj->sql();\n }", "public function __call($col, $value = null) {\n if (in_array($col, $this->tableDef->getCols())) {\n if (isset($value[0])) {\n $this->setCol($col, $value[0]);\n } else {\n return $this->getCol($col);\n }\n } else {\n throw new UnexpectedValueException(\"Column: \" . $col . \" does not exist\");\n }\n }", "public function isValid($value, $rowData);", "public function checkAddedColumns() {\n }", "public function hasValues(){\n return $this->_has(3);\n }", "public function hasValues(){\n return $this->_has(3);\n }", "final protected function checkOptValue($value):void\n {\n if(!is_scalar($value))\n static::throw($value,'notScalar');\n }", "public function hasValues(){\n return $this->_has(2);\n }", "private function validateBatchArray($data) : bool\n {\n if(gettype($data)!='array')\n {\n throw new Exception(\"column is not valid : columns should be array\");\n }\n foreach($data as $column)\n {\n foreach(array_keys($column) as $key)\n {\n if(!in_array($key,['name','source']))\n {\n throw new Exception(\"column is not valid : this key is unusable '$key'\");\n }\n }\n }\n }", "public function check($value): bool\n {\n $this->requireParameters(['table', 'column']);\n\n // getting parameters\n $column = $this->parameter('column');\n $table = $this->parameter('table');\n $except = $this->parameter('except');\n\n if ($except AND $except == $value) {\n return true;\n }\n\n $result = Capsule::table($table)->where($column,'=',$value)->count();\n return $result > 0 ? false : true;\n }", "protected function field_is_set($column_name) {\n \t\treturn isset($this->$column_name);\n\t}", "private function columnExists($value) : bool\n {\n return Schema::hasColumn($this->model->getTable(), $value);\n }", "protected function checkForForbiddenColumns()\n {\n $forbiddenKeys = Config::get('asseco-json-query-builder.global_forbidden_columns');\n $forbiddenKeys = $this->modelConfig->getForbidden($forbiddenKeys);\n\n if (in_array($this->column, $forbiddenKeys)) {\n throw new JsonQueryBuilderException(\"Searching by '$this->column' field is forbidden. Check the configuration if this is not a desirable behavior.\");\n }\n }", "static private function checkConditionalRule($class, &$values, $main_columns, $conditional_values, $conditional_columns)\n\t{\n\t\t$check_for_missing_values = FALSE;\n\t\t\n\t\tforeach ($main_columns as $main_column) {\n\t\t\t$matches_conditional_value = $conditional_values !== NULL && in_array($values[$main_column], $conditional_values);\n\t\t\t$has_some_value = $conditional_values === NULL && strlen((string) $values[$main_column]);\n\t\t\tif ($matches_conditional_value || $has_some_value) {\n\t\t\t\t$check_for_missing_values = TRUE;\n\t\t\t\tbreak;\t\n\t\t\t}\t\n\t\t}\n\t\t\n\t\tif (!$check_for_missing_values) {\n\t\t\treturn;\t\n\t\t}\n\t\t\n\t\t$messages = array();\n\t\tforeach ($conditional_columns as $conditional_column) {\n\t\t\tif ($values[$conditional_column] !== NULL) { continue; }\n\t\t\t$messages[$conditional_column] = self::compose(\n\t\t\t\t'%sPlease enter a value',\n\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $conditional_column))\n\t\t\t);\n\t\t}\n\t\tif ($messages) {\n\t\t\treturn $messages;\n\t\t}\n\t}", "public function set($column, $value = null)\n {\n if (is_array($column)) {\n foreach ($column as $key => $val) {\n $this->set($key, $val);\n }\n\n return;\n }\n\n $key = key($this->rows);\n $newrow = isset($this->rows[$key][self::NEW_ROW]);\n\n if (!in_array($column, $this->writableColumns)) {\n if ($this->throwErrUndefCol) {\n throw new Exception(\n 'Column \"' . $column . '\" is not writable.',\n E_USER_WARNING\n );\n }\n\n return;\n } elseif (empty($this->rows)) {\n $this->rows[] = [\n self::NEW_ROW => true,\n self::CHANGED_COLUMNS => [],\n ];\n $key = key($this->rows);\n $newrow = true;\n }\n\n $oldvalue = $this->rows[$key][$column] ?? null;\n\n $this->rows[$key][$column] = (\n isset($this->hookedColumns[$column])\n && method_exists($this, $this->hookedColumns[$column])\n ) ? call_user_func(\n [$this, $this->hookedColumns[$column]],\n $value\n ) : $value;\n\n if (\n $newrow\n || ($oldvalue != $value)\n || (is_null($oldvalue) && !is_null($value))\n || (!is_null($oldvalue) && is_null($value))\n ) {\n $this->rows[$key][self::CHANGED_COLUMNS] = array_unique(\n array_merge(\n $this->rows[$key][self::CHANGED_COLUMNS] ?? [],\n [$column]\n )\n );\n }\n }", "public function executeValueModifierInvalidDataProvider() {}", "protected function checkColumns()\n {\n $this->getHeaders();\n $headerCount = count($this->headers);\n\n return true;\n }", "protected function validateElementValues() {\n \t\t// Iterate over all fields\n \tforeach ( self::$mandatoryFields as $field ) {\n \t\t// If the field does not exist then exit with exception\n \t\tif ( array_key_exists($field, $this->attributes) ) {\n \t\t\t$value = (int) $this->attributes[$field];\n \t\t\tif ( $value < 0 ) {\n \t\t\t\tthrow new \\SVGCreator\\SVGException(\"The \".$field.\" value is lesser than 0, in element \".self::TYPE, 1);\n \t\t\t}\n \t\t}\n \t}\n \t}", "private function determineColumnValue($column, &$value, &$args = array()) {\n if($this->isLastColumn($column)) return false;\n // stash value\n $org_val = \"$value\";\n // extract args into scope\n extract($args,EXTR_SKIP|EXTR_REFS);\n $val_var = strtolower($this->VK($column));\n if(isset($$val_var)) { // double $ on purpose, looking for var passed in args with same name ($size for col1)\n // $size for initial column 1\n $sku_val = @$$val_var; // the value parsed from the sku\n $val_arr = $this->VV($column);\n $test_val = $val_arr[$sku_val];\n $value = $test_val;\n // should take care of switching for key (proper value)\n return $this->modColumnValue($column, $value, $args);\n } // not passed in args, determine elsewehere -- look for determinite function\n elseif(method_exists($this, ($det_method = \"determine\".str_replace(\" \",\"\",ucwords($val_var))))) { \n return !!$this->{$det_method}($value,$args, 'ajax_determine_'.str_replace(\" \",\"_\",strtolower($val_var)));\n return (strcmp($org_val,$value)!==0);\n // ShopifyStandard::diedump($org_opts,$mod_opts);\n \n // takes too long to do on one request. Throw to view, and ajax it\n // return $this->{$det_method}($value, $args);\n } else {\n // cannot be determined, error out, return false... yatta yatta\n return !$this->setState(\"indeterminate_value_error\",\"Unable to Determine Proper Value for \".ucfirst($val_var), array(\n \"column\" => $column,\n \"value\" => $value,\n \"args\" => $args\n ));\n }\n }", "#[\\ReturnTypeWillChange]\n public function valid()\n {\n return isset($this->values[$this->cursor]);\n }", "public function selectAndCheck($values) {\n $types = $this->getFieldTypes(array_keys($values));\n\n $query = 'SELECT '. implode (', ', array_keys($values)). ' FROM '.$this->table;\n $result = $this->db->queryRow($query, $types, MDB2_FETCHMODE_ASSOC);\n foreach ($values as $name => $value) {\n $this->assertEquals($result[$name], $values[$name], 'Error in '.$types[$name].' value: incorrect conversion');\n }\n }", "protected function needsValue(): bool\n {\n // check simple conditions first\n if ($this->save() === false || $this->isRequired() === false || $this->isEmpty() === false) {\n return false;\n }\n\n // check the data of the relevant fields if there is a `when` option\n if (empty($this->when) === false && is_array($this->when) === true) {\n $formFields = $this->formFields();\n\n if ($formFields !== null) {\n foreach ($this->when as $field => $value) {\n $field = $formFields->get($field);\n $inputValue = $field !== null ? $field->value() : '';\n\n // if the input data doesn't match the requested `when` value,\n // that means that this field is not required and can be saved\n // (*all* `when` conditions must be met for this field to be required)\n if ($inputValue !== $value) {\n return false;\n }\n }\n }\n }\n\n // either there was no `when` condition or all conditions matched\n return true;\n }", "public function columnsValues($columns, $values = null)\n {\n $novalues = false; // Variable pour forcer le faite de ne pas prendre en compte $values\n if (!is_array($columns)) {\n $columns = array($columns);\n } else {\n if (is_assoc($columns)) {\n $novalues = true;\n $tmpTab = $columns;\n $columns = array();\n foreach ($tmpTab as $key => $value) {\n $columns[] = $key;\n $values[] = $value;\n }\n } else {\n if ($values == null && sizeof($columns) == sizeof($values) && sizeof($values) > 0) {\n return new Error(7);\n }\n }\n }\n if (!$novalues) {\n if ($values != null) {\n if (!is_array($values)) {\n $values = array($values);\n } else {\n if (is_assoc($values)) {\n return new Error(8);\n }\n }\n } else {\n echo \"prout !!\";\n\n return new Error(5);\n }\n }\n\n $this->columns = array_merge($this->columns, $columns);\n $this->values = array_merge($this->values, $values);\n\n return $this;\n }", "public function hasValues()\n {\n return !empty($this->values);\n }", "function _columnIsSet($row, $dbc, $column_name)\n{\n\tif ( !strcmp($dbc[$column_name], \"not defined\") )\n\t\treturn false;\n\treturn ( trim($row[$dbc[$column_name]]) != \"\" );\n}", "public function testColumnValid()\n {\n $expected = [\n 0 => 'T',\n 1 => 'S',\n 2 => 'T',\n ];\n\n $this->assertEquals(\n $expected,\n $this->Board->column(2),\n 'Requesting a valid ::column() should produce the expected subset array.'\n );\n }", "protected function ValidateRequiredValue($column, $columnType, $value) {\n\t\t\n\t\t$statusCode = STATUS_CODE_OK;\n\t\t$retMsg = \"\";\n\t\tif(strlen($value) == 0) {\n\t\t\t\n\t\t\t$statusCode = STATUS_CODE_ERROR;\n\t\t\t$retMsg = \"{MSG_FIELD_EMPTY_REQUIRED}\";\n\t\t}\n\t\t\n\t\treturn $this->GetResponseJsonValidation($column, $columnType, $statusCode, $retMsg);\n\t}", "protected function verifyMetaDesc($value, array $column)\n {\n }", "public function getAcceptNonScalarValue(): bool;", "public function testIsValid()\n {\n $this->assertTrue($this->uut->setValue(new ScalarValue('bar'))->isValid());\n $this->assertTrue($this->uut->setValue(new ScalarValue())->isValid());\n $this->assertFalse($this->uut->setValue(new ScalarValue('foo'))->isValid());\n }", "public function validate_column($column)\n {\n }", "public function validate()\n {\n return is_scalar($this->getValue());\n }", "private function checkOptional()\n {\n if (empty($this->exception->getErrors())) {\n $has_default_value = $this->parameter->isDefaultValueAvailable();\n\n if ($this->optional) {\n if (!$has_default_value) {\n $this->exception->addError('The @argument of the @function must be optional.');\n }\n } else {\n if ($has_default_value) {\n $this->exception->addError('The @argument of the @function must not be optional.');\n }\n }\n }\n }", "function is_valid_value($tableName,$fieldName,$value) {\n\n $mysqlTypes = [\n \"numeric\"=>[\n \"int\",\"tinyint\",\"smallint\",\"mediumint\",\"int\",\"bigint\",\"decimal\",\"float\",\"double\",\"real\",\"bit\",\"boolean\",\"serial\"\n ],\n \"date\"=>[\n \"date\",\"datetime\",\"timestamp\",\"time\",\"year\"\n ],\n \"string\"=>[\n \"char\",\"varchar\",\"tinytext\",\"text\",\"mediumtext\",\"longtext\",\n \"binary\",\"varbinary\",\"tinyblob\",\"mediumblob\",\"blob\",\"longblob\",\"enum\",\"set\"\n ],\n \"spatial\"=>[\n \"geometry\",\"point\",\"linestring\",\"polygon\",\"multipoint\",\"multilinestring\",\"multipolygon\",\"geometrycollection\"\n ],\n \"json\"=>[\"json\"]\n ];\n // $boolValid = array(\"1\"=>true,\"0\"=>false,1=>true,0=>false,true=>true,false=>false,\"true\"=>true,\"false\"=>false);\n\n if(!$this->is_valid_field($tableName,$fieldName))\n throw new \\Exception(\"Invalid field $tableName.$fieldName\",400);\n\n $fields = $this->getResourceFields($tableName);\n\n if($value===\"\") {\n if(in_array($fields[$fieldName][\"type\"][\"proto\"],$mysqlTypes[\"numeric\"]))\n $value = null;\n elseif (in_array($fields[$fieldName][\"type\"][\"proto\"],$mysqlTypes[\"date\"]))\n $value = null;\n }\n\n // ToDO: implement length check\n // $length = property_exists($fields->$fieldName->type,\"length\") ? $fields->$fieldName->type->length : null;\n\n if(!$fields[$fieldName][\"required\"] && is_null($value))\n return null;\n\n //print_r($value);\n\n if(is_object($value)) {\n if (array_key_exists(\"foreignKey\", $fields[$fieldName])\n && $fields[$fieldName][\"foreignKey\"][\"table\"] == $value->data->type) {\n return $value;\n }\n else\n throw new \\Exception(\"Invalid object as field value for $tableName.$fieldName\",400);\n\n }\n\n switch($fields[$fieldName][\"type\"][\"proto\"]) {\n case \"float\":\n if(is_numeric($value))\n $value =floatval($value);\n if(in_array(gettype($value), [\"float\",\"double\",\"integer\"]))\n return $value;\n break;\n // numeric types\n case \"smallint\":\n case \"mediumint\":\n case \"int\":\n case \"bigint\":\n case \"decimal\":\n case \"tinyint\":\n if(is_numeric($value)) {\n return $value*1;\n }\n break;\n case \"real\":\n case \"bit\":\n case \"double\":\n if(is_numeric($value)) {\n return floatval($value);\n }\n break;\n case \"boolean\":\n// var_dump($value);\n if(is_bool($value)) {\n return boolval($value);\n }\n $boolmap = [\"true\"=>true,\"1\"=>true,\"0\"=>false,\"false\"=>false];\n if(isset($boolmap[$value]))\n return $boolmap[$value];\n break;\n case \"serial\":\n if(is_numeric($value)) {\n return $value;\n }\n break;\n // DATE & TIME\n case \"datetime\":\n if(preg_match(\"/^\\d{4}\\-\\d{2}\\-\\d{2} \\d{2}\\:\\d{2}\\:\\d{2}$/\",$value))\n return $value;\n break;\n case \"date\":\n if(preg_match(\"/^\\d{4}\\-\\d{2}\\-\\d{2}$/\",$value))\n return $value;\n break;\n case \"timestamp\":\n if(preg_match(\"/^\\d{4}\\-\\d{1,2}-\\d{1,2}( \\d{1,2}:\\d{1,2}:\\d{1,2}){0,1}$/i\",$value)) {\n log_message(\"debug\",\"valid timestamp \".$value);\n return $value;\n }\n log_message(\"debug\",\"invalid timestamp \".$value);\n\n break;\n case \"time\":\n if(preg_match(\"/^\\-?\\d{2,3}:\\d{2}:\\d{2}$/i\",$value))\n return $value;\n break;\n case \"year\":\n if(is_numeric($value) && ($value*1)<9999)\n return $value;\n break;\n // TEXT\n case \"char\":\n return $value;\n case \"varchar\":\n return $value;\n case \"tinytext\":\n return $value;\n case \"text\":\n return $value;\n case \"mediumtext\":\n return $value;\n case \"longtext\":\n return $value;\n case \"binary\":\n return $value;\n case \"varbinary\":\n return $value;\n case \"tinyblob\":\n return $value;\n case \"mediumblob\":\n return $value;\n case \"blob\":\n return $value;\n case \"longblob\":\n return $value;\n // SET\n case \"set\":\n if(in_array($value,$fields[$fieldName][\"type\"][\"vals\"]))\n return $value;\n break;\n case \"enum\":\n if(in_array($value,$fields[$fieldName][\"type\"][\"vals\"]))\n return $value;\n break;\n default:\n throw new \\Exception(\"Invalid type in configuration file for $fieldName\",500);\n\n }\n\n // check if field is required but value is null and set error message accordingly\n if($fields[$fieldName][\"required\"] && is_null($value)) {\n $msg = \"Field $tableName.$fieldName is required\";\n }\n else {\n $msg = \"Invalid type of value '$value' for field $tableName.$fieldName\";\n }\n\n throw new \\Exception($msg,400);\n }", "static private function checkOnlyOneRule($schema, $class, &$values, $columns)\n\t{\n\t\tsettype($columns, 'array');\n\t\t\n\t\t$column_names = array();\n\t\tforeach ($columns as $column) {\n\t\t\t$column_names[] = fORM::getColumnName($class, $column);\n\t\t}\n\t\t\n\t\t$found_value = FALSE;\n\t\tforeach ($columns as $column) {\n\t\t\tif (self::hasValue($schema, $class, $values, $column)) {\n\t\t\t\tif ($found_value) {\n\t\t\t\t\treturn self::compose(\n\t\t\t\t\t\t'%sPlease enter a value for only one',\n\t\t\t\t\t\tfValidationException::formatField(join(', ', $column_names))\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$found_value = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$found_value) {\n\t\t\treturn self::compose(\n\t\t\t\t'%sPlease enter a value for one',\n\t\t\t\tfValidationException::formatField(join(', ', $column_names))\n\t\t\t);\t\n\t\t}\t\n\t}", "public function getAcceptNonScalarValue()\n {\n return true;\n }", "function check_column($table_name, $col_name, $col_type, $is_null = \\null, $key = \\null, $default = \\null, $extra = \\null)\n{\n}", "public function valid()\r\n {\r\n return isset($this->tableData[key($this->tableData)]);\r\n }", "protected function validateColumnSettings(array &$info)\n {\n $type = (isset($info['type'])) ? $info['type'] : null;\n switch ($type) {\n // some types need massaging, some need other required properties\n case 'bit':\n case 'tinyint':\n case 'smallint':\n case 'mediumint':\n case 'int':\n case 'bigint':\n if (!isset($info['type_extras'])) {\n $length =\n (isset($info['length']))\n ? $info['length']\n : ((isset($info['precision'])) ? $info['precision']\n : null);\n if (!empty($length)) {\n $info['type_extras'] = \"($length)\"; // sets the viewable length\n }\n }\n\n $default = (isset($info['default'])) ? $info['default'] : null;\n if (isset($default) && is_numeric($default)) {\n $info['default'] = intval($default);\n }\n break;\n\n case 'decimal':\n case 'numeric':\n case 'real':\n case 'float':\n case 'double':\n if (!isset($info['type_extras'])) {\n $length =\n (isset($info['length']))\n ? $info['length']\n : ((isset($info['precision'])) ? $info['precision']\n : null);\n if (!empty($length)) {\n $scale =\n (isset($info['decimals']))\n ? $info['decimals']\n : ((isset($info['scale'])) ? $info['scale']\n : null);\n $info['type_extras'] = (!empty($scale)) ? \"($length,$scale)\" : \"($length)\";\n }\n }\n\n $default = (isset($info['default'])) ? $info['default'] : null;\n if (isset($default) && is_numeric($default)) {\n $info['default'] = floatval($default);\n }\n break;\n\n case 'char':\n case 'nchar':\n case 'binary':\n $length = (isset($info['length'])) ? $info['length'] : ((isset($info['size'])) ? $info['size'] : null);\n if (isset($length)) {\n $info['type_extras'] = \"($length)\";\n }\n break;\n\n case 'varchar':\n case 'nvarchar':\n case 'varbinary':\n $length = (isset($info['length'])) ? $info['length'] : ((isset($info['size'])) ? $info['size'] : null);\n if (isset($length)) {\n $info['type_extras'] = \"($length)\";\n } else // requires a max length\n {\n $info['type_extras'] = '(' . static::DEFAULT_STRING_MAX_SIZE . ')';\n }\n break;\n\n case 'time':\n case 'timestamp':\n case 'datetime':\n $default = (isset($info['default'])) ? $info['default'] : null;\n if ('0000-00-00 00:00:00' == $default) {\n // read back from MySQL has formatted zeros, can't send that back\n $info['default'] = 0;\n }\n\n $length = (isset($info['length'])) ? $info['length'] : ((isset($info['size'])) ? $info['size'] : null);\n if (isset($length)) {\n $info['type_extras'] = \"($length)\";\n }\n break;\n }\n }", "protected function _checkDBIntegrity()\n {\n // Get enum values in DB\n $command = (new \\yii\\db\\Query())\n ->select( $this->getDBField() )\n ->from( $this->getDBTable() );\n // Let's see if there's a condition\n if( $this->getDBCondition() != '' )\n $command->where( $this->getDBCondition() );\n // Query values\n $dbValues = $command->all();;\n // Get declared enum values\n $enumValues = parent::_getValidValues();\n // Check that number of items match\n //$dbVals = implode(\";\",$dbValues);\n //$enumVals = implode(\";\",$enumValues);\n if( count( $enumValues ) != count( $dbValues ) )\n {\n Yii::log( 'Enum \"' . $this->_getEnumName() . '\" integrity failed. Enum count values mismatch', CLogger::LEVEL_ERROR, self::$MY_LOG_CATEGORY );\n throw new Exception( \"Failed integrity check for enum in DB\");\n }\n // Check that all constants are inside the DB\n // Hard to reproduce since it's impossible if the Enum value is a PK\n // in the table\n foreach( $enumValues as $value )\n {\n if( !( $this->_isEnumValueInDBResults( $value, $dbValues ) ) )\n {\n Yii::log( 'Enum \"' . $this->_getEnumName() . '\" integrity failed. Value \"' . $value . '\" not found in DB', CLogger::LEVEL_ERROR, self::$MY_LOG_CATEGORY );\n throw new Exception( \"Failed integrity check for enum in db\" );\n }\n }\n // Check that all db values are valid enum constants\n foreach( $dbValues as $value )\n {\n if( !parent::_isValidValue( $value[$this->getDBField()] ) )\n {\n Yii::log( 'Enum \"' . $this->_getEnumName() . '\" integrity failed. Value \"' . $value . '\" not found in Enum', CLogger::LEVEL_ERROR, self::$MY_LOG_CATEGORY );\n throw new Exception( \"Failed integrity check for enum in db\" );\n }\n }\n $this->_isDBChecked = true;\n return true;\n }", "public function isValid(): bool\n {\n $value = $this->field->getValue();\n\n if (is_array($value) || is_object($value)) {\n throw new Exception(\"This validator only works on scalar types!\");\n }\n\n // required but not given.\n if ($this->required && strval($value) === \"\") {\n return false;\n } // if the field is not required and the value is empty, then it's also valid\n elseif (!$this->required && strval($value) === '') {\n return true;\n }\n\n // check if the field contains a valid number value.\n if (!preg_match($this->getRegex(), $value)) {\n return false;\n }\n\n // check if the value is not to low.\n if ($this->isValueTooLow(floatval($value))) {\n return false;\n }\n\n // check if the value is not to high.\n if ($this->isValueTooHigh(floatval($value))) {\n return false;\n }\n\n return true;\n }", "private function validateFields() {\n\t\t// get paths and their data types\n\t\t$conn = $this->col->getClient()->connection();\n\t\t$rows = $conn->table(Client::T_INDEX)\n\t\t\t\t\t->select($conn->raw('distinct(path)'), 'typ')\n\t\t\t\t\t->whereIn('path', array_keys($this->fields))\n\t\t\t\t\t->get();\n\n\t\t// quick comparison. can be changed for a more descriptive\n\t\t// error by comparing values in both lists\n\t\tif(sizeof($rows) != sizeof($this->fields)) {\n\t\t\tthrow new Exception(\"Error: One or more JSON paths don't exist\");\n\t\t}\n\n\t\treturn $rows;\n\t}", "private function checkData() {\r\n if (in_array('', $this->Data)):\r\n $this->Error = [\"Existem campos em branco. Favor preencha todos os campos!\", WS_ALERT];\r\n $this->Result = false;\r\n else:\r\n $this->Result = true;\r\n endif;\r\n }", "public static function valueIsValid($_value)\n\t{\n\t\treturn in_array($_value,array(self::VALUE_AGGREGATED,self::VALUE_DETAIL));\n\t}", "protected function verifyMetaTags($value, array $column)\n {\n }", "static public function hasValue($schema, $class, &$values, $column)\n\t{\n\t\t$value = $values[$column];\n\t\t\n\t\tif ($value === NULL) {\n\t\t\treturn FALSE;\t\n\t\t}\n\t\t\n\t\t$table = fORM::tablize($class);\n\t\t$data_type = $schema->getColumnInfo($table, $column, 'type');\n\t\t$allows_null = !$schema->getColumnInfo($table, $column, 'not_null');\n\t\t\n\t\tif ($allows_null) {\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\tswitch ($data_type) {\n\t\t\tcase 'blob':\n\t\t\tcase 'char':\n\t\t\tcase 'text':\n\t\t\tcase 'varchar':\n\t\t\t\tif ($value === '') {\n\t\t\t\t\treturn FALSE;\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'boolean':\n\t\t\t\tif ($value === FALSE) {\n\t\t\t\t\treturn FALSE;\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'integer':\n\t\t\t\tif ($value === 0 || $value === '0') {\n\t\t\t\t\treturn FALSE;\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'float':\n\t\t\t\tif (preg_match('#^0(\\.0*)?$|^\\.0+$#D', $value)) {\n\t\t\t\t\treturn FALSE;\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "static private function checkDataType($class, $column, $value)\n\t{\n\t\t$table = fORM::tablize($class);\n\t\t$schema = fORMSchema::retrieve($class);\n\t\t$column_info = $schema->getColumnInfo($table, $column);\n\t\t\n\t\tif ($value !== NULL) {\n\t\t\tswitch ($column_info['type']) {\n\t\t\t\tcase 'varchar':\n\t\t\t\tcase 'char':\n\t\t\t\tcase 'text':\n\t\t\t\tcase 'blob':\n\t\t\t\t\tif (!is_string($value) && !is_numeric($value)) {\n\t\t\t\t\t\treturn self::compose(\n\t\t\t\t\t\t\t'%sPlease enter a string',\n\t\t\t\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column))\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'integer':\n\t\t\t\t\tif (!is_numeric($value)) {\n\t\t\t\t\t\treturn self::compose(\n\t\t\t\t\t\t\t'%sPlease enter a whole number',\n\t\t\t\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column))\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'float':\n\t\t\t\t\tif (!is_numeric($value)) {\n\t\t\t\t\t\treturn self::compose(\n\t\t\t\t\t\t\t'%sPlease enter a number',\n\t\t\t\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column))\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'timestamp':\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew fTimestamp($value);\t\n\t\t\t\t\t} catch (fValidationException $e) {\n\t\t\t\t\t\treturn self::compose(\n\t\t\t\t\t\t\t'%sPlease enter a date/time',\n\t\t\t\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column))\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'date':\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew fDate($value);\t\n\t\t\t\t\t} catch (fValidationException $e) {\n\t\t\t\t\t\treturn self::compose(\n\t\t\t\t\t\t\t'%sPlease enter a date',\n\t\t\t\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column))\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'time':\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew fTime($value);\t\n\t\t\t\t\t} catch (fValidationException $e) {\n\t\t\t\t\t\treturn self::compose(\n\t\t\t\t\t\t\t'%sPlease enter a time',\n\t\t\t\t\t\t\tfValidationException::formatField(fORM::getColumnName($class, $column))\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "function _check_dataset($multiple, $col_types)\r\n{\r\n\tif (($this->active_plots > 1) and (!$multiple))\r\n\t\t{\r\n\t\t$this->_error(JText::_('COM_PLOTALOT_ERROR_ONLY_ONE_PLOT'));\r\n\t\treturn false;\r\n\t\t}\r\n\r\n// add the extra column types to the supplied array of column types\r\n\r\n\tforeach ($this->extra_column_array as $extra_column)\r\n\t\t{\r\n\t\t$extra_data_type = self::extraColumnDataType($extra_column);\r\n\t\tif ($extra_data_type == 'boolean')\t\t// boolean requires a numeric column\r\n\t\t\t$extra_data_type = 'number';\r\n\t\t$col_types[] = $extra_data_type;\t\t// add a new array element\r\n\t\t}\r\n\r\n// check the column type requirenents for each dataset\r\n\r\n\tforeach ($this->datasets as $p => $dataset)\r\n\t\t{\r\n\t\t$columns_required = count($col_types);\r\n\t\tif ($dataset['num_columns'] < $columns_required)\r\n\t\t\t{\r\n\t\t\t$this->_error(JText::sprintf('COM_PLOTALOT_ERROR_REQUIRES_X_COLUMNS',$columns_required));\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\r\n\t\tforeach ($col_types as $column => $col_type)\r\n\t\t\tswitch ($col_type)\r\n\t\t\t\t{\r\n\t\t\t\tcase 'either':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\tif (!$dataset['numeric'][$column])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->_error(JText::sprintf('COM_PLOTALOT_ERROR_COLUMN_X_NUMERIC',$column+1).'<br />'.\r\n\t\t\t\t\t\tJText::_('COM_PLOTALOT_PLOT').' '.($p + 1).' '.$this->_datatype_message($p, $column));\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'string':\t\t// as of version 5.0 we no longer enforce this because a number can always be made into a string\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t}\r\n\r\n\treturn true;\r\n}", "final public static function isColType($value):bool\n {\n return is_string($value) && array_key_exists($value,static::$config['col']);\n }", "protected function checkValueStructure(BaseValue $value): void\n {\n parent::checkValueStructure($value);\n }", "public function setRowData($column, $value)\n\t{\n\t\tif (is_string($value))\n\t\t{\n\t\t\t//sanitiza string\n\t\t\t//atribui\n\t\t\t$this->columnValues[$column] = \"'{$value}'\";\n\t\t}\n\t\telse if(is_bool($value))\n\t\t{\n\t\t\t//caso seja booleano\n\t\t\t$this->columnValues[$column] = $value ? 'TRUE' : 'FALSE';\n\t\t} \n\t\telseif(is_float($value))\n\t\t{\n\t\t $this->columnValues[$column] = (float)$value;\n\t\t}\n\t\telseif(is_int($value))\n\t\t{\n\t\t $this->columnValues[$column] = (int)$value;\n\t\t}\n\t\telse if(isset($value))\n\t\t{\n\t\t\t//caso seja outro tipo de dado\n\t\t\treturn @$this->columnValues[$column];\n\t\t}\n\t\telse\n\t {\n\t\t $this->columnValues[$column]=\"null\"; \n\t\t}\n\t}", "public function verify_value($array, $key) {\n\t\tif(isset($array[$key])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthrow new Exception(sprintf('Setting [%s] must be present in array', $key));\n\t\t}\n\t}", "public function testValidationCaseForSettingNonExistentProperty()\n {\n $structure = $this->getDataStructureForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $structure->test = 1234;\n } else {\n $hasThrown = null;\n\n try {\n $structure->test = 1234;\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "public function validate()\n {\n foreach ($this->arrFieldMapping as $strColumnName => $arrFieldMap) {\n $strFormattedColumn = ucfirst(str_replace(\"_\", \" \", $strColumnName));\n $strFormattedColumn = ucfirst(join(preg_split('/(?<=[a-z])(?=[A-Z])/x', $strColumnName), \" \"));\n if ($arrFieldMap['required'] === 'true') {\n if (trim($this->{$arrFieldMap['accessor']}()) === \"\") {\n $this->validationFailures[] = $strFormattedColumn . \" is missing\";\n }\n }\n }\n return count($this->validationFailures) > 0 ? false : true;\n }", "public function invalidParameterTypesPassedToBindValueThrowsExceptionDataProvider() {}", "protected function _validateNumber($value, $column) {\n\t\t// Not much to check, since 0 is falsy but also a valid integer value.\n\t\tif (is_null($value)) {\n\t\t\tthrow new Garp_Model_Validator_Exception(\n\t\t\t\tsprintf(__('%s is a required field'), __(Garp_Util_String::underscoredToReadable($column)))\n\t\t\t);\n\t\t}\n\t}", "public function hasValues() {\n\t\treturn $this->isSet_low || $this->isSet_high;\n\t}", "public function hasScalarTypedValues() {\n\t\treturn false;\n\t}", "public function validate() {\n\t\tif (!Definition\\PropertyDefinition::exists($this->key)) {\n\t\t\tthrow new \\Exception('Invalid property: \\'' . $this->key . '\\'');\n\t\t}\n\n\t\tif (!$this->getDefinition()->validateValue($this->value)) {\n\t\t\tthrow new \\Exception('Invalid property value: \\'' . $this->value . '\\'');\n\t\t}\n\t}", "public function testSimpleFetchValueMultipleColumns()\n {\n $this->_populateTestData();\n $result = $this->_object->simpleFetchValue('name,email', 'users', \"id=1\");\n\n $this->assertEquals('jansen', $result);\n }", "public function testSimpleFetchValueMultipleColumns()\n {\n $this->_populateTestData();\n $result = $this->_object->simpleFetchValue('name,email', 'users', \"id=1\");\n\n $this->assertEquals('jansen', $result);\n }", "public function testThrowingForMultipleFluidColumns()\n {\n $this->expectException(InvalidColumnFormat::class);\n $this->expectExceptionMessage('Only one fluid column allowed.');\n $this->expectExceptionCode(AmpCliException::E_ANY);\n\n throw InvalidColumnFormat::forMultipleFluidColumns();\n }", "public function hasParameterValues()\n {\n return count($this->parameterValues) > 0;\n }", "function checkValue($val)\n {\n return !empty($val) && !is_null($val);\n }", "public function hasValues()\n {\n return !empty($this->data->keys);\n }", "public function __set($name, $value) {\n throw new coding_exception('database_column_info is a ready only object to allow for faster caching.');\n }", "public function test_value_getset(){\n\t\t$cell = new Cell(3, 2, 1); //visually row \"3\", col \"2\"\n\n\t\t//lets get the value, should return 3, which asserts true.\n\t\t$this->assertTrue(3 == $cell->getValue());\n\n\t\t//lets test the setter, and get it\n\t\t$value = 6;\n\t\t$cell->setValue($value);\n\t\t$this->assertTrue(6 == $cell->getValue());\n\t}", "function testColsGivenDefaultColsExpectsGivenValuesUsed() {\n\t\t// Arrange\n\t\t$field['params'] = array('cols' => 1);\n\t\t$expected = 1;\n\n\t\t// Act\n\t\t$View = new View();\n\t\t$actual = $View->default_cols($field);\n\n\t\t// Assert\n\t\t$this->assertEquals($expected, $actual, 'Number of columns should be ' . $expected . ' but was ' . $actual);\n\t}", "function haveValues(){\n \t\tif($this->currentRow >= $this->rows){\n \t\t\treturn false;\n \t\t}else{\n \t\t\treturn true;\n \t\t}\n \t}", "function table_check(&$columns){\n\t\t$ok = true;\n\t\t\n\t\t$col_names = array_keys($columns);\n\t\t\n\t\tforeach($col_names as $col_name){\n\t\t\t\n\t\t\t\n\t\t\tif(!array_key_exists($col_name, $this->columns)){\n\t\t\t\t$ok = false;\n\t\t\t\t$this->add_error(\"The \\\"$col_name\\\" column does not exist in the \\\"$this->name\\\" table of the \\\"$this->dbname\\\" database.\");\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t$ok = $this->columns[$col_name]->check_type($columns[$col_name]);\n\t\t\t}\n\t\t}\n\t\treturn $ok;\n\t}", "public function hasValues() {\n foreach ($this->data as $name => $value) {\n if (count($value)) return true;\n }\n return false;\n }", "protected function assureFields()\n {\n $field_name_list = func_get_args();\n foreach($field_name_list as $field_name)\n {\n if(is_array($field_name))\n {\n call_user_func_array(array($this,__FUNCTION__),$field_name);\n }else{\n if(!$this->hasField($field_name))\n {\n throw InvalidArgumentException(sprintf('no field with name \"%s\" found',$field_name));\n }//if\n }//if/else\n }//foreach\n \n }", "public function isValues()\n {\n if (!is_null($this->values)) return !!count($this->values);\n\n return !!count($this->getValuesList());\n }" ]
[ "0.70301455", "0.6461028", "0.62639874", "0.6246001", "0.6122254", "0.6032868", "0.59841454", "0.59193605", "0.5840347", "0.5815793", "0.5787817", "0.5786418", "0.5781438", "0.576198", "0.570042", "0.564009", "0.5624674", "0.5594943", "0.5590177", "0.55808616", "0.5575952", "0.556944", "0.5569413", "0.5533591", "0.5516291", "0.5512772", "0.5506341", "0.55022997", "0.5500636", "0.5492189", "0.54865104", "0.5485676", "0.5485676", "0.54842937", "0.5478861", "0.54753506", "0.54694134", "0.54687434", "0.54529625", "0.544403", "0.5420071", "0.54162276", "0.5404499", "0.5391332", "0.53842837", "0.53814125", "0.5376171", "0.53545755", "0.53463435", "0.5338279", "0.53355706", "0.53314704", "0.53287125", "0.5319042", "0.5313323", "0.53113544", "0.53069824", "0.5304936", "0.5286909", "0.52813745", "0.52735835", "0.5266445", "0.5239718", "0.5226856", "0.52219975", "0.52190727", "0.52174866", "0.5215978", "0.52140176", "0.5212012", "0.52112424", "0.5207944", "0.5197766", "0.5197155", "0.5196221", "0.5195676", "0.51902115", "0.51857454", "0.5181478", "0.5181413", "0.5177521", "0.5162751", "0.51543325", "0.5145303", "0.51395094", "0.513743", "0.51354355", "0.51354355", "0.5132628", "0.5128874", "0.5126965", "0.51261395", "0.5121441", "0.51153255", "0.51141524", "0.5110358", "0.5110239", "0.51065713", "0.51053566", "0.5105241" ]
0.7719056
0
Returns name of cache config which need to be used for storing result into cache.
Возвращает имя конфигурации кэша, которая должна быть использована для хранения результата в кэше.
private function getCacheName() { return Connection::connection($this->connectionName)->getCacheName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function name(): string\n {\n return 'Configuration is not cached';\n }", "public function nameTheCache()\n {\n return $this->cacheFile;\n }", "protected static function getCacheName() {\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName)) {\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "protected static function getCacheName() {\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName)) {\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "protected static function getCacheName() {\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName)) {\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "protected static function getCacheName()\r\n\t{\r\n\t\tstatic $strCacheName;\r\n\t\tif (!isset($strCacheName))\r\n\t\t{\r\n\t\t\t$strCacheName = __CLASS__;\r\n\t\t}\r\n\t\treturn $strCacheName;\r\n\t}", "protected static function getCacheName()\r\n\t{\r\n\t\tstatic $strCacheName;\r\n\t\tif (!isset($strCacheName))\r\n\t\t{\r\n\t\t\t$strCacheName = __CLASS__;\r\n\t\t}\r\n\t\treturn $strCacheName;\r\n\t}", "protected static function getCacheName()\r\n\t{\r\n\t\tstatic $strCacheName;\r\n\t\tif (!isset($strCacheName))\r\n\t\t{\r\n\t\t\t$strCacheName = __CLASS__;\r\n\t\t}\r\n\t\treturn $strCacheName;\r\n\t}", "protected static function getCacheName()\r\n\t{\r\n\t\tstatic $strCacheName;\r\n\t\tif (!isset($strCacheName))\r\n\t\t{\r\n\t\t\t$strCacheName = __CLASS__;\r\n\t\t}\r\n\t\treturn $strCacheName;\r\n\t}", "public function getCachedConfigPath(): string\n {\n return $this->cachePath('config.php');\n }", "protected static function getCacheName()\n\t{\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName))\n\t\t{\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "protected static function getCacheName()\n\t{\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName))\n\t\t{\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "public static function config_cache_file() {\n\t\t\treturn self::path('config', self::$names['config']['cache']);\n\t\t}", "public function getCacheKey()\n {\n // See if there is a cache option\n $cacheFor = $this->getOption('cachefor');\n if ($cacheFor == null)\n return null;\n\n // We do want to cache, so generate a key\n $key = 'outputcache'.$this->matchedUri;\n\n // Look for any 'vary by' options and add stuff to the key based on that\n\n // return the key\n return $key;\n }", "public function getCacheConfig() {\r\n return $this->config->cache;\r\n }", "protected function constructConfigurationCachePath(): string\n {\n $configurationCachePath = $this->temporaryDirectoryPath . 'Configuration/';\n return $configurationCachePath . str_replace('/', '_', (string)$this->context) . 'Configurations.php';\n }", "public function getCacheConfiguration()\n {\n return $this->config['cache'];\n }", "public function getCachedConfigPath()\n {\n return $this->normalizeCachePath('APP_CONFIG_CACHE', 'cache/config.php');\n }", "public function getCacheName()\n {\n $connectionName = $this->connectionName;\n\n $cacheConfig = Nishchay::getSetting('cache.database');\n\n $cacheName = null;\n\n # Looking for if there's cache name set for this database connection.\n if (isset($cacheConfig->connection) && isset($cacheConfig->connection->{$connectionName})) {\n $cacheName = $cacheConfig->connection->{$connectionName};\n }\n\n # If this is set to false, we will not use cache.\n if ($cacheName === false) {\n return null;\n }\n\n # If its null, means it need to be used as defined in database cache\n # default config.\n if ($cacheName === null) {\n \n # Database connection default cache is null means not to use cache.\n if (!isset($cacheConfig->default) || $cacheConfig->default === null) {\n return null;\n }\n\n $cacheName = $cacheConfig->default;\n }\n\n return $cacheName;\n }", "public function cache() : string\n {\n return $this->namespaces['cache'];\n }", "public static function getConfigName();", "public function getCachedConfigPath()\n {\n return $this->runtimePath() . '/cache/config.php';\n }", "protected function getConfigName()\n {\n return config_path('enercalcreadingsapi.php');\n }", "public function configName();", "public function getConfigName(): string;", "public static function getCacheFilename()\n {\n return static::$cacheFilename;\n }", "protected function getCacheKey()\n {\n return isset($this->_options['cacheKey'])\n ? $this->_options['cacheKey']\n : self::DEFAULT_CACHE_KEY;\n }", "private static function get_cache_filename()\n\t\t{\n\t\t\treturn BASE_DIR.self::DIR_CACHE.DIRECTORY_SEPARATOR.self::$env.'.json';\n\t\t}", "protected function getCachePrefix()\n\t{\n\t\treturn 'RULE:BC:ZC:';\n\t}", "public function getConfigCache()\n {\n return $this->getConfiguration()->getConfigCache();\n }", "private function get_cache_prefix()\n {\n }", "public static function getCacheName ($config)\n {\n\n if (strlen($config) > 3 && ctype_alpha($config[0]) &&\n $config[1] == ':' && $config[2] == '\\\\')\n {\n\n // file is a windows absolute path, strip off the drive letter\n $config = substr($config, 3);\n\n }\n\n // replace unfriendly filename characters with an underscore\n $config = str_replace(array('\\\\', '/'), '_', $config);\n $config .= '.php';\n\n return MO_CACHE_DIR . '/' . $config;\n\n }", "public function getCacheId()\n {\n return \"UserSetting_\" . $this->user_id . \"_\" . $this->name . \"_\" . $this->module_id;\n }", "function getCacheKey($name) {\n\t\treturn $name;\n\t}", "function getCacheKey($name)\n {\n return $name;\n }", "public function getCacheFolderName() {\n return $this->cacheFolderName;\n }", "private static function get_cache_bin() {\n return empty($GLOBALS['drupal_test_info']['test_run_id']) ? 'cache_cms_contacts' : 'cache';\n }", "public function getName(): string\n {\n return 'config';\n }", "private function getCache() {\n if ($this->config->debug)\n $cache=new Cache ();\n else\n $cache = MemcacheCache::createFromSession();\n return $cache->prefix(__CLASS__ . '-');\n }", "private function getCacheName(){\n\n\t\t// Get cache file modification time\n\n\t\t$templateTime = filemtime($this->templatePath);\n\n\t\t// Make filename of possible existing cache file\n\n\t\t$pathToTpl = dirname($this -> templateName);\n\n\t\t$this -> cacheFileName = $pathToTpl.'/'.$templateTime.'__'.basename($this -> templateName);\n\n\t\t$this -> fullCacheFileName = settings::$settings['cache']['dir'].$this->cacheFileName;\n\n\n\t}", "protected static function getExtLocalconfCacheIdentifier() {}", "public function getCacheKey()\n {\n if (is_array($this->scope)) {\n return implode(':', $this->scope);\n }\n\n if ($this->audience) {\n return $this->audience;\n }\n\n // If scope has not set, return null to indicate no caching.\n return null;\n }", "protected function GetCacheKey()\n\t{\n\t\treturn isset($this->params['graphtype']) ? $this->params['graphtype'] : '';\n\t}", "protected static function getExtLocalconfCacheIdentifier()\n {\n return 'ext_localconf_' . sha1(TYPO3_version . PATH_site . 'extLocalconf' . serialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['runtimeActivatedPackages']));\n }", "public function getMetadataCache()\n {\n if (! isset($this->config['metadataCache'])) {\n $this->config['metadataCache'] = new ArrayCache();\n }\n\n return $this->config['metadataCache'];\n }", "private function getCacheKey()\n {\n return md5($this->getHostname());\n }", "protected function getCacheKey()\n {\n return self::CACHE_KEY . '_' . $this->owner->appID;\n }", "public function getCacheFolder(){\n\t\treturn CACHE_FOLDER . '/' . $this->name;\n\t}", "protected function getConfigName()\n {\n return 'bca';\n }", "public function getCacheKey()\n {\n //TODO: implement real cache check, no it uses not so smart method of caching by query address\n return (string) $this;\n }", "protected function getSettingsCacheKey()\n {\n return $this->settingsCacheKey.'.'.$this->settingsGroupName;\n }", "public function getCacheName()\n {\n return 'SSO_client_token_' . preg_replace('/[_\\W]+/', '_', strtolower($this->sso_app_id));\n }", "private function getCacheId()\n\t{\n\t\treturn 'CLASS:' . get_class( $this );\n\t}", "protected function getConfigKey()\n {\n return self::CONFIG_PREFIX . ConfigUtil::DEFINITION;\n }", "protected static function cacheKey()\n {\n $name = static::className();\n $key = (app()->environment() === 'testing') ? \"trending_{$name}s_testing\" : \"trending_{$name}s\";\n return $key;\n }", "public function getCacheKey($options = array())\r\n {\r\n if (empty($options)) {\r\n $options = $this->config;\r\n }\r\n if (!empty($options['cache_key'])) {\r\n return $options['cache_key'];\r\n }\r\n $key = !empty($this->modx->resource) ? $this->modx->resource->getCacheKey() : '';\r\n\r\n return $key . '/' . sha1(serialize($options));\r\n }", "public function getCache()\n {\n $data = array(\n 'provider' => $this->provider->get('service_url')\n );\n $user = $this->provider->get('username');\n if (!empty($user)) {\n $data['provider_data']['username'] = $user;\n }\n\n return self::getCacheKey($data);\n }", "protected function getConfig($sName)\n {\n return $this->oApp->make('config')->get(\"cache.stores.{$sName}\");\n }", "protected function getConfigName(): string\n {\n return 'flysystem';\n }", "public static function getCacheFilePrefix()\n {\n $extensionCacheBehaviour = intval($GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache']);\n\n // Caching of extensions is disabled when install tool is used:\n if (defined('TYPO3_enterInstallScript') && TYPO3_enterInstallScript) {\n $extensionCacheBehaviour = 0;\n }\n\n $cacheFileSuffix = (TYPO3_MODE == 'FE' ? '_FE' : '');\n $cacheFilePrefix = 'temp_CACHED' . $cacheFileSuffix;\n\n if ($extensionCacheBehaviour == 1) {\n $cacheFilePrefix .= '_ps' . substr(\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::shortMD5(PATH_site . '|' . $GLOBALS['TYPO_VERSION']), 0, 4);\n }\n\n return $cacheFilePrefix;\n }", "public function cacheKey()\n {\n return app()->environment('testing') ? 'testing_trending_threads' : 'trending_threads';\n }", "public function get_cache_name( $s ) {\r $cache_option_name = 'aws_search_term_' . $s;\r if ( has_filter('wpml_current_language') ) {\r $current_lang = apply_filters('wpml_current_language', NULL);\r if ( $current_lang ) {\r $cache_option_name = $cache_option_name . '_' . $current_lang;\r }\r }\r return $cache_option_name;\r }", "private function getCacheConfigTemplate()\n {\n $data = [\n 'config' => 'Unknown',\n 'layout' => 'Unknown',\n 'block_html' => 'Unknown',\n 'collections' => 'Unknown',\n 'reflection' => 'Unknown',\n 'db_ddl' => 'Unknown',\n 'eav' => 'Unknown',\n 'customer_notification' => 'Unknown',\n 'config_integration' => 'Unknown',\n 'config_integration_api' => 'Unknown',\n 'target_rule' => 'Unknown',\n 'full_page' => 'Unknown',\n 'translate' => 'Unknown',\n 'config_webservice' => 'Unknown',\n 'compiled_config' => 'Unknown',\n ];\n\n return $data;\n }", "protected function getCacheSuffix() {\n // Don't cache per user. Curator requests are the same for every user. (for now)\n return '';\n }", "public function getCachePrefix()\n {\n return $this->cachePrefix;\n }", "protected function getConfigName()\n {\n return 'flysystem';\n }", "protected function getCacheKey() {\n\t\t\treturn $this->objUrl->getCurrentUrl(true, false);\n\t\t}", "protected function _getCacheId()\n {\n return $this->_placeholder->getName();\t\t// Return the placeholder name as the cache id\n }", "public function getCacheIdentifier() {}", "public function getCacheIdentifier() {}", "private function getNamespaceCacheKey()\n {\n return sprintf(self::KAZINDUZI_NS_CACHE_KEY, $this->ns);\n }", "public function getCacheKey() {\n if (is_null($this->cacheKey)) {\n return '默认KEY';\n }\n\n return $this->cacheKey;\n }", "protected function getConfigName()\n {\n return \"mautic\";\n }", "protected function getCacheKey() {\n return request()->url();\n }", "public function getInternalName()\n {\n return 'cookieconfig';\n }", "function getConfigPath() {\n\t\treturn $this->getName();\n\t}", "public function getCacheKey($name)\n {\n return $name;\n }", "public function getCacheKey() {\n return $this->cacheKey;\n }", "protected function get_cache_file() {\n return $this->get_cache_dir() . $this->get_element_code() . DIRECTORY_SEPARATOR . $this->get_cache_filename();\n }", "public function getCachePathPrefix()\n {\n return $this->cachePathPrefix;\n }", "public function getCacheKey();", "public function getCacheKey();", "protected function getCachePrefix()\n {\n if (null === $this->cachePrefix) {\n $this->cachePrefix = 'hyphenator_' . md5($this->patternsRegistry) . '_';\n }\n\n return $this->cachePrefix;\n }", "public final function getCacheUrl()\n {\n return $this->_getUrl('cache');\n }", "function get_cache_config() {\r\n $config = array();\r\n\r\n $cssjs_types = $this->get_cssjs_types();\r\n $html_types = $this->get_html_types();\r\n $other_types = $this->get_other_types();\r\n\r\n $this->_get_cache_config($config, $cssjs_types, 'cssjs');\r\n $this->_get_cache_config($config, $html_types, 'html');\r\n $this->_get_cache_config($config, $other_types, 'other');\r\n\r\n return $config;\r\n }", "private function generateCacheName(){\n\t\t$get = implode(\"-\", $_GET);\n\t\treturn md5($this->_resize_mode . $this->_image_path . $this->_old_width . $this->_old_height . $this->_new_width . $this->_new_height . $get) . \".\" . $this->_extension;\n\t}", "public static function getCachedConfigPath()\n {\n /** @var \\Illuminate\\Foundation\\Application $instance */\n return $instance->getCachedConfigPath();\n }", "public function getCacheNamespace() {\n return $this->cacheNamespace;\n }", "function cacheFolder()\n\t{\n\t\treturn CACHE_DIR.'/'.urlencode($this->id);\n\t}", "protected function getAuthCache(): string\n {\n return $this->cacheCredentials ? '' : '--no-auth-cache ';\n }", "public function getCacheKey($name)\n {\n $path = $this->resolve($name);\n return $path;\n }", "function sumo_get_config($name='server', $cache=TRUE, $time=30)\n{\n GLOBAL $SUMO;\n\n $query = \"SELECT data FROM \".SUMO_TABLE_CONFIGS.\"\n\t \t WHERE name='\".$name.\"'\";\n\n if($cache)\n\t$rs = $SUMO['DB']->CacheExecute($time, $query);\n else\n \t$rs = $SUMO['DB']->Execute($query);\n\n $data = $rs->FetchRow();\n\n return sumo_xml_toarray($data[0]);\n}", "public function getConfigFileName();", "protected function getCacheKey(): string\n {\n return $this->session->getId() . self::class;\n }", "public function getCacheKey()\n {\n if (is_null($this->cacheKey)) {\n return $this->prefix . $this->{$this->cacheKeyField};\n }\n\n return $this->cacheKey;\n }", "protected function getConfigName($type = null)\n\t{\n\t\tif ( is_null($type) )\n\t\t{\n\t\t\t$type = $this->type;\n\t\t}\n\n\t\treturn config('kifegen.' . $type . '_name');\n\t}", "private function _getCacheId()\n {\n return \\MUtil_String::toCacheId(GEMS_PROJECT_NAME . '__' . get_class($this) . '__' . $this->_id);\n }", "public function getCachePath(): string\n {\n return $this->cachePath;\n }", "protected function getCacheFilePath()\n {\n return $this->cacheDir . DIRECTORY_SEPARATOR . self::CACHE_FILENAME;\n }", "protected function getConfigFile()\n {\n return $this->config_path . DIRECTORY_SEPARATOR . \"assetcachebuster.php\";\n }" ]
[ "0.72885", "0.71308285", "0.7040744", "0.7040744", "0.7040744", "0.69966525", "0.69966525", "0.69966525", "0.69966525", "0.6965702", "0.69609106", "0.69609106", "0.69281816", "0.68923897", "0.6869757", "0.683695", "0.6759788", "0.6738029", "0.6725716", "0.66870767", "0.66386676", "0.6631581", "0.6597997", "0.65950555", "0.65846926", "0.65734833", "0.65362054", "0.6525933", "0.6524422", "0.6510452", "0.65055686", "0.64827514", "0.64677554", "0.6463326", "0.6373492", "0.63721573", "0.63603014", "0.63182086", "0.630481", "0.6303612", "0.6295188", "0.6276649", "0.6276332", "0.62694544", "0.6266114", "0.62600744", "0.625936", "0.62487876", "0.6226267", "0.6223654", "0.6222858", "0.62115747", "0.6203762", "0.6193409", "0.6176806", "0.6167396", "0.61574167", "0.61526954", "0.6142403", "0.6131705", "0.61106783", "0.6105311", "0.6101811", "0.6096386", "0.6095705", "0.60915387", "0.6080645", "0.60781515", "0.6070479", "0.6070479", "0.60596764", "0.60578024", "0.60424995", "0.60299116", "0.6029421", "0.6023276", "0.6016462", "0.59997314", "0.59944487", "0.59918314", "0.59916127", "0.59916127", "0.59911644", "0.5987789", "0.5983774", "0.5979962", "0.5977701", "0.59758407", "0.5970818", "0.59678197", "0.5961622", "0.59514856", "0.5945536", "0.59367216", "0.59360236", "0.5929962", "0.59248173", "0.59214765", "0.5914281", "0.5911045" ]
0.71600187
1
Stores result into cache.
Хранит результат в кэше.
private function setResultInCache($result) { # No cache key set then no need to set cache, # This cache key can also be set from database connection class if # cache key is prepared from executed query. if (!is_string($this->cacheKey)) { return false; } # There's no cache config set. if (($cacheName = $this->getCacheName()) === null) { return false; } return Nishchay::getCache($cacheName) ->set($this->cacheKey, $result, $this->cacheExpiration); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function saveToCache() {}", "public function saveToCache();", "public function writeCache()\n {\n $this->endResultCache();\n }", "function cache_results( $result, $route, \\WP_REST_Request $request ) {\n\n\t$hash = md5( $request->get_body() );\n\t/**\n\t\t * Note: We are explicitly distinguishing object cache from transients even though\n\t\t * transients use object cache when an external cache is available.\n\t\t * The reason is because an external cache LRU handles expiration in an optimised fashion\n\t\t * where as the WordPress option table does not. So we have to set an expiration to avoid\n\t\t * lingering entries and filling the options table infinitely.\n\t\t *\n\t\t * @todo Flushing the cache via webhooks will eliminate this problem.\n\t\t */\n\tif ( wp_using_ext_object_cache() ) {\n\t\twp_cache_set( $hash, $result, CACHE_GROUP );\n\t} else {\n\t\t// The expiration is to ensure transient doesn't stick around forever since no LRU flushing like with external object cache.\n\t\tset_transient( $hash . CACHE_GROUP, $result, CACHE_TTL );\n\t}\n}", "protected function saveToCache($result, $methodName, $arguments, $ttl = null) {\n $cacheKey = $this->getCacheKey($methodName, $arguments);\n if ($cacheKey) {\n $this->cache->save($cacheKey, $result, $this->CACHE_GROUP_KEY, $ttl);\n }\n }", "public function cache_result()\n {\n set_transient(\"uip-data-connect\", true, 48 * HOUR_IN_SECONDS);\n }", "public function save_cache( $result, \\WP_REST_Server $server, \\WP_REST_Request $request ) {\n\t\t// Only Avoid cache if not 200.\n\t\tif ( ! empty( $result ) && is_array( $result ) && isset( $result['data']['status'] ) && 200 !== (int) $result['data']['status'] ) {\n\t\t\treturn $result;\n\t\t}\n\n\t\t// Do not cache if empty result set.\n\t\tif ( empty( $result ) ) {\n\t\t\treturn $result;\n\t\t}\n\n\t\t// No filter_input, see https://stackoverflow.com/questions/25232975/php-filter-inputinput-server-request-method-returns-null/36205923.\n\t\t$request_method = filter_var( $_SERVER['REQUEST_METHOD'], FILTER_SANITIZE_STRING );\n\n\t\t// Force result to be valid JSON.\n\t\t$result = json_decode( wp_json_encode( $result ) );\n\n\t\t$data = array(\n\t\t\t'data' => $result,\n\t\t\t'headers' => $this->response_headers,\n\t\t);\n\t\t\\WP_Rest_Cache_Plugin\\Includes\\Caching\\Caching::get_instance()->set_cache( $this->cache_key, $data, 'endpoint', $this->request_uri, '', $this->request_headers, $request_method );\n\n\t\treturn $result;\n\t}", "public function put($commandKey, $cacheKey, $result) {\n $this->cachedResults[$commandKey][$cacheKey] = $result;\n }", "private function saveCache($result, $cacheName)\n\t{\n\t\t$config = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini',APPLICATION_ENV );\n\t\tif($config->cache->enabled){\t\t\n\t\t\t$cache = $this->cache();\n\t\t\t$cache->save($result, $cacheName);\n\t\t}\n\t}", "public function saveResult($result){\n $this->result = $result;\n }", "public function writeCache($query, $result) {\n $fileName = $this->directory.$this->encrypt($query);\n file_put_contents($fileName, $result);\n }", "private function _cacheQueryResult($cache_key, $value)\n\t{\n\t\tself::$_queryCache[$cache_key] = $value;\n\t}", "public function storeResults();", "public function persistCache();", "public function cache() {\n\t\t$key = $this->hash();\n\t\t$store = $this->getCacheStore();\n\t\tif (!($content = $store->get($key, 900))) {\n\t\t\t$content = $this->getContent();\n\t\t\t$store->set($key, $content);\n\t\t}\n\t\techo $content;\n\t}", "public static function cache_results($plugins, $install_result, $activate_result)\n {\n }", "public function save()\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$objCache = new Xerxes_Data_Cache();\r\n\t\t\t\r\n\t\t\t$objCache->source = \"metalib\";\r\n\t\t\t$objCache->id = $this->id;\r\n\t\t\t$objCache->data = serialize($this->cache);\r\n\t\t\t$objCache->expiry = $this->expiry;\r\n\t\t\t\r\n\t\t\treturn $this->datamap->setCache($objCache);\t\r\n\t\t}", "public function writeCache();", "protected function _mc_helper_set($result,$ttl,$memcache_key)\n\t{\n\t\tif($ttl > 0)\n\t\t{\n\t\t\tmc::set($memcache_key,$result,$ttl);\n\t\t}\n\t}", "final public function cache() {\n\t\tif ($this->getCacheEngine()->has($this->_cacheKey)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$request = $this->request();\n\t\t$results = $request->response();\n\n\t\tif (!empty($results)) {\n\t\t\t$this->getCacheEngine()->set($this->_cacheKey, $results);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function result()\n {\n $result = $this->cache->doSomething();\n return $result;\n }", "public function save()\n {\n $this->_cache = Cache::getInstance(Config::get('cache_type'));\n }", "public function store() {\n /* default to store data for 5 minutes */\n $storeTime = $this->modx->getOption('storeTime',$this->config,300);\n /* create the hash to store */\n $cacheKey = $this->formit->getStoreKey();\n $data = $this->toArray();\n $this->modx->cacheManager->set($cacheKey,$data,$storeTime);\n unset($data);\n }", "public function set_cache( $result, \\WP_REST_Server $server, \\WP_REST_Request $request ) : array {\n\t\t// Ensure result is not empty.\n\t\tif ( empty( $result ) ) {\n\t\t\treturn $result;\n\t\t}\n\n\t\t// Ignore any response other than 200.\n\t\tif ( is_array( $result )\n\t\t&& isset( $result['data']['status'] )\n\t\t&& 200 !== (int) $result['data']['status']\n\t\t) {\n\t\t\treturn $result;\n\t\t}\n\n\t\t// Set transient.\n\t\t\\set_transient( $this->cache_key, $result, HOUR_IN_SECONDS );\n\n\t\treturn $result;\n\t}", "public function setResult($key, $result, $ttl)\n {\n if (!($ttl instanceof Ttl)) {\n $ttl = new Ttl($ttl);\n }\n\n $expirationTimestamp = time() + $ttl->getTtl();\n $value = new Value($result, $expirationTimestamp);\n\n $this->valueStore->set($key, $value, $ttl->getRealTtl());\n }", "public function save($request, $result)\n {\n //Get hash for request\n $cache_file = $this->generate_filename($request);\n\n if (file_put_contents($cache_file, $result) === false) {\n return false;\n } else {\n return true;\n }\n }", "public function setResult($result);", "public function updateCache() :void;", "private function putResultInCache( $cacheTag, $key, $values )\n\t{\n\t\tif ( isset( $this->cache[$cacheTag] ) ) {\n\t\t\tif ( count( $this->cache[$cacheTag] ) > $this->maxCacheSizePerType ) array_shift( $this->cache[$cacheTag] );\n\t\t} else {\n\t\t\t$this->cache[$cacheTag] = array();\n\t\t}\n\t\t$this->cache[$cacheTag][$key] = $values;\n\t}", "public function get_data_to_cache();", "private function putResultInCache( $cacheTag, $key, $values )\n\t{\n\t\tif ( isset( $this->cache[$cacheTag] ) ) {\n\t\t\tif ( count( $this->cache[$cacheTag] ) > $this->maxCacheSizePerType ) array_shift( $this->cache[$cacheTag] );\n\t\t} else {\n\t\t\t$this->cache[$cacheTag] = array();\n\t\t}\n\n\t\t$this->cache[$cacheTag][$key] = $values;\n\t}", "public static function saveToCache()\n {\n if (!self::$hasNew || !self::$url || !self::$locale) {\n return;\n }\n\n Cache::put(self::makeCacheKey(), self::$cache, Config::get('rainlab.translate::cacheTimeout', 1440));\n }", "protected function sendToCache()\n {\n $this->reader()->cache($this);\n }", "public function serve_cache( $result, \\WP_REST_Server $server, \\WP_REST_Request $request ) {\n\t\t// Check if cache exists.\n\t\t$output = \\get_transient( $this->cache_key );\n\n\t\tif ( $output ) {\n\t\t\t// Set content type to JSON and output response.\n\t\t\t$this->set_header( 'Content-Type: application/json' );\n\t\t\techo wp_json_encode( $output );\n\n\t\t\t// Terminate as the request is complete.\n\t\t\t$this->exit();\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function saveToPackageCache() {}", "public function cache()\n\t{\n\t\tif ( $this->no_cache )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telseif( \"\" !== $this->id && (\"sqlsrv\" === $this->cache_type || \"mysqli\" === $this->cache_type ) )\n\t\t{\n\t\t\treturn $this->do_query( sprintf(\n\t\t\t\t$this->queries[ $this->cache_type ][\"set\"],\n\t\t\t\t$this->id,\n\t\t\t\t$this->time,\n\t\t\t\t$this->mssql_escape_string( $this->content )\n\t\t\t) );\n\t\t}\n\t\telseif( \"\" !== $this->id && \"wincache\" === $this->cache_type )\n\t\t{\n\t\t\t$time = date( \"00:i:s\", strtotime( \"+\" . $this->cache_age, 0 ) );\n\t\t\t\n\t\t\t$seconds = strtotime(\"1970-01-01 $time UTC\");\n\t\t\t\n\t\t\treturn false !== wincache_ucache_set(\n\t\t\t\t$this->id,\n\t\t\t\tjson_encode( array(\n\t\t\t\t\t\"last_run\" \t\t=> $this->time,\n\t\t\t\t\t\"cache_content\" => $this->content\n\t\t\t\t) ),\n\t\t\t\t$seconds\n\t\t\t);\n\t\t}\n\t\telseif( \"\" !== $this->id && \"apcu\" === $this->cache_type )\n\t\t{\n\t\t\t$time = date( \"00:i:s\", strtotime( \"+\" . $this->cache_age, 0 ) );\n\t\t\t\n\t\t\t$seconds = strtotime(\"1970-01-01 $time UTC\");\n\t\t\t\n\t\t\treturn false !== apcu_store(\n\t\t\t\t$this->id,\n\t\t\t\tjson_encode( array(\n\t\t\t\t\t\"last_run\" \t\t=> $this->time,\n\t\t\t\t\t\"cache_content\" => $this->content\n\t\t\t\t) ),\n\t\t\t\t$seconds\n\t\t\t);\n\t\t}\n\t\telseif( \"\" !== $this->cache_file && \"file\" === $this->cache_type )\n\t\t{\n\t\t\treturn false !== file_put_contents(\n\t\t\t\t$this->cache_file,\n\t\t\t\tjson_encode( array(\n\t\t\t\t\t\"last_run\" \t\t=> $this->time,\n\t\t\t\t\t\"cache_content\" => $this->content\n\t\t\t\t) )\n\t\t\t);\n\t\t}\n\t}", "protected function update_cache()\n {\n global $DB;\n\n //get any existing cache records, if they exist\n $cache = $this->get_cached();\n\n //if we didn't have a cache object, create a new, empty one\n if(!$cache)\n $cache = new stdClass;\n\n //update the cache object\n $cache->fileshash = $this->get_hash();\n $cache->date = time();\n $cache->valid = is_array($this->marks);\n $cache->raw_output = implode(\"\\n\", $this->raw_output);\n\n //if we have a valid cache entry, seralize the marks \n if($cache->valid)\n $cache->marks = serialize($this->marks);\n\n //otherwise, use the last error\n else\n $cache->marks = $this->last_error;\n\n\n\n //if the cache row existed, update it in the cache table\n if(property_exists($cache, 'id'))\n $DB->update_record(self::CACHE_TABLE, $cache);\n\n //otherwise, create a new entry in the DB\n else\n $DB->insert_record(self::CACHE_TABLE, $cache);\n }", "public function cache()\n\t{\n\t\t/*\n\t\t * This is an empty implementation so that cacheing capability is not\n\t\t * required, but may be implemented.\n\t\t */\n\t}", "abstract function storeTokenToCache(Token $token);", "public function flush_cache();", "private function storeResult($result)\n {\n if (!$result->hasValue && !$result->hasDefault) {\n $this->undefined[] = $result->envVar;\n $this->amount++;\n }\n }", "public function cached_results() {\n\t\t$response = get_transient( 'api_ress' );\n\n\t\tif ( false === $response ) {\n\t\t\t$response = $this->api_call();\n\n\t\t\t$response = json_decode( $response, true );\n\n\t\t\t$response['last_fetched'] = date( 'Y-m-d H:i:s' );\n\n\t\t\t$response = json_encode( $response );\n\n\t\t\tset_transient( 'api_ress', $response, DAY_IN_SECONDS );\n\t\t}\n\n\t\treturn $response;\n\t}", "public function updateCache()\n {\n\n \\Cache::rememberForever('total_users', function() {\n return $this->total_users;\n });\n }", "public function add_to_request_cache( $api_request_hash, $result ) {\r\n\t\t\r\n\t\t// If the cache array is larger than 50, snip the first item. This may be increased in future\r\n\t\t\r\n\t\tif ( !empty($this->request_cache) && (count( $this->request_cache ) > 50) ) {\r\n\t\t\tarray_shift( $this->request_cache );\r\n\t\t}\r\n\t\t\r\n\t\t// Add the new request and return it\r\n\t\t\r\n\t\treturn $this->request_cache[$api_request_hash] = $result;\r\n\t\t\r\n\t}", "public function cache(): void\n\t{\n\t\tif ($this->isNew || !$this->hasValue(static::$primaryKey))\n\t\t\treturn;\n\n\t\tstatic::connection()\n\t\t\t->getCache()\n\t\t\t->set($this->getValue(static::$primaryKey), $this);\n\t}", "private function save()\r\n {\r\n Cache::set(\"components\", $this->componenets);\r\n Cache::set(\"mappings\", $this->mappings);\r\n Cache::set(\"hooks\", $this->hooks);\r\n Cache::set(\"pages\", $this->pages);\r\n Cache::set(\"auth\", $this->auth);\r\n }", "public function store( $result )\n\t{\n\t\tif ( !( $data = $this->getData() ) )\n\t\t\t$data = array( 'draws' => 0, 'player_wins' => 0, 'computer_wins' => 0 );\n\t\t\n\t\tswitch( $result )\n\t\t{\n\t\t\tcase 0:\n\t\t\t\t++$data['draws'];\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase -1:\n\t\t\t\t++$data['computer_wins'];\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 1:\n\t\t\t\t++$data['player_wins'];\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->setData( $data );\n\t}", "public function setResult($result){\n\t\t$this->result = $result;\n\t\t$this->processResult();\n\t}", "function cacheSearch($_result, $_indexIds)\n {\n $sql = new rex_sql();\n $sql->setTable($this->tablePrefix.'587_searchcache');\n $sql->setValues(array(\n 'hash' => $this->cacheHash($this->searchString),\n 'returnarray' => $sql->escape($_result)\n )\n );\n $sql->insert();\n $lastId = $sql->getLastId();\n \n $Ainsert = array();\n foreach($_indexIds as $id)\n {\n $Ainsert[] = sprintf('(%d,%d)',$id,$lastId);\n }\n \n $sql2 = new rex_sql();\n return $sql2->setQuery(\n sprintf(\n 'INSERT INTO `%s` (index_id,cache_id) VALUES\n %s;',\n $this->tablePrefix.'587_searchcacheindex_ids',\n implode(',',$Ainsert)\n )\n );\n }", "protected function after_update($result) {\n $cache = \\cache::make('tool_dataprivacy', 'contextlevel');\n $cache->set($this->get('contextlevel'), $this->to_record());\n }", "private function write()\n {\n $data = $this->arrayCache->getData();\n return $this->storage->save($data);\n }", "protected function write_cached_result_set($key_format, array $result_set, $ttl) {\n $row = current($result_set);\n $key = $this->cache_key_from_row($key_format, $row);\n $this->get_cache()->set($key, $result_set, $ttl);\n }", "public function add_to_cache($key, $value);", "public function setResult(Result $result): void\n {\n $this->result = $result;\n }", "function cacheTurkerResults($assignmentId, $workerId, $hitId) {\n\t@session_start();\n\t$_SESSION[ASSIGNMENT_ID] = $assignmentId;\n\t$_SESSION[WORKER_ID] = $workerId;\n\t$_SESSION[HIT_ID] = $hitId;\n\t$_SESSION[CURRRENT_TASK] = \"1\";\n}", "protected function setResult($result)\n {\n $this->result = $result;\n }", "public function cacheRegenerate()\n\t{\n\t\tif($this->user_id) {\n\t\t\t$this->user->cacheUpdate();\n\t\t}\n\t\tif($this->account_id) {\n\t\t\t$this->account->cacheUpdate();\n\t\t}\n\t}", "public function getFromCache() {}", "public function setResult($result)\n {\n $this->result = $result;\n }", "public function setResult($result)\n {\n $this->result = $result;\n }", "public function setResult($result)\n {\n $this->result = $result;\n }", "public function setResult($result)\n {\n $this->result = $result;\n }", "function result($result) {\n $this->result = $result;\n }", "public function add($result) {\r\n $this->results[] = $result;\r\n $this->size++;\r\n }", "function verificaredicion_cache() {\n // Load library\n \n // Lets try to get the key\n\n\n $hora = $_REQUEST[\"horaSeleccionada\"];\n $fecha = $_REQUEST[\"fechaSolicitada\"];\n $id_sede = $_REQUEST[\"sedeSeleccionada\"];\n $id_area = $_REQUEST[\"lugar\"];\n\n $key_cache = $fecha.\"_\".$hora.\"_\".$id_sede.\"_\".$id_area;\n\n\n $CacheID = $key_cache;\n \n if(!$this->memcached_library->get($CacheID)) {\n \n $this->memcached_library->add($CacheID,'TRUE');\n \n } else {\n $result = $this->memcached_library->get($CacheID);\n }\n echo $result;\n\n \n\n \n \n $this->cache->save($key_cache, 'TRUE', 120);\n \n $objeto_reserva_cache = $this->cache->file->get($key_cache);\n var_dump($objeto_reserva_cache);\n if (isset($objeto_reserva_cache)) {\n echo \"Espacio Utilizado Por Otro Usuario\";\n } else {\n $this->cache->memcached->save($key_cache, 'TRUE', 120);\n echo \"OK\";\n } \n }", "function save_cache( $output, $params ) {\n global $wpdb;\n\n // Caching support\n if ( defined( 'FACETWP_CACHE' ) && FACETWP_CACHE ) {\n $data = $params['data'];\n\n // Generate the cache token\n $cache_name = md5( json_encode( $data ) );\n $cache_uri = $data['http_params']['uri'];\n\n // Set the cache expiration\n $cache_lifetime = apply_filters( 'facetwp_cache_lifetime', 3600, array(\n 'uri' => $cache_uri\n ) );\n\n $nocache = isset( $data['http_params']['get']['nocache'] );\n\n if ( false === $nocache ) {\n $wpdb->insert( $wpdb->prefix . 'facetwp_cache', array(\n 'name' => $cache_name,\n 'uri' => $cache_uri,\n 'value' => $output,\n 'expire' => date( 'Y-m-d H:i:s', time() + $cache_lifetime )\n ) );\n }\n }\n\n return $output;\n }", "public function getCache();", "public function cacheThisPage()\n {\n if (!is_dir($this->cacheFolder))\n mkdir($this->cacheFolder);\n \n $fp = fopen($this->cacheFile, 'w');\n \n fwrite($fp, ob_get_contents());\n \n ob_end_flush();\n \n }", "private function fetchFromCache()\n {\n $expiration = $this->cacheItemPool->getItem('r6api.authentication.expiration');\n $this->expiration = $expiration->get();\n\n $ticket = $this->cacheItemPool->getItem('r6api.authentication.ticket');\n $this->ticket = $ticket->get();\n }", "public function result($result)\n {\n $cache = $this->front->cacheFor();\n\n // If not time set so paginate directly\n if($cache==false || !in_array('indexResult', $this->front->cache)) {\n return $this->front->indexResult($result);\n }\n\n // Get cache key\n $cache_key = $this->getResultCacheKey($result);\n\n // Make the pagination\n return Cache::remember($cache_key, $cache, function () use ($result) {\n return $this->front->indexResult($result);\n });\n }", "public function cacheWrite()\n {\n\n if ($this->cacheKey) {\n $cache = $this->getCache();\n \n $toCache = ob_get_contents();\n ob_end_clean();\n \n $cache->add($this->cacheKey, $toCache);\n echo $toCache;\n }\n \n }", "public function setResult($result)\n\t{\n\t\t$this->result = $result;\n\t}", "public function setResult($result)\n\t{\n\t\t$this->result = $result;\n\t}", "protected function loadFromCache() {}", "public static function cache_set($key, $value){}", "public function save()\n\t{\n\t\tif (false !== ($value = $this->get()))\n\t\t\t\\Yii::app()->cache->set($this->getTag(), $value, /* forever */ 0);\n\t\treturn $this;\n\t}", "public function assignByHash($result) {\r\n\t\t$this->setIdTipoSolicitud($result['idTipoSolicitud']);\r\n\t\t$this->setNombreSolicitud($result['NombreSolicitud']);\r\n\t\t$this->setDescripcionSolicitud($result['DescripcionSolicitud']);\r\n\t\t$this->setFechaAlta($result['FechaAlta']);\r\n\t\t$this->setFechaBaja($result['FechaBaja']);\r\n\t}", "public function storeInCache(EventInterface $event) {\n if ($this->cacheHit) {\n // This request was a cache-hit, so let's not store the image in the cache\n // again, as this would mean we re-wrote the images in the cache on every\n // request\n return;\n }\n\n $request = $event->getRequest();\n $response = $event->getResponse();\n $model = $response->getModel();\n\n $user = $request->getUser();\n $imageIdentifier = $request->getImageIdentifier();\n $file = $model->getBlob();\n\n // We need to store both the last modified as well as the image, so we\n // store a serialized array containing the two pieces of infomation.\n $cacheData = [\n 'lastModified' => $response->getLastModified(),\n 'image' => $file\n ];\n\n try {\n $this->storage->store($user, $imageIdentifier, serialize($cacheData));\n } catch (StorageException $e) {\n // Silently swollow errors...\n }\n }", "public function RefreshCache();", "function getData ()\n{\n return cache();\n}", "public function insert_into_cache_table( $cache_option_name, $result_array ) {\r global $wpdb;\r $values = $wpdb->prepare(\r \"(%s, %s)\",\r $cache_option_name, json_encode( $result_array )\r );\r $query = \"INSERT IGNORE INTO {$this->cache_table_name}\r\t\t\t\t (`name`, `value`)\r VALUES $values\r \";\r $wpdb->query( $query );\r if ( $wpdb->last_error ) {\r if ( $this->is_cache_table_not_exist() ) {\r $this->create_cache_table();\r }\r }\r }", "public function cachedAction()\n\t{\n\t\t$frontendOptions = array(\n\t\t 'lifetime' => 40, // cache lifetime of 30 seconds\n\t\t 'automatic_serialization' => false // this is the default anyways\n\t\t);\n\n\t\t$backendOptions = array('cache_dir' => '../cache/');\n\n\t\t// Wrap the caching object in the wrapper.\n\t\t$this->view->setCache(new Invenzzia_Cache_Wrapper(Zend_Cache::factory('Output', 'File', $frontendOptions, $backendOptions)));\n\t}", "public function cache() {\n\t\t$original = Application::kernel()->view()->getCacheForced();\n\t\tApplication::kernel()->view()->setCacheForced(true);\n\n\t\t$renderer = Application::kernel()->view()->getRenderer();\n\t\t$renderer->cache($this);\n\n\t\tApplication::kernel()->view()->setCacheForced($original);\n\t}", "private function cache()\n\t{\n\t\tif($this->cached === true) return;\n\t\t\n\t\t//Cache the player death ratio.\n\t\t$count = 0;\n\t\t$dead = 0;\n\t\tforeach($this->list_players as $id) {\n\t\t\t$count++;\n\t\t\tif($this->actors_status[$id] === false) $dead++;\n\t\t}\n\t\t\n\t\tif($count > 0) $this->ratio = $dead/$count;\n\t\telse $this->ratio = 1;\n\t\t\n\t\t//Cache the boss ID.\n\t\t$this->boss_id = false;\n\t\tforeach($this->list_enemies as &$id) if(in_array($this->actors_names[$id], Bosses::$list)) {\n\t\t\t$this->boss_id = $id;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Let the class know it is now cached.\n\t\t$this->cached = true;\n\t}", "protected function addToCache()\n {\n file_put_contents(\n __DIR__ . '/routes/route_cache.php',\n '<?php return ' . var_export($this->routeCache, true) . ';' . PHP_EOL\n );\n }", "public function execute(Result $result);", "function getCache();", "protected function putResult($name,$value){\n\t\treturn $this->getContext()->putResult($name,$value);\n\t}", "public function save()\n\t{\n\t\tif(LocalConfiguration::get('performance.cache.enable'))\n\t\t{\n\t\t\t$file = File::create($this->getFilePath());\n\t\t\t$cacheContent = \"<?php\\nreturn \";\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$cacheContent .= var_export($this->data, true);\n\t\t\t}\n\t\t\tcatch(Exception $error)\n\t\t\t{\n\t\t\t\tReport::sendError(new Error($error->getMessage(), $error->getCode()));\n\t\t\t}\n\n\t\t\t$cacheContent .= \";\\n?>\";\n\t\t\t$file->write($cacheContent);\n\t\t\t$file->close();\n\t\t}\n\t}", "public function storeHeades($output){\r\n if($this->isEtagGeneration){\r\n $this->cache->cacheSpecificStore(\r\n $this->cache->getHasher()->getKey().'e',\r\n $this->etagGeneration($output));\r\n }\r\n \r\n if($this->headersToStore){\r\n $this->cache->cacheSpecificStore(\r\n $this->cache->getHasher()->getKey().'h',\r\n serialize($this->headersToStore));\r\n }\n }", "function cache_exec_query()\n {\n \treturn $this->exec_query();\n }", "function jp_rest_cache_get( $result, $server, $request ) {\n\t\tif ( ! function_exists( 'jp_rest_cache_rebuild') ) {\n\t\t\treturn $result;\n\n\t\t}\n\t\t\n\n\t\t/**\n\t\t * Cache override.\n\t\t *\n\t\t * @since 0.1.0\n\t\t *\n\t\t * @param bool $no_cache If true, cache is skipped. If false, there will be caching.\n\t\t * @param string $endpoint The endpoint for the current request.\n\t\t * @param string $method The HTTP method being used to make current request.\n\t\t *\n\t\t * @return bool\n\t\t */\n\n\t\t$endpoint = $request->get_route();\n\t\t$method = $request->get_method();\n\t\t$request_uri = $_SERVER[ 'REQUEST_URI' ];\n\n\n\t\t$skip_cache = apply_filters( 'jp_rest_cache_skip_cache', false, $endpoint, $method);\n\t\t\tif ( $skip_cache ) {\n\t\t\t\treturn $result;\n\t\t\t}\n\n\t\tif($request->get_param('refresh-cache') === true){\n\t\t\treturn $result;\n\t\t}\n\n\n\t\t/**\n\t\t * Set cache time\n\t\t *\n\t\t * @since 0.1.0\n\t\t *\n\t\t * @param int $cache_time Time in seconds to cache for. Defaults to value of JP_REST_CACHE_DEFAULT_CACHE_TIME.\n\t\t * @param string $endpoint The endpoint for the current request.\n\t\t * @param string $method The HTTP method being used to make current request.\n\t\t *\n\t\t * @return bool\n\t\t */\n\n\t\t$cache_time = apply_filters( 'jp_rest_cache_skip_cache', JP_REST_CACHE_DEFAULT_CACHE_TIME, $endpoint, $method );\n\n\t\t$result = tlc_transient( __FUNCTION__ . $request_uri )\n\t\t\t->updates_with( 'jp_rest_cache_rebuild', array( $server, $request ) )\n\t\t\t->expires_in( $cache_time )\n\t\t\t->get();\n\n\t\treturn $result;\n\t}", "public function setCacheResults($bool)\n {\n $this->cacheResults = (bool) $bool;\n }", "protected function writeToCache(): void\n {\n Cache::put(\n $this->base_cache_key . '_urls',\n $this->urls,\n now()->addSeconds($this->ttl)\n );\n\n Cache::put(\n $this->base_cache_key . '_pendingUrls',\n $this->pendingUrls,\n now()->addSeconds($this->ttl)\n );\n }", "protected function save_caches() {\n if ($this->cachechangedcourse) {\n cache::make('core', 'tagindexbuilder')->set('courseaccess', $this->courseaccess);\n $this->cachechangedcourse = false;\n }\n if ($this->cachechangedaccessible) {\n cache::make('core', 'tagindexbuilder')->set($this->component.'__'.$this->itemtype,\n $this->accessibleitems);\n $this->cachechangedaccessible = false;\n }\n }", "protected function storeResponseToCache(string $key): bool\n {\n $stored = false;\n\n try {\n if ($this->cache instanceof CacheItemPoolInterface) { // PSR-6\n $item = $this->cache->getItem($key);\n $item->set($this->response);\n $item->expiresAfter($this->cache_ttl);\n\n $stored = $this->cache->save($item);\n } elseif ($this->cache instanceof CacheInterface) { // PSR-16\n $stored = $this->cache->set($key, $this->response, $this->cache_ttl);\n }\n } catch (\\Psr\\Cache\\CacheException | \\Psr\\SimpleCache\\CacheException $exception) {\n throw new CacheFailException($exception->getMessage());\n }\n\n return $stored;\n }", "public function setResult($key, $value) {\n\t\t$this->result[$key] = $value;\n\t}", "public function assignByHash($result) {\n\t\t$this->setIdCProjekt($result['id_c_projekt']);\n\t\t$this->setRazeni($result['razeni']);\n\t\t$this->setKod($result['kod']);\n\t\t$this->setText($result['text']);\n\t\t$this->setPlnyText($result['plny_text']);\n\t\t$this->setValid($result['valid']);\n\t}", "function get_results( $result, $route, \\WP_REST_Request $request ) {\n\tif ( empty( $result ) ) {\n\t\t$hash = md5( $request->get_body() );\n\t\t// Use external object cache if available.\n\t\t// @see `cache_results` method.\n\t\tif ( wp_using_ext_object_cache() ) {\n\t\t\t$result = wp_cache_get( $hash, CACHE_GROUP );\n\t\t} else {\n\t\t\t$result = get_transient( $hash . CACHE_GROUP );\n\t\t}\n\t}\n\treturn $result;\n}", "public function cache(Cacheable $cache = NULL);" ]
[ "0.7204509", "0.7128104", "0.6967836", "0.68838114", "0.6765077", "0.6567342", "0.6542961", "0.6481826", "0.64575684", "0.6393805", "0.635466", "0.63509744", "0.63356656", "0.6317867", "0.630957", "0.62766296", "0.6273311", "0.6239639", "0.62278616", "0.61579466", "0.6135922", "0.6126423", "0.61259615", "0.61065835", "0.61051214", "0.610244", "0.6099301", "0.608487", "0.60771185", "0.6055763", "0.60511875", "0.60201895", "0.60115206", "0.60017073", "0.59966886", "0.5962894", "0.59396034", "0.59387076", "0.59250206", "0.59022444", "0.5893134", "0.58702564", "0.58485043", "0.5839011", "0.5831567", "0.5822799", "0.57932234", "0.57820094", "0.57662106", "0.5761427", "0.57503825", "0.574805", "0.5747124", "0.57406807", "0.5714276", "0.5700008", "0.5683492", "0.5676775", "0.5636642", "0.5636642", "0.5636642", "0.5636642", "0.5635668", "0.56172657", "0.5608202", "0.5603006", "0.5595347", "0.55768555", "0.5576833", "0.55737066", "0.5573583", "0.5561388", "0.5561388", "0.5560455", "0.555583", "0.55533695", "0.5552483", "0.5537389", "0.55082977", "0.55081505", "0.55045", "0.54916537", "0.5489459", "0.5475517", "0.54743993", "0.5468507", "0.5452367", "0.5451566", "0.5443026", "0.54412764", "0.5439731", "0.54360735", "0.5432212", "0.54277563", "0.5415392", "0.54153645", "0.5414153", "0.5411376", "0.54036444", "0.53956014" ]
0.73703283
0
Returns Placeholder parameter name.
Возвращает Имя параметра плейсхолдера.
private function getPlaceholderName() { return 'i' . $this->instanceNumber . 'b' . ($this->bindCount++); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function placeholder($placeholder)\n {\n return str_replace(':name', $this->name, $placeholder);\n }", "public function getPlaceholder(): string\n {\n return $this->placeholder;\n }", "protected function generatePlaceholder() {\n return 'repose_anon_placeholder_' . self::$PLACEHOLDER_NAME_ID++;\n }", "public function getParameterName()\n {\n return $this->name;\n }", "public function getPlaceholderKey() {}", "public function getPlaceholder();", "public function getParameterName(): string\n {\n return $this->parameterName;\n }", "public static function getPlaceholderSuffix() {}", "public function getPlaceholder()\n {\n return $this->placeholder;\n }", "public function getName()\n {\n return $this->parameterName;\n }", "public function getPlaceholder()\n {\n if (empty($this->_placeholder)) {\n return '';\n }\n return $this->_placeholder;\n }", "protected function generateQueryParameterName()\n {\n return preg_replace('#[^a-z0-9]#i', '', $this->getName()) . mt_rand();\n }", "public function getName()\n {\n return $this->parameters->get('name');\n }", "public function getParameterName() {\n return $this->parameterName;\n }", "public function getParamName()\n {\n return $this->param_name;\n }", "public static function getPlaceholderPrefix() {}", "public function placeholderSuffix() : string\n {\n return $this->placeholder_suffix;\n }", "public function getName()\n {\n return $this->getParameter('name');\n }", "public function getName()\n {\n return $this->getParameter('name');\n }", "public function getName() {\n return $this->getParameter('name');\n }", "public function getPlaceholder(): string\n {\n return 'BBBBCCLLbbb';\n }", "public static function getParameterName(): ?string\n {\n static::init();\n return static::$config[self::PARAMETER_NAME] ?? null;\n }", "function generatePlaceHolderName($name)\r\n\t{\r\n\t\treturn ':' . $name;\r\n\t}", "public function getParamName() {\n return $this->paramName;\n }", "public static function placeholder($p) {\r\n return ( (!empty($p)) ? 'placeholder=\"' . $p . '\"' : '');\r\n }", "public function getPlaceholder($name)\n {\n return $this->getContainer()->getPlaceholder($name);\n }", "public static function getPlaceholder() {\n\t\tstatic $i = 0;\n\n\t\treturn \"\\x7fUNIQ\" . dechex( mt_rand( 0, 0x7fffffff ) ) .\n\t\t\tdechex( mt_rand( 0, 0x7fffffff ) ) . '-' . $i++;\n\t}", "abstract protected function getBindParameterName(): string;", "public function name(?string $val = null) : string;", "public function getPlaceholderType()\n {\n return $this->placeholder_type;\n }", "public function getParamName() {\n\t\treturn $this->_paramName;\n\t}", "public function getParameter():string\n {\n $parts = explode('\\\\', $this->name);\n\n return dash(end($parts));\n }", "protected function getNameInput()\n {\n $name = trim($this->argument('name'));\n\n if ($name === $this->getEntityNameInput()) {\n return sprintf('JsonApi%sInterface', $name);\n }\n\n return $name;\n }", "private function replace(string $placeholder): string\n {\n // if placeholder references an original hook argument return the argument\n // otherwise compute the placeholder\n return $this->io->getArguments()[strtolower($placeholder)] ?? $this->computedPlaceholder($placeholder);\n }", "public function getRouteParamKeyName(): string\n {\n return sprintf('%s_%s', Str::snake((new \\ReflectionClass($this))->getShortName()), $this->getKeyName());\n }", "protected function inputName(): string\n {\n return $this->argument('name');\n }", "protected function getNameInput()\n {\n return $this->basepath.ucfirst(strtolower($this->argument('requisicao')));\n }", "public function placeholder( $placeholder ){\n\t\treturn self::$attributes[] = array( __FUNCTION__ => $placeholder );\n\t}", "public function getTrackingParameterName() {}", "public function renderName()\n {\n \tif ($this->hasOption('param_converter') && null === $this->getName()) {\n \t\t$name = $this->getParamConverter();\n \t}\n \t\n return $this->getName();\n }", "protected function getNameInput()\n {\n return sprintf('%sPlaybook', Str::studly(trim($this->argument('name'))));\n }", "public function getPlaceholderAttribute()\n {\n if (is_null($value = $this->field('placeholder'))) {\n return null;\n }\n\n return (string) $value;\n }", "public function name($name = null);", "public function name($name = null);", "protected function createUniquePlaceholder()\n {\n return '[['.$this->replacementHash.$this->count().']]';\n }", "public function getParameters()\n {\n return $this->name;\n }", "protected function getNameInput() {\n\t\t\t$name = trim($this->argument('name'));\n\t\t\t$type = $this->getTypeInput();\n\t\t\t\n\t\t\t$this->type = \"Api request {$type} class\";\n\t\t\t\n\t\t\tif($type == 'create') return \"{$name}CreateRequest\";\n\t\t\tif($type == 'update') return \"{$name}UpdateRequest\";\n\t\t\tif($type == 'createOrUpdate') return \"{$name}CreateOrUpdateRequest\";\n\t\t\t\n\t\t\treturn $name;\n\t\t}", "protected function getNextParameterName()\n {\n if (!preg_match(\n '(\\G(?<name>' . $this->regex['name'] . ')=)S',\n $this->rawData, $match, 0, $this->currentPos\n )\n ) {\n throw new Exception\\ParseException('Could not find a parameter name');\n }\n\n $this->currentPos += strlen($match[0]);\n\n return $match['name'];\n }", "public function getParamAnnotation()\n {\n $str = ' * @param %s %s';\n\n return sprintf($str, $this->getClassName(), $this->getVariableName());\n }", "public function title_placeholders( $placeholder ) {\n\t\t$screen = get_current_screen();\n\t\tswitch ( $screen->post_type ) {\n\t\t\tcase $this->post_type:\n\t\t\t\t$placeholder = $this->title_msg;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\treturn $placeholder;\n\t}", "public static function getItemName($param){\n return self::$options['paramsPrefix'].$param;\n }", "public static function getRequestParameterName() {\n\t\treturn Setup::get( 'parameters.request', 'request' );\n\t}", "protected function getNameInput()\n {\n return $this->argument('name');\n }", "protected function getParamKeyName()\n {\n $result = \"query\";\n if($this->type == self::TYPE_POST)\n {\n $result = \"body\";\n }\n\n return $result;\n }", "protected function getTypeHintedRequestName($name)\n {\n return sprintf('%s %s', $name, $this->requestVariable);\n }", "public function GetParameter($name)\n\t\t{\n\t\t\tif (array_key_exists($name, $this->_SearchParameters))\n\t\t\t{\n\t\t\t\treturn $this->_SearchParameters[$name];\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}", "protected function getNameInput()\n\t{\n\t\treturn trim( $this->argument( 'name' ) );\n\t}", "protected function getParameterName(QueryBuilder $qb)\n {\n return sprintf('comparison_%d', $qb->getParameters()->count());\n }", "public function setPlaceholder($name, $replacement);", "private static function _generatePlaceholder($field) {\n\t\treturn 'x'.strtoupper($field).'x';\n\t}", "public function getName() {\n return (string) $this->getProfileParameter('name') ?? '';\n }", "protected function getNameInput()\n {\n return $this->getModelInput().\"CrudTest\";\n }", "function placeholder($def) {\n\treturn div('class:hidden', input('name:placeholder | type:text'));\n}", "protected function get_label()\n\t{\n\t\tif (empty($this->params['label']))\n\t\t{\n\t\t\treturn ucfirst(str_replace('_', ' ', $this->params['name']));\n\t\t}\n\t\treturn $this->params['label'];\n\t}", "public function getParamName() {\n return $this->nonceParamName;\n }", "protected function getNameInput(): string\n\t{\n\t\treturn trim($this->getInputArgument('name'));\n\t}", "function get_search_parameter($name)\r\n {\r\n return $this->search_parameters[$name];\r\n }", "protected function getNameInput()\n {\n return $this->basepath.ucfirst(strtolower($this->argument('modelo')));\n }", "public function getParam(string $name);", "private function getNameArgument()\n {\n return strtolower($this->argument('name'));\n }", "public function param($name,$type='C') {\n\t\tif (!$name) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn sprintf(':%s', $name);\n\t}", "public function parameter($name, $default = null);", "protected function label(Parameter $item): string\n {\n $name = $item->name();\n\n if ($item instanceof Option) {\n $name = $item->short() . '|' . $item->long();\n }\n\n $variad = $item->variadic() ? '...' : '';\n\n if ($item->required()) {\n return \"<$name$variad>\";\n }\n\n return \"[$name$variad]\";\n }", "public function getName(): string\n {\n return 'misc/set-env-parameters';\n }", "public function getInitParameter($name);", "public function getParam($name);", "public function getParam($name);", "protected static function parameterTypeName(\n \\ReflectionParameter $param\n ): string {\n $type = $param->getType();\n if ($type instanceof \\ReflectionNamedType) {\n $name = $type->getName();\n } else {\n $name = $param->getName();\n }\n return $name;\n }", "public function getNativeCommonPlaceholder($n)\n {\n return '?';\n }", "public function name($new_value = null)\n {\n }", "protected function getRequestNameComment($name)\n {\n return sprintf('@param %s %s ', $name, $this->requestVariable);\n }", "protected function getNameInput()\n {\n $name = trim($this->argument('name'));\n\n $this->type = $this->qualifyClass($name);\n\n return $name;\n }", "protected function getNameInput()\n {\n $name = Str::studly(parent::getNameInput());\n if (Str::contains(strtolower($name), 'controller') === false) {\n $name .= 'Controller';\n }\n \n return $name;\n }", "public function getPlaceholderAsLabel()\n {\n return $this->placeholderAsLabel;\n }", "protected function getNameArgument()\n {\n return $this->argument('name');\n }", "private function parseParamName($name)\n {\n return '`' . htmlspecialchars($name) . '`';\n }", "public function getName()\n {\n return $this->args[\"name\"];\n }", "public function get_param_place_holder($index = null)\n {\n return '?';\n }", "protected function placeholderValue($index)\n {\n $value = $this->params[$index];\n if ($this->isPlaceholderValue($value)) {\n return '?';\n }\n if ($value instanceof Expression) {\n return $value->sql();\n }\n // null -> \"NULL\", true -> \"TRUE\", etc\n return \\strtoupper(\\var_export($value, true));\n }", "public function name($name) {\n\t\treturn $name;\n\t}", "private function transFormPathToParameterName(string $path)\n {\n return lcfirst(str_replace(['Interface'], '', $this->getOnlyName($path, true)));\n }", "public static function getPlaceholderValue() {\n\t\t$res = '';\n\t\t$matches = [];\n\t\tif (isset($_SERVER[\"request_uri\"])) {\n\t\t\t$res = preg_match('/\\/(.*)\\/(.*)\\/(.*)/', 'foobarbaz', $matches, PREG_OFFSET_CAPTURE);\n\t\t\treturn $res[1];\n\t\t}\n\t}", "protected function get_parameter( $name ) {\n\t\treturn $this->has_parameter( $name ) ? $this->parameters[ $name ] : null;\n\t}", "function singleparameter($name){\n echo \"My name is {$name}\";\n\n}", "public function getName()\n {\n return 'shop_catalog_category_parameter';\n }", "protected function _getCacheId()\n {\n return $this->_placeholder->getName();\t\t// Return the placeholder name as the cache id\n }", "public function getName() {\n $name = empty($this->name) ? 'addresFinderField' : $this->name;\n return $name;\n\t}", "public function getName($name=null);", "public function addPlaceholder($placeholder, string $pattern = null);", "public function getName(): string\n {\n return $this->proxy(__FUNCTION__, func_get_args());\n }" ]
[ "0.7586813", "0.7559581", "0.7378792", "0.73079115", "0.724635", "0.7226795", "0.72217834", "0.7197311", "0.71839666", "0.717628", "0.7068087", "0.706193", "0.69931906", "0.69003516", "0.68427366", "0.6808375", "0.6806432", "0.6800538", "0.6800538", "0.67655313", "0.6662262", "0.65776175", "0.65163046", "0.64737403", "0.6392953", "0.63800204", "0.6372026", "0.63622624", "0.63495934", "0.63115853", "0.62956476", "0.6286091", "0.62726915", "0.6265486", "0.62299377", "0.622701", "0.6200866", "0.6182638", "0.6180984", "0.61665654", "0.61502576", "0.6143098", "0.61093414", "0.61093414", "0.6086545", "0.6085729", "0.6073107", "0.603416", "0.6034127", "0.6027463", "0.6022786", "0.6015089", "0.600482", "0.59988415", "0.59876895", "0.5976142", "0.59624594", "0.59606516", "0.5959909", "0.59446424", "0.59445184", "0.5933034", "0.59309834", "0.5925832", "0.59207225", "0.5920185", "0.5910444", "0.5900222", "0.58652145", "0.58569103", "0.58533067", "0.5845599", "0.58377653", "0.5837663", "0.58312404", "0.5830851", "0.5830851", "0.5826751", "0.58150816", "0.5807144", "0.58018476", "0.5781161", "0.5779038", "0.5754737", "0.575237", "0.5724245", "0.5718973", "0.57048947", "0.5699383", "0.5676022", "0.5672718", "0.5668495", "0.56663316", "0.56650084", "0.56613", "0.56564593", "0.56563026", "0.565288", "0.5651479", "0.56480765" ]
0.8006057
0
Combines bind of passed query to this one.
Объединяет привязку переданного запроса с этим.
private function combineBind(Query $query) { $this->binds = array_merge($this->binds, $query->binds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_combined_query($query, $bind_params)\n\t{\n\t\tif (!is_array($bind_params)) { return false; }\n\t\t$num_params = count($bind_params);\n\t\tif ($num_params > 0) {\n\t\t\tforeach ($bind_params as $key => $param) {\n\t\t\t\t$key = ':' . $key;\n\t\t\t\t$param = \"'{$param}'\";\n\t\t\t\t$pos = strpos($query, $key);\n\t\t\t\tif ($pos === false) { continue; }\n\t\t\t\t$query = substr_replace($query, $param, $pos, strlen($key));\n\t\t\t}\n\t\t}\n\t\treturn $query;\n\t}", "public function mergeBindings(self $query)\n {\n $this->bindings = array_merge_recursive($this->bindings, $query->bindings);\n\n return $this;\n }", "function bindAndExecute() {\n\t\t$conn = $this->connection;\n\n\t\tif ($conn === null) {\n\t\t\tthrow new RuntimeException('bindAndExecute cannot be called on a QueryStatement without a connection.');\n\t\t}\n\t\tif ($conn instanceof DBMSSQL && $conn->getDriver() === 'dblib' && function_exists('mb_detect_encoding')) {\n\t\t\treturn $conn->query($this->__toString());\n\t\t}\n\t\tif ($conn instanceof DBSQLite) {\n\t\t\treturn $conn->query($this->__toString());\n\t\t}\n\n\t\t$string = self::embedIdentifiers($this->getString(), array_values($this->identifiers), $conn);\n\n\t\t$result = $conn->prepare($string);\n\t\tforeach ($this->getParams() as $key => $value) {\n\t\t\t$pdo_type = PDO::PARAM_STR;\n\t\t\tif (is_int($value)) {\n\t\t\t\t$pdo_type = PDO::PARAM_INT;\n\t\t\t} elseif (is_null($value)) {\n\t\t\t\t$pdo_type = PDO::PARAM_NULL;\n\t\t\t} elseif (is_bool($value)) {\n\t\t\t\t$value = $value ? 1 : 0;\n\t\t\t\t$pdo_type = PDO::PARAM_INT;\n\t\t\t}\n\t\t\t$result->bindValue($key + 1, $value, $pdo_type);\n\t\t}\n\t\t$result->execute();\n\t\treturn $result;\n\t}", "public function bindParams()\n {\n $this->builtSql = null;\n $this->params = func_get_args();\n\n return $this;\n }", "private function run_query($query){\n\t\t\t// append query helpers to the query\n\t\t\tif(!empty($this->query['where'])){\n\t\t\t\t$query .= ' WHERE '.$this->query['where'];\n\t\t\t}\n\t\t\tif(!empty($this->query['order'])){\n\t\t\t\t$query .= ' ORDER BY '.substr($this->query['order'], 0, -2);\n\t\t\t}\n\t\t\tif(!empty($this->query['limit'])){\n\t\t\t\t$query .= ' LIMIT '.$this->query['limit'];\n\t\t\t}\n\t\t\t\n\t\t\t// clear query helper info\n\t\t\t$this->query = array();\n\t\t\t\n\t\t\t// create a PDO statement object\n\t\t\t$stmt = self::$connection->prepare($query);\n\t\t\t\n\t\t\t// run query\n\t\t\t$stmt->execute($this->params);\n\t\t\t\n\t\t\t// set the last query\n\t\t\tforeach($this->params as $param => $value){\n\t\t\t\t$query = str_replace(':'.$param, '\\''.$value.'\\'', $query);\n\t\t\t}\n\t\t\tself::last_query($query);\n\t\t\t\n\t\t\t// clear params\n\t\t\t$this->params = array();\n\t\t\t\n\t\t\treturn $stmt;\n\t\t}", "public function bind() {\n\t\t\n\t\t/*\n\t\t * Builds SELECT statement from the attributes of the data access object this \n\t\t * data table was constructed with.\n\t\t */\n\t\t$select = $this->dao->selectAllExpression($this->getAttributes());\n\t\t\n\t\t/*\n\t\t * Builds LIKE expression based on the specified search parameters.\n\t\t */\n\t\t$like = '';\n\t\t$keyword = $this->get('sSearch', '');\n\t\tif ($keyword != null) {\n\t\t\t$like .= ' WHERE '.$this->dao->likeExpression(\n\t\t\t\t\t$keyword, $this->getAttributes(), 'OR');\n\t\t}\n\t\t\n\t\t/*\n\t\t * Builds ORDER BY clause based on the specified attribute sort ordering.\n\t\t */\n\t\t$order = '';\n\t\tif ($this->get('iSortCol_0', '') != '') {\n\t\t\t$attributes = $this->getAttributes();\n\t\t\t$sortAttributes = array();\n\t\t\tfor ($i = 0; $i < intval( $this->get('iSortingCols') ); $i++) {\n\t\t\t\t$key = $attributes[intval($this->get('iSortCol_'.$i))];\n\t\t\t\t$val = $this->get('sSortDir_'.$i, 'ASC');\n\t\t\t\t$sortAttributes[$key] = $val;\n\t\t\t}\n\t\t\t$order = $this->dao->orderByExpression($sortAttributes, 'ASC', TRUE);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Builds LIMIT clause based on the specified limit range.\n\t\t */\n\t\t$start = $this->get('iDisplayStart', '0');\n\t\t$length = $this->get('iDisplayLength', '10');\n\t\t$limit = $this->dao->limitExpression($start, $length);\n\t\t\n\t\t/*\n\t\t * Binds this data table to the results of executing the dynamically \n\t\t * built query from the previous projection, search, sort and\n\t\t * limit cases.\n\t\t */\n\t\t$this->data = $this->dao->query($select.$like.$order.$limit); \n\t\t$this->totalDisplayCount = $this->dao->found();\n\t\t$this->totalCount = $this->dao->count();\n\t}", "public function prepareQuery()\n {\n if ($needles = $this->getNeedles()) {\n $queryString = $this->getQueryString();\n $needlesString = '';\n for ($i = 0; $i < count($needles); $i++) {\n if ($i > 0) {\n $needlesString .= ', ';\n }\n $needlesString .= $needles[$i];\n }\n $queryString = str_replace('{{needle}}', $needlesString, $queryString);\n $this->setQueryString($queryString);\n }\n $this->setStatement($this->getConnection()->prepare($this->getQueryString()));\n return $this;\n }", "private function addQueryToThis(Query $query)\n {\n $this->combineBind($query);\n return '(' . $query->getSql() . ')';\n }", "abstract public function bind(array $binding);", "protected function bindParams($query) {\r\n\t\tforeach ( $this->params as $k => $v ) {\r\n\t\t\tif (is_null ( $v ))\r\n\t\t\t\t$query->bindValue ( $k + 1, null, PDO::PARAM_NULL );\r\n\t\t\telseif ($v === '')\r\n\t\t\t\t$query->bindValue ( $k + 1, '' );\r\n\t\t\telseif (is_numeric ( $v ) && ! strpos ( $v, \",\" ))\r\n\t\t\t\t$query->bindValue ( $k + 1, $v, PDO::PARAM_INT );\r\n\t\t\telseif (is_double ( $v ) || is_float ( $v ) || is_numeric ( str_replace ( array (\",\", \".\" ), array (\"\", \"\" ), $v ) ))\r\n\t\t\t\t$query->bindValue ( $k + 1, str_replace ( \",\", \".\", $v ), PDO::PARAM_INT );\r\n\t\t\telseif ($v === true || $v === false)\r\n\t\t\t\t$query->bindValue ( $k + 1, $v, PDO::PARAM_BOOL );\r\n\t\t\telse\r\n\t\t\t\t$query->bindValue ( $k + 1, $v );\r\n\t\t}\r\n\t}", "public function mergeQuery($query) {\n $this->query = array_merge($this->query, $query);\n ksort($this->query);\n return $this;\n }", "public function bind(array $vars){\n\t\t$this->_querystack[self::BIND][] = $vars;\n\t\treturn $this;\n\t}", "public function queryString($sql, $bind = array())\r\n {\r\n $this->query($sql, $bind);\r\n\r\n return $this->_prepare;\r\n }", "protected function addBindingsToQuery(Builder $query, array $bindings)\n {\n $count = $this->getDatabaseDriver() !== 'mysql' ? 2 : 1;\n for ($i = 0; $i < $count; $i++) {\n foreach ($bindings as $binding) {\n $type = $i === 0 ? 'where' : 'having';\n $query->addBinding($binding, $type);\n }\n }\n }", "public function query(...$bindings) {\n $sql = array_shift($bindings);\n if (count($bindings) == 1 && is_array($bindings[0]))\n $bindings = $bindings[0];\n \n try{\n $query =$this->connection()->prepare($sql);\n $key = 1;\n foreach ($bindings as $value) { \n //$query->bindValue($key+1, _e($value));\n $query->bindValue($key++, _e($value));\n }\n $query->execute();\n }catch (PDOException $e){\n pre($sql);pre($bindings);\n die('Error in query: '.$e->getMessage());\n }\n\n return $query;\n }", "function get_formatted_query_with_binds(&$bind_ar){\n\t\t$tree = $this->get_tree();\n\t\treturn $this->_get_formatted_query($tree,$bind_ar);\n\t}", "public function query ($query, $bindParams = []) {\r\n\t\t\t$this->_error = false;\r\n\r\n\t\t\t$this->_stmt = $this->_dbh->prepare($query);\r\n\t\t\t\r\n\t\t\tif (count ($bindParams)) {\r\n\t\t\t\tforeach ($bindParams as $key => $value) {\r\n\t\t\t\t\t$this->bind ($key, $value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->_stmt->execute ()) {\r\n\t\t\t\t$this->_result = $this->_stmt->fetchAll (PDO::FETCH_OBJ);\r\n\t\t\t\t$this->_count = $this->_stmt->rowCount ();\r\n\t\t\t\t$this->_lastInsertID = $this->_dbh->lastInsertID ();\r\n\t\t\t}\r\n\t\t\treturn $this->_result;\r\n\t\t}", "protected function bindParameters($query, array $bindings)\n {\n $database = $this->query;\n\n array_walk($bindings, function (&$binding) use ($database) {\n $binding = is_integer($binding) ? (int) $binding : $database->connection()->getPdo()->quote($binding);\n });\n\n return str_replace_array('\\?', $bindings, $query);\n }", "private static function prepareAndBind($query, $values = [])\n {\n $dbh = self::connection();\n $stmt = $dbh->prepare($query);\n foreach ($values as $key => &$value) {\n $stmt->bindParam($key, $value);\n }\n $stmt->execute();\n return $stmt;\n }", "public function query()\n {\n $bindings = func_get_args();\n $sql = array_shift($bindings);\n if(count($bindings)==1 AND is_array($bindings[0])){\n\n $bindings = $bindings[0];\n }\n try{\n $query = $this->Connection()->prepare($sql);\n foreach ($bindings as $key=>$value){\n $query->bindValue ($key + 1,_e($value));\n }\n $query->execute();\n return $query;\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n\n }", "public function query($query, $bind = null) {\n\t\tglobal $pdo;\n\t\t/* Prepare Statment */\n\t\t$this->statement = $this->pdo->prepare($query);\n\t\t/* Execute Query */\n\t\t$this->statement->execute($bind);\n\t}", "private function prepareAndBind() {\n $this->stmt = $this->pdo->prepare($this->sql);\n if (!empty($this->fields)) {\n foreach ($this->fields as $key => $value)\n $this->stmt->bindValue(\":$key\", $value);\n }\n \n if (!empty($this->params)) {\n foreach ($this->params as $key => $value)\n $this->stmt->bindValue(\":$key\", $value);\n }\n }", "private function setSQL($query, $bind_value)\n\t{\n\t\tif (empty($bind_value))\n\t\t{\n\t\t\t$this->sql_object = self::$pdo->query($query);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->sql_object = self::$pdo->prepare($query);\n\n\t\t\t$this->setBindValue($bind_value);\n\n\t\t\t$this->sql_object->execute();\n\t\t}\n\n\t\t$this->setQueryString($bind_value);\n\t}", "public function exec(string $query, array $bindValues = null)\n {\n }", "public function bindValues(array $binds) {\r\n foreach($binds as $valuesArray) {\r\n $this->bindValue($valuesArray[0], $valuesArray[1], (isset($valuesArray[2]) ? $valuesArray[2] : \\PDO::PARAM_STR));\r\n }\r\n return $this;\r\n }", "function bind()\n {\n $params = func_num_args() > 0 ?\n func_get_args() :\n null ;\n\n return $this->__bind( $this->buildViewPath(), $params );\n }", "public function query($sql, $bindings = array()) {}", "public function blindQuery($sql, $bind_data = array())\n {\n $this->debugQuery($sql, $bind_data);\n if ( ! $this->conn) {\n $this->initConnection(); //we init this here, so we don't create a conn if no query takes place\n }\n try {\n $this->exception = null;\n if (count($bind_data)) {\n //use prepared statement syntax\n $statement = $this->conn->prepare($sql);\n $statement->execute($bind_data);\n } else {\n //regular old query\n $statement = $this->conn->query($sql);\n }\n } catch (PDOException $e) {\n if (defined('DEV_SERVER')) {\n $this->debug = true;\n $this->debugQuery($sql, $bind_data, $e);\n die('Unable to execute query ' . $this->conn->errorCode());\n }\n $this->exception = $e;\n error_log($e->getMessage());\n }\n return $statement;\n }", "public function statement($query, $bindings = [])\n {\n\n }", "public function setBindParams(array $bindParams, bool $merge = false): QueryInterface\n {\n }", "protected function appendStatements()\n {\n $statements = array(\n self::SQL_SELECT => 'SELECT',\n self::SQL_FROM => 'FROM',\n self::SQL_WHERE => 'WHERE',\n self::SQL_GROUP => 'GROUP BY',\n self::SQL_ORDER => 'ORDER BY',\n self::SQL_HAVING => 'HAVING',\n self::SQL_LIMIT => 'LIMIT',\n );\n \n if (!$query = $this->getFormated()) return $this;\n \n foreach ($query as $name => &$entry)\n {\n if (!empty($statements[$name]) && !empty($entry))\n {\n $entry = $statements[$name] . ' ' . $entry;\n }\n }\n \n return $this->setFormated($query);\n }", "public function &query( $query )\n\t{\n\t\t$this->_ro_query = $query;\n\t\treturn $this;\n\t}", "public function query($sql, $bind = []){\r\n return $this->_db->query($sql, $bind);\r\n }", "public function query($query) { \n $this->stmt = $this->dbh->prepare($query); \n }", "public function bind($sql, $params=NULL)\n\t{\n\t\tif(!$params && !strstr($sql, \"?\"))\n\t\t{\n\t\t\treturn $this->execute($sql);\n\t\t} \n\t\tif($this->stmt)\n\t\t{\n\t\t\tunset($this->stmt);\n\t\t}\n\t\t$this->stmt = new stmt($sql, $params, $this);\n\t\t\n\t\treturn $this;\n\t}", "public function qber($query, $bind = [], $arr = []) {\n if ($this->ping(null)) {\n $dbh = $this->contodb->prepare($query);\n\n if (isset($bind) && is_array($bind) && count($bind) > 0) {\n $arrKeys = array_keys($bind);\n for ($i = 0; $i < count($bind); $i++) {\n $dbh->bindValue($arrKeys[$i], $bind[$arrKeys[$i]]);\n }\n }\n\n $exeRes = $dbh->execute();\n\n if (isset($arr['result']) && $arr['result'] === true) {\n $result = [];\n if ($exeRes) {\n $result[0] = 'success';\n } else {\n $result[0] = 'fail';\n }\n $result['rows'] = $dbh->rowCount();\n }\n\n if (isset($result) && isset($arr['fetch'])) {\n if (!isset($arr['fetch_arg'])) {\n $arr['fetch_arg'] = null;\n }\n $result['fetch'] = $dbh->{$arr['fetch']}($arr['fetch_arg']);\n }\n\n return (isset($result)) ? $result : $dbh;\n }\n unset($query, $bind, $arr, $result, $dbh, $arrKeys);\n }", "public function bind_param()\n {\n if (func_num_args()<2) {\n return;\n }\n\n $types=func_get_arg(0);\n $count=strlen($types);\n if (func_num_args()<$count) {\n return;\n }\n\n $searches= [];\n $replaces= [];\n for ($i=0;$i<$count;$i++) {\n $searches[$i]='{'.$i.'}';\n switch (substr($types, $i, 1)) {\n case 'i':\n $replaces[$i]=(int)func_get_arg($i+1);\n break;\n\n case 's':\n $replaces[$i]=$this->quoteString(func_get_arg($i+1));\n break;\n\n case 'd':\n $replaces[$i]= (float)func_get_arg($i + 1);\n break;\n\n case 'b':\n // Exception\n die();\n }\n }\n\n $this->mPrepareQuery=str_replace($searches, $replaces, $this->mPrepareQuery);\n }", "public function val(string $query, array $bindValues = null)\n {\n }", "public function merge($query);", "public function bind($bind){\n\t\t\n\t\t$this->bind = $bind;\n\t\t\n\t\treturn $this;\n\t}", "public function quoteInto($sql, array $bind = array())\n {\n foreach ($bind as $key => $value) {\n $replace = (is_numeric($key) ? '?' : ':' . $key);\n\n $sql = substr_replace($sql, $this->quote($value), strpos($sql, $replace), strlen($replace));\n }\n\n return $sql;\n }", "public function query($sql, $bind = array())\n {\n return $this->__call(__FUNCTION__, array($sql, $bind));\n }", "public function bind(array $bindParams, $merge = false);", "public function custom($sql, $binds)\n {\n $this->query_type = self::CUSTOM_QUERY;\n $this->binds = is_array($binds) ? $binds : [$binds];\n $this->custom_sql = $sql;\n return $this;\n }", "public function query()\n\t{\t\n\t\treturn $this->raw_query($this->prepare_query(func_get_args()));\n\t}", "public function query($query) {\n\t\t$this->query = self::$dbh->prepare($query);\n\t}", "function setQuery($query)\r\n {\r\n $statement = $this->getConn()->prepare($query);\r\n // Return the prepared statement from the database.\r\n return $statement;\r\n }", "private function bindParameters()\n {\n array_unshift($this->arr_bind_params, $this->str_bind_string);\n call_user_func_array([$this->obj_stmt, 'bind_param'], $this->arr_bind_params);\n }", "public function scopePreparedWith($query)\n {\n return $query->with([\n 'entity',\n 'races',\n 'characters',\n ]);\n }", "public function with( $sql, $bindings = array() )\n\t{\n\t\t$this->withSql = $sql;\n\t\t$this->withParams = $bindings;\n\t\treturn $this;\n\t}", "protected function autoBind(\\PDOStatement $statement, $query, $params)\n {\n // If the params passed in is an array, bind its contents, else ignore it\n if (!is_array($params)) {\n return;\n\t\t}\n\n // We need to find all the items in the query that look like potential binds\n // query is in the form 'select sql blar x = :varname, y=:otherName'\n // valid characters are a-z A-Z 0-9 and _ (from the PDO source, as it isn't in the docs)\n if (preg_match_all('/:[a-z0-9_]+/iu', $query, $toBind)===false) {\n return;\n\t\t}\n\n // This list of bound variable names in the query can now be found in $toBind[0]...\n\n // Try and match the arguments to the list\n foreach ($params as $key=>$value) {\n\t\t\t// If the value is a DateTime object, then convert it to a MySQL friendly string\n\t\t\tif ($value instanceof \\DateTime) {\n\t\t\t\t$value = $value->format('YmdHis');\n\t\t\t}\n\n // check each parameter and bind any that appear valid\n if (preg_match('/^([a-z]+)(:[a-z0-9_]+)$/iu', $key, $regs)) {\n // Check that this var is in the list of items needing to be bound\n if (!in_array($regs[2], $toBind[0])) {\n continue;\n\t\t\t\t}\n\n // it is, so process the type and bind it\n $typeName = mb_strtolower($regs[1]);\n switch ($typeName) {\n case 'text':\n case 'date':\n $type = PDO::PARAM_STR;\n break;\n\n case 'money':\n $type = PDO::PARAM_STR;\n $value = strval(round(floatval($value), 2));\n break;\n\n case 'int':\n default:\n $type = PDO::PARAM_INT;\n break;\n\n }\n\n // bind the value to the statement\n $statement->bindValue($regs[2], $value, $type);\n } elseif (preg_match('/^([a-z0-9_]+)$/iu', $key)) {\n // Check that key (eg iUser) is in the binding list (eg :iUser)\n if (!in_array(':'.$key, $toBind[0])) {\n continue;\n\t\t\t\t}\n\n // assume they are using the simpler format of $params['iUser'] = 5\n // we don't know the type in this situation, so we can just bind away\n $statement->bindValue($key, $value);\n }\n }\n }", "protected function applySelect($query)\n {\n if(count($this->select)) {\n return $query->select($this->select);\n }\n\n return $query;\n }", "public function query($query)\r\n {\r\n $this->stmt = $this->dbh->prepare($query);\r\n }", "public function bind(array $params);", "public function query($query)\n{\n\t// query statement\n\t$this->stmt = $this->dbh->prepare($query);\n}", "private function resetQuery(){\n\n\t\t$this->_where = [];\n\n\t\t$this->_sql = '';\n\t\t\n\t\t$this->_bindValues = [];\n\t\t\n\t\t$this->_join = '';\n\t\t\n\t\t$this->_orderBy = '';\n\t}", "public function query($query)\n {\n /*\n * Prepared Statement maken\n */\n if($this->dbh != NULL)\n {\n $this->stmt = $this->dbh->prepare($query);\n } \n }", "public function query($sql, $bind_data = array())\n {\n if ($this->statement !== false) {\n $this->statement->closeCursor();\n }\n $this->statement = $this->blindQuery($sql, $bind_data);\n return $this->statement;\n }", "public function query($query){\n\t\t$this->stmt = $this->db_conn->prepare($query);\n\t}", "public function setBinds(array $binds)\n\t{\n\t\t$this->binds = $binds;\n\t\treturn $this;\n\t}", "public function query($query)\n {\n $this->stmt = $this->dbh->prepare($query);\n }", "public function prepareQuery()\r\n {\r\n if ($this->toselect)\r\n $this->query = $this->toselect . $this->joins . $this->wheres . $this->orders;\r\n else if ($this->toinsert)\r\n $this->query = $this->toinsert;\r\n else if ($this->toupdate)\r\n $this->query = $this->toupdate . $this->wheres;\r\n else if ($this->todelete)\r\n $this->query = $this->todelete . $this->wheres;\r\n else if ($this->tocreate)\r\n $this->query = $this->tocreate;\r\n\r\n }", "protected function getCurrentBindings()\n {\n $cloneQuery = clone $this->query;\n $cloneQuery = $this->loadElements($cloneQuery);\n if (!empty($this->set)) {\n $cloneQuery->setUpdates($this->set);\n }\n if (!empty($this->insert_records)) {\n foreach ($this->insert_records as $record) {\n $cloneQuery->addInsertRecord($record);\n }\n }\n return $cloneQuery->getBindings();\n }", "function &query($query) {\n // Hack to get query_row and query_assoc working correctly\n $args = array_slice(func_get_args(), 1);\n // Create and return a database query\n $start_time = microtime(true);\n $this->last_sh =& $this->prepare($query);\n $this->last_sh->execute($args);\n $this->query_time += microtime(true) - $start_time;\n $this->query_count++;\n // PHP 5 doesn't like us returning NULL by reference\n if (!$this->last_sh->sh)\n $this->last_sh = NULL;\n return $this->last_sh;\n }", "public function Assemble()\n\t{\n\t\tif (!is_null($this->_query)) {\n\t\t\treturn $this->_query;\n\t\t}\n\t\t\n\t\t$lQuery = $this->_method();\n\t\t\n\t\tif (!is_null($this->_set)) {\n\t\t\t$lQuery .= ' SET ' . implode(', ', $this->_set);\n\t\t}\n\t\t\n\t\tif (!is_null($this->_where)) {\n\t\t\t$lQuery .= ' WHERE ' . implode(' AND ', $this->_where);\n\t\t}\n\t\t\n\t\tif (!is_null($this->_order)) {\n\t\t\t$lQuery .= ' ORDER BY ' . implode(', ', $this->_order);\n\t\t}\n\t\t\n\t\tif (!is_null($this->_limit)) {\n\t\t\t$lQuery .= ' ' . $this->_limit;\n\t\t}\n\t\treturn $this->_query = $lQuery;\n\t}", "function query($query,$result_mode=null){\n\t\t$this->last_query = $query;\n\t\t$query = parent::query($query);\n\t\t$this->last_error = $this->error;\n\t\treturn $query;\n\t}", "function _query($sql,$inputarr=false)\n\t{\n\t\tif (is_array($sql)) { // is prepared sql\n\t\t\t$stmt = $sql[1];\n\n\t\t\t// we try to bind to permanent array, so that oci_bind_by_name is persistent\n\t\t\t// and carried out once only - note that max array element size is 4000 chars\n\t\t\tif (is_array($inputarr)) {\n\t\t\t\t$bindpos = $sql[3];\n\t\t\t\tif (isset($this->_bind[$bindpos])) {\n\t\t\t\t// all tied up already\n\t\t\t\t\t$bindarr = $this->_bind[$bindpos];\n\t\t\t\t} else {\n\t\t\t\t// one statement to bind them all\n\t\t\t\t\t$bindarr = array();\n\t\t\t\t\tforeach($inputarr as $k => $v) {\n\t\t\t\t\t\t$bindarr[$k] = $v;\n\t\t\t\t\t\toci_bind_by_name($stmt,\":$k\",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000);\n\t\t\t\t\t}\n\t\t\t\t\t$this->_bind[$bindpos] = $bindarr;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$stmt=oci_parse($this->_connectionID,$sql);\n\t\t}\n\n\t\t$this->_stmt = $stmt;\n\t\tif (!$stmt) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (defined('ADODB_PREFETCH_ROWS')) {\n\t\t\t@oci_set_prefetch($stmt,ADODB_PREFETCH_ROWS);\n\t\t}\n\n\t\tif (is_array($inputarr)) {\n\t\t\tforeach($inputarr as $k => $v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t// suggested by g.giunta@libero.\n\t\t\t\t\tif (sizeof($v) == 2) {\n\t\t\t\t\t\toci_bind_by_name($stmt,\":$k\",$inputarr[$k][0],$v[1]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\toci_bind_by_name($stmt,\":$k\",$inputarr[$k][0],$v[1],$v[2]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->debug==99) {\n\t\t\t\t\t\tif (is_object($v[0])) {\n\t\t\t\t\t\t\techo \"name=:$k\",' len='.$v[1],' type='.$v[2],'<br>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\techo \"name=:$k\",' var='.$inputarr[$k][0],' len='.$v[1],' type='.$v[2],'<br>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$len = -1;\n\t\t\t\t\tif ($v === ' ') {\n\t\t\t\t\t\t$len = 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($bindarr)) {\t// is prepared sql, so no need to oci_bind_by_name again\n\t\t\t\t\t\t$bindarr[$k] = $v;\n\t\t\t\t\t} else { \t\t\t\t// dynamic sql, so rebind every time\n\t\t\t\t\t\toci_bind_by_name($stmt,\":$k\",$inputarr[$k],$len);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->_errorMsg = false;\n\t\t$this->_errorCode = false;\n\t\tif (oci_execute($stmt,$this->_commit)) {\n\n\t\t\tif (count($this -> _refLOBs) > 0) {\n\n\t\t\t\tforeach ($this -> _refLOBs as $key => $value) {\n\t\t\t\t\tif ($this -> _refLOBs[$key]['TYPE'] == true) {\n\t\t\t\t\t\t$tmp = $this -> _refLOBs[$key]['LOB'] -> load();\n\t\t\t\t\t\tif ($this -> debug) {\n\t\t\t\t\t\t\tADOConnection::outp(\"<b>OUT LOB</b>: LOB has been loaded. <br>\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//$_GLOBALS[$this -> _refLOBs[$key]['VAR']] = $tmp;\n\t\t\t\t\t\t$this -> _refLOBs[$key]['VAR'] = $tmp;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_refLOBs[$key]['LOB']->save($this->_refLOBs[$key]['VAR']);\n\t\t\t\t\t\t$this -> _refLOBs[$key]['LOB']->free();\n\t\t\t\t\t\tunset($this -> _refLOBs[$key]);\n\t\t\t\t\t\tif ($this->debug) {\n\t\t\t\t\t\t\tADOConnection::outp(\"<b>IN LOB</b>: LOB has been saved. <br>\");\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\tswitch (@oci_statement_type($stmt)) {\n\t\t\t\tcase \"SELECT\":\n\t\t\t\t\treturn $stmt;\n\n\t\t\t\tcase 'DECLARE':\n\t\t\t\tcase \"BEGIN\":\n\t\t\t\t\tif (is_array($sql) && !empty($sql[4])) {\n\t\t\t\t\t\t$cursor = $sql[4];\n\t\t\t\t\t\tif (is_resource($cursor)) {\n\t\t\t\t\t\t\t$ok = oci_execute($cursor);\n\t\t\t\t\t\t\treturn $cursor;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $stmt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (is_resource($stmt)) {\n\t\t\t\t\t\t\toci_free_statement($stmt);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $stmt;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected function addQuery($query) {\n\n // Iterate through our query and add them to the request url.\n if ($query) {\n foreach ($query as $key => $value) {\n $this->request->getUrl()->setQueryVariable($key, $value);\n }\n }\n\n return $this;\n }", "function query($q,$prep_array = array()) {\r\n\t\t// Just abstract goSQL\r\n\t\treturn $this->goSQL($q,$prep_array);\r\n\t}", "public function withQuery($query)\n {\n return $this->with('query', $this->encode($query, ':@/?'));\n }", "public function query($bind = array(), $fetchMode = null)\n\t{\n\t\tif (!empty($bind)) {\n\t\t\t$this->bind($bind);\n\t\t}\n\n\t\t$stmt = $this->_adapter->query($this);\n\t\tif ($fetchMode != null) {\n\t\t\t$stmt->setFetchMode($fetchMode);\n\t\t}\n\t\treturn $stmt;\n\t}", "protected function combine($glue, &$query = null, $default = '')\n {\n if (empty($query) && isset($default))\n {\n $query = $default;\n }\n elseif (isset($glue) && !empty($query) && is_array($query))\n {\n $query = array_filter($query);\n $query = implode($glue.\"\\r\\n\", $query);\n }\n \n return $this;\n }", "public function affectingStatement($query, $bindings = [])\n {\n\n }", "protected function compileBind($sql)\n {\n if (empty($this->binds)\n OR empty($this->bind_marker)\n OR strpos($sql, $this->bind_marker) === false)\n {\n return $sql;\n }\n $bind_count = count($this->binds);\n\n // We'll need the marker length later\n $ml = strlen($this->bind_marker);\n\n // Make sure not to replace a chunk inside a string that happens to match the bind marker\n if ($c = preg_match_all(\"/'[^']*'/i\", $sql, $matches)) {\n $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i',\n str_replace($matches[0],\n str_replace($this->bind_marker, str_repeat(' ', $ml), $matches[0]),\n $sql, $c),\n $matches, PREG_OFFSET_CAPTURE);\n\n // Bind values' count must match the count of markers in the query\n if ($bind_count !== $c) {\n return $sql;\n }\n } elseif (($c = preg_match_all(\n '/' . preg_quote($this->bind_marker, '/') . '/i',\n $sql,\n $matches, PREG_OFFSET_CAPTURE)) !== $bind_count)\n {\n return $sql;\n }\n do {\n $c--;\n $escaped_value = $this->escape($this->binds[$c]);\n if (is_array($escaped_value))\n {\n $escaped_value = '('.implode(',', $escaped_value).')';\n }\n $sql = substr_replace($sql, $escaped_value, $matches[0][$c][1], $ml);\n } while ($c !== 0);\n\n return $sql;\n }", "public function queryResolved($query);", "public function mbind_param_do()\n {\n $params = array_merge($this->mbind_types, $this->mbind_params);\n return call_user_func_array(array($this, 'bind_param'), $this->makeValuesReferenced($params));\n \n }", "public function appendWhere($where_sql, $bind_fields = FALSE);", "function query($statement, $bindValues = null);", "public function run(Query $query)\n {\n $statement = $this->prepare($query);\n $query->getValueBinder()->attachTo($statement);\n $statement->execute();\n\n return $statement;\n }", "protected function queryLogic($query) {\n return $query;\n }", "private function interpolateQuery()\n {\n $query = $this->sql;\n $params = $this->params;\n\n $keys = array();\n\n # build a regular expression for each parameter\n foreach ($params as $key => $value) {\n if (is_string($key)) {\n $keys[] = '/:' . $key . '/';\n } else {\n $keys[] = '/[?]/';\n }\n }\n\n $query = preg_replace($keys, $params, $query, 1, $count);\n\n return $query;\n }", "public function makeQuery(){\n $this->con->query($this->query);\n return $this;\n }", "public function where($where, $bind = null){\n\t\t\n\t\t$this->where = $where;\n\t\t$this->bind = $bind;\n\t\t\n\t\treturn $this;\n\t}", "public function setQuery($query=array()) {\n $this->query = $query;\n ksort($this->query);\n return $this;\n }", "public function setBindTypes(array $bindTypes, bool $merge = false): QueryInterface\n {\n }", "public function raw_query($query, $values=null) {\n $this->_builder->raw_query($query);\n if( $values !== null ){\n if(is_array($values) )\n $this->_values = array_merge($this->_values, $values);\n else\n $this->_values[] = $values;\n }\n return $this;\n }", "public function raw_query($query, $values=null) {\n $this->_builder->raw_query($query);\n if( $values !== null ){\n if(is_array($values) )\n $this->_values = array_merge($this->_values, $values);\n else\n $this->_values[] = $values;\n }\n return $this;\n }", "public function raw_query($query, $values=null) {\n $this->_builder->raw_query($query);\n if( $values !== null ){\n if(is_array($values) )\n $this->_values = array_merge($this->_values, $values);\n else\n $this->_values[] = $values;\n }\n return $this;\n }", "public function execute($bind_array=array()) {\n if (!empty($bind_array)) {\n $this->bind($bind_array);\n }\n return $this->stmt->execute();\n }", "function insert_bindings(\\Illuminate\\Database\\Query\\Builder $query) : string\n {\n $querySql = str_replace(['?'], ['\\'%s\\''], $query->toSql());\n return vsprintf($querySql, $query->getBindings());\n }", "protected final function set($query, $bind_value)\n\t{\n\t\t$this->sql_object = self::$pdo->prepare($query);\n\n\t\t$this->setBindValue($bind_value);\n\n\t\t$this->setQueryString($bind_value);\n\n\t\tif ($this->sql_object->execute())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->errors[] = locale('query_error_occurred');\n\t}", "public function fetchAll($query, $bind = array(), $fetchStyle = NULL) {\n $args = array_slice(func_get_args(), 2);\n $args[0] = $fetchStyle ?: $this->getAttribute(PDO::ATTR_DEFAULT_FETCH_MODE);\n return $this->_internalFetch(\"fetchAll\", $query, $bind, $args);\n }", "public function where()\n {\n call_user_func_array([$this->query->getWhere(), 'add'], func_get_args());\n\n return $this;\n }", "public static function selectFromWriteConnection($query, $bindings = [])\n { //Method inherited from \\Illuminate\\Database\\Connection \n /** @var \\Illuminate\\Database\\PostgresConnection $instance */\n return $instance->selectFromWriteConnection($query, $bindings);\n }", "public function getquery()\n\t{\t\n\t\tif ( !empty( $this->where ) ) {\n\t\t\tfor ($i=0; $i < count( $this->where ) ; $i++) { \n\n\t\t\t\t$column = $this->where[$i]->getColumn();\n\t\t\t\t$condition = $this->where[$i]->getCondition();\n\n\t\t\t\t$this->where[$i]->setParamColumn( $column );\n\t\t\t\t//$this->where[$i]->setParamCondition( $condition );\n\n\t\t\t\t$this->paramArray[ $this->where[$i]->getParamColumn()] = $this->where[$i]->getCondition();\n\t\t\t\t$this->whereSQL .= $this->where[$i]->getWhere();\n\n\t\t\t\t\\Libs\\Database\\Selector\\Where::inceraseCounter(1);\n\t\t\t}\n\t\t}\n\n\t\t$columnss = substr_replace( $this->columns, \"\", -2 );\n\t\t$this->updateQuery = sprintf( \" UPDATE %s SET %s %s %s %s \", $this->table, $columnss, $this->whereSQL, $this->order, $this->limit );\n\t\techo $this->updateQuery . \"<br>\";\n\n\t\ttry {\n\t\t\t$stmt = $this->conn->prepare( $this->updateQuery );\n\n\t\t\t$stmt->execute( $this->paramArray );\n\t\t\t\\Libs\\Database\\Selector\\Where::resetCounter(1);\t\t\n\t\t\treturn $stmt;\n\n\t\t} catch ( \\PDOException $e ) {\n\t\t\techo \"Select sql problem occured \" . $e->getMessage();\n\t\t}\n\n\t}", "public function statement($query, $bindings = array())\n\t{\n\t\treturn $this->run($query, $bindings, function($me, $query, $bindings)\n\t\t{\n\t\t\tif ($me->pretending()) return true;\n\n\t\t\t$bindings = $me->prepareBindings($bindings);\n\n\t\t\treturn $me->getPdo()->prepare($query)->execute($bindings);\n\t\t});\n\t}", "private function appendCapsuleProjectionToQuery($query = array()) {\n $append = array(\n 'fields' => $this->fieldListProjection\n );\n\n return array_merge_recursive($query, $append);\n }", "public function bind($statement)\n\t\t{\n\t\t\tif ($this->value !== null)\n\t\t\t{\n\t\t\t\tif (is_array($this->value))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->value as $pf => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$key = $this->column . $this->level . '_' . $pf;\n\t\t\t\t\t\t$statement->$key = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$key = $this->column . $this->level;\n\t\t\t\t\t$statement->$key = $this->value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this->anchor)\n\t\t\t\t$this->anchor->bind($statement);\n\t\t}", "public static function addBindings(\\Illuminate\\Database\\Query\\Builder $destiny, \\Illuminate\\Database\\Query\\Builder ...$queries) : \\Illuminate\\Database\\Query\\Builder\n\t{\n\t\tforeach($queries as $query) {\n\t\t\tforeach($query->getBindings() as $binding) {\n\t\t\t\t$destiny->addBinding($binding);\n\t\t\t}\n\t\t}\n\t\treturn $destiny;\n\t}", "public function append($query, $args = null)\n {\n if ($query instanceof PDBquery) {\n $args = $query->getArgs();\n $query = $query->getQuery();\n };\n $this->_query .= ' ' . $query;\n if (is_array($args)) {\n foreach ($args as $arg) {\n $this->_args[] = $arg; // Faster than array_merge() which copies\n };\n } elseif ($args !== null) {\n $this->_args[] = $args;\n };\n return $this;\n }" ]
[ "0.66009116", "0.65122414", "0.62083036", "0.6187525", "0.6137655", "0.61082035", "0.60783416", "0.6033966", "0.5959612", "0.5959112", "0.5932193", "0.5928129", "0.5829186", "0.5824776", "0.5800603", "0.57964826", "0.5736267", "0.5692824", "0.56874853", "0.56567425", "0.5654458", "0.56453705", "0.56407154", "0.5605692", "0.56041056", "0.5596572", "0.5579071", "0.5577145", "0.55558205", "0.5554715", "0.5521008", "0.55207515", "0.5493176", "0.5478832", "0.5469593", "0.5465159", "0.5446365", "0.5437791", "0.5432248", "0.54255164", "0.5416527", "0.5414338", "0.5413715", "0.54018474", "0.5397202", "0.539176", "0.5385378", "0.5384515", "0.53586423", "0.5356237", "0.5351554", "0.53512746", "0.5344293", "0.53328514", "0.5319397", "0.5319132", "0.53143024", "0.5309873", "0.5302539", "0.5300164", "0.5280003", "0.5277109", "0.5276417", "0.5275155", "0.5270763", "0.52524227", "0.5235763", "0.5235022", "0.52336276", "0.5229765", "0.5228668", "0.5225827", "0.5221349", "0.52210355", "0.5215494", "0.5209305", "0.52056795", "0.52013975", "0.5188072", "0.51848847", "0.5180969", "0.51722926", "0.5166331", "0.51603246", "0.5156453", "0.51541054", "0.51541054", "0.51541054", "0.5149323", "0.5148311", "0.5145179", "0.5142242", "0.5141686", "0.51391244", "0.5133766", "0.51330155", "0.5132731", "0.51311785", "0.51306623", "0.5128701" ]
0.7598146
0
Returns true if last result retrieved from cache.
Возвращает true, если последний результат был получен из кэша.
public function isLastResultFromCache() { return $this->isLastResultFromCache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLast()\n\t{\n\t\treturn !$this->cacheValid;\n\t}", "public function lastRequestWasFetchedFromCache()\n {\n return $this->fetchedFromCache;\n }", "final public function cache() {\n\t\tif ($this->getCacheEngine()->has($this->_cacheKey)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$request = $this->request();\n\t\t$results = $request->response();\n\n\t\tif (!empty($results)) {\n\t\t\t$this->getCacheEngine()->set($this->_cacheKey, $results);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function getLastRecord()\n\t{\n\t\tif (file_exists(self::LAST_RECORD_CACHE)) {\n\t\t\treturn require self::LAST_RECORD_CACHE;\n\t\t}\n\t\treturn false;\n\t}", "public function isFetchedFromCache(): bool\n {\n return $this->is_fetched_from_cache;\n }", "public function isCached()\n {\n return $this->persistence->isCached($this);\n }", "function SQL_Was_Memcached()\n\t{\n\t\treturn $this->memcached_result;\n\t}", "public function cacheExists() {\r\n\t\treturn (empty($this->created))\r\n\t\t\t? true\r\n\t\t\t: false;\r\n\t}", "public function loadedFromCache(): bool;", "protected function extractDataFromCache()\n {\n if ($this->arParams['CACHE_TYPE'] === 'N') {\n return false;\n }\n\n $page = 1;\n\n if (\n (is_object($this->pagination))\n && ($this->pagination instanceof PageNavigation)\n ) {\n $page = $this->pagination->getCurrentPage();\n }\n\n $cacheKeys =\n $this->arParams + [\n __FILE__,\n $page,\n ];\n\n /** @global \\CUser $USER */\n global $USER;\n\n return !($this->StartResultCache(3600, [$USER->GetGroups(), $cacheKeys]));\n }", "private function isCached(){\n\t\t$this->filetime=@filemtime($this->file);\n\t\tif(file_exists($this->file) && (time() - $this->time <$this->filetime)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isCached() {}", "public function isCached(){\n return ($this->getMetaChecked() !== null);\n }", "public function last()\n {\n if ($this->_innerRes->data_seek($this->_innerRes->num_rows - 2))\n {\n $this->_recordNumber = $this->_innerRes->num_rows - 2;\n $this->fetch_assoc();\n return true;\n }\n return false;\n }", "private function cache_expired()\n\t{\n\t\tif( 0 === $this->last_run || $this->no_cache || $this->force_update_cache || !$this->data )\n\n\t\t\treturn true;\n\n\t\telse\n\n\t\t\treturn $this->time >= strtotime( \"+\" . $this->cache_age, $this->last_run );\n\t}", "public function isEntireCache()\n {\n return is_null($this->bin);\n }", "public function isCached()\n\t{\n\t\treturn File::exists($this->getFilePath());\n\t}", "public function hasCache() {\n $cache = Location::get(\\Raptor\\Core\\Location::CACHE);\n if (!file_exists($cache . DIRECTORY_SEPARATOR . $this->name . DIRECTORY_SEPARATOR . '52753' . $this->name)) {\n return false;\n } else {\n return true;\n }\n }", "protected function shouldCache(): bool\n {\n return $this->shouldCache;\n }", "public function isCached()\n {\n return is_readable($this->filename);\n }", "function is_cached() {\n if ($this->cached)\n return true;\n\n // Passed a cache_id?\n if (!$this->cache_id)\n return false;\n\n // Cache file exists?\n if (!file_exists($this->cache_id))\n return false;\n\n // Can get the time of the file?\n if (!($mtime = filemtime($this->cache_id)))\n return false;\n\n // Cache expired?\n if (($mtime + $this->expire) < time()) {\n @unlink($this->cache_id);\n return false;\n } else {\n /**\n * Cache the results of this is_cached() call. Why? So\n * we don't have to double the overhead for each template.\n * If we didn't cache, it would be hitting the file system\n * twice as much (file_exists() & filemtime() [twice each]).\n */\n $this->cached = true;\n return true;\n }\n }", "protected function isCachedTGT()\n {\n if (is_null($this->tgtCache)) {\n if (! is_null($this->logger)) {\n $this->logger->info('No cache interface available, create new ticket.');\n }\n return false;\n } else {\n $cachedItem = $this->tgtCache->getItem(self::CACHE_ITEM_KEY);\n if (! $cachedItem->isHit()) {\n if (! is_null($this->logger)) {\n $this->logger->info('Cache available, but not hit.');\n }\n return false;\n } else {\n $this->tgt = $cachedItem->get();\n if (! is_null($this->logger)) {\n $this->logger->info('Cache hit, returning: ' . $this->tgt);\n }\n return ! empty($this->tgt);\n }\n }\n }", "public function doOutputCache() {\n \n if ($this->outputCacheCallback && $mode = $this->doOutputCacheCallback()) {\n if ($mode === 304) {\n $this->outputCacheSave = 304;\n } else {\n $this->outputCacheSave = true;\n }\n return true;\n } \n if ($this->staticFileCache) {\n return true;\n }\n return false;\n }", "public function regular_cache_exists() {\r\n\t\t//Check whether the cache transient exists in the database and is available for more than one more minute\r\n\t\t$transient_exists = get_transient( $this->regular_feed_transient_name );\r\n\r\n\t\treturn $transient_exists;\r\n\t}", "protected function responseIsCached()\n {\n return $this->app['cache']->has($this->cacheKey);\n }", "public function isCached() {\n\t\tif ($this->cached) return true;\n\n\t\t// Passed a cacheId?\n\t\tif (!$this->cacheId) return false;\n\n\t\t// Cache file exists?\n\t\tif (!file_exists($this->cachePath . $this->cacheId)) return false;\n\n\t\t// Can get the time of the file?\n\t\tif (!($mtime = filemtime($this->cachePath . $this->cacheId))) return false;\n\n\t\t// Cache expired?\n\t\tif (($mtime + $this->expire) < time()) {\n\t\t\tunlink($this->cachePath . $this->cacheId);\n\t\t\treturn false;\n\t\t} else {\n\t\t\t/**\n\t\t\t * Cache the results of this isCached() call. Why? So\n\t\t\t * we don't have to double the overhead for each template.\n\t\t\t * If we didn't cache, it would be hitting the file system\n\t\t\t * twice as much (file_exists() & filemtime() [twice each]).\n\t\t\t */\n\t\t\t$this->cached = true;\n\t\t\treturn true;\n\t\t}\n\t}", "public function isHit() {\n if ($this->refresh > 0){\n $file = $this->getFilepath();\n // check the expired file cache.\n $mtime = 0;\n if (file_exists($file)){\n $mtime = filemtime($file);\n }\n $filetimemod = $mtime + $this->refresh;\n // if the renewal date is smaller than now, return true (no need for update)\n if ($filetimemod < time()){\n return false;\n }\n } else {\n return false;\n }\n return true;\n }", "public function getResult() {\n return $this->memcachedObject->getResultCode()===Memcached::RES_SUCCESS;\n }", "private function _cached_exists()\n {\n return file_exists($this->cached_file);\n }", "public function hasCache() {\n\t\treturn !is_null($this->cache);\n\t}", "public function shouldCache(): bool\n {\n return true;\n }", "public function shouldCache(): bool\n {\n return true;\n }", "public function hasResult(){\n return $this->_has(1);\n }", "public function hasResult(){\n return $this->_has(1);\n }", "public function hasResult(){\n return $this->_has(1);\n }", "public function hasCaching(): bool\n {\n return $this->caching;\n }", "public static function isCacheActive() {\n return self::$runcache;\n }", "public function isLoadedFromCache()\n {\n return $this->loadedFromCache;\n }", "private function updateCache()\n\t{\n\t\t$sql = $this->adapter->getSQL();\n\t\tif ( strpos( $sql, '-- keep-cache' ) !== strlen( $sql ) - 13 ) {\n\t\t\t// If SQL has been taken place outside of this method then something else then\n\t\t\t// a select query might have happened! (or instruct to keep cache)\n\t\t\t$this->cache = array();\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "private function updateCache()\n\t{\n\t\t$sql = $this->adapter->getSQL();\n\t\tif ( strpos( $sql, '-- keep-cache' ) !== strlen( $sql ) - 13 ) {\n\t\t\t// If SQL has been taken place outside of this method then something else then\n\t\t\t// a select query might have happened! (or instruct to keep cache)\n\t\t\t$this->cache = array();\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function isCached($_search)\n {\n $sql = new rex_sql();\n $sql->setTable($this->tablePrefix.'587_searchcache');\n $sql->setWhere(sprintf(\"hash = '%s'\",$this->cacheHash($_search)));\n \n if($sql->select('returnarray'))\n {\n foreach($sql->getArray() as $value)\n {\n return false !== ($this->cachedArray = unserialize($value['returnarray']));\n }\n }\n \n return false;\n }", "public function flushHasCache()\n {\n if ($this->isCachable()) {\n return Yii::$app->cache->flush();\n }\n\n return false;\n }", "public function isFetched () {\n return $this->fetched;\n }", "public function hasCache()\n\t{\n\t\treturn $this->app['cache']->has($this->hash);\n\t}", "public function hasLastOutput(): bool\n {\n return isset($this->lastOutput);\n }", "private function check_cache() {\n if(file_exists($this->filename)) {\n if(filemtime($this->filename) > time() - $this->cache_time * 24 * 60 * 60) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function hasCache(): bool\n {\n return !is_null($this->cache);\n }", "public function isCached() {\n\t\tif(!$this->_Entry->FileManager->useFileCache) return false;\n\t\treturn ($this->_cachePath != '' && is_file($this->_cachePath));\n\t}", "function isCached(){\r\n $path = $this->getAbsolutePathCache().\"/\".$this->getFileName();\r\n return is_file($path);\r\n }", "public function cache()\n {\n return false;\n }", "public function checkCache($cacheKey)\n {\n $result = FALSE;\n if($this->EnableCache == TRUE) {\n $this->_result = Zend_Registry::get('cacheObj')->load($cacheKey);\n if ($this->_result) {\n $result = TRUE;\n }\n }\n return $result;\n }", "public function isLast(): bool\n {\n return $this->_last;\n }", "private function istCacheValid()\n {\n try {\n $this->cache();\n return true;\n } catch (\\Exception $e) {\n return false;\n }\n }", "public function flush_cache() {\n\t\tif (!$this->cache_available) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->cache->flush();\n\t}", "public function isFetched();", "public function isLast()\n {\n return ($this->pointer + 1 === count($this->iterativeKeys));\n }", "private function imageInCache(){\n if (file_exists($this->cachedFile) && \n ( filemtime($this->cachedFile)>filemtime($this->pathToImages.$this->fname)) &&\n ( filectime($this->cachedFile)>filectime($this->pathToImages.$this->fname)) ) {\n return true;\n }else return false;\n }", "protected function hasHit()/*# : bool */\n {\n if (!$this->trigger(CachePool::EVENT_HAS_BEFORE)) {\n return $this->setHit(false);\n }\n\n $meta = $this->pool->getDriver()->has($this->key);\n if (isset($meta['expire'])) {\n $this->expire = $meta['expire'];\n } else {\n return $this->setHit(false);\n }\n\n if (!$this->trigger(CachePool::EVENT_HAS_AFTER)) {\n return $this->setHit(false);\n }\n\n return $this->setHit(true);\n }", "public function isLazilyFetched()\n {\n return $this->fetchMode == self::FETCH_LAZY;\n }", "function cacheGet($key)\n {\n if (Cache::has(md5($key))) return Cache::get(md5($key));\n return false;\n }", "protected function extractDataFromCache()\n\t{\n\t\treturn false;\n\t}", "public function getIsUpdateInfoCached(): bool\n {\n return ($this->_updates !== null || Craft::$app->getCache()->exists($this->cacheKey));\n }", "function opensocial_readcache($key) {\n\t$res = DBs::inst(DBs::SYSTEM)->query('SELECT data FROM opensocial_cache WHERE cache_key = %s AND created + interval %s > NOW()', $key, OPENSOCIAL_CACHE_TTL)->fetchCell();\n\tif($res) {\n\t\techo $res;\n\t\treturn false;\n\t}\n\treturn true;\n}", "public function hasCache(): bool\n {\n return $this->cache instanceof DataCache;\n }", "public function hasResult()\n {\n return ! empty($this->entries);\n }", "public function hasResult(){\n return $this->_has(9);\n }", "public static function getLastModified($key)\n {\n $data = self::_getCache()->fetch($key);\n return ($data) ? $data->getModified() : false;\n }", "public function hasResult ()\n {\n return $this->decorated->hasResult();\n }", "public function isLast() {\n\t\treturn (bool) $this->last;\n\t}", "public function lastUpdated()\n {\n return ! empty($this->data) ? $this->data->lastUpdated() : false;\n }", "protected function _fetchResource()\n {\n try {\n if ($result = $this->_resource->fetch($this->_fetch)) {\n $this->_key = $this->_iterator++;\n $this->_current = $result;\n return true;\n }\n } catch (PDOException $e) {\n return false;\n }\n return false;\n }", "public function isLast()\r\n {\r\n \treturn $this->isLast;\r\n }", "public function hasRet()\n {\n return $this->get(self::RET) !== null;\n }", "public function isUseCache()\n {\n return $this->useCache;\n }", "abstract public function isCached($key);", "public function hasLastScannedRowKey(){\n return $this->_has(2);\n }", "public function isCached($key) {\n if (false != $this->_loadCache()) {\n $cachedData = $this->_loadCache();\n return isset($cachedData[$key]['data']);\n }\n }", "protected function isCacheStale()\n {\n $this->logger->debug(\"RouteInspector: checking whether cache is stale\");\n\n $cachePath = $this->getCacheFilePath();\n $cacheTime = @filemtime($cachePath);\n\n if ($cacheTime == false) {\n $this->logger->debug(\"RouteInspector: cache is stale b/c failed getting mtime for '{$cachePath}'\");\n return true;\n }\n\n $routeResources = $this->router->getRouteCollection()->getResources();\n\n foreach ($routeResources as $routeResource) {\n $resourcePath = $routeResource->getResource();\n $resourceTime = @filemtime($resourcePath);\n\n if ($resourceTime >= $cacheTime) {\n $this->logger->debug(\"RouteInspector: cache is stale b/c '{$resourcePath}' has been modified\");\n return true;\n }\n }\n\n $this->logger->debug(\"RouteInspector: cache is not stale\");\n return false;\n }", "function isValid() {\n if ( file_exists( $this->cacheFile ) && filemtime( $this->cacheFile ) > ( time() - $this->expiry ) ) {\n return true;\n }\n return false;\n }", "public function isLast()\n {\n return $this->getNumber() == $this->count();\n }", "public function isFinished() {\n $is_finished = (boolean)$this->get('result');\n return $is_finished;\n }", "public function hasResults(){\n return $this->_has(1);\n }", "public function hasResults(){\n return $this->_has(1);\n }", "public function getAllCache(): bool\r\n {\r\n //not exist\r\n $ex = [];\r\n\r\n foreach($this->ckeys as $key => $value) {\r\n //dd(Cache::get($value), $value, 'one');\r\n if(Cache::has($value)) {\r\n $this->{$key} = Cache::get($value);\r\n\r\n } else {\r\n array_push($ex, $key);\r\n }\r\n\r\n }\r\n //dd($ex);\r\n return (count($ex) == 0) ? true : false;\r\n }", "public function getExpires() {\n return \\strtotime($this->date_expires) > \\time();\n }", "public function isAutoCache() {\n return true;\n }", "public function isAutoCache() {\n return true;\n }", "function _check_version_cache()\n\t{\n\t\t// check cache first\n\t\t$cache_expire = 60 * 60 * 24;\t// only do this once per day\n\t\t$this->load->helper('file');\t\n\t\t$contents = read_file(APPPATH.'cache/ee_version/current_version');\n\n\t\tif ($contents !== FALSE)\n\t\t{\n\t\t\t$details = unserialize($contents);\n\n\t\t\tif (($details['timestamp'] + $cache_expire) > $this->localize->now)\n\t\t\t{\n\t\t\t\treturn $details;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}", "public function canLoadFromCache(): bool;", "public function hasResults() {\n $this->getIterator();\n return ($this->_iter->count()>0);\n }", "function getCache($key) {\r\n global $memcache;\r\n return ($memcache) ? $memcache->get($key) : false;\r\n }", "public function isExpired(): bool\n {\n // get data from cache\n if (null === $this->expiration && $this->cacheItemPool instanceof CacheItemPoolInterface) {\n $this->fetchFromCache();\n }\n\n if (null === $this->expiration) {\n return true;\n }\n\n return time() >= $this->expiration->getTimestamp();\n }", "public static function check()\n {\n // get refresh clock\n $clock = \\Config::get('scribe::refresh', 5);\n\n // if cache is off...\n if (!$clock)\n {\n // reset\n static::reset();\n\n // escape\n return null;\n }\n\n // if times up...\n \\Cache::remember(static::$names['timer'], $clock, function()\n {\n // new hash\n $new_hash = Compile::get_hash();\n\n // old hash\n $old_hash = \\Cache::get(static::$names['hash']);\n\n // if different...\n if ($new_hash != $old_hash)\n {\n // reset\n static::reset();\n\n // save most recent hash\n \\Cache::forever(static::$names['hash'], $new_hash);\n }\n\n // return\n return true;\n });\n }", "public function isLast()\n {\n foreach ($this->getAllItems() as $item) {\n if (!$item->isLast()) {\n return false;\n }\n }\n return true;\n }", "public function check_cached($key) {\n\t\t\n\t\t$url_key = \"pagecontent-\".$key;\n\t\t$url_meta = \"pagemeta-\".$key;\n\t\t\n\t\t$data = $this->cache->get($url_meta); \n\t\t\n\t\t//_log(\"data-cached:\", $data);\t\t\t \n\t\t//echo \"<!--\\r\\n<br>data: \" . $data . \"\\n-->\";\n\t\tif ($data === FALSE) { \n\t\t\treturn FALSE;\n\t\t\t//$page_cache->set($url_key, $data);\n\t\t}\n\t\telse {\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function check(){\n\t\t\t$this->data = json_decode($this->storage->get('refresh'));\n\n\t\t\t// And check if it's a new message by comparing its time\n\t\t\tif($this->data->time !== $this->cache){\n\t\t\t\t$this->cache = $this->data->time;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function cache()\n\t{\n\t\tif ( $this->no_cache )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telseif( \"\" !== $this->id && (\"sqlsrv\" === $this->cache_type || \"mysqli\" === $this->cache_type ) )\n\t\t{\n\t\t\treturn $this->do_query( sprintf(\n\t\t\t\t$this->queries[ $this->cache_type ][\"set\"],\n\t\t\t\t$this->id,\n\t\t\t\t$this->time,\n\t\t\t\t$this->mssql_escape_string( $this->content )\n\t\t\t) );\n\t\t}\n\t\telseif( \"\" !== $this->id && \"wincache\" === $this->cache_type )\n\t\t{\n\t\t\t$time = date( \"00:i:s\", strtotime( \"+\" . $this->cache_age, 0 ) );\n\t\t\t\n\t\t\t$seconds = strtotime(\"1970-01-01 $time UTC\");\n\t\t\t\n\t\t\treturn false !== wincache_ucache_set(\n\t\t\t\t$this->id,\n\t\t\t\tjson_encode( array(\n\t\t\t\t\t\"last_run\" \t\t=> $this->time,\n\t\t\t\t\t\"cache_content\" => $this->content\n\t\t\t\t) ),\n\t\t\t\t$seconds\n\t\t\t);\n\t\t}\n\t\telseif( \"\" !== $this->id && \"apcu\" === $this->cache_type )\n\t\t{\n\t\t\t$time = date( \"00:i:s\", strtotime( \"+\" . $this->cache_age, 0 ) );\n\t\t\t\n\t\t\t$seconds = strtotime(\"1970-01-01 $time UTC\");\n\t\t\t\n\t\t\treturn false !== apcu_store(\n\t\t\t\t$this->id,\n\t\t\t\tjson_encode( array(\n\t\t\t\t\t\"last_run\" \t\t=> $this->time,\n\t\t\t\t\t\"cache_content\" => $this->content\n\t\t\t\t) ),\n\t\t\t\t$seconds\n\t\t\t);\n\t\t}\n\t\telseif( \"\" !== $this->cache_file && \"file\" === $this->cache_type )\n\t\t{\n\t\t\treturn false !== file_put_contents(\n\t\t\t\t$this->cache_file,\n\t\t\t\tjson_encode( array(\n\t\t\t\t\t\"last_run\" \t\t=> $this->time,\n\t\t\t\t\t\"cache_content\" => $this->content\n\t\t\t\t) )\n\t\t\t);\n\t\t}\n\t}", "public function fetch()\n {\n if (isset($this->_currentResult) AND is_array($this->_currentResult))\n {\n if (count($this->_currentResult) > 0)\n {\n return array_shift($this->_currentResult);\n }\n }\n \n return false;\n }", "public function checkiscached()\n {\n $template = 'user/cachedemo/checkiscached.tpl';\n\n // force caching on\n $this->view->setCaching(Zikula_View::CACHE_ENABLED);\n\n // force local cache lifetime\n $localcachelifetime = 31;\n $this->view->setCacheLifetime($localcachelifetime);\n\n // check to see if the tempalte is cached, if not, get required data\n if (!$this->view->is_cached($template)) {\n // manufactured wait to demo DB fetch or something resource intensive\n sleep(5);\n\n $this->view->assign('time', microtime(true));\n $this->view->assign('localcachelifetime', $localcachelifetime);\n }\n return $this->view->fetch($template);\n }", "public function isCachable(): bool;" ]
[ "0.77481425", "0.74352574", "0.74156016", "0.71744484", "0.7127877", "0.69883543", "0.6853999", "0.68282235", "0.6809012", "0.68021894", "0.6779424", "0.67790157", "0.6685593", "0.6637742", "0.6628307", "0.6624591", "0.6552589", "0.6535021", "0.6527742", "0.65275973", "0.6515881", "0.65148276", "0.64843035", "0.64572376", "0.6453835", "0.6451937", "0.64494985", "0.64463747", "0.6436671", "0.6409976", "0.63984865", "0.63984865", "0.6360099", "0.6360099", "0.6360099", "0.6344285", "0.63329625", "0.63154334", "0.6311979", "0.6311979", "0.63100994", "0.62937516", "0.62767947", "0.6263463", "0.6258118", "0.62517047", "0.62505215", "0.6249511", "0.62469345", "0.6244939", "0.62428236", "0.6241653", "0.62307954", "0.6229424", "0.6228686", "0.6216716", "0.6209172", "0.62078017", "0.6204948", "0.618871", "0.61765003", "0.6168277", "0.6163682", "0.61628634", "0.6158309", "0.6155608", "0.61542827", "0.61451805", "0.6142385", "0.61286324", "0.611795", "0.6105364", "0.60955155", "0.6094552", "0.60931355", "0.60852325", "0.6068308", "0.60656416", "0.6063447", "0.6061434", "0.6055851", "0.60550684", "0.60550684", "0.60509914", "0.6049657", "0.60461247", "0.60461247", "0.6045699", "0.6042021", "0.60372174", "0.60290337", "0.60235107", "0.60193026", "0.6017377", "0.60058665", "0.6005144", "0.6003456", "0.59993017", "0.5994687", "0.59929425" ]
0.87317365
0
Returns last cacheKey used.
Возвращает последний использованный cacheKey.
public function getLastCacheKey() { return $this->lastCacheKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCacheKey() {\n return $this->cacheKey;\n }", "public function getLastKey() {\r\n return $this->_lastKey;\r\n }", "public function getLastEvaluatedKey()\n {\n return $this->_last_evaluated_key;\n }", "public function getCacheKey()\n {\n return $this->getKey();\n }", "protected function getCacheKey() {\n\t\t\treturn $this->objUrl->getCurrentUrl(true, false);\n\t\t}", "protected function getCacheKey()\n {\n return isset($this->_options['cacheKey'])\n ? $this->_options['cacheKey']\n : self::DEFAULT_CACHE_KEY;\n }", "public function getCacheKey() {\n if (is_null($this->cacheKey)) {\n return '默认KEY';\n }\n\n return $this->cacheKey;\n }", "public function getCacheKey()\n {\n if (is_null($this->cacheKey)) {\n return $this->prefix . $this->{$this->cacheKeyField};\n }\n\n return $this->cacheKey;\n }", "public function cacheKey() {\n if ($this->revision) {\n return self::CACHE_PREFIX . $this->id . '_r' . $this->revision;\n } else {\n return self::CACHE_PREFIX . $this->id;\n }\n }", "public function getCacheKey()\n {\n if (is_null($this->cacheKey)) {\n return $this->prefix.$this->appKey;\n }\n\n return $this->cacheKey;\n }", "public function getCacheableKey()\n {\n $namespace = explode(\"\\\\\", str_plural(mb_strtolower(get_class($this))));\n\n return end($namespace).':'.$this->getKey();\n }", "protected function getCacheKey()\n {\n return self::CACHE_KEY . '_' . $this->owner->appID;\n }", "public function cacheKey() {\n $params = $this->getParameters();\n $ret = '';\n $this->make_cache_key($params, $ret);\n\n return md5($ret);\n }", "public function cacheKey() {\n $params = $this->getParameters();\n $ret = '';\n $this->make_cache_key($params, $ret);\n\n return md5($ret);\n }", "public function getCacheKey()\n {\n if (is_array($this->scope)) {\n return implode(':', $this->scope);\n }\n\n if ($this->audience) {\n return $this->audience;\n }\n\n // If scope has not set, return null to indicate no caching.\n return null;\n }", "public function lastKey ()\n {\n // (pravdepodobne) rychlejsi\n foreach ($this->data as $key => $item) {\n $lKey = $key;\n }\n return $lKey;\n /*\n $buffer = array_keys($this->data);\n return $buffer[count($buffer)-1];\n */\n }", "public function getLastKey() {\r\n\t\t$tmp = $this->toArray();\r\n\t\tend($tmp);\r\n\t\treturn key($tmp);\r\n\t}", "public function getCacheKey()\n {\n // See if there is a cache option\n $cacheFor = $this->getOption('cachefor');\n if ($cacheFor == null)\n return null;\n\n // We do want to cache, so generate a key\n $key = 'outputcache'.$this->matchedUri;\n\n // Look for any 'vary by' options and add stuff to the key based on that\n\n // return the key\n return $key;\n }", "function getCacheKey()\n {\n return $this->getYear().get_class($this);\n }", "public function getCacheKey()\n {\n //TODO: implement real cache check, no it uses not so smart method of caching by query address\n return (string) $this;\n }", "public function last()\n {\n return $this->internal->last()->key;\n }", "public function getCacheIdentifier()\n {\n return $this->_cacheIdentifier;\n }", "private function getCacheKey()\n {\n return md5($this->getHostname());\n }", "public function getCurrentKey()\n\t{\n\t\treturn $this->currentKey;\n\t}", "public function getCacheKey();", "public function getCacheKey();", "public function getCacheHash() {\r\n\t\treturn $this->cacheHash;\r\n\t}", "public function getCacheKey()\n {\n return parent::getCacheKey() . '-' . $this->getPriceId() . '-' . $this->getPrice()->getPriceCode();\n }", "function get_last_key() {\n return 'a';\n}", "public static function get_cache_key( string $url ): string {\n\n\t\t/**\n\t\t * Transients get saved using _transient_timeout_ prefix. But the database only can have\n\t\t * 191 characters. So we only have 150 characters left for the hash value.\n\t\t */\n\t\treturn substr( sprintf( 'wpb_rs/r_cache/%s', self::hash( $url ) ), 0, 150 );\n\t}", "private function cache_key() {\n\n\t\t\t$key = $this->transient_object->key;\n\n\t\t\tif ( $this->should_hash() ) {\n\t\t\t\t$key = $this->hash_key( $key );\n\t\t\t}\n\n\t\t\tif ( 'post_meta' === $this->transient_object->cache_type || 'term_meta' === $this->transient_object->cache_type ) {\n\t\t\t\t$key = $this->prefix . $key;\n\t\t\t}\n\n\t\t\tif ( 'transient' === $this->transient_object->cache_type && ! empty( $this->modifier ) ) {\n\t\t\t\t$key = $key . '_' . $this->modifier;\n\t\t\t}\n\n\t\t\treturn $key;\n\n\t\t}", "public function getCacheId()\n {\n return $this->cache_id;\n }", "public function get_cached_id()\n {\n }", "protected static function cacheKey()\n {\n $name = static::className();\n $key = (app()->environment() === 'testing') ? \"trending_{$name}s_testing\" : \"trending_{$name}s\";\n return $key;\n }", "protected function _getCacheId()\n {\n $template = $this->_placeholder->getAttribute('template');\n $cache_id = $this->_placeholder->getAttribute('cache_id');\n return static::CACHE_TAG_PREFIX . md5($cache_id . $template) . '_' . $this->_getIdentifier();\n }", "protected function getCacheKey() {\n return request()->url();\n }", "protected function getCacheKey(): string\n {\n return $this->session->getId() . self::class;\n }", "public function get_meta_cache_key()\n {\n }", "protected function _getCacheId()\n {\n return $this->_placeholder->getName();\t\t// Return the placeholder name as the cache id\n }", "protected function generateCacheId() {\n return $this->hash;\n }", "protected function cache_key() {\n\t\treturn 'tribe_plugin_upgrade_notice-' . hash( 'crc32b', $this->plugin_path . $this->current_version );\n\t}", "public function key() {\n\t\treturn key($this->storage);\n\t}", "public function key() {\n\t\treturn key($this->storage);\n\t}", "#[\\ReturnTypeWillChange]\n public function key()\n {\n if (!$this->_init) {\n $this->_fetch();\n }\n $this->_started = true;\n return $this->_key;\n }", "private function getCacheKey(): string\n {\n return $this->permissionCacheKey.'.'.$this->getTable().'.'.$this->id;\n }", "public function key()\n {\n return key($this->_storage);\n }", "#[\\ReturnTypeWillChange]\n\tpublic function key()\n\t{\n\t\t$this->load(false);\n\t\t\n\t\treturn \\current($this->keys);\n\t}", "protected function GetCacheKey()\n\t{\n\t\treturn sha1($this->params['message']) . '|' . ($this->params['error'] ? '1' : '0');;\n\t}", "public function getCacheIdentifier() {}", "public function getCacheIdentifier() {}", "public function getCacheId() {\n\t\t$cacheId = get_class($this) . 'LanguagesList';\n\t\treturn $cacheId;\n\t}", "public function key ()\n {\n return key($this->pool);\n }", "public function getCacheEntryIdentifier() {\n\t\t$this->initialize();\n\t\treturn $this->methodPrivilege->getCacheEntryIdentifier();\n\t}", "public function getCacheEntryIdentifier(): string\n {\n return $this->cacheEntryIdentifier;\n }", "private function _getCacheId()\n {\n return \\MUtil_String::toCacheId(GEMS_PROJECT_NAME . '__' . get_class($this) . '__' . $this->_id);\n }", "public function getCacheKeyInfo()\n\t{\n\t\treturn $this->_messageBlock->getCacheKeyInfo() ;\n\t}", "protected function getLocalizedCacheKey() {\n\n\t\t$cacheKey = $this->getLocalizedKey();\n\t\tif ($cachePrefix = Config::get('resources.cachePrefix')) {\n\t\t\t$cacheKey = $cachePrefix . '.' . $cacheKey;\n\t\t}\n\n\t\treturn $cacheKey;\n\t}", "public function cacheKey(): string\n {\n return 'wallet:cash-min-amount';\n }", "protected function GetCacheKey()\n\t{\n\t\treturn (isset($this->params['hashbase']) ? $this->params['hashbase'] : '') . '|' . (isset($this->params['hash']) ? $this->params['hash'] : '') . '|' . (isset($this->params['hashparent']) ? $this->params['hashparent'] : '') . '|' . (isset($this->params['file']) ? sha1($this->params['file']) : '') . '|' . (isset($this->params['sidebyside']) && ($this->params['sidebyside'] === true) ? '1' : '');\n\t}", "private function getCacheId()\n\t{\n\t\treturn 'CLASS:' . get_class( $this );\n\t}", "public function getCacheKey () {\n return parent::getCacheKey()\n . Mage::helper('accesscontrol')->get_current_customer_group();\n }", "public function key()\n {\n return $this->currentKey;\n }", "public function key()\n {\n return $this->currentKey;\n }", "public function getNextKey() {\n\t\treturn $this->counter + 1;\n\t}", "protected function _getAdditionalCacheId()\n\t{\n\t\treturn md5($this->_placeholder->getName() . '_' . $this->_placeholder->getAttribute('cache_id'));\n\t}", "private function getNamespaceCacheKey()\n {\n return sprintf(self::KAZINDUZI_NS_CACHE_KEY, $this->ns);\n }", "public function key()\n {\n return key($this->entries);\n }", "public function key(): mixed\n {\n return $this->allIteratorKeys[$this->currentIteratorKey] ?? null;\n }", "public function key()\n {\n if (!$this->generator) {\n $this->rewind();\n }\n\n return $this->generator->key();\n }", "public function key()\n {\n if (!$this->key) {\n $this->key = $this->get('key');\n }\n\n return $this->key;\n }", "public function getCacheEntryIdentifier(): string\n {\n $this->initialize();\n return $this->methodPrivilege->getCacheEntryIdentifier();\n }", "public function getCacheKey($name)\n {\n $key = parent::getCacheKey($name);\n return $key . filemtime($key);\n }", "public function key()\n {\n return key($this->queue);\n }", "public function key()\n\t{\n\t\treturn key($this->metadata);\n\t}", "protected function _getCacheInternalId()\n {\n $adapter = $this->getAdapter();\n\n if (method_exists($adapter, 'getCacheIdentifier')) {\n return md5(serialize([\n $adapter->getCacheIdentifier(), $this->getItemCountPerPage()\n ]));\n } else {\n return md5(serialize([\n $adapter,\n $this->getItemCountPerPage()\n ]));\n }\n }", "public function key()\n {\n return current($this->hashToKeyObjectMap);\n }", "private function _thisJobKey(): ?string\n {\n\n // PHP >= 7.3 can use array_key_last\n\n if (empty($this->jobs)) {\n return NULL;\n }\n\n end($this->jobs);\n\n $key = key($this->jobs);\n\n reset($this->jobs);\n\n return $key;\n\n }", "public function getCacheKeyInfo()\n {\n $cacheId = [\n 'TOPMENU',\n $this->getNameInLayout(),\n ];\n\n return $cacheId;\n }", "public function getLastSeen()\n {\n return $this->lastSeen;\n }", "public function key()\n {\n $var = key($this->failures);\n return $var;\n }", "public function getLastSeen()\r\n {\r\n return $this->lastSeen;\r\n }", "protected function GetCacheKey()\n\t{\n\t\treturn isset($this->params['graphtype']) ? $this->params['graphtype'] : '';\n\t}", "public function getCacheKey()\n {\n\n $key = parent::getCacheKey();\n $customerGroupId = $this->_getCustomerGroupId();\n $productId = Mage::registry( 'current_product' ) ? Mage::registry( 'current_product' )->getId() : 0;\n $cmsPageId = Mage::app()->getRequest()->getParam( 'page_id', Mage::getStoreConfig( Mage_Cms_Helper_Page::XML_PATH_HOME_PAGE ) );\n\n return 'VERTNAV_' . $key . '_' . $customerGroupId . '_' . $productId . '_' . $cmsPageId;\n }", "public function key() {\n return $this->currentKey;\n }", "public function key() {\n return $this->currentKey;\n }", "public static function getCacheTime(): int\n {\n return static::$cache ?: 0;\n }", "static function lastId()\r\n {\r\n return Cache::variable(Posts::$lastId, function() {\r\n return DB::object('lastPostId')['id'];\r\n });\r\n }", "protected function getCacheTime() {\n $time = self::CACHE_TIME;\n\n return $time; \n }", "protected function getCachedRecord() {\n if (isset($this->requestCachedRecords[$this->key()])) return $this->requestCachedRecords[$this->key()];\n }", "public function key()\n {\n return key($this->session[$this->prefix]);\n }", "public function getKey()\n {\n return md5($this->getName() . $this . $this->getPriority());\n }", "public function key()\n {\n return $this->_oCurrent->id;\n }", "public function getCacheKey($name)\n {\n $cacheKey = $this->findTemplate($name);\n if ($this->disableCache) {\n return $cacheKey . time();\n }\n\n return $cacheKey;\n }", "public function get_cache_id() {\n\t\t\treturn apply_filters( 'cherry_cached_widget_id', $this->widget_id );\n\t\t}", "protected static function getCacheName() {\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName)) {\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "protected static function getCacheName() {\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName)) {\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "protected static function getCacheName() {\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName)) {\n\t\t\t$strCacheName = __CLASS__;\n\t\t}\n\t\treturn $strCacheName;\n\t}", "public function get_key() {\n\t\treturn $this->key;\n\t}", "public function GetKey() {\n\t\t\treturn $this->_Key;\n\t\t}", "public function nameTheCache()\n {\n return $this->cacheFile;\n }" ]
[ "0.76252234", "0.7391444", "0.7383014", "0.7303315", "0.7251127", "0.7244715", "0.71967083", "0.71881056", "0.7104084", "0.7023723", "0.70166624", "0.6991063", "0.6968316", "0.6968316", "0.6965602", "0.69635886", "0.6943917", "0.6903402", "0.6852271", "0.68348587", "0.6816202", "0.6760126", "0.6752808", "0.6723694", "0.67014587", "0.67014587", "0.66919297", "0.6674285", "0.66445744", "0.66421056", "0.6633177", "0.66149473", "0.65646404", "0.6563821", "0.6560661", "0.6539811", "0.6532309", "0.65256196", "0.65247107", "0.6491847", "0.64816046", "0.64721864", "0.64721864", "0.647112", "0.64359677", "0.6434101", "0.64229304", "0.63980436", "0.63888997", "0.63888997", "0.6369933", "0.6359112", "0.63550866", "0.63496697", "0.6335082", "0.633217", "0.6331065", "0.63251984", "0.6320396", "0.6319623", "0.63101405", "0.63018566", "0.63018566", "0.6297553", "0.6292788", "0.6292548", "0.6283615", "0.62819445", "0.6269708", "0.6268917", "0.6256223", "0.62495416", "0.62471837", "0.62319744", "0.62276036", "0.622627", "0.62253994", "0.62216043", "0.62179536", "0.6213522", "0.6213322", "0.62078243", "0.6203248", "0.6202786", "0.6202786", "0.61866003", "0.61796767", "0.61716485", "0.6169535", "0.6167031", "0.6166823", "0.61494434", "0.6143494", "0.6132748", "0.61319244", "0.61319244", "0.61319244", "0.6130818", "0.6129501", "0.61239773" ]
0.86203
0
In this action the asset with the given is loaded. Then it is determined if the asset is a file or a folder. Then a normal listing and a path listing of the folder or file's parent folder is generated.
В этом действии загружается актив с указанным идентификатором. Затем определяется, является ли актив файлом или папкой. Далее генерируются обычный список и список путей для родительской папки файла или папки.
function doAction() { //$uv = new user_var($scrivo_conn, $login_user_id, "last_asset_folder"); $assetId = Request::get("assetId", Request::TYPE_INTEGER, 0); if (!$assetId) { $assetId = $this->context->config->ROOT_FOLDER_ID; } //if ($dirId === 0) { // $dirId = intval($uv->get()); //} $selId = -1; $selIndex = array(); $dir = Asset::fetch($this->context, $assetId); if ($dir instanceof File) { // Whoops, its a file: get the parent folder. $selId = $dir->id; $dir = Asset::fetch($this->context, $dir->parentId); } else { //$uv->set($asset->assetId); } // Create the files and folder listing. $list = array(); foreach ($dir->children as $c) { $list[] = array( "assetId" => $c->id, "title" => (string)$c->title, "type" => $c->type, "mimetype" => $c instanceof File ? (string)$c->mimeType : "", "size" => $c instanceof File ? $c->size : "", "modified" => $c->dateModified->getTimeStamp() ); if ($c->id == $selId) { $selIndex[] = count($list)-1; } } // Create the path listing. $path = array(); foreach ($dir->path as $p) { $path[] = array( "assetId" => $p->id, "title" => (string)$p->title, "parentId" => $p->parentId ); } $path[] = array( "assetId" => $dir->id, "title" => (string)$dir->title, "parentId" => $dir->parentId ); // TODO: Feeds. $feeds = array(); /* if ($dirId == 2) { // we're at root level: also check the existence of feeds $feedno = 1; while (defined("FILE_DIALOG_FEED_$feedno")) { $feed = Scrivo_utf8_split("#", constant("FILE_DIALOG_FEED_$feedno")); $res4[] = array( "feedId" => $feedno, "title" => $feed[0], "url" => $feed[1] ); $feedno++; } } */ $res = array("list"=>$list, "path"=>$path, "feeds"=>$feeds, "indexSelected" => $selIndex); $this->setResult(self::SUCCESS, $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAssetParentAssets($asset);", "function assets($file = null ,$type=\"/\",$dir = \"assets\"){\n listFolderFiles($dir);\n}", "public static function asset($asset = '')\n\t{\n\n\t\t$parent_theme = self::get_activated_theme_by_role('parent');\n\t\t$child_theme = self::get_activated_theme_by_role('child');\n\t\t\n\t\t$path = public_path(\"themes/{$child_theme}/{$asset}\");\n\n\t\tif($child_theme && file_exists($path)) {\n\t\t\t\n\t\t\treturn asset(\"themes/{$child_theme}/{$asset}\");\n\t\t\t\n\t\t} else {\n\n\t\t\treturn asset(\"themes/{$parent_theme}/{$asset}\");\n\t\t}\n \t\n\t}", "public function assets() {\n\n try {\n $config = \\Drupal::config('dam.ftp_settings');\n if ($config->get('dam_root_folder') == '' || $config->get('dam_root_folder') == '/') {\n return [\n '#markup' => $this->t('Please make sure assets folder path is correct.'),\n ];\n }\n FileDirectory::updateDirectory( $config->get('dam_root_folder') );\n $path = $config->get('dam_root_folder');\n // Create the links for switching displays from file or collection view, and links for settings and collapse.\n $control_menu = [\n '#theme' => 'item_list',\n '#list_type' => 'ul',\n '#items' => []\n ];\n\n $action_menu = [];\n $display_menu = [];\n $tree = FileDirectory::getTree( $path, $path, TRUE );\n\n // Get current user roles for file permission check\n $userCurrent = \\Drupal::currentUser();\n $user = User::load($userCurrent->id());\n $roles = $user->getRoles();\n\n return [\n '#cache' => ['max-age' => 0,],\n '#attached' => [\n 'library' =>[\n 'dam/global_style',\n 'dam/assets_page'\n ],\n 'drupalSettings' => [\n 'dam' => [\n 'folders' => FileDirectory::getTree( $path, $path, FALSE ),\n 'tree' => $tree,\n 'activeTree' => $tree,\n ],\n 'user' => [\n 'roles' => $roles\n ]\n ]\n ],\n 'dam_wrapper' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-wrapper'\n ],\n 'content' => [\n 'dam_view_mode' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'assets-mode-select'\n ],\n 'modes' => [\n '#theme' => 'item_list',\n '#items' => [\n [\n '#wrapper_attributes' => [\n 'class' => [ 'asset-mode-icons', 'asset-mode', 'active' ]\n ],\n '#markup' => '<a href=\"#thumbnail\" data-toggle=\"tab\"><span class=\"glyphicon glyphicon-th\"></span></a>'\n ],\n [\n '#wrapper_attributes' => [\n 'class' => [ 'asset-mode-list', 'asset-mode' ]\n ],\n '#markup' => '<a href=\"#list\" data-toggle=\"tab\"><span class=\"glyphicon glyphicon-list\"></span></a>'\n ],\n ]\n ]\n ],\n 'dam_assets_explorer' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'assets-explorer'\n ],\n ],\n 'dam_assets_folder_buttons' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'assets-folder-buttons'\n ],\n 'modes' => [\n '#theme' => 'item_list',\n '#items' => [\n [ '#markup' => '<a id=\"add-folder\"><i class=\"fa fa-plus\"></i></a>' ],\n [ '#markup' => '<a id=\"delete-folder\"><i class=\"fa fa-minus\"></i></a>' ],\n [ '#markup' => '<a id=\"move-folder\"><i class=\"fa fa-arrow-right\"></i></a>' ]\n ]\n ]\n ],\n 'dam_assets_loader' => [\n '#type' => 'container',\n '#attributes' => [\n 'class' => 'loader-wrapper'\n ],\n 'content' => [\n 'dam_assets_load' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'loader'\n ],\n 'content' => [\n '#markup' => '<img src=\"../modules/custom/dam/assets/img/Loading_icon.gif\">'\n ]\n ]\n ]\n ],\n 'dam_asssets_viewer' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'assets-viewer',\n 'title' => t('Select a folder to view files.'),\n 'data-view' => ['thumbnail']\n ],\n 'content' => [\n '#markup' => '<div id=\"thumbnail-view\"></div><div id=\"list-view\"></div>'\n ]\n ],\n 'dam_preview_view_mode' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'assets-preview-view-mode',\n ],\n 'modes' => [\n '#theme' => 'item_list',\n '#items' => [\n [ '#markup' => '<a href=\"#collapse\" data-toggle=\"tab\"><span class=\"glyphicon glyphicon-forward\"></span></a>' ],\n [ '#markup' => '<a href=\"#information\" data-toggle=\"tab\"><span class=\"glyphicon glyphicon-info-sign\"></span></a>' ],\n [ '#markup' => '<a href=\"#comments\" data-toggle=\"tab\"><span class=\"glyphicon glyphicon-comment\"></span></a>' ]\n ]\n ]\n ],\n 'dam_assets_info_wrapper' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'assets-info-wrapper'\n ],\n 'content' => [\n 'dam_assets_preview' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-assets-preview'\n ],\n 'content' => [\n '#markup' => '<h4><a href=\"#\" class=\"collapse-preview\" data-toggle=\"collapse\"><span class=\"glyphicon glyphicon-triangle-bottom\">' . t('Preview') . '</a></h4>' .\n '<div class=\"container preview-pane\"><div id=\"preview-thumbnail\"></div>' .\n '<div class=\"preview-details\">' .\n '<a href=\"#dam-assets-info\" data-toggle=\"tab\">Info</a>' .\n '<a href=\"#dam-assets-share\" data-toggle=\"tab\">Download</a>' .\n '<a href=\"#dam-assets-access\" data-toggle=\"tab\">Access</a>' .\n '</div>' .\n '</div>',\n ]\n ],\n 'dam_assets_info' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-assets-info',\n ],\n 'content' => [\n 'dam_assets_info_content' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-assets-info-content',\n ],\n 'content' => [\n '#markup' => '<div id=\"info\" class=\"container\"></div>',\n ]\n ],\n 'dam_assets_label_wrapper' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-assets-label-form',\n ],\n 'content' => DamController::getLabels()\n ],\n ]\n ],\n 'dam_assets_share' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-assets-share'\n ],\n 'content' => [\n '#markup' => '<div id=\"download\" class=\"container\"></div>',\n ]\n ],\n 'dam_assets_access' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-assets-access'\n ],\n 'content' => [\n 'dam_users_list' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-users-wrapper'\n ],\n 'content' => DamController::getUserFileAccess()\n ],\n 'dam_footer_wrapper' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-users-footer'\n ],\n 'content' => [\n '#markup' => '<a id=\"add-user\" data-toggle=\"tab\"><i class=\"fa fa-plus\"></i> Add User</a>' .\n '<a id=\"add-role\" data-toggle=\"tab\"><i class=\"fa fa-plus\"></i> Add Role</a>'\n ]\n ],\n ]\n ],\n ]\n ],\n 'dam_assets_comments' => [\n '#type' => 'container',\n '#attributes' => [\n 'id' => 'dam-assets-comments'\n ],\n 'content' => [\n '#markup' => '<div id=\"comments\" class=\"container\"></div>'\n ]\n ]\n ]\n ],\n ];\n } catch (\\Exception $e) {\n \\Drupal::logger('dam')->info(\"Error : @error\", ['@error' => $e->getMessage()]);\n drupal_set_message(t(\"Data too long for column 'name'\"), 'error');\n return [\n '#markup' => $this->t('Some error occurred in getting result.')\n ];\n }\n }", "public function includeAssets();", "protected function _parentAsset($attachment) {\n\t\t$path = $attachment->import_path;\n\t\t$parts = pathinfo($path);\n\t\tlist($filename, ) = explode('.', $parts['filename'], 2);\n\t\t$filename = rtrim(WWW_ROOT, '/') . $parts['dirname'] . '/' . $filename . '.' . $parts['extension'];\n\t\tif (file_exists($filename)) {\n\t\t\t$hash = sha1_file($filename);\n\t\t\treturn $this->Attachments->Assets->findByHash($hash)->first();\n\t\t}\n\t\treturn false;\n\t}", "abstract public function getAsset($main_file);", "public function getImage() {\n //get the file type\n $fileType = substr(strrchr($this->URL, '.'), 1);\n \n //get the base path\n $basePath = Director::baseFolder() . DIRECTORY_SEPARATOR;\n //find or make a new folder\n $this->folder = Folder::find_or_make($this->folderName); // relative to assets\n //get the relative path to the file\n $this->relativeFilePath = $this->folder->Filename . $this->Title . '.' . $fileType;\n //get the full path\n $this->fullPath = $basePath . $this->relativeFilePath;\n \n //check to see if the file exist\n if (!file_exists($this->fullPath)){\n // download the file\n $fp = fopen($this->fullPath, 'w');\n $ch = curl_init($this->URL);\n curl_setopt($ch, CURLOPT_FILE, $fp);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 1000); // some large value to allow curl to run for a long time\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifySSL);\n $data = curl_exec($ch);\n curl_close($ch);\n fwrite($fp, $data);\n fclose($fp);\n }\n }", "private function loadAssets()\n {\n }", "public function getAssetsPath(): string;", "function sc_asset($type,$name) {\n \n global $CONFIG;\n global $SC;\n \n if ($type != 'img' && $type != 'button') {\n $name = preg_replace(\"/\\.$type$/\",'',$name).\".$type\";\n }\n \n if ($type == 'button') { \n $name = $SC->Config->get_setting('buttons_folder').\"/$name.gif\";\n }\n \n return sc_location(\"core/assets/$type/$name\");\n }", "function assets($asset)\n {\n return ASSETS . $asset;\n }", "public function init($root = '') {\n\t\t$this->root = is_dir($root) ? $root : $this->root;\n\t\tif (!is_dir($this->root)) {\n\t\t\tdie('You need to define the root directory. (example with ts: plugin.tx_assets.settings.DisplayAssetsDirectories.root = fileadmin/galerie/)');\n\t\t}\n\n\t\t$this->assetDirectoryRepository->init();\n\t\t$this->assetFileRepository->init();\n\n\t\t$categories = $this->assetDirectoryRepository->findAll();\n\t\t$assetFileRepositoryForCategory = t3lib_div::makeInstance('Tx_Assets_Domain_Repository_AssetFileRepository');\n\t\t$assetFileRepositoryForCategory->setSettings($this->settings);\n\t\tforeach($categories as $category) {\n\t\t\t$assetFileRepositoryForCategory->setRoot($category->getPath());\n\t\t\t$assetFileRepositoryForCategory->init();\n\t\t\t$categoryAssets = $assetFileRepositoryForCategory->findAll();\n\t\t\tforeach($categoryAssets as $categoryAsset) {\n\t\t\t\t$categoryAsset->addCategory($category);\n\t\t\t\t$category->addAsset($categoryAsset);\n\t\t\t\t$this->assetDirectoryRepository->update($category);\n\t\t\t\t$this->assetFileRepository->add($categoryAsset);\n\t\t\t}\n\t\t}\n\n\t\t$this->overrideWithFolderInfo();\n\t\t$this->checkRoles();\n\t}", "public function test_generatorAsset(){\n\t\t$this->_args = array(\n\t\t\t0 => 'generator:asset',\n\t\t\t1 => 'test.css'\n\t\t);\n\n\t\t$this->_generator->run($this->_args);\n\n\t\t$ext = $this->_generator->getExtension($this->_args[1]);\n\t\t$assets_path = $this->_generator->getFileAssetsDirectory($this->_args[1]);\n\n\t\t$this->assertTrue( is_dir( str_replace($this->_args[1], '', $this->assetsDirectory . $assets_path)));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path ));\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path), 'css');\n\t\t//\tRemoving file generated\n\t\tunlink($this->assetsDirectory . $assets_path);\n\t\t//\tVerifying if file was deleted\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path));\n\t}", "public function load()\n {\n if(!$this->block->name || !$this->block->path)\n {\n DivHunt::log('Block \"' . $this->block->name . '\" is invalid.')->type('warning')->show(true)->log();\n return __DIR__ . '/load/empty.php';\n }\n\n if(!file_exists($this->block->path . 'block.php'))\n {\n DivHunt::log('Block \"' . $this->block->name . '\" does not exist.')->type('warning')->show(true)->log();\n return __DIR__ . '/load/empty.php';\n }\n\n DivHunt::setLoad('block', $this->block->name, ['path' => $this->block->path]);\n DivHunt::runTrigger('block_load', $this->block);\n\n block::useSetBlock($this->block);\n\n return __DIR__ . '/load/load.php';\n }", "public function getFiles()\r\n\t\t{\r\n\t\t\tif(isset($_SESSION['primrix']['user'])){ //security check\t\t\t\r\n\t\t\t\tif(UserModel::getLoginSession()){ //session time check\r\n\t\t\t\t\tif(!isset($_SESSION['assetManager']['viewStyle'])) $_SESSION['assetManager']['viewStyle'] = Def::$primrix->settings->thumbViewStyleDefault;\r\n\t\t\t\t\t$folder = 'site/files' . $_SESSION['assetManager']['folder'] . '/';\r\n\t\t\t\t\techo AssetsModel::getAssetTiles($folder, $_SESSION['assetManager']['viewStyle'], Uri::$array[3]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "abstract protected function getTestAssetPath($name);", "public function load_assets() {\n\n\t}", "public function show(Asset $asset)\n {\n //\n }", "public function renderChild() {\n include $this->_renderViews->pop()->_path;\n }", "protected function overrideWithFolderInfo() {\n\t\t$categories = $this->assetDirectoryRepository->findWithNoParent();\n\t\tforeach($categories as &$category) {\n\t\t\t$this->processCategory($category);\n\t\t}\n\n\t\tif (is_file($this->root . '/.folderinfo')) {\n\t\t\t$folderInfo = Tx_Assets_Service_Yaml::decodeFile($this->root . '/.folderinfo');\n\t\t\t$this->overrideCategoryWithFolderInfo($this->root, $folderInfo);\n\t\t}\n\t}", "function getAsset($parentId=null,$parentType=null){\r\n\t\treturn Asset::getAsset($this->id, static::$confType,$parentId,$parentType);\r\n\t}", "public function createFileInfos($asset);", "public function getAssetAssetFileList($asset);", "function assetAdmin($path, $webpackMix = true, $type = false) \n\t{\n\t\t\n\t\tif( $webpackMix == true){\n\t\t\treturn base_url('backend/themes/' . service('settings')->get('App.theme_bo', 'name') . '/assets/' . $path);\n\t\t}else{\n\t\t\treturn base_url('backend/themes/' . service('settings')->get('App.theme_bo', 'name') . '/assets/' .$type. '/' . $path);\n\t\t}\n\t}", "private static function loadAndInitialize(&$parent, $type, $objects) {\n\t\t\n\t\tswitch ($type) {\n\t\t\tcase \"component\":\n\t\t\t\t$path = COMPONENTDIR;\n\t\t\t\tbreak;\n\t\t\tcase \"helper\":\n\t\t\t\t$path = HELPERDIR;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Exception(\"Unrecognized load type <strong>\" . $type . \"</strong> specified\");\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (is_array($objects)) {\n\t\t\tforeach ($objects as $key => $value) {\n\t\t\t\t\n\t\t\t\tif (is_array($value))\n\t\t\t\t\t$object = $key;\n\t\t\t\telse {\n\t\t\t\t\t$object = $value;\n\t\t\t\t\t$value = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$plugin = null;\n\t\t\t\tif (($c = strpos($object, \".\"))) {\n\t\t\t\t\t$plugin = self::fromCamelCase(substr($object, 0, $c)) . DS;\n\t\t\t\t\t$object = substr($object, $c+1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($plugin)\n\t\t\t\t\t$dir = PLUGINDIR . $plugin . DS . $type . \"s\" . DS;\n\t\t\t\telse\n\t\t\t\t\t$dir = $path;\n\t\t\t\t\n\t\t\t\t$object_name = self::toCamelCase($object);\n\t\t\t\t\n\t\t\t\t// Include the object\n\t\t\t\t$object = self::fromCamelCase($object);\n\t\t\t\t$object_file = $object . \".php\";\n\t\t\t\t\n\t\t\t\t// Search for the object in the root object directory\n\t\t\t\tif (file_exists($dir . $object_file))\n\t\t\t\t\t$object = $dir . $object_file;\n\t\t\t\t// The object may also appear in a subdirectory of the same name\n\t\t\t\telseif (file_exists($dir . $object . DS . $object_file))\n\t\t\t\t\t$object = $dir . $object . DS . $object_file;\n\t\t\t\t// If the object can not be found in either location throw an exception\n\t\t\t\telse\n\t\t\t\t\tthrow new Exception(\"<strong>\" . $object_name . \"</strong> \" . $type . \" not found\");\n\t\t\t\t\n\t\t\t\trequire_once $object;\n\n\t\t\t\t// Initialize the object\n\t\t\t\t$parent->$object_name = call_user_func_array(array(new ReflectionClass($object_name), 'newInstance'), $value);\n\t\t\t\t\n\t\t\t\tif ($type == \"helper\") {\n\t\t\t\t\t// Link this object with the view and structure view associated with this controller\n\t\t\t\t\tif (isset($parent->view) && $parent->view instanceof View)\n\t\t\t\t\t\t$parent->view->$object_name =& $parent->$object_name;\n\t\t\t\t\tif (isset($parent->structure) && $parent->structure instanceof View)\n\t\t\t\t\t\t$parent->structure->$object_name =& $parent->$object_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function check_paths() {\n\t\t// what CHMOD permissions should we use for the upload folders?\n\t\t$chmod = $this->config->item('tinycimm_asset_upload_chmod');\n\t\t\n\t\t// upload dir\n\t\tif (!file_exists($this->config->item('tinycimm_asset_path_full'))) {\n\t\t\t@mkdir($this->config->item('tinycimm_asset_path_full'), $chmod) or die('Error: Unable to create asset folder '.$this->config->item('tinycimm_asset_path_full').'<br/><strong>Please adjust permissions</strong>');\n\t\t}\n\t\t// cache dir\n\t\tif (!file_exists($this->config->item('tinycimm_asset_cache_path_full'))) {\n\t\t\t@mkdir($this->config->item('tinycimm_asset_cache_path_full'), $chmod) or die('Error: Unable to create asset cache folder '.$this->config->item('tinycimm_asset_cache_path_full').'<br/><strong>Please adjust permissions</strong>');\n\t\t}\n\t}", "public function getAssets();", "public function getAssets();", "public function getAssets();", "static function action($path) {\n // Get folders under this path\n $folders = self::getFolders($path);\n\n // Get files under this path\n $files = self::getFiles($path);\n\n // Breadcrumb trail\n self::displayBreadcrumbs($path);\n\n echo '<ul class=\"files fa-ul\">';\n\n // Display folders\n self::displayFolders($folders);\n\n // Display files\n self::displayFiles($files);\n\n echo '</ul>';\n }", "public function getAssetsPath()\n {\n return $this->getBasePath().'/'.$this->asset_path;\n }", "public function testCreateAsset()\n {\n }", "protected function loadPath()\n {\n }", "function cms_asset_path($file_name = '')\n{\n return \\CMS::assetPath($file_name);\n}", "abstract protected function internalGetFiles($assetDir);", "public function filterLoad(AssetInterface $asset);", "function displaydir($file_info) {\n global $CFG;\n\n $children = $file_info->get_children();\n $parent_info = $file_info->get_parent();\n\n $strname = get_string('name');\n $strsize = get_string('size');\n $strmodified = get_string('modified');\n $strfolder = get_string('folder');\n $strfile = get_string('file');\n $strdownload = get_string('download');\n $strdelete = get_string('delete');\n $straction = get_string('action');\n\n $parentwritable = $file_info->is_writable();\n\n $directory = $file_info->get_params();\n $directory = $directory['filepath'];\n\n if ($parent_info and $directory !== '/') {\n $params = $parent_info->get_params_rawencoded();\n $params = implode('&amp;', $params);\n\n echo '<div class=\"folder\">';\n echo '<a href=\"draftfiles.php?'.$params.'\"><img src=\"'.$CFG->pixpath.'/f/parent.gif\" class=\"icon\" alt=\"\" />&nbsp;'.get_string('parentfolder').'</a>';\n echo '</div>';\n }\n\n if ($children) {\n foreach ($children as $child_info) {\n $filename = $child_info->get_visible_name();\n $filesize = $child_info->get_filesize();\n $filesize = $filesize ? display_size($filesize) : '';\n\n $mimetype = $child_info->get_mimetype();\n\n $params = $child_info->get_params_rawencoded();\n $params = implode('&amp;', $params);\n\n if ($child_info->is_directory()) {\n\n echo '<div class=\"folder\">';\n echo \"<a href=\\\"draftfiles.php?$params\\\"><img src=\\\"$CFG->pixpath/f/folder.gif\\\" class=\\\"icon\\\" alt=\\\"$strfolder\\\" />&nbsp;\".s($filename).\"</a>\";\n if ($parentwritable) {\n echo \"<a href=\\\"draftfiles.php?$params&amp;sesskey=\".sesskey().\"&amp;delete=1\\\"><img src=\\\"$CFG->pixpath/t/delete.gif\\\" class=\\\"iconsmall\\\" alt=\\\"$strdelete\\\" /></a>\";\n }\n echo '</div>';\n\n } else {\n\n $icon = mimeinfo_from_type('icon', $mimetype);\n echo '<div class=\"file\">';\n echo \"<img src=\\\"$CFG->pixpath/f/$icon\\\" class=\\\"icon\\\" alt=\\\"$strfile\\\" />&nbsp;\".s($filename).\" ($filesize)\";\n if ($viewurl = $child_info->get_url()) {\n echo \"&nbsp;\".link_to_popup_window ($viewurl, \"display\",\n \"<img src=\\\"$CFG->pixpath/t/preview.gif\\\" class=\\\"iconsmall\\\" alt=\\\"$strfile\\\" />&nbsp;\",\n 480, 640, get_string('viewfileinpopup'), null, true);\n }\n if ($parentwritable) {\n echo \"<a href=\\\"draftfiles.php?$params&amp;sesskey=\".sesskey().\"&amp;delete=1\\\"><img src=\\\"$CFG->pixpath/t/delete.gif\\\" class=\\\"iconsmall\\\" alt=\\\"$strdelete\\\" /></a>\";;\n }\n echo '</div>';\n }\n }\n }\n}", "function media()\n {\n return BASE_URL.\"/Assets\";\n }", "function media()\n {\n return BASE_URL.\"/Assets\";\n }", "abstract protected function getResource();", "abstract public function processFolder();", "public static function loadAssets($path_to_assets){\n //check for whether array or simple string\n if(is_array($path_to_assets) && count($path_to_assets)>0)\n {\n foreach($path_to_assets as $asset){\n self::loadAssets($asset);\n }\n }\n else if(is_string($path_to_assets) && trim($path_to_assets)!==\"\"){\n //getting extension to know whether css file or js file \n $ext = substr(trim($path_to_assets), -3);\n $path = Config::get('Assets').\"/\".$path_to_assets;\n //$path = \"../Webroot/Assets/\".$path_to_assets;\n if($ext == \".js\"){\n //load javascript file\n echo '<script src=\"'.$path.'\" type=\"text/javascript\"></script>'.\"\\r\\n\";\n }\n else if($ext == \"css\"){\n //load css file\n echo '<link rel=\"stylesheet\" href=\"'.$path.'\" type=\"text/css\" />'.\"\\r\\n\";\n }\n }\n }", "protected static function _load_assets()\n\t{\n\t\t$yaml = static::get_config();\n\t\t$asset_types = array('javascripts', 'stylesheets');\n\n\t\tforeach($asset_types as $asset_type)\n\t\t{\n\t\t\t// Protect against empty asset types\n\t\t\tif(empty($yaml[$asset_type])) continue;\n\n\t\t\t$groups = $yaml[$asset_type];\n\t\t\tforeach($groups as $group => $assets)\n\t\t\t{\n\t\t\t\tif (static::$_env === 'production')\n\t\t\t\t{\n\t\t\t\t\t$package_path = $yaml['package_path'];\n\t\t\t\t\t\\Jammit\\Jammit::add_path($package_path.'/');\n\t\t\t\t\tstatic::_load_production_asset($group, $asset_type);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tforeach($assets as $asset)\n\t\t\t\t\t{\n\t\t\t\t\t\t$asset_split = static::_get_file_and_path($asset);\n\t\t\t\t\t\t\\Jammit\\Jammit::add_path($asset_split['path']);\n\t\t\t\t\t\tstatic::_add_asset($asset_split['file'], $group);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getItems()\n {\n $type = Input::get('type');\n $view = $this->getView();\n $path = parent::getPath();\n\n $files = File::files($path);\n $file_info = $this->getFileInfos($files, $type);\n $directories = parent::getDirectories($path);\n $thumb_url = parent::getUrl('thumb');\n\n return view($view)\n ->with(compact('type', 'file_info', 'directories', 'thumb_url'));\n }", "public function view_file() {\n\t\t$currentPath = implode('/', $this->passedArgs);\n\t\t$fullPath = $this->path . $currentPath;\n\t\t$previousPath = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -1));\n\t\t$upOneFolder = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -2));\n\t\tif (!file_exists($fullPath) || empty($currentPath) || $currentPath == '/') {\n\t\t\t$this->_notFound(__d('api_generator', 'No file exists with that name'));\n\t\t}\n\t\ttry {\n\t\t\t$docs = $this->ApiFile->loadFile($fullPath, array('useIndex' => true));\n\t\t} catch(Exception $e) {\n\t\t\t$this->_notFound($e->getMessage());\n\t\t}\n\t\tif (!empty($docs)) {\n\t\t\t$classIndex = $this->ApiClass->getClassIndex(true);\n\t\t\tlist($dirs, $files) = $this->ApiFile->read($this->path . $previousPath);\n\n\t\t\t$this->set('showSidebar', true);\n\t\t\t$this->set('sidebarElement', 'sidebar/file_sidebar');\n\t\t\t$this->set(compact('currentPath', 'previousPath', 'upOneFolder', 'docs', 'dirs', 'files', 'classIndex'));\n\t\t} else {\n\t\t\t$this->set('previousPath', $previousPath);\n\t\t\t$this->render('no_class');\n\t\t}\n\t}", "public function assets(){\n $extRoutes = $this->routes;\n if(sizeof($extRoutes) == '4' || sizeof($extRoutes) == '5' || sizeof($extRoutes) == '6'){\n Assets::loadFile($extRoutes, 'assets');\n }else{\n Error::show(404);\n }\n }", "abstract public function getResource();", "abstract public function getResource();", "abstract public function getResource();", "function loadByFolder($FolderPath){\n //This will hold all of the directorys and files!\n $SubFolders = array_values(array_filter(glob($FolderPath . DIRECTORY_SEPARATOR . \"*\"), 'is_dir'));\n $Files = array_values(array_filter(glob($FolderPath . DIRECTORY_SEPARATOR . \"*\"), 'is_file'));\n printf(\"\\t<div class='Dir'>\\n\");\n printf(\"\\t\\t\\t\\t<p class='DirName'>\" . getName($FolderPath) . \" | \" . count($SubFolders) . \" Folders | \" . count($Files) . \" Files</p>\\n\"); \n if(count($Files) > 0){\n printf(\"\\t\\t\\t\\t<div class='files'>\\n\");\n for($j = 0;$j < count($Files);$j++){ \n loadContentByName(AbsoluteToRelative($Files[$j]));\n }\n printf(\"</div>\");\n } \n for($i = 0;$i < count($SubFolders);$i++){\n loadByFolder($SubFolders[$i]);\n }\n printf(\"</div>\");\n \n }", "public function getAssetsAction() {\n $view = array(\n 'pages' => $this->getBaseManager()->getAll('AppBundle:Page', true) ?: array(),\n 'blogs' => $this->getBaseManager()->getAll('AppBundle:Blog', true) ?: array(),\n 'travels' => $this->getBaseManager()->getAll('AppBundle:Travel', true) ?: array(),\n 'products' => $this->getBaseManager()->getAll('AppBundle:Product', true) ?: array(),\n 'events' => $this->getBaseManager()->getAll('AppBundle:Event', true) ?: array(),\n 'languages' => $this->getBaseManager()->getAll('AppBundle:Language', true) ?: array(),\n 'locales' => $this->getBaseManager()->getAll('AppBundle:Locale', true) ?: array(),\n 'options' => $this->getBaseManager()->getAll('AppBundle:Option', true) ?: array(),\n 'metadatas' => $this->getBaseManager()->getAll('AppBundle:Metadata', true) ?: array()\n );\n\n return $this->handleView($this->view($view));\n }", "private function gatherAsset(string $name, array $asset, array &$css, array &$js): void {\n // Load the dependencies first so that they're the first to be added to the HTML\n if (isset($asset['depends'])) {\n foreach ($asset['depends'] as $dependency) {\n // Don't throw an exception if the dependency has already been resolved\n // since it is a dependency, there is a high chance it has already been resolved anyway\n if ($this->validateAsset($dependency, false)) {\n $this->gatherAsset($dependency, parent::ASSET_TREE[$dependency], $css, $js);\n }\n }\n }\n\n // Unideal solution to get the correct light/dark Prism dependency\n if ($name === parent::TINYMCE) {\n $prism = defined('DARK_MODE') && DARK_MODE\n ? parent::PRISM_DARK\n : parent::PRISM_LIGHT;\n\n if ($this->validateAsset($prism, false)) {\n $this->gatherAsset($prism, parent::ASSET_TREE[$prism], $css, $js);\n }\n }\n\n if (isset($asset['css'])) {\n foreach ($asset['css'] as $cssFile) {\n $css[] = $this->buildPath($cssFile, 'css');\n }\n }\n\n if (isset($asset['js'])) {\n foreach ($asset['js'] as $jsFile) {\n $js[] = $this->buildPath($jsFile, 'js');\n }\n }\n\n if (!in_array($name, $this->_assets)) {\n $this->_assets[$name] = $asset;\n }\n }", "protected function get_path( WPSEO_Admin_Asset $asset, $type, $force_suffix = null ) {\n\t\t$relative_path = '';\n\t\t$rtl_suffix = '';\n\n\t\t$suffix = ( $force_suffix === null ) ? $asset->get_suffix() : $force_suffix;\n\n\t\tswitch ( $type ) {\n\t\t\tcase WPSEO_Admin_Asset::TYPE_JS:\n\t\t\t\t$relative_path = 'js/dist/' . $asset->get_src() . $suffix . '.js';\n\t\t\t\tbreak;\n\n\t\t\tcase WPSEO_Admin_Asset::TYPE_CSS:\n\t\t\t\t// Path and suffix for RTL stylesheets.\n\t\t\t\tif ( function_exists( 'is_rtl' ) && is_rtl() && $asset->has_rtl() ) {\n\t\t\t\t\t$rtl_suffix = '-rtl';\n\t\t\t\t}\n\t\t\t\t$relative_path = 'css/dist/' . $asset->get_src() . $rtl_suffix . $suffix . '.css';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $relative_path;\n\t}", "public function addAssets() {}", "public function loadResources() {}", "protected static function _get_file_and_path($asset)\n\t{\n\t\t$folders = array();\n\t\t$asset_folders = \\Jammit\\Jammit::get_folders();\n\t\t$ext = static::get_file_extension($asset);\n\t\t$type = is_string($asset_folders[$ext])\n\t\t\t\t\t ? array($asset_folders[$ext])\n\t\t\t\t\t : $asset_folders[$ext];\n\t\t$folders = array_merge($folders, $type);\n\t\t$asset_paths = str_replace('/', '', implode('|', $folders));\n\n\t\t$regex = \"@^public/(?P<path>.*/)(?:{$asset_paths})/(?P<rest>.*)$@\";\n\t\tpreg_match($regex, $asset, $matches);\n\n\t\treturn array(\n\t\t\t'file' => $matches['rest'],\n\t\t\t'path' => $matches['path'],\n\t\t);\n\t}", "public function getAssetFileList();", "public function handlePageBuilderAssetRequest()\n {\n // get asset file path by stripping the configured assets_url prefix from the current request URI\n $asset = substr(bb_current_relative_url(), strlen(config('bapubuilder.general.assets_url')) + 1);\n\n $distPath = realpath(__DIR__ . '/../dist/');\n $requestedFile = realpath($distPath . '/' . $asset);\n if (! $requestedFile) die('Asset not found');\n\n // prevent path traversal by ensuring the requested file is inside the dist folder\n if (strpos($requestedFile, $distPath) !== 0) die('Asset not found');\n\n // only allow specific extensions\n $ext = pathinfo($requestedFile, PATHINFO_EXTENSION);\n if (! in_array($ext, ['js', 'css', 'jpg', 'png'])) die('Asset not found');\n\n $contentTypes = [\n 'js' => 'application/javascript; charset=utf-8',\n 'css' => 'text/css; charset=utf-8',\n 'png' => 'image/png',\n 'jpg' => 'image/jpeg'\n ];\n header('Content-Type: ' . $contentTypes[$ext]);\n header('Content-Disposition: inline; filename=\"' . basename($requestedFile) . '\"');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Content-Length: ' . filesize($requestedFile));\n\n readfile($requestedFile);\n exit();\n }", "private function &pathTree()\n {\n $t =& self::$pathTrees[get_class($this->owner)];\n if($t) return $t;\n\n $this->imagesRoot = $this->imagesRoot ? array_merge(self::$imgRoot, $this->imagesRoot) : self::$imgRoot;\n\n $imagesFolder = DIRECTORY_SEPARATOR . ($this->imagesRoot['IMAGES_FOLDER'] ?\n $this->imagesRoot['IMAGES_FOLDER'] . DIRECTORY_SEPARATOR : '');\n\n $t['saveRoot'] = Yii::getAlias('@'. $this->imagesRoot['ROOT_ALIAS_NAME']) . $imagesFolder;\n FileHelper::createDirectory($t['saveRoot'], self::GENERATE_SUB_FOLDER_MODE);\n\n $t['showRoot'] = (Yii::$app->id == $this->imagesRoot['APP_OWNER'] ?\n BaseUrl::base(true) . DIRECTORY_SEPARATOR . $this->imagesRoot['ROOT_ALIAS_NAME'] :\n Yii::$app->assetManager->getPublishedUrl(Yii::getAlias('@' . $this->imagesRoot['ROOT_ALIAS_NAME'])))\n . $imagesFolder;\n\n $modelFolder = get_class($this->owner);\n $modelFolder = substr($modelFolder, strripos($modelFolder, '\\\\') + 1) ;\n $modelFolder = strtolower(substr($modelFolder, 0, 1)) . substr($modelFolder, 1);\n\n foreach ($this->imagesSettings as $attribute => $iS) {\n $img =& $t['pathTree'][$attribute];\n $img['attr'] = $iS['imageAttribute'];\n $img['dir'] = ((isset($iS['saveFolder']) && $iS['saveFolder']) ?\n $iS['saveFolder'] : $modelFolder . DIRECTORY_SEPARATOR . $iS['imageAttribute'])\n . DIRECTORY_SEPARATOR;\n\n foreach ($iS['variants'] as $variant => $vS) {\n $keyName = (isset($vS['name']) && $vS['name']) ? $vS['name'] : $variant;\n $vS['dir'] = $keyName ? $keyName . DIRECTORY_SEPARATOR : '';\n $vS['keyName'] = $keyName ?\n strtoupper(substr($keyName, 0, 1)) . substr($keyName, 1) : '';\n\n $img['variants'][$variant] = $vS;\n }\n }\n\n return $t;\n }", "function farm_import_asset_importer($asset_type) {\n\n // Start with our common base importer.\n $importer = farm_import_base_importer();\n\n // Add the necessary information.\n $importer->id = 'farm_asset_' . $asset_type->type;\n $importer->config['name'] = 'Asset: ' . $asset_type->label;\n $importer->config['description'] = 'Import ' . $asset_type->label . ' assets from CSV files.';\n $importer->config['processor']['plugin_key'] = 'FarmAssetProcessor';\n $importer->config['processor']['config']['bundle'] = $asset_type->type;\n $importer->config['processor']['config']['mappings'] = array(\n array(\n 'source' => 'Name',\n 'target' => 'name',\n 'unique' => FALSE,\n 'language' => 'und',\n ),\n array(\n 'source' => 'Active',\n 'target' => 'active',\n 'unique' => FALSE,\n 'language' => 'und',\n ),\n );\n\n // Return the importer.\n return $importer;\n}", "function m_asset($path)\n {\n $vars = explode(':', $path);\n if (\\Module::has($vars[0])) {\n return asset('modules/' . implode('/', $vars));\n }\n //what if this does not exist?\n return asset('modules/' . implode('/', $vars));\n }", "function assetList($cat=1) {\r\n\t\tglobal $msg;\r\n\t\t\r\n\t\t$this->smarty->assign('menuSubSel','Assets');\r\n\t\t$this->smarty->assign('block_title','Assets');\r\n\t\t\r\n\t\t$r\t\t\t= $this->catBuildChildrenRoot();\r\n\t\t$catTree\t= array();\r\n\t\t\r\n\t\tforeach($r as $key=>$value) {\r\n\t\t\t$catTree[$value['id']]\t= $value['name'];\r\n\t\t}\r\n\t\t\t\r\n\t\t$this->smarty->assign('catTree',$catTree);\r\n\t\t\r\n\t\tif($_POST['cat'] != NULL) {\r\n\t\t\t$root\t= $_POST['cat'];\r\n\t\t} else {\r\n\t\t\t$root\t= $cat;\r\n\t\t}\r\n\t\t\r\n\t\t$this->smarty->assign('selCat',$root);\r\n\t\t\r\n\t\t$q\t= \"SELECT * FROM assets_assets WHERE cat = '\".$root.\"'\";\r\n\t\t$this->objDA->query($q);\r\n\t\t\r\n\t\t$assets\t= $this->objDA->returnArray();\r\n\t\t$this->smarty->assign('assets',$assets);\r\n\t\t\r\n\t\t$this->smarty->display('assets/assetList.tpl');\r\n\t}", "public function getAssetsPath()\r\n {\r\n return dirname(__FILE__) . '/assets';\r\n }", "private function checkPath(){\n\t\t\tif(!is_dir($this->cachepath)) {\n\n\t\t\t\t// Set recursive = true to create all parent directories\n\t\t\t\tmkdir($this->cachepath, true);\n\n\t\t\t}\n\n\t\t\t// Check if the media storage path exists\n\t\t\t$this->jsonpath = $this->cachepath . '/json/';\n\n\t\t\t// If the media path doesn't exist\n\t\t\tif(!is_dir($this->jsonpath)){\n\n\t\t\t\t// Make the directory\n\t\t\t\tmkdir($this->jsonpath);\n\t\t\t}\n\n\t\t\t// Check if the assets path exists\n\t\t\t$this->assetpath = $this->cachepath . '/assets/';\n\n\t\t\tif(!is_dir($this->assetpath)){\n\n\t\t\t\t// Make directory\n\t\t\t\tmkdir($this->assetpath);\n\n\t\t\t}\n\n\t\t}", "public function onPageRendering(&$templateName, array &$twigVariables)\n {\n $final_asset_folders = array();\n $currentPage = $this->getPico()->getCurrentPage();\n if (!is_array($this->asset_folder)) {\n $this->asset_folder = array($this->asset_folder);\n }\n if ($this->debug_mode) {\n print(\"<!-- AssetData found \" . count($this->asset_folder) . \" asset folders to scan:\\n\");\n var_dump($this->asset_folder);\n print(\"\\n-->\\n\");\n }\n foreach ($this->asset_folder as $asset_folder) {\n if ($this->limit_asset_data && isset($currentPage) && !($currentPage['id'] === \"index\")) {\n if ($this->endsWith($currentPage['id'], '/index')) {\n $asset_folder = $asset_folder . \"/\" . substr($currentPage['id'], 0, strlen($currentPage['id']) - 6);\n } else {\n if ($this->folderize_non_index_files) {\n $asset_folder = $asset_folder . \"/\" . $currentPage['id'];\n } else {\n $asset_folder = $asset_folder . \"/\" . substr($currentPage['id'], 0, strrpos($currentPage['id'], '/'));\n }\n }\n }\n $asset_base = rtrim($this->site_base_folder, '/') . \"/\" . $asset_folder;\n $final_asset_folders[count($final_asset_folders)] = $asset_folder;\n $this->assets_array[$asset_folder] = $this->readDirStructure($asset_base, '', $this->max_dir_depth);\n }\n\n // No need to complicate Twig usages if only one asset folder is being scanned.\n if (count($final_asset_folders) == 1) {\n $twigVariables['asset_base'] = $final_asset_folders[0];\n $twigVariables['assets'] = $this->assets_array[$final_asset_folders[0]];\n } else {\n $twigVariables['asset_base'] = $this->asset_folder;\n $twigVariables['assets'] = $this->assets_array;\n }\n\n if ($this->debug_mode) {\n print(\"<!-- AssetData Plugin Final Output:\\n\");\n print(\"asset_base:\\n\");\n var_dump($twigVariables['asset_base']);\n print(\"\\nassets:\\n\");\n var_dump($twigVariables['assets']);\n print(\" -->\\n\");\n }\n }", "function item_tools_folder_breadcrumb_hook($hook, $type, $returnvalue, $params) {\n\t\n\tif (empty($params) || !is_array($params)) {\n\t\treturn $returnvalue;\n\t}\n\t\n\t$folder = elgg_extract(\"entity\", $params);\n\tif (!empty($folder) && elgg_instanceof($folder, \"object\", item_tools_SUBTYPE)) {\n\t\t$container = $folder->getContainerEntity();\n\t\t\n\t\t$priority = 9999999;\n\t\t$folder_options = array(\n\t\t\t\"name\" => \"folder_\" . $folder->getGUID(),\n\t\t\t\"text\" => $folder->title,\n\t\t\t\"href\" => false,\n\t\t\t\"priority\" => $priority\n\t\t);\n\t\t\n\t\t$returnvalue[] = ElggMenuItem::factory($folder_options);\n\t\t\n\t\t$parent_guid = (int) $folder->parent_guid;\n\t\twhile (!empty($parent_guid) && ($parent = get_entity($parent_guid))) {\n\t\t\t$priority--;\n\t\t\t\n\t\t\t$folder_options = array(\n\t\t\t\t\"name\" => \"folder_\" . $parent->getGUID(),\n\t\t\t\t\"text\" => $parent->title,\n\t\t\t\t\"href\" => $parent->getURL(),\n\t\t\t\t\"priority\" => $priority\n\t\t\t);\n\t\t\t\n\t\t\t$returnvalue[] = ElggMenuItem::factory($folder_options);\n\t\t\t$parent_guid = (int) $parent->parent_guid;\n\t\t}\n\t} else {\n\t\t$container = elgg_get_page_owner_entity();\n\t}\n\t\n\t// make main folder item\n\t$main_folder_options = array(\n\t\t\"name\" => \"main_folder\",\n\t\t\"text\" => elgg_echo(\"item_tools:list:folder:main\"),\n\t\t\"priority\" => 0\n\t);\n\t\n\tif (elgg_instanceof($container, \"group\")) {\n\t\t$main_folder_options[\"href\"] = \"file/group/\" . $container->getGUID() . \"/all#\";\n\t} else {\n\t\t$main_folder_options[\"href\"] = \"file/owner/\" . $container->username . \"/all#\";\n\t}\n\t\n\t$returnvalue[] = ElggMenuItem::factory($main_folder_options);\n\t\n\treturn $returnvalue;\n}", "public function loadAssets()\n\t{\n\t\tparent::loadAssets();\n\n\t\t// load ZLUX assets\n\t\t$this->app->zlfw->zlux->loadMainAssets();\n\n\t\t// load the FilesPro js\n\t\t$this->app->document->addScript('elements:filespro/filespro.js');\n\t}", "public function actionNavigate(){\n $navigator = $this->module->get('dirNavigator');\n $path = Yii::$app->request->get('dir');\n\n $path = isset($path) ? Html::decode($path) : null;\n $objects = $navigator->navigate($path);\n if (isset($objects['file'])){\n $result = $this->attachTagsToFiles($path, $objects['file']);\n if (is_array($result))\n $objects['file'] = $result;\n }\n if ($path)\n return $this->renderSection('navigate-partial', ['objects' => $objects, 'parent' => $path]);\n\n return $this->renderSection('navigate', ['objects' => $objects]);\n }", "function renderFolder($entry)\n{\n $upload_path = htmlspecialchars(getPath('upload'));\n $path = htmlspecialchars($entry['path']);\n $form = '';\n\n $listing = '';\n foreach($entry['contents'] as $child) {\n $cp = $child['path'];\n $cn = basename($cp);\n if ($child['is_dir']) $cn .= '/';\n\n $cp = htmlspecialchars($cp);\n $link = getPath(\"?path=\".htmlspecialchars($cp));\n $listing .= \"<div>\n\t\t\t\t\t <a style='text-decoration: none' href='$link'>$cn</a>\n\t\t <a href='requests/downloadFile.php?path=\".htmlspecialchars($cp).\"'><button>Download</button></a>\n\t\t\t\t\t <a href='requests/deleteFile.php?path=\".htmlspecialchars($cp).\"'><button>Delete</button></a>\n\t\t\t\t\t \n\t\t\t\t\t <div id='rename'>\n\t\t\t\t\t \t<form action='requests/renameFile.php?path=\".htmlspecialchars($cp).\"' method='post' enctype='multipart/form-data'>\n\t\t\t\t\t \t<input type='text' name='newName' id='newName' />\n\t\t\t\t\t\t<input type='submit' value='Rename File' />\n\t\t\t\t\t\t</form>\n\t\t\t\t\t </div>\t\n\t\t\t\t\t </div>\";\n }\n\n return renderHtmlPage(\"Folder: $entry[path]\", $form.$listing);\n}", "function pj_block_image_block_init() {\n register_block_type_from_metadata(__DIR__, [\n 'render_callback' => 'pj_block_image_dynamic_render',\n ]);\n}", "protected function findAssetsByFile($filePath, array $in = array(), Route $parentRoute = null) {\n $this->initialize();\n\n // Just to save a lot of time, MD5 used\n $md5 = md5($filePath);\n\n if (isset($this->assetCache[$md5]) && is_array($this->assetCache[$md5])) {\n return $this->assetCache[$md5];\n }\n\n $content = file_get_contents($filePath);\n\n /** @var $stream \\Twig_Token_Stream */\n $stream = $this->twig->tokenize($content, basename($filePath));\n\n $inBlock = null;\n $nextOutput = false;\n\n while (!$stream->isEOF()) {\n $token = $stream->next();\n\n $skins = array();\n $connectors = array();\n\n if (($this->moduleManager != null) && ($token instanceof \\Twig_Token)) {\n\n // @TODO: Hard coded modules ...\n // Maybe adjustment neede for later <artcile> ?\n if (strpos($token->getValue(), \"<div\") !== false) {\n $classMatches = array();\n $conMatches = array();\n $skinMatches = array();\n $modName = \"\";\n\n preg_match('#class=[\\'\"]([^\\'\"]*)#i', $token->getValue(), $classMatches);\n preg_match('#data-connectors=[\\'\"]([^\\'\"]*)#i', $token->getValue(), $conMatches);\n\n if (isset($classMatches[1])) {\n $mm = explode(\" \", $classMatches[1]);\n\n foreach ($mm as $m) {\n switch (true) {\n case (substr($m, 0, 4) == \"mod-\"):\n $modName = substr($m, 4);\n break;\n\n case (substr($m, 0, 5) == \"skin-\"):\n $skins[] = substr($m, 5);\n break;\n }\n }\n\n $connectors = (isset($conMatches[1]) ? explode(\",\", $conMatches[1]) : array());\n\n if ($modName != \"\") {\n $modName = $this->findModuleName($modName);\n $routeModule = new RouteModule($modName, basename($filePath), $skins, $connectors);\n $in[] = $routeModule;\n }\n }\n }\n }\n\n // Twiggisch ...\n if ($token->getValue() === \"extends\") {\n $newTpl = $stream->getCurrent()->getValue();\n list($bundle, $controller, $view) = explode(\":\", $newTpl);\n\n $pTpl = $this->kernel->locateResource(sprintf(\"@%s/Resources/views/%s/%s\", $bundle, $controller, $view));\n $in = $this->findAssetsByFile($pTpl, $in);\n }\n\n if ($token->getValue() === \"javascripts\" || $token->getValue() === \"stylesheets\") {\n $inBlock = true;\n }\n\n if ($token->getValue() === \"endjavascripts\" || $token->getValue() === \"endstylesheets\") {\n $inBlock = false;\n }\n\n // Assetic example: {{ asset('img/01.jpg') }}\n // REMEMBER! Combinations like {{ asset('img/' ~ '01.jpg') }} won't be exported!\n // 1st token: asset\n if ($token->getValue() === \"asset\") {\n // 2nd token: ''\n // 3rd token: uri img/01.jpg\n // look() jumps over to 3rd token\n $url = $stream->look()->getValue();\n\n $in[] = $url;\n }\n\n // Twiggisch ...\n // Please note tokens are searched for \"tc\". Custom modules are not recognized.\n // {{ tc.module( 'Dummy', 'dummy', [], [], { 'tag':'article', 'role':'article' }, { 'title':'NAVIGATION' } ) }}\n\n $isModuleToken = false;\n $isModuleToken |= ($token->getValue() === \"tc\" && $stream->getCurrent()->getValue() === \".\" && $stream->look()->getValue() === \"module\");\n $isModuleToken |= ($token->getValue() === \"rc\" && $stream->getCurrent()->getValue() === \".\" && $stream->look()->getValue() === \"bundleModule\");\n // Extend it here if you need it ...\n\n if ($isModuleToken) {\n // Parsing tc call ...l\n while ($token->getValue() != \"(\") {\n $token = $stream->next();\n }\n $token = $stream->next();\n\n $module = $token->getValue();\n\n if ($stream->getCurrent()->getValue() != \")\") {\n $token = $stream->next();\n $token = $stream->next();\n\n $view = $token->getValue();\n\n if ($view == \"\") {\n $view = strtolower($module);\n } else {\n $view = $token->getValue();\n }\n $view .= \".html.twig\";\n\n\n $token = $stream->next();\n $token = $stream->next();\n\n if ($token->getValue() == \"[\") {\n $token = $stream->next();\n while ($token->getValue() != \"]\") {\n if ($token->getValue() != \",\") {\n $skins[] = $token->getValue();\n }\n $token = $stream->next();\n }\n }\n\n if ($stream->next()->getValue() === \",\") {\n $token = $stream->next();\n if ($token->getValue() == \"[\") {\n $token = $stream->next();\n while ($token->getValue() != \"]\") {\n if (trim($token->getValue()) !== \"\") {\n $connectors[] = $token->getValue();\n }\n $token = $stream->next();\n }\n }\n }\n\n } else {\n $view = strtolower($module) . \".html.twig\";\n }\n\n\n $routeModule = new RouteModule($module, $view, $skins, $connectors);\n $in[] = $routeModule;\n $bundleName = \"\";\n\n // TODO: Only Terrific Modules\n // ... maybe you need to adjust this to use it with other bundles.\n try {\n\n\n if ($parentRoute !== null) {\n $bundleName = SymfonyHelper::getBundleFromNamespace($parentRoute->getMethod()->getDeclaringClass());\n\n try {\n $tpl = $this->kernel->locateResource(sprintf(\"@%s/Resources/views/%s\", $bundleName, $routeModule->getTemplate()));\n } catch (InvalidArgumentException $e) {\n $tpl = $this->kernel->locateResource($a = sprintf(\"@%s/Module/%s/Resources/views/%s\", $bundleName, $routeModule->getModule(), $routeModule->getTemplate()));\n }\n\n } else {\n $bundleName = sprintf(\"TerrificModule%s\", $routeModule->getModule());\n $tpl = $this->kernel->locateResource(sprintf(\"@%s/Resources/views/%s\", $bundleName, $routeModule->getTemplate()));\n }\n\n\n $moduleIn = $this->findAssetsByFile($tpl, array(), $parentRoute);\n $routeModule->setAssets($moduleIn);\n\n } catch (InvalidArgumentException $ex) {\n //var_dump(sprintf(\"Cannot find view: %s/Resources/views/%s\", $bundleName, $routeModule->getTemplate()));\n\n if ($this->logger !== null) {\n $this->logger->debug(sprintf(\"Cannot find view: @%s/Resources/views/%s\", $bundleName, $routeModule->getTemplate()));\n }\n }\n }\n\n // Get Assetic output=\"\"\n if ($inBlock) {\n if ($token->getValue() === \"output\") {\n $in[] = $stream->look()->getValue();\n }\n }\n }\n\n if ($this->logger !== null) {\n $this->logger->debug(sprintf(\"Found assets for for template '%s':\\n[\\n\\t%s\\n]\\n\", basename($filePath), implode(\",\\n\\t\", $in)));\n }\n\n\n $this->assetCache[$md5] = $in;\n\n return $in;\n }", "static function getImagePath($type, $id){\n if(isset(Controller::$metaDataList)){\n Controller::loadAll();\n }\n try {\n //for movie, episode, show, season\n // Assumtion: File structure: /media/movies/title/file.mp4 (+folder.jpg)\n ///media/shows/ShowTitle/Seasons (+folder.jpg)/ Episodes.mp4 (+folder.jpg)\n $path = \"\";\n if ($type == \"Movie\") {\n $movie = NullClasses::getMovie();\n $movie = Controller::getMovie($id);\n $path = \"media/movies/\" . dirname($movie->getFilePath()) . '/folder.jpg';\n } else if ($type == \"Episode\") {\n $episode = NullClasses::getEpisode();\n $episode = Controller::getEpisode($id);\n $path = self::ffmpeg($episode->getFilePath());\n } else if ($type == \"Season\") {\n $season = NullClasses::getSeason();\n $season = Controller::getSeason($id);\n foreach (Controller::$episodeList as $episode) {\n if ($episode->getSeason() == $season) {\n break;\n }\n }\n $path = \"media/shows/\" . dirname($episode->getFilePath()) . '/folder.jpg';\n\n } else if ($type == \"Adaptation\") {\n $show = NullClasses::getAdaptation();\n $show = Controller::getShow($id);\n $season = NullClasses::getSeason();\n foreach (Controller::$seasonList as $season) {\n if ($season->getShow() == $show) {\n break;\n }\n }\n\n foreach (Controller::$episodeList as $episode) {\n if ($episode->getSeason() == $season) {\n break;\n }\n }\n $path = explode('/', $episode->getFilePath());\n array_pop($path); // remove file\n array_pop($path); // remove Season Dir -> now in show dir\n $path = implode('/', $path);\n $path .= '/folder.jpg';\n $path = \"media/shows/\" . $path;\n }\n return $path;\n }catch (Exception $e){\n print($e);\n return null;\n }\n }", "public function test_getAssetsInNode() {\n\n }", "function fetch_PKL_assets($path, &$assets) {\n if (!$xml = simplexml_load_file($path)) { return FALSE; }\n\n echo \"<hr/>\";\n\n // Get the PKL Id.\n if (isset($xml->Id)) {\n $id = (string) $xml->Id;\n } else {\n return FALSE;\n }\n\n // Get the PKL name from its AnnotationText.\n if (isset($xml->AnnotationText)) {\n $namePKL = (string) $xml->AnnotationText;\n } else {\n return FALSE;\n }\n\n // Seed the $assets list with the PKL file itself.\n $assets[$id] = array( );\n $assets[$id]['file'] = $path;\n $assets[$id]['annotation'] = $namePKL;\n\n $count = 0;\n\n // Logic for PKLs.\n if (isset($xml->AssetList)) {\n foreach ($xml->AssetList->Asset as $a) {\n list($seedDir, $file) = mam_split_path($path);\n $asset = array( );\n\n // MAM...looks like the asset filename is held in the OriginalFileName.\n // Id and AnnotationText may also be significant so grab them!\n\n if (!isset($a->Id)) {\n echo \"No Id for the file asset '$file'. It is being skipped.<br>\";\n mam_log_message(__FUNCTION__, \"No Id for the file asset '$file'. It is being skipped.\");\n continue;\n } else {\n $id = (string) $a->Id;\n }\n\n if (isset($a->OriginalFileName)) {\n $f = (string) $a->OriginalFileName;\n $asset['file'] = $seedDir.$f;\n $count++;\n } else {\n unset($asset[$id]);\n echo \"No OriginalFileName for the asset '$file'. It is being skipped.<br>\";\n mam_log_message(__FUNCTION__, \"No OriginalFileName for the asset '$file'. It is being skipped.\");\n continue;\n }\n\n if (isset($a->AnnotationText)) {\n $asset['annotation'] = (string) $a->AnnotationText;\n }\n\n echo \"Found valid $f with an ID of $id.<br>\";\n mam_log_message(__FUNCTION__, \"Found valid $f in PKL $file.\");\n $assets[$id] = $asset;\n }\n }\n\n // Count the $assets for $id. If less than 3 exist then the package is incomplete and should be deleted.\n if ($count < 3) {\n $script = \"/tmp/dcp_manager.sh\";\n echo \"<br><b>Asset count for $namePKL is only $count. This PKL is incomplete and should be removed!</b><br>\";\n $cmd = \"unlink $path\";\n file_put_contents($script, $cmd.\"\\n\", FILE_APPEND | LOCK_EX);\n }\n\n return $namePKL;\n}", "public function loadCreateSubFolder($parentId){\n $resarr = [];\n $temp = DB::table('folders')\n ->select(DB::raw(\"id,(CASE WHEN parent_folder_id = $parentId THEN '#' ELSE parent_folder_id END) as parent,name as text\"))\n ->where('parent_folder_id',$parentId)\n ->where('record_active_flag',1)\n ->get();\n $resarr = collect($temp)->toArray();\n if(count($resarr)>0){\n foreach ($resarr as $key => $value) {\n $subitems = $this->getChildItems($value->id);\n $resarr = array_merge_recursive($resarr,$subitems);\n }\n }\n return response()->json([\n 'data' => $resarr,\n 'body' => view('files.viewfile',['folderId'=>$parentId])->render(),\n 'success' => true,\n ]);\n }", "protected function _getAssetFile($url) {\n\t\t$parts = explode('/', $url);\n\t\t// CUSTOMIZE MODIFY 2014/07/02 ryuring\n\t\t// >>>\n\t\t/*if ($parts[0] === 'theme') {\n\t\t\t$themeName = $parts[1];\n\t\t\tunset($parts[0], $parts[1]);\n\t\t\t$fileFragment = implode(DS, $parts);\n\t\t\t$path = App::themePath($themeName) . 'webroot' . DS;\n\t\t\treturn $path . $fileFragment;\n\t\t}\n\n\t\t$plugin = Inflector::camelize($parts[0]);\n\t\tif ($plugin && CakePlugin::loaded($plugin)) {\n\t\t\tunset($parts[0]);\n\t\t\t$fileFragment = implode(DS, $parts);\n\t\t\t$pluginWebroot = CakePlugin::path($plugin) . 'webroot' . DS;\n\t\t\treturn $pluginWebroot . $fileFragment;\n\t\t}*/\n\t\t// <<<\n\t\t$fileFragment = implode(DS, $parts);\n\t\t$path = APP . 'View' . DS . 'webroot' . DS;\n\t\tif (file_exists($path . $fileFragment)) {\n\t\t\treturn $path . $fileFragment;\n\t\t} else {\n\t\t\t$path = BASER_WEBROOT;\n\t\t\tif (file_exists($path . $fileFragment)) {\n\t\t\t\treturn $path . $fileFragment;\n\t\t\t}\n\t\t}\n\t}", "public function test_generatorAssetsWithExternalFiles(){\n\t\t$this->_args = array(\n\t\t\t0 => 'generator:assets',\n\t\t\t1 => 'jquery.js',\n\t\t\t2 => 'backbone.js',\n\t\t\t3 => 'underscore.js',\n\t\t\t4 => 'handlebars.js',\n\t\t\t5 => 'jasmine-jquery.js',\n\t\t\t6 => 'live.js',\n\t\t\t7 => 'normalize.css',\n\t\t\t8 => 'reset.css',\n\t\t);\n\n\t\t$this->_generator->run($this->_args);\n\n\t\t$assets_path[1] = $this->_generator->getFileAssetsDirectory($this->_args[1]);\n\t\t$assets_path[2] = $this->_generator->getFileAssetsDirectory($this->_args[2]);\n\t\t$assets_path[3] = $this->_generator->getFileAssetsDirectory($this->_args[3]);\n\t\t$assets_path[4] = $this->_generator->getFileAssetsDirectory($this->_args[4]);\n\t\t$assets_path[5] = $this->_generator->getFileAssetsDirectory($this->_args[5]);\n\t\t$assets_path[6] = $this->_generator->getFileAssetsDirectory($this->_args[6]);\n\t\t$assets_path[7] = $this->_generator->getFileAssetsDirectory($this->_args[7]);\n\t\t$assets_path[8] = $this->_generator->getFileAssetsDirectory($this->_args[8]);\n\n\t\t$this->assertTrue(is_dir($this->assetsDirectory));\n\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[1] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[2] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[3] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[4] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[5] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[6] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[7] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[8] ));\n\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[1]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[2]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[3]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[4]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[5]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[6]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[7]), 'css');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[8]), 'css');\n\n\t\t//\tRemoving files generateds\n\t\tunlink($this->assetsDirectory . $assets_path[1] );\n\t\tunlink($this->assetsDirectory . $assets_path[2] );\n\t\tunlink($this->assetsDirectory . $assets_path[3] );\n\t\tunlink($this->assetsDirectory . $assets_path[4] );\n\t\tunlink($this->assetsDirectory . $assets_path[5] );\n\t\tunlink($this->assetsDirectory . $assets_path[6] );\n\t\tunlink($this->assetsDirectory . $assets_path[7] );\n\t\tunlink($this->assetsDirectory . $assets_path[8] );\n\n\t\t//\tVerifying if file was deleted\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[1] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[2] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[3] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[4] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[5] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[6] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[7] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[8] ));\n\t}", "public function checkFileExists()\n {\n switch($this->type)\n {\n case Asset::ASSET_TYPE_CSS: $this->assetFolder = $this->paths['css'];\n break;\n \n case Asset::ASSET_TYPE_JS: $this->assetFolder = $this->paths['js'];\n break;\n \n case Asset::ASSET_TYPE_IMAGE: $this->assetFolder = $this->paths['images'];\n break;\n\n default: $folder = '';\n }\n \n //Path to file\n $file = new PhingFile($this->assetsDir.'/'.$this->assetFolder.$this->file);\n \n //Check file exists\n if(!$file->exists())\n {\n throw new BuildException(\"Unable to find asset file: \".$file->getAbsolutePath());\n }\n \n //Check we can read it\n if(!$file->canRead())\n {\n throw IOException(\"Unable to read asset file: \".$file->getPath());\n }\n \n return $file;\n }", "function displayFile($file){\n if (str_split($file)[0]!==\".\") {\n if (!is_dir(\"project/\".$file)) {\n echo \"<div class='file' data-file='\".$file.\"'>\".$file.\"</div>\";\n } else {\n $folder=$file;\n $files=[];\n $filess=\"\";\n foreach(scandir(\"project/\".$file) as $file){\n $files[]=$file;\n }\n foreach($files as $file){\n if (str_split($file)[0]!==\".\"){\n $filess.=\"<div class='file' data-file='\".$folder.\"/\".$file.\"'>\".$file.\"</div>\";\n }\n }\n echo \"<div class='folder' data-file='\".$file.\"'>\".$folder.\"<div class='folder-files'>\".$filess.\"</div></div>\";\n }\n\n }\n}", "public function getAssetFolder()\n {\n if ($folder = $this->getParent()->AssetFolder) {\n return $folder;\n }\n \n return $this->config()->asset_folder;\n }", "public function loadFileTypeIcon() {\r\n parent::afterFind();\r\n if ($this->filetype == 'dir'){\r\n $this->icon = 'dir-icon';\r\n }else{\r\n // TODO: load confing\r\n $this->icon = 'file-icon';\r\n }\r\n //$this->attributes['icon'] = $this->icon;\r\n //Shared::debug($this->icon);\r\n }", "function asset_upload_path()\n {\n $CI =& get_instance();\n return asset_path().\"upload/\";\n }", "function pathCompany()\n{\n return 'files/avatar/company/';\n}", "public function loadAssets()\n {\n $this->addCss('css/treesort.css');\n $this->addJs('js/treesort.js');\n }", "public function getAssetsPath(): string {\n throw new \\LogicException('Not implemented');\n }", "public function getResourcePath(): string;", "function loadDir() {\t\n\t\t$dir = IMAGE_PATH . $this->_dirs[$this->current_dir];\n\t\t//_dirs has to be reset to prevent problems created by refreshing the page.\n\t\t$this->_dirs = null;\t\t\t\t\t\n\t\tif (is_dir($dir)) {\n\t\t\tif ($dh = opendir($dir)) {\n\t\t\t\twhile (($file = readdir($dh))) {\n\t\t\t\t\tif(is_dir($dir.$file) && $file != '.' && $file != '..') {\n\t\t\t\t\t\t$this->_dirs[] = $file.\"/\";\n\t\t\t\t\t}\n\t \t}\n\t \tclosedir($dh);\n\t \t}\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public function recursiv ( $arr, $path ){ \r\n \r\n \r\n foreach ( $arr as $key => $value ) {\r\n // echo $key;\r\n \r\n if ( is_array ( $value )) { \r\n \r\n if ( $key == $path ) { \r\n // $name_dir = $name;\r\n $path1 = $path;\r\n \r\n } else {\r\n // $name_dir = $key;\r\n $path1 = $path.'/'.$key;\r\n }\r\n \r\n // echo '<li path=\"'.$path1.'\">'.$name_dir.'<ul>'; \r\n // echo $path1;\r\n $this->recursiv ( $value, $path1 );\r\n \r\n // echo '</li></ul>' ;\r\n }\r\n else {\r\n // $ext_file = explode (\".\", $value );\r\n $ext_img = substr($value, strrpos($value, '.') + 1);\r\n echo '<div class=\"col-sm-4 col-md-2\" style=\"margin: 10px;\" >';\r\n echo '<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">';\r\n echo '<img src=\"http://localhost/Symfony/web/img/icon_files/'.$this->getExtFile ( $value ).'\" alt=\"'.$path.'/'.$value.'\">';\r\n echo '</a>';\r\n echo '<div>'.$value.'</div>';\r\n echo '<ul class=\"dropdown-menu\">';\r\n echo '<li> <a class=\"file_row\" title=\"'.$value.'\" path=\"'.$path.'\" href=\"#\">Отправить'.$ext_img.'</a></li>';\r\n echo '<li class=\"divider\"></li>';\r\n echo '<li><a href=\"#deleteFile\" data-toggle=\"modal\" title=\"'.$value.'\" path=\"'.$path.'\">Удалить</a></li>';\r\n echo '</ul></div>';\r\n\r\n // echo '<li class=\"file_row\" path=\"'.$path.'\" title=\"'.$value.'\">'.$value.'</li>';\r\n \r\n }\r\n \r\n }\r\n }", "public function testFolders()\n {\n $result = $this->get('assets/does-not-exists');\n $this->assertResponseEquals(404, null, $result);\n\n $result = $this->get('assets/FileTest-subfolder');\n $this->assertResponseEquals(403, null, $result);\n\n // Flysystem reports root folder as not present\n $result = $this->get('assets');\n $this->assertResponseEquals(404, null, $result);\n }", "public static function do_output() {\n\t\trequire_once('view/folder.php');\t\n\t}", "abstract protected function getPath();", "public function render()\n {\n return view('components.files.folder-contents');\n }", "public function source() {\n\t\tif (count($this->passedArgs) == 1 && $this->passedArgs[0] == 'index') {\n\t\t\tarray_shift($this->passedArgs);\n\t\t}\n\t\t$currentPath = implode('/', $this->passedArgs);\n\t\t$previousPath = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -1));\n\t\tlist($dirs, $files) = $this->ApiFile->read($this->path . $currentPath);\n\t\t$this->set(compact('dirs', 'files', 'currentPath', 'previousPath'));\n\t}", "public function _getExport() {\n $data = [];\n $nodeKeys = [\n 'contentType' => 1, 'label' => 1, 'keywords' => 1, 'description' => 1, 'published' => 1, 'trashed' => 1,\n 'featured' => 1, 'pathAlias' => 1, 'ordinal' => 1,\n ];\n $paths = [];\n $rootLen = strlen($this->getRoot());\n $assetLen = strlen(AssetManager::$uploadPath) + $rootLen;\n\n $Nodes = $this->load()->loadContent()->get();\n\n while (!empty($Nodes)) {\n // Get the next Node\n $Node = array_shift($Nodes);\n // Add the Node to the export\n $paths[$Node->node_id] = $Node->path;\n $node = array_intersect_key($Node->getAll(), $nodeKeys);\n $node['path'] = substr($Node->path, $rootLen);\n // Add the File\n if ($Node->File) {\n $node['File'] = $Node->File->getAll();\n }\n $data[$Node->node_id] = $node;\n\n // Add child Nodes to the loop array\n $this->setPath($Node->path);\n $this->Nodes = [$Node];\n $Nodes += $this->children()->loadContent()->get();\n }\n\n foreach ($data as $key => $node) {\n switch (get_class($node['contentType'])) {\n case 'Article':\n // TODO Figure how to translate login_id\n break;\n case 'Asset':\n $node['File']['path'] = substr($node['File']['path'], $assetLen);\n break;\n case 'Page':\n $node['File']['template_id'] = $data[$node['File']['template_id']]['path'];\n break;\n case 'Site':\n $node['File']['theme_id'] = $data[$node['File']['theme_id']]['path'];\n $node['File']['defaultPage_id'] = $data[$node['File']['defaultPage_id']]['path'];\n break;\n case 'Submission':\n $node['File']['form_id'] = $data[$node['File']['form_id']]['path'];\n break;\n default:\n break;\n }\n $data[$key] = $node;\n }\n\n return $data;\n }", "abstract protected function getFolder();", "public static function get_asset_path( $asset = '' ) {\n return DIR.'public/'.$asset;\n }", "public function getSrcPath();", "protected function processingImage()\r\n {\r\n return \\Yii::getAlias('@vendor/papalapa/yiistart/assets/img/default.png');\r\n }", "protected function isSuperGroupAsset($asset)\n\t{\n\t\tif ($asset->extensionType() != 'components'\n\t\t || $asset->isDeclaration()\n\t\t || $asset->isExternal())\n\t\t{\n\t\t\treturn $asset;\n\t\t}\n\n\t\tif (defined('JPATH_GROUPCOMPONENT'))\n\t\t{\n\t\t\t$base = JPATH_GROUPCOMPONENT;\n\n\t\t\t$asset->setPath('source', $base . DS . 'assets' . DS . $asset->type() . DS . $asset->file());\n\t\t\t//$asset->setPath('source', $base . DS . $asset->file());\n\t\t}\n\n\t\treturn $asset;\n\t}" ]
[ "0.5903475", "0.5782013", "0.5718758", "0.5662813", "0.53348666", "0.5293335", "0.5270708", "0.5254616", "0.52049154", "0.5203867", "0.5196317", "0.51480526", "0.5131396", "0.4982586", "0.49731335", "0.49624503", "0.49613476", "0.495103", "0.49435458", "0.4925877", "0.49218005", "0.49194512", "0.48923305", "0.48875505", "0.4841096", "0.4833068", "0.48318106", "0.48090455", "0.48090455", "0.48090455", "0.4805645", "0.48050797", "0.4803856", "0.4797433", "0.47908726", "0.4788191", "0.4787769", "0.47862804", "0.47832617", "0.47832617", "0.47763756", "0.47740877", "0.47657418", "0.47654405", "0.47634426", "0.47601226", "0.4757886", "0.47572213", "0.47572213", "0.47572213", "0.47535434", "0.4752414", "0.47517478", "0.475137", "0.47466546", "0.47431362", "0.4736881", "0.47325248", "0.47314793", "0.4726113", "0.47223794", "0.47085822", "0.4698879", "0.4698815", "0.46911025", "0.4690872", "0.46868214", "0.46859297", "0.46835774", "0.46783566", "0.46779874", "0.46772084", "0.4676348", "0.46749294", "0.4655922", "0.46462575", "0.46434662", "0.46389487", "0.46379894", "0.4637241", "0.46352443", "0.46321672", "0.4628642", "0.4622198", "0.46003893", "0.45927146", "0.45880303", "0.45871553", "0.4586692", "0.45818007", "0.45811638", "0.45731425", "0.4570125", "0.45698738", "0.45648298", "0.4563442", "0.45558554", "0.45544863", "0.455437", "0.4554256" ]
0.70656365
0
Returns TRUE if the screen name exists in the database.
Возвращает TRUE, если имя экрана существует в базе данных.
function scrname_exists($scrname, $con){ $exists = false; $query = "SELECT * from user where screenName='".$scrname."'"; $result = mysqli_query($con, $query); if (mysqli_num_rows($result)==1) { $exists = true; } return $exists; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasScreenName()\n {\n return (bool) $this->screen_name;\n }", "function exist()\n\t{\n\t\treturn $this->exists(\"`name` = :name\", array('name' => $this->name));\n\t}", "function HasUser($connect, $name) {\n $sql = \"SELECT Username FROM User WHERE Username LIKE '$name'\";\n $result = $connect->query($sql);\n return $result->num_rows > 0;\n }", "function exists($name)\n\t{\n\t\tglobal $sql;\n\t\t$name = sql::Escape($name);\n\t\t$tablename = controlPanelItem::tablename;\n\t\t$exists = $sql->QueryItem(\"SELECT id FROM $tablename WHERE name='$name'\");\n\t\treturn ($exists != \"\");\n\t}", "public function userExistsIdentifiedByName($name) {\r\n\t $this->dbConnectorAsterisk->where(\"name\", $name);\r\n\t $this->dbConnectorAsterisk->get(CRM_USERS_TABLE_NAME_ASTERISK);\r\n\t return ($this->dbConnectorAsterisk->getRowCount() > 0);\r\n }", "public function hasDatabaseName();", "public function validate($screenname) {\n if (preg_match('/\\A[a-z0-9\\-_]{1,1000}\\z/i', $screenname)) {\n return true;\n } else {\n return false;\n }\n }", "public function Exists($strName);", "public function boardExists(string $board): bool\n {\n $sql = \"SELECT name FROM boards WHERE name = :board;\";\n\n $stmt = $this->db->prepare($sql);\n\n $stmt->bindParam(':board', $board);\n\n $stmt->execute();\n\n return is_array($stmt->fetch());\n }", "function name_exists($name)\r\n\t{\r\n\t\tglobal $db_link;\r\n\t\t$name = ereg_replace(\"--\", \"\", $name);\r\n\t\t$results = $db_link->query(\"Select friend_id from user_friend where name = '$name'\");\r\n\t\tif (mysqli_num_rows($results) == 0) {\r\n\t\t\t$results->close();\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\t$results->close();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function Exists()\n {\n // If no id or name were specified return false.\n if (!$this->Id && !$this->Name) {\n return false;\n }\n\n if ($this->Id) {\n $stmt = $this->PDO->prepare(\n 'SELECT COUNT(*) AS c FROM site WHERE id = ?');\n pdo_execute($stmt, [$this->Id]);\n if ($stmt->fetchColumn() > 0) {\n return true;\n }\n }\n $stmt = $this->PDO->prepare(\n 'SELECT id FROM site WHERE name = :name');\n pdo_execute($stmt, [':name' => $this->Name]);\n $id = $stmt->fetchColumn();\n if ($id !== false) {\n $this->Id = $id;\n return true;\n }\n return false;\n }", "public static function existsDB()\n {\n $db = self::connect(true);\n $queryText = \"SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'eventr_db'\";\n try {\n $query = $db->prepare($queryText);\n $query->execute();\n return ($query->fetch(PDO::FETCH_ASSOC) != NULL);\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n }", "public static function isValid($screen_name)\n {\n return (bool) preg_match(static::getRegexPattern(), $screen_name);\n }", "public static function nameExists($name)\n {\n $result = DB::table('chat_video')->where('room_name', $name)->count();\n\n if ($result !== false) {\n return ($result > 0);\n }\n\n return false;\n }", "public function existsInDB() {\n\t\treturn $this->getFromDB();\n\t}", "public function existsInDatabase()\n {\n $objects = $this->protocolAdapter->queryDocument(\n 'list_objects',\n [\n $this->schema->getName(),\n $this->getName()\n ]\n );\n\n return count($objects->fetchAll()) === 1 ? true : false;\n }", "public function userExists($name){\n \tif ($this->_configs['escapeInput']>0) $name = call_user_func_array($this->_configs['escapeFunction'],array($name));\n \t$sql = \"SELECT COUNT(*) as `c`\n\t\t\t\t\tFROM `\".$this->_configs['tableName'].\"`\n\t\t\t\t\tWHERE `\".$this->_configs['nameField'].\"` = '$name'\";\n \t\n \t$query = mysql_query($sql) or die(mysql_error());\n \t$result = mysql_fetch_assoc($query);\n \treturn ((int)$result['c']>0);\n }", "function Exists()\n\t{\n\t\tif ($this->mId>0)\n\t\t\treturn $this->InTable($this->mTbName, \"id\", $this->mId);\n\t\telse\n\t\t\treturn false;\n\t}", "public function isExists(){\n \n $okay= false;\n if($this->db !=null)\n {\n //Only create the table once\n $userTable= new UserTable();\n $this->db->Create($userTable);\n \n $sql= \"Select *From \". UserLoginTable::TableName\n .\" where (\".UserLoginTable::ID.\" = :username AND \".UserLoginTable::Password.\"=:password)\";\n \n //Add value to database \n $stmt= $this->db->prepare($sql);\n $stmt->bindValue(\":username\", addslashes(strtolower(trim($this->username))));\n $stmt->bindValue(\":password\",(sha1($this->password)));\n \n //if the execution was successfully and the affected row is more than one\n if($stmt->execute() && $stmt->rowCount()> 0 )\n {\n \n $okay=true;\n \n }\n \n \n \n }\n \n return $okay;\n }", "private function is_screen() {\n\t\treturn 'users' === get_current_screen()->id;\n\t}", "function UserExists ()\n\t{\n\t\t$user = $this->db->get($this->username);\n\t\treturn !empty($user);\n\t}", "function CheckExistence()\n {\n $qry = \"SELECT login,name FROM person WHERE login='\".$this->info['login'].\"';\";\n $ist = $this->ogo->FetchAllRows($this->ogo->Query($qry));\n if($ist){\n return(true);\n }else{\n return(false);\n }\n }", "public function teamNameExists($name)\n {\n $result = mysql_query(\"SELECT name from teams WHERE name = '$name'\");\n $no_of_rows = mysql_num_rows($result);\n if($no_of_rows > 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "private function table_exists() {\n\n\t\tglobal $wpdb;\t\t\n\n\t\treturn $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $this->table_name ) ) === $this->table_name;\n\t}", "public function check_name_exists($fullname) {\n $query = $this->db->get_where('system', array('fullname'=>$fullname));\n\n if(empty($query->row_array())) {\n return true;\n } else {\n return false;\n }\n }", "function user_exists_name($name){\n $pdo = connect();\n\n $req = $pdo->prepare('SELECT * FROM users WHERE User_Name=? ');\n $req->bindParam(1,$name, PDO::PARAM_STR);\n $req->execute(); \n $user = $req->fetch();\n return empty($user);\n\n \n }", "public function exists($name);", "public function exists($name);", "public function exists($name);", "public function exists($name);", "public function tableExists($name) {\n $this->validateName($name);\n\n $sql = 'SELECT name FROM sqlite_master WHERE type = ' . $this->connection->quoteValue('table') . ' AND name = ' . $this->connection->quoteValue($name);\n\n $result = $this->connection->execute($sql);\n\n return $result->getRowCount() == 0 ? false : true;\n }", "public function exist()\n {\n if (is_null($this->_USER)) {\n return false;\n }\n\n return true;\n }", "public static function hasDbName()\n\t{\n\t\treturn !is_null(static::getDbName());\n\t}", "function sess_exists($sess_id) {\n global $db;\n $sess_id = db_quote($sess_id);\n $sql = \"SELECT * FROM sessions WHERE name=$sess_id\";\n $rs = $db->Execute($sql);\n if ($rs->RecordCount()) {\n return TRUE;\n }\n return FALSE;\n}", "function nameExists($newUname){\n\t\tglobal $servername, $username, $dbname, $password, $preid;\n\t\t$conn = new mysqli($servername, $username, $password, $dbname);\n\n\t\t// Check connection\n\t\tif ($conn->connect_error) {\n\t\t die(\"Connection failed: \" . $conn->connect_error);\n\t\t} \n\t\telse {\n\t\t\t$sql = \"SELECT * FROM users WHERE u_username = \\\"\".$newUname.\"\\\";\";\n\t\t\t$result = $conn->query($sql);\n\t\t\tif($result->num_rows > 0){ // if > 0, then obviously this name is taken\n\t\t\t\t$conn->close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$conn->close();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} \n\t}", "function db_user_exists($user)\n{\n\t$user = mysql_real_escape_string($user);\n\t$result = mysql_query(\"SELECT COUNT(`user_id`) FROM `users` WHERE `user_name` = '{$user}'\");\n\n\treturn (mysql_result($result, 0) == '1') ? true : false;\n}", "public function isUserInDB($username);", "function dbUserExists($unm)\r\n{\r\n\t$result = false;\r\n\t$sql = \"SELECT username FROM _account WHERE username = '$unm'\";\r\n\ttry {\r\n\t\t$stmt = Database :: prepare ( $sql );\r\n\t\t$stmt->execute();\r\n\t\t$count = $stmt -> rowCount();\r\n\t\tif ($count > 0) {\r\n\t\t\t$result = true; //Username already taken\r\n\t\t}\r\n\t\t$stmt->closeCursor ( ) ;\r\n\t}\r\n\tcatch(PDOException $e)\r\n\t{\r\n\t\techo $e->getMessage();\r\n\t}\r\n\treturn $result;\r\n}", "public function isExists($name)\n {}", "public function check_exists_name(){\n\t\t$query = array('ten' => $this->ten);\n\t\t$field = array('_id' => true);\n\t\t$result = $this->_collection->findOne($query, $field);\n\t\tif($result['_id']) return true;\n\t\telse return false;\n\t}", "function doesLocationExists($loc_name) {\n try {\n $dbh = conn_db();\n\n $sql = \"SELECT pk_loc\n FROM tb_locations\n WHERE loc_name = :name\";\n\n $stmt = $dbh->prepare($sql);\n $stmt->bindParam(':name', $loc_name);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n\n $stmt->execute();\n } catch(PDOException $e) {\n echo $e->getMessage();\n die();\n }\n\n return $stmt->rowCount() > 0;\n }", "private function user_name_exists($user_name)\n {\n $sql = \"select user_id from users where user_name = ?\";\n $pdo = $this->Session->DB->prepare($sql);\n $this->Session->DB->execute($pdo, array($user_name));\n $set = $this->Session->DB->fetch_all($pdo);\n return (!empty($set));\n }", "public function Exists($strName)\n {\n return(array_key_exists(strtolower($strName), $this->data));\n \n }", "public function dbExist(){\r\n\t\t\tif(is_null($this->getDB())){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}", "public function isDatabaseExisted()\n {\n $database = $this->getDatabase(); // get database name @author Amr\n $result = DB::select(\"select COUNT(schema_name) as is_existed from\n information_schema.schemata where schema_name = '$database';\"); // select the count of database that has the same given name from mysql databases @author Amr\n return array_pop($result)->is_existed == 1; // if count 1 return database existed otherwise is not existed @author Amr\n }", "function username_exists($db, $username)\n{\n\t$exists = false;\n\t$username_check_sql = \"select count(*) from player where username = ?\";\n\t$statement_check_username = $db->prepare($username_check_sql);\n\t$statement_check_username->execute([$username]);\n\t$check_username_results_array = $statement_check_username->fetch(PDO::FETCH_ASSOC);\n\t$exists = intval($check_username_results_array[\"count\"]) == 1;\n\n\treturn $exists;\n}", "function displayNameExists($displayName, $userId)\n {\n $dbHandler = $this->getDbHandler();\n $users = $dbHandler->getRecords(\"User\", \"Display_name\", $displayName, PDO::PARAM_STR);\n //NOTE: The user id is used so that if the user is changing his description but does not alter his display name\n //then he wont get a \"Already taken\" error (since it is him that has already taken it).\n if (count($users) > 0 && $users[0][0] != $userId)\n {\n return true;\n }\n return false;\n }", "public function isUserInDB(){\n\n\t$isInDB = false;\n\n\t$results = $this->generic_db->customQuery( 'facebook_users', 'SELECT * FROM facebook_users where id = ' . $this->session['uid'] );\n\n\tif( count( $results ) > 0 ){\n\t\t$isInDB = true;\n\t}\n\n\treturn $isInDB;\n}", "public function exists(string $name): bool;", "public function exists(string $name): bool;", "private function tableExists() {\n\t\ttry {\n\t\t\t$result = $this->pdo->query(\"SELECT 1 FROM oauth_session LIMIT 1\");\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $result !== false;\n\t}", "public static function exists($name) {\n return (isset($_SESSION[$name])) ? true : false;\n }", "public function name_taken($login_name) {\n $stmt = $this->db->prepare('SELECT * FROM user WHERE login_name = :login_name');\n $stmt->execute([ 'login_name' => $login_name]);\n\n return $stmt->fetchColumn() > 0; // return true if name is taken, false if not\n }", "protected function table_exists() {\n global $wpdb;\n $full_table_name = $wpdb->prefix . $this->table_name;\n\n if( $full_table_name == $wpdb->get_var(\"SHOW TABLES LIKE '$full_table_name'\") ) {\n return true;\n } else {\n return false;\n }\n }", "public function table_exists() {\n if( $this->wpdb->get_var( $this->wpdb->prepare( \"SHOW TABLES like %s\", $this->tablename ) ) !== $this->tablename ) {\n return false;\n }\n return true;\n }", "function usernameExists($user)\n {\n $sql = \"SELECT * FROM USERS WHERE username = :username\";\n $stmt = $this->_dbh->prepare($sql);\n\n $name = $user->getUsername();\n $stmt->bindParam(':username', $name);\n\n $stmt->execute();\n\n return !empty($stmt->fetchAll(PDO::FETCH_ASSOC));\n }", "public function __isset($sName)\n {\n if ($this->hasColumn($sName))\n {\n return true;\n }\n \n if (strtolower($sName) == 'title' && $this->hasColumn('name'))\n {\n return true;\n }\n \n if (isset($this->hAutoGetter[strtolower($sName)]))\n {\n return true;\n }\n \n if ($this->hasColumn(\"{$sName}id\"))\n {\n return true;\n }\n \n if (preg_match('/(.+?)List/', $sName, $aMatch))\n {\n return $this->__isset($aMatch[1]);\n }\n \n return false;\n }", "public static function table_exists( $table_name ){\n\t\tglobal $wpdb;\n\n\t\tif ( empty( $table_name ) )\n\t\t\treturn false;\n\n\t\t$table_name = static::validate_table_name( $table_name );\n\t\t// \\QM::debug( $wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\" ) );\t\n\t\t// \\QM::debug( $table_name );\t\n\t\t// \\QM::debug( $wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\" ) == $table_name );\t\n\t\treturn ( $wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\" ) == $table_name );\n\t}", "public function isExistingUserName($userName);", "public function exists($name) { }", "private function banned($screen_name)\n\t{\n\t\treturn ( Banned::where('screen_name', $screen_name)->count() ) ? true : false;\n\t}", "public function checkExists(){\r\n \t\r\n \tif(isset($this->id) && !$this->exist){\r\n \t\t$result=mysql_query(\"SELECT * FROM forum_board WHERE id='{$this->id}'\") or die(mysql_error());\r\n \t\tif (mysql_num_rows($result)==1)\r\n \t\t\t$this->parse(mysql_fetch_array($result));\r\n \t\t$this->exist=true;\r\n \t}\r\n \treturn $this->exist;\r\n }", "public function exists()\n {\n if ($this->existsStatement == null) {\n $this->existsStatement = $this->database->getConnection()->prepare(\"SELECT * FROM MailAddress WHERE domain = :domain AND name = :local_part\");\n $this->existsStatement->bindParam(\"domain\", $this->domainName);\n $this->existsStatement->bindParam(\"local_part\", $this->localPart);\n }\n\n $this->existsStatement->execute();\n\n return $this->existsStatement->rowCount() > 0;\n\n }", "public function isExistsByUserName($p_value) {\n if ( empty($p_value))\n return FALSE;\n $sql = $this->DB->prepare(\"SELECT count(1) AS cnt FROM $this->_table WHERE User_Name = %s LIMIT 1\", $p_value);\n $cnt = $this->DB->get_var($sql);\n \n if (intval($cnt) == 1)\n return TRUE;\n \n return FALSE;\n }", "public function exists()\n {\n return (bool)$this->object->Name();\n }", "public static function exists ($name) {\r\n\t\t\treturn (isset ($_SESSION [$name])) ? true : false;\r\n\t\t}", "function exists( $name ) {\n\t\treturn isset( $this->registry[ $name ]);\n\t}", "public function doesTableExist()\n\t{\n\t\t$this->errMsgs = \"\";\n\t\t// Check if the table exists by doing a select on the SQLite \n\t\t// table called 'sqlite_master' to check if the table name \n\t\t$sql = \"SELECT count(*) as count FROM `sqlite_master` WHERE `tbl_name` = '\" . $this->tableName . \"';\"; \n\t\ttry{\n\t\t\t$sth = $this->pdo->prepare($sql);\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchColumn();\n\t\t\treturn $result == 1;\n\t\t}catch(PDOException $e){\n\t\t\t$this->err(\"SELECT: \" . $e->getMessage() . \" using query [\" . $sql . \"]\");\n\t\t\treturn false;\n\t\t}\n\t}", "public static function exists($name) {\r\n return (isset($_SESSION[$name]) ? true : false);\r\n }", "public static function hasNameField(): bool;", "public static function exists($name)\n {\n if (isset($_SESSION[$name])) {\n return true;\n } else {\n return false;\n }\n }", "private function _tableExists($name)\n {\n return array_key_exists($name, $this->_tables);\n }", "public static function exists($name) {\n return (isset($_SESSION[$name])) ? true : false;\n }", "function isExist($name, $schemaName) {\n $stmt = $this->conn->prepare('select count(*) as count from schema_org where name = :name');\n $stmt->bindValue('name', $name, \\PDO::PARAM_STR);\n $stmt->execute();\n\n $row = $stmt->fetch(\\PDO::FETCH_ASSOC);\n\n return intval($row['count']) > 0;\n }", "public function tableExists($name) {\n \n /* are we ready to query? */\n \t\n if(!$this->isReady()) {\n $this->error(\"Can not check table, adaptor not ready.\");\n return false; \t\n }\n \n $name = strtolower(trim($name));\n \n if(!$this->validTableName($name)) {\n $this->error(\"Can not check table, ($name) has invalid characters. Use: /^[a-z][a-z0-9_]*$/\");\n return false;\n }\n \n $tables = $this->listTables();\n if($tables === false) {\n $this->error(\"Can not check table ($name): \".$this->getError());\n return false;\n }\n \n if(!in_array($name, $tables)) {\n return false;\n }\n \n return true;\n }", "function userExists($username)\n {\n $dbHandler = $this->getDbHandler();\n $users = $dbHandler->getRecords(\"User\", \"Username\", $username, PDO::PARAM_STR);\n if (count($users) > 0)\n {\n return true;\n }\n return false;\n }", "private function tableExists($table_name):bool\n {\n $res = $this->local_db->query(\"SHOW TABLES LIKE '$table_name'\");\n return (boolean)($res->rowCount());\n\n }", "public static function tableExists($table)\n\t{\n\t\t// the query to run\n\t\t$query = \"SELECT name FROM sqlite_master WHERE type='table' AND name=:name;\";\n\n\t\t// run the query\n\t\treturn count(Database::query($query, array(':name'=>$table)))>0 ? true : false;\n\t}", "function user_exists($User) {\n\t$stmt = $GLOBALS['pdo']->prepare('\n\t\tSELECT count(*)\n\t\tFROM `users`\n\t\tWHERE `username` = :username');\n\t$stmt->bindValue(':username', s($User));\n\t$stmt->execute();\n\n\treturn ($stmt->fetchColumn() > 0);\n}", "public function username_exists($id)\n\t{\n\t\treturn $this->unique_key_exists($id);\n\t}", "function check_for_name($connection, $name){\r\n\t$safe_name = addslashes($name);\r\n\t$result = $connection->query(\"select name from users\r\n\t\t\t\t\t\t\t\t\twhere name = '$safe_name'\");\r\n\tif(!$result){\r\n\t\tthrow new Exception('Could not check if '.$name.' was in db.');\r\n\t}\r\n\tif($result->num_rows >= 1){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function isNameExist($user_name, $hashedPass){\n\t\t$sql = \"SELECT count(*) as nameExist \";\n\t\t$sql .= \"FROM users \";\n\t\t$sql .= \"WHERE user_name='$user_name' and user_pass= '$hashedPass' \";\n\t\n\t\t$stmt = $this->dbManager->prepareQuery ( $sql );\n\t\t$this->dbManager->executeQuery ( $stmt );\n\t\t$result = $this->dbManager->fetchResults ( $stmt );\n\t\n\t\tif ($result[0][\"nameExist\"] == 1) {\n\t\t\treturn (true);\n\t\t} else\n\t\t\treturn (false);\n\t}", "function user_exists($login) {\n global $mysqlMainDb;\n\n $username_check = mysql_query(\"SELECT username FROM `$mysqlMainDb`.user\n\tWHERE username='\".mysql_real_escape_string($login).\"'\");\n if (mysql_num_rows($username_check) > 0)\n return TRUE;\n else\n return FALSE;\n}", "function isUsernameExists($username) {\n $pdo = DATABASE::getInstance()->getConnection();\n\n $user_exists_query = 'SELECT COUNT(*) FROM tbl_user WHERE user_name = :username';\n $user_exists_set = $pdo->prepare($user_exists_query);\n $user_exists_result = $user_exists_set->execute(\n array(\n ':username'=>$username\n )\n );\n return !$user_exists_result || $user_exists_set->fetchColumn() > 0;\n}", "function checkUserExists($username) {\n\t\t$users = $this->mdb->query(\"SELECT * FROM gameUser WHERE username = %s\", $username);\n\t\tif (count($users) > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function CheckSID($SID) {\r\n $a = $this->db->query(\"SELECT * FROM `ConsoleSession` WHERE `SID` = '$SID' LIMIT 0,1\");\r\n $b = $a->fetchArray();\r\n if ($b['SCREEN']){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public function cursor_exists( $cursor ) {\n\t\tglobal $wpdb;\n\n\t\t$db = DB_NAME;\n\t\t$cursor_exists = $wpdb->query( \"SELECT * FROM information_schema.tables WHERE table_schema = '{$db}' AND table_name = '{$this->prefix}_{$cursor}_posts' LIMIT 1;\" );\n\n\t\treturn 0 === $cursor_exists ? false : true;\n\t}", "static private function exists()\n\t{\n\t\treturn isset( $_SESSION['mensagem'] );\n\t}", "public static function is_valid_user($idOrScreenName)\n {\n if (is_numeric($idOrScreenName) && intval($idOrScreenName) == $idOrScreenName) {\n $twitterClass = self::get_twitter_class();\n $userData = $twitterClass->usersShow($idOrScreenName);\n } else {\n $userData = self::user_lookup($idOrScreenName);\n }\n if (is_array($userData)) {\n if (!count($userData)) {\n $userData = null;\n }\n }\n return $userData ? $userData : false;\n }", "function usernameExists($username) {\n global $db;\n \n $stmt = $db->prepare(\"SELECT * FROM ba_users WHERE username = :username\");\n $stmt->bindParam(':username', $username);\n $stmt->execute();\n \n if(($stmt->rowCount()) > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function exists($name = NULL)\n {\n return isset($_SESSION[$name]) ? true : false;\n }", "public static function exists($name) {\n\t\treturn (isset($_SESSION[$name])) ? true : false;\n\t}", "public function databaseExists($name) {\n \t\n \t$this->info(\"checking database ($name)...\");\n \t\n /* are we ready to query? */\n \t\n if(!$this->isReady()) {\n $this->error(\"Can not check database, adaptor not ready.\");\n return false; \t\n }\n \n /* check params */\n \n $name = strtolower(trim($name));\n \n if(empty($name)) {\n $this->error(\"Can not check database, no name given.\");\n return false; \t\n }\n \n if(!$this->validDatabaseName($name)) {\n $this->error(\"Can not check database, ($name) has invalid characters. Use: /^[a-z][a-z0-9_]*$/\");\n return false;\n }\n \n $dbNames = $this->listDatabases();\n \n if($dbNames === false) {\n $this->error(\"Can not check database: \".$this->getError());\n return false;\n }\n \n if(!in_array($name, $dbNames)) {\n return false;\n }\n \n return true;\n }", "function resource_exists($name) {\n return array_key_exists($name,$this->dataModel);\n }", "function tableExists($table)\n{\n global $db;\n $table_exit = $db->run_query('SHOW TABLES FROM ' . DB_NAME . ' LIKE \"' . $db->get_escape_string($table) . '\"');\n if ($table_exit) {\n if ($db->num_rows($table_exit) > 0) {\n return true;\n } else {\n return false;\n }\n }\n}", "static public function exists($userName){\n\t\tif($userName == 'roboli')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function exist($name){\n if (isset ($_SESSION[$name])) {\n return TRUE;\n }\n else{\n return FALSE;\n }\n }", "public static function exists($name) {\n\t\treturn (isset($_SESSION[$name])) ? TRUE : FALSE;\n\t}", "public function checkActivationDB() {\n //lookup in DB if valide\n //return true of false\n \n $result = mysql_query(\"SELECT COUNT(*) FROM tUser WHERE tUser.usrName = '\" . $this->usrName . \"' AND tUser.usrActiv = TRUE\");\n $sqlResultCount = mysql_result($result, 0);\n \n if ($sqlResultCount == 1)\n {\n return true;\n }\n else {\n return false;\n }\n\n }", "public function db_exists( $str, $field ) {\n\t\tsscanf( $field, '%[^.].%[^.]', $table, $field );\n\n\t\treturn isset( $this->CI->db )\n\t\t\t? ( $this->CI->db->limit( 1 )->get_where( $table, array( $field => $str ) )->num_rows() > 0 )\n\t\t\t: false;\n\t}" ]
[ "0.7270972", "0.66559917", "0.6369169", "0.6368063", "0.6357804", "0.63307536", "0.627945", "0.6169594", "0.6137843", "0.6133657", "0.6131625", "0.6120872", "0.6094427", "0.6088074", "0.60738045", "0.607273", "0.6068074", "0.60647947", "0.6028944", "0.6023546", "0.59882635", "0.59872687", "0.5986292", "0.59550947", "0.5950852", "0.59258205", "0.5915095", "0.5915095", "0.5915095", "0.5915095", "0.59148633", "0.5908961", "0.5899692", "0.5892149", "0.5890926", "0.5887863", "0.5883649", "0.58811927", "0.5877967", "0.58746487", "0.5873454", "0.5870044", "0.5868818", "0.5868639", "0.5866738", "0.5855767", "0.58488655", "0.58423036", "0.5839698", "0.5839698", "0.5838188", "0.58281046", "0.58250916", "0.5821981", "0.5815773", "0.5813892", "0.5810401", "0.5807923", "0.5804271", "0.5798135", "0.57745147", "0.57596284", "0.5758464", "0.575845", "0.57581294", "0.5752238", "0.57493407", "0.57489985", "0.5746215", "0.57437545", "0.5741461", "0.57412875", "0.5736026", "0.57282263", "0.572579", "0.57230294", "0.5720568", "0.57179296", "0.5717867", "0.5713828", "0.57098645", "0.5709691", "0.57046974", "0.5698844", "0.56971556", "0.569689", "0.5695915", "0.5694831", "0.5690001", "0.56857", "0.568524", "0.5681015", "0.56802946", "0.5676283", "0.5667623", "0.566675", "0.5663693", "0.56540895", "0.5653943", "0.56532073" ]
0.7276171
0
Generate HTML code on the output buffer for the logout button
Создайте HTML-код на выходном буфере для кнопки выхода
private function generateLogoutButtonHTML() { return ' <form method="post" > <p id="' . self::$messageId . '">' . $this->message .'</p> <input type="submit" name="' . self::$logout . '" value="logout"/> </form> '; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logoutbtn()\n\t{\t\t\n\t\tif(isset($_SESSION['usernameccf5fc0187']) && isset($_SESSION['passwordccf5fc0187']))\n\t\t\t{\n\t\t\t\techo '<li class=\"\">\n <a href=\"index?session_destroy=1\" class=\"dropdown-toggle\">\n <i class=\"icon-logout\"></i>\n </a>\n </li>';\n\t\t\t}\n\t\t\n\t}", "public function vxLogout() {\n\t\techo('<div id=\"main\">');\n\t\techo('<div class=\"blank\" align=\"left\">');\n\t\t_v_ico_map();\n\t\techo(' <a href=\"/\">' . Vocabulary::site_name . '</a> &gt; ' . Vocabulary::action_logout . '</div>');\n\t\techo('<div class=\"blank\" align=\"left\"><span class=\"text_large\"><img src=\"/img/ico_logout.gif\" align=\"absmiddle\" class=\"home\" />你已经从 ' . Vocabulary::site_name . ' 登出</span><br />感谢你访问 ' . Vocabulary::site_name . ',你现在已经从 ' . Vocabulary::site_name . ' 完全登出,没有任何的个人信息被留在你当前使用过的计算机上。');\n\t\t_v_hr();\n\t\techo('<img src=\"/img/pico_right.gif\" align=\"absmiddle\" />&nbsp;<a href=\"/login.vx\">重新登录</a></div>');\n\t\techo('</div>');\n\t}", "public function outputLogoutForm()\n\t{\n\t\techo $this->app->html->formOpen($this->app->uri->getLogout(), ['id' => 'logout-form']);\n\t\t$this->app->html->token();\n\t\techo $this->app->html->formClose();\n\t}", "function displayLogoutButton() {\n\t\techo\n\t\t<<<_END\n<html>\n<body>\n<form method='post' action='main.php' enctype='multipart/form-data' > \n<input type='submit' value=\"Log Out\" name=\"btn_logout\" /> <br>\n</form>\n</body>\n</html>\n_END;\n\n\t\tif (!empty($_POST['btn_logout'])) {\n\t\t\tdestroy_session_and_data();\n\t\t\tdie (\"<p><a href=main.php>You have been logged out. Click here to log back in.</a></p>\");\n\t\t}\n\t}", "function logout_button()\r\n\t{\r\n\t\treturn $this->CI->template->isolated_view('social_network/google/logout');\r\n\t}", "private function _logoutAction()\n {\n $_SESSION = array ();\n setcookie(SITE_NAME . '[userId]', '', time () - (3600 * 168));\n setcookie(SITE_NAME . '[username]', '', time () - (3600 * 168));\n setcookie(SITE_NAME . '[digest]', '', time () - (3600 * 168));\n setcookie(SITE_NAME . '[secondDigest]', '', time () - (3600 * 168));\n\n // Destory the session\n session_destroy ();\n\n return '<div id=\"login-box\" class=\"info\">Thank you. Come again!</div>';\n }", "public function showLogout() { //TODO - REMOVE USE OF SESSION IN VIEW (not my code!! Had no time to fix this )\n // Get the username either from session or cookie\n if (isset($_SESSION[self::$username])) {\n $username = $_SESSION[self::$username];\n } else {\n // $username = $this->cookieStorage->getCookieValue(self::$username); // TODO denna strular tillde\n }\n\n $ret = \"<h2>\" . $username . \" är inloggad</h2>\";\n $ret .= \"<span class='alert'>\" . $this->misc->getAlert() . \"</span> \"; // If there are any alerts, show them\n $ret .= \"<a href='?\" . self::$getLogout . \"'>Logga ut</a>\n \";\n\n return $ret;\n }", "public function actionLogout()\n\t{\n Yii::app()->user->logout(); \n \n $script = uc_user_synlogout(); \n $this->render('logoutsuc', array('script' => $script)); \n Yii::app()->end(); \n\t}", "public function logout(){\n return 'Logging out ...';\n }", "function crearLogout($accion)\n{\n\techo <<<OUT\n\t<form action=\"$accion\" method=\"post\">\n\t\t<input type=\"hidden\" name=\"logout\" value=\"true\">\n\t\t<input type=\"submit\" name=\"submitLogout\" value=\"Cerrar sesion\">\n\t</form>\nOUT;\n}", "public function actionLogout()\r\n {\r\n// $vars = ['cookies' => Yii::$app->request->cookies, 'model' => $model, 'action' => 'adminLocked'];\r\n// return $this->render('adminLocked', $vars);\r\n }", "public function showLogoutForm()\n {\n return view( config('lasallesoftware-librarybackend.path_to_back_end_authentication_view_path') . '.logout' );\n }", "public function processLogout();", "public function renderLogout() {\n\n\t\t// See if we can log\n\t\t// the user out\n\t\tif ($this->doLogout()) {\n\n\t\t\t// Load the default template\n\t\t\t$this->renderOneighty();\n\t\t} else {\n\n\t\t\t// Set the system error\n\t\t\t$this->setError(Whv_Config::Get('errorMessages', 'cannotLogout'));\n\n\t\t\t// Load the default template\n\t\t\t$this->renderOneighty();\n\t\t}\n\t\treturn $this;\n\t}", "private function generateLogoutButtonHTML($message) {\n\t\t$ret = '\n\t\t\t<form method=\"post\" >\n\t\t\t\t<p id=\"' . self::$messageId . '\">' . $message .'</p>\n\t\t\t\t<input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n\t\t\t</form>\n\t\t';\n\t\t$ret .= $this -> AppV -> GetAppView();\n\t\t\n\t\treturn $ret;\n\t}", "private function generateLoggedInHTML() : string {\n\t\treturn '\n\t\t\t<form method=\"post\" action=\"?\" >\n\t\t\t\t<p id=\"' . self::$messageId . '\">' . $this->message .'</p>\n\t\t\t\t<input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n\t\t\t</form><br>\n\t\t';\n\t}", "function Render()\n\t{\n\t\t$strMainPageHref = Href()->MainPage();\n\t\t$strLoginHref = Href()->Console();\n\t\t\n\t\techo \"<div class='WideContent' style='height:300px;'>\\n\";\n\t\t\n\t\tprint \"\n\t\t<br/><br/>\n\t\t<center><div class='customer-standard-table-style-menu-options-login'>Logged Out</div></center>\n\t\t<TABLE align=center class=login-table-style-main>\n\t\t<TR VALIGN=\\\"TOP\\\">\n\t\t\t<TD>\";\n\n\t\tif (AuthenticatedUser()->_arrUser != NULL)\n\t\t{\n\t\t\t// The user was logged in when they tried to log out. The logging out has been successful.\n\t\t\t$strLogoutMsg = \"You have been successfully logged out.\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The user wasnt logged in when they tried to log out. \n\t\t\t// This should only occur, if the user logged out using another browser window, or machine\n\t\t\t$strLogoutMsg = \"Apparently this session is not the most recent. You are most likely still logged in on another machine, or browser window.<br />\";\n\t\t\t$strLogoutMsg .= \"To insure you have properly logged out. Please log in again and then log out.\";\n\t\t}\n\t\t\n\t\techo \"<span class='DefaultOutputSpan Default'>$strLogoutMsg</span>\\n\";\n\t\techo \"<br /><br />\\n\";\n\t\techo \"<a href='$strLoginHref' ><span>Customer System Login</span></a>\\n\";\n\t\t//echo \"<a href='$strLoginHref' ><span>\". APP_NAME .\" Login</span></a>\\n\";\n\t\t\n\t\t/* There is no home page, so for now we will omit this link...\n\t\techo \"<br />\\n\";\n\t\techo \"<a href='$strMainPageHref' ><span>Back to homepage</span></a>\\n\";\n\t\t*/\n\t\t\n\t\t\tprint \"\n\t\t\t</TD>\n\t\t</TR>\n\t\t</TABLE>\n\t\t<br/>\";\n\n\t\techo \"</div>\\n\"; // WideContent\n\n\t\t\n\t\t// As there is nothing much for the user to do on this page (with the above link removed),\n\t\t// automatically redirect the user to the login page.\n\t\t?>\n\t\t<script>\n\t\t\tfunction goToLogin()\n\t\t\t{\n\t\t\t\tdocument.location = \"<?php echo $strLoginHref; ?>\";\n\t\t\t}\n\t\t\twindow.setTimeout(goToLogin, 5 *1000);\n\t\t</script>\n\t\t<?php\n\n\t}", "function logout(){\n\t\n\tunset($_SESSION['userid']);\n\n\tprint <<<LOGOUT\n\t<HTML>\n\t\t<HEAD>\n\t\t\t<TITLE>User Logged Out</title>\n\t\t</head>\n\t\t<body>\n\t\t\t<h1 align=\"center\">You have been logged out</h1>\n\t\t\t<h3 align=\"center\"><a href=\"index.php\">Click here to return to the homepage</a></h3>\n\t\t</body>\n\t</html>\nLOGOUT;\n\t\t\t\n\n}", "public function logout_hook();", "function render_logged_out_index() {\r\n\tif (is_fbconnect_enabled()) {\r\n\t\t$html .= '<div class=\"fbconnect_login\">';\r\n\t\t$html .= render_fbconnect_button('medium');\r\n\t\t$html .= '</div>'; // fbconnect_login\r\n\t}\r\n\r\n\treturn $html;\r\n}", "private function generateLogoutButtonHTML($message) \n {\n $this->session->setSession(self::$sessionMessage, $message);\n return '\n <form method=\"post\" >\n <p id=\"' . self::$messageId . '\">' . $message .'</p>\n <input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n </form>\n ';\n }", "public function getLogoutForm(){\n $statusText=self::getStatusText();\n $logoutform = <<<EOD\n <form method='post'><fieldset><legend>Logout</legend>\n <p><strong>{$statusText}</strong></p>\n <p><button type='submit' name='logout'>Logga ut</button></p>\n </fieldset></form>\nEOD;\n return $logoutform;\n }", "public function logout()\n {\n return $this->action(self::ACTION_LOGOUT);\n }", "function render_logged_out_index() {\r\r\n\r\r\n\t\r\r\n\t\r\r\n\tif (is_fbconnect_enabled()) {\r\r\n\t $html .= '<table><tr><td class=\"rep2\">Sign up for the daily frost through Facebook (recommended):</td><td>';\r\r\n\t\t\r\r\n\t\t$html .= render_fbconnect_button('medium');\r\r\n\t\t$html .= '</td></tr></table>';\r\r\n\t}\r\r\n\r\r\n\treturn $html;\r\r\n}", "static function Logoff() {\n unset($_SESSION['CLI']); // VAI LIMPAR TUDO QUE ESTIVER NA FUNÇÃO CLI\n\n echo ' \n \n <div class=\"\">\n <img src=\"view/images/progresso.gif\"> <b>Saindo...</b>\n </div> \n \n ';\n\n Rotas::Redirecionar(3, Rotas::get_SiteHOME()); // VOLTA PARA PAGINA INICIAL\n }", "function mamo_template_tag_login_logout() {\n\n\t\tglobal $user_ID, $wp_version, $status;\n\t\tget_currentuserinfo();\n\t\t$returnval = '';\n\t\t// Get URLs for login/logout\n\t\t// wp_logout_url() does not work here for some unknown reason...\n\t\t$loginurl = site_url('wp-login.php', 'login');\n\t\t$logouturl = wp_nonce_url( site_url('wp-login.php?action=logout', 'login'), 'log-out' );\n\t\t$adminurl = admin_url();\n\t\tif ($user_ID) {\n\t\t\tif ($status == 'noaccesstobackend' ) {\n\t\t\t\t$returnval .= __('(Access to administration denied by administrator)',$this->g_info['ShortName']);\n\t\t\t} else {\n\t\t\t\t$returnval .= '<a rel=\"nofollow\" href=\"' . $adminurl . '\">' . __('Administration',$this->g_info['ShortName']) . '</a>';\n\t\t\t}\n\t\t\t$returnval .= ' | <a rel=\"nofollow\" href=\"'. $logouturl . '\">' . __('Log Out',$this->g_info['ShortName']) . '</a>';\n\t\t} else {\n\t\t\t$returnval .= '<a rel=\"nofollow\" href=\"' . $loginurl . '\">' . __('Log In',$this->g_info['ShortName']) . '</a>';\n\t\t}\n\t\treturn $returnval;\n\t}", "public function logout() {\n if ($this->sessionModel->isSessionSet()) {\n $this->sessionModel->destroySessionAndCookies();\n $this->loginView->setLoginMessage(\"Bye bye!\");\n }\n $this->layoutView->render(false, $this->loginView);\n }", "public function logoutAction()\n {\n $this->getHybridAuth();\n return parent::logoutAction();\n }", "function do_logout() {\r\n}", "protected function render() {\n\t\t\n\t\tforeach ( wc_get_account_menu_items() as $endpoint => $label ) :\n\t\t\tif( $endpoint == 'customer-logout' ):\n\t\t\t?>\n\t\t\t<div class=\"dtwcbe-customer-logout\">\n\t\t\t\t<a href=\"<?php echo esc_url( wc_logout_url( wc_get_page_permalink( 'myaccount' ) ) ); ?>\"><?php echo esc_html( $label ); ?></a>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tendif;\n\t\tendforeach;\n\n\t}", "private function generateLogoutButtonHTML(string $message) : string {\n return '\n <form method=\"post\" >\n <p id=\"' . self::$messageId . '\">' . $message .'</p>\n <input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n </form>\n ';\n }", "public function logoutResponse(): string;", "public function generateLogoutURL();", "protected function logoutAction() {\n\t\t$oView = new accountView($this);\n\t\t$oView->showLogoutPage();\n\t}", "private function generateLogoutButtonHTML($message) : string {\n\t\treturn '\n\t\t\t<form method=\"post\" class=\"logout-form\">\n\t\t\t\t<p class=\"message\" id=\"' . self::$messageId . '\">' . $message .'</p>\n\t\t\t\t<input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n\t\t\t</form>\n\t\t';\n\t}", "private function generateLogoutButtonHTML($message) {\n\t\treturn '\n\t\t\t<form method=\"post\" >\n\t\t\t\t<p id=\"' . self::$messageId . '\">' . $message .'</p>\n\t\t\t\t<input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n\t\t\t</form>\n\t\t';\n\t}", "private function generateLogoutButtonHTML($message) {\n\t\treturn '\n\t\t\t<form method=\"post\" >\n\t\t\t\t<p id=\"' . self::$messageId . '\">' . $message .'</p>\n\t\t\t\t<input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n\t\t\t</form>\n\t\t';\n\t}", "private function generateLogoutButtonHTML($message) {\n\t\treturn '\n\t\t\t<form method=\"post\" >\n\t\t\t\t<p id=\"' . self::$messageId . '\">' . $message .'</p>\n\t\t\t\t<input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n\t\t\t</form>\n\t\t';\n\t}", "public function logout() {\n $this->user_model->logout();\n $view = new Logout();\n $view->display();\n }", "public function getLogoutLink()\n {\n return 'index.do/logout';\n }", "public function logout()\r\n {\r\n $this->setTpl('logout.htm');\r\n $this->setControllerTitle('Bridge');\r\n $this->setLayout('loginLayout');\r\n $this->setCurrentControllerName('Logout');\r\n\r\n session_unset();\r\n session_destroy();\r\n header(\"Location: \".HTML_ROOT_PATH.\"login/\");\r\n }", "public function aggiungiTastoLogout() {\r\n $tasto_logout=array();\r\n $tasto_logout[]=array('testo' => 'Logout', 'link' => '?controller=registrazione&task=esci');\r\n $this->_side_button=array_merge($tasto_logout,$this->_side_button);\r\n }", "public function logoutAction() {\n Helpers_Session::getInstance()->sessDestroy();\n $redir = $this->getHelper('redirector');\n $redir->gotoUrl('');\n }", "public function logoutsuccessAction()\n {\n $pageTitle = 'Logged Out';\n $loginLinkStyle = 'current_page';\n\n require_once __DIR__ . '/../templates/logout.php';\n }", "public function logout()\n {\n $this->set( 'view', 'login' );\n\n return $this->show();\n }", "public function logout() {\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\t\n\t\t# create the data array we will use with the update method.... we can only update one field so array has only one entry\n\t\t$data = Array(\"token\" => $new_token);\n\t\t\n\t\t# do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token ='\".$this->user->token.\"'\");\n\t\t\n\t\t# delete the old token by setting it to a date in the past effectively logging them out\n\t\tsetcookie(\"token\",\"\", strtotime('-1 yeat'), '/');\n\t\t\n\t\t# send them back to the main index\n\t\tRouter::redirect(\"/\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//echo 'This is the logout page';\n }", "public function action_logout()\r\n {\r\n VNQ::logout();\r\n self::home();\r\n }", "public function getLogout()\n\t{\n\n\t\t/*Audits::add(Auth::user(), array(\n\t\t\t'name' => 'auth_logout',\n\t\t\t'title' => 'Cierre de Sesión',\n\t\t\t'description' => 'El usuario ' . Auth::user()->username . ' ha Cerrado Sesión'\n\t\t\t), 'DELETE');*/\n\n\t\tAuth::logout();\n\n\t\treturn self::go( 'login' );\n\t}", "public function logOut();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "function logouturl()\r\n {\r\n $loginout = url('console/start/logout?time=' . date('YmdHis') . getrandom(128)) . '?backurl=' . getbackurl();\r\n return $loginout;\r\n }", "public function doLogout($value='')\n {\n\n }", "public function logout()\n {\n $hash_val = $this->input->get_post('hashVal', TRUE);\n $extra_arr = array();\n $extra_arr['hashVal'] = trim($hash_val != \"\") ? $hash_val : \"\";\n $this->general->logInOutEntry($this->session->userdata(\"iAdminId\"), 'Admin', $extra_arr);\n $session_arr = $this->session->all_userdata();\n $session_key = is_array($session_arr) ? array_keys($session_arr) : array();\n $this->session->unset_userdata($session_key);\n $this->session->set_flashdata('success', $this->lang->line('GENERIC_YOU_HAVE_SUCCESSFULLY_LOGGED_OUT'));\n $this->session->set_flashdata('failure', \"\");\n\n $return_arr['success'] = 1;\n $return_arr['message'] = $err_msg;\n\n echo json_encode($return_arr);\n $this->skip_template_view();\n }", "public function actionLogout()\n\t{\n\t\t$uid = Yii::$app->session->get('uid');\n\t\tYii::$app->db\n\t\t\t->createCommand()\n\t\t\t->delete('at_logins', ['uid'=>$uid])\n\t\t\t->execute();\n\t\tYii::$app->session->remove('uid');\n\t\tYii::$app->getResponse()->getCookies()->remove('imswtf');\n\t\tYii::$app->user->logout(false);\n\n\t\t$this->layout = 'login';\n\t\treturn $this->render('logout');\n\t}", "public function logout(){\n\t\t/// Disconnet the connected user\n\t\tunset($_SESSION[\"user\"]);\n\t\t(new SiteController())->render(\"index\");\n\t}", "public function LogoutSuccessful(){\n\t\t\t$content[\"icon\"] = \"check\";\n\t\t\t$content[\"message\"] = \"Success: You have successfully logged out!\";\n\t\t\t$content[\"buttonText\"] = \"Go to Home\";\n\t\t\t$content[\"buttonLink\"] = base_url();\n\n\t\t\t$this->loadPageLayout(\"pages/InfoMessage\", $content);\n\t\t}", "public function logout() {\n\t\t$this->m_user->remove_pass();\n\t\t$this->data['login_success'] = 'You have been logged out. Thank you.';\n\t\t$this->load->view('login/v_login', $this->data);\n\t}", "public static function logout() {\r\n\t}", "public static function logout() {\n }", "function logout() {\n\n}", "private function doLogout()\n {\n // destroy the current session\n session_destroy();\n // redirect to the login page...\n header('Location: ' . $this->pico->getPageUrl($this->adminUrl));\n // don't continue to render template\n exit;\n }", "function logout ();", "public function logout(){\n if ($this->_page=='logout'){\n Utility::logOut();\n }\n }", "protected function runLogoutAction()\n {\n (new Authorization())->reset();\n header('Location: /index');\n exit;\n }", "public function logoutAction(){\n \t$this->_authService->clear();\n \treturn $this->_helper->redirector('index','public');\n }", "function showSubmitLogout()\n{\n $self = $_SERVER['PHP_SELF'];\n print\n \"<!-- start of form -->\\n\".\n \"<form method='post' action='$self'>\\n\".\n \" <div class='statementcontent' style='width:40%;float:right;'>\\n\".\n \" You are currently logged in to the database \".\n \" <input type='submit' name='submitLogout' value='Log out' />\\n\".\n \" </div>\\n\".\n \"</form>\\n\".\n \"<!-- end of form -->\\n\";\n \t\n}", "function logout()\n{\n\n}", "function logout(){\n }", "function logoutAction()\n {\n $pageTitle = 'Logout';\n session_destroy();\n require_once __DIR__ . '/../templates/logout.php';\n }", "public function logoutAction() {\n }", "public function logout()\n {\n // Implementation\n }", "public function logoutAction() {\n $this->_sess->logged = false;\n $this->_sess->loginProcessing = false;\n unset($this->_sess->account); \n $this->_helper->redirector->gotoUrl('/');\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->layout = 'multipage-template-offline';\n $this->redirect(Yii::app()->homeUrl);\n }", "public function getLogout()\n {\n //\n }", "public function run () {\n $session = Session::getInstance ();\n $user = $session->getUser ();\n\n if ($user == null) {\n $session->setMessage (\"Not currently logged in\", Session::MESSAGE_ERROR);\n header (\"Location: \" . BASE_URL);\n return;\n }\n\n $session->kill ();\n $user = $session->getUser ();\n\n $this->template->render (array (\n \"main_page\" => \"logout_tpl.php\",\n \"title\" => \"Logged out\",\n \"user\" => $user,\n ));\n }", "public function logoutAction() {\r\n $content = new Container(\"cbol\");\r\n $content->getDefaultManager()->getStorage()->clear();\r\n $this->layout('layout/login');\r\n $auth = new \\Zend\\Authentication\\AuthenticationService();\r\n $auth->getStorage()->clear();\r\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl() . '/login');\r\n }", "function logout() {\n\t\t$this->admin_logout();\n\t}", "public function logout()\n {\n session_destroy();\n ob_clean();\n header('Location: index.php?module=Users&action=LoggedOut');\n sugar_cleanup(true);\n }", "public function logout() {\n\t $this->loadModel('AuditTrail');\n\n\t $auditTrail['AuditTrail']['user_id'] = $this->Auth->user('id');\n\t $auditTrail['AuditTrail']['event_description'] = \"User with username \".$this->Auth->user('username').\" logged out\";\n\t $IP = $_SERVER['REMOTE_ADDR']; \n\t $MAC = exec('getmac'); \n\t $MAC = strtok($MAC, ' '); \n\t $auditTrail['AuditTrail']['ip'] = $IP;\n\t $auditTrail['AuditTrail']['mac'] = $MAC;\n\n\t $auditTrail['AuditTrail']['contents'] = \"Successfully logged out\";\n\t\t if( !$this->AuditTrail->save($auditTrail))\n\t\t {\n\t\t\t die('There was a problem trying to save the audit trail');\n\t\t }\n\n\n return $this->redirect($this->Auth->logout());\n }", "abstract public function Logout();", "function logout()\n\t{\n\t\t$page_data['title'] = \"Logout\";\n\n\t\t//log the user out\n\t\t$logout = $this->edge_controller->ion_auth->logout();\n\n\t\t//redirect them back to the page they came from\n\t\tredirect('edge_user', 'refresh');\n\t}", "public function logoutAction() {\n Zend_Auth::getInstance()->clearIdentity();\n\n // Redirect user to homepage\n return $this->_helper->redirector->gotoSimple('index','index',null);\n\n }", "function logout(){\n\t$action_details=array();\n\t$action_details['table_name']='users';\n\t$action_details['row_id']=$this->user_id;\n\t$action_details['operation']='Logged Out';\n\t$this->createActionLog($action_details);\n\t//$_SESSION['user_id'] = null;\n\treturn true;\n}", "public function logout () { \n $this->destroySession();\n return $this->buildResponse(\"LOGOUT\"); \n }", "public function logoutAction() {\n $this->AuthenticationService->doLogout();\n header('Location: /' . $this->Configuration->get(\"www.uri\"));\n die;\n }", "public function indexAction() {\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\tInternals_Auth::Logout();\n\t\tInternals_Message::info(\"Logout realizado com sucesso!\");\n\t\t$this->_redirect(\"login\");\n\t}", "public function logout() {}", "function logout(){\n unset($_SESSION[\"bxtreme_id\"]);\n unset($_SESSION[\"bxtreme_user\"]);\n unset($_SESSION[\"bxtreme_pass\"]);\n session_destroy();\n self::$loggedIn = false;\n $this->guest();\n Gui::setBody(\"\n <h1>Have a nice day!</h1>\n <small>-- \".SITE_NAME.\"</small>\");\n }", "public function logout()\n\t{\n\t\t// This is handled by the JS API, and cannot be done server side\n\t\t// (at least, it cannot be done server side, given our authentication workflow\n\t\t// and the current limitations of the PHP SDK).\n\t}", "public function logout (){\n\t\t\t\treturn view('logout');\n\t\t\t}", "public function getLogoutLink()\n {\n $isRestricted = $this->getAuth()->isRestricted();\n\n $logoutPage = ($isRestricted) ? 'default' : 'self';\n\n return $this->links->writeLinkTo(\n $logoutPage,\n array(\n 'logout' => 1\n )\n );\n }", "function execute_logout()\n{\n\tunset($_SESSION['user']);\n\texecute_views_lists_enabled_components();\n}", "function logoutForm(){\n\t global $session;\n\t\t$loggedForm = \"<form id='form1' method='post' action='userActions.php'>\n\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<label for='username'>Username: \". $session->username .\"</label>\n\t\t\t\t\t\t<br><br><br><input id='password' type='submit' name='logoutForm' value='Log Out' />\n\t\t\t\t\t\t</fieldset>\n\t </form>\";\n\t\treturn $loggedForm;\n }", "public function userLogOut()\r\n\t{\r\n\t\t$this->session->sess_destroy(); // Session destroy\r\n\r\n\t\t// redirect to login page\t\t\r\n\t\t$data['log_out'] = \"You've signed out. See you again soon!\"; // Capitalize the first letter\t\r\n\t\t$this->load->view('backend/template/be_header', $data);\t\t\t\t\r\n\t\t$this->load->view('backend/pages/login', $data);\r\n\t\t$this->load->view('backend/template/be_footer', $data);\r\n\t\t\r\n\t}" ]
[ "0.7665925", "0.7651189", "0.7504195", "0.73784447", "0.72560287", "0.720367", "0.7159559", "0.71042025", "0.6990242", "0.69185644", "0.6911891", "0.69067585", "0.69036573", "0.6892284", "0.68685985", "0.68424845", "0.6817147", "0.6793651", "0.67772084", "0.67750394", "0.67703015", "0.6740874", "0.6725066", "0.66934896", "0.66856176", "0.6682431", "0.6678915", "0.66605294", "0.66488373", "0.6642825", "0.6631886", "0.66316324", "0.6626178", "0.6611255", "0.6608694", "0.66068596", "0.66068596", "0.66068596", "0.6594145", "0.6593941", "0.6589047", "0.65852654", "0.65629435", "0.6550435", "0.65337056", "0.6529191", "0.65169525", "0.65075195", "0.6500168", "0.64956546", "0.64956546", "0.64956546", "0.64956546", "0.64956546", "0.64956546", "0.64956546", "0.6486238", "0.64825535", "0.64815277", "0.6471508", "0.64617974", "0.6459467", "0.64582837", "0.64547044", "0.64396095", "0.64366114", "0.64191866", "0.6410049", "0.6407382", "0.6392317", "0.63917434", "0.63785475", "0.63774145", "0.6376793", "0.6376376", "0.63669825", "0.6366897", "0.63638794", "0.6361365", "0.63598603", "0.6342769", "0.6333019", "0.63287866", "0.6328295", "0.6327418", "0.6327222", "0.63241893", "0.63101137", "0.6304293", "0.6304096", "0.62956285", "0.6292478", "0.6288649", "0.62871623", "0.6276039", "0.62741476", "0.6273033", "0.62695336", "0.6267316", "0.6259708" ]
0.7924329
0
Get the value of operationVirements
Получить значение операции Virements
public function getOperationVirements() { return $this->operationVirements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResult() {\n return $this->lastOperation;\n }", "public function getOperatorValue();", "public function getOperations(){\r\n return $this->operations;\r\n }", "public function operations() {\r\n return $this->operations;\r\n }", "public function getDataOperacao() {\n return $this->data_operacao;\n }", "public function getResult()\n {\n if (isset($this->values['result'])) {\n return $this->values['result'];\n }\n }", "public function getValue()\n {\n return $this->values;\n }", "public function getOperation()\n\t{\n\t}", "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "public function getResult() {\n\t\treturn $this->prepareValue($this->result);\n\t}", "function valor_opcion($opcion_id) {\n $valor_opcion = $this->Pcrn->campo_id('sis_opcion', $opcion_id, 'valor');\n return $valor_opcion;\n }", "public function get_operation()\n {\n return $this->_operation;\n }", "function getOperations() {\n return $this->operations;\n }", "public function getOperations() {\n return $this->operations;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getResult(){\n\t\t\treturn $this->result;\n\t\t}", "public function getOperation() {\n return $this->operation;\n }", "public function getV() {\n $kv = $this->getKV();\n return $kv[1];\n }", "public function getResult(){\n $val = $this->result;\n $this->result = array();\n return $val;\n }", "public function getOperationParameter()\n {\n return $this->parameters;\n }", "public function getVItem(){\n $q = \"EXEC ss_Par_Cont_Int tabela_docsitens\";\n $r = $this->execColQuery($q);\n return $r['contador']; \n }", "public function getOperations()\n {\n return $this->operations;\n }", "public function getOperations()\n {\n return $this->operations;\n }", "public function getResult(){\r\n return $this->result;\r\n }", "public function get_operations(){\n return $this->find_operations();\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getResult() {\n $val = $this->result;\n $this->result = array();\n return $val;\n }", "public function getValores()\n {\n return $this->valores;\n }", "public function getResult(){\n return $this->result;\n }", "public function getOpVariant()\n {\n return isset($this->OpVariant) ? $this->OpVariant : null;\n }", "public function getValue()\n {\n return [\n 'range' => \"(cast({$this->stepSize} * cast({$this->column}/{$this->stepSize} as int) as string) || ' - ' || \n\t\t\t\tcast({$this->stepSize} * cast({$this->column}/{$this->stepSize} as int) + {$this->stepSize} - 1 as string))\",\n 'minVal' => \"{$this->stepSize} * cast({$this->column}/{$this->stepSize} as int)\",\n ];\n }", "public function getValue()\n {\n $values = array(\n 'equal' => $this->_equal,\n 'round' => $this->_round,\n 'reactive' => $this->_reactive,\n );\n \n return $values;\n }", "public function getResult()\n\t\t{\n\t\t\treturn $this->result;\n\t\t}", "public function getResult(){\n return $this->output['result'];\n }", "function getResult(){\n\t\t\treturn $this->data;\n\t\t}", "public function getValue(){\n\t\treturn $this->value;\n\t}", "public function getResult()\n\t{\n\t\treturn $this->result;\n\t}", "public function getResult()\n\t{\n\t\treturn $this->result;\n\t}", "public function getResult()\n\t{\n\t\treturn $this->result;\n\t}", "public function getResult()\n\t{\n\t\treturn $this->result;\n\t}", "public function getResult()\r\n {\r\n return $this->result;\r\n }", "public function getResult()\r\n {\r\n return $this->result;\r\n }", "public function getResult()\n {\n return $this->trans->result;\n }", "public function getResult() {\r\n\t\treturn $this->result;\r\n\t}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getOperationParams()\n {\n return isset($this->operation_params) ? $this->operation_params : null;\n }", "public function getOperationParams()\n {\n return isset($this->operation_params) ? $this->operation_params : null;\n }", "public function getResult() {\r\n return $this->result;\r\n }", "public function getValue() {\n\n\t \t\t return $this->value;\n\t }", "public function getResult(){\n\t\treturn $this->_result;\n\t\t}", "public function getValue(){\n\t\t\t# Return the value\n\t\t\treturn $this->value;\n\t\t}", "public function getResult(){\n\t\ttry{\n\t\t\tself::$result = $this->unitModel->result($this->setValue(), $this->getFromConvertValue(), $this->getToConvertValue(), $this->unitModel->getUnits());\n\t\t}catch(InvalidArgumentException $e){\n\t\t\tself::$message = \"Enter numeric value\";\n\t\t}\n\t\treturn self::$result;\n\t}", "public function getResult(){\n\t\ttry{\n\t\t\tself::$result = $this->unitModel->result($this->setValue(), $this->getFromConvertValue(), $this->getToConvertValue(), $this->unitModel->getUnits());\n\t\t}catch(InvalidArgumentException $e){\n\t\t\tself::$message = \"Enter numeric value\";\n\t\t}\n\t\treturn self::$result;\n\t}", "public function getResult() {\n\t\treturn $this->result;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->data['value'];\n\t}", "public function getResult() {\n return $this->result;\n }" ]
[ "0.6317184", "0.5993497", "0.596361", "0.59287107", "0.5884858", "0.5871906", "0.5863362", "0.5845105", "0.58144933", "0.58036083", "0.5767209", "0.57251847", "0.5725029", "0.5705286", "0.56889033", "0.56889033", "0.56889033", "0.56889033", "0.56889033", "0.5688724", "0.563802", "0.5630577", "0.56198555", "0.5611875", "0.56021684", "0.5596896", "0.5584011", "0.5573614", "0.5569764", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.5563317", "0.55523574", "0.5552143", "0.55519676", "0.5540311", "0.5539909", "0.55393094", "0.55286676", "0.55232495", "0.55016917", "0.54973835", "0.54891217", "0.54891217", "0.54891217", "0.54891217", "0.54813707", "0.54813707", "0.5471914", "0.5468225", "0.54680866", "0.54680866", "0.54680866", "0.54680866", "0.54680866", "0.54673797", "0.54673797", "0.5461025", "0.5460851", "0.54591507", "0.5457519", "0.544675", "0.544675", "0.5445703", "0.5440858", "0.5438281" ]
0.72670555
0
Set the value of operationVirements
Установите значение операции Virements
public function setOperationVirements($operationVirements) { $this->operationVirements = $operationVirements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_operation($value)\n {\n $this->_operation = $value;\n }", "public function setOperations(?array $value): void {\n $this->getBackingStore()->set('operations', $value);\n }", "public function getOperationVirements()\n {\n return $this->operationVirements;\n }", "public function set_operations($ops) {\r\n $this->operations = $ops;\r\n }", "public function setOperations($operations)\n {\n $this->operations = $operations;\n }", "public function setOperations($val)\n {\n $this->_propDict[\"operations\"] = $val;\n return $this;\n }", "public function setValues();", "public function setOper(?string $value): void {\n $this->getBackingStore()->set('oper', $value);\n }", "function set() { return $this->op('$set', func_get_args()); }", "public function actPeriodoVacacional(Request $request){\n $vendedor = Vendedor::findOrFail($request->id);\n $vendedor->ini_vacaciones = $request->ini_vacaciones;\n $vendedor->fin_vacaciones = $request->fin_vacaciones;\n $vendedor->save();\n }", "public function setOperation(Operation $operation)\n {\n $this->operation = $operation;\n }", "public function setOperation(string $operation): void\n {\n $this->operation = in_array($operation, self::OPERATIONS) ? $operation : 'addition';\n }", "public function setDataOperacao($data_operacao) {\n $this->data_operacao = $data_operacao;\n }", "public function setAssignmentApprovals(?array $value): void {\n $this->getBackingStore()->set('assignmentApprovals', $value);\n }", "function p_update_registro_vector($var_request){\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$error = 0;\n\t\t\t$arr_parametros \t\t\t= $var_request['val_parametro'];\n\t\t\t$arr_operacion_parametro\t= $var_request['operacion_parametro'];\n\t\t\t\n\t\t\tif(count($arr_parametros)<1)return false; // si esta vacio el vector frena\n\t\t\t\n\t\t\t$arr_keys_parametros = array_keys($arr_parametros);\n\t\t\tfor($i=0;$i<count($arr_keys_parametros);$i++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$cod_parametro \t= \t$arr_keys_parametros[$i];\n\t\t\t\t$val_parametro\t=\t$arr_parametros[$cod_parametro];\n\t\t\t\t\n\t\t\t\t$cod_tipo_operacion_parametro = $arr_operacion_parametro[$cod_parametro];\t\t\t\t\n\t\t\t\tif($cod_tipo_operacion_parametro <= 0)$cod_tipo_operacion_parametro = 'NULL';\n\t\t\t\t\n\t\t\t\t$query = \"update parametro_sistema set \n\t\t\t\t\t\t\tval_parametro \t\t\t\t\t= '$val_parametro'\t,\n\t\t\t\t\t\t\tcod_tipo_operacion_parametro \t= $cod_tipo_operacion_parametro\n\t\t\t\t\t\t\twhere cod_parametro \t\t\t= $cod_parametro\t\";\n\n\t\t\t\t\n\t\t\t\tif(!$db->consultar($query))$error++;\n\t\t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif($error==0)return true;\n\t\t\n\t\t}", "public function escolherSetorVida()\n {\n $profissional = $this->input->get(\"p\");\n\n if($profissional != 1)\n {\n redirect('jogo/consultaVirtual');\n }\n\n $dados = $this->getDadosTelaInicial();\n \n // carrega o template\n $this->template->view(\"automatico_escolher_setor_vida\", array(\n \"title\" => \"Auto Consulta\",\n \"verticalTabs\" => true,\n \"jogosConsultaVirtual\" => $dados['jogosConsultaVirtual'],\n \"jogosAutoConsulta\" => $dados['jogosAutoConsulta'],\n \"setoresVida\" => $dados['setoresVida'],\n \"profissional\" => $profissional,\n \"codUsuarioCombinacao\" => $dados['codUsuarioCombinacao'],\n \"menuLateral\" => false\n ));\n }", "public function setOperatorValue($value);", "public function execute(): void\n {\n parent::execute();\n $index = $this->getOperands()['index'];\n $value = Normalizer::getPrimitiveValue($this->popFromOperandStack());\n\n $this->setLocalStorage(\n $index,\n $value\n );\n }", "public function updateValues();", "public function executeValueModifierDataProvider() {}", "public function update_tabla_princ ($valores=NULL){\n return \"\n UPDATE ave_comparacion_aerolineas\n SET id_sis_provincia = $valores[1],\n fecha_inicio = $valores[2],\n fecha_fin = $valores[3],\n observaciones = '$valores[4]'\n WHERE id_ave_comparacion_aerolineas = $valores[0]\n ; \n \";\n }", "public function setOperation($operation = self::OPERATION_AND) {\n if ($operation != self::OPERATION_AND &&\n $operation != self::OPERATION_OR) {\n $this->operation = self::OPERATION_AND;\n } else {\n $this->operation = $operation;\n }\n }", "public function setOperations(array $operations): self\n {\n $this->operations = $operations;\n\n return $this;\n }", "public function setOperations($operations)\n {\n $this->operations = $operations;\n\n return $this;\n }", "public function setValue( $valor )\n\t{\n\t\t$this->_value[] = $valor;\t\t\n\t}", "function setExecutionOrder($id,&$executionOrder)\r\n {\r\n $debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__;\r\n foreach($executionOrder as $tcVersionID => $execOrder)\r\n {\r\n $execOrder=intval($execOrder);\r\n $sql=\"/* $debugMsg */ UPDATE \".$this->db->get_table('testplan_tcversions').\" \" .\r\n \"SET node_order={$execOrder} \" .\r\n \"WHERE testplan_id={$id} \" .\r\n \"AND tcversion_id={$tcVersionID}\";\r\n $result = $this->db->exec_query($sql);\r\n }\r\n }", "public function setObs($p_obs){\r\n\t$this->obs=$p_obs;\r\n}", "public function setSetEduPolicies(?Enablement $value): void {\n $this->getBackingStore()->set('setEduPolicies', $value);\n }", "public function setOperation($operationName)\n\t{\n\t\t$this->operationName = $operationName;\n\t}", "public function setQueryAlterationResponse(?AlterationResponse $value): void {\n $this->getBackingStore()->set('queryAlterationResponse', $value);\n }", "protected function updateSelected($operation) {\n\t\tif(isset($_POST['actionIds']) && is_array($_POST['actionIds'])) {\n\t\t\tforeach(CActiveRecord::model('Actions')->findAllByPk($_POST['actionIds']) as $action) {\n\t\t\t\tif($action === null)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t$inGroup = false;\n\t\t\t\tif(ctype_digit($action->assignedTo))\t// we have an action assigned to a group? Then check if we are in the group\n\t\t\t\t\t$inGroup = Groups::inGroup(Yii::app()->user->id, $action->assignedTo);\n\t\t\t\t\n\t\t\t\tif(Yii::app()->user->getName()==$action->assignedTo || $action->assignedTo=='Anyone' || $action->assignedTo=='' || $inGroup || Yii::app()->user->checkAccess('AdminIndex')) { // make sure current user can edit this action\n\t\t\t\t\t\n\t\t\t\t\tif($operation === 'complete')\n\t\t\t\t\t\t$action->complete();\t\t// $this->completeNotification('admin',$action->id);\n\t\t\t\t\telseif($operation === 'uncomplete')\n\t\t\t\t\t\t$action->uncomplete();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function setOperationDate($operationDate)\n {\n $this->operationDate = (string)$operationDate;\n }", "function setValores($proveedor,$fecha_pedido,$dir_entrega,$orden_produccion,$fecha_requerida,$estado,$n_pedido,$fecha_desde,$fecha_hasta,$fecha_entrega,$estado_op,$id_sede,$paginacion) {\n\t\t$this->proveedor = $proveedor;\n\t\t$this->fecha_pedido = $fecha_pedido;\n\t\t$this->dir_entrega = $dir_entrega;\n\t\t$this->orden_produccion = $orden_produccion;\n\t\t$this->fecha_requerida = $fecha_requerida;\n\t\t$this->estado = $estado;\n\t\t$this->n_pedido = $n_pedido;\n\t\t$this->fecha_desde = $fecha_desde;\n\t\t$this->fecha_hasta = $fecha_hasta;\n\t\t$this->fecha_entrega = $fecha_entrega;\n\t\t$this->estado_op = $estado_op;\n\t\t$this->id_sede = $id_sede;\n\t\t$this->paginacion = $paginacion;\n\t\t\t\t\n\t\t$this->prepararConsulta();\n\t}", "function inviaPerApprovazione(){\n\t\t$values['STATO']=2;\n\t\t$pk['EQUERY_INT']=$this->eq_int;\n\t\t$pk[$this->pk_field]=$this->pk_value;\n\t\t$sql=new query($this->conn);\n\t\t$sql->update($values, $this->service.\"_EQ\", $pk);\n\t\t//$this->conn->commit();\n\t}", "function setValues($optionValues);", "public function updateAndDeleteExecutionVariables() {\n $ei = self::$es->getExecutions(new ExecutionRequest())->execution_1;\n\n $ev = new VariableRequest();\n $ev->setValue('testValue')->setType('String');\n self::$es->putExecutionVariable($ei->getId(),'testVariable', $ev);\n\n $ev = new VariableRequest();\n $ev->setValue('testValue2')->setType('String');\n self::$es->putExecutionVariable($ei->getId(), 'testVariable2', $ev);\n\n $ev = new VariableRequest();\n $pm = array();\n $pm['testVariable'] = new VariableRequest();\n $pm['testVariable2'] = new VariableRequest();\n $pm['testVariable']->setValue('newTestValue');\n $pm['testVariable2']->setValue('newTestValue2');\n $ev->setModifications($pm);\n\n self::$es->updateOrDeleteExecutionVariables($ei->getId(), $ev);\n $this->assertEquals('newTestValue', self::$es->getExecutionVariable($ei->getId(), 'testVariable')->getValue());\n $this->assertEquals('newTestValue2', self::$es->getExecutionVariable($ei->getId(), 'testVariable2')->getValue());\n\n $pvc = count(get_object_vars(self::$es->getExecutionVariables($ei->getId())));\n\n $ev = new VariableRequest();\n $pm = array('testVariable', 'testVariable2');\n $ev->setDeletions($pm);\n self::$es->updateOrDeleteExecutionVariables($ei->getId(), $ev);\n\n $this->assertEquals($pvc - 2, count(get_object_vars(self::$es->getExecutionVariables($ei->getId()))));\n\n\n }", "public function setVat($value);", "function __set($p, $v) {\n\t\t$this->cell($p)->set($v);\n\t}", "public function setVoucher($attributes)\n {\n \n if(isset($attributes['MaxMb']))\n {\n $attributes['MaxOctets'] = bigintval($attributes['MaxMb'] * 1024 * 1024);\n unset($attributes['MaxMb']);\n }\n \n if(isset($attributes['MaxTime']))\n {\n $attributes['MaxSeconds'] = $attributes['MaxTime'] * 60;\n unset($attributes['MaxTime']);\n }\n \n $attributes['VoucherType'] = 0;\n if($attributes['InitVoucher'])\n {\n $attributes['VoucherType'] = 1 | $attributes['VoucherType'];\n }\n \n if($attributes['TopupVoucher'])\n {\n $attributes['VoucherType'] = 2 | $attributes['VoucherType'];\n\n } \n\n $fields = array (\n 'VoucherName' => array ( 'value' => $attributes['VoucherName'], 'key' => true),\n 'VoucherLabel' => array ( 'value' => $attributes['VoucherLabel']), \n 'VoucherPrice' => array ( 'value' => $attributes['VoucherPrice'] + 0),\n 'VoucherGroup' => array ( 'value' => $attributes['VoucherGroup']),\n 'MaxOctets' => array ( 'value' => @ $attributes['MaxOctets']),\n 'MaxSeconds' => array ( 'value' => @ $attributes['MaxSeconds']),\n 'Description' => array ( 'value' => @ $attributes['Description']),\n 'VoucherType' => array ( 'value' => $attributes['VoucherType'])\n );\n \n $result = $this->db->replace('vouchers', $fields);\n if (PEAR::isError($result))\n {\n ErrorHandling::fatal_db_error(\n T_('Adding Voucher query failed: '), $result);\n }\n \n AdminLog::getInstance()->log(\"Voucher \".$attributes['VoucherName'].\" updated settings\");\n \n return $result;\n\n }", "public function testSetSoldeQuantite() {\n\n $obj = new VmpMouvements();\n\n $obj->setSoldeQuantite(10.092018);\n $this->assertEquals(10.092018, $obj->getSoldeQuantite());\n }", "public function initValves()\n {\n $this->valves[] = new PersistenceContainerValve();\n }", "public function update_tabla_princ ($valores=NULL){\n return \"\n UPDATE adm_audit_stock_limpieza_detalle\n SET bodega = '$valores[1]',\n detalle = '$valores[2]',\n observaciones_anterior = '$valores[3]'\n WHERE id_adm_audit_stock_limpieza_detalle = $valores[0]\n ;\n \";\n }", "public function __set($key, $val)\n\t{\n\t\t\n\t\tif($key==\"table\")\n\t\t\t$this->table=$val;\n\t\t\t\n\t\telse if($key==\"sql\")\n\t\t\t$this->sql=$val;\n\t\t\t\n\t\telse if($key==\"field\")\n\t\t{\n\t\t\tif(is_array($val))\n\t\t\t\t$this->data[\"field\"]=$val;\n\t\t\telse\n\t\t\t\t$this->logger->debug(\"Operation Field is not defined properly.\");\n\t\t}\n\t\telse if($key==\"filter\")\n\t\t{\n\t\t\tif(is_array($val))\n\t\t\t\t$this->data[\"filter\"]=$val;\n\t\t\telse\n\t\t\t\t$this->logger->debug(\"Operation Filter is not defined properly.\");\n\t\t}\n\t\telse if($key==\"data\")\n\t\t{\n\t\t\tif(is_array($val))\n\t\t\t\t$this->data[\"data\"]=$val;\n\t\t\telse\n\t\t\t\t$this->logger->debug(\"Operation Data is not defined properly.\");\n\t\t}\n\t\telse\n\t\t\t$this->data[strtolower($key)]=$val;\n\t}", "function setItemOp($op) {\r\r\n $this->_itemOp = $op;\r\r\n }", "public function set($arrayV = array(), $seguro = true) {\n if (is_array($arrayV) && count($arrayV)) {\n $arrayVC = '';\n $i = 0;\n foreach ($arrayV as $chave => $valor) {\n if ($valor === null) {\n if ($i == 0) {\n $arrayVC = $chave . ' = NULL';\n } else {\n $arrayVC .= ', ' . $chave . ' = NULL';\n }\n } else {\n $valor = ($seguro) ? $this->anti_injection_valor($valor) : $valor;//noQuotes($valor);\n if ($i == 0) {\n $arrayVC = $chave . ' = \\'' . $valor . \"'\";\n } else {\n $arrayVC .= ', ' . $chave . ' = \\'' . $valor . \"'\";\n }\n }\n $i++;\n }\n $this->_set[] = $arrayVC;\n }\n return $this;\n }", "public function setFromLast()\n {\n $ops = new Ops($this->dbase);\n $num = $ops->last();\n $aOPs = $this->setOPs();\n //localiza a OP no array\n $offset = 0;\n if ($num > 0) {\n $offset = array_search($num, array_keys($aOPs)) + 1;\n } \n //$length = count($aOPs) - $offset - 1;\n // trunca o array\n $result = array_slice($aOPs, $offset, null, true);\n //salva \n $this->insertOPs($result);\n }", "public function testUpdateProductVariationOption()\n {\n }", "public function setvalues($data)\n {\n if (is_array($data)) {\n $this->values = $data;\n }\n }", "public function setValues($values)\r\n\t{\r\n\t\t$this->values = $values;\r\n\t}", "private function emitVectorElement($value)\n {\n $this->currentContext->result->pushBack($value);\n }", "public function changeStatut(){\n\n $vehicule = Vehicules::find(request('vehicule')['id']);\n\n $vehicule->id_statut = request('vehicule')['id_statut'];\n\n $vehicule->save();\n }", "public function process(\n GetOperationsForPvWriteOffResponse $resp,\n $periodValue,\n $periodCode\n ) {\n $opers = $resp->getCollection();\n /* Loop all operations and compute values for PVWrite Off operations */\n $changes = array();\n foreach($opers as $item) {\n $debitAccId = $item->getData(GetOperationsForPvWriteOffResponse::TRN_DEBIT_ACC_ID);\n $creditAccId = $item->getData(GetOperationsForPvWriteOffResponse::TRN_CREDIT_ACC_ID);\n $value = $item->getData(GetOperationsForPvWriteOffResponse::TRN_VALUE);\n if(isset($changes[ $debitAccId ])) {\n $changes[ $debitAccId ] -= $value;\n } else {\n $changes[ $debitAccId ] = -$value;\n }\n if(isset($changes[ $creditAccId ])) {\n $changes[ $creditAccId ] += $value;\n } else {\n $changes[ $creditAccId ] = $value;\n }\n }\n /* Create PvWriteOff operations with the last second of the period and update NOW balances. */\n $dateApplied = $this->_helperPeriod->calcPeriodTsTo($periodValue, $periodCode);\n $accountantAccId = $this->_helperAccount->getAccountantAccIdByAssetCode(Config::ASSET_PV);\n /** @var $callOp Praxigento_Bonus_Service_Operations_Call */\n $callOp = Config::get()->serviceOperations();\n foreach($changes as $accId => $val) {\n /* skip Store itself account (it is counterparty of all other transactions) */\n if($accId == $accountantAccId) {\n continue;\n }\n /** @var $reqOp Praxigento_Bonus_Service_Operations_Request_CreateOperationPvWriteOff */\n $reqOp = $callOp->requestCreateOperationPvWriteOff();\n $reqOp->setCustomerAccountId($accId);\n $reqOp->setValue($val);\n $reqOp->setDateApplied($dateApplied);\n $respOp = $callOp->createOperationPvWriteOff($reqOp);\n if($respOp->isSucceed()) {\n continue;\n } else {\n $errCode = $respOp->getErrorCode();\n Mage::throwException(\"Cannot create PV Write Off operation for customer acc #$accId \"\n . \"(value=$val, date=$dateApplied). Error code: $errCode\");\n }\n }\n return;\n }", "public function setAdjustments($adjustments)\r\n {\r\n $this->_adjustments = $adjustments;\r\n }", "public function actualizar_estado_cartera(){\n // Actualizar las cartera con fechas inferior a hoy y con estado distinto a Pagada\n TesoPlanPagosEstudiante::where('fecha_vencimiento','<', date('Y-m-d'))\n ->where('estado','<>', 'Pagada')\n ->update(['estado' => 'Vencida']);\n }", "public function setStatus(?ConnectionOperationStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "abstract public function setValorTransacao($valor);", "function setValues(array $options) {\n\t\t$this->_options = $options;\n\t}", "function change($clmn,$val,$op) {\n\t\tswitch($op) {\n\t\t\tcase 'set':\n\t\t\t\t$Sql->q('UPDATE postavy SET '.$clmn.' = '.$penize.' WHERE login = '.$this->id);\n\t\t\t\t$this->penize = penize;\n\t\t\t\tbreak;\n\t\t\tcase 'plus':\n\t\t\t\t$Sql->q('UPDATE postavy SET '.$clmn.' = '.$clmn.'+'.$penize.' WHERE login = '.$this->id);\n\t\t\t\t$this->penize += penize;\n\t\t\t\tbreak;\n\t\t\tcase 'minus':\n\t\t\t\t$Sql->q('UPDATE postavy SET '.$clmn.' = '.$clmn.'-'.$penize.' WHERE login = '.$this->id);\n\t\t\t\t$this->penize -= penize;\n\t\t\t\tbreak;\n\t\t}\n\t}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->v75_sequencial = ($this->v75_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v75_sequencial\"]:$this->v75_sequencial);\n $this->v75_seqprocforo = ($this->v75_seqprocforo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v75_seqprocforo\"]:$this->v75_seqprocforo);\n $this->v75_numcgm = ($this->v75_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v75_numcgm\"]:$this->v75_numcgm);\n }else{\n $this->v75_sequencial = ($this->v75_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v75_sequencial\"]:$this->v75_sequencial);\n }\n }", "public function setProductVersionOperator($val)\n {\n $this->_propDict[\"productVersionOperator\"] = $val;\n return $this;\n }", "public function set()\n\t\t{\n\t\t\t// in order to achieve compatiblity with Konsolidates set method in strict mode, the params are read 'manually'\n \t\t\t$aParam = func_get_args();\n\t\t\t$mVariable = array_shift( $aParam );\n\t\t\t$mValue = (bool) count( $aParam ) ? array_shift( $aParam ) : null;\n\t\t\t$bAppend = (bool) count( $aParam ) ? array_shift( $aParam ) : false;\n\n\t\t\tif ( $bAppend === true )\n\t\t\t\t$this->append( $mVariable, $mValue );\n\t\t\telse\n\t\t\t\tparent::set( $mVariable, $mValue );\n\t\t}", "public function update_tabla_sec ($valores=NULL){\n return \"\n UPDATE ave_comparacion_aerolineas_opc\n SET aerolinea = '$valores[1]',\n comentario = '$valores[2]',\n costo = $valores[3]\n WHERE id_ave_comparacion_aerolineas_opc = $valores[0]\n ; \n \";\n }", "public function mset($keyValue_arr, $duration = 0);", "public function setExecutionSequence(?int $value): void {\n $this->getBackingStore()->set('executionSequence', $value);\n }", "public function setussercurrent($valor){\n $this->data = $valor;\n }", "public function editFinancialParameter() {\n $this->Session->write(\"financialParameterEditing\", true);\n\n $this->layout = \"\";\n $index = $this->request->data['financialParameterIndex'];\n $companies = $this->Session->read('SessionFinancialParameter');\n $company = $companies[$index];\n $this->set(\"parameter\", $company);\n }", "public function setProductContent($vectorContent){\n $this->productsContent = $vectorContent;\n $contador = 0;\n $contadorProducto = 1;\n $contadorDatos = 0;\n $contadorCategoria = 3;\n foreach($this->productsContent as $productos){\n //echo ($productos);\n $datos = $this->getTitleImagesPrice($productos,$contador);\n if ($contador == 0){\n $this->productos = array(\n 'id' => array(),\n 'idCategoria' => array(),\n 'titulo' => array(),\n 'imagenes' => array(),\n 'precio' => array(),\n 'url' => array(),\n 'shortDesc' => array(),\n 'desc' => array()\n );\n }\n //var_dump($datos);\n foreach($datos['titulos'] as $titulo){\n array_push($this->productos[\"id\"],$contadorProducto);\n array_push($this->productos[\"idCategoria\"],$contadorCategoria);\n array_push($this->productos[\"titulo\"],$titulo);\n array_push($this->productos[\"precio\"],$datos['precios'][$contadorDatos]);\n array_push($this->productos[\"url\"],$datos['urls'][$contadorDatos]);\n array_push($this->productos[\"shortDesc\"],$datos['shortDesc'][$contadorDatos]);\n $contadorDatos++;\n $contadorProducto++;\n //var_dump($this->productos[\"titulo\"]);\n }\n $imagenCategoria = $this->getImagenCategoria($productos);\n array_push($this->imagenesCategorias,$imagenCategoria);\n $contadorDatos = 0;\n $contador++;\n $contadorCategoria++;\n }\n //var_dump($this->productos);\n }", "public function setPriceModification($value)\n {\n if ($this->exists()) {\n $manyMany = DataObject::getSchema()->manyManyComponent(self::class, 'Reservations');\n $table = $manyMany['join'];\n $where = $this->getSourceQueryParam('Foreign.Filter');\n $where[$manyMany['parentField']] = $this->ID;\n SQLUpdate::create(\n \"`{$table}`\",\n array('`PriceModification`' => $value),\n $where\n )->execute();\n }\n }", "function set (&$values)\n {\n $this->_source->set ($values);\n }", "public function addEquipements(array $equipements) {\r\n foreach ($equipements as $equipement) {\r\n $this->addEquipement($equipement);\r\n }\r\n }", "function stornaPerIntegrazione(){\n\t\t$values['STATO']=0;\n\t\t$pk['EQUERY_INT']=$this->eq_int;\n\t\t$pk[$this->pk_field]=$this->pk_value;\n\t\t$sql=new query($this->conn);\n\t\t$sql->update($values, $this->service.\"_EQ\", $pk);\n\t\t\n\t\t//setto IN_EMENDAMENTO_APPROVAZIONE a 0 e rendi modificabile (sia per istruttoria negativa che per parere sospensivo)\n\t\t$values_1['IN_EMENDAMENTO_APPROVAZIONE']=0;\n\t\t//$pk['EQUERY_INT']=$this->eq_int;\n\t\t$pk_1[$this->pk_field]=$this->pk_value;\n\t\t$sql_1=new query($this->conn);\n\t\t$sql_1->update($values_1, $this->service.\"_REGISTRAZIONE\", $pk_1);\n\n\t}", "public function setNewValues($values)\n {\n foreach($values as $v => $value)\n {\n $this->$v = $value;\n }\n }", "function setEsOtrosEgresos(){\n\t\t//$xO->es_estadistico(\"0\");//Si es estadistico, operacion base estadisticos.- Obsoleto pero usado.\n\t\t//Agregar clase efectivo\n\t\t//Cambiar el recibo que afecta\n\t\t$this->getObj()->recibo_que_afecta(RECIBOS_TIPO_OEGRESOS);\n\t\t$this->getObj()->query()->update()->save($this->getObj()->idoperaciones_tipos()->v());\n\t\t$this->setCleanCache();\n\t}", "public function set($k=null,$v){\n if($this->workingDataType==null || $k==null)\n return;\n\n switch($this->workingDataType){\n case 'PUT':\n $this->putData[$k]=$v;\n break;\n case 'DELETE':\n $this->deleteData[$k]=$v;\n break;\n case 'POST':\n $_POST[$k]=$v;\n break;\n case 'GET':\n $_GET[$k]=$v;\n break;\n }//switch\n }", "function set_arrConditions($value){\n\t\t$this->arrConditions = $value;\n\t}", "public function update_tabla_princ ($valores=NULL){\n return \"\n UPDATE ven_store_check\n SET id_ven_cliente_sucursales = $valores[1],\n vstore_observaciones = '$valores[2]',\n exhibiendo_mercaderia = '$valores[3]',\n mercaderia_lugar = '$valores[4]',\n buena_cantidad_productos = '$valores[5]',\n poner_punto_venta = $valores[6],\n poner_banner = $valores[7]\n WHERE id_ven_store_check = $valores[0]\n ;\n \";\n }", "private function setNewOrderState($orderId, $operation = null)\n {\n $sql = \"SELECT COUNT((`quantity` - `delivered` - `cancelled`)) AS 'itemsLeft' \"\n . 'FROM `s_order_details` '\n . 'JOIN `rpay_ratepay_order_positions` ON `s_order_details`.`id` = `rpay_ratepay_order_positions`.`s_order_details_id` '\n . 'WHERE `orderID`=? AND (`quantity` - `delivered` - `cancelled`) > 0';\n try {\n $orderComplete = Shopware()->Db()->fetchOne($sql, [$orderId]);\n\n if ($operation === 'cancellation') {\n $newState = $orderComplete == 0 ? $this->_config['RatePayPartialCancellation'] : $this->_config['RatePayFullCancellation'];\n } elseif ($operation === 'delivery') {\n //only set if order is not partial returned / cancelled\n if ($orderComplete != $this->_config['RatePayPartialReturn'] && $orderComplete != $this->_config['RatePayPartialCancellation']) {\n $newState = $orderComplete == 0 ? $this->_config['RatePayFullDelivery'] : $this->_config['RatePayPartialDelivery'];\n }\n } elseif ($operation === 'return') {\n $newState = $orderComplete == 0 ? $this->_config['RatePayFullReturn'] : $this->_config['RatePayFullCancellation'];\n }\n\n // return if no status update\n if (null === $newState) {\n return;\n }\n\n Shopware()->Db()->update('s_order', [\n 'status' => $newState\n ], '`id`=' . $orderId);\n } catch (\\Exception $exception) {\n Logger::singleton()->error($exception->getMessage());\n }\n }", "public function modificarIrA( $proyecto, $encuesta_id ){\n $vectorId = array();\n $vectorCodigo = array();\n $vectorIr_a = array();\n $vectorId_pregunta_tp = array();\n \n $select = \"select id, codigo, ir_a, id_pregunta_tp from \" .$proyecto .\".entrada where id_instrumento = '\" .$encuesta_id .\"';\";\n $objs = Aux::findBySql($select)->all();\n foreach( $objs as $obj ){\n $vectorId[] = $obj->id;\n $vectorCodigo[] = $obj->codigo;\n $vectorIr_a[] = $obj->ir_a;\n $vectorId_pregunta_tp[] = $obj->id_pregunta_tp;\n }\n $vectorCodigo[-1] = '';\n foreach( $objs as $obj ){\n if( $obj->codigo != 'x3fin' && (int)substr($obj->ir_a,0,1) != 0 ){\n if( $obj->ir_a == 'x3fin' || $obj->ir_a == '' )\n $auxIr = 'x3fin';\n else if( isset($vectorCodigo[$obj->ir_a -1]) )\n $auxIr = $vectorCodigo[$obj->ir_a -1];\n else\n $auxIr = '';\n $update = \"update \" .$proyecto .\".entrada set ir_a = '\" .$auxIr .\"' where id='\" .$obj->id .\"';\";\n Aux::findBySql($update)->one();\n if( false && ($obj->id_pregunta_tp == 3 || $obj->id_pregunta_tp == 4 || $obj->id_pregunta_tp == 5) ){\n $select2 = \"select id, ir_a from \" .$proyecto .\".entrada_op where id_entrada = '\" .$obj->id .\"';\";\n $objs2 = Aux::findBySql($select2)->all();\n foreach( $objs2 as $obj2 ){ \n if( $obj2->ir_a == 'x3fin' )\n $auxIr2 = 'x3fin';\n else if( $obj2->ir_a == '' && $obj->ir_a == '' )\n $auxIr2 = 'x3fin';\n else if( $obj2->ir_a == '' )\n $auxIr2 = $obj->ir_a;\n else if( isset($vectorCodigo[$obj2->ir_a -1]) )\n $auxIr2 = $vectorCodigo[$obj2->ir_a -1];\n else\n $auxIr2 = '';\n Aux::findBySql( \"update \" .$proyecto .\".entrada_op set ir_a = '\" .$auxIr2 .\"' where id='\" .$obj2->id .\"' ;\" )->one();\n } // foreach\n } // if\n } // if\n } // for \n }", "public function actionSetAsignamiento() {\r\n \r\n $id = isset($_POST[\"id\"]) ? $_POST[\"id\"] : \"\";\r\n $comentario = isset($_POST[\"comentario\"]) ? $_POST[\"comentario\"] : \"\";\r\n $checkboxvalues = isset($_POST[\"checkboxvalues\"]) ? $_POST[\"checkboxvalues\"] : \"\";\r\n $cargo_id = $this->getCargo($id);\r\n $cargo_adicional = Yii::app()->user->getState('grupo_id') ;\r\n $dealer_id = $this->getDealerId($id);\r\n $con = Yii::app()->db;\r\n $result = TRUE;\r\n date_default_timezone_set('America/Guayaquil'); // Zona horaria de Guayaquil Ecuador\r\n\r\n $model = new GestionReasignamiento;\r\n $model->comentario = $comentario;\r\n $model->fecha = date(\"Y-m-d H:i:s\");\r\n $model->save();\r\n\r\n foreach ($checkboxvalues as $value) {\r\n $param = explode(',', $value);\r\n $sql = \"UPDATE gestion_informacion SET responsable = {$id}, reasignado = 1, responsable_cesado = {$param[1]}, id_comentario = {$model->id} WHERE id = {$param[0]}\";\r\n \r\n \r\n if($cargo_id == 86 && Yii::app()->user->getState('grupo_id') == 3) # REASIGNAR CLIENTES A ASESORES WEB DE KMOTOR\r\n $sql = \"UPDATE gestion_informacion SET responsable = {$id}, reasignado = 1, responsable_cesado = {$param[1]}, id_comentario = {$model->id}, dealer_id = {$dealer_id}, concesionario = {$dealer_id} WHERE id = {$param[0]}\";\r\n \r\n if((Yii::app()->user->getState('grupo_id') == 2) && $cargo_adicional == 85){ # REASIGNAR CLIENTES DE ASIAUTO CON JEFE DOBLE CARGO\r\n $sql = \"UPDATE gestion_informacion SET responsable = {$id}, reasignado = 1, responsable_cesado = {$param[1]}, id_comentario = {$model->id}, dealer_id = {$dealer_id}, concesionario = {$dealer_id} WHERE id = {$param[0]}\";\r\n }\r\n \r\n if (!$request = $con->createCommand($sql)->execute()) {\r\n $result = FALSE;\r\n }\r\n $sqlNot = \"UPDATE gestion_notificaciones SET id_asesor = {$id} WHERE id_informacion = {$param[0]}\";\r\n $request2 = $con->createCommand($sqlNot)->execute();\r\n\r\n $sqlSC = \"UPDATE gestion_solicitud_credito SET vendedor = {$id} where id_informacion = {$param[0]}\";\r\n //$request3 = $con->createCommand($sqlSC)->execute();\r\n \r\n\r\n\r\n $dealerId= $this->getConcesionarioId($param[0]); \r\n\r\n\r\n if($this ->validateEmailSending($dealerId)){ \r\n\r\n $this -> sendEmailTM ($param[0]);\r\n\r\n \r\n\r\n $this -> sendReasignNotification($id,$param[0],$comentario);\r\n }\r\n else $result=true; \r\n \r\n \r\n }\r\n\r\n\r\n $options = array('result' => $result);\r\n echo json_encode($options);\r\n }", "function value_set(){\n\n $this->mongo_db->where(array('Grade'=>'10'))->set('status', 'beginner')->update('personnes');\n return TRUE;\n\n }", "private function paramValidatorValueProcess() : void\n {\n foreach ($this->client->getParamValidatorValues() as $paramValidatorValue){\n if(isset($this->data[$paramValidatorValue]) && is_array($this->data[$paramValidatorValue])){\n foreach ($this->data[$paramValidatorValue] as $paramKey => $paramValue){\n $this->data[$paramKey] = $paramValue;\n }\n unset($this->data[$paramValidatorValue]);\n }\n }\n }", "private function setVMScreenChangeIntervall()\n\t{\n\t\t$elem = $this->getCurElement();\n\t\t$this->vmScreenChangeIntervall = $elem[CAutoTest::SEQIDX_VMSCREENCHANGEINTERVALL];\n\t}", "public function testSetActionsGratuitesValeurU() {\n\n $obj = new EmpDadsuRectif();\n\n $obj->setActionsGratuitesValeurU(10.092018);\n $this->assertEquals(10.092018, $obj->getActionsGratuitesValeurU());\n }", "public function setOperation($operation)\n {\n $this->operation = $operation;\n return $this;\n }", "public function setOperation($operation)\n {\n $this->operation = $operation;\n return $this;\n }", "public function setTaskProcessingResults(?array $value): void {\n $this->getBackingStore()->set('taskProcessingResults', $value);\n }", "public function acelerar(){\n\t\t$this->velocidad += 10;\n\t}", "public function setSupportedOperators(?array $value): void {\n $this->getBackingStore()->set('supportedOperators', $value);\n }", "public function RegistrarConteoFisicoSelectivo($Codigo,$Cantidad,$Vector) {\n $DatosCodigoBarras=$this->DevuelveValores(\"prod_codbarras\", \"CodigoBarras\", $Codigo);\n $idProducto=$DatosCodigoBarras[\"ProductosVenta_idProductosVenta\"];\n if($idProducto==''){\n $idProducto=$Codigo;\n }\n $DatosProducto=$this->DevuelveValores(\"productosventa\", \"idProductosVenta\", $idProducto);\n if($DatosProducto[\"idProductosVenta\"]==''){\n $Respuestas[\"Error\"]=\"el producto con el codigo $idProducto No existe\";\n return($Respuestas);\n }\n $DatosProductoConteo=$this->DevuelveValores(\"inventarios_conteo_selectivo\", \"Referencia\", $idProducto);\n if($DatosProductoConteo[\"Referencia\"]==''){\n $Referencia=$DatosProducto[\"Referencia\"];\n $sql=\"INSERT INTO `inventarios_conteo_selectivo` (`Referencia`, `Cantidad`) VALUES ('$idProducto', '$Cantidad');\";\n $this->Query($sql);\n //$this->RegistrarDiferenciaInventarios($idProducto, \"\");\n $Respuestas[\"Creado\"]=\"Se han contado $Cantidad items del producto con codigo $idProducto, Refencia $Referencia, $DatosProducto[Nombre] y Precio $DatosProducto[PrecioVenta] \";\n return($Respuestas);\n }else{\n $Referencia=$DatosProducto[\"Referencia\"];\n $Saldo=$DatosProductoConteo[\"Cantidad\"]+$Cantidad;\n $this->ActualizaRegistro(\"inventarios_conteo_selectivo\", \"Cantidad\", $Saldo, \"Referencia\", $idProducto);\n $Respuestas[\"Actualizado\"]=\"el codigo $idProducto, $DatosProducto[Nombre], Precio: $DatosProducto[PrecioVenta], Referencia $DatosProductoConteo[Referencia], Se ha actualizado satisfactoriamente, existencia anterior = $DatosProductoConteo[Cantidad], Cantidad Ingresada=$Cantidad, Nuevo Saldo = $Saldo\";\n return($Respuestas);\n }\n }", "function setEstablecimientoEdit($establecimiento){\n //dump_exit($establecimiento);\n $dato['establecalle'] = $establecimiento[\"establecalle\"];\n $dato['establealtura'] = $establecimiento[\"establealtura\"];\n $dato['establepiso'] = $establecimiento[\"establepiso\"];\n $dato['establedpto'] = $establecimiento[\"establedpto\"];\n $dato['provid'] = $establecimiento[\"provid\"];\n $dato['dptoid'] = $establecimiento[\"dptoid\"];\n $dato['establelatitud'] = $establecimiento[\"establelatitud\"];\n $dato['establelongitud'] = $establecimiento[\"establelongitud\"];\n $dato['empleaid'] = $establecimiento[\"empleaid\"];\n $dato['estableestado'] = 'AC';\n \n $response = $this->db->insert('tbl_establecimiento', $dato);\n \n return $response;\n }", "public function setValues()\n {\n $connection = $this->_entities->getResource()->getConnection();\n $tmpTable = $this->_entities->getTableName($this->getCode());\n\n $stores = array_merge(\n $this->_helperConfig->getStores(array('lang')), // en_US\n $this->_helperConfig->getStores(array('channel_code')), // channel\n $this->_helperConfig->getStores(array('lang', 'channel_code')), // en_US-channel\n $this->_helperConfig->getStores(array('currency')), // USD\n $this->_helperConfig->getStores(array('channel_code', 'currency')), // channel-USD\n $this->_helperConfig->getStores(array('lang', 'channel_code', 'currency')) // en_US-channel-USD\n );\n\n $columns = array_keys($connection->describeTable($tmpTable));\n\n $except = array(\n '_entity_id',\n '_is_new',\n '_status',\n '_type_id',\n '_options_container',\n '_tax_class_id',\n '_attribute_set_id',\n '_visibility',\n '_children',\n '_axis',\n 'sku',\n 'categories',\n 'family',\n 'groups',\n 'enabled',\n );\n\n $values = array(\n 0 => array(\n 'options_container' => '_options_container',\n 'tax_class_id' => '_tax_class_id',\n 'visibility' => '_visibility',\n )\n );\n\n if ($connection->tableColumnExists($tmpTable, 'enabled')) {\n $values[0]['status'] = '_status';\n }\n\n foreach ($columns as $column) {\n if (in_array($column, $except)) {\n continue;\n }\n\n if ($connection->tableColumnExists($tmpTable, $column.'-unit')) {\n $connection->update($tmpTable, array($column.'-unit' => $connection->getConcatSql(array('`'.$column.'`', '\" \"', '`'.$column.'-unit`'))));\n }\n\n $columnPrefix = explode('-', $column);\n $columnPrefix = reset($columnPrefix);\n\n $values[0][$columnPrefix] = $column;\n\n foreach ($stores as $suffix => $affected) {\n if (preg_match('/' . $suffix . '$/', $column)) {\n foreach ($affected as $store) {\n if (!isset($values[$store['store_id']])) {\n $values[$store['store_id']] = array();\n }\n $values[$store['store_id']][$columnPrefix] = $column;\n }\n }\n }\n }\n\n foreach($values as $storeId => $data) {\n $this->_entities->setValues(\n $this->getCode(), $connection->getTableName('catalog_product_entity'), $data, 4, $storeId, 1\n );\n }\n\n /**\n * Links product\n */\n foreach ($this->linkColumns as $linkTypeId => $linkColumn) {\n if ($connection->tableColumnExists($tmpTable, $linkColumn)) {\n $this->addLink($linkColumn, $linkTypeId, $connection, $tmpTable);\n }\n }\n }", "public function setJumlahKaki($jumlahKaki)\n {\n //$this->jumlahKursi = $jumlahKursi;\n $this->jumlahKaki = $jumlahKaki;\n //Method\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ov02_sequencial = ($this->ov02_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_sequencial\"]:$this->ov02_sequencial);\n $this->ov02_seq = ($this->ov02_seq == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_seq\"]:$this->ov02_seq);\n $this->ov02_nome = ($this->ov02_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_nome\"]:$this->ov02_nome);\n $this->ov02_ident = ($this->ov02_ident == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_ident\"]:$this->ov02_ident);\n $this->ov02_cnpjcpf = ($this->ov02_cnpjcpf == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_cnpjcpf\"]:$this->ov02_cnpjcpf);\n $this->ov02_endereco = ($this->ov02_endereco == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_endereco\"]:$this->ov02_endereco);\n $this->ov02_numero = ($this->ov02_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_numero\"]:$this->ov02_numero);\n $this->ov02_compl = ($this->ov02_compl == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_compl\"]:$this->ov02_compl);\n $this->ov02_bairro = ($this->ov02_bairro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_bairro\"]:$this->ov02_bairro);\n $this->ov02_munic = ($this->ov02_munic == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_munic\"]:$this->ov02_munic);\n $this->ov02_uf = ($this->ov02_uf == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_uf\"]:$this->ov02_uf);\n $this->ov02_cep = ($this->ov02_cep == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_cep\"]:$this->ov02_cep);\n $this->ov02_situacaocidadao = ($this->ov02_situacaocidadao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_situacaocidadao\"]:$this->ov02_situacaocidadao);\n $this->ov02_ativo = ($this->ov02_ativo == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_ativo\"]:$this->ov02_ativo);\n if($this->ov02_data == \"\"){\n $this->ov02_data_dia = ($this->ov02_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_data_dia\"]:$this->ov02_data_dia);\n $this->ov02_data_mes = ($this->ov02_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_data_mes\"]:$this->ov02_data_mes);\n $this->ov02_data_ano = ($this->ov02_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_data_ano\"]:$this->ov02_data_ano);\n if($this->ov02_data_dia != \"\"){\n $this->ov02_data = $this->ov02_data_ano.\"-\".$this->ov02_data_mes.\"-\".$this->ov02_data_dia;\n }\n }\n if($this->ov02_datanascimento == \"\"){\n $this->ov02_datanascimento_dia = ($this->ov02_datanascimento_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_datanascimento_dia\"]:$this->ov02_datanascimento_dia);\n $this->ov02_datanascimento_mes = ($this->ov02_datanascimento_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_datanascimento_mes\"]:$this->ov02_datanascimento_mes);\n $this->ov02_datanascimento_ano = ($this->ov02_datanascimento_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_datanascimento_ano\"]:$this->ov02_datanascimento_ano);\n if($this->ov02_datanascimento_dia != \"\"){\n $this->ov02_datanascimento = $this->ov02_datanascimento_ano.\"-\".$this->ov02_datanascimento_mes.\"-\".$this->ov02_datanascimento_dia;\n }\n }\n $this->ov02_sexo = ($this->ov02_sexo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_sexo\"]:$this->ov02_sexo);\n }else{\n $this->ov02_sequencial = ($this->ov02_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_sequencial\"]:$this->ov02_sequencial);\n $this->ov02_seq = ($this->ov02_seq == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ov02_seq\"]:$this->ov02_seq);\n }\n }", "public function setItemizations(?array $itemizations): void\n {\n $this->itemizations['value'] = $itemizations;\n }", "public function update_tabla_sec ($valores=NULL){\n return \"\n UPDATE adm_audit_stock_limpieza_detalle_prod\n SET id_pro_productos = $valores[1],\n id_sis_problemas = $valores[2],\n activo = 1\n WHERE id_adm_audit_stock_limpieza_detalle_prod = $valores[0]\n ;\n \";\n }", "public function setCompendiaStatus($t, $r){\n\t$this -> db -> where(array('test_id' => $t, 'lab_ref_no' => $r));\n\t$this -> db -> update('sample_issuance', array('compendia_status'=>1));\n}", "public function setValues($values = array());", "function setEvValues($evValuesAssocArray = false)\n\t{\n\t\tif ($evValuesAssocArray === false || !is_array($evValuesAssocArray)) {\n\t\t\t$evValuesAssocArray = array('kp' => 0, 'atk' => 0, 'def' => 0, 'spa' => 0, 'spv' => 0, 'mov' => 0);\n\t\t}\n\t\t\n\t\t$this->_evValues = $evValuesAssocArray;\n\t}", "public function testSetExpPeriodes() {\n\n $obj = new DecTva3519();\n\n $obj->setExpPeriodes(\"expPeriodes\");\n $this->assertEquals(\"expPeriodes\", $obj->getExpPeriodes());\n }", "public function setAssignments(?array $value): void {\n $this->getBackingStore()->set('assignments', $value);\n }" ]
[ "0.60787666", "0.5942505", "0.5939202", "0.55419546", "0.5472267", "0.5320932", "0.5175371", "0.5109522", "0.49965551", "0.48913592", "0.4880622", "0.4879715", "0.48753735", "0.48699912", "0.484855", "0.4843634", "0.4841923", "0.48177385", "0.48130438", "0.47718364", "0.4756022", "0.47469708", "0.47465342", "0.4690963", "0.46892953", "0.46762836", "0.46524283", "0.46453696", "0.46403417", "0.46319252", "0.4623727", "0.46171656", "0.46022582", "0.45966187", "0.45941022", "0.4592991", "0.4584551", "0.45591015", "0.45559126", "0.45484614", "0.45390654", "0.4529662", "0.4505371", "0.45030752", "0.44934323", "0.44889683", "0.44882852", "0.44871664", "0.44791138", "0.4472779", "0.4470149", "0.4468894", "0.4464599", "0.44544017", "0.44355163", "0.44349632", "0.4424704", "0.4417827", "0.4417639", "0.44108793", "0.44106394", "0.44058555", "0.43933007", "0.43923235", "0.4384979", "0.43755728", "0.43649632", "0.4359236", "0.43583304", "0.43542337", "0.4351631", "0.434949", "0.4347231", "0.4345273", "0.43439284", "0.43348128", "0.43288723", "0.43270537", "0.43270165", "0.4324866", "0.43230176", "0.43187898", "0.43186387", "0.43139732", "0.43139732", "0.43098572", "0.43072206", "0.43042547", "0.43013933", "0.42998293", "0.4298782", "0.42926392", "0.42913285", "0.428748", "0.42861652", "0.42854652", "0.42844874", "0.42771226", "0.42742673", "0.42731547" ]
0.7012344
0
Called from AJAX. Saves the student code to the database when they press run while completing a question.
Вызывается из AJAX. Сохраняет код студента в базу данных, когда они нажимают «Запустить» при выполнении задания.
public function save_code(){ $success = false; if (isset($_POST['question_id']) && isset($_POST['exam_id']) && isset($_POST['contents']) && isset($_POST['completion_status_id']) && isset($_POST['score_multiplier'])){ require_once('models/exam.php'); require_once('models/section.php'); $exam = Exam::get_for_student($_POST['exam_id']); $exam_props = $exam->get_properties(); $times = Exam::get_times_for_student($_POST['exam_id'], $_SESSION['user']->get_id()); //make sure exam, exam_props, and times arent null if(!empty($exam) and !empty($exam_props) and !empty($times)){ $user_id = $_SESSION['user']->get_id(); $now = intval(date_format(new DateTime(), 'U')); $start = date_create_from_format('Y-m-d H:i:s', $times[0]->start_time); $start_seconds = intval(date_format($start, 'U')); $close = date_create_from_format('Y-m-d H:i:s', $times[0]->close_time); $close_seconds = intval(date_format($close, 'U')); //make sure the current time is within the start time and close time if(!($start_seconds < $now) or !($now < $close_seconds)){ add_alert("The time to take this exam has expired.", Alert_Type::DANGER); return call('pages', 'error'); } //make sure the question exists in the exam if(!array_key_exists($_POST['question_id'], $exam_props['questions'])){ add_alert("Invalid question/exam combination.", Alert_Type::DANGER); return call('pages', 'error'); } //make sure student is in section the exam is for if (!section::is_student($exam_props['section']->key, $_SESSION['user']->get_id())){ add_alert("Sorry, you don't have permission to access this page.", Alert_Type::DANGER); return call('pages', 'error'); } $score = floatval($_POST['score_multiplier']); question::update_code_file($_POST['question_id'], $_POST['exam_id'], $user_id, $_POST['contents'], $_POST['completion_status_id'], $score); $success = true; } else{ add_alert("The item you are trying to access doesn't exist.", Alert_Type::DANGER); return call('pages', 'error'); } } else{ add_alert("Sorry, you don't have permission to access this page.", Alert_Type::DANGER); return call('pages', 'error'); } $json_data = array('success' => $success); require_once('views/shared/json_wrapper.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run() {\n \n if ($this->request->post('form_submit') == 'yes') {\n \n $_post = $this->request->get_post();\n $pres = $this->controller->get_context()->get_qa_question_handle();\n \n /** @var tf_auth */\n $auth = core::lib('auth');\n \n $_post['session_id'] = $auth->get_current_session()->get_id();\n $_post['site_id'] = core::module('sat')->get_current_site_id();\n $_post['active'] = false;\n \n if ($auth->get_user()->level >= 50) {\n $_post['active'] = true;\n }\n \n $aid = $pres->create($_post);\n \n $this->renderer\n ->set_ajax_message('Обработка запроса')\n ->set_ajax_result((bool)$aid)\n ->set_ajax_data($aid ? $pres->get_last_item()->render() : false)\n //->set_ajax_redirect('/contacts/form/complete/')\n ->ajax_flush(false);\n \n }\n \n }", "public function savepreviousStartregistration()\n {\n\n $applicant_id = $_SESSION['applicant_id'];\n $count = $this->core->cleanPost[\"count\"];\n\n $examination_number = $this->core->cleanPost['examination_number'];\n $examination_body = $this->core->cleanPost['examination_body'];\n $examination_year = $this->core->cleanPost['examination_year'];\n\n $sql = \"INSERT INTO `appl_exam` (`applicantno`, `examno`, `exambody`, `examyear`) \n VALUES ('$applicant_id', '$examination_number', '$examination_body', '$examination_year');\";\n\n if ($this->core->database->doInsertQuery($sql)) {\n\n for ($x = 1; $x <= $count; $x++) {\n $school = $this->core->cleanPost[\"school\" . $x];\n $start_year = $this->core->cleanPost[\"start_year\" . $x];\n $end_year = $this->core->cleanPost[\"end_year\" . $x];\n $level_of_attainment = $this->core->cleanPost[\"level_of_attainment\" . $x];\n\n\n $sql = \"INSERT INTO `appl_schools` (`applicantno`, `school`, `yearfrom`, `yearto`, `level`) \n VALUES ('$applicant_id', '$school', '$start_year', '$end_year','$level_of_attainment');\";\n\n if ($this->core->database->doInsertQuery($sql)) {\n echo '<div class=\"successpopup\">The requested user account has been created.<br/> WRITE THE FOLLOWING INFORMATION DOWN OR REMEMBER IT!</div>';\n echo \"<script> location.href='http://192.168.0.33/sis/startregistration/subjects/'; </script>\";\n } else {\n //used to check the error with the sql query\n //echo $sql.error;\n echo '<div class=\"successpopup\">The requested user account has failed to be created .<br/> CHECK THE DETAILS!</div>';\n }\n }\n } else {\n //used to check the error with the sql query\n //echo $sql.error;\n echo '<div class=\"successpopup\">The requested user account has failed to be created .<br/> CHECK THE DETAILS!</div>';\n }\n }", "public function savetaskscrum()\n {\n $supplieddata = $this->request->getallproperties();\n fb('ajax facade: save task scrum started');\n fb($supplieddata);\n $supplieddata['object_id'] = $supplieddata['parent_id'];\n fb('fix the data a bit for task scrum started');\n fb($supplieddata);\n permissioncheck::savetaskscrumpermitted($supplieddata['object_id']);\n if ((!array_key_exists('work_remain', $supplieddata)) OR utilityclass::missingvalues(array($supplieddata['parent_id'], $supplieddata['work_remain']))) {\n fb('error - missing arguments');\n $this->error = new jsonerror(AJAX_ARGUMENT_MISSING);\n } else {\n $user_id = utilityclass::getcookie_id();\n $supplieddata['owner_id'] = $user_id;\n fb(' do a save of the task scrum..');\n $result = taskscrum::savetaskscrum($supplieddata);\n self::userdata();\n }\n }", "function save() {\n $statement = $GLOBALS['DB']->exec(\"INSERT INTO students (student_name, enroll_date)\n VALUES ('{$this->getStudentName()}', '{$this->getEnrollDate()}');\");\n $this->id = $GLOBALS['DB']->lastInsertId();\n }", "public function completedQuiz() {\n\t\tif ( ( isset( $_POST['results'] ) ) && ( !empty( $_POST['results'] ) ) && ( is_string( $_POST['results'] ) ) ) {\n\t\t\t$_POST['results'] = json_decode(stripslashes($_POST['results']), true);\n\t\t}\n\t\t\n\t\tif ( is_user_logged_in() )\n\t\t\t$user_id\t\t\t= \tget_current_user_id();\n\t\telse\n\t\t\t$user_id\t\t\t=\t0;\n\t\t\n\t\tif ( isset( $_POST['quizId'] ) )\n\t\t\t$id \t\t\t\t= \t$_POST['quizId'];\n\t\telse\n\t\t\t$id\t\t\t\t\t= \t0;\n\n\t\tif ( isset( $_POST['quiz'] ) )\n\t\t\t$quiz_post_id \t\t= \t$_POST['quiz'];\n\t\telse\n\t\t\t$quiz_post_id\t\t= \t0;\n\n\n\t\t// LD 2.4.3 - Change in logic. Instead of accepting the values for points, correct etc from JS we now pass the 'results' array on the complete quiz\n\t\t// AJAX action. This now let's us verify the points, correct answers etc. as each have a unique nonce. \n\t\t$total_awarded_points = 0;\n\t\t$total_correct = 0;\n\n\t\t// If the results is not present then abort. \n\t\tif ( !isset( $_POST['results'] ) ) {\n\t\t\treturn array('text' => esc_html__('An error has occurred.', 'learndash'), 'clear' => true);\n\t\t}\n\t\t\n\t\t// Loop over the 'results' items. We verify and tally the points+correct counts as well as the student response 'data'. When we get to the 'comp' results element\n\t\t// we set the award points and correct as well as determine the total possible points. \n\t\t// @TODO Need to test how this works with variabel question quizzes. \n\t\tforeach( $_POST['results'] as $r_idx => $result ) {\n\t\t\tif ( $r_idx == 'comp' ) {\n\t\t\t\t$_POST['results'][$r_idx]['points'] = intval( $total_awarded_points );\n\t\t\t\t$_POST['results'][$r_idx]['correctQuestions'] = intval( $total_correct );\n\n\t\t\t\t//$quizMapper = new WpProQuiz_Model_QuizMapper();\n\t\t\t\t//$total_possible_points = $quizMapper->sumQuestionPoints( $id );\n\t\t\t\t//$_POST['results'][$r_idx]['possiblePoints'] = intval( $total_possible_points );\n\t\t\t\t//$_POST['results'][$r_idx]['result'] = round( intval( $_POST['results'][$r_idx]['points'] ) / intval( $_POST['results'][$r_idx]['possiblePoints'] ) * 100, 2 );\n\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$points_array = array(\n\t\t\t\t'points' => intval( $result['points'] ),\n\t\t\t\t'correct' => intval( $result['correct'] ),\n\t\t\t\t'possiblePoints' => intval( $result['possiblePoints'] )\n\t\t\t);\n\t\t\tif ( $points_array['correct'] === false ) $points_array['correct'] = 0;\n\t\t\telse if ( $points_array['correct'] === true ) $points_array['correct'] = 1;\n\t\t\t$points_str = maybe_serialize( $points_array );\n\t\t\t\n\t\t\tif ( !wp_verify_nonce( $result['p_nonce'], 'ld_quiz_pnonce'. $user_id .'_'. $id .'_'. $quiz_post_id .'_'. $r_idx .'_'. $points_str ) ) {\n\t\t\t\t$_POST['results'][$r_idx]['points'] = 0;\n\t\t\t\t$_POST['results'][$r_idx]['correct'] = 0;\n\t\t\t\t$_POST['results'][$r_idx]['possiblePoints'] = 0;\n\t\t\t}\n\t\t\t$total_awarded_points += intval( $_POST['results'][$r_idx]['points'] );\n\t\t\t$total_correct += $_POST['results'][$r_idx]['correct'];\n\t\t\t$response_str = maybe_serialize( $result['data'] );\n\n\t\t\tif ( !wp_verify_nonce( $result['a_nonce'], 'ld_quiz_anonce'. $user_id .'_'. $id .'_'. $quiz_post_id .'_'. $r_idx .'_'. $response_str ) ) {\n\t\t\t\t$_POST['results'][$r_idx]['data'] = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$quiz = new WpProQuiz_Controller_Quiz();\n\t\t$quiz->completedQuiz();\n\t}", "function saveResponse($details, $school_year)\n {\n $this->db = $this->eskwela->db($school_year);\n if($this->db->insert('opl_task_submitted', $details)):\n $runScript = $this->db->last_query();\n Modules::run('web_sync/saveRunScript', $runScript, $school_year);\n return TRUE;\n else:\n return FALSE;\n endif;\n }", "function saveResponse($details, $school_year)\n {\n $this->db = $this->eskwela->db($school_year);\n if($this->db->insert('opl_task_submitted', $details)):\n $runScript = $this->db->last_query();\n Modules::run('web_sync/saveRunScript', $runScript, $school_year);\n return TRUE;\n else:\n return FALSE;\n endif;\n }", "function save_student_sponsor()\n\t{\n\t\taccess_control($this);\n\t\t\n\t\t# Get the passed details into the url data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 'a', 't'));\n\t\t\n\t\t# Pick all assigned data\n\t\t$data = assign_to_data($urldata);\t\t\n\t\tif($data['save'])\n\t\t{\t\n\t\t\t$data['formdata'] = $data;\t\t\n $required_fields = array('student', 'sponsor');\n\t\t\t\n\t\t\tforeach($data as $key => $data_value)\n\t\t\t\t$data[$key] = restore_bad_chars($data_value);\n\t\t\t\n\t\t\t$_POST = clean_form_data($data);\n\t\t\t$validation_results = validate_form('', $_POST, $required_fields);\n\t\t\t\n\t\t\t#get the student info\n\t\t\t$data['student_info'] = get_db_object_details($this, 'students', decryptValue($data['m']));\n \n\t\t\t#Only proceed if the validation for required fields passes\n\t\t\tif($validation_results['bool'])\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\n if(!empty($data['editid']))\n {\t\t\t\t\t\n\t\t\t\t\t$result = $this->sponsorobj->update_student_sponsor(array_merge($_POST, array('id'=> $data['editid'])));\n \t \t}\n\t\t\t \telse \n \t{\n\t\t\t\t\t#check if the sponsorship details already exist\n\t\t\t\t\t$sponsorship_count = count($this->db->query($this->Query_reader->get_query_by_code('student_sponsors', array('orderby'=>'sponsorlastname', 'limittext'=>'', 'searchstring'=>' AND sponsor=' . $_POST['sponsor'] . ' AND sponsors.isactive=\"Y\" AND student =' . decryptValue($_POST['student']))))->result_array());\n\t\t\t\t\tif(!$sponsorship_count)\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t#Add the school id and author to the data array\n\t\t\t\t\t\t$_POST['student'] = decryptValue($_POST['student']);\n\t\t\t\t\t\t$_POST = array_merge($_POST, array('author' => $this->session->userdata('userid')));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$result = $this->sponsorobj->add_student_sponsor($_POST);\n\t\t\t\t\t}\n \t\t}\n\t\t\t\t\n \t\t#Format and send the errors\n \tif(!empty($result) && $result)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$data['msg'] = (empty($data['editid']))? 'The sponsorship details have been saved ' : 'The sponsorship details have been updated.';\n\t\t\t\t\t$data['formdata'] = array();\n \t }\n \t else if(empty($data['msg']))\n \t {\n\t\t\t\t\t$formdata = $data;\n\t\t\t\t \t\n\t\t\t\t\t$data['msg'] = \"ERROR: The sponsorship details could not be saved or was not saved correctly.\".\n\t\t\t\t\t\t\t\t\t(($sponsorship_count)? \"<br />The sponsor has already been added to \" . $data['student_info']['firstname'] . '\\'s sponsors.' : '');\t\t\t\t\t\n \t }\n }\n\t\t\t\n\t\t\t$data['requiredfields'] = $validation_results['requiredfields'];\n\t\t}\n\t\t\n\t\t#get the sponsors\n\t\t$data['sponsors'] = $this->sponsorobj->get_sponsors();\n \t\t\n\t\t$this->load->view('students/add_sponsor_form_view', $data);\n\t}", "public function save()\n\t{\n\t\tif($this->question_answer_id == null)\n\t\t{\n\t\t\t$this->db->insert(\"QuestionAnswers\", array(\n \t\t\"question_id\" => $this->question_id, \n \t\t\"answer_text\" => $this->answer_text,\n \t\t\"is_correct\" => $this->is_correct \n\t\t\t));\n\t\t\t$this->question_answer_id = $this->db->insert_id();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$update_data = array(\n \t\t\"question_id\" => $this->question_id, \n \t\t\"answer_text\" => $this->answer_text,\n \t\t\"is_correct\" => $this->is_correct\n\t\t\t);\n\t\t\t$this->db->where(\"question_answer_id\", $this->question_answer_id);\n\t\t\t$this->db->update(\"QuestionAnswers\", $update_data);\n\t\t}\n\t}", "function submitCodeSuccess(){\n\t\tif($this->session->userdata('logged_in')){\n\t\t\t$this->Code_model->isStudent(); // check if student\n\n\t\t\t$this->load->view('template/header_template_view');\n\t\t\t$this->load->view('codes/submit_code_success_view');\n\t\t\t$this->load->view('template/footer_template_view');\n\t\t}\n\t\telse redirect('/'); // redirect to log-in page\n\t}", "public function submit()\n {\n //will submit the exam\n $data = [\n 'teacher_id' => $this->getTeacherID(),\n 'duration' => $this->getDuration(),\n 'exam_type' => $this->getExamType(),\n 'lesson_id' => $this->getLessonID(),\n 'points' => $this->getPoints(),\n ];\n\n $where = ['exam_id' => $this->getExamID()];\n $result = DBcon::update(self::TABLE_NAME, $data, $where);\n return $result;\n }", "public function SubmitMission()\n {\n $this->model->finish_time = new DateTime();\n \n // Attempt to connect to the database\n $conn = new mysqli(DB::DBSERVER, DB::DBUSER, DB::DBPASS, DB::DBNAME);\n if($conn->connect_error)\n {\n trigger_error(\"Database connection failed: \" . $conn->connect_error, E_USER_ERROR);\n return false;\n }\n\n // Turn off autocommits (we only want this to commit if we explicitely commit it)\n $conn->autocommit(FALSE);\n\n // Count the number of correct answers\n $num_correct = 0;\n foreach($this->model->questions as $question)\n {\n if($question->answer == $question->student_answer)\n {\n $num_correct++;\n }\n }\n\n // Insert the mission record\n $conn->query(\"insert into student_mission_record (question_type_id,student_id,number_correct,start_datetime,finish_datetime) values (\" . $this->model->type_id . \",\" . $_SESSION[\"current_student_id\"] . \",\" . $num_correct . \",'\" . $this->model->start_time->format(\"Y-m-d H:i:s\") . \"','\" . $this->model->finish_time->format(\"Y-m-d H:i:s\") . \"')\");\n $mission_record_id = $conn->insert_id;\n\n // Insert each question record\n foreach($this->model->questions as $question)\n {\n $conn->query(\"insert into student_question_results (mission_record_id, question_type_id, start_time, finish_time, student_answer, correct_answer) values (\" . $mission_record_id . \",\" . $this->model->type_id . \",'\" . $question->start_time->format(\"Y-m-d H:i:s\") . \"','\" . $question->start_time->format(\"Y-m-d H:i:s\") . \"',\" . $question->student_answer . \",\" . $question->answer . \")\");\n }\n\t\n // Try to commit the queries\n $returnflag = $conn->commit();\n $conn->close();\n return $returnflag;\n }", "function submitCode(){\n\t\tif($this->session->userdata('logged_in')){\n\t\t\t$this->Code_model->isStudent(); // check if student\n\n\t\t\t$this->load->view('template/header_template_view');\n\t\t\t$this->load->view('codes/submit_code_view');\n\t\t\t$this->load->view('template/footer_template_view');\t\n\t\t}\n\t\telse redirect('/'); // redirect to log-in page\n\t}", "function updateRecordAction()\n{\n\tglobal $ajax;\n\tglobal $herr;\n\tglobal $vfystr;\n\tglobal $CONFIGVAR;\n\tglobal $moduleDisplayUpper;\n\tglobal $moduleDisplayLower;\n\tglobal $dbapp;\n\n\t// Get and check key value (course id).\n\t$key = getPostValue('hidden');\n\tif ($key == NULL)\n\t\thandleError('Missing ' . $moduleDisplayLower . ' selection data.');\n\tif (!is_numeric($key))\n\t\thandleError('Malformed key sequence.');\n\n\t// Query course information to make sure it's still there.\n\t$rxa = $dbapp->queryCourse($key);\n\tif ($rxa == false)\n\t{\n\t\tif ($herr->checkState())\n\t\t\thandleError($herr->errorGetMessage);\n\t\telse\n\t\t\thandleError('Database Error: Failed to retrieve course information');\n\t}\n\n\t// Query all students in the course\n\t$rxb = $dbapp->queryStudentclassCourseAll($key);\n\tif ($rxb == false)\n\t{\n\t\tif ($herr->checkState())\n\t\t\thandleError($herr->errorGetMessage);\n\t}\n\n\t// Process student enrollments\n\t$dbenrolled = array();\n\tif (is_array($rxb))\n\t{\n\t\tforeach ($rxb as $kx => $vx)\n\t\t{\n\t\t\t$dbenrolled[$vx['studentid']] = 1;\n\t\t}\n\t}\n\n\t// Process post information\n\t$str = 'select_item';\n\t$delim = '_';\n\t$length = strlen($str);\n\t$postenrolled = array();\n\tforeach ($_POST as $kx => $vx)\n\t{\n\t\tif (substr_compare($kx, $str, 0, $length, true) == 0)\n\t\t{\n\t\t\t$stx = explode($delim, $kx);\n\t\t\t$pos = count($stx) - 1;\n\t\t\t$student = $stx[$pos];\n\t\t\tif (!is_numeric($student)) continue;\n\t\t\t$postenrolled[$student] = 1;\n\t\t}\n\t}\n\n\t// There are two conditions that we have to consider.\n\t// 1. The student is to be added to a class.\n\t// 2. The student is to be removed from a class.\n\t// The other two don't matter because they don't change\n\t// the database.\n\t$insert = array_diff_key($postenrolled, $dbenrolled);\n\t$delete = array_diff_key($dbenrolled, $postenrolled);\n\n\t// We have everything that we need, so update the database.\n\t// First we insert new students.\n\tif (is_array($insert))\n\t{\n\t\tif (count($insert) > 0)\n\t\t{\n\t\t\tforeach ($insert as $kx => $vx)\n\t\t\t{\n\t\t\t\t$result = $dbapp->insertStudentclass($kx, $key);\n\t\t\t\tif ($result == false)\n\t\t\t\t{\n\t\t\t\t\tif ($herr->checkState())\n\t\t\t\t\t\thandleError($herr->errorGetMessage());\n\t\t\t\t\telse\n\t\t\t\t\t\thandleError('Database: Record insert failed. Key = ' . $kx);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Then we remove students from the course.\n\tif (is_array($delete))\n\t{\n\t\tif (count($delete) > 0)\n\t\t{\n\t\t\tforeach ($delete as $kx => $vx)\n\t\t\t{\n\t\t\t\tvar_dump($kx);\n\t\t\t\t$result = $dbapp->metaDeleteStudentCourse($kx, $key);\n\t\t\t\tif ($result == false)\n\t\t\t\t{\n\t\t\t\t\tif ($herr->checkState())\n\t\t\t\t\t\thandleError($herr->errorGetMessage());\n\t\t\t\t\telse\n\t\t\t\t\t\thandleError('Database: Record delete failed. Key = ' . $kx);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tsendResponse('Student enrollment processing completed.');\n\texit(0);\n}", "function submit($account_ID, $assignment_ID, $paperJSON, $completion, $done){\n\t\t// Delete all old submissions to this student's assignment\n\t\t$deleteSQL = \"DELETE FROM submissions WHERE studentID='$account_ID' AND assignmentID='$assignment_ID'\";\n\t\t$this->database->query($deleteSQL);\n\t\t// Insert the new submission\n\t\t$sql = \"INSERT INTO submissions\";\n\t\t$sql .= \" (studentID, assignmentID, JSON, done)\";\n\t\t$sql .= \" VALUES ('$account_ID', '$assignment_ID', '$paperJSON', '$done')\";\n\t\t$ID = $this->database->insert($sql);\n\t\t$this->database->query(\"UPDATE assignments SET completion='$completion' WHERE uniqueID='$assignment_ID'\");\n\t\treturn $ID;\n\t}", "public function AjaxPostAction() {\r\n\t\t$this->save();\r\n\t}", "function saveCode( $option, $section ) {\n\tglobal $database, $my;\n\n\t$row = new jugaCode( $database );\n\tif (!$row->bind( $_POST )) {\n\t\techo \"<script> alert('\".$row->getError().\"'); window.history.go(-1); </script>\\n\";\n\t\texit();\n\t}\n\n\tif (!$row->check()) {\n\t\techo \"<script> alert('\".$row->getError().\"'); window.history.go(-1); </script>\\n\";\n\t\texit();\n\t}\n\tif (!$row->store()) {\n\t\techo \"<script> alert('\".$row->getError().\"'); window.history.go(-1); </script>\\n\";\n\t\texit();\n\t}\n\t$row->checkin();\n\n\tmosRedirect( \"index2.php?option=$option&section=$section\" );\n}", "public function save(): void\r\n {\r\n $query = $this->newQuery();\r\n\r\n $result = $query->execute(\r\n \"INSERT INTO {$this->table} (`text`, `question_id`) \" .\r\n \" VALUES ('{$this->text}', '{$this->question_id}')\");\r\n if ($result) {\r\n $this->id = $query->getLastInsertedId();\r\n }\r\n }", "public function submited()\n {\n $this->page_title->push('<i class=\"fa fa-book\"></i>Submited');\n $this->data['pagetitle'] = $this->page_title->show();\n\n /* Breadcrumbs :: Common */\n $this->breadcrumbs->unshift(1, 'Submited', 'public/evaluation/submited');\n\n /* Breadcrumbs */\n $this->data['breadcrumb'] = $this->breadcrumbs->show();\n\n $this->load->model('public/Assessment_model','ast_model');\n $this->load->model('public/Course_reg_model','course_reg_model');\n $this->load->model('public/Answer_model','answer_log_model');\n $this->load->model('admin/Ses_model','ses_model');\n\n // GET CURRENT SEMESTER ID\n $current_sem = $this->ses_model->get(['sem_status' => 0]);\n $semester_id = $current_sem[0]['sem_id'];\n\n $assessment = $this->ast_model->join_multiple_order([\n 'reg_course'=>'reg_course_id',\n 'school_course'=>'course_id',\n ],'assessment_course','assessment_date_added','A',\n ['reg_user_id' => $this->session->userdata('user_id'),\n 'assessment_access' => 1]);\n\n $my_assessment = [];\n\n foreach($assessment as $row){\n if($answer_log = $this->answer_log_model->get([\n 'answer_log_user_id' => $this->session->userdata('user_id'),\n 'answer_assessment_id' => $row['assessment_id'],\n 'answer_status' => 1,\n ])){\n array_push($my_assessment,$row);\n };\n }\n\n $this->data['assessment'] = $my_assessment;\n\n $this->data['submited'] = true;\n\n $this->template->public_render('public/evaluation/index',$this->data);\n\n }", "function changesecurityquestion()\n\t{\n\t\t//Will kick out if not authenticated\n\t\ttry\n\t\t{\t\t\n\t\t\t$IsSuccess = FALSE;\n\t\t\t\n\t\t\tif($this->isAuth())\n\t\t\t{\n\t\t\t\t$model = $this->loadModel('AccountModel');\n\t\t\t\t$securityAnswerViewModel = $this->loadViewModel('Account/SecurityAnswerViewModel');\n\n\t\t\t\t//Map post values to the userViewModel\n\t\t\t\t$securityAnswerViewModel = AutoMapper::mapPost($securityAnswerViewModel);\n\n\t\t\t\tif($securityAnswerViewModel->validate())\n\t\t\t\t{\n\t\t\t\t\t$model = $this->loadModel('AccountModel');\n\n\t\t\t\t\tif($model->updateSecurityQuestionAnswer($this->currentUser->UserId, $securityAnswerViewModel))\n\t\t\t\t\t{\n\t\t\t\t\t\t$IsSuccess = TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this->isAjax()) \n\t\t\t{\n\t\t\t\tif($IsSuccess)\n\t\t\t\t{\n\t\t\t\t\techo getSuccessMessage();\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo getErrorMessage();\n\t\t\t\t}\t\t\n\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->redirect(\"Account/home\");\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $ex)\n\t\t{\n\t\t\tthrow $ex;\n\t\t}\n\t}", "public function run()\n {\n $individualPracticeArea = new IndividualPracticeArea;\n $individualPracticeArea->user_id = 3;\n $individualPracticeArea->class_id = 1;\n $individualPracticeArea->title = \"¡A practicar!\";\n $individualPracticeArea->individualPracticeText = \"En la práctica guiada vamos a ingresar a los dos paginas Web, Antel y Ose. Luego de ingresar responde las siguientes preguntas.\";\n $individualPracticeArea->image = \"\";\n $individualPracticeArea->highlightList = \"\";\n $individualPracticeArea->save();\n }", "public function exercise_submission() {\n\t\t$this->update_student_data();\n\t\t//ตรวจสอบ การห้ามทำแลป จากตาราง class_schedule\n\n\n\n\t\t//echo \"<h1>. . . Under Construction . . .</h1>\";\n\t\t//check table student_assigned_chapter_item\n\t\t//echo '<h2>$_POST</h2>',\"<pre>\",print_r($_POST),\"</pre>\";\n\t\t//echo '<pre>',print_r($_FILES),'</pre>';\n\t\t//echo \"<pre>\",print_r($_SESSION),\"</pre>\";\n\t\t$stu_id = $_SESSION['stu_id'];\n\t\t$chapter_id = $_POST['chapter_id'];\n\t\t$item_id = $_POST['item_id'];\n\t\t$exercise_id = $_POST['exercise_id'];\n\t\t$saved_filename = '';\n\n\t\t$this->load->model('time_model');\n\t\t$chapter_data = $this->_group_permission[$chapter_id];\n\t\t$result = $this->time_model->check_allow_access_and_submit($chapter_data['time_start'],$chapter_data['time_end']);\n\t\t$allow_submit = $result[1];\n\n\n\n\t\tif ( $this->check_for_time_interval($stu_id,$chapter_id, $item_id, $exercise_id) )\n\t\t\treturn $this->show_message(\"\".MIN_INTERVAL_SUBMISSION_TIME.\" seconds between submission.\");\n\n\t\tif ($this->check_for_identical_submission($stu_id,$chapter_id, $item_id, $exercise_id) )\n\t\t\treturn $this->show_message(\"You cannot submit identical file.\");\n\n\n\t\tif ($allow_submit=='no')\n\t\t\treturn $this->show_message(\"You are not allowed to submit exercise.\");\n\n\n\t\t$full_mark = $this->get_fullmark_from_student_assigned_chapter_item($stu_id,$chapter_id,$item_id,$exercise_id);\n\t\t$marking = $this->lab_model->get_max_marking_from_exercise_submission($stu_id,$exercise_id);\n\t\t//echo $stu_id,' | ', $chapter_id,' | ', $item_id,' | ', $exercise_id,' | ', $marking ,' | ',$full_mark ,'<br>';\n\t\t//echo '$_FILES[submitted_file] : ',$_FILES[\"submitted_file\"][\"name\"],'<br>';\n\t\t/*\n\t\tif( $marking == $full_mark ) {\n\t\t\t//$this->set_flashdata('456549879');\n\t\t\t$this->exercise_show();\n\t\t}\n\t\t*/\n\n\t\t//store file and detail in database\n\t\tif( !empty($_FILES['submitted_file'])) {\n\t\t\t$fileupload = $_FILES['submitted_file']['tmp_name'] ;\n\t\t\t$fileupload_name = $_FILES['submitted_file']['name'] ;\n\t\t\t$ext = strtolower(pathinfo($_FILES['submitted_file']['name'],PATHINFO_EXTENSION));\n\t\t\t$upload_filename = pathinfo($_FILES['submitted_file']['name'],PATHINFO_FILENAME);\n\n\t\t\t// set filename format likes 59112233_01_02_0001\n\t\t\t$saved_filename = ''.$_SESSION['stu_id'];\n\t\t\t$lab_chapter = ''.$_POST['chapter_id'];\n\t\t\twhile(strlen($lab_chapter) < 2)\n\t\t\t\t$lab_chapter = '0'.$lab_chapter;\n\t\t\t$saved_filename = $saved_filename.'_'.$lab_chapter;\n\t\t\t$lab_item = ''.$_POST['item_id'];\n\t\t\twhile(strlen($lab_item) < 2)\n\t\t\t\t$lab_item = '0'.$lab_item;\n\t\t\t$saved_filename = $saved_filename.'_'.$lab_item;\n\n\t\t\t// submitted_round คือ ส่งมาแล้วกี่ครั้ง\n\t\t\t// submit_round คือ ครั้งนี้เป็นการส่งคร้งที่เท่าไหร่\n\t\t\t$submitted_round = $this->student_model->get_student_submission_times($stu_id,$exercise_id);\n\t\t\t$submit_round = ''.($submitted_round+1);\n\t\t\twhile(strlen($submit_round) < 4)\n\t\t\t\t$submit_round = '0'.$submit_round;\n\t\t\t$saved_filename = $saved_filename.'_'.$submit_round.\".c\";\n\n\t\t\t//echo \"filename : \".$fileupload_name .' newname : '.$saved_filename.\"<br>\";\n\t\t\t//echo \"content : <br>\";\n\t\t\t//echo $fileupload.\"<br>\";\n\t\t\t$file_content = file_get_contents($fileupload);\n\t\t\t//echo $file_content.\"<br>\";\n\t\t\t//echo \"<pre>\".$file_content.\"</pre>\";\n\t\t\t$now_time = time();\n\t\t\t$assigned_time = $this->lab_model->get_assigned_time($stu_id,$chapter_id,$item_id);\n\t\t\t$elapsed_time = (int) (($now_time-$assigned_time)/60);\n\t\t\t$heading = \"/*\".PHP_EOL;\n\t\t\t$heading .= \" * กลุ่มที่ : \".$_SESSION['stu_group'].PHP_EOL;\n\t\t\t$heading .= \" * \".$_SESSION['stu_id']. \" \". $_SESSION['stu_firstname'] . \" \" . $_SESSION['stu_lastname'] .PHP_EOL;\n\t\t\t$heading .= \" * chapter : \".$_POST['chapter_id'].chr(9).\"item : \".$_POST['item_id']. chr(9). \"ครั้งที่ : \".$submit_round.PHP_EOL;\n\t\t\t$heading .= \" * Assigned : \".date('l jS \\of F Y h:i:s A',$assigned_time).\" --> Submission : \".date('l jS \\of F Y h:i:s A').chr(9).PHP_EOL;\n\t\t\t$heading .= \" * Elapsed time : \".$elapsed_time.\" minutes.\".PHP_EOL;\n\t\t\t$heading .= \" * filename : \".$fileupload_name.PHP_EOL;\n\n\n\t\t\t$heading .= \" */\".PHP_EOL;\n\t\t\t$file_content_submission = $heading.$file_content;\n\t\t\t//echo \"<pre>\".$file_content_submission.\"</pre>\";\n\t\t\t//write to harddisk\n\t\t\ttry {\n\t\t\t\t$write = file_put_contents(STUDENT_CFILES_FOLDER.$saved_filename,$file_content_submission);\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->show_message($e->getMessage());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//finally {\n\t\t\t//\treturn;\n\t\t\t//}\n\t\t\t//echo \"write : $write <br>\";\n\n\t\t\t//add submission detail to file\n\t\t\t// เก็บชื่อไฟล์ลงดาต้าเบส exercise_submission\n\t\t\t$sourcecode_filename = $saved_filename;\n\t\t\t$data = array(\n\t\t\t\t\t\t\t'stu_id'\t\t=> $stu_id,\n\t\t\t\t\t\t\t'exercise_id'\t=> $exercise_id,\n\t\t\t\t\t\t\t'sourcecode_filename'\t=> $sourcecode_filename\n\t\t\t\t);\n\n\t\t\t$submission_id = $this->lab_model->exercise_submission_add($data);\n\n\t\t\t/*\n\t\t\t\t$num_testcase = $this->lab_model->get_num_testcase($exercise_id);\n\t\t\t\trequire_once 'exercise_test.php';\n\t\t\t\t$exercise_test = new exercise_test();\n\n\t\t\t/*\n\t\t\tif($num_testcase <= 0) {\n\n\t\t\t\t//run and get output\n\t\t\t\t$output_student = $exercise_test->get_result_noinput($sourcecode_filename,'student');\n\t\t\t\t$output_student = $exercise_test->unify_whitespace($output_student);\n\n\t\t\t\t$sample_filename = $this->lab_model->get_lab_exercise_sourcecode_filename($exercise_id);\n\t\t\t\t$output_sample = $exercise_test->get_result_noinput($sample_filename,'supervisor');\n\t\t\t\t$output_sample = $exercise_test->unify_whitespace($output_sample);\n\n\t\t\t\t//echo \"output student : <br>\",$output_student,\"<br>\";\n\n\t\t\t\t//echo \"output sample : <br>\",$output_sample,\"<br>\";\n\t\t\t\t//compare to exercise sample\n\t\t\t\t$output_result = $exercise_test->output_compare($output_student,$output_sample);\n\t\t\t\t//echo \"compare result \" ,$output_result;\n\t\t\t\tif ($output_result == -1) {\t\t// -1 means OK.\n\t\t\t\t\t//echo __METHOD__,'<h2 style=\"color:blue;\"> your code is OK!</h2>';\n\t\t\t\t\t//update fullmark to exercise_submission\n\t\t\t\t\t$marking = $this->get_fullmark_from_student_assigned_chapter_item($stu_id,$chapter_id,$item_id,$exercise_id);\n\t\t\t\t\t//$this->update_marking_student_assigned_chapter_item($stu_id,$chapter_id,$item_id,$marking);\n\t\t\t\t\t//$this->update_marking_exercise_submission($submission_id,$marking);\n\t\t\t\t\t$this->lab_model->update_marking_exercise_submission($stu_id,$submission_id,$marking);\n\t\t\t\t} else {\n\n\t\t\t\t\t$error_line = $output_result['error_line'];\n\t\t\t\t\t$error_column = $output_result['error_column'];\n\t\t\t\t\t$error_position = $output_result['error_position'];\n\t\t\t\t\t//echo '<h2 style=\"color:red;\">unmatched_position : ',$error_position,\" line : \", $error_line,\" column : \",$error_column,\"</h2>\";\n\n\t\t\t\t\t//\tadd a line to output showing where the first error occurs.\n\t\t\t\t\t$output_student = $exercise_test->dispaly_error_in_output($output_student,$error_position);\n\t\t\t\t}\n\n\n\t\t\t} else { //with testcases\n\t\t\t\t$_SESSION['testcase_data']=''; //reset first\n\t\t\t\t$data_testcase = $this->lab_model->get_testcase_array($exercise_id);\n\t\t\t\t//echo '<h3><pre>',print_r($data_testcase),'</pre></h3>';\n\n\t\t\t\t//run each testcase and compare result\n\t\t\t\t$pass = 'yes';\n\t\t\t\tfor ($i=0;i<sizeof($data_testcase); $i++) {\n\t\t\t\t\t//run output and store in $data_testcase\n\t\t\t\t\t$output_student = $exercise_test->get_result_student_testcase($sourcecode_filename,$data_testcase['testcase_content']);\n\t\t\t\t\t$output_student = $exercise_test->unify_whitespace($output_student);\n\n\t\t\t\t\t$output_sample = $data_testcase['testcase_output'];\n\t\t\t\t\t$output_sample = $exercise_test->unify_whitespace($output_sample);\n\n\t\t\t\t\t//compare to exercise sample\n\t\t\t\t\t$output_result = $exercise_test->output_compare($output_student,$output_sample);\n\n\t\t\t\t\t//calculate marking of testcase and put into $data_testcase\n\t\t\t\t\tif ($output_result == -1) {\t\t// -1 means OK.\n\t\t\t\t\t//echo __METHOD__,'<h2 style=\"color:blue;\"> your code is OK!</h2>';\n\t\t\t\t\t\t//update fullmark to exercise_submission\n\t\t\t\t\t\t$marking = $this->get_fullmark_from_student_assigned_chapter_item($stu_id,$chapter_id,$item_id,$exercise_id);\n\t\t\t\t\t\t//$this->update_marking_student_assigned_chapter_item($stu_id,$chapter_id,$item_id,$marking);\n\t\t\t\t\t\t//$this->update_marking_exercise_submission($submission_id,$marking);\n\t\t\t\t\t\t$this->lab_model->update_marking_exercise_submission($stu_id,$submission_id,$marking);\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t$error_line = $output_result['error_line'];\n\t\t\t\t\t\t$error_column = $output_result['error_column'];\n\t\t\t\t\t\t$error_position = $output_result['error_position'];\n\t\t\t\t\t\t//echo '<h2 style=\"color:red;\">unmatched_position : ',$error_position,\" line : \", $error_line,\" column : \",$error_column,\"</h2>\";\n\n\t\t\t\t\t\t//\tadd a line to output showing where the first error occurs.\n\t\t\t\t\t\t$output_student = $exercise_test->dispaly_error_in_output($output_student,$error_position);\n\t\t\t\t\t\t$pass='no';\n\t\t\t\t\t}\n\t\t\t\t\t$data_testcase[\"$i\"]['output_to_show']=$output_student;\n\t\t\t\t}\n\t\t\t\tif($pass=='yes') {\n\t\t\t\t\t$marking = $this->get_fullmark_from_student_assigned_chapter_item($stu_id,$chapter_id,$item_id,$exercise_id);\n\t\t\t\t\t$this->lab_model->update_marking_exercise_submission($stu_id,$submission_id,$marking);\n\t\t\t\t}\n\t\t\t\t$_SESSION['testcase_data']=$data_testcase;\n\n\t\t\t}\n\t\t\t*/\n\n\t\t}\n\t\t$stu_group = $_SESSION['stu_group'];\n\t\t$message = \"group : \".$stu_group.\" Submitting : \".$submission_id.\" : \".$saved_filename;\n\t\t$this->createLogFile($message);\n\t\t//if($stu_id=='61012345')\n\t\t//$this->checkForInfiniteLoop();\n\t\t$this->execute_submission($stu_id, $chapter_id, $item_id, $submission_id);\n\n\t\t$this->lab_exercise($chapter_id,$item_id);\n\n\n\n\n\t}", "public function savestudent($method)\n\t{\n\t\tif ($method == 'add') {\n\n\t\t\t$status = $_POST['Status'];\n\t\tunset($_POST['Status']); // remove the status in post\n\n\t\t$crntLRN = $_POST['LRN_Number'];\n\t\t$crntsecCode = $_POST['Section_Code'];\n\n// getting subjects \n\t\t\t\t\t $this->db->select('Subject_Code');\n\t\t\t\t\t $this->db->order_by('Subject_Code', 'DESC');\n\t\t\t$SecSub = $this->db->get_where('tbsubject_section', array('Section_code' => $crntsecCode)); // put a index to insert that the remarks is SUBJECT\n\n\t\t\t$secSub = $SecSub->result_array();\n\t\t\tfor ($i=0; $i < count($secSub) ; $i++) { \n\n\t\t\t\tif(!array_key_exists('Category', $secSub[$i]))\n\t\t\t\t{\n\t\t\t\t $secSub[$i]['Category'] = 'SUBJECT';\n\t\t\t\t}\n\t\t\t}\n\n// getting assignatory\n\t\t\t\t\t\t\t $this->db->select('Signatory_code');\n/*\t\t\t\t\t\t\t ini_set('memory_limit', '-1');\n*/\t\t\t$SignatoryList = $this->db->get('tbsignatory');\n\t\t\t$sigNatoryList = $SignatoryList->result_array();\n\n\t\t\tfor ($i=0; $i < count($sigNatoryList) ; $i++) { \n\n\t\t\t\tif(!array_key_exists('Category', $sigNatoryList[$i]))\n\t\t\t\t{\n\t\t\t\t $sigNatoryList[$i]['Category'] = 'OTHER';\n\t\t\t\t}\n\t\t\t}\n\n//tbstudent\n\t\t\t$usrname = $_POST['First_Name'].\"_\".$_POST['Last_Name'];\n\n\t\t\t$stud_DAT = array(\n\t\t\t\t'LRN_Number' => $crntLRN,\n\t\t\t\t'First_Name' => $_POST['First_Name'],\n\t\t\t\t'Last_Name' => $_POST['Last_Name'],\n\t\t\t\t'Initial' => $_POST['Initial'],\n\t\t\t\t'Gender' => $_POST['Gender'],\n\t\t\t\t'Password' => $_POST['Password'],\n\t\t\t\t'Username' => str_replace(' ', '_', strtolower($usrname))\n\t\t\t\t);\n\t\t\t\n\t\t\t$saveStudent = $this->db->insert($this->studTbl, $stud_DAT);\n\n\t\t\tfor ($i=0; $i < count($secSub) ; $i++) { \n\t\t\t\t$crntsubCode = $secSub[$i]['Subject_Code'];\n\t\t\t\t$crntsubCategory = $secSub[$i]['Category'];\n\n\t\t\t\t$sQL = \"INSERT INTO `tbstudent_subject`(`Section_Code`, `LRN_Number`, `Subject_Signatory_Code`, `Status`, `Category`) VALUES ((?), (?), (?), (?),(?))\";\n\n//tbsubject_stud\n\t\t\t\t$addSubjects = $this->db->query($sQL, [$crntsecCode, $crntLRN, $crntsubCode, 'INC', $crntsubCategory]);\n\t\t\t}\n\t\t\t//$this->chkData($secSub);\n\n\t\t\t//$this->chkData($sigNatoryList);\n\t\t\tfor ($i=0; $i < count($sigNatoryList) ; $i++) { \n\t\t\t\t$crntSignatory = $sigNatoryList[$i]['Signatory_code'];\n\t\t\t\t$crntsigCategory = $sigNatoryList[$i]['Category'];\n\n\t\t\t\t$sQL = \"INSERT INTO `tbstudent_subject`(`Section_Code`, `LRN_Number`, `Subject_Signatory_Code`, `Status`, `Category`) VALUES ((?), (?), (?), (?),(?))\";\n\n//tbsubject_stud\n\t\t\t\t$addSignatory = $this->db->query($sQL, [$crntsecCode, $crntLRN, $crntSignatory, 'INC', $crntsigCategory]);\n\t\t\t}\n\t\t\t//$this->chkData($sigNatoryList);\n\n//enroll student\n\t\t\t$studentEnrollDat = array(\n\t\t\t\t'LRN_number' => $crntLRN,\n\t\t\t\t'Section_Code' => $crntsecCode,\n\t\t\t\t'Status' => $status\n\t\t\t\t);\n\t\t\t$enrollStud = $this->db->insert('tbenrolled', $studentEnrollDat);\n\n\t\t\t//$saveStudent\n\t\t\tif (($saveStudent) && ($addSubjects) && ($addSignatory) && ($enrollStud)) {\n\t\t\t\techo json_encode(['status' => true]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo json_encode(['status' => false]);\n\t\t\t}\n\n\t\t}\n\t\telse{ // edit only the student data will be change\n\n\t\t\t$secCode = array_pop($_POST); // remove the section prt\n\n\t\t\t$editLRN = array_shift($_POST);\n\n\t\t\t$editSQl = \"UPDATE `tbstudent` SET `First_Name`=(?),`Last_Name`=(?),`Initial`=(?),`Gender`=(?) WHERE `LRN_Number`= (?)\";\n\n\t\t\t$editStudQ = $this->db->query($editSQl, [$_POST['First_Name'], $_POST['Last_Name'], $_POST['Initial'], $_POST['Gender'], $editLRN]);\n\n\t\t\t$editEnrolledSQL = \"UPDATE `tbenrolled` SET `Status`=(?) WHERE `LRN_number`=(?) AND `Section_Code`=(?)\";\n\n\t\t\t$editEnrolledQ = $this->db->query($editEnrolledSQL, [$status, $editLRN, $secCode]);\n\n\t\t\tif (($editStudQ) && ($editEnrolledQ)) {\n\t\t\t\techo json_encode(['status' => true]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo json_encode(['status' => false]);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function run()\n {\n if (isset($_POST['edit']) || isset($_POST['form_edit'])) {\n $question = $this->_db->select_question_for_edit($_POST['question_id']);\n } else {\n # If the user try to post a question without being connected --> redirect login with notification\n if (!isset($_SESSION['login'])) {\n $_SESSION['error'] = 'You must be logged to post a question';\n header('Location: index.php?action=login');\n die();\n }\n # Empty question to post\n $question = new Question(null, null, null, null, null, null, null, null, null);\n }\n\n # Clicked on submit and if there is an empty field in the form\n if (isset($_POST['question_title']) && isset($_POST['question_subject'])) {\n if (preg_match('/^\\s*$/', $_POST['question_title']) || preg_match('/^\\s*$/', $_POST['question_subject'])) {\n $notification = \"Please fill in all fields\";\n } elseif (isset($_POST['question_title'][80]))\n $notification = 'Please enter a shorter title';\n elseif (isset($_POST['question_subject'][65535]))\n $notification = 'Please enter a shorter answer';\n else {\n # If the member is editing his question\n if (isset($_POST['form_edit'])) {\n # Updating his question\n $this->_db->edit_question($_POST['question_id'], $_POST['question_title'], $_POST['question_subject'], $_POST['question_category_id']);\n header(\"Location: index.php?action=question&id=\" . $_POST['question_id']);\n die();\n } # If the member is posting a question\n elseif (isset($_POST['form_question'])) {\n # Insert question into database\n $authorId = unserialize($_SESSION['login'])->memberId();\n $publicationDate = date(\"Y-m-d\");\n $this->_db->insert_question($authorId, $_POST['question_category_id'], $_POST['question_title'], $_POST['question_subject'], $publicationDate);\n $postedQuestionId = $this->_db->select_last_posted_question();\n header(\"Location: index.php?action=question&id=\" . $postedQuestionId);\n die();\n }\n }\n }\n\n # If the question is duplicated and user clicked on 'Answer' Button\n if ($question->state() == 'duplicated') {\n $_SESSION['error'] = 'This question is marked as duplicated';\n header('Location: index.php?action=question&id=' . $question->questionId());\n die();\n }\n\n # Selecting all categories to display\n $categories = $this->_db->select_categories();\n\n if (isset($_POST['question_id'])) {\n $questionId = $_POST['question_id'];\n $pageTitle = 'Edit your question:';\n }else\n $pageTitle = 'New question:';\n\n require_once(VIEWS . 'editQuestion.php');\n }", "public function run()\n {\n if ( DB::table('students')->count() == 0 ) {\n \tDB::table('students')->insert([\n \t\t[\n \t\t\t'name' => 'Mai Duy Nghĩa',\n \t\t\t'student_code' => '082323942',\n \t\t\t'birthday' => '1999-07-08',\n \t\t\t'phone' => '0347918403',\n \t\t\t'email' => 'maiduynghia87@gmail.com',\n \t\t\t'gender' => 'male',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Nguyễn Tố Như',\n \t\t\t'student_code' => '082323943',\n \t\t\t'birthday' => '2000-01-16',\n \t\t\t'phone' => '0364731718',\n \t\t\t'email' => 'nguyentonhu16@gmail.com',\n \t\t\t'gender' => 'female',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Lâm Vỹ Dạ',\n \t\t\t'student_code' => '082323944',\n \t\t\t'birthday' => '2000-02-16',\n \t\t\t'phone' => '0363731718',\n \t\t\t'email' => 'lamvyda@gmail.com',\n \t\t\t'gender' => 'female',\n \t\t],\n \t]);\n }\n }", "public function save()\n {\t\t\n\t\t$param = [\n \"bank_code\" => $_POST['bank_code'],\n \"account_number\" =>$_POST['account_number'],\n\t\t\t\"amount\" =>$_POST['amount'],\n\t\t\t\"remark\" =>$_POST['remark'],\n\t\t];\n\n\t\t$this->model->saveData($param);\n\t\t$this->show(); \n }", "function add_survey()\n {\n $this->view_data['content'] = 'admin/surveys/edit_survey';\n\n $this->_prep_form_values('validation_survey_edit'); \n\n if ($this->input->post('submit') || $this->isAjax())\n {\n $this->load->model('default/m_survey');\n \n // Either use the original value or the value from POST.\n $this->_form_data['question_id'] = set_value('question_id');\n\n $id = $this->_save('validation_survey_edit', $this->m_survey);\n\n if ($id)\n {\n // If the request is ajax we simply echo boolean true.\n // NOTE: Please make sure that all functions still work even without ajax. Like this one.\n if ($this->isAjax())\n {\n echo $id; exit();\n }\n else\n {\n $this->session->set_flashdata('message', 'Survey saved.');\n \n redirect (current_url());\n }\n }\n }\n\n $this->parser->parse('admin/template', $this->view_data);\n }", "function save_exam(){\n\t\t global $con;\n\t\t $R=$_REQUEST;\n\t\t\t if($_REQUEST['exam_id']){\n\t\t\t $sql=\"UPDATE `exam` SET `exam_title` = '$R[exam_title]', `exam_course` = '$R[exam_course]', `exam_subject` = '$R[exam_subject]', `exam_date` = '$R[exam_date]', `exam_time` = '$R[exam_time]', `exam_desc` = '$R[exam_desc]' WHERE exam_id=$R[exam_id]\";\n\t\t\t\t $msg=\"Exam Record Has Been Updated!!!\";\n\t\t\t }else{\t\t \n\t\t\t $sql=\"INSERT INTO `exam` (`exam_title`, `exam_course`, `exam_subject`, `exam_date`, `exam_time`, `exam_desc`) VALUES ('$R[exam_title]', '$R[exam_course]', '$R[exam_subject]', '$R[exam_date]', '$R[exam_time]', '$R[exam_desc]');\";\n\t\t\t $msg=\"Exam Record Is Saved!!!\";\n\t\t\t\t\t }\n\t\t $rs=mysqli_query($con,$sql) or die(mysqli_error($con));\n\t\t\t if($rs)\n\t\t\t header(\"location:../exam_view.php?msg=$msg\");\n\t\t }", "public function save() {\n $fields = $this->getDbFields();\n\n db_merge('sm_form_submission')\n ->key([\n 'sid' => $this->getSid(),\n ])\n ->fields($fields)\n ->execute();\n }", "function save_answer(){\r\n if (! $this->session->userdata('logged_in')) {\r\n if (! $this->session->userdata('logged_in_raw')) {\r\n \r\n redirect('login');\r\n }\r\n }\r\n if (! $this->session->userdata('logged_in')) {\r\n $logged_in = $this->session->userdata('logged_in_raw');\r\n } else {\r\n $logged_in = $this->session->userdata('logged_in');\r\n }\r\n if ($logged_in['base_url'] != base_url()) {\r\n $this->session->unset_userdata('logged_in');\r\n redirect('login');\r\n }\r\n \r\n echo \"<pre>\";\r\n print_r($_POST);\r\n // insert user response and calculate scroe\r\n echo $this->quiz_model->insert_answer();\r\n }", "public function quizAction()\n {\n\n \t$request = $this->getRequest(); // getting current request object\n $quizSession = new Container('quiz');\n $quizSession->getManager()->getStorage()->clear('quiz');\n $quizSession->offsetUnset('quiz');\n unset($quizSession->elapsed);\n\n \n $studentform = new StudentForm();\n $quizSession->clientId = $this->clientId = $this->params()->fromRoute('clientid');\n $quizSession->linkId = $this->linkId = $this->params()->fromRoute('linkid');\n $quizSession->code = $this->code = $this->params()->fromRoute('code');\n $resultset = $this->getStudentTable()->quizDetails($this->clientId, $this->linkId, $this->code)->toArray();\n $quizSession->testDetails = array();\n $quizSession->testDetails[0] = $resultset;\n\n $this->password=$resultset[0]['password']; \n\n \n if ($request->isPost()) {\n\n $student = new Student();\n $studentform->setInputFilter($student->getInputFilter());\n $postArr = array_keys((array)$request->getPost());\n $postArr = array_diff($postArr, array('pass', 'login'));\n $studentform->setValidationGroup ($postArr);\n $studentform->setData($request->getPost()); // setting requested data to form object\n $response = $this->getResponse();\n if ($studentform->isValid()) {\n $student->exchangeArray($studentform->getData());\n \n $stdarr = (array) $this->getStudentTable()->saveStudent($student);\n $quizSession->testDetails[1] = $stdarr;\n return $this->redirect()->toRoute('student', array(\n 'action' => 'instruction'\n ));\n } else {\n return new ViewModel(array(\n 'form' => $studentform,\n 'arrData' => $resultset\n ));\n }\n } else {\n if ($this->code != 'preview') {\n $data = $this->getStudentTable()->getLinkCodeTime($this->code, $this->linkId);\n $currentTime = (array) new \\DateTime(date('Y-m-d H:i:s'));\n $currentTime = $currentTime['date'];\n if ($data['showfrom'] <= $currentTime && $data['showuntill'] >= $currentTime) {\n return new ViewModel(array(\n 'form' => $studentform,\n 'arrData' => $resultset\n ));\n } else {\n return $this->redirect()->toRoute('student', array(\n 'action' => 'linkExpire'\n ));\n }\n } else {\n if ($this->code == 'preview') {\n\n $as=$this->getStudentTable()->delete_preview_rows();\n\n\n return $this->redirect()->toRoute('student', array(\n 'action' => 'instruction',\n ));\n }\n }\n }\n return new ViewModel(array(\n 'form' => $studentform,\n 'arrData' => $resultset\n ));\n }", "function take($exam_code = '')\n {\n $this->isStudent();\n $page_data['questions'] = $this->db->get_where('questions' , array('exam_code' => $exam_code))->result_array();\n if($this->db->get_where('student_question',array('exam_code'=>$exam_code,'student_id'=>$this->session->userdata('login_user_id')))->row()->answered == 'answered')\n {\n redirect(base_url() . 'student/online_exams/', 'refresh');\n } \n $page_data['exam_code'] = $exam_code;\n $page_data['page_name'] = 'take'; \n $page_data['page_title'] = \"\";\n $this->load->view('backend/index', $page_data);\n }", "function add_question()\n {\n $this->view_data['content'] = 'admin/surveys/edit_question';\n\n $this->_prep_form_values('validation_survey_question_edit');\n\n if ($this->input->post('submit') || $this->isAjax())\n {\n $this->load->model('default/m_survey_questions');\n\n $id = $this->_save('validation_survey_question_edit', $this->m_survey_questions);\n\n if ($id)\n {\n if ($this->isAjax())\n {\n echo $id; exit();\n }\n\n $this->session->set_flashdata('message', 'Question added.');\n \n redirect (current_url());\n }\n }\n $this->parser->parse('admin/template', $this->view_data);\n }", "public function run()\n {\n DB::table('course_student')->insert(array(\n array('course_id' => 1, 'student_id' => 1),\n array('course_id' => 1, 'student_id' => 2),\n ));\n }", "public function submitAjax(){\n parent::submitAjax();\n \n $ajax_name = $_POST['ajax_name'];\n switch ($ajax_name) {\n case \"save_test\":\n ajax_save_test();\n break;\n case \"update_test\":\n $test_id = $_POST['test_id'];\n ajax_update_test($test_id);\n break;\n case \"save_video_question\":\n save_video_question();\n break;\n default:\n echo \"ajax_name not found.\";\n }\n \n }", "function saveQuestion() {\r\n\t\tif (isset ( $_GET ['id'] ))\r\n\t\t\t$id = $_GET ['id'];\r\n\t\t$quest_id = $_GET ['quest_id'];\r\n\t\tif (isset ( $_GET ['difficulty'] )) {\r\n\t\t\t$difficulty = $_GET ['difficulty'];\r\n\t\t} else {\r\n\t\t\t$difficulty = - 1;\r\n\t\t}\r\n\t\tif (isset ( $_GET ['question'] ))\r\n\t\t\t$question = $_GET ['question'];\r\n\t\t\r\n\t\telse\r\n\t\t\t$question = - 1;\r\n\t\t\r\n\t\t$mark = 'accepted';\r\n\t\t$current_userId = $this->getCurrentUserID ();\r\n\t\t//prevent updating when user is not logged in\r\n\t\tif(!$current_userId)\r\n\t\t\t\treturn 0;\t\t\r\n\t\t$user = new User ();\r\n\t\t$user->createFromID ( $current_userId );\r\n\t\t$new_question = new Question ();\r\n\t\t$new_question->question = $question;\r\n\t\t$new_question->mark = $mark;\r\n\t\t$new_question->difficulty = $difficulty;\r\n\t\t$new_question->diff_count = 0;\r\n\t\t$new_question->user = $user;\r\n\t\tif (isset ( $quest_id ) && $quest_id > 0) {\r\n\t\t\t$old_question = new Question ();\r\n\t\t\t$old_question->createFromID ( $quest_id );\r\n\t\t\t//if ($this->needToEdit($old_question, $new_question)) { //need to fix the function\r\n\t\t\t$quest_ownerId = $old_question->user->id;\r\n\t\t\t$new_question->item_id = $old_question->item_id;\r\n\t\t\tif ($quest_ownerId == $current_userId) { //simple editing\r\n\t\t\t\t$new_question->id = $old_question->id;\r\n\t\t\t\tif ($difficulty < 0) {\r\n\t\t\t\t\t$new_question->difficulty = $old_question->difficulty;\r\n\t\t\t\t}\r\n\t\t\t\t$new_question->diff_count = $old_question->diff_count;\r\n\t\t\t\t$new_question->unMarkDoubtful ();\r\n\t\t\t\t$new_question->edit ();\r\n\t\t\t\t//echo (htmlentities($new_question->question, ENT_QUOTES));\r\n\t\t\t\techo json_encode ( $new_question->id );\r\n\t\t\t\r\n\t\t//\r\n\t\t\t} else { //based_on creating\t\t\t\t\t\t\r\n\t\t\t\t$new_question->based_on = $quest_id;\r\n\t\t\t\tif ($difficulty < 0) {\r\n\t\t\t\t\t$new_question->difficulty = $old_question->difficulty;\r\n\t\t\t\t\t$new_question->diff_count = $old_question->diff_count;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$new_question->diff_count = $old_question->diff_count;\r\n\t\t\t\t}\r\n\t\t\t\tif ($question < 0)\r\n\t\t\t\t\t$new_question->question = $old_question->question;\r\n\t\t\t\t$new_question_id = $new_question->create ();\r\n\t\t\t\techo json_encode ( $new_question_id );\r\n\t\t\t}\r\n\t\t\r\n\t\t//}\r\n\t\t} else { //create absolutely new question\t\t\r\n\t\t\t$slide = new Slide ();\r\n\t\t\t$slide->id = $id;\r\n\t\t\t$basic_id = $slide->getBasicId ();\r\n\t\t\t$new_question->item_id = $basic_id;\r\n\t\t\t$new_question->based_on = NULL;\r\n\t\t\t$new_question_id = $new_question->create ();\r\n\t\t\techo json_encode ( $new_question_id );\r\n\t\t}\r\n\t}", "function nb_asmt_student_callback( $post ){\n\t\t$nb_student_id = $post->post_author;\n\t\n\t\t$nb_student_info = get_user_by('id',$nb_student_id);\n\t\t$roles_arr = array_reverse( explode( '_', $nb_student_info->roles[0] ) ); \n\t\tif( $roles_arr[0] == 'inactive'){\n\t\t\t$asmt_stud_notice = \"<div class='error'><p><strong>This student's account is marked as inactive! Go to <a href='/wp-admin/admin.php?page=edit_student&student_id={$nb_student_id}' target='_blank'>student account</a> for details.</strong></p></div>\";\n\t\t} \n\t\t$acct_status = ucwords( implode( ' ', $roles_arr ) );\n\t\t\n\t\t//print_pre($nb_student_info);\n\t\tif( isset($asmt_stud_notice) ){\n\t\t\techo \"{$asmt_stud_notice}\";\t\t\n\t\t}\n\t\t$nbAsmt = new NB_Assignment( $nb_student_id );\n\t\t$prg_arr = $nbAsmt->get_progress_report();\n\t\t\n\t\t$percentComplete = ( !empty( $prg_arr['percentComplete'] ) )? $prg_arr['percentComplete'] : 0 ;\n\t\t$completedAsmts = ( !empty( $prg_arr['completedAsmt']) )? $prg_arr['completedAsmt'] : 0 ;\n\t\t$totalAsmt = ( !empty( $prg_arr['totalAsmt']) )? $prg_arr['totalAsmt'] : 0 ;\n\t\t$nb_stud_progress = $percentComplete.\"% (\".$completedAsmts.\"/\".$totalAsmt.\")\";\n\t\t\n\t\t\n\t\techo \"<strong>Student:</strong> <a href='/wp-admin/admin.php?page=edit_student&student_id={$nb_student_id}' target='_blank'>{$nb_student_info->display_name}</a><br>\n\t\t <strong>Account Status:</strong> {$acct_status}<br>\n\t\t\t <strong>Start Date:</strong> {$nb_student_info->user_registered}<br>\n\t\t\t <strong>Course Progress:</strong> {$nb_stud_progress}<br>\n\t\t\t <br>\n\t\t\t Go to <a href='/wp-admin/admin.php?page=edit_student&student_id={$nb_student_id}' target='_blank'>account details.</a><br>\n\t\t\t \n\t\t\";\t\n\t}", "public function accept_assignment() {\n \tif(!isset( $_POST[\"assignment_id\"] )) WPASController::ajaxError('Missing assignment_id');\n \tif(!isset( $_POST[\"points\"] )) WPASController::ajaxError('Missing earned badges by the student');\n \t\t// now set our response var equal to that of the POST var (this will need to be sanitized based on what you're doing with with it)\n \t\t// send the response back to the front end\n \t\ttry{\n \t\t \n \t\t $result = BreatheCodeAPI::updateStudentAssignment([\n \t\t 'assignment_id' => $_POST[\"assignment_id\"],\n \t\t 'status' => 'reviewed',\n \t\t 'badges' => $_POST[\"points\"]\n \t\t ]);\n\n \t\t WPASController::ajaxSuccess($result);\n \t\t}\n \t\tcatch(Exception $e){\n WPASController::ajaxError($e->getMessage());\n \t\t}\n }", "function register_student()\n\t{\n\t\taccess_control($this);\n\t\t\n\t\t# Get the passed details into the url data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'i', 'student'));\n\t\t\n\t\t# Pick all assigned data\n\t\t$data = assign_to_data($urldata);\t\n\n\n\t\t$data = restore_bad_chars($data);\n\n\n if(!empty($data['student']) && $data['student'] == 'true')\n {\n\n $required_fields = array('term', 'class', 'selected-reg-subjects');\n $data['regstudents'] = 'regstudents';\n }\n else\n {\n\n $required_fields = array('reg-term', 'reg-class', 'selected-reg-students');\n }\n\n\t\tif(!empty($data['regstudents']))\n\t\t{\n $_POST = clean_form_data($data);\n\t\t\t$validation_results = validate_form('', $_POST, $required_fields);\n \t\t\t\n #Only proceed if the validation for required fields passes\n\t\t\tif($validation_results['bool'])\n\t\t\t{\n\t\t\t\t#Attach school, student and author to post data\n\t\t\t\t$_POST['school'] = $this->schoolinfo['id'];\n\t\t\t\t$_POST['author'] = $this->session->userdata('userid');\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t#Initialise error variables\n\t\t\t\t$registered_class = $registered_term = array();\n\t\t\t\t$err_string = '';\n\t\t\t\t\n\t\t\t\t#initialise result\n\t\t\t\t$result = FALSE;\n\t\t\t\t\n \tif(!empty($data['i']))\n {\n\t\t\t\t\t$registerid = decryptValue($data['i']);\n\t\t\t\t\t\n\t\t\t\t\t#Check if the student has already been registered for the selected term in another record besides the current one\n\t\t\t\t\t$registered_term = $this->Query_reader->get_row_as_array('search_register', array('limittext'=>'', 'isactive' => 'Y','searchstring' => ' term = \"'.$_POST['term'].'\" AND student = '.$registerid.' '));\n\t\t\t\t\t\n\t\t\t\t\t#Also check if the student has already been registered for the selected class in another record besides the current one.\t\n\t\t\t\t\tif(empty($registered_term))\n\t\t\t\t\t{\n\t\t\t\t\t\t$registered_class = $this->Query_reader->get_row_as_array('search_register', array('limittext'=>'', 'isactive' => 'Y','searchstring' => ' class = '.$_POST['class'].' AND student = '.$registerid.''));\n\t\t\t\t\t}\n $_POST['subjects'] = '|' . str_replace(',', '|', $_POST['selected-reg-subjects']) . '|';\n $_POST['editid'] = $registerid;\n # at the moment no update..\n\t\t\t\t\t//$result = $this->student_mod->update_registration_details($_POST);\n $result = $this->db->query($this->Query_reader->get_query_by_code('register_student', array('school'=>$_POST['school'],'student'=>$registerid,'term'=> $_POST['term'],'class'=>$_POST['class'],'stream'=>'','author'=>'','subjects'=>$_POST['selected-reg-subjects'])));\n\n }\n else\n {\n\t\t\t\t\t$selected_reg_students = explode('^', $_POST['selected-reg-students']);\n\t\t\t\t\t\n\t\t\t\t\t#check if any of the students has been registered for the term\n\t\t\t\t\tif(!empty($selected_reg_students))\n\t\t\t\t\t\t$registered_students = $this->db->query($this->Query_reader->get_query_by_code('search_register', array('limittext'=>'', 'isactive' => 'Y','searchstring' => ' term = '.$_POST['reg-term'].' AND student IN ('.implode(',', $selected_reg_students).')')))\n\t\t\t\t\t\t\t\t\t->result_array();\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\tif(!empty($registered_students))\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp_selected_students_array = $selected_reg_students;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$err_string = '<table cellpadding=\"5\" cellspacing=\"0\">'.\n\t\t\t\t\t\t\t\t\t '<tr><td colspan=\"2\">The following students have already been registered for the selected term. <br />Click the edit icon to update their registration details instead.</td></tr>';\t\n\t\t\t\t\t\t\t\t\t \t\t\t\t\t \n\t\t\t\t\t\t//sieve out already registered students\n\t\t\t\t\t\tforeach($registered_students as $registered_student)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$registered_student_info = get_db_object_details($this, 'students', $registered_student['student']);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$err_string .= '<tr>'.\n\t\t\t\t\t\t\t'<td width=\"1%\"><a onclick=\"javascript:alert(/\"mover/\");\" href=\"javascript:alert(\\'sdsdsds\\'); updateFieldLayer(\\''.base_url().'students/student_profile/i/'.encryptValue($registered_student['student']).'\\', \\'\\', \\'\\', \\'contentdiv\\', \\'\\');\" title=\"Click to edit '.$registered_student_info['firstname'].'\\'s details.\">\n\t\t\t\t\t\t\t<img src=\"'.base_url().'images/edit.png\" border=0 /></a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>'.$registered_student_info['firstname'].' '.$registered_student_info['lastname'].'</td>\n\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t$registered_student_key = array_search($registered_student['student'], $temp_selected_students_array);\n\t\t\t\t\t\t\tif($registered_student_key !== FALSE)\n\t\t\t\t\t\t\t\tunset($temp_selected_students_array[$registered_student_key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$err_string .= '</table>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$selected_reg_students = $temp_selected_students_array;\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//register the selected students\n\t\t\t\t\t\t#Format data for the query\n\t\t\t\t\t\t$reg_query_data = '';\n\t\t\t\t\t\tforeach($selected_reg_students as $selected_reg_student)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//save finances for each student\n\t\t\t\t\t\t\t$this->save_student_reg_admission_finances(array('class'=>$_POST['reg-class'], 'term'=>$_POST['reg-class'], 'studentid'=>$selected_reg_student));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$reg_query_data .= ($reg_query_data == '')? '('.$this->schoolinfo['id'].', '.$selected_reg_student.', '.$_POST['reg-term'].', '.$_POST['reg-class'].', 0, '.$this->session->userdata('userid').', \"'.$_POST['selected-reg-subjects'].'\")' : \n\t\t\t\t\t\t\t', ('.$this->schoolinfo['id'].', '.$selected_reg_student.', '.$_POST['reg-term'].', '.$_POST['reg-class'].', 0, '.$this->session->userdata('userid').', \"'.$_POST['selected-reg-subjects'].'\")';\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$result = $this->db->query($this->Query_reader->get_query_by_code('register_many_students', array('rows'=>$reg_query_data)));\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\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//register the selected students\n\t\t\t\t\t\t#Format data for the query\n\t\t\t\t\t\t$reg_query_data = '';\n\t\t\t\t\t\tforeach($selected_reg_students as $selected_reg_student)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//save finances for each student\n\t\t\t\t\t\t\t$this->save_student_reg_admission_finances(array('class'=>$_POST['reg-class'], 'term'=>$_POST['reg-class'], 'studentid'=>$selected_reg_student));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$reg_query_data .= ($reg_query_data == '')? '('.$this->schoolinfo['id'].', '.$selected_reg_student.', '.$_POST['reg-term'].', '.$_POST['reg-class'].', 0, '.$this->session->userdata('userid').', \"'.$_POST['selected-reg-subjects'].'\")' : \n\t\t\t\t\t\t\t', ('.$this->schoolinfo['id'].', '.$selected_reg_student.', '.$_POST['reg-term'].', '.$_POST['reg-class'].', 0, '.$this->session->userdata('userid').', \"'.$_POST['selected-reg-subjects'].'\")';\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$result = $this->db->query($this->Query_reader->get_query_by_code('register_many_students', array('rows'=>$reg_query_data)));\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t\n }\n\t\t\t\t\n\t\t\t\tif($result)\n\t\t\t\t{\n\t\t\t\t\t$data['msg'] = \"Students' registration data has been updated.\";\n\n\t\t\t\t\tif(!empty($err_string))\n\t\t\t\t\t\t$data['msg'] = \"WARNING: \".$err_string;\n\n if(!empty($data['student']) && $data['student'] == 'true')\n {\n #registration_info\n $registration_info = $this->Query_reader->get_row_as_array('search_register', array('limittext'=>'', 'isactive' => 'Y','searchstring' => ' id ='.$registerid));\n\n $this->get_student_academics($registration_info['student'], $registration_info['term']);\n return;\n }\n }\n else\n {\n\t\t\t\t\t$data['msg'] = \"ERROR: The student's registration data was not saved.<br />\".$err_string;\n }\n \t}#VALIDATION end\n\t\t\t\n\t\t\t\n\t\t\tif((empty($validation_results['bool']) || (!empty($validation_results['bool']) && !$validation_results['bool'])) \n\t\t\t&& empty($data['msg']) )\n\t\t\t{\n\t\t\t\t$data['msg'] = \"WARNING: The highlighted fields are required.\";\n\t\t\t}\n\t\t\t\n\t\t\t$data['requiredfields'] = $validation_results['requiredfields'];\n\t\t\t\n\t\t\t#Get the school terms\n\t\t\t$data['terms'] = $this->terms->get_terms();\n\t\t\t\n\t\t\t//Concatenate years to the terms for the user\n\t\t\tforeach($data['terms'] as $key => $termdetails)\n\t\t \t\t$data['terms'][$key]['term'] = $data['terms'][$key]['term'].' ['.$termdetails['year'].']';\n\t\t\n\t\t\t#Get the school classes\n\t\t\t$data['classes'] = $this->class_mod->get_classes();\n\t\t\n\t\t\t#Get the school subjects\n\t\t\t$subjects = $this->db->query($this->Query_reader->get_query_by_code('search_subjects', array('isactive'=>'Y', 'limittext'=>'', 'searchstring'=>' AND school = '.$this->schoolinfo['id'])));\n\t\t\t\n\t\t\t$data['subjects'] = $subjects->result_array();\n\t\t\t\t\t\t\n\t\t\t$data['formdata'] = $_POST;\n\t\t\t\n\t\t}\t\n\t\t\n\t\t\n\t\t$this->load->view('students/registration_results', $data);\n\t}", "public function reloadEnrolledStudents($class,$schid)\n {\n // Try and Catch block\n try\n {\n //$termid = $this->getActiveTerm($schid);\n $sessionid = $this->getActiveSession($schid);\n \t\t\t $query =\"SELECT student_class.id AS ID,\n CONCAT(student_initial.surname, ', ', LOWER(student_initial.firstName), ' ',LOWER(student_initial.lastName) ) AS Fullname\n FROM student_class\n INNER JOIN student_initial ON student_class.student_id=student_initial.id\n WHERE \n student_class.stud_class=? AND student_class.stud_sess_id=?\n AND student_class.stud_school_id=?\";\n $this->conn->query($query);\n //$this->conn->bind(1, $studentID, PDO::PARAM_INT);\n\t\t\t\t\t$this->conn->bind(1, $class, PDO::PARAM_INT);\n $this->conn->bind(2, $sessionid, PDO::PARAM_INT);\n $this->conn->bind(3, $schid, PDO::PARAM_INT);\n $myResult = $this->conn->resultset();\n\n //loop through the result\n if($this->conn->rowCount() == 0)\n {\n exit(\"No enrolled student seen!\");\n }\n else{\n $printOutput = \" \";\n $printOutput.=\"<hr>\";\n $printOutput.='<h6 class=\"top-header\">New Enrolled Students</h6>';\n $printOutput.= '<table class=\"transparent-table\">';\n $printOutput.='<tr><th>#</th>\n <th>Student Name</th>\n <th>Remove</th>';\n $ci=1;\n foreach($myResult as $row => $key)\n {\n //TODO: CREATE TWO FUNCTIONS IN JAVASCRIPT TO DIAPLAY DETAILS OF CA AND EXAMS WHEN BUTTON IS CLICKED\n $printOutput.='<tr>';\n $printOutput.='<td>'.$ci.'</td>';\n $printOutput.='<td>'.$key['Fullname'].'</td>';\n $printOutput.='<td><button type=\"button\" data-id=\"'.$key['ID'].'\" class=\"btn btn-outline-danger btn-sm\" id=\"remove-enrolled-student\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i></button></td>'; \n $printOutput.='</tr>'; \n $ci++;\n }\n $printOutput.= \"</table>\";\n echo $printOutput;\n \t\t }\n // } \n \t\n \t\t // else\n \t\t // {\n // exit(\"Can not find search record, something went wrong!\");\n \t\t // }\n }\n catch(Exception $e)\n {\n //echo error here\n //this get an error thrown by the system\n echo \"Error:\". $e->getMessage();\n }\n }", "protected function save() {\n //inspect($_SESSION);\n try {\n if (!$this->document->getUser()->isAuthenticated() && !$this->getParam('noCaptcha')) {\n $this->checkCaptcha();\n }\n $this->saveData();\n\n $this->response->redirectToCurrentSection('success/');\n } catch (SystemException $e) {\n $this->failure($e->getMessage(), $_POST[$this->getTableName()]);\n }\n }", "function AfterAdd(&$values,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n$ID=$keys['ID'];\n$course=$values['CourseID'];\n\n$sql_at= \"SELECT Code FROM course_moe WHERE CourseID='$course'\";\n$query_at=db_query($sql_at,$conn);\n$row_at=db_fetch_array($query_at);\n\n$code=substr($row_at['Code'],0,1);\t\nif($code='P'){\n\t$result=substr($values['Final_Exam'],0,1);\t\n\t\t\tswitch ($result)\n\t\t{\n\t\tcase ($result=='E'):\n\t\t $status='FAIL';\n\t\t break;\n\t\tcase ($result='D'):\n\t\t $status='PASS';\n\t\t break;\n\t\tcase ($result=='C'):\n\t\t $status='GOOD';\n\t\t break;\n\t\tcase ($result=='A'):\n\t\t $status='EXCELLENT';\n\t\t break;\n\t\tcase ($result=='T'):\n\t\t $status='T';\n\t\t break;\n\t\tdefault:\n\t\t\t$status='';\n\t\t}\n\n\t//update result status\n\t$sql_up= \"UPDATE student_course_moe SET Exam_Status='$status' WHERE ID=$ID \";\n\t$query_up=db_exec($sql_up,$conn);\n}\nelse if($code='A'){\n$result=$values['Final_Exam'];\t\n\t\tswitch ($result)\n\t\t{\n\t\tcase ($result=='E' || $result='D-' || $result='D' || $result='D+'):\n\t\t $status='NOT COMPETENCE';\n\t\t break;\n\t\tcase ($result=='C' || $result='C+' ):\n\t\t $status='NOT COMPETENCE';\n\t\t break;\n\t\tcase ($result=='B' || $result='B-' || $result='B+' ):\n\t\t $status='COMPETENCE';\n\t\t break;\n\t\tcase ($result=='A-'):\n\t\t $status='GOOD COMPETENCE';\n\t\t break;\n\t\tcase ($result=='A'):\n\t\t $status='EXCELLENT COMPETENCE';\n\t\t break;\n\t\tcase ($result=='T'):\n\t\t $status='T';\n\t\t break;\n\t\tdefault:\n\t\t\t$status='';\n\t\t}\n\t//update result status\n\t$sql_up= \"UPDATE student_course_moe SET Exam_Status ='$status' WHERE ID=$ID \";\n\t$query_up=db_exec($sql_up,$conn);\n}else{}\n;\t\t\n}", "public function run()\n {\n DB::table('subjects')->insert([\n \t\t['subject' => 'ELA'],\n \t\t['subject' => 'Math'],\n \t\t['subject' => 'Science'],\n \t\t['subject' => 'Social Studies']\n ]);\n }", "function submitSurvey()\n\t\t\t\t{\n\t\t\t\t\t//Get connection from outside the scope\n\t\t\t\t\tglobal $conn;\n\t\t\t\t\t//Sets current date account created\n\t\t\t\t\t$timeStamp = date('Y-m-d H:i:s', time());\n\n\t\t\t\t\t//Declare Varibles to null\n\t\t\t\t\t$quality = $first_name = $last_name = $return_prob = $suggestions = \"\";\n\t\t\t\t\t\n\t\t\t\t\t$quality = $_POST[\"quality\"];\n\t\t\t\t\t$first_name = test_input($_POST[\"firstname\"]);\n\t\t\t\t\t$last_name = test_input($_POST[\"lastname\"]);\n\t\t\t\t\t$return_prob = $_POST[\"rating\"];\n\t\t\t\t\t$suggestions = test_input($_POST[\"user_suggestion\"]);\n\n\n\t\t\t\t\t//PHP Prepared statments make it easy exuctuting SQL statements repeatedly with high efficiency\n\t\t\t\t\t$stmt = $conn->prepare(\"INSERT INTO surveys (quality, first_name, last_name, return_probability, suggestions, submitted)\n\t\t\t\t\tVALUES (?, ?, ?, ?, ?, ?)\");\n\t\t\t\t\t$stmt->bind_param(\"isssss\", $quality, $first_name, $last_name, $return_prob, $suggestions, $timeStamp);\n\t\t\t\t\t//$stmt stands for statement that could have been calle anything \n\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t//Close PHP prepared Statements\n\t\t\t\t\t$stmt->close();\n\t\t\t\t\t\n\t\t\t\t\t//Bring to Coupon page\n\t\t\t\t\theader(\"Location: http://localhost/survey/thank_you.html\");\n\t\t\t\t\tdie();\n\n\t\t\t\t}", "public function save_quiz(){\n\n if(!empty($_SESSION[\"client\"])) {\n\n $data['question'] = !empty($_POST['question']) ? $_POST['question'] : false;\n $data['description'] = !empty($_POST['description']) ? $_POST['description'] : false;\n $data['txt_answer_1'] = !empty($_POST['txt_answer_1']) ? $_POST['txt_answer_1'] : false;\n $data['txt_answer_2'] = !empty($_POST['txt_answer_2']) ? $_POST['txt_answer_2'] : false;\n $data['txt_answer_3'] = !empty($_POST['txt_answer_3']) ? $_POST['txt_answer_3'] : false;\n $data['txt_answer_4'] = !empty($_POST['txt_answer_4']) ? $_POST['txt_answer_4'] : false;\n $data['txt_answer_5'] = !empty($_POST['txt_answer_5']) ? $_POST['txt_answer_5'] : false;\n $data['status'] = !empty($_POST['status']) ? $_POST['status'] : 0;\n\n\n $data['id_user'] = $_SESSION[\"client\"]['id'];\n\n if( $data['question'] && $data['txt_answer_1'] && $data['txt_answer_2'] && $data['txt_answer_3'] && $data['txt_answer_4'] && $data['txt_answer_5'] ){\n\n $this->load_model('Quizzes_model');\n\n $this->Quizzes_model->save($data);\n\n\n $this->load_view('create_quiz',array('msg'=>array('type'=>'success','content'=>'Enquete salva com sucesso.')));\n\n }else{\n\n $data['msg'] = array('type'=>'warning','content'=>'Há campos obrigatórios não preenchidos no formulário.');\n $this->load_view('create_quiz',$data);\n\n }\n\n }else{\n $base_url = base_url();\n\n header(\"Location: \" . $base_url);\n }\n\n }", "function save ()\n {\n try {\n $GLOBALS['DB']->exec(\"INSERT INTO checkouts (patron_id, copy_id, due_date) VALUES (\n {$this->getPatronId()},\n {$this->getCopyId()},\n '{$this->getDueDate()}');\n \");\n $this->id = $GLOBALS['DB']->lastInsertId();\n } catch (PDOException $e) {\n echo \"There was an error: \" . $e->getMessage();\n }\n }", "public function save(){\n if ($this->id){\n $query = sprintf('update student set name = \"%s\",school_id = \"%s\",family_id = \"%s\",relation_id = \"%s\",teacher_id = %d,gender = %d,birthday = \"%s\", latest_data_week = %d where id = %d',\n mysql_real_escape_string($this->name,$GLOBALS['DB']),\n mysql_real_escape_string($this->school_id,$GLOBALS['DB']),\n mysql_real_escape_string($this->family_id,$GLOBALS['DB']),\n mysql_real_escape_string($this->relation_id,$GLOBALS['DB']),\n mysql_real_escape_string($this->teacher_id,$GLOBALS['DB']),\n\t\t\tmysql_real_escape_string($this->gender,$GLOBALS['DB']),\n\t\t\tmysql_real_escape_string($this->birthday,$GLOBALS['DB']),\n\t\t\tmysql_real_escape_string($this->latest_data_week,$GLOBALS['DB']),\n $this->id\n );\n mysql_query(\"set names 'gbk'\");\n return mysql_query($query,$GLOBALS['DB']);\n }\n else{\n $query = sprintf('insert into student (name,school_id,family_id,relation_id,teacher_id,gender,birthday,latest_data_week) values (\"%s\",\"%s\",\"%s\",\"%s\",%d,%d,\"%s\",%d)',\n mysql_real_escape_string($this->name,$GLOBALS['DB']),\n mysql_real_escape_string($this->school_id,$GLOBALS['DB']),\n mysql_real_escape_string($this->family_id,$GLOBALS['DB']),\n mysql_real_escape_string($this->relation_id,$GLOBALS['DB']),\n mysql_real_escape_string($this->teacher_id,$GLOBALS['DB']),\n\t\t\tmysql_real_escape_string($this->gender,$GLOBALS['DB']),\n\t\t\tmysql_real_escape_string($this->birthday,$GLOBALS['DB']),\n\t\t\tmysql_real_escape_string($this->latest_data_week,$GLOBALS['DB'])\n );\n mysql_query(\"set names 'gbk'\");\n if (mysql_query($query,$GLOBALS['DB'])){\n $this->id = mysql_insert_id($GLOBALS['DB']);\n return true;\n }\n else return false;\n }\n }", "public function savekinStartregistration()\n {\n\n if ($_SESSION['applicant_id'] != null) {\n\n $applicant_id = $_SESSION['applicant_id'];\n // Next of Kin details\n $nextofkin_fullname = $this->core->cleanPost['nextofkin_fullname'];\n $nextofkin_relationship = $this->core->cleanPost['nextofkin_relationship'];\n $nextofkin_postaladdress = $this->core->cleanPost['nextofkin_postaladdress'];\n $nextofkin_telephone = $this->core->cleanPost['nextofkin_telephone'];\n $nextofkin_email = $this->core->cleanPost['nextofkin_email'];\n\n //load the data for the next of kin in the database\n $sql = \"INSERT INTO `appl_nextofkin` (`applicantno`, `fullname`, `relationship`,`postaladdress`, `telephone`, `email`) \n VALUES ('$applicant_id', '$nextofkin_fullname', '$nextofkin_relationship', '$nextofkin_postaladdress','$nextofkin_telephone','$nextofkin_email');\";\n\n if ($this->core->database->doInsertQuery($sql)) {\n //echo '<script> alert(\"test\"); </script>';\n } else {\n //echo $sql.error;\n \n }\n\n // Adding variables to session\n $_SESSION['nextofkin_fullname'] = $nextofkin_fullname;\n $_SESSION['nextofkin_relationship'] = $nextofkin_relationship;\n $_SESSION['nextofkin_postaladdress'] = $nextofkin_postaladdress;\n $_SESSION['nextofkin_telephone'] = $nextofkin_telephone;\n $_SESSION['nextofkin_email'] = $nextofkin_email;\n\n\n // Sponsor details\n $sponsor_sponsorname = $this->core->cleanPost['sponsor_sponsorname'];\n $sponsor_relationship = $this->core->cleanPost['sponsor_relationship'];\n $sponsor_telephone = $this->core->cleanPost['sponsor_telephone'];\n $sponsor_postaladdress = $this->core->cleanPost['sponsor_postaladdress'];\n $sponsor_email = $this->core->cleanPost['sponsor_email'];\n\n //load the data for the next of sponsor in the database\n $sql = \"INSERT INTO `appl_sponsor` (`applicantno`, `sponsorname`, `relationship`,`postaladdress`, `telephone`, `email`) \n VALUES ('$applicant_id', '$sponsor_sponsorname', '$sponsor_relationship', '$sponsor_telephone','$sponsor_postaladdress','$sponsor_email');\";\n\n if ($this->core->database->doInsertQuery($sql)) {\n echo '<div class=\"successpopup\">The requested sponsor account has been created.<br/> WRITE THE FOLLOWING INFORMATION DOWN OR REMEMBER IT!</div>';\n } else {\n //echo $sql.error;\n echo '<div class=\"successpopup\">The requested sponsor account has failed to be created .<br/> CHECK THE DETAILS!</div>';\n }\n\n\n // Adding variables to session\n $_SESSION['sponsor_sponsorname'] = $sponsor_sponsorname;\n $_SESSION['sponsor_relationship'] = $sponsor_relationship;\n $_SESSION['sponsor_telephone'] = $sponsor_telephone;\n $_SESSION['sponsor_postaladdress'] = $sponsor_postaladdress;\n $_SESSION['sponsor_email'] = $sponsor_email;\n\n\n // Employment details\n $employment_employer = $this->core->cleanPost['employment_employer'];\n $employment_jobtitle = $this->core->cleanPost['employment_jobtitle'];\n $employment_postaladdress = $this->core->cleanPost['employment_postaladdress'];\n $employment_telephone = $this->core->cleanPost['employment_telephone'];\n $employment_dateofappointment = $this->core->cleanPost['employment_dateofappointment'];\n\n\n //load the data for the next of sponsor in the database\n $sql = \"INSERT INTO `appl_employment` (`applicantno`, `employer`, `jobtitle`,`postaladdress`, `telephone`, `dateofappointment`) \n VALUES ('$applicant_id', '$employment_employer', '$employment_jobtitle', '$employment_postaladdress','$employment_telephone','$employment_dateofappointment');\";\n\n if ($this->core->database->doInsertQuery($sql)) {\n echo '<div class=\"successpopup\">The requested employment account has been created.<br/> WRITE THE FOLLOWING INFORMATION DOWN OR REMEMBER IT!</div>';\n } else {\n echo $sql . error;\n echo '<div class=\"successpopup\">The requested employment account has failed to be created .<br/> CHECK THE DETAILS!</div>';\n }\n\n\n // Adding variables to session\n $_SESSION['employment_employer'] = $employment_employer;\n $_SESSION['employment_jobtitle'] = $employment_jobtitle;\n $_SESSION['employment_postaladdress'] = $employment_postaladdress;\n $_SESSION['employment_telephone'] = $employment_telephone;\n $_SESSION['employment_dateofappointment'] = $employment_dateofappointment;\n\n echo \"<script> location.href='http://192.168.0.33/sis/startregistration/previous/'; </script>\";\n \n } else {\n echo \"<script> location.href='http://192.168.0.33/sis/startregistration/access/'; </script>\";\n }\n }", "public function webinar() {\n $this->viewBuilder()->setLayout('ajax');\n $this->loadModel('WebinarAccounts');\n $webinarAccount = $this->WebinarAccounts->find('all')->first();\n $webinarAccount->code = empty($_REQUEST['code']) ? \"\" : $_REQUEST['code'];\n $this->WebinarAccounts->save($webinarAccount);\n }", "public function coursePost()\n\t{\n\t \n\t\t//echo \"<pre>\"; print_r($_POST);\n\t\tunset($_POST['Submit']);\n\t\t$insertArray = $_POST;\n\t\t$this->trainingdb->saveCourse($insertArray);\n\t\tredirect('training');\n\t}", "public function ajax_save_exam_attendance(){\n \t$data = array();\n $data['student_id'] = !empty($_POST['student_id']) ? $_POST['student_id'] : '';\n $data['exam_id'] = !empty($_POST['exam_id']) ? $_POST['exam_id'] : '';\n $data['class_id'] = !empty($_POST['class_id']) ? $_POST['class_id'] : '';\n $data['section_id'] = !empty($_POST['section_id']) ? $_POST['section_id'] : '';\n $data['subject_id'] = !empty($_POST['subject_id']) ? $_POST['subject_id'] : '';\n $data['present_status'] = 0;\n if(isset($_POST['present']))\n $data['present_status'] = $_POST['present'];\n\n $data['created_at'] = date('Y-m-d H:i:s');\n // echo \"<pre>\";print_r($data);echo \"</pre>\";exit;\n \n $this->load->model('mdl_eattendance');\n $insert_status = $this->mdl_eattendance->save_attendance($data);\n if($insert_status){\n \t$response = array(\n 'status'=>'1',\n 'message' => 'Exam attendance has been taken successfully',\n 'class' => 'alert alert-success fade in'\n );\n }else{\n \t$response = array(\n 'status'=>'0',\n 'message' => 'Something went wrong, please try again later',\n 'class' => 'alert alert-danger fade in'\n );\n }\n echo json_encode($response);\n\t\t// $this->session->set_flashdata('item', $message);\n // redirect('sattendance');\n\t}", "public function saveAnswer($attempt, $page, $next_page, $answer, $reviewed, $time_spend, $section);", "public function callbackSubmit()\n {\n // Get values from the submitted form\n $title = $this->form->value(\"title\");\n $text = $this->form->value(\"extra-information\");\n $tags = $this->form->value(\"tags\");\n $tagArray = explode(\" \", $tags);\n\n\n $session = $this->di->get(\"session\");\n $userId = $session->get(\"userId\");\n\n $question = new Question();\n $question->setDb($this->di->get(\"dbqb\"));\n $question->title = $title;\n $question->text = $text;\n $question->userId = $userId;\n $question->created = date(\"Y-m-d H:i:s\");\n $question->save();\n\n $sql = \"SELECT MAX(id) AS id FROM Question;\";\n $db = $this->di->get(\"dbqb\");\n $db->connect();\n $res = $db->executeFetch($sql);\n\n if ($tags != \"\") {\n foreach ($tagArray as $item) {\n $tag = new Tag();\n $tag->setDb($this->di->get(\"dbqb\"));\n $tag->text = $item;\n $tag->questId = $res->id;\n $tag->save();\n }\n }\n\n $this->form->addOutput(\"Question was posted.\");\n return true;\n }", "public function saveProgram()\n {\n\n // profram details\n $Program_type = $this->core->cleanPost['Program_type'];\n $mode_of_study = $this->core->cleanPost['mode_of_study'];\n $campus = $this->core->cleanPost['campus'];\n $how_you_head_of_nipa = $this->core->cleanPost['how_you_head_of_nipa'];\n $selected_program = $this->core->cleanPost['selected_program'];\n\n // Adding variables to session\n $_SESSION['Program_type'] = $Program_type;\n $_SESSION['mode_of_study'] = $mode_of_study;\n $_SESSION['campus'] = $campus;\n $_SESSION['how_you_head_of_nipa'] = $how_you_head_of_nipa;\n $_SESSION['selected_program'] = $selected_program;\n\n\n // User registration details\n $email = $this->core->cleanPost['email'];\n $password = $this->core->cleanPost['password'];\n $sponsor_telephone = $this->core->cleanPost['sponsor_telephone'];\n $sponsor_postaladdress = $this->core->cleanPost['sponsor_postaladdress'];\n $sponsor_email = $this->core->cleanPost['sponsor_email'];\n\n // Adding variables to session\n $_SESSION['sponsor_sponsorname'] = $sponsor_sponsorname;\n $_SESSION['sponsor_relationship'] = $sponsor_relationship;\n $_SESSION['sponsor_telephone'] = $sponsor_telephone;\n $_SESSION['sponsor_postaladdress'] = $sponsor_postaladdress;\n $_SESSION['sponsor_email'] = $sponsor_email;\n\n\n // Employment details\n $employment_employer = $this->core->cleanPost['employment_employer'];\n $employment_jobtitle = $this->core->cleanPost['employment_jobtitle'];\n $employment_postaladdress = $this->core->cleanPost['employment_postaladdress'];\n $employment_telephone = $this->core->cleanPost['employment_telephone'];\n $employment_dateofappointment = $this->core->cleanPost['employment_dateofappointment'];\n\n // Adding variables to session\n $_SESSION['employment_employer'] = $employment_employer;\n $_SESSION['employment_jobtitle'] = $employment_jobtitle;\n $_SESSION['employment_postaladdress'] = $employment_postaladdress;\n $_SESSION['employment_telephone'] = $employment_telephone;\n $_SESSION['employment_dateofappointment'] = $employment_dateofappointment;\n\n //load the data in the database\n $sql = \"INSERT INTO `newapplicantlog` (`emailornumber`, `applicantID`, `datetimelogged`) \n VALUES ('$emailadd', '$idd', '$dateTimeLogged');\";\n\n $this->core->redirect(\"startregistration\", \"show2\", NULL);\n }", "public function run()\n {\n $student = new Student();\n\t $student -> firstname='Ankit';\n\t $student -> lastname='Singhal';\n\t $student -> dob='2016-12-16';\n\t $student -> pob='Ankee';\n\t $student -> save();\n }", "public function run()\n {\n DB::table('courses')->insert([\n 'course_code' => 'CSE131',\n 'course_name' => 'Data Structure',\n 'course_credit' => 3\n ]);\n\n }", "public function run()\n {\n $subject = new Subject();\n $subject->name = \"Arithemetic\";\n $subject->code = \"AR\";\n $subject->save();\n\n $subject = new Subject();\n $subject->name = \"Mathematics\";\n $subject->code = \"MT\";\n $subject->save();\n\n $subject = new Subject();\n $subject->name = \"English\";\n $subject->code = \"ENG\";\n $subject->save();\n\n $subject = new Subject();\n $subject->name = \"Science\";\n $subject->code = \"SCI\";\n $subject->save();\n\n $subject = new Subject();\n $subject->name = \"Swahili\";\n $subject->code = \"SW\";\n $subject->save();\n }", "public function run()\n {\n //\n DB::table('students')->insert(\n \t[\n \t\t['name'=>'Nguyễn Minh Trang','date_of_birth'=>'1990/1/1','school_id'=>1,'address'=>'Đà Nẵng'],\n \t\t['name'=>'Phan Thanh Hùng','date_of_birth'=>'1992/2/9','school_id'=>3,'address'=>'Đà Nẵng'],\n \t\t['name'=>'Hồ Mỹ Kim','date_of_birth'=>'1992/5/10','school_id'=>3,'address'=>'Quảng Nam'],\n \t\t\n\n \t]);\n }", "public function saveQuestion()\n\t{\n\t\t$this->load->model('Comms_model');\n\t\t$this->load->model('Log_model');\n\t\t$this->load->helper('url');\n\t\t\n\t\t$question=$this->input->post('question');\n\t\t$tags=$this->input->post('tags');\n\n\t\t$data['query']=$this->Comms_model->saveQuestion($question);\n\n\t\t$this->db->select_max('qid');\n\t\t$qid_query = $this->db->get('forum_questions')->row();\n\t\t\n\t\t$qid=$qid_query->qid;\n\n\t\t$this->load->library('session');\n\t\t$cid=$this->session->userid;\n\t\t$data['userQuery']=$this->Comms_model->saveUserQuestions($this->session->userid,$qid);\n\t\t$this->incrementView($qid);\n\t\t//$this->Log_model->addToLogStatic($qid,QUESTION_ASKED,TYPE_QUESTION);\n\t\t$pieces = explode(\",\", $tags);\n\t\tforeach($pieces as $tag)\n\t\t{\n\t\t\tif($tag!=\"\")\n\t\t\t{\n\t\t\t\t$data['tagQuery']=$this->Comms_model->saveTags($qid,$tag);\n\t\t\t\t$users=$this->Comms_model->getUserCollege($tag);\n\t\t\t\t$notification=\"<a href='\".site_url('Communication/showQuestion?qid='.$qid).\"'><h5>A new Question has been posted regarding your college.</h5></a>\";\n\t\t\t\tif($users->num_rows()!=0)\n\t\t\t\t{\n\t\t\t\t\tforeach ($users->result() as $row ) {\n\t\t\t\t\t\tif($cid!=$row->cid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->saveNotification($row->cid,$notification,$qid,-1,$cid,'ASKED');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->doupload_server($qid);\n\t\techo '<script> window.location = \"'.site_url('Communication/showQuestion').'?qid='.$qid.'\"; </script>';\n\t}", "public function run()\n {\n //\n DB::table('questions')->insert([\n [\n 'question' => '1. The instructor\\'s preparation for class was:',\n ],\n [\n 'question' => '2. How do you evaluate the instructor\\'s punctuality to class?',\n ],\n [\n 'question' => '3. How do you assess the instructor\\'s ability to explain the course content?',\n ],\n ]);\n }", "public function saveprofessionStartregistration()\n {\n\n $applicant_id = $_SESSION['applicant_id'];\n $count = $this->core->cleanPost[\"count\"];\n\n for ($x = 1; $x <= $count; $x++) {\n $institution = $this->core->cleanPost[\"institution\" . $x];\n $qualification = $this->core->cleanPost[\"qualification\" . $x];\n $area_of_specialisation = $this->core->cleanPost[\"area_of_specialisation\" . $x];\n $date_obtained = $this->core->cleanPost[\"date_obtained\" . $x];\n\n $sql = \"INSERT INTO `appl_professional` (`applicantno`, `institution`, `specialisation`, `qualification`, `dateobtained`) \n VALUES ('$applicant_id', '$institution', '$area_of_specialisation', '$qualification','$date_obtained');\";\n\n if ($this->core->database->doInsertQuery($sql)) {\n echo '<div class=\"successpopup\">The requested user account has been created.<br/> WRITE THE FOLLOWING INFORMATION DOWN OR REMEMBER IT!</div>';\n echo \"<script> location.href='http://192.168.0.33/sis/startregistration/upload/'; </script>\";\n } else {\n //used to check the error with the sql query\n //echo $sql.error;\n echo '<div class=\"successpopup\">The requested user account has failed to be created .<br/> CHECK THE DETAILS!</div>';\n }\n }\n }", "public function savePreRequistie()\n\t{\n\t\tif(isset($_POST) && $_POST != \"\")\n\t\t{\n\t\t\t$career = explode(\"-\",$_POST['career']);\n\t\t\t$batch = explode(\"-\",$_POST['batch']);\n\t\t\t$subject_grp = explode(\"-\",$_POST['subject_grp']);\n\t\t\t$subject = explode(\"-\",$_POST['subject']);\n\t\t\t$sql = \"INSERT INTO subjects(subject_id,name,course_id,course_name,batch_id,batch_name,subject_group_id,subject_group_name,max_students,min_students,subject_cost) values('\".$subject[0].\"','\".$subject[1].\"','\".$career[0].\"','\".$career[1].\"','\".$batch[0].\"','\".$batch[1].\"','\".$subject_grp[0].\"','\".$subject_grp[1].\"','\".$_POST['max_students'].\"','\".$_POST['min_students'].\"','\".$_POST['subject_cost'].\"')\";\n\t\t\tif($q_res = mysqli_query($this->connrps, $sql))\n\t\t\t\treturn 1;\n\t\t}\n\t}", "public function run()\n {\n $course = Course::where('name', 'HTML')->first();\n $exam = new StartExam;\n\n $exam->course_id = $course->id;\n $exam->save();\n \n $questions = [\n 0 => [\n 'content' => 'Question 1',\n 'correct' => 'correct answer',\n 'inCorrect' => [\n 0 => 'incorrect answer', \n 1 => 'incorrect answer', \n 2 => 'incorrect answer'\n ]\n ],\n 1 => [\n 'content' => 'Question 2',\n 'correct' => 'correct answer',\n 'inCorrect' => [\n 0 => 'incorrect answer', \n 1 => 'incorrect answer', \n 2 => 'incorrect answer'\n ]\n ],\n 2 => [\n 'content' => 'Question 3',\n 'correct' => 'correct answer',\n 'inCorrect' => [\n 0 => 'incorrect answer', \n 1 => 'incorrect answer', \n 2 => 'incorrect answer'\n ]\n ]\n ];\n\n foreach($questions as $question):\n $startExamQuestion = new StartExamQuestion;\n $startExamQuestion->start_exam_id = $exam->id;\n $startExamQuestion->content = $question['content'];\n if($startExamQuestion->save()):\n $saved = true;\n else:\n $saved = false;\n endif;\n\n // saves the correct answer\n $correct = new StartExamAnswer;\n $correct->content = $question['correct'];\n if($correct->save()):\n $saved = true;\n else:\n $saved = false;\n endif;\n\n // merge of correct answer and the question\n $startExamQuestion->correct_answer_id = $correct->id;\n if($startExamQuestion->save()):\n $saved = true;\n else:\n $saved = false;\n endif;\n\n $correct->question_id = $startExamQuestion->id;\n if($correct->save()):\n $saved = true;\n else:\n $saved = false;\n endif;\n\n // saves al the incorrect answers and merges them with the question\n foreach($question['inCorrect'] as $answer):\n $inCorrect = new StartExamAnswer;\n $inCorrect->content = $answer;\n $inCorrect->question_id = $startExamQuestion->id;\n if($inCorrect->save()):\n $saved = true;\n else:\n $saved = false;\n endif;\n endforeach;\n endforeach;\n }", "function saveSubmittedExam ( $currentUser, $ansExamId ) {\r\n\t\tglobal $conn;\r\n $specialIds = array();\r\n \r\n $sql2 = \"select * from submittedExams\";\r\n\t\r\n\t\t($t2 = mysqli_query( $conn, $sql2 ) ) or die( mysqli_error($conn) );\r\n while ( $r2 = mysqli_fetch_array ($t2, MYSQLI_ASSOC)){\r\n\t\t $spec_id = $r2[\"exam_index\"];\r\n\t\t array_push($specialIds, $spec_id);\r\n\t\t}\r\n \r\n $rand_id = rand();\r\n while (in_array($rand_id, $specialIds)){\r\n $rand_id = rand();\r\n }\r\n\r\n \r\n $sql = \"INSERT INTO submittedExams VALUES ( $rand_id, '$currentUser', '$ansExamId', '0')\";\r\n\t\r\n\t\t($t = mysqli_query( $conn, $sql ) ) or die( mysqli_error($conn) );\r\n \r\n return $rand_id;\r\n\t}", "protected function final_step() {\n\t //..collect data adn save.... \n\t\t/*\n\t\t$domain = $this->read_wizard_element('DOMAIN-NAME');// $this->url;\n\t\t$email = $this->read_wizard_element('E-MAIL');//paramload from SMTPMAIL,user..\n\t\t$title = $this->read_wizard_element('TITLE');\t\t\t\n\t\t$title = $this->read_wizard_element('SUBTITLE');\n\t\t//basic array\n\t\t$data = array('DOMAIN-NAME'=>$domain,'E-MAIL'=>$email,\n\t\t 'TITLE'=>$title,'SUBTITLE'=>$subtitle);\n\t\t//extended (optional array)\t\t\t \n\t\t$sdata = array(\t\t\t \n\t\t 'META-DESCRIPTION'=>'#your-description','META-KEYWORDS'=>'#your-keywords',\n\t\t\t\t\t 'FEEDBURNER'=>'#feedburner-url','TWITTER'=>'#tweeter-url','FACEBOOK'=>'#facebook-url','GOOGLEPLUS'=>'#googleplus-url',\n\t\t\t\t\t 'FLICKR'=>'#flickr-url','VIMEO'=>'#viemo-url','LINKEDIN'=>'#linkedin-url','DELICIOUS'=>'#delicious-url',\n\t\t\t\t\t 'FBLIKEBOX-PLUGIN'=>'#fb-plugin','FLICKRBADGE-PLUGIN'=>'#flickr-plugin');\t\n\t\t\t\n\t\t//$ok = $this->change_data('cp/html', $data);\t\t\n\t */\n\t\t\n\t\t/*\n\t $ret = 'Final step:<br>';\n\t\t$ret .= implode('<br>',$this->wdata);\t\n */\n\t\t//form... when submit cpwizsave... \n\t\t$ret .= '<form name=\"wizlaststep\" method=\"post\" class=\"sign-up-form\" action=\"\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"FormAction\" value=\"cpwizsave\" /> \n\t\t\t\t\t\t\t\t\t<div class=\"grid_4 alpha omega aligncenterparent\">\n\t\t\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"call-out grid_2 push_2 alpha omega\" alt=\"Save\"\n\t\t\t\t\t\t\t\t\t\t\ttitle=\"Finish\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"Submit\" value=\"Finish\">\n\t\t\t\t\t\t\t\t\t\t</input>\n\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t</form>';\t\t\t\n\t\t\n\t\treturn ($ret);\n\t}", "function studenttake($id = null) {\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__('Invalid attempt', true));\n\t\t\t$this->redirect(array('action' => 'studentindex'));\n\t\t}\n\t\tif ($id) {\n\t\t\t//validate id\n\t\t\t$q=$this->Attempt->query(\"select * from attempts where date is null and user_id={$this->Auth->user('id')} and id=$id limit 1\");\n\t\t\tif (!$q) $this->redirect(array('action' => 'studentindex'));\n\t\t} else {\n\t\t\t//get id from form data\n\t\t\t$id=$this->data['Attempt']['attempt_id'];\n\t\t\t//save answer\n\t\t\t$this->Attempt->Answer->create();\n\t\t\t$this->Attempt->Answer->save($this->data['Attempt']);\n\t\t\tunset($this->data['Attempt']);\n\t\t}\n\t\t//get all questions allready answered\n\t\t$q=$this->Attempt->query(\"select question_id from answers where attempt_id=$id\");\n\t\t$questionsFinished=array();\n\t\tforeach($q as $q2) $questionsFinished[]=$q2['answers']['question_id'];\n//debug($q);exit;\n\t\t//get exam id\n\t\t$exam_id=$this->Attempt->field('exam_id',array('Attempt.id='.$id));\n\t\t//get next question\n\t\t$question=CLassRegistry::init('question')->find('first',array('conditions'=>array('exam_id='.$exam_id, 'NOT'=> array('Question.id'=>$questionsFinished)),'order'=>'ord'));\n\t\tif(empty($question)) {\n\t\t\t//no more questions\n\t\t\t$this->Session->setFlash(__('Test Complete', true));\n\t\t\t//set date of test taken\n\t\t\t$this->Attempt->set('id',$id);\n\t\t\t$this->Attempt->set('date',date('Y-m-d H:i:s'));\n\t\t\t$this->Attempt->save();\n\t\t\t$this->redirect(array('action' => 'studentindex'));\n\t\t}//endif\n\t\t$this->set('question',$question);\n\t\t//get all attempt info\n\t\t$this->Attempt->recursive=2;\n\t\t$att=$this->Attempt->read(NULL,$id);\n\t\t$this->set('attempt',$att);\n\t}", "public function run()\n {\n DB::table('student')->insert([\n 'user_id' => '1',\n 'date_of_birth' => '1999-08-10',\n 'gender' => 'male',\n 'school' => 'Da Vinci College',\n ]);\n }", "function AfterEdit(&$values,$where,&$oldvalues,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n$dateout=$values['Dateout'];\n$StudentID=$keys['StudentID'];\nif($dateout){\n$sql_up= \"UPDATE student_info SET Status ='Berhenti' WHERE StudentID='$StudentID'\";\n$query_up=db_exec($sql_up,$conn);\n};\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "public function run()\n {\n $student = Student::where('email',\"nelabhkotiya@gmail.com\")->first();\n $studentMarks = new StudentMark;\n $studentMarks->student_id = $student->id;\n $studentMarks->diploma = 0;\n $studentMarks->Xmarkstype = \"CGPA\";\n $studentMarks->Xmarks = \"9.4\";\n $studentMarks->XIImarkstype = \"PER\";\n $studentMarks->XIImarks = \"87.6\";\n $studentMarks->sem1 = \"75\";\n $studentMarks->sem2 = \"75\";\n $studentMarks->sem3 = \"75\";\n $studentMarks->sem4 = \"75\";\n $studentMarks->sem5 = \"75\";\n $studentMarks->sem6 = \"75\";\n $studentMarks->sem7 = \"75\";\n $studentMarks->sem8 = \"75\";\n $studentMarks->diplomayr1 = \"-\";\n $studentMarks->diplomayr2 = \"-\";\n $studentMarks->save();\n }", "function saveSeq()\r\n {\r\n echo \"<pre>\";\r\n var_dump($_POST);\r\n echo \"</pre>\";\r\n if ($this->_dbh->getSingleToolingSequence($_POST[\"fId\"],$_POST[\"id\"]) <= 0 ) {\r\n $this->_dbh->setToolingSequence($_POST[\"fId\"],$_POST[\"id\"]);\r\n }\r\n\r\n foreach ($_POST[\"toolSeqInfo\"] as $column) {\r\n if (!empty($column)) {\r\n foreach ($column as $seqInfo) {\r\n $this->_dbh->saveSequence($seqInfo[0], $seqInfo[1], $seqInfo[2], $seqInfo[3]);\r\n }\r\n }\r\n }\r\n }", "public function run()\n {\n DB::table('subjects')->delete();\n DB::table('subjects')->insert([\n \t['name' => 'Mathematics', 'code' => 'MAT'],\n \t['name' => 'Geography', 'code' => 'GEO'],\n \t['name' => 'Physics', 'code' => 'PHY'],\n \t['name' => 'Chemistry', 'code' => 'CHE'],\n \t['name' => 'Biology', 'code' => 'BIO'],\n \t['name' => 'Agriculture', 'code' => 'AGR'],\n \t['name' => 'Drawing and Design', 'code' => 'DRD'],\n \t['name' => 'Business', 'code' => 'BUS'],\n \t['name' => 'History', 'code' => 'HIS'],\n \t]);\n }", "function echoQuestionnaire($public){\n //add input \"public\"\n //security check is done in submission\n \n \n \n \n \n /**\n * First need a tool to select current Questionnaire\n * -> simple toggler ?\n */\n\n /**\n * User is connected\n */\n $login = $_SESSION['login'];\n $questionnaire=getCurrentQuestionnaire();\n $description=getCurrentDescription();\n //$contributed = getContributedQuestionnaire();\n if($public==0){echo \"Le questionnaire courant est : \".$questionnaire.\"<br/>\";}\n echo $description[0][\"description\"].\"<br/><br/>\";\n \n //change Questionnaire ? -> do that later !\n //Ajax request to change Session var from cursor value\n /*echo \"<select id=\\\"chooseCurrentQ\\\"><option>Choisir...</option>\";\n foreach($contributed as $q){echo '<option'; if($q==$SESSION['currentQ']) echo ' selected=\"selected\"';echo '>'.$q.'</option>';}\n echo<<<END\n </select>\n <script type=\"text/javascript\">$(document).ready(function(){\n $(\"#chooseCurrentQ\").change(function(){\n var n = $(this).val();\n if(n==\"Choisir...\"){alert(\"Veuillez choisir un questionnaire!\");}\n else{\n $.post(\"php/utils/manageQuestionnaires.php\",{\"action\":\"changeCurrentQ\",\"newQuestionnaire\":n},function(rep){\n alert(rep);\n })\n }\n });})\n </script>\n END;\n */\n\n\n //differentiate public submission from private (security constraint in manageQ page)\n //architecture pb by rassembling actions in same page ? quite messy\n if($public==0){$target=\"manageQuestionnaires.php\";}else{$target=\"submitQuestionnaire_public.php\";}\n echo \"<form action=\\\"php/utils/$target\\\" method=\\\"post\\\" enctype=\\\"multipart/form-data\\\" target=\\\"submitQuestionnaire\\\" onsubmit=\\\"questionnaireSubmitted()\\\"><input type=\\\"text\\\" name=\\\"action\\\" id=\\\"action\\\" value=\\\"submitQuestionnaire\\\" hidden></input><div id=\\\"caracs\\\">\";\n //echo caracs\n foreach(getCurrentCaracs() as $carac){\n echo \"<p>\".$carac['question'].\"<input type=\\\"text\\\" name=\\\"\".$carac['name'].\"\\\" placeholder=\\\"\".$carac['name'].\"\\\"></input></p>\";\n }\n echo \"<a href=\\\"#\\\" id=\\\"submitCaracs\\\">Suite >></a></div><div id=\\\"scenarii\\\"><a href=\\\"#\\\" id=\\\"backCaracs\\\"><< Retour</a>\";\n\n $q=returnQuery(\"SELECT `scenarii_number` FROM `Questionnaires` WHERE `isCurrent`=?\", array(1));\n $scenarii_number=$q[0]['scenarii_number'];\n $scenario_number=1;\n\n $choices= getCurrentChoices();\n\n foreach(getScenarii($scenarii_number) as $scenario){\n echo \"<p><b>Scenario $scenario_number </b><br/>\";\n foreach($scenario as $attr){\n echo $attr['name'].\" : \".$attr['level_description'].\"<br/>\";\n //needs hidden input to post attribute value\n echo \"<input type=\\\"text\\\" name=\\\"\".$attr['name'].\"_scenario$scenario_number\\\" class=\\\"hidden\\\" value=\\\"\".$attr['level'].\"\\\">\";\n\n }\n //echo choice radio button :: needs to get choices\n\n\n //Check out radio choice !\n echo \"Choix : \";\n $choice_number=1;\n foreach($choices as $choice){echo \"<input type= \\\"radio\\\" name=\\\"choice_scenario$scenario_number\\\" value=\\\"$choice_number\\\" required>\".$choice['name'].\"</input>\";$choice_number++;}\n\n\n $scenario_number++;\n }\n\n echo <<<END\n\n <br/>\n <input type=\"text\" name=\"scenarii_number\" class=\"hidden\" value=\"$scenarii_number\"></input>\n <input type=\"text\" name=\"public\" class=\"hidden\" value=\"$public\"></input>\n <br/> \n \nEND;\n if($public==1){\n echo <<<END\n \n <br/>\n Pour vérifier que vous n'êtes pas un robot, veuillez rentrer la valeur du captcha :\n <img src=\"php/utils/captcha.php\"/>\n <br/>\n Valeur de la somme : <input type=\"text\" name=\"captcha\" required/><br/>\n \n \nEND;\n \n }\n \n echo <<<END\n \n <input type=\"submit\" value=\"Soumettre\" id=\"uploadButton\"></input>\n </div>\n </form>\n\n <iframe name=\"submitQuestionnaire\" hidden></iframe>\n\n <script>\n $(document).ready(function(){\n $(\"#action\").hide();$(\"#scenarii\").hide();\n $(\".hidden\").hide();\n $(\"#submitCaracs\").click(function(){\n $(\"#caracs\").hide();$(\"#scenarii\").toggle(500,function(){});\n });\n $(\"#backCaracs\").click(function(){\n $(\"#scenarii\").hide();$(\"#caracs\").toggle(500,function(){});\n })\n })\n \n </script>\nEND;\n \n \n \n \n \n}", "public function run()\n {\n DB::statement(\"\n\n INSERT INTO `academic_classes` (`id`, `title`, `code_name`, `can_apply`) VALUES\n (1, 'Junior Secondary School One', 'JSS-1', 1),\n (2, 'Junior Secondary School Two', 'JSS-2', 1),\n (3, 'Junior Secondary School Three', 'JSS-3', 0),\n (4, 'Senior Secondary School One', 'SSS-1', 1),\n (5, 'Senior Secondary School Two', 'SSS-2', 0),\n (6, 'Senior Secondary School Three', 'SSS-3', 0);\n \");\n }", "public function save()\n\t\t{\n\t\t\t$this->model->newCandidacy($_REQUEST);\t\t\t\n\t\t\theader('Location: ?controller=candidacy');\n\t\t}", "public function run()\n {\n $student = \\App\\MembershipTypes::where('code', 'STUDENT')->first();\n $student->Write_Up =\n <<<EOT\n Student membership is open to individuals with little or no practical procurement and supply chain\n management experience who are pursuing academic or professional studies at accredited institutions.\n The student member should be workng towards full membership.\nEOT;\n $student->save();\n\n $licence = \\App\\MembershipTypes::where('code', 'LICENCE')->first();\n $licence->Write_Up =\n <<<EOT\n This class of membership is for those with experience in procurement and supply chain management, but \n lacking professional qualifications;\nEOT;\n $licence->save();\n\n $full_member = \\App\\MembershipTypes::where('code', 'MEMBER')->first();\n $full_member->Write_Up =\n <<<EOT\n The class of full membership is for individuals who have completed a course of professional study in\n procurement and supply chain management from an accredited institution.\nEOT;\n $full_member->save();\n\n\n }", "function __saveQuotation()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n if (!isset($_POST['submit'])) {\n //redirect to 'view' url instead\n $this_url = uri_string();\n $redirect = str_replace('save', 'load', $this_url);\n redirect($redirect);\n }\n\n //flow control\n $next = true;\n\n //validate form in general\n if ($next) {\n if (!$this->__flmFormValidation('new_quotation')) {\n //show error\n $this->notices('error', $this->form_processor->error_message, 'html');\n //halt\n $next = false;\n }\n }\n\n //validation session form data & hidden form data\n if ($next) {\n $form_session_code = $_POST['form_session_code'];\n $quotations_form_data = $this->session->flashdata($form_session_code);\n if ($quotations_form_data == '') {\n //noty error\n $this->notices('error', $this->data['lang']['lang_session_timed_out_start_again'], 'html');\n //halt\n $next = false;\n\n } else {\n\n //save form data as if $_posted\n $_POST['quotations_form_data'] = $quotations_form_data;\n }\n }\n\n //save in database\n if ($next) {\n $result = $this->quotations_model->saveQuotation();\n $this->data['debug'][] = $this->quotations_model->debug_data;\n }\n\n //results\n if ($next) {\n //thank you message\n $this->notifications('wi_notification', $this->data['lang']['lang_thank_you_for_your_quotation']);\n\n /*EMAIL - send admin notifications*/\n $this->__emailer('admin_notification_new_quotation');\n\n } else {\n //noty error\n $this->notices('error', $this->data['lang']['lang_request_could_not_be_completed'], 'noty');\n //show form\n $this->__loadQuotation();\n }\n\n }", "public function saveStepAction()\n {\n $flashMessage = 'Something wrong happened. Please try again';\n $flashStatus = 'danger';\n\n if (isset($_POST) && array_key_exists('csrf', $_POST) && $this->checkCsrf($_POST['csrf'])) {\n $name = array_key_exists('name', $_POST) && !empty($_POST['name']) && filter_var(trim($_POST['name']), FILTER_SANITIZE_STRING) ? filter_var(trim($_POST['name']), FILTER_SANITIZE_STRING) : false;\n $quiz_id = array_key_exists('quiz_id', $_POST) && !empty($_POST['quiz_id']) && filter_var($_POST['quiz_id'], FILTER_SANITIZE_NUMBER_INT) ? intval(filter_var($_POST['quiz_id'], FILTER_SANITIZE_NUMBER_INT)) : false;\n $question_id = array_key_exists('question_id', $_POST) && !empty($_POST['question_id']) && filter_var($_POST['question_id'], FILTER_SANITIZE_NUMBER_INT) ? intval(filter_var($_POST['question_id'], FILTER_SANITIZE_NUMBER_INT)) : false;\n $answer_id = array_key_exists('answer_option', $_POST) && !empty($_POST['answer_option']) && filter_var($_POST['answer_option'], FILTER_SANITIZE_NUMBER_INT) ? intval(filter_var($_POST['answer_option'], FILTER_SANITIZE_NUMBER_INT)) : false;\n $step = array_key_exists('step', $_POST) && !empty($_POST['step']) && filter_var($_POST['step'], FILTER_SANITIZE_NUMBER_INT) ? intval(filter_var($_POST['step'], FILTER_SANITIZE_NUMBER_INT)) : false;\n\n\n if ($name === false) {\n $flashMessage = 'You have to type your name to start. Please restart quiz.';\n $flashStatus = 'danger';\n } elseif ($quiz_id === false) {\n $flashMessage = 'You have to select quiz to start. Please restart quiz.';\n $flashStatus = 'danger';\n } elseif ($answer_id === false) {\n $flashMessage = 'You have to select an answer. Please try again';\n $flashStatus = 'warning';\n\n } else {\n\n // Set Quiz model first\n $this->manager->setModel($quiz_id);\n\n // Than create user manager and link it with quiz\n $this->localManager = new UserManager($this->manager->getModel());\n $this->localManager->setUser($name);\n $quizinProgress = $this->localManager->saveUserAnswer($question_id, $answer_id);\n\n if ($quizinProgress){\n $step++;\n }\n\n $flashMessage = $this->localManager->getResultMessage();\n $flashStatus = $this->localManager->getResultStatus();\n }\n\n $params = ['csrf'=> $_POST['csrf'], 'name'=>$name, 'quiz_id'=>$quiz_id, 'step'=>$step, 'flash_message'=>$flashMessage, 'flash_status'=>$flashStatus];\n $this->getNextQuestionAction($params);\n } else {\n\n $params = ['csrf'=> $_POST['csrf'], 'flash_message'=>$flashMessage, 'flash_status'=>$flashStatus];\n $this->startNewAction($params);\n }\n\n }", "public function run()\n {\n DB::table('academic_levels')->insert(array(\n array(\n\n 'school' => 'Đại Học Công Nghệ Thông Tin DHQG TP.HCM',\n 'major' => 'Hệ Thống Thông Tin',\n 'degree' => 'Kỹ sư',\n 'loai' => 'Khá'\n ),\n array(\n\n 'school' => 'Đại Học Công Nghệ Thông Tin DHQG TP.HCM',\n 'major' => 'Công Nghệ Thông Tin',\n 'degree' => 'Kỹ sư',\n 'loai' => 'Khá'\n ),\n\n ));\n }", "public function run()\n {\n if ( DB::table('subjects')->count() == 0 ) {\n \tDB::table('subjects')->insert([\n \t\t[\n \t\t\t'subject_name' => 'Phần viết (Schriftliche Prüfung)',\n \t\t\t'description' => 'Đây là phần thi viết',\n \t\t],\n \t\t[\n \t\t\t'subject_name' => 'Phần nói (Mündlich Prüfung)',\n \t\t\t'description' => 'Đây là phần thi nói',\n \t\t],\n \t]);\n }\n }", "public function automateChecking($exam_key, $question_id, $student_answer, $score, $type){\n\n\t //Fetch the correct answer for the question\n\t \t\t$correctAns = $this->db->query(\"SELECT answer from questions WHERE question_id = '$question_id';\")->row()->answer;\n\n\t\t\t\t\tif($type==6){\n\t\t\t\t\t\t$modelAnswer= explode(\"\\\"\",$correctAns);\n\t\t\t\t\t\t$pyscript= \"C:\\\\wamp\\\\www\\\\INSTANT_SUITE\\\\application\\\\models\\\\lsa.py\";\n\t\t\t $pypath=\"C:\\\\Python34\\\\python.exe\";\n\n\t\t\t\t\t\t$filename=\"models.txt\";\n\t\t\t $myfile = fopen($filename, \"w\") or die(\"Unable to open file!\");\n\t\t\t\t\t\t$counter=1;\n\t\t\t\t\t\tfor($i=1;$i<=count($modelAnswer)-1;$i+=2){\n\t\t\t\t\t\t\t$counter+=1;\n\t\t\t\t\t\t\t$txt =\"$modelAnswer[$i]\\n\";\n\t\t\t\t\t\t\tfwrite($myfile, $txt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$txt =\"$student_answer\";\n\t\t\t\t\t\tfwrite($myfile, $txt);\n\t\t\t\t\t\tfclose($myfile);\n\n\t\t\t $cmd = \"$pypath $pyscript $filename $counter\" ;\n\t\t\t $output= exec(\"$cmd\");\n\t\t\t\t\t\t$myfile = fopen(\"output.txt\", \"w\") or die(\"Unable to open file!\");\n\t\t\t\t\t\t$txt =\"$cmd\\n\";\n\t\t\t\t\t\tfwrite($myfile, $txt);\n\t\t\t\t\t\t$txt =\"$output\\n\";\n\t\t\t\t\t\tfwrite($myfile, $txt);\n\t\t\t\t\t\tfclose($myfile);\n\n\t\t\t if($output>=50){\n\t\t\t\t\t\t\t$this->db->query(\"UPDATE exam_set SET score = 3 WHERE exam_key = '$exam_key' AND question_id = '$question_id';\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($output<50 && $output>=30 ){\n\t\t\t\t\t\t\t$this->db->query(\"UPDATE exam_set SET score = 2 WHERE exam_key = '$exam_key' AND question_id = '$question_id';\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($output<30 && $output>=15 ){\n\t\t\t\t\t\t\t$this->db->query(\"UPDATE exam_set SET score = 1 WHERE exam_key = '$exam_key' AND question_id = '$question_id';\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$this->db->query(\"UPDATE exam_set SET score = 0 WHERE exam_key = '$exam_key' AND question_id = '$question_id';\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse{ //If correct answer, then update the score field in the answers table\n\t\t \t\tif($student_answer == $correctAns){\n\t\t \t\t\t$this->db->query(\"UPDATE exam_set SET score = '$score' WHERE exam_key = '$exam_key' AND question_id = '$question_id';\");\n\t\t \t\t}\n\t\t //Else then give 0 as score\n\t\t \t\telse{\n\t\t \t\t\t$this->db->query(\"UPDATE exam_set SET score = 0 WHERE exam_key = '$exam_key' AND question_id = '$question_id';\");\n\t\t \t\t}\n\t\t\t\t\t}\n\t \t}", "public function save_interest() {\n\n\t\tif ($this->request->isAjax()) {\n\n\t\t\t$this->layout = 'ajax';\n\t\t\t$response = [\n\t\t\t\t'success' => false,\n\t\t\t\t'msg' => null,\n\t\t\t];\n\n\t\t\tif (isset($this->request->data) && empty($this->request->data['interest-id']) && !empty($this->request->data['interest-title'])) {\n\n\t\t\t\t$this->request->data['UserInterest']['user_id'] = $this->request->data['edited_id'];\n\t\t\t\t$this->request->data['UserInterest']['title'] = $this->request->data['interest-title'];//strip_tags($this->request->data['interest-title']);\n\t\t\t\t$this->UserInterest->save($this->request->data['UserInterest']);\n\t\t\t\t$this->UserInterest->getLastInsertID();\n\n\t\t\t\t$response = [\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'msg' => 'User interest saved',\n\t\t\t\t];\n\n\t\t\t} else {\n\n\t\t\t\tif (!empty($this->request->data['interest-id'])) {\n\n\t\t\t\t\t$this->request->data['UserInterest']['user_id'] = $this->request->data['edited_id'];\n\t\t\t\t\t$this->request->data['UserInterest']['id'] = $this->request->data['interest-id'];\n\t\t\t\t\t$this->request->data['UserInterest']['title'] = $this->request->data['interest-title'];//strip_tags($this->request->data['interest-title']);\n\t\t\t\t\t$this->UserInterest->save($this->request->data['UserInterest']);\n\n\t\t\t\t\t$response = [\n\t\t\t\t\t\t'success' => true,\n\t\t\t\t\t\t'msg' => 'User interest updated',\n\t\t\t\t\t];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\techo json_encode($response);\n\t\t\texit;\n\t\t}\n\t}", "function afterSuccessfulSave()\n\t{\n\t}", "private function _save()\n\t{\n\t\t// Login required\n\t\tif (User::isGuest())\n\t\t{\n\t\t\treturn $this->_browse();\n\t\t}\n\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\t// Incoming\n\t\t$tags = Request::getString('tags', '');\n\t\t$funds = Request::getInt('funds', 0);\n\t\t$reward = Request::getInt('reward', 0);\n\n\t\t// Initiate class and bind posted items to database fields\n\t\t$fields = Request::getArray('question', array(), 'post');\n\n\t\t$row = \\Components\\Answers\\Models\\Question::oneOrNew($fields['id'])->set($fields);\n\n\t\t$banking = Component::params('com_members')->get('bankAccounts');\n\n\t\tif ($reward && $banking)\n\t\t{\n\t\t\t$row->set('reward', 1);\n\t\t}\n\n\t\t// If offering a reward, do some checks\n\t\tif ($reward)\n\t\t{\n\t\t\t// Is it an actual number?\n\t\t\tif (!is_numeric($reward))\n\t\t\t{\n\t\t\t\t$this->setError(Lang::txt('COM_ANSWERS_REWARD_MUST_BE_NUMERIC'));\n\t\t\t\treturn $this->_new($row);\n\t\t\t}\n\n\t\t\t// Are they offering more than they can afford?\n\t\t\tif ($reward > $funds)\n\t\t\t{\n\t\t\t\t$this->setError(Lang::txt('COM_ANSWERS_INSUFFICIENT_FUNDS'));\n\t\t\t\treturn $this->_new($row);\n\t\t\t}\n\t\t}\n\n\t\t// Store new content\n\t\tif (!$row->save())\n\t\t{\n\t\t\t$this->setError($row->getError());\n\t\t\treturn $this->_new($row);\n\t\t}\n\n\t\t// Hold the reward for this question if we're banking\n\t\tif ($reward && $banking)\n\t\t{\n\t\t\t$BTL = new \\Hubzero\\Bank\\Teller(User::get('id'));\n\t\t\t$BTL->hold($reward, Lang::txt('COM_ANSWERS_HOLD_REWARD_FOR_BEST_ANSWER'), 'answers', $row->get('id'));\n\t\t}\n\n\t\t// Add the tags\n\t\t$row->tag($tags);\n\n\t\t// Add the tag to link to the publication\n\t\t$identifier = $this->publication->get('alias') ? $this->publication->get('alias') : $this->publication->get('id');\n\t\t$tag = $this->publication->isTool() ? 'tool:' . $identifier : 'publication:' . $identifier;\n\n\t\t$row->addTag($tag, User::get('id'), ($this->publication->isTool() ? 0 : 1));\n\n\t\t// Redirect to the question\n\t\tApp::redirect(\n\t\t\tRoute::url($this->publication->link() . '&active=questions&v=' . $this->publication->get('version_number'))\n\t\t);\n\t}", "public function run()\n {\n if (!isset($_SESSION['login'])) {\n $_SESSION['error'] = 'You must be logged to post an answer';\n header('Location: index.php?action=login');\n die();\n }\n\n # Redirection to homepage if user tried to enter url action without clicking answer button\n if (!isset($_POST['id'])) {\n header(\"Location: index.php\");\n die();\n }\n\n # Answer form\n if (isset($_POST['form_answer'])) {\n # Check if user is trying to post an empty answer\n if (preg_match('/^\\s*$/', $_POST['answer_text']))\n $notification = \"Please fill in all fields\";\n elseif (isset($_POST['answer_text'][65535]))\n $notification = 'Please enter a shorter answer';\n else {\n # Insert answer into database\n $authorId = unserialize($_SESSION['login'])->memberId();\n $publicationDate = date(\"Y-m-d\");\n $this->_db->insert_answer($authorId, $_POST['id'], $_POST['answer_text'], $publicationDate);\n $idOfAddedAnswer = $this->_db->select_newest_answer($authorId);\n header(\"Location: index.php?action=question&id=\" . $_POST['id'] . '#' . $idOfAddedAnswer);\n die();\n }\n\n }\n\n # Select the question from the id in $_POST['id'] (hidden input)\n $question = $this->_db->select_question_for_new_answer($_POST['id']);\n\n # If the question is duplicated and user clicked on Answer Button\n if ($question->state() == 'duplicated') {\n $_SESSION['error'] = 'This question is marked as duplicated';\n header('Location: index.php?action=question&id=' . $question->questionId());\n die();\n }\n\n require_once(VIEWS . 'newAnswer.php');\n }", "function _saveDo() {\n\t\tdefined('_JEXEC') or die( 'Invalid Token' );\n\t\t// Task\n\t\t$task = clm_core::$load->request_string('task');\n\t\t$tid = clm_core::$load->request_string('tid');\n\t\t$sid = clm_core::$load->request_string('sid');\n\t\t\n\t\t\n\t\t$query\t= \"DELETE FROM #__clm_turniere_teams\"\n\t\t\t. \" WHERE tid = \".$tid;\n\t\tclm_core::$db->query($query);\t\n\t\t\n\t\tfor ($y=1; $y< 100; $y++){\n\t\t\t$tln_nr\t= clm_core::$load->request_int( 'tln_nr'.$y, 100);\n\t\t\t$name\t= clm_core::$load->request_string( 'name'.$y);\n\t\t\tif ($tln_nr == 100) break;\n\t\t\tif ($tln_nr == 0) continue;\n\t\t\t$query\t= \"REPLACE INTO #__clm_turniere_teams\"\n\t\t\t\t.\" ( `tid`, `name`, `sid`, `tln_nr`, `zps`, `man_nr`, `published`) \"\n\t\t\t\t. \" VALUES (\".$tid.\",'\".$name.\"',\".$sid.\",\".$tln_nr.\", NULL, NULL, 1 )\";\n\t\t\tclm_core::$db->query($query);\t\n\t\t}\n\t\t// Log schreiben\n\t\t$clmLog = new CLMLog();\n\t\t$clmLog->aktion = JText::_('TOURNAMENT_TEAMS_EDITED');\n\t\t$clmLog->params = array('sid' => $sid, 'tid' => $tid); \n\t\t$clmLog->write();\n\t\t\n\t\t// wenn 'apply', weiterleiten in form\n\t\tif ($task == 'apply') {\n\t\t\t// Weiterleitung bleibt im Formular\n\t\t\t$this->adminLink->view = \"turteams\"; // WL in Liste\n\t\t\t$this->adminLink->more = array('turnierid' => $tid);\n\t\t} else {\n\t\t\t// Weiterleitung in Liste\n\t\t\t$this->adminLink->view = \"turplayers\"; // WL in Liste\n\t\t\t$this->adminLink->more = array('id' => $tid);\n\t\t}\n\t\n\t\treturn array(true);\n\t\n\t}", "function storyquestionadd()\n\t{\n\t\t$model = $this->loadModel('AdminModel');\n\n\t\t//Loads a view from corresponding view folder\n\t\t$view = $this->loadView('storyquestionadd');\n\n\t\t$storyQuestionViewModel = $this->loadViewModel('shared/StoryQuestionViewModel');\n\n\t\t//Execute code if a post back\n\t\tif($this->isPost())\n\t\t{\n\t\t\t// $storyQuestionViewModel->NameE = $_POST[\"NameE\"];\n\t\t\t// $storyQuestionViewModel->NameF = $_POST[\"NameF\"];\n\n\t\t\t//Map post values to the loginViewModel\n\t\t\t$storyQuestionViewModel = AutoMapper::mapPost($storyQuestionViewModel );\n\t\t\t\n\t\t\tif($storyQuestionViewModel->validate())\n\t\t\t{\n\t\t\t\t$model->addQuestion($storyQuestionViewModel->NameE, $storyQuestionViewModel->NameF);\n\n\t\t\t\t$this->redirect(\"admin/\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// echo \"Failed to save the change\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Execute this code if NOT a post back\n\t\t}\n\n\t\t$view->set('storyQuestionViewModel', $storyQuestionViewModel);\n\n\t\t//Renders the view. true indicates to load the layout\n\t\t$view->render(true);\t\t\n\t}", "public function take_test()\n {\n $index = null;\n if ($this->request->is('post')) {\n\n // should get id on pressing next prev or submit button\n if (isset($this->request->data['TestQuestion']['test_id'])) {\n $testId = $this->request->data['TestQuestion']['test_id'];\n } else {\n $testId = $this->__validateTestWithCode();\n }\n \n\n // if test id do not exists throw error message.\n if (!$testId) {\n $this->Session->setFlash('Method not allowed');\n $this->redirect(array('action' => 'take_test'));\n } else {\n $this->Session->write('Test.id', $testId);\n }\n\n // Save the question submitted\n $this->__saveQuestion($testId);\n\n $index = $this->__getUpdatedIndex();\n }\n\n if ($index) {\n $this->redirect(array('action' => 'question', $index));\n }\n }", "function saveFinalExam($finalDetails, $submittedExam_id, $studentName, $examId) {\r\n\t\tglobal $conn;\r\n \t\t$x = 0;\r\n \t\tfor ($i = 0; $i < count($finalDetails); $i+= 3) {\r\n \t\t\t$answer = $finalDetails[$i];\r\n \t\t\t$grade = $finalDetails[$i + 1];\r\n \t\t\t$comments = $finalDetails[$i + 2];\r\n\t \t \t$sql = \"INSERT INTO finalGrades VALUES ( '', '$submittedExam_id', '$studentName', '$answer', '$grade', '$comments', '$examId')\";\r\n\t \r\n\t \t\t($t = mysqli_query( $conn, $sql ) ) or die( mysqli_error($conn) );\r\n\r\n\t \t\t$x += 1;\r\n\t }\r\n\t echo \"$x final grades saved successfully.\";\r\n\t}", "public function run()\n {\n $course1 = new Course();\n $course1->name = \"JavaScript\";\n $course1->year = 2;\n $course1->period = 7;\n $course1->coordinator = 1;\n $course1->teacher = 1;\n $course1->exam_method_id = 1;\n $course1->study_points = 2;\n $course1->save();\n\n $course2 = new Course();\n $course2->name = \"PHP\";\n $course2->year = 2;\n $course2->period = 7;\n $course2->coordinator = 2;\n $course2->teacher = 2;\n $course2->exam_method_id = 1;\n $course2->study_points = 2;\n $course2->save();\n }", "public function savedata()\n {\n checkSession();\n if ($this->main->savedata() == true) {\n header(\"refresh:0; url=\" . base_url('projectlist.html'));\n } else {\n echo \"<script>\";\n echo \"alert('บันทึกข้อมูลไม่สำเร็จ')\";\n echo \"</script>\";\n exit;\n }\n }", "private function save()\n\t{\n\t\techo(HTML_hiddenVar('cl1', $this->clientOrFile1).HTML_hiddenVar('cl2', $this->clientOrFile2));\n\t\techo(HTML_hiddenVar('orig1', $this->clientOrFile1Orig).HTML_hiddenVar('orig2', $this->clientOrFile2Orig));\n\t\tHTML_showFormEnd();\n\t}", "function school_question_insert() {\n\tglobal $wpdb;\n\n\tparse_str($_POST['cont'], $newarray);\n\t$uid = get_current_user_id();\n\t$cookieVal = $_COOKIE['company-identification'];\n\n foreach ( $newarray as $key => $val ) {\n $namenumber = explode('_', $key);\n\n if ( $namenumber[0] == 'sqans' ) {\n $schoolans = $val;\n } else {\n\n // Checks whether there already is a database entry, if it does exist it is only updated, if it doesnt it is created\n if ( $wpdb->get_row(\"SELECT * FROM wp_School_answer WHERE school_id = $uid AND question_id = $namenumber[1] AND company_id = $cookieVal\") == null ) {\n $wpdb->query(\n \"INSERT INTO wp_School_answer VALUES\n\t\t\t (NULL, $uid, $namenumber[1], $cookieVal, $schoolans, '$val')\n\t\t\t \");\n } else {\n $wpdb->update('wp_School_answer', array(\n 'answer_val' => $schoolans,\n 'comment' => $val,\n ), array(\n 'school_id' => $uid,\n 'question_id' => $namenumber[1],\n 'company_id' => $cookieVal,\n ));\n }\n }\n }\n pkfg_advance();\n\tdie();\n}", "function codeForm() {\n\techo \"<h5>Warning: only CS/IT courses will be populated in the calendar</h5>\";\n echo \"<form method='POST' action='insertStudentCourses.php'>\n <label for='numCourses'>Courses</label>\";\n\n //retrieve submitted input from previous form\n $numCourses = $_POST['numCourses'];\n\n //cap number of courses at 10 (arbitrary number in case of malicious entry)\n if($numCourses > 10)\n\t \t$numCourses = 10;\n\n //first text input has placeholder, store inputs in an array\n echo \"<input list='courses' type='text' id='course1' name='course[]' placeholder='IT360, APPLIED DATABASE SYSTEMS' size='40' required><br>\";\n for($i = 1; $i < $numCourses; $i++) {\n echo \"<input list='courses' type='text' id='course$i' name='course[]' size='40' required><br>\";\n }\n\n //include HTML for autocomplete mechanism\n insertDataList();\n\n echo \"<button type='submit' class='btn btn-default'>Submit</button>\n </form>\";\n }", "public function resultProcessAction()\n {\n \t$no_of_attempts=1;\n \n $quizSession = new Container('quiz');\n $lapse = $quizSession->testDetails[0][0]['time'];\n \n if ($quizSession->code == 'preview') {\n $studentId = 0;\n } else {\n $studentId = $quizSession->testDetails[1]['id'];\n }\n $currentQuestionId = 0;\n $selectedOptionId = 0;\n $linkCode = $quizSession->code;\n $quizData = $quizSession->testDetails[0][0];\n $testName = $quizData['testName'];\n $totalQuestions = $quizData['queTotal'];\n $returnData = \"\";\n if ($quizSession->code == 'preview') {\n $studentId = 0;\n $quesids = 0;\n } else {\n $studentId = $quizSession->testDetails[1]['id'];\n $quesids = implode(\",\",$quizSession->arrQuesId);\n }\n $Timerdata = array(\n $studentId,\n $currentQuestionId,\n $selectedOptionId,\n $linkCode,\n $lapse,\n $no_of_attempts\n );\n\n $return = $this->getStudentTable()->addSelectedOption($Timerdata);\n \n $data = array(\n $linkCode,\n $studentId,\n \t$quesids\t\n );\n $marks = 0;\n $totalmarks = 0;\n $correctCount = $this->getStudentTable()->resultProcessing($data);\n $totalmarks = $this->getStudentTable()->getTestTotalMarks($data);\n \n foreach ($correctCount as $key) {\n $count = $key['correct_counts'] . \"<br>\";\n $cCount = explode(',', $count);\n $correct_counts = count($cCount);\n if(isset($quizSession->flags[$key['quesid']])){\n\t if ($quizSession->flags[$key['quesid']] == $correct_counts) {\n\t $marks += $key['points'];\n\t }\n }\n }\n \n if ($quizSession->code != 'preview') {\n $returnData = array(\n $testName,\n $totalQuestions,\n $marks\n );\n $quizSession->testNaam = $returnData[0];\n $currentTime = new \\DateTime((date('H:i:s')));\n $data_1 = array(\n $quizSession->linkId,\n $linkCode,\n $studentId,\n $returnData,\n $lapse,\n $quizSession->startTimedate,\n $currentTime,\n $totalmarks\n );\n if (!isset($quizSession->testDetails[0][0]['given'])) {\n $resultData = $this->getStudentTable()->result_store($data_1);\n }\n } else {\n return new ViewModel();\n }\n $quizSession->getManager()->getStorage()->clear('quiz');\n // unset($quizSession['quiz']);\n $resultData = $this->getStudentTable()->fetch_data($data_1);\n return new ViewModel(array(\n 'arrData' => @$resultData\n ));\n }", "public function ajax_save_cases() {\n\t\t// check if the bar is enabled\n\t\tif ( ! $this->options['general']['coronabar'] )\n\t\t\treturn;\n\n\t\tif ( ! wp_verify_nonce( esc_attr( $_REQUEST['nonce'] ), 'cn_save_cases' ) )\n\t\t\treturn;\n\n\t\t$json_data = ! empty( $_REQUEST['data'] ) ? esc_attr( $_REQUEST['data'] ) : false;\n\t\t$cases_data = array();\n\n\t\tif ( ! empty( $json_data ) )\n\t\t\t$cases_data = json_decode( stripslashes( html_entity_decode( $json_data ) ), true );\n\n\t\t// save data\n\t\tif ( $cases_data && is_array( $cases_data ) )\n\t\t\tset_transient( 'cookie_notice_coronadata', $cases_data, 12 * HOUR_IN_SECONDS );\n\t}", "public function NewYearRequestSubmitted()\n {\n $this->view['savingResult'] = false;\n $this->view['errorMessage'] = 'Что-то пошло не так. Повторите попытку позднее';\n\n $skills = trim(Arr::get($_POST, 'skills'));\n $wishes = trim(Arr::get($_POST, 'wishes'));\n\n if (!$this->user->id) {\n $this->view['errorMessage'] = 'Авторизуйтесь, чтобы мы могли с вами связаться';\n return;\n }\n\n if (!$skills) {\n $this->view['errorMessage'] = 'Напишите пару слов о себе';\n return;\n }\n\n $this->view['savingResult'] = $this->user->saveJoinRequest($skills, $wishes);\n }", "function saveDataCandidate()\n{\n global $f;\n global $isCandidate;\n global $tblCandidate;\n $lastest = 0;\n $temp = 0;\n for ($i = 0; $i <= intval(getPostValue(\"hNumShowEducation\")); $i++) {\n $val = $_POST[\"formalYearTo\" . $i];\n if ($temp < $val) {\n $temp = $val;\n $lastest = $i;\n }\n }\n $strLastGPA = $_POST[\"formalGPA\" . $lastest];\n // simpan data -----------------------\n $data = $_POST;\n $data['current_address'] .= \"\\n\" . $data['current_address2'];\n $data['permanent_address'] .= \"\\n\" . $data['permanent_address2'];\n $data['gpa'] .= $strLastGPA;\n $data['hobbies'] .= \"\\n\" . $data['hobbies1'];\n $data['hobbies'] .= \"\\n\" . $data['hobbies2'];\n $data['hobbies'] .= \"\\n\" . $data['hobbies3'];\n $data['hobbies'] .= \"\\n\" . $data['hobbies4'];\n $data['reading_topic'] .= \"\\n\" . $data['reading_topic1'];\n $data['reading_topic'] .= \"\\n\" . $data['reading_topic2'];\n $data['reading_topic'] .= \"\\n\" . $data['reading_topic3'];\n $data['reference'] = $data['reference' . $data['reference_type']];\n foreach ($data as $key => &$rowData) {\n if ($key != \"email\" && $key != \"reference\" && $rowData != 't' && $rowData != 'f' && !is_numeric($rowData)) {\n $rowData = strtoupper($rowData); // jadi kapital\n $rowData = str_replace(\"\\\\\", \"\", $rowData); // hilangkan backslash (\\) karena sering buat error + masalah security\n }\n }\n /*\n if ($isCandidate)\n $data['candidate_code'] = $_SESSION['sessionUser'];\n\t*/\n $tblCandidate->begin();\n $isSuccess = false;\n if ($f->getValue('dataID') == \"\") {\n // data baru\n $data['candidate_code'] = getDataNextCandidateCode($data['application_date']); // pasti nyari data baru\n if ($tblCandidate->insert($data)) {\n $f->setValue('dataID', $tblCandidate->getLastInsertId('id'));\n $isSuccess = true;\n }\n } else {\n // data login, sementara bisa diedit\n if ($data['candidate_code'] == \"\") {\n $data['candidate_code'] = getDataNextCandidateCode($data['application_date']);\n } // pasti nyari data baru\n $tblCandidate->update([\"id\" => $f->getValue('dataID')], $data);\n $isSuccess = true;\n }\n if ($isSuccess) {\n if (!saveDataFamily($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on family information\");\n return false;\n }\n if (!saveDataLanguage($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on special skill [language information]\");\n return false;\n }\n //if (!saveDataEducation($f->getValue('dataID')))\n if (!saveDataEducationNew($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on education background [formal education]\");\n return false;\n }\n if (!saveDataSocialActivities($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on other [social activities]\");\n return false;\n }\n if (!saveDataEmergency($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on other [emergency contact]\");\n return false;\n }\n if (!saveDataCourse($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on education background [informal education]\");\n return false;\n }\n if (!saveDataWorkingExperience($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on working experience\");\n return false;\n }\n if (!saveDataReferencePerson($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on reference person\");\n return false;\n }\n if (!saveDataQuestion($f->getValue('dataID'))) {\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n $f->errorMessage .= getWords(\"on other question\");\n return false;\n }\n /*\n if (!saveDataLogin($data['candidate_code'], $data['candidate_name']))\n { echo \"<br>-------------------&nbsp;<br>\";\n\n $tblCandidate->rollback();\n $f->errorMessage = getWords(\"failed to save data \").\" \".$tblCandidate->strEntityName.\" \";\n $f->errorMessage .= getWords(\"on user login\");\n return false;\n }*/\n $f->message = $tblCandidate->strMessage;\n $tblCandidate->commit();\n return true;\n } else {\n $f->errorMessage = getWords(\"failed to save data \") . \" \" . $tblCandidate->strEntityName . \" \";\n //$f->errorMessage .= getWords(\"on personal information\");\n $tblCandidate->rollback();\n return false;\n }\n}", "public function run()\n {\n DB::table('subjects')->insert([\n ['name' => 'C/C+'],\n ['name' => 'Python'],\n ['name' => 'JavaScript'],\n ['name' => 'SQL'],\n ['name' => 'C#'],\n ['name' => 'Java'],\n ['name' => 'HTML/CSS'],\n ['name' => 'PHP'],\n ['name' => 'VB'],\n ]); \n }", "function survey_question() {\n // survey id\n $id = get_var( 'survey_id' );\n\n // create new question\n if( $_SERVER['REQUEST_METHOD']==\"POST\" ) {\n\n // question string\n $title = get_var( 'title' );\n\n $type = get_var( 'question_type' );\n\n // save new question\n $question_id = insert_new_question( $id, $title, $type );\n\n // answers\n $answers = get_var( 'answer' );\n\n // save all answers\n save_all_answers( $answers, $id, $question_id );\n\n // flash message\n $_SESSION['message'] = array( 'type' => 'success', 'message' => 'Questions created successfully!' );\n\n // go to survey detail page\n imv_redirect( 'survey_view&id='.$id );\n exit;\n }\n\n // retrieve response object\n $response = responseObject();\n\n $data = array( 'survey_id' => $id );\n\n $response->send( 'views/survey_question.php', $data );\n}", "public function storeViewStudent(Request $request){\n $adviser = Auth::guard('adviser')->user();\n\n // Update adviser note\n $note = AdviserNotes::updateOrCreate([\n 'STUDENT_ID' => $adviser->SID_REQUEST\n ]);\n $note->NOTE = $request->input('AdviserNote');\n $note->UPDATED = Carbon::now();\n $note->save();\n\n if($request->input('SubmitTerm') != null){\n request()->validate([\n 'Term' => ['required'],\n 'Year' => ['required']\n ]);\n\n // Update term and year that adviser wants to view\n $adviser->VIEW_TERM = request('Term');\n $adviser->VIEW_YEAR = request('Year');\n $adviser->save();\n\n return redirect('/adviser/viewStudent');\n }\n else if($request->input('Approve') != null){\n $approve = $request->input('approve'); // array of approved courses\n $completed = $request->input('completed'); // array of courses to be marked complete\n\n if($approve != null){\n for($i = 0; $i < count($approve); $i++){\n $course = SelectedCourse::where('STUDENT_ID', $adviser->SID_REQUEST)\n ->where('COURSE_ABBR', $approve[$i])->first();\n $course->APPROVED_AT = Carbon::now();\n $course->save();\n }\n }\n if($completed != null){\n // Delete records from 'selected_course', and create record in 'completed_courses'\n for($i = 0; $i < count($completed); $i++){\n $course = SelectedCourse::where('STUDENT_ID', $adviser->SID_REQUEST)\n ->where('COURSE_ABBR', $completed[$i])->first();\n\n // Copy to CompletedCourse\n $cc = CompletedCourses::create([\n 'STUDENT_ID' => $course->STUDENT_ID,\n 'COURSE_ABBR' => $course->COURSE_ABBR,\n 'COURSE_NAME' => $course->COURSE_NAME,\n 'TERM' => $course->TERM,\n 'TERM_ID' => $course->TERM_ID,\n 'YEAR' => $course->YEAR,\n 'MARKED_COMPLETE' => Carbon::now()\n ]);\n\n // Delete from SelectedCourse\n $course->delete();\n }\n }\n\n return redirect('/adviser/viewStudent');\n }\n else if($request->input('Modify')){\n $adviser->VIEW_MODE = 1;\n $adviser->save();\n\n return redirect('/adviser/viewStudent');\n }\n else if($request->input('GoBack') != null){\n $adviser->VIEW_MODE = 0;\n $adviser->save();\n\n return redirect('/adviser/viewStudent');\n }\n else if($request->input('Complete')){\n $studentCourses = SelectedCourse::where('STUDENT_ID', $adviser->SID_REQUEST)\n ->where('TERM', $adviser->VIEW_TERM)\n ->where('YEAR', $adviser->VIEW_YEAR)\n ->orderBy('APPROVED_AT', 'asc')->get();\n\n // If student is not taking any courses for the upcoming semester\n if(!isset($studentCourses)){\n $student = VerifiedStudent::where('SID', $adviser->SID_REQUEST)->first();\n $student->REMOVE_HOLD_FOR = $adviser->VIEW_TERM . \" \" . $adviser->VIEW_YEAR;\n $student->LAST_MEETING = Carbon::now();\n $student->save();\n\n return redirect('/adviser/home');\n }\n // Make sure all courses have been approved\n else if($studentCourses[0]->APPROVED_AT != null){\n $student = VerifiedStudent::where('SID', $adviser->SID_REQUEST)->first();\n $student->REMOVE_HOLD_FOR = $adviser->VIEW_TERM . \" \" . $adviser->VIEW_YEAR;\n $student->LAST_MEETING = Carbon::now();\n $student->save();\n\n return redirect('/adviser/home');\n }\n else{\n return redirect('/adviser/viewStudent')->withErrors('ALL courses must be reviewed and approved by adviser');\n }\n \n }\n else if($request->input('SubmitChanges')){\n $adviser->VIEW_MODE = 0;\n $adviser->save();\n\n switch($adviser->VIEW_TERM){\n case 'WINTER':\n $term_id = 1;\n break;\n case 'SPRING':\n $term_id = 2;\n break;\n case 'SUMMER':\n $term_id = 3;\n break;\n case 'FALL':\n $term_id = 4;\n break;\n default:\n }\n\n // Delete previous records for the selected term and year\n SelectedCourse::where('STUDENT_ID', $adviser->SID_REQUEST)->where('TERM', $adviser->VIEW_TERM)->where('YEAR', $adviser->VIEW_YEAR)->delete();\n\n if(request('Course1') != null){\n $sc = SelectedCourse::updateOrCreate([\n 'STUDENT_ID' => $adviser->SID_REQUEST,\n 'COURSE_ABBR' => request('Course1'),\n 'COURSE_NAME' => Course::where('COURSE_ABBR', request('Course1'))->first()->COURSE_NAME,\n ]);\n $sc->TERM = $adviser->VIEW_TERM;\n $sc->TERM_ID = $term_id;\n $sc->YEAR = $adviser->VIEW_YEAR;\n $sc->ADDED_AT = Carbon::now();\n $sc->save();\n }\n if(request('Course2') != null){\n $sc = SelectedCourse::updateOrCreate([\n 'STUDENT_ID' => $adviser->SID_REQUEST,\n 'COURSE_ABBR' => request('Course2'),\n 'COURSE_NAME' => Course::where('COURSE_ABBR', request('Course2'))->first()->COURSE_NAME,\n ]);\n $sc->TERM = $adviser->VIEW_TERM;\n $sc->TERM_ID = $term_id;\n $sc->YEAR = $adviser->VIEW_YEAR;\n $sc->ADDED_AT = Carbon::now();\n $sc->save();\n }\n if(request('Course3') != null){\n $sc = SelectedCourse::updateOrCreate([\n 'STUDENT_ID' => $adviser->SID_REQUEST,\n 'COURSE_ABBR' => request('Course3'),\n 'COURSE_NAME' => Course::where('COURSE_ABBR', request('Course3'))->first()->COURSE_NAME,\n ]);\n $sc->TERM = $adviser->VIEW_TERM;\n $sc->TERM_ID = $term_id;\n $sc->YEAR = $adviser->VIEW_YEAR;\n $sc->ADDED_AT = Carbon::now();\n $sc->save();\n }\n if(request('Course4') != null){\n $sc = SelectedCourse::updateOrCreate([\n 'STUDENT_ID' => $adviser->SID_REQUEST,\n 'COURSE_ABBR' => request('Course4'),\n 'COURSE_NAME' => Course::where('COURSE_ABBR', request('Course4'))->first()->COURSE_NAME,\n ]);\n $sc->TERM = $adviser->VIEW_TERM;\n $sc->TERM_ID = $term_id;\n $sc->YEAR = $adviser->VIEW_YEAR;\n $sc->ADDED_AT = Carbon::now();\n $sc->save();\n }\n if(request('Course5') != null){\n $sc = SelectedCourse::updateOrCreate([\n 'STUDENT_ID' => $adviser->SID_REQUEST,\n 'COURSE_ABBR' => request('Course5'),\n 'COURSE_NAME' => Course::where('COURSE_ABBR', request('Course5 '))->first()->COURSE_NAME,\n ]);\n $sc->TERM = $adviser->VIEW_TERM;\n $sc->TERM_ID = $term_id;\n $sc->YEAR = $adviser->VIEW_YEAR;\n $sc->ADDED_AT = Carbon::now();\n $sc->save();\n }\n\n return redirect('/adviser/viewStudent');\n }\n }" ]
[ "0.6161499", "0.6019618", "0.5993755", "0.5867135", "0.5803043", "0.5780262", "0.5780262", "0.5771613", "0.57707393", "0.5761845", "0.5742658", "0.5735068", "0.57297885", "0.5718715", "0.5710462", "0.56996953", "0.5690786", "0.56893617", "0.5666894", "0.5666596", "0.56409925", "0.5625754", "0.5622563", "0.5618192", "0.5617555", "0.561577", "0.55891967", "0.55879354", "0.55767745", "0.5567445", "0.5549243", "0.55482733", "0.55448294", "0.55296177", "0.55224997", "0.55177224", "0.549342", "0.54816085", "0.54696393", "0.5461295", "0.5456593", "0.5456322", "0.5447182", "0.5437181", "0.54333204", "0.54201525", "0.5419607", "0.5418502", "0.5399862", "0.5394427", "0.53903145", "0.5389949", "0.5378273", "0.5377469", "0.53737265", "0.53646195", "0.5358678", "0.5358527", "0.53585017", "0.53565824", "0.53512096", "0.53507006", "0.5350273", "0.534716", "0.5338734", "0.53317505", "0.5330379", "0.5325609", "0.5324962", "0.53249544", "0.5311792", "0.53117204", "0.53115696", "0.53100616", "0.53094375", "0.53089404", "0.5303928", "0.5300001", "0.5297953", "0.5285017", "0.52773184", "0.52762747", "0.52736396", "0.5273244", "0.5273071", "0.52730703", "0.52663296", "0.52661335", "0.5266092", "0.52499497", "0.5242322", "0.5241722", "0.5241375", "0.52404284", "0.52302486", "0.5228236", "0.5226651", "0.5224336", "0.5217994", "0.52140117" ]
0.7260594
0
Generates an exclude criterion based on contentType identifiers.
Генерирует критерий исключения на основе идентификаторов contentType.
public function generateContentTypeExcludeCriterion( array $excludeContentTypeIdentifiers ) { $excludeCriterion = array(); foreach ( $excludeContentTypeIdentifiers as $contentTypeIdentifier ) { $excludeCriterion[] = new Criterion\LogicalNot( new Criterion\ContentTypeIdentifier( $contentTypeIdentifier ) ); } return new Criterion\LogicalAnd( $excludeCriterion ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDoktypeExcludeWhere() {}", "function prepareExcludeConditions($exclude, $table_name, $type_field_name = 'type', $id_field_name = 'id') {\n if(is_foreachable($exclude)) {\n $result = array();\n\n foreach($exclude as $type => $ids) {\n if($type && $ids) {\n $result[] = DB::prepare(\"($table_name.$type_field_name = ? AND $table_name.$id_field_name IN (?))\", $type, $ids);\n } // if\n } // foreach\n\n return count($result) ? 'NOT (' . implode(' AND ', $result) . ')' : '';\n } else {\n return '';\n } // if\n }", "public function excludeByType($type_code);", "public function getDoktypeExcludeWhere()\n {\n return $this->doktypeExcludeList ? ' AND pages.doktype NOT IN (' . $this->doktypeExcludeList . ')' : '';\n }", "private function buildPageExclude()\n {\n $idsWhere = [];\n foreach ($this->excluded as $id) {\n $idsWhere[] = \\sprintf(\"(NOT page.[jcr:uuid] = '%s')\", $id);\n }\n\n return $idsWhere;\n }", "function gfwa_exclude_post_types( $type ) {\n $filters = array( '', 'attachment' );\n $filters = apply_filters( 'gfwa_exclude_post_types', $filters );\n return(!in_array( $type, $filters ));\n}", "protected function getExtensionsToExclude() {}", "public function testExclude()\n {\n $this->generate(\n $this->getSuiteDocument(),\n array(\n 'exclude' => array('time_net', 'benchmark'),\n )\n );\n\n $output = $this->getOutput()->fetch();\n $this->assertStringCount(0, 'Foobar', $output);\n $this->assertStringCount(2, 'mySubject', $output);\n $this->assertStringCount(0, 'time_net', $output);\n }", "public function getExcludes() {\n if (isset($this->search_options['exclude'])) {\n return $this->search_options['exclude'];\n }\n\n return array();\n }", "public function isExcluded();", "public function isExcluded();", "public function exclude_file_list() {\n\t\tif ( ! isset( $_POST['data'] ) ) {\n\t\t\twptc_die_with_json_encode( array( 'status' => 'no data found' ) );\n\t\t}\n\t\t$category = isset( $_POST['category'] ) ? wp_unslash( $_POST['category'] ) : '';\n\t\t$exclude_class_obj = new \\Wptc_ExcludeOption( $category );\n\t\t$data = isset( $_POST['data'] ) ? wp_unslash( $_POST['data'] ) : '';\n\t\t$exclude_class_obj->exclude_file_list( $data );\n\t\tdie();\n\t}", "protected function _exclude() {\n\t\treturn '';\n\t}", "function learnarmor_child_jetpackme_exclude_related_post( $exclude_post_ids, $post_id ) {\n if ( is_singular() == '15-things-veterans-want-know-uncw' || is_singular() == '15-things-veterans-want-know-ivmf' || is_singular() == '15-things-veterans-want-know-phoenix') {\n $exclude_post_ids[] = 15637; // 15 Things for HCP\n $exclude_post_ids[] = 7969; // 15 Things\n }\n if ( is_singular() == '15-things-veterans-want-know') {\n $exclude_post_ids[] = 15637; // 15 Things for HCP\n }\n if ( is_singular() == '15-things-veterans-want-know-healthcare-providers') {\n $exclude_post_ids[] = 7969; // 15 Things\n }\n $exclude_post_ids[] = 10209; // UNCW\n $exclude_post_ids[] = 10141; // UNCW\n $exclude_post_ids[] = 10254; // UNCW\n $exclude_post_ids[] = 10314; // UNCW\n $exclude_post_ids[] = 10261; // UNCW\n $exclude_post_ids[] = 10322; // UNCW\n $exclude_post_ids[] = 10332; // UNCW\n $exclude_post_ids[] = 10338; // UNCW\n $exclude_post_ids[] = 10268; // UNCW\n $exclude_post_ids[] = 10273; // UNCW\n $exclude_post_ids[] = 10342; // UNCW\n $exclude_post_ids[] = 10280; // UNCW \n $exclude_post_ids[] = 10118; // IVMF\n $exclude_post_ids[] = 10119; // IVMF\n $exclude_post_ids[] = 10120; // IVMF\n $exclude_post_ids[] = 10121; // IVMF\n $exclude_post_ids[] = 10122; // IVMF\n $exclude_post_ids[] = 10123; // IVMF\n $exclude_post_ids[] = 10124; // IVMF\n $exclude_post_ids[] = 10125; // IVMF\n $exclude_post_ids[] = 10126; // IVMF\n $exclude_post_ids[] = 10069; // IVMF\n $exclude_post_ids[] = 9954; // IVMF\n $exclude_post_ids[] = 50789; // Phoenix\n $exclude_post_ids[] = 50791; // Phoenix\n $exclude_post_ids[] = 50795; // Phoenix\n $exclude_post_ids[] = 50797; // Phoenix\n $exclude_post_ids[] = 50793; // Phoenix\n $exclude_post_ids[] = 50799; // Phoenix\n return $exclude_post_ids;\n}", "public function getFacetsToExclude(): array;", "public function getExcludeIds(): array;", "public function hasExcludeTypes(){\n return $this->_has(6);\n }", "public function getExcludeQueryPart() {}", "public function getAllowedExcludeFields() {}", "public function setExcludes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->excludes = $arr;\n\n return $this;\n }", "public function getExcludeFromPageTypes(){\n\t\t$config = $this->getThemeConfig();\n\t\treturn isset($config['exclude_from_page_types']) ? $config['exclude_from_page_types'] : array();\n\t}", "public function setExcluded($exclude = true);", "public function setExcluded($exclude = true);", "public function filterByNot() {\n $args = func_get_args();\n return $this->internalFilterBy($args, '!=');\n }", "function jetpackme_filter_exclude_category( $filters ) {\n $filters[] = array( 'not' =>\n array( 'term' => array( 'taxonomy.ld_courses_category.slug' => 'branded' ) )\n );\n return $filters;\n}", "#[@xmlmapping(element= 'exclude', class= 'net.xp_framework.quantum.QuantPattern')]\n public function addExcludePattern($exclude) {\n $this->fileset->addExcludePattern($exclude);\n }", "function additionalWhere($rType, $exclusions) {\n switch($rType) {\n case 'note':\n $sql = \" AND privacy = 0 AND entity_table = 'civicrm_contact' \";\n\n if (in_array('N', $exclusions)) {\n $sql = \"\n AND (subject LIKE 'OMIS DATA'\n OR subject LIKE 'OMIS ISSUE CODES'\n OR subject LIKE 'REDIST\".REDIST_YEAR.\"%'\n )\n \";\n }\n break;\n default:\n $sql = '';\n }\n return $sql;\n }", "function algolia_exclude_post_types( $post_types ) {\n\tunset( $post_types['tumblr'] );\n\tunset( $post_types['coffee_checkins'] );\n\tunset( $post_types['presentation'] );\n\n\treturn $post_types;\n}", "public function setExcludeIds(array $excludeIds): void;", "protected function buildExcludeExpression() {\n\t\t\t//remove delimiters\n\t\t\t$delimiter = substr($this->search, 0, 1);\n\t\t\t$search = trim($this->search, $delimiter);\n\n\t\t\tswitch($this->exclude_position) {\n\t\t\t\tcase self::EXCLUDE_BEFORE:\n\t\t\t\t\t$this->exclude = $delimiter . $this->exclude . '.*' . $search . $delimiter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::EXCLUDE_AFTER:\n\t\t\t\t\t$this->exclude = $delimiter . $search . '.*' . $this->exclude . $delimiter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::EXCLUDE_IMMEDIATLEY_BEFORE:\n\t\t\t\t\t$this->exclude = $delimiter . $this->exclude . '[ \\s]*' . $search . $delimiter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::EXCLUDE_IMMEDIATLEY_AFTER:\n\t\t\t\t\t$this->exclude = $delimiter . $search . '[ \\s]*' . $this->exclude . $delimiter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\t$this->log(\"exclude Expression = \" . $this->exclude);\n\t\t}", "protected function getExcludeFields() {}", "public function getModerationExclude(): array;", "abstract protected function jsonExclude(): array;", "public function getExcludeRules(): array;", "public function getTemplatesToExcludeFromWebView(){\n\t\t$exclude = parent::getTemplatesToExcludeFromWebView();\r\n\t\t$exclude[] = self::VIP_INFO_MAIL_TEMPLATE;\n\t\treturn $exclude;\r\n\t}", "public function hasExcluded();", "public function hasExcluded();", "function gallery_slideshow_validate( $input ) {\n\n\t$types = get_post_types('','names'); \n\n\t$alwaysexclude = array('attachment','revision','nav_menu_item');\n\n\tforeach ( $types as $key => $value) :\n\t\tif ( !in_array( $key, $alwaysexclude ) ) : \n\t\t\t\n\t\t\tif ( ! isset( $input[$key] ) ) $input[$key] = \"exclude\";\n\n\t\tendif;\n\tendforeach;\n\n\treturn $input;\n\n}", "public function getExcludedIds();", "function hook_workflow_node_types_to_ignore() {\n $types = array(\n 'dfs',\n 'image',\n 'list_tout',\n 'tout',\n );\n return $types;\n}", "public static function exclude() {\n\t\treturn new Filter(func_get_args(), true, self::LOGICAL_AND);\n\t}", "function exclude_widget_categories($args){\n $exclude = \"1,22,23,24,25\"; // The IDs of the excluding categories : None, Catalog, Catalog-Design, Catalog-Print, Catalog-Subimation\n $args[\"exclude\"] = $exclude;\n return $args;\n}", "function extract_raw_exclusions($content) {\n\t\t\tglobal $post, $wpdb;\n\t\t\t$postMeta = $wpdb->get_row(\"SELECT meta_value FROM $wpdb->postmeta WHERE post_id = \" . $post->ID . \" and meta_key = '_wp_remix_page_template'\", ARRAY_A);\n\t\t\tif ($postMeta) {\n\t\t\t\t//Assuming user has selected a custom template...\n\t\t\t\tremove_filter('the_content', 'wptexturize');\n\t\t\t\t//remove_filter('the_content', 'wpautop');\n\t\t\t}\n\t\t\treturn preg_replace_callback(\"/(<!--\\s*rcode_start\\s*-->|\\[REMIX\\])(.*)(<!\\s*--rcode_end\\s*-->|\\[\\/REMIX\\])/Uis\", \n\t\tarray(&$this,\"extract_raw_exclusions_callback\"), $content);\n\t\t}", "protected function excludedProperties(ContentEntityInterface $entity) {\n $excluded_fields = [\n // Globally excluded fields (for all entity types).\n 'global' => [\n // The following properties are always included in constructor, so we do\n // not need to check them again.\n 'created',\n 'changed',\n 'uri',\n 'uid',\n\n // Getting rid of workflow fields.\n 'status',\n\n // Do not send revisions.\n 'revision_uid',\n 'revision_translation_affected',\n 'revision_timestamp',\n\n // Translation fields.\n 'content_translation_outdated',\n 'content_translation_source',\n 'default_langcode',\n\n // Do not include comments.\n 'comment',\n 'comment_count',\n 'comment_count_new',\n\n // Do not include moderation state.\n 'moderation_state',\n\n // Do not include path settings.\n 'path',\n ],\n\n // Excluded fields for nodes.\n 'node' => [\n // Getting rid of workflow fields.\n 'sticky',\n 'promote',\n ],\n ];\n\n $entity_type_id = $entity->getEntityTypeId();\n $entity_keys = $entity->getEntityType()->getKeys();\n\n // Ignore specific properties based on the entity type keys.\n $ignored_keys = ['uid', 'id', 'revision', 'uuid'];\n $excluded_keys = array_values(array_intersect_key($entity_keys, array_flip($ignored_keys)));\n\n // Provide default excluded properties per entity type.\n if (!isset($excluded_fields[$entity_type_id])) {\n $excluded_fields[$entity_type_id] = [];\n }\n $excluded = array_merge($excluded_fields['global'], $excluded_fields[$entity_type_id], $excluded_keys);\n\n $excluded_to_alter = [];\n\n // Allow users to define more excluded properties.\n // Allow other modules to intercept and define what default type they want\n // to use for their data type.\n $this->moduleHandler->alter('acquia_contenthub_exclude_fields', $excluded_to_alter, $entity);\n $excluded = array_merge($excluded, $excluded_to_alter);\n return $excluded;\n }", "static function exclude($arrayOfRecords,$exclude){\n\t\treturn PRE_Util::numbered_map(function($record)use($exclude){\n\t\t\tforeach ($exclude as $field){\n\t\t\t\tunset($record[$field]);\n\t\t\t}\n\t\t\treturn $record;\n\t\t}, $arrayOfRecords);\n\t}", "public function getExclusionType() \n {\n return $this->_exclusionType; \n }", "public function get_excluded_post_types() {\n return $this->exclude_post_types;\n }", "public function queryExclusionModifiers(&$query_params, $search_data)\n\t{\n\t\tglobal $modSettings;\n\n\t\t$query_where = [];\n\n\t\t$count = 0;\n\t\tif (!empty($query_params['excluded_phrases']) && empty($modSettings['search_force_index']))\n\t\t{\n\t\t\tforeach ($query_params['excluded_phrases'] as $phrase)\n\t\t\t{\n\t\t\t\t$query_where[] = 'subject ' . (empty($modSettings['search_match_words']) || $search_data['no_regexp'] ? ' {not_ilike} ' : ' {not_rlike} ') . '{string:exclude_subject_phrase_' . $count . '}';\n\t\t\t\t$query_params['exclude_subject_phrase_' . ($count++)] = $this->prepareWord($phrase, $search_data['no_regexp']);\n\t\t\t}\n\t\t}\n\n\t\t$count = 0;\n\t\tif (!empty($query_params['excluded_subject_words']) && empty($modSettings['search_force_index']))\n\t\t{\n\t\t\tforeach ($query_params['excluded_subject_words'] as $excludedWord)\n\t\t\t{\n\t\t\t\t$query_where[] = 'subject ' . (empty($modSettings['search_match_words']) || $search_data['no_regexp'] ? ' {not_ilike} ' : ' {not_rlike} ') . '{string:exclude_subject_words_' . $count . '}';\n\t\t\t\t$query_params['exclude_subject_words_' . ($count++)] = $this->prepareWord($excludedWord, $search_data['no_regexp']);\n\t\t\t}\n\t\t}\n\n\t\treturn $query_where;\n\t}", "function exclude_widget_categories( $args ){\n\n$excludes = array('hide'); //array with category slugs to be excluded\n$cat_ids = array();\nforeach( $excludes as $cat_slug ) {\n $cat = get_term_by( 'slug', $cat_slug, 'category' );\n if( $cat ) $cat_ids[] = $cat->term_id;\n}\n$exclude = implode( ',', $cat_ids ); // The IDs of the excluding categories\nif( $cat_ids ) $args[\"exclude\"] = $exclude;\n\nreturn $args;\n}", "public function scopeExcludingTypes($query, ...$types)\n {\n $types = Arr::flatten($types);\n\n if (!empty($types)) {\n $query->where(function ($q) use ($types) {\n foreach ($types as $type) {\n if ($type) {\n $q->where('type', '!=', is_numeric($type) ? $type :\n array_search(Str::title($type), static::getFileTypes())\n );\n }\n }\n });\n }\n }", "public static function exclude_from_index( $post_types ) {\n\t\t$post_types[] = static::NAME;\n\n\t\treturn $post_types;\n\t}", "abstract protected function getSpecialConditionBlack(Request $request, array $conditions);", "function msd_yc_plugin_get_post_types() {\r\n // Get all registered types of posts\r\n $post_types = get_post_types('', 'names');\r\n // Post types to exclude\r\n $to_exclude = array('attachment', 'revision', 'nav_menu_item');\r\n\r\n return array_diff($post_types, $to_exclude);\r\n}", "public function getPartialExcludelist()\n {\n $partialExcludelist = [];\n if (is_array($this->getOption('query_partial_excludelist'))) {\n $partialExcludelist = $this->getOption('query_partial_excludelist');\n }\n return $partialExcludelist;\n }", "protected function get_excluded_variations($query_args)\n {\n }", "public function setExcludedIds($excludedIds);", "function _apw_allowed_post_types( $types )\n{\n\tunset( $types['attachment'] );\n\treturn $types;\n}", "function _external_crawler_domcrawler_exclude(Crawler $crawler, $excludeSelectors) {\n $document = new \\DOMDocument('1.0', 'UTF-8');\n $root = $document->appendChild($document->createElement('_root'));\n $crawler->rewind();\n $root->appendChild($document->importNode($crawler->current(), TRUE));\n $domxpath = new \\DOMXPath($document);\n $cssSelectorConverter = new CssSelectorConverter();\n\n foreach ($excludeSelectors as $selector) {\n $crawlerInverse = $domxpath->query($cssSelectorConverter->toXPath($selector));\n foreach ($crawlerInverse as $elementToRemove) {\n $parent = $elementToRemove->parentNode;\n $parent->removeChild($elementToRemove);\n }\n }\n $crawler->clear();\n $crawler->add($document);\n}", "public function getExclude()\n {\n return $this->exclude;\n }", "function tec_exclude_events_category( $repository_args, $context, $view ) {\n $hide_in_views = [\n 'month',\n 'list',\n ];\n \n if ( in_array( $view->get_slug(), $hide_in_views, true ) ) {\n // List of category slugs to be excluded\n $excluded_categories = [\n 'ls-bookings',\n 'my-other-category-slug',\n ];\n $repository_args['category_not_in'] = $excluded_categories;\n }\n \n return $repository_args;\n}", "public function generateLocationIdExcludeCriterion( array $excludeLocations )\n {\n $excludeCriterion = array();\n foreach ( $excludeLocations as $location )\n {\n if ( !$location instanceof Location )\n {\n throw new InvalidArgumentType( 'excludeLocations', 'array of Location objects' );\n }\n\n $excludeCriterion[] = new Criterion\\LogicalNot(\n new Criterion\\LocationId( $location->id )\n );\n }\n\n return new Criterion\\LogicalAnd( $excludeCriterion );\n }", "function exclude_widget_categories($args){\r $exclude = \"\";\r $args[\"exclude\"] = $exclude;\r return $args;\r}", "function setExcludeTagTypeList($eList) {\n $this->excludeTagTypeList = $eList;\n }", "function inclusions( $values = array() ) {\n\t$options = array(\n\t\t'validate' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'js',\n\t\t\t\t\t\t\t\t'value' => 'assets/validation/jquery.validate'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'css',\n\t\t\t\t\t\t\t\t'value' => 'assets/validation/screen'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t);\n\n // header js which includes all of the pages \n\t$output['header_js'] = array();\n\n\tforeach( $values as $value ) {\n\t\t$inputs = $options[$value];\n\t\tforeach( $inputs as $input ) {\n\t\t\t$output[$input['type']][] = $input['value'];\n\t\t}\n\t}\n\treturn $output;\n}", "public function getAuditExclude();", "public static function exclude_post_types( $post_types ) {\n\t\t$post_types[] = Thrive_Quiz_Builder::SHORTCODE_NAME;\n\n\t\treturn $post_types;\n\t}", "public function blacklist()\n {\n $items = Item::whereNotNull('identifier')\n ->whereNotIn('category_id', [4, 12, 14, 18, 22, 23, 24, 26, 47])\n ->orderBy('title', 'asc')\n ->get();\n\n return $this->respond($items->toArray());\n }", "function getExcludeJSByCondition($bodyString)\n\t{\n\t\t// Find script\t\t\n\t\t$scriptRegex = \"/<!--\\[if[^\\]]*?\\][\\s\\S]*?<!\\[endif\\]-->/i\";\n\t\tpreg_match_all($scriptRegex, $bodyString, $matches);\n\t\t$regString = \"/([^\\\"\\'=]+\\.(js))[\\\"\\']/i\";\n\t\t\n\t\tif(isset($matches[0]))\n\t\t\tpreg_match_all($regString, implode(\"\", $matches[0]), $arrMatchs);\n\t\telse\n\t\t\treturn array();\n\t\t\n\t\tif(isset($arrMatchs[1]))\n\t\t\treturn $arrMatchs[1];\n\t\telse\n\t\t\treturn array();\n\t}", "function _hs_strip_attachments( $where ) {\n\t$where .= ' AND post_type != \"attachment\"';\n\treturn $where;\n}", "public function compileExcludes(): array\n {\n return array_diff(\n $this->getExcludes(),\n $this->getIncludes()\n );\n }", "private function getExcludedObjects(string $type, array $filterTypesMap = []): array\n {\n $excludedObjects = [];\n $userGroups = $this->userGroupHandler->getFullUserGroups();\n\n foreach ($userGroups as $userGroup) {\n $excludedObjects += $userGroup->getAssignedObjectsByType($type);\n }\n\n $userUserGroups = $this->userGroupHandler->getUserGroupsForUser();\n\n foreach ($userUserGroups as $userGroup) {\n $excludedObjects = array_diff_key($excludedObjects, $userGroup->getAssignedObjectsByType($type));\n }\n\n if ($filterTypesMap !== []) {\n $excludedObjects = array_filter(\n $excludedObjects,\n function ($element) use ($filterTypesMap) {\n return isset($filterTypesMap[$element]) === false;\n }\n );\n }\n\n $objectIds = array_keys($excludedObjects);\n return array_combine($objectIds, $objectIds);\n }", "public function getExcludes()\n {\n return $this->excludes;\n }", "private function migrateExclusions() {\n\t\t$excludedPosts = aioseo()->options->sitemap->news->advancedSettings->excludePosts;\n\t\t$toExclude = aioseo()->db\n\t\t\t->start( 'postmeta as pm' )\n\t\t\t->select( 'pm.post_id' )\n\t\t\t->whereRaw( \"`pm`.`meta_key` = '_seopress_news_disabled'\" )\n\t\t\t->whereRaw( \"`pm`.`meta_value` = 'yes'\" )\n\t\t\t->run()\n\t\t\t->result();\n\n\t\tif ( count( $toExclude ) ) {\n\t\t\tforeach ( $toExclude as $record ) {\n\t\t\t\t$post = aioseo()->helpers->getPost( $record->post_id );\n\t\t\t\tif ( ! is_object( $post ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$excludedPost = new \\stdClass();\n\t\t\t\t$excludedPost->value = $post->ID;\n\t\t\t\t$excludedPost->type = $post->post_type;\n\t\t\t\t$excludedPost->label = $post->post_title;\n\t\t\t\t$excludedPost->link = get_permalink( $post->ID );\n\n\t\t\t\tarray_push( $excludedPosts, wp_json_encode( $excludedPost ) );\n\t\t\t}\n\t\t\taioseo()->options->sitemap->news->advancedSettings->enable = true;\n\t\t}\n\t\taioseo()->options->sitemap->news->advancedSettings->excludePosts = $excludedPosts;\n\t}", "function exclude_widget_categories($args){\r\n\t\t$cat = get_term_by( 'slug', 'featured', 'category' );\r\n\t\t$exclude = $cat->term_id;\r\n\r\n\t\t$args[\"exclude\"] = $exclude;\r\n\t\treturn $args;\r\n\t}", "private function exceptName($type)\n\t{\n\t\treturn $type . '-' . self::except;\n\t}", "function exclude_keywords_where_builder($table_name, $column_name, $exclude_keywords) {\n\t$where = '';\n\t$dot = $column_name == '' ? '' : '.';\n\t$path = $table_name . $dot . $column_name;\n\tforeach ($exclude_keywords as $key => $value) {\n\t\t$where .= 'AND ' . $path . \" NOT LIKE'\" . formatForSqlLike($value) . \"'\";\n\t}\n\treturn $where;\n}", "public function testGetExcludes()\n {\n $this->scopeConfigMock\n ->expects($this->once())\n ->method('getValue')\n ->with('dev/js/minify_exclude')\n ->willReturn([\n 'tiny_mce' => '/tiny_mce/',\n 'some_other_unique_name' => '/tiny_mce2/'\n ]);\n\n $expected = ['/tiny_mce/', '/tiny_mce2/'];\n $this->assertEquals($expected, $this->minification->getExcludes('js'));\n /** check cache: */\n $this->assertEquals($expected, $this->minification->getExcludes('js'));\n }", "public function getExclude()\n {\n return $this->_exclude;\n }", "public function getExclude()\n {\n return $this->_exclude;\n }", "public function except($keys);", "function exclude_page_templates_from_search($query) {\n global $wp_the_query;\n if ( ($wp_the_query === $query) && (is_search()) && ( ! is_admin()) ) {\n\n $meta_query = array(\n 'relation' => 'OR',\n // remove pages with foo.php template from results\n array(\n array(\n 'key' => '_wp_page_template',\n 'value' => 'templates/page-bride.php',\n 'compare' => '!='\n ),\n array(\n 'key' => '_wp_page_template',\n 'value' => 'templates/page-vendor-protected.php',\n 'compare' => '!='\n )\n ),\n // show all entries that do not have a key '_wp_page_template'\n array(\n 'key' => '_wp_page_template',\n 'compare' => 'NOT EXISTS'\n )\n );\n $query->set('meta_query', $meta_query);\n }\n}", "protected function getPropertyExclusions()\n {\n return ['keyToClassMap', 'unmappedFields'];\n }", "public function setExclusionType($exclusionType)\n {\n $this->_exclusionType = $exclusionType;\n }", "public function is_excluded( $post_type ) {\n\t\treturn \\in_array( $post_type, $this->get_excluded_post_types_for_indexables(), true );\n\t}", "public function exclude(string ...$ids)\n {\n $this->excluded = array_merge($this->excluded, $ids);\n }", "function B_getExcludedCats()\n{\n global $wpdb;\n $excluded = '';\n \n //mod by denzel\n //@since version 2.1.1, check WordPress version to determine which prepared statement to use.\n $check_wp_version = get_bloginfo('version');\n if($check_wp_version < 3.5){\n \n //pre WP3.5 version, we use this. Not sure if pre WP 3.5 can work with new prepared statement format..\n $cats = $wpdb->get_results( $wpdb->prepare( \"SELECT option_name, option_value FROM {$wpdb->options} WHERE option_name LIKE '%ka_blogexcludetest_%'\" ) );\n \n }else{\n \n //this is WP 3.5, we use the following correct prepared statement.\n $cats = $wpdb->get_results( $wpdb->prepare( \"SELECT option_name, option_value FROM {$wpdb->options} WHERE option_name LIKE %s\", \"ka_blogexcludetest%\") );\n \n }\n \n foreach ($cats as $cat) {\n if ($cat->option_value == \"true\") {\n $exploded = explode(\"_\", $cat->option_name);\n $excluded .= \"-{$exploded[2]}, \";\n }\n }\n return rtrim(trim($excluded), ',');\n}", "#[@xmlmapping(element= '@excludes')]\n public function addExcludePatternString($excludes) {\n $this->fileset->addExcludePatternString($excludes);\n }", "public function getWhereNotInAndOrder($field,$exclude, $order, $direction);", "function jetpackme_filter_exclude_category( $filters ) {\n\tif ( ! in_category( 'employer-resources' ) ) {\n\t\t$filters[] = array(\n\t\t\t'not' =>\n\t\t\t\tarray( 'term' => array( 'category.slug' => 'employer-resources' ) )\n\t\t);\n\n\t\treturn $filters;\n\t}\n}", "function my_exclude_drafts_from_gmc_export($articles, $options, $export_id) {\n\t\n\tif ($options[\"xml_template_type\"] == \"XmlGoogleMerchants\") {\n\n\t\tforeach ($articles as $key => $article) {\n\t\t\tif ( ! empty($article['id']) ) {\n\n\t\t\t\t$post_id = $article['id'];\n\n\t\t\t\t$parent_id = wp_get_post_parent_id($post_id);\n\n\t\t\t\tif ( get_post_status($parent_id) == \"draft\" ) {\n\t\t\t\t\tunset($articles[$key]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}\n\t\n return $articles;\n}", "function excludeArticle($_id,$_clang = false)\n {\n // exclude article\n $art_sql = new rex_sql();\n $art_sql->setTable($this->tablePrefix.'587_searchindex');\n \n $where = \"fid = \".intval($_id).\" AND texttype='article'\";\n if($_clang !== false)\n $where .= \" AND clang='\".intval($_clang).\"'\";\n \n $art_sql->setWhere($where);\n \n $art_sql->delete();\n \n // delete from cache\n $select = new rex_sql();\n $select->setTable($this->tablePrefix.'587_searchindex');\n $select->setWhere($where);\n $select->select('id');\n \n $indexIds = array();\n foreach($select->getArray() as $result)\n $indexIds[] = $result['id'];\n $this->deleteCache($indexIds);\n }", "public static function exclude_webhook_comments($clauses)\n {\n }", "public function getExcludedObjects()\n {\n $workspace = $this->get_application()->getWorkspace();\n\n $condition = new EqualityCondition(\n new PropertyConditionVariable(\n WorkspaceContentObjectRelation::class_name(),\n WorkspaceContentObjectRelation::PROPERTY_WORKSPACE_ID\n ),\n new StaticConditionVariable($workspace->getId())\n );\n\n $contentObjectNumbers = DataManager::distinct(\n WorkspaceContentObjectRelation::class_name(),\n new DataClassDistinctParameters(\n $condition,\n new DataClassProperties(\n array(\n new PropertyConditionVariable(\n WorkspaceContentObjectRelation::class,\n WorkspaceContentObjectRelation::PROPERTY_CONTENT_OBJECT_ID\n )\n )\n )\n )\n );\n\n return DataManager::distinct(\n ContentObject::class_name(),\n new DataClassDistinctParameters(\n new InCondition(\n new PropertyConditionVariable(ContentObject::class_name(), ContentObject::PROPERTY_OBJECT_NUMBER),\n $contentObjectNumbers\n ),\n new DataClassProperties(\n array(new PropertyConditionVariable(ContentObject::class, ContentObject::PROPERTY_ID))\n )\n )\n );\n }", "function ava_bb_disable_post_types( $post_types ) {\n\tunset( $post_types[ apply_filters( 'ava_beaver_builder_post_types', 'team' ) ] );\n\treturn $post_types;\n}", "public function get_excluded_templates() {\n return $this->exclude_templates;\n }", "function forumng_exclude_words_filter($result) {\n global $forumngfilteroptions;\n $author = $forumngfilteroptions->author;\n $daterangefrom = $forumngfilteroptions->datefrom;\n $daterangeto = $forumngfilteroptions->dateto;\n if (!isset($forumngfilteroptions->asmoderator)) {\n $forumngfilteroptions->asmoderator = false;\n }\n\n // Filter the output based on the input string for \"Author name\" field.\n if (!forumng_find_this_user($result->intref1, $author)) {\n return false;\n }\n\n // Filter the output based on the input value for 'Posted as Moderator' field.\n if (!forumng_check_asmoderator($result->intref1, $forumngfilteroptions->asmoderator)) {\n return false;\n }\n\n // Filter the output based on input date for \"Date range from\" field.\n if ($daterangefrom && $daterangefrom > $result->timemodified) {\n return false;\n }\n\n // Filter the output based on input date for \"Date range to\" field.\n if ($daterangeto && $daterangeto < $result->timemodified) {\n return false;\n }\n return true;\n}", "function except($fields) {\n return filter(function($v, $k) use ($fields) {\n return !in_array($k, $fields);\n });\n}", "function content_filter_deny()\n\t{\n\t\t$this->lang->load('content_filter');\n\t\t$this->load->library('content_filter/DansGuardian');\t\t\n\t\t$this->page->view_form('content_filter/dashboard/content_filter_deny', $data);\n\t}", "public function get_excluded_post_types_for_indexables() {\n\t\t/**\n\t\t * Filter: 'wpseo_indexable_excluded_post_types' - Allow developers to prevent posts of a certain post\n\t\t * type from being saved to the indexable table.\n\t\t *\n\t\t * @param array $excluded_post_types The currently excluded post types.\n\t\t */\n\t\t$excluded_post_types = \\apply_filters( 'wpseo_indexable_excluded_post_types', [] );\n\n\t\t// Failsafe, to always make sure that `excluded_post_types` is an array.\n\t\tif ( ! \\is_array( $excluded_post_types ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $excluded_post_types;\n\t}", "protected function get_excluded_files() {\n\t\t$excluded_files = $this->options->get( 'exclude_js', [] );\n\t\t$excluded_files[] = '/wp-includes/js/dist/i18n.min.js';\n\t\t$excluded_files[] = '/interactive-3d-flipbook-powered-physics-engine/assets/js/html2canvas.min.js';\n\t\t$excluded_files[] = '/interactive-3d-flipbook-powered-physics-engine/assets/js/pdf.min.js';\n\t\t$excluded_files[] = '/interactive-3d-flipbook-powered-physics-engine/assets/js/three.min.js';\n\t\t$excluded_files[] = '/interactive-3d-flipbook-powered-physics-engine/assets/js/3d-flip-book.min.js';\n\n\t\t/**\n\t\t * Filter JS files to exclude from minification/concatenation.\n\t\t *\n\t\t * @since 2.6\n\t\t *\n\t\t * @param array $js_files List of excluded JS files.\n\t\t */\n\t\t$excluded_files = (array) apply_filters( 'rocket_exclude_js', $excluded_files );\n\n\t\tif ( empty( $excluded_files ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tforeach ( $excluded_files as $i => $excluded_file ) {\n\t\t\t// Escape characters for future use in regex pattern.\n\t\t\t$excluded_files[ $i ] = str_replace( '#', '\\#', $excluded_file );\n\t\t}\n\n\t\treturn implode( '|', $excluded_files );\n\t}" ]
[ "0.6567023", "0.6461197", "0.641771", "0.607511", "0.60070986", "0.58286875", "0.5768794", "0.5579318", "0.5539116", "0.5480838", "0.5480838", "0.5468544", "0.54504603", "0.54453725", "0.54105", "0.5402287", "0.53741676", "0.5337551", "0.5316405", "0.52609026", "0.52415407", "0.52396166", "0.52396166", "0.52312094", "0.5225768", "0.5212648", "0.520335", "0.51991576", "0.5196629", "0.5193649", "0.51888055", "0.5188183", "0.51561165", "0.51396984", "0.5139305", "0.51361966", "0.51361966", "0.5130198", "0.51189715", "0.51116", "0.51035446", "0.5102121", "0.5091318", "0.5089994", "0.5081143", "0.5068474", "0.50283265", "0.50231844", "0.50127786", "0.50107354", "0.49987954", "0.49978843", "0.49975", "0.4994508", "0.4984311", "0.49835834", "0.49822497", "0.4979857", "0.4971598", "0.49705625", "0.49589962", "0.49578133", "0.49566963", "0.49340948", "0.49095756", "0.48974508", "0.48897856", "0.4878333", "0.48699397", "0.48697326", "0.4863173", "0.4861264", "0.48607612", "0.48068148", "0.48053724", "0.47969157", "0.47913572", "0.47903273", "0.47903273", "0.47792745", "0.47773638", "0.47765777", "0.47698164", "0.4764328", "0.47557604", "0.47492057", "0.4747394", "0.47404164", "0.47254708", "0.47204107", "0.47167897", "0.47081634", "0.4695167", "0.46884274", "0.46871677", "0.46822053", "0.46816826", "0.46599746", "0.4658761", "0.4645287" ]
0.74409586
0
Generates an exclude criterion based on locationIds.
Генерирует критерий исключения на основе locationIds.
public function generateLocationIdExcludeCriterion( array $excludeLocations ) { $excludeCriterion = array(); foreach ( $excludeLocations as $location ) { if ( !$location instanceof Location ) { throw new InvalidArgumentType( 'excludeLocations', 'array of Location objects' ); } $excludeCriterion[] = new Criterion\LogicalNot( new Criterion\LocationId( $location->id ) ); } return new Criterion\LogicalAnd( $excludeCriterion ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setExcludedIds($excludedIds);", "public function setExcludeIds(array $excludeIds): void;", "private function buildPageExclude()\n {\n $idsWhere = [];\n foreach ($this->excluded as $id) {\n $idsWhere[] = \\sprintf(\"(NOT page.[jcr:uuid] = '%s')\", $id);\n }\n\n return $idsWhere;\n }", "public function getExcludeIds(): array;", "public function getExcludedIds();", "public function getDoktypeExcludeWhere() {}", "function prepareExcludeConditions($exclude, $table_name, $type_field_name = 'type', $id_field_name = 'id') {\n if(is_foreachable($exclude)) {\n $result = array();\n\n foreach($exclude as $type => $ids) {\n if($type && $ids) {\n $result[] = DB::prepare(\"($table_name.$type_field_name = ? AND $table_name.$id_field_name IN (?))\", $type, $ids);\n } // if\n } // foreach\n\n return count($result) ? 'NOT (' . implode(' AND ', $result) . ')' : '';\n } else {\n return '';\n } // if\n }", "public function exclude(string ...$ids)\n {\n $this->excluded = array_merge($this->excluded, $ids);\n }", "function setExcludeIDs($_ids)\n {\n foreach($_ids as $key => $id)\n {\n $this->excludeIDs[] = intval($id);\n }\n \n $this->excludeIDs = array_unique($this->excludeIDs);\n }", "public function generateContentTypeExcludeCriterion( array $excludeContentTypeIdentifiers )\n {\n $excludeCriterion = array();\n foreach ( $excludeContentTypeIdentifiers as $contentTypeIdentifier )\n {\n $excludeCriterion[] = new Criterion\\LogicalNot(\n new Criterion\\ContentTypeIdentifier( $contentTypeIdentifier )\n );\n }\n\n return new Criterion\\LogicalAnd( $excludeCriterion );\n }", "public function getWhereNotInAndOrder($field,$exclude, $order, $direction);", "public function setExcludes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->excludes = $arr;\n\n return $this;\n }", "public function getExcludes() {\n if (isset($this->search_options['exclude'])) {\n return $this->search_options['exclude'];\n }\n\n return array();\n }", "public function notInWhere($expr, $values);", "protected function buildExcludeExpression() {\n\t\t\t//remove delimiters\n\t\t\t$delimiter = substr($this->search, 0, 1);\n\t\t\t$search = trim($this->search, $delimiter);\n\n\t\t\tswitch($this->exclude_position) {\n\t\t\t\tcase self::EXCLUDE_BEFORE:\n\t\t\t\t\t$this->exclude = $delimiter . $this->exclude . '.*' . $search . $delimiter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::EXCLUDE_AFTER:\n\t\t\t\t\t$this->exclude = $delimiter . $search . '.*' . $this->exclude . $delimiter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::EXCLUDE_IMMEDIATLEY_BEFORE:\n\t\t\t\t\t$this->exclude = $delimiter . $this->exclude . '[ \\s]*' . $search . $delimiter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::EXCLUDE_IMMEDIATLEY_AFTER:\n\t\t\t\t\t$this->exclude = $delimiter . $search . '[ \\s]*' . $this->exclude . $delimiter;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\t$this->log(\"exclude Expression = \" . $this->exclude);\n\t\t}", "public function setExclude_Inactive_Locations($exclude_Inactive_Locations = null)\n {\n // validation for constraint: boolean\n if (!is_null($exclude_Inactive_Locations) && !is_bool($exclude_Inactive_Locations)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($exclude_Inactive_Locations, true), gettype($exclude_Inactive_Locations)), __LINE__);\n }\n // validation for constraint: choice(Exclude_Inactive_Locations, Exclude_Active_Locations)\n if ('' !== ($exclude_Inactive_LocationsChoiceErrorMessage = self::validateExclude_Inactive_LocationsForChoiceConstraintsFromSetExclude_Inactive_Locations($exclude_Inactive_Locations))) {\n throw new \\InvalidArgumentException($exclude_Inactive_LocationsChoiceErrorMessage, __LINE__);\n }\n if (is_null($exclude_Inactive_Locations) || (is_array($exclude_Inactive_Locations) && empty($exclude_Inactive_Locations))) {\n unset($this->Exclude_Inactive_Locations);\n } else {\n $this->Exclude_Inactive_Locations = $exclude_Inactive_Locations;\n }\n return $this;\n }", "static function exclude($arrayOfRecords,$exclude){\n\t\treturn PRE_Util::numbered_map(function($record)use($exclude){\n\t\t\tforeach ($exclude as $field){\n\t\t\t\tunset($record[$field]);\n\t\t\t}\n\t\t\treturn $record;\n\t\t}, $arrayOfRecords);\n\t}", "function set_ids_to_ignore( $ids = array() ) {\n\t\tif ( ! is_array( $ids ) ) {\n\t\t\t$ids = preg_split( $this->regex['parameterSplitting'], $ids, -1, PREG_SPLIT_NO_EMPTY );\n\t\t}\n\t\t$this->settings['ignoreIDs'] = $ids;\n\t}", "public function setExcluded($exclude = true);", "public function setExcluded($exclude = true);", "public function resolve_whereNotIn()\n {\n extract($this->worker['whereNotIn']);\n $op = [];\n if (!empty($this->worker['select'])) {\n if ($this->field_cnt == 1 && $this->worker['select']['preserve']) {\n array_walk($this->source, function ($src, $k) use ($search_key, $search_value, &$op) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = $src[$this->select_fields];\n }\n });\n } elseif ($this->field_cnt == 1 && !$this->worker['select']['preserve']) {\n array_walk($this->source, function ($src, $k) use ($search_key, $search_value, &$op) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = array_intersect_key($src, $this->select_fields);\n }\n });\n } elseif ($this->field_cnt > 1) {\n array_walk($this->source, function (&$src, $k) use ($search_key, $search_value, &$op) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = array_intersect_key($src, $this->select_fields);\n }\n });\n }\n $this->source = $preserve ? $op : array_values($op);\n unset($this->functions['select']);\n } else {\n $op = array_filter($this->source, function ($src) use ($search_key, $search_value) {\n return (isset($src[$search_key])) && !in_array($src[$search_key], $search_value);\n }, ARRAY_FILTER_USE_BOTH);\n $this->source = $preserve ? $op : array_values($op);\n }\n }", "public function getDoktypeExcludeWhere()\n {\n return $this->doktypeExcludeList ? ' AND pages.doktype NOT IN (' . $this->doktypeExcludeList . ')' : '';\n }", "public static function exclude() {\n\t\treturn new Filter(func_get_args(), true, self::LOGICAL_AND);\n\t}", "public function exclude( Array $ids ) {\n $this -> post__not_in = $ids;\n }", "public function isExcluded();", "public function isExcluded();", "public function getExcludeListArray() {}", "public function hasExcluded();", "public function hasExcluded();", "public function scopeExclude(Builder $query, int ...$ids): Builder\n {\n return $query->whereNotIn('id', $ids);\n }", "public function scopeExclude(Builder $query, int ...$ids): Builder\n {\n return $query->whereNotIn('id', $ids);\n }", "public function getPartialExcludelist()\n {\n $partialExcludelist = [];\n if (is_array($this->getOption('query_partial_excludelist'))) {\n $partialExcludelist = $this->getOption('query_partial_excludelist');\n }\n return $partialExcludelist;\n }", "public function getExcludes()\n {\n return $this->excludes;\n }", "public function setExcludeId($excludeId)\n {\n $this->_excludeId = $excludeId;\n }", "public function addExcludeId($id): void;", "public function getLocationsExcept($locationId)\n {\n //\n $locations = Location::where('id', '!=', $locationId)->get();\n return $this->formatSuccessResponse('List of locations', $locations);\n }", "public function compileExcludes(): array\n {\n return array_diff(\n $this->getExcludes(),\n $this->getIncludes()\n );\n }", "public function exclude(array $fileMapping, array $excludes)\n {\n foreach ($excludes as $value) {\n $result = array_filter($fileMapping, function($element) use ($value) {\n return (strpos($element, $value) === false);\n });\n\n $fileMapping = $result;\n }\n\n return $fileMapping;\n }", "function exclude_keywords_where_builder($table_name, $column_name, $exclude_keywords) {\n\t$where = '';\n\t$dot = $column_name == '' ? '' : '.';\n\t$path = $table_name . $dot . $column_name;\n\tforeach ($exclude_keywords as $key => $value) {\n\t\t$where .= 'AND ' . $path . \" NOT LIKE'\" . formatForSqlLike($value) . \"'\";\n\t}\n\treturn $where;\n}", "protected function _exclude() {\n\t\treturn '';\n\t}", "function set_ids_to_ignore($ids = array()) {\r\n\t\tif(!is_array($ids))\r\n\t\t\t$ids = preg_split(\"/[\\s,]+/\", $ids, -1, PREG_SPLIT_NO_EMPTY);\r\n\t\t$this->settings[\"ignoreIDs\"] = $ids;\r\n\t\treturn TRUE;\r\n\t}", "public function getFacetsToExclude(): array;", "function _external_crawler_domcrawler_exclude(Crawler $crawler, $excludeSelectors) {\n $document = new \\DOMDocument('1.0', 'UTF-8');\n $root = $document->appendChild($document->createElement('_root'));\n $crawler->rewind();\n $root->appendChild($document->importNode($crawler->current(), TRUE));\n $domxpath = new \\DOMXPath($document);\n $cssSelectorConverter = new CssSelectorConverter();\n\n foreach ($excludeSelectors as $selector) {\n $crawlerInverse = $domxpath->query($cssSelectorConverter->toXPath($selector));\n foreach ($crawlerInverse as $elementToRemove) {\n $parent = $elementToRemove->parentNode;\n $parent->removeChild($elementToRemove);\n }\n }\n $crawler->clear();\n $crawler->add($document);\n}", "public function scopeExclude($query, $exclude){\n return $query->where('id', '!=', $exclude);\n }", "public function whereNotIn(array $data);", "public function getExcludeRules(): array;", "protected function getExcludeFields() {}", "public function setExcludes($excludes)\n {\n $this->clearExcludes();\n $this->addExcludes($excludes);\n }", "public function setExcludeId($id)\n {\n $this->excludeId = $id;\n }", "function processDistrictExclude( $districtID, $tbl, $localSeedsList ) {\n itime('processDistrictExclude start');\n\n //retrieve the instance name using the district ID\n $instance = $dbBase = '';\n $bbFullConfig = get_bluebird_config();\n foreach ($bbFullConfig as $group => $details) {\n if (!empty($group) && strpos($group, 'instance:') !== false) {\n if ($details['district'] == $districtID) {\n $instance = substr($group, 9);\n $dbBase = $details['db.basename'];\n break;\n }\n }\n }\n\n $localSeedsList = ( $localSeedsList ) ? $localSeedsList : 0;\n\n //retrieve values using db basename and create temp table\n $db = $bbFullConfig['globals']['db.civicrm.prefix'].$dbBase;\n $dTbl = \"{$tbl}_d{$districtID}\";\n\n //need to list sa columns to avoid naming conflicts\n $sql = \"\n CREATE TABLE $dTbl\n (INDEX match1 (first_name ( 50 ), middle_name ( 50 ), last_name ( 50 ), suffix_id (4), birth_date, gender_id))\n ENGINE=myisam\n SELECT c.id, sc.*, sa.address_id, sa.street_address, sa.country_id, sa.state_province_id, sa.supplemental_address_1, sa.supplemental_address_2, sa.postal_code, sa.city\n FROM $db.civicrm_contact c\n LEFT JOIN $db.shadow_contact sc\n ON c.id = sc.contact_id\n LEFT JOIN $db.shadow_address sa\n ON c.id = sa.contact_id\n WHERE c.is_deleted = 0\n AND ( c.do_not_mail = 1 OR c.do_not_trade = 1 )\";\n CRM_Core_DAO::executeQuery($sql);\n itime('processDistrictExclude after query execute');\n\n //now compare the district exclude table ($dTbl) to the main export table ($tbl)\n //and remove matches from the main table\n //run with three separate queries as it's much faster than a single where clause with OR\n $contactElements = [\n \"-- Individual check\n ( contact_type = 'Individual'\n AND BB_NORMALIZE(source.last_name) = district.last_name\n AND BB_NORMALIZE(source.first_name) = district.first_name\n AND (source.suffix_id IS NULL OR district.suffix_id IS NULL OR source.suffix_id = district.suffix_id)\n AND (source.middle_name IS NULL OR district.middle_name IS NULL OR BB_NORMALIZE(source.middle_name) = district.middle_name)\n AND (source.birth_date IS NULL OR district.birth_date IS NULL OR source.birth_date = district.birth_date)\n AND (source.gender_id IS NULL OR district.gender_id IS NULL OR source.gender_id = district.gender_id) )\",\n \"-- Organization checks\n ( contact_type = 'Organization'\n AND BB_NORMALIZE(source.organization_name) = district.organization_name )\",\n \"-- Household checks\n ( contact_type = 'Household'\n AND BB_NORMALIZE(source.household_name) = district.household_name )\",\n ];\n foreach ( $contactElements as $ele ) {\n $sql = \"\n DELETE FROM $tbl\n WHERE id IN ( SELECT id FROM (\n SELECT source.id\n FROM $tbl as source JOIN $dTbl as district USING (contact_type)\n WHERE\n -- contact specific checks\n $ele\n -- AND all of the address checks pass\n AND source.postal_code=district.postal_code\n AND BB_NORMALIZE_ADDR(source.street_address) = district.street_address\n AND (source.city IS NULL OR district.city IS NULL OR BB_NORMALIZE_ADDR(source.city) = district.city)\n AND (source.state_province_id IS NULL OR district.state_province_id IS NULL OR source.state_province_id = district.state_province_id)\n ) AS tmpMatch\n )\n AND id NOT IN ($localSeedsList);\";\n idebug($sql, 'dedupe match sql');\n $dao = CRM_Core_DAO::executeQuery($sql);\n }\n itime('processDistrictExclude after dedupe comparison');\n\n //remove temp exclusion table\n $sql = \"DROP TABLE $dTbl;\";\n $dao = CRM_Core_DAO::executeQuery($sql);\n\n //now retrieve district seeds and add them to the main temp table\n addExternalSeeds($tbl, $db);\n itime('processDistrictExclude after addExternalSeeds');\n\n return;\n}", "public function registerExclude()\n {\n $args = func_get_args();\n foreach ($args as $arg)\n {\n if (is_array($arg)) {\n foreach ($arg as $subarg) {\n $this->_registerExclude($subarg);\n }\n } else {\n $this->_registerExclude($arg);\n }\n }\n }", "public function getExcludeQueryPart() {}", "public function set_excluded_product_ids($excluded_product_ids)\n {\n }", "public function whereNotIn($whereNotIn = [])\n {\n $this->_where .= $this->setWhere($whereNotIn, 'not in');\n return $this;\n }", "public function getExclude()\n {\n return $this->exclude;\n }", "public static function get_excluded_items()\n {\n }", "protected function getPropertyExclusions()\n {\n return ['keyToClassMap', 'unmappedFields'];\n }", "function learnarmor_child_jetpackme_exclude_related_post( $exclude_post_ids, $post_id ) {\n if ( is_singular() == '15-things-veterans-want-know-uncw' || is_singular() == '15-things-veterans-want-know-ivmf' || is_singular() == '15-things-veterans-want-know-phoenix') {\n $exclude_post_ids[] = 15637; // 15 Things for HCP\n $exclude_post_ids[] = 7969; // 15 Things\n }\n if ( is_singular() == '15-things-veterans-want-know') {\n $exclude_post_ids[] = 15637; // 15 Things for HCP\n }\n if ( is_singular() == '15-things-veterans-want-know-healthcare-providers') {\n $exclude_post_ids[] = 7969; // 15 Things\n }\n $exclude_post_ids[] = 10209; // UNCW\n $exclude_post_ids[] = 10141; // UNCW\n $exclude_post_ids[] = 10254; // UNCW\n $exclude_post_ids[] = 10314; // UNCW\n $exclude_post_ids[] = 10261; // UNCW\n $exclude_post_ids[] = 10322; // UNCW\n $exclude_post_ids[] = 10332; // UNCW\n $exclude_post_ids[] = 10338; // UNCW\n $exclude_post_ids[] = 10268; // UNCW\n $exclude_post_ids[] = 10273; // UNCW\n $exclude_post_ids[] = 10342; // UNCW\n $exclude_post_ids[] = 10280; // UNCW \n $exclude_post_ids[] = 10118; // IVMF\n $exclude_post_ids[] = 10119; // IVMF\n $exclude_post_ids[] = 10120; // IVMF\n $exclude_post_ids[] = 10121; // IVMF\n $exclude_post_ids[] = 10122; // IVMF\n $exclude_post_ids[] = 10123; // IVMF\n $exclude_post_ids[] = 10124; // IVMF\n $exclude_post_ids[] = 10125; // IVMF\n $exclude_post_ids[] = 10126; // IVMF\n $exclude_post_ids[] = 10069; // IVMF\n $exclude_post_ids[] = 9954; // IVMF\n $exclude_post_ids[] = 50789; // Phoenix\n $exclude_post_ids[] = 50791; // Phoenix\n $exclude_post_ids[] = 50795; // Phoenix\n $exclude_post_ids[] = 50797; // Phoenix\n $exclude_post_ids[] = 50793; // Phoenix\n $exclude_post_ids[] = 50799; // Phoenix\n return $exclude_post_ids;\n}", "public function validateExclude_Inactive_LocationsForChoiceConstraintsFromSetExclude_Inactive_Locations($value)\n {\n $message = '';\n if (is_null($value)) {\n return $message;\n }\n $properties = [\n 'Exclude_Active_Locations',\n ];\n try {\n foreach ($properties as $property) {\n if (isset($this->{$property})) {\n throw new \\InvalidArgumentException(sprintf('The property Exclude_Inactive_Locations can\\'t be set as the property %s is already set. Only one property must be set among these properties: Exclude_Inactive_Locations, %s.', $property, implode(', ', $properties)), __LINE__);\n }\n }\n } catch (\\InvalidArgumentException $e) {\n $message = $e->getMessage();\n }\n return $message;\n }", "public function notIn($identifier, array $values)\n {\n return $this->addPredicate(new NotIn($identifier, $values));\n }", "public function setExclude_Active_Locations($exclude_Active_Locations = null)\n {\n // validation for constraint: boolean\n if (!is_null($exclude_Active_Locations) && !is_bool($exclude_Active_Locations)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($exclude_Active_Locations, true), gettype($exclude_Active_Locations)), __LINE__);\n }\n // validation for constraint: choice(Exclude_Inactive_Locations, Exclude_Active_Locations)\n if ('' !== ($exclude_Active_LocationsChoiceErrorMessage = self::validateExclude_Active_LocationsForChoiceConstraintsFromSetExclude_Active_Locations($exclude_Active_Locations))) {\n throw new \\InvalidArgumentException($exclude_Active_LocationsChoiceErrorMessage, __LINE__);\n }\n if (is_null($exclude_Active_Locations) || (is_array($exclude_Active_Locations) && empty($exclude_Active_Locations))) {\n unset($this->Exclude_Active_Locations);\n } else {\n $this->Exclude_Active_Locations = $exclude_Active_Locations;\n }\n return $this;\n }", "public function generateWhere() {\n return \"NOT (\" . $this->where->generateWhere() . \")\";\n }", "public function filterByNot() {\n $args = func_get_args();\n return $this->internalFilterBy($args, '!=');\n }", "public function setExclude(array $exclude): self\n {\n $this->exclude = $exclude;\n\n return $this;\n }", "public function getAllowedExcludeFields() {}", "protected function getExcludeList() {\r\n\t\treturn NULL;\r\n\t}", "function exclude_widget_categories($args){\n $exclude = \"1,22,23,24,25\"; // The IDs of the excluding categories : None, Catalog, Catalog-Design, Catalog-Print, Catalog-Subimation\n $args[\"exclude\"] = $exclude;\n return $args;\n}", "public function or_where_not_in( $fields, array $values = array() )\n {\n return $this->_prepare_condition( $fields, $values, 'OR_NOT_IN' );\n }", "#[@xmlmapping(element= '@excludes')]\n public function addExcludePatternString($excludes) {\n $this->fileset->addExcludePatternString($excludes);\n }", "public function testGetExcludes()\n {\n $this->scopeConfigMock\n ->expects($this->once())\n ->method('getValue')\n ->with('dev/js/minify_exclude')\n ->willReturn([\n 'tiny_mce' => '/tiny_mce/',\n 'some_other_unique_name' => '/tiny_mce2/'\n ]);\n\n $expected = ['/tiny_mce/', '/tiny_mce2/'];\n $this->assertEquals($expected, $this->minification->getExcludes('js'));\n /** check cache: */\n $this->assertEquals($expected, $this->minification->getExcludes('js'));\n }", "protected function get_excluded_orders($query_args)\n {\n }", "public function excluding($excludes)\n\t{\n\t\t$this->model->setIncludes(array_diff($this->model->getIncludes(), (array) $excludes));\n\n\t\treturn $this;\n\t}", "public function resolve_whereNotIn_row()\n {\n if (!empty($this->functions['order_by'])) {\n $this->resolve_order_by();\n unset($this->functions['order_by']);\n }\n extract($this->worker['whereNotIn']);\n $op = [];\n if (!empty($this->worker['select'])) {\n if ($this->field_cnt == 1 && $this->worker['select']['preserve']) {\n foreach ($this->source as $k => $src) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = $src[$this->select_fields];\n break;\n }\n }\n }\n if ($this->field_cnt == 1 && !$this->worker['select']['preserve']) {\n foreach ($this->source as $k => $src) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = array_intersect_key($src, $this->select_fields);\n break;\n }\n }\n } elseif ($this->field_cnt > 1 && !$this->worker['select']['preserve']) {\n foreach ($this->source as $k => $src) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = array_intersect_key($src, $this->select_fields);\n break;\n }\n }\n }\n unset($this->functions['select']);\n } else {\n foreach ($this->source as $k => $src) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = $value;\n break;\n }\n }\n }\n $this->source = $preserve ? $op : array_values($op);\n }", "public function findWhereNotIn(string $field, array $values, array $columns = ['*']);", "public function notBetweenWhere($expr, $minimum, $maximum);", "public function excludeProductIds($productIds)\n {\n if (empty($productIds)) {\n return $this;\n }\n $this->_joinIdxTable();\n $this->getSelect()->where('idx_table.product_id NOT IN(?)', $productIds);\n return $this;\n }", "public function whereNotIn($field, array $values);", "public function where_not_in( $fields, array $values = array() )\n {\n return $this->_prepare_condition( $fields, $values, 'NOT_IN' );\n }", "protected function get_excluded_variations($query_args)\n {\n }", "public function setExclude($exclude)\n {\n $this->exclude = (array) $exclude;\n \n return $this;\n }", "public static function buildExcludedClientFileList()\n {\n foreach (self::$excludedClientFilePaths as $basePath => $files) {\n foreach ($files as $file) {\n // Set the path as an index for we can use isset()/empty()\n // instead of in_array()\n $path = $basePath . $file . '/' . $file . '.php';\n $customPath = 'custom/' . $path;\n self::$excludedClientFiles[$path] = true;\n self::$excludedClientFiles[$customPath] = true;\n }\n }\n }", "public function setExcludeDirectories(array $excludeDirectories)\n {\n $this->excludeDirectories = $excludeDirectories;\n }", "public function setExclude($excludeName, $exclude){\n $this->search_options['exclude'][$excludeName] = (array) $exclude;\n }", "public function findWhereNotIn(array $where, $attributes = ['*'])\n {\n }", "function my_epl_listing_exclude_under_offer( $query ) {\n\n\t// Do nothing if in dashboard or not an archive page\n\tif ( is_admin() || ! $query->is_main_query() )\n\t\treturn;\n\t// Do nothing if Easy Property Listings is not active\n\tif ( ! function_exists( 'epl_all_post_types' ) )\n\t\treturn;\n\n\t// exclude under offer listings in search results\n\tif ( epl_is_search() ) {\n\t\t$meta_query = ( array ) $query->get( 'meta_query' );\n\t\t$meta_query['property_under_offer'] = array(\n\t\t\t'key' => 'property_under_offer',\n\t\t\t'value' => 'yes',\n\t\t\t'compare' => '!='\n\t\t);\n\t\t$query->set( 'meta_query', $meta_query );\n\t\treturn;\n\t}\n}", "public function queryExclusionModifiers(&$query_params, $search_data)\n\t{\n\t\tglobal $modSettings;\n\n\t\t$query_where = [];\n\n\t\t$count = 0;\n\t\tif (!empty($query_params['excluded_phrases']) && empty($modSettings['search_force_index']))\n\t\t{\n\t\t\tforeach ($query_params['excluded_phrases'] as $phrase)\n\t\t\t{\n\t\t\t\t$query_where[] = 'subject ' . (empty($modSettings['search_match_words']) || $search_data['no_regexp'] ? ' {not_ilike} ' : ' {not_rlike} ') . '{string:exclude_subject_phrase_' . $count . '}';\n\t\t\t\t$query_params['exclude_subject_phrase_' . ($count++)] = $this->prepareWord($phrase, $search_data['no_regexp']);\n\t\t\t}\n\t\t}\n\n\t\t$count = 0;\n\t\tif (!empty($query_params['excluded_subject_words']) && empty($modSettings['search_force_index']))\n\t\t{\n\t\t\tforeach ($query_params['excluded_subject_words'] as $excludedWord)\n\t\t\t{\n\t\t\t\t$query_where[] = 'subject ' . (empty($modSettings['search_match_words']) || $search_data['no_regexp'] ? ' {not_ilike} ' : ' {not_rlike} ') . '{string:exclude_subject_words_' . $count . '}';\n\t\t\t\t$query_params['exclude_subject_words_' . ($count++)] = $this->prepareWord($excludedWord, $search_data['no_regexp']);\n\t\t\t}\n\t\t}\n\n\t\treturn $query_where;\n\t}", "public function getExclude()\n {\n return $this->_exclude;\n }", "public function getExclude()\n {\n return $this->_exclude;\n }", "public function setExcludeShippingLocationDetails(array $excludeShippingLocationDetails)\n {\n $this->excludeShippingLocationDetails = $excludeShippingLocationDetails;\n return $this;\n }", "public function commentIdNotIn($ids){\n\t\treturn $this->setVar('comment__not_in', $ids);\n\t}", "public function checkLocationConflicts(&$event, $eventLocations){\r\n if ( empty($eventLocations) ) {\r\n return NULL;\r\n }\r\n $start = $event->get('start_date');\r\n $end = $event->get('end_date');\r\n $query = $this->modx->newQuery('ChurchEvents');\r\n //$this->modx->getSelectColumns('ChurchEvents','ChurchEvents','',array('id','name'));\r\n //$query->select($this->modx->getSelectColumns('ChurchEvents','ChurchEvents','',array('DISTINCT `ChurchEvents`.`id` AS `ChurchEvents_id`', 'ChurchEvents.*')));// http://rtfm.modx.com/display/xPDO20/xPDOQuery.select\r\n //$query->select('DISTINCT `ChurchEvents`.`id` AS `ChurchEvents_id`,'.$this->modx->getSelectColumns('ChurchEvents','ChurchEvents') );// http://rtfm.modx.com/display/xPDO20/xPDOQuery.select\r\n $query->innerJoin('ChurchEventLocations','EventLocations');\r\n $exclude = array();\r\n $exclude[] = $event->get('id');\r\n $parent_id = $event->get('parent_id'); \r\n if ( !empty($parent_id) ) {\r\n $exclude[] = $parent_id;\r\n }\r\n $query->where(array(\r\n array(\r\n // all day\r\n 'ChurchEvents.event_type' => 'allday',\r\n \r\n array( // overlaping, ex: event is 2-4 but look for events that are 1-5\r\n 'OR:ChurchEvents.start_date:<=' => $start,\r\n 'AND:ChurchEvents.end_date:>=' => $end,\r\n ),\r\n array (// end time is between start and end\r\n 'OR:ChurchEvents.start_date:>=' => $end,\r\n 'AND:ChurchEvents.end_date:<=' => $end,\r\n ),\r\n array( // start time is between start and end\r\n 'OR:ChurchEvents.start_date:>=' => $start,\r\n 'AND:ChurchEvents.end_date:<=' => $start,\r\n ),\r\n ),\r\n // status = approved?\r\n 'EventLocations.church_location_id:IN' => $eventLocations,\r\n array(\r\n 'ChurchEvents.id:!=' => $event->get('id'),\r\n 'AND:ChurchEvents.parent_id:NOT IN' => $exclude\r\n )\r\n \r\n \r\n ));\r\n $query->prepare();\r\n //echo 'SQL:<br>'.$query->toSQL().'<br>';\r\n $conflicts = $this->modx->getIterator('ChurchEvents',$query);\r\n $html = NULL;\r\n foreach($conflicts as $conflict){\r\n $array = $conflict->toArray();\r\n //print_r($array);\r\n //echo '<br>';\r\n //exit();\r\n $html .= $this->getChunk($this->filters['eventFormConflictTpl'], $this->processEvent($conflict));\r\n }\r\n //exit();\r\n return $html;\r\n }", "public function scopeExclude(Builder $query, array $users) : Builder\n {\n $exclude = array_map(\n function($item) {\n if ($item instanceof static) {\n return $item->uuid;\n }\n\n return $item;\n }, array_filter($users));\n\n return $query->whereNotIn('uuid', $exclude);\n }", "function getMagentoExcludedLibraryPaths(array $libraryPaths)\n{\n $excludedLibraryPaths = [\n '#^(?:' . join('|', $libraryPaths) . ')/([\\\\w]+/)?Test#',\n ];\n return $excludedLibraryPaths;\n}", "function pmb_extraire_sections_depuis_locations_ids($ids_location) {\n\t$res = pmb_extraire_abstract_ids('locations', $ids_location,\n\t\t'pmbesOPACGeneric_get_location_information_and_sections');\n\t\t\n\treturn pmb_get_enfants($res, 'sections');\n}", "public function whereNotIn(string $where_key, array $where_values): \\TFHInc\\Ray\\Ray\n {\n $where_array = [];\n\n foreach ($this->working_array as $key => $value) {\n if (is_array($value)) {\n if (array_key_exists($where_key, $value)) {\n if (!in_array($value[$where_key], $where_values)) {\n $where_array[$key] = $value;\n }\n }\n }\n }\n\n $this->setWorkingArray($where_array);\n\n return $this;\n }", "protected function exclude()\n {\n foreach ($this->config['backup'] as $key => $back) {\n $final = $this->_excludeFinal($back);\n $this->config['backup'][$key]['exclude'] = $final;\n }\n }", "public static function exclude_order_comments($clauses)\n {\n }", "public function testWhereNotInList(): void\n {\n $query = new SelectQuery($this->connection);\n $query->select(['id'])\n ->from('articles')\n ->whereNotInList('id', [1, 3]);\n\n $this->assertQuotedQuery(\n 'SELECT <id> FROM <articles> WHERE <id> NOT IN \\\\(:c0,:c1\\\\)',\n $query->sql(),\n !$this->autoQuote\n );\n\n $result = $query->execute()->fetchAll('assoc');\n $this->assertEquals(['id' => '2'], $result[0]);\n }", "private function attachExclude(&$rules, $exclude)\n {\n // Add exclude part to rules, mainly used for unique rules\n foreach ($rules as $field => $rule)\n {\n if(is_array($rule))\n {\n foreach ($rule as $position => $single_rule)\n {\n $rules[$field][$position] = sprintf($single_rule, $exclude);\n }\n }\n else\n {\n $rules[$field] = sprintf($rule, $exclude);\n }\n }\n }", "public function exclude_element(\n\t\t$element_id,\n\t\t$domain,\n\t\tIToolset_Relationship_Role $for_role,\n\t\tToolset_Association_Query_Element_Selector_Provider $element_selector_provider,\n\t\t$query_original_element,\n\t\t$translate_provided_id\n\t) {\n\t\treturn new Toolset_Association_Query_Condition_Exclude_Element(\n\t\t\t$element_id, $domain, $for_role, $element_selector_provider, $query_original_element, $translate_provided_id\n\t\t);\n\t}" ]
[ "0.68881994", "0.6646564", "0.64973015", "0.64546204", "0.6386183", "0.6187613", "0.6143778", "0.6093447", "0.5874656", "0.5865086", "0.58038104", "0.5647575", "0.56469244", "0.5645354", "0.56073797", "0.5520934", "0.54570305", "0.5440242", "0.53836083", "0.53836083", "0.5345349", "0.53256196", "0.5321307", "0.530725", "0.53018653", "0.53018653", "0.52970976", "0.5260022", "0.5260022", "0.5252823", "0.5252823", "0.52426654", "0.52367437", "0.5225221", "0.5201165", "0.51890635", "0.51887596", "0.51763", "0.51724887", "0.51671183", "0.51570654", "0.5156177", "0.50965774", "0.50861037", "0.50680554", "0.50574076", "0.5052334", "0.50365657", "0.5036092", "0.50324285", "0.50253135", "0.5014682", "0.50012326", "0.49898386", "0.49775648", "0.4976707", "0.49677634", "0.49661204", "0.49592754", "0.4943329", "0.49393874", "0.4936971", "0.4923752", "0.49171543", "0.4916712", "0.49140573", "0.4912102", "0.49090514", "0.49004564", "0.48869795", "0.48861414", "0.48825", "0.48804083", "0.48769838", "0.48615777", "0.485405", "0.48484913", "0.48451868", "0.48434046", "0.4836575", "0.4833762", "0.4827184", "0.482621", "0.48183373", "0.48133016", "0.4787677", "0.47853094", "0.47853094", "0.47826234", "0.47821003", "0.47752988", "0.47729176", "0.4758324", "0.47544003", "0.47474986", "0.47272977", "0.47220168", "0.4717985", "0.47037336", "0.4702606" ]
0.80322516
0
The header starts at 'h1' if it's not a header type and increments from there. If the type goes past h6, it will continue, allowing Additional header markers to be set even though they have no effect h7+ is to be treated as p
Заголовок начинается с 'h1', если это не тип заголовка, и увеличивается с этого момента. Если тип превышает h6, он продолжается, позволяя устанавливать дополнительные маркеры заголовка, даже если они не оказывают никакого влияния. h7+ следует рассматривать как p
public function updateHeader() { if (strpos($this->type, 'h') != 0) { $this->type = 'h1'; } else { $count = (int)str_replace('h', '', $this->type); $count++; $this->type = "h$count"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function makeHeader($pageHeading1) {\n// section including, an h1 heading\n}", "public function headingRow() : int {\n return 1;\n }", "public function headingRow(){\n return 1;\n }", "function before_header(&$rpt, &$hdr){\n $ilTxtSize=10; //\n $ilLeading=0; //\n include_once (\"RptHeader.inc.php\");\n }", "private function printListHeader($start) {\n //check if first line of Section One but not first line of file\n if ($start == 0) {\n $temp = trim($this->array[$start]);\n //print $temp . \"<br/>\";\n fwrite($this->write_fh, $temp . \"\\n\");\n $i = 1;\n }\n\n //check if line is a header of section one\n else if (strpos($this->array[$start], \"ITEMS ON RESERVE FOR\") !== false && $start > 3) {\n $temp = trim($this->array[$start]);\n //print \"<br/><br/>\" . $temp . \"<br/>\";\n fwrite($this->write_fh, \"\\n\\n\" . $temp . \"\\n\");\n $i = 1;\n }\n\n $this->modifyLabels($start);\n }", "private function header(array $h, int $key) : void {\n $rules = [];\n $rules['label'] = 'required|max:250';\n $rules['subtype'] = 'required|in:h1,h2,h3,h4';\n $v = $this->vf->make($h, $rules);\n $this->generateErrors($v, $key);\n }", "abstract protected function generateHeader();", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name;\n\t\t\n\t\t$worksheet->set_column(0, 0, 50);\n\t\t$worksheet->set_column(1, 11, 6);\n\t\t$worksheet->set_column(12, 12, 8);\n\t\t$worksheet->set_column(13, 13, 10);\n\t\t$worksheet->set_column(14, 14, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"$heading_name\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ระดับตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"รวม\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"จำนวน ขรก.\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ร้อยละ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\tfor($i=1; $i<=11; $i++) $worksheet->write($xlsRow, $i, \"$i\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ทั้งหมด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "function HeaderFn1F() {\n # [h1 c:c SchInputEntity.Names.CurrentLegalOrRegistered] sub/dirReport.b line 16\n H(1,DataWithTag(5628),'c');\n# [end] sub/dirReport.b line 17\n}", "protected function padHeadings($content) {\n\t\t$content = phpQuery::newDocumentHTML($content);\n\t\t$headers = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6');\n\t\tforeach ($headers as $header) {\n\t\t\tforeach ($content->find($header) as $h) {\n\t\t\t\t$h = pq($h);\n\t\t\t\t$h_text = $h->text();\n\t\t\t\tif (preg_match('/[0-9][0-9.]*/', $h_text, $matches) > 0) {\n\t\t\t\t\t$h_original = $matches[0];\n\t\t\t\t\t$h_split = explode('.', $h_original);\n\t\t\t\t\tforeach ($h_split as $key => $item) {\n\t\t\t\t\t\tif ((int) $item < 10 && (int) $item[0] != 0) {\n\t\t\t\t\t\t\t$h_split[$key] = '0' . $item;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$h_new = implode('.', $h_split);\n\t\t\t\t\t$h_text = str_replace($h_original, $h_new, $h_text);\n\t\t\t\t\t$h->text($h_text);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $content->html();\n\t}", "public function header1() { return $this->_m_header1; }", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name, $search_mov_code;\n\t\t\n\t\tif ($search_mov_code[0]==1 || $search_mov_code[0]==3 || $search_mov_code[1]==3 || $search_mov_code[2]==3 || $search_mov_code[0]==4 || \n\t\t\t$search_mov_code[1]==4 || $search_mov_code[2]==4 || $search_mov_code[3]==4) {\n\t\t\t$worksheet->set_column(0, 0, 5);\n\t\t\t$worksheet->set_column(1, 1, 8);\n\t\t\t$worksheet->set_column(2, 2, 30);\n\t\t\t$worksheet->set_column(3, 3, 40);\n\t\t\t$worksheet->set_column(4, 4, 20);\n\t\t\t$worksheet->set_column(5, 5, 25);\n\t\t\t$worksheet->set_column(6, 6, 25);\n\t\t\t$worksheet->set_column(7, 7, 12);\n\t\t\t$worksheet->set_column(8, 8, 12);\n\t\t\t$worksheet->set_column(9, 9, 12);\n\t\t\t$worksheet->set_column(10, 10, 40);\n\n\t\t\t$xlsRow++;\n\t\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 1, \"คำนำ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 3, \"ชื่อตำแหน่งในสายงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 4, \"ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 5, \"วุฒิการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 6, \"วุฒิการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 7, \"วัน/เดือน/ปี\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 8, \"วัน/เดือน/ปี\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 9, \"วัน/เดือน/ปี\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 10, \"เหตุผลใน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$xlsRow++;\n\t\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 1, \"หน้านาม\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 4, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 6, \"สูงสุด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 7, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 8, \"ที่บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 9, \"ที่ลาออก\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 10, \"การลาออก\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t} else {\n\t\t\t$worksheet->set_column(0, 0, 5);\n\t\t\t$worksheet->set_column(1, 1, 8);\n\t\t\t$worksheet->set_column(2, 2, 30);\n\t\t\t$worksheet->set_column(3, 3, 40);\n\t\t\t$worksheet->set_column(4, 4, 20);\n\t\t\t$worksheet->set_column(5, 5, 45);\n\t\t\t$worksheet->set_column(6, 6, 45);\n\t\t\t$worksheet->set_column(7, 7, 12);\n\t\t\t$worksheet->set_column(8, 8, 12);\n\t\t\t$worksheet->set_column(9, 9, 40);\n\t\t\t$worksheet->set_column(10, 10, 40);\n\n\t\t\t$xlsRow++;\n\t\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 1, \"คำนำ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 3, \"ชื่อตำแหน่งในสายงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 4, \"ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 5, \"วุฒิการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 6, \"วุฒิการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 7, \"วัน/เดือน/ปี\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 8, \"วัน/เดือน/ปี\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 9, \"ส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$worksheet->write($xlsRow, 10, \"ลักษณะการโอน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LTR\", 0));\n\t\t\t$xlsRow++;\n\t\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 1, \"หน้านาม\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 4, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 5, \"ที่ให้โอน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 6, \"สูงสุด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 7, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 8, \"ที่ให้โอน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 9, \"ที่รับโอน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t\t\t$worksheet->write($xlsRow, 10, \"(ปกติ/สอบ)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LBR\", 0));\n\t}\n\t}", "function regenerateHeader()\n {\n /*\n * Recherche toutes les entetes de colonnes\n */\n foreach ($this->data as $row) {\n foreach ($row as $key => $value) {\n if (!in_array($key, $this->header)) {\n $this->header[] = $key;\n }\n }\n }\n /*\n * Reformate le tableau pour integrer l'ensemble des colonnes disponibles\n */\n $data = $this->data;\n $this->data = array();\n foreach ($data as $row) {\n $newline = array();\n foreach ($this->header as $key) {\n $newline[$key] = $row[$key];\n }\n $this->data[] = $newline;\n }\n }", "function heading($content, int $type, $attributes = [])\n{\n $allowed = [1, 2, 3, 4, 5, 6];\n\n if(in_array($type, $allowed))\n {\n $build = '<h' . $type . ' ';\n\n foreach ($attributes as $key => $value)\n {\n $build .= $key . '=\"' . $value . '\"';\n }\n\n $build .= '>' . $content;\n $build .= '</h' . $type . '>';\n\n return $build;\n }\n else\n {\n trigger_error(\"Unknown html heading type h{$type}. Headings are from h1 to h6 only.\");\n }\n}", "function regenerateHeader()\n {\n /*\n * Recherche toutes les entetes de colonnes\n */\n foreach ($this->data as $row) {\n foreach ($row as $key => $value) {\n if (!in_array($key, $this->header)) {\n $this->header[] = $key;\n }\n }\n }\n /*\n * Reformate le tableau pour integrer l'ensemble des colonnes disponibles\n */\n $data = $this->data;\n $this->data = array();\n foreach ($data as $row) {\n $newline = array();\n foreach ($this->header as $key) {\n $newline[$key] = $row[$key];\n }\n $this->data[] = $newline;\n }\n }", "public function Header()\n\t\t{\n\t\t\tif ($this->page > 1)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t$lineColor = array(19, 10, 188);\n\t\t\t$thickLineStretch = ($this->w - $this->original_lMargin - $this->original_rMargin) * 0.4;\n\t\t\t$thinLineStretch = ($this->w - $this->original_lMargin - $this->original_rMargin) - 0.5;\n\t\t\t\n\t\t\t$headerfont = $this->getHeaderFont();\n\t\t\t$headerdata = $this->getHeaderData();\n\t\t\t$this->y = $this->header_margin;\n\t\t\t\n\t\t\t// draw the thin lines first\n\t\t\t$this->SetLineStyle(array('width' => 1 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $lineColor));\n\t\t\t$this->Cell($thinLineStretch, 0, '', 'T', 0, 'C');\n\t\t\t$this->x = $this->original_lMargin;\n\t\t\t$this->y = $this->header_margin + 1.3;\n\t\t\t$this->Cell($thinLineStretch, 0, '', 'T', 0, 'C');\n\t\t\t\n\t\t\t// draw the thick lines next\n\t\t\t$this->x = $this->original_lMargin + 0.05;\n\t\t\t$this->y = $this->header_margin + 0.1;\n\t\t\t$this->SetLineStyle(array('width' => 8 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $lineColor));\n\t\t\t$this->Cell($thickLineStretch, 0, '', 'T', 0, 'C');\n\t\t\t\n\t\t\t$this->x = $this->original_lMargin + 0.05;\n\t\t\t$this->y = $this->header_margin + 1.2;\n\t\t\t$this->SetLineStyle(array('width' => 8 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $lineColor));\n\t\t\t$this->Cell($thickLineStretch, 0, '', 'T', 0, 'C');\n\t\t\t\n\t\t\t// logo\n\t\t\t$this->x = $this->w - $this->original_rMargin - $headerdata['logo_width'];\n\t\t\t$this->y = $this->header_margin - 0.01;\n\t\t\t$this->Image($headerdata['logo'], '', '', $headerdata['logo_width']);\n\t\t\t\n\t\t\t// text\n\t\t\t$this->SetTextColor(0, 0, 0);\n\t\t\t$this->x = $this->original_lMargin;\n\t\t\t$this->y = $this->header_margin + 0.2;\n\t\t\t$this->SetFont('HelveticaB', 'B', 12);\n\t\t\t$this->Cell(0, 0, 'BAYSTATE ROADS PROGRAM', '', 1, 'L');\n\t\t\t$this->SetFont('Times', '', 7);\n\t\t\t$this->Cell(0, 0, 'University of Massachusetts Transportation Center', '', 1);\n\t\t\t$this->Cell(0, 0, '214 Marston Hall', '', 1);\n\t\t\t$this->Cell(0, 0, '130 Natural Resources Road', '', 1);\n\t\t\t$this->Cell(0, 0, 'Amherst, MA 01003', '', 1);\n\t\t\t$this->Cell(0, 0, '(413) 545-5403 FAX: (413) 545-6471', '', 1);\n\t\t\t$this->Cell(0, 0, 'cindy@baystateroads.org http://www.mass.gov/baystateroads', '', 1);\n\t\t}", "public function getNextHeader(): int\n {\n return $this->next_header;\n }", "public function pdfHeaderPlus($oPdf)\n {\n }", "function Header()\t{\n\n\t\t$i= 0;\n\n\t\tif (! empty ($this->Watermark)) {\n\t\t\t$this->SetFont('Arial','B',50);\n \t$this->SetTextColor(255,192,203);\n \t\t$this->RotatedText(35,190, $this->Watermark, 45);\n \t\t$this->RotatedText(40,210, \"Election will be held in 2020\", 45);\n \t\t$this->SetTextColor(0,0,0);\n\t\t}\n\t\t\n $this->SetFont('Arial','B',24);\n $this->Ln(25);\n $this->Cell(0,0, $this->typepetition . \"PETITION COVER SHEET\",0,0,'C');\n $this->Ln(13);\n $this->Cell(0,0, strtoupper($this->party) . \" PARTY\",0,0,'C');\t\t\n $this->Ln(15); \n \n $this->SetFont('Arial','B',8);\n\t\t \n\t\t\n \n\t\t$YLocation_new = $Top_Corner_Y = $this->GetY() - 1.5; \n \t\t$this->SetY($Top_Corner_Y); \n \t$MyTop = $YLocation = $this->GetY();\n \n \t$this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n\n $this->SetFont('Arial','B', 8);\n $this->SetXY($this->Col1, $YLocation );\n $this->MultiCell($this->SizeCol1, 4, \"NAME\" . strtoupper($this->PluralCandidates) . \" OF CANDIDATE\" . strtoupper($this->PluralCandidates), 0, 'C');\n\n $this->SetXY($this->Col2, $YLocation );\n $this->MultiCell($this->SizeCol2, 4, $this->RunningForHeading[$this->PositionType[0]], 0, 'C');\n\n\t \t$this->SetXY($this->Col3, $YLocation );\n\t \t$this->MultiCell($this->SizeCol3, 4, \"PLACE\" . strtoupper($this->PluralCandidates) . \" OF RESIDENCE\", 0, 'C');\n\n \t$this->SetFont('Arial','',8);\n \t$Prev_PartyPosition = $this->PositionType[$i];\n\n\t\t$YLocation = $this->GetY() + 0.5;\n \t\t\t\n \n \t$this->Ln(2.8);\n\t \t\t\t\n\t $this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n \t\t\t\n \t$this->SetFont('Arial','B',11);\n\t\t$this->SetXY($this->Col1, $YLocation + 0.3 );\n\t\t$this->MultiCell($this->SizeCol1, 5, $this->Candidate[$i], 0, 'C', 0);\n\t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\n\t\t$this->SetFont('Arial','', 11); \t \t\t\n\t\t$this->SetXY($this->Col2, $YLocation );\n \t\t$this->MultiCell($this->SizeCol2, 5, $this->RunningFor[$i], 0, 'C', 0);\n\t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\t\t\t\t\t\t\t\t\n\t\t$this->SetXY($this->Col3, $YLocation );\n\t\t$this->MultiCell($this->SizeCol3, 5, $this->Residence[$i], 0, 'C', 0);\n\t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\n\t\t\t\t\t\t\t\t\t\n\t/*\t\t\n\t\n\t\t\n \t\t\t\t\t$pdf->Candidate[$TotalCandidates] = $key[\"CandidateName\"];\n \t\t\t\t\t$pdf->RunningFor[$TotalCandidates] = $key[\"CandidatePositionName\"];\n\t\t\t\t\t$pdf->Residence[$TotalCandidates] = $key[\"CandidateResidence\"];\n\t\t\t\t\t$pdf->PositionType[$TotalCandidates] = $key[\"PositionType\"];\t\t\t\t\t\n\t\t\n\t\t\t$PetitionData[$var[\"CanPetitionSet_ID\"]][\"TotalPosition\"] = $var[\"CandidateElection_Number\"];\n\t\t\t$PetitionData[$var[\"CanPetitionSet_ID\"]][\"PositionType\"]\t= $var[\"CandidateElection_PositionType\"];\n\t\t\t$PetitionData[$var[\"CanPetitionSet_ID\"]][\"CandidateName\"]\t= $var[\"Candidate_DispName\"];\n\t\t\t$PetitionData[$var[\"CanPetitionSet_ID\"]][\"CandidatePositionName\"]\t= $var[\"CandidateElection_PetitionText\"];\n\t\t\t$PetitionData[$var[\"CanPetitionSet_ID\"]][\"CandidateResidence\"] = $var[\"Candidate_DispResidence\"];\n\t*/\n\t\t\t\t\t\t\t\t\t\n\t\t$YLocation = $YLocation_new + 0.7; \n\t\t$this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n\t\t\n\t \t$this->SetY($YLocation);\t\n\t \t\n\t \t// Here I need to put the pieces.\n\t \t$this->Line($this->Line_Left, $MyTop - 0.1, $this->Line_Left, $YLocation - 0.1); \n\t \t$this->Line($this->Line_Col1, $MyTop - 0.1, $this->Line_Col1, $YLocation - 0.1); \n\t \t$this->Line($this->Line_Col2, $MyTop - 0.1, $this->Line_Col2, $YLocation - 0.1); \n\t \t$this->Line($this->Line_Right, $MyTop - 0.1, $this->Line_Right, $YLocation - 0.1); \n\t \t\n\t\t\t\n \t \n $YLocation = $this->GetY() - 1.5 ;\n \n $Botton_Corner_Y = $this->GetY();\n\n \t\t$this->Ln(8); \n\t\t$this->SetFont('Arial','', 15); \n\t\t$this->MultiCell(0, 10, \"Total Number of Volumes in the Petition: \" . $this->NumbersOfVolumesPetitions);\n\t\t\n\t\t$this->Ln(3); \n\t\t\n \t$this->MultiCell(0, 6, \"Identification Numbers:\");\n \n\t \t$this->SetFont('Arial','', 12);\n \t\t$this->SetX(20);\n \t$this->MultiCell(0, 5, $this->VolumesIDs, '', 'L');\n \t\n \t$this->Ln(4.5);\n \t$this->SetFont('Arial','B', 12); \n \t$this->MultiCell(0, 5, \"The petition contains the number, or in excess of the number, \" . \n \t\t\t\t\t\t\t\t\t\t\t\t\"of valid signatures required by the Election Law.\");\n\t\t$this->Ln(4.5);\n \t\n \t$this->SetFont('Arial','', 12); \n \t\n \t$this->SetX(20);\n \t$this->MultiCell(0, 5, \"Contact person to correct deficiencies: \" . $this->Person);\n\t\t$this->SetX(20);\n \t$this->MultiCell(0, 5, \"Residence address: \");\n \t\t$this->SetX(40);\n \t$this->MultiCell(0, 5, $this->Address, '', 'L');\n\t\t$this->SetX(20);\n \t$this->MultiCell(0, 5, \"Phone: \" . $this->Phone);\n\t\t$this->SetX(20);\n \t$this->MultiCell(0, 5, \"Email: \" . $this->Email);\n \t\n \t$this->Ln(4.5);\n \t\n \t \t$this->SetFont('Arial','B', 12); \n \t$this->MultiCell(0, 5, \"I hereby authorize that notice of any determination made by the Board of Elections \" . \n \t\t\t\t\t\t\t\t\t\t\t\t\"be transmitted to the person name above.\");\n \t\n \t#$this->Ln(1);\n\t\tif ( $this->AmendedmentCoverSheet == 'yes' ) {\n\t\t\t$this->Ln(7);\n\t\t\t$this->MultiCell(0, 5, \"This is to certify that I am authorized to file this amended cover sheet.\");\t\t\t\n\t\t}\n \n \n\t\t$this->Ln(4.5);\n\t\t$this->MultiCell(0, 10, \"Candidate or Agent\");\n \n \n \t$this->Ln(15);\n\t\t$this->MultiCell(0, 1, \"___________________________________________\");\n\t\t\n\t\t$this->SetFont('Arial','', 9);\n\t\t$this->MultiCell(0, 10, $this->SignatureLine);\n\t}", "static function showBeginHeader($type) {\n\n $out = \"\";\n switch ($type) {\n case self::PDF_OUTPUT_LANDSCAPE : //pdf\n case self::PDF_OUTPUT_PORTRAIT :\n global $PDF_TABLE;\n $PDF_TABLE .= \"<thead>\";\n break;\n\n case self::SYLK_OUTPUT : //sylk\n case self::CSV_OUTPUT : //csv\n break;\n\n default :\n $out = \"<thead>\";\n }\n return $out;\n }", "private function printHeader()\n {\n }", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 30);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 10);\n\t\t$worksheet->set_column(4, 4, 10);\n\t\t$worksheet->set_column(5, 5, 12);\n\t\t$worksheet->set_column(6, 6, 10);\n\t\t$worksheet->set_column(7, 7, 12);\n\t\t$worksheet->set_column(8, 8, 30);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ตำแหน่งและส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เงินเดือนก่อนเลื่อน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ให้ได้รับเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สังกัด/ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"อันดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"อันดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 20);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 25);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 20);\n\t\t$worksheet->set_column(8, 8, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่งระหว่างอบรม\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"กรม\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"กระทรวง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"รุ่น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t}", "function TableHeader() {\n if (strlen(trim($this->module_l2)) > 0) {\n $this->writeHTML($this->module_l2, true, false, true, false, '');\n $this->Ln(1);\n }\n\n $this->SetFillColor(255, 128, 0);\n $h = self::ROW_HEIGHT;\n for ($i = 0; $i < count($this->tableHeaders); $i++) {\n $w = $this->tableWidths[$i];\n $a = isset($this->tableAligns[$i]) ? $this->tableAligns[$i] : 'L';\n\n // Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n\n // Draw the border\n $this->Rect($x, $y, $w, $h);\n\n // Print the text\n $this->writeHTMLCell(\n $w, 5, $x, $y, $this->tableHeaders[$i], 0, 1, true, true, $a);\n\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 }", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 35);\n\t\t$worksheet->set_column(1, 1, 35);\n\t\t$worksheet->set_column(2, 2, 12);\n\t\t$worksheet->set_column(3, 3, 12);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 30);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ชื่อ - สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ประเภท\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ตั้งแต่วันที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ถึงวันที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"การส่งใบลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t}", "function PrintHeader(&$pdf,&$YPos,&$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,\n\t\t\t\t\t $Page_Width,$Right_Margin,$CategoryDescription) {\n\n\t/*PDF page header for Reorder Level report */\n\tif ($PageNumber>1){\n\t\t$pdf->newPage();\n\t}\n\t$line_height=12;\n\t$FontSize=9;\n\t$YPos= $Page_Height-$Top_Margin;\n\t$pdf->RoundRectangle($Left_Margin-5, $YPos+5+10, 310, ($line_height*3)+10+10, 10, 10);// Function RoundRectangle from includes/class.pdf.php\n\t$pdf->addTextWrap($Left_Margin,$YPos,290,$FontSize,$_SESSION['CompanyRecord']['coyname']);\n\n\t$YPos -=$line_height;\n\n\t$pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize,_('Reorder Level Report'));\n\t$pdf->addTextWrap($Page_Width-$Right_Margin-150,$YPos,160,$FontSize,_('Printed') . ': ' .\n\t\t Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page') . ' ' . $PageNumber,'left');\n\t$YPos -= $line_height;\n\t$pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,_('Category'));\n\t$pdf->addTextWrap(95,$YPos,50,$FontSize,$_POST['StockCat']);\n\t$pdf->addTextWrap(160,$YPos,150,$FontSize,$CategoryDescription,'left');\n\t$YPos -= $line_height;\n\t$pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,_('Location'));\n\t$pdf->addTextWrap(95,$YPos,50,$FontSize,$_POST['StockLocation']);\n\t$YPos -=(2*$line_height);\n\n\t/*set up the headings */\n\t$Xpos = $Left_Margin+1;\n\n\t$pdf->addTextWrap(50,$YPos,100,$FontSize,_('Part Number'), 'left');\n\t$pdf->addTextWrap(150,$YPos,150,$FontSize,_('Description'), 'left');\n\t$pdf->addTextWrap(410,$YPos,60,$FontSize,_('Location'), 'left');\n\t$pdf->addTextWrap(470,$YPos,50,$FontSize,_('Quantity'), 'right');\n\t$pdf->addTextWrap(520,$YPos,50,$FontSize,_('Reorder'), 'right');\n\t$pdf->addTextWrap(570,$YPos,50,$FontSize,_('On Order'), 'right');\n\t$pdf->addTextWrap(620,$YPos,50,$FontSize,_('Needed'), 'right');\n\t$YPos -= $line_height;\n\t$pdf->addTextWrap(515,$YPos,50,$FontSize,_('Level'), 'right');\n\n\n\t$FontSize=8;\n//\t$YPos =$YPos - (2*$line_height);\n\t$PageNumber++;\n}", "protected function blockHeader($Line)\n {\n $Block = parent::blockHeader($Line);\n\n if($Block['element']['name'] === 'h1' && !$this->isTitleFound){\n $this->title = $Block['element']['text'];\n $this->isTitleFound = true;\n }\n\n $index = array_search($Block['element']['name'], $this->tocTagList);\n\n if($index !== false) {\n $text = $Block['element']['text'];\n $id = preg_replace(\"/\\\\s/\", '_', $text);\n\n if($index > $this->tocLastIndex) {\n $tmpIndex = $index;\n while($tmpIndex > $this->tocLastIndex) {\n $this->tocText .= \"<ol>\\n\";\n $tmpIndex--;\n }\n }\n else if($index < $this->tocLastIndex) {\n $tmpIndex = $index;\n while($tmpIndex < $this->tocLastIndex) {\n $this->tocText .= \"</ol>\\n\";\n $tmpIndex++;\n }\n }\n\n $this->tocLastIndex = $index;\n $this->tocText .= '<li><a href=\"#'.$id.'\">'.$text.\"</a></li>\\n\";\n $Block['element']['attributes']['id'] = $id;\n }\n\n return $Block;\n }", "public function format_for_header()\n {\n }", "abstract protected function _getHeaderText();", "public function setHeader()\n {\n ;\n }", "function pi_list_header()\t{\n\t\t$lConf \t\t= $this->conf[\"listView.\"];\n\t\t$content\t= '';\n\t\t//$strTemplateName\t= $this->getTemplateName('listView');;\n\n\t\t// Header soll nicht angezeigt werden\n\t\tif(isset($lConf['showHeader']) && $lConf['showHeader'] == 0) return $content;\n\n\t\t$aFields \t\t\t\t\t= $GLOBALS['TYPO3_DB']->admin_get_fields($this->getTableName());\n\t\t$aFields\t\t\t\t\t= $this->_addDummyFields($aFields);\n\t\t$nFieldCounter\t\t= 0;\n\t\t\n\t\tforeach($aFields as $key => $value)\n\t\t\t{\n\t\t\t// Examples for tablefield \"name\" wich is field number 3\n\t\t\t\n\t\t\t// ###HEADER_NAME###\n\t\t\t$markerArray['###HEADER_' . strtoupper($key) . '###']\t= $this->getFieldHeader($key);\n\t\t\t// Old Version\n\t\t\t// '<div'.$this->pi_classParam('header_' . $key).'>' .\t$this->getFieldHeader($key) . '</div>';\n\n\t\t\t// ###HEADER_NAME_CLASS###\n\t\t\t$markerArray['###HEADER_' . strtoupper($key) . '_CLASS###']\t= $this->pi_classParam('header_' . $key);\n\n\t\t\t// ###HEADER3###\n\t\t\t$markerArray['###HEADER' . $nFieldCounter . '###']\t= $this->getFieldHeader($key);\n\n\t\t\t// ###HEADER3_CLASS###\n\t\t\t$markerArray['###HEADER' . $nFieldCounter . '###']\t= $this->pi_classParam('header_' . $key);\n\n\t\t\t// ###HEADER3_NAME### - will be substituted with 'name'\n\t\t\t$markerArray['###HEADER' . $nFieldCounter . '_NAME###']\t= $key;\n\n\t\t\t// ###HEADER3_NUMBER### - will be substituted with '3'\n\t\t\t$markerArray['###HEADER' . $nFieldCounter . '_NUMBER###']\t= $nFieldCounter;\n\t\t\t\t\n\t\t\t$nFieldCounter++;\n\t\t\t}\n\t\t$markerArray['###HEADERCLASS###'] = $this->pi_classParam(\"listheader\");\n\n\t\t$template = $this->getTemplateContent($this->getViewType());\n\t\t$templateHeader = $this->cObj->getSubpart($template,'###LIST_HEADER###');\n\n\t\t$content = $this->cObj->substituteMarkerArray($templateHeader,$markerArray);\n\t\t//debug($strOutput);\n\n\t\treturn $content;\n\t\t}", "function fillHeading($param, Application_Model_Headings $heading, $type = 'position')\n {\n $heading->type = $type;\n $heading->sequence = isset($param['sequence']) ? $param['sequence'] : 0;\n $heading->heading = isset($param['title']) ? $param['title'] : '';\n $heading->id = isset($param['hid']) ? $param['hid'] : 0;\n }", "protected function readHeader()\n {\n $this->readBytes(6); // GIF89a or GIF87a\n }", "abstract public function getHeading();", "public function LandScapeHeader() {\r\n $header_gauche = <<<EOD\r\n <p style = \"text-align:center\">\r\n Minist&egrave;re des Enseignements Secondaires<br/>\r\n *************<br/>\r\n D&eacute;l&eacute;gation R&eacute;gionale du Centre<br/>\r\n *************<br/>\r\n D&eacute;l&eacute;gation D&eacute;partementale de la MEFOU<br/>\r\n AFAMBA<br/>\r\n *************<br/>\r\n <b>INSTITUT POLYVALENT WAGU&Eacute;</b><br/>\r\n <i>&nbsp;&nbsp;Autorisation d'ouverture N° 79/12/MINESEC</i><br/>\r\n BP 5062 YAOUNDE<br/>\r\n T&eacute;l&eacute;phone: +237 97 86 84 99<br/>\r\n Email: <a href =\"maito:institutwague@yahoo.fr\">institutwague@yahoo.fr</a><br/>\r\n <a href = \"http://wwww.institutwague.com\">www.institutwague.com</a>\r\n </p>\r\n \r\nEOD;\r\n $this->SetFontSize(10);\r\n $this->writeHTMLCell(80, 30, 5, 5, $header_gauche);\r\n\r\n //$this->writeHTML($header_gauche);\r\n $this->Image($this->logo, 130, 5, 35, '', '', '', 'T', false, 300, '', false, false, 0, false, false, false);\r\n // Set font\r\n //$this->WriteHTML\r\n $header_droit = <<<EOD\r\n <p style = \"text-align:center\">R&eacute;publique du Cameroun<br/>\r\n <i>Paix-Travail-Patrie<br/>***********</p>\r\nEOD;\r\n $this->writeHTMLCell(70, 50, 230, 5, $header_droit);\r\n $this->SetFont('helvetica', 'B', 20);\r\n // set document information\r\n $this->SetCreator(\"BAACK Group\");\r\n $this->SetAuthor('BAACK Group');\r\n\r\n # set auto page breaks\r\n //$this->CEll\r\n $this->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\r\n }", "public function importHeadersAndFooters($path, $type = 'headerAndFooter')\n {\n switch ($type) {\n case 'headerAndFooter':\n $this->removeHeadersAndFooters();\n break;\n case 'header':\n $this->removeHeaders();\n break;\n case 'footer':\n $this->removeFooters();\n break;\n }\n // get, parse and extract the relevant files from the docx with the new headers/footers\n try {\n $baseHeadersFooters = new ZipArchive();\n $openHeadersFooters = $baseHeadersFooters->open($path);\n if ($openHeadersFooters !== true) {\n throw new Exception('Error while opening the docx to extract the header and/or footer');\n }\n } catch (Exception $e) {\n PhpdocxLogger::logger($e->getMessage(), 'fatal');\n }\n\n // extract the different roles: default, even or first played by the different headers and footers.\n // In order to do that we should first parse the node sectPr from the document.xml file\n $docHeadersFootersContent = $this->getFromZip('word/document.xml', 'DOMDocument', $baseHeadersFooters);\n\n // extract the first sectPr element in the document assuming there is only one section\n $docSectPr = $docHeadersFootersContent->getElementsByTagName('sectPr')->item(0);\n\n $headerTypes = array();\n $footerTypes = array();\n $titlePg = false;\n $extraSections = false;\n foreach ($docSectPr->childNodes as $value) {\n if ($value->nodeName == 'w:headerReference') {\n $headerTypes[$value->getAttribute('r:id')] = $value->getAttribute('w:type');\n } else if ($value->nodeName == 'w:footerReference') {\n $footerTypes[$value->getAttribute('r:id')] = $value->getAttribute('w:type');\n }\n }\n // check if the first and even headers and footers are shown in the original Word document\n $titlePg = false;\n if ($docHeadersFootersContent->getElementsByTagName('titlePg')->length > 0) {\n $titlePg = true;\n }\n\n $settingsHeadersFootersContent = $this->getFromZip('word/settings.xml', 'DOMDocument', $baseHeadersFooters);\n\n if ($settingsHeadersFootersContent->getElementsByTagName('evenAndOddHeaders')->length > 0) {\n $this->generateSetting('w:evenAndOddHeaders');\n }\n\n // parse word/_rels/document.xml.rels\n $wordHeadersFootersRelsT = $this->getFromZip('word/_rels/document.xml.rels', 'DOMDocument', $baseHeadersFooters);\n $relationships = $wordHeadersFootersRelsT->getElementsByTagName('Relationship');\n\n $counter = $relationships->length - 1;\n\n $relsHeader = array();\n $relsFooter = array();\n\n for ($j = $counter; $j > -1; $j--) {\n $rId = $relationships->item($j)->getAttribute('Id');\n $completeType = $relationships->item($j)->getAttribute('Type');\n $target = $relationships->item($j)->getAttribute('Target');\n $completeTypeExplode = explode('/', $completeType);\n $myType = array_pop($completeTypeExplode);\n\n switch ($myType) {\n case 'header':\n $relsHeader[$rId] = $target;\n break;\n case 'footer':\n $relsFooter[$rId] = $target;\n break;\n }\n }\n // in case there are more sectPr within $this->documentC include the corresponding elements\n $domDocument = $this->getDOMDocx();\n $sections = $domDocument->getElementsByTagName('sectPr');\n\n // start the looping over the $relsHeader and/or $relsFooter arrays\n if ($type == 'headerAndFooter' || $type == 'header') {\n foreach ($relsHeader as $key => $value) {\n // first check if there is a rels file for each header\n if ($this->getFromZip('word/_rels/' . $value . '.rels', 'DOMDocument', $baseHeadersFooters)) {\n // parse the corresponding rels file to copy and rename the images included in the header\n $wordHeadersRelsT = $this->getFromZip('word/_rels/' . $value . '.rels', 'DOMDocument', $baseHeadersFooters);\n $relations = $wordHeadersRelsT->getElementsByTagName('Relationship');\n\n $countrels = $relations->length - 1;\n\n for ($j = $countrels; $j > -1; $j--) {\n $completeType = $relations->item($j)->getAttribute('Type');\n $target = $relations->item($j)->getAttribute('Target');\n $completeTypeExplode = explode('/', $completeType);\n $myType = array_pop($completeTypeExplode);\n\n switch ($myType) {\n case 'hyperlink':\n // copy the header rels in the base template\n $header = $this->getFromZip('word/_rels/' . $value . '.rels', 'string', $baseHeadersFooters);\n\n $this->saveToZip($header, 'word/_rels/' . $value . '.rels');\n break;\n case 'image':\n $refExtensionExplode = explode('.', $target);\n $refExtension = array_pop($refExtensionExplode);\n $refImage = 'media/image' . uniqid(mt_rand(999, 9999)) . '.' . $refExtension;\n // change the attibute to the new name\n $relations->item($j)->setAttribute('Target', $refImage);\n // copy the image in the base template with the new name\n $image = $this->getFromZip('word/' . $target, 'string', $baseHeadersFooters);\n $this->saveToZip($image, 'word/' . $refImage);\n // copy the associated rels file\n $this->saveToZip($wordHeadersRelsT, 'word/_rels/' . $value . '.rels');\n // make sure that the corresponding image types are included in [Content_Types].xml\n $imageTypeFound = false;\n foreach ($this->_contentTypeT->documentElement->childNodes as $node) {\n if ($node->nodeName == 'Default' && $node->getAttribute('Extension') == $refExtension) {\n $imageTypeFound = true;\n }\n }\n if (!$imageTypeFound) {\n $newDefaultNode = '<Default Extension=\"' . $refExtension . '\" ContentType=\"image/' . $refExtension . '\" />';\n $newDefault = $this->_contentTypeT->createDocumentFragment();\n $newDefault->appendXML($newDefaultNode);\n $baseDefaultNode = $this->_contentTypeT->documentElement;\n $baseDefaultNode->appendChild($newDefault);\n }\n break;\n }\n }\n }\n\n // copy the corresponding header xml files\n $file = $this->getFromZip('word/' . $value, 'string', $baseHeadersFooters);\n $this->saveToZip($file, 'word/' . $value);\n // modify the /_rels/document.xml.rels of the base template to include the new element\n $newId = uniqid(mt_rand(999, 9999));\n $newHeaderNode = '<Relationship Id=\"rId';\n $newHeaderNode .= $newId . '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header\"';\n $newHeaderNode .= ' Target=\"' . $value . '\" />';\n $newNode = $this->_wordRelsDocumentRelsT->createDocumentFragment();\n $newNode->appendXML($newHeaderNode);\n $baseNode = $this->_wordRelsDocumentRelsT->documentElement;\n $baseNode->appendChild($newNode);\n\n // as well as the section DOMNode\n $newSectNode = '<w:headerReference w:type=\"' . $headerTypes[$key] . '\" r:id=\"rId' . $newId . '\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"/>';\n $sectNode = $this->_sectPr->createDocumentFragment();\n $sectNode->appendXML($newSectNode);\n $refNode = $this->_sectPr->documentElement->childNodes->item(0);\n $refNode->parentNode->insertBefore($sectNode, $refNode);\n // and include the corresponding <Override> in [Content_Types].xml\n $newOverrideNode = '<Override PartName=\"/word/' . $value . '\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml\" />';\n $newOverride = $this->_contentTypeT->createDocumentFragment();\n $newOverride->appendXML($newOverrideNode);\n $baseOverrideNode = $this->_contentTypeT->documentElement;\n $baseOverrideNode->appendChild($newOverride);\n\n\n foreach ($sections as $section) {\n $extraSections = true;\n $refNode = $section->childNodes->item(0);\n $sectNode = $domDocument->createDocumentFragment();\n $sectNode->appendXML($newSectNode);\n $refNode->parentNode->insertBefore($sectNode, $refNode);\n }\n }\n }\n if ($type == 'headerAndFooter' || $type == 'footer') {\n foreach ($relsFooter as $key => $value) {\n // check if there is a rels file for each footer\n if ($this->getFromZip('word/_rels/' . $value . '.rels', 'DOMDocument', $baseHeadersFooters)) {\n // parse the corresponding rels file to copy and rename the images included in the footer\n $wordFootersRelsT = $this->getFromZip('word/_rels/' . $value . '.rels', 'DOMDocument', $baseHeadersFooters);\n $relations = $wordFootersRelsT->getElementsByTagName('Relationship');\n\n $countrels = $relations->length - 1;\n\n for ($j = $countrels; $j > -1; $j--) {\n $completeType = $relations->item($j)->getAttribute('Type');\n $target = $relations->item($j)->getAttribute('Target');\n $completeTypeExplode = explode('/', $completeType);\n $myType = array_pop($completeTypeExplode);\n\n switch ($myType) {\n case 'hyperlink':\n // copy the footer rels in the base template\n $footer = $this->getFromZip('word/_rels/' . $value . '.rels', 'string', $baseHeadersFooters);\n\n $this->saveToZip($footer, 'word/_rels/' . $value . '.rels');\n break;\n case 'image':\n $refExtension = array_pop(explode('.', $target));\n $refImage = 'media/image' . uniqid(mt_rand(999, 9999)) . '.' . $refExtension;\n // change the attibute to the new name\n $relations->item($j)->setAttribute('Target', $refImage);\n // copy the image in the base template with the new name\n $image = $this->getFromZip('word/' . $target, 'string', $baseHeadersFooters);\n $this->saveToZip($image, 'word/' . $refImage);\n // copy the associated rels file\n $this->saveToZip($wordFootersRelsT, 'word/_rels/' . $value . '.rels');\n // make sure that the corresponding image types are included in [Content_Types].xml\n $imageTypeFound = false;\n foreach ($this->_contentTypeT->documentElement->childNodes as $node) {\n if ($node->nodeName == 'Default' && $node->getAttribute('Extension') == $refExtension) {\n $imageTypeFound = true;\n }\n }\n if (!$imageTypeFound) {\n $newDefaultNode = '<Default Extension=\"' . $refExtension . '\" ContentType=\"image/' . $refExtension . '\" />';\n $newDefault = $this->_contentTypeT->createDocumentFragment();\n $newDefault->appendXML($newDefaultNode);\n $baseDefaultNode = $this->_contentTypeT->documentElement;\n $baseDefaultNode->appendChild($newDefault);\n }\n break;\n }\n }\n }\n\n // copy the corresponding footer xml files\n $file = $this->getFromZip('word/' . $value, 'string', $baseHeadersFooters);\n $this->saveToZip($file, 'word/' . $value);\n // modify the /_rels/document.xml.rels of the base template to include the new element\n $newId = uniqid(mt_rand(999, 9999));\n $newFooterNode = '<Relationship Id=\"rId';\n $newFooterNode .= $newId . '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer\"';\n $newFooterNode .= ' Target=\"' . $value . '\" />';\n $newNode = $this->_wordRelsDocumentRelsT->createDocumentFragment();\n $newNode->appendXML($newFooterNode);\n $baseNode = $this->_wordRelsDocumentRelsT->documentElement;\n $baseNode->appendChild($newNode);\n\n // as well as the section DOMNode\n $newSectNode = '<w:footerReference w:type=\"' . $footerTypes[$key] . '\" r:id=\"rId' . $newId . '\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"/>';\n $sectNode = $this->_sectPr->createDocumentFragment();\n $sectNode->appendXML($newSectNode);\n $refNode = $this->_sectPr->documentElement->childNodes->item(0);\n $refNode->parentNode->insertBefore($sectNode, $refNode);\n\n // include the corresponding <Override> in [Content_Types].xml\n $newOverrideNode = '<Override PartName=\"/word/' . $value . '\" ContentType=\"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\" />';\n $newOverride = $this->_contentTypeT->createDocumentFragment();\n $newOverride->appendXML($newOverrideNode);\n $baseOverrideNode = $this->_contentTypeT->documentElement;\n $baseOverrideNode->appendChild($newOverride);\n\n foreach ($sections as $section) {\n $extraSections = true;\n $refNode = $section->childNodes->item(0);\n $sectNode = $domDocument->createDocumentFragment();\n $sectNode->appendXML($newSectNode);\n $refNode->parentNode->insertBefore($sectNode, $refNode);\n }\n }\n }\n $stringDoc = $domDocument->saveXML();\n $bodyTag = explode('<w:body>', $stringDoc);\n if (isset($bodyTag[1])) {\n $this->_wordDocumentC = str_replace('</w:body></w:document>', '', $bodyTag[1]);\n }\n\n if ($titlePg) {\n $this->generateTitlePg($extraSections);\n }\n }", "public function LandScapeHeader() {\n $header_gauche = <<<EOD\n <p style = \"text-align:center;line-height: 10px\">\n REPUBLIQUE DU CAMEROUN<br/>\n <i>Paix - Travail - Patrie</i><br/>\n ________________________________<br/>\n MINISTERE DES ENSEIGNEMENTS SECONDAIRES<br/>\n SECRETARIAT A L'EDUCATION ADVENTISTE<br/>\n ____________________________<br/>\n <b>Complexe Scolaire Bilingue Adventiste<br/>\n Jos&eacute;phine Nsangou</b><br/>\n Tel. 234 19 02 45 - BP 96 - Foumbot<br/>\n <i>Email : cosbafoumbot@yahoo.fr</i>\n _____________________<br/>\n <i>Foi - Engagement - Succ&egraves;</i>\n </p>\n \n \nEOD;\n $this->SetFontSize(10);\n $this->writeHTMLCell(80, 30, 5, 5, $header_gauche);\n\n //$this->writeHTML($header_gauche);\n $this->Image($this->logo, 130, 5, 35, '', '', '', 'T', false, 300, '', false, false, 0, false, false, false);\n // Set font\n //$this->WriteHTML\n $header_droit = <<<EOD\n <p style = \"text-align:center;line-height: 10px\">\n REPUBLIC OF CAMEROON<br/>\n <i>Peace - Work - Fatherland</i><br/>\n _______________________<br/>\n MINISTRY OF SECONDARY EDUCATION<br/>\n ADVENTIST EDUCATION SECRETARIAT<br/>\n _______________________<br/>\n <b>Jos&eacute;phine Nsangou<br/>\n Adventist Bilingual Academic Complex</b><br/>\n Tel. 243 19 02 45 - P.O. Box 96 - Foumbot<br/>\n <i>Email : cosbafoumbot@yahoo.fr</i><br/>\n ___________________________<br/>\n <i>Faith - Commitment - Success</p>\nEOD;\n $this->writeHTMLCell(150, 50, 230, 5, $header_droit);\n $this->SetFont('helvetica', 'B', 20);\n // set document information\n $this->SetCreator(\"BAACK Group\");\n $this->SetAuthor('BAACK Group');\n\n # set auto page breaks\n //$this->CEll\n $this->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n }", "function _get_heading_tag_name( int $level ): string {\n\treturn ( 1 <= $level && $level <= 6 ) ? \"h$level\" : 'h3';\n}", "function pageHeader()\r\n {\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n }", "function addHeading($heading){\n\t\t$this->modifier=\"T\".count($this->fieldName);\n\t\t$this->fieldName[$this->modifier]=$heading;\n\t\t}", "public function writeHeader()\n {\n $html = <<< HTML_STYLE\n<style type=\"text/css\">\n .charcoal {\n font-family: 'Verdana';\n }\n .charcoal table {\n width: 100%;\n border-left: 1px silver solid;\n border-top: 1px silver solid;\n margin-top: 2px;\n }\n .charcoal tr {\n height: 30px;\n }\n .charcoal th {\n border-right: 1px silver solid;\n border-bottom: 1px silver solid;\n background-color: bisque;\n color: coral;\n font-size: 11px;\n }\n .charcoal td {\n border-right: 1px silver solid;\n border-bottom: 1px silver solid;\n background-color: seashell;\n color: darkslategray;\n font-size: 11px;\n }\n .charcoal .value {\n margin: 5px;\n }\n .charcoal .center {\n text-align: center;\n }\n/* Source Code */\n.source_code {\n font-family: 'Courier New', Arial, Tahoma, Verdana;\n font-size: 10pt;\n}\n\n.charcoal td.even {\n background-color: #EEFEEF;\n}\n\n.charcoal td.odd {\n background-color: #DDEDDE;\n}\n\n.charcoal .level_t { background-color: #EEFEEF; }\n.charcoal .level_i { background-color: #DDEDDE; }\n.charcoal .level_d { background-color: antiquewhite; }\n.charcoal .level_w { background-color: khaki; }\n.charcoal .level_e { background-color: lightsalmon; }\n.charcoal .level_f { background-color: palevioletred; }\n</style>\nHTML_STYLE;\n\n $html .= '<div class=\"charcoal\">' . PHP_EOL;\n $html .= '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">' . PHP_EOL;\n $html .= '<tr>' . PHP_EOL;\n $html .= ' <th><div class=\"value\">TimeStamp</div></th>' . PHP_EOL;\n $html .= ' <th><div class=\"value\">Level</div></th>' . PHP_EOL;\n $html .= ' <th><div class=\"value\">Tag</div></th>' . PHP_EOL;\n $html .= ' <th><div class=\"value\">Message</div></th>' . PHP_EOL;\n $html .= ' <th><div class=\"value\">File(Line)</div></th>' . PHP_EOL;\n $html .= '</tr>' . PHP_EOL;\n\n echo $html;\n }", "function main_header($a_type)\n\t{\n\t\tglobal $lng;\n\n\t\t$this->tpl->getStandardTemplate();\n\n\t\t// content style\n\t\t$this->tpl->setCurrentBlock(\"ContentStyle\");\n\t\t$this->tpl->setVariable(\"LOCATION_CONTENT_STYLESHEET\",\n\t\t\tilObjStyleSheet::getContentStylePath($this->lm_obj->getStyleSheetId()));\n\t\t$this->tpl->parseCurrentBlock();\n\n\t\t// syntax style\n\t\t$this->tpl->setCurrentBlock(\"SyntaxStyle\");\n\t\t$this->tpl->setVariable(\"LOCATION_SYNTAX_STYLESHEET\",\n\t\t\tilObjStyleSheet::getSyntaxStylePath());\n\t\t$this->tpl->parseCurrentBlock();\n\n\t}", "function addheader($headern,$headervalue)\r\n\t{\r\n\t\tif(!isset($this->header))\r\n\t\t $this->header = array();\r\n\t\t \r\n\t\t$this->header[$headern] = $headervalue;\r\n\t}", "public function UPSEdiHeader($result) {\n\n\t$ups_booknum = $this->ForwarderRecord['tracking_start'];\n\n\t$ups_pagenum = $this->ForwarderRecord['last_tracking'];\n\n\t\n\n\t$BookNumValue = $this->ForwarderRecord['tracking_start'];\n\n\t$PageNumValue = $this->ForwarderRecord['last_tracking'] + 1;\n\n\t\n\n\tif($PageNumValue > 999) {\n\n\t\t$BookNum = ($this->ForwarderRecord['tracking_start'] == '5936143') ? '5936144' : (($this->ForwarderRecord['tracking_start'] == '5936144') ? '5936143' : $this->ForwarderRecord['tracking_start']);\n\n\t\t$PageNum = '001';\n\n\t}\n\n\telse {\n\n\t\t$BookNum = $BookNumValue;\n\n\t\t$PageNum = $PageNumValue;\n\n\t}\n\n\t$trail = '';\n\n\tif(strlen($PageNum) < 3) {\n\n\t\tfor($b=0;$b<(3 - strlen($PageNum));$b++) {\n\n\t\t\t$trail .= 0;\n\n\t\t}\n\n\t\t$PageNum = $trail.$PageNum;\n\n\t}\n\n\t\n\n\t// Update Book Number and Page Number\n\n\t$this->_db->update(FORWARDERS,array('tracking_start'=>$BookNum,'last_tracking'=>$PageNum),\"forwarder_id IN(17,18,19)\");\n\n\t\n\n\t\n\n\t// Header Segment\n\n\t$VersionNumber \t\t\t= \"0200\";\n\n\t$DataSource \t\t\t= \"94\";// Before 07 change(03-08-2013)\n\n\t$MailboxID \t\t\t\t= commonfunction::paddingRight(\" \",24);\n\n\t$ClientSoftwareVersion = commonfunction::paddingRight(\"V4R2\",10);\n\n\t$PickupDate \t\t\t= date('Ymd');\n\n\t\n\n\t$PLDSequenceNumber \t \t= $BookNum.$PageNum;\n\n\t$leadzero = '';\n\n\tif(strlen($PLDSequenceNumber) < 15) {\n\n\t\tfor($p=0;$p<(15 - strlen($PLDSequenceNumber));$p++) {\n\n\t\t\t$leadzero .= 0;\n\n\t\t}\n\n\t\t$PLDSequenceNumber = $leadzero.$PLDSequenceNumber;\n\n\t}\n\n\t\n\n\t$IncrementalPLDCode \t= \"00\";\n\n\t$SoftwareVendorCode \t= \"000\";\n\n\t$NumShipperSegsInFile \t= \"000000001\";\n\n\t\n\n\t// Total Length of Header Segment should be 77\n\n\t$HeaderInfo = $VersionNumber.$DataSource.$MailboxID.$ClientSoftwareVersion.$PickupDate.$PLDSequenceNumber.$IncrementalPLDCode.$SoftwareVendorCode.$NumShipperSegsInFile;\n\n\t\n\n\t/**\n\n\t * SHIPPER/BOOK/PAGE INFORMATION SEGMENT - *AA\n\n\t **/\n\n\t$SegmentIdentifierAA \t= \"*AA\";\n\n\t\n\n\t// Find Forwarder Account Number\n\n\t//$upsConfigRow = $this->getUpsConfiguration($result);\n\n\t$account_code1 = $this->ForwarderRecord['contract_number'];\n\n\t$account_code2 = $this->ForwarderRecord['sub_contract_number'];\n\n\t$ShipperNumber = $account_code1.$account_code2;\n\n\t\n\n\t$SenderShipperNumber = commonfunction::paddingRight($ShipperNumber,10);\n\n\t$ShipperCountry \t= \"NL\";\n\n\t$ShipperEIN \t\t= commonfunction::paddingRight(\" \",15);\n\n\t$CalculatedRatesInd = commonfunction::paddingRight(\" \",1);\n\n\t\n\n\t// A8 : NumShipmentsInPage\n\n\t$totalParcel = count($result);\n\n\t$NumShipmentsInPage = commonfunction::paddingleft($totalParcel,6,'0');\n\n\t\n\n\t// Total Length of SHIPPER/BOOK/PAGE INFORMATION SEGMENT should be 47\n\n\t$ShipperSegment = $SegmentIdentifierAA.$SenderShipperNumber.$ShipperCountry.$ShipperEIN.$CalculatedRatesInd.$BookNum.$PageNum.$NumShipmentsInPage;\n\n\t\n\n\t return $HeaderInfo.$ShipperSegment;\n\n\t}", "private function normalize_header() {\n\t\tif (!$this->skeleton->built('header')) {\n\t\t\t$header = self::fetch('rma_header', [':rma_id' => $this->id()]);\n\t\t}\n\t\telse {\n\t\t\t$header = $this->skeleton->get('header');\n\t\t\t$this->skeleton->rebuild('header');\n\t\t}\n\n\t\t$date_fields = ['follow_up_date', 'created_on'];\n\t\tforeach ($date_fields as $field) {\n\t\t\t$header[$field] = ck_datetime::datify($header[$field]);\n\t\t}\n\n\t\t$bool_fields = ['closed', 'refund_shipping', 'refund_coupon'];\n\t\tforeach ($bool_fields as $field) {\n\t\t\t$header[$field] = CK\\fn::check_flag($header[$field]);\n\t\t}\n\n\t\t$this->skeleton->load('header', $header);\n\t}", "public static function header_output()\n {\n\n }", "function NewPageHeader () {\r\n\tglobal $PageNumber,\r\n\t\t\t\t$pdf,\r\n\t\t\t\t$YPos,\r\n\t\t\t\t$YPos2,\r\n\t\t\t\t$YPos4,\r\n\t\t\t\t$Page_Height,\r\n\t\t\t\t$Page_Width,\r\n\t\t\t\t$Top_Margin,\r\n\t\t\t\t$FontSize,\r\n\t\t\t\t$Left_Margin,\r\n\t\t\t\t$XPos,\r\n\t\t\t\t$XPos2,\r\n\t\t\t\t$Right_Margin,\r\n\t\t\t\t$line_height;\r\n\t\t\t\t$line_width;\r\n\r\n\t/*PDF page header for GL Account report */\r\n\r\n\tif ($PageNumber > 1){\r\n\t\t$pdf->newPage();\r\n\t}\r\n$YPos= $Page_Height-$Top_Margin;\r\n}", "private function _start_header() {\n $this->_write('{\"header\":{');\n $this->_write('\"version\":\"2013-04\"');\n $this->_write(',\"scope\":[\"all\"]');\n $this->_write('}}');\n }", "public function startHeader ()\n {\n //stitches together all header functions\n $this->thepage();\n\n }", "function handleHeader($level) {\n static $id = null;\n if ($this->parser->isStartTag) {\n if (isset($this->parser->tagAttributes['id'])) {\n $id = $this->parser->tagAttributes['id'];\n }\n } else {\n if (!is_null($id)) {\n $this->out(' {#'.$id.'}');\n $id = null;\n }\n }\n parent::handleHeader($level);\n }", "public function Header() {\n\t\t\n\t\tglobal $control, $hhID, $hh_fullname;\n\n\t\t$style4 = array('L' => array('width' => 0.10, 'cap' => 'round', 'join' => 'miter', 'dash' => 0),\n\t\t\t\t\t\t'T' => array('width' => 0.10, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)),\n\t\t\t\t\t\t'R' => array('width' => 0.10, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)),\n\t\t\t\t\t\t'B' => array('width' => 0.10, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)));\n\n// 9-5-2019: v 3.9.3 update - draw a series of boxes within boxes for Header.\t\t-mlr\t\t\t\t\t\t\n\t\t$this->Rect(9, 4, 192, 19, 'null', $style4, array(255, 255, 255));\t\n\t\t$this->Rect(56, 4, 100, 19, 'null', $style4, array(255, 255, 255));\t\t\n\t\t$this->Rect(56, 4, 100, 9.5, 'null', $style4, array(255, 255, 255));\t\t\n\t\t\n\t\t// logo\n\t\t$image_file = \"images/pep_logo.jpg\";\n\t\t$this->Image($image_file, 10, 5, 45, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n\n// 9-5-2019: v 3.9.3 update - move date and pantry name to footer, reposition household name and id, \n//\t\tincrease window size of staff initials.\t\t-mlr\t\t\n\t\t\n\t\t// column 1\n\t\t$pName=$this->doPantryName( $control );\n\t\t$this->SetFont('helvetica', '', 8);\t\t\t\n\t\t$this->writeHTMLCell(95, 10, 57, 4.5, \"primary shopper\", 0,0,0,true,\"L\",true);\t\t\t\n\t\t$this->SetFont('courier', 'b', 16);\t\t\t\n\t\t$this->writeHTMLCell(95, 10, 57, 7, $hh_fullname, 0,0,0,true,\"L\",true);\n\t\t$this->SetFont('helvetica', '', 8);\t\t\t\n\t\t$this->writeHTMLCell(95, 10, 57, 14, \"household id\", 0,0,0,true,\"L\",true);\t\t\n\t\t$this->SetFont('courier', 'B', 14);\t\t\t\n\t\t$this->writeHTMLCell(95, 10, 57, 17, $hhID, 0,0,0,true,\"L\",true);\t\t\n\t\t\n\t\t// column 2\n\t\t$this->SetFont('helvetica', '', 11);\n\t\t$this->writeHTMLCell(95, 10, 157, 5, \"Essentials Shopping List\", 0,0,0,true,\"L\",true);\t\n\t\t$this->setColor(\"draw\", 175,175,175);\t// border color\n\t\t$this->SetFillColor(238, 238, 238);\t\t\t\n\t\t$this->writeHTMLCell(43, 11, 157, 11, \" \", \"\",0,1,true,\"R\",true);\n\t\t$this->setColor(\"text\", 130,130,130);\n\t\t$this->SetFont('helvetica', 'IB', 12);\t\t\n\t\t$this->setColor(\"text\", 200,200,200);\n\t\t$this->writeHTMLCell(50, 7, 153, 14, \"STAFF INITIALS\", 0,0,0,true,\"C\",true);\t\n\t\t$this->setColor(\"draw\");\n\t\t\n\t\t// Underline Heading\t\t\n//\t\t$this->writeHTMLCell(190, 2, 10, 18.5, \" \", \"B\",0,0,true,\"R\",true);\t\t\n\t}", "function Header() {\n\t\t$this->Rect(2, 2, 206, 293);\n\t}", "public function nextHeader() {\n if (is_array($this->hdrPointer)) {\n return array_shift($this->hdrPointer);\n } else {\n return NULL;\n }\n }", "function printHeader() {\n $this->setHeader(\"Content-Type\",$this->contentType);\n \n // flag for an already sent response header\n $responseCodeSent = FALSE;\n \n foreach ($this->header as $name => $value) {\n if (substr($name,0,1) != \"_\") { \n \n // only send response code with first header\n if($responseCodeSent) {\n header(\"$name: $value\");\n } else {\n header(\"$name: $value\", TRUE, $this->responseCode);\n $responseCodeSent = TRUE;\n }\n }\n } \n \n }", "static function showEndHeader($type) {\n\n $out = \"\";\n switch ($type) {\n case self::PDF_OUTPUT_LANDSCAPE : //pdf\n case self::PDF_OUTPUT_PORTRAIT :\n global $PDF_TABLE;\n $PDF_TABLE .= \"</thead>\";\n break;\n\n case self::SYLK_OUTPUT : //sylk\n case self::CSV_OUTPUT : //csv\n break;\n\n default :\n $out = \"</thead>\";\n }\n return $out;\n }", "public function header() \r\n {\r\n //Logo or full page background image\r\n //$this->Image('images/test_logo.jpg',10,8,15,15);\r\n //checkif want image/logo displayed at all\r\n if(!isset($this->bg_image[5]) or $this->bg_image[5] !== 'YES') {\r\n $this->Image($this->bg_image[0],$this->bg_image[2],$this->bg_image[1],$this->bg_image[3],$this->bg_image[4]);\r\n } \r\n \r\n //font face for all text...should not be set anywhere else\r\n $this->SetFont($this->font_face);\r\n\r\n if($this->show_header) {\r\n $this->changeFont('H1');\r\n $this->SetXY($this->h1_title[7],$this->h1_title[6]);\r\n \r\n //ALL documents page header text if any set\r\n if($this->h1_title[5] != '')\r\n {\r\n $this->Cell(0,$this->header_format['row_height'],$this->h1_title[5],0,0,$this->h1_title[8],0);\r\n $this->Ln(7);\r\n $this->SetX($this->h1_title[7]);\r\n }\r\n \r\n //SPECIFIC document header text \r\n //$this->Cell(0,7,$this->page_title,0,0,$this->h1_title[8],0);\r\n $this->MultiCell(0,$this->header_format['row_height'],$this->page_title,0,$this->h1_title[8],0);\r\n \r\n //date display\r\n if($this->h1_title[9] === 'YES')\r\n {\r\n $this->changeFont('DATE');\r\n $this->SetXY($this->w - $this->h1_title[16],$this->h1_title[15]);\r\n $this->Cell(0,0,$this->h1_title['date'],0,0,'L',0);\r\n }\r\n \r\n //set to start of page after top margin\r\n $this->SetY($this->page_margin[0]);\r\n } \r\n \r\n \r\n }", "private function printHeader(){\r\n\t\tswitch( $this->Header ){\r\n\t\t\tcase Header::NEW_GAME:\r\n\t\t\t\t$this->println( $this->TextStorage->getMessage( Text::NEW_GAME ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase Header::MOVE_INCORRECT:\r\n\t\t\t\t$this->println( $this->TextStorage->getMessage( Text::MOVE_INCORRECT ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase Header::UNKNOWN_COMMAND:\r\n\t\t\t\t$this->println( $this->TextStorage->getMessage( Text::UNKNOWN_COMMAND ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase Header::HELP:\r\n\t\t\t\t$this->println( $this->TextStorage->getMessage( Text::HELP ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase Header::LIST:\r\n\t\t\t\t$this->println( $this->TextStorage->getMessage( Text::LIST ) );\r\n\t\t\t\t$guide = $this->TextStorage->getCommandsGuide();\r\n\t\t\t\tfor( $i = 0; $i < count( $guide ); $i++ ){\r\n\t\t\t\t\t$this->println( $guide[$i] );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function pdfHeader($oPdf)\n {\n }", "function athen_page_header() {\n\t$obj = athen_global_obj();\n $header_style = $obj->header_style;\n\tif ( $obj->has_page_header && $header_style !== \"three\" ) {\n\t\tget_template_part( 'partials/pageheader/page-header' );\n\t}\n}", "function Header()\t{\n\t\t$YLocation = $this->GetY();\n\t\t$this->SetTextColor(0);\n\t\t\n\t\tif (! empty ($this->Watermark)) {\n\t\t\t$this->SetFont('Arial','B',50);\n \t$this->SetTextColor(255,192,203);\n \t\t$this->RotatedText(35,190, $this->Watermark, 45);\n \t\t$this->RotatedText(40,210, \"Signature on March 2, 2021\", 45);\n \t\t$this->SetTextColor(0,0,0);\n\t\t}\n\n\t\tif (! empty ($this->DemoPrint)) {\t\t\n\t\t\t$this->SetXY(125, 1);\n\t\t\t$this->SetFont('Arial', 'B', 15);\n\t\t\t$this->SetTextColor(0,0,255);\n\t\t\t$this->Link(125, 1, 90, 10, \"https://repmyblock.nyc/exp/multipetition/propose\");\n \t \t$this->MultiCell(90, 5, \"Click here for more information on how to participate.\", 0, 'R');\n \t \t$this->SetTextColor(0); \t \t\n \t \t$this->SetXY($this->Col1, $YLocation);\n\t\t}\n\t\t\n\t\t$this->SetFont('Arial','',10);\n\t\t\n $this->SetFont('Arial','B',12);\n $this->Cell(0,0, strtoupper($this->party) . \" PARTY\",0,0,'C');\n $this->Ln(4);\n\t\t$this->Cell(0,0, \"Designating Petition - \" . $this->county . ' County',0,0,'C');\n $this->Ln(3); \n \n $this->SetFont('Arial','B',8);\n $this->Cell(36,2.8, 'To the Board of Elections:');\n $this->SetFont('Arial','',8);\n\t\t$this->Cell(192,2.8, \n\t\t\t\"I, the undersigned, do hereby state that I am a duly \" . \n\t\t\t\"enrolled voter of the \" . $this->party . \" Party \" .\n\t\t\t\"and entitled to vote at the next primary\");\n\t\t$this->Ln(2.8);\n\t\t \n\t\t$this->MultiCell(0,2.8, \n\t\t\t\"election of such party, to be held on \" . \n\t\t\t$this->ElectionDate . \"; that my place of residence is truly \" . \n\t\t\t\"stated opposite my signature hereto, and I do hereby designate \" .\n\t\t\t\"the following named person\" . $this->PluralCandidates . \" as \" .\n\t\t\t$this->PluralAcandidates . \" candidate\" . $this->PluralCandidates . \" for \". \n\t\t\t\"the \" . $this->CandidateNomination);\n $this->Ln(2.8);\n \n\t\t$YLocation_new = $Top_Corner_Y = $this->GetY() - 1.5; \n\t\n \t\t$this->SetY($Top_Corner_Y);\n \t\t\n \t\t\n \t\t### Just to get a blank petition\n \t\tif ( $this->NumberOfCandidates == 0) {\n \t\t\t\n \t\t \t$MyTop = $YLocation = $this->GetY();\n \t\t\t\n \t// This is the heading of the petition.\n\t \t$this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n\t $this->SetFont('Arial','B',8);\n\t $this->SetXY($this->Col1, $YLocation );\n\t $this->MultiCell($this->SizeCol1, 4, \"NAME\" . strtoupper($this->PluralCandidates) . \" OF CANDIDATE\" . strtoupper($this->PluralCandidates), 0, 'C');\n\t $this->SetXY($this->Col2, $YLocation );\n\t $this->MultiCell($this->SizeCol2, 4, $this->RunningForHeading[\"party\"], 0, 'C');\n \t \t$this->SetXY($this->Col3, $YLocation );\n \t \t$this->MultiCell($this->SizeCol3, 4, \"PLACE\" . strtoupper($this->PluralCandidates) . \" OF RESIDENCE\", 0, 'C');\n \t$this->SetFont('Arial','',8);\n \t$Prev_PartyPosition = $this->PositionType[$i];\n \t\t$YLocation = $this->GetY() + 0.5;\n\t \t\t\t\n\t // This are the empty stuff.\n\t $this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n \t\t\t\n \t$this->SetFont('Arial','B',11);\n \t\t\t$this->SetXY($this->Col1, $YLocation + 0.3 );\n\t\t\t$this->MultiCell($this->SizeCol1, 3.5, $this->Candidate[$i], 0, 'C', 0);\n \t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\t\n\t\t\t$this->SetFont('Arial','', 9); \t \t\t\n\t\t\t$this->SetXY($this->Col2, $YLocation );\n \t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\t\t\t\t\t\t\t\t\t\n\t\t\t$this->SetXY($this->Col3, $YLocation );\n \t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t$YLocation = $YLocation_new + 4.7; \n\t\t\t$this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n\t\t\t\n\t\t \t$this->SetY($YLocation);\t\n\t\t \t\n\t\t \t// Here I need to put the pieces.\n\t\t \t$this->Line($this->Line_Left, $MyTop - 0.1, $this->Line_Left, $YLocation - 0.1); \n\t\t \t$this->Line($this->Line_Col1, $MyTop - 0.1, $this->Line_Col1, $YLocation - 0.1); \n\t\t \t$this->Line($this->Line_Col2, $MyTop - 0.1, $this->Line_Col2, $YLocation - 0.1); \n\t\t \t$this->Line($this->Line_Right, $MyTop - 0.1, $this->Line_Right, $YLocation - 0.1); \n\t\t \t\n\t\t\t/*\n \t \t$this->SetFont('Times','I',7);\n \t \t$this->SetXY($this->Line_Left + 0.5, $YLocation );\n\t $this->MultiCell(0, 2.8, \n\t \t\"I do hereby appoint \" . $this->Appointments[$i] . \" all of whom are enrolled voters of the \" . $this->party . \n\t \t\" Party, as a committee to fill vacancies in accordance with the provisions of the Election Law.\", 0);\n\t */\n\t \n\t $YLocation = $this->GetY() - 1.5 ;\n\t $Botton_Corner_Y = $this->GetY();\n \t\t}\n \t\t\n for ($i = 0; $i < $this->NumberOfCandidates; $i++) {\n \t$MyTop = $YLocation = $this->GetY();\t \n \t\n \t//$YLocation += 1;\n \n \t\t\tif ($this->PositionType[$i] != $Prev_PartyPosition) {\n\t\t \t$this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n\n\t\t $this->SetFont('Arial','B',8);\n\t\t $this->SetXY($this->Col1, $YLocation );\n\t\t $this->MultiCell($this->SizeCol1, 4, \"NAME\" . strtoupper($this->PluralCandidates) . \" OF CANDIDATE\" . strtoupper($this->PluralCandidates), 0, 'C');\n\n\t\t $this->SetXY($this->Col2, $YLocation );\n\t\t $this->MultiCell($this->SizeCol2, 4, $this->RunningForHeading[$this->PositionType[$i]], 0, 'C');\n\n\t \t \t$this->SetXY($this->Col3, $YLocation );\n\t \t \t$this->MultiCell($this->SizeCol3, 4, \"PLACE\" . strtoupper($this->PluralCandidates) . \" OF RESIDENCE\", 0, 'C');\n\n\t \t$this->SetFont('Arial','',8);\n\t \t$Prev_PartyPosition = $this->PositionType[$i];\n \t\t$YLocation = $this->GetY() + 0.5;\n\t } \n\t \t \t\t\t\n\t $this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n \t\t\t\n \t$this->SetFont('Arial','B',11);\n \t\t\t$this->SetXY($this->Col1, $YLocation + 0.3 );\n\t\t\t$this->MultiCell($this->SizeCol1, 3.5, $this->Candidate[$i], 0, 'C', 0);\n \t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\t\n\t\t\t$this->SetFont('Arial','', 9); \t \t\t\n\t\t\t$this->SetXY($this->Col2, $YLocation );\n \t\t$this->MultiCell($this->SizeCol2, 3.5, $this->RunningFor[$i], 0, 'C', 0);\n \t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\t\t\t\t\t\t\t\t\t\n\t\t\t$this->SetXY($this->Col3, $YLocation );\n \t\t$this->MultiCell($this->SizeCol3, 3.5, $this->Residence[$i], 0, 'C', 0);\n \t\tif ( $YLocation_new < $this->GetY()) { $YLocation_new = $this->GetY(); }\n\t\t\t\t\t\t\t\t\t\n\t\t\t$YLocation = $YLocation_new + 0.7; \n\t\t\t$this->Line($this->Line_Left, $YLocation - 0.1, $this->Line_Right, $YLocation - 0.1); \n\t\t \t$this->SetY($YLocation);\t\n\n\t\t \t// Here I need to put the pieces.\n\t\t \t$this->Line($this->Line_Left, $MyTop - 0.1, $this->Line_Left, $YLocation - 0.1); \n\t\t \t$this->Line($this->Line_Col1, $MyTop - 0.1, $this->Line_Col1, $YLocation - 0.1); \n\t\t \t$this->Line($this->Line_Col2, $MyTop - 0.1, $this->Line_Col2, $YLocation - 0.1); \n\t\t \t$this->Line($this->Line_Right, $MyTop - 0.1, $this->Line_Right, $YLocation - 0.1); \n\t\t \t\n\t\t\tif (! empty ($this->Appointments[$i])) {\n\t \t \t$this->SetFont('Times','I',7);\n \t\t \t$this->SetXY($this->Line_Left + 0.5, $YLocation );\n\t \t $this->MultiCell(0, 2.8, \n\t \t\t\"I do hereby appoint \" . $this->Appointments[$i] . \" all of whom are enrolled voters of the \" . $this->party . \n\t \t\t\" Party, as a committee to fill vacancies in accordance with the provisions of the Election Law.\", 0);\n\t } \n\t \n\t if ( $this->PositionType[$i+1] != $Prev_PartyPosition ) $this->ln(1);\n\t \n\t $YLocation = $this->GetY() - 1.5 ;\n\t $Botton_Corner_Y = $this->GetY();\n\t \n \t}\n \t\n \t$this->Ln(2); \t \n \t$this->SetX($this->Line_Left);\n \t$this->SetFont('Arial','B',8);\n $this->Cell(0, 0, \"In witness whereof, I have hereunto set my hand, the day and year placed opposite my signature.\");\n \n $this->Ln(1);\n \n $this->SetFont('Arial','B',13);\n\t\t$this->Cell(35, 8, \"Date\" ,0, 0, 'C', 0);\n\t\t$this->Cell(75, 8, \"Signature / Name of Signer\", 0, 0, 'C', 0);\n\t\t$this->Cell(74, 8, \"Residence\", 0, 0, 'C', 0);\n\t\t$this->Cell(20, 8, \"County\", 0, 0, 'C', 0);\n\t\t$this->Ln(4.5);\n \n \t$this->YLocation = $this->GetY();\n \n \t$YLocation = $this->GetY() - 3.5;\n \t$this->Line($this->Line_Left, $YLocation, $this->Line_Right, $YLocation);\n\t\t\n\t\t//$this->Line($this->Line_Left, $Botton_Corner_Y, $this->Line_Right, $Botton_Corner_Y - 0.3);\n\t\t//$this->Line($this->Line_Left,\t $Botton_Corner_Y + 6.1, $this->Line_Right, $Botton_Corner_Y + 6.1);\n\n \t\t$this->Line($this->Line_Left, $YLocation, $this->Line_Left, $this->BottonPt);\n \t\t$this->Line(40, $YLocation, 40, $this->BottonPt);\n \t\t$this->Line(120, $YLocation, 120, $this->BottonPt);\n \t\t$this->Line(190, $YLocation, 190, $this->BottonPt);\n \t\t$this->Line($this->Line_Right, $YLocation, $this->Line_Right, $this->BottonPt);\n $this->Line($this->Line_Left, $this->BottonPt, $this->Line_Right, $this->BottonPt);\n \n\t}", "protected function writeHeader()\n {\n if (!$this->firstLineWritten && $this->header && $this->firstLineIsHeader) {\n $this->writeCsv($this->header);\n }\n }", "function hook_commerce_xls_import_generate_headers_alter(&$headers, &$product_type) {\n $headers = array('field_name');\n}", "protected function gifAddHeader()\n {\n $cmap = 0;\n if (ord($this->frameSources[0] { 10 }) & 0x80) {\n\n $cmap = 3 * (2 << (ord($this->frameSources[0] { 10 }) & 0x07));\n $this->gif .= substr($this->frameSources[0], 6, 7);\n $this->gif .= substr($this->frameSources[0], 13, $cmap);\n if ($this->loop !== 1) // Only add the looping extension if really looping\n $this->gif .= \"!\\xFF\\x0BNETSCAPE2.0\\x03\\x01\".word2bin($this->loop==0?0:$this->loop-1).\"\\x0\";\n }\n }", "private function formatHeader() {\n $this->data['header_attrs'] = implode(\"\\n\", $this->theme->header['attr']);\n $this->data['page_title'] = $this->theme->header['title'];\n $this->data['metas'] = implode(\"\\n\", $this->theme->header['metas']);\n \n $this->data['styles'] = '';\n foreach ($this->theme->cssArr as $css) { \n $this->data['styles'] .= '<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"' . $css . \"\\\" />\\n\";\n }\n if(!empty($this->theme->cssIEArr)) {\n $this->data['styles'] .= \"<!--[if IE]>\\n\";\n foreach ($this->theme->cssIEArr as $cssIE) {\n $this->data['styles'] .= '<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"' . $cssIE . \"\\\" />\\n\";\n }\n $this->data['styles'] .= \"<![enif]-->\\n\";\n }\n \n $this->data['scripts_header'] = '';\n foreach ($this->theme->headerJSArr as $jsHeader) {\n $this->data['scripts_header'] .= '<script type=\"text/javascript\" src=\"' . $jsHeader . \"\\\"></script>\\n\";\n }\n }", "public function beginHeader()\n {\n return $this->header;\n }", "public function testATXHeaders()\n\t{\n\t\t$md = $this->getMarkdown();\n\n\t\t// Level1\n\t\t$text = '# Level 1 header';\n\t\t$markdown = $md->render($text);\n\t\t$expected = '<h1>Level 1 header</h1>'.\"\\n\";\n\t\t$this->assertEquals($expected, $markdown);\n\n\t\t// Level2\n\t\t$text = '## Level 2 header';\n\t\t$markdown = $md->render($text);\n\t\t$expected = '<h2>Level 2 header</h2>'.\"\\n\";\n\t\t$this->assertEquals($expected, $markdown);\n\n\t\t// Level3\n\t\t$text = '### Level 3 header';\n\t\t$markdown = $md->render($text);\n\t\t$expected = '<h3>Level 3 header</h3>'.\"\\n\";\n\t\t$this->assertEquals($expected, $markdown);\n\n\t\t// Level4\n\t\t$text = '#### Level 4 header';\n\t\t$markdown = $md->render($text);\n\t\t$expected = '<h4>Level 4 header</h4>'.\"\\n\";\n\t\t$this->assertEquals($expected, $markdown);\n\n\t\t// Level5\n\t\t$text = '##### Level 5 header';\n\t\t$markdown = $md->render($text);\n\t\t$expected = '<h5>Level 5 header</h5>'.\"\\n\";\n\t\t$this->assertEquals($expected, $markdown);\n\n\t\t// Level6\n\t\t$text = '###### Level 6 header';\n\t\t$markdown = $md->render($text);\n\t\t$expected = '<h6>Level 6 header</h6>'.\"\\n\";\n\t\t$this->assertEquals($expected, $markdown);\n\n\t}", "function Header() {\r\n\t\t$this->Rect(2, 2, 206, 293);\r\n\t}", "function header_fields() {\n\t\tif ( class_exists( 'Fieldmanager_Group' ) ) {\n\t\t\t$header = new Fieldmanager_Group( array(\n\t\t\t\t'name' => 'content_header',\n\t\t\t\t'children' => array(\n\t\t\t\t\t// FIXME: Fix this\n\t\t\t\t\t//'header_text' => new Fieldmanager_Textfield( 'Header Text' ),\n\t\t\t\t\t'description' => new Fieldmanager_TextArea( array(\n\t\t\t\t\t\t'label' => 'Description',\n\t\t ) ),\n\t\t\t\t\t'ctas' => new Fieldmanager_Group( array(\n\t\t\t\t\t\t'label' => 'Call to Action',\n\t\t\t\t\t\t'description' => 'Calls to action are buttons that link to posts or pages that you want to promote on the homepage header.',\n\t\t\t\t\t\t'minimum_count' => 1,\n\t\t\t\t\t\t'extra_elements' => 0,\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'limit' => 1,\n\t\t\t\t\t\t'children' => array(\n\t\t\t\t\t\t\t'text' => new Fieldmanager_Textfield( 'CTA Text' ),\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$header->add_meta_box( 'Header Area', 'page', 'normal', 'high' );\n\t\t}\n\t}", "public function heading_type( $name, $selected ) {\n\t\t$items = array();\n\t\tfor ( $i = 1; $i <= 6; $i++ ) {\n\t\t\t$items[] = array(\n\t\t\t\t'label' => sprintf( _x( 'Heading %1$d', 'wp-cpl-ui-heading', 'wp-cpl' ), $i ),\n\t\t\t\t'value' => 'h' . $i,\n\t\t\t);\n\t\t}\n\n\t\t$this->select( $name, $items, $selected, false, false, array( 'ipt_uif_heading_type' ) );\n\t}", "function buildSubHeaders($mainHeaders, $headerCount,$mode,$ts_type='')\r\n {\r\n\t\t$arrMode = array('approved' => 'Approved','exported' => 'Approved','rejected' => 'Rejected','deleted' => 'Deleted','approvedexp' => 'Approved');\r\n\t\t$str = '<tr>';\r\n\t\tif($mode == 'create')\r\n\t\t{\r\n\t\t\t$str .= '<th valign=\"top\" class=\"nowrap\">&nbsp;</th>';\r\n\t\t}\r\n\t\t$header = 0;\r\n\t\tforeach($mainHeaders as $val)\r\n\t\t{\r\n\t\t\tif($header >= $headerCount)\r\n\t\t\t{\r\n\t\t\t\tif($ts_type == 'UOM' || $ts_type == 'Custom') {\r\n\t\t\t\t\t\t$str .= '<td valign=\"top\" class=\"bold\"><table><tr><td><font class=afontstylee><b> </font></td><td class=\"t-r\"><font class=afontstylee><label style=\"margin-left:4px;\" title=\"Billable\"></label></b></span></font></td></tr></table></td>';\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$str .= '<td valign=\"top\" class=\"bold\"><table><tr><td><font class=afontstylee><b> Hours </font></td><td class=\"t-r\"><font class=afontstylee><label style=\"margin-left:4px;\" title=\"Billable\">$</label></b></span></font></td></tr></table></td>';\r\n\t\t\t\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$str .= '<td valign=\"top\" class=\"nowrap\">&nbsp;</td>';\r\n\t\t\t}\r\n\t\t\t$header++;\r\n\t\t}\r\n\t\tif(trim($mode) != 'pending' && trim($mode) !='errejected' && trim($mode) !='erer' && trim($mode) !='create' && trim($mode) !='Saved' && trim($mode) != '' && trim($mode)!= 'backup') {\r\n\t\t\t$str .= '<th valign=\"top\" class=\"nowrap\"><font class=afontstylee>&nbsp;</font></th>';\r\n\t\t\t$str .= '<th valign=\"top\" class=\"nowrap\"><font class=afontstylee>&nbsp;</font></th>';\r\n\t\t }\r\n\t\t$str .= '</tr>';\r\n\t\t\r\n\t\treturn $str;\r\n }", "protected function drawDocumentHeader()\r\n {\r\n // Init\r\n $iWidth = 70;\r\n $this->resetFontColor();\r\n\r\n // Contents\r\n $sOrderNumber = $this->structure['data']['first_page']['num_bdc'];\r\n $sInvoiceDate = $this->structure['data']['first_page']['date_facture'];\r\n $sCustomerVatRegistrationNumber = isset($this->structure['data']['first_page']['customer_vat_registration_number']) ? $this->structure['data']['first_page']['customer_vat_registration_number'] : '';\r\n $sInvoiceHeader = sprintf($this->translations['header_facture'], $this->structure['data']['first_page']['type_fact'], $this->structure['data']['first_page']['num_facture'], $sInvoiceDate);\r\n $sOrderNumberHeader = ! empty($sOrderNumber) ? sprintf($this->translations['header_bdc'], $sOrderNumber, $sInvoiceDate) : '';\r\n\r\n // Draw\r\n $this->SetY(self::POSY_ENTETE);\r\n $this->setBold(true);\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['mention_fact'], 0, 1);\r\n $this->Cell($iWidth, 0, $sInvoiceHeader, 0, 1);\r\n $this->setBold(false);\r\n $this->Cell($iWidth, 0, $sOrderNumberHeader, 0, 1);\r\n\r\n // Specific mention\r\n $this->MultiCell(self::WIDTH_ENTETE_BLOC_DROITE, 0, $this->structure['data']['first_page']['mentions_specifiques'], 0, 'L');\r\n\r\n $iLeftY = $this->GetY();\r\n\r\n $this->SetFontSize(self::FONT_SIZE_MINI);\r\n $this->setColor('text', $this->fontColors['MENTIONS'][0], $this->fontColors['MENTIONS'][1], $this->fontColors['MENTIONS'][2]);\r\n if ($this->structure['data']['first_page']['display_header_reverse_charge'] == 1) {\r\n // Note: \"\\n\" is important to align the line to left\r\n $this->MultiCell($iWidth, 0, $this->translations['header_reverse_charge'] . \"\\n\", 0, 'J');\r\n }\r\n\r\n // Draw customer header\r\n $iWidth = self::WIDTH_ENTETE_BLOC_DROITE;\r\n $iHeight = 30;\r\n $iXPosition = $this->getPageWidth() - ($this->getMargin('right') + $iWidth);\r\n $this->resetFontColor();\r\n\r\n // Draw container rectangle\r\n $this->setColor('draw', $this->fontColors['CONTOUR_BLOC'][0], $this->fontColors['CONTOUR_BLOC'][1], $this->fontColors['CONTOUR_BLOC'][2]);\r\n $this->RoundedRect($iXPosition, self::POSY_ENTETE, $iWidth, $iHeight, self::R);\r\n $this->resetColor();\r\n\r\n // Draw - client\r\n $this->SetXY($iXPosition + self::TEXT_MARGIN, self::POSY_ENTETE + self::TEXT_MARGIN);\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['nom_client'], 0, 2);\r\n\r\n // Client contact\r\n if (Phoenix_Auth_User::getInstance()->isAllowed(AclFonctionnalites::INVOICE_DISPLAY_CLIENT_CONTACT_DATA)) {\r\n $this->Cell($iWidth, 0, $this->translations['attn'] . ' ' . $this->structure['data']['first_page']['contact_client'], 0, 2);\r\n }\r\n\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['adresse_1'], 0, 2);\r\n if (! empty($this->structure['data']['first_page']['adresse_2'])) {\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['adresse_2'], 0, 2);\r\n }\r\n if (! empty($this->structure['data']['first_page']['adresse_3'])) {\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['adresse_3'], 0, 2);\r\n }\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['code_postal'] . ' ' . $this->structure['data']['first_page']['ville'], 0, 2);\r\n $this->Cell($iWidth, 0, $this->structure['data']['first_page']['pays'], 0, 2);\r\n\r\n // Drawing customer VAT registration number\r\n if ($sCustomerVatRegistrationNumber) {\r\n $this->SetY(76);\r\n $this->SetX($iXPosition);\r\n $this->Cell($iWidth, 0, $this->translations['header_customer_vat_registration_number'] . ' : ' . $sCustomerVatRegistrationNumber, 0, 2);\r\n }\r\n\r\n $this->SetY(max(array($iLeftY + (self::TEXT_MARGIN*2), 65)));\r\n }", "function Header()\n {\n\n // This function must be named \"Header\" to work with the TCPDF library\n global $cfgRelation, $db, $pdf_page_number, $with_doc;\n if ($with_doc) {\n $test_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])\n . ' WHERE db_name = \\'' . PMA_sqlAddslashes($db) . '\\''\n . ' AND page_nr = \\'' . $pdf_page_number . '\\'';\n $test_rs = PMA_query_as_controluser($test_query);\n $pages = @PMA_DBI_fetch_assoc($test_rs);\n $this->SetFont($this->_ff, 'B', 14);\n $this->Cell(0, 6, ucfirst($pages['page_descr']), 'B', 1, 'C');\n $this->SetFont($this->_ff, '');\n $this->Ln();\n }\n }", "function print_header($search_level_min, $search_level_max){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name;\n\t\tglobal $search_budget_year;\n\t\t\n\t\t$worksheet->set_column(0, 0, 50);\n\t\t$worksheet->set_column(1, 1, 12);\n\t\t$worksheet->set_column(2, 2, 15);\n\t\t$worksheet->set_column(3, 3, 12);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 40);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableDetail\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableDetail\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableDetail\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableDetail\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"กลุ่มข้าราชการระดับ $search_level_min - $search_level_max\", set_format(\"xlsFmtTableDetail\", \"B\", \"C\", \"\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"วงเงินเลื่อนขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"รวมเงินเลื่อน 0.5 ขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ค่าตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"รวมเงินเลื่อนขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ร้อยละ 6\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"1 ขั้น 1.5 ขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"2 % และ 4 %\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ทั้งสิ้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"(เม.ย./ต.ค.)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"(ต.ค.)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "function header_addl($content,$tabs = 0)\n\t{\n\t\tif ($this->show_info) { echo \"<p><b>Output:</b> Adding line to header. (\" . ($tabs+strlen($content)+1) . \" bytes)</p>\"; }\n\t\t$this->header .= \"\\n\";\n\t\tfor ($i = 0; $i < $tabs; $i++)\n\t\t{\n\t\t\t$this->header .= \"\\t\";\n\t\t}\n\t\t$this->header .= $content;\n\t}", "public function email_header($email_heading)\n {\n }", "public function reportHeaderForLayer($layerName, $header);", "function the_heading( $heading ) {\n\t\t\t\n\t\tif( !empty($heading['title']) ) {\n\t\t\tif( empty($heading['type']) ) { $heading['type'] = 'h2'; }\n\t\t\tif( empty($heading['weight']) ) { $heading['weight'] = 'large'; }\n\t\t\t\n\t\t\techo '<' . $heading['type'] . ' class=\"heading heading--' . $heading['weight'] . '\">' . '<span>' . $heading['title'] . '</span>' . '</' . $heading['type'] . '>';\n\t\t}\n\t\t\n\t}", "protected function updateCsvHeader()\n\t{\n\t\tif( $this->config['first_line_headers'] )\n\t\t{\n\t\t\t$csv_line_array = $this->csv_parser->parseCsvFile();\n\t\t\t$this->csv_file->setCsvHeader($csv_line_array);\n\t\t}\n\t}", "private function templateDocBodyMethod1Thead()\r\n {\r\n if ($this->getConfig([\r\n 'doctable',\r\n 'thead'\r\n ], 'visible', false)) {\r\n foreach ($this->sbm_columns as $column) {\r\n if (is_numeric($column['thead'])) {\r\n $align = $column['thead_align'] == 'standard' ? 'R' : $column['thead_align'];\r\n } else {\r\n $align = $column['thead_align'] == 'standard' ? 'L' : $column['thead_align'];\r\n }\r\n $this->Cell($column['width'], $this->getConfig([\r\n 'doctable',\r\n 'thead'\r\n ], 'row_height'), StdLib::formatData($column['thead'], $column['thead_precision'], $column['thead_completion']), $this->getConfig([\r\n 'doctable',\r\n 'thead'\r\n ], 'cell_border'), 0, $align, 1, $this->getConfig([\r\n 'doctable',\r\n 'thead'\r\n ], 'cell_link'), $column['thead_stretch'], $this->getConfig([\r\n 'doctable',\r\n 'thead'\r\n ], 'cell_ignore_min_height'), $this->getConfig([\r\n 'doctable',\r\n 'thead'\r\n ], 'cell_calign'), $this->getConfig([\r\n 'doctable',\r\n 'thead'\r\n ], 'cell_valign'));\r\n }\r\n $this->Ln();\r\n }\r\n }", "function buildDynamicHeaders($defHeaders, $asgnids_all,$ts_type='')\r\n {\r\n\t\t//$asgnArr = $this->getRateTypesForAllAsgn($asgnids_all);\r\n\t\t$asgnArr = $this->getRateTypesForAllAsgnnames($asgnids_all,'',$ts_type);\r\n\t\t\r\n\t\t$str = '';\r\n\t\t$headerCount = count($defHeaders);\r\n\t\t$ratetype = $this->getRateTypes();\r\n\r\n\t\tforeach($ratetype as $val)\r\n\t\t{\r\n\t\t\tif(in_array($val['rateid'], $asgnArr))\r\n\t\t\t{\r\n\t\t\t\tarray_push($defHeaders, $val['name']);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$str .= '<tr class=hthbgcolor><th >&nbsp;</th>';\r\n\t\tforeach($defHeaders as $val)\r\n\t\t{\r\n\t\t\t$str .= '<th valign=\"top\" class=\"nowrap\" align=\"left\"><font class=afontstylee>'.$val.'</font></th>';\r\n\t\t\t\r\n\t\t}\t\r\n\t\t$str .= \"<th>&nbsp;</th></tr></thead>\";\r\n\t\t$str .= '<tr class=hthbgcolor><td style=\"background-color: white\">&nbsp;</td>';\r\n\t\t$header = 0;\r\n\t\tforeach($defHeaders as $val)\r\n\t\t{\r\n\t\t if($header >= $headerCount)\r\n\t\t\t{\r\n\t\t\tif($ts_type!=''){//Added for UOM timesheet for UOM label in timesheets\r\n\t\t\t\t$str .= '<td valign=\"top\" style=\"background-color: white\"><font class=afontstylee><b> </font><font class=afontstylee> <label title=\"Billable\"><span style=\"margin-left:18px; -moz-margin-start:0px;\"></span></label></b></font></td>';\r\n\t\t\t}else{\r\n\t\t\t\t$str .= '<td valign=\"top\" align=\"left\"><font class=afontstylee><b> Hours </font><font class=afontstylee> <label title=\"Billable\"><span style=\"margin-left:18px; -moz-margin-start:0px;\">$</span></label></b></font></td>';\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$str .= '<td valign=\"top\" style=\"background-color: white\">&nbsp;</td>';\r\n\t\t\t}\r\n\t\t\t$header++;\t\t\t\r\n\t\t}\r\n\t\t$str .= \"<td style='background-color: white'>&nbsp;</td></tr>\";\r\n\t\treturn $str;\r\n }", "private function renderHead()\n {\n\n\n $class = !empty($this->tableclass) ? \"class='{$this->tableclass}'\" : \"\";\n $head = \"<table $class><thead><tr>\";\n\n if (!empty($this->topheaders)) {\n foreach ($this->topheaders as $key => $th) {\n if (trim($key)) {\n $css = \"'border:0px; text-align:center; background-color:\" . $th['bgcolor'] . \"'\";\n } else {\n $css = \"'border:0px; text-align:center; background-color:\" . $th['bgcolor'] . \"'\";\n }\n\n $width = isset($th['width'])? 'width=\"'.$th['width'].'\"':'';\n\n if(is_numeric($key) && isset($th['title']))\n $head .= \"<th colspan=\" . $th['colspan'] . \" style=\" . $css . \" \".$width.\">\" . $th['title'] . \"</th>\";\n else\n $head .= \"<th colspan=\" . $th['colspan'] . \" style=\" . $css . \" \".$width.\">\" . $key . \"</th>\";\n }\n $head .= \"</tr><tr>\";\n }\n\n if (!empty($this->extraheaders)) {\n /**\n * merge column can resort columns\n * so there should be three temp array\n * one for first row\n * one for second row\n * one for new sort of headers wich contains column from first and second row\n */\n $first_row = array();\n $second_row = array();\n $new_header = array();\n foreach ($this->headers as $header) {\n\n if (in_array($header, $new_header))\n continue;\n\n $used = false;\n\n foreach ($this->extraheaders as $h_key => $ex_head) {\n //var_dump($ex_head);\n\n if (in_array($header, $ex_head)) {\n\n $first_row [] = array(\n 'value' => $h_key,\n 'colspan' => count($ex_head),\n 'rowspan' => 1,\n 'style' => 'border-bottom: 1px solid #fff !important;',\n );\n foreach ($ex_head as $expanded_header) {\n\n $second_row [] = $expanded_header;\n $new_header[] = $expanded_header;\n }\n\n $used = true;\n continue 2;\n }\n }\n //exit();\n\n if (!$used) {\n $first_row [] = array(\n 'value' => $header,\n 'colspan' => 1,\n 'rowspan' => 2,\n 'style' => '',\n );\n $new_header[] = $header;\n }\n\n }\n\n foreach ($first_row as $row) {\n //$color = isset($this->headersColor[$row['value']])?$this->headersColor[$row['value']]:'';\n //$row['style'] .= 'background-color='.$color;\n $head .= \"<th rowspan='{$row['rowspan']}' colspan='{$row['colspan']}' style='{$row['style']}'>{$row['value']}</th>\";\n }\n $head .= $this->total_headers(2);\n $head .= \"</tr><tr>\";\n foreach ($second_row as $row) {\n $head .= \"<th>$row</th>\";\n }\n\n $this->headers = $new_header;\n\n } else {\n foreach ($this->headers as $header) {\n $color = isset($this->headersColor[$header]) ? $this->headersColor[$header] : '';\n $header_title = $header;\n if(!empty($this->removeable_header_prefix)){\n foreach ($this->removeable_header_prefix as $rhp) {\n $header_title = str_replace($rhp, '', $header_title);\n }\n }\n $head .= \"<th style='border:0px; background-color:$color'>$header_title</th>\";\n }\n\n $head .= $this->total_headers(1);\n }\n\n $head .= \"</tr></thead>\";\n\n return $head;\n }", "function drawHeader() {\n $oldcMargin = $this->rep->cMargin;\n $this->rep->SetCellPadding(0);\n\n // Set some constants which control header item layout\n // only set them once or the PHP interpreter gets angry\n if ($this->rep->pageNumber == 1) {\n define('COMPANY_WIDTH', 150);\n define('LOGO_HEIGHT', 50);\n define('LOGO_Y_POS_ADJ_FACTOR', 0.74);\n define('LABEL_WIDTH', 80);\n define('PAGE_NUM_WIDTH', 60);\n define('TITLE_FONT_SIZE', 14);\n define('HEADER1_FONT_SIZE', 10);\n define('HEADER2_FONT_SIZE', 9);\n define('FOOTER_FONT_SIZE', 10);\n define('FOOTER_MARGIN', 4);\n }\n // Set some variables which control header item layout\n $companyCol = $this->rep->endLine - COMPANY_WIDTH;\n $headerFieldCol = $this->rep->leftMargin + LABEL_WIDTH;\n $pageNumCol = $this->rep->endLine - PAGE_NUM_WIDTH;\n $footerCol = $this->rep->leftMargin + PAGE_NUM_WIDTH;\n $footerRow = $this->rep->bottomMargin - FOOTER_MARGIN;\n\n $this->rep->row = $this->rep->pageHeight - $this->rep->topMargin;\n\n // Set the color of dividing lines we'll draw\n $oldDrawColor = $this->rep->GetDrawColor();\n $this->rep->SetDrawColor(128, 128, 128);\n\n // Tell TCPDF that we want to use its alias system to track the total number of pages\n //$this->rep->AliasNbPages();\n\n // Footer\n if ($this->rep->footerEnable) {\n $this->rep->Line($footerRow, 1);\n $prevFontSize = $this->rep->fontSize;\n $this->rep->fontSize = FOOTER_FONT_SIZE;\n $this->rep->TextWrap($footerCol, $footerRow - ($this->rep->fontSize + 1), $pageNumCol - $footerCol, $this->rep->footerText, $align = 'center', $border = 0, $fill = 0, $link = NULL, $stretch = 1);\n $this->rep->TextWrap($pageNumCol, $footerRow - ($this->rep->fontSize + 1), PAGE_NUM_WIDTH, _(\"Page\") . ' ' . $this->rep->pageNumber . '/' . $this->rep->getAliasNbPages(), $align = 'right', $border = 0, $fill = 0, $link = NULL, $stretch = 1);\n $this->rep->fontSize = $prevFontSize;\n }\n\n //\n // Header\n //\n\t\t\n\t\t// Print gray line across the page\n $this->rep->Line($this->rep->row + 8, 1);\n\n $this->rep->NewLine();\n\n // Print the report title nice and big\n $oldFontSize = $this->rep->fontSize;\n $this->rep->fontSize = TITLE_FONT_SIZE;\n $this->rep->Font('B');\n $this->rep->Text($this->rep->leftMargin, $this->rep->title, $companyCol);\n $this->rep->fontSize = HEADER1_FONT_SIZE;\n\n // Print company logo if present and requested, or else just print company name\n // Build a string specifying the location of the company logo file\n $logo = company_path() . \"/images/\" . $this->rep->company['coy_logo'];\n if ($this->rep->companyLogoEnable && ($this->rep->company['coy_logo'] != '') && file_exists($logo)) {\n // Width being zero means that the image will be scaled to the specified height\n // keeping its aspect ratio intact.\n if ($this->rep->scaleLogoWidth)\n $this->rep->AddImage($logo, $companyCol, $this->rep->row + 15, COMPANY_WIDTH, 0);\n else\n $this->rep->AddImage($logo, $companyCol, $this->rep->row - (LOGO_HEIGHT * LOGO_Y_POS_ADJ_FACTOR), 0, LOGO_HEIGHT);\n } else\n $this->rep->Text($companyCol, $this->rep->company['coy_name']);\n\n // Dimension 1 - optional\n // - only print if available and not blank\n if (count($this->rep->params) > 3)\n if ($this->rep->params[3]['from'] != '') {\n $this->rep->NewLine(1, 0, $this->rep->fontSize + 2);\n $str = $this->rep->params[3]['text'] . ':';\n $this->rep->Text($this->rep->leftMargin, $str, $headerFieldCol);\n $str = $this->rep->params[3]['from'];\n $this->rep->Text($headerFieldCol, $str, $companyCol);\n }\n\n // Dimension 2 - optional\n // - only print if available and not blank\n if (count($this->rep->params) > 4)\n if ($this->rep->params[4]['from'] != '') {\n $this->rep->NewLine(1, 0, $this->rep->fontSize + 2);\n $str = $this->rep->params[4]['text'] . ':';\n $this->rep->Text($this->rep->leftMargin, $str, $headerFieldCol);\n $str = $this->rep->params[4]['from'];\n $this->rep->Text($headerFieldCol, $str, $companyCol);\n }\n\n // Tags - optional\n // if present, it's an array of tag names\n if (count($this->rep->params) > 5)\n if ($this->rep->params[5]['from'] != '') {\n $this->rep->NewLine(1, 0, $this->rep->fontSize + 2);\n $str = $this->rep->params[5]['text'] . ':';\n $this->rep->Text($this->rep->leftMargin, $str, $headerFieldCol);\n $str = '';\n for ($i = 0; $i < count($this->rep->params[5]['from']); $i++) {\n if ($i != 0)\n $str .= ', ';\n $str .= $this->rep->params[5]['from'][$i];\n }\n $this->rep->Text($headerFieldCol, $str, $companyCol);\n }\n\n // Report Date - time period covered\n // - can specify a range, or just the end date (and the report contents\n // should make it obvious what the beginning date is)\n $this->rep->NewLine(1, 0, $this->rep->fontSize + 2);\n $str = _(\"Report Period\") . ':';\n $this->rep->Text($this->rep->leftMargin, $str, $headerFieldCol);\n $str = '';\n if (isset($this->rep->params[1]['from']) && $this->rep->params[1]['from'] != '')\n $str = $this->rep->params[1]['from'] . ' - ';\n $str .= $this->rep->params[1]['to'];\n $this->rep->Text($headerFieldCol, $str, $companyCol);\n\n // Turn off Bold\n $this->rep->Font();\n\n $this->rep->NewLine(1, 0, $this->rep->fontSize + 1);\n\n // Make the remaining report headings a little less important\n $this->rep->fontSize = HEADER2_FONT_SIZE;\n\n // Timestamp of when this copy of the report was generated\n $str = _(\"Generated At\") . ':';\n $this->rep->Text($this->rep->leftMargin, $str, $headerFieldCol);\n $str = Today() . ' ' . Now();\n if ($this->rep->company['time_zone'])\n $str .= ' ' . date('O') . ' GMT';\n $this->rep->Text($headerFieldCol, $str, $companyCol);\n\n // Name of the user that generated this copy of the report\n $this->rep->NewLine(1, 0, $this->rep->fontSize + 1);\n $str = _(\"Generated By\") . ':';\n $this->rep->Text($this->rep->leftMargin, $str, $headerFieldCol);\n $str = $this->rep->user;\n $this->rep->Text($headerFieldCol, $str, $companyCol);\n\n // Display any user-generated comments for this copy of the report\n if ($this->rep->params[0] != '') { // Comments\n $this->rep->NewLine(1, 0, $this->rep->fontSize + 1);\n $str = _(\"Comments\") . ':';\n $this->rep->Text($this->rep->leftMargin, $str, $headerFieldCol);\n $this->rep->Font('B');\n $this->rep->Text($headerFieldCol, $this->rep->params[0], $companyCol, 0, 0, 'left', 0, 0, $link = NULL, 1);\n $this->rep->Font();\n }\n\n // Add page numbering to header if footer is turned off\n if (!$this->rep->footerEnable) {\n $str = _(\"Page\") . ' ' . $this->rep->pageNumber . '/' . $this->rep->getAliasNbPages();\n $this->rep->Text($pageNumCol, $str, 0, 0, 0, 'right', 0, 0, NULL, 1);\n }\n\n // Print gray line across the page\n $this->rep->Line($this->rep->row - 5, 1);\n\n // Restore font size to user-defined size\n $this->rep->fontSize = $oldFontSize;\n\n // restore user-specified cell padding for column headers\n $this->rep->SetCellPadding($oldcMargin);\n\n // scoot down the page a bit\n $oldLineHeight = $this->rep->lineHeight;\n $this->rep->lineHeight = $this->rep->fontSize + 1;\n $this->rep->row -= ($this->rep->lineHeight + 6);\n $this->rep->lineHeight = $oldLineHeight;\n\n // Print the column headers!\n $this->rep->Font('I');\n if ($this->rep->headers2 != null) {\n $count = count($this->rep->headers2);\n for ($i = 0; $i < $count; $i++)\n $this->rep->TextCol2($i, $i + 1, $this->rep->headers2[$i], $corr = 0, $r = 0, $border = 0, $fill = 0, $link = NULL, $stretch = 1);\n $this->rep->NewLine();\n }\n $count = count($this->rep->headers);\n for ($i = 0; $i < $count; $i++)\n $this->rep->TextCol($i, $i + 1, $this->rep->headers[$i], $corr = 0, $r = 0, $border = 0, $fill = 0, $link = NULL, $stretch = 1);\n $this->rep->Font();\n\n $this->rep->NewLine(2);\n\n // restore user-specified draw color\n $this->rep->SetDrawColor($oldDrawColor[0], $oldDrawColor[1], $oldDrawColor[2]);\n }", "function printPageHeader($g) {\n\t\t$g = parent::printPageHeader($g);\n\t\t?>\n\t\t\t<div class=\"divTitle scoring\"><div class=\"divTableCell\">Scoring Management</div></div>\t\t\n\t\t\t<div id=\"typeScoreList\">\n\t\t\t<div class=\"spaceRow\">&nbsp;</div>\n\t\t<?php\n\t\t\t$this->printTypeScore($g);\n\t\t?>\n\t\t<?php\n\t\treturn $g;\n\t}", "function header()\n{\nif ($this->header == 1)\n{\n\t\nglobal $header,$year,$program,$semister;\n\n\n\nif ($semister == \"Semester II\")\n{\n \n\t\n\t\t\t\tif($program == \"Bachelor of Science in Nursing (Post Basic) Yr2 COM\" || $program == \"Bachelor of Science in Nursing (Post Basic) Yr2 ADULT-HEALTH\" || $program == \"Bachelor of Science in Nursing (Post Basic) Yr2 EDU\" || $program == \"Bachelor of Science in Nursing (Post Basic) Yr2 MID\" || $program ==\"Bachelor of Science in Nursing (Post Basic) Yr2 PAED\")\n\t\t\t\t{\n\t\t\t\t\t$this->mature_year2_header();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if($program == \"University Certificate in Midwifery\")\n\t\t\t\t{\n\t\t\t\t\t$cat = 5;\n\t\t\t\t\t$this->ucm_header($header,$year,$program,$semister, $cat);\n\t\t\t\t}\n\t\t\t\telse if($program == \"Bachelor of Science in Nursing and Midwifery (Generic) Yr4\")\n\t\t\t\t{\n\t\t\t\t\t$this->year4_header();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\n\t\t\t\t\t\n\t\t\t\t\t$cat = 5;\n\t\t\t\t\t$this->headercontent($header,$year,$program,$semister, $cat);\n\t\t\t\t}\n\t\n\t\n\t\n\t\n}\nelse\n{\n $cat = 4;\n\t$this->headercontent($header,$year,$program,$semister, $cat);\n}\n\n\n \n}\n}", "function InsertColHeader( $value )\r\n {\r\n if ( $this->ccol == $this->totalcol ) {\r\n $this->ccol = 0;\r\n $this->crow++;\r\n }\r\n $this->sheet->writeString($this->crow,$this->ccol,&$value,$this->hdrFormat);\r\n $this->ccol++;\r\n return;\r\n }", "public function new_heading( $level, $text )\n\t{\n\t\tif( $level < 1 || $level > 6 )\n\t\t\t$level = 4;\n\t\t$text = $this->escape_text( $text );\n\t\t$this->new_tag( 'h' .$level, null, $text );\n\t}", "public function firstHeader() {\n $this->hdrPointer = array_keys($this->headers);\n return $this->nextHeader();\n }", "function addHeaderCode () {\n\t\t\t?> <!--a comment to make sure it works --> <?\n\t\t}", "protected function parseHeader($line) {\n\t\tif (isset($this->data['header'])) {\n\t\t\tBillrun_Factory::log()->log(\"double header\", Zend_Log::ERR);\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->parser->setStructure($this->header_structure);\n\t\t$this->parser->setLine($line);\n\t\tBillrun_Factory::dispatcher()->trigger('beforeHeaderParsing', array($line, $this));\n\t\t$header = $this->parser->parse();\n\t\t$header['source'] = static::$type;\n\t\t$header['type'] = self::$type;\n\t\t$header['file'] = basename($this->filePath);\n\t\t$header['process_time'] = date(self::base_dateformat);\n\t\tBillrun_Factory::dispatcher()->trigger('afterHeaderParsing', array($header, $this));\n\t\t$this->data['header'] = $header;\n\t\treturn $header;\n\t}", "protected function addHeaderParts() {\n\t\t$key = 'EXT:' . $this->extKey . md5($this->template);\n\t\tif (!isset($GLOBALS['TSFE']->additionalHeaderData[$key])) {\n\t\t\t$headerParts = $this->cObj->getSubpart($this->template, '###HEADER_PARTS###');\n\t\t\tif ($headerParts) {\n\t\t\t\t$headerParts = $this->cObj->substituteMarker(\n\t\t\t\t\t$headerParts, '###SITE_REL_PATH###',\n\t\t\t\t\t\\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::siteRelPath($this->extKey));\n\t\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$key] = $headerParts;\n\t\t\t}\n\t\t}\n\t}", "protected function handleHeader($level)\n {\n if ($this->parser->isStartTag) {\n $this->out(str_repeat('#', $level) . ' ', true);\n } else {\n $this->setLineBreaks(2);\n }\n }", "function Header()\n\t{\t\n\t}", "public function pi_list_header() {}", "protected function generateTableHeaderRowCells()\n\t{\n\t\tforeach($this->headers as $header)\n\t\t{\n\t\t\t$this->table .= '<th>' . $header . '</th>';\n\t\t}\n\t}", "public function Header() \n\t{\n\t\t//$this->Image($image_file, 10, 10, 350, '', 'JPG', '', 'T', false, 100, '', false, false, 0, false, false, false);\n\t\t // restore auto-page-break status\n \t//$this->SetTextColor(0,0,0);\n\n\t\t$this->Rect(0,0,450,17,'F','',$fill_color = array(222,221,170));\n\n\t\t$this->SetFont('helvetica', 'B', 15);\n \n\t\t$this->Cell(0, 12, 'Ministry of Development of North Eastern Region', 0, True, 'C', 0, '', 0, false, 'M', 'M');\n\t\t$this->SetFont('helvetica', 'B', 12);\n\t\t$this->Cell(0, 12, 'Non-Lapsable Central Pool of Resource (NLCPR)', 0, True, 'C', 0, '', 0, false, 'M', 'M');\n\n\t\t//$this->Cell(($this->w - $this->original_lMargin - $this->original_rMargin), 0, '', 'T', 0, 'C');\n\t\t\n\t\t// set the starting point for the page content\n\t\t$this->setPageMark();\n\t}", "private function printHeader() {\r\n \t\r\n \t$max = $this->maxwidth-22;\r\n \t\r\n if ($this->config->profiling) {\r\n $text = \"Widget\".str_repeat(\" \", $max).\"Status Valid connectTime actionTime readTime renderTime serverTime transferTime totalTime queriesCount averageSpeed Data\";\r\n } else {\r\n $text = \"Widget\".str_repeat(\" \", $max).\"Status Valid totalTime Data\";\r\n }\r\n \r\n if(!$this->linewidth) {\r\n \t\t$this->linewidth = strlen($text); \t\r\n }\r\n \r\n \t$this->logBlock(\" \",null);\t\r\n \t$this->logBlock($text,null);\t\r\n \t$this->logBlock(str_repeat(\"-\", $this->linewidth),null);\r\n \t\r\n }", "public function _doHeaders_callback_setext($matches) {\n if ($matches[3] == '-' && preg_match('{^- }', $matches[1])) {\n return $matches[0];\n }\n $level = $matches[3]{0} == '=' ? 1 : 2;\n \n # added by easybook\n $title = $this->runSpanGamut($matches[1]);\n $id = isset($matches[2]) ? $matches[2] : '';\n if ('' == $id || null == $id) {\n $id = $this->app->slugifyUniquely($this->unhash($title));\n }\n\n $block = \"<h$level id=\\\"$id\\\">\".$title.\"</h$level>\";\n \n $this->app->append('publishing.active_item.toc', array(\n 'level' => $level,\n 'title' => $this->unhash($title),\n 'slug' => $id\n ));\n \n return \"\\n\" . $this->hashBlock($block) . \"\\n\\n\";\n }\n\n /**\n * Callback method to transform the original Markdown headings\n * into regular HTML headings (atx-style headers version).\n *\n * @param array $matches The array of headings to parse\n *\n * @return string The HTML contents of the parsed heading\n */\n public function _doHeaders_callback_atx($matches) {\n $level = strlen($matches[1]);\n $title = $this->runSpanGamut($matches[2]);\n $id = isset($matches[3]) ? $matches[3] : '';\n if ('' == $id || null == $id) {\n $id = $this->app->slugifyUniquely($this->unhash($title));\n }\n\n $block = \"<h$level id=\\\"$id\\\">\".$title.\"</h$level>\";\n\n $this->app->append('publishing.active_item.toc', array(\n 'level' => $level,\n 'title' => $this->unhash($title),\n 'slug' => $id\n ));\n \n return \"\\n\" . $this->hashBlock($block) . \"\\n\\n\";\n }\n\n /**\n * easybook allows to set image alignment using a syntax trick:\n * \n * // regular image not aligned\n * ![Test image](figure1.png)\n *\n * // \"alt text\" has a whitespace on the left -> the image is left aligned\n * ![ Test image](figure1.png)\n *\n * // \"alt text\" has a whitespace on the right -> the image is right aligned\n * ![Test image ](figure1.png)\n *\n * // \"alt text\" has whitespaces both on the left and on the right -> the image is centered\n * ![ Test image ](figure1.png)\n *\n * @param array $matches The array of images to parse\n *\n * @return string The HTML string that represents the original Markdown image element\n */\n public function _doImages_reference_callback($matches) {\n $whole_match = $matches[1];\n $alt_text = $matches[2];\n $link_id = strtolower($matches[3]);\n\n $align = '';\n if (' ' == substr($alt_text, 0, 1)) {\n if (' ' == substr($alt_text, -1)) {\n $align = 'center';\n }\n else {\n $align = 'left';\n }\n }\n elseif (' ' == substr($alt_text, -1)) {\n $align = 'right';\n }\n\n if ($link_id == \"\") {\n $link_id = strtolower($alt_text); # for shortcut links like ![this][].\n }\n\n $alt_text = $this->encodeAttribute(trim($alt_text));\n if (isset($this->urls[$link_id])) {\n $url = $this->encodeAttribute($this->urls[$link_id]);\n $result = \"<img src=\\\"$url\\\" alt=\\\"$alt_text\\\"\";\n if (isset($this->titles[$link_id])) {\n $title = $this->titles[$link_id];\n $title = $this->encodeAttribute($title);\n $result .= \" title=\\\"$title\\\"\";\n }\n $result .= $this->empty_element_suffix;\n\n if ('' != $align) {\n $result = sprintf('<div class=\"%s\">%s</div>', $align, $result);\n }\n\n $result = $this->hashPart($result);\n }\n else {\n # If there's no such link ID, leave intact:\n $result = $whole_match;\n }\n\n return $result;\n }\n\n /**\n * It performs the same operations on images as the _doImages_reference_callback()\n * method. The difference is that this callback is only applied to inline images.\n *\n * @param array $matches The array of images to parse\n *\n * @return string The HTML string that represents the original Markdown image element\n */\n public function _doImages_inline_callback($matches) {\n $alt_text = $matches[2];\n $url = $matches[3] == '' ? $matches[4] : $matches[3];\n $title =& $matches[7];\n\n $align = '';\n if (' ' == substr($alt_text, 0, 1)) {\n if (' ' == substr($alt_text, -1)) {\n $align = 'center';\n }\n else {\n $align = 'left';\n }\n }\n elseif (' ' == substr($alt_text, -1)) {\n $align = 'right';\n }\n\n $alt_text = $this->encodeAttribute(trim($alt_text));\n $url = $this->encodeAttribute($url);\n\n $result = \"<img src=\\\"$url\\\" alt=\\\"$alt_text\\\"\";\n if (isset($title)) {\n $title = $this->encodeAttribute($title);\n $result .= \" title=\\\"$title\\\"\"; # $title already quoted\n }\n $result .= $this->empty_element_suffix;\n\n if ('' != $align) {\n $result = sprintf('<div class=\"%s\">%s</div>', $align, $result);\n }\n\n return $this->hashPart($result);\n }\n\n /**\n * easybook supports the following formats to force page breaks:\n *\n * {pagebreak} (the format used by leanpub)\n * <!--BREAK--> (the format used by marked)\n */\n public function doPageBreaks($text)\n {\n return str_replace(\n '{pagebreak}',\n $this->hashBlock('<br class=\"page-break\" />').\"\\n\",\n $text\n );\n }\n\n /**\n * easybook supports several kinds of admonitions. Their syntax is very\n * similar to blockquotes and it's based on LeanPub and Marked:\n *\n * Asides / Sidebars:\n * A> ...\n * A> ...\n *\n * Notes:\n * N> ...\n * N> ...\n *\n * Similar syntax for warnings (W>), tips (T>), errors (E>), information (I>)\n * questions (Q>) and discussions (D>).\n *\n * @param string text The original Markdown content\n *\n * @return string The original content with the Markdown admonitions replaced\n * by the corresponding HTML admonitions\n */\n public function doAdmonitions($text)\n {\n $text = preg_replace_callback('/\n (\n (?>^[ ]*(['.implode('', array_keys($this->admonitionTypes)).'])>[ ]?.+\\n)+\n )\n /xm',\n array(&$this, '_doAdmonitions_callback'),\n $text\n );\n\n return $text;\n }\n\n public function _doAdmonitions_callback($matches) {\n $content = $matches[1];\n\n # trim one level of quoting - trim whitespace-only lines\n $content = preg_replace(\n '/^[ ]*(['.implode('', array_keys($this->admonitionTypes)).'])>[ ]?|^[ ]+$/m',\n '',\n $content\n );\n\n $content = $this->runBlockGamut($content);\n\n $content = preg_replace('/^/m', \" \", $content);\n\n # These leading spaces cause problem with <pre> content,\n # so we need to fix that:\n $content = preg_replace_callback(\n '{(\\s*<pre>.+?</pre>)}sx',\n function($submatches) {\n $pre = $submatches[1];\n $pre = preg_replace('/^ /m', '', $pre);\n\n return $pre;\n },\n $content\n );\n\n $type = $this->admonitionTypes[trim($matches[2])];\n\n return \"\\n\".$this->hashBlock(\"<div class=\\\"admonition $type\\\">\\n$content\\n</div>\").\"\\n\\n\";\n }\n\n /**\n * easybook supports three different code block types thanks to the\n * Code Plugin. Therefore, it doesn't use the fenced code block parsing\n * of the PHP Markdown library. This method overrides the original method\n * to do nothing with these code blocks.\n */\n public function doFencedCodeBlocks($text)\n {\n return $text;\n }\n}", "function display_header() {}", "function print_header($xlsRow){\n\t\tglobal $worksheet;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 10);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 30);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 30);\n\t\t$worksheet->set_column(6, 6, 10);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t\n\t\t$worksheet->write($xlsRow, 0, \"ปีงบประมาณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขที่ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"L\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"L\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"สำนัก/กองตามกฏหมาย\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"สำนัก/กองตามมอบหมายงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"วันลาพักผ่อน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t\n\t}", "function setUseHeaders($hflag) {\r\n if (!is_bool($hflag)) return false;\r\n if ($this->useheaders === $hflag) return true;\r\n if ($hflag) {\r\n // Apply headings from first row to all entries\r\n // and remove first row\r\n $heads = array_shift($this->data);\r\n foreach ($this->data as $i=>$r) {\r\n $r2 = array();\r\n foreach ($r as $j=>$d) {\r\n $r2[$heads[$j]] = $d;\r\n }\r\n $this->data[$i] = $r2;\r\n }\r\n } else {\r\n // Extract headings from longest data record\r\n // and prepend header line to data array\r\n $maxrec = 0;\r\n $maxct = 0;\r\n foreach ($this->data as $i=>$d) {\r\n if (count($d)>$maxct) {\r\n $maxct = count($d);\r\n $maxrec = $i;\r\n }\r\n }\r\n $heads = array();\r\n foreach ($this->data[$maxrec] as $h=>$f) {\r\n $heads[] = $h;\r\n }\r\n foreach ($this->data as $i=>$r) {\r\n $r2 = array();\r\n foreach ($heads as $h) {\r\n $r2[] = $r[$h];\r\n }\r\n $this->data[$i] = $r2;\r\n }\r\n array_unshift($this->data, $heads);\r\n }\r\n $this->useheaders = $hflag;\r\n return true;\r\n }" ]
[ "0.6563746", "0.6307047", "0.6142493", "0.6093359", "0.6052032", "0.5991679", "0.59901994", "0.5982853", "0.5925268", "0.5916023", "0.59153414", "0.58529425", "0.5852853", "0.5836854", "0.58270574", "0.5763146", "0.57493186", "0.57329947", "0.57266206", "0.57258826", "0.5694249", "0.56580955", "0.565375", "0.5652299", "0.56437904", "0.5631229", "0.5630434", "0.55811346", "0.5566541", "0.5561963", "0.5536936", "0.5534798", "0.5534729", "0.5519919", "0.5493704", "0.5489708", "0.54855454", "0.548505", "0.5483718", "0.5483306", "0.54831403", "0.5446806", "0.5436861", "0.5427955", "0.54257643", "0.541497", "0.54135275", "0.5412021", "0.5407446", "0.54029375", "0.54023033", "0.5396337", "0.53955054", "0.53946745", "0.5393258", "0.5385258", "0.5383105", "0.5381202", "0.53736246", "0.53692234", "0.53662103", "0.53590125", "0.5357809", "0.5354709", "0.53443795", "0.5342423", "0.5337082", "0.53273517", "0.5323963", "0.5318751", "0.5313367", "0.5313005", "0.530545", "0.53022426", "0.5295498", "0.5291796", "0.52908444", "0.5290451", "0.5286386", "0.5284926", "0.52791417", "0.52675307", "0.52568895", "0.5255303", "0.52482814", "0.5247749", "0.5244838", "0.5240517", "0.5239603", "0.5238138", "0.5235026", "0.52343583", "0.52323884", "0.5228675", "0.52115434", "0.5210131", "0.5209837", "0.5194286", "0.5192843", "0.519102" ]
0.78861433
0
Returns true if source is either true or false.
Возвращает true, если источник либо true, либо false.
public static function isBoolean($source): bool { return \is_bool($source); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isTrue()\n {\n return $this->toNative() === true;\n }", "abstract public function isTrue();", "public function getBooleanValue() {}", "public function returnsBoolean()\n {\n return is_bool($this->evaluate());\n }", "public function hasSource(){\n return $this->_has(2);\n }", "public function sourceIsEnabled( $source )\n\t{\n\t\treturn $this->hasSource( $source ) && $this->sources[$source]['enabled'];\n\t}", "public function isTrue()\n {\n return $this->isBool() && $this->_scalar === true;\n }", "public function hasSource(){\n return $this->_has(4);\n }", "public function getSourceExists()\n {\n return (boolean) $this->owner->getSource();\n }", "protected function parseBoolean() {\r\n $retval = null;\r\n $c = chr($this->seqSource->peek());\r\n if( $c == 't' ) {\r\n $trueString = $this->seqSource->readFully( 4 );\r\n if( $trueString!=TRUE ) {\r\n throw new Exception( \"Error parsing boolean: expected='true' actual='\".$trueString. \r\n \"' at offset \".$this->seqSource->getPosition());\r\n } else {\r\n $retval = COSBoolean::TRUE;\r\n }\r\n } else if( $c == 'f' ) {\r\n $falseString = $this->seqSource->readFully( 5 );\r\n if( $falseString!=FALSE ) {\r\n throw new Exception( \"Error parsing boolean: expected='true' actual='\".$falseString.\r\n \"' at offset \".$this->seqSource->getPosition());\r\n } else {\r\n $retval = COSBoolean::FALSE;\r\n }\r\n } else {\r\n throw new Exception( \"Error parsing boolean expected='t or f' actual='\".$c.\r\n \"' at offset \".$this->seqSource->getPosition());\r\n }\r\n return $retval;\r\n }", "public function isBoolean()\n\t{\n\t\treturn true;\n\t}", "public function valid()\n {\n\n $allowed_values = $this->getSourceAllowableValues();\n if (!in_array($this->container['source'], $allowed_values)) {\n return false;\n }\n return true;\n }", "function toBoolean() {\n return $this->typedValue != false;\n }", "public function haveTrue() {\n if (isset($this->true)) {\n return (isset($this->true->do) || isset($this->true->return));\n } else return false;\n }", "public function getBoolean();", "public function getBoolean();", "public function isSource($newStatus = true)\n {\n $oldStatus = $this->isSource;\n\n if (func_num_args()) {\n $this->isSource = $newStatus;\n } // if\n\n return $oldStatus;\n }", "public function isTrue(): bool\n {\n return $this->value;\n }", "protected function is_source_file() {\n\t\t\n\t\tif ( !isset($this->sourceFilesExtensions) ) $this->sourceFilesExtensions = array(\n\t\t\t'php'\n\t\t);\n\t\t\n\t\tif ( in_array( strtolower($this->getFileExtension($this->source)), $this->sourceFilesExtensions ) ) return true;\n\t\t\n\t}", "function hasValue(){\n\t\treturn !!trim($this->Source);\n\t}", "private function isBoolean($s): bool\n {\n if (filter_var($s, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) === null) {\n return false;\n }\n\n return true;\n }", "public function boolean(): bool {\n return (bool)$this->data();\n }", "public function isBool()\n {\n return $this->_scalar !== null && is_bool($this->_scalar);\n }", "protected static function validateBoolean($test, $source)\n {\n if (!($test === true || $test === false)) {\n throw new InvalidArgumentException(\"Argument to $source must be a boolean\");\n }\n }", "public function hasSourceConfig();", "public function hasSourceConfig();", "public function haveSource(Source $source) {\n $sourceID = $source->getID();\n if (array_key_exists($sourceID, $this->datasources)) {\n return true;\n }\n if (array_key_exists($sourceID, $this->sensorsources)) {\n return true;\n }\n return false;\n }", "public function isBoolean()\n {\n return is_bool($this->_value);\n }", "public function asBoolean(): Falsifiable\n {\n return Shooped::fold(false);\n }", "public function supports(string $type, mixed $source): bool;", "public static function isBoolean($input) {\n\t\treturn in_array($input, array(1, 0, '1', '0', true, false), true);\n\t}", "function ToBool()\n {\n return $this->Equals(self::Allowed());\n }", "public function boolean($key)\n\t{\n\t\treturn $this->raw($key) ? true : false;\n\t}", "public function asBool () : bool {\n return $this->value;\n }", "public function hasSource( $source )\n\t{\n\t\treturn array_key_exists( $source, $this->sources );\n\t}", "static function isBoolean($val){\n\t\treturn is_bool($val);\n\t}", "public function accepts($source)\n {\n foreach ($this->parsers as $parser) {\n if ($parser->accepts($source)) {\n return true;\n }\n }\n\n return false;\n }", "protected function checkAnyTrue()\n {\n $foundTrue = false;\n\n $args = func_get_args();\n\n foreach ($args as $arg) {\n if ($arg === true) {\n $foundTrue = true;\n break;\n }\n }\n\n return $foundTrue;\n }", "function to_boolean ($value) {\n\tif (\n\n\t\t// Falsy\n\t\t!$value or\n\n\t\t// Empty\n\t\tempty($value) or\n\n\t\t// Zero or less\n\t\t(is_numeric($value) and strval($value) <= 0) or\n\n\t\t// Keyword\n\t\t(is_string($value) and in_array(trim(strtolower($value)), array('null', 'nul', 'nil', 'false')))\n\n\t) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "public function toBool() {\n\n\t\tif ($this->nodeValue === 'true') {\n\t\t\treturn true;\n\t\t} else if ($this->nodeValue === 'false') {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn (bool) $this->nodeValue;\n\t\t}\n\t}", "private function transformBoolean( $var ) {\n\t\tif( $var == 'true' || $var === true ) {\n\t\t\treturn true;\n\t\t} // end if\n\t\treturn false;\n\t}", "public function isOk(): bool\n {\n $isOk = parent::isOk();\n $stringCheck = [$this->targType, $this->foreignFieldName];\n $checkResult = array_filter($stringCheck, [$this, 'checkStringInput']);\n $isOk &= $stringCheck == $checkResult;\n\n return boolval($isOk);\n }", "function is_boolean_true($boolean) {\n return stripos($boolean, '#t') !== false;\n}", "function convert(): bool\n {\n if (!is_string($this->value)) {\n $this->result = $this->value;\n }\n else {\n switch (strtolower($this->value)) {\n case '1':\n case 'true':\n case 'on':\n case 'yes':\n case 'y':\n $this->result = true;\n default:\n $this->result = false;\n }\n }\n\n return $this->result;\n }", "public function isRaw(): bool;", "public function toBoolean()\n {\n $key = $this->toLowerCase()->scalarString;\n\n $map =\n [\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false\n ];\n\n if (array_key_exists($key, $map))\n {\n return $map[$key];\n }\n elseif (is_numeric($this->scalarString))\n {\n return ((int)$this->scalarString > 0);\n }\n else\n {\n return (bool)$this->regexReplace('[[:space:]]', '')->scalarString;\n }\n }", "protected function readBoolean()\n {\n $value = $this->socket->read(1);\n return (bool) Binary::unpackByte($value);\n }", "public function isBoolean()\n {\n return (bool) ($this->getValueType()===ValueType::TYPE_BOOLEAN);\n }", "public static function is_boolean($key) { \n\n\t\t$boolean_array = array('session_cookiesecure','require_session',\n\t\t\t\t\t'access_control','require_localnet_session',\n\t\t\t\t\t'downsample_remote','track_user_ip',\n\t\t\t\t\t'xml_rpc','allow_zip_download',\n\t\t\t\t\t'file_zip_download','ratings',\n\t\t\t\t\t'shoutbox','resize_images',\n\t\t\t\t\t'show_album_art','allow_public_registration',\n\t\t\t\t\t'captcha_public_reg','admin_notify_reg',\n\t\t\t\t\t'use_rss','download','force_http_play',\n\t\t\t\t\t'allow_stream_playback','allow_democratic_playback',\n\t\t\t\t\t'use_auth','allow_localplay_playback','debug','lock_songs'); \n\n\t\tif (in_array($key,$boolean_array)) { \n\t\t\treturn true; \n\t\t} \n\n\t\treturn false; \n\n\t}", "public function supportsSource($source);", "public function readBoolean()\n {\n return $this->bin->readBoolean();\n }", "function canConvert($formatSrc, $formatDes = NULL) {\n if (isset($this->imageFormats[$formatSrc])) {\n $srcResult = (bool)$this->getExecutableFile($formatSrc);\n } else {\n $srcResult = FALSE;\n }\n if (!isset($formatDes)) {\n $desResult = TRUE;\n } elseif (isset($this->imageFormats[$formatDes])) {\n $desResult = (bool)$this->getExecutableFile($formatDes);\n } else {\n $desResult = FALSE;\n }\n return $srcResult && $desResult;\n }", "public function sourceIsSupported( string $source )\n {\n return in_array( $this->sanitizeSource($source), $this->_sources );\n }", "public function readonly ():bool;", "public function boolForKey($sKey) {\n\t\tif (!isset($this->aProps[$sKey]))\n\t\t\ttrigger_error('SssS_BaseConverter::boolForKey: unknown key ('\n\t\t\t\t\t. $sKey . ')', E_USER_ERROR);\n\n\t\treturn (true === $this->aProps[$sKey]) ? true : flase;\n\t}", "private function boolean($data)\n {\n if (filter_var($data, FILTER_VALIDATE_BOOLEAN)) {\n return true;\n }else {\n return $data . ' is not a valid boolean';\n }\n }", "function simplesaml_is_enabled_source($source) {\n\t\n\tif (empty($source)) {\n\t\treturn false;\n\t}\n\t\n\t$enabled_sources = simplesaml_get_enabled_sources();\n\tif (empty($enabled_sources)) {\n\t\treturn false;\n\t}\n\t\n\treturn in_array($source, $enabled_sources);\n}", "function bool (){\n return true; // retourner ma valeur true\n }", "function isBoolean() {\n\t$isBoolean = function ($value) {\n\t\treturn is_bool($value);\n\t};\n\n\treturn curry($isBoolean);\n}", "function ifTrue(Func &$f) { # :: (Bool, Func) -> Bool\n if ($this->value === true) # Strict-comparison.\n $f();\n return new Bool($this->value);\n }", "protected function shouldReturnSource()\n {\n return false;\n }", "public function isOn()\n {\n return file_exists($this->flagFile);\n }", "public function toBoolean()\n {\n return (boolean) $this->value || $this->value === null;\n }", "private static function _isTrue($value) {\n\t\treturn in_array($value, array(\"yes\", \"y\", \"1\", TRUE, \"true\", \"TRUE\"));\n\t}", "public final function IsTrue($value)\n\t{\n\t\treturn (strtolower($value) === 'true' || $value === 1 || $value === '1' || $value === true);\n\t}", "public function isSome(): bool;", "public function getBoolValue()\n {\n return true;\n }", "private function getBooleanValue($x) : bool\n {\n if ($x == 1) {\n return true;\n }\n return false;\n }", "static function boolean();", "function bool($x)\n{\n return (bool) $x;\n}", "function isTrue($b) \n{\n if($b == true)\n {\n return true;\n }\n return false;\n // If true is true evalute it as true.\n}", "public function bool()\n {\n return $this->addRule(new FilterRule\\CastBool);\n }", "public function canSeeInSource($raw) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\ConditionalAssertion('seeInSource', func_get_args()));\n }", "public function isValid()\n {\n if (\n trim($this->getHtmlSource()) !== ''\n && $this->getType() === self::class\n ) {\n return true;\n }\n return false;\n }", "public function is_CheckTrue( $value , $return_type = 'boolean' ) {\n\t\t\tif ( $return_type === 'string' ) {\n\t\t\t\t$true_value = '1';\n\t\t\t\t$false_value = '0';\n\t\t\t} else {\n\t\t\t\t$true_value = true;\n\t\t\t\t$false_value = false;\n\t\t\t}\n\n\t\t\t// No arrays allowed.\n\t\t\t//\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\terror_log( __( 'Array provided to SLPlus::is_CheckTrue()' , 'store-locator-le' ) );\n\n\t\t\t\treturn $false_value;\n\t\t\t}\n\n\t\t\tif ( strcasecmp( $value , 'true' ) == 0 ) {\n\t\t\t\treturn $true_value;\n\t\t\t}\n\t\t\tif ( strcasecmp( $value , 'on' ) == 0 ) {\n\t\t\t\treturn $true_value;\n\t\t\t}\n\t\t\tif ( strcasecmp( $value , '1' ) == 0 ) {\n\t\t\t\treturn $true_value;\n\t\t\t}\n\t\t\tif ( $value === 1 ) {\n\t\t\t\treturn $true_value;\n\t\t\t}\n\t\t\tif ( $value === true ) {\n\t\t\t\treturn $true_value;\n\t\t\t}\n\n\t\t\treturn $false_value;\n\t\t}", "public function isTc(): bool;", "public static function is($value)\n {\n return ($value === true || $value === false || $value === 0 || $value === 1);\n }", "public function check(): bool;", "public function check(): bool;", "public function isChecked()\n\t{\n\t\t$rawValue = $this->getRawValue();\n\t\tif ((int) $rawValue === 1) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function is_true($bool) {\n if (is_string($bool)) {\n $bool = strtolower($bool);\n }\n return in_array($bool, array(true, YES, \"1\", \"yes\", \"true\", \"on\"), true);\n }", "public function asBool()\n {\n if (isset($this->value)) {\n $bool = (bool) $this->value;\n }\n else {\n $bool = $this->fail(\"Could not cast %s to bool\");\n }\n\n return $bool;\n }", "public function make_sourced(): bool\n {\n $Sources = Users::get_upload_sources();\n if (empty($this->Dec)) {\n return false;\n }\n if (isset($this->Dec['info']['source']) && ($this->Dec['info']['source'] == $Sources[0] || $this->Dec['info']['source'] == $Sources[1])) {\n return false;\n }\n $this->Dec['info']['source'] = $Sources[0];\n ksort($this->Dec['info']);\n \n return true;\n }", "public function isBool(): bool\n\t{\n\t\treturn static::IS_BOOL === ($this->options & static::IS_BOOL);\n\t}", "public function is_checked()\n\t{\n\t\treturn (bool) $this->val();\n\t}", "public function isTrue(): ?bool\n {\n return $this->getValue();\n }", "final protected function shouldBeBoolean ($value) {\n\t\t$arguments = func_get_args();\n\t\tforeach ($arguments as $argument) {\n\t\t\tif (!is_bool($argument)) {\n\t\t\t\treturn $this->fail();\n\t\t\t}\n\t\t}\n\t\treturn $this->pass();\n\t}", "function get_bool($value)\n {\n return filter_var($value, FILTER_VALIDATE_BOOLEAN);\n }", "protected function _toBoolean($value) {\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean) $value;\n\t}", "function wpbones_is_true($value)\n {\n return ! in_array(strtolower($value), [ '', 'false', '0', 'no', 'n', 'off', null ]);\n }", "public function isRaw() {\n\t\treturn ($this->_value === $this->_raw);\n\t}", "public function passes(): bool;", "public function is_stream(){\n\t\t$source = $this->get_param('sourcetype', 'gallery');\n\t\t\n\t\treturn (!in_array($source, array('post', 'posts', 'specific_posts', 'specific_post', 'current_post', 'woocommerce', 'woo', 'gallery'), true)) ? $source : false;\n\t}", "public function get_source() {\n\t\t\t$args = $this->args;\n\n\t\t\treturn ! empty( $args['source'] ) ? $args['source'] : false;\n\t\t}", "public function boolean_example()\n\t{\n\t\t$this->expect_boolean_true(TRUE);\n\t\t$this->expect_boolean_false(FALSE);\n\t}", "function rest_is_boolean($maybe_bool)\n{\n}", "function check(): bool;", "public function valid()\n {\n if (strlen($this->container['source_number']) > 15) {\n return false;\n }\n if (strlen($this->container['source_number']) < 1) {\n return false;\n }\n $allowed_values = array(\"enroute\", \"failed\", \"submitted\", \"delivered\", \"expired\", \"rejected\", \"undeliverable\");\n if (!in_array($this->container['status'], $allowed_values)) {\n return false;\n }\n return true;\n }", "public function isBool($error = null)\n\t{\n\t\t// filled\n\t\tif($this->isFilled())\n\t\t{\n\t\t\t// post/get data\n\t\t\t$data = $this->getMethod(true);\n\n\t\t\t// validate\n\t\t\tif(!isset($data[$this->attributes['name']]) || !SpoonFilter::isBool($data[$this->attributes['name']]))\n\t\t\t{\n\t\t\t\tif($error !== null) $this->setError($error);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\t// not submitted\n\t\tif($error !== null) $this->setError($error);\n\t\treturn false;\n\t}", "public function get(string $source, string $target): bool;" ]
[ "0.6607644", "0.6444992", "0.63972145", "0.6339716", "0.6280139", "0.6238611", "0.6236522", "0.61848545", "0.6166566", "0.61418104", "0.61363643", "0.6131905", "0.611178", "0.61091566", "0.60768634", "0.60768634", "0.6063805", "0.6014205", "0.5926583", "0.5916285", "0.5913607", "0.5867997", "0.58370805", "0.5835541", "0.580451", "0.580451", "0.5785189", "0.5782313", "0.577901", "0.57577074", "0.5751397", "0.5748387", "0.5719311", "0.5717324", "0.57032007", "0.5693548", "0.56853104", "0.5683452", "0.5678008", "0.56632304", "0.566306", "0.56532544", "0.5624743", "0.5620658", "0.5612783", "0.56099397", "0.56077856", "0.55971175", "0.559618", "0.5583074", "0.5579382", "0.5572973", "0.5571865", "0.55702025", "0.55656403", "0.55594075", "0.5551717", "0.5549329", "0.55450654", "0.5542685", "0.5536532", "0.55266404", "0.55215675", "0.5519905", "0.5519061", "0.55134445", "0.5507743", "0.5505581", "0.549527", "0.54947567", "0.54929674", "0.5487415", "0.5483887", "0.5483429", "0.5472424", "0.54620534", "0.5457333", "0.54567116", "0.54567116", "0.5448496", "0.5443432", "0.54380107", "0.54373777", "0.54262346", "0.5425002", "0.54213", "0.5421238", "0.5420348", "0.54141283", "0.5406585", "0.5401775", "0.53952336", "0.5365482", "0.53612363", "0.5356704", "0.5356531", "0.5352149", "0.53491765", "0.53473794", "0.53456175" ]
0.74954623
0
Creates an action based on the given action ID. The method first checks if the action ID has been declared in [[actions()]]. If so, it will use the configuration declared there to create the action object. If not, it will look for a controller method whose name is in the format of `actionXyz` where `Xyz` stands for the action ID. If found, an [[InlineAction]] representing that method will be created and returned.
Создает действие на основе заданного идентификатора действия. Метод сначала проверяет, объявлен ли идентификатор действия в [[actions()]]. Если да, то будет использоваться конфигурация, объявленная там, чтобы создать объект действия. Если нет, будет искаться метод контроллера, имя которого имеет формат `actionXyz`, где `Xyz` соответствует идентификатору действия. Если такой метод найден, будет создан и возвращен объект [[InlineAction]], представляющий этот метод.
public function createAction($id) { if ($id === '') { $id = $this->defaultAction; } if (preg_match('/^[a-z0-9\\-_]+$/', $id) && strpos($id, '--') === false && trim($id, '-') === $id) { $methodName = 'action' . str_replace(' ', '', ucwords(implode(' ', explode('-', $id)))); if (method_exists($this, $methodName)) { $method = new \ReflectionMethod($this, $methodName); if ($method->isPublic() && $method->getName() === $methodName) { return new InlineAction($id, $this, $methodName); } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAction($id)\n {\n return new Model\\Action($this->client, $id);\n }", "public function GetActionByID($id)\n {\n $action = null;\n\n if ($this->IsValidAuthToken() && is_int($id))\n {\n $request = new ZabbixWrapper();\n $request->Create(\"action.get\", $this->GetAuthToken(), $this->nonce++);\n $request->params = new ZabbixActionGetRequest();\n $request->params->FilterOnID($id);\n\n $response = $this->Send($request);\n\n if ($this->IsValidResponse($response) && count($response[\"result\"]) == 1)\n {\n $action = Action::WithNameAndID($response[\"result\"][0][\"name\"], $response[\"result\"][0][\"actionid\"]);\n }\n }\n\n return $action;\n }", "public function setIdAction($idAction) {\n $this->idAction = $idAction;\n return $this;\n }", "public static function getActionById($idAction){\n\t\t$action = R::findOne(Action::$nameTable, ' id = ? ', array($idAction));\n\t\treturn $action;\n\t}", "public function addActionObject(string $id, Action $action)\n\t{\n\t\t//Callback functions parameters: $record, $pageDescriptor, $action\n\t\tif(CHelper::e($id))\n\t\t{\n\t\t\tthrow new CException('Please provide a id for the action.');\n\t\t}\n\t\t\n\t\tif(isset($this->actions[$id]))\n\t\t{\n\t\t\tthrow new CException('Action id \"%s\" already exists on page \"%s\"!', $id, $this->id);\n\t\t}\n\t\t\n\t\t$this->actions[$id] = $action;\n\t\treturn $this;\n\t}", "public static function action($actionData = null)\n {\n return Action::factory($actionData);\n }", "public function setActionId($id)\n {\n $this->actionId = $id;\n }", "public function createAction($actionName, array $actionConfig)\n {\n $config = ActionConfiguration::createNamed($actionName, $actionConfig);\n if (!$config->offsetExists(self::ACTION_TYPE_KEY)) {\n throw new RuntimeException(\n sprintf(\n 'The \"%s\" option must be defined. Action: %s.',\n self::ACTION_TYPE_KEY,\n $actionName\n )\n );\n }\n\n $type = (string) $config->offsetGet(self::ACTION_TYPE_KEY);\n if (!$this->actionContainer->has($type)) {\n throw new RuntimeException(sprintf('Unknown action type \"%s\". Action: %s.', $type, $actionName));\n }\n\n $action = $this->actionContainer->get($type);\n if (!$action instanceof ActionInterface) {\n throw new RuntimeException(sprintf(\n 'An action should be an instance of \"%s\", got \"%s\".',\n ActionInterface::class,\n get_class($action)\n ));\n }\n\n $action->setOptions($config);\n\n return $action;\n }", "public function setActionId($action_id)\n {\n $this->action_id = $action_id;\n\n return $this;\n }", "public function createAction(Cron\\Entity\\Action $action) {\n $data = array(\n 'cronTriggerId' => $action->get('cronTriggerId'),\n 'sourceType' => $action->get('sourceType'),\n 'sourceTemplateId' => $action->get('sourceTemplateId')\n );\n $id = parent::create($data);\n\n return $action->setId($id);\n }", "public function createAction($type, $options = null): ActionInterface\n {\n if (!isset($this->actionTypes[$type])) {\n throw new InvalidArgumentException(sprintf('Action unknown: %s', $type));\n }\n\n $class = $this->actionTypes[$type];\n\n return new $class($options);\n }", "public function item_action($id, $action)\n\t{\n\t\tif (!in_array($action, array('approve', 'disapprove', 'close', 'delete')))\n\t\t{\n\t\t\treturn $this->helper->error('INVALID_ACTION', 404);\n\t\t}\n\n\t\t$this->user->add_lang('mcp');\n\t\t$this->load_item($id);\n\n\t\tif (!$this->check_auth(true))\n\t\t{\n\t\t\treturn $this->helper->needs_auth();\n\t\t}\n\n\t\tif (!check_link_hash($this->request->variable('hash', ''), 'attention_action'))\n\t\t{\n\t\t\tredirect($this->attention->get_report_url());\n\t\t}\n\n\t\treturn $this->{$action}();\n\t}", "public function addAction($action_name)\n {\n $action = new EloquentAction();\n $action->setName($action_name);\n if(!$this->actions()->save($action))\n $action = null;\n \n return $action;\n }", "public static function createAction($type, array $configuration)\n {\n $action = new Action();\n\n $action->setType($type);\n $action->setConfiguration($configuration);\n\n return $action;\n }", "public static function get_action_by_id($note, $action_id)\n {\n }", "public function createAction($action)\n\t{\n\t\t$date = time();\n\t\t$actionObject = new Action($this->_logger, $this->_mySqlConnect->db);\n\t\t$actionObject->setUuid(UUID::getUUID());\n\t\t$actionObject->setCreated($date);\n\t\t$actionObject->setModified($date);\n\t\t$actionObject->setName($action['name']);\n\t\t$actionObject->setCategory($action['category']);\n\n\t\tif ($actionObject->createAction() === FALSE) {\n\t\t\thttp_response_code(500);\n\t\t\t$errorCode = 'actionNotCreated';\n\t\t\t$friendlyError = 'Action could not be created.';\n\t\t\t$errors = array($friendlyError);\n\t\t\t$this->echoResponse($errorCode, $errors, $friendlyError, 'fail', (object)array());\n\t\t} else {\n\t\t\thttp_response_code(201);\n\t\t\t$this->echoResponse('none', array(), '', 'success', (object)array());\n\t\t}\n\t\t$this->completeRequest();\n\t}", "public function show($id)\n {\n if (is_numeric($id)) {\n return new ActionResource (Action::find($id));\n }else{\n abort(404 , 'resource not found.');\n \n }\n \n }", "protected function createAction($action)\n {\n \n //Return a new instance that includes the required composite call.\n return $this->actionFactory->__invoke(\n $this->createCompositeCall($action),\n $action\n );\n \n }", "public function createControllerByID($id)\n {\n $pos = strrpos($id, '/');\n if ($pos === false) {\n $prefix = '';\n $className = $id;\n } else {\n $prefix = substr($id, 0, $pos + 1);\n $className = substr($id, $pos + 1);\n }\n\n if ($this->isIncorrectClassNameOrPrefix($className, $prefix)) {\n return null;\n }\n\n $className = preg_replace_callback('%-([a-z0-9_])%i', function ($matches) {\n return ucfirst($matches[1]);\n }, ucfirst($className)) . 'Controller';\n $className = ltrim($this->controllerNamespace . '\\\\' . str_replace('/', '\\\\', $prefix) . $className, '\\\\');\n if (strpos($className, '-') !== false || !class_exists($className)) {\n return null;\n }\n\n if (is_subclass_of($className, 'yii\\base\\Controller')) {\n $controller = Yii::createObject($className, [$id, $this]);\n return get_class($controller) === $className ? $controller : null;\n } elseif (YII_DEBUG) {\n throw new InvalidConfigException('Controller class must extend from \\\\yii\\\\base\\\\Controller.');\n }\n\n return null;\n }", "public function getAction($id)\n {\n // TODO: Implement getAction() method.\n\n $this->display();\n }", "private function get_action_instance($p_action_id)\n {\n global $g_comp_database;\n\n $l_dao_workflow_actions = new isys_workflow_dao_type($g_comp_database);\n\n $l_data = $l_dao_workflow_actions->get_action_types($p_action_id);\n $l_row = $l_data->get_row();\n\n $l_class = $l_row[\"isys_workflow_action_type__class\"];\n\n /* Get object and handle it (isys_workflow_action_*) -------------------- */\n if (class_exists($l_class))\n {\n return new $l_class();\n }\n else\n {\n return false;\n } // if\n }", "public function runAction($id, $params = [])\n {\n $options = $this->options($id === '' ? $this->defaultAction : $id);\n foreach ($options as $option) {\n $this->$option = '';\n }\n\n return parent::runAction($id, $params);\n }", "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 }", "public function createCaptchaAction()\n {\n $ca = Yii::$app->createController($this->captchaAction);\n if ($ca !== false) {\n /* @var $controller \\yii\\base\\Controller */\n list($controller, $actionID) = $ca;\n $action = $controller->createAction($actionID);\n if ($action !== null) {\n return $action;\n }\n }\n throw new InvalidConfigException('Invalid CAPTCHA action ID: ' . $this->captchaAction);\n }", "public function get($id)\n {\n $action = ActionService::get($id);\n return response()->json(array(\n 'actions' => $action\n ),200);\n }", "public function editAction($id)\n {\n return parent::editAction($id);\n\n }", "public static function addAction($id, $text, $style = null, $data = null, $url = null, bool $popup = false)\n {\n $action = [\n \"type\"=> \"button\",\n \"action_id\" => $id,\n \"text\"=> [\n \"type\"=> \"plain_text\",\n \"emoji\"=> true,\n \"text\"=> $text\n ],\n ];\n\n if ($style) {\n $action['style'] = $style;\n }\n\n if ($data) {\n $action['value'] = $data;\n }\n\n if ($url) {\n $action['url'] = $url;\n }\n\n if ($popup) {\n $action['confirm'] = [\n \"title\"=> [\n \"type\"=> \"plain_text\",\n \"text\"=> \"Are you sure?\"\n ],\n \"confirm\"=> [\n \"type\"=> \"plain_text\",\n \"text\"=> \"Deny\"\n ],\n \"deny\"=> [\n \"type\"=> \"plain_text\",\n \"text\"=> \"Cancel\"\n ]\n ];\n }\n return $action;\n }", "public function setAction($actionName): ControllerInterface;", "public function index(Request $request, $action, $id = null, $action_id = null)\n {\n $method = strtolower($request->method()) . strtoupper(substr($action, 0, 1)) . substr($action, 1);\n if($id){\n $this->resource_id = $id;\n }\n if($action_id){\n $this->action_resource_id = $action_id;\n }\n\n return $this->$method($request);\n }", "public function track(string $action_type = null) : \\Flexio\\Object\\Action\n {\n if ($this->action !== false)\n {\n // note: don't reset the action type if an action_type is specified\n // but an action has already been created\n $params = $this->getActionParams();\n $this->action->set($params);\n return $this->action;\n }\n\n if (!isset($action_type))\n throw new \\Flexio\\Base\\Exception(\\Flexio\\Base\\Error::INVALID_SYNTAX);\n\n // the action hasn't been set yet; create a new action\n $this->action_type = $action_type;\n $params = $this->getActionParams();\n $action = \\Flexio\\Object\\Action::create($params);\n $this->action = $action;\n return $action;\n }", "public function set_action_id($value)\n\t{\n\t\t$this->action_id = $value;\n\t\treturn $this;\n\t}", "public function deleteAction($id) {\n return parent::delete($id);\n }", "protected function existAction()\n {\n if (!method_exists($this->controller, $this->action)) {\n $this->action = 'index';\n }\n\n return $this;\n }", "public function create(string $type, array $config) : ?ActionInterface\n {\n switch ($type) {\n case Config::CONTROLLER:\n return $this->createVirtualAction($config);\n case Config::FORWARD:\n return $this->createForwardAction($config);\n }\n\n return null;\n }", "protected function createActionFromMap($actionMap,$actionID,$requestActionID,$config=array())\n\t{\n\t\tif(($pos=strpos($actionID,'.'))===false && isset($actionMap[$actionID]))\n\t\t{\n\t\t\t$baseConfig=is_array($actionMap[$actionID]) ? $actionMap[$actionID] : array('class'=>$actionMap[$actionID]);\n\t\t\treturn Yii::createComponent(empty($config)?$baseConfig:array_merge($baseConfig,$config),$this,$requestActionID);\n\t\t}\n\t\telseif($pos===false)\n\t\t\treturn null;\n\n\t\t// the action is defined in a provider\n\t\t$prefix=substr($actionID,0,$pos+1);\n\t\tif(!isset($actionMap[$prefix]))\n\t\t\treturn null;\n\t\t$actionID=(string)substr($actionID,$pos+1);\n\n\t\t$provider=$actionMap[$prefix];\n\t\tif(is_string($provider))\n\t\t\t$providerType=$provider;\n\t\telseif(is_array($provider) && isset($provider['class']))\n\t\t{\n\t\t\t$providerType=$provider['class'];\n\t\t\tif(isset($provider[$actionID]))\n\t\t\t{\n\t\t\t\tif(is_string($provider[$actionID]))\n\t\t\t\t\t$config=array_merge(array('class'=>$provider[$actionID]),$config);\n\t\t\t\telse\n\t\t\t\t\t$config=array_merge($provider[$actionID],$config);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tthrow new CException(Yii::t('yii','Object configuration must be an array containing a \"class\" element.'));\n\n\t\t$class=Yii::import($providerType,true);\n\t\t$map=call_user_func(array($class,'actions'));\n\n\t\treturn $this->createActionFromMap($map,$actionID,$requestActionID,$config);\n\t}", "public function action(int $action): self\n {\n\n new Commands\\Action($action);\n return $this;\n\n }", "public function runAction($id, $params = [])\n {\n $action = $this->createAction($id);\n if ($action === null) {\n throw new InvalidRouteException('Unable to resolve the request: ' . $id);\n }\n Application::trace('Route to run: ' . $id, __METHOD__);\n if (Application::$app->requestedAction === null) {\n Application::$app->requestedAction = $action;\n }\n $this->action = $action;\n $result = null;\n // run the action\n $result = $action->runWithParams($params);\n return $result;\n }", "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}", "static public function createAction($data = [])\n\t{\n\t\t$action = new ActionLog;\n\n\t\t// set the action log fields\n\t\t$action->object_id = $data['object_id'];\n\t\t$action->object_type = $data['object_type'];\n\t\t$action->user_id = $data['user_id'];\n\t\t$action->action_key = $data['action_key'];\n\n\t\t// save the record to the DB\n\t\t$action->save();\n\n\t\treturn $action;\n\t}", "public function missingAction($actionID)\n {\n $controller = Parameters::get('controller');\n $method = $this->createActionName($actionID);\n\n Yii::trace('call api method: '.$controller.'.'.$method);\n \n $this->dispatchCall($controller, $method);\n }", "private function findAction(string $actionId)\n {\n $actions = collect($this->actions)->merge($this->bulkActions);\n\n return $actions->first(\n function ($actionToFind) use ($actionId) {\n return $actionToFind->id === $actionId;\n }\n );\n }", "public function index(Request $request, $action, $id = null)\n {\n $method = strtolower($request->method()) . strtoupper(substr($action, 0, 1)) . substr($action, 1);\n if ($id) {\n $this->resource_id = $id;\n }\n return $this->$method($request);\n }", "public function getAction($id)\n {\n $view = $this->responseGetById(\n $id,\n function ($id) {\n return $this->getManager()->findById($id);\n }\n );\n\n return $this->handleView($view);\n }", "public function setAction($var)\n {\n GPBUtil::checkString($var, True);\n $this->action = $var;\n\n return $this;\n }", "public function setAction($var)\n {\n GPBUtil::checkString($var, True);\n $this->action = $var;\n\n return $this;\n }", "function getUnconfiguredAction($definition) {\n $implemented_interfaces = class_implements($definition['class']);\n\n if (isset($implemented_interfaces['Drupal\\Core\\Plugin\\ContainerFactoryPluginInterface'])) {\n $action = forward_static_call_array([$definition['class'], 'create'], [$this->container, [], $definition['id'], $definition]);\n }\n else {\n $class = $definition['class'];\n $action = new $class([], $definition['id'], $definition);\n }\n\n return $action;\n }", "public function getIdAction() {\n return $this->idAction;\n }", "public function show($id)\n {\n $action = Action::findOrFail($id);\n\n return view('actions.show', compact('action'));\n }", "public static function create(AAction $action, Context $context): IAction {\n $result = null;\n switch ($action->getType()) {\n case Type::DEVICE:\n $result = new Actions\\Device($action, $context);\n break;\n case Type::HTTP:\n $result = new Actions\\Http($action, $context);\n break;\n case Type::MQTT:\n $result = new Actions\\Mqtt($action, $context);\n break;\n default:\n throw new Exception('Unsupported condition type: '.$action->getType());\n }\n\n return $result;\n }", "public function GetActionByName($name)\n {\n $action = new Action();\n\n if (is_string($name))\n {\n if ($this->IsValidAuthToken())\n {\n $request = new ZabbixWrapper();\n $request->Create(\"action.get\", $this->GetAuthToken(), $this->nonce++);\n $request->params = new ZabbixActionGetRequest();\n $request->params->output = array(\"name\", \"actionid\");\n $request->params->filter = new ZabbixActionGetFilter();\n $request->params->filter->SetNames($name);\n\n $response = $this->Send($request);\n\n if ($this->IsValidResponse($response))\n {\n foreach ($response[\"result\"] as $key => $value)\n {\n $action = Action::WithNameAndID($value[\"name\"], $value[\"actionid\"]);\n }\n }\n }\n }\n\n return $action;\n }", "public function create($className, $arguments = [])\n {\n $action = $this->objectManager->create($className, $arguments);\n if (!$action instanceof ActionInterface) {\n throw new \\InvalidArgumentException(\n $className . ' doesn\\'t implement \\Magento\\Framework\\Indexer\\ActionInterface'\n );\n }\n\n return $action;\n }", "public function factoryAction($name, array $params)\n\t\t{\n\t\t\t$class = 'ECash_CFE_Action_'.$name;\n\t\t\treturn new $class($params);\n\t\t}", "public static function makeAction(Zend_Config $config)\r\n {\n return _make();\r\n }", "public function index(Request $request, $action, $id = null)\n {\n $method = strtolower($request->method()) . strtoupper(substr($action, 0, 1)) . substr($action, 1);\n if($id){\n $this->resource_id = $id;\n }\n return $this->$method($request);\n }", "protected function createActionFromMap($actionMap,$actionID,$requestActionID,$config=array())\n\t{\n\t\tif(($pos=strpos($actionID,'.'))===false && isset($actionMap[$actionID]))\n\t\t{\n\t\t\t$baseConfig=is_array($actionMap[$actionID]) ? $actionMap[$actionID] : array('class'=>$actionMap[$actionID]);\n\t\t\treturn Gateway::createComponent(empty($config)?$baseConfig:array_merge($baseConfig,$config),$this,$requestActionID);\n\t\t}\n\t\telseif($pos===false)\n\t\treturn null;\n\n\t\t// the action is defined in a provider\n\t\t$prefix=substr($actionID,0,$pos+1);\n\t\tif(!isset($actionMap[$prefix]))\n\t\treturn null;\n\t\t$actionID=(string)substr($actionID,$pos+1);\n\n\t\t$provider=$actionMap[$prefix];\n\t\tif(is_string($provider))\n\t\t$providerType=$provider;\n\t\telseif(is_array($provider) && isset($provider['class']))\n\t\t{\n\t\t\t$providerType=$provider['class'];\n\t\t\tif(isset($provider[$actionID]))\n\t\t\t{\n\t\t\t\tif(is_string($provider[$actionID]))\n\t\t\t\t$config=array_merge(array('class'=>$provider[$actionID]),$config);\n\t\t\t\telse\n\t\t\t\t$config=array_merge($provider[$actionID],$config);\n\t\t\t}\n\t\t}\n\t\telse\n\t\tthrow new CException(Gateway::t('Gateway','Object configuration must be an array containing a \"class\" element.'));\n\n\t\t$class=Gateway::import($providerType,true);\n\t\t$map=call_user_func(array($class,'actions'));\n\n\t\treturn $this->createActionFromMap($map,$actionID,$requestActionID,$config);\n\t}", "public function createAction()\n {\n //...\n }", "public function getAction()\n\t{\n\t\tif (!$this->_action instanceof App_Model_Action) {\n\t\t\t$action = new App_Model_Action();\n\t\t\tif (!$action->findById($this->_actionId)) {\n\t\t\t\tthrow new Zend_Exception('K události se nepodařilo dohledat akci!');\n\t\t\t}\n\t\t\t$this->_action = $action;\n\t\t}\n\n\t\treturn $this->_action;\n\t}", "function getAction($ID) {\n\n $actions = $this->getActions();\n if (isset($actions[$ID])) {\n return $actions[$ID];\n }\n return array();\n }", "public function show($id, $action_id)\n {\n return $this->get('/floating_ips/' . $this->encodePath($id) . '/actions/' . $this->encodePath($action_id));\n }", "public function action($type, $id, $action, $data = array())\n\t{\n\t\t$uri = $this->_map(ChargeOverAPI::METHOD_ACTION, $id, $type);\n\n\t\tif (is_object($data))\n\t\t{\n\t\t\t$data = $data->toArray();\n\t\t}\n\n\t\t$uri .= '?action=' . $action;\n\n\t\treturn $this->_request('POST', $uri, $data);\n\t}", "public function removeAction($id)\n {\n // TODO: Implement removeAction() method.\n }", "public static function routeAction(){\n $req = new Request();\n $res = new Response();\n\n try{\n $parts = explode('/', $request->action);\n $partsUcfirst = array(\n \tApp::getOption('namespace'),\n \t'Action',\n );\n foreach ($parts as $part){\n $partsUcfirst[] = ucfirst($part);\n }\n $actionClass = implode('\\\\', $partsUcfirst);\n $action = new $actionClass($req, $res);\n $action->init();\n $action->validate();\n\t $access = $action->checkPermissions();\n\t if ($access){\n\t \t$action->execute();\n\t }else{\n\t $action->redirect(REDIRECT_PERMISSION);\n\t }\n\t $action->finish();\n }catch(\\Exception $e) {\n $res->printr($e);\n }\n }", "public static function actions($id, array $actions)\n {\n $html = '';\n foreach ($actions as $action)\n {\n // Get action config\n $config = isset(self::$_config_actions[$action]) ? self::$_config_actions[$action] : self::$_config_actions['view'];\n\n // Generate URL\n $uri = Request::current()->route()->uri(array(\n 'controller' => strtolower(Request::current()->controller()),\n 'action' => $config['action'],\n 'id' => $id\n ));\n\n // Render action\n $html .= Table::action($uri, $config);\n }\n\n return $html;\n }", "public function setRecordActionId($recordActionId)\n {\n $this->recordActionId = $recordActionId;\n return $this;\n }", "public function edit($id)\n {\n return app(EditPart6Action::class)->handle($id);\n }", "public function store(Request $request, $id)\n {\n $this->validate($request,[\n 'action' => ['required']\n ]);\n\n ActionBoard::create([\n 'action_text' => $request->action,\n 'user_id' => $id\n ]);\n\n return back()->with([\n 'message' => 'Your action has been submitted successfully',\n 'alert-type' => 'success'\n ]);\n }", "public function action($name, $priority = 10, $arguments = 1)\n {\n return new Action($this, $name, $priority, $arguments);\n }", "public function createAction() {\n \n }", "public function getActions($id)\n\t{\n\t\t$actions = [\n\t\t\t'downloadToFile' => false,\n\t\t\t'delete' => false,\n\t\t\t'downloadToBrowser' => 0,\n\t\t];\n\n\t\t$postProcEngineName = $this->getPostProcEngineNameForRecord($id);\n\t\t$postProcEngine = Factory::getPostprocEngine($postProcEngineName);\n\t\t$stat = Platform::getInstance()->get_statistics($id);\n\n\t\t// Does the engine support local d/l and we need to d/l the file locally?\n\t\tif ($postProcEngine->supportsDownloadToFile() && !$stat['filesexist'])\n\t\t{\n\t\t\t$actions['downloadToFile'] = true;\n\t\t}\n\n\t\t// Does the engine support remote deletes?\n\t\tif ($postProcEngine->supportsDelete())\n\t\t{\n\t\t\t$actions['delete'] = true;\n\t\t}\n\n\t\t// Does the engine support downloads to browser?\n\t\tif ($postProcEngine->supportsDownloadToBrowser())\n\t\t{\n\t\t\t$actions['downloadToBrowser'] = max(1, $stat['multipart']);\n\t\t}\n\n\t\treturn $actions;\n\t}", "public function newAction($type, array $args = array(), $options = array())\n {\n $class = get_class($this);\n $actionClass = \\ActionKit\\RecordAction\\BaseRecordAction::createCRUDClass($class, $type);\n $options['record'] = $this;\n\n return new $actionClass($args, $options);\n }", "public function actionCreate()\n {\n return $this->formAction(null);\n }", "public function createAction()\n {\n }", "public function action(Action $action)\n {\n $this->action = $action;\n\n return $this;\n }", "public function findFormActionTypeById($id) {\n try\n {\n $doc =\n $this->_em->getRepository('WF\\Lib\\Core\\WFormActionType')\n ->findOneBy(array('id' => $id));\n return $doc;\n }\n catch(Exception $err)\n {\n return null;\n }\n }", "public function addAction(Action $action) {\n\t\tif (is_null($action))\n\t\t\tthrow new \\Exception(\"can't add a null action to an process definition\");\n\t\tif ($action->getName() == null)\n\t\t\tthrow new \\Exception(\"can't add an unnamed action to an process definition\");\n\t\t$this->actions->set($action->getName(), $action);\n\t\t$action->setProcessDefinition($this);\n\t\treturn $action;\n\t}", "public function createControllerById($id)\n {\n $pos = strrpos($id, '/');\n if ($pos === false) {\n $prefix = '';\n $className = $id;\n } else {\n $prefix = substr($id, 0, $pos + 1);\n $className = substr($id, $pos + 1);\n }\n\n \n // 匹配正则修改兼容controller LoginUser/testOne loginUser/testOne login-user/testOne\n if (!preg_match('%^[a-zA-Z][a-zA-Z0-9\\\\-_]*$%', $className)) {\n return null;\n }\n if ($prefix !== '' && !preg_match('%^[a-z0-9_/]+$%i', $prefix)) {\n return null;\n }\n \n // namespace和prefix保持一致,搜字母都大写或都小写,namespace app\\controllers\\SecurityKey; prefix=SecurityKey\n $className = str_replace(' ', '', ucwords(str_replace('-', ' ', $className))) . 'Controller';\n $className = ltrim($this->controllerNamespace . '\\\\' . str_replace('/', '\\\\', $prefix) . $className, '\\\\');\n if (strpos($className, '-') !== false || !class_exists($className)) {\n return null;\n }\n \n $isConsole = defined('CONSOLE') && CONSOLE == 1 && is_subclass_of($className, 'ysf\\console\\Controller');\n if (is_subclass_of($className, 'ysf\\base\\Controller') || $isConsole) {\n $controller = new $className($id);\n return get_class($controller) === $className ? $controller : null;\n }else{\n return null;\n }\n }", "public function actionId();", "public function handle_action($p_action_id)\n {\n $l_object = $this->get_action_instance($p_action_id);\n\n if (method_exists($l_object, \"handle\"))\n {\n return $l_object->handle();\n } // if\n }", "protected function getActionByID($action_id)\n\t{\n\t\tif ($action_id == null || $action_id == 0 || $action_id == \"\")\n\t\t\treturn null;\n\t\tif ($this->actions_array == null || !isset($this->actions_array[$action_id]))\n\t\t\treturn null;\n\t\tif (!isset($this->actions_array[$action_id]['action_id']))\t\t//verify valid action object\n\t\t\treturn null;\n\t\treturn $this->actions_array[$action_id];\n\t}", "private function loadExistAction(){\n\n $actionName = $this->_params['action'].'Action';\n if(method_exists($this->_controllerObject, $actionName)){\n $this->_controllerObject->$actionName();\n }else{\n $this->loadDefaultController();\n }\n }", "public function setAction($action)\n {\n // Argument 1 must be a string\n Argument::i()->test(1, 'string');\n\n $this->action = $action;\n\n return $this;\n }", "public function getActionConfig() : Config\\Action\n {\n $call = $this->io->ask(' <info>PHP class or shell command to execute?</info> ', '');\n $type = Util::getActionType($call);\n $options = $this->getActionOptions($type);\n\n return new Config\\Action($type, $call, $options);\n }", "public function getActionId()\n {\n return $this->action_id;\n }", "public function execute(ActionInterface $action, RequestInterface $request, int $alternativeCategoryId): ActionInterface;", "public function dispatch($id);", "protected function getV1InvoicesIdActionsRequest($id, $type = 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 getV1InvoicesIdActions'\n );\n }\n\n $resourcePath = '/v1/invoices/{id}/actions';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($type)) {\n $queryParams['type'] = $type;\n } else\n if ($type !== null) {\n $queryParams['type'] = ObjectSerializer::toQueryValue($type);\n }\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\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 }", "public function runAction($id, $params = [])\n {\n return $this->handleErrors(function() use ($id, $params) {\n return parent::runAction($id, $params);\n });\n }", "public static function is_task_actioned($id)\n {\n }", "public function createAction() {\n\n }", "public function __construct($action, $id = null) {\n\t\t\t$this->action = $action;\n\t\t\t$this->id = $id;\n\t\t\t$this->prefix = $this->setPrefix();\n\t\t\t$this->model = $this->createModel();\n\t\t\t$this->session = new session();\n\t\t\t$auth = new authentication();\n\t\t\t$this->user_ = $auth->isLogged();\n\t\t}", "public function setAction($name) {\n $this->_defaultAction = (string) $name;\n return $this;\n }", "public function set_action($value)\n\t{\n\t\t$action = $this->sql_get_action($value);\n\t\t$this->action_id = isset($action['id']) ? $action['id'] : $this->action_id;\n\t\treturn $this;\n\t}", "public function deleteAction($actionid) {\n\n}", "protected function selectAction()\n {\n $action = App::$request->getRoute()['action'] . 'Action';\n\n if (method_exists($this, $action)) {\n return $this->$action();\n } else {\n return $this->indexAction();\n }\n }", "public function __construct($id){\n\t\t$sql = new SqlManager();\n\t\t$action = $sql->get(\"action\", \"action_id\", $id);\n\t\tif($action['action_id'] != $id){\n\t\t\tthrow new Exception(\"Action '#{$id}' not found!\");\n\t\t}\n\t\t$this->id = $action['action_id'];\n\t\t$this->date = $action['action_date'];\n\t\t$this->ts = strtotime($action['action_date']);\n\t\t$this->name = $action['action_name'];\n\t\t$this->player = new Player($action['action_player']);\n\t\t$this->game = $action['action_game'];\n\t}", "public function destroy($id)\n\t{\n\t\t$action = \\App\\Action::query()\n\t\t\t->findOrFail($id);\n\n\t\t$this->authorize('delete', $action);\n\n\t\t$action->delete();\n\t}", "public function doAction() {\r\n $action = $this->action;\r\n return $this->controller->$action($this->queryName);\r\n }", "public function missingAction($actionID)\n\t{\n\t\tthrow new CHttpException(404,Yii::t('yii','The system is unable to find the requested action \"{action}\".',\n\t\t\tarray('{action}'=>$actionID==''?$this->defaultAction:$actionID)));\n\t}", "public function edit($id)\n\t{\n\t\t$action = \\App\\Action::query()\n\t\t\t->findOrFail($id);\n\n\t\t$this->authorize('read', $action);\n\n\t\t$parameters['name'] = $action->name;\n\n\t\treturn view($this->view, compact(\n\t\t\t'parameters',\n\t\t\t'action'\n\t\t));\n\t}", "public function action($action, $id)\n {\n if($action){\n $product = Product::find($id);\n switch ($action)\n {\n case 'delete':\n $this->deleteTrait($id, $product );\n break;\n case 'active':\n $product->status = $product->status ? 0 : 1;\n $product->save();\n break;\n case 'product_hot':\n $product->hot = $product->hot ? 0 : 1;\n $product->save();\n break;\n }\n\n }\n return redirect('admin/product');\n }" ]
[ "0.7387539", "0.655826", "0.6405865", "0.6398875", "0.61243343", "0.5998001", "0.5946743", "0.57611734", "0.57426625", "0.57359844", "0.5683264", "0.5632006", "0.5620513", "0.5577962", "0.5530373", "0.55303097", "0.54873717", "0.5418451", "0.5365727", "0.5334686", "0.5320931", "0.53177494", "0.53069353", "0.52966535", "0.52780277", "0.5271754", "0.5261507", "0.5257143", "0.52544206", "0.5205358", "0.5180851", "0.51624876", "0.51427364", "0.5141277", "0.51359564", "0.512586", "0.5119868", "0.5115555", "0.51022464", "0.5070788", "0.5049789", "0.5028302", "0.500946", "0.5006686", "0.5006686", "0.49813777", "0.49802652", "0.49649355", "0.49603504", "0.4960226", "0.49464622", "0.49438342", "0.4938179", "0.49323586", "0.4928593", "0.49162823", "0.49057686", "0.4890879", "0.4887029", "0.48839876", "0.487877", "0.4867591", "0.48597464", "0.4850731", "0.48403162", "0.48359296", "0.48221818", "0.48113513", "0.4787865", "0.4786058", "0.47676972", "0.4767318", "0.47655502", "0.47621438", "0.4755203", "0.47528094", "0.47422153", "0.4736718", "0.473441", "0.47318873", "0.47259745", "0.4722174", "0.47116262", "0.4700585", "0.46999392", "0.46939635", "0.46939588", "0.4686504", "0.46854603", "0.46815684", "0.4678097", "0.46645978", "0.46626064", "0.46516642", "0.46462125", "0.4631018", "0.462988", "0.4611009", "0.46106282", "0.4607089" ]
0.8377364
0
Finds the applicable layout file.
Находит соответствующий файл макета.
public function findLayoutFile() { $path = __DIR__ . '/../views/layouts/' . $this->layout . '.php'; if (!is_file($path)){ throw new \ErrorException('Layout does not exists: ' . $path); } return $path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findLayoutFile()\n\t{\n\t\tif (!$this->context instanceof Controller || $this->context->layout === false) {\n\t\t\treturn false;\n\t\t}\n\t\t$module = $this->context->module;\n\t\twhile ($module !== null && $module->layout === null) {\n\t\t\t$module = $module->module;\n\t\t}\n\t\tif ($module === null || $module->layout === null || $module->layout === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$view = $module->layout;\n\t\tif (($extension = FileHelper::getExtension($view)) === '') {\n\t\t\t$view .= '.php';\n\t\t}\n\t\tif (strncmp($view, '@', 1) === 0) {\n\t\t\t$file = \\Yii::getAlias($view);\n\t\t} elseif (strncmp($view, '/', 1) === 0) {\n\t\t\t$file = $this->findAbsoluteViewFile($view);\n\t\t} else {\n\t\t\tif ($this->themeView && ($theme = \\Yii::$application->getTheme()) !== null) {\n\t\t\t\t$paths[] = $theme->getLayoutPath($module);\n\t\t\t}\n\t\t\t$paths[] = $module->getLayoutPath();\n\t\t\t$file = false;\n\t\t\tforeach ($paths as $path) {\n\t\t\t\t$f = \\Yii::getAlias($path . '/' . $view);\n\t\t\t\tif ($f !== false && is_file($f)) {\n\t\t\t\t\t$file = $f;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($file === false || !is_file($file)) {\n\t\t\tthrow new InvalidCallException(\"Unable to find the layout file for layout '{$module->layout}' (specified by \" . get_class($module) . \")\");\n\t\t} elseif ($this->localizeView) {\n\t\t\treturn FileHelper::localize($file, $this->language, $this->sourceLanguage);\n\t\t} else {\n\t\t\treturn $file;\n\t\t}\n\t}", "private function loadLayout()\n {\n foreach (Helper::ensureArray($this->data['layout']) as $layout) {\n $layout_path = \"layouts/{$layout}.html\";\n\n if (File::disk('theme')->exists($layout_path)) {\n return File::disk('theme')->get($layout_path);\n }\n }\n\n // If there's no layout file available, we're not going to be getting very far. Let's\n // throw an exception here to kill the request. It doesn't make sense to continue.\n throw new FileNotFoundException(\"Layout [{$this->data['layout']}] doesn't exist.\");\n }", "private function searchLayoutAndView()\n\t{\n\t\tif ($this->layout) {\n\t\t\tif (file_exists(VIEWS.DS.'layouts'.DS.$this->layout.'.mtp')) {\n\t\t\t\t$this->layout_file = VIEWS.DS.'layouts'.DS.$this->layout.'.mtp';\n\t\t\t}\telse if (file_exists(MVIEWS.DS.'layouts'.DS.$this->layout.'.mtp')) {\n\t\t\t\t$this->layout_file = MVIEWS.DS.'layouts'.DS.$this->layout.'.mtp';\n\t\t\t} else {\n\t\t\t\ttrigger_error('The layout '.$this->layout.' does not exists');\n\t\t\t}\n\t\t}\n\n\t\tif ($this->view !== null) {\n\t\t\tif (file_exists(VIEWS.DS.$this->view.'.mtp')) {\n\t\t\t\t$this->view_file = VIEWS.DS.$this->view.'.mtp';\n\t\t\t}\telse if (file_exists(MVIEWS.DS.$this->view.'.mtp')) {\n\t\t\t\t$this->view_file = MVIEWS.DS.$this->view.'.mtp';\n\t\t\t} else {\n\t\t\t\ttrigger_error('The view '.$this->view.' does not exists');\n\t\t\t}\n\t\t}\n\t}", "protected function _findLayout($path)\n {\n if (is_string($path)) {\n $location = App::getInstance()->normalizePath(\"layouts\", $path, \".phtml\");\n if ($location !== false) {\n return $location;\n }\n throw new Exception_File(\"Could not find layout file located at layouts\" . DS . $path);\n }\n return false;\n }", "public function getLayout() {\n\n $entity = $this->php_self;\n $idItem = (int) Tools::getValue('id_' . $entity);\n\n $layoutDir = $this->getThemeDir();\n $layoutOverrideDir = $this->getOverrideThemeDir();\n\n $layout = false;\n\n if ($entity) {\n\n if ($idItem > 0 && file_exists($layoutOverrideDir . 'layout-' . $entity . '-' . $idItem . '.tpl')) {\n $layout = $layoutOverrideDir . 'layout-' . $entity . '-' . $idItem . '.tpl';\n } else\n\n if (file_exists($layoutOverrideDir . 'layout-' . $entity . '.tpl')) {\n $layout = $layoutOverrideDir . 'layout-' . $entity . '.tpl';\n }\n\n }\n\n if (!$layout && file_exists($layoutDir . 'layout.tpl')) {\n $layout = $layoutDir . 'layout.tpl';\n }\n\n return $layout;\n }", "public final function getLayout()\n {\n if($this->use_section_layout)\n {\n $parts = $this->module_sections;\n }\n $parts[] = $this->module;\n $parts[] = self::COMMON_TEMPLATE_DIR;\n \n $finded = true;\n\n do {\n if(empty($parts))\n {\n $finded = false;\n break;\n }\n\n $v = array_shift($parts);\n\n $layout_url = self::VIEW_DIR . DS .$v. DS . self::LAYOUT;\n } while(!is_file($this->getTemplatePath(). $layout_url . '.tpl'));\n\n\t\treturn $finded ? $layout_url : false;\n }", "function main_path_layout(){\n return base_path(MAIN_LAYOUTS_FILE_PATH) ;\n }", "protected function getLayoutFile()\n\t{\n\t\treturn BASE_PATH . '/app/views/' . $this->layout . '.php';\n\t}", "public static function getLayoutPath();", "public function getLayoutFile() {\n\t\treturn $this->app->getLayoutDir() . '/' . $this->layout . '.view.php';\n\t}", "protected function layoutRender()\n {\n $file = $this->path.$this->layoutFolder.DS.$this->layout.$this->ext;\n\n if (file_exists($file)) {\n return $this->view->render($file);\n } else {\n throw new FileNotFoundException($this->layout.$this->ext, $this->path.$this->layoutFolder);\n }\n }", "function _getLayoutFn() {\n\t\treturn VIEWS.\"layouts\".DS.\"{$this->layout}.thtml\";\n\t}", "public function getMainLayout()\n {\n if ($this->_mainLayout === null) {\n $module = $this->module;\n while ($module !== null && $module->layout === null) {\n $module = $module->module;\n }\n if ($module !== null && is_string($module->layout)) {\n $layout = $module->layout;\n }\n if (isset($layout)) {\n if (strncmp($layout, '@', 1) === 0) {\n $file = Yii::getAlias($layout);\n } elseif (strncmp($layout, '/', 1) === 0) {\n $file = Yii::$app->getLayoutPath() . DIRECTORY_SEPARATOR . substr($layout, 1);\n } else {\n $file = $module->getLayoutPath() . DIRECTORY_SEPARATOR . $layout;\n }\n } else {\n $file = Yii::getAlias('@app/views/layouts/main');\n }\n\n if (pathinfo($file, PATHINFO_EXTENSION) !== '') {\n return $this->_mainLayout = $file;\n }\n $view = Yii::$app->getView();\n $path = $file . '.' . $view->defaultExtension;\n if ($view->defaultExtension !== 'php' && !is_file($path)) {\n $path = $file . '.php';\n }\n return $this->_mainLayout = $path;\n }\n return $this->_mainLayout;\n }", "function getLayoutFile()\n\t{\n\t\treturn $this->layout_file;\n\t}", "function getAvailableLayouts()\n\t{\n\t\t$dir = opendir(\"./Modules/LearningModule/layouts/lm\");\n\n\t\t$layouts = array();\n\n\t\twhile($file = readdir($dir))\n\t\t{\n\t\t\tif ($file != \".\" && $file != \"..\" && $file != \"CVS\" && $file != \".svn\")\n\t\t\t{\n\t\t\t\t// directories\n\t\t\t\tif (@is_dir(\"./Modules/LearningModule/layouts/lm/\".$file))\n\t\t\t\t{\n\t\t\t\t\t$layouts[$file] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tasort($layouts);\n\t\t\n\t\t// workaround: fix ordering\n\t\t$ret = array(\n\t\t\t'toc2win' => 'toc2win',\n\t\t\t'toc2windyn' => 'toc2windyn',\n\t\t\t'1window' => '1window',\n\t\t\t'2window' => '2window',\n\t\t\t'3window' => '3window',\n\t\t\t'presentation' => 'presentation',\n\t\t\t'fullscreen' => 'fullscreen'\n\t\t\t);\n\t\t\n\t\tforeach ($layouts as $l)\n\t\t{\n\t\t\tif (!in_array($l, $ret))\n\t\t\t{\n\t\t\t\t$ret[$l] = $l;\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "private function defaultLayoutNotFound():void {\n $errorHandler = new ErrorHandler(ENVIROMENT);\n $errorHandler->showDevMessages(\"Problema al cargar el default Layout\",\n \"No se ha podido cargar el layout por defecto, probablemente no este con el nombre que se ha configurado o no exista.\",\n __ROOT__DIR__ . \"views/template/\" . $this->layout . '.php');\n }", "private function findViewFile() : string\n {\n $view = $this->getTemplate();\n if (strlen($view) <= PHP_MAXPATHLEN && is_file($view)) {\n return $view;\n }\n $ext = $this->extension !== '' ? '.' . ltrim($this->extension, '.') : '';\n foreach ($this->directories as $dir) {\n $file = $dir . DIRECTORY_SEPARATOR . $view . $ext;\n if (strlen($file) <= PHP_MAXPATHLEN && is_file($file)) {\n return $file;\n }\n }\n throw new \\LogicException(sprintf(static::ERR_VIEW_1, $view));\n }", "private function getDefaultLayout() {\n\n\t\t\t// Get the controller class currently in use\n\t\t\t$name = get_called_class();\n\t\t\t$class = new \\ReflectionClass($name);\n\n\t\t\t// Get its static properties\n\t\t\t$properties = $class->getStaticProperties();\n\n\t\t\t// Is layout in there?\n\t\t\tif (array_key_exists(\"layout\", $properties)) {\n\n\t\t\t\t// Use this\n\t\t\t\treturn $properties['layout'];\n\n\n\t\t\t} else {\n\n\t\t\t\t// Look for default layout in ChickenWire\n\t\t\t\t$layout = ChickenWire::get(\"defaultLayout\");\n\t\t\t\tif ($layout == null) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn $layout;\n\n\t\t\t}\n\n\t\t}", "static function get_html_layout_file_contents() {\n \t\n \t//$html_layout_file = 'email_templates/html_layout.html';\n \t$html_layout_file = 'email_templates/coupon_layout.html';\n\t\t\n \tif (file_exists($html_layout_file)) {\n\t\t $result = file_get_contents($html_layout_file);\t\n\t\t return $result;\n \t}\n \telse {\n \t\t//TODO: log severe error message that email template file $tpl_file not found\n \t\treturn null;\n \t}\n }", "function emarking_get_layout() {\n\t$uri = $_SERVER['REQUEST_URI'];\n\tif(!$uri) {\n\t\treturn 'standard';\n\t} elseif(core_text::strpos($uri, '/activities/') > 0) {\n\t\treturn 'embedded';\n\t} else {\n\t\treturn 'incourse';\n\t}\n}", "public function getLayoutFile() {\n return $this->layout_file;\n }", "public function getLayoutFile($layoutName)\n\t{\n\t\tif($layoutName===false)\n\t\treturn false;\n\t\tif(($theme=Gateway::app()->getTheme())!==null && ($layoutFile=$theme->getLayoutFile($this,$layoutName))!==false)\n\t\treturn $layoutFile;\n\n\t\tif(empty($layoutName))\n\t\t{\n\t\t\t$module=$this->getModule();\n\t\t\twhile($module!==null)\n\t\t\t{\n\t\t\t\tif($module->layout===false)\n\t\t\t\treturn false;\n\t\t\t\tif(!empty($module->layout))\n\t\t\t\tbreak;\n\t\t\t\t$module=$module->getParentModule();\n\t\t\t}\n\t\t\tif($module===null)\n\t\t\t$module=Gateway::app();\n\t\t\t$layoutName=$module->layout;\n\t\t}\n\t\telseif(($module=$this->getModule())===null)\n\t\t$module=Gateway::app();\n\n\t\treturn $this->resolveViewFile($layoutName,$module->getLayoutPath(),Gateway::app()->getViewPath(),$module->getViewPath());\n\t}", "public function getLayout($request = null) {\n\t\tif (is_null($request))\n\t\t\t$request = $this->application->request;\n\n\t\t$layout = strtolower($request->get('layout', $this->layout));\n\t\t$format = strtolower($request->get('format', $this->format));\n\n\t\t$files = [\n\t\t\t'layouts/' . $layout . '.' . $format . '.php',\n\t\t\t'layouts/default.' . $format . '.php'\n\t\t];\n\n\t\treturn self::getLocator()->locateFile($this->name, $files);\n\t}", "abstract protected function getLayout();", "public function getLayout($layout=null)\n {\n $themeLayoutConfig = $this->getThemeLayoutConfig();\n\n if (empty($layout)) {\n $layout = $this->siteManager->getCurrentSiteDefaultLayout();\n }\n\n if (!empty($themeLayoutConfig[$layout])\n && !empty($themeLayoutConfig[$layout]['file'])\n ) {\n return $themeLayoutConfig[$layout]['file'];\n\n } elseif (!empty($themeLayoutConfig['default'])\n && !empty($themeLayoutConfig['default']['file'])\n ) {\n return $themeLayoutConfig['default']['file'];\n } else {\n throw new RuntimeException('No Layouts Found in config');\n }\n }", "public function getDefaultLayout() {\n $file = PATH . PATH_LAYOUTS . MODULE_DEFAULT . \"/\" . ACTION_DEFAULT . \".php\";\n if (!is_file($file)) {\n return null;\n }\n return ACTION_DEFAULT;\n }", "protected function getLayoutPathAndFilename($layoutName = 'Default') {\n\t\tif ($this->layoutPathAndFilename !== NULL) {\n\t\t\treturn $this->layoutPathAndFilename;\n\t\t}\n\t\t$paths = $this->expandGenericPathPattern($this->layoutPathAndFilenamePattern, TRUE, TRUE);\n\t\t$layoutName = ucfirst($layoutName);\n\t\tforeach ($paths as &$layoutPathAndFilename) {\n\t\t\t$layoutPathAndFilename = str_replace('@layout', $layoutName, $layoutPathAndFilename);\n\t\t\tif (file_exists($layoutPathAndFilename)) {\n\t\t\t\treturn $layoutPathAndFilename;\n\t\t\t}\n\t\t}\n\t\tthrow new \\TYPO3\\Base\\View\\Exception\\InvalidTemplateResourceException('The template files \"' . implode('\", \"', $paths) . '\" could not be loaded.', 1225709595);\n\t}", "public function getLayoutTemplate(): ?string;", "public function getLayoutFile($layoutName)\n\t{\n\t\t$module = \\Site::model()->getSiteModule();\n\t\t\n\t\treturn $module->moduleManager->path() . 'views/site/layouts/' . $layoutName . '.php';\n\t}", "public static function getLayoutsSupported()\n\t{\n\t\t$list = scandir(PATH_LAYOUTMANAGERS);\n\t\t$layoutManagers = null;\n\n\t\tforeach ($list as $el)\n\t\t{\n\t\t\tif(is_file(PATH_LAYOUTMANAGERS.$el))\n\t\t\t\t$layoutManagers[] = explode(\".\", $el)[0];\n\t\t}\n\n\t\treturn $layoutManagers;\n\t}", "public function getLayoutFile()\n {\n $meidaUrl = $this->_storeManager->getStore()->getBaseUrl(\n \\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA\n );\n return $meidaUrl . 'cleversoft/web/css/_config/layout_' . $this->_storeManager->getStore()->getCode() . '.css';\n }", "public function getLayout()\n {\n return $this->path.$this->layout;\n }", "public function formatLayoutTemplateFiles()\r\n {\r\n $name = $this->getName();\r\n $presenter = substr($name, strrpos(':' . $name, ':'));\r\n $className = trim(str_replace($presenter . 'Presenter', '', get_class($this)), '\\\\');\r\n $exploded = explode('\\\\', $className);\r\n $moduleName = str_replace('Module', '', end($exploded));\r\n $layout = $this->layout ? $this->layout : 'layout';\r\n $dir = dirname($this->getReflection()->getFileName());\r\n $dir = is_dir(\"$dir/templates\") ? $dir : dirname($dir);\r\n $list = array(\r\n \"$dir/templates/$moduleName/$presenter/@$layout.latte\",\r\n \"$dir/templates/$moduleName/$presenter.@$layout.latte\",\r\n );\r\n do {\r\n $list[] = \"$dir/templates/@$layout.latte\";\r\n $dir = dirname($dir);\r\n } while ($dir && ($name = substr($name, 0, strrpos($name, ':'))));\r\n\r\n $list[] = realpath(__DIR__ . \"/..\") . '/' . $this->getNamespace() . \"Module/templates/@$layout.latte\";\r\n\r\n\r\n if ($found = $this->base->findTemplate($layout)) {\r\n $list[] = $found->getPath();\r\n }\r\n\r\n return $list;\r\n }", "protected function getLayoutTemplate() : string\n {\n return static::TEMPLATE_LAYOUT_SOURCE;\n }", "public function first_package_path()\n\t{\n\t\treset($this->_ci_view_paths);\n\t\treturn key($this->_ci_view_paths);\n\t}", "public function layoutPath()\n {\n return $this->layout;\n }", "private function checkLayout($nameLayout) {\n if (empty($nameLayout)) {\n return self::getDefaultLayout();\n }\n \n $file = PATH . PATH_LAYOUTS . $this->module . \"/\" . $nameLayout . '.php';\n \n if (!is_file($file)) {\n return self::getDefaultLayout();\n }\n \n return $nameLayout;\n \n }", "public function getLayout( $category , $file ){\n if( View::exists( $category . '/' . $file ) ){\n\n return View::make( $category . '/' . $file );\n\n }\n\n return Response::make( array( 'result' => 0 , 'error' => 'Invalid Layout File' , 'code' => 'invalid-layout-file' ) , 404 );\n \n }", "protected function find($template)\r\n {\r\n $parts = explode('/', $template);\r\n $dir = (count($fragments) > 1) ? array_shift($fragments) : 'global';\r\n $file = array_shift($fragments);\r\n $path = APP_PATH . 'view' . DS . $dir . $file . DS . '.' . TPL_SUFFIX;\r\n\r\n if (!file_exists($path)) {\r\n throw new InvalidArgumentException(\"No template found at $path.\");\r\n }\r\n\r\n return $path;\r\n }", "private static function find_time_layout($dom, $layout)\n\t{\n\t\t$nodes = $dom->getElementsByTagName('time-layout');\n\t\tforeach( $nodes as $node )\n\t\t{\n\t\t\t$val = $node->getElementsByTagName('layout-key')->item(0)->textContent;\n\t\t\tif( $val == $layout )\n\t\t\t\treturn $node;\n\t\t}\n\t}", "protected function _loadLayout()\n\t\t{\n\t\t\t$xmlFile = $this->getPath().$this->_file;\n\n\t\t\tif (!file_exists($xmlFile))\n\t\t\t\treturn;\n\n\t\t\t$context_router = \\Z::getRequest()->getParam('router');\n\t\t\t$context_router_controller = \\Z::getRequest()->getParam('router').'_'.\\Z::getRequest()->getParam('controller');\n\t\t\t$context_router_controller_action = \\Z::getRequest()->getParam('router').'_'.\\Z::getRequest()->getParam('controller').'_'.\\Z::getRequest()->getParam('action');\n\n\t\t\t/*$hash = md5(\\Z::getConfig('config/global/default/package').'/'.\\Z::getConfig('config/global/default/layout') . $this->_file . $custom_context);\n\t\t\t$cacheXml = 'var/cache/serialized/xml_'.md5($hash).'.ser';\n\t\t\tif (file_exists($cacheXml) && \\Z::getConfig('config/global/default/developer/mode') == TRUE)\n\t\t\t{\n\t\t\t\t$this->_blocks = unserialize(file_get_contents($cacheXml));\n\t\t\t}\n\t\t\telse\n\t\t\t{*/\n\t\t\t\t$xml = new \\SimpleXMLElement($xmlFile, NULL, TRUE);\n\t\t\t\t// make sure the xml layout file exists and is valid\n\t\t\t\tif (!$xml)\n\t\t\t\t\tthrow new \\Sys\\Exception('Current layout => %s file does not exist or is not a valid xml',\n\t\t\t\t\t\t$this->getPath().$this->_file);\n\n\t\t\t\t// get the version number and store it as a float\n\t\t\t\t// this way we can do version requirement checks in the future\n\t\t\t\t$this->_version = (float)$xml['version'];\n\t\t\t\t// first we read the \"default\" block in the xml which holds the settings\n\t\t\t\t// for all the actions of this page\n\n\t\t\t\tif (isset($xml->default))\n\t\t\t\t\t$this->_processSection($xml->default);\n\t\t\t\t// apply the different possible contexts\n\t\t\t\tif (isset($xml->$context_router))\n\t\t\t\t\t$this->_processSection($xml->$context_router);\n\t\t\t\tif (isset($xml->$context_router_controller))\n\t\t\t\t\t$this->_processSection($xml->$context_router_controller);\n\t\t\t\tif (isset($xml->$context_router_controller_action))\n\t\t\t\t\t$this->_processSection($xml->$context_router_controller_action);\n\n\t\t\t\t// cache everything...\n\t\t\t/*\tfile_put_contents($cacheXml, serialize($this->_blocks));\n\t\t\t}*/\n\t\t}", "protected function _getLayoutFileName(?string $name = null): string\n {\n if ($name === null) {\n if (empty($this->layout)) {\n throw new CakeException(\n 'View::$layout must be a non-empty string.' .\n 'To disable layout rendering use method `View::disableAutoLayout()` instead.'\n );\n }\n $name = $this->layout;\n }\n [$plugin, $name] = $this->pluginSplit($name);\n $name .= $this->_ext;\n\n foreach ($this->getLayoutPaths($plugin) as $path) {\n if (is_file($path . $name)) {\n return $this->_checkFilePath($path . $name, $path);\n }\n }\n\n $paths = iterator_to_array($this->getLayoutPaths($plugin));\n throw new MissingLayoutException($name, $paths);\n }", "function get_weluka_theme_layout( $name ) {\n\tglobal $welukaThemeOptions;\n\t\n\t$ret = $welukaThemeOptions[$name];\n\tif( ! $ret ) {\n\t\tif( $name === WelukaThemeOptions::HOME_LAYOUT ) {\n\t\t\t$ret = WelukaThemeOptions::LAYOUT_ONE_COL;\n\t\t} elseif( $name === WelukaThemeOptions::ARCHIVE_LAYOUT ) {\t//v1.0.6\n\t\t\t$ret = get_weluka_theme_layout( WelukaThemeOptions::COMMON_LAYOUT );\n\t\t} elseif( $name === WelukaThemeOptions::PAGE_LAYOUT ) {\t//v1.0.6\n\t\t\t$ret = get_weluka_theme_layout( WelukaThemeOptions::COMMON_LAYOUT );\n\t\t} elseif( $name === WelukaThemeOptions::POST_LAYOUT ) {\t//v1.0.6\n\t\t\t$ret = get_weluka_theme_layout( WelukaThemeOptions::COMMON_LAYOUT );\n\t\t} else {\n\t\t\t$ret = WelukaThemeOptions::LAYOUT_TWO_COL_LEFT;\n\t\t}\n\t}\n\treturn $ret;\n}", "public function getLayoutFile()\n {\n return $this->_generatedCssFolder . 'layout_' . Mage::app()->getStore()->getCode() . '.css';\n }", "public function findFile($path)\n\t{\n\t $template = KFactory::get('lib.joomla.application')->getTemplate();\n $override = JPATH_THEMES.'/'.$template.'/html';\n\t $override .= str_replace(array(JPATH_BASE.'/modules'), '', $path);\n\t \n\t //Try to load the template override\n\t $result = parent::findFile($override);\n\t \n\t if($result === false) \n\t {\n\t //If the path doesn't contain the /tmpl/ folder add it\n\t if(strpos($path, '/tmpl/') === false) {\n\t $path = dirname($path).'/tmpl/'.basename($path);\n\t }\n\t \n\t $result = parent::findFile($path);\n\t } \n\t \n\t return $result;\n\t}", "public function getLayout();", "public function getLayoutId() {\n\t\t\t$this->load->model ( 'catalog/product' );\n\t\t\t$this->load->model ( 'catalog/category' );\n\t\t\t$this->load->model ( 'catalog/information' );\n\t\t\t$this->load->model ( 'design/layout' );\n\t\t\t\n\t\t\tif (! $this->layout_id) {\n\t\t\t\tif (isset ( $this->request->get ['route'] )) {\n\t\t\t\t\t$route = ( string ) $this->request->get ['route'];\n\t\t\t\t\t$this->pageClass = 'page-' . str_replace ( \"/\", \"-\", $route );\n\t\t\t\t} else {\n\t\t\t\t\t$route = 'common/home';\n\t\t\t\t\t$this->pageClass = 'page-home';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$layout_id = 0;\n\t\t\t\t\n\t\t\t\tif ($route == 'product/category' && isset ( $this->request->get ['path'] )) {\n\t\t\t\t\t$path = explode ( '_', ( string ) $this->request->get ['path'] );\n\t\t\t\t\t\n\t\t\t\t\t$layout_id = $this->model_catalog_category->getCategoryLayoutId ( end ( $path ) );\n\t\t\t\t\t$this->pageClass = 'page-category';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($route == 'product/product' && isset ( $this->request->get ['product_id'] )) {\n\t\t\t\t\t$layout_id = $this->model_catalog_product->getProductLayoutId ( $this->request->get ['product_id'] );\n\t\t\t\t\t$this->pageClass = 'page-product';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($route == 'information/information' && isset ( $this->request->get ['information_id'] )) {\n\t\t\t\t\t$layout_id = $this->model_catalog_information->getInformationLayoutId ( $this->request->get ['information_id'] );\n\t\t\t\t\t$this->pageClass = 'page-information';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! $layout_id) {\n\t\t\t\t\t$layout_id = $this->model_design_layout->getLayout ( $route );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! $layout_id) {\n\t\t\t\t\t$layout_id = $this->config->get ( 'config_layout_id' );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->layout_id = $layout_id;\n\t\t\t}\n\t\t\treturn $this->layout_id;\n\t\t}", "public function find($name)\n {\n if (isset($this->views[$name])) {\n return $this->views[$name];\n }\n\n if ($this->hasHintInformation($name = trim($name))) {\n return $this->views[$name] = $this->findNamespacedView($name);\n }\n\n return $this->views[$name] = $this->findInPaths($name, $this->paths);\n }", "private function layout_exists($layout){\n /* Listing the directories under the /layout dir */\n $layout_path = join(DIRECTORY_SEPARATOR, array(BASEPATH, 'layouts'));\n $layout_list = array_diff(scandir($layout_path), array('.', '..'));\n return in_array($layout, $layout_list);\n }", "public static function get_default_layout()\n {\n $setting = Settings::instance()->get('default_page_layout');\n $layout = ORM::factory('Engine_Layout')->where('id', '=', $setting)->find_published();\n $template_folder_path = isset(Kohana::$config->load('config')->template_folder_path)\n ? Kohana::$config->load('config')->template_folder_path\n : Settings::instance()->get('template_folder_path');\n\n // If none, get the template's content layout\n if (!$layout->id) {\n $template = ORM::factory('Engine_template')->where('stub', '=', $template_folder_path)->find_undeleted();\n\n $layout = ORM::factory('Engine_Layout')->where('template_id', '=', $template->id)->where('layout', '=', 'content')->find_published();\n\n // If the selected template does not have a content layout, use the generic content layout\n if (!$layout->id) {\n $layout = ORM::factory('Engine_Layout')->where('template_id', 'is', null)->where('layout', '=', 'content')->find_published();\n }\n }\n return $layout;\n }", "function wolf_discography_locate_template( $template_name, $template_path = '', $default_path = '' ) {\n\n\tif ( ! $template_path ) $template_path = WD()->template_url;\n\tif ( ! $default_path ) $default_path = WD()->plugin_path() . '/templates/';\n\n\t// Look within passed path within the theme - this is priority\n\t$template = locate_template(\n\t\tarray(\n\t\t\ttrailingslashit( $template_path ) . $template_name,\n\t\t\t$template_name\n\t\t)\n\t);\n\n\t// Get default template\n\tif ( ! $template )\n\t\t$template = $default_path . $template_name;\n\n\t// Return what we found\n\treturn apply_filters( 'wolf_discography_locate_template', $template, $template_name, $template_path );\n}", "protected function findTemplate($name)\n {\n $finder = App::make('view')->getFinder();\n\n if (isset($this->cache[$name])) {\n return $this->cache[$name];\n }\n\n if (File::isFile($name)) {\n return $this->cache[$name] = $name;\n }\n\n $view = $name;\n if (File::extension($view) == $this->extension) {\n $view = substr($view, 0, -strlen($this->extension));\n }\n\n $path = $finder->find($view);\n\n return $this->cache[$name] = $path;\n }", "public function file(): ?string\n {\n if ($this->hasDefaultType() === true) {\n try {\n // Try the default template in the default template directory.\n return F::realpath($this->getFilename(), $this->root());\n } catch (Exception $e) {\n // ignore errors, continue searching\n }\n // Look for the default template provided by an extension.\n $path = Kirby::instance()->extension($this->store(), $this->name());\n if ($path !== null) {\n return $path;\n }\n }\n\n $name = $this->name() . '.' . $this->type();\n\n try {\n // Try the template with type extension in the default template directory.\n return F::realpath($this->getFilename($name), $this->root());\n } catch (Exception $e) {\n // Look for the template with type extension provided by an extension.\n // This might be null if the template does not exist.\n return Kirby::instance()->extension($this->store(), $name);\n }\n }", "function layout($layout = 'default', $data = 'view', $module = 'home', $page_title = '') {\n foreach (glob(LAYOUTS . \"/$layout/i.*.php\") as $item) {\n require_once $item;\n }\n\n require_once LAYOUTS . \"/$layout/header.php\";\n\trequire_once DATA . \"/\" . $module . \"/$data.php\";\n require_once LAYOUTS . \"/$layout/footer.php\";\n}", "function renderLayout(){\n readfile('./layout.html');\n }", "protected function findShortcodeTemplate()\n {\n // Check template path in shortcode's mapping settings\n if (!empty($this->settings['html_template']) && is_file($this->settings('html_template'))) {\n return $this->setTemplate($this->settings['html_template']);\n }\n // Check template in theme directory\n $user_template = vc_manager()->getShortcodesTemplateDir($this->getFilename() . '.php');\n if (is_file($user_template)) {\n return $this->setTemplate($user_template);\n }\n // Check default place\n $default_dir = DHVC_FORM_TEMPLATE_DIR;\n if (is_file($default_dir . $this->getFilename() . '.php')) {\n return $this->setTemplate($default_dir . $this->getFilename() . '.php');\n }\n }", "private function resolveTemplate()\n\t{\t\t\t\n\t\t$templatePath = Helpers::JoinPaths([Config::$templatesFolder, $this->name . '.php']);\n\t\t\n\t\tif(!file_exists($templatePath))\n\t\t{\n\t\t\t# default template to config value\t\t\t\n\t\t\t$templatePath = Helpers::JoinPaths([Config::$templatesFolder, Config::$defaultTemplate]);\n\t\t}\n\n\t\treturn $templatePath;\t\t\n\t}", "public function getLayoutPath($key)\r\n {\r\n $email = $this->loadEmail($key);\r\n if (!isset($email['layout'])){\r\n $this->_emails[$key]['layout'] = null;\r\n $this->throwMissingEvent($key, $this->_emails[$key]);\r\n } elseif (!empty($email['layout'])) {\r\n $file = FileHelper::alias2path(static::$folderTemplate . '/layouts') .$key;\r\n if ( is_file( $file ))\r\n return static::$folderTemplate . '/layouts/' . $key;\r\n }\r\n return null;\r\n }", "public static function getEmailLayoutPath();", "private function checkLayoutPersonalite($nameLayout, $module) {\n if (empty($nameLayout) || empty($module)) {\n $this->module = MODULE_DEFAULT;\n return self::getDefaultLayout();\n }\n \n $file = PATH . PATH_LAYOUTS . $module . \"/\" . $nameLayout . '.php';\n \n if (!is_file($file)) {\n return self::getDefaultLayout();\n }\n //$this->module = $module;\n return $nameLayout;\n \n }", "public function getLayouts()\n {\n if (!config('laravel-cm.multi_layout')) {\n return [];\n }\n $files = File::directories(resource_path(config('laravel-cm.layout_path')));\n if (empty($files)) {\n throw new NoLayoutsException(resource_path(config('laravel-cm.layout_path')));\n }\n $layouts = [];\n foreach ($files as $layout) {\n $layouts[] = basename($layout);\n }\n return $layouts;\n }", "function load_layout()\r\n {\r\n\t\t$templet = Layout::instance();\r\n\t}", "public function getLayouts()\n {\n $views = $this->getViews();\n\n $layouts = array();\n foreach ($views as $def) {\n $view = !empty($def['view']) ? $def['view'] : $def['type'];\n $layouts[$def['name']] = array(\n 'name' => $def['name'],\n 'action' => \"module=ModuleBuilder&action=editLayout&view={$view}&view_module={$this->module}\",\n 'imageTitle' => $def['image'],\n 'help' => \"viewBtn{$def['type']}\",\n 'size' => '48',\n );\n }\n\n //For popup tree node\n $popups = array();\n $popups[] = array(\n 'name' => translate('LBL_POPUPLISTVIEW'),\n 'type' => 'popuplistview',\n 'action' => 'module=ModuleBuilder&action=editLayout&view=selection-list&view_module=' . $this->module,\n );\n $popups[] = array(\n 'name' => translate('LBL_POPUPSEARCH'),\n 'type' => 'popupsearch',\n 'action' => 'module=ModuleBuilder&action=editLayout&view=popupsearch&view_module=' . $this->module,\n );\n $layouts[translate('LBL_POPUP')] = array(\n 'name' => translate('LBL_POPUP'),\n 'type' => 'Folder',\n 'children' => $popups,\n 'imageTitle' => 'Popup',\n 'action' => 'module=ModuleBuilder&action=wizard&view=popup&view_module=' . $this->module,\n );\n\n $nodes = $this->getSearch();\n if (!empty($nodes)) {\n $layouts[translate('LBL_SEARCH')] = array(\n 'name' => translate('LBL_SEARCH'),\n 'type' => 'Folder',\n 'children' => $nodes,\n 'action' => \"module=ModuleBuilder&action=wizard&view=search&view_module={$this->module}\",\n 'imageTitle' => 'BasicSearch',\n 'help' => 'searchBtn',\n 'size' => '48',\n );\n }\n\n return $layouts ;\n\n }", "function getEditedLayoutFile()\n\t{\n\t\treturn $this->edited_layout_file;\n\t}", "public function findFile($file, $type = 'partial')\n {\n if ($type == 'partial') {\n $folder = $this->partialFolder;\n } elseif ($type == 'layout') {\n $folder = $this->layoutFolder;\n } else {\n $folder = $type;\n }\n\n $file = $file.$this->ext;\n\n if (file_exists($this->path.$folder.DS.$file)) {\n return $this->path.$folder.DS.$file;\n }\n\n return false;\n }", "protected function _find_view($view)\n {\n //edit view string : example view1.view2....\n $view = str_replace('.','/',$view);\n // Default location\n $full_path = APPPATH . 'views/' . $view . $this->blade_ext;\n\n // Modular Separation / Modular Extensions has been detected\n if (method_exists($this->router, 'fetch_module'))\n {\n $module = $this->router->fetch_module();\n list($path, $_view) = Modules::find($view . $this->blade_ext, $module, 'views/');\n\n if ($path)\n {\n $full_path = $path . $_view;\n }\n }\n\n // File not found\n if ( ! is_file($full_path))\n {\n show_error('[Blade] Unable to find view: ' . $view);\n }\n\n return $full_path;\n }", "function load_layout($layout, $data = array()) {\n \t\n\tif(is_array($data)) {\t\n \t\textract($data);\n\t}\n\t\n\t$template_file = APP_PATH . '/layout/' . $layout . '.php';\n\t\n\tif(file_exists($template_file)) {\n \t\trequire_once $template_file;\n\t}else{\n\t\trequire_once APP_PATH .'/layout/layout-error.php';\n\t}\n\t\n }", "public function getFullPath()\n {\n $key = 'template.templatePath';\n\n if ($this->type === self::PART_BODY) {\n $key = 'template.viewPath';\n }\n\n $path = Configuration::get($key, null);\n if ($path === null) { // @codeCoverageIgnore\n throw new ConfigurationException(\"The template.templatePath or template.viewPath isn't configured right or doesn't exists!\"); // @codeCoverageIgnore\n } // @codeCoverageIgnore\n\n $foundView = false;\n try {\n AppManager::getInstance()->initApps();\n } catch (\\Exception $exception) {}\n foreach (AppManager::getInstance()->getApps() as $app) {\n $testPath = $app->getAppDirectory() . DS . $path . DS . $this->getPath();\n\n if (is_file($testPath)) {\n $path = $testPath;\n $foundView = true;\n }\n }\n\n if (! $foundView) {\n throw new NotFoundException('Template or view file not found in any apps!');\n }\n\n return $path;\n }", "function exponent_template_getViewFile($type=\"\", $name=\"\", $view=\"Default\") {\n\t$viewfilepath = exponent_core_resolveFilePaths($type, $name, \"tpl\", $view);\n\n\t// Something is really screwed up.\n\tif ($viewfilepath == false) {\n\t\t// Fall back to something that won't error.\n\t\treturn BASE . 'views/viewnotfound.tpl';\n\t}\n\t//return first match\n\treturn array_shift($viewfilepath);\t\n}", "protected function getLayoutPaths()\n {\n return JPATH_PLUGINS . '/system/nrframework/layouts/';\n }", "protected function getLayoutSource($layoutName = 'Default'){\n\t\t;\n\t}", "public function getTemplate()\n {\n if(is_null($this->template)) {\n return null;\n }\n\n $section = $this->config->get('handle_layout_section');\n\n $template = explode(ViewFinderInterface::HINT_PATH_DELIMITER, $this->template);\n\n if (count($template) == 2) {\n $template = \"{$template[0]}_$section::{$template[1]}\";\n } else {\n $template = \"$section::{$template[0]}\";\n }\n \n return $template;\n }", "private function getLayoutPath($layout) {\n return APP_PATH . View::VIEW_FOLDER . DS . View::LAYOUT_FOLDER . DS . $layout . '.php';\n ;\n }", "protected function getLayout()\n {\n if ($this->errorLayoutShouldBeUsed()) {\n return 'error';\n }\n\n return $this->data->layout();\n }", "function get_template_file($s)\n{\n if (is_mobile2()) {\n\n $_cg = 'mobile/' . $GLOBALS['__platform__'];\n $_fg = 'mobile/all';\n\n if (preg_match('~^([a-zA-Z]+)\\_(tablet|10|series40|series60)$~', $GLOBALS['__platform__'], $match)) {\n if (!file_exists(THEME_DIR . \"/{$_cg}/\" . $s)) {\n $_cg = 'mobile/' . $match[0][1];\n }\n }\n } else {\n $_cg = $_fg = 'web';\n }\n\n if (file_exists(THEME_DIR . \"/{$_cg}/_overrides_/\" . $s)) {\n return \"{$_cg}/_overrides_/\" . $s;\n } elseif (file_exists(THEME_DIR . \"/{$_cg}/\" . $s)) {\n return \"{$_cg}/\" . $s;\n } elseif (file_exists(THEME_DIR . \"/{$_fg}/_overrides_/\" . $s)) {\n return \"{$_fg}/_overrides_/\" . $s;\n } elseif (file_exists(THEME_DIR . \"/{$_fg}/\" . $s)) {\n return \"{$_fg}/\" . $s;\n } elseif (file_exists(THEME_DIR . \"/web/_overrides_/\" . $s)) {\n return \"web/_overrides_/\" . $s;\n } else {\n return \"web/\" . $s;\n }\n\n return false;\n}", "public function layout(): string\n {\n return config('kontour.layout', 'kontour::layouts.master');\n }", "protected function LoadLayoutTemplate($layoutTemplate)\n {\n if (null === $pagedefType = $this->inputFilterUtil->getFilteredInput('_pagedefType')) {\n $pagedefType = 'Core';\n }\n $path = TGlobal::_GetLayoutRootPath($pagedefType);\n $pagedefPath = $path.'/'.$layoutTemplate.'.layout.php';\n if (!file_exists($pagedefPath)) {\n $path = TGlobal::_GetLayoutRootPath('Core');\n $pagedefPath = $path.'/'.$layoutTemplate.'.layout.php';\n }\n\n return $pagedefPath;\n }", "public function get_layout() {\n\t \t\t\treturn $this->layout;\n\t \t\t}", "public function getLayoutPath()\n {\n if ($this->_layoutPath === null) {\n $this->_layoutPath = $this->getViewPath() . DIRECTORY_SEPARATOR . 'layouts';\n }\n\n return $this->_layoutPath;\n }", "public function getLayoutViewPath($sLayoutName);", "function getTemplateLocation() ;", "public function index_layout()\n {\n// return $index->fetch();\n return $this->fetch('index_layout');\n\n }", "function getLayoutPath()\n\t{\n\t\treturn $this->layout_path;\n\t}", "function atk14_find_file($file){\n\tpreg_match('/^(.*\\.)(inc|php)$/',$file,$matches);\n\t$fs = array();\n\t$fs[] = $file;\n\t$fs[] = $matches[1].\"inc\";\n\t$fs[] = $matches[1].\"php\";\n\tforeach($fs as $file){\n\t\tif(file_exists($file)){ return $file; }\n\t}\n}", "public function findFileByComponentName($componentName)\n {\n $filename = str_replace('a17-block-', '', $componentName) . '.blade.php';\n $paths = $this->paths->pluck('path')->filter(function ($path) {\n return $this->fileSystem->exists($path);\n })->toArray();\n\n $files = iterator_to_array(\\Symfony\\Component\\Finder\\Finder::create()->name($filename)->in($paths), false);\n\n if (empty($files)) {\n throw new Exception(\"Could not find a view for the block or repeater '{$componentName}'.\");\n }\n\n return $files[0];\n }", "public function getLayoutsPath()\n {\n return $this->getPath() . \"/layouts\";\n }", "public function findTemplate($template)\n {\n return $this->findPath($template.'.php');\n }", "protected function locateModmanFile()\n {\n if (!$this->useModman) {\n return '';\n }\n\n $modmanFile = $this->extensionDir . DIRECTORY_SEPARATOR . 'modman';\n if (file_exists($modmanFile)) {\n return $modmanFile;\n }\n\n $pattern = $this->extensionDir . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . 'modman';\n foreach (glob($pattern) as $modmanFile) {\n return $modmanFile;\n }\n\n return '';\n }", "public function getTemplate() {\n return \"./private/templates/grid_layout.php\";\n }", "protected function loadLayouts()\n {\n foreach (Layout::listInTheme($this->page->theme) as $layout) {\n if ($layout->default) {\n $this->defaultLayout = $layout->getBaseFileName();\n }\n $this->layouts[ $layout->getBaseFileName() ] = $layout;\n }\n }", "protected function getThemeLayoutConfig()\n {\n $theme = $this->siteManager->getCurrentSiteTheme();\n\n $rcmThemesConfig = $this->getThemesConfig();\n\n if (!empty($rcmThemesConfig[$theme])\n && !empty($rcmThemesConfig[$theme]['layouts'])\n ) {\n return $rcmThemesConfig[$theme]['layouts'];\n } elseif (!empty($rcmThemesConfig['generic'])\n && !empty($rcmThemesConfig['generic']['layouts'])\n ) {\n return $rcmThemesConfig['generic']['layouts'];\n }\n\n throw new RuntimeException(\n 'No theme config found for site and no default theme found'\n );\n }", "function wps_display_layout_info(\n\tstring $layout_name,\n\tstring $filename\n\t) {\n\n\tglobal $theme_environment;\n\n\tif ( ! empty( $filename ) && is_string( $filename ) && ! empty( $layout_name ) && is_string( $layout_name ) ) {\n\n\t\tif ( 'dev' === $theme_environment ) {\n\n\t\t\techo '\n\t\t\t<section class=\"container py-4\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col shadow pt-3\">\n\t\t\t\t\t\t<h2>Layout Name:</h2>\n\t\t\t\t\t\t<p class=\"lead text-primary\">' . esc_html( $layout_name ) . '</p>\n\t\t\t\t\t\t<h3>File Path:</h3>\n\t\t\t\t\t\t<p class=\"lead text-primary text-break\">' . wps_get_file_uri( $filename ) . '</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</section>';\n\t\t}\n\t}\n}", "function pxlz_edgtf_get_search_page_layout() {\n global $wp_query;\n $path = apply_filters('pxlz_edgtf_search_page_path', 'templates/page');\n $type = apply_filters('pxlz_edgtf_search_page_layout', 'default');\n $module = apply_filters('pxlz_edgtf_search_page_module', 'search');\n $plugin = apply_filters('pxlz_edgtf_search_page_plugin_override', false);\n\n if (get_query_var('paged')) {\n $paged = get_query_var('paged');\n } elseif (get_query_var('page')) {\n $paged = get_query_var('page');\n } else {\n $paged = 1;\n }\n\n $params = array(\n 'type' => $type,\n 'query' => $wp_query,\n 'paged' => $paged,\n 'max_num_pages' => pxlz_edgtf_get_max_number_of_pages(),\n );\n\n $params = apply_filters('pxlz_edgtf_search_page_params', $params);\n\n pxlz_edgtf_get_module_template_part($path . '/' . $type, $module, '', $params, $plugin);\n }", "protected static function locateTemplate($possibilities, $default = '')\n {\n \t\n \tif (CMA_Settings::getOption(CMA_Settings::OPTION_SUPPORT_THEME_DIR)) {\n\t /*\n\t * check if the theme has an override for the template\n\t */\n\t $theme_overrides = array();\n\t foreach($possibilities as $p)\n\t {\n\t $theme_overrides[] = 'CMA/' . $p . '.phtml';\n\t }\n\t if( $found = locate_template($theme_overrides, FALSE) )\n\t {\n\t return $found;\n\t }\n \t}\n\n /*\n * check for it in the public directory\n */\n foreach($possibilities as $p)\n {\n if( file_exists(CMA_PATH . '/views/frontend/' . $p . '.phtml') )\n {\n return CMA_PATH . '/views/frontend/' . $p . '.phtml';\n }\n }\n\n /*\n * we don't have it\n */\n return $default;\n }", "public function prepareLayout($name){\n\t\t$path = $this->path.'/layouts/'.$name.'.lay.php';\n\t\tif(file_exists($path)){\n\t\t\t$this->layouts[] = $name;\n\t\t}\t\n\t}", "function da_locate_template( $template_name, $template_path = '', $default_path = '' ) {\n\tif ( ! $template_path )\n\t\t$template_path = TEMPLATEPATH . '/';\n\n\tif ( ! $default_path )\n\t\t$default_path = DOWNLOAD_ATTACHMENTS_PATH . 'templates/';\n\n\t// look within passed path within the theme - this is priority\n\t$template = locate_template( array(\n\t\ttrailingslashit( $template_path ) . $template_name,\n\t\t$template_name\n\t) );\n\n\t// get default template\n\tif ( ! $template )\n\t\t$template = $default_path . $template_name;\n\n\t// return what we found\n\treturn apply_filters( 'da_locate_template', $template, $template_name, $template_path );\n}", "public function getTemplate()\n {\n return 'layouttype/' . strtolower($this->getName()) . \".tpl\";\n }", "function resolvePartial($dir, $key, $name)\n{\n $themePartial = $dir.$key.'/'.$name.'.php';\n $defaultPartial = $dir.$name.'.php';\n if (file_exists($themePartial)) {\n return $themePartial;\n }\n if (file_exists($defaultPartial)) {\n return $defaultPartial;\n }\n return false;\n}", "public function getViewFinder()\n {\n // with package's finder.\n // return app('theme.finder');\n\n return app('view')->getFinder();\n }", "public function getLayoutDir()\n {\n if (isset($this->layoutDir))\n {\n return $this->layoutDir;\n }\n\n return SRC_PATH . '/Common/Layouts';\n }" ]
[ "0.6991812", "0.6774049", "0.6546077", "0.65309554", "0.6260778", "0.6216503", "0.6213145", "0.6133124", "0.6129164", "0.6088755", "0.60261226", "0.5990655", "0.5890962", "0.58792126", "0.5818549", "0.58084553", "0.58012664", "0.57532114", "0.5727108", "0.57226175", "0.57153183", "0.5694013", "0.56879115", "0.56719786", "0.56586486", "0.55949235", "0.55943215", "0.5582777", "0.5560017", "0.5546547", "0.55402035", "0.5499067", "0.54575545", "0.544721", "0.54366654", "0.54352564", "0.54329526", "0.5423619", "0.54144454", "0.5384065", "0.53773946", "0.5367441", "0.5359544", "0.53538424", "0.533727", "0.5329447", "0.5323859", "0.53050894", "0.5302862", "0.52919316", "0.52808756", "0.52727145", "0.5272541", "0.5271954", "0.5257062", "0.5235221", "0.5219816", "0.5203869", "0.5189469", "0.5187392", "0.5184569", "0.5181798", "0.5180142", "0.5179667", "0.51785797", "0.51766956", "0.51751477", "0.5171249", "0.51660514", "0.5165304", "0.5161725", "0.5154722", "0.5119356", "0.5082227", "0.5075773", "0.507122", "0.5062899", "0.5062011", "0.5051796", "0.5026528", "0.50160176", "0.50158477", "0.5010123", "0.50094014", "0.5008382", "0.4999349", "0.4981504", "0.49749294", "0.49737436", "0.49708545", "0.49687394", "0.496595", "0.49655992", "0.495915", "0.4948159", "0.4941495", "0.4941173", "0.4939841", "0.49397758", "0.49371383" ]
0.71765673
0
Deletes any images and/or thumbnails associated with the media
Удаляет любые изображения и/или миниатюры, связанные с медиа
public function deleteImages() { // Delete all fullsize images for this media foreach (glob( MEDIA_IMAGE_PATH . "/" . IMG_TYPE_FULLSIZE . "/" . $this->mediaId . ".*") as $filename) { if ( !unlink( $filename ) ) trigger_error( "Media::deleteImages(): Couldn't delete image file.", E_USER_ERROR ); } // Delete all thumbnail images for this media foreach (glob( MEDIA_IMAGE_PATH . "/" . IMG_TYPE_THUMB . "/" . $this->mediaId . ".*") as $filename) { if ( !unlink( $filename ) ) trigger_error( "Media::deleteImages(): Couldn't delete thumbnail file.", E_USER_ERROR ); } // Remove the image filename extension from the object $this->mediaImageExtension = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeOldMedia(Collection $mediasForDestroy): void;", "function deleteFiles() {\n unlink(FS_THUMB_DIR.$this->thumbnail);\t\t\t\n unlink(FS_IMG_DIR.$this->image);\n }", "protected function handleMediaDeletion(): void\n {\n if (static::hasGlobalScope(SoftDeletingScope::class) && !$this->forceDeleting) {\n if (config('mediable.detach_on_soft_delete')) {\n $this->newBaseQueryBuilder()\n ->from(config('mediable.mediables_table', 'mediables'))\n ->where('media_id', $this->getKey())\n ->delete();\n }\n // unlink associated file on delete\n } elseif ($this->storage()->has($this->getDiskPath())) {\n $this->storage()->delete($this->getDiskPath());\n }\n }", "public function deleteMedia(){\n $filename = urldecode($this->filename);\n App::fs()->remove(Theme::getSelected()->getMediasDir() . $filename);\n }", "public function afterDelete()\n\t{\t\n\t\tparent::afterDelete();\n\t\t\n\t\t//remove all related media\n\t\tforeach($this->media as $media) {\n\t\t\t$media->delete();\n\t\t}\n\t}", "public function delete() {\n \n // Does the Media object have an ID?\n if ( is_null( $this->mediaId ) ) trigger_error ( \"Media::delete(): Attempt to delete an Media object that does not have its ID property set.\", E_USER_ERROR );\n \n // Delete the Media\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM media WHERE mediaId = :mediaId LIMIT 1\" );\n $st->bindValue( \":mediaId\", $this->mediaId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "public function deleteThumbnail(MediaInterface $media)\n {\n }", "public function delete_ac_media() {\n\t\tif ( !wp_verify_nonce( $_POST['delete_ac_media_nonce'], 'delete_ac_media' ) ) {\n\t\t\twp_send_json_error( new WP_Error( 'delete_ac_media_nonce_error', __( \"Shenanigans are afoot. Bailing...\" ) ), 401 );\n\t\t}\n\n\t\t$post = get_post( $_POST['ac_media_id'] );\n\n\t\tif ( $post->post_type !== 'ac_media') {\n \t\twp_send_json_error( new WP_Error( 'delete_ac_media_post_type_error', __( \"That isn't a Audubon Core Media...\" ) ), 400 );\n \t}\n\n\t\tif ( $post->post_author != get_current_user_id() && !current_user_can( 'administrator' ) ) {\n \t\twp_send_json_error( new WP_Error( 'delete_ac_media_permission_error', __( \"You don't have permission to play with that...\" ) ), 401 );\n \t}\n\n \t$args = array(\n\t\t\t'post_parent' => $post->ID,\n\t\t\t'post_type' => 'any'\n\t\t);\n\t\t$children = get_children( $args );\n\n\t\tif ( wp_delete_post( $post->ID ) ) {\n\n\t\t\tforeach ($children as $child) {\n\t\t\t\twp_delete_attachment( $child->ID );\n\t\t\t}\n\n\t\t} else {\n \t\twp_send_json_error( new WP_Error( 'delete_ac_media_failure_error', __( \"Something went wrong during deletion.\" ) ), 400 );\n\t\t}\n\n\t\twp_send_json_success( $post->ID , 200 );\n\t}", "public function deletePictures()\n {\n $this->deletePicture();\n $this->deleteThumb();\n }", "public function afterDelete()\n {\n// $path = self::MEDIA_DIR_PATH;\n// if ($this->data['Media']['prasang_id']) {\n// $path = self::MEDIA_PRASANG_FILES_PATH;\n// }\n// $fileThumbPath = '/' . $path . 'thumbnail/' . $this->data['Media']['name'];\n// $filePath = '/' . $path . $this->data['Media']['name'];\n// if (file_exists($fileThumbPath)) {\n// unlink($fileThumbPath);\n// }\n// if ($filePath) {\n// unlink($filePath);\n// }\n }", "public function deleteAll(){\n DwMedia::query()->delete();\n }", "public function delete()\n {\n $images = glob($this->getPath().'*');\n if ( sizeof( $images) != 0) {\n foreach ( $images as $i)\n\tunlink( $i);\n }\n parent::delete();\n }", "public function delete()\n {\n $image_name = $this->request->query('image_name');\n $id = $this->request->query('image_id');\n $this->loadModel('Media');\n //Delete photo\n if (!empty($image_name)) {\n unlink(WWW_ROOT.'uploads/photo_notifications/'.$image_name);\n }\n //Delete record\n $this->Media->id = $id;\n $this->Media->delete();\n }", "public function deleteDanglingMedia() {\n //Now\n $now = new Carbon();\n\n $now->subDays(1);\n var_dump($now);\n\n //Fields to select\n $fields = array('*');\n\n $where_clause = array(\n array(\n 'where' => 'where',\n 'column' => 'mediable_id',\n 'operator' => '=',\n 'operand' => 0\n ),\n array(\n 'where' => 'where',\n 'column' => 'mediable_type',\n 'operator' => '=',\n 'operand' => ''\n ),\n array(\n 'where' => 'where',\n 'column' => 'created_at',\n 'operator' => '<',\n 'operand' => $now\n ),\n );\n\n //Select preuploaded media models\n $media_model = $this->select($fields, $where_clause, 2);\n\n echo 'Found ' . count($media_model) . ' dungling images';\n\n if ($media_model) {\n\n //Build media path\n $mediaPath = public_path() . \\Config::get($this->package . '::media.uploadPath');\n\n foreach ($media_model as $single_media) {\n echo \"deleted \" . $single_media->name . \"\\n\";\n //Build main path\n $main_path = $mediaPath . '/' . $single_media->name;\n\n //Build thumbnail path\n $thumbnail_path = $mediaPath . '/thumbnails/' . $single_media->name;\n\n if ($single_media['is_image'] && \\File::exists($thumbnail_path)) {//Media file exists\n //Delete thumbnail file\n \\File::delete($thumbnail_path);\n }//E# if statement\n\n if (\\File::exists($main_path)) {//Media file exists\n //Hurrah!\n //Delete main media file\n \\File::delete($main_path);\n\n //Delete media model\n $single_media->delete();\n }//E# if statement\n }//E# foreach statement\n }//E# if statement\n }", "public function deleteImgFiles()\n {\n $original_img_file = $this->url;\n // thumbnail\n $thumbnail_img_file = $this->_getThumbnailUrl($original_img_file);\n if ( file_exists(Yii::getAlias('@webroot') . $thumbnail_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $thumbnail_img_file);\n }\n // poster\n $poster_img_file = $this->_getPosterUrl($original_img_file);\n if ( file_exists(Yii::getAlias('@webroot') . $poster_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $poster_img_file);\n }\n // original\n if ( file_exists(Yii::getAlias('@webroot') . $original_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $original_img_file);\n }\n }", "public function deleteMedia($media_id)\n {\n \n $media = Media::find($media_id);\n\n\n $media->image()->delete();\n\n $media->delete();\n\n //$deletedRows = Media::where('media_id', $media_id)->delete();\n \n return Redirect::to('/media/')->withFlashMessage('Item Deleted Successfully.');\n }", "function delete() {\r\n\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t// Require glob support for older php versions (version < 4.3)\r\n\r\n\t\t\trequire_once realpath(dirname(__file__) . '/includes/GlobExtension.script.php');\r\n\r\n\t\t\t// we want to erase all traces of this previously uploaded image:\r\n\t\t\t// first, we delete all generated thumbnails\r\n\r\n\t\t\t$emptyArray = array('');\r\n\t\t\t$exampleThumb = $this->_getUniqueThumbnailName($emptyArray);\r\n\t\t\t$thumbGlob = preg_replace('/(.*\\..*\\.).*(\\.th\\..*)/','$1*$2',$exampleThumb);\r\n\t\t\t$globPattern = YAPB_CACHE_ROOT_DIR . $thumbGlob;\r\n\r\n\t\t\t$allThumbnails = glob($globPattern);\r\n\t\t\tfor ($i=0, $len=count($allThumbnails); $i<$len; $i++) {\r\n\t\t\t\tunlink($allThumbnails[$i]);\r\n\t\t\t}\r\n\r\n\t\t\t// now we delete the original image\r\n\r\n\t\t\t@unlink($this->systemFilePath());\r\n\r\n\t\t\t// at last we clean up the database entries belonging to that image\r\n\r\n\t\t\t$wpdb->query('DELETE FROM ' . YAPB_TABLE_NAME . ' where id = ' . $this->id);\r\n\r\n\t\t}", "public function delete()\n {\n foreach ($this->photos as $photo) {\n $photo->delete();\n }\n parent::delete();\n }", "public function deleteMedia($id = NULL)\n\t{\n\t\tif($id!=NULL)\n\t\t{\n\t\t\t$row=$this->findById($id);\n\t\t\tforeach ($row['EntryMeta'] as $key => $value)\n\t\t\t{\n\t\t\t\tif($value['key'] == 'image_type')\n\t\t\t\t{\n\t\t\t\t\t$imageType = $value['value'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$file=sprintf('%s.%s',$row['Entry']['id'],$imageType);\n\n\t\t\t// Delete File from directory first\n\t\t\t$destDisplay=sprintf('%simg'.DS.'upload'.DS.'%s',WWW_ROOT,$file);\n\t\t\t$destThumb=sprintf('%simg'.DS.'upload'.DS.'thumb'.DS.'%s',WWW_ROOT,$file);\n\t\t\t$destThumbnails=sprintf('%simg'.DS.'upload'.DS.'thumbnails'.DS.'%s.%s',WWW_ROOT,$row['Entry']['title'],$imageType);\n\n\t\t\t// Delete file\n\t\t\tunlink($destThumb);\n\t\t\tunlink($destDisplay);\n\t\t\tunlink($destThumbnails);\n\t\t\tunlink(WWW_ROOT.'img'.DS.'upload'.DS.'responsive'.DS.$row['Entry']['id'].'-1200w.'.$imageType);\n\t\t\tunlink(WWW_ROOT.'img'.DS.'upload'.DS.'responsive'.DS.$row['Entry']['id'].'-768w.'.$imageType);\n\t\t\tunlink(WWW_ROOT.'img'.DS.'upload'.DS.'responsive'.DS.$row['Entry']['id'].'-0w.'.$imageType);\n\n\t\t\t// special case deleter !!\n\t\t\tif(strtolower($imageType) == 'jpg' || strtolower($imageType) == 'jpeg')\n\t\t\t{\n\t\t\t\tunlink(sprintf('%simg'.DS.'upload'.DS.'thumbnails'.DS.'%s.jpg',WWW_ROOT,$row['Entry']['title']));\n\t\t\t\tunlink(sprintf('%simg'.DS.'upload'.DS.'thumbnails'.DS.'%s.jpeg',WWW_ROOT,$row['Entry']['title']));\n\t\t\t}\n\n\t\t\t$this->delete($id);\n\t\t\t$this->EntryMeta->deleteAll(array('EntryMeta.entry_id' => $id));\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function deleteThumbs()\n {\n $pattern = 'thumb_'.$this->id.'_';\n\n $directory = $this->getStorageDirectory() . $this->getPartitionDirectory();\n $allFiles = $this->storageCmd('files', $directory);\n $collection = [];\n foreach ($allFiles as $file) {\n if (starts_with(basename($file), $pattern)) {\n $collection[] = $file;\n }\n }\n\n /*\n * Delete the collection of files\n */\n if (!empty($collection)) {\n if ($this->isLocalStorage()) {\n FileHelper::delete($collection);\n }\n else {\n Storage::delete($collection);\n }\n }\n }", "public function Delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// TODO: if a soft delete is prefered, change this to update the deleted flag instead of hard-deleting\n\n\t\t\t$pk = $this->GetRouter()->GetUrlParam('idmedia');\n\t\t\t$media = $this->Phreezer->Get('Media',$pk);\n\n\t\t\t$media->Delete();\n\n\t\t\t$output = new stdClass();\n\n\t\t\t$this->RenderJSON($output, $this->JSONPCallback());\n\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "public function remove_media()\n\t{\t\n\t\t// logged-in user's ID\n\t\t$user_id = $this->session->userdata('auth_user');\n\n\t\t$rm_media = $this->input->post('rm');\n\t\t\n\t\tforeach ($rm_media as $rm)\n\t\t{\n\t\t\t// Sanitize file or folder name\n\t\t\t$rm = str_replace('\\\\', '/', $rm);\n\t\t\t$tmp = explode('/',$rm);\t\t\t\n\t\t\t$tmp = array_filter($tmp);\n\t\t\t$tmp = array_diff($tmp, array('.','..'));\n\t\t\t$rm = implode('/',$tmp);\t\t\t\t\t\t\n\n\t\t\t// If name exists\n\t\t\tif ($rm)\n\t\t\t{\t\t\t\t\n\t\t\t\t$path = realpath(MM_BASE.'/'.$rm);\n\n\t\t\t\t// If absolute path exists\n\t\t\t\tif ($path)\n\t\t\t\t{\n\t\t\t\t\tif (is_file($path)) // if file\n\t\t\t\t\t{\n\t\t\t\t\t\t// get file name and path\t\n\t\t\t\t\t\t$tmp = explode('/',$rm);\n\t\t\t\t\t\t$file = end($tmp);\n\t\t\t\t\t\t$file_path = str_replace($file,'',$rm);\n\t\t\t\t\t\t$file_path = '/'.$file_path;\n\n\t\t\t\t\t\t// remove file from database\n\t\t\t\t\t\t$this->db->where('user_id',$user_id);\n\t\t\t\t\t\t$this->db->where('file_path',$file_path);\n\t\t\t\t\t\t$this->db->where('file_name',$file);\n\t\t\t\t\t\t$this->db->delete($this->table);\n\n\t\t\t\t\t\tif (unlink($path))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// path to thumb folder file\n\t\t\t\t\t\t\t$n = count($tmp) - 1;\n\t\t\t\t\t\t\t$last_el = $tmp[$n];\n\t\t\t\t\t\t\t$rm_thumb = str_replace($last_el, 'thumb/'.$last_el, $rm);\n\t\t\t\t\t\t\t$path = MM_BASE.'/'.$rm_thumb;\n\t\t\t\t\t\t\tunlink($path);\n\n\t\t\t\t\t\t\t$msg = 'Media file(s) deleted successfully.';\n\t\t\t\t\t\t\t$type = 'success';\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$msg = 'Could not delete media file(s).';\n\t\t\t\t\t\t\t$type = 'danger';\n\t\t\t\t\t\t}\t\n\t\t\t\t\t} \n\t\t\t\t\telseif (is_dir($path)) // if folder\n\t\t\t\t\t{ \n\t\t\t\t\t\t// remove folder media from database\t\t\t\n\t\t\t\t\t\t$file_path = '/'.$rm.'/';\n\n\t\t\t\t\t\t$this->db->where('user_id',$user_id);\n\t\t\t\t\t\t$this->db->like('file_path',$file_path,'after');\n\t\t\t\t\t\t$this->db->delete($this->table);\n\n\t\t\t\t\t\tdelete_files($path, TRUE, TRUE);\n\n\t\t\t\t\t\tif(rmdir($path)) {\n\t\t\t\t\t\t\t$msg = 'Media folder(s) and its content deleted successfully.';\n\t\t\t\t\t\t\t$type = 'success';\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$msg = 'Could not delete media folder(s).';\n\t\t\t\t\t\t\t$type = 'danger';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$msg = 'Media does not exists';\n\t\t\t\t\t$type = 'danger';\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$msg = 'Invalid media file or folder name supplied.';\n\t\t\t\t$type = 'danger';\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\n\t\t$this->base->set_message($msg, $type);\n\t}", "public function destroy(Media $media)\n {\n //\n }", "public function destroy(Media $media)\n {\n //\n }", "public function destroy(Media $media)\n {\n //\n }", "public function delete()\n {\n File::delete([\n $this->path,\n $this->thumbnail_path\n ]);\n\n parent::delete();\n }", "public function delmediaAction() {\n\t\t$files = new Files ();\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\tif (is_numeric ( $id )) {\n\t\t\t$file = ProductsMedia::getMediabyId ( $id );\n\t\t\tif (! empty ( $file ['filename'] )) {\n\t\t\t\tif (file_exists ( PUBLIC_PATH . $file ['path'] )) {\n\t\t\t\t\tif (unlink ( PUBLIC_PATH . $file ['path'] )) {\n\t\t\t\t\t\tProductsMedia::delMediabyId ( $id );\n\t\t\t\t\t\t$this->_helper->redirector ( 'edit', 'products', 'admin', array ('id' => $file ['product_id'], 'mex' => 'The media file has been deleted.', 'status' => 'success' ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_helper->redirector ( 'edit', 'products', 'admin', array ('id' => $file ['product_id'], 'mex' => 'The media file has been not deleted. Check the file permissions.', 'status' => 'danger' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tProductsMedia::delMediabyId ( $id );\n\t\t\t\t\t$this->_helper->redirector ( 'edit', 'products', 'admin', array ('id' => $file ['product_id'], 'mex' => 'The media file has not been found but the record has been deleted', 'status' => 'attention' ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->_helper->redirector ( 'list', 'products', 'admin', array ('mex' => 'The media file has been not deleted.', 'status' => 'danger' ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_helper->redirector ( 'list', 'products', 'admin', array ('mex' => 'The media file has been not deleted.', 'status' => 'danger' ) );\n\t\t}\n\t}", "public function deleteImages() {\n\n // Delete all fullsize images for this Sortiment\n foreach (glob( SORTIMENT_IMAGE_PATH . \"/\" . IMG_TYPE_FULLSIZE . \"/\" . $this->id . \".*\") as $filename) {\n if ( !unlink( $filename ) ) trigger_error( \"Sortiment::deleteImages(): Couldn't delete image file.\", E_USER_ERROR );\n }\n \n // Delete all thumbnail images for this Sortiment\n foreach (glob( SORTIMENT_IMAGE_PATH . \"/\" . IMG_TYPE_THUMB . \"/\" . $this->id . \".*\") as $filename) {\n if ( !unlink( $filename ) ) trigger_error( \"Sortiment::deleteImages(): Couldn't delete thumbnail file.\", E_USER_ERROR );\n }\n\n // Remove the image filename extension from the object\n $this->imageExtension = \"\";\n }", "protected function removeThumbnails() {\n\t\t$thumbnail = $this->thumbnail;\n\t\t$smallthumb = $this->smallthumb;\n\t\t$largethumb = $this->largethumb;\n\n\t\t//delete standard thumbnail image\n\t\tif ($thumbnail) {\n\t\t\t$delfile = new ElggFile();\n\t\t\t$delfile->owner_guid = $this->getOwnerGUID();\n\t\t\t$delfile->setFilename($thumbnail);\n\t\t\t$delfile->delete();\n\t\t}\n\t\t//delete small thumbnail image\n\t\tif ($smallthumb) {\n\t\t\t$delfile = new ElggFile();\n\t\t\t$delfile->owner_guid = $this->getOwnerGUID();\n\t\t\t$delfile->setFilename($smallthumb);\n\t\t\t$delfile->delete();\n\t\t}\n\t\t//delete large thumbnail image\n\t\tif ($largethumb) {\n\t\t\t$delfile = new ElggFile();\n\t\t\t$delfile->owner_guid = $this->getOwnerGUID();\n\t\t\t$delfile->setFilename($largethumb);\n\t\t\t$delfile->delete();\n\t\t}\n\t}", "public static function delete_associated_photo_media( $post ) {\n\t\tPosts::delete_attachments( $post->ID, $post );\n\t}", "public function MediaDestroy(Request $request)\n {\n if ($request->status == 'delete') {\n \n \n $role_id=Auth::user()->role_id;\n $auth_id=Auth::id();\n if ($role_id == 4 || $role_id == 2) {\n redirect()->back();\n }\n $info=Options::where('key','lp_filesystem')->first();\n $info=json_decode($info->value);\n\n $imageSizes= Options::where('key','lp_imagesize')->first();\n $imageSizes= json_decode($imageSizes->value);\n if ($request->ids) {\n\n foreach ($request->ids as $id) {\n $media=Media::where('user_id',$auth_id)->find($id);\n if ($info->system_type=='do') {\n \n $check= Storage::disk('do')->delete($media->path.'/'.$media->name);\n foreach ($imageSizes as $size) {\n $imgArr=explode('.', $media->name);\n \n $check= Storage::disk('do')->delete($media->path.'/'.$imgArr[0].$size->key.'.'.$imgArr[1]); \n }\n }\n else{\n $file=$media->name;\n \n if (file_exists($file)) {\n \n unlink($file);\n foreach ($imageSizes as $size) {\n $img=explode('.', $file);\n if (file_exists($img[0].$size->key.'.'.$img[1])) {\n unlink($img[0].$size->key.'.'.$img[1]);\n }\n \n }\n }\n \n }\n\n Media::destroy($id);\n \n \n }\n }\n }\n \n return response()->json('Delete Success');\n }", "public function destroy($id) {\n Integration::where('media_id', $id)->delete();\n Media::destroy($id);\n }", "public function delete()\n {\n\n $this->user->require_permission('manage_media');\n\n $ids = $this->data('id');\n \n // if we just have a single ID, make it into an array so we can proceed on that assumption. \n if(!is_array($ids)) $ids = array($ids);\n\n if(!$this->MediaModel('delete',$ids)) return array(false,'An error occurred while attempting to delete this media.');\n\n return array(true,'Media has been permanently deleted.');\n\n }", "protected function taskDelmedia()\n {\n if ($this->view !== 'media') {\n return false;\n }\n\n if (!$this->authorizeTask('delete media', ['admin.pages', 'admin.pages.update', 'admin.super'])) {\n $this->admin->json_response = [\n 'status' => 'error',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK')\n ];\n\n return false;\n }\n\n $page = $this->admin->page($this->route);\n $media = $page ? $this->getMedia($page) : null;\n if (null === $media) {\n $this->admin->json_response = [\n 'status' => 'error',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.NO_PAGE_FOUND')\n ];\n\n return false;\n }\n\n $filename = !empty($this->post['filename']) ? Utils::basename($this->post['filename']) : null;\n\n // Handle bad filenames.\n if (!$filename || !Utils::checkFilename($filename)) {\n $this->admin->json_response = [\n 'status' => 'error',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.NO_FILE_FOUND')\n ];\n\n return false;\n }\n\n /** @var UniformResourceLocator $locator */\n $locator = $this->grav['locator'];\n\n $targetPath = $media->getPath() . '/' . $filename;\n if ($locator->isStream($targetPath)) {\n $targetPath = $locator->findResource($targetPath, true, true);\n }\n $fileParts = Utils::pathinfo($filename);\n\n $found = false;\n\n if (file_exists($targetPath)) {\n $found = true;\n $result = unlink($targetPath);\n\n if (!$result) {\n $this->admin->json_response = [\n 'status' => 'error',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_COULD_NOT_BE_DELETED') . ': ' . htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8')\n ];\n\n return false;\n }\n }\n\n // Remove Extra Files\n foreach (scandir($media->getPath(), SCANDIR_SORT_NONE) as $file) {\n if (preg_match(\"/{$fileParts['filename']}@\\d+x\\.{$fileParts['extension']}(?:\\.meta\\.yaml)?$|{$filename}\\.meta\\.yaml$/\", $file)) {\n\n $targetPath = $media->getPath() . '/' . $file;\n if ($locator->isStream($targetPath)) {\n $targetPath = $locator->findResource($targetPath, true, true);\n }\n\n $result = unlink($targetPath);\n\n if (!$result) {\n $this->admin->json_response = [\n 'status' => 'error',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_COULD_NOT_BE_DELETED') . ': ' . htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8')\n ];\n\n return false;\n }\n\n $found = true;\n }\n }\n\n Cache::clearCache('invalidate');\n\n if (!$found) {\n $this->admin->json_response = [\n 'status' => 'error',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_NOT_FOUND') . ': ' . htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8')\n ];\n\n return false;\n }\n\n // DEPRECATED: page\n $this->grav->fireEvent('onAdminAfterDelMedia', new Event(['object' => $page, 'page' => $page, 'media' => $media, 'filename' => $filename]));\n\n $this->admin->json_response = [\n 'status' => 'success',\n 'message' => $this->admin::translate('PLUGIN_ADMIN.FILE_DELETED') . ': ' . htmlspecialchars($filename, ENT_QUOTES | ENT_HTML5, 'UTF-8')\n ];\n\n return true;\n }", "public function removeMedia(Request $request)\r\n {\r\n $input = $request->all();\r\n $order = $this->orderRepository->findWithoutFail($input['id']);\r\n try {\r\n if ($order->hasMedia($input['collection'])) {\r\n $order->getFirstMedia($input['collection'])->delete();\r\n }\r\n } catch (\\Exception $e) {\r\n Log::error($e->getMessage());\r\n }\r\n }", "function deleteOrphanMedia($media_dir) {\n\t\t$strReq =\n\t\t'SELECT media_file, media_id, media_path, media_title, media_meta, media_dt, '.\n\t\t'media_creadt, media_upddt, media_private, user_id '.\n\t\t'FROM '.$this->table.' '.\n\t\t\"WHERE media_path = '\".$this->path.\"' \".\n\t\t\"AND media_dir = '\".$this->con->escape($media_dir).\"' \";\n\t\t\n\t\tif (!$this->core->auth->check('media_admin',$this->core->blog->id))\n\t\t{\n\t\t\t$strReq .= 'AND (media_private <> 1 ';\n\t\t\t\n\t\t\tif ($this->core->auth->userID()) {\n\t\t\t\t$strReq .= \"OR user_id = '\".$this->con->escape($this->core->auth->userID()).\"'\";\n\t\t\t}\n\t\t\t$strReq .= ') ';\n\t\t}\n\t\t$rs = $this->con->select($strReq);\n\t\twhile ($rs->fetch())\n\t\t{\n\t\t\tif (!file_exists($this->pwd.\"/\".$rs->media_file)) {\n\t\t\t\t# Physical file does not exist remove it from DB\n\t\t\t\t# Because we don't want to erase everything on\n\t\t\t\t# dotclear upgrade, do it only if there are files\n\t\t\t\t# in directory and directory is root\n\t\t\t\t$this->con->execute(\n\t\t\t\t\t'DELETE FROM '.$this->table.' '.\n\t\t\t\t\t\"WHERE media_path = '\".$this->con->escape($this->path).\"' \".\n\t\t\t\t\t\"AND media_file = '\".$this->con->escape($rs->media_file).\"' \"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function delete( $id = null) {\n $this->request->allowMethod( ['post', 'delete'] );\n\n $media = $this->Media->get( $id );\n if ( $this->Media->delete( $media ) ) {\n\n unlink( WWW_ROOT . 'img/' . $media['media_link'] );\n if ( $media['thumb_link'] != null ) {\n unlink( WWW_ROOT . 'img/' . $media['thumb_link'] );\n }\n $this->Flash->success( __( 'Your media post has been deleted.' ) );\n return $this->redirect( ['action' => 'posts'] );\n }\n $this->Flash->error( __( 'Unable to delete your media post.' ) );\n }", "public function delete(Media $entry)\n {\n $entry->delete();\n }", "public function deleteImage($media_image_id)\n {\n\n \n\t \n\n\t $image = Media_Image::find($media_image_id);\n\n\t $imagePath = base_path() .'/public/media_images/image/'.$image->image;\n\n\t $thumbPath = base_path() .'/public/media_images/thumb/'.$image->image;\n\n\t \n\t \n\n\t //die($imagePath);\n\t \n\t\t$deletedRows = Media_Image::where('media_image_id', $media_image_id)->delete();\n\n\n\t File::delete($imagePath);\n\n\t File::delete($thumbPath);\n\n\n\t \n\t \n\t return Redirect::to('/update-media/'.$image->media_id)->withFlashMessage('Image Deleted Successfully.');\n\n }", "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $restaurant = $this->restaurantRepository->findWithoutFail($input['id']);\n try {\n if ($restaurant->hasMedia($input['collection'])) {\n $restaurant->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "public function delete() {\n foreach ($this->getTermImageColl()->getItems() as $image) {\n $image->delete();\n }\n parent::delete(); \n }", "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $clothesOrder = $this->clothesOrderRepository->findWithoutFail($input['id']);\n try {\n if($clothesOrder->hasMedia($input['collection'])){\n $clothesOrder->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $productReview = $this->productReviewRepository->findWithoutFail($input['id']);\n try {\n if($productReview->hasMedia($input['collection'])){\n $productReview->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "function delete()\n\t{\n\t\tglobal $sql;\n\t\t$sql->Query(\"DELETE FROM $this->tablename WHERE id = '$this->id'\");\n\n\t\tif($this->path)\n\t\t\t@unlink($this->path);\n\t\tif($this->thumbnail)\n\t\t\t@unlink($this->thumbnail);\n\t\tif($this->square)\n\t\t\t@unlink($this->square);\n\t\tif($this->small)\n\t\t\t@unlink($this->small);\n\t\tif($this->medium)\n\t\t\t@unlink($this->medium);\n\t\tif($this->large)\n\t\t\t@unlink($this->large);\n\n\t}", "public function destroyimage($id) {\n $delete = NewsGallary::find($id);\n if(!empty($delete->media) and file_exists(public_path().'/upload/products/'.$delete->media))\n {\n unlink(public_path().'/upload/products/'.$delete->media);\n }\n $delete->delete();\n session()->flash('success',trans('admin.deleted'));\n return back();\n }", "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "protected function _delete()\n {\n $photoTable = Engine_Api::_()->getItemTable('sesblog_photo');\n $photoSelect = $photoTable->select()->where('album_id = ?', $this->getIdentity());\n foreach( $photoTable->fetchAll($photoSelect) as $sesblogPhoto ) {\n $sesblogPhoto->delete();\n }\n\n parent::_delete();\n }", "function matthewruddy_delete_resized_images( $post_id ) {\r\n\t$metadata = wp_get_attachment_metadata( $post_id );\r\n\tif ( !$metadata )\r\n\t\treturn;\r\n\t\r\n\t// Do some bailing if we cannot continue\r\n\tif ( !isset( $metadata['file'] ) || !isset( $metadata['image_meta']['resized_images'] ) )\r\n\t\treturn;\r\n\t$pathinfo = pathinfo( $metadata['file'] );\r\n\t$resized_images = $metadata['image_meta']['resized_images'];\r\n\t\r\n\t// Get Wordpress uploads directory (and bail if it doesn't exist)\r\n\t$wp_upload_dir = wp_upload_dir();\r\n\t$upload_dir = $wp_upload_dir['basedir'];\r\n\tif ( !is_dir( $upload_dir ) )\r\n\t\treturn;\r\n\t\r\n\t// Delete the resized images\r\n\tforeach ( $resized_images as $dims ) {\r\n\t\t// Get the resized images filename\r\n\t\t$file = $upload_dir .'/'. $pathinfo['dirname'] .'/'. $pathinfo['filename'] .'-'. $dims .'.'. $pathinfo['extension'];\r\n\t\t// Delete the resized image\r\n\t\t@unlink( $file );\r\n\t}\r\n}", "protected function DeleteImages()\n\t{\t\t\n\t\t//----------------------------------------------------------------------\n\t\t// block if this is a demo mode\n\t\tif(strtolower(SITE_MODE) == 'demo'){\n\t\t\t$this->error = _OPERATION_BLOCKED;\n\t\t\treturn false;\t\t\t\t\n\t\t}\n\n\t\tforeach($this->arrImagesFields as $key => $val){\n\t\t\t@unlink($val);\n\t\t\t$ext = substr($val,strrpos($val,'.')+1);\n\t\t\t@unlink(str_replace('.'.$ext, '_thumb.jpg', $val));\n\t\t}\t\t\t\n\t}", "public function imageDelete($id)\n {\n $variant = Variation::where('material_image_id', $id)->ORWhere('care_image_id', $id)->first();\n if ($variant->material_image_id == $id) {\n $variant->material_image_id = null;\n } else {\n $variant->care_image_id = null;\n }\n $variant->save();\n\n $photo = Photo::find($id);\n unlink($photo->small);\n unlink($photo->medium);\n unlink($photo->large);\n $photo->delete();\n }", "public function clearMedia()\n {\n $this->_media = false;\n }", "function myalbum_delete_photos( $whr )\n{\n\tglobal $xoopsDB ;\n\tglobal $photos_dir , $thumbs_dir , $myalbum_mid ;\n\tglobal $table_photos , $table_text , $table_votedata ;\n\n\t$prs = $xoopsDB->query(\"SELECT lid, ext FROM $table_photos WHERE $whr\" ) ;\n\twhile( list( $lid , $ext ) = $xoopsDB->fetchRow( $prs ) ) {\n\n\t\txoops_comment_delete( $myalbum_mid , $lid ) ;\n\t\txoops_notification_deletebyitem( $myalbum_mid , 'photo' , $lid ) ;\n\n//\t\t$xoopsDB->query( \"DELETE FROM $table_votedata WHERE lid=$lid\" ) or die( \"DB error: DELETE votedata table.\" ) ;\n//\t\t$xoopsDB->query( \"DELETE FROM $table_text WHERE lid=$lid\" ) or die( \"DB error: DELETE text table.\" ) ;\n\t\t$xoopsDB->query( \"DELETE FROM $table_photos WHERE lid=$lid\" ) or die( \"DB error: DELETE photo table.\" ) ;\n\t\n\t\t@unlink( \"$photos_dir/$lid.$ext\" ) ;\n\t\t@unlink( \"$photos_dir/$lid.gif\" ) ;\n\t\t@unlink( \"$thumbs_dir/$lid.$ext\" ) ;\n\t\t@unlink( \"$thumbs_dir/$lid.gif\" ) ;\n\t}\n}", "private function _destroy()\n\t{\n\t\tglobal $wpdb ;\n\n\t\tif ( ! Data::get_instance()->tb_exist( 'img_optm' ) ) {\n\t\t\tDebug2::debug( '[Img_Optm] DESTROY bypassed due to table not exist' ) ;\n\t\t\treturn;\n\t\t}\n\n\t\tDebug2::debug( '[Img_Optm] excuting DESTROY process' ) ;\n\n\t\t/**\n\t\t * Limit images each time before redirection to fix Out of memory issue. #665465\n\t\t * @since 2.9.8\n\t\t */\n\t\t// Start deleting files\n\t\t$limit = apply_filters( 'litespeed_imgoptm_destroy_max_rows', 500 ) ;\n\t\t$q = \"SELECT src,post_id FROM `$this->_table_img_optm` WHERE optm_status = %d ORDER BY id LIMIT %d\" ;\n\t\t$list = $wpdb->get_results( $wpdb->prepare( $q, self::STATUS_PULLED, $limit ) ) ;\n\t\tforeach ( $list as $v ) {\n\t\t\t// del webp\n\t\t\t$this->__media->info( $v->src . '.webp', $v->post_id ) && $this->__media->del( $v->src . '.webp', $v->post_id ) ;\n\t\t\t$this->__media->info( $v->src . '.optm.webp', $v->post_id ) && $this->__media->del( $v->src . '.optm.webp', $v->post_id ) ;\n\n\t\t\t$extension = pathinfo( $v->src, PATHINFO_EXTENSION ) ;\n\t\t\t$local_filename = substr( $v->src, 0, - strlen( $extension ) - 1 ) ;\n\t\t\t$bk_file = $local_filename . '.bk.' . $extension ;\n\t\t\t$bk_optm_file = $local_filename . '.bk.optm.' . $extension ;\n\n\t\t\t// del optimized ori\n\t\t\tif ( $this->__media->info( $bk_file, $v->post_id ) ) {\n\t\t\t\t$this->__media->del( $v->src, $v->post_id ) ;\n\t\t\t\t$this->__media->rename( $bk_file, $v->src, $v->post_id ) ;\n\t\t\t}\n\t\t\t$this->__media->info( $bk_optm_file, $v->post_id ) && $this->__media->del( $bk_optm_file, $v->post_id ) ;\n\t\t}\n\n\t\t// Check if there are more images, then return `to_be_continued` code\n\t\t$q = \"SELECT COUNT(*) FROM `$this->_table_img_optm` WHERE optm_status = %d\" ;\n\t\t$total_img = $wpdb->get_var( $wpdb->prepare( $q, self::STATUS_PULLED ) ) ;\n\t\tif ( $total_img > $limit ) {\n\t\t\t$q = \"DELETE FROM `$this->_table_img_optm` WHERE optm_status = %d ORDER BY id LIMIT %d\" ;\n\t\t\t$wpdb->query( $wpdb->prepare( $q, self::STATUS_PULLED, $limit ) ) ;\n\n\t\t\tDebug2::debug( '[Img_Optm] To be continued 🚦' ) ;\n\n\t\t\treturn $this->_self_redirect( self::TYPE_DESTROY );\n\t\t}\n\n\t\t// Delete postmeta info\n\t\t$q = \"DELETE FROM `$wpdb->postmeta` WHERE meta_key = %s\" ;\n\t\t$wpdb->query( $wpdb->prepare( $q, self::DB_SIZE ) ) ;\n\n\t\t// Delete img_optm table\n\t\tData::get_instance()->tb_del( 'img_optm' ) ;\n\t\tData::get_instance()->tb_del( 'img_optming' ) ;\n\n\t\t// Clear options table summary info\n\t\tself::delete_option( '_summary' ) ;\n\t\tself::delete_option( self::DB_NEED_PULL ) ;\n\n\t\t// Inform Cloud server\n\t\t$data = array(\n\t\t\t'action'\t=> self::CLOUD_ACTION_CLEAN,\n\t\t);\n\t\t$json = Cloud::post( Cloud::SVC_IMG_OPTM, $data ) ;\n\n\t\t$msg = __( 'Destroy all optimization data successfully.', 'litespeed-cache' ) ;\n\t\tAdmin_Display::succeed( $msg ) ;\n\t}", "public function deletegraphicmediaAction(){\n\t\t\n\t\tglobal $mySession;\n \n \t\t$this->_helper->layout->disableLayout();\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t\n\t\t$media_id = $this->_getParam(\"media_id\");\n\t\t\n\t\t$media_info = $this->modelStatic->getMedia($media_id);\n\t\t\n\t\t\n\t\tif(empty($media_info)){\n\t\t\t$mySession->errorMsg = \"No Such Graphic Media Found in the database\";\n\t\t\t$this->_helper->getHelper('Redirector')->gotoRoute(array(),'admin_graphic_media');\n \t\t}\n\t\t\n\t\t\n\t\t$this->_unlink_media_image($media_info['media_path']);\n\t\t\n \t\t$removed = $this->modelStatic->getAdapter()->delete(\"graphic_media\",\"media_id IN (\".$media_id.\")\");\n\t\t\n\t\t$mySession->successMsg = \"Graphic Media Successfully Deleted From the Database \";\n\t\t\n\t\t$this->_helper->getHelper('Redirector')->gotoRoute(array(),'admin_graphic_media');\n\t\t\t\n \t\t \n\n\t\n\t}", "public function massDestroy(Request $request)\n {\n if (! Gate::allows('image_delete')) {\n return abort(401);\n }\n if ($request->input('ids')) {\n $entries = Image::whereIn('id', $request->input('ids'))->get();\n\n foreach ($entries as $entry) {\n $entry->deletePreservingMedia();\n }\n }\n }", "public function destroy($id)\n {\n //\n\n Units::findOrFail($id)->delete();\n\n\n $photos = Photo::Where('imageable_id', '=', $id)->where('imageable_type','=','App\\Unit')->get();\n\n\n if($photos){\n foreach($photos as $photo){\n\n unlink(public_path() . $photo->path);\n Photo::findOrFail($photo->id)->delete();\n }\n\n// echo $photos;\n//\n }\n\n\n\n return redirect('/my-properties');\n }", "public function run()\n {\n Model::unguard();\n\n DB::table('core__media')->delete();\n DB::table('core__activities')->delete();\n\n $this->clearStoredMedia();\n }", "public function destroy($id)\n {\n $media = Media::find($id);\n Storage::delete($media->image);\n $media->delete();\n\n Session::flash('success', 'News zostal usuniety');\n return redirect()->route('medias.index');\n }", "function delete()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n if ( isset( $this->ID ) )\r\n {\r\n $variationArray =& $this->variations();\r\n\r\n foreach ( $variationArray as $variation )\r\n {\r\n $variation->delete();\r\n }\r\n\r\n $db->query( \"DELETE FROM eZImageCatalogue_Image WHERE ID='$this->ID'\" );\r\n $db->query( \"DELETE FROM eZImageCatalogue_ImagePermission WHERE ObjectID='$this->ID'\" );\r\n $db->query( \"DELETE FROM eZImageCatalogue_ImageCategoryLink WHERE ImageID='$this->ID'\" );\r\n $db->query( \"DELETE FROM eZImageCatalogue_ImageCategoryDefinition WHERE ImageID='$this->ID'\" );\r\n $db->query( \"DELETE FROM eZImageCatalogue_ImageMap WHERE ImageID='$this->ID'\" );\r\n\r\n // Delete from the filesystem\r\n if ( eZFile::file_exists( $this->filePath( true ) ) )\r\n {\r\n eZFile::unlink( $this->filePath( true ) );\r\n }\r\n }\r\n }", "public function destroy($id)\n\t{\n\t\t$user = Auth::user();\n\t\t$photo = Photo::find($id);\n\n\t\tif(!$user || !$photo || $user->id !== $photo->user_id)\n\t\t\tApp::abort(403);\n\n\t\tDB::table('likes')->where('photo_id', $id)->delete();\n\t\tDB::table('comments')->where('photo_id', $id)->delete();\n\n\t\t$photo->delete();\n\n\t\t$filepath = join(DIRECTORY_SEPARATOR, array(public_path(), 'media', $photo->filename));\n\n\t\tif(file_exists($filepath))\n\t\t\tunlink($filepath);\n\t}", "public function testDeleteModelRemovesMediaOnStorageByDefault()\n {\n $this->setUrls([\n Media::class => 'foo/:year/:month/:id'\n ]);\n \n $media = new Media(['id' => 123]);\n $media->link($this->createFile(\"\"));\n $media->delete();\n\n $this->assertFalse($media::getMediaManager()->has($media));\n }", "function delete()\n {\n unlink( $this->imagepath() );\n\n // Delete from database\n parent::delete();\n }", "public function deleteImage(){\n Storage::delete($this->image);\n }", "public function unlinkImages()\n {\n if ($this->getPhotoHighlight() != null) {\n unlink(Ad::UPLOAD_PATH_AD_PHOTO .\"/\". $this->getPhotoHighlight());\n }\n }", "public function destroy(Media $medium)\n {\n if($medium->post){\n return back();\n }\n $this->deleteImages($medium);\n $medium->delete();\n return back();\n }", "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "public function deleteMedia($id) {\n\t\tif(intval($id) > 0) {\n\t\t\t$media = new SnMedia();\n\t\t\t$media->ID_MEDIA = $id;\n\n\t\t\t$media = $media->getOne();\n\n\t\t\tif($media->MediaType != MEDIA_VIDEO) {\n\t\t\t\t$image = new Image();\n\t\t\t\t$result = $image->deleteImage(FOLDER_GAMES, $media->MediaDesc);\n\t\t\t}\n\n\t\t\t$media->delete();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function delete()\n\t{\n\t\tforeach( \\IPS\\cms\\Databases::databases() as $databaseId => $database )\n\t\t{\n\t\t\t$fields = array( 'record_image', 'record_image_thumb' );\n\t\t\tforeach( \\IPS\\Db::i()->select( '*', 'cms_database_fields', array( 'field_database_id=? AND LOWER(field_type)=\\'upload\\'', $databaseId ) ) as $field )\n\t\t\t{\n\t\t\t\t$fields[] = 'field_' . $field['field_id'];\n\t\t\t}\n\t\t\t\n\t\t\t$where = array();\n\t\t\t\n\t\t\tforeach( $fields as $field )\n\t\t\t{\n\t\t\t\t$where[] = array( $field . ' IS NOT NULL' );\n\t\t\t}\n\t\n\t\t\tforeach( \\IPS\\Db::i()->select( '*', 'cms_custom_database_' . $databaseId, $where, 'primary_id_field ASC' ) as $row )\n\t\t\t{\n\t\t\t\tforeach( $fields as $field )\n\t\t\t\t{\n\t\t\t\t\tif ( isset( $row[ $field ] ) and ! empty( $row[ $field ] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = \\IPS\\File::get( 'cms_Records', $row[ $field ] )->delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function _delete()\n\t{\n\t\t$photoTable = Engine_Api::_()->getItemTable('socialplace_photo');\n\t\t$photoSelect = $photoTable->select()->where('album_id = ?', $this->getIdentity());\n\t\tforeach( $photoTable->fetchAll($photoSelect) as $placePhoto ) {\n\t\t\t$placePhoto->delete();\n\t\t}\n\n\t\tparent::_delete();\n\t}", "public function destroy($id)\n {\n $post = Post::find($id);\n if($post->user_id !== Auth::user()->id)\n {\n return redirect('/posts')->with('error','Unauthorized');\n }\n\n $postmedia = post_media::where('post_id', $id)\n ->get();\n foreach($postmedia as $media)\n {\n File::delete('post_media/'.$media->filename);\n }\n $postmedia = post_media::where('post_id', $id)\n ->delete();\n\n $post->delete();\n return redirect('/posts');\n }", "public function deleteImage()\n {\n // remove files\n if (is_file($this->getOriginalImageFile()))\n @unlink($this->getOriginalImageFile());\n if (is_file($this->getMediumImageFile()))\n @unlink($this->getMediumImageFile());\n if (is_file($this->getThumbImageFile()))\n @unlink($this->getThumbImageFile());\n // Modify attributes then save\n $this->original = null;\n $this->medium = null;\n $this->thumb = null;\n\n\n return true;\n }", "public function destroy($id)\n {\n DB::table('images')->where('mediaid', '=', $id)->delete();\n DB::table('videos')->where('mediaid', '=', $id)->delete();\n DB::table('user_likes')->where('media_id', '=', $id)->delete();\n DB::table('user_stars')->where('media_id', '=', $id)->delete();\n DB::table('user_comments')->where('media_id', '=', $id)->delete();\n DB::table('medias')->where('id', '=', $id)->delete();\n // return $this->index();\n return redirect('/manage');\n }", "public function deleteExtraImages()\n\t{\n\t\treturn $this->blogImage->where('article_id', 0)->delete();\n\t}", "public function destroy($id)\n {\n $media = Media::findOrFail($id);\n File::delete(public_path($media->path));\n File::delete(public_path($media->thumb));\n $media->delete();\n return response()->json($media);\n }", "public function deleteExtraImages()\n\t{\n\t\treturn $this->image->where('item_id', 0)->delete();\n\t}", "public function destroy($id)\n {\n //\n $postmedia = post_media::find($id);\n $post_id = $postmedia->post_id;\n File::delete('post_media/'.$postmedia->filename);\n $postmedia->delete();\n return redirect('posts/'.$post_id);\n }", "public function Delete() {\n\n\t\tglobal $db,$_CONFIG;\n\t\t\n\t\tif (!is_numeric($this->GetId())) return false;\n\t\t\n\t\t//File::Delete($this->GetPath());\t\t\n\t\t//foreach(ImageSize::Get(\"\",\"\",\"ALL\") as $k => $v) {\n\t\t//\tFile::Delete($this->GetPath($k));\n\t\t//}\n\n\t\t$db->query(\"DELETE FROM \".$_CONFIG['image_map'].\" WHERE img_id = \".$this->GetId());\n\t\t\n\t\t//$db->query(\"DELETE FROM \".$_CONFIG['image'].\" WHERE id = \".$this->GetId());\n\t\n\t}", "public function delete()\n {\n $db = DBConnection::getInstance();\n\n // REMOVE FROM WISHLIST TABLE\n $query = \"DELETE FROM wishlist WHERE advertPK = :advert;\";\n $db->setQuery($query);\n $db->bindQueryValue(':advert', $this->PK);\n $db->run();\n\n // REMOVE PICTURES\n $query = \"SELECT pictureLocation FROM AdvertPictures WHERE advertPK = :advert;\";\n $db->setQuery($query);\n $db->bindQueryValue(':advert', $this->PK);\n $data = $db->getAllResults();\n for($i = 0; $i < count($data); $i++)\n {\n if($data[$i][0] != \"no-image.png\")\n unlink(\"images/uploads/\" . $data[$i][0]);\n }\n\n // REMOVE FROM PICTURES TABLE\n $query = \"DELETE FROM AdvertPictures WHERE advertPK = :advert;\";\n $db->setQuery($query);\n $db->bindQueryValue(':advert', $this->PK);\n $db->run();\n\n //REMOVE FROM ADVERTS TABLE\n $db = DBConnection::getInstance();\n $query = \"DELETE FROM Adverts WHERE advertID = :advert;\";\n $db->setQuery($query);\n $db->bindQueryValue(':advert', $this->PK);\n $db->run();\n }", "public function handleMediaDelete($post_id)\n {\n }", "public function destroy($id)\n {\n $delete = News::find($id);\n\n $delete->delete();\n $affected = NewsGallary::where('product_id', '=', $id)->get()->all();\n foreach ($affected as $affectedRows){\n if (!empty($affectedRows->media) and file_exists(public_path() . '/upload/products/' . $affectedRows->media)) {\n @unlink(public_path() . '/upload/products/' . $affectedRows->media);\n $affectedRows->delete();\n }\n }\n\n session()->flash('success',trans('admin.deleted'));\n return back();\n }", "public function delete()\n\t{\n\t\tProductPhoto::where('product_id', $this->id)->delete();\n\t\tparent::delete();\n\t}", "public function removeThumbnail(): void\n {\n if (!$this->thumbnail) {\n return;\n }\n\n Storage::disk('uploads')->delete('thumbnails/' . $this->thumbnail);\n $this->thumbnail = null;\n }", "public function deletePicture()\n {\n $this->getPicture()->remove(); \n $this->set('picture','');\n $this->save();\n }", "public function deleteMedia($media_id)\n\t{\n\t\t$deletedRows = Media::where('media_id', $media_id)->delete();\n\t\treturn Redirect::to('/media/')->withFlashMessage('Item Deleted Successfully.');\n\t}", "public function delete()\n {\n $this->table = 'images';\n\n if ($imageFile = $this->getImageFile()) {\n $imageFile->delete();\n }\n\n if ($thumbnailImageFile = $this->getThumbnailImageFile()) {\n $thumbnailImageFile->delete();\n }\n\n if ($annotationImageFile = $this->getAnnotationImageFile()) {\n $annotationImageFile->delete();\n }\n\n if ($uncroppedImageFile = $this->getUncroppedImageFile()) {\n $uncroppedImageFile->delete();\n }\n\n $result = parent::delete();\n\n $this->table = 'view_images';\n\n return $result;\n }", "public function destroy($id)\n {\n $post = Auth::user()->posts()->find($id);\n\n if ( ! empty($post->images))\n {\n $images = unserialize($post->images);\n\n foreach ($images as $key => $image)\n {\n if ($key == 0)\n {\n Storage::delete('img/posts/'.$post->user_id.'/main-'.$image['image']);\n }\n\n Storage::delete([\n 'img/posts/'.$post->user_id.'/'.$image['image'],\n 'img/posts/'.$post->user_id.'/'.$image['mini_image']\n ]);\n }\n }\n\n $post->delete();\n\n return redirect('/my_posts');\n }", "public function deleteImage(){\n if(is_file($this->getImage())){\n unlink($this->getImage());\n }\n $this->setImage(null);\n }", "public function deleteImage(){\n $sql = $this->db->query(\"\n SELECT\n `id`,\n `name`,\n `extension`,\n `path`,\n `relative_id`,\n `relative_table`,\n `form_item`\n FROM\n `images`\n WHERE\n `id` = \".intval($_GET['file_id']).\"\n \");\n\n $f = mysql_fetch_assoc($sql);\n\t\t\t$r1 = explode(';', $_GET['thumbs']);\n\n\t\t\tforeach($r1 as $item){\n\t\t\t\t$r2 = explode(',', $item);\n\n\t\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].$f['name'].'_'.$r2[2].(($f['extension'])?'.'.$f['extension']:false);\n\n\t\t\t\tif(file_exists($file)){\n print $file.' ';\n\t unlink($file);\n\t };\n\t\t\t};\n\n\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n\t\t\t$file = $_SERVER['DOCUMENT_ROOT'].$f['path'].'._thumb_'.$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n $file = $_SERVER['DOCUMENT_ROOT'].$f['path'].'._thumb_list_'.$f['name'].(($f['extension'])?'.'.$f['extension']:false);\n\n if(file_exists($file)){\n unlink($file);\n };\n\n $this->db->query(\"DELETE FROM `images` WHERE `id` = \".intval($f['id']));\n\n $this->db->query(\"\n UPDATE\n `\".DB::quote($f['relative_table']).\"`\n SET\n `\".DB::quote($f['form_item']).\"` = `\".DB::quote($f['form_item']).\"` - 1\n WHERE\n `id` = \".intval($f['relative_id']).\"\n \");\n }", "public function p_delete($full = true, $thumb = true, $purge = false)\n {\n // delete media file only if there is only one image OR the image is banned\n if ($this->media->total == 1 || $this->media->banned == 1 || ($this->getAuth()->hasAccess('comment.passwordless_deletion') && $purge)) {\n if ($full === true) {\n $media_file = $this->getDir();\n\n if ($media_file !== null && file_exists($media_file)) {\n unlink($media_file);\n }\n }\n\n if ($thumb === true) {\n $temp = $this->op;\n\n // remove OP thumbnail\n $this->op = 1;\n\n $thumb_file = $this->getDir(true);\n\n if ($thumb_file !== null && file_exists($thumb_file)) {\n unlink($thumb_file);\n }\n\n // remove reply thumbnail\n $this->op = 0;\n $thumb_file = $this->getDir(true);\n\n if ($thumb_file !== null && file_exists($thumb_file)) {\n unlink($thumb_file);\n }\n\n $this->op = $temp;\n }\n }\n }", "public static function clearMediaGalleryCache()\n {\n\n $mediaGalleryCacheDir = ROOT . DS . APP_DIR . DS . 'tmp/cache/media_gallery/';\n if(is_dir($mediaGalleryCacheDir))\n {\n $cacheDirList = scandir( $mediaGalleryCacheDir );\n\n foreach($cacheDirList as $cacheItem)\n {\n if($cacheItem != '.' && $cacheItem != '..' && is_file($mediaGalleryCacheDir . $cacheItem) && !is_dir($mediaGalleryCacheDir . $cacheItem))\n {\n unlink($mediaGalleryCacheDir . $cacheItem);\n }\n }\n }\n }", "public function destroy($id)\n {\n $image=Image::findOrFail($id);\n if($image->source){\n if(file_exists(public_path().$image->source)){\n unlink(public_path().$image->source);\n }\n }\n $image->delete();\n event(new ImageEvent);\n return ['message'=>'Image deleted'];\n }", "public function deleteRelated($id)\n {\n $gallery = Gallery::find()->where(['user_id' => $id])->one();\n\n if($gallery->id != '')\n {\n $images = Images::find()\n ->where(['gallery_id' => $gallery->id]) \n ->all(); \n $cnt = count($images);\n if($cnt > 0)\n {\n Yii::$app->params['uploadPath'] = Yii::$app->basePath . '/web/uploads/gallery/';\n foreach ($images as $value) {\n\n if($value->imagename != '' && file_exists(Yii::$app->basePath . '/web/uploads/gallery/'.$value->imagename) )\n\n {\n unlink(Yii::$app->basePath . '/web/uploads/gallery/'.$value->imagename);\n } \n }\n }\n Images::deleteAll(['gallery_id' => $gallery->id]);\n\n $gallery->delete($gallery->id);\n }\n }", "public function destroy(Request $request)\n {\n $product = Product::whereIn('id',$request->input('id'));\n foreach($product->get() as $item){\n $mediaItems = $item->getMedia('products');\n $mediaItems[0]->delete();\n }\n if($product->delete()){\n return view('upload._list',['product' => Product::orderBy('id','desc')->get()])->render();\n }\n\n }", "public function delete() {\n\t\t# Returns the following:\n\t\t# (boolean) true = Success\n\t\t# (boolean) false = Failure\n\n\t\t# Check dependencies\n\t\tself::dependencies(isset($this->database, $this->photoIDs));\n\n\t\t# Call plugins\n\t\t$this->plugins(__METHOD__, 0, func_get_args());\n\n\t\t# Get photos\n\t\t$query\t= Database::prepare($this->database, \"SELECT id, url, thumbUrl, checksum FROM ? WHERE id IN (?)\", array(LYCHEE_TABLE_PHOTOS, $this->photoIDs));\n\t\t$photos\t= $this->database->query($query);\n\t\tif (!$photos) {\n\t\t\tLog::error($this->database, __METHOD__, __LINE__, $this->database->error);\n\t\t\treturn false;\n\t\t}\n\n\t\t# For each photo\n\t\twhile ($photo = $photos->fetch_object()) {\n\n\t\t\t# Check if other photos are referring to this images\n\t\t\t# If so, only delete the db entry\n\t\t\tif ($this->exists($photo->checksum, $photo->id)===false) {\n\n\t\t\t\t# Get retina thumb url\n\t\t\t\t$thumbUrl2x = explode(\".\", $photo->thumbUrl);\n\t\t\t\t$thumbUrl2x = $thumbUrl2x[0] . '@2x.' . $thumbUrl2x[1];\n\n\t\t\t\t# Delete big\n\t\t\t\tif (file_exists(LYCHEE_UPLOADS_BIG . $photo->url)&&!unlink(LYCHEE_UPLOADS_BIG . $photo->url)) {\n\t\t\t\t\tLog::error($this->database, __METHOD__, __LINE__, 'Could not delete photo in uploads/big/');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t# Delete medium\n\t\t\t\tif (file_exists(LYCHEE_UPLOADS_MEDIUM . $photo->url)&&!unlink(LYCHEE_UPLOADS_MEDIUM . $photo->url)) {\n\t\t\t\t\tLog::error($this->database, __METHOD__, __LINE__, 'Could not delete photo in uploads/medium/');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t# Delete thumb\n\t\t\t\tif (file_exists(LYCHEE_UPLOADS_THUMB . $photo->thumbUrl)&&!unlink(LYCHEE_UPLOADS_THUMB . $photo->thumbUrl)) {\n\t\t\t\t\tLog::error($this->database, __METHOD__, __LINE__, 'Could not delete photo in uploads/thumb/');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t# Delete thumb@2x\n\t\t\t\tif (file_exists(LYCHEE_UPLOADS_THUMB . $thumbUrl2x)&&!unlink(LYCHEE_UPLOADS_THUMB . $thumbUrl2x))\t {\n\t\t\t\t\tLog::error($this->database, __METHOD__, __LINE__, 'Could not delete high-res photo in uploads/thumb/');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t# Delete db entry\n\t\t\t$query\t= Database::prepare($this->database, \"DELETE FROM ? WHERE id = '?'\", array(LYCHEE_TABLE_PHOTOS, $photo->id));\n\t\t\t$delete\t= $this->database->query($query);\n\t\t\tif (!$delete) {\n\t\t\t\tLog::error($this->database, __METHOD__, __LINE__, $this->database->error);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\n\t\t# Call plugins\n\t\t$this->plugins(__METHOD__, 1, func_get_args());\n\n\t\treturn true;\n\n\t}", "function submit_removed_content()\n {\n $all_images = $this->admin_model->get_where_data(array('ref_code' => $this->input->get('id')),'item_image');\n //unlink all images\n foreach ($all_images as $images)\n {\n unlink(realpath('webroot/files/'.$images['uuid'].'/'.$images['image']));\n }\n\n // remove images in album\n $this->admin_model->delete_data(array('ref_code' => $this->input->get('id')), 'item_image');\n // remove album name\n $this->admin_model->delete_data(array('item_id' => $this->input->get('id')), 'item_type');\n }", "public function destroy($id)\n {\n try{\n $media = Media::where('item', $id)->get(); \n foreach ($media as $element) {\n if ($delete=Storage::disk('properties')->has($element -> url)) {\n $delete=Storage::disk('properties')->delete($element -> url);\n }\n }\n\n PropertiesTypesRelations::where('property_id', $id) -> delete();\n GoogleMapsLocations::where('property_id', $id) -> delete();\n Media::where('item', $id) -> delete();\n Property::FindOrFail($id) -> delete();\n Historical::insert([\n 'transaction' => 3, \n 'description' => 'La propiedad ' . $id . ' fue eliminada', \n 'user' => Auth::user()->id, \n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]);\n Log::notice('Registro exitoso en propertyController -> destroy');\n }catch (\\Exception $e) {\n Log::error('Error en propertyController -> destroy. Error: ['.$e.']');\n flash('¡Error! Ha ocurrido un problema', 'danger');\n }\n\n flash('Propiedad eliminada exitosamente ', 'success');\n return redirect()->route('propiedades.index');\n}", "function deleteArtwork()\n {\n $this->_artwork->delete();\n }", "public function destroy($id)\n {\n\t\t\n\t\t$photogallery = Photogallery::findOrFail($id);\n\t\t\n\t\t$photo = $photogallery->photo;\n\t\t//unlink image\n\t\t@unlink(base_path().'/public/assets/uploads/images/'.$photo);\n\t\t\n $photogallery->delete();\n\t\tflash('Photo Gallery Image has been deleted!', 'success')->important();\n return redirect('/webmaster/photogallery');\n }", "private function cleanup_image($uid, $file, $thumbfile) {\n //clean up resources\n $query = new \\Peyote\\Delete('resources');\n $query->where('image', '=', $uid);\n $this->db->fetch($query);\n //clean up media resources\n $query = new \\Peyote\\Delete('media');\n $query->where('uid', '=', $uid);\n $this->db->fetch($query);\n //remove image in db\n $query = new \\Peyote\\Delete('images');\n $query->where('uid', '=', $uid);\n $this->db->fetch($query);\n //remove image\n unlink($file);\n unlink($thumbfile);\n }" ]
[ "0.7472603", "0.74676204", "0.7448713", "0.7413888", "0.73695666", "0.732673", "0.73221964", "0.7309081", "0.7295364", "0.7275381", "0.72729504", "0.72721887", "0.7256522", "0.7218407", "0.7216774", "0.7174878", "0.7170642", "0.7141128", "0.7121117", "0.70957065", "0.70532805", "0.7051298", "0.7047001", "0.7047001", "0.7047001", "0.70354587", "0.6995989", "0.69796014", "0.6971914", "0.6966466", "0.69462144", "0.6933434", "0.6911507", "0.6899539", "0.6881789", "0.6877834", "0.68760103", "0.68671525", "0.68264645", "0.67953336", "0.67668223", "0.6758955", "0.67495745", "0.6744978", "0.67445445", "0.67093027", "0.6707616", "0.66864383", "0.668085", "0.66767454", "0.6662237", "0.6659272", "0.6645289", "0.6632659", "0.6628586", "0.6621408", "0.66190773", "0.6618312", "0.6588033", "0.65877855", "0.65855044", "0.65678304", "0.6550756", "0.6546459", "0.65198785", "0.6514232", "0.6514232", "0.6505431", "0.64948046", "0.6491528", "0.6491145", "0.648262", "0.647473", "0.6465467", "0.6460731", "0.64338166", "0.6413944", "0.64132327", "0.6405727", "0.64041126", "0.6400625", "0.63988805", "0.6396411", "0.63951075", "0.6393207", "0.6386875", "0.6356082", "0.6345454", "0.6337191", "0.63370776", "0.633701", "0.63361883", "0.6335728", "0.63248533", "0.63214135", "0.63096917", "0.63090575", "0.6297226", "0.6286767", "0.62804484" ]
0.82958084
0
Inserts the current Media object into the database, and sets its ID property.
Вставляет текущий объект Media в базу данных и устанавливает его свойство ID.
public function insert() { // Does the Media object already have an ID? if ( !is_null( $this->id ) ) trigger_error ( "Media::insert(): Attempt to insert an Media object that already has its ID property set (to $this->mediaId).", E_USER_ERROR ); // Insert the Media $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); $sql = "INSERT INTO media ( mediaPublicationDate, mediaCategoryId, mediaTitle, mediaSummary, mediaContent, mediaImageExtension ) VALUES ( FROM_UNIXTIME(:mediaPublicationDate), :mediaCategoryId, :mediaTitle, :mediaSummary, :mediaContent, :mediaImageExtension )"; $st = $conn->prepare ( $sql ); $st->bindValue( ":mediaPublicationDate", $this->mediaPublicationDate, PDO::PARAM_INT ); $st->bindValue( ":mediaCategoryId", $this->mediaCategoryId, PDO::PARAM_INT ); $st->bindValue( ":mediaTitle", $this->mediaTitle, PDO::PARAM_STR ); $st->bindValue( ":mediaSummary", $this->mediaSummary, PDO::PARAM_STR ); $st->bindValue( ":mediaContent", $this->mediaContent, PDO::PARAM_STR ); $st->bindValue( ":mediaImageExtension", $this->mediaImageExtension, PDO::PARAM_STR ); $st->execute(); $this->mediaId = $conn->lastInsertId(); $conn = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert()\n { if (!is_null($this->id))\n trigger_error(\"Spectra::insert(): Attempt to insert a Spectrum object that already has its ID property set (to $this->id).\", E_USER_ERROR);\n\n // Insert the Spectra\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"INSERT INTO spectra ( Type, Comment, JCAMPFile, Image, CompoundID) VALUES ( :type , :comment , :jcampfile, :image, :compoundID )\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":type\", $this->type, PDO::PARAM_STR);\n\t$st->bindValue(\":comment\", $this->comment, PDO::PARAM_STR);\n\t$st->bindValue(\":jcampfile\", $this->jcampFile, PDO::PARAM_STR);\n $st->bindValue(\":image\", $this->image, PDO::PARAM_STR);\n $st->bindValue(\":compoundID\", $this->compoundID, PDO::PARAM_INT);\n $st->execute();\n $this->id = $conn->lastInsertId();\n $conn = null;\n return $this->id;\n }", "public function add() {\n $newMedia = $this->Media->newEntity();\n\n if ( $this->request->is( 'post' ) ) {\n\n $input = $this->request->data;\n if ( isset( $input['file']['name'] ) ) {\n $input['author_id'] = $this->Auth->user( 'user_id' );\n\n $genreId = $input['genre_id'];\n $genreName = strtolower( $this->MediaHelper->getGenreName( $genreId ) );\n\n $mediaName = strtolower( $input['file']['name'] );\n\n // Truncate file name to last 100 characters if it exceeds 150. DB only stores up to 150 chars for links.\n $mediaName = (strlen( $mediaName ) > 150) ? substr( $mediaName, -100 ) : $mediaName;\n\n // add \"unique\" string to the name of the file to avoid over writes\n $mediaStoredName = uniqid( '', true ) . '-' . $mediaName;\n\n // path link for full image that will be stored in the database\n $mediaPathLink = 'media/' . $genreName . '/' . $mediaStoredName;\n\n // the absolute path where the uploaded media will be moved to\n $storedPath = WWW_ROOT . 'img/' . $mediaPathLink;\n\n $input['media_link'] = $mediaPathLink;\n\n $finfo = finfo_open();\n $mime = strtolower( finfo_file( $finfo, $input['file']['tmp_name'], FILEINFO_MIME ) );\n finfo_close( $finfo );\n\n if ( strstr( $mime, 'image/' ) ) {\n // path link for thumbnail that will be stored in the database\n // use a different uniqid to avoid users from changing url link to access full image\n $mediaThumbLink = 'media/' . $genreName . '/' . uniqid( 'thumbnail-' ) . '-' . $mediaName;\n $input['type_id'] = 1; // image\n $input['thumb_link'] = $mediaThumbLink;\n\n $newMedia = $this->Media->patchEntity( $newMedia, $input );\n\n if ( $this->Media->save( $newMedia ) ) {\n // generate and store thumbnail. Also move uploaded file\n $this->generateThumbnail( $input['file']['tmp_name'], $mediaThumbLink );\n move_uploaded_file( $input['file']['tmp_name'], $storedPath );\n } else {\n $this->Flash->error( __( 'The picture could not be uploaded. Please, try again.' ) );\n }\n } else {\n $input['type_id'] = 2; // video\n $newMedia = $this->Media->patchEntity( $newMedia, $input );\n\n if ( $this->Media->save( $newMedia ) ) {\n move_uploaded_file( $input['file']['tmp_name'], $storedPath );\n } else {\n $this->Flash->error( __( 'The video could not be uploaded. Please, try again.' ) );\n }\n }\n // return $this->redirect( ['controller' => 'Media', 'action' => 'view', $newMedia->media_id] );\n }\n }\n $genreList = $this->MediaHelper->getGenreList();\n\n $this->set( compact( 'genreList', 'newMedia' ) );\n }", "public function insertMediaInABSPlaylist() \n {\n\n $this->autoRender = false;\n $media=$this->request->getData('media', $this->request->getQuery('media'));\n foreach ($media as $key => $value): \n $absMedia = $this->AbsMedia->newEntity();\n $absMedia->media_id = $value;\n if ($this->AbsMedia->save($absMedia))\n {\n $absMedia->insertMediaInPlaylist($absMedia->media_id);\n } \n endforeach;\n \n }", "public function save()\n {\n if ($this->getId() > 0) {\n $this->_update();\n } else {\n $this->_insert();\n }\n }", "public function insert()\n\t{\t\t\n\t\ttry\n\t\t{\n\t\t\t// Connection a la base.\n\t\n\t\t\t$bdd = Base::getConnection();\n\t\t\t\n\t\t\t// On gere si la designation ou le photopath n'est pas assignee.\n\t\t\t\n\t\t\tif (!isset($this->title))\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Le morceau n'a pas pu etre insere dans la base de donnees car le titre n'a pas ete specifie et il s'agit d'un champ obligatoire.\");\n\t\t\t}\n\t\t\t\n\t\t\t// On prépare la requete\n\t\t\t\n\t\t\t$requete = $bdd -> prepare(self::$rq_Insertion);\n\t\t\t$requete -> execute(array\n\t\t\t(\n\t\t\t\t'id' => $this->artist_id,\n\t\t\t\t'title' => $this->title,\n\t\t\t\t'url' => $this->mp3_url\n\t\t\t));\n\t\t\t\n\t\t\t// On récupere l'identifiant du Membre inséré.\n\t\t\t\n\t\t\t$this->track_id = $bdd->LastInsertID('tracks');\n\t\t\t$requete->closeCursor();\n\t\t\treturn $this->track_id;\t\t\n\t\t}\n\t\tcatch(BaseException $e)\n\t\t{\n\t\t\tprint $e -> getMessage();\n\t\t}\n\t}", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function create_media ( $media, $tweet_id ) {\n\t\t$this->db->insert(\"tweet_media\", array(\n\t\t\t\"created_at\" => time(),\n\t\t\t\"url\" => $media[\"media_url\"],\n\t\t\t\"tweet_id\" => $tweet_id\n\t\t));\n\n\t\treturn $this->db->insert_id();\n\t}", "public function save()\n {\n if (null == $this->id) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "function persist() {\r\n\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t// If this image hasn't got an id yet\r\n\t\t\tif (is_null($this->id)) {\r\n\t\t\t\t// Image not persisted yet - We do an insert\r\n\t\t\t\t$wpdb->query('INSERT INTO ' . YAPB_TABLE_NAME . ' (post_id, uri) values (' . $wpdb->escape($this->post_id) . ', \\'' . $wpdb->escape($this->uri) . '\\')');\r\n\t\t\t\t// Additionally we want the primary id in case we need it afterwards\r\n\t\t\t\t$this->id = $wpdb->get_var('SELECT LAST_INSERT_ID() as id');\r\n\t\t\t} else {\r\n\t\t\t\t// We have this image already - We do an update\r\n\t\t\t\t$wpdb->query('UPDATE ' . YAPB_TABLE_NAME . ' uri=\\'' . $wpdb->escape($this->uri) . '\\' WHERE id = ' . $this->id);\r\n\t\t\t}\r\n\r\n\t\t}", "protected function insert()\n {\n global $databaseHandler;\n\n // Crée une requête préparée permettant d'insérer un nouvel enregistrement\n // dans la table 'game'\n $statement = $databaseHandler->prepare('\n INSERT INTO `game` (\n `title`,\n `release_date`,\n `link`,\n `developer_id`,\n `platform_id`\n )\n VALUES (\n :title,\n :release_date,\n :link,\n :developer_id,\n :platform_id\n )\n ');\n // Exécute la requête préparée en remplaçant chaque champ précédé de ':' par la propriété\n // correspondnate de l'objet\n $statement->execute([\n ':title' => $this->title,\n ':release_date' => $this->releaseDate->format('Y-m-d'),\n ':link' => $this->link,\n ':developer_id' => $this->developerId,\n ':platform_id' => $this->platformId, \n ]);\n\n $this->id = $databaseHandler->lastInsertId();\n }", "public function save()\n {\n $this->before_save();\n $idField = static::_id();\n if (empty($this->$idField)) {\n $this->$idField = $this->insert();\n } else {\n $this->update();\n }\n $this->after_save();\n }", "private function add_media_item_to_database($file_name, $media_folder, $file_size, $hash, $mime_type, $dimensions = NULL, $preset_id = NULL)\n\t{\n//\t\techo \"\\nModel_Media->add_media_item_to_database(): Add Media Item to DB: \\n\";\n//\t\tIbHelpers::die_r(\n//\t\t\tarray(\n//\t\t\t\t'filename' => $file_name,\n//\t\t\t\t'media_folder' => $media_folder,\n//\t\t\t\t'file_size' => $file_size,\n//\t\t\t\t'hash' => $hash,\n//\t\t\t\t'dimensions' => $dimensions,\n//\t\t\t\t'preset_id' => $preset_id\n//\t\t\t)\n//\t\t);\n\n\t\t$record_exists = DB::select()->from('plugin_media_shared_media')->where('filename', '=', $file_name)->where('location', '=', $media_folder)->execute()->as_array();\n\n\t\tif (count($record_exists) == 0)\n\t\t{\n\t\t\t$insert_result = FALSE;\n\n\t\t\t// 1. get the ID of the currently-logged in user, i.e. the user who is uploading this Media Item\n\t\t\t$logged_in_user = Auth::instance()->get_user();\n\n\t\t\t// 2. Prepare the New Media Item Record for DB\n\t\t\t//Set the Media Item to be added to Database\n\t\t\t$item_to_add_data['filename'] = $file_name;\n\t\t\t$item_to_add_data['location'] = $media_folder;\n\t\t\t$item_to_add_data['size'] = $file_size;\n\t\t\t$item_to_add_data['mime_type'] = $mime_type;\n\t\t\t$item_to_add_data['dimensions'] = $dimensions;\n\t\t\t$item_to_add_data['hash'] = $hash;\n\t\t\t$item_to_add_data['preset_id'] = $preset_id;\n\t\t\t// Format the required dates for mysql storage\n\t\t\t$item_to_add_data['date_created'] = date('Y-m-d H:i:s');\n\t\t\t$item_to_add_data['created_by'] = $logged_in_user['id'];\n\t\t\t$item_to_add_data['owner_id'] = $logged_in_user['id'];\n\t\t\t$item_to_add_data['date_modified'] = $item_to_add_data['date_created'];\n\t\t\t$item_to_add_data['modified_by'] = $logged_in_user['id'];\n\n\t\t\t// 3. add the Media Item Record to DB\n\t\t\t$insert_result = DB::insert(self::$model_items_table)->values($item_to_add_data)->execute();\n\n\t\t\t// 4. Return new ID - or NULL in case of fail to write to DB\n\t\t\t$activity = new Model_Activity;\n\t\t\t$activity->set_action('upload')->set_item_type('media')->set_item_id($insert_result[0]);\n\t\t\t$activity->save();\n\t\t\treturn $insert_result[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $record_exists[0];\n\t\t}\n\n\t}", "public function ajoutervideo(Media $media)\r\n{\r\n $q = $this->_db->prepare('INSERT INTO video (name) VALUES (:name)');\r\n $q->execute(array(\r\n 'name' => $media->getname()));\r\n}", "public function save() \n {\n if (is_null($this->id)) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function save(Media $entry)\n {\n $entry->save();\n }", "public function save()\n { if ($this->id != NULL) {\n $this->update();\n } else {\n $this->insert();\n }\n\n }", "protected function _insert() {\n\n\t\t// PHP does weird things when casting floats to strings, so do it manually it here.\n\t\t// @see https://github.com/nicolasff/phpredis/issues/217\n\t\t$this->_data['_created'] = number_format(microtime(true), 8, '.', '');\r\n\t\t$this->_adapter->save($this);\r\n\t\treturn $this->getId();\r\n\t}", "public function saveMedia(Media $media, $modelRelation = null, int $order = 1, $hasMany = false): void;", "public function addPostMedia($post_id,$media_id)\n\t{\n\t\t$post_id = (integer) $post_id;\n\t\t$media_id = (integer) $media_id;\n\n\t\t$f = $this->getPostMedia($post_id,$media_id);\n\n\t\tif (!empty($f)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$cur = $this->db->openCursor($this->t_media_ref);\n\t\t$cur->post_id = $post_id;\n\t\t$cur->media_id = $media_id;\n\n\t\t$cur->insert();\n\t}", "public function insert()\r\n\t {\r\n\t \tif ($this->isAvailable())\r\n\t \t\treturn false;\r\n\r\n\t \t$this->extendDefaults();\r\n\r\n\t \t$id = DB::table(TABLE_PREFIX.TABLE_POSTS)\r\n\t\t \t->insert(array(\r\n\t\t \t\t\"id\" => null,\r\n\t\t \t\t\"status\" => $this->get(\"status\"),\r\n\t\t \t\t\"user_id\" => $this->get(\"user_id\"),\r\n\t\t \t\t\"type\" => $this->get(\"type\"),\r\n\t\t \t\t\"caption\" => $this->get(\"caption\"),\r\n\t\t \t\t\"media_ids\" => $this->get(\"media_ids\"),\r\n\t\t \t\t\"account_id\" => $this->get(\"account_id\"),\r\n\t\t \t\t\"is_scheduled\" => $this->get(\"is_scheduled\"),\r\n\t\t \t\t\"create_date\" => $this->get(\"create_date\"),\r\n\t\t \t\t\"schedule_date\" => $this->get(\"schedule_date\"),\r\n\t\t \t\t\"publish_date\" => $this->get(\"publish_date\"),\r\n\t\t \t\t\"is_hidden\" => $this->get(\"is_hidden\"),\r\n\t\t \t\t\"data\" => $this->get(\"data\")\r\n\t\t \t));\r\n\r\n\t \t$this->set(\"id\", $id);\r\n\t \t$this->markAsAvailable();\r\n\t \treturn $this->get(\"id\");\r\n\t }", "public function save()\n {\n if (is_null($this->id)) {\n $this->create();\n } else {\n $this->update();\n }\n }", "public function save(): void\r\n {\r\n $query = $this->newQuery();\r\n\r\n $result = $query->execute(\r\n \"INSERT INTO {$this->table} (`text`, `question_id`) \" .\r\n \" VALUES ('{$this->text}', '{$this->question_id}')\");\r\n if ($result) {\r\n $this->id = $query->getLastInsertedId();\r\n }\r\n }", "public function save()\n { if ($this->id != null)\n {\n $this->update();\n }\n else \n { \n $this->insert();\n } \n\n }", "public function __insert()\n {\n $this->created_at = date(\\DClass\\lib\\Util::dateformat);\n $dbal = new DBAL();\n DBAL::$id_lang_static = $this->dvid_lang;\n $id = $dbal->createDbal($this);\n return $id;\n }", "private function insert(){\n $this->db->insert($this::DB_TABLE_NAME, $this);\n $this->{$this::DB_TABLE_PK_VALUE} = $this->db->insert_id();\n }", "public function persist()\n {\n $table = $this->getTableName();\n $mysql = $this->getMySQL();\n \n try {\n if (isset($this->id) && !is_nan($this->id) && $this->id > 0) {\n // Because we already have an id, we know this row exists.\n $this->updatedAt = time();\n $mysql->updateRow($table, $this->getFieldValues(), $this->uuid);\n } else {\n if (!$this->uuid) {\n $this->uuid = $this->generateUUID();\n }\n $this->createdAt = time();\n $this->id = $mysql->insertRow($table, $this->getFieldValues());\n }\n }\n catch (DBExceptoin $exception) {\n // Re-throw as an Entity exception\n throw $exception;\n }\n }", "private function insert()\n {\n $last_insert_id = $this->connection->insert($this->table_name, $this->values);\n\n if (empty($this->values[$this->auto_increment])) {\n $this->values[$this->auto_increment] = $last_insert_id;\n }\n\n $this->values = array_merge($this->values, $this->refreshGeneratedFieldValues($last_insert_id));\n $this->setAsLoaded();\n }", "function wrn_add_media($id,$name,$url,$status, $admins,$blog_id){\n global $wpdb;\n if(wrn_exist_media($id)){\n return false;\n }\n $wpdb->query(\"INSERT INTO $wpdb->base_prefix\" . \"wrn_media (id,name,url,status,admins,blog_id) VALUES ('$id','$name','$url','$status','$admins','$blog_id')\");\n if($wpdb->insert_id > 0){\n return true;\n }else{\n return $wpdb->last_error;\n }\n }", "public function insertNew()\n {\n $news = R::dispense('news');\n\n $news->name = $this->_name;\n $news->content = $this->_content;\n $news->date = $this->_date;\n\n $id = R::store($news);\n\n $this->_id = $id;\n }", "private function insert(){\t\t\n\t\t$this->db->insert($this::DB_TABLE, $this->output_data());\n\t\t$this->{$this::DB_TABLE_PK} = $this->db->insert_id();\n\t}", "public function update() {\n \n // Does the Media object have an ID?\n if ( is_null( $this->mediaId ) ) trigger_error ( \"Media::update(): Attempt to update an Media object that does not have its ID property set.\", E_USER_ERROR );\n \n // Update the Media\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"UPDATE media SET mediaPublicationDate=FROM_UNIXTIME(:mediaPublicationDate), mediaCategoryId=:mediaCategoryId, mediaTitle=:mediaTitle, mediaSummary=:mediaSummary, mediaContent=:mediaContent, mediaImageExtension=:mediaImageExtension WHERE mediaId = :mediaId\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":mediaPublicationDate\", $this->mediaPublicationDate, PDO::PARAM_INT );\n\t$st->bindValue( \":mediaCategoryId\", $this->mediaCategoryId, PDO::PARAM_INT );\n $st->bindValue( \":mediaTitle\", $this->mediaTitle, PDO::PARAM_STR );\n $st->bindValue( \":mediaSummary\", $this->mediaSummary, PDO::PARAM_STR );\n $st->bindValue( \":mediaContent\", $this->mediaContent, PDO::PARAM_STR );\n $st->bindValue( \":mediaImageExtension\", $this->mediaImageExtension, PDO::PARAM_STR );\n $st->bindValue( \":mediaId\", $this->mediaId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "public function insert()\n {\n $id = self::createMapper()->insert($this);\n $this->setId($id); // Has to be here cause of private property\n return $id;\n }", "public function getIdMedia()\n {\n return $this->id_media;\n }", "public function save() {\n $this->validate();\n try {\n if(isset($this->id)) {\n $this->update();\n } else {\n $this->add();\n }\n } catch(PDOException $e) {\n die($e->getMessage());\n }\n }", "public function insert()\n {\n $colums = [];\n $params = [];\n $data = [];\n foreach ($this as $key => $value){\n if ($key == 'id') {\n continue;\n }\n $colums[] = $key;\n $params[] = ':'.$key;\n $data[':'.$key] = $value;\n }\n $sql = 'INSERT INTO '.static::TABLE.' ('.implode(', ', $colums).') VALUES ('.implode(', ', $params).')';\n\n $db = new \\App\\Dbconnect\\Db;\n $db->execute($sql, $data);\n $this->id = $db->lastInsertId();\n }", "public function getMediaId()\n {\n return $this->mediaId;\n }", "final public function save()\r\n\t{\r\n\t\t\r\n\t\tif (null === ($this->id)) {\r\n\t\t\t$id = $this->insert($this->_data);\r\n\t\t} else {\r\n\t\t\t$this->update($this->_data, array('id = ?' => $this->id));\r\n\t\t\t$id = $this->id;\r\n\t\t}\r\n\r\n\t\treturn $id;\r\n\t}", "function insert() {\r\n\t\ttry {\r\n\t\t\t$stmt = getDB ()->prepare ( \"INSERT INTO posts (id, title, content, post_date, edit_date, poster) VALUES(:id, :title, :content, NOW(), NOW(), :poster)\" );\r\n\t\t\t$stmt->execute ( array (\r\n\t\t\t\t\t\"id\" => $this->id,\r\n\t\t\t\t\t\"title\" => $this->title,\r\n\t\t\t\t\t\"content\" => $this->content,\r\n\t\t\t\t\t\"poster\" => $this->poster \r\n\t\t\t) );\r\n\t\t\t$this->id = getDB ()->lastInsertId ();\r\n\t\t\tLog::post ( \"INSERT\", \"POST(<a href='\" . makeLink ( \"blog\", \"view\", array (\r\n\t\t\t\t\t\"$this->id\" \r\n\t\t\t) ) . \"'>\" . $this->title . \"</a>) was created.\", session ( \"userId\" ) );\r\n\t\t\treturn $this->id;\r\n\t\t} catch ( Exception $ex ) {\r\n\t\t\tsetSession ( \"error\", $ex->getMessage () );\r\n\t\t}\r\n\t\treturn - 1;\r\n\t}", "public function insert(){\n\t\t\n\t\t/* IMAGE IS MANDATORY */\n\t\tif($this->image->insert()){\n\t\t\t\n\t\t\t$this->imageID = $this->image->id();\n\t\t\t\n\t\t\t$insert = sprintf(\"INSERT INTO \".$this->_table.\" \n\t\t\t\t(imageID, title, description, status, rank) \n\t\t\t\tVALUES (%d, %s, %s, %s, %d)\",\n\t\t\t\tSanitize::input($this->imageID, \"int\"),\n\t\t\t\tSanitize::input($this->title, \"text\"),\n\t\t\t\tSanitize::input($this->description, \"editor\"), \n\t\t\t\tSanitize::input($this->status, \"text\"), \n\t\t\t\tSanitize::input($this->rank, \"int\"));\n\t\t\t\n\t\t\tif($this->query($insert)){ \n\t\t\t\t\n\t\t\t\t$this->setInsertId();\n\t\t\t\t\n\t\t\t\taddMessage('success', $this->_title.' was saved successfully');\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else { \n\t\t\t\taddMessage('error','Error updating '.$this->_title);\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\t\n\t\t} else {\n\t\t\taddMessage('error','Slider image is required');\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t}", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'id' => $this->id,\n 'name' => $this->name,\n 'image_url' => $this->image_url\t\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "protected function Insert()\n\t{\n\t $gCms = cmsms();\n\t global $sql_queries, $debug_errors;\n\t\t$db = $gCms->GetDb();\n\t\t$config = $gCms->GetConfig();\n\n\t\t$result = false;\n\n\t\t#Figure out the item_order\n\t\tif ($this->mItemOrder < 1)\n\t\t{\n\t\t\t$query = \"SELECT max(item_order) as new_order FROM \".cms_db_prefix().\"content WHERE parent_id = ?\";\n\t\t\t$row = $db->Getrow($query, array($this->mParentId));\n\n\t\t\tif ($row)\n\t\t\t{\n\t\t\t\tif ($row['new_order'] < 1)\n\t\t\t\t{\n\t\t\t\t\t$this->mItemOrder = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->mItemOrder = $row['new_order'] + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$newid = $db->GenID(cms_db_prefix().\"content_seq\");\n\t\t$this->mId = $newid;\n\n\t\t$this->mModifiedDate = $this->mCreationDate = trim($db->DBTimeStamp(time()), \"'\");\n\n\t\t$query = \"INSERT INTO \".$config[\"db_prefix\"].\"content (content_id, content_name, content_alias, type, owner_id, parent_id, template_id, item_order, hierarchy, id_hierarchy, active, default_content, show_in_menu, cachable, secure, page_url, menu_text, markup, metadata, titleattribute, accesskey, tabindex, last_modified_by, create_date, modified_date) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\n\t\t$dbresult = $db->Execute($query, array(\n\t\t\t$newid,\n\t\t\t$this->mName,\n\t\t\t$this->mAlias,\n\t\t\tstrtolower($this->mType),\n\t\t\t$this->mOwner,\n\t\t\t$this->mParentId,\n\t\t\t$this->mTemplateId,\n\t\t\t$this->mItemOrder,\n\t\t\t$this->mHierarchy,\n\t\t\t$this->mIdHierarchy,\n\t\t\t($this->mActive == true ? 1 : 0),\n\t\t\t($this->mDefaultContent == true ? 1 : 0),\n\t\t\t($this->mShowInMenu == true ? 1 : 0),\n\t\t\t($this->mCachable == true ? 1 : 0),\n\t\t\t$this->mSecure,\n\t\t\t$this->mURL,\n\t\t\t$this->mMenuText,\n\t\t\t$this->mMarkup,\n\t\t\t$this->mMetadata,\n\t\t\t$this->mTitleAttribute,\n\t\t\t$this->mAccessKey,\n\t\t\t$this->mTabIndex,\n\t\t\t$this->mLastModifiedBy,\n\t\t\t$this->mModifiedDate,\n\t\t\t$this->mCreationDate\n\t\t\t));\n\n\t\tif (! $dbresult)\n\t\t{\n\t\t die($db->sql.'<br/>'.$db->ErrorMsg());\n\t\t\tif ($config[\"debug\"] == true)\n\t\t\t{\n\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t$debug_errors .= \"<p>Error inserting content</p>\\n\";\n\t\t\t}\n\t\t}\n\n\t\tif (NULL != $this->mProperties)\n\t\t{\n\t\t\t# :TODO: There might be some error checking there\n\t\t\tdebug_buffer('save from ' . __LINE__);\n\t\t\t$this->mProperties->Save($newid);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (true == $config[\"debug\"])\n\t\t\t{\n\t\t\t\t# :TODO: Translate the error message\n\t\t\t\t$debug_errors .= \"<p>Error inserting : the content has no properties</p>\\n\";\n\t\t\t}\n\t\t}\n\t\tif (isset($this->mAdditionalEditors))\n\t\t{\n\t\t\tforeach ($this->mAdditionalEditors as $oneeditor)\n\t\t\t{\n\t\t\t\t$new_addt_id = $db->GenID(cms_db_prefix().\"additional_users_seq\");\n\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"additional_users (additional_users_id, user_id, content_id) VALUES (?,?,?)\";\n\t\t\t\t$db->Execute($query, array($new_addt_id, $oneeditor, $this->Id()));\n\t\t\t}\n\t\t}\n\t}", "private function setMediaId(int $id): void\n {\n $this->query->organisation->all_media->attribute('id', $id);\n }", "public function save()\n {\n // Get primary key\n $primary = $this->{$this->_primaryKey};\n\n if (null !== $primary && $primary > 0) {\n $this->update();\n } else {\n $this->insert();\n }\n }", "public function addMedia(Media $media)\n {\n $this->entity->addMedia($media->getEntity());\n }", "public function save() {\n\t\tif (!is_null($this->getId())) {\n\t\t\t$sql = 'update analytics set ';\n\t\t} else {\n\t\t\t$sql = 'insert into analytics set ';\n\t\t}\n\t\tif (!is_null($this->getContent())) {\n\t\t\t$sql .= '`content`=\"' . e($this->getContent()) . '\", ';\n\t\t}\n\t\t/*if (!is_null($this->getTimestamp())) {\n\t\t\t$sql .= '`timestamp`=\"' . $this->getTimestamp() . '\", ';\n\t\t}*/\n\t\tif (!is_null($this->getId())) {\n\t\t\t$sql .= 'id=\"' . $this->getId() . '\" where id=\"' . $this->getId() . '\"';\n\t\t} else {\n\t\t\t$sql = trim($sql, ', ');\n\t\t}\n\n\t\tDatabase::singleton()->query($sql);\n\t\tif (is_null($this->getId())) {\n\t\t\t$this->setId(Database::singleton()->lastInsertedID());\n\t\t\tself::__construct($this->getId());\n\t\t}\n\t}", "public function getIdMedia()\n {\n return $this->_idMedia;\n }", "function media_insert(){\r\n\tglobal $Translation;\r\n\r\n\tif($_GET['insert_x']!=''){$_POST=$_GET;}\r\n\r\n\t// mm: can member insert record?\r\n\t$arrPerm=getTablePermissions('media');\r\n\tif(!$arrPerm[1]){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t$data['type'] = makeSafe($_POST['type']);\r\n\t\tif($data['type'] == empty_lookup_value){ $data['type'] = ''; }\r\n\t$data['title'] = makeSafe($_POST['title']);\r\n\t\tif($data['title'] == empty_lookup_value){ $data['title'] = ''; }\r\n\t$data['artist'] = makeSafe($_POST['artist']);\r\n\t\tif($data['artist'] == empty_lookup_value){ $data['artist'] = ''; }\r\n\t$data['condition'] = makeSafe($_POST['condition']);\r\n\t\tif($data['condition'] == empty_lookup_value){ $data['condition'] = ''; }\r\n\t$data['price'] = makeSafe($_POST['price']);\r\n\t\tif($data['price'] == empty_lookup_value){ $data['price'] = ''; }\r\n\t$data['active'] = makeSafe($_POST['active']);\r\n\t\tif($data['active'] == empty_lookup_value){ $data['active'] = ''; }\r\n\t$data['description'] = makeSafe($_POST['description']);\r\n\t\tif($data['description'] == empty_lookup_value){ $data['description'] = ''; }\r\n\t$data['buttoncode'] = makeSafe($_POST['buttoncode']);\r\n\t\tif($data['buttoncode'] == empty_lookup_value){ $data['buttoncode'] = ''; }\r\n\t$data['buttonactive'] = makeSafe($_POST['buttonactive']);\r\n\t\tif($data['buttonactive'] == empty_lookup_value){ $data['buttonactive'] = ''; }\r\n\t$data['owner'] = parseCode('<%%creatorUsername%%>', true);\r\n\t$data['ip'] = parseCode('<%%creatorIP%%>', true);\r\n\t$data['date'] = parseCode('<%%creationDate%%>', true, true);\r\n\t$data['image'] = PrepareUploadedFile('image', 1024000,'jpg|jpeg|gif|png', false, '');\r\n\tif($data['image']) createThumbnail($data['image'], getThumbnailSpecs('media', 'image', 'tv'));\r\n\tif($data['image']) createThumbnail($data['image'], getThumbnailSpecs('media', 'image', 'dv'));\r\n\t$data['image2'] = PrepareUploadedFile('image2', 1024000,'jpg|jpeg|gif|png', false, '');\r\n\tif($data['image2']) createThumbnail($data['image2'], getThumbnailSpecs('media', 'image2', 'tv'));\r\n\tif($data['image2']) createThumbnail($data['image2'], getThumbnailSpecs('media', 'image2', 'dv'));\r\n\tif($data['type']== ''){\r\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Type': \" . $Translation['field not null'] . '<br /><br />';\r\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\r\n\t\texit;\r\n\t}\r\n\tif($data['title']== ''){\r\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Title': \" . $Translation['field not null'] . '<br /><br />';\r\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\r\n\t\texit;\r\n\t}\r\n\tif($data['artist']== ''){\r\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Artist': \" . $Translation['field not null'] . '<br /><br />';\r\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\r\n\t\texit;\r\n\t}\r\n\tif($data['condition']== ''){\r\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Condition': \" . $Translation['field not null'] . '<br /><br />';\r\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\r\n\t\texit;\r\n\t}\r\n\tif($data['price'] == '') $data['price'] = \"0.00\";\r\n\tif($data['price']== ''){\r\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Price': \" . $Translation['field not null'] . '<br /><br />';\r\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\r\n\t\texit;\r\n\t}\r\n\tif($data['active'] == '') $data['active'] = \"1\";\r\n\tif($data['active']== ''){\r\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Active': \" . $Translation['field not null'] . '<br /><br />';\r\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\r\n\t\texit;\r\n\t}\r\n\tif($data['description']== ''){\r\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Description': \" . $Translation['field not null'] . '<br /><br />';\r\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\r\n\t\texit;\r\n\t}\r\n\tif($data['buttonactive'] == '') $data['buttonactive'] = \"1\";\r\n\r\n\t// hook: media_before_insert\r\n\tif(function_exists('media_before_insert')){\r\n\t\t$args=array();\r\n\t\tif(!media_before_insert($data, getMemberInfo(), $args)){ return false; }\r\n\t}\r\n\r\n\t$o=array('silentErrors' => true);\r\n\tsql('insert into `media` set `type`=' . (($data['type'] !== '' && $data['type'] !== NULL) ? \"'{$data['type']}'\" : 'NULL') . ', `title`=' . (($data['title'] !== '' && $data['title'] !== NULL) ? \"'{$data['title']}'\" : 'NULL') . ', `artist`=' . (($data['artist'] !== '' && $data['artist'] !== NULL) ? \"'{$data['artist']}'\" : 'NULL') . ', `condition`=' . (($data['condition'] !== '' && $data['condition'] !== NULL) ? \"'{$data['condition']}'\" : 'NULL') . ', ' . ($data['image']!='' ? \"`image`='{$data['image']}'\" : ($_POST['image_remove'] != 1 ? '`image`=`image`' : '`image`=NULL')) . ', ' . ($data['image2']!='' ? \"`image2`='{$data['image2']}'\" : ($_POST['image2_remove'] != 1 ? '`image2`=`image2`' : '`image2`=NULL')) . ', `price`=' . (($data['price'] !== '' && $data['price'] !== NULL) ? \"'{$data['price']}'\" : 'NULL') . ', `active`=' . (($data['active'] !== '' && $data['active'] !== NULL) ? \"'{$data['active']}'\" : 'NULL') . ', `description`=' . (($data['description'] !== '' && $data['description'] !== NULL) ? \"'{$data['description']}'\" : 'NULL') . ', `buttoncode`=' . (($data['buttoncode'] !== '' && $data['buttoncode'] !== NULL) ? \"'{$data['buttoncode']}'\" : 'NULL') . ', `buttonactive`=' . (($data['buttonactive'] !== '' && $data['buttonactive'] !== NULL) ? \"'{$data['buttonactive']}'\" : 'NULL') . ', `owner`=' . \"'{$data['owner']}'\" . ', `ip`=' . \"'{$data['ip']}'\" . ', `date`=' . \"'{$data['date']}'\", $o);\r\n\tif($o['error']!=''){\r\n\t\techo $o['error'];\r\n\t\techo \"<a href=\\\"media_view.php?addNew_x=1\\\">{$Translation['< back']}</a>\";\r\n\t\texit;\r\n\t}\r\n\r\n\t$recID=mysql_insert_id();\r\n\r\n\t// hook: media_after_insert\r\n\tif(function_exists('media_after_insert')){\r\n\t\t$res = sql(\"select * from `media` where `id`='\" . makeSafe($recID) . \"' limit 1\", $eo);\r\n\t\tif($row = mysql_fetch_assoc($res)){\r\n\t\t\t$data = array_map('makeSafe', $row);\r\n\t\t}\r\n\t\t$data['selectedID'] = makeSafe($recID);\r\n\t\t$args=array();\r\n\t\tif(!media_after_insert($data, getMemberInfo(), $args)){ return (get_magic_quotes_gpc() ? stripslashes($recID) : $recID); }\r\n\t}\r\n\r\n\t// mm: save ownership data\r\n\tsql(\"insert into membership_userrecords set tableName='media', pkValue='$recID', memberID='\".getLoggedMemberID().\"', dateAdded='\".time().\"', dateUpdated='\".time().\"', groupID='\".getLoggedGroupID().\"'\", $eo);\r\n\r\n\treturn (get_magic_quotes_gpc() ? stripslashes($recID) : $recID);\r\n}", "public function save() {\r\n //daca NU se face INSERT\r\n if($this->getId() == true){\r\n $this->update();\r\n }else {\r\n $this->insert();\r\n }\r\n }", "public function insert()\n { if (!is_null($this->id))\n trigger_error(\"Reaction::insert(): Attempt to insert a Reaction object that already has its ID property set (to $this->id).\", E_USER_ERROR);\n\n // Insert the Reaction\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"INSERT INTO reaction ( Transformation, Result, `Procedure`, ReferenceID , UserID) VALUES ( :transformation, :result, :procedure, :referenceID, :userID )\";\n $st = $conn->prepare($sql);\n \n $st->bindValue(\":transformation\", $this->transformation, PDO::PARAM_STR);\n\t$st->bindValue(\":result\", $this->result, PDO::PARAM_INT);\n\t$st->bindValue(\":procedure\", $this->procedure, PDO::PARAM_LOB); \n $st->bindValue(\":referenceID\", $this->referenceID, PDO::PARAM_INT); \n $st->bindValue(\":userID\", $this->userID, PDO::PARAM_INT); \n \n $st->execute(); \n $this->id = $conn->lastInsertId(); \n $conn = null;\n return $this->id; \n }", "public function testInsertObject()\n {\n $this->assertEquals(0, $this->manager->count('Artist', 'slug=\"insert-test\"'));\n \n $artist = new Demo\\Artist();\n $artist->artistTypeId = 1;\n $artist->name = 'Insert Test';\n $artist->slug = 'insert-test';\n $this->manager->insert($artist);\n \n $this->assertGreaterThan(0, $artist->artistId);\n \n $this->assertEquals(1, $this->manager->count('Artist', 'slug=\"insert-test\"'));\n }", "public function uploadMedias($id, $mediaID = 0, $type = MEDIA_VIDEO, $file='') {\n\t\t$g = $this->getGameByID($id);\n\t\t$image = new Image();\n\t\tif($file!='') $result = $image->uploadImages(FOLDER_GAMES, '', $file);\n\t\telse $result = $image->uploadImages(FOLDER_GAMES);\n\t\tif ($result['filename'] != '') {\n\t\t\t$media = new SnMedia();\n\t\t\t$media->ID_OWNER = $g->ID_GAME;\n\t\t\t$media->OwnerType = WALL_GAMES;\n\t\t\t$media->MediaType = ContentHelper::handleContentInput($type);\n\t\t\t$media->MediaDesc = ContentHelper::handleContentInput($result['filename']);\n\t\t\t$media->MediaName = ContentHelper::handleContentInput($result['original_name']);\n\t\t\t$media->insert();\n\n\t\t\t$result['media'] = $media;\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getMediaId() {\n\t\treturn $this->mediaId;\n\t}", "public function insert()\n {\n $columns = [];\n $params = [];\n\n foreach ($this as $key => $value) {\n if ($key == 'bd') {\n continue;\n }\n $columns[] = $key;\n $params[\":{$key}\"] = $value;\n }\n\n $columnsString = implode(', ', $columns);\n $placeholders = implode(', ', array_keys($params));\n $tableName = static::getTableName();\n $sql = \"INSERT INTO {$tableName} ({$columnsString})\n VALUES ({$placeholders})\";\n $this->bd->execute($sql, $params);\n $this->id = $this->bd->lastInsertId();\n }", "protected function _insert()\n {\n $this->_update();\n }", "public function save() {\n\n $query = DB::connection()->prepare('INSERT INTO BandGenre (band_id, genre_id) VALUES (:band, :genre)');\n\n $query->execute(array('band' => $this->band_id, 'genre' =>\n $this->genre_id));\n }", "function insert($league_id, $media_id, $media_type, $media_length, $url=false){\n\t\tif($url){\n\t\t\t$query = \n\t\t\t\t\"INSERT INTO leagueinviter_media (league_id, media_id, media_type, media_length, url) VALUES ('$league_id', '$media_id', '$media_type', '$media_length', '$url')\";\n\t\t} else {\n\t\t\t$query = \n\t\t\t\t\"INSERT INTO leagueinviter_media (league_id, media_id, media_type) VALUES ('$league_id', '$media_id', '$media_type')\";\t\t\n\t\t}\t\t\n\t\treturn $this->DB->query($query);\n\t}", "public function save() {\n if (!$this->getId()) {\n $this->setUrlHash(md5($this->getUrl()));\n $this->setC(time());\n if (!$this->getAlias()) {\n $this->setAlias(array(md5($this->getUrl())));\n }\n }\n $this->setU(time());\n\n $dm = MongoManager::getDM();\n $dm->persist($this);\n $dm->flush;\n }", "public function save() {\r\n //instanciates new database object\r\n $db = Db::instance();\r\n // omit id and any timestamps\r\n $db_properties = array(\r\n 'title' => $this->title,\r\n 'price' => $this->price,\r\n 'image_url' => $this->image_url,\r\n );\r\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\r\n }", "public function delete() {\n \n // Does the Media object have an ID?\n if ( is_null( $this->mediaId ) ) trigger_error ( \"Media::delete(): Attempt to delete an Media object that does not have its ID property set.\", E_USER_ERROR );\n \n // Delete the Media\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM media WHERE mediaId = :mediaId LIMIT 1\" );\n $st->bindValue( \":mediaId\", $this->mediaId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "public function Create()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t\t\t\n\t\t\t$json = json_decode(RequestUtil::GetBody());\n\n\t\t\tif (!$json)\n\t\t\t{\n\t\t\t\tthrow new Exception('The request body does not contain valid JSON');\n\t\t\t}\n\n\t\t\t$media = new Media($this->Phreezer);\n\n\t\t\t// TODO: any fields that should not be inserted by the user should be commented out\n\r\n\t\t\t// this is an auto-increment. uncomment if updating is allowed\n\t\t\t// $media->Idmedia = $this->SafeGetVal($json, 'idmedia');\n\n\t\t\t$media->Idhistory = $this->SafeGetVal($json, 'idhistory');\n\t\t\t$media->Storage = $this->SafeGetVal($json, 'storage');\n\t\t\t$media->Iddocumentation = $this->SafeGetVal($json, 'iddocumentation');\n\t\t\t$media->Institution = $this->SafeGetVal($json, 'institution');\n\t\t\t$media->Idreference = $this->SafeGetVal($json, 'idreference');\n\t\t\t$media->Mediatype = $this->SafeGetVal($json, 'mediatype');\n\t\t\t$media->Mediaurl = $this->SafeGetVal($json, 'mediaurl');\n\t\t\t$media->Digitizationdate = date('Y-m-d H:i:s',strtotime($this->SafeGetVal($json, 'digitizationdate')));\n\t\t\t$media->Digitizationresponsable = $this->SafeGetVal($json, 'digitizationresponsable');\n\t\t\t$media->Polarity = $this->SafeGetVal($json, 'polarity');\n\t\t\t$media->Colorspace = $this->SafeGetVal($json, 'colorspace');\n\t\t\t$media->Iccprofile = $this->SafeGetVal($json, 'iccprofile');\n\t\t\t$media->Xresolution = $this->SafeGetVal($json, 'xresolution');\n\t\t\t$media->Yresolution = $this->SafeGetVal($json, 'yresolution');\n\t\t\t$media->Thumbnail = $this->SafeGetVal($json, 'thumbnail');\n\t\t\t$media->Digitizationequipment = $this->SafeGetVal($json, 'digitizationequipment');\n\t\t\t$media->Format = $this->SafeGetVal($json, 'format');\n\t\t\t$media->Ispublic = $this->SafeGetVal($json, 'ispublic');\n\t\t\t$media->Ordername = $this->SafeGetVal($json, 'ordername');\n\t\t\t$media->Sent = $this->SafeGetVal($json, 'sent');\n\t\t\t$media->Exif = $this->SafeGetVal($json, 'exif');\n\t\t\t$media->Textual = $this->SafeGetVal($json, 'textual');\n\t\t\t$media->Sizemedia = $this->SafeGetVal($json, 'sizemedia');\n\t\t\t$media->Nameoriginal = $this->SafeGetVal($json, 'nameoriginal');\n\t\t\t$media->Mainmedia = $this->SafeGetVal($json, 'mainmedia');\n\t\t\t$media->Mediadir = $this->SafeGetVal($json, 'mediadir');\n\t\t\t$media->Thumbnaildir = $this->SafeGetVal($json, 'thumbnaildir');\n\t\t\t$media->Thumbnailurl = $this->SafeGetVal($json, 'thumbnailurl');\n\n\t\t\t$media->Validate();\r\n\t\t\t$errors = $media->GetValidationErrors();\n\n\t\t\tif (count($errors) > 0)\r\n\t\t\t{\n\t\t\t\t$this->RenderErrorJSON('Please check the form for errors',$errors);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$media->Save();\n\t\t\t\t$this->RenderJSON($media, $this->JSONPCallback(), true, $this->SimpleObjectParams());\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "protected function insertAttributesIntoDb()\n\t{\n\t\tif ($this->timestamps && is_null($this->getCreatedAt()))\n\t\t{\n\t\t\t$this->setCreatedAt(now());\n\t\t}\n\n\t\tif ($this->microtime && is_null($this->getAttribute(static::CREATED_MICRO_AT)))\n\t\t{\n\t\t $this->setAttribute(static::CREATED_MICRO_AT, microtime(true));\n\t\t}\n\n\t\t$id = $this->insertData($this->getAttributes());\n\n\t\tif (($key = $this->getKeyName()) && is_null($this->getKey()))\n\t\t{\n\t\t\t$this->setAttribute($key, $id);\n\t\t}\n\t}", "public function save()\n {\n $table = $this->table();\n if ($this->exists()) {\n $table->update($this->toRowArray(), $this->where());\n } else {\n $table->insert($this->toRowArray());\n $this->_id = $table->getAdapter()->lastInsertId();\n }\n }", "public function createNewMedia($params) {\n\t\t// Insert data in table\n\t\t$prep = $this->db->prepare('\n\t\t\tINSERT INTO media_list(fileID, hash, filename, mime, extension, state)\n\t\t\tVALUES(:fileID, :hash, :filename, :mime, :extension, :state)\n\t\t');\n\n\t\t$prep->bindParam(':fileID', $params['fileID']);\n\t\t$prep->bindParam(':hash', $params['hash']);\n\t\t$prep->bindParam(':filename', $params['filename']);\n\t\t$prep->bindParam(':mime', $params['mime']);\n\t\t$prep->bindParam(':extension', $params['extension']);\n\t\t$prep->bindParam(':state', $params['state']);\n\n\t\treturn $prep->execute();\n\t}", "public function store()\n {\n // Check whether the object has ever been stored.\n if ($this->isNew) {\n Logger::get()->debug('Storing new entity ' . get_class($this) . '...');\n // Create the record. Get an ID back.\n $this->id = $this->getDataSource()->create($this->getFieldsData());\n // Store this object in the appropriate factory for further use.\n $this->getFactory()->registerEntity($this);\n } else {\n Logger::get()->debug('Updating entity ' . get_class($this) . \":{$this->id}...\");\n $this->getDataSource()->update($this->id, $this->getFieldsData());\n }\n\n // Once stored, the entity is no longer new.\n $this->isNew = false;\n }", "private function insert(){\n if($this->timeStamps && is_null($this->created_at)){\n $this->created_at = date(\"Y-m-d H:i:s\");\n $this->updated_at = date(\"Y-m-d H:i:s\");\n }\n $insertID = self::getConnection()->insert(self::getTable(),$this->attributes);\n\n $this->{self::getPrimaryKey()} = $insertID;\n\n $this->isNew = false;\n }", "public function save(MediaItem $item)\r\n {\r\n $this->getEntityManager()->persist($item);\r\n $this->getEntityManager()->flush();\r\n\r\n return $item;\r\n }", "public function storeMedia(UploadPostMedia $UploadPostMedia, $id) \n {\n $shop = Posts::find($id);\n\n $UploadPostMedia->upload($request, $shop, 'shops');\n \n return (new ShopsResource($shop))\n ->response()\n ->setStatusCode(201);\n }", "public function save ()\r\n {\r\n if ($this->isNew())\r\n $this->insert();\r\n else\r\n $this->update();\r\n }", "public function saveObject($media, $request){\n $file = $request->file('file');\n $this->linkRelatedArticle($request);\n $article = $request->model::findOrFail($request->article_id);\n if(!empty($request->file) && !empty($article)){\n if(!empty($media)){\n $media->delete();\n }\n // Store new media\n list($width, $height) = getimagesize($file);\n $file_name = $file->getClientOriginalName();\n $orig_name = pathinfo($file_name, PATHINFO_FILENAME);\n $extension = $file->getClientOriginalExtension();\n $name = str_slug($orig_name).'.'.$extension;\n $new_media = $article->addMediaFromRequest('file')->usingFileName($name)->withCustomProperties(['width' => $width, 'height' => $height])->toMediaCollection();\n }\n return redirect()->route('admin.medias.index');\n }", "function save(){\n $statement = $GLOBALS['DB']->exec(\"INSERT INTO reviews (beer_id, user_id, review, review_date)\n VALUES ({$this->getBeerId()}, {$this->getUserId()}, '{$this->getReview()}', '{$this->getReviewDate()}');\");\n $this->id = $GLOBALS['DB']->lastInsertId();\n }", "public function save (){\n\t\t$table = Website_Model_CbFactory::factory('Website_Model_MysqlTable', 'product');\n\t\tif (!$this->id) {\n\t\t\t$data = $this->databaseRepresentation();\n\t\t\t$data['insertDate'] = $this->insertDate = date(Website_Model_DateFormat::PHPDATE2MYSQLTIMESTAMP);\n\t\t\t$this->id = $table->insert($data);\n\t\t}\n\t\telse {\n\t\t\t$table->update($this->databaseRepresentation(),'id='.$this->id);\n\t\t}\n\t}", "public function save() {\n $result = parent::save();\n $entityID = ($this->getMode() == QAL::INSERT) ? $result\n : $this->getData()->getFieldByName($this->pk)->getRowData(0);\n $tm = new TagManager($this->dataDescription, $this->data, $this->mainTableName);\n $tm->save($entityID);\n\n // обновление записей из _uploads таблицы, в которых PK = NULL по ID сессии\n if ($result && $this->dbh->tableExists($this->getTableName() . AttachmentManager::ATTACH_TABLE_SUFFIX)) {\n $id = (is_int($result)) ? $result : (int)$_POST[$this->getTableName()][$this->getPK()];\n //throw new SystemException($id);\n $this->dbh->modify(\n QAL::UPDATE,\n $this->getTableName() . AttachmentManager::ATTACH_TABLE_SUFFIX,\n array(\n $this->getPK() => $id\n ),\n array(\n $this->getPK() => null,\n 'session_id' => session_id()\n )\n );\n }\n\n return $result;\n }", "protected abstract function doInsert( Content $object );", "public function save()\n\t{\n\t\t$table = $this->table();\n\t\tif ($this->exists()) {\n\t\t\t$table->update($this->toRowArray(), $this->where());\n\t\t} else {\n\t\t\t$table->insert($this->toRowArray());\n\t\t\t$this->_id = $table->getAdapter()->lastInsertId();\n\t\t}\n\t}", "public function save()\n\t{\n\t\t$table = $this->table();\n\t\tif ($this->exists()) {\n\t\t\t$table->update($this->toRowArray(), $this->where());\n\t\t} else {\n\t\t\t$table->insert($this->toRowArray());\n\t\t\t$this->_id = $table->getAdapter()->lastInsertId();\n\t\t}\n\t}", "public function insert() {\n if (!is_null($this->id))\n trigger_error(\"ReactionContributor::insert(): Attempt to insert a ReactionContributor object that already has its ID property set (to $this->id).\", E_USER_ERROR);\n \n // Insert the Tag\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"INSERT INTO reaction_contributor ( ReactionID, ContributorID, Role, Comment ) VALUES ( :reactionID, :contributorID, :role, :comment )\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":reactionID\", $this->reactionID, PDO::PARAM_INT);\n $st->bindValue(\":contributorID\", $this->contributorID, PDO::PARAM_INT);\n $st->bindValue(\":role\", $this->role, PDO::PARAM_STR);\n $st->bindValue(\":comment\", $this->comment, PDO::PARAM_STR);\n $st->execute();\n $this->id = $conn->lastInsertId();\n $conn = null;\n }", "public function AddMultimedia($mmid = 0)\n\t{\tif ($this->id && ($mmid = (int)$mmid))\n\t\t{\tif ((!$mmlist = $this->GetMultiMedia()) || !$mmlist[$mmid])\n\t\t\t{\t$sql = 'INSERT INTO storeproducts_mm SET prodid=' . $this->id . ', mmid=' . $mmid;\n\t\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t\t{\treturn $this->db->AffectedRows();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function upload()\n {\n $model = config('nova-mediable-manager.model');\n\n $media = new $model();\n\n $media->name = $this->name;\n $media->file_name = $this->fileName;\n $media->disk = $this->disk ?: config('nova-mediable-manager.disk');\n $media->mime_type = $this->file->getMimeType();\n $media->size = $this->file->getSize();\n\n $media->forceFill($this->attributes);\n\n $media->save();\n\n $media->filesystem()->putFileAs(\n $media->getDirectory(),\n $this->file,\n $this->fileName\n );\n\n return $media->fresh();\n }", "private function insert()\n {\n $this->beforeInsert(); \n $sequenceId = $this->getSequenceNextValue();\n $autoincrementId = $this->dbConnection->insert(\n $this->table,\n array_intersect_key($this->activeRecord, array_flip($this->fields()))\n );\n $id = !empty($autoincrementId) ? $autoincrementId : $sequenceId;\n $this->loadRecordAfterInsert($id);\n $this->afterInsert($id);\n return $id;\n }", "protected function performInsert(): void\n {\n // Here we will populate the models object classes if it\n // does not already have any set. An LDAP object cannot\n // be successfully created in the server without them.\n if (! $this->hasAttribute('objectclass')) {\n $this->setAttribute('objectclass', static::$objectClasses);\n }\n\n $query = $this->newQuery();\n\n // If the model does not currently have a distinguished\n // name, we will attempt to generate one automatically\n // using the current query builder's DN as the base.\n if (empty($this->getDn())) {\n $this->setDn($this->getCreatableDn());\n }\n\n $this->dispatch('creating');\n\n // Here we perform the insert of new object in the directory,\n // but filter out any empty attributes before sending them\n // to the server. LDAP servers will throw an exception if\n // attributes have been given empty or null values.\n $query->insert($this->getDn(), array_filter($this->getAttributes()));\n\n $this->dispatch('created');\n\n $this->syncOriginal();\n\n $this->exists = true;\n\n $this->wasRecentlyCreated = true;\n }", "public function persist() {\r\n $table = \\DenDad\\libs\\Support::getClassName($this);\r\n if (!isset($this->_primaryKey)) {\r\n throw new \\DenDad\\exceptions\\ModelException('Primary key not set for' .\r\n 'model ' . $table, \r\n \\DenDad\\exceptions\\ModelException::MISSING_PRIMARY_KEY);\r\n }\r\n \r\n if (isset($this->{$this->_primaryKey}) && \r\n $this->recordExists()) {\r\n $columns = $this->getColumnMap();\r\n \r\n $sql = 'UPDATE ' . $table . ' SET';\r\n $sqlColumns = ' ';\r\n $sqlValues = array();\r\n foreach($columns as $col => $val) {\r\n if ($col != $this->_primaryKey) {\r\n if ($sqlColumns != ' ') {\r\n $sqlColumns .= ', ';\r\n }\r\n $sqlColumns .= $col . '=:' . $col;\r\n $sqlValues[':' . $col] = $val;\r\n }\r\n }\r\n \\error_log(\\print_r($sqlValues, true));\r\n $db_comm = self::connection()->prepare($sql . $sqlColumns .\r\n ' WHERE ' . $this->_primaryKey . '=:' . $this->_primaryKey);\r\n $sqlValues[':' . $this->_primaryKey] = $columns[$this->_primaryKey];\r\n if (!$db_comm->execute($sqlValues)) {\r\n throw new \\DenDad\\exceptions\\ModelException('Unable to persist' .\r\n ' record [' . $this->_primaryKey . '=' . $id . ']' .\r\n ' in table ' . $table . '.',\r\n \\DenDad\\exceptions\\ModelException::MISSING_RECORD);\r\n }\r\n } else {\r\n $columns = $this->getColumnMap();\r\n \r\n $sql = 'INSERT INTO ' . $table . ' (';\r\n $sqlColumns = '';\r\n $sqlValues = array();\r\n foreach($columns as $col => $val) {\r\n if ($col != $this->_primaryKey || (!$this->_primaryKeyAI && \r\n $col == $this->_primaryKey)) {\r\n if ($sqlColumns == '') { \r\n $sqlColumns = ' (';\r\n } else {\r\n $sql .= ', ';\r\n $sqlColumns .= ', ';\r\n }\r\n $sql .= $col;\r\n $sqlColumns .= ':' . $col;\r\n $sqlValues[':' . $col] = $val;\r\n }\r\n }\r\n \r\n $db_comm = self::connection()->prepare($sql . ') VALUES ' . $sqlColumns . ')');\r\n if (!$db_comm->execute($sqlValues)) {\r\n if ($this->_primaryKeyAI) {\r\n throw new \\DenDad\\exceptions\\ModelException('Unable to persist' .\r\n ' record in table ' . $table . '.',\r\n \\DenDad\\exceptions\\ModelException::MISSING_RECORD);\r\n } else {\r\n throw new \\DenDad\\exceptions\\ModelException('Unable to persist' .\r\n ' record [' . $this->_primaryKey . '=' . $id . ']' .\r\n ' in table ' . $table . '.',\r\n \\DenDad\\exceptions\\ModelException::MISSING_RECORD);\r\n }\r\n }\r\n }\r\n }", "public function save()\n {\n if ($this->getId() > 0) {\n return $this->_update();\n } else {\n return $this->_insert();\n }\n }", "public function save()\n {\n if ($this->getId() > 0) {\n return $this->_update();\n } else {\n return $this->_insert();\n }\n }", "public function insert() {\n\t\t// Insert a new entity\n\t\t$query = Model\\Database::get()->prepare(\"\n\t\t\tINSERT INTO `entity` (\n\t\t\t\t`book_id`,\n\t\t\t\t`entity_group_id`,\n\t\t\t\t`entity_type`,\n\t\t\t\t`entity_title`,\n\t\t\t\t`entity_image`,\n\t\t\t\t`entity_content`,\n\t\t\t\t`entity_created`\n\t\t\t) VALUES (\n\t\t\t\t:book_id,\n\t\t\t\t:entity_group_id,\n\t\t\t\t:entity_type,\n\t\t\t\t:entity_title,\n\t\t\t\t:entity_image,\n\t\t\t\t:entity_content,\n\t\t\t\t:entity_created\n\t\t\t)\n\t\t\");\n\n\t\t// And execute query\n\t\t$query->execute(array(\n\t\t\t':book_id' => $this->book_id,\n\t\t\t':entity_group_id' => $this->entity_group_id,\n\t\t\t':entity_type' => $this->entity_type,\n\t\t\t':entity_title' => $this->entity_title,\n\t\t\t':entity_image' => $this->entity_image,\n\t\t\t':entity_content' => $this->entity_content,\n\t\t\t':entity_created' => $this->entity_created\n\t\t));\n\n\t\t// Assign the section ID to this section\n\t\t$this->entity_id = Model\\Database::get()->lastInsertId();\n\t}", "function insertObject(&$press) {\n\t\t$this->update(\n\t\t\t'INSERT INTO presses\n\t\t\t\t(path, seq, enabled, primary_locale)\n\t\t\t\tVALUES\n\t\t\t\t(?, ?, ?, ?)',\n\t\t\tarray(\n\t\t\t\t$press->getPath(),\n\t\t\t\t(int) $press->getSequence(),\n\t\t\t\t(int) $press->getEnabled(),\n\t\t\t\t$press->getPrimaryLocale()\n\t\t\t)\n\t\t);\n\n\t\t$press->setId($this->getInsertId());\n\t\treturn $press->getId();\n\t}", "function Save()\n\t{\n\t $gCms = cmsms();\n\t Events::SendEvent('Core', 'ContentEditPre', array('content' => &$this));\n\n\t if ($this->mPropertiesLoaded == false)\n\t {\n\t debug_buffer('save is loading properties');\n\t $this->mProperties->Load($this->mId);\n\t $this->mPropertiesLoaded = true;\n\t }\n\n\t if (-1 < $this->mId)\n\t {\n\t $this->Update();\n\t }\n\t else\n\t {\n\t $this->Insert();\n\t }\n\n\t Events::SendEvent('Core', 'ContentEditPost', array('content' => &$this));\n\t}", "public function add(){\n\t\t$this->dao->connect();\n\t\t$table = get_class($this);\n\t\t$fields = $this->my_get_object_vars();\n\t\t\n\t\t$rs = $this->dao->db->AutoExecute($table, $fields, \"INSERT\") or $this->throwException($this->dao->db->ErrorMsg() . \"<br>CENAS SQL: \".var_export($fields,true). \" - Table: \".$table);\n\t\t$id = $this->dao->db->Insert_ID();\n\t\t\n\t\t$this->dao->disconnect();\n\t\treturn $id;\n\t}", "public function store(Request $request) {\n /* ---- RECUPERATIONS DES DONNEES RECUES ---- */\n $dataMedia['title'] = $request->title;\n $dataMedia['legend'] = $request->legend;\n $theMedia = $request->files->get('media');\n\n /* ---- VALIDATIONS ---- */\n $validMediaData = Media::isDataValid($dataMedia);\n $mediaMaxSize = 2000000;\n $allowedTypes = array('gif', 'jpeg', 'jpg', 'mp4', 'png', 'webm'); // Types de fichiers acceptes\n $validMedia = Media::isValid($theMedia, $allowedTypes, $mediaMaxSize);\n\n if ($theMedia != null && $validMediaData != false && $validMedia != false) {\n DB::transaction(function () use ($dataMedia, $theMedia) {\n // Creer le media\n $mediaDestination = \"../public/img/generalMedias\";\n $mediaDestinationShortened = \"img/generalMedias\";\n $media = new Media();\n $media->title = $dataMedia['title'];\n $media->legend = $dataMedia['legend'];\n $media->url = $mediaDestinationShortened . '/' . $theMedia->getClientOriginalName();\n $videoTypes = array('mp4', 'webm'); // Par la suite nous pourrions faire d'autre check pour des fichiers audios etc etc (en fonction de nos types de MediaTypes)\n if (in_array($theMedia->getClientOriginalExtension(), $videoTypes)) { // Si le media reçu est une vidéo\n $media->mediatype_id = 1; // Alors on set que c est une photo\n } else { // Si le media recu est une photo\n $media->mediatype_id = 2; // Alors on set que c est une photo\n }\n $media->save();\n $theMedia->move($mediaDestination, $theMedia->getClientOriginalName()); // Déplace la photo dans le dossier voulu\n // Sauvegarde du média dans l'édition actuelle\n $currentEdition = Edition::all()->sortByDesc(\"year\")->first();\n $currentEdition->medias()->save($media);\n });\n return redirect()->back();// Fin de la transaction\n } else {\n // PROBLEMMEEEEEEEE\n dd('léger soucis là couz1');\n }\n }", "public function save(){\n $object_row = $this->getDatabaseObjectRow(); \n \n if( !$this->id ){\n $this->id = $this->getNewId();\n }\n \n $object_data = $this->getObjectData( $object_row );\n \n $object_row->setFromArray( $object_data ); \n $object_row->save();\n\t\t\n\t\treturn (int) $object_row->id;\n }", "function insert(){\r\n\t\t\t$dbo = database::getInstance();\r\n\t\t\t$sql = $this->buildQuery('insert');\r\n\t\t\t$dbo->doQuery($sql);\r\n\r\n\t\t}", "public function run()\n {\n DB::table('media')->insert([\n 'id' => 1,\n 'name' => 'Kisalföld',\n 'frakcio_id' => 1,\n 'tipus' => 2,\n 'status_id' => 1,\n ]);\n\n DB::table('media')->insert([\n 'id' => 2,\n 'name' => 'Győr+',\n 'frakcio_id' => 1,\n 'tipus' => 2,\n 'status_id' => 1,\n ]);\n\n DB::table('media')->insert([\n 'id' => 3,\n 'name' => 'Origo',\n 'frakcio_id' => null,\n 'tipus' => 1,\n 'status_id' => 1,\n ]);\n }", "public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Media::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tMedia::create($data);\n\n\t\tSession::flash('message', 'Input Berhasil.');\n\t\treturn Redirect::route('medias.index');\n\t}", "public function setId() {\n\t\t$this -> id = genUuid();\n\t\t$this -> save();\n\t}", "function addNewMusic($musicInfo)\n {\n $this->db->trans_start();\n $this->db->insert($this->table_name, $musicInfo);\n \n $insert_id = $this->db->insert_id();\n \n $this->db->trans_complete();\n \n return $insert_id;\n }", "public function addMedia(MediaInterface $media): ItemInterface;", "public function save()\n {\n if($this->getId()) {\n return $this->update();\n } else {\n return $this->insert();\n }\n }", "public function save(){\n $db = Db::instance();\n\n $db_properties = array(\n 'id' => $this->picid,\n 'username' => $this->username,\n 'numvotes' => $this->numvotes,\n 'numflags' => $this->numflags,\n 'date' => $this->date,\n 'file' => $this->file\n );\n\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "function insertToDatabase(){\r\n\t\t$id = $this->getSignupId();\r\n\t\t$questionString = $this->getQuestion();\r\n\t\t$type = $this->getType();\r\n\t\t$options = CommonTools::arrayToSql($this->getOptions());\r\n\t\t$public = CommonTools::booleanToSql($this->getPublic());\r\n\t\t$required = CommonTools::booleanToSql($this->getRequired());\r\n\r\n\t\t$sql = \"INSERT INTO ilmo_questions \" . \r\n\t \t\t\"(ilmo_id, question, type, options, public, required) \" . \r\n\t \t\t\"VALUES \" .\r\n\t \t\t\"($id, '$questionString', '$type', '$options', \" .\r\n\t \t\t\"$public, $required)\";\r\n\t \t\t\r\n\t \t// do query\r\n\t\t$this->database->doQuery($sql);\r\n\t}", "public function create(){\n\t\tif ($this->isExists())\n\t\t\treturn;\n\t\t\n\t\t$query = \"INSERT INTO `\".$this->_getTableName().\"` \".\n\t\t\t\t\t$this->_prepareSqlToInsert();\n\t\t\n\t\tif (!M::q($query)){\n\t\t\tprint_r(M::e());\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$this->id = M::lastId();\n\n\t\treturn intval($this->getId());\n\t}", "public function insertMedia($infos, $files = NULL)\n\t\t{\n\t\t\textract($infos);\n\n\t\t\tif ($media_type_id == 4)\n\t\t\t{\n\t\t\t\t$query = \"INSERT INTO `medias`(`title`,\n\t\t\t\t\t\t\t\t\t\t\t `media_types_id`,\n\t\t\t\t\t\t\t\t\t\t\t `media_subtype`,\n\t\t\t\t\t\t\t\t\t\t\t `resum`,\n\t\t\t\t\t\t\t\t\t\t\t `active`) \n\t\t\t\t\t \t VALUES (?,?,?,?,?)\";\n\n\t\t\t\t$param = array($title,\n\t\t\t\t\t\t \t $media_type_id,\n\t\t\t\t\t\t \t $media_sous_type_id,\n\t\t\t\t\t\t $resum,\n\t\t\t\t\t\t 1\n\t\t\t\t);\n\n\t\t\t\tmyQuery($query, 'insert', $param);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query = \"INSERT INTO `medias`(`title`,\n\t\t\t\t\t\t\t\t\t\t \t `media_types_id`,\n\t\t\t\t\t\t\t\t\t\t \t `category_id`,\n\t\t\t\t\t\t\t\t\t\t \t `resum`,\n\t\t\t\t\t\t\t\t\t\t \t `active`) \n\t\t\t\t\t \t VALUES (?,?,?,?,?)\";\n\n\t\t\t\t$param = array($title,\n\t\t\t\t\t\t \t $media_type_id,\n\t\t\t\t\t\t \t $categorie_id,\n\t\t\t\t\t\t $resum,\n\t\t\t\t\t\t 1\n\t\t\t\t);\n\n\t\t\t\tmyQuery($query, 'insert', $param);\n\t\t\t}\n\n\t\t\t$id_media = getId($title, 'media');\n\t\t\t$id_user = $_SESSION['id_user'];\n\n\t\t\t$query1 = \"INSERT INTO `medias_has_users` VALUES (?,?)\";\n\t\t\t$param1 = array($id_media, $id_user);\n\n\t\t\tmyQuery($query1, 'insert', $param1);\n\n\t\t\t\n\t\t\tif ($media_type_id == 1 || $media_type_id == 2)\n\t\t\t{\n\t\t\t\t$query2 = \"INSERT INTO `contents`(`medias_id`,\n\t\t\t\t\t\t\t\t\t\t\t\t `chapter_num`,\n\t\t\t\t\t\t\t\t\t\t\t\t `chapter_name`,\n\t\t\t\t\t\t\t\t\t\t\t `path`,\n\t\t\t\t\t\t\t\t\t\t\t `hosted`) \n\t\t\t\t\t\t VALUES (?,?,?,?,?)\";\n\n\t\t\t\t$param2 = array($id_media,\n\t\t\t\t\t\t\t intval($chap_num),\n\t\t\t\t\t\t\t $chap_title,\n\t\t\t\t\t\t\t $link,\n\t\t\t\t\t\t\t 0\n\t\t\t\t);\n\n\t\t\t\tmyQuery($query2, 'insert', $param2);\n\t\t\t}\n\t\t\telseif ($media_type_id == 3)\n\t\t\t{\n\t\t\t\t$query2 = \"INSERT INTO `contents`(`medias_id`,\n\t\t\t\t\t\t\t\t\t\t\t\t `chapter_num`,\n\t\t\t\t\t\t\t\t\t\t\t\t `chapter_name`,\n\t\t\t\t\t\t\t\t\t\t\t `content`,\n\t\t\t\t\t\t\t\t\t\t\t `hosted`) \n\t\t\t\t\t\t VALUES (?,?,?,?,?)\";\n\n\t\t\t\t$param2 = array($id_media,\n\t\t\t\t\t\t\t intval($chap_num),\n\t\t\t\t\t\t\t $chap_title,\n\t\t\t\t\t\t\t $fan_fiction,\n\t\t\t\t\t\t\t 0\n\t\t\t\t);\n\n\t\t\t\tmyQuery($query2, 'insert', $param2);\n\t\t\t}\n\t\t\tif ($media_type_id == 5)\n\t\t\t{\n\t\t\t\tglobal $path;\n\t\t\t\tglobal $extensions;\n\n\t\t\t\tif ($select_input_file == 1)\n\t\t\t\t{\n\t\t\t\t\t$errors = array();\n\t\t\t\t\t$dest = $path.stringHash($_SESSION['id_user']);\n\n\t\t\t\t\tforeach ($files['tmp_name'] as $key => $tmp_name)\n\t\t\t\t\t{\n\t\t\t\t\t\t$file_name = $files['name'][$key];\n\t\t\t\t\t\t$file_newname = $filename[$key];\n\t\t\t\t\t\t$file_size = $files['size'][$key];\n\t\t\t\t\t\t$file_tmp = $files['tmp_name'][$key];\n\t\t\t\t\t\t$file_type = $files['type'][$key];\n\t\t\t\t\t\t$file_error = $files['error'][$key];\n\t\t\t\t\t\t$file_ini = pathinfo($file_name);\n\t\t\t\t\t\t$file_ext = strtolower($file_ini['extension']);\n\t\t\t\t\t\t$new_dest = $dest.\"/\".$file_name;\n\n\t\t\t\t\t\tif (!is_uploaded_file($file_tmp))\n\t\t\t\t\t\t\t$errors['up'] = \"Error while uploading file\";\n\n\t\t\t\t\t\tif ($file_size > 2097152)\n\t\t\t\t\t\t\t$errors['size'] = \"File size must be less than 2 MB\";\n\n\t\t\t\t\t\tif (!in_array($file_ext, $extensions))\n\t\t\t\t\t\t\t$errors['ext'] = \"Your extension's file is not accepted\";\n\n\t\t\t\t\t\tif ($file_error != 0)\n\t\t\t\t\t\t\t$errors['err'] = \"There was a mistake please try again\";\n\n\t\t\t\t\t\tif (file_exists($new_dest))\n\t\t\t\t\t\t\t$errors['double'] = \"You can't upload the same artwork twice\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty($errors))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!is_dir($dest))\n\t\t\t\t\t\t\t\tmkdir($dest, 0700);\n\n\t\t\t\t\t\t\tmove_uploaded_file($file_tmp, $new_dest);\n\n\t\t\t\t\t\t\t$query2 = \"INSERT INTO `contents`(`medias_id`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t `chapter_num`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t `chapter_name`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t `filename`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t `size`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t `path`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t `hosted`) \n\t\t\t\t\t\t\t\t \t VALUES (?,?,?,?,?,?,?)\";\n\n\t\t\t\t\t\t\t$param2 = array($id_media,\n\t\t\t\t\t\t\t\t\t\t intval($chap_num),\n\t\t\t\t\t\t\t\t\t\t $chap_title,\n\t\t\t\t\t\t\t\t\t\t $file_newname,\n\t\t\t\t\t\t\t\t\t\t $file_size,\n\t\t\t\t\t\t\t\t\t\t $new_dest,\n\t\t\t\t\t\t\t\t\t\t 1\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tmyQuery($query2, 'insert', $param2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn ($errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif ($select_input_file == 2)\n\t\t\t\t{\n\t\t\t\t\t$tab_fileslink = array_combine($file_link, $filename_link);\n\n\t\t\t\t\tforeach ($tab_fileslink as $link => $name)\n\t\t\t\t\t{\n\t\t\t\t\t\t$query2 = \"INSERT INTO `contents`(`medias_id`,\n\t\t\t\t\t\t\t\t\t\t\t\t \t `chapter_num`,\n\t\t\t\t\t\t\t\t\t\t\t\t \t `chapter_name`,\n\t\t\t\t\t\t\t\t\t\t\t\t \t `filename`,\n\t\t\t\t\t\t\t\t\t\t\t\t \t `path`,\n\t\t\t\t\t\t\t\t\t\t\t\t \t `hosted`) \n\t\t\t\t\t\t\t \t VALUES (?,?,?,?,?,?)\";\n\n\t\t\t\t\t\t$param2 = array($id_media,\n\t\t\t\t\t\t\t\t\t intval($chap_num),\n\t\t\t\t\t\t\t\t\t $chap_title,\n\t\t\t\t\t\t\t\t\t $name,\n\t\t\t\t\t\t\t\t\t $link,\n\t\t\t\t\t\t\t\t\t 0\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tmyQuery($query2, 'insert', $param2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$keywords_post = explode(',', $keywords_post);\n\n\t\t\tforeach ($keywords_post as $keyword_post)\n\t\t\t{\n\t\t\t\t$query3 = \"INSERT INTO `keywords`(`name`) VALUES (?)\";\n\t\t\t\t$param3 = array($keyword_post);\n\t\t\t\tmyQuery($query3, 'insert', $param3);\n\n\t\t\t\t$id_keyword = getKeywordId($keyword_post);\n\n\t\t\t\t$query4 = \"INSERT INTO `medias_has_keywords`(`medias_id`,`keywords_id`) VALUES (?,?)\";\n\t\t\t\t$param4 = array($id_media, $id_keyword);\n\t\t\t\tmyQuery($query4, 'insert', $param4);\n\t\t\t}\n\t\t}" ]
[ "0.6470179", "0.63826823", "0.62593037", "0.621011", "0.6202005", "0.617762", "0.61696815", "0.6074785", "0.6031904", "0.6008622", "0.6006351", "0.5969584", "0.5954171", "0.59355444", "0.591412", "0.58232075", "0.5811252", "0.5779422", "0.57343525", "0.57311726", "0.5683774", "0.5677716", "0.56763536", "0.5664233", "0.56553614", "0.56537074", "0.5634061", "0.56305015", "0.56030405", "0.5573952", "0.5568821", "0.5566961", "0.5565662", "0.5557488", "0.5538925", "0.55367863", "0.5536067", "0.5534902", "0.5534188", "0.55305684", "0.5526743", "0.55253613", "0.5510045", "0.55065763", "0.5504177", "0.54984665", "0.5495615", "0.549446", "0.547339", "0.5468423", "0.5462208", "0.54452735", "0.5438179", "0.5436501", "0.5429274", "0.5411593", "0.54104114", "0.54069245", "0.5406006", "0.5396855", "0.539125", "0.53862345", "0.5376356", "0.53621894", "0.53610796", "0.535411", "0.5350819", "0.5346958", "0.53385663", "0.5332769", "0.53253895", "0.53050387", "0.5298743", "0.5294786", "0.5294786", "0.5291682", "0.52848047", "0.52765894", "0.5273528", "0.52711797", "0.5267911", "0.5266542", "0.5266542", "0.52644694", "0.52630126", "0.526258", "0.5258426", "0.52566147", "0.52445465", "0.52407616", "0.52338016", "0.5231849", "0.5223916", "0.5221308", "0.520993", "0.52084637", "0.5204711", "0.5204297", "0.52038103", "0.5197712" ]
0.78401923
0
Updates the current Media object in the database.
Обновляет текущий объект Media в базе данных.
public function update() { // Does the Media object have an ID? if ( is_null( $this->mediaId ) ) trigger_error ( "Media::update(): Attempt to update an Media object that does not have its ID property set.", E_USER_ERROR ); // Update the Media $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); $sql = "UPDATE media SET mediaPublicationDate=FROM_UNIXTIME(:mediaPublicationDate), mediaCategoryId=:mediaCategoryId, mediaTitle=:mediaTitle, mediaSummary=:mediaSummary, mediaContent=:mediaContent, mediaImageExtension=:mediaImageExtension WHERE mediaId = :mediaId"; $st = $conn->prepare ( $sql ); $st->bindValue( ":mediaPublicationDate", $this->mediaPublicationDate, PDO::PARAM_INT ); $st->bindValue( ":mediaCategoryId", $this->mediaCategoryId, PDO::PARAM_INT ); $st->bindValue( ":mediaTitle", $this->mediaTitle, PDO::PARAM_STR ); $st->bindValue( ":mediaSummary", $this->mediaSummary, PDO::PARAM_STR ); $st->bindValue( ":mediaContent", $this->mediaContent, PDO::PARAM_STR ); $st->bindValue( ":mediaImageExtension", $this->mediaImageExtension, PDO::PARAM_STR ); $st->bindValue( ":mediaId", $this->mediaId, PDO::PARAM_INT ); $st->execute(); $conn = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Media $media)\n {\n //\n }", "public function update(Request $request, Media $media)\n {\n //\n }", "public function update(Request $request, Media $media)\n {\n //\n }", "public function updated(PostMedia $postMedia)\n {\n //\n }", "public function Update()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t\t\t\n\t\t\t$json = json_decode(RequestUtil::GetBody());\n\n\t\t\tif (!$json)\n\t\t\t{\n\t\t\t\tthrow new Exception('The request body does not contain valid JSON');\n\t\t\t}\n\n\t\t\t$pk = $this->GetRouter()->GetUrlParam('idmedia');\n\t\t\t$media = $this->Phreezer->Get('Media',$pk);\n\n\t\t\t// TODO: any fields that should not be updated by the user should be commented out\n\n\t\t\t// this is a primary key. uncomment if updating is allowed\n\t\t\t// $media->Idmedia = $this->SafeGetVal($json, 'idmedia', $media->Idmedia);\n\n\t\t\t$media->Idhistory = $this->SafeGetVal($json, 'idhistory', $media->Idhistory);\n\t\t\t$media->Storage = $this->SafeGetVal($json, 'storage', $media->Storage);\n\t\t\t$media->Iddocumentation = $this->SafeGetVal($json, 'iddocumentation', $media->Iddocumentation);\n\t\t\t$media->Institution = $this->SafeGetVal($json, 'institution', $media->Institution);\n\t\t\t$media->Idreference = $this->SafeGetVal($json, 'idreference', $media->Idreference);\n\t\t\t$media->Mediatype = $this->SafeGetVal($json, 'mediatype', $media->Mediatype);\n\t\t\t$media->Mediaurl = $this->SafeGetVal($json, 'mediaurl', $media->Mediaurl);\n\t\t\t$media->Digitizationdate = date('Y-m-d H:i:s',strtotime($this->SafeGetVal($json, 'digitizationdate', $media->Digitizationdate)));\n\t\t\t$media->Digitizationresponsable = $this->SafeGetVal($json, 'digitizationresponsable', $media->Digitizationresponsable);\n\t\t\t$media->Polarity = $this->SafeGetVal($json, 'polarity', $media->Polarity);\n\t\t\t$media->Colorspace = $this->SafeGetVal($json, 'colorspace', $media->Colorspace);\n\t\t\t$media->Iccprofile = $this->SafeGetVal($json, 'iccprofile', $media->Iccprofile);\n\t\t\t$media->Xresolution = $this->SafeGetVal($json, 'xresolution', $media->Xresolution);\n\t\t\t$media->Yresolution = $this->SafeGetVal($json, 'yresolution', $media->Yresolution);\n\t\t\t$media->Thumbnail = $this->SafeGetVal($json, 'thumbnail', $media->Thumbnail);\n\t\t\t$media->Digitizationequipment = $this->SafeGetVal($json, 'digitizationequipment', $media->Digitizationequipment);\n\t\t\t$media->Format = $this->SafeGetVal($json, 'format', $media->Format);\n\t\t\t$media->Ispublic = $this->SafeGetVal($json, 'ispublic', $media->Ispublic);\n\t\t\t$media->Ordername = $this->SafeGetVal($json, 'ordername', $media->Ordername);\n\t\t\t$media->Sent = $this->SafeGetVal($json, 'sent', $media->Sent);\n\t\t\t$media->Exif = $this->SafeGetVal($json, 'exif', $media->Exif);\n\t\t\t$media->Textual = $this->SafeGetVal($json, 'textual', $media->Textual);\n\t\t\t$media->Sizemedia = $this->SafeGetVal($json, 'sizemedia', $media->Sizemedia);\n\t\t\t$media->Nameoriginal = $this->SafeGetVal($json, 'nameoriginal', $media->Nameoriginal);\n\t\t\t$media->Mainmedia = $this->SafeGetVal($json, 'mainmedia', $media->Mainmedia);\n\t\t\t$media->Mediadir = $this->SafeGetVal($json, 'mediadir', $media->Mediadir);\n\t\t\t$media->Thumbnaildir = $this->SafeGetVal($json, 'thumbnaildir', $media->Thumbnaildir);\n\t\t\t$media->Thumbnailurl = $this->SafeGetVal($json, 'thumbnailurl', $media->Thumbnailurl);\n\n\t\t\t$media->Validate();\r\n\t\t\t$errors = $media->GetValidationErrors();\r\n\r\n\t\t\tif (count($errors) > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->RenderErrorJSON('Please check the form for errors',$errors);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$media->Save();\r\n\t\t\t\t$this->RenderJSON($media, $this->JSONPCallback(), true, $this->SimpleObjectParams());\r\n\t\t\t}\n\n\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\r\n\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "public function update(Request $request, Media $media)\n {\n $this->validate($request, [\n 'name' => 'required|max:244'\n ]);\n $media = Media::find($request->id);\n $media->name = $request->name;\n\n $media->save();\n\n return response()->json($media);\n }", "public function update(Request $request, $id) {\n\n /* ---- RECUPERATIONS DES DONNEES RECUES ---- */\n $dataMedia['title'] = $request->title;\n $dataMedia['legend'] = $request->legend;\n $theNewMedia = $request->files->get('media');\n //$idMedia = $request->id;\n $idMedia = $id;\n\n /* ---- VALIDATIONS ---- */\n $validMediaData = Media::isDataValid($dataMedia);\n $mediaMaxSize = 2000000;\n $allowedTypes = array('gif', 'jpeg', 'jpg', 'mp4', 'png', 'webm'); // Types de fichiers acceptes\n $validMedia = Media::isValid($theNewMedia, $allowedTypes, $mediaMaxSize);\n $oldMedia = Media::find($idMedia);\n if ($oldMedia != null) {\n $existsMedia = true;\n } else {\n $existsMedia = false;\n }\n\n\n if ($theNewMedia != null && $validMediaData != false && $validMedia != false && $existsMedia != false) {\n DB::transaction(function () use ($dataMedia, $theNewMedia, $idMedia, $oldMedia) {\n // Supprimer l'ancien media\n if (file_exists($oldMedia->url)) {\n unlink($oldMedia->url); // Supprimer la photo\n }\n\n // modification du media\n $mediaDestination = \"../public/img/generalMedias\";\n $mediaDestinationShortened = \"img/generalMedias\";\n $media = Media::find($idMedia);\n $media->title = $dataMedia['title'];\n $media->legend = $dataMedia['legend'];\n $media->url = $mediaDestinationShortened . '/' . $theNewMedia->getClientOriginalName();\n $videoTypes = array('mp4', 'webm'); // Par la suite nous pourrions faire d'autre check pour des fichiers audios etc etc (en fonction de nos types de MediaTypes\n if (in_array($theNewMedia->getClientOriginalExtension(), $videoTypes)) { // Si le média reçu est une vidéo\n $media->mediatype_id = 1; // Alors on set que c'est une photo\n } else { // Si le média reçu est une photo\n $media->mediatype_id = 2; // Alors on set que c'est une photo\n }\n $media->save();\n $theNewMedia->move($mediaDestination, $theNewMedia->getClientOriginalName()); // Déplace la photo dans le dossier voulu\n }); // Fin de la transaction\n } else {\n // PROBLEMMEEEEEEEE\n dd('léger soucis là couz1');\n }\n }", "public function modifier(Media $media)\r\n{\r\n$q = $this->_db->prepare('UPDATE film SET nomfilm=:nomfilm, realisateur=:realisateur, duree=:duree WHERE id=:id');\r\n$q->execute(array(\r\n 'id' => $media->getidsup(),\r\n 'nomfilm' => $media->getnomfilm(),\r\n 'realisateur' => $media->getrealisateur(),\r\n 'duree' => $media->getduree()));\r\n}", "public function update(MediaRequest $request, Media $media)\n {\n $media->update([\n 'alt' => $request->alt,\n 'caption' => $request->caption,\n ]);\n\n return response()->json(\"The file has been updated.\");\n }", "public function update_ac_media() {\n\n\t\tif ( !wp_verify_nonce( $_POST['update_ac_media_nonce'], 'update_ac_media' ) ) {\n\t\t\twp_send_json_error( new WP_Error( 'update_ac_media_nonce_error', __( \"Shenanigans are afoot. Bailing on update...\" ) ), 401 );\n\t\t}\n\n\t\t$post = get_post( $_POST['ac_media_id'] );\n\n\t\tif ( $post->post_type !== 'ac_media') {\n \t\twp_send_json_error( new WP_Error( 'update_ac_media_post_type_error', __( \"That isn't an Audubon Core Media...\" ) ), 400 );\n \t}\n\n\t\tif ( $post->post_author != get_current_user_id() && !current_user_can( 'administrator' ) ) {\n \t\twp_send_json_error( new WP_Error( 'update_ac_media_permission_error', __( \"You don't have permission to play with that...\" ) ), 401 );\n \t}\n\n\t\t$ac_title = empty($_POST['post_title'] ) ? 'Media '.$post->ID : $_POST['post_title'];\n\n\t\t$args = array(\n\t\t\t'ID' \t=> $post->ID,\n\t\t\t'post_title' \t=> $ac_title,\n\t\t\t'post_name'\t\t=> $post->ID\n\t\t);\n\t\twp_update_post( $args);\n\n $media = new AudubonCoreMedia( $post->ID );\n $media->save($_POST);\n\n\t\twp_send_json_success( $post->ID , 200 );\n }", "public function update(MediaRequest $request, $id)\n {\n //\n }", "public function update()\n\t{\n\t\tif (!$this->validate()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->mediaFile->alt = $this->_alt;\n\t\t$this->mediaFile->description = $this->_description;\n\t\t\n return $this->mediaFile->save();\n\t}", "protected function updateMediaInContent(Database $db)\n {\n $this->write(' + Updating orchestra_media attributes');\n\n $this->checkExecute($db->execute(\n $this->getJSFunctions() . '\n\n db.content.find({}).forEach(function(content) {\n var updated = false;\n\n for (var attributeName in content.attributes) {\n if (content.attributes.hasOwnProperty(attributeName) && \"orchestra_media\" == content.attributes[attributeName].type) {\n content.attributes[attributeName].value.alt = getMediaAlt(content.attributes[attributeName].value.id, content.language);\n content.attributes[attributeName].value.legend = \"\";\n updated = true;\n }\n }\n\n if (updated) {\n db.content.update({_id: content._id}, content);\n }\n });\n '));\n }", "public function save(Media $entry)\n {\n $entry->save();\n }", "public function update($id, MemorialFormRequest $request, MediaManagerController $media)\n {\n $attr = $request->all();\n $memorial = $this->memorial->getElementById($id);\n /**\n * Update Avatar\n */\n if( $request->hasFile('avatar') ) {\n if(file_exists($memorial->avatar)) {\n unlink($memorial->avatar);\n }\n $attr['avatar'] = $media->upload($request->file('avatar'));\n }\n $memorial->update($attr);\n /**\n * Timeline\n */\n\n if(isset($attr['timeline']) and $attr['timeline'] == 1) {\n for($i=0; $i < $attr['timeline_form_count']; $i++) {\n\n $timeline = [\n 'mem_id' => $id,\n 'title' => $attr['timeline_title'][$i],\n 'year' => $attr['timeline_year'][$i],\n 'description' => $attr['timeline_desc'][$i],\n ];\n if( !empty($attr['timeline_image'][$i])) {\n $file = $attr['timeline_image'][$i];\n if(is_object($file)) {\n $timeline['image'] = $media->upload($file, 'timeline');\n }\n }\n\n if($attr['timeline_id'][$i] > 0) {\n $rs = $this->timeline->getElementById($attr['timeline_id'][$i]);\n $rs->update($timeline);\n } else {\n $this->timeline->create($timeline);\n }\n }\n }\n return redirect(route('backend.memorial.index'))->with('success_message', 'The memorial has been updated');\n }", "public function update($id)\n\t{\n\t\t$media = Media::findOrFail($id);\n\n\t\t$validator = Validator::make($data = Input::all(), Media::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$media->update($data);\n\t\tSession::flash('message', 'Update Berhasil');\n\t\treturn Redirect::route('medias.index');\n\t}", "public function updateMedia($media_id)\n\t{\n\n\t\t\t$media = Media::find($media_id);\n\t\t\tif(Input::exists('Go')===true)\n\t\t\t{\n\t\t\t\t$rules = array('name' => 'required', 'description' => 'required', 'media_type_id' => 'required');\n\t\t\t\t$validator = Validator::make(Input::all(), $rules);\n\t\t\t\tif ($validator->fails()) {\n\t\t\t\treturn Redirect::to('/update-media')\n\t\t\t\t->withErrors($validator) // send back all errors to the login form\n\t\t\t\t->withInput(); \n\t\t\t\t} else {\n\t\t\t\t$name = Input::get('name');\n\t\t\t\t$number_of_copies = Input::get('number_of_copies');\n\t\t\t\t$description = Input::get('description');\n\t\t\t\t$media_type_id = Input::get('media_type_id');\n\t\t\t\t$media->name = $name;\n\t\t\t\t$media->description = $description;\n\t\t\t\t$media->media_type_id = $media_type_id;\n\t\t\t\t$media->save();\n\t\t\t\treturn Redirect::to('/media/')->withFlashMessage('Media Item Updated Successfully.');\n\t\t\t\t}\n\t \t}\n\t\t\t\n\t\t\t\n\t \t$mediatypes = Media_Type::pluck('name', 'media_type_id');\n\n\n\t\t\treturn view('media.update', ['media' => $media , 'media_type' => $mediatypes ]);\n\n\n\t}", "public function updateAction(Tx_Wpj_Domain_Model_mediafile $mediafile) {\n\t\t$this->mediafileRepository->update($mediafile);\n\t\t$this->flashMessageContainer->add('Your mediafile was updated.');\n\t\t$this->redirect('index');\n\t}", "public function updateMedia($media_id)\n {\n\n $media = Media::find($media_id);\n if(Input::exists('Go')===true)\n {\n $rules = array('name' => 'required', 'description' => 'required', 'media_type_id' => 'required');\n $validator = Validator::make(Input::all(), $rules);\n if ($validator->fails()) {\n return Redirect::to('/update-media')\n ->withErrors($validator) // send back all errors to the login form\n ->withInput(); \n } else {\n $name = Input::get('name');\n $number_of_copies = Input::get('number_of_copies');\n $description = Input::get('description');\n $media_type_id = Input::get('media_type_id');\n $media->name = $name;\n $media->description = $description;\n $media->number_of_copies = $number_of_copies;\n $media->media_type_id = $media_type_id;\n $media->save();\n return Redirect::to('/media/')->withFlashMessage('Media Item Updated Successfully.');\n }\n }\n \n \n $mediatypes = Media_Type::pluck('name', 'media_type_id');\n\n\n return view('media.update', ['media' => $media , 'media_type' => $mediatypes ]);\n\n\n }", "public function update(Request $request, FeedMedia $feedMedia) {\n //\n }", "public function update()\n {\n $id = $request->get('id',0);\n $title = $request->get('title');\n $caption = $request->get('caption');\n if($id == 0 || !is_numeric($id)){\n return json_encode(array('status'=>0,'message'=>'ID ảnh không hợp lệ'));\n }else{\n $check = DB::table('media')->where('id',$id)->first();\n if(!$check){\n return json_encode(array('status'=>0,'message'=>'Lỗi không tìm thấy file ảnh.'));\n }else{\n $insert = DB::table('media')->where('id',$id)->update(array('title'=>$title,'caption'=>$caption));\n return json_encode(array('status'=>1,'message'=>'Cập nhật thành công.'));\n }\n }\n }", "public function update()\n {\n $this->genreDAO->updateFromApi();\n\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, array(\n 'title' => 'required|max:255',\n 'link' => 'required',\n 'media_image' => 'image'\n ));\n //edit posts\n\n $media = Media::find($id);\n $media->title = $request->input('title');\n $media->link = $request->input('link');\n\n\n if ($request->hasFile('media_image'))\n {\n $image = $request->file('media_image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('medias/' . $filename);\n Image::make($image)->resize(200, 200)->save($location);\n $oldFilename = $media->image;\n $media->image = $filename;\n Storage::delete($oldFilename);\n }\n\n $media->save();\n\n Session::flash('success', 'News zostal edytowany');\n\n return redirect()->route('medias.show', $media->id);\n }", "public function update(Media $medium)\n {\n $model = $medium->model;\n foreach ($model->getMedia(self::DEFAULT_COLLECTION_NAME) as $mediaItem) {\n if ($medium->id !== $mediaItem->id) {\n $mediaItem->setCustomProperty('isPrimary', false);\n $mediaItem->save();\n }\n }\n\n $medium->setCustomProperty('isPrimary', true);\n $medium->save();\n\n flash()->success(__('Primary image has been updated'));\n\n return back();\n }", "public function updateMediaStatus($mediaId, $status);", "public function update()\n {\n $this->entity->save($this->getData());\n }", "public function update(Request $request)\n {\n $date = Carbon::now();\n if (!$request->hasFile('file')) {\n DB::table('medias')\n ->where('id', '=', $request->id)\n ->update([\n 'title' => $request->name,\n 'description' => $request->desc,\n 'updated_at' => $date\n ]);\n } else {\n $pathOld = $request->path;\n\n $file = public_path(\"assets/images/media/$pathOld\");\n unlink($file);\n\n $fileNameToStore = $request->file->hashName();\n $fileSize = $request->file('file')->getSize();\n $extension = $request->file('file')->extension();\n $file = $request->file;\n\n\n if ($extension == \"x-flv\" || $extension == \"mp4\" || $extension == \"x-mpegURL\" || $extension == \"MP2T\" || $extension == \"3gpp\" || $extension == \"quicktime\" || $extension == \"x-msvideo\" || $extension == \"x-ms-wmv\") {\n $getID3 = new \\getID3;\n $fileinfo = $getID3->analyze($file);\n $duration = date('H:i:s.v', $fileinfo['playtime_seconds']);\n } else {\n $data = getimagesize($file);\n $width = $data[0];\n $height = $data[1];\n }\n\n $pid = Auth::id();\n $file->move(\"assets/images/media/\", $fileNameToStore);\n\n DB::table('medias')\n ->where('id', $request->id)\n ->update([\n 'title' => $request->name,\n 'extension' => $extension,\n 'description' => $request->desc,\n 'path' => $fileNameToStore,\n 'size' => $fileSize,\n ]);\n\n if ($extension == \"x-flv\" || $extension == \"mp4\" || $extension == \"x-mpegURL\" || $extension == \"MP2T\" || $extension == \"3gpp\" || $extension == \"quicktime\" || $extension == \"x-msvideo\" || $extension == \"x-ms-wmv\") {\n DB::table('videos')\n ->where('mediaid', $request->id)\n ->update([\n 'duaration' => $duration\n ]);\n } else {\n DB::table('images')\n ->where('mediaid', $request->id)\n ->update([\n 'width' => $width,\n 'height' => $height\n ]);\n }\n }\n // $getUserMedia = DB::table('medias')\n // ->where('userid', '=', Auth::id())\n // ->get();\n // return view('Media.MainPage', ['userMedia' => $getUserMedia]);\n return redirect('/manage');\n }", "function update()\n {\n foreach($this->records() as $record) $record->update();\n }", "public function update(ApiUpdateRequest $request, Media $media)\n {\n $this->setEvents([\n 'success' => UpdateSuccess::class,\n 'fail' => UpdateFail::class\n ]);\n return $this->updateModel($media);\n }", "public function UpdateMediaByID($key,$status=\"0\"){ \n $sqlContent = 'UPDATE `webbuilder`.`media_arch` SET `status` = \\''.$status.'\\' WHERE `media_arch`.`id` = \\''.$key.'\\''; \n $dbHelper = new databaseHelper();\n $dbHelper->ExecuteInsertReturnID($sqlContent);\n }", "public function update()\n { if (is_null($this->id))\n trigger_error(\"Spectra::update(): Attempt to update a Spectra object that does not have its ID property set.\", E_USER_ERROR);\n\n // Update the Reaction\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"UPDATE spectra SET Type=:type , Comment=:comment , JCAMPFile=:jcampfile, Image=:image, CompoundID=:compoundID WHERE SpectraID = :id\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":type\", $this->type, PDO::PARAM_STR);\n\t\t$st->bindValue(\":comment\", $this->comment, PDO::PARAM_STR);\n\t\t$st->bindValue(\":jcampfile\", $this->jcampFile, PDO::PARAM_STR);\n $st->bindValue(\":image\", $this->image, PDO::PARAM_STR);\n $st->bindValue(\":compoundID\", $this->compoundID, PDO::PARAM_INT);\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "public function edit(Media $media)\n {\n //\n }", "public function edit(Media $media)\n {\n //\n }", "public function edit(Media $media)\n {\n //\n }", "public function update() {\r\n\t\t$this->_update();\r\n\t}", "public static function update() {\n self::getEntityManager()->flush();\n }", "public function update() {\n\t\t$this->_update();\n\t}", "function update() {\n $this->model->update();\n }", "public function saveMedia(Media $media, $modelRelation = null, int $order = 1, $hasMany = false): void;", "public function update(Request $request)\n {\n $validated = $request->validate([\n 'title' => 'required_with|String',\n 'year' => 'required',\n ]);\n\n $movie = Movie::findOrFail($request->id);\n $movie->title = $request->title;\n $movie->original_title = $request->original_title;\n $movie->year = $request->year;\n $movie->time = $request->time;\n $movie->our_rating = $request->our_rating;\n $movie->imdb_rating = $request->imdb_rating;\n $movie->category_1 = $request->category_1;\n $movie->category_2 = $request->category_2;\n $movie->poster = $request->poster;\n $movie->summary = $request->summary;\n\n $movie->save();\n\n $movie->media()->sync($request->media);\n\n return response()->json($movie->id, 200);\n }", "public function saveObject($media, $request){\n $file = $request->file('file');\n $this->linkRelatedArticle($request);\n $article = $request->model::findOrFail($request->article_id);\n if(!empty($request->file) && !empty($article)){\n if(!empty($media)){\n $media->delete();\n }\n // Store new media\n list($width, $height) = getimagesize($file);\n $file_name = $file->getClientOriginalName();\n $orig_name = pathinfo($file_name, PATHINFO_FILENAME);\n $extension = $file->getClientOriginalExtension();\n $name = str_slug($orig_name).'.'.$extension;\n $new_media = $article->addMediaFromRequest('file')->usingFileName($name)->withCustomProperties(['width' => $width, 'height' => $height])->toMediaCollection();\n }\n return redirect()->route('admin.medias.index');\n }", "private function updateImage()\n\t{\n\t\t$validator = Validator::make(\n\t\t\t$this->request->all(),\n\t\t\t['media_image' => 'image']\n\t\t);\n\n\t\t// If it isn't, then we exit with the listener's validation error handler.\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn $this->listener->mediaValidationError($validator->messages());\n\t\t}\n\n\t\t// Get the file instance.\n\t\t$file = $this->request->file(MediaImageUpdater::PARAM_NAME);\n\n\t\t// Determine the appropriate file name.\n\t\t$filename = $this->generateFilename($this->media, $file);\n\n\t\t// Move the file to the appropriate storage location and get the updated\n\t\t// file instance.\n\t\t$file = $this->moveFile($file, $filename);\n\n\t\t// Update the media instance with the new path of the image.\n\t\t$this->media->image_path = $file->getRealPath();\n\n\t\t// Attempt to save the media instance; if it fails, handle with listener's\n\t\t// validation error handler.\n\t\tif (! $this->media->save())\n\t\t{\n\t\t\treturn $this->listener->mediaValidationError($this->media->getErrors());\n\t\t}\n\n\t\t// Handle the successful operation with the listener's updated handler.\n\t\treturn $this->listener->mediaUpdated($this->media);\n\t}", "public function saveMediaToStorage($object, $request, $update = FALSE){\n \n return FALSE;\n }", "public function update(Request $request, $id)\n {\n //\n $this -> validate($request,[\n 'title'=>'required',\n 'body'=>'required',\n 'post_media' => 'nullable|max:2048'\n ]);\n $post = Post::find($id);\n // $post->user_id = Auth::user()->id;\n $post->title = $request->input('title');\n $post->entrycontent = $request->input('body');\n $post->save();\n\n if($request->hasFile('post_media')){\n $files = $request->file('post_media');\n foreach( $files as $file)\n {\n $filenameorig =$file->getClientOriginalName();\n // $filename = pathinfo($filenameext, PATHINFO_FILENAME);\n // $ext = $file->getClientOriginalExtension();\n $filetype = substr($file->getMimeType(), 0, 5);\n $filenamestore = $post->user_id.'_'.$post->id.'_'.$filenameorig;\n // $path = $file->storeAs('public/post_media', $filenamestore); //stores in storage\n $path=$file->move(public_path('post_media'), $filenamestore); //stores in public \n \n\n $postmedia = new post_media;\n $postmedia->user_id = Auth::user()->id;\n $postmedia->post_id = $post->id;\n $postmedia->filename = $filenamestore;\n $postmedia->filetype = $filetype;\n $postmedia->save();\n }\n }\n return redirect('posts/'.$post->id)->with('success','Entry Updated');\n // return redirect('/posts')\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set kind_id=\\\"$this->kind_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function insert() {\n \n // Does the Media object already have an ID?\n if ( !is_null( $this->id ) ) trigger_error ( \"Media::insert(): Attempt to insert an Media object that already has its ID property set (to $this->mediaId).\", E_USER_ERROR );\n \n // Insert the Media\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"INSERT INTO media ( mediaPublicationDate, mediaCategoryId, mediaTitle, mediaSummary, mediaContent, mediaImageExtension ) VALUES ( FROM_UNIXTIME(:mediaPublicationDate), :mediaCategoryId, :mediaTitle, :mediaSummary, :mediaContent, :mediaImageExtension )\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":mediaPublicationDate\", $this->mediaPublicationDate, PDO::PARAM_INT );\n\t$st->bindValue( \":mediaCategoryId\", $this->mediaCategoryId, PDO::PARAM_INT );\n $st->bindValue( \":mediaTitle\", $this->mediaTitle, PDO::PARAM_STR );\n $st->bindValue( \":mediaSummary\", $this->mediaSummary, PDO::PARAM_STR );\n $st->bindValue( \":mediaContent\", $this->mediaContent, PDO::PARAM_STR );\n $st->bindValue( \":mediaImageExtension\", $this->mediaImageExtension, PDO::PARAM_STR );\n $st->execute();\n $this->mediaId = $conn->lastInsertId();\n $conn = null;\n }", "public function upload()\n {\n $model = config('nova-mediable-manager.model');\n\n $media = new $model();\n\n $media->name = $this->name;\n $media->file_name = $this->fileName;\n $media->disk = $this->disk ?: config('nova-mediable-manager.disk');\n $media->mime_type = $this->file->getMimeType();\n $media->size = $this->file->getSize();\n\n $media->forceFill($this->attributes);\n\n $media->save();\n\n $media->filesystem()->putFileAs(\n $media->getDirectory(),\n $this->file,\n $this->fileName\n );\n\n return $media->fresh();\n }", "public function update()\n {\n $em = $this -> getDocumentManager();\n $em -> flush();\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set title=\\\"$this->title\\\",brief=\\\"$this->brief\\\",content=\\\"$this->content\\\",image=\\\"$this->image\\\",cat_id=\\\"$this->cat_id\\\",is_public=\\\"$this->is_public\\\",is_principal=\\\"$this->is_principal\\\",is_sidebar=\\\"$this->is_sidebar\\\",kind_id=\\\"$this->kind_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function setMedia($media)\n {\n $this->_media = $media;\n }", "public function setMedia()\n {\n }", "public function setMedia()\n {\n }", "public function update($id, FlowerFormRequest $request, MediaManagerController $media)\n {\n $attr = $request->all();\n $this->flower->update($attr);\n\n for($i=0; $i < $attr['flower_form_count']; $i++) {\n $flowerItems = [\n 'flower_id' => $id,\n 'title' => $attr['flower_title'][$i],\n ];\n if( !empty($attr['flower_image'][$i])) {\n $file = $attr['flower_image'][$i];\n if(is_object($file)) {\n $flowerItems['image'] = $media->upload($file, 'flowers');\n }\n }\n if($attr['flower_id'][$i] > 0) {\n $rs = $this->item->getElementById($attr['flower_id'][$i]);\n $rs->update($flowerItems);\n } else {\n $this->item->create($flowerItems);\n }\n }\n\n return redirect(route('backend.flower.index'))->with('success_message', 'The flower has been updated');\n }", "public function update(UpdateSocialMedia $request, $id)\n {\n $social_media = SocialMedia::findOrFail($id);\n\n $validated = $request->validated();\n\n foreach ($validated as $key => $value) {\n $social_media[$key] = $value;\n }\n\n $social_media->save();\n\n return $this->sendResponse(trans('response.success_social_media_update'));\n }", "function update() {\n //Perform validation first\n if($this->validate()) {\n /*\n * Insert a new record\n */\n if($this->mb_wc == \"\") {\n mb_debugMessage(\"Adding new record\");\n $this->insertRecord();\n }\n /*\n * Update the existing record\n */\n else {\n mb_debugMessage(\"Updating existing record\");\n $this->updateRecord();\n }\n }\n }", "public function add() {\n $newMedia = $this->Media->newEntity();\n\n if ( $this->request->is( 'post' ) ) {\n\n $input = $this->request->data;\n if ( isset( $input['file']['name'] ) ) {\n $input['author_id'] = $this->Auth->user( 'user_id' );\n\n $genreId = $input['genre_id'];\n $genreName = strtolower( $this->MediaHelper->getGenreName( $genreId ) );\n\n $mediaName = strtolower( $input['file']['name'] );\n\n // Truncate file name to last 100 characters if it exceeds 150. DB only stores up to 150 chars for links.\n $mediaName = (strlen( $mediaName ) > 150) ? substr( $mediaName, -100 ) : $mediaName;\n\n // add \"unique\" string to the name of the file to avoid over writes\n $mediaStoredName = uniqid( '', true ) . '-' . $mediaName;\n\n // path link for full image that will be stored in the database\n $mediaPathLink = 'media/' . $genreName . '/' . $mediaStoredName;\n\n // the absolute path where the uploaded media will be moved to\n $storedPath = WWW_ROOT . 'img/' . $mediaPathLink;\n\n $input['media_link'] = $mediaPathLink;\n\n $finfo = finfo_open();\n $mime = strtolower( finfo_file( $finfo, $input['file']['tmp_name'], FILEINFO_MIME ) );\n finfo_close( $finfo );\n\n if ( strstr( $mime, 'image/' ) ) {\n // path link for thumbnail that will be stored in the database\n // use a different uniqid to avoid users from changing url link to access full image\n $mediaThumbLink = 'media/' . $genreName . '/' . uniqid( 'thumbnail-' ) . '-' . $mediaName;\n $input['type_id'] = 1; // image\n $input['thumb_link'] = $mediaThumbLink;\n\n $newMedia = $this->Media->patchEntity( $newMedia, $input );\n\n if ( $this->Media->save( $newMedia ) ) {\n // generate and store thumbnail. Also move uploaded file\n $this->generateThumbnail( $input['file']['tmp_name'], $mediaThumbLink );\n move_uploaded_file( $input['file']['tmp_name'], $storedPath );\n } else {\n $this->Flash->error( __( 'The picture could not be uploaded. Please, try again.' ) );\n }\n } else {\n $input['type_id'] = 2; // video\n $newMedia = $this->Media->patchEntity( $newMedia, $input );\n\n if ( $this->Media->save( $newMedia ) ) {\n move_uploaded_file( $input['file']['tmp_name'], $storedPath );\n } else {\n $this->Flash->error( __( 'The video could not be uploaded. Please, try again.' ) );\n }\n }\n // return $this->redirect( ['controller' => 'Media', 'action' => 'view', $newMedia->media_id] );\n }\n }\n $genreList = $this->MediaHelper->getGenreList();\n\n $this->set( compact( 'genreList', 'newMedia' ) );\n }", "public function addMedia(Media $media)\n {\n $this->entity->addMedia($media->getEntity());\n }", "public function delete() {\n \n // Does the Media object have an ID?\n if ( is_null( $this->mediaId ) ) trigger_error ( \"Media::delete(): Attempt to delete an Media object that does not have its ID property set.\", E_USER_ERROR );\n \n // Delete the Media\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM media WHERE mediaId = :mediaId LIMIT 1\" );\n $st->bindValue( \":mediaId\", $this->mediaId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "private function updateDatabase() {}", "protected function update()\n {\n return $this->getDatabase()->update($this->sTable, $this->id, $this->hData);\n }", "private function load() {\n\n\t\t$mediaItem = Relation::getSingle('pagemodule', 'media', $this->oPageModule);\n\t\tif ($mediaItem === null) {\n\t\t\t$mediaItem = new Media();\n\t\t}\n\t\t$this->mediaItem = $mediaItem;\n\n\t}", "public function update(Request $request, $id)\n {\n $rules = [\n 'ar_name' => 'required',\n 'ar_content' => 'required',\n\n ];\n\n $Validator = Validator::make($request->all(),$rules);\n $Validator->SetAttributeNames ([\n 'ar_name' => trans('admin.ar_name'),\n 'ar_content' => trans('admin.ar_content'),\n 'media' => trans('admin.media'),\n ]);\n if($Validator->fails())\n {\n return back()->withInput()->withErrors($Validator);\n }else{\n $update = News::find($id);\n\n $update->ar_title = $request->input('ar_name');\n $update->ar_content = $request->input('ar_content');\n $update->save();\n\n /** update multiphotos in ProductsGallary table**/\n $path = public_path().'/upload/products';\n $multifile = $request->file('media');\n if($request->hasFile('media.*')) {\n foreach ($multifile as $files)\n {\n $extension = $files->getClientOriginalExtension();\n $fileName = str_random(5).\"-\".time().\"-\".str_random(3).\".\".$extension;\n if($files->move($path,$fileName))\n {\n $multiupdate = new NewsGallary();\n $multiupdate->news_id = $id;\n $multiupdate->media = $fileName;\n $multiupdate->save();\n }\n }\n\n }\n\n session()->flash('success',trans('admin.updated'));\n }\n return back();\n }", "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MesdHelpWikiBundle:Media')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Media entity.');\n }\n\n //if (false === $this->get('security.context')->isGranted('EDIT', $entity)) {\n // throw new AccessDeniedException('Unauthorized access!');\n //}\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $em->flush();\n\n return $this->redirect($this->generateUrl('MesdHelpWikiBundle_media_edit', array('id' => $id)));\n }\n\n return $this->render('MesdHelpWikiBundle:Media:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'menu' => new Menu(),\n ));\n }", "public function media()\n {\n return $this->belongsTo(Media::class);\n }", "public function update()\n {\n return $this->getPrimaryObject()->update();\n }", "protected function updateTinyMCEInContent(Database $db)\n {\n $this->write(' + Updating medias in tinyMce attributes');\n\n $this->checkExecute($db->execute(\n $this->getJSFunctions() . '\n\n db.content.find({}).forEach(function(content) {\n var updated = false;\n\n for (var attributeName in content.attributes) {\n if (content.attributes.hasOwnProperty(attributeName) && \"wysiwyg\" == content.attributes[attributeName].type) {\n var pattern = /\\[media=([^\\]\\{]+)\\]([^\\]]+)\\[\\/media\\]|\\[media=\\{\"format\":\"([^\"]+)\"\\}\\]([^\\]]+)\\[\\/media\\]/g;\n var matches = pattern.execAll(content.attributes[attributeName].value);\n\n for (var i = 0; i < matches.length; i++) {\n var mediaId = getMediaIdFromMatch(matches[i]);\n var format = getMediaFormatFromMatch(matches[i]);\n content.attributes[attributeName].value = updateAttribute(content.attributes[attributeName].value, mediaId, format, getMediaAlt(mediaId, content.language));\n updated = true;\n }\n }\n }\n\n if (updated) {\n db.content.update({_id: content._id}, content);\n }\n });\n '));\n }", "public function editgraphicmediaAction(){\n\n\t\tglobal $mySession;\n\t\t\n \t\t$this->view->pageHeading = \"Edit Media Information \";\n\t\n\t\t$this->view->pageDescription = \"Edit Media information \";\n\t\n\t\t$media_id =$this->_getParam('media_id') ;\n \t\n \t\t\n\t\t\n\t\t$form = new Application_Form_StaticForm();\n\t\t$form->graphic_media();\n\t\t\n\t\t \n \t\t$media_info = $this->modelStatic->getMedia($media_id);\n\t\t\n \t\tif(!$media_info){\n\t\t\t$mySession->infoMsg = \"No Such Media Item Exists in the database...!\";\n\t\t\t$this->_redirect('privatepanel/Media');\n\t\t}\n\t\t\n\t\t$form->populate($media_info);\n\t\t\n \t\t if($this->getRequest()->isPost()){\n\t\t\t \n\t\t\t $posted_data = $this->getRequest()->getPost();\n\t\t\t \n \t\t\t if($form->isValid($posted_data)){\n\t\t\t\t \n \t\t\t\t$media_path = $this->_handle_uploaded_image();\n\t\t\t\t\n\t\t\t\tif($media_path->success){\n\t\t\t\t\t\n\t\t\t\t\t$data_array = $form->getValues();\n\t\t\t\t\t\n\t\t\t\t\tif($media_path->media_path){\n \t\t\t\t\t\t$data_array['media_path'] = $media_path->media_path ;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tunset($data_array['media_path']);\n\t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\t$is_update = $this->modelStatic->add(\"graphic_media\",$data_array,\"media_id=\".$media_id); // Save Style in db\n\t\t\t\t\n\t\t\t\t\tif(is_object($is_update) and $is_update->success){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($data_array['media_path'])){\n\t\t\t\t\t\t\t$this->_unlink_media_image($media_info['media_path']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$mySession->successMsg = \"Media Information Successfully Updated \"; // Sucessss\n\t\t\t\t\t\t$this->_helper->getHelper('Redirector')->gotoRoute(array(),'admin_graphic_media');\n\t\t\t\t\t} \n\t\t\t\t\n \t\t\t\t\t$mySession->errorMsg = $is_update->message; \n \t\t\t\t}\n\t\t\t\t\n\t\t\t\t$mySession->errorMsg = $media_path->message; \n\n\t\t\t}else{\n\t\t\t\t$mySession->errorMsg = \" Please Check Information Again ... ! \";\n \t\t\t}\n\t\t \n\t\t }\n\t\t\n\t\t $this->view->form = $form;\n\t\t /* User Add Style Page to Render */\n\t\t$this->_helper->getHelper('viewRenderer')->renderScript(\"add.phtml\");\n\t\t \n \t}", "abstract function update( Content $object );", "public function updated(Medium $medium)\n {\n //\n }", "public function update()\n {\n $data = [];\n $params = [];\n\n foreach($this as $key => $value){\n if ($key == 'id') {\n continue;\n }\n $params[] = $key.'=:'.$key;\n $data[':'.$key] = $value;\n }\n $data[':id'] = $this->id;\n $sql = 'UPDATE ' . static::TABLE . ' SET ' .implode(', ', $params). ' WHERE id = :id';\n $db = new \\App\\Dbconnect\\Db;\n $db->execute($sql, $data);\n }", "public function update(UpdateWork $request,$id)\n {\n\n $model=Work::findorfail($id);\n\n if($request->status==\"on\")\n {\n $status = 'open';\n }else\n {\n $status = 'close';\n }\n\n $model->update([\n\n 'title'=>$request->title,\n 'des'=>$request->des,\n 'seo_title'=>$request->title,\n 'seo_des'=>$request->des,\n 'des'=>$request->des,\n 'address'=>$request->address,\n 'ex_date'=>$request->ex_date,\n 'status'=>$status\n\n ]);\n\n $model->first()->categories()->sync($request->category_id);\n\n if($request->image != null)\n {\n $old = $model->media()->first()->url;\n $file_name = $this->saveFile($request->image, '/works', $old);\n $model->media()->update([\n\n 'url' => $file_name\n ]);\n }\n\n\n $model->save();\n flash()->success(\"تم التعديل بنجاح\");\n return back();\n }", "public function insertMediaInABSPlaylist() \n {\n\n $this->autoRender = false;\n $media=$this->request->getData('media', $this->request->getQuery('media'));\n foreach ($media as $key => $value): \n $absMedia = $this->AbsMedia->newEntity();\n $absMedia->media_id = $value;\n if ($this->AbsMedia->save($absMedia))\n {\n $absMedia->insertMediaInPlaylist($absMedia->media_id);\n } \n endforeach;\n \n }", "public function set_media($media)\n\t{\n\t\t\t$this->media = $media;\n\t}", "public function set_media($media)\n\t{\n\t\t\t$this->media = $media;\n\t}", "public function update() {\n $this->em->update($_POST, $_GET['page']);\n $this->saveImg($_FILES);\n }", "public function updateItem($id, Request $request)\n {\n $expertMediaRequest = ExpertMediaRequest::findOrFail($id);\n $expertMediaRequest->expert_id = $request->get('expert_id');\n $expertMediaRequest->name \t = $request->get('name');\n $expertMediaRequest->title \t = $request->get('title');\n $expertMediaRequest->phone \t = $request->get('phone');\n $expertMediaRequest->email = $request->get('email');\n $expertMediaRequest->interview_type = $request->get('interview_type');\n $expertMediaRequest->description = $request->get('description');\n $expertMediaRequest->media_outlet = $request->get('media_outlet', null);\n $expertMediaRequest->city = $request->get('city', null);\n $expertMediaRequest->state = $request->get('state', null);\n $expertMediaRequest->deadline = $request->get('deadline', null);\n $expertMediaRequest->is_acknowledged = $request->get('is_acknowledged', 0);\n\n if($expertMediaRequest->save()) {\n return $this->setStatusCode(201)\n ->respondUpdatedWithData('Expert media request updated.',[ 'record_id' => $expertMediaRequest->id ] );\n }\n }", "public function media()\n\t{\n\t\treturn $this->belongsTo('Vazmer\\Media\\Media', 'media_id');\n\t}", "public function update()\n {\n /*$art = Art::find(19);\n $art->name = '熊猫';\n $art->save();*/\n\n Art::where('id','>','14')->update(['name'=>'syd']);\n\n }", "public function relateToMedia(&$model, $controller) {\n\n //Get refresh key from the session\n $refreshKey = $this->getRefreshKey($controller);\n\n //Fields to select\n $fields = array('id', 'refresh_key', 'name');\n\n //Build where clause\n $where_clause = array(\n array(\n 'where' => 'where',\n 'column' => 'refresh_key',\n 'operator' => '=',\n 'operand' => $refreshKey\n )\n );\n //Build extra parameters\n $parameters = array();\n $parameters['orderBy'][] = array('order' => 'asc');\n $parameters['orderBy'][] = array('id' => 'asc');\n //Select pre-uploaded media\n $media_model = $this->select($fields, $where_clause, 2, $parameters);\n\n if ($media_model) {//There exists a media model for this property\n foreach ($media_model as $singleModel) {//Loop through each model\n //Clear the refresh key\n $singleModel->refresh_key = '';\n //Relate this media to this property\n $model->media()->save($singleModel);\n }//E# foreach statement\n }//E# if statement\n //Clear the media refresh key\n $this->clearRefreshKey($controller);\n\n return '';\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $old_media = $model->media_id;\n $role = $model->role;\n // $model->scenario = 'update';\n\t\tif($model->load(Yii::$app->request->post())){\n if($model->role==UserTypes::ADMIN || $model->role==UserTypes::QUOTATION_MANAGER || $model->role==UserTypes::FOLLOW_UP_MANAGER)\n $model->head = null;\n if($model->role==UserTypes::QUOTATION_STAFF)\n $model->head = Yii::$app->request->post('quotation_head');\n if($model->role==UserTypes::FOLLOW_UP_STAFF)\n $model->head = Yii::$app->request->post('followup_head');\n if($model->role==UserTypes::BOOKING_STAFF)\n $model->head = Yii::$app->request->post('head');\n\n if($model->confirm_password!=''){\n\n $model->setPassword($model->confirm_password);\n //$model->generateAuthKey();\n }\n $media = UploadedFile::getInstance($model, 'media_id');\n if ($media != null && !$media->getHasError()) {\n $media_id = LogoUploader::LogoUpload($media, MediaTypes::PROFILE_PHOTO, $type = $model->role);\n }\n if (isset($media_id)) {\n $model->media_id = $media_id;\n }\n else{\n $model->media_id = $old_media;\n if($old_media!='' && $role!=$model->role){\n $media = Media::find()->where(['id' => $old_media])->one();\n $fname = $media->file_name;\n if(file_exists($role==UserTypes::ADMIN ? DirectoryTypes::getAdminDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n $role==UserTypes::QUOTATION_MANAGER ? DirectoryTypes::getQuotationManagerDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n $role==UserTypes::FOLLOW_UP_MANAGER ? DirectoryTypes::getFollowUpManagerDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n DirectoryTypes::getStaffDirectory(DirectoryTypes::UPLOADS, false) . $fname )){\n rename($role==UserTypes::ADMIN ? DirectoryTypes::getAdminDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n $role==UserTypes::QUOTATION_MANAGER ? DirectoryTypes::getQuotationManagerDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n $role==UserTypes::FOLLOW_UP_MANAGER ? DirectoryTypes::getFollowUpManagerDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n DirectoryTypes::getStaffDirectory(DirectoryTypes::UPLOADS, false) . $fname,\n $model->role==UserTypes::ADMIN ? DirectoryTypes::getAdminDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n $model->role==UserTypes::QUOTATION_MANAGER ? DirectoryTypes::getQuotationManagerDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n $model->role==UserTypes::FOLLOW_UP_MANAGER ? DirectoryTypes::getFollowUpManagerDirectory(DirectoryTypes::UPLOADS, false) . $fname :\n DirectoryTypes::getInquiryCollectorDirectory(DirectoryTypes::UPLOADS, false) . $fname);\n }\n }\n }\n\t\t\tif ($model->save()) {\n Yii::$app->getSession()->setFlash('info', 'Profile is updated successfully.');\n\t\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t\t} else {\n\t\t\t\treturn $this->render('update', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t]);\n\t\t\t}\n\t\t}else{\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n }", "public function update($alternative_medium)\n {\n $query=\"UPDATE alternative_medium \".\n\t \"SET \".\n \"id= \".$alternative_medium->id.\" ,\".\n \"medium= \".$alternative_medium->medium.\" ,\".\n \"alternative_release= \".$alternative_medium->alternative_release.\" ,\".\n \"name='\".$this->sqlSafe($alternative_medium->name).\"' \". \n\t \"WHERE id=\".$alternative_medium->id;\n\n $this->executeQuery($query);\n }", "public function db_update()\r\n {\r\n $this->delete_all();\r\n $this->db->clear_table('traiteffects');\r\n\r\n // also delete the images cache\r\n $files = glob('images/cache/*');\r\n foreach ($files as $path) {\r\n if (is_file($path)) {\r\n unlink($path);\r\n }\r\n }\r\n\r\n $this->db_update_from_api();\r\n }", "private function updateDatabase()\n {\n $this->updated_at = date(\"Y-m-d H:i:s\");\n\n $db = Application::getInstance()->databaseConnection()->pdo();\n\n $attributes = '';\n $values = [];\n\n foreach ($this->attributes as $attribute) {\n if ($attributes != '') {\n $attributes .= ', ';\n }\n\n $attributes .= $attribute . '=?';\n $values[] = $this->{$attribute};\n }\n\n $stmt = $db->prepare('UPDATE ' . static::$table . ' SET ' . $attributes . ' WHERE ' . $this->idColumn . ' = ' . $this->{$this->idColumn});\n $stmt->execute($values);\n }", "public function update(Request $request, MedicalRecord $medicalRecord)\n {\n //\n }", "public function updateMaterialInMultimediaObject(MultimediaObject $multimediaObject, Material $material)\n {\n $this->dm->persist($multimediaObject);\n $this->dm->flush();\n\n $this->dispatcher->dispatchUpdate($multimediaObject, $material);\n\n return $multimediaObject;\n }", "public function edit_post($media_id)\n {\n $user_id = $this->post('user_id');\n $auth_token = $this->post('auth_token');\n \n $imageData['media_title'] = $this->post('image_title');\n $imageData['link'] = $this->post('link');\n $imageData['updated_date'] = time();\n \n //checking auth token\n $record = $this->artists_model->is_valid_token($user_id,$auth_token);\n if($record == 0){\n //redirect to login\n $this->response([\n 'status' => FALSE,\n 'message' => 'Unauthorize user,please login again',\n 'status_code' => 401\n ], REST_Controller::HTTP_UNAUTHORIZED); // UNAUTHORIZED (401) being the HTTP response code\n }\n \n \n if($media_id != '' && $imageData['media_title'] !='' && $imageData['link'] != '')\n {\n $record = $this->artists_model->update_song($media_id,$imageData);\n $image_data = $this->artists_model->get_song_details($media_id);\n \n $message = [\n 'status' => TRUE,\n 'message' => 'Image updated successfully',\n 'song_data' => $image_data,\n 'status_code'=> 200\n ];\n $this->set_response($message, REST_Controller::HTTP_OK);\n }\n else\n {\n $message = [\n 'status' => FALSE,\n 'message' => 'Image not updated,please enter required fields properly',\n 'status_code'=> 400\n ];\n $this->set_response($message, REST_Controller::HTTP_BAD_REQUEST); \n }\n }", "public function update()\n {\n return $this->save();\n }", "public function update_social_media(Request $request)\n {\n $setting = Setting::find(2);\n $setting->options = '{\"facebook\":\"'.$request->facebook.'\",\"twitter\":\"'.$request->twitter.'\"}';\n $setting->save();\n\n Flash::success(trans('backend.updated_successfully'));\n return back();\n }", "private function setMediaId(int $id): void\n {\n $this->query->organisation->all_media->attribute('id', $id);\n }", "public function setNewRankMedia($id = null,$count=null) \n {\n\n $playlistss_medias= \\Cake\\ORM\\TableRegistry::get('playlists_media');\n $mediass_playlists = $playlistss_medias->get($id);\n $mediass_playlists->rank=$count; \n if ($playlistss_medias->save($mediass_playlists)) {\n var_dump($mediass_playlists);\n }\n \n }", "public function updateObject($object)\n {\n if (!is_a($object, 'Object_MediaAsset')) {\n return false;\n }\n\n if ($object->file_path != $this->getValue('filepath')) {\n unlink($object->getFilePath());\n $object->file_path = $this->getValue('filepath');\n }\n $object->name = $this->getValue('name');\n $object->description = $this->getValue('description');\n $object->modified_datetime = date('Y-m-d H:i:s');\n return $object->save();\n }", "public function update() {\n\t\tif ($this->getId() == 0 || $this->getId() == null) {\n\t\t\t/* un identifiant 0 ou null implique un nouvel objet => INSERT */\n\t\t\treturn$this->save();\n\t\t} else {\n\t\t\t$requete = 'UPDATE genre SET ';\n\t\t\t$requete .= 'nom = \\''.$this->getNom().'\\',';\n\t\t\t$requete = substr($requete,0,strlen($requete)-1);\n\t\t\t$requete .= ' WHERE id = '.$this->getId();\n\t\t\treturn $requete;\n\t\t}\n\t}", "public function update()\n\t{\n\t\t$this->user->db_update();\n\t}", "public function getIdMedia()\n {\n return $this->id_media;\n }", "public function update_social_media()\n {\n $user_id = user()->id;\n $data = array(\n 'facebook_url' => $this->input->post('facebook_url', true),\n 'twitter_url' => $this->input->post('twitter_url', true),\n 'instagram_url' => $this->input->post('instagram_url', true),\n 'pinterest_url' => $this->input->post('pinterest_url', true),\n 'linkedin_url' => $this->input->post('linkedin_url', true),\n 'vk_url' => $this->input->post('vk_url', true),\n 'youtube_url' => $this->input->post('youtube_url', true)\n );\n\n $this->db->where('id', $user_id);\n return $this->db->update('users', $data);\n }", "public function ajoutervideo(Media $media)\r\n{\r\n $q = $this->_db->prepare('INSERT INTO video (name) VALUES (:name)');\r\n $q->execute(array(\r\n 'name' => $media->getname()));\r\n}", "public function update(Request $request, Medic $medic) {\n \n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'mv_mm_image_mobile' => 'image|nullable|max:1999|required'\n ]);\n\n // Handle file upload\n $request->hasFile('mv_mm_image_mobile');\n // Get filename with the extension\n $filenameWithExt = $request->file('mv_mm_image_mobile')->getClientOriginalName();\n // Get just file name\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n //Get just ext\n $extension = $request->file('mv_mm_image_mobile')->getClientOriginalExtension();\n // Filename to store\n $fileNameToStore = $filename.'_'.time().'.'.$extension;\n // Upload the image\n $path = $request->file('mv_mm_image_mobile')->storeAs('public/mv/mobile/', $fileNameToStore);\n \n\n // Create post\n $mvmm = MVMM::find($id);\n $mvmm->mv_mm_image_mobile = $fileNameToStore;\n $mvmm->save();\n return redirect('/home-admin')->with('success', 'Data Updated');\n }", "public function modify_db( $file_path, $fullsizepath, $media ){\n global $wpdb;\n $wpdb->hide_errors();\n $position = strpos($file_path, 'gravity_forms/');\n $is_index = strpos($file_path, 'index.html');\n $is_htaccess = strpos($file_path, '.htaccess');\n $root_dir = ud_get_stateless_media()->get( 'sm.root_dir' );\n \n \tif ( empty($this->plugin_version) && class_exists('GFForms') ) {\n \t\t$this->plugin_version = \\GFForms::$version;\n }\n\n $gf_val_column = 'meta_value';\n $gf_table = \\GFFormsModel::get_entry_meta_table_name();\n if(version_compare($this->plugin_version, '2.3', '<')){\n $gf_val_column = 'value';\n }\n\n if( $position !== false && !$is_index ){\n $dir = wp_upload_dir();\n $file_path = trim($file_path, '/');\n //EDIT: Use base file name since the URL in the DB could be encoded with in an array\n $file_single = basename($file_path);\n\n // Todo add filter.\n\n // We need to get results from db because of post image field have extra data at the end of url.\n // Also url could be array and json encoded.\n // Unless we would loss those data.\n // xyz.jpg|:|tile|:|description|:|\n $query = sprintf(\n \"\n SELECT id, {$gf_val_column} AS value FROM {$gf_table}\n WHERE {$gf_val_column} like '%s';\n \"\n , '%' . $file_single . '%'\n );\n $results = $wpdb->get_results( $query );\n $this->throw_db_error();\n\n foreach ($results as $result) {\n $position = false;\n\t\t\t\t\t\t//EDIT: Check if value is json encoded, if so, cycle through array and replace URLs.\n $value = json_decode($result->value);\n\n\t\t\t\t\t\tif (json_last_error() === 0) {\n\t\t\t\t\t\t\tforeach( $value as $k => $v ){\n\t\t\t\t\t\t\t\t $position = strpos($v, $dir['baseurl']);\n\t\t\t\t\t\t\t\t if($position !== false){\n\t\t\t\t\t\t\t\t \t$value[$k] = str_replace($dir['baseurl'], ud_get_stateless_media()->get_gs_host() . '/' . $root_dir, $v );\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$result->value = json_encode($value);\n }\n else{\n\t\t\t\t\t\t\t$position = strpos($result->value, $dir['baseurl']);\n\t\t\t\t\t\t\t$result->value = str_replace($dir['baseurl'], ud_get_stateless_media()->get_gs_host() . '/' . $root_dir, $result->value);\n\t\t\t\t\t\t}\n\n if($position !== false){\n $query = sprintf(\n \"\n UPDATE {$gf_table}\n SET {$gf_val_column} = '%s'\n WHERE id = %d\n \"\n , $result->value, $result->id\n );\n $entries = $wpdb->get_results( $query );\n $this->throw_db_error();\n }\n\n }\n }\n }", "public function update(){}" ]
[ "0.68281376", "0.68281376", "0.68281376", "0.672796", "0.66386235", "0.6601141", "0.6554635", "0.6553862", "0.65402853", "0.6480168", "0.64275813", "0.6302256", "0.62133676", "0.6130829", "0.597197", "0.59664494", "0.5935895", "0.5925252", "0.58861727", "0.587163", "0.5867368", "0.5855053", "0.58424217", "0.5838015", "0.5836992", "0.58061147", "0.580391", "0.57886934", "0.57817656", "0.5773569", "0.573665", "0.5734627", "0.5734627", "0.5734627", "0.5729194", "0.5717437", "0.57118285", "0.56990546", "0.56648946", "0.5663204", "0.56557876", "0.5628846", "0.5575146", "0.55596375", "0.55482334", "0.55456704", "0.5542137", "0.553577", "0.55314493", "0.5524203", "0.5506423", "0.5506423", "0.54949677", "0.5477113", "0.5474912", "0.54485494", "0.5430357", "0.542243", "0.5409639", "0.54013103", "0.5395244", "0.53922975", "0.5390959", "0.5389165", "0.53821844", "0.53812766", "0.5374135", "0.53609616", "0.5352302", "0.5348182", "0.5345392", "0.53336763", "0.5329892", "0.5329892", "0.53291863", "0.5322931", "0.5310266", "0.5306219", "0.530448", "0.52819604", "0.5278298", "0.5264935", "0.52543837", "0.52517307", "0.52466387", "0.52367175", "0.5213042", "0.5207458", "0.52016884", "0.52008736", "0.5188753", "0.51807755", "0.5177034", "0.5167913", "0.5164788", "0.5157008", "0.51551694", "0.51458985", "0.5143379", "0.5143283" ]
0.76876104
0
Deletes the current Media object from the database.
Удаляет текущий объект Media из базы данных.
public function delete() { // Does the Media object have an ID? if ( is_null( $this->mediaId ) ) trigger_error ( "Media::delete(): Attempt to delete an Media object that does not have its ID property set.", E_USER_ERROR ); // Delete the Media $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); $st = $conn->prepare ( "DELETE FROM media WHERE mediaId = :mediaId LIMIT 1" ); $st->bindValue( ":mediaId", $this->mediaId, PDO::PARAM_INT ); $st->execute(); $conn = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// TODO: if a soft delete is prefered, change this to update the deleted flag instead of hard-deleting\n\n\t\t\t$pk = $this->GetRouter()->GetUrlParam('idmedia');\n\t\t\t$media = $this->Phreezer->Get('Media',$pk);\n\n\t\t\t$media->Delete();\n\n\t\t\t$output = new stdClass();\n\n\t\t\t$this->RenderJSON($output, $this->JSONPCallback());\n\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "public function delete() {\n $row = $this->getDbFolder();\n try {\n $row->delete();\n } catch (PDOException $e) {\n switch ($e->getCode()) {\n case 23000: $message = 'Složka nemůže být smazána, protože není prázdná.'; break;\n default: 'Složku se nepodařilo smazat ('. $e->getMessage() .').';\n }\n throw new Indil\\MediaException($message, NULL, $e);\n }\n }", "public function deleteMedia($media_id)\n {\n \n $media = Media::find($media_id);\n\n\n $media->image()->delete();\n\n $media->delete();\n\n //$deletedRows = Media::where('media_id', $media_id)->delete();\n \n return Redirect::to('/media/')->withFlashMessage('Item Deleted Successfully.');\n }", "public function delete()\n {\n $image_name = $this->request->query('image_name');\n $id = $this->request->query('image_id');\n $this->loadModel('Media');\n //Delete photo\n if (!empty($image_name)) {\n unlink(WWW_ROOT.'uploads/photo_notifications/'.$image_name);\n }\n //Delete record\n $this->Media->id = $id;\n $this->Media->delete();\n }", "public function destroy(Media $media)\n {\n //\n }", "public function destroy(Media $media)\n {\n //\n }", "public function destroy(Media $media)\n {\n //\n }", "public function delete(Media $entry)\n {\n $entry->delete();\n }", "protected function handleMediaDeletion(): void\n {\n if (static::hasGlobalScope(SoftDeletingScope::class) && !$this->forceDeleting) {\n if (config('mediable.detach_on_soft_delete')) {\n $this->newBaseQueryBuilder()\n ->from(config('mediable.mediables_table', 'mediables'))\n ->where('media_id', $this->getKey())\n ->delete();\n }\n // unlink associated file on delete\n } elseif ($this->storage()->has($this->getDiskPath())) {\n $this->storage()->delete($this->getDiskPath());\n }\n }", "public function delete()\n {\n\n $this->user->require_permission('manage_media');\n\n $ids = $this->data('id');\n \n // if we just have a single ID, make it into an array so we can proceed on that assumption. \n if(!is_array($ids)) $ids = array($ids);\n\n if(!$this->MediaModel('delete',$ids)) return array(false,'An error occurred while attempting to delete this media.');\n\n return array(true,'Media has been permanently deleted.');\n\n }", "public function deleteAll(){\n DwMedia::query()->delete();\n }", "public function delete() {\n $this->record->delete();\n }", "public function testDeleteModelRemovesMediaOnStorageByDefault()\n {\n $this->setUrls([\n Media::class => 'foo/:year/:month/:id'\n ]);\n \n $media = new Media(['id' => 123]);\n $media->link($this->createFile(\"\"));\n $media->delete();\n\n $this->assertFalse($media::getMediaManager()->has($media));\n }", "public function delete()\n { if (is_null($this->id))\n trigger_error(\"Spectra::delete(): Attempt to delete a Spectra object that does not have its ID property set.\", E_USER_ERROR);\n\n // Delete the Spectra\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $st = $conn->prepare(\"DELETE FROM spectra WHERE id = :id LIMIT 1\");\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "public function afterDelete()\n\t{\t\n\t\tparent::afterDelete();\n\t\t\n\t\t//remove all related media\n\t\tforeach($this->media as $media) {\n\t\t\t$media->delete();\n\t\t}\n\t}", "function delete()\n\t{\n\t\tglobal $sql;\n\t\t$sql->Query(\"DELETE FROM $this->tablename WHERE id = '$this->id'\");\n\n\t\tif($this->path)\n\t\t\t@unlink($this->path);\n\t\tif($this->thumbnail)\n\t\t\t@unlink($this->thumbnail);\n\t\tif($this->square)\n\t\t\t@unlink($this->square);\n\t\tif($this->small)\n\t\t\t@unlink($this->small);\n\t\tif($this->medium)\n\t\t\t@unlink($this->medium);\n\t\tif($this->large)\n\t\t\t@unlink($this->large);\n\n\t}", "public function deletegraphicmediaAction(){\n\t\t\n\t\tglobal $mySession;\n \n \t\t$this->_helper->layout->disableLayout();\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t\n\t\t$media_id = $this->_getParam(\"media_id\");\n\t\t\n\t\t$media_info = $this->modelStatic->getMedia($media_id);\n\t\t\n\t\t\n\t\tif(empty($media_info)){\n\t\t\t$mySession->errorMsg = \"No Such Graphic Media Found in the database\";\n\t\t\t$this->_helper->getHelper('Redirector')->gotoRoute(array(),'admin_graphic_media');\n \t\t}\n\t\t\n\t\t\n\t\t$this->_unlink_media_image($media_info['media_path']);\n\t\t\n \t\t$removed = $this->modelStatic->getAdapter()->delete(\"graphic_media\",\"media_id IN (\".$media_id.\")\");\n\t\t\n\t\t$mySession->successMsg = \"Graphic Media Successfully Deleted From the Database \";\n\t\t\n\t\t$this->_helper->getHelper('Redirector')->gotoRoute(array(),'admin_graphic_media');\n\t\t\t\n \t\t \n\n\t\n\t}", "public function deleteMedia(){\n $filename = urldecode($this->filename);\n App::fs()->remove(Theme::getSelected()->getMediasDir() . $filename);\n }", "public function delete(){\n if($this->id > 0){\n SQL::delete($this::STORAGE, [\"id\" => $this->id]);\n }\n }", "public function delete()\n\t{\n\t\tif (!$this->exists()) return;\n\t\t$table = $this->table();\n\t\t$table->delete($this->where());\n\t\t$this->_id = null;\n\t}", "public function delete()\n\t{\n\t\t$this->__delete();\n\t}", "public function delete()\n\t{\n\t\t$this->__delete();\n\t}", "public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }", "public function deleteMedia($media_id)\n\t{\n\t\t$deletedRows = Media::where('media_id', $media_id)->delete();\n\t\treturn Redirect::to('/media/')->withFlashMessage('Item Deleted Successfully.');\n\t}", "public function delmediaAction() {\n\t\t$files = new Files ();\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\tif (is_numeric ( $id )) {\n\t\t\t$file = ProductsMedia::getMediabyId ( $id );\n\t\t\tif (! empty ( $file ['filename'] )) {\n\t\t\t\tif (file_exists ( PUBLIC_PATH . $file ['path'] )) {\n\t\t\t\t\tif (unlink ( PUBLIC_PATH . $file ['path'] )) {\n\t\t\t\t\t\tProductsMedia::delMediabyId ( $id );\n\t\t\t\t\t\t$this->_helper->redirector ( 'edit', 'products', 'admin', array ('id' => $file ['product_id'], 'mex' => 'The media file has been deleted.', 'status' => 'success' ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_helper->redirector ( 'edit', 'products', 'admin', array ('id' => $file ['product_id'], 'mex' => 'The media file has been not deleted. Check the file permissions.', 'status' => 'danger' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tProductsMedia::delMediabyId ( $id );\n\t\t\t\t\t$this->_helper->redirector ( 'edit', 'products', 'admin', array ('id' => $file ['product_id'], 'mex' => 'The media file has not been found but the record has been deleted', 'status' => 'attention' ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->_helper->redirector ( 'list', 'products', 'admin', array ('mex' => 'The media file has been not deleted.', 'status' => 'danger' ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_helper->redirector ( 'list', 'products', 'admin', array ('mex' => 'The media file has been not deleted.', 'status' => 'danger' ) );\n\t\t}\n\t}", "public function deleteAction(Request $request, Media $Media)\n {\n $form = $this->createDeleteForm($Media);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($Media);\n $em->flush();\n }\n\n return $this->redirectToRoute('media_index');\n }", "final public function delete() {\n if (method_exists($this, 'onDelete')) {\n $this->onDelete();\n }\n\n $class = get_called_class();\n\n __db()->delete(\n $this->getTableName(),\n array(\n $class::getPrimaryName() => $this->_id\n )\n );\n }", "public function delete(){\n\t\t//Llama al metodo estatico de borrar y le pasa el id del objeto actual\n\t\tself::__delete($this->id);\n\t}", "public function delete() {\n $this->db->delete($this->table, array(\n $this->id => $this->{$this->id}, \n ));\n unset($this->{$this->id});\n }", "public function destroy($id) {\n Integration::where('media_id', $id)->delete();\n Media::destroy($id);\n }", "function delete()\n {\n unlink( $this->imagepath() );\n\n // Delete from database\n parent::delete();\n }", "public function destroy(Media $media)\n {\n $this->setEvents([\n 'success' => DestroySuccess::class,\n 'fail' => DestroyFail::class\n ]);\n return $this->destroyModel($media);\n }", "public function removeMedia(Request $request)\r\n {\r\n $input = $request->all();\r\n $order = $this->orderRepository->findWithoutFail($input['id']);\r\n try {\r\n if ($order->hasMedia($input['collection'])) {\r\n $order->getFirstMedia($input['collection'])->delete();\r\n }\r\n } catch (\\Exception $e) {\r\n Log::error($e->getMessage());\r\n }\r\n }", "public function delete() {\n if (!ObjectModel::$db)\n ObjectModel::$db = Db::getInstance();\n\n if (!$this->_db)\n $this->_db = ObjectModel::$db;\n\n\n $this->clearCache();\n\n $result = $this->_db->delete($this->def['table'], '`' . pSQL($this->def['primary']) . '` = ' . (int) $this->id);\n\n if (!$result)\n return false;\n\n $this->id = null;\n\n return $result;\n }", "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $clothesOrder = $this->clothesOrderRepository->findWithoutFail($input['id']);\n try {\n if($clothesOrder->hasMedia($input['collection'])){\n $clothesOrder->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "public function removeMedia(Media $media)\n {\n $this->entity->removeMedia($media->getEntity());\n }", "public function deleteAction ()\r\n {\r\n $this->view->id = (int) $this->_getParam('id');\r\n $MediaModel = new Admin_Model_Multimedia();\r\n $this->auth_session->deleteCrsf = sha1(microtime(true));\r\n $this->view->csrf = $this->auth_session->deleteCrsf;\r\n $this->view->canDelete = $MediaModel->canModify(\r\n $this->auth_session->username, $this->view->id);\r\n }", "public function deleteAction(Tx_Wpj_Domain_Model_mediafile $mediafile) {\n\t\t$this->mediafileRepository->remove($mediafile);\n\t\t$this->flashMessageContainer->add('Your mediafile was removed.');\n\t\t$this->redirect('index');\n\t}", "public function delete()\n\t{\n\t\tLMongo::collection($this->collection)->where('_id', $this->_id)->remove();\n\t}", "public function delete()\n {\n if (!$this->linked) {\n try {\n $this->storage->delete();\n } catch (Exception $e) {}\n }\n }", "public function delete() {\n\n $query = DB::connection()->prepare('DELETE FROM BandGenre WHERE genre_id = :genre AND band_id = :band_id');\n\n $query->execute(array('band_id' => $this->band_id, 'genre' => $this->genre_id));\n }", "public function removeOldMedia(Collection $mediasForDestroy): void;", "public function delete()\n { \n $command = \\Yii::$app->db->createCommand(\"UPDATE screenplay SET deleted=1 WHERE id = :screenplayid\");\n $command->bindValue(':screenplayid', intval($this->getId()));\n return $post = $command->query();\n }", "public function delete()\r\n\t{\r\n\t\tglobal $db;\r\n\r\n\t\t$id = $this->data['id'];\r\n\r\n\t\tif(isset(static::$cache[$id]))\r\n\t\t\tunset(static::$cache[$id]);\r\n\r\n\t\t$db->delete_query(static::$table, \"id='{$id}'\");\r\n\t}", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n }", "public function delete()\n\t{\n\t\t$this->clean();\n\t\t$this->save();\n\t}", "public function delete() {\n $this->storage_file->delete();\n }", "public function destroy($id)\n {\n try{\n $media = Media::where('item', $id)->get(); \n foreach ($media as $element) {\n if ($delete=Storage::disk('properties')->has($element -> url)) {\n $delete=Storage::disk('properties')->delete($element -> url);\n }\n }\n\n PropertiesTypesRelations::where('property_id', $id) -> delete();\n GoogleMapsLocations::where('property_id', $id) -> delete();\n Media::where('item', $id) -> delete();\n Property::FindOrFail($id) -> delete();\n Historical::insert([\n 'transaction' => 3, \n 'description' => 'La propiedad ' . $id . ' fue eliminada', \n 'user' => Auth::user()->id, \n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]);\n Log::notice('Registro exitoso en propertyController -> destroy');\n }catch (\\Exception $e) {\n Log::error('Error en propertyController -> destroy. Error: ['.$e.']');\n flash('¡Error! Ha ocurrido un problema', 'danger');\n }\n\n flash('Propiedad eliminada exitosamente ', 'success');\n return redirect()->route('propiedades.index');\n}", "public function delete()\n {\n static::getCollection()\n ->deleteOne([self::INTERNAL_PRIMARY_KEY => $this->_id]);\n }", "public function delete()\n {\n $tableName = $this->getTableName();\n $sql = \"DELETE FROM $tableName WHERE id = :id\";\n $this->bd->exec($sql, [':id' => $this->id]);\n }", "public function delete( $id = null) {\n $this->request->allowMethod( ['post', 'delete'] );\n\n $media = $this->Media->get( $id );\n if ( $this->Media->delete( $media ) ) {\n\n unlink( WWW_ROOT . 'img/' . $media['media_link'] );\n if ( $media['thumb_link'] != null ) {\n unlink( WWW_ROOT . 'img/' . $media['thumb_link'] );\n }\n $this->Flash->success( __( 'Your media post has been deleted.' ) );\n return $this->redirect( ['action' => 'posts'] );\n }\n $this->Flash->error( __( 'Unable to delete your media post.' ) );\n }", "protected function _delete()\n\t{\n\t\tEngine_Api::_() -> getDbTable('favorites', 'ynvideo') -> delete(array('video_id = ?' => $this -> getIdentity(), ));\n\n\t\t// remove video from favorite table\n\t\tEngine_Api::_() -> getDbTable('favorites', 'ynvideo') -> delete(array('video_id = ?' => $this -> getIdentity(), ));\n\n\t\t// remove video from rating table\n\t\tEngine_Api::_() -> getDbTable('ratings', 'ynvideo') -> delete(array('video_id = ?' => $this -> getIdentity(), ));\n\n\t\t// remove video from watchlater table\n\t\tEngine_Api::_() -> getDbTable('watchlaters', 'ynvideo') -> delete(array('video_id = ?' => $this -> getIdentity(), ));\n\n\t\t// update video count in signature table\n\t\t$signatureTbl = Engine_Api::_() -> getDbTable('signatures', 'ynvideo');\n\t\t$signature = $signatureTbl -> fetchRow($signatureTbl -> select() -> where('user_id = ?', $this -> owner_id));\n\t\tif ($signature)\n\t\t{\n\t\t\t$signature -> video_count = new Zend_Db_Expr('video_count - 1');\n\t\t}\n\t\t$signature -> save();\n\n\t\t// remove video from playlists\n\t\t$playlistAssocTbl = Engine_Api::_() -> getDbTable('playlistassoc', 'ynvideo');\n\t\t$playlistAssocs = $playlistAssocTbl -> fetchAll($playlistAssocTbl -> select() -> where('video_id = ?', $this -> getIdentity()));\n\t\tforeach ($playlistAssocs as $playlistAssoc)\n\t\t{\n\t\t\t$playlistAssoc -> delete();\n\t\t}\n\n\t\tparent::_delete();\n\t}", "public function delete()\n {\n try {\n $sql = 'DELETE FROM '.static::$tableName.' WHERE id = ?';\n $result = $this->db->prepare($sql);\n $result->bindValue(1, $this->id, PDO::PARAM_INT);\n $result->execute();\n } catch (Exception $e) {\n die('Error removing from database.');\n }\n }", "public function delete() {\n if($this->exists()) {\n unlink($this->path);\n }\n }", "public function delete()\n {\n $sql = 'DELETE FROM '. static::TABLE .' WHERE id = :id';\n $db = new \\App\\Dbconnect\\Db;\n $db->execute($sql, [':id' => $this->id]);\n }", "public function forceDeleted(PostMedia $postMedia)\n {\n //\n }", "public function delete()\n {\n foreach ($this->photos as $photo) {\n $photo->delete();\n }\n parent::delete();\n }", "public function delete()\n\t{\n\t\tforeach( \\IPS\\cms\\Databases::databases() as $databaseId => $database )\n\t\t{\n\t\t\t$fields = array( 'record_image', 'record_image_thumb' );\n\t\t\tforeach( \\IPS\\Db::i()->select( '*', 'cms_database_fields', array( 'field_database_id=? AND LOWER(field_type)=\\'upload\\'', $databaseId ) ) as $field )\n\t\t\t{\n\t\t\t\t$fields[] = 'field_' . $field['field_id'];\n\t\t\t}\n\t\t\t\n\t\t\t$where = array();\n\t\t\t\n\t\t\tforeach( $fields as $field )\n\t\t\t{\n\t\t\t\t$where[] = array( $field . ' IS NOT NULL' );\n\t\t\t}\n\t\n\t\t\tforeach( \\IPS\\Db::i()->select( '*', 'cms_custom_database_' . $databaseId, $where, 'primary_id_field ASC' ) as $row )\n\t\t\t{\n\t\t\t\tforeach( $fields as $field )\n\t\t\t\t{\n\t\t\t\t\tif ( isset( $row[ $field ] ) and ! empty( $row[ $field ] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = \\IPS\\File::get( 'cms_Records', $row[ $field ] )->delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function delete()\n\t{\n\t\tProductPhoto::where('product_id', $this->id)->delete();\n\t\tparent::delete();\n\t}", "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $productReview = $this->productReviewRepository->findWithoutFail($input['id']);\n try {\n if($productReview->hasMedia($input['collection'])){\n $productReview->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "public function delete()\n {\n global $databaseHandler;\n\n $statement = $databaseHandler->prepare('DELETE FROM `game` WHERE `id` = :id');\n $statement->execute([ ':id' => $this->id ]);\n\n $this->id = null;\n }", "public function delete()\n {\n $this->prepareExecute('DELETE FROM '. $this->database . '.'.$this->table.' WHERE id=?',array( $this->id ));\n }", "public function delete_ac_media() {\n\t\tif ( !wp_verify_nonce( $_POST['delete_ac_media_nonce'], 'delete_ac_media' ) ) {\n\t\t\twp_send_json_error( new WP_Error( 'delete_ac_media_nonce_error', __( \"Shenanigans are afoot. Bailing...\" ) ), 401 );\n\t\t}\n\n\t\t$post = get_post( $_POST['ac_media_id'] );\n\n\t\tif ( $post->post_type !== 'ac_media') {\n \t\twp_send_json_error( new WP_Error( 'delete_ac_media_post_type_error', __( \"That isn't a Audubon Core Media...\" ) ), 400 );\n \t}\n\n\t\tif ( $post->post_author != get_current_user_id() && !current_user_can( 'administrator' ) ) {\n \t\twp_send_json_error( new WP_Error( 'delete_ac_media_permission_error', __( \"You don't have permission to play with that...\" ) ), 401 );\n \t}\n\n \t$args = array(\n\t\t\t'post_parent' => $post->ID,\n\t\t\t'post_type' => 'any'\n\t\t);\n\t\t$children = get_children( $args );\n\n\t\tif ( wp_delete_post( $post->ID ) ) {\n\n\t\t\tforeach ($children as $child) {\n\t\t\t\twp_delete_attachment( $child->ID );\n\t\t\t}\n\n\t\t} else {\n \t\twp_send_json_error( new WP_Error( 'delete_ac_media_failure_error', __( \"Something went wrong during deletion.\" ) ), 400 );\n\t\t}\n\n\t\twp_send_json_success( $post->ID , 200 );\n\t}", "public function destroy($id)\n {\n $media = Media::find($id);\n Storage::delete($media->image);\n $media->delete();\n\n Session::flash('success', 'News zostal usuniety');\n return redirect()->route('medias.index');\n }", "public function destroy(FeedMedia $feedMedia) {\n //\n }", "public function removeMedia(Request $request)\n {\n $input = $request->all();\n $restaurant = $this->restaurantRepository->findWithoutFail($input['id']);\n try {\n if ($restaurant->hasMedia($input['collection'])) {\n $restaurant->getFirstMedia($input['collection'])->delete();\n }\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n }\n }", "public function deleteDanglingMedia() {\n //Now\n $now = new Carbon();\n\n $now->subDays(1);\n var_dump($now);\n\n //Fields to select\n $fields = array('*');\n\n $where_clause = array(\n array(\n 'where' => 'where',\n 'column' => 'mediable_id',\n 'operator' => '=',\n 'operand' => 0\n ),\n array(\n 'where' => 'where',\n 'column' => 'mediable_type',\n 'operator' => '=',\n 'operand' => ''\n ),\n array(\n 'where' => 'where',\n 'column' => 'created_at',\n 'operator' => '<',\n 'operand' => $now\n ),\n );\n\n //Select preuploaded media models\n $media_model = $this->select($fields, $where_clause, 2);\n\n echo 'Found ' . count($media_model) . ' dungling images';\n\n if ($media_model) {\n\n //Build media path\n $mediaPath = public_path() . \\Config::get($this->package . '::media.uploadPath');\n\n foreach ($media_model as $single_media) {\n echo \"deleted \" . $single_media->name . \"\\n\";\n //Build main path\n $main_path = $mediaPath . '/' . $single_media->name;\n\n //Build thumbnail path\n $thumbnail_path = $mediaPath . '/thumbnails/' . $single_media->name;\n\n if ($single_media['is_image'] && \\File::exists($thumbnail_path)) {//Media file exists\n //Delete thumbnail file\n \\File::delete($thumbnail_path);\n }//E# if statement\n\n if (\\File::exists($main_path)) {//Media file exists\n //Hurrah!\n //Delete main media file\n \\File::delete($main_path);\n\n //Delete media model\n $single_media->delete();\n }//E# if statement\n }//E# foreach statement\n }//E# if statement\n }", "public function delete() {\n // Delete from files\n $stmt = $this->db->prepare(\"DELETE FROM files where itemID = :itemID\");\n $stmt->bindValue(\":itemID\", $this->getItemID(), SQLITE3_INTEGER);\n $stmt->execute();\n // Delete item\n $stmt = $this->db->prepare(\"DELETE FROM items WHERE id = :itemID\");\n $stmt->bindValue(\":itemID\", $this->getItemID(), SQLITE3_INTEGER);\n $stmt->execute();\n // Clear variables here\n unset($this->itemID);\n unset($this->files);\n }", "public function destroy() {\n if($this->delete()) {\n // then remove the file\n // Note that even though the database entry is gone, this object \n // is still around (which lets us use $this->image_path()).\n $target_path = SITE_ROOT.DS.'public'.DS.$this->image_path();\n return unlink($target_path) ? true : false;\n } else {\n // database delete failed\n return false;\n }\n }", "public function destroy(Media $medium)\n {\n if($medium->post){\n return back();\n }\n $this->deleteImages($medium);\n $medium->delete();\n return back();\n }", "public function delete () {\n $this->db->delete($this->config()->table_name, array('id_'.$this->config()->class_name => $this->{'id_'.$this->config()->class_name}));\n }", "public function delete()\n {\n DB::beginTransaction();\n $res=parent::delete();\n \n if($res==true)\n {\n $relations=$this->morphMany('App\\Models\\Image', 'imageable');\n \n \n $relations->delete(); \n }\n \n DB::commit(); \n }", "function delete() {\n\t\t$query = '\n\t\t\tDELETE FROM '.system::getConfig()->getDatabase('momusic_content').'.musicWorks\n\t\t\tWHERE\n\t\t\t\tID = :ID\n\t\t\tLIMIT 1';\n\n\t\t$oStmt = dbManager::getInstance()->prepare($query);\n\t\t$oStmt->bindValue(':ID', $this->getID());\n\n\t\tif ( $oStmt->execute() ) {\n\t\t\t$oStmt->closeCursor();\n\t\t\t$this->reset();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function delete(){\n\t\t$this->db->delete($this::DB_TABLE, array(\n\t\t\t$this::DB_TABLE_PK => $this->{$this::DB_TABLE_PK},\n\t\t));\n\t\tunset($this->{$this::DB_TABLE_PK});\n\t}", "public function destroy()\n {\n $em = static::getEntityManager();\n $em->remove($this);\n $em->flush();\n }", "public function delete(){\n $record = volontaire::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/volontaire/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_volontaire/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'volontaire modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "public function delete()\n {\n $this->deleted_at = date('Y-m-d H:i:s');\n $this->save();\n }", "public function destroy($id)\n {\n DB::table('images')->where('mediaid', '=', $id)->delete();\n DB::table('videos')->where('mediaid', '=', $id)->delete();\n DB::table('user_likes')->where('media_id', '=', $id)->delete();\n DB::table('user_stars')->where('media_id', '=', $id)->delete();\n DB::table('user_comments')->where('media_id', '=', $id)->delete();\n DB::table('medias')->where('id', '=', $id)->delete();\n // return $this->index();\n return redirect('/manage');\n }", "public function delete()\n { if (is_null($this->id))\n trigger_error(\"Reaction::delete(): Attempt to delete a Reference object that does not have its ID property set.\", E_USER_ERROR);\n\n // Delete the Reaction\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $st = $conn->prepare(\"DELETE FROM reaction WHERE id = :id LIMIT 1\");\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "public function delete()\n {\n $db = DBConnection::getInstance();\n\n // REMOVE FROM WISHLIST TABLE\n $query = \"DELETE FROM wishlist WHERE advertPK = :advert;\";\n $db->setQuery($query);\n $db->bindQueryValue(':advert', $this->PK);\n $db->run();\n\n // REMOVE PICTURES\n $query = \"SELECT pictureLocation FROM AdvertPictures WHERE advertPK = :advert;\";\n $db->setQuery($query);\n $db->bindQueryValue(':advert', $this->PK);\n $data = $db->getAllResults();\n for($i = 0; $i < count($data); $i++)\n {\n if($data[$i][0] != \"no-image.png\")\n unlink(\"images/uploads/\" . $data[$i][0]);\n }\n\n // REMOVE FROM PICTURES TABLE\n $query = \"DELETE FROM AdvertPictures WHERE advertPK = :advert;\";\n $db->setQuery($query);\n $db->bindQueryValue(':advert', $this->PK);\n $db->run();\n\n //REMOVE FROM ADVERTS TABLE\n $db = DBConnection::getInstance();\n $query = \"DELETE FROM Adverts WHERE advertID = :advert;\";\n $db->setQuery($query);\n $db->bindQueryValue(':advert', $this->PK);\n $db->run();\n }", "public function Delete(){\n //Préparation de la requête\n $sql = \"DELETE FROM meta WHERE idMeta = ?\";\n echo $sql;\n $requete = $this->connectBdd->prepare($sql);\n\n //Execution de la requete\n $requete->execute([$this->getIdMeta()]);\n\n //Fermeture de la requete\n $requete->closeCursor();// requête delete \n }", "public function destroy($id)\n {\n //\n $postmedia = post_media::find($id);\n $post_id = $postmedia->post_id;\n File::delete('post_media/'.$postmedia->filename);\n $postmedia->delete();\n return redirect('posts/'.$post_id);\n }", "public function delete() {\r\n \r\n // Does the Article object have an ID?\r\n if ( is_null( $this->id ) ) trigger_error ( \"Article::delete(): Attempt to delete an Article object that does not have its ID property set.\", E_USER_ERROR );\r\n \r\n // Delete the Article\r\n $conn = new PDO(DB_DSN);\r\n $st = $conn->prepare ( \"DELETE FROM articles WHERE id = :id\" );\r\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n $st->execute();\r\n $conn = null;\r\n }", "public function delete() {\n $this->query = \"DELETE FROM {$this->query}\";\n self::run($this->query, $this->params);\n }", "public function destroy($id)\n {\n $media =Media::find($id);\n $media->delete();\n return redirect()->back();\n }", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function destroy()\n {\n if ($this->in_database)\n Database::query(\"DELETE FROM `\".$this->table_name().\"` WHERE id='\".$this->last_saved_id.\"'\");\n $this->destroy_callbacks();\n }", "public function actionDelete() {\n $story_values = Yii::$app->request->post('story_values');\n $model = StoryAudio::findOne($story_values['story_audio_id']);\n $result = $model->delete();\n $errors = $model->getErrors();\n unlink('/home/gossip24/public_html/uploads/story/' . $model->story_id . '/audio/'.$model->audio_name);\n echo json_encode(['save_success' => $result, 'errors' => $errors]);\n }", "public function delete()\n {\n if ($this->exists()) {\n $this->filesystem->remove($this->path);\n }\n }", "public function delete() {\n\t\t$this->getRequest()->request($this->getUri().'delete.json', 'DELETE', [\n\t\t\t'id' => $this->getId(),\n\t\t]);\n\n\t\t$this->data = null;\n\t}", "public function delete() {\n $this->con_do(\"drop table {$this->db_table}\");\n }", "public function destroy() {\r\n $table = \\DenDad\\libs\\Support::getClassName($this);\r\n $record = $this->{$this->_primaryKey};\r\n if (!isset($this->_primaryKey)) {\r\n throw new \\DenDad\\exceptions\\ModelException('Primary key not set for' .\r\n 'model ' . get_class($this), \r\n \\DenDad\\exceptions\\ModelException::MISSING_PRIMARY_KEY);\r\n }\r\n if (!$this->recordExists()) {\r\n throw new \\DenDad\\exceptions\\ModelException('Record ' . $record .\r\n ' does not exists in table ' . $table, \r\n \\DenDad\\exceptions\\ModelException::MISSING_PRIMARY_KEY);\r\n }\r\n \r\n $db_comm = self::connect()->prepare('DELETE FROM ' . $table . ' WHERE ' .\r\n $this->_primaryKey . '=:' . $this->_primaryKey);\r\n if (!$db_comm->execute(array(':' . $this->_primaryKey => $record))) {\r\n throw new \\DenDad\\exceptions\\ModelException('Unable to destroy record ' .\r\n $record . ' from table ' . $table, \\DenDad\\exceptions\\ModelException::DELETE_FAILED);\r\n }\r\n }", "public function run()\n {\n Model::unguard();\n\n DB::table('core__media')->delete();\n DB::table('core__activities')->delete();\n\n $this->clearStoredMedia();\n }", "public function\r\n\t\tdelete()\r\n\t{\r\n\t\tif (isset($this->id)) {\r\n\t\t\tDatabase_TableHelper\r\n\t\t\t\t::delete_row(\r\n\t\t\t\t\t$this->id,\r\n\t\t\t\t\t$this->get_table_name()\r\n\t\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\tunset($this);\r\n\t}", "public function afterDelete()\n {\n// $path = self::MEDIA_DIR_PATH;\n// if ($this->data['Media']['prasang_id']) {\n// $path = self::MEDIA_PRASANG_FILES_PATH;\n// }\n// $fileThumbPath = '/' . $path . 'thumbnail/' . $this->data['Media']['name'];\n// $filePath = '/' . $path . $this->data['Media']['name'];\n// if (file_exists($fileThumbPath)) {\n// unlink($fileThumbPath);\n// }\n// if ($filePath) {\n// unlink($filePath);\n// }\n }", "protected function _delete()\n\t{\n\t//\tconect to db\n\t\t$db = database::connect($this->get_env());\n\t\t$preparedData['id'] = $this['id']->get();\n\t//\tdelete main table entry\n\t\t$db->stack('DELETE FROM `'.$this->get_table().'` WHERE `id` = :id LIMIT 1', $preparedData);\n\t//\tdelete relations\n\t\t$db->stack('DELETE FROM `'.attrRel::table.'` WHERE `item` = \"'.$this->get_table().'\" AND `itemid` = :id', $preparedData);\n }", "function deleteOrphanMedia($media_dir) {\n\t\t$strReq =\n\t\t'SELECT media_file, media_id, media_path, media_title, media_meta, media_dt, '.\n\t\t'media_creadt, media_upddt, media_private, user_id '.\n\t\t'FROM '.$this->table.' '.\n\t\t\"WHERE media_path = '\".$this->path.\"' \".\n\t\t\"AND media_dir = '\".$this->con->escape($media_dir).\"' \";\n\t\t\n\t\tif (!$this->core->auth->check('media_admin',$this->core->blog->id))\n\t\t{\n\t\t\t$strReq .= 'AND (media_private <> 1 ';\n\t\t\t\n\t\t\tif ($this->core->auth->userID()) {\n\t\t\t\t$strReq .= \"OR user_id = '\".$this->con->escape($this->core->auth->userID()).\"'\";\n\t\t\t}\n\t\t\t$strReq .= ') ';\n\t\t}\n\t\t$rs = $this->con->select($strReq);\n\t\twhile ($rs->fetch())\n\t\t{\n\t\t\tif (!file_exists($this->pwd.\"/\".$rs->media_file)) {\n\t\t\t\t# Physical file does not exist remove it from DB\n\t\t\t\t# Because we don't want to erase everything on\n\t\t\t\t# dotclear upgrade, do it only if there are files\n\t\t\t\t# in directory and directory is root\n\t\t\t\t$this->con->execute(\n\t\t\t\t\t'DELETE FROM '.$this->table.' '.\n\t\t\t\t\t\"WHERE media_path = '\".$this->con->escape($this->path).\"' \".\n\t\t\t\t\t\"AND media_file = '\".$this->con->escape($rs->media_file).\"' \"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function delete() {\n if ($this->id) {\n $db = new DBConnection();\n\n return $db->delete($this->convert_to_table_name($this->className)\n , $this->id);\n } else {\n return null;\n }\n }", "public function delete() {\n\t\t$db = new DatabaseQuery;\n\t\t$db->execute('\tDELETE FROM fromtheweb\n\t\t\t\t\t\tWHERE ftw_id = '.$this->ftw_id);\n\t}", "public function delete ()\r\n {\r\n if ($this->isNew())\r\n throw new \\Exception('Unable to delete object, record is new (and therefore doesn\\'t exist in the database).');\r\n \r\n // build sql statement\r\n $sql = sprintf(\"DELETE FROM `%s`.`%s` WHERE `%s` = ?\", self::getDatabaseName(), self::getTableName(), self::getTablePk());\r\n\r\n // prepare, bind & execute\r\n $stmt = self::getConnection()->prepare($sql);\r\n\r\n if (!$stmt)\r\n throw new \\Exception(self::getConnection()->error);\r\n \r\n $id = $this->id();\r\n $stmt->bind_param('i', $id);\r\n $stmt->execute();\r\n\r\n if ($stmt->error)\r\n throw new \\Exception($stmt->error.\"\\n\\n\".$sql);\r\n }" ]
[ "0.7648866", "0.71447474", "0.70928013", "0.70002186", "0.6988789", "0.6988789", "0.6988789", "0.6980794", "0.6922912", "0.69145334", "0.6776976", "0.6768075", "0.6733804", "0.6716022", "0.67064166", "0.6665141", "0.6660699", "0.6615898", "0.6615659", "0.66104096", "0.6599634", "0.6599634", "0.6578841", "0.6551879", "0.65374637", "0.648555", "0.64791566", "0.6442659", "0.6441388", "0.6432565", "0.6398699", "0.6395898", "0.6394234", "0.63882565", "0.63863647", "0.6378685", "0.63712823", "0.63675314", "0.6354674", "0.6328167", "0.6321583", "0.62970454", "0.62846476", "0.6267585", "0.6267436", "0.6259849", "0.6254998", "0.6241957", "0.6236048", "0.62352777", "0.62287486", "0.62241435", "0.6221664", "0.62171346", "0.6215469", "0.6212466", "0.6203157", "0.6195134", "0.61925286", "0.61897826", "0.6188614", "0.6187011", "0.61821973", "0.61717814", "0.61697775", "0.61667114", "0.6166487", "0.61652565", "0.614865", "0.6146052", "0.61295885", "0.61259896", "0.6125938", "0.61229247", "0.6122771", "0.6120705", "0.6114632", "0.61078715", "0.61061454", "0.6098367", "0.6097082", "0.60929656", "0.6087362", "0.6076859", "0.6074826", "0.6070937", "0.6058744", "0.60545176", "0.60526", "0.6049806", "0.60439265", "0.604288", "0.6036133", "0.60320175", "0.60256445", "0.6021397", "0.6017277", "0.6010401", "0.5997923", "0.5994845" ]
0.8496703
0
Story 22c Tests that a RoutePickup can be removed from a route
История 22c Тестирование возможности удаления RoutePickup из маршрута
public function testRemoveRoutePickup(){ //create a route to add the pickup to $route = new Route(); $route->setRouteId(1001); //Get the repository for the route $repository = $this->em->getRepository(Route::class); //Call insert on the repository for the route $repository->save($route); //specify a container for routePickup $container = new Container(); $container->setContainerSerial("X11111"); $container->setType("Bin"); $container->setSize("6"); $container->setStatus("Active"); //save the container $repo = $this->em->getRepository(Container::class); $repo->save($container); //Create a route pickup for this container $rp = new RoutePickup(); $rp->setPickupOrder(1); $rp->setRoute($route); $rp->setContainer($container); //save the route pickup $repo = $this->em->getRepository(RoutePickup::class); $repo->save($rp); //get the client $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password')); $client->followRedirects(true); //follow any redirects (there will be some) //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed $crawler = $client->request('GET', '/route/removecontainer/1'); //Make make sure the table that would normally have the container does not apppear $this->assertNotContains("route_pickups", $crawler->html()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveRoutePickupNonexistant(){\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n $client->followRedirects(true);\r\n\r\n //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed\r\n //This pickup does not exist\r\n $client->request('GET', '/route/removecontainer/2092');\r\n\r\n //Check that the client is on the error page\r\n $this->assertContains(\"The specified container could not be removed from this route\",$client->getResponse()->getContent());\r\n }", "public function testRemoveRoutePickupDecrement(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X111111\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //specify a second container for this routePickup\r\n $container2 = new Container();\r\n $container2->setContainerSerial(\"X222222\");\r\n $container2->setType(\"Bin\");\r\n $container2->setSize(\"6\");\r\n $container2->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n $repo->save($container2);\r\n\r\n //create a pickup\r\n $rp = new RoutePickup();\r\n $rp->setPickupOrder(1);\r\n $rp->setRoute($route);\r\n $rp->setContainer($container);\r\n\r\n //create a second pickup\r\n $rp2 = new RoutePickup();\r\n $rp2->setPickupOrder(2);\r\n $rp2->setRoute($route);\r\n $rp2->setContainer($container2);\r\n\r\n //save the route pickups\r\n $repo = $this->em->getRepository(RoutePickup::class);\r\n $repo->save($rp);\r\n $repo->save($rp2);\r\n\r\n\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n $client->followRedirects(true);\r\n\r\n //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed\r\n $crawler = $client->request('GET', '/route/removecontainer/1');\r\n\r\n\r\n //Check that the row that was previously the second is now the first\r\n $this->assertContains(\"1\", $crawler->filter(\"table tr:contains('X222222')\")->html());\r\n }", "public function testRestoRouteDELETE_collections_error_4() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('toto');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testDELETE_collection_feature() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections', 'Landsat', 'c5dc1f32-002d-5ee9-bd4a-c690461eb734');\r\n $res = $restoRouteDELETE->route($segments);\r\n $this->assertEquals('success', $res['status']);\r\n }", "public function testShouldRemoveLocator()\n {\n self::assertEquals(true, $this->locator->hasLocator('App\\TenantBundle\\Locators\\HostnameLocator'));\n $this->locator->removeLocator('\\App\\TenantBundle\\Locators\\HostnameLocator');\n\n self::assertEquals(false, $this->locator->hasLocator('\\App\\TenantBundle\\Locators\\HostnameLocator'));\n }", "public function testRestoRouteDELETE_collections_error_2() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections', 'Landsat', 'toto');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testIsNotMatchingRoute()\n {\n// $fishRoute = new Route(array(\n// 'resource' => 'fish',\n// 'controllerName' => 'FishController'\n// ));\n//\n// $isMatchingRoute = $fishRoute->isMatchingRoute('fishparty/123');\n//\n// $this->assertFalse($isMatchingRoute);\n\n }", "public function testRestoRouteDELETE_collections_error_1() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testRestoRouteDELETE_collections_error_3() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections', 'Landsat', 'toto', 'titi');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testDELETE_collection() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections', 'Landsat');\r\n $res = $restoRouteDELETE->route($segments);\r\n $this->assertEquals('success', $res['status']);\r\n }", "public function testRemoveContactFromPropertyCancel()\r\n {\r\n\r\n //start up a new session, going to the Property Charlton Arms\r\n $this->session->visit('http://localhost:8000/app_test.php/property/4');\r\n\r\n $this->session->wait(1000);\r\n\r\n $page = $this->session->getPage();\r\n\r\n $this->session->wait(1000);\r\n\r\n //click on the button\r\n $removeButton = $page->find(\"css\", \"#rmb4\");\r\n $removeButton->click();\r\n\r\n //click the okay button\r\n $okayButton = $page->find(\"css\", \"#btnDecline\");\r\n $okayButton->click();\r\n\r\n $this->session->wait(10000, \"document.readyState === 'complete'\");\r\n //assert that Testman is no longer on the page\r\n $this->assertContains(\"Kenson, Ken\", $page->find(\"css\",\"#associatedContacts\")->getHtml());\r\n }", "public function testUnavailabilitiesUnavailabilityIdDelete()\n {\n }", "public function testCantLocateRemoveUserId(){\n $this->dispatch('/api/remove/id/9999999999999999999999');\n $this->assertRedirectTo('/api/manage');\n \n // Make sure user has not been removed\n $userObject = $this->_getTestUserTwo();\n $this->assertEquals('apiUserTwo', $userObject->ref, 'User two has been removed for some reason!');\n }", "public function testDeleteRequestForUnExistingDynamicRoute(): void\n {\n // setup\n $_SERVER['REQUEST_METHOD'] = 'DELETE';\n\n $exception = '';\n $router = $this->getRouter();\n $router->addRoute('/catalog/[i:cat_id]', function () {\n return 1;\n });\n\n // test body\n try {\n $router->callRoute('/catalog/1025/');\n } catch (\\Exception $e) {\n $exception = $e->getMessage();\n }\n\n // assertions\n $msg = \"The processor was not found for the route catalog/1025\";\n\n $this->assertNotFalse(strpos($exception, $msg));\n }", "public function testRouteMiss()\n {\n $resolved = uniqid();\n $this->assertEquals($this->urlResolver->resolve(['route/miss'], $resolved), $resolved);\n }", "public function testLocationItemDelete()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->delete(\"api/location/2\");\n $this->seeStatusCode(200);\n }", "public function testRouterUninstallInstall() {\n \\Drupal::service('module_installer')->uninstall(['router_test']);\n try {\n \\Drupal::service('router.route_provider')->getRouteByName('router_test.1');\n $this->fail('Route was delete on uninstall.');\n }\n catch (RouteNotFoundException $e) {\n // Expected exception; just continue testing.\n }\n // Install the module again.\n \\Drupal::service('module_installer')->install(['router_test']);\n $route = \\Drupal::service('router.route_provider')->getRouteByName('router_test.1');\n $this->assertNotNull($route, 'Route exists after module installation');\n }", "public function testRemoveUserConfirmAction(){\n $this->dispatch('/api/remove-confirm');\n $this->assertRedirect('/api/manage');\n }", "public function testRoutingCollection()\n {\n $record = $this->getRecordByTitle('Title of Collection #1');\n $url = $this->baseCollection . 'Identifier_of_Collection_1';\n $route = 'cleanUrl_collections';\n $this->dispatch($url);\n $this->assertRoute($route);\n $this->assertModule('default');\n $this->assertController('collections');\n $this->assertAction('show');\n $this->assertEquals($record->id, (integer) $this->request->getParam('id'));\n }", "public function testRemoveContactFromPropertyAccept()\r\n {\r\n\r\n //start up a new session, going to the Property Charlton Arms\r\n $this->session->visit('http://localhost:8000/app_test.php/property/4');\r\n\r\n $page = $this->session->getPage();\r\n $this->session->wait(1000);\r\n\r\n //click on the remove button\r\n $removeButton = $page->find(\"css\", \"#rmb4\");\r\n $removeButton->click();\r\n\r\n //click the okay button\r\n $okayButton = $page->find(\"css\", \"#btnAccept\");\r\n $okayButton->click();\r\n\r\n $this->session->wait(10000, \"document.readyState === 'complete'\");\r\n //assert that Kenson is no longer on the page\r\n $this->assertNotContains(\"Kenson, Ken\", $page->find(\"css\",\"#associatedContacts\")->getHtml());\r\n\r\n }", "public function testRemoveFail()\n {\n }", "public function testRemoveUserConfirmIncorrectId(){\n $this->dispatch('/api/remove-confirm/id/999999999999999');\n $this->assertRedirect('/api/manage');\n }", "public function testRemoveCollection() {\r\n $this->initContext();\r\n $collection = new RestoCollection('Example', $this->context, $this->admin, array('autoload' => true));\r\n $collection->removeFromStore();\r\n \r\n $collection = new RestoCollection('Land', $this->context, $this->admin, array('autoload' => true));\r\n $collection->removeFromStore();\r\n }", "public function testRemoveFellowshipPageLoadID146()\n {\n\t\t// Set session data\n\t\t$this->enableCsrfToken();\n\t\t$this->enableSecurityToken();\n\t\t$this->session([\n\t\t\t'Auth' => [\n\t\t\t\t'User' => [\n\t\t\t\t\t'id' => 1,\n\t\t\t\t\t'username' => 'w',\n\t\t\t\t\t'role'=>'admin',\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\t\t$this->get('/admins/fellowships/');\n\t\t$this->assertResponseContains('/admins/fellowships/delete/');\n\t\t$this->assertResponseOk();\n\t}", "public function test_eliminar_solicitud(){\n $solicitud = Solicitud::create($this->solicitud);\n $this->assertDatabaseHas('solicituds', [\n 'id' => $solicitud['id'], \n ]);\n $response = $this->get('/solicitante');\n $response = $this->actingAs($this->solicitante)\n ->delete(route('eliminar.solicitud',$solicitud['id']));\n //comprueba que la solicitud ha sido eliminada\n $this->assertDeleted('solicituds', ['id' => $solicitud['id']]);\n //comprueba que se rediriga a la ruta correcta despues de eliminar\n $response->assertRedirect(route('solicitante.home'));\n\n }", "public function testCantRemoveUserIdIncorrect(){\n $this->dispatch('/api/remove/id/fsdfdssf');\n $this->assertRedirectTo('/api/manage');\n \n // Make sure user has not been removed\n $userObject = $this->_getTestUserTwo();\n $this->assertEquals('apiUserTwo', $userObject->ref, 'User two has been removed for some reason!');\n }", "public function testRestoRouteDELETE_collections_error_5() {\r\n $this->initContext();\r\n \r\n /*\r\n * Create non admin user\r\n */\r\n $profile = array(\r\n 'userid' => 2,\r\n 'groups' => 'default',\r\n 'email' => 'test_email',\r\n 'password' => 'test_password',\r\n 'username' => 'test_username',\r\n 'givenname' => 'test_givenname',\r\n 'lastname' => 'test_lastname',\r\n 'country' => 'FR',\r\n 'organization' => 'test_organization',\r\n 'flags' => null,\r\n 'topics' => null,\r\n 'validatedby' => 'admin',\r\n 'validationdate' => 'now()',\r\n 'activated' => 1\r\n );\r\n $user = new RestoUser($profile, $this->context);\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $user);\r\n $segments = array('collections', 'Landsat');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testRestoRouteDELETE_user_error_4() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('user');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testLocationDeleteNotExisting()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->delete(\"api/location/999999\");\n $this->seeStatusCode(404);\n }", "public function testInsertRoute(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X11111\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //specify a second container for this routePickup\r\n $container2 = new Container();\r\n $container2->setContainerSerial(\"X123456\");\r\n $container2->setType(\"Bin\");\r\n $container2->setSize(\"6\");\r\n $container2->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n $repo->save($container2);\r\n\r\n $rp = new RoutePickup();\r\n $rp->setPickupOrder(1);\r\n $rp->setRoute($route);\r\n $rp->setContainer($container);\r\n\r\n //save the route pickup\r\n $repo = $this->em->getRepository(RoutePickup::class);\r\n $repo->save($rp);\r\n\r\n\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n\r\n $crawler = $client->request('GET', '/route/manage/1');\r\n\r\n $form = $crawler->selectButton('Add')->form();\r\n $form[\"appbundle_routepickup[pickupOrder]\"] = 1; //set the pickup order to be 1 instead of the other container previously inserted\r\n $form[\"appbundle_routepickup[container]\"] = 2; //select the second container in the list\r\n\r\n $crawler = $client->submit($form);\r\n\r\n\r\n //Check that the row with the previous bin has a pickup order of 2\r\n $this->assertContains(\"2\", $crawler->filter(\"table tr:contains('X11111')\")->html());\r\n }", "public function testAssociationsV2Remove()\n {\n }", "public function testRemoveTemplateFeature()\n {\n $template = factory(Template::class)->create();\n $user = $template->user;\n\n $this->actingAs($user);\n $response = $this->delete(route('templates.destroy', $template->id));\n $this->assertDatabaseMissing('templates', [\n 'id' => $template->id,\n 'deleted_at' => null,\n ]);\n $response->assertRedirect('/templates');\n $response->assertStatus(302);\n }", "public function testUnexistingRoute(): void\n {\n // setup\n $exception = '';\n $router = $this->getRouter();\n $router->addRoute('/existing-route/', [\n $this,\n 'helloWorldOutput'\n ]);\n\n // test body\n try {\n $router->callRoute('/unexisting-route/');\n } catch (\\Exception $e) {\n $exception = $e->getMessage();\n }\n\n // assertions\n $msg = \"The processor was not found for the route\";\n\n $this->assertNotFalse(strpos($exception, $msg), 'Valid error handling expected');\n }", "protected function tearDown(): void\n {\n Router::$routes['post'] = [];\n Router::$routes['get'] = [];\n }", "public function testAssertRoutingFalse()\n {\n $url = '/unit_test/test_action/123';\n $this->recognize($url);\n \n try {\n $this->assertRouting(array('test' => '123'));\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function testRemove()\n {\n }", "public function testInsertBeyond(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for this routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X222222\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n\r\n $crawler = $client->request('GET', '/route/manage/1');\r\n\r\n $form = $crawler->selectButton('Add')->form();\r\n $form[\"appbundle_routepickup[pickupOrder]\"] = 1000; //put a pickup order much farther beyond the number of bins\r\n $form[\"appbundle_routepickup[container]\"] = 1; //select the first container in the list\r\n\r\n $crawler = $client->submit($form);\r\n\r\n //check that the containers row has the pickup order of 1\r\n $this->assertContains(\"1\", $crawler->filter(\"table tr:contains('X222222')\")->html());\r\n }", "public function testRemoveSupplier()\n {\n $this->invoice->addSupplier($this->supplier);\n $this->invoice->removeSupplier();\n $this->assertNull($this->invoice->supplier);\n }", "public function testDeletePath()\n {\n\n }", "public function testAddRoute(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1002);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for this routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X123456\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n $client->followRedirects(true);\r\n\r\n $crawler = $client->request('GET', '/route/manage/1');\r\n\r\n $form = $crawler->selectButton('Add')->form();\r\n $form[\"appbundle_routepickup[pickupOrder]\"] = 1;\r\n $form[\"appbundle_routepickup[container]\"] = 1; //select the first container in the list\r\n\r\n $crawler = $client->submit($form);\r\n\r\n //check that the containers serial is on the page\r\n $this->assertContains(\"X123456\",$client->getResponse()->getContent());\r\n //check that the table contains the serial\r\n $this->assertContains(\"X123456\", $crawler->filter(\"table\")->html());\r\n }", "public function testRemoveShipping()\n {\n $this->invoice->addShipping($this->shipping);\n $this->invoice->removeShipping();\n $this->assertNull($this->invoice->shipping);\n }", "public function testDeleteRequestForExistingDynamicRoute(): void\n {\n $_SERVER['REQUEST_METHOD'] = 'DELETE';\n\n $router = new \\Mezon\\Router\\Router();\n $router->addRoute('/catalog/[i:cat_id]', function ($route) {\n return $route;\n }, 'DELETE');\n\n $result = $router->callRoute('/catalog/123/');\n\n $this->assertEquals($result, 'catalog/123');\n }", "public function testTeamMembersIdTeamTemplateFoldersDelete()\n {\n\n }", "public function testDelegateDelete()\n {\n $object = new \\stdClass();\n $this->innerAgent->remove($object)->shouldBeCalled();\n $this->agent->remove($object);\n }", "public function testRemove()\n {\n $resource = new GenericResource('test');\n $collection = new Collection();\n $collection->add($resource);\n $collection->remove($resource);\n $all = $collection->getAll();\n $this->assertEmpty($all);\n }", "protected function _handleRemove()\n {\n if ($this->_isPathStartsWith('/direct_v2')) {\n $this->_removeThreadItem();\n } elseif ($this->_isPathStartsWith('/broadcast')) {\n $this->_handleLiveBroadcast();\n } else {\n $this->_client->debug('Unsupported REMOVE path \"%s\"', $this->path);\n }\n }", "public function postRemovePickUp()\n {\n\n try {\n if (!Input::get('booking_id')) {\n throw new ModelNotFoundException();\n }\n $booking = Context::get()->bookings()->findOrFail(Input::get('booking_id'));\n } catch (ModelNotFoundException $e) {\n return Response::json(array('errors' => array('The booking could not be found.')), 404); // 404 Not Found\n }\n\n $booking->pick_ups()->find(Input::get('id'))->delete();\n\n return ['status' => 'OK. Pick-up removed.'];\n }", "public function testRegistrationConfigurationsDeleteRegistrationConfiguration()\n {\n }", "public function testTeamMembersIdTeamPortalsDelete()\n {\n\n }", "public function testRemoveAParticipant()\n {\n }", "public function testDelete() {\n $recipient = OmiseRecipient::retrieve('recp_test_508a9dytz793gxv9m77');\n $recipient->destroy();\n\n $this->assertTrue($recipient->isDestroyed());\n }", "public function test_deleteReceivingProcess() {\n\n }", "public function testRoutingItem()\n {\n $record = $this->getRecordByTitle('Title of Item #1');\n $collectionIdentifier = 'Identifier_of_Collection_1';\n $itemIdentifier = 'Identifier_of_Item_1';\n foreach (array(\n $this->baseItem . $itemIdentifier => 'cleanUrl_generic_item',\n $this->baseCollection . $collectionIdentifier . '/' . $itemIdentifier => 'cleanUrl_collections_item',\n ) as $url => $route) {\n $this->dispatch($url);\n $this->assertRoute($route);\n $this->assertModule('default');\n $this->assertController('items');\n $this->assertAction('show');\n $this->assertEquals($record->id, (integer) $this->request->getParam('id'));\n }\n }", "public function testDeleteTwice()\n {\n $model = factory($this->model)->create();\n\n $this->actingAs($this->actingAs, 'api')\n ->deleteJson(route($this->route . '.destroy', [$this->route => $model->id]))\n ->assertNoContent();\n\n $this->assertDeleted($model);\n\n $this->actingAs($this->actingAs, 'api')\n ->deleteJson(route($this->route . '.destroy', [$this->route => $model->id]))\n ->assertStatus(404);\n }", "public function testRemovePlan1()\n {\n }", "public function testShouldTestDeleteLunch()\n {\n $expect = [\"DESTROY \" => $this->lastIdInserted . \"\"];\n $this->json('DELETE', '/api/lunch/' . $this->lastIdInserted)\n ->seeJson($expect);\n }", "public function testTeamMembersIdDesignFoldersDelete()\n {\n\n }", "public function testInventoryABANDONRequestAbandonDelete()\n {\n }", "public function testTeamMembersIdPortalsDelete()\n {\n\n }", "public function testRemoveExistingMailChimpList()\n {\n $this->cleanup();\n\n // After we clean up / remove the test list from MailChimp account\n $lists = $this->service->getExistingLists();\n $stillHaveTestList = false;\n foreach ($lists as $list){\n // If list name is started with 'testplanlist-' then we are going to remove it\n if (preg_match('/testplanlist\\-/', $list->name)) {\n $stillHaveTestList = true;\n // if we have even one test list then the test is failed.\n break;\n }\n }\n $this->assertTrue(!$stillHaveTestList);\n }", "public function testTeamMembersIdTeamTemplatesDelete()\n {\n\n }", "public function testRemoveUser(){\n \n $userObject = $this->_getTestUserTwo();\n if ($userObject != null){\n $this->dispatch('/api/remove/id/'.$userObject->id);\n $this->assertRedirectTo('/api/manage');\n \n // Test the user has been removed from the db\n //$userObject = $this->_getTestUserTwo();\n //$this->assertEquals(null, $userObject, 'User Two has not been removed');\n }\n }", "public function testRemoveTeamspeak()\n {\n // Seed the Database for roles\n \\Artisan::call('migrate:refresh',['--seed' => true]);\n\n // Create user\n $user = \\Phoenix\\Models\\User::create(['email' => 'test1@fake.com','password'=>bcrypt('helloworld')]);\n $user->uuid = 'ec4bcb20-ab04-11e6-b0a4-33bff998e138';\n $user->save();\n\n $teamspeak = $user->teamspeak()->create(['uuid' => 'number1', 'description' => 'Home Computer']);\n\n $this->actingAs($user,'api')->json('DELETE', 'api/user/teamspeak/'.$teamspeak->id)\n ->assertResponseStatus(204);\n }", "public function test_delete_apartment()\n {\n //Creates a new instance of an apartment\n $apartment = Apartment::factory()->create();\n\n $this->json('DELETE', 'api/apartment/' . $apartment->ext_id, [], ['Accept' => 'application/json'])\n ->assertStatus(200);\n\n }", "public function testTeamMembersIdUploadedTemplatesDelete()\n {\n\n }", "public function testTeamMembersIdTeamTemplateFoldersFkDelete()\n {\n\n }", "public function testUserSchedulersDelete()\n {\n }", "public function testRemove()\n {\n $this->_registry->remove($this->_class);\n\n $this->assertFalse($this->_registry->has($this->_class));\n }", "public function testDelete() {\n $file = file_get_contents('tests/mock-api/remove-firewall-policy.json');\n $data = json_decode($file, true);\n\n // Create stub\n $this->stub->method('delete')\n ->willReturn($data);\n\n // Perform call\n $res = $this->stub->delete('83522FC7DA9172F229E5352C587075BA');\n\n // Assert\n $this->assertEquals($res['state'], 'REMOVING');\n\n }", "public function testCanRemoveItemFromBasket()\n {\n // Given there is a product with an option;\n $product = $this->createProduct();\n $option = $this->createProductOptionFor($product);\n\n // And we add it to the basket;\n $this->addProductToBasket($product, $this);\n\n // When we remove it from the basket;\n $this->press(\"Remove {$product->name}\")->see('removed');\n\n // Then it should not be in the basket.\n $this->actingAs($this->customerUser())\n ->visit(route('sales.customer.basket'))\n ->dontSee($option->label);\n }", "public function testDeleteTemporary() {\n\t\t$address = $this->makeEmailAddress();\n\n\t\t$cr = $this->makeResource('ContactResource');\n\t\t$cr->setEmailAddress($address);\n\t\t$cr->addList(1);\n\t\t$cr->setOptInSource(Resource::ACTION_BY_CUSTOMER);\n\t\t$cr->create();\n\n\t\t$id = $cr->getId();\n\t\t$cr->delete();\n\n\t\t$cr2 = $this->makeResource('ContactResource');\n\t\t$cr2->setEmailAddress($address);\n\t\t$cr2->retrieve();\n\n\t\t$this->assertEmpty($cr2->getContactLists());\n\t\t$this->assertEquals(ContactResource::STATUS_REMOVED, $cr2->getStatus());\n\t}", "public function testDeleteTask()\n {\n $this->open('');\n $this->assertXpathCount(self::LOCATOR_TASK_DESTROY_BUTTON, 2);\n \n $this->clickAndWait(self::LOCATOR_TASK_DESTROY_BUTTON.\"[1]\");\n \n $this->assertXpathCount(self::LOCATOR_TASK_DESTROY_BUTTON, 1);\n }", "#[@test]\n public function hasNoRouting() {\n $this->assertFalse($this->routing->hasRoutings('GET', '/'));\n }", "public function testTeamMembersIdRequestedDesignExportsDelete()\n {\n\n }", "protected function canRemove() {}", "public function testDeleteCollectionThirdPartyResource()\n {\n }", "public function testTaskDeleteByUserOwner()\n {\n $client = $this->useUser();\n $crawler = $client->request('GET', '/tasks');\n $form = $crawler->selectButton( 'Supprimer' )->last()->form();\n $client->submit( $form );\n $crawler = $client->followRedirect();\n static::assertEquals(1, $crawler->filter('html:contains(\"La tâche a bien été supprimée\")')->count());\n }", "public function remove($path): void {\n $config = Config::current();\n $new_routes = $config->routes;\n unset($new_routes[$path]);\n $config->set(\"routes\", $new_routes);\n }", "public function testDeleteCheckUnauth()\n {\n $uuid = substr($this->hmAuth->createCheck()['ping_url'], 20);\n\n try {\n $this->hmUnauth->deleteCheck($uuid);\n } catch(HealthchecksUnauthorisedException $e) {\n $this->assertTrue(true);\n }\n\n $this->hmAuth->deleteCheck($uuid);\n }", "public function testTeamMembersIdSharedDesignsDelete()\n {\n\n }", "function testAcoSyncRemoveMethods() {\n\t\t$this->_cleanAndSetup();\n\t\t$this->Task->aco_update();\n\n\t\t$Aco = $this->Task->Acl->Aco;\n\t\t$Aco->cacheQueries = false;\n\n\t\t$result = $Aco->node('controllers/Comments');\n\t\t$new = array(\n\t\t\t'parent_id' => $result[0]['Aco']['id'],\n\t\t\t'alias' => 'some_method'\n\t\t);\n\t\t$Aco->create($new);\n\t\t$Aco->save();\n\t\t$children = $Aco->children($result[0]['Aco']['id']);\n\t\t$this->assertEqual(count($children), 4);\n\n\t\t$this->Task->aco_sync();\n\t\t$children = $Aco->children($result[0]['Aco']['id']);\n\t\t$this->assertEqual(count($children), 3);\n\n\t\t$method = $Aco->node('controllers/Commments/some_method');\n\t\t$this->assertFalse($method);\n\t}", "public function testTeamMembersIdTeamImageFoldersDelete()\n {\n\n }", "public function testTeamMembersIdTeamTeamMembersDelete()\n {\n\n }", "public function testDelete()\n {\n /*$this->routeMatch->setParam('id', '1');\n $this->request->setMethod('delete');\n \n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n \n $this->assertEquals(200, $response->getStatusCode());*/\n }", "public function test_can_delete_photo(){\n $fake_photo = FbPhoto::factory()->create();\n\n $this->delete(route('fb_photos.destroy',$fake_photo->id))\n ->assertStatus(204);\n }", "public function testLandedCostShipmentABANDONRequestAbandonDelete()\n {\n }", "public function item_remove(string $trip, string $slug) //: void\n\t{\n\t\tif ($this->item_exists($trip, $slug)) {\n\t\t\t$d = $this->item_dir($trip, $slug);\n\t\t\t// now remove $d\n\t\t\t$this->rmdir_recurse($d);\n\t\t}\n\t}", "public function test_deleteReplenishmentPlan() {\n\n }", "public function testRemoveDisciplineFromCourseUsingCourseDisciplinesControllerDestroyRoute() {\n $rndCourseId = Curso::all()->random()->id;\n $rndDisciplineId = Disciplina::all()->random()->id;\n $courseDiscipline = DisciplinaCurso::create([\n 'disciplina_id' => $rndDisciplineId,\n 'curso_id' => $rndCourseId,\n 'obrigatoria' => true\n ]);\n\n $response = $this->get(\"/registration/courses/{$rndCourseId}/disciplines/{$courseDiscipline->id}/destroy\");\n $response->assertJson(['status' => 'success']);\n\n $this->assertDatabaseMissing('disciplinas_curso', ['id' => $courseDiscipline->id]);\n }", "function test_ping_remove()\n {\n $rmt_mck = new mck_mdl_remotes('sue', 'Big fat human');\n\n $rmt = new mdl_remotes();\n $_POST['data'] = $rmt->send_ping(\n 'http://localhost',\n 'remove',\n 'fred',\n $rmt_mck->get_pub_key(),\n $rmt_mck->get_priv_key(),\n 'http://localhost/messages/follow/sue',\n true);\n\n $rel = new ctrl_relations();\n\n ob_start();\n $rel->ping($rmt_mck);\n $result = ob_get_contents();\n ob_end_clean();\n\n $ping_response = $rmt->decode_ping_response($result);\n\n $this->assertEquals((string) $ping_response->state, 'fail');\n }", "function test_delete_fail_6()\n {\n $this->do_request('/conceptos/' . garbage_data::$concepto_initial['concepto'], garbage_data::$unidad_gestion_otro, [], status::$NOT_FOUND, 'DELETE');\n }", "public function dropMatch() {\n\n\t\t$match_id = Request::input('matchID');\n\n\t\tMatches::dropMatch($match_id);\n\n\t\treturn \"success\";\n\t}", "public function testAdminRemoveItem()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/login')\n ->type('email', 'admin@admin.com')\n ->type('password', 'password')\n ->press('Login')\n ->visit('/viewAllItems')\n ->press('Delete')\n ->acceptDialog()\n ->assertSee('Item removed!');\n });\n }", "public function testGetCreatedRoute() {\n $response = $this->request('GET', $this->getURIRouteList($this->TEST_TRIP_HASH));\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $body = (string) $response->getBody();\n $json = json_decode($body, true);\n\n $this->assertArrayHasKey(\"status\", $json);\n $this->assertSame(\"error\", $json[\"status\"]);\n $this->assertArrayHasKey(\"error\", $json);\n $this->assertSame(\"Kein Zugriff erlaubt\", $json[\"error\"]);\n }", "public function testSubaccountsEmailCreditsDelete()\n {\n }", "public function testInvalidRoute()\n {\n $sampleRoute = new \\stdClass();\n\n $route = new \\Slab\\Router\\Route($sampleRoute);\n\n $isValid = $route->isValid();\n $this->assertEquals(false, $isValid);\n\n $sampleRoute->path = '/test';\n $route = new \\Slab\\Router\\Route($sampleRoute);\n $isValid = $route->isValid();\n $this->assertEquals(false, $isValid);\n\n $sampleRoute->name = 'Test Route';\n $route = new \\Slab\\Router\\Route($sampleRoute);\n $isValid = $route->isValid();\n $this->assertEquals(false, $isValid);\n\n $sampleRoute->class = 'Slab\\Tests\\Router\\Mocks\\Controller';\n $route = new \\Slab\\Router\\Route($sampleRoute);\n $isValid = $route->isValid();\n $this->assertEquals(true, $isValid);\n }", "public function testDeleteShare()\n {\n }", "public function deleteRoute()\n {\n if (!$this->owner->isTransactional(ActiveRecord::OP_DELETE)) {\n throw new \\LogicException(\"Operation DELETE should be transactional for owner\");\n }\n\n Yii::$app->router->deleteRouteById($this->owner->getAttribute($this->routeAttribute));\n }", "public function removeBus($name);", "public function testTeamMembersIdTeamMembersDelete()\n {\n\n }" ]
[ "0.74937534", "0.6898857", "0.6055465", "0.60058606", "0.58994865", "0.58984476", "0.587568", "0.58721316", "0.58551806", "0.5830385", "0.58193517", "0.58129233", "0.5802749", "0.57784605", "0.5749446", "0.57437044", "0.57353497", "0.5715732", "0.57141733", "0.5709928", "0.56832385", "0.565825", "0.56296873", "0.55864024", "0.55677986", "0.5522897", "0.551888", "0.5509838", "0.5507736", "0.5444956", "0.542336", "0.54199964", "0.5418741", "0.5415926", "0.54155076", "0.5403175", "0.53959924", "0.53825337", "0.53800875", "0.53573", "0.5353252", "0.5341866", "0.5334968", "0.5324053", "0.532399", "0.5317564", "0.53149134", "0.5272294", "0.526246", "0.5255004", "0.5235085", "0.5231341", "0.52289987", "0.52250296", "0.5217346", "0.5207367", "0.52009857", "0.5198905", "0.5196745", "0.51961964", "0.5185926", "0.51772386", "0.5175084", "0.51721346", "0.5167502", "0.5164949", "0.5162175", "0.51611865", "0.5160636", "0.5154007", "0.5151169", "0.5141434", "0.51375103", "0.5135383", "0.5130847", "0.51297194", "0.5114123", "0.51101565", "0.5109827", "0.5109104", "0.5104194", "0.510255", "0.5101462", "0.5101317", "0.51001805", "0.50977784", "0.5097161", "0.5091208", "0.5089618", "0.5088975", "0.5088737", "0.50849396", "0.5084904", "0.5082718", "0.5080368", "0.5077426", "0.50742656", "0.5073947", "0.50732905", "0.50682664" ]
0.76638144
0
Story 22c Tests that when a Route is removed all the pickups after are decremented
История 22c Тестирование того, что при удалении маршрута все последующие загрузки уменьшаются
public function testRemoveRoutePickupDecrement(){ //create a route to add the pickup to $route = new Route(); $route->setRouteId(1001); //Get the repository for the route $repository = $this->em->getRepository(Route::class); //Call insert on the repository for the route $repository->save($route); //specify a container for routePickup $container = new Container(); $container->setContainerSerial("X111111"); $container->setType("Bin"); $container->setSize("6"); $container->setStatus("Active"); //specify a second container for this routePickup $container2 = new Container(); $container2->setContainerSerial("X222222"); $container2->setType("Bin"); $container2->setSize("6"); $container2->setStatus("Active"); //save the container $repo = $this->em->getRepository(Container::class); $repo->save($container); $repo->save($container2); //create a pickup $rp = new RoutePickup(); $rp->setPickupOrder(1); $rp->setRoute($route); $rp->setContainer($container); //create a second pickup $rp2 = new RoutePickup(); $rp2->setPickupOrder(2); $rp2->setRoute($route); $rp2->setContainer($container2); //save the route pickups $repo = $this->em->getRepository(RoutePickup::class); $repo->save($rp); $repo->save($rp2); //get the client $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password')); $client->followRedirects(true); //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed $crawler = $client->request('GET', '/route/removecontainer/1'); //Check that the row that was previously the second is now the first $this->assertContains("1", $crawler->filter("table tr:contains('X222222')")->html()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveRoutePickup(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X11111\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n\r\n //Create a route pickup for this container\r\n $rp = new RoutePickup();\r\n $rp->setPickupOrder(1);\r\n $rp->setRoute($route);\r\n $rp->setContainer($container);\r\n\r\n //save the route pickup\r\n $repo = $this->em->getRepository(RoutePickup::class);\r\n $repo->save($rp);\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n $client->followRedirects(true); //follow any redirects (there will be some)\r\n\r\n //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed\r\n $crawler = $client->request('GET', '/route/removecontainer/1');\r\n\r\n //Make make sure the table that would normally have the container does not apppear\r\n $this->assertNotContains(\"route_pickups\", $crawler->html());\r\n }", "public function testRemoveRoutePickupNonexistant(){\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n $client->followRedirects(true);\r\n\r\n //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed\r\n //This pickup does not exist\r\n $client->request('GET', '/route/removecontainer/2092');\r\n\r\n //Check that the client is on the error page\r\n $this->assertContains(\"The specified container could not be removed from this route\",$client->getResponse()->getContent());\r\n }", "protected function tearDown(): void\n {\n Router::$routes['post'] = [];\n Router::$routes['get'] = [];\n }", "public function testDELETE_collection_feature() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections', 'Landsat', 'c5dc1f32-002d-5ee9-bd4a-c690461eb734');\r\n $res = $restoRouteDELETE->route($segments);\r\n $this->assertEquals('success', $res['status']);\r\n }", "public function testRemoveCollection() {\r\n $this->initContext();\r\n $collection = new RestoCollection('Example', $this->context, $this->admin, array('autoload' => true));\r\n $collection->removeFromStore();\r\n \r\n $collection = new RestoCollection('Land', $this->context, $this->admin, array('autoload' => true));\r\n $collection->removeFromStore();\r\n }", "public function testDELETE_collection() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections', 'Landsat');\r\n $res = $restoRouteDELETE->route($segments);\r\n $this->assertEquals('success', $res['status']);\r\n }", "public function testRestoRouteDELETE_collections_error_4() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('toto');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testRemoveContactFromPropertyCancel()\r\n {\r\n\r\n //start up a new session, going to the Property Charlton Arms\r\n $this->session->visit('http://localhost:8000/app_test.php/property/4');\r\n\r\n $this->session->wait(1000);\r\n\r\n $page = $this->session->getPage();\r\n\r\n $this->session->wait(1000);\r\n\r\n //click on the button\r\n $removeButton = $page->find(\"css\", \"#rmb4\");\r\n $removeButton->click();\r\n\r\n //click the okay button\r\n $okayButton = $page->find(\"css\", \"#btnDecline\");\r\n $okayButton->click();\r\n\r\n $this->session->wait(10000, \"document.readyState === 'complete'\");\r\n //assert that Testman is no longer on the page\r\n $this->assertContains(\"Kenson, Ken\", $page->find(\"css\",\"#associatedContacts\")->getHtml());\r\n }", "public function testRestoRouteDELETE_collections_error_1() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testRestoRouteDELETE_collections_error_3() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections', 'Landsat', 'toto', 'titi');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testRestoRouteDELETE_collections_error_2() {\r\n $this->initContext();\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $this->admin);\r\n $segments = array('collections', 'Landsat', 'toto');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testUnavailabilitiesUnavailabilityIdDelete()\n {\n }", "public function testRemovePlan1()\n {\n }", "public function testAssociationsV2Remove()\n {\n }", "protected function tearDown()\n {\n unset($this->refIndex);\n unset($this->task);\n }", "public function testRemoveFellowshipPageLoadID146()\n {\n\t\t// Set session data\n\t\t$this->enableCsrfToken();\n\t\t$this->enableSecurityToken();\n\t\t$this->session([\n\t\t\t'Auth' => [\n\t\t\t\t'User' => [\n\t\t\t\t\t'id' => 1,\n\t\t\t\t\t'username' => 'w',\n\t\t\t\t\t'role'=>'admin',\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\t\t$this->get('/admins/fellowships/');\n\t\t$this->assertResponseContains('/admins/fellowships/delete/');\n\t\t$this->assertResponseOk();\n\t}", "public function testItemsCanBeRemovedAlongWithChildren()\n {\n $this->menu->getItem('about-us')->addSubItem('about-us-team', 'About Us - The Team', ['url' => '/about/us/team']);\n $originalCount = $this->menu->items->count();\n\n $this->menu->removeItem('about');\n\n $this->assertFalse($this->menu->items->has('about'));\n $this->assertFalse($this->menu->items->has('about-us'));\n $this->assertFalse($this->menu->items->has('about-our-product'));\n\n $this->assertEquals($originalCount - 4, $this->menu->items->count());\n }", "public function testTeamMembersIdTeamPortalsDelete()\n {\n\n }", "protected function tearDown(): void\n {\n unset($this->gameRound);\n }", "public function testRemoveFail()\n {\n }", "public function testTeamMembersIdTeamTemplateFoldersDelete()\n {\n\n }", "public function testShouldRemoveLocator()\n {\n self::assertEquals(true, $this->locator->hasLocator('App\\TenantBundle\\Locators\\HostnameLocator'));\n $this->locator->removeLocator('\\App\\TenantBundle\\Locators\\HostnameLocator');\n\n self::assertEquals(false, $this->locator->hasLocator('\\App\\TenantBundle\\Locators\\HostnameLocator'));\n }", "function teardown(): void {\n\t\t$this->test_base->posts = array();\n\t\t$sitemaps = get_posts( array(\n\t\t\t'post_type' => Metro_Sitemap::SITEMAP_CPT,\n\t\t\t'fields' => 'ids',\n\t\t\t'posts_per_page' => -1,\n\t\t) );\n\t\tupdate_option( 'msm_sitemap_indexed_url_count' , 0 );\n\t\tarray_map( 'wp_delete_post', array_merge( $this->test_base->posts_created, $sitemaps ) );\n\t}", "public function destroyArmy()\n {\n if (count($this->task)){\n $this->task->delete();\n }\n\n if (count($this->path)){\n $this->path->each(function($path){\n $path->delete();\n });\n }\n\n $this->currentHex->update(['army_id' => 0]);\n $this->delete();\n }", "public function testTeamMembersIdPortalsDelete()\n {\n\n }", "public function testTeamMembersIdDesignFoldersDelete()\n {\n\n }", "public function actionCleanup()\n {\n $query = Tracking::find()->andWhere([\n 'status' => Tracking::STATUS_DELETED,\n ])->orderBy('updated_at ASC');\n\n $requested = 0;\n if (isset($this->api->requestParams['limits']['cleanup']))\n {\n $query->limit($this->api->requestParams['limits']['cleanup']);\n }\n foreach($query->all() as $tracking)\n {\n $op = $this->api->deleteTracking($tracking);\n if ($op->code == 200 || $op->code == 404)\n {\n $tracking->delete();\n }\n $requested++;\n $this->apiOpSleep($op);\n }\n\n if (isset($this->api->requestParams['limits']['cleanup']) && $requested >= $this->api->requestParams['limits']['cleanup'] )\n {\n return;\n }\n\n // Step 2: Untrack delivered\n $codes = Tracking::getTrackerStatusCodes();\n\n $query = Tracking::find()\n ->andWhere([\n 'tracker_status' => [ $codes['delivered'], $codes['expired'] ],\n 'status' => [Tracking::STATUS_NORMAL, Tracking::STATUS_URGENT],\n ])\n ->orderBy('tracked_at ASC');\n\n if (isset($this->api->requestParams['limits']['cleanup']))\n {\n $query->limit($this->api->requestParams['limits']['cleanup'] - $requested);\n }\n foreach($query->all() as $tracking)\n {\n $op = $this->api->deleteTracking($tracking);\n $this->apiOpSleep($op);\n }\n }", "public function tearDown(): void\n {\n app(PageRouteResolver::class)->define(null);\n\n parent::tearDown();\n }", "protected function tearDown()\n {\n //unset(static::$queue);\n }", "protected function tearDown(): void\n {\n unset($this->composy);\n }", "public function testRemoveLoyaltyPoints()\n {\n }", "public function testLocationItemDelete()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->delete(\"api/location/2\");\n $this->seeStatusCode(200);\n }", "function _dquarks_after_delete_direction($component) {\n db_lock_table('dquarks_direction_tests');\n db_delete('dquarks_direction_tests')\n ->condition('nid', $component['nid'])\n ->condition('cid', $component['cid'])\n ->execute();\n db_unlock_tables('dquarks_direction_tests');\n}", "public function tearDown() {\n unset($this->Vehicle);\n unset($this->VehiclePart);\n\t\tunset($this->Mongo);\n\t\tunset($this->mongodb);\n parent::tearDown();\n\t}", "public function testRemoveContactFromPropertyAccept()\r\n {\r\n\r\n //start up a new session, going to the Property Charlton Arms\r\n $this->session->visit('http://localhost:8000/app_test.php/property/4');\r\n\r\n $page = $this->session->getPage();\r\n $this->session->wait(1000);\r\n\r\n //click on the remove button\r\n $removeButton = $page->find(\"css\", \"#rmb4\");\r\n $removeButton->click();\r\n\r\n //click the okay button\r\n $okayButton = $page->find(\"css\", \"#btnAccept\");\r\n $okayButton->click();\r\n\r\n $this->session->wait(10000, \"document.readyState === 'complete'\");\r\n //assert that Kenson is no longer on the page\r\n $this->assertNotContains(\"Kenson, Ken\", $page->find(\"css\",\"#associatedContacts\")->getHtml());\r\n\r\n }", "protected function tearDown()\n {\n $this->router = null;\n parent::tearDown();\n }", "public function testRemove()\n {\n }", "public function tearDown(){\n unset($this->user);\n unset($this->household);\n unset($this->unit);\n unset($this->qty);\n unset($this->category);\n unset($this->food);\n unset($this->ingredient);\n unset($this->recipe);\n unset($this->meal);\n unset($this->groceryItem);\n }", "public function testRoutingCollection()\n {\n $record = $this->getRecordByTitle('Title of Collection #1');\n $url = $this->baseCollection . 'Identifier_of_Collection_1';\n $route = 'cleanUrl_collections';\n $this->dispatch($url);\n $this->assertRoute($route);\n $this->assertModule('default');\n $this->assertController('collections');\n $this->assertAction('show');\n $this->assertEquals($record->id, (integer) $this->request->getParam('id'));\n }", "public function testRouterUninstallInstall() {\n \\Drupal::service('module_installer')->uninstall(['router_test']);\n try {\n \\Drupal::service('router.route_provider')->getRouteByName('router_test.1');\n $this->fail('Route was delete on uninstall.');\n }\n catch (RouteNotFoundException $e) {\n // Expected exception; just continue testing.\n }\n // Install the module again.\n \\Drupal::service('module_installer')->install(['router_test']);\n $route = \\Drupal::service('router.route_provider')->getRouteByName('router_test.1');\n $this->assertNotNull($route, 'Route exists after module installation');\n }", "protected function tearDown()\n {\n unset($this->_object, $this->_inavalidDrive);\n }", "public function afterFindRefs() {\r\n\t\t$this->autoInboundRouteArray($this->users);\r\n\t\t$this->autoInboundRouteArray($this->queues);\r\n\t\t$this->autoInboundRouteArray($this->ringGroups);\r\n\t\t$this->autoInboundRouteArray($this->confs);\r\n\t\t\r\n\t\t$this->findFreeNumbers(\"Free extensions\", array_keys($this->callables));\r\n\t\t$this->findFreeNumbers(\"Free DDR numbers\", array_keys($this->filterItemsByDDR($this->callables, true)));\r\n\t}", "public function tearDown()\n {\n foreach (URLStatistics::get() as $stat) {\n $stat->delete();\n }\n foreach (SocialQueue::get() as $queue) {\n $queue->delete();\n }\n parent::tearDown();\n }", "public function deleteUnused()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n /** @var \\PandaGroup\\StoreLocator\\Model\\StoreLocator $storeLocatorModel */\n $storeLocatorModel = $objectManager->create('PandaGroup\\StoreLocator\\Model\\StoreLocator');\n\n $storeLocatorCollection = $storeLocatorModel->getCollection();\n\n $statesCollection = $this->getCollection();\n\n $qtyOfDeleted = 0;\n\n foreach ($statesCollection as $state) {\n $stateId = $state->getId();\n $toDelete = true;\n\n foreach ($storeLocatorCollection as $store) {\n if ($stateId === $store->getData('state_id')) {\n $toDelete = false;\n }\n }\n\n if (true === $toDelete) {\n try {\n $this->getResource()->load($this, $state->getId());\n $this->getResource()->delete($this);\n\n $qtyOfDeleted++;\n } catch (\\Exception $e) {\n return null;\n }\n }\n }\n\n return $qtyOfDeleted;\n }", "public function tearDown()\n {\n unset($this->Board);\n }", "public function test_eliminar_solicitud(){\n $solicitud = Solicitud::create($this->solicitud);\n $this->assertDatabaseHas('solicituds', [\n 'id' => $solicitud['id'], \n ]);\n $response = $this->get('/solicitante');\n $response = $this->actingAs($this->solicitante)\n ->delete(route('eliminar.solicitud',$solicitud['id']));\n //comprueba que la solicitud ha sido eliminada\n $this->assertDeleted('solicituds', ['id' => $solicitud['id']]);\n //comprueba que se rediriga a la ruta correcta despues de eliminar\n $response->assertRedirect(route('solicitante.home'));\n\n }", "public function testTeamMembersIdTeamBuilderConfigsDelete()\n {\n\n }", "public function tearDown() {\n unset( $_SERVER['MODEL_PATH'] );\n $this->order = null;\n }", "public function testInsertBeyond(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for this routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X222222\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n\r\n $crawler = $client->request('GET', '/route/manage/1');\r\n\r\n $form = $crawler->selectButton('Add')->form();\r\n $form[\"appbundle_routepickup[pickupOrder]\"] = 1000; //put a pickup order much farther beyond the number of bins\r\n $form[\"appbundle_routepickup[container]\"] = 1; //select the first container in the list\r\n\r\n $crawler = $client->submit($form);\r\n\r\n //check that the containers row has the pickup order of 1\r\n $this->assertContains(\"1\", $crawler->filter(\"table tr:contains('X222222')\")->html());\r\n }", "public function testTeamMembersIdSharedDesignsDelete()\n {\n\n }", "public function testTeamMembersIdTeamImageFoldersDelete()\n {\n\n }", "protected function tearDown(): void \n\t{\n\t\t// unset($this->queue);\n\t}", "protected function tearDown()\n {\n // TODO Auto-generated FlightTest::tearDown()\n $this->flight = null;\n \n parent::tearDown();\n }", "public function testDeleteRequestForUnExistingDynamicRoute(): void\n {\n // setup\n $_SERVER['REQUEST_METHOD'] = 'DELETE';\n\n $exception = '';\n $router = $this->getRouter();\n $router->addRoute('/catalog/[i:cat_id]', function () {\n return 1;\n });\n\n // test body\n try {\n $router->callRoute('/catalog/1025/');\n } catch (\\Exception $e) {\n $exception = $e->getMessage();\n }\n\n // assertions\n $msg = \"The processor was not found for the route catalog/1025\";\n\n $this->assertNotFalse(strpos($exception, $msg));\n }", "public function testRestoRouteDELETE_collections_error_5() {\r\n $this->initContext();\r\n \r\n /*\r\n * Create non admin user\r\n */\r\n $profile = array(\r\n 'userid' => 2,\r\n 'groups' => 'default',\r\n 'email' => 'test_email',\r\n 'password' => 'test_password',\r\n 'username' => 'test_username',\r\n 'givenname' => 'test_givenname',\r\n 'lastname' => 'test_lastname',\r\n 'country' => 'FR',\r\n 'organization' => 'test_organization',\r\n 'flags' => null,\r\n 'topics' => null,\r\n 'validatedby' => 'admin',\r\n 'validationdate' => 'now()',\r\n 'activated' => 1\r\n );\r\n $user = new RestoUser($profile, $this->context);\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $user);\r\n $segments = array('collections', 'Landsat');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "protected function tearDown()\n\t{\n\t\tunset($this->introCallObj);\n\t}", "protected function tearDown()\n {\n $this->montyHall = null;\n }", "public function testRemoveUserConfirmAction(){\n $this->dispatch('/api/remove-confirm');\n $this->assertRedirect('/api/manage');\n }", "public function testTeamMembersIdTeamTemplatesDelete()\n {\n\n }", "public function testDeletePath()\n {\n\n }", "public function testTeamMembersIdTeamWorkflowsDelete()\n {\n\n }", "public function testRemoveUserConfirmIncorrectId(){\n $this->dispatch('/api/remove-confirm/id/999999999999999');\n $this->assertRedirect('/api/manage');\n }", "public function tearDown()\n {\n unset($this->Board);\n unset($this->Game);\n unset($this->P2);\n unset($this->P1);\n unset($this->Output);\n }", "public function testTeamMembersIdTeamTemplateFoldersFkDelete()\n {\n\n }", "public function tearDown()\n {\n $this->list = null;\n }", "public function testRemoveShipping()\n {\n $this->invoice->addShipping($this->shipping);\n $this->invoice->removeShipping();\n $this->assertNull($this->invoice->shipping);\n }", "public function testTeamMembersIdTeamTeamMembersDelete()\n {\n\n }", "public function testRemove()\n {\n $client = static::createClient();\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/menu-item/remove/' . $this->getId());\n $this->assertEquals(0, $crawler->filter('.panel tbody tr')->count());\n }", "public function test_deleteReplenishmentPlan() {\n\n }", "public function test__unset()\n {\n $this->todo('stub');\n }", "protected function tearDown()\n {\n parent::tearDown();\n\n foreach ($this->pathsToLinkInTestInstance as $destination) {\n @unlink($destination);\n }\n }", "public function testShouldTestDeleteLunch()\n {\n $expect = [\"DESTROY \" => $this->lastIdInserted . \"\"];\n $this->json('DELETE', '/api/lunch/' . $this->lastIdInserted)\n ->seeJson($expect);\n }", "public function delete_directions($id){\n\n\t\t$match_facility = MultiOpponentFacility::find($id);\n\t\tif($match_facility->exists() && $match_facility->count() > 0){\n\t\t\t$match_facility->delete();\n\t\t}\n\t\treturn true;\n\n\t}", "protected function tearDown() {\n\t\tunset($_SERVER['REQUEST_URI']);\n\t}", "protected function tearDown()\n\t{\n\t\t$opt = Opl_Registry::get('opt');\n\t\t$opt->dispose();\n\t\tOpl_Registry::set('opt', null);\n\t\tOpt_View::clear();\n\t\tunset($this->tpl);\n\t}", "public function testTeamMembersIdDesignFoldersFkDelete()\n {\n\n }", "function test_ping_remove()\n {\n $rmt_mck = new mck_mdl_remotes('sue', 'Big fat human');\n\n $rmt = new mdl_remotes();\n $_POST['data'] = $rmt->send_ping(\n 'http://localhost',\n 'remove',\n 'fred',\n $rmt_mck->get_pub_key(),\n $rmt_mck->get_priv_key(),\n 'http://localhost/messages/follow/sue',\n true);\n\n $rel = new ctrl_relations();\n\n ob_start();\n $rel->ping($rmt_mck);\n $result = ob_get_contents();\n ob_end_clean();\n\n $ping_response = $rmt->decode_ping_response($result);\n\n $this->assertEquals((string) $ping_response->state, 'fail');\n }", "public function test_report_removes_from_open_matches() {\n //Should be in there to start\n $this->assertArrayContains($this->tournament->open_matches(), $this->object);\n\n //Gogo report!\n $this->assertTrue( $this->object->set_winner($this->object->team()) );\n $this->assertSave($this->object->report());\n\n //After reporting, it should be removed from open_matches, but make sure it wasn't set to NULL first\n $this->assertNotNull($this->object);\n\n //After reporting, it should have been removed\n $this->assertArrayNotContains($this->tournament->open_matches(), $this->object);\n }", "public function testDefaultFolderTreesUndelete()\n {\n }", "public function testTeamMembersIdTeamMembersDelete()\n {\n\n }", "protected function tearDown()\n {\n unset($this->invoice);\n unset($this->status);\n }", "public function test_deleteReceivingProcess() {\n\n }", "public function tearDown() {\n\t\tunset($this->fixture);\n\t\tunset($this->meeting);\n\t\tunset($this->meetingIdentifier);\n\t\tunset($this->meetingRepositoryMock);\n\t\tunset($this->permissionServiceMock);\n\t}", "public function testDeleteCoupons()\n {\n }", "function test_deleteCampaign() {\n $campaign_1 = new wp_adpress_campaign(2);\n $campaign_1->remove();\n $campaign_2 = new wp_adpress_campaign(3);\n $campaign_2->deactivate();\n $campaign_2->remove();\n $this->assertEquals(count(wp_adpress_campaigns::list_campaigns('all')), 1);\n }", "public function tearDown()\n\t{\n\t\tif ($this->statpro)\n\t\t{\n\t\t\tunset($this->statpro);\n\t\t}\n\t}", "public function testDeleteCollectionPersistentVolume()\n {\n }", "public function testProcurementCategoriesIdSubcategoriesSubcategoryIDDelete()\n {\n\n }", "public function deleted(OutTour $outTour)\n {\n //\n }", "public function testRemoveSupplier()\n {\n $this->invoice->addSupplier($this->supplier);\n $this->invoice->removeSupplier();\n $this->assertNull($this->invoice->supplier);\n }", "protected function tearDown()\n { \n unset($this->_url);\n unset($this->_parseUrl);\n }", "public function tearDown()\n {\n parent::tearDown();\n parent::makeRequest('task/' . $this->task_id, array(), 'DELETE');\n parent::makeRequest('project/' . $this->project_id, array(), 'DELETE');\n\n unset($this->post_data, $this->project_id);\n }", "public function testTeamMembersIdUploadedTemplatesDelete()\n {\n\n }", "public function testTeamMembersIdRequestedDesignExportsDelete()\n {\n\n }", "protected function tearDown()\n {\n\t\t//otherwise it would trigger multiple times\n\t\t$this->object->getEventHandler()\n\t\t\t->off('foobar')\n\t\t\t->off('step1')\n\t\t\t->off('step2')\n\t\t\t->off('step3')\n\t\t\t->off(EventPipeTriggerStub::class . '::foobar')\n\t\t\t->off(EventPipeTriggerStub::class . '@barfoo');\n }", "function testRemoveInfo()\n\t{\n\t\t$this->_DBO->addTable('#__xius_info');\n\t\t$this->_DBO->filterColumn('#__xius_info','pluginParams');\n\t\t\n\t\t$this->resetCachedData();\n\t\t\n\t\trequire_once XIUS_COMPONENT_PATH_ADMIN.DS.'controllers'.DS.'info.php'; \n\t\t\n\t\t$infoController = new XiusControllerInfo();\n\t\t\n\t\t$delInfoIds = array(33,34,35,36,37,38,39,40,41,42,43,44,45);\n\t\t\n\t\t$db = JFactory::getDBO();\n\t\t\n\t\t$result = $infoController->_remove($delInfoIds);\n\t\t$this->assertEquals($result['message'],'5 '. XiusText::_('INFO_REMOVED'),\"message should be: 5 \". XiusText::_('INFO_REMOVED').\" but we get: \".$result['message']);\n\t\t$this->assertTrue($result['success']);\n\n\t\t$this->resetCachedData();\n\t\t$delInfoId1s = array(33,34,36,37,38,39);\n\t\tXiusHelperUsersearch::getParentChild(true);\n\t\t$result1 = $infoController->_remove($delInfoId1s);\n\t\t$this->assertEquals($result1['message'],'6 '. XiusText::_('INFO_REMOVED'),\"message should be: 6 \". XiusText::_('INFO_REMOVED').\" but we get: \".$result1['message']);\n\t\t$this->assertTrue($result1['success']);\n\n\t}", "public function testRemoveTeamspeak()\n {\n // Seed the Database for roles\n \\Artisan::call('migrate:refresh',['--seed' => true]);\n\n // Create user\n $user = \\Phoenix\\Models\\User::create(['email' => 'test1@fake.com','password'=>bcrypt('helloworld')]);\n $user->uuid = 'ec4bcb20-ab04-11e6-b0a4-33bff998e138';\n $user->save();\n\n $teamspeak = $user->teamspeak()->create(['uuid' => 'number1', 'description' => 'Home Computer']);\n\n $this->actingAs($user,'api')->json('DELETE', 'api/user/teamspeak/'.$teamspeak->id)\n ->assertResponseStatus(204);\n }", "public function tearDown() : void {\n entity_delete('payment_method', $this->method->pmid);\n node_delete($this->node->nid);\n parent::tearDown();\n }", "public function testDestroyResource() {\n $resource_gateway = m::mock('resource_gateway');\n $resource_gateway->shouldReceive('get_allocator_name')->andReturn();\n $resource_gateway->shouldReceive('get_resource_details')->andReturn();\n // This is the main call we care about\n $resource_gateway->shouldReceive('deallocate_resource_from_user')->times(1)->andReturn();\n\n $allocator = m::mock('allocator');\n $allocator->shouldReceive('deallocate')->andReturn();\n\n $allocator_factory = m::mock('allocator_factory');\n $allocator_factory->shouldReceive('new_instance')->times(1)->andReturn($allocator);\n\n $resource_action = new \\Drakenya\\ResAll\\Actions\\Resource($resource_gateway, $allocator_factory);\n $resource_action->destroy_resource(1);\n }", "public function teardown()\n {\n //\n }" ]
[ "0.70876366", "0.6454048", "0.5890099", "0.57236445", "0.5674631", "0.5663907", "0.5656453", "0.5644116", "0.55136925", "0.5496972", "0.5483289", "0.54764193", "0.54764056", "0.54695666", "0.54176366", "0.5406175", "0.540177", "0.5382916", "0.5372802", "0.5363009", "0.53595483", "0.5346372", "0.53365445", "0.5333423", "0.53234476", "0.53157175", "0.5313075", "0.53082514", "0.53014344", "0.52993846", "0.52851486", "0.5283661", "0.5282213", "0.5276288", "0.5274001", "0.52722895", "0.52618206", "0.52485484", "0.52444494", "0.52387524", "0.52221835", "0.52198035", "0.52190083", "0.5212412", "0.52107507", "0.5209199", "0.5198011", "0.51937467", "0.5186138", "0.5180223", "0.5177757", "0.51776546", "0.51759565", "0.5156741", "0.51528835", "0.51523364", "0.5151332", "0.51396877", "0.5126601", "0.51234615", "0.5120131", "0.51197684", "0.51146644", "0.5110622", "0.51095486", "0.5107008", "0.5106745", "0.5104809", "0.5103818", "0.5098045", "0.5097141", "0.5094633", "0.50889134", "0.5082248", "0.50780714", "0.5075866", "0.5074054", "0.5071946", "0.5067831", "0.5067738", "0.50663465", "0.50623554", "0.50618124", "0.5060593", "0.5059064", "0.5050824", "0.5047287", "0.5046683", "0.5045636", "0.5040916", "0.5033928", "0.503099", "0.5030844", "0.5028708", "0.5019622", "0.5019151", "0.50175154", "0.50116444", "0.50070095", "0.50066084" ]
0.7073114
1
Story22c Tests that if you try and request a removal of a nonexistant pickup you'll be brought to an error page
Тестирование того, что если вы попытаетесь запросить удаление несуществующего заказа на подбор, вас перенаправят на страницу с ошибкой
public function testRemoveRoutePickupNonexistant(){ //get the client $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password')); $client->followRedirects(true); //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed //This pickup does not exist $client->request('GET', '/route/removecontainer/2092'); //Check that the client is on the error page $this->assertContains("The specified container could not be removed from this route",$client->getResponse()->getContent()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveRoutePickup(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X11111\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n\r\n //Create a route pickup for this container\r\n $rp = new RoutePickup();\r\n $rp->setPickupOrder(1);\r\n $rp->setRoute($route);\r\n $rp->setContainer($container);\r\n\r\n //save the route pickup\r\n $repo = $this->em->getRepository(RoutePickup::class);\r\n $repo->save($rp);\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n $client->followRedirects(true); //follow any redirects (there will be some)\r\n\r\n //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed\r\n $crawler = $client->request('GET', '/route/removecontainer/1');\r\n\r\n //Make make sure the table that would normally have the container does not apppear\r\n $this->assertNotContains(\"route_pickups\", $crawler->html());\r\n }", "public function testRemoveRoutePickupDecrement(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X111111\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //specify a second container for this routePickup\r\n $container2 = new Container();\r\n $container2->setContainerSerial(\"X222222\");\r\n $container2->setType(\"Bin\");\r\n $container2->setSize(\"6\");\r\n $container2->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n $repo->save($container2);\r\n\r\n //create a pickup\r\n $rp = new RoutePickup();\r\n $rp->setPickupOrder(1);\r\n $rp->setRoute($route);\r\n $rp->setContainer($container);\r\n\r\n //create a second pickup\r\n $rp2 = new RoutePickup();\r\n $rp2->setPickupOrder(2);\r\n $rp2->setRoute($route);\r\n $rp2->setContainer($container2);\r\n\r\n //save the route pickups\r\n $repo = $this->em->getRepository(RoutePickup::class);\r\n $repo->save($rp);\r\n $repo->save($rp2);\r\n\r\n\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n $client->followRedirects(true);\r\n\r\n //Request a removal of the RoutePickup with the ID of the RoutePickup to be removed\r\n $crawler = $client->request('GET', '/route/removecontainer/1');\r\n\r\n\r\n //Check that the row that was previously the second is now the first\r\n $this->assertContains(\"1\", $crawler->filter(\"table tr:contains('X222222')\")->html());\r\n }", "public function testRemoveFail()\n {\n }", "public function testUnavailabilitiesUnavailabilityIdDelete()\n {\n }", "public function testCantLocateRemoveUserId(){\n $this->dispatch('/api/remove/id/9999999999999999999999');\n $this->assertRedirectTo('/api/manage');\n \n // Make sure user has not been removed\n $userObject = $this->_getTestUserTwo();\n $this->assertEquals('apiUserTwo', $userObject->ref, 'User two has been removed for some reason!');\n }", "public function test_user_delete_not_existent_bill() {\n\n $this->actingAs($this->user)\n ->get('/bills/str' . rand() . '/delete')\n ->seeJson([\n 'success' => false,\n 'message' => trans('bills.bill_not_found')\n ]);\n }", "public function testCanNotTakeOrderAlreadyTaken()\n {\n\n $response = $this->put(\"/api/v1/order/2?status=taken\" );\n\n $response\n ->receiveJson()\n ->seeStatusCode(Response::HTTP_CONFLICT)\n ->seeJsonContains([\n 'error' => \"ORDER_ALREADY_BEEN_TAKEN\"\n ]);\n }", "public function testLocationDeleteNotExisting()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->delete(\"api/location/999999\");\n $this->seeStatusCode(404);\n }", "function test_delete_fail_7()\n {\n $this->do_request('/conceptos/' . garbage_data::$concepto_initial['concepto2'], garbage_data::$unidad_gestion, [], status::$ERROR_SERVER, 'DELETE');\n }", "function test_delete_fail_6()\n {\n $this->do_request('/conceptos/' . garbage_data::$concepto_initial['concepto'], garbage_data::$unidad_gestion_otro, [], status::$NOT_FOUND, 'DELETE');\n }", "function test_delete_fail_5()\n {\n $this->do_request('/conceptos/' . garbage_data::$concepto_error['concepto'], garbage_data::$unidad_gestion, [], status::$NOT_FOUND, 'DELETE');\t\t\n }", "function test_delete_fail_3()\n {\n \t$this->markTestSkipped(\"Por legibilidad se pasa, sabiendo que el resultado fue el esperado\");\n \t$this->do_request('/conceptos/', garbage_data::$unidad_gestion, array(), status::$NO_CONTENT, 'DELETE');\t\t\n }", "function test_delete_fail_2()\n {\n $this->do_request('/conceptos/' . garbage_data::$concepto_initial['concepto'], [], [], status::$BAD_REQUEST, 'DELETE');\t\t\n }", "public function testRemoveUserConfirmIncorrectId(){\n $this->dispatch('/api/remove-confirm/id/999999999999999');\n $this->assertRedirect('/api/manage');\n }", "public function testRemoveFellowshipPageLoadID146()\n {\n\t\t// Set session data\n\t\t$this->enableCsrfToken();\n\t\t$this->enableSecurityToken();\n\t\t$this->session([\n\t\t\t'Auth' => [\n\t\t\t\t'User' => [\n\t\t\t\t\t'id' => 1,\n\t\t\t\t\t'username' => 'w',\n\t\t\t\t\t'role'=>'admin',\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\t\t$this->get('/admins/fellowships/');\n\t\t$this->assertResponseContains('/admins/fellowships/delete/');\n\t\t$this->assertResponseOk();\n\t}", "public function testCantRemoveUserIdIncorrect(){\n $this->dispatch('/api/remove/id/fsdfdssf');\n $this->assertRedirectTo('/api/manage');\n \n // Make sure user has not been removed\n $userObject = $this->_getTestUserTwo();\n $this->assertEquals('apiUserTwo', $userObject->ref, 'User two has been removed for some reason!');\n }", "public function testRemoveSupplier()\n {\n $this->invoice->addSupplier($this->supplier);\n $this->invoice->removeSupplier();\n $this->assertNull($this->invoice->supplier);\n }", "public function testSuppliersV2Delete()\n {\n }", "public function test_TC_2_1_10() {\n\t\t$response = $this->callController(\"Giuseppe\", \"Verdi\", \"g.verdi@gmail.com\", \"140898\");\n\t\t$this->assertTrue(\n\t\t\tTesting::assert_redirect($response, \"/conferma_registrazione.php\")\n\t\t);\n\t\t$id_utente_creato = Testing::getFeedback();\n\t\t$this->assertTrue($id_utente_creato !== null);\n\t\t$this->assertTrue(\n\t\t\tself::$account_dao->delete($id_utente_creato)\n\t\t);\n\t}", "public function testLocationItemDelete()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->delete(\"api/location/2\");\n $this->seeStatusCode(200);\n }", "function test_delete_fail_4()\n {\n \t$this->markTestSkipped(\"Por legibilidad se pasa, sabiendo que el resultado fue el esperado\");\n $this->do_request('/conceptos/', [], [], status::$NO_CONTENT, 'DELETE');\t\t\n }", "public function postRemovePickUp()\n {\n\n try {\n if (!Input::get('booking_id')) {\n throw new ModelNotFoundException();\n }\n $booking = Context::get()->bookings()->findOrFail(Input::get('booking_id'));\n } catch (ModelNotFoundException $e) {\n return Response::json(array('errors' => array('The booking could not be found.')), 404); // 404 Not Found\n }\n\n $booking->pick_ups()->find(Input::get('id'))->delete();\n\n return ['status' => 'OK. Pick-up removed.'];\n }", "public function testLandedCostBookInABANDONRequestAbandonDelete()\n {\n }", "public function testGoodsReceivedNoteABANDONRequestAbandonDelete()\n {\n }", "public function testLandedCostShipmentABANDONRequestAbandonDelete()\n {\n }", "public function testRemoveTemplateFeature()\n {\n $template = factory(Template::class)->create();\n $user = $template->user;\n\n $this->actingAs($user);\n $response = $this->delete(route('templates.destroy', $template->id));\n $this->assertDatabaseMissing('templates', [\n 'id' => $template->id,\n 'deleted_at' => null,\n ]);\n $response->assertRedirect('/templates');\n $response->assertStatus(302);\n }", "public function testGoodsReceivedNoteDELETERequestGRNIDDelete()\n {\n }", "public function testRemove()\n {\n $client = static::createClient();\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/menu-item/remove/' . $this->getId());\n $this->assertEquals(0, $crawler->filter('.panel tbody tr')->count());\n }", "public function testRoutingBadIdentifier3()\n {\n $url = $this->baseCollection . 'Identifier_of_Collection_2' . '/' . 'Identifier_of_Item_1';\n $this->setExpectedException('Omeka_Controller_Exception_404');\n $this->dispatch($url);\n }", "public function testBookDeleteNotExisting()\n {\n $user = User::all()->random();\n\n $this->actingAs($user, 'api')\n ->delete(\"api/book/999999\");\n $this->seeStatusCode(404);\n }", "public function testTeamMembersIdUploadedTemplatesDelete()\n {\n\n }", "public function notUsedInRule()\n {\n //Data\n $taxRateData = $this->loadData('tax_rate_create_test_zip_no');\n $searchTaxRateData = $this->loadData('search_tax_rate',\n array('filter_tax_id' => $taxRateData['tax_identifier']));\n //Steps\n $this->taxHelper()->createTaxItem($taxRateData, 'rate');\n //Verifying\n $this->assertMessagePresent('success', 'success_saved_tax_rate');\n //Steps\n $this->taxHelper()->deleteTaxItem($searchTaxRateData, 'rate');\n //Verifying\n $this->assertMessagePresent('success', 'success_deleted_tax_rate');\n }", "public function testInsertBeyond(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for this routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X222222\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n\r\n $crawler = $client->request('GET', '/route/manage/1');\r\n\r\n $form = $crawler->selectButton('Add')->form();\r\n $form[\"appbundle_routepickup[pickupOrder]\"] = 1000; //put a pickup order much farther beyond the number of bins\r\n $form[\"appbundle_routepickup[container]\"] = 1; //select the first container in the list\r\n\r\n $crawler = $client->submit($form);\r\n\r\n //check that the containers row has the pickup order of 1\r\n $this->assertContains(\"1\", $crawler->filter(\"table tr:contains('X222222')\")->html());\r\n }", "public function test_eliminar_solicitud(){\n $solicitud = Solicitud::create($this->solicitud);\n $this->assertDatabaseHas('solicituds', [\n 'id' => $solicitud['id'], \n ]);\n $response = $this->get('/solicitante');\n $response = $this->actingAs($this->solicitante)\n ->delete(route('eliminar.solicitud',$solicitud['id']));\n //comprueba que la solicitud ha sido eliminada\n $this->assertDeleted('solicituds', ['id' => $solicitud['id']]);\n //comprueba que se rediriga a la ruta correcta despues de eliminar\n $response->assertRedirect(route('solicitante.home'));\n\n }", "public function testInventoryABANDONRequestAbandonDelete()\n {\n }", "public function testRoutingBadIdentifier2()\n {\n $url = $this->baseCollection . 'Identifier_of_Collection_1' . '/' . 'False_Identifier';\n $this->setExpectedException('Omeka_Controller_Exception_404');\n $this->dispatch($url);\n }", "public function testTaskDeleteByUserOwner()\n {\n $client = $this->useUser();\n $crawler = $client->request('GET', '/tasks');\n $form = $crawler->selectButton( 'Supprimer' )->last()->form();\n $client->submit( $form );\n $crawler = $client->followRedirect();\n static::assertEquals(1, $crawler->filter('html:contains(\"La tâche a bien été supprimée\")')->count());\n }", "public function testRemoveAccountNonExistentType()\n\t\t{\n\t\t\t$newFundingAccount = new FundingAccount(\"DPM Budget\", 5000, $this->urlms->getLab_index(0));\n\t\t\t$this->urlms->getLab_index(0)->addFundingAccount($newFundingAccount);\n\t\t\t\n\t\t\t$this->assertEquals(1, count($this->urlms->getLab_index(0)->getFundingAccounts()));\n\t\t\ttry {\n\t\t\t\t$this->controller->removeAccount(\"Beef\");\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->assertEquals(\"Funding account not found.\", $e->getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t// 2. Write all of the data\n\t\t\t$pers = $this->p;\n\t\t\t$pers->writeDataToStore($this->urlms);\n\t\t\t\n\t\t\t// 3. Clear the data from memory\n\t\t\t$this->urlms->delete();\n\t\t\t\n\t\t\t$this->assertEquals(0, $this->urlms->numberOfLabs());\n\t\t\t\n\t\t\t// 4. Load it back in\n\t\t\t$this->urlms = $pers->loadDataFromStore();\n\t\t\t\n\t\t\t// 5. Check that we got it back\n\t\t\t$this->assertEquals(1, count($this->urlms->getLab_index(0)->getFundingAccounts()));\n\t\t}", "public function testDeleteCoupons()\n {\n }", "public function testPostRecordingsDeletionprotection()\n {\n }", "public function testUnavailabilitiesPost()\n {\n }", "public function testInsertExisting(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X11111\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n\r\n //Create a route pickup for this container\r\n $rp = new RoutePickup();\r\n $rp->setPickupOrder(1);\r\n $rp->setRoute($route);\r\n $rp->setContainer($container);\r\n\r\n //save the route pickup\r\n $repo = $this->em->getRepository(RoutePickup::class);\r\n $repo->save($rp);\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n\r\n $crawler = $client->request('GET', '/route/manage/1');\r\n\r\n $form = $crawler->selectButton('Add')->form();\r\n $form[\"appbundle_routepickup[pickupOrder]\"] = 1;\r\n $form[\"appbundle_routepickup[container]\"] = 1; //select the first container in the list so that it is attempting to add it again\r\n\r\n $crawler = $client->submit($form);\r\n\r\n //Check that the required error message is on the page\r\n $this->assertContains(\"This container already exists in this route\", $client->getResponse()->getContent());\r\n }", "public function testCannotReclaimVenue() {\n }", "public function testComAdobeCqSocialCommonsMaintainanceImplDeleteTempUGCImageUpload() {\n\n }", "public function test_not_existing_item_gives_404_on_destroy()\n {\n $user = User::first();\n Auth::login($user);\n $layerItem = LayerItem::all()->last();\n $response = $this->get(route('destroy.item', ($layerItem->id+1)));\n $response->assertStatus(404);\n }", "public function testRemoveUserConfirmAction(){\n $this->dispatch('/api/remove-confirm');\n $this->assertRedirect('/api/manage');\n }", "public function testRemoveLoyaltyPoints()\n {\n }", "public function testVendorsVendorIdDelete()\n {\n }", "public function testRoutingBadIdentifier4()\n {\n $url = $this->baseCollection . 'Identifier_of_Collection_1' . '/' . 'Identifier_of_Item_2' . '/' . 'Identifier_of_File_1';\n $this->setExpectedException('Omeka_Controller_Exception_404');\n $this->dispatch($url);\n }", "public function testRemoveExistingMailChimpList()\n {\n $this->cleanup();\n\n // After we clean up / remove the test list from MailChimp account\n $lists = $this->service->getExistingLists();\n $stillHaveTestList = false;\n foreach ($lists as $list){\n // If list name is started with 'testplanlist-' then we are going to remove it\n if (preg_match('/testplanlist\\-/', $list->name)) {\n $stillHaveTestList = true;\n // if we have even one test list then the test is failed.\n break;\n }\n }\n $this->assertTrue(!$stillHaveTestList);\n }", "public function testUserCanNotDeleteBookingThatHasStarted()\n {\n $booking = factory(Booking::class)->states('past')->create();\n\n $this->actingAs($booking->user)\n ->deleteJson('api/bookings/'.$booking->id)\n ->assertStatus(403);\n\n $this->assertDatabaseHas('bookings', [\n 'id' => $booking->id,\n ]);\n }", "public function testDeleteByIdFailure()\n {\n\n // Non existing eligibility\n $this->json('DELETE', '/eligibilities/999')\n ->seeJsonEquals([\n 'status_code' => 404,\n 'status' => 'Not Found',\n 'message' => 'Resource(s) not found',\n ])\n ->seeStatusCode(404)\n ->notSeeInDatabase('eligibilities', ['id' => 999]);\n\n // Already deleted eligibility\n $this->json('DELETE', '/eligibilities/1')\n ->seeJsonEquals([\n 'status_code' => 404,\n 'status' => 'Not Found',\n 'message' => 'Resource(s) not found',\n ])\n ->seeStatusCode(404);\n\n // Invalid ID\n $this->json('DELETE', '/eligibilities/abc')\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'id' => [\n 'code error_type',\n 'value abc',\n 'expected integer',\n 'used string',\n 'in path',\n ],\n ]\n ])\n ->seeStatusCode(400)\n ->notSeeInDatabase('eligibilities', ['id' => 'abc']);\n\n // @todo if eligibilities are enforced (config parameter), check with the ones that make internships allowed\n\n }", "public function testRemove()\n {\n }", "public function testShouldRemoveLocator()\n {\n self::assertEquals(true, $this->locator->hasLocator('App\\TenantBundle\\Locators\\HostnameLocator'));\n $this->locator->removeLocator('\\App\\TenantBundle\\Locators\\HostnameLocator');\n\n self::assertEquals(false, $this->locator->hasLocator('\\App\\TenantBundle\\Locators\\HostnameLocator'));\n }", "public function testUserAssistantsDelete()\n {\n }", "public function testSspsSspIdDelete()\n {\n }", "public function testTeamMembersIdUploadedTemplatesFkDelete()\n {\n\n }", "public function testDeleteSupportTicketUsingDelete()\n {\n }", "public function testMailingIdSplitrunMailingId2Delete()\n {\n }", "public function testRemoveContactFromPropertyCancel()\r\n {\r\n\r\n //start up a new session, going to the Property Charlton Arms\r\n $this->session->visit('http://localhost:8000/app_test.php/property/4');\r\n\r\n $this->session->wait(1000);\r\n\r\n $page = $this->session->getPage();\r\n\r\n $this->session->wait(1000);\r\n\r\n //click on the button\r\n $removeButton = $page->find(\"css\", \"#rmb4\");\r\n $removeButton->click();\r\n\r\n //click the okay button\r\n $okayButton = $page->find(\"css\", \"#btnDecline\");\r\n $okayButton->click();\r\n\r\n $this->session->wait(10000, \"document.readyState === 'complete'\");\r\n //assert that Testman is no longer on the page\r\n $this->assertContains(\"Kenson, Ken\", $page->find(\"css\",\"#associatedContacts\")->getHtml());\r\n }", "public function testDeleteReferral()\n {\n }", "public function displayClientDeletionFailure()\r\n\t{\r\n\t\t$_SESSION['feedback'] = 'Impossible de supprimer le client!';\r\n\t\t$this->router->POSTredirect($this->router->getClientURL($id));\r\n\t}", "public function testMessageRemovedUser()\n {\n $this->visit('/users')\n ->press('Remove')\n ->see('User removed.');\n }", "public function testInventoryClassificationABANDONRequestClassificationsAbandonDelete()\n {\n }", "public function testDeleteOffer()\n {\n }", "public function testInventorySupplierDELETERequestInventoryIDRegionsRegionNameSuppliersSupplierIDDelete()\n {\n }", "public function nuke()\n {\n if( !Master::$cMaster->APICall('0.9.1/db/' . $this->ul->db->ID . '/ul/' . $this->ul->ID, array( 'removePageFeedback' => $this->json() ) ) ){ commandResult( 500, \"Could not remove page feedback \" . $this->description() . \" from \" . $this->ul->ID . \" - \" . $this->ul->db->name ); }\n }", "public function test_deleteReplenishmentPlan() {\n\n }", "public function test_admin_delete_not_existent_user_bills() {\n\n $this->actingAs($this->admin)\n ->post('/admin-center/users-manager/user/' . rand(1000, 9999) . '/delete-all-bills')\n ->seeJson([\n 'success' => false,\n 'message' => trans('users_manager.user_not_found')\n ]);\n }", "public function test_deleteReceivingProcess() {\n\n }", "public function testDeleteRequestForUnExistingDynamicRoute(): void\n {\n // setup\n $_SERVER['REQUEST_METHOD'] = 'DELETE';\n\n $exception = '';\n $router = $this->getRouter();\n $router->addRoute('/catalog/[i:cat_id]', function () {\n return 1;\n });\n\n // test body\n try {\n $router->callRoute('/catalog/1025/');\n } catch (\\Exception $e) {\n $exception = $e->getMessage();\n }\n\n // assertions\n $msg = \"The processor was not found for the route catalog/1025\";\n\n $this->assertNotFalse(strpos($exception, $msg));\n }", "public function testUserCanDeleteBookingItOwns()\n {\n $booking = factory(Booking::class)->create();\n\n $this->actingAs($booking->user)\n ->deleteJson('api/bookings/'.$booking->id)\n ->assertStatus(204);\n\n $this->assertDatabaseMissing('bookings', [\n 'id' => $booking->id,\n ]);\n }", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien Fournisseur de test\n\t\t$crawler = $client->request('GET', '/suppliers');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Fournisseur de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Fournisseur de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le fournisseur a bien été supprimé.\")')->count());\n\n\t}", "public function testShouldTestDeleteLunch()\n {\n $expect = [\"DESTROY \" => $this->lastIdInserted . \"\"];\n $this->json('DELETE', '/api/lunch/' . $this->lastIdInserted)\n ->seeJson($expect);\n }", "public function testPurchasesIdDelete()\n {\n }", "public function testDeleteItemNotExists()\n {\n $this->controller->initActionGet();\n $res = $this->controller->deleteItem(\"users\", 99);\n\n $json = $res[0];\n $this->assertContains(\"Item id '99'\", $json[\"message\"]);\n $this->assertContains(\"was deleted\", $json[\"message\"]);\n $this->assertContains(\"dataset 'users'\", $json[\"message\"]);\n }", "public function testRoutingBadIdentifier1()\n {\n $url = $this->baseItem . 'False_Identifier';\n $this->setExpectedException('Omeka_Controller_Exception_404');\n $this->dispatch($url);\n }", "public function no_items() {\n\t\t_e( 'No pickup-points avaliable.', 'samedaycourier' );\n\t}", "public function testDeleteEmailTemplate()\n {\n }", "function snasolutions_ebay_template_delete_form_submit($form, &$form_state) {\n if ($form_state['values']['id']) {\n _ebay_listing_remove($form_state['values']['id']);\n drupal_set_message(t('The template %template_name has been removed successfully.', array('%template_name' => $form_state['values']['name'])));\n drupal_goto('dashboard/listing_settings');\n }\n else{\n die(\"Invalid data!\");\n }\n}", "public function testRegistrationConfigurationsDeleteRegistrationConfiguration()\n {\n }", "public function testRestoRouteDELETE_collections_error_5() {\r\n $this->initContext();\r\n \r\n /*\r\n * Create non admin user\r\n */\r\n $profile = array(\r\n 'userid' => 2,\r\n 'groups' => 'default',\r\n 'email' => 'test_email',\r\n 'password' => 'test_password',\r\n 'username' => 'test_username',\r\n 'givenname' => 'test_givenname',\r\n 'lastname' => 'test_lastname',\r\n 'country' => 'FR',\r\n 'organization' => 'test_organization',\r\n 'flags' => null,\r\n 'topics' => null,\r\n 'validatedby' => 'admin',\r\n 'validationdate' => 'now()',\r\n 'activated' => 1\r\n );\r\n $user = new RestoUser($profile, $this->context);\r\n \r\n $restoRouteDELETE = new RestoRouteDELETE($this->context, $user);\r\n $segments = array('collections', 'Landsat');\r\n $res = $restoRouteDELETE->route($segments);\r\n }", "public function testSubmitWithDeletedItem(): void\n {\n $this->productRepository->deleteById('simple-2');\n $quote = $this->getQuoteByReservedOrderId->execute('test01');\n $this->expectExceptionObject(\n new LocalizedException(__('Some of the products below do not have all the required options.'))\n );\n $this->cartManagement->placeOrder($quote->getId());\n }", "public function test_can_delete_template()\n {\n $template = factory('App\\Template')->create();\n $response = $this->call('DELETE', '/checklists/templates/'.$template->id);\n $this->assertEquals(204, $response->status());\n }", "public function testAgreementCheck1RefusalRejection()\n {\n $response = $this->json('POST', route('borrowings.store'), [\n 'agreementCheck1' => 'off'\n ]);\n $response->assertJsonValidationErrors('agreementCheck1');\n }", "public function testRemoveContactFromPropertyAccept()\r\n {\r\n\r\n //start up a new session, going to the Property Charlton Arms\r\n $this->session->visit('http://localhost:8000/app_test.php/property/4');\r\n\r\n $page = $this->session->getPage();\r\n $this->session->wait(1000);\r\n\r\n //click on the remove button\r\n $removeButton = $page->find(\"css\", \"#rmb4\");\r\n $removeButton->click();\r\n\r\n //click the okay button\r\n $okayButton = $page->find(\"css\", \"#btnAccept\");\r\n $okayButton->click();\r\n\r\n $this->session->wait(10000, \"document.readyState === 'complete'\");\r\n //assert that Kenson is no longer on the page\r\n $this->assertNotContains(\"Kenson, Ken\", $page->find(\"css\",\"#associatedContacts\")->getHtml());\r\n\r\n }", "public function deleteThrowsErrorIfIdDoesNotExist()\n {\n $user = User::find(1);\n $response = $this->actingAs($user, 'api')->delete(\"/api/pokemon/132940347348\")\n ->assertStatus(400);\n }", "public function testRemovingAnItemThatDoesntExist()\n {\n $collection = new GenericCollection();\n $collection->remove(0);\n }", "public function testInsertRoute(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the repository for the route\r\n $repository->save($route);\r\n\r\n //specify a container for routePickup\r\n $container = new Container();\r\n $container->setContainerSerial(\"X11111\");\r\n $container->setType(\"Bin\");\r\n $container->setSize(\"6\");\r\n $container->setStatus(\"Active\");\r\n\r\n //specify a second container for this routePickup\r\n $container2 = new Container();\r\n $container2->setContainerSerial(\"X123456\");\r\n $container2->setType(\"Bin\");\r\n $container2->setSize(\"6\");\r\n $container2->setStatus(\"Active\");\r\n\r\n //save the container\r\n $repo = $this->em->getRepository(Container::class);\r\n $repo->save($container);\r\n $repo->save($container2);\r\n\r\n $rp = new RoutePickup();\r\n $rp->setPickupOrder(1);\r\n $rp->setRoute($route);\r\n $rp->setContainer($container);\r\n\r\n //save the route pickup\r\n $repo = $this->em->getRepository(RoutePickup::class);\r\n $repo->save($rp);\r\n\r\n\r\n\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n\r\n $crawler = $client->request('GET', '/route/manage/1');\r\n\r\n $form = $crawler->selectButton('Add')->form();\r\n $form[\"appbundle_routepickup[pickupOrder]\"] = 1; //set the pickup order to be 1 instead of the other container previously inserted\r\n $form[\"appbundle_routepickup[container]\"] = 2; //select the second container in the list\r\n\r\n $crawler = $client->submit($form);\r\n\r\n\r\n //Check that the row with the previous bin has a pickup order of 2\r\n $this->assertContains(\"2\", $crawler->filter(\"table tr:contains('X11111')\")->html());\r\n }", "public function testDeleteCouponReservation()\n {\n }", "public function testGetEmailsRemove()\n\t{\n\t\t$data = TestHelper::createUser(UserStatus::ACTIVE);\n\n\t\t$this->be($data->user);\n\t\t$this->call('GET', \"user/emails/{$data->user->hash}/remove/{$data->emailAlternate->id}\");\n\n\t\t$this->assertSessionHas('messages.success');\n\t\t$this->assertEquals(null, UserEmail::find($data->emailAlternate->id));\n\t}", "public function testGoodsReceivedNotePurchaseOrderDELETERequestGRNIDPurchaseOrdersOrderIDDelete()\n {\n }", "public function testServicesServiceIdDelete()\n {\n }", "public function testTeamMembersIdTeamTemplatesDelete()\n {\n\n }", "public function testTeamMembersIdTemplatesDelete()\n {\n\n }", "public function testTeamMembersIdTeamTemplateFoldersDelete()\n {\n\n }", "public function testBookingsCanBeDeleted()\n {\n $admin = factory(User::class)->states('admin')->create();\n $booking = factory(Booking::class)->create();\n\n $this->actingAs($admin)->deleteJson('api/bookings/'.$booking->id)\n ->assertStatus(204);\n\n $this->assertDatabaseMissing('bookings', [\n 'id' => $booking->id,\n ]);\n }", "public function testDeleteEntryMissing()\n {\n\n $response = $this->json('delete', '/api/entries/ff');\n\n $response\n ->assertStatus(404)\n ->assertJson([\n \"Error\" => \"Entry Not Found\",\n ]);\n }", "public function test_deleteReceivingProcessTag() {\n\n }", "function pointstore_handle_error_taken($prefix,$suffix)\n{\n\t// Has this email address been taken?\n\t$taken=$GLOBALS['SITE_DB']->query_value_null_ok('sales','details',array('details'=>$prefix,'details2'=>'@'.$suffix));\n\tif (!is_null($taken))\n\t{\n\t\twarn_exit(do_lang_tempcode('EMAIL_TAKEN'));\n\t}\n}" ]
[ "0.69912064", "0.64708257", "0.6213206", "0.6180552", "0.61767983", "0.609395", "0.60398966", "0.5992722", "0.59861606", "0.5984924", "0.59796506", "0.5958019", "0.5908855", "0.5895845", "0.5858323", "0.5825874", "0.57967705", "0.5719724", "0.5714247", "0.57019174", "0.568945", "0.56646", "0.56597346", "0.56511605", "0.56291956", "0.5611968", "0.56064606", "0.5600563", "0.5594714", "0.55916816", "0.55850124", "0.5577311", "0.557155", "0.5562742", "0.5561215", "0.55516446", "0.554045", "0.55396694", "0.5532576", "0.55307806", "0.55247045", "0.55220526", "0.5510994", "0.5491811", "0.54863685", "0.5481848", "0.54738104", "0.5467657", "0.54646754", "0.54393446", "0.5433853", "0.5432115", "0.54275507", "0.5422472", "0.54199135", "0.5398851", "0.5392698", "0.538896", "0.5387627", "0.5382777", "0.53790617", "0.5371999", "0.5370846", "0.536954", "0.5366665", "0.5363972", "0.53594714", "0.5356826", "0.53510404", "0.5344927", "0.53449214", "0.5340238", "0.5337968", "0.5336458", "0.5333683", "0.5333016", "0.5332861", "0.532539", "0.5325116", "0.53186303", "0.53179705", "0.5317741", "0.5314868", "0.5312509", "0.5309793", "0.5305439", "0.53031015", "0.53025", "0.5296087", "0.529499", "0.5294156", "0.5291142", "0.5290107", "0.5287776", "0.52813786", "0.52806973", "0.5275135", "0.527386", "0.527251", "0.52711785" ]
0.7550925
0
Run the database seeds. Seeds the database with room names.
Запустите запуск базы данных. Заполняет базу данных именами комнат.
public function run() { DB::table('room')->insert(['room_name' => 'Holcombe']); DB::table('room')->insert(['room_name' => 'Firwood']); DB::table('room')->insert(['room_name' => 'Penny Farthing']); DB::table('room')->insert(['room_name' => 'Exhibition']); DB::table('room')->insert(['room_name' => 'Harmony']); DB::table('room')->insert(['room_name' => 'Conf Centre']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n $inserts = array();\n\n $inserts[] = \n [\n 'id' => 1,\n 'room_number' => 101, \n 'price' => 55.50, \n 'description' => 'Nice one with ocean view',\n 'created_at' => date('Y-m-d H:i:s')\n ];\n\n $faker = Faker::create();\n \tforeach (range(2,10) as $i) {\n $inserts[] = [\n 'id' => $i,\n 'room_number' => '10'. $i, \n 'price' => $faker->randomFloat(2,30,100), \n 'description' => $faker->sentence(20),\n 'created_at' => date('Y-m-d H:i:s')\n ];\n }\n\n foreach ($inserts as $insert) {\n \\App\\Room::create($insert);\n }\n }", "public function run()\n {\n\t\tDB::table('rooms')->insert([\n\t\t\t'room'\t=>\t'SENCILLA'\n\t\t]); \n\t\tDB::table('rooms')->insert([\n\t\t\t'room'\t=>\t'MATRIMONIAL'\n\t\t]);\n\t\tDB::table('rooms')->insert([\n\t\t\t'room'\t=>\t'DOBLE'\n\t\t]); \n\t\tDB::table('rooms')->insert([\n\t\t\t'room'\t=>\t'TRIPLE'\n\t\t]);\n\t\tDB::table('rooms')->insert([\n\t\t\t'room'\t=>\t'CUADRUPLE'\n\t\t]);\n }", "public function run()\n {\n Room::factory()\n ->count(10)\n ->create();\n $rooms = [\n [\n \"user_id\" => 11,\n \"room_description\" => \"Bedroom\"],\n [\"user_id\" => 11,\n \"room_description\" => \"Living room\"]\n ];\n foreach ($rooms as $room) {\n Room::create($room);\n\n }\n }", "public function run()\n {\n Room::create([\n 'name' => 'Issue 1',\n ]);\n Room::create([\n 'name' => 'Issue 2',\n ]);\n Room::create([\n 'name' => 'Issue 3',\n ]);\n Room::create([\n 'name' => 'Issue 4',\n ]);\n Room::create([\n 'name' => 'Issue 5',\n ]);\n }", "public function run()\n {\n \\App\\Rooms::insert([[\n 'room_id' => '1',\n 'room_name' => 'Kelas IPA-1'\n ],[\n 'room_id' => '2',\n 'room_name' => 'Kelas IPS-1'\n ],[\n 'room_id' => '3',\n 'room_name' => 'Laboratorium Komputer'\n ]]);\n }", "public function run()\n {\n Room::create([\n 'name' => 'Acessoria',\n 'type' => 'Administrativo'\n ]);\n\n Room::create([\n 'name' => 'Sala 21',\n 'level' => 'Médio',\n 'type' => 'Pedagogia',\n ]);\n }", "public function run()\n {\n DB::table('rooms')->delete();\n\t\t$rooms = array(\n\t\t['title' => 'Hörsaal 1', 'building_id' => '2'],\n\t\t['title' => 'Hörsaal 2', 'building_id' => '2'],\n\t\t['title' => 'Hörsaal 8', 'building_id' => '1'],\n\t\t['title' => 'Cafe Relax', 'building_id' => '1'],\n\t\t['title' => 'EB-Raum 1', 'building_id' => '3'],\n\t\t['title' => 'EB-Raum 2', 'building_id' => '3'],\n\t\t);\n\t\tDB::table('rooms')->insert($rooms);\n }", "public function run()\n {\n \\App\\SchoolRoom::truncate(); //清空資料庫\n\n $item = [\n '校長室',\n '教務處',\n '學務處',\n '總務處',\n '輔導室',\n '人事室',\n '會計室',\n '級任導師',\n '科任教師',\n '資源班',\n '特教班',\n '家長會',\n '其他',\n ];\n\n foreach($item as $v){\n \\App\\SchoolRoom::create([\n 'name' => $v,\n ]);\n }\n }", "public function run()\n {\n DB::table('rooms')->insert([\n 'name' => 'Living Room',\n 'systemID' => 2,\n 'comments' => '4 large windows with natural light',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Kitchen',\n 'systemID' => 2,\n 'comments' => '1 large wide window - natural light',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n Role::truncate();\n $roleNames = [\n ['name'=>'Superadmin'],\n ['name'=>'Admin'],\n ['name'=>'Inventory Manager'],\n ['name'=>'Order Manager'],\n ['name'=>'Customer']\n ];\n\n DB::table(\"roles\")->insert($roleNames);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $location = \"Cộng tác viên, Quản trị viên, Administrator\";\n $explode = explode(',',$location);\n foreach($explode as $ex)\n {\n DB::table('role')->insert([\n 'name' => $ex\n ]);\n }\n\n DB::table('admins')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'phone' => '0969902940',\n 'email_verified_at' => now(),\n 'password' => bcrypt('12345678'), // password :12345678\n 'level' => 3,\n ]);\n\n }", "public function run()\n {\n // $this->call(RolesTableSeeder::class);\n DB::table('roles')->insert([\n ['name' => 'Super Admin'],\n ['name' => 'Admin'],\n ['name' => 'Super Manager'],\n ['name' => 'Manager'],\n ['name' => 'User']\n ]);\n\n DB::table('departaments')->insert([\n ['name' => 'Developers'],\n ['name' => 'Managers'],\n ['name' => 'Mobiles'],\n ['name' => 'SEO']\n ]);\n\n DB::table('offices')->insert([\n ['name' => 'Trainee'],\n ['name' => 'Junior'],\n ['name' => 'Middle'],\n ['name' => 'Senjor']\n ]);\n }", "public function run()\n {\n $rooms = [\n [\n 'name' => \"Auckland\",\n 'is_bookable' => true\n ],\n [\n 'name' => \"Hamilton\",\n 'is_bookable' => false\n ],\n [\n 'name' => \"Wellington\",\n 'is_bookable' => true\n ],\n [\n 'name' => \"Christchurch\",\n 'is_bookable' => true\n ],\n ];\n\n foreach ($rooms as $room) {\n Room::create($room);\n }\n }", "public function run()\n {\n $data = [\n ['id' => 1, 'name' => 'Public Room', 'created_at' => '2020-03-27 07:11:41', 'updated_at' => '2020-03-27 07:11:41'],\n ];\n DB::table('rooms')->insert($data);\n }", "public function run()\n {\n DB::table('rooms')->insert([\n 'name' => 'Orchid A',\n 'type_id' => 1\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Orchid B',\n 'type_id' => 1\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Daisy',\n 'type_id' => 1\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Aster',\n 'type_id' => 1\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Dahlia',\n 'type_id' => 1\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Edelweiss',\n 'type_id' => 1\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Lavender',\n 'type_id' => 1\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Lily',\n 'type_id' => 1\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Rose',\n 'type_id' => 2\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Sunflower',\n 'type_id' => 2\n ]);\n }", "public function run()\n {\n $data = [\n \t[\t\n \t\t'room_id' =>'1010',\n \t\t'room_name'=>'101G2',\n ], \n [\n \t'room_id' =>'1020',\n \t\t'room_name'=>'102G2',\n \t],\n \t[\n \t'room_id' =>'1030',\n \t\t'room_name'=>'103G2',\n \t],\n \t[\n \t'room_id' =>'1040',\n \t\t'room_name'=>'104G2',\n \t],\n \t[\n \t'room_id' =>'1050',\n \t\t'room_name'=>'105G2',\n \t],\n \t[\n \t'room_id' =>'1060',\n \t\t'room_name'=>'106G2',\n \t],\n \t[\n \t'room_id' =>'1070',\n \t\t'room_name'=>'107G2',\n \t],\n \t[\n \t'room_id' =>'1080',\n \t\t'room_name'=>'108G2',\n \t],\n \t[\n \t'room_id' =>'1090',\n \t\t'room_name'=>'109G2',\n \t],\n ];\n DB::table('db_room')->insert($data);\t\n\t}", "public function run()\n {\n Room::create([\n 'id'=>'1',\n 'name'=> 'Sala 9 bloco 3',\n 'description'=> 'Sala de aula padrão da fatec', \n 'capacity'=> '50',\n 'available_video_projector'=> '1',\n 'available_AC'=> '0',\n 'available_seats'=> '1',\n 'seats_type'=> 'Cadeira de Madeira',\n 'location_id'=> '1'\n ]);\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n \n \tfor($i = 1; $i <= 10; $i++){ \t\t\n \t\tDB::table('rooms')->insert([\n \t\t\t'name' => \"Ruangan \" . $faker->name,\n \t\t\t'floor_id' => mt_rand(1, 5),\n \t\t\t'building_id' => mt_rand(1, 5), \n 'gateway_id' => mt_rand(1,5),\n \t\t]);\n \n \t}\n }", "public function run()\n {\n Role::create([\n 'name' => 'minion'\n ]);\n\n Role::create([\n 'name' => 'journeyman'\n ]);\n\n Role::create([\n 'name' => 'overlord'\n ]);\n\n User::create([\n 'name' => 'Jamie',\n 'role_id' => 3,\n 'email' => 'jamie@test.com',\n 'password' => bcrypt('test')\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Price::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = Faker::create();\n\n foreach(Room::all() as $room) {\n for ($i = 0; $i < rand(2, 5); $i++) {\n $room->prices()->save(new Price([\n 'cost' => $faker->randomFloat(2, 0, 10),\n 'currency' => $faker->currencyCode,\n 'max_persons' => $faker->numberBetween(1, 4),\n 'cancel_type' => $faker->text($maxNbChars = 32),\n 'meal' => $faker->text($maxNbChars = 32),\n ]));\n }\n }\n\n }", "public function run()\n {\n // University of Wollongong\n DB::table('rooms')->insert([\n 'venue_id' => '1',\n 'name' => 'University Hall',\n 'type' => 'Hall',\n 'capacity' => '800'\n ]);\n\n DB::table('rooms')->insert([\n 'venue_id' => '2',\n 'name' => 'Room 123',\n 'type' => 'Room',\n 'capacity' => '30'\n ]);\n\n DB::table('rooms')->insert([\n 'venue_id' => '2',\n 'name' => 'Room 124',\n 'type' => 'Room',\n 'capacity' => '30'\n ]);\n\n DB::table('rooms')->insert([\n 'venue_id' => '2',\n 'name' => 'Room 125',\n 'type' => 'Room',\n 'capacity' => '30'\n ]);\n\n DB::table('rooms')->insert([\n 'venue_id' => '2',\n 'name' => 'Room 126',\n 'type' => 'Room',\n 'capacity' => '30'\n ]);\n\n DB::table('rooms')->insert([\n 'venue_id' => '2',\n 'name' => 'Room 127',\n 'type' => 'Room',\n 'capacity' => '30'\n ]);\n\n // Rosehill Gardens\n DB::table('rooms')->insert([\n 'venue_id' => '3',\n 'name' => 'Grand Pavilion',\n 'type' => 'Pavilion',\n 'capacity' => '1000'\n ]);\n }", "public function run()\n {\n $rooms = [\n \t[\n \t\t'name' => 'Room Awesome', 'description' => 'This room is the awesomest room we have', \n \t\t'status' => Room::AVAILABLE \n \t],\n \t[\n\t \t'name' => 'Presidential Treat Awesome', 'description' => 'This room has all the things you can desire', \n\t \t'status' => Room::AVAILABLE \n\t ]\n ];\n\n $roomModel = new Room;\n foreach ( $rooms as $room ) {\n \t$roomModel->create( $room );\n }\n }", "public function run()\n {\n //\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Role::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Role::create([\n 'role_name' => 'admin',\n ]);\n Role::create([\n 'role_name' => 'etudiant',\n ]);\n Role::create([\n 'role_name' => 'enseignant',\n ]);\n }", "public function run()\n {\n Room::insert([\n [\n \"id\" => 1234,\n \"property_id\" => 123,\n \"name\" => \"Cottage One\",\n \"default_rate\" => 300,\n \"bedrooms\" => 3,\n \"max_guests\" => 6,\n \"tax_inclusive\" => true,\n ],\n [\n \"id\" => 1235,\n \"property_id\" => 123,\n \"name\" => \"Cottage Two\",\n \"default_rate\" => 250,\n \"bedrooms\" => 2,\n \"max_guests\" => 4,\n \"tax_inclusive\" => false\n ]\n ]);\n }", "public function run()\n {\n $room = new \\App\\Room;\n $room->room_number = 304;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 303;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 404;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 405;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 406;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 800;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 206;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 605;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 603;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 702;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 905;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 902;\n $room->save();\n\n $room = new \\App\\Room;\n $room->room_number = 203;\n $room->save();\n }", "public function run()\n {\n\n LocationSeeder::run();\n CarClassSeeder::run();\n AccessorySeeder::run();\n Country::factory(10)->create();\n\n User::factory(10)->create();\n UserFactory::makeAdmin();\n\n Car::factory(10)->create();\n\n //Reservation::factory(10)->create();\n //ReservationAccessory::factory(5)->create();\n\n ChatSeeder::run();\n }", "public function run() {\n DB::table('roles')->truncate();\n //creating roles\n\n \n \n DB::table('roles')->insert(array(\n array('name' => 'admin', 'display_name' => 'Admin'),\n array('name' => 'user', 'display_name' => 'User'),\n ));\n\n\n\n\n // Uncomment the below to run the seeder\n // DB::table('roles')->insert($roles);\n }", "public function run()\n {\n $this->call(DatabaseSeederRoom::class);\n }", "public function run()\n {\n factory(Classroom::class)->create([\n \"name\" => \"1ASIX-DAM. 1r Informàtica (S) ASIX - DAM\",\n \"enrollment_id\" => 1\n ]);\n factory(Classroom::class)->create([\n \"name\" => \"2DAM. 2on DAM\",\n \"enrollment_id\" => 2\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Actor', 10)->create();\n factory('App\\Genre', 5)->create();\n factory('App\\Director', 3)->create();\n factory('App\\Movie', 20)->create();\n //factory('App\\MovieActor', 10)->create();\n factory('App\\MovieGenre', 10)->create();\n }", "public function run()\n {\n // when do new seeding, delete all the rows, populate again. No repeating data\n /*User::truncate();*/\n DB::table('role_user')->truncate();\n\n $superAdminRole = Role::where('name','superAdmin')->first();\n $adminRole =Role::where('name','admin')->first();\n $userRole =Role::where('name','user')->first();\n\n $SuperAdmin = User::create([\n 'name'=>'Super Admin',\n 'email'=>'superadmin@admin.com',\n 'password'=> Hash::make('admin123')\n ]);\n\n $AdminUser = User::create([\n 'name'=>'Admin User',\n 'email'=>'user@user.com',\n 'password'=> Hash::make('user123')\n ]);\n\n $user2 = User::create([\n 'name'=>'User',\n 'email'=>'user@test.com',\n 'password'=> Hash::make('user123')\n ]);\n\n $SuperAdmin->roles()->attach($superAdminRole);\n $AdminUser->roles()->attach($adminRole);\n $user2->roles()->attach($userRole);\n\n }", "public function run()\n {\n $rooms = Room::all();\n foreach ($rooms as $room){\n foreach (range(1,10) as $row_index){\n foreach (range(1,15) as $seat_index){\n factory(Seat::class)->create([\n 'room_id' => $room->id,\n 'row' => $row_index,\n 'seat' => $seat_index\n ]);\n }\n }\n }\n }", "public function run()\n {\n DB::table('users')->insert([\n \t'id' => '1',\n 'name' => 'Super Admin',\n 'email' => 'super_admin@example.com',\n 'role' => '1',\n 'password' => bcrypt('superadmin')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '2',\n 'name' => 'Admin',\n 'email' => 'admin@example.com',\n 'role' => '2',\n 'password' => bcrypt('admin123')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '3',\n 'name' => 'Teacher',\n 'email' => 'teacher@example.com',\n 'role' => '3',\n 'password' => bcrypt('teacher123')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '4',\n 'name' => 'Student',\n 'email' => 'student@example.com',\n 'role' => '4',\n 'password' => bcrypt('student123')\n ]);\n\n $faker = Faker::create();\n \n \tforeach(range(5,20) as $i){\n \n \t DB::table('users')->insert([\n 'id' => $i,\n \t\t\t'name' => $faker->name,\n \t\t\t'email' => $faker->email,\n \t\t\t'role' => $faker->numberBetween(1,4),\n 'password' => bcrypt('password'),\n \t\t]);\n \n \t}\n }", "public function run()\n {\n Room::create([\n 'user_id' => 1,\n 'room_name' => 'Pemilihan Walikota Bikini Bottom',\n 'description' => 'Puja kerang ajaib..',\n 'code' => 'XGHDH',\n ]);\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n foreach (range(1,20) as $index) {\n Reservation::create([\n 'user_id' => $faker->numberBetween(1,10),\n 'room_id' => $faker->numberBetween(1, 10),\n 'reserv_from' => $faker->dateTime,\n 'reserv_to' => $faker->dateTime,\n 'comment' => $faker->realText($maxNbChars = 100, $indexSize = 2),\n ]);\n }\n }", "public function run()\n {\n DB::table('classrooms')->insert([\n 'name' => 'IV 1',\n ]);\n\n DB::table('classrooms')->insert([\n 'name' => 'V 6',\n ]);\n\n DB::table('classrooms')->insert([\n 'name' => 'VII 8',\n ]);\n }", "public function run()\n {\n $rooms = [\n\n [\n \"room_number\" => \"201\",\n \"price\" => \"2000\",\n \"max_persons\" => 2,\n \"room_type\" => \"normal\"\n ],\n [\n \"room_number\" => \"202\",\n \"price\" => \"3000\",\n \"max_persons\" => 3,\n \"room_type\" => \"deluxe\"\n ],\n\n ];\n\n\n foreach ($rooms as $room) {\n\n $user = Room::where(['room_number'=> $room['room_number']])->first();\n\n if(empty($user)) {\n\n Room::firstOrCreate($room);\n\n }\n }\n }", "public function run()\n {\n \n ///Eloquent::unguard();\n //$this->call('UsersTableSeeder'::Class);\n\n //user table seed\n DB::table('users')->delete();\n $users = array(\n array(\n\n 'name'=>'Admin User',\n 'password'=> Hash::make('admin1'),\n 'email'=>'test@mail.com',\n )\n );\n\n DB::table('users')->insert($users);\n\n //vehicle table seed\n DB::table('vehicle')->delete();\n $vehicle = array(\n array(\n\n 'name'=>'Admin User',\n 'contactnumber'=> 719977232,\n 'email'=>'test@mail.com',\n 'manufacture'=>'Volkswagon',\n 'type'=>'Polo',\n 'year'=>2010,\n 'colour'=>'White',\n 'mileage'=> 12000,\n 'created_at'=>date('Y-M-D h:m:s'),\n )\n );\n\n DB::table('vehicle')->insert($vehicle);\n }", "public function run()\n {\n DB::table('rooms')->insert([\n 'name' => 'Phòng đơn',\n 'capacity' => 1,\n ]);\n\n DB::table('rooms')->insert([\n 'name' => 'Phòng đôi',\n 'capacity' => 2,\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Phòng gác mái',\n 'capacity' => 4,\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Phòng sáu',\n 'capacity' => 6,\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Phòng tám',\n 'capacity' => 8,\n ]);\n DB::table('rooms')->insert([\n 'name' => 'Phòng doms',\n 'capacity' => 8,\n ]);\n }", "public function run()\n {\n DB::table('buildings')->delete();\n factory(App\\Building::class, 3)->create()->each(function($r) {\n $r->rooms()->save(factory(App\\Room::class)->make());\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('roles')->insert([\n ['title' => 'Администратор', 'slug' => 'admin'],\n ['title' => 'Пользователь', 'slug' => 'user']\n ]); \n\n DB::table('categories')->insert([\n ['name_cat' => 'Все объекты', 'parent_id' => 0]\n ]); \n\n DB::table('users')->insert([\n ['login' => 'admin',\n 'email' => 'a432974@yandex.ru',\n 'password' => bcrypt('admin'),\n 'name' => 'ООО \"Техника в аренду\"',\n 'dopname' => 'менеджер Петрова Юлия',\n 'phone' => '+7-927-456-78-90',\n 'role_id' => 1,\n 'valid' => true,\n 'confirmed' => true],\n\n ['login' => 'user',\n 'email' => 'fake@yandex.ru',\n 'password' => bcrypt('user'),\n 'name' => 'ИП \"Копатель\"',\n 'dopname' => 'директор Копков Игорь',\n 'phone' => '+7-123-456-78-90',\n 'role_id' => 2,\n 'valid' => true,\n 'confirmed' => true]\n ]);\n }", "public function run()\n {\n Medewerker::create([\n 'voornaam' => 'test',\n 'achternaam' => 'test',\n ]);\n\n Medewerker::create([\n 'voornaam' => 'jacky',\n 'achternaam' => 'zheng',\n ]);\n\n Medewerker::create([\n 'voornaam' => 'jaap',\n 'achternaam' => 'rodenburg',\n ]);\n\n Rol::create([\n 'rol' => 'werknemer',\n ]);\n\n User::create([\n 'email' => 'test@test.nl',\n 'password' => Hash::make('test'),\n 'medewerker_id' => 1,\n 'rol' => 'werknemer',\n ]);\n }", "public function run()\n {\n\n DB::table('classroom_entity')->delete();\n $room = 15304 ;\n for ($i=0; $i < 3; $i++) {\n DB::table('classroom_entity')->insert([\n 'room_id' => 15304+$i,\n 'room_name' => '',\n 'build' => 15,\n ]);\n }\n\n\n\n\n }", "public function run()\n\t{\n\t\t\\DB::table('av_log')->delete();\n \n $uids = DB::table('users')->whereIn('position_id', array(2,3,6))->lists('id');\n $rooms = DB::table('ceas_rooms')->lists('name');\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $id)\n {\n AVLog::create([\n 'message' => $faker->realText(100),\n 'uid' => $faker->randomElement($uids),\n 'room_name' => $faker->randomElement($rooms)\n ]);\n }\n\n }", "public function run()\n {\n //seed for user account\n \\Illuminate\\Support\\Facades\\DB::table('users')->insert([\n [\n \"name\" => \"User\",\n \"email\" => \"user@store.in\",\n \"password\" => \\Illuminate\\Support\\Facades\\Hash::make('user12345'),\n \"phone_number\" => \"+62811111111\",\n \"full_address\" => \"Jalan Mendut Gg.XV No.18\",\n \"city\" => \"Jember\",\n \"province\" => \"Jawa timur\",\n \"postal_code\" => \"68416\"\n ],\n [\n \"name\" => \"Admin\",\n \"email\" => \"admin@store.in\",\n \"password\" => \\Illuminate\\Support\\Facades\\Hash::make('admin123'),\n \"phone_number\" => \"+62811111111\",\n \"full_address\" => \"Jalan Mendut Gg.XV No.18\",\n \"city\" => \"Jember\",\n \"province\" => \"Jawa timur\",\n \"postal_code\" => \"68416\"\n ]\n ]);\n\n //seed for role each account\n DB::table('user_role')->insert([\n [\n 'user_id' => 1,\n 'role_id' => 1\n ],\n [\n 'user_id' => 2,\n 'role_id' => 2\n ]\n ]);\n }", "public function run()\n {\n // Seed the 2 user roles into the database.\n DB::table('user_role')->insert([\n 'name' => 'gebruiker'\n ]);\n DB::table('user_role')->insert([\n 'name' => 'administrator'\n ]);\n\n // Create an admin account\n DB::table('users')->insert([\n 'userRole' => '2',\n 'firstName' => 'admin',\n 'lastName' => 'admin',\n 'studentNumber' => '12345678',\n 'email' => '12345678@mydavinci.nl',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n ]);\n\n // Fill the database with random users.\n factory(App\\User::class, 50)->create()->each(function ($user) {});\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*factory(App\\Region::class, 10)->create()->each(function($admin){\n $admin->admins()\n ->saveMany(\n factory(App\\Admin::class, 1)->make()\n );\n });*/\n \n /*factory(App\\District::class, 30)->create()->each(function($d){\n $d->hospitals()\n ->saveMany(\n factory(App\\Hospital::class, 1)->create()->each(function($u){\n $u->users()\n ->saveMany(\n factory(App\\User::class, 1)->make()\n );\n })\n );\n });*/\n //factory(App\\User::class, 30)->create();\n\n /*factory(App\\Service_Vendor::class, rand(1,30))->create();\n factory(App\\Category::class, 30)->create();\n factory(App\\Department::class, 30)->create();\n factory(App\\Unit::class, 30)->create();\n factory(App\\Service_Vendor::class, 400)->create();\n factory(App\\Equipment::class, 2000)->create();\n factory(App\\Maintenance::class, 2000)->create();*/\n\n factory(App\\Requests::class, 200)->create()->each(function($equip){\n $equip->equipment_requests()\n ->saveMany(\n factory(App\\Equipment_request::class, 2)->make()\n );\n });\n \n }", "public function run()\n {\n $classroom_count = Classroom::count();\n\n $students = User::whereHas('roles', function ($query) {\n $query->where('name', '=', 'student');\n })->get();\n\n foreach ($students as $student)\n {\n factory(App\\Student::class)->create([\n 'user_id' => $student->id,\n 'classroom_id' => rand(1, $classroom_count),\n ]);\n }\n }", "public function run()\n {\n\n // Seed an admin\n $adminRole = Role::firstOrCreate(['title' => 'Admin']);\n\n User::factory()->create([\n 'email' => 'admin@arentiq.com',\n 'role_id' => $adminRole->id\n ]);\n\n // Seed some property owners\n $propertyOwnerRole = Role::firstOrCreate(['title' => 'Property Owner']);\n User::factory()->create([\n 'email' => 'property-owner@arentiq.com',\n 'role_id' => $propertyOwnerRole->id\n ]);\n User::factory(4)->create(['role_id' => $propertyOwnerRole->id]);\n\n // Seed some tenants\n $tenantRole = Role::firstOrCreate(['title' => 'Tenant']);\n User::factory()->create([\n 'email' => 'tenant@arentiq.com',\n 'role_id' => $tenantRole->id\n ]); \n User::factory(32)->create(['role_id' => $tenantRole->id]);\n\n }", "public function run()\n {\n User::create([\n 'name' => 'General Manager',\n 'email' => 'gm1@gmail.com',\n 'password' => bcrypt('123456'),\n 'role_id' => 1\n ]);\n\n User::create([\n 'name' => 'Office Manager',\n 'email' => 'om1@gmail.com',\n 'password' => bcrypt('123456'),\n 'role_id' => 2\n ]);\n\n User::create([\n 'name' => 'Data Editor',\n 'email' => 'editor1@gmail.com',\n 'password' => bcrypt('123456'),\n 'role_id' => 3\n ]);\n }", "public function run()\n {\n Role::create([\n 'id' => '1',\n 'name' => 'Administrator'\n ]);\n\n User::create(array(\n 'email' => 'jason@greenroom.com.my',\n 'name' => 'Jason Seah',\n 'password' => '111111',\n 'role_id' => '1'\n ));\n }", "public function run()\n {\n // \\App\\Models\\User::factory(1)->create();\n // \\App\\Models\\Role::factory(1)->create();\n\n // $this->call(UserSeeder::class);\n // $this->call(RoleSeeder::class);\n\n /* USERS AND ROLES SEEDER */\n $user1 = DB::table('users')->insert([\n 'name' => 'Super Admin Saso',\n 'username' => 'super_admin_saso',\n 'email' => 'superadmin@iwkz-saso.com',\n 'password' => bcrypt('saso1234'),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n $user2 = DB::table('users')->insert([\n 'name' => 'Admin Saso',\n 'username' => 'admin_saso',\n 'email' => 'admin@iwkz-saso.com',\n 'password' => bcrypt('saso1234'),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n $name1 = 'Super Admin';\n $slug1 = Str::of(Str::lower($name1))->slug('_');\n\n $role1 = DB::table('roles')->insert([\n 'name' => $name1,\n 'slug' => $slug1, \n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n $name2 = 'Admin';\n $slug2 = Str::of(Str::lower($name2))->slug('_');\n\n $role2 = DB::table('roles')->insert([\n 'name' => $name2,\n 'slug' => $slug2, \n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n $user1 = \\App\\Models\\User::find(1);\n $role1 = \\App\\Models\\Role::find(1);\n $user1->roles()->attach($role1);\n\n $user2 = \\App\\Models\\User::find(2);\n $role2 = \\App\\Models\\Role::find(2);\n $user2->roles()->attach($role2);\n /* USERS AND ROLES SEEDER END */\n\n $this->call(EventSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MenuSeeder::class);\n \n }", "public function run()\n {\n\t\t$roomType = array('Deluxe', 'Standard');\n\t\tforeach($roomType as $value) {\n\t\t\tDB::table('room_type')->insert([\n \t'name' => $value,\n\t\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => date('Y-m-d H:i:s'),\n \t]);\n\t\t} \n }", "public function run()\n {\n DB::table('main')->insert(['name' => 'title', 'value' => 'All About Aqua']);\n DB::table('main')->insert(['name' => 'short-title', 'value' => 'A3']);\n DB::table('main')->insert(['name' => 'admin', 'value' => 'bRexx']);\n\n DB::table('categories')->insert(['name' => 'Fish']);\n DB::table('categories')->insert(['name' => 'Aquarium']);\n DB::table('categories')->insert(['name' => 'Food']);\n DB::table('categories')->insert(['name' => 'Decoration']);\n DB::table('categories')->insert(['name' => 'Medicine']);\n DB::table('categories')->insert(['name' => 'Others']);\n\n //admin seed\n DB::table('users')->insert(['name'=>'admin','email'=>'admin@admin.com','password'=>bcrypt('admin'),'address'=>'test,testing,tested','phone'=>987654321,'bio'=>'Quibusdam sed consequatur nisi ipsam doloribus quasi exercitationem ducimus dolore']);\n DB::table('shops')->insert(['name'=>'admin','email'=>'admin@admin.com','password'=>bcrypt('admin'),'address'=>'test,testing,tested','phone'=>987654321,'bio'=>'Quibusdam sed consequatur nisi ipsam doloribus quasi exercitationem ducimus dolore']);\n\n }", "public function run()\n {\n //\n DB::table('rooms')->insert([\n [\n 'name' => '同期',\n 'password' => '4980',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'name' => '岩倉',\n 'password' => 'iwakura',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n ]);\n }", "public function run()\n {\n\n User::create([\n 'name' => 'admin',\n 'email' => 'admin@admin.de',\n 'password' => bcrypt('admin'),\n 'role_id' => 1,\n ]);\n\n User::create([\n 'name' => 'user',\n 'email' => 'user@user.de',\n 'password' => bcrypt('user'),\n 'role_id' => 2,\n ]);\n\n User::create([\n 'name' => 'guest',\n 'email' => 'guest@guest.de',\n 'password' => bcrypt('guest'),\n 'role_id' => 3,\n ]);\n\n//\t DB::table('users')->insert([\n//\t\t 'name' => 'tester',\n//\t\t 'email' => 'j.hoelzle@exinit.de',\n//\t\t 'password' => 'tester',\n//\t ]);\n//\n//\t DB::table('users')->insert([\n//\t\t 'name' => 'tester2',\n//\t\t 'email' => 'jan@exinit.de',\n//\t\t 'password' => 'tester2',\n//\t ]);\n }", "public function run()\n {\n //\n $rooms = Room::all();\n foreach($rooms as $room){\n DB::table('bookings')->insert([\n 'room_id' => $room->id,\n 'start' => date(\"y-m-d\", mt_rand(1, time())),\n 'end' => date(\"y-m-d\", mt_rand(1, time())),\n 'customer_name' => Str::random(10),\n 'customer_email' => Str::random(10).\".gmail.com\",\n 'total_nights' => 1,\n 'total_price' => 5000,\n ]);\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@admin.com',\n 'password' => Hash::make('password'),\n ]);\n\n factory(MenuGroup::class, 5)->create()->each(function ($group) {\n $group->items()->createMany(factory(MenuItem::class, 2)->make()->toArray());\n });\n\n factory(MenuItem::class, 5)->create();\n\n $this->call(PostsTableSeeder::class);\n }", "public function run()\n {\n // Truncate existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Hotel::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n // Create Hotels in our database:\n for ($i = 0; $i < 3; $i++) {\n Hotel::create([\n 'name' => $faker->name,\n 'address' => $faker->text,\n 'city' => $faker->city,\n 'state' => $faker->state,\n 'country' => $faker->country,\n 'zipcode' => $faker->text,\n 'phonenumber' => $faker->PhoneNumber,\n 'email' => $faker->email,\n 'image' => $faker->Image,\n ]);\n }\n }", "public function run()\n {\n // sudah di levelTableSeeder\n // Level::create([\n // 'name_level' => 'administrator'\n // ]);\n\n Employee::create([\n 'name' => 'admin',\n 'email' => 'admin@parawisely.com',\n 'password' => Hash::make(12345678),\n 'level_id' => 1,\n 'image' => 'deafult.png'\n ]);\n }", "public function run()\n {\n $this->call([\n GenderSeeder::class\n ]);\n User::create(['name' => 'Male']);\n \n $organisations = \\App\\Models\\Organisation::factory(100)->create();\n\n foreach ($organisations as $item) {\n }\n\n // \\App\\Models\\User::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Doctor')->create(['nip' => 'doc', 'password' => bcrypt('123456')]);\n factory('App\\Patient')->create(['nip' => 'pat', 'password' => bcrypt('123456')]);\n factory('App\\Staff')->create(['nip' => 'stf', 'password' => bcrypt('123456')]);\n }", "public function run()\n {\n factory('App\\User')->create([\n 'name' => 'admin',\n 'email' => 'admin@admin.com',\n 'password' => Hash::make('admin123')\n ]);\n \n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\Post', 50)->create();\n factory('App\\Tag', 10)->create();\n\n $posts = Post::all()->pluck('id');\n $tags = Tag::all()->pluck('id');\n\n foreach(range(1, 50) as $index){\n DB::table('taggables')->insert([\n 'tag_id' => $tags[rand(0,9)],\n 'taggable_id' => $posts[rand(0,49)],\n 'taggable_type' => 'App\\Post'\n ]);\n }\n\n factory('App\\Department', 20)->create();\n }", "public function run()\n {\n $data = [\n 'founder' => 'Founder',\n 'webmaster' => 'Webmaster',\n 'user' => 'User',\n ];\n $faker = app(Generator::class);\n $roles = factory(Role::class)\n ->times(3)\n ->make()\n ->each(function ($role, $index) use ($data, $faker) {\n $keys = array_keys($data);\n $vals = array_values($data);\n $role->name = $keys[$index];\n $role->display_name = $vals[$index];\n });\n Role::insert($roles->toArray());\n }", "public function run()\n {\n $this->call(UserSeeder::class);\n \n if (app()->environment('local')) {\n factory(User::class, 50)->create();\n factory(Category::class, 50)->create();\n factory(Application::class, 50)->create();\n }\n\n $this->call(SolvedSeeder::class);\n }", "public function run()\n\t{\n\t\t// DB::table('ordens')->truncate();\n\n\t\t$ordens = array(\n\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('ordens')->insert($ordens);\n\t}", "public function run()\n {\n UserRoom::truncate();\n\n foreach ($this->userRooms as $userRoom) {\n UserRoom::insert([\n 'room_id' => $userRoom['room_id'],\n 'user_id' => $userRoom['user_id'],\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n 'deleted_at' => null\n ]);\n }\n }", "public function run()\n {\n DB::table('officials')->insert([\n 'email' => 'admin@mail.com',\n 'password' => bcrypt('admin123'),\n 'username' => 'admin',\n 'role' => 'admin',\n 'user_id' => 1,\n 'remember_token' => Str::random(10)\n ]);\n DB::table('officials')->insert([\n 'email' => 'superuser@mail.com',\n 'password' => bcrypt('super123'),\n 'username' => 'superuser',\n 'role' => 'superuser',\n 'user_id' => 2,\n 'remember_token' => Str::random(10)\n ]);\n DB::table('officials')->insert([\n 'email' => 'writer@ .com',\n 'password' => bcrypt('writer123'),\n 'username' => 'writertester',\n 'role' => 'writer',\n 'user_id' => 3,\n 'remember_token' => Str::random(10)\n ]);\n \n /*Official::factory()->count(10)->create([\n 'role' => 'writer'\n ]);\n\n Official::factory()->count(10)->create([\n 'role' => 'admin'\n ]);*/\n\n \n }", "public function run()\n {\n $rooms = DB::table('rooms')->select(['id', 'title'])->get();\n\n foreach ($rooms as $room) {\n Rating::create([\n 'user_id' => rand(4, 5),\n 'room_id' => $room->id,\n 'title' => $room->title,\n 'rating' => rand(2, 5),\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n }\n }", "public function run()\n {\n\n // $this->call(UserSeeder::class);\n\n //DB::statement('SET FOREIGN_KEY_CHECKS = 0'); //disable forign key checks temporaliry fr truncateing the tables\n\n //first truncate all the tables before seedingthe data in db\n User::truncate();\n Category::truncate();\n Course::truncate();\n Topic::truncate();\n Enrollment::truncate();\n\n //use the db facade to truncate the pivot tables since they dont have models\n DB::table('category_course')->truncate();\n DB::table('course_topic')->truncate();\n\n ///prevent listening to events when running our db seed command\n User::flushEventListeners();\n Category::flushEventListeners();\n Course::flushEventListeners();\n Topic::flushEventListeners();\n Enrollment::flushEventListeners();\n\n\n //setting quntity for the entities to put in database\n $usersQuantity = 1000;\n $categoriesQuantity = 30;\n $topicsQuantity = 100;\n $coursesQuantity = 100;\n $enrollmentsQuantity = 200;\n\n factory(User::class, $usersQuantity)->create();\n\n factory(Category::class, $categoriesQuantity)->create();\n\n factory(Topic::class, $topicsQuantity)->create();\n\n //create courses and attach relationships to each of them\n factory(Course::class, $coursesQuantity)->create()->each(\n function ($course) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $topics = Topic::all()->random(mt_rand(1, 5))->pluck('id');\n\n $course->categories()->attach($categories); //attching categories\n $course->topics()->attach($topics); //attaching topics\n }\n );\n\n factory(Enrollment::class, $enrollmentsQuantity)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n DB::table('users')->insert([\n 'name' => 'Auguste',\n 'email' => 'abagdzeviciute@gmail.com',\n 'password' => Hash::make('123'),\n ]);\n DB::table('users')->insert([\n 'name' => 'liepa',\n 'email' => 'liepa@gmail.com',\n 'password' => Hash::make('123'),\n ]);\n\n // $title = ['Pirmas', 'Antras', 'Trecias', 'Ketvirtas', 'Penktas', 'Sestas', 'Septintas'];\n foreach(range(1, 100) as $_) {\n\n DB::table('reservoirs')->insert([\n 'title' => $faker->company, \n 'area' => rand(10, 50),\n 'photo' => rand(0, 2) ? $faker->imageUrl(200, 300) : null,\n 'about' => $faker->realText(300, 5)\n ]);\n }\n\n $live = ['Alex', 'Sara', 'Bette', 'Sugar', 'Blue', 'Cody', 'Magic'];\n foreach(range(1, 100) as $_) {\n\n DB::table('members')->insert([\n 'name' => $faker->firstName,\n 'surname' => $faker->lastName,\n 'live' => $live[rand(0, count($live) -1)],\n 'experience' => rand(1, 100000),\n 'registered' => rand(1, 100000),\n 'reservoir_id' => rand(1, 20) \n ]);\n }\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// Populate a list of possible universities\n\t\t$this->call('UniversitiesTableSeeder');\n\n\t\t// Populate a list of university domains\n\t\t$this->call('UniversityDomainsTableSeeder');\n\n\t\t// Populate a list of users\n\t\t$this->call('UsersTableSeeder');\n\n\t\t$this->call('GlobalListingsCategoriesTableSeeder');\n\n\t\t$this->call('ListingCategoriesTableSeeder');\n\n\t\t$this->call('ListingConditionsTableSeeder');\n\n\t\t$this->call('BuySellListingsTableSeeder');\n\t}", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(SpecialsTableSeeder::class);\n //MedicalCard::factory(10)->create();\n $user = User::factory(1)->create()->each(function ($user){\n Member::factory()->create([\n 'user_id'=>$user->id,\n 'id_card'=>null,\n 'id_spec'=>null,\n ]);\n });\n foreach ($user as $userWithoutRole){\n $userWithoutRole->assignRole('admin');\n }\n //Member::factory(10)->create();\n //Meet::factory(10)->create();\n //Recipe::factory(10)->create();\n //Appointment::factory(10)->create();\n //Time::factory(10)->create();\n }", "public function run()\n {\n DB::table('roles')->insert([\n 'name' => 'admin',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'author',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'subscriber',\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Anastasia Km',\n 'role_id' => 1,\n 'is_active' => 1,\n 'email' => 'a.karamichailidou@gmail.com',\n 'password' => bcrypt('123456'),\n ]);\n\n }", "public function run()\n {\n Role::create([\n 'id' => Role::BOSS,\n 'name' => 'Boss'\n ]);\n\n Role::create([\n 'id' => Role::EMPLOYEE,\n 'name' => 'Employee'\n ]);\n\n Role::create([\n 'id' => Role::APPLICANT,\n 'name' => 'Applicant'\n ]);\n\n Role::create([\n 'id' => Role::CUSTOMER,\n 'name' => 'Costumer'\n ]);\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n // DB::table('users')->create([\n // 'name' => 'Admin',\n // 'email' => 'notify2email@gmail.com',\n // 'password' => Hash::make('Admin'),\n // ]);\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@email2line.com',\n 'password' => Hash::make('Admin'),\n ]);\n\n // factory(App\\Group::class, 10)->create()->each(function($group) {\n // $group->mappings()->saveMany(\n // factory(App\\Mapping::class, rand(1,8))->make()\n // )->each(function($mapping) {\n // $mapping->logs()->saveMany(\n // factory(App\\Log::class, rand(1,30))->make()\n // );\n // });\n // });\n }", "public function run()\n {\n // Seeding 1st user with 2 project\n User::factory(1)\n ->hasProjects(2)\n ->create();\n\n // Seed issue statuses\n DB::table('issue_statuses')->insert([\n 'name' => 'Backlog'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'To Do'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'In Progress'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'Testing'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'Completed'\n ]);\n\n // Seeding 8 issues, project_id will be random\n Issue::factory(8)\n ->create();\n }", "public function run()\n\t{\n\t\t$user = factory(\\App\\User::class)->create();\n\t\t\n\t\t$rooms = factory( \\App\\Room::class, 15 )->create();\n\t\t\n\t\t$rooms->each( function( $room )\n\t\t{\n\t\t\t$room_count = rand( 1, $room->count );\n\t\t\twhile( $room_count > 0 )\n\t\t\t{\n\t\t\t\t$student = factory( \\App\\Student::class )->create();\n\t\t\t\t$room_student = factory( \\App\\Room_Student::class )->create( [\n\t\t\t\t\t'student_id' => $student->id,\n\t\t\t\t\t'room_id' => $room->id,\n\t\t\t\t] );\n\t\t\t\t$payment = factory( \\App\\Payment::class )->create( [\n\t\t\t\t\t'value' => $room->price,\n\t\t\t\t\t'room_student_id' => $room_student->id,\n\t\t\t\t] );\n\t\t\t\t\n\t\t\t\tif( rand( 1, 100 ) < 20 )\n\t\t\t\t{\n\t\t\t\t\t$alert = factory( \\App\\Alert::class )->create( [\n\t\t\t\t\t\t'room_id' => $room->id,\n\t\t\t\t\t\t'student_id' => $student->id,\n\t\t\t\t\t] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$room_count--;\n\t\t\t}\n\t\t} );\n\t}", "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n\n //Model::unguard();\n //$this->call(UsersTableSeeder::class);\n\n //factory(App\\UserPhone::class, 50)->create();\n //factory(Modules\\Admin\\Entities\\Issue::class, 50)->create();\n\n /*DB::table('admins')->insert([\n 'name' => 'admin',\n 'email' => 'adm@jtsoft.com.br',\n 'password' => Hash::make('123457'),\n ]);*/\n /*DB::table('admins')->insert([\n 'name' => 'Felipe',\n 'email' => 'felipe_inu@hotmail.com',\n 'password' => Hash::make('123457'),\n ]);*/\n //Model::reguard();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Address::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 < 4; $i++) {\n \n $main = $i == 0 ? 1 : 0;\n Address::create([\n 'user_id' => 1,\n 'address' => $faker->address,\n 'code' => $faker->postcode,\n 'city' => $faker->city,\n 'phone' => $faker->phoneNumber,\n 'main' => $main\n ]);\n }\n }", "public function run()\n {\n //User::factory(1)->create();\n //Category::factory(5)->create();\n\n //Tag::factory(10)->create();\n\n $this->call([\n //PostsTableSeeder::class,\n AbilitiesTableSeeder::class,\n ]);\n }", "public function run()\n {\n //Seed some random titles like Doctor, Chef, Technician, System Analyst\n DB::table('titles')->insert([\n 'name' => 'Human Resources Manager',\n 'salary' => '600000',\n 'department_id' => 1,\n 'user_id' => 1,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('titles')->insert([\n 'name' => 'Senior Accountant',\n 'salary' => '750000',\n 'department_id' => 1,\n 'user_id' => 1,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('titles')->insert([\n 'name' => 'Field Officer',\n 'salary' => '400000',\n 'department_id' => 2,\n 'user_id' => 2,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $journals = factory('App\\Journal', 50)->create();\n $journals->each(function ($journal) {\n factory('App\\Entry', 10)->create(['journal_id' => $journal->id]);\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('objects')->insert([\n 'name' => 'name1',\n 'description' => 'description1',\n 'type' => 'type1',\n ]);\n DB::table('objects')->insert([\n 'name' => 'name2',\n 'description' => 'description2',\n 'type' => 'type2',\n ]);\n DB::table('objects')->insert([\n 'name' => 'name3',\n 'description' => 'description3',\n 'type' => 'type3',\n ]);\n\n DB::table('relations')->insert([\n 'from' => 1,\n 'to' => 2,\n ]);\n DB::table('relations')->insert([\n 'from' => 1,\n 'to' => 3,\n ]);\n DB::table('relations')->insert([\n 'from' => 2,\n 'to' => 3,\n ]);\n\n }", "public function run()\n {\n \t$this->seedPresencesTable();\n \t#$this->seedFamillesTable();\n \t#$this->seedReponsesTable();\n }", "public function run()\n {\n Agency::factory(5)->create();\n City::factory(50)->create();\n $admin = User::factory()->create([\n 'first_name' => 'Admin',\n 'last_name' => 'Admin',\n 'email' => 'admin@admin.com',\n 'password' => bcrypt('admin123'),\n 'role' => 'admin',\n 'agency_id' => null\n ]);\n\n $user = User::factory()->create([\n 'first_name' => 'Contact',\n 'last_name' => 'Contact',\n 'email' => 'contact@contact.com',\n 'password' => bcrypt('contact123'),\n 'role' => 'contact'\n ]);\n\n for($i=1; $i<=60; $i++) {\n $users = User::factory()->create(\n [\n 'role' => 'contact',\n 'agency_id' => Agency::inRandomOrder()->first()->id\n ]\n );\n }\n\n Profession::factory(40)->create();\n\n $professions = Profession::all();\n\n User::where('role','=','contact')->each(function ($user) use ($professions){\n $user->professions()->attach(\n $professions->random(rand(1,3))->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n \tEloquent::unguard();\n $this->call('EventsTableSeeder');\n $this->call('UsersTableSeeder');\n $this->call('MessagesTableSeeder');\n $this->call('RsvpTableSeeder');\n $this->call('AdminsTableSeeder');\n $this->call('VideosTableSeeder');\n $this->call('CommentsTableSeeder');\n factory(App\\User::class, 100)->create();\n factory(App\\Rsvp::class, 300)->create();\n }", "public function run()\n {\n //\n \\Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n \\DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n App\\User::create([\n 'name'=>'Super Admin',\n 'email'=> 'superadmin@aflamk.com',\n 'password'=>Hash::make('admin'),\n 'type'=>'super_admin',\n ]);\n App\\User::create([\n 'name'=>'admin',\n 'email'=> 'admin@aflamk.com',\n 'password'=>Hash::make('admin'),\n 'type'=>'admin',\n ]);\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\t\tDB::table('users')->delete();\n\n\t\t$faker = \\Faker\\Factory::create('es_AR');\n\n\t\tforeach(range(0, 10) as $index)\n\t\t{\n\t\t\tUser::create([\n\t\t\t\t'nombres' => $faker->firstName,\n\t\t\t\t'apellidos' => $faker->lastName,\n\t\t\t\t'direccion' => $faker->address,\n\t\t\t\t'telefono' => $faker->phoneNumber,\n\t\t\t\t'celular' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 12345,\n\t\t\t]);\n\n\t\t\tProduct::create([\n\t\t\t\t'codigo' => $faker->uuid,\n\t\t\t\t'marca' => $faker->company,\n\t\t\t\t'modelo' => $faker->md5,\n\t\t\t\t'cantidad' => $faker->numberBetween(1, 100),\n\t\t\t]);\n\t\t}\n\n\t\tRole::create([\n\t\t\t'name' => 'Administrator',\n\t\t\t'detail' => 'Administrador de la tienda'\n\t\t]);\n\t\tRole::create([\n\t\t\t'name' => 'Seller',\n\t\t\t'detail' => 'Vendedor de la tienda'\n\t\t]);\n\t\tRole::create([\n\t\t\t'name' => 'Client',\n\t\t\t'detail' => 'Cliente de la tienda'\n\t\t]);\n\t}", "public function run()\n {\n //$this->call(UserSeeder::class);\n\n DB::table('users')->insert([\n\n \t'name' => \"Sabbir\",\n \t'email' => \"sabbir@gmail.com\",\n \t'password'=> Hash::make('12345'),\n \t'role' => \"admin\"\n\n ]);\n\n DB::table('users')->insert([\n\n \t'name' => \"Sabbir\",\n \t'email' => \"sabbir@email.com\",\n \t'password'=> Hash::make('12345'),\n \t'role' => \"student\"\n\n ]);\n\n DB::table('users')->insert([\n\n \t'name' => \"Ahmed\",\n \t'email' => \"ahmed@gmail.com\",\n \t'password'=> Hash::make('12345'),\n \t'role' => \"student\"\n\n ]);\n\n DB::table('users')->insert([\n\n 'name' => \"Karim\",\n 'email' => \"karim@gmail.com\",\n 'password'=> Hash::make('12345'),\n 'role' => \"student\"\n\n ]);\n \n }", "public function run()\n {\n\t $Categories=['All in Real Estate',\n\t\t 'Apartments & Condos for Rent',\n\t\t\t\t\t 'House Rental',\n\t\t\t\t\t'Room Rentals & Roommates',\n\t\t\t\t\t'Short Term Rentals',\n\t\t\t\t\t'Commercial & Office Space for Rent',\n\t\t\t\t\t'Storage & Parking for Rent',\n\t\t\t\t\t'Houses for Sale',\n\t\t\t\t\t'Condos for Sale',\n\t\t\t\t\t'Land for Sale',\n\t\t\t\t\t'Real Estate Services',\n\t\t\t\t\t'MLS:registered: Listings & Home Evaluation | Listing.ca'];\n\t foreach($Categories as $value){\n\t\t\t\t\t DB::table('categorylistings')->insert(['Name' => $value,]);\n\t\t\t\t\t }\n\n\t$Categories=['City of Toronto', 'Markham / York Region', 'Oshawa / Durham Region', 'Mississauga / Peel Region', 'Oakville / Halton Region'];\n\t\n\tforeach($Categories as $value){\n\t DB::table('locationlistings')->insert(['name' => $value]);\n\t}\t\n\t\n\t\tfactory(App\\User::class)->create([\n \"name\" => \"Admin\",\n \"email\" => \"admin@admin.com\",\n\t\t\t\t\t\"role\" => 1,\n \"password\" => bcrypt(env('PWD', '123456'))]\n );\n \t// $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n //\n\n Role::create([\n 'name' => 'Admin',\n ]);\n\n\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@redcore.com',\n 'password' => Hash::make('Asd@123123'),\n ]);\n\n\n RoleUser::create([\n 'role_id' => 1,\n 'user_id' => 1,\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(NewsTableSeeder::class);\n $this->call(AuthorsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n\n foreach (array_fill(0,49, 1) as $value) {\n DB::table('categories_news')->insert([\n 'categories_id' => rand(1, 10),\n 'news_id' => rand(1, 50)\n ]);\n DB::table('news_tags')->insert([\n 'news_id' => rand(1, 50),\n 'tags_id' => rand(1, 50)\n ]);\n }\n }", "public function run()\n {\n factory(App\\Race::class, 5)->create()->each(function(App\\Race $race) {\n $race->roles()->saveMany(factory(App\\RaceRole::class, 3)->make());\n });\n\n foreach(range(0,20) as $int)\n {\n $raceRole = App\\RaceRole::inRandomOrder()->first();\n $character = App\\Character::inRandomOrder()->first();\n\n $character->raceRoles()->save($raceRole);\n }\n }", "public function run()\n {\n DB::table('room_statuses')->insert([\n ['room_status_name' => 'Vacant'],\n ['room_status_name' => 'Occupied']\n \n ]);}", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\District::class, 1000)->create();\n\n factory(App\\User::class, 10)->create()->each(function($u){\n $u->offers()\n ->saveMany(\n factory(App\\Offer::class, 5 )->make()\n );\n });\n\n factory(App\\RealEstate::class, 50)->create();\n\n }", "public function run()\n {\n DB::table('states')->insert([\n 'name' => 'Puebla'\n ]);\n DB::table('states')->insert([\n 'name' => 'Jalisco'\n ]);\n DB::table('states')->insert([\n 'name' => 'Nuevo León'\n ]);\n DB::table('states')->insert([\n 'name' => 'Guanajuato'\n ]);\n DB::table('states')->insert([\n 'name' => 'Texas'\n ]);\n\n //Seeds para tablas cruce\n DB::table('location_has_state')->insert([\n 'location_id' => 1,\n 'state_id' => 1,\n ]);\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n\n factory(\\App\\User::class)->create(['email' => 'vittorio@cierra.de']);\n\n $series_collection = factory(\\App\\Series::class, 4)->create();\n foreach ($series_collection as $series) {\n factory(\\App\\Lesson::class, 8)->create(['series_id' => $series->id]);\n }\n }", "public function run()\n {\n $faker = Faker::create();\n\n factory(App\\Lernzentrum::class, 10)->create()->each(function($lernzentrum) use ($faker)\n {\n $lernzentrum->save();\n\n $lernzentrum->assistants()->sync(\n [\n $faker->numberBetween(0, 100),\n $faker->numberBetween(0, 100),\n $faker->numberBetween(0, 100)\n ]\n );\n });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n\n //Liga::factory()->has(Equipo::factory()->count(8))->create();\n\n Liga::factory()->has(Equipo::factory()->has(Jugador::factory()->count(12))->count(8))->create();\n Liga::factory()->has(Equipo::factory()->has(Jugador::factory()->count(12))->count(8))->create();\n\n }" ]
[ "0.7751952", "0.76578504", "0.76396805", "0.7590245", "0.75695586", "0.7552486", "0.7471805", "0.7462659", "0.744964", "0.7414845", "0.7411177", "0.73681706", "0.7361211", "0.7354322", "0.734048", "0.7307039", "0.72855014", "0.7277097", "0.7237694", "0.7229277", "0.7227155", "0.719348", "0.7189521", "0.7189375", "0.71678853", "0.71386015", "0.7123963", "0.712115", "0.7107736", "0.7105434", "0.71039444", "0.71018976", "0.70759684", "0.7061634", "0.7058944", "0.7053491", "0.70521003", "0.70505154", "0.7050239", "0.704036", "0.703468", "0.70326114", "0.70309144", "0.7021956", "0.70114434", "0.70113933", "0.70099986", "0.7009581", "0.70089316", "0.7003641", "0.6997166", "0.6993972", "0.6993459", "0.69918424", "0.6991822", "0.6989352", "0.69867903", "0.6982027", "0.69795185", "0.69774145", "0.6963099", "0.69556534", "0.6954774", "0.6952079", "0.694285", "0.6938523", "0.693683", "0.6930644", "0.692995", "0.6928652", "0.6928437", "0.692812", "0.69222635", "0.6921515", "0.69162107", "0.6913106", "0.6912353", "0.69123393", "0.6911861", "0.6911507", "0.6910915", "0.69089323", "0.69057095", "0.6905242", "0.69021446", "0.6901444", "0.6899055", "0.689762", "0.68946755", "0.6893948", "0.68906367", "0.6887066", "0.6886279", "0.68840635", "0.6880232", "0.68792474", "0.6878658", "0.687436", "0.68735605", "0.68723464" ]
0.7937174
0
Creates a new PurInfo model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый объект PurInfo. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new PurInfo(); $rate = $this->actionExchangeRate(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->pur_info_id]); } return $this->render('create', [ 'model' => $model, 'exchange_rate' => $rate ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new PurInfo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save(false)) {\n return $this->redirect(['view', 'id' => $model->pur_info_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Information();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\r\n $model = new Reginfo;\r\n // Uncomment the following line if AJAX validation is needed\r\n // $this->performAjaxValidation($model);\r\n\r\n if (isset($_POST['Reginfo'])) {\r\n $model->attributes = $_POST['Reginfo'];\r\n if ($model->save())\r\n $this->redirect(array('view', 'id' => $model->id));\r\n }\r\n\r\n $this->render('create', array(\r\n 'model' => $model,\r\n ));\r\n }", "public function actionCreate()\n {\n $model = new Pengampu();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) { \n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new OaGoodsinfo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->pid]);\n } else {\n\n return $this->render('create', [\n 'model' => $model,\n\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Cvpersonal();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Purchase();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\t$this->changeDBPuid();\n $model = new Tracking();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new Creativeparkbaseinfo;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Creativeparkbaseinfo']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Creativeparkbaseinfo'];\n $this->formatAttributes($model);\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->cp_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Permohonan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->permohonan_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new SuratMasuk();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n\n }", "public function actionCreate()\n {\n $model = new Purchases();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $this->layout = static::FORM_LAYOUT;\n $model = new $this->MainModel;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $this->afterCreate($model);\n if ($this->hasView) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->redirect(['index']);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Pantau();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => (string)$model->_id]);\n echo Json::encode([\n 'status'=>'success',\n 'message'=>'Data berhasil disimpan.',\n 'redirect'=>Yii::$app->urlManager->createUrl('pantau/view/'.(string)$model->_id),\n ]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Maestroclipro();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n $model = new Unsur();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->IdUnsur]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new FirmInfo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->FIRM_ID]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new $this->modelClass;\n\n if ($model->load($this->_request->post()) && $model->save()) {\n return $this->redirect([$this->viewView, 'id' => $model->$this->primaryKey]);\n } else {\n return $this->render($this->createView, [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new Perjalanan;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Perjalanan']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Perjalanan'];\n\t\t\t$model->STATUS = \"BARU\";\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('create2','id'=>$model->ID_PERJALANAN));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n\t{\n\t\t$model=new Presupuesto;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Presupuesto']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Presupuesto'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Product();\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Product();\n $model->created_by = Yii::$app->getUser()->getId();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n //$model = new DetalleMatricula();\n\t\t/*\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }*/\n\t\treturn $this->redirect(Yii::$app->request->referrer);\n }", "public function actionCreate() {\n $this->pageTitle = Yii::app()->name . ' - Add Product';\n\n $model = new ProductDetails;\n $category_name = '';\n $supplier_name = '';\n // Uncomment the following line if AJAX validation is needed\n $this->performAjaxValidation($model);\n\n if (!Yii::app()->user->isSuperAdmin) {\n $store_id = Yii::app()->user->storeId;\n } else {\n $store_id = 1;\n }\n\n if (isset($_POST['ProductDetails'])) {\n $category_name = Yii::app()->request->getPost('category_name');\n $supplier_name = Yii::app()->request->getPost('supplier_name');\n\n $model->attributes = $_POST['ProductDetails'];\n\n $model->store_id = $store_id;\n\n if (empty($category_name)) {\n $model->category_id = '';\n }\n\n if (empty($supplier_name)) {\n $model->supplier_id = '';\n }\n\n $model->create_date = date('Y-m-d H:i:s', Settings::getBdLocalTime());\n\n if ($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('create', array(\n 'model' => $model,\n 'category_name' => $category_name,\n 'supplier_name' => $supplier_name,\n ));\n }", "public function actionCreate()\n {\n $model = new Visitors();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n $model = Visitors::findOne(['id' => $model->id]);\n //发送通知\n $this->sendNotice($model);\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new PrepaidReload;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \\Yii::$app->session->setFlash('success', 'Record created.');\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Product();\n $model -> is_visible = 1;\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['index']);\n return $this->redirect(['view','id'=>$model->id]);\n }\n\n //print_r($model->errors);\n \n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Huxuan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Huxuan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Informerespuestas();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idiglesia]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Apartment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n /*return $this->render('create', [\n 'model' => $model,\n ]);*/\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new SupportData();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\t\t\t\t\t\n return $this->redirect(['view', 'id' => $model->sData_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model = new Product();\n\t\t\n\t\tif ($model->load(Yii::$app->request->post())) {\n\t\t\t$transaction = Yii::$app->db->beginTransaction();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$model->save();\n\t\t\t\t$transaction->commit();\n\t\t\t\t\n\t\t\t\treturn $this->redirect(['index']);\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$transaction->rollBack();\n\t\t\t\t\n\t\t\t\techo '<pre>' . print_r($e, true);\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->render('create', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "public function actionCreate()\n {\n $model = new ChargeProduct();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Product();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $session = Yii::$app->session;\n $session->setFlash('msg','บันทึกรายการเรียบร้อย');\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n if (Yii::$app->user->isGuest) {\n return $this->goHome();\n }else{\n $model = new TblDealer();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Record();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $modelName = $this->getModel();\n\t\t$model = new $modelName;\n\t\t$model->dt_create = date('c');\n\t\t$model->dt_update = date('c');\n\t\t$model->id_user_create = 1;\n\t\t$model->id_user_update = 1;\n\t\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\t \n\t\t\t\t\treturn $this->redirect(['index']);\n\t\t\t\n } else {\n \n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Data();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->gid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Shop();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n $model = new MProduk();\n if ($model->harga_beli == 0) {\n $harga_beli = \"\";\n }\n\n if ($model->harga_jual == 0) {\n $harga_jual = \"\";\n }\n return view('master.produk.create', compact(['model','harga_beli','harga_jual']));\n }", "public function actionCreate()\n {\n $model = new SuratCuti();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new PenangInvoice();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model = new Dmpaper;\n\t\t$model->save();\n\n\t\treturn $this->redirect(['update', 'id' => $model->id]);\n\n\t\t/*if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}*/\n\t}", "public function actionCreate()\n {\n $model = new Solicitud();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id_pext' => $model->id_pext, 'tipo_solicitud' => $model->tipo_solicitud, 'fecha_solicitud' => $model->fecha_solicitud]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\r\n {\r\n $model = new Prospects();\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 }", "public function actionCreate() {\n $model = new Rent();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Divipola();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new TallerImp();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new WishShopDetails();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new XaPhuong();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n $model=new curso;\n if(isset($_POST['curso'])) {\n $model->attributes=$_POST['curso'];\n if($model->save())\n $this->redirect(array('view','id'=>$model->id_curso));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }", "public function actionCreate()\n\t{\n\t\t$model=new Ingresopersonal;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Ingresopersonal']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Ingresopersonal'];\n\t\t\t$model->estado=\"Confirmacion\";\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('site/index'));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Recepcion();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n\t\t$model = new Customers();\n\t\t$location = new Location();\n\t\techo 123;die;\n\t\tif ($model->load(Yii::$app->request->post())) {\n\t\t\t$model->create_date = date(\"Y-m-d H:i:s\");\n\t\t\t$model->update_date = date(\"Y-m-d H:i:s\");\n\t\t\t$model->save();\n\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t}\n\n\t\treturn $this->render('create', [\n\t\t\t'model' => $model,\n\t\t\t'location'=> $location,\n\t\t]);\n\t}", "public function actionCreate()\n {\n $model = new PersetujuanTindak();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->tpt_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new ProgramNasional();\n\n $date=date('Y-m-d h:i:s');\n $model->created_at=$date;\n $model->updated_at=$date;\n $model->username=Yii::$app->user->identity->username;\n $model->tahun=date('Y')+1;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'tahun' => $model->tahun, 'id_prioritas'=>$model->id_prioritas, 'id_nawacita'=>$model->id_nawacita, 'id_urusan'=>$model->id_urusan, 'id_misi'=>$model->id_misi, 'urusan'=>$model->urusan, 'bidang'=>$model->bidang, 'id_program'=>$model->id_program]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Provider();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n\t{\n\n\t\tif(isset($_POST['btnretour']))\n\t\t{ // annulation de l'action\n\t\t\t$this->redirect('site/index');\n\t\t}\n\n\t\t$model=new Entreprise;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Entreprise']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Entreprise'];\n\t\t\tif($model->save())\n\t\t\t\tYii::app()->user->setFlash('success_create_entreprise', \"<p style = color:blue;>Votre profil à bien été créé !</p>\");\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_entreprise));\n\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n \treturn view('model.create');\n }", "public function actionCreate()\n {\n $model = new Apartment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$this->_model=new Profile;\n\n\t\tif(isset($_POST['Profile'])){\n\t\t\t$this->_model->attributes=$_POST['Profile'];\n\t\t\tif($this->_model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$this->_model->user_id));\n\t\t}\n\n\t\t//$this->debug($this->_model);\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$this->_model,\n\t\t));\n\n\t}", "public function actionCreate()\n {\n $model = new Tipoinstitucion();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new LPegawai;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['LPegawai']))\n\t\t{\n\t\t\t$model->attributes=$_POST['LPegawai'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_pegawai));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $this->view->params['no_wrapp'] = true;\n \n $model = new Invoice();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Payment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Company();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new HrNotice();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Request();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->delivery_status = '2';\n $model->user_id = Yii::$app->user->getId();\n $model->save();\n return $this->redirect(['view', 'id' => $model->tracking_number]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCrear()\n {\n $model = new AuthItem();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['detalle', 'id' => $model->name]);\n } else {\n return $this->render('crear', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new Invoice();\n $model->loadDefaultValues();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', Yii::t('general', 'The creation was successful'));\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Aulasemestral();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['add-dia', 'id_aulasemestral' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n //\n return view('purchase.vendinfos.create');\n }", "public function actionCreate()\n {\n $model = new VehicleManagement();\n $model->aliyeingiza = Yii::$app->user->identity->username;\n $model->muda = date('Y-m-d H:i:s');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Transaksi();\n\n if ($model->load(Yii::$app->request->post())) {\n\t\t\t$model->genKode();\n\t\t\t$model->TglTrx = date('Y-m-d H:i:s');\n\t\t\t$model->Status = 1;\n\t\t\t$model->IdUser = Yii::$app->user->identity->id ;\n\t\t\tif($model->save()){\n\t\t\t\treturn $this->redirect(['view', 'id' => $model->Id]);\n\t\t\t}else{\n\t\t\t\treturn $this->render('create', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t]);\n\t\t\t}\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new AccionCentralizada();\n $model->usuario_creacion=Yii::$app->user->identity->id;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new PaySlip();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->pay_slip_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $us = Yii::$app->user->identity;\n if ($us->rol !== 'C') {\n return $this->goHome();\n }\n $model = new Tutores();\n\n\n\n if ($model->load(Yii::$app->request->post())) {\n $model->colegio_id = $us->colegio_id;\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n\t{\n\t\t// $model=new PaymentDetail;\n\t\t// $modelProj = new Project;\n\n\n\t\t// if(isset($_POST['PaymentDetail']))\n\t\t// {\n\t\t// \t$model->attributes=$_POST['PaymentDetail'];\n\t\t// \tif($model->save())\n\t\t// \t\t$this->redirect(array('view','id'=>$model->id));\n\t\t// }\n\n\t\t// $this->render('create',array(\n\t\t// \t'model'=>$model,'modelProj'=>$modelProj,'pay_no'=>2\n\t\t// ));\n\t\t$model=new PaymentDetail;\n\t\t//find last pay_no\n\t\t$payment = Yii::app()->db->createCommand()\n\t\t ->select('MAX(pay_no) as max_pay_no')\n\t\t ->from('payment_detail')\n\t\t ->where(\"vc_id=\".$_POST['id'])\n\t\t ->queryAll();\n\t\t$model->vc_id = $_POST['id'];\n\t\t$model->pay_no = $payment[0]['max_pay_no']+1;\n\t\t$model->form_type = $_POST['form_type'];\n\t\t$model->date_create = date(\"Y-m-d\");\n\n\t\t$model->save();\n\n\t\techo $model->pay_no;\n\n\t\t//$this->exportBOQ($model->pay_no,$model->vc_id,$model->form_type);\n\n\n\t}", "public function actionCreate()\n {\n $model = new Customers();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new voucher();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $modelClass = $this->modelClass;\n $model = new $modelClass();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'treeArray' => $this->getTreeArray()\n ]);\n }\n }", "public function create()\n {\n //dd(TreatyInfoCat::all());\n //redirecting\n return view('xsim.treatyinfo.create');\n }", "public function actionCreate() {\n $model = new $this->modelName;\n\n $this->performAjaxValidation($model);\n\n// print_r($_POST);\n// die();\n if (isset($_POST[$this->modelName])) {\n $model->attributes = $_POST[$this->modelName];\n if ($model->save()) {\n $this->redirect(array('update', 'id' => $model->id));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function actionCreate()\n {\n\t\t$this->layout='main-admin';\n $model = new ProductDeals();\n\t\t$user_id = \\Yii::$app->util->loggedinUserId();\n\n if ($model->load(Yii::$app->request->post()) ) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(isset($_POST['select']))\n\t\t\t{\n\t\t\t\t$pro_id = $_POST['select'];\n\t\t\t\t$count=0;\n\t\t\t\t$model2=$model;\n\t\t\t\tforeach($pro_id as $pro)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t $model->product_id= $pro;\n\t\t\t\t $detail = Product::find()->where(['id'=>$pro])->one();\n\t\t\t\t $model->imi= $detail->imei;\n\t\t\t\t $model->price= $detail->price;\n\t\t\t\t \n\t\t\t\t $model->status=1;\n\t\t\t\t $model->created_at=date('Y-m-d');\n\t\t\t\t $model->created_by=$user_id;\n\t\t\t\t \n\t\t\t\t $model->shop_name=$model2->shop_name;\n\t\t\t\t $model->person_name=$model2->person_name;\n\t\t\t\t $model->contact_no=$model2->contact_no;\n\t\t\t\t \n\t\t\t\t\tif($model->save())\n\t\t\t\t\t{\n\t\t\t\t\t\t \\Yii::$app->session->setFlash('success', Yii::t('app',\"Deal Confirmed successfully!\"));\n\t\t\t\t\t\t return $this->redirect(['/netcash-deals/temp-deals']);\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tprint_r($model->getErrors());\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Checksignup();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new StatusKegiatanPth();\n $model->user_id=Yii::$app->user->identity->id;\n $model->status_penyaluran='belum';\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n\t\t$model = new Rol();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect('index');\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n //\n return view('cooperative/cooperative_info.create');\n }", "public function actionCreate()\n\t{\n\t\t$model=new Prestamo;\n\t\t//$ejemplar = Ejemplares::model()->with('idMaterial')->findAll();\n\t\t$modelEjemplar = new Ejemplares;\n\t\t$materiales = new Materiales;\n\t\t$tMaterial = new TipoMaterial;\n\t\t$modelDatos = new Datos;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Prestamo']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Prestamo'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'modelEjemplar'=>$modelEjemplar,\n\t\t\t'materiales' => $materiales,\n\t\t\t'tMaterial' => $tMaterial,\n\t\t\t'modelDatos' => $modelDatos,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new OrderBasic();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Minerhistory();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new FormComReport();\n\n if ($model->load(Yii::$app->request->post()) && $model->save(false)) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Credintials();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Customers();\n\n if ($model->load(Yii::$app->request->post())) {\n if(!(Yii::$app->user->can('admin'))){\n $model->user_id = Yii::$app->user->id;\n }\n $model->save();\n return $this->redirect(['view', 'id' => $model->customer_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'upload' => false,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new CPartner;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect('index');\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new SystemRecord();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Contacto();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id, 'app_idApp' => $model->app_idApp]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'app_idApp'=>$model->app_idApp\n ]);\n }", "public function actionCreate()\n {\n $model = new Customers();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->CustomerId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\r\n\t{\r\n\t\t$model=new Contrato;\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t //$this->performAjaxValidation($model);\r\n\r\n//\t\tif(isset($_POST['Contrato']))\r\n//\t\t{\r\n// \r\n// \r\n//\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}" ]
[ "0.87152845", "0.7616404", "0.7306925", "0.7265437", "0.7259194", "0.72545695", "0.72312564", "0.71812534", "0.7143593", "0.71284974", "0.709244", "0.70707136", "0.7057178", "0.70341665", "0.70182973", "0.70008975", "0.6971517", "0.6963006", "0.6946495", "0.6905846", "0.688182", "0.6880264", "0.6865102", "0.68520325", "0.68396294", "0.6807935", "0.6803813", "0.67826116", "0.67826116", "0.6778899", "0.6776099", "0.67612", "0.6761116", "0.6748974", "0.6747758", "0.6744774", "0.6744393", "0.67382944", "0.67362946", "0.67338526", "0.6731768", "0.67248225", "0.67189497", "0.67163825", "0.6715274", "0.6705018", "0.66895854", "0.6689248", "0.6687657", "0.66841197", "0.6682431", "0.66787344", "0.66713226", "0.66712666", "0.6669448", "0.66677827", "0.6664013", "0.66522986", "0.6649805", "0.66469514", "0.66401964", "0.6628187", "0.66251373", "0.6620583", "0.66155255", "0.6615024", "0.6610126", "0.66047305", "0.6602841", "0.66024685", "0.65945196", "0.6592407", "0.6582891", "0.6579234", "0.6573297", "0.6573226", "0.6571733", "0.6571361", "0.6571074", "0.65586233", "0.6556506", "0.65523934", "0.65523857", "0.6542898", "0.6541968", "0.6539307", "0.6528927", "0.6523641", "0.65224147", "0.6520105", "0.65160793", "0.65142", "0.6513977", "0.6508539", "0.64941645", "0.64927375", "0.64924014", "0.6489275", "0.6488211", "0.64851356" ]
0.8068425
1
Get the URL generator instance.
Получите экземпляр генератора URL.
public function getUrlGenerator() { return $this->generator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getUrlGenerator(): UrlGeneratorInterface\n {\n return app('mediable.url.factory')->create($this);\n }", "public function getUrlGenerator()\n {\n return $this->url;\n }", "public function getGenerator(): UrlGeneratorInterface\n {\n if (isset($this->generator)) {\n return $this->generator;\n }\n\n if (null === $this->options['cache_dir']) {\n $routes = $this->getRouteCollection();\n $compiled = is_a($this->options['generator_class'], CompiledUrlGenerator::class, true);\n if ($compiled) {\n $generatorDumper = new CompiledUrlGeneratorDumper($routes);\n $routes = array_merge($generatorDumper->getCompiledRoutes(), $generatorDumper->getCompiledAliases());\n }\n $this->generator = new $this->options['generator_class']($routes, $this->context, $this->logger, $this->defaultLocale);\n } else {\n $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/url_generating_routes.php',\n function (ConfigCacheInterface $cache) {\n $dumper = $this->getGeneratorDumperInstance();\n\n $cache->write($dumper->dump(), $this->getRouteCollection()->getResources());\n }\n );\n\n $this->generator = new $this->options['generator_class'](self::getCompiledRoutes($cache->getPath()), $this->context, $this->logger, $this->defaultLocale);\n }\n\n if ($this->generator instanceof ConfigurableRequirementsInterface) {\n $this->generator->setStrictRequirements($this->options['strict_requirements']);\n }\n\n return $this->generator;\n }", "public static function getUrlGenerator() {\n\t\treturn \\OC::$server->getUrlGenerator();\n\t}", "public function getUrlGenerator()\n {\n return $this\n ->getContainer()\n ->get('router');\n }", "public function getUrl(): ?UrlGenerator;", "public function getUrlGenerator()\n {\n if (!$this->started) {\n throw new LogicException('Puli was not started');\n }\n\n if (!$this->urlGenerator && $this->rootDir) {\n $urlFormats = array();\n foreach ($this->getServerManager()->getServers() as $server) {\n $urlFormats[$server->getName()] = $server->getUrlFormat();\n }\n\n $this->urlGenerator = new DiscoveryUrlGenerator($this->getDiscovery(), $urlFormats);\n }\n\n return $this->urlGenerator;\n }", "private function createUrlGenerator(): UrlGeneratorInterface\n {\n $generator = $this->createMock(UrlGeneratorInterface::class);\n // Create a dummy URL that contains relevant provided data.\n $generateUrl = function ($route, array $attributes) {\n $url = '/'.$route.'?'.http_build_query($attributes);\n\n return $url;\n };\n $generator->expects($this->any())->method('generate')->willReturnCallback($generateUrl);\n\n return $generator;\n }", "static function Url()\n {\n return new self('url');\n }", "public static function getInstance()\n {\n if (HtmlGenerator::$s_htmlGenerator === NULL)\n {\n HtmlGenerator::$s_htmlGenerator = new HtmlGenerator();\n }\n\n return HtmlGenerator::$s_htmlGenerator;\n }", "public function getDefaultUrl(): ?UrlGenerator;", "public function getGenerator() {\n\t\tif (! isset($this->generator)) {\n\t\t\t$this->generator = new Generator($this);\n\t\t}\n\t\treturn $this->generator;\n\t}", "private function getGenerator(): Generator\n {\n return ($this->generator)($this->callable, $this->arguments);\n }", "public function getGenerator()\n {\n return $this->generator;\n }", "public function getGenerator() {\n return $this->generator;\n }", "public static function get_instance() {\n\t\tif ( static::$instance == null ) {\n\t\t\tstatic::$instance = new UrlRewriter();\n\t\t}\n\t\treturn static::$instance;\n\t}", "public function getRouteGenerator()\n {\n return $this->routeGenerator;\n }", "public static function CreateFromCurrentURL()\n {\n $url = new URLObject(\\POPS\\Utils\\URL::GetUrl());\n return $url;\n }", "public static function getGenerator()\n {\n if (static::$generator === null) {\n static::$generator = new Generator();\n }\n return static::$generator;\n }", "protected function getUrlBuilder()\n {\n return $this->_urlBuilder;\n }", "public function __construct(UrlGenerator $generator)\n {\n $this->generator = $generator;\n }", "public function generate(string $uri): Url;", "public function getUriRetriever()\n {\n if (is_null($this->uriRetriever)) {\n $this->setUriRetriever(new FileGetContents());\n }\n\n return $this->uriRetriever;\n }", "public static function getRequest()\n {\n /** @var \\Illuminate\\Routing\\UrlGenerator $instance */\n return $instance->getRequest();\n }", "public function getUrlProcessor() {\n return $this->urlProcessor;\n }", "public function getUrlTranslator()\n\t{\n\t\treturn new UrlTranslator($this->config->getWebBaseUrl());\n\t}", "public function getUrl ()\n {\n $this->lazyLoad();\n\n return $this->url;\n }", "public function get() {\n return new $this->instance_name(\n $this->client, $this->uri\n );\n }", "public static function getGenerator()\r\n\t{\r\n\t\t$opts = func_get_args();\r\n\r\n\t\tif( isset( $opts[0] ) )\r\n\t\t{\r\n\t\t\t$type = array_shift( $opts );\r\n\t\t\t$goOpts = true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$type = self::DEFAULT_GENERATOR;\r\n\t\t\t$goOpts = false;\r\n\t\t}\r\n\t\t\r\n\t\t# Verify iGenerator is valid\r\n\t\tif( $type !== self::DEFAULT_GENERATOR && !preg_match( '/[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/', $type ) )\r\n\t\t\tthrow new Terra_HeightMap_InvalidGenerator_Exception();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$type = 'Terra_HeightMapGenerator_'.$type;\r\n\r\n\t\t\t$params = $goOpts ? $opts : NULL;\r\n\r\n\t\t\t$generator = call_user_func_array( array( new ReflectionClass( $type ), 'newInstance' ), $params );\r\n\t\t}\r\n\t\tcatch( Utilities_Autoload_Exception $e )\r\n\t\t{\r\n\t\t\tthrow new Terra_HeightMap_InvalidGenerator_Exception();\r\n\t\t}\r\n\t\t\r\n\t\tif( !$generator instanceof Terra_HeightMapGenerator )\r\n\t\t\tthrow new Terra_HeightMap_InvalidGenerator_Exception();\r\n\r\n\t\treturn $generator;\r\n\t}", "public function getUrlGenero()\n {\n return $this->urlGenero;\n }", "public function getUriRetriever();", "public static function getURL()\n {\n return self::$url;\n }", "function url(){\n return CHOQ_UrlManager::getInstance();\n}", "public function getUrl()\n {\n if (empty($this->url)) {\n $this->setUrl();\n }\n\n return $this->url;\n }", "public function getGenerator()\n {\n if ( ! $this->generators) {\n $this->loadGenerators();\n }\n\n $generators = $this->generators;\n\n usort($generators, function ($a, $b) {\n return ($b::getPriority() - $a::getPriority());\n });\n\n $generator = null;\n if (isset ($generators[0])) {\n $class = $generators[0];\n $generator = new $class;\n }\n\n return $generator;\n }", "protected function getLinkGeneratorClass()\n {\n return ExampleLink::class;\n }", "public static function inst()\n {\n return GoogleSitemap::create();\n }", "public static function getURLTemplate() {\n\t\tif (self::$_urlTemplate === null)\n\t\t\tself::loadFromFile();\n\t\treturn self::$_urlTemplate;\n\t}", "public static function current()\n {\n /** @var \\Illuminate\\Routing\\UrlGenerator $instance */\n return $instance->current();\n }", "public static function instance() {\n if (is_null(static::$_instance)) {\n $factory_class = Configure::read('HttpSource.factory');\n if (!empty($factory_class)) {\n static::$_instance = new $factory_class();\n } else {\n static::$_instance = new static();\n }\n }\n\n return static::$_instance;\n }", "function GetUrl() {\n\t\treturn $this->_url;\n\t}", "public function getUrl ()\n {\n return $this->_url;\n }", "protected function getUrl() {\n return $this->_url;\n }", "public function newRequestUrl()\n {\n return new Request\\Url($this->get('_SERVER'));\n }", "function apine_url_helper () {\n\t\n\treturn Apine\\MVC\\URLHelper::get_instance();\n\t\n}", "public function getUrl()\n {\n return $this->_url;\n }", "public function getUrl()\n {\n return $this->_url;\n }", "private function _getUrl()\n {\n return $this->_url;\n }", "public function getURL();", "public function getURL();", "public function getURL();", "public static function getUrl()\n {\n if (self::$_url === null) {\n self::$_url = self::resolveRequestUri();\n }\n\n return self::$_url;\n }", "public static function full()\n {\n /** @var \\Illuminate\\Routing\\UrlGenerator $instance */\n return $instance->full();\n }", "function getURL() {\r\n\t\treturn $this->url;\r\n }", "public static function getGenerator(ServerRequestInterface $request)\n {\n return self::getAttribute($request, self::KEY_GENERATOR);\n }", "public function getUrl ()\n {\n return $this->url;\n }", "public function getUrl(): string\n {\n return $this->getUrlGenerator()->getUrl();\n }", "public function getURL() {\n return new URL($this->cenv['SCRIPT_URI']);\n }", "public static function get(string $url): object\n {\n self::$url = $url;\n return self::instance();\n }", "public function get()\r\n {\r\n return $this->getUrl();\r\n }", "function get_url() {\n return $this->url;\n }", "public function createUrlGenerator(Discovery $discovery)\n {\n if (!interface_exists('Puli\\UrlGenerator\\Api\\UrlGenerator')) {\n throw new RuntimeException('Please install puli/url-generator to create UrlGenerator instances.');\n }\n\n $generator = new DiscoveryUrlGenerator($discovery, array());\n\n return $generator;\n }", "public function getUrl()\r\n {\r\n return $this->url;\r\n }", "public function getUrl()\n {\n\n return $this->url;\n\n }", "public function getUrl()\n {\n\n return $this->url;\n\n }", "public function get_url()\n {\n return $this->_url;\n }", "public function setUrlGenerator($name, UrlGeneratorInterface $urlGenerator)\n {\n $this->urlGeneratorRegistry->set($name, $urlGenerator);\n\n return $this;\n }", "public function getURL() {\n\t\treturn $this->_url;\n\t}", "public function get_url()\n {\n }", "public function getUrl()\n\t{\n\t\n\t\treturn $this->url;\n\t\n\t}", "public static\n\tfunction inst() {\n\t\t\n\t\tif(is_null(self::$r)) self::$r = new Router();\n\t\treturn self::$r;\n\t}", "public static function url()\n {\n /** @var \\Illuminate\\Http\\Request $instance */\n return $instance->url();\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }" ]
[ "0.8142245", "0.7779566", "0.77674854", "0.76192194", "0.7287624", "0.7207222", "0.71341586", "0.6879379", "0.6859973", "0.6703773", "0.66956985", "0.66821647", "0.66373396", "0.6521277", "0.6515507", "0.6467309", "0.6456736", "0.6384518", "0.63537", "0.62780267", "0.6253817", "0.6213485", "0.61991054", "0.61894786", "0.6099327", "0.60609585", "0.6048559", "0.6037645", "0.6029038", "0.6028864", "0.60178393", "0.59796", "0.593537", "0.59228057", "0.5913971", "0.5908069", "0.59054446", "0.5901577", "0.5879692", "0.5872048", "0.58559114", "0.5849535", "0.5820084", "0.5815845", "0.58131504", "0.58120984", "0.58120984", "0.58109814", "0.58081466", "0.58081466", "0.58081466", "0.58019966", "0.5796149", "0.579403", "0.57750815", "0.57694876", "0.5765692", "0.5754855", "0.57539093", "0.57528937", "0.5752275", "0.5748734", "0.5746997", "0.5741242", "0.5741242", "0.5735192", "0.5730172", "0.57273555", "0.5724672", "0.57218844", "0.57194597", "0.57178146", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825", "0.57160825" ]
0.82788694
0
Will init the request parser anew so it can be reused even when being persistent
Инициализируем парсер запроса заново, чтобы он мог быть переиспользован даже при сохранении состояния
public function init() { // Init the query parser $this->getQueryParser()->clear(); // Init request and response $this->getRequest()->init(); $this->getResponse()->init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\r\n\t{\r\n\t\t$this->normalizeRequest();\r\n\t}", "public function init()\n\t{\n\t\tparent::init();\n\t\t$this->normalizeRequest();\n\t}", "protected function _initRequest()\n {\n $request = new HttpRequest();\n \n $router = $this->bootstrapResource('router');\n $router->setDefaultController(HttpRequest::getDefaultController());\n $router->setDefaultAction(HttpRequest::getDefaultAction());\n \n $parseResult = $router->parseUri($request->getRequestUri());\n $request->setController($parseResult->getController());\n $request->setAction($parseResult->getAction());\n $request->setParams($parseResult->getParams());\n \n return $request;\n }", "public function init () {\r\n parent::init();\r\n $this->normalizeRequest();\r\n }", "public static function init()\n {\n if (self::$isInit === false) {\n self::$rawRequest = null;\n self::$routes = array();\n self::$isInit = true;\n if (defined('STRAY_IS_HTTP') === true && constant('STRAY_IS_HTTP') === true) {\n self::$rawRequest = new RawRequest();\n Session::init();\n Locale::init(self::$rawRequest);\n }\n }\n }", "final private static function initRequest()\n {\n if (isset($_POST) && count($_POST) > 0) {\n Application::$request = &$_POST;\n }\n }", "private function initRequest()\n {\n $this->request = SymfonyRequest::createFromGlobals();\n define('CURRENT_PATH', $this->request->getPathInfo());\n\n // Dil tanımlaları kontrol ediliyor\n /*\n $domain = str_replace(['http://', 'https://'], '', getenv('domain'));\n $domainParts = explode('.', $this->request->getHttpHost());\n $subdomains = ['en', 'tr', 'beta'];\n if (in_array($domainParts[0], $subdomains) === false)\n {\n $domainParts[0] = 'tr';\n $url = 'http://tr.'.$domain;\n Redirect::toDomain($url);\n }\n Lang::set($domainParts[0]);\n */\n \n Lang::set('tr');\n \n $context = new RequestContext();\n $context->fromRequest($this->request);\n $this->matcher = new UrlMatcher(Router::getCollection(), $context);\n if ($this->request->getMethod() === \"POST\")\n {\n Form::setRequestData($this->request->request->all());\n }\n }", "function __construct()\n\t{\n\t\t$this->request = new Request();\n\t\tRouter::parse($this->request->url,$this->request);\n\t\tprint_r($this->request);\n\t}", "private function requestParser() {\n\n\t\t// Arguments from request, ie 'article' or 'object'\n\t\t$this->model = \t!isset($this->model) \n\t\t\t\t\t\t\t\t\t\t\t? isset($this->request->arguments[2]) ? $this->request->arguments[2] : null \n\t\t\t\t\t\t\t\t\t\t: $this->model;\n\n\t\t// Convert to 'Example' or 'Object'\n\t\t$this->model = ucfirst($this->model);\n\n\t\t// Check if the model class exists\n\t\t$this->model = class_exists($this->model) ? $this->model : null;\n\n\t\t// Check for id in $_POST first, then in request URL \t\t\n\t\t$this->id = !isset($this->id) \n\t\t\t\t\t\t\t\t\t? !isset($_POST['id']) \n\t\t\t\t\t\t\t\t\t\t? isset($this->request->arguments[3]) ? $this->request->arguments[3] : null \n\t\t\t\t\t\t\t\t\t: strip_tags($_POST['id']) \n\t\t\t\t\t\t\t\t: $this->id;\n\t}", "public function _init() {\n\t\tparent::_init() ;\n\t\t$this->request = $this->_context ? $this->_context->request() : null;\n\t}", "public function init()\n {\n\n // reset the servlet request\n $httpRequest = $this->getHttpRequest();\n\n // initialize the parts\n foreach ($httpRequest->getParts() as $part) {\n $this->addPart(Part::fromHttpRequest($part));\n }\n\n // set the body content if we can find one\n if ($httpRequest->getHeader(HttpProtocol::HEADER_CONTENT_LENGTH) > 0) {\n $this->setBodyStream($httpRequest->getBodyContent());\n }\n\n // copy server variables to members\n $this->setServerName($this->getServerVar(ServerVars::SERVER_NAME));\n $this->setQueryString($this->getServerVar(ServerVars::QUERY_STRING));\n $this->setRequestUri($this->getServerVar(ServerVars::X_REQUEST_URI));\n $this->setDocumentRoot($this->getServerVar(ServerVars::DOCUMENT_ROOT));\n $this->setRequestUrl($this->getServerVar(ServerVars::HTTP_HOST) . $this->getServerVar(ServerVars::X_REQUEST_URI));\n }", "private static function initRequests() {\n\t\t$parts = parse_url($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t\tif(isset($parts['query'])) parse_str($parts['query'], $query);\n\t\t\n\t\tself::$registry['request']['get'] = isset($query) ? $query : array();\n\t\tself::$registry['request']['post'] = $_POST;\n self::$registry['request']['files'] = $_FILES;\n \n // Get the request method\n $method = strtolower($_SERVER['REQUEST_METHOD']);\n if($method != 'get' && $method != 'post') $method = 'get';\n \n // If its an ajax or json request, overwrite default method\n if(self::get('get.ajax_request', 'request')) $method = 'ajax';\n if(self::get('get.json_request', 'request')) $method = 'json';\n \n // If there is a callback param defined with a jsonp request\n if(self::get('get.jsonp_request', 'request') && self::get('get.callback', 'request')) $method = 'jsonp';\n \n\t\tself::$registry['request']['method'] = $method;\n\t}", "protected function initRequest()\n\t{\n\t\t$this->validateFields();\n\n\t\t$this->request = [\n\t\t\t'PosRequest' => [\n\t\t\t\t'Ver1.0' => [ \n\t\t\t\t\t'Header' => $this->buildHeader(),\n\t\t\t\t\t'Transaction' => []\n\t\t\t\t]\n\t\t\t]\n\t\t];\n\n\t\treturn;\n\t}", "public function initParser()\n {\n $parserType = CheckoutApi_Client_Constant::PARSER_CLASS_GROUP.$this->getRespondType(); \n\n $parserObj = CheckoutApi_Lib_Factory::getSingletonInstance($parserType) ;\n $this->setParser($parserObj); \n }", "protected function initializeExternalParsers() {}", "public function init() {\n if (!isset($_SERVER['REQUEST_URI'])) {\n return null;\n }\n\n $parsedRequest = parse_url($_SERVER['REQUEST_URI']);\n $this->request->path = isset($parsedRequest['path']) ? $parsedRequest['path'] : '/';\n\n // determine should we filter $_GET automatically or not\n if ($this->autoFilterGet === true) {\n $this->request->get = $this->filter($_GET);\n } else {\n $this->request->get = $_GET;\n }\n\n }", "protected function init(){\n\t\t$this->data = array();\n\t\t$this->files = array();\n\t\t$this->fileObjects = array();\n\t\t$this->rawPOST = $_POST;\n\t\t$this->rawGET = $_GET;\n\t\t$this->rawFILES = $_FILES;\n\t\t$this->scanGetData();\n\t\t$this->scanPostData();\n\t\t$this->scanFiles();\n\t\treturn $this;\n\t}", "function __construct(){\n\t\t\t/*Instanciamos a la clase UrlParser para crear un objeto que nos devuelva \n\t\t\tun array con las propiedades separadas de la URL */\n\t\t\t$this -> url = new RequestParser();\n\n\t\t\t$this -> segmented_url = explode(\"/\", substr($this -> request_url, 1));\n\t\t\t$this -> redirect_request();\n\t\t}", "public function __construct() {\n\t\tparent::__construct();\n\n\n\t\tif( array_key_exists('REQUEST_URI', $_SERVER) ) {\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t\tif( strpos($uri, '?') !== false ) {\n\t\t\t\t$uri = substr($uri, strpos($uri, '?')+1);\n\n\t\t\t\tparse_str($uri, $bits);\n\n\t\t\t\tif (function_exists('array_replace_recursive')) {\n\t\t\t\t\t$_GET = array_replace_recursive($_GET, $bits);\n\t\t\t\t} else {\n\t\t\t\t\t$_GET = array_merge_recursive($_GET, $bits);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\t\t\t\t// handles POSTed input without the form encoding header\n\t\t\t\t$handle = fopen('php://input','r');\n\t\t\t\t$data = '';\n\n\t\t\t\twhile( ($line = fgets($handle)) ) {\n\t\t\t\t\t$data .= $line;\n\t\t\t\t}\n\n\t\t\t\tif( !$data ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$this->_parse($data);\n\t\t\t}\n\t\t}\n\t}", "protected function init()\n\t{\n\t\tparent::init();\n\t\t// preload 'request' so that it has chance to respond to onBeginRequest event.\n\t\t$this->getRequest();\n\t}", "protected function init()\n {\n // @codeCoverageIgnoreStart\n if (!self::$queryVisitor) {\n self::$queryVisitor = new AwsQueryVisitor();\n }\n if (!self::$xmlVisitor) {\n self::$xmlVisitor = new XmlResponseLocationVisitor();\n }\n // @codeCoverageIgnoreEnd\n\n $this->getRequestSerializer()->addVisitor('aws.query', self::$queryVisitor);\n $this->getResponseParser()->addVisitor('xml', self::$xmlVisitor);\n }", "function __construct()\n {\n $this->buffer = &$_REQUEST;\n\n if (isset($_SERVER['CONTENT_TYPE']) && strpos($_SERVER['CONTENT_TYPE'], 'application/json') !== false)\n $this->buffer = array_merge($this->buffer, json_decode(file_get_contents('php://input'), true));\n }", "private function\n\tinit_parser()\n\t{\n\t\t$this->token = self::BEGINFILE;\n\t\t$this->prev_token = self::BEGINFILE;\n\t\t$this->syntax_error = false;\n\t\t$this->lookahead = array();\n\n\t\t$this->ilike_paren = 0;\n\t\t$this->lparen_count = 0;\n\t\t$this->db_field_count = 0;\n\n\t\t$this->db_ilike_data = array();\n\t\t$this->keywords = array();\n\t\t$this->tsearch = '';\n\t\t$this->ilike = '';\n\t\t$this->error_msg = '';\n\t\t$this->error_tok = '';\n\t\t$this->error_pos = 0;\n\t}", "private function initRequestValidator() {\n\t\t\t// user to get articles for\n\t\t\t$this->rq->addAllowed('GET', 'user', '', '', true, false);\n\t\t\t\n\t\t\t$this->par = $this->rq->getParams();\n\t\t}", "public function init()\n {\n\n // init request and response\n $this->getRequest()->init();\n $this->getResponse()->init();\n }", "protected function _initRequest()\n {\n $this->bootstrap('FrontController');\n\n\t\terror_reporting(E_ERROR | E_PARSE);\n\t\tini_set('memory_limit', '-1');\n \n $frontController = $this->getResource('FrontController');\n $request = new Zend_Controller_Request_Http();\n \n $frontController->setRequest($request);\n }", "private function __construct()\n {\n // $this->_instance = new();\n try {\n parse_str(file_get_contents(\"php://input\"), $POSTDATA);\n $this->_data = array_merge($_GET, $_POST, $POSTDATA);\n } catch (Exception $e) {\n echo \"Error while Request parameters Parsing\";\n }\n }", "private function prepareRequest()\n {\n $this->client = new Client(['base_uri' => self::baseURL]);\n }", "public function __construct()\n {\n Logger::log($this, \"Request object instantiated.\");\n\n $this->getRequests();\n $this->Session = new SessionHandler();\n $this->Cookie = new CookieHandler();\n }", "function initialiseRequests () {\n\n\t\t$this->keyword = false;\n\t\t$this->valid_search_fields = $this->valid_BE_search_fields;\n\t\t$this->product_parent_id = FALSE;\n\t\t$this->virtuemart_manufacturer_id = FALSE;\n\t\t$this->search_type = '';\n\t\t$this->searchcustoms = FALSE;\n\t\t$this->searchplugin = 0;\n\t\t$this->filter_order = VmConfig::get ('browse_orderby_field');\n\t\t$this->filter_order_Dir = VmConfig::get('prd_brws_orderby_dir', 'ASC');\n\n\t\t$this->_uncategorizedChildren = null;\n\t\t$this->searchAllCats = false;\n\t\t$this->virtuemart_vendor_id = 0;\n\t}", "public function init() {\n\t\tparent::init();\n\t\t$this->setActualGet($_GET);\n\t\t$this->setActualRequest($_REQUEST);\n\t}", "public function __construct()\n {\n\n // init body stream\n $this->bodyStream = '';\n\n // the request has not been dispatched initially\n $this->dispatched = false;\n\n // initialize the instances\n $this->context = null;\n $this->response = null;\n $this->httpRequest = null;\n $this->requestHandler = null;\n\n // initialize the strings\n $this->pathInfo = '';\n $this->serverName = '';\n $this->requestUri = '';\n $this->requestUrl = '';\n $this->queryString = '';\n $this->servletPath = '';\n $this->baseModifier = '';\n $this->documentRoot = '';\n $this->requestedSessionId = '';\n $this->requestedSessionName = '';\n\n // reset the server variables and the parts\n $this->parts = array();\n $this->handlers = array();\n $this->serverVars = array();\n $this->attributes = array();\n }", "private static function _initializeDefaults()\r\n {\r\n // This is the only place you will\r\n // see this constructor syntax. It\r\n // is only done here to prevent infinite\r\n // recusion. Do not use this syntax elsewhere.\r\n // It goes against the whole readability\r\n // and transparency idea.\r\n self::$_template = new Request(array(\r\n 'method' => Http::GET\r\n ));\r\n \r\n // This is more like it...\r\n self::$_template->withoutStrictSSL();\r\n }", "public function parse_request()\n {\n }", "protected function init()\n {\n $this->namespaces = array();\n $this->currentPath = '/';\n $this->pathData = array();\n $this->parse = FALSE;\n }", "public static function initialize() {\r\n\t\tglobal $session;\r\n\t\tself::$session = $session;\r\n\t\tself::$id = uniqid();\r\n\t\tself::$headers = self::extractHeaders();\r\n\t\tself::$method = $_SERVER[\"REQUEST_METHOD\"];\r\n\t\tself::$port = (int)$_SERVER[\"SERVER_PORT\"];\r\n\t\tself::$httpVersion = str_replace(\"HTTP/\",\"\",$_SERVER[\"SERVER_PROTOCOL\"]);\r\n\t\tself::$remoteAddress = $_SERVER[\"REMOTE_ADDR\"];\r\n\t\tself::$url = new WebURL(self::buildRequestURL());\r\n\t\tself::$browser = new Browser(self::$headers[\"User-Agent\"]);\r\n\t\tself::$post = $_POST;\r\n\t\t//self::$input = file_get_contents(\"php://input\"); //this loads full file into mem and kills php\r\n\t\tself::$input = \"\";\r\n\t\tself::$get = $_GET;\r\n\t\tself::$cookies = $_COOKIE;\r\n\t\tself::$files = $_FILES;\r\n\t\tself::$uploadFiles = self::extractUploadedFiles();\r\n\t\tself::$data = $_REQUEST;\r\n\t\tself::$action = val(self::$data, \"action\");\r\n self::$logs = array();\r\n\t}", "private static function init() {\n\n self::$infos = array();\n self::$infos['PUT'] = array();\n self::$infos['_raw_'] = array();\n\n $flagGPC = get_magic_quotes_gpc();\n\n\n self::$infos['_raw_']['GET'] = $_GET;\n self::$infos['_raw_']['POST'] = $_POST;\n self::$infos['_raw_']['REQUEST'] = $_REQUEST;\n self::$infos['_raw_']['COOKIE'] = $_COOKIE;\n self::$infos['GET'] = self::initRecur($_GET, 0);\n self::$infos['POST'] = self::initRecur($_POST, 0);\n self::$infos['REQUEST'] = array_merge(self::$infos['GET'], self::$infos['POST']);\n self::$infos['COOKIE'] = self::initRecur($_COOKIE, 0);\n\n }", "function __construct()\n {\n $this->getMethod();\n $this->getUri();\n $this->getPathAndQuery();\n $this->getRequestAndRequestHash();\n $this->parseQuery();\n $this->parseBody();\n $this->getSessionAndCookie();\n }", "public function init() {\t\t\n \tif($this->_request->isXmlHttpRequest()) \n \t\t$this->_request->setParam(\"format\",\"json\");\n\n $contextSwitch = $this->_helper->contextSwitch();\n $contextSwitch->initContext();\n }", "protected function init() {\n\t\t$this->state = self::STATE_INIT;\n\n\t\t$urlParts = parse_url($_SERVER['REQUEST_URI']);\n\n\t\t$this->request = $this->router()->route(strtolower($_SERVER['REQUEST_METHOD']), trim($urlParts['path'], '/'));\n\n\t\t$this->controller = Controller_Abstract::factory($this->request);\n\t}", "function hydrate_request_init ( $once = true ) {\r\n\t\t# Init\r\n\t\tif ( defined('REQUEST_HYDRATED') ) {\r\n\t\t\tif ( $once ) return;\r\n\t\t} else\r\n\t\t\tdefine('REQUEST_HYDRATED', 1);\r\n\t\r\n\t\t# Prepare\r\n\t\t$stripslashes = ini_get('magic_quotes_gpc') ? true : false;\r\n\t\t\r\n\t\t# Prepare\r\n\t\t$_POST_HYDRATED\t\t= $_POST;\r\n\t\t$_GET_HYDRATED\t\t= $_GET;\r\n\t\t$_FILES_HYDRATED\t= array();\r\n\t\t\r\n\t\t# Clean\r\n\t\tarray_clean_form($_POST_HYDRATED);\r\n\t\tarray_clean_form($_GET_HYDRATED);\r\n\t\tarray_clean_form($_FILES_HYDRATED);\r\n\t\t\r\n\t\t# Hydrate\r\n\t\thydrate_value($_POST_HYDRATED,\tarray('stripslashes'=>$stripslashes));\r\n\t\thydrate_value($_GET_HYDRATED,\tarray('stripslashes'=>$stripslashes));\r\n\t\thydrate_value($_FILES_HYDRATED);\r\n\t\t\r\n\t\t# Liberate\r\n\t\tliberate_files($_FILES_HYDRATED);\r\n\t\tunset_empty_files($_FILES_HYDRATED);\r\n\t\t\r\n\t\t# Merge\r\n\t\t$_REQUEST = array_merge_recursive_keys(false, $_FILES_HYDRATED, $_GET_HYDRATED, $_POST_HYDRATED);\r\n\t\t\r\n\t\t# Done\r\n\t\treturn true;\r\n\t}", "function initialize(&$request) {\n\t\tparent::initialize($request);\n\t}", "public function initialize() {\n $this->clientRequestIP = $this->request->getClientAddress();\n // Get Client User Agent\n $this->clientUserAgent = $this->request->getUserAgent();\n\n }", "public function initializeRequest($request = null)\n\t{\n\t\tif (empty($request)) {\n\t\t\t$this->request = Request::createFromGlobals();\n\t\t} else {\n\t\t\t$this->request = $request;\n\t\t}\n\n\t\t// Shortcuts to the request object for cleaner syntax.\n\t\t$this->input = new Input($this->request);\n\t}", "public function parse() {\r\n $uri = $_SERVER['REQUEST_URI'];\r\n\r\n // remove the request GET parameters \r\n $uri = ($qMarkPos = strpos($uri, '?')) !== false ? substr($uri, 0, $qMarkPos) : $uri;\r\n\r\n // remove the leading base path\r\n $uri = str_replace($this->getRelativePath(), '', $uri);\r\n\r\n // remove slashes\r\n $uri = trim($uri, '/');\r\n\r\n $this->_urlParams = explode('/', $uri);\r\n }", "private function _parserInit()\n {\n $this->setStatus(0);\n }", "private function __construct() {\n\t\t$this->isHttps = $this->checkRequestSecure();\n\t\t$this->headers = $this->getHeaders();\n\t\t$this->httpMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : self::HTTP_GET;\n\t\t$this->contentTypes = $this->getContentTypes(array(ContentType::TEXT));\n\t\t$this->userIP = $_SERVER['REMOTE_ADDR'];\n\n\t\t$this->processUri();\n\n\t\t$content_type = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : (isset($_SERVER['HTTP_CONTENT_TYPE']) ? $_SERVER['HTTP_CONTENT_TYPE'] : null);\n\n\t\tswitch ($content_type) {\n\t\t\tcase ContentType::JSON:\n\t\t\t\t$this->dataPost = json_decode(file_get_contents(\"php://input\"), true);\n\n\t\t\t\tbreak;\n\t\t\tcase ContentType::XML:\n\t\t\t\t$xml = simplexml_load_string(file_get_contents(\"php://input\"));\n\n\t\t\t\tif ($xml != false) {\n\t\t\t\t\t$json = json_encode($xml);\n\t\t\t\t\t$this->dataPost = json_decode($json, true);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'PUT') {\n\t\t\t\t\tparse_str(file_get_contents(\"php://input\"), $this->dataPost);\n\t\t\t\t} else {\n\t\t\t\t\t$this->dataPost = empty($_POST) ? array() : $_POST;\n\t\t\t\t}\n\t\t}\n\n\t\t$this->dataGet = empty($_GET) ? array() : $_GET;\n\t\t$this->dataFiles = empty($_FILES) ? array() : $_FILES;\n\n\t\t// prevent using global variables\n\t\tunset($_POST, $_GET, $_FILES);\n\t}", "public function init()\n\t{\n\t\trequire_once __DIR__ . '/../init.php';\n\t\t//print_r($_SERVER);\n\t\t$this->setDefaults();\n\t\t$this->setErrorReporting();\n\n\t\tif ($this->al) {\n\t\t\t$this->al->useCookies = $this->useCookies;\n\t\t\t$this->al->postInit();\n\t\t\t$this->al->register();\n\t\t\t//debug($this->al->folders);\n\t\t}\n\n\t\t// leads to problems when there are multiple Config classes\n\t\tif (class_exists('Config', false)) {\n\t\t\tConfig::getInstance();\n\t\t}\n\n\t\t$this->setCache();\n\t\t//ini_set('short_open_tag', 1);\t// not working\n\t\tRequest::removeCookiesFromRequest();\n\t\t$this->endTime = microtime(true) - ifsetor($_SERVER['REQUEST_TIME_FLOAT']);\n\t\treturn $this;\n\t}", "private function createRequest() {\n\t\tProfiler::record('Create request instance');\n\t\t$this->request = Request::auto();\n\t}", "static function init($unset_superglobals = true)\n\t{\n\t\tif (self::$ready) return;\n\t\t$_GET = self::sanitize($_GET);\n\t\t$_POST = self::sanitize($_POST);\n\t\tself::$is_https = (strtolower(arr::get($_SERVER, 'HTTPS')) === 'on');\n\t\tself::$method = arr::get($_SERVER, 'REQUEST_METHOD', '');\n\t\tself::$uri = arr::get($_SERVER, 'REQUEST_URI', '');\n\t\tself::$domain = strtolower(arr::get($_SERVER, 'SERVER_NAME', ''));\n\t\tself::$user_agent = arr::get($_SERVER, 'HTTP_USER_AGENT', '');\n\t\tself::$user_ip = arr::get($_SERVER, 'REMOTE_ADDR', '');\n\t\tself::$get_vars = $_GET;\n\t\tself::$post_vars = $_POST;\n\t\tself::$ready = true;\n\t\tif ($unset_superglobals)\n\t\t{\n\t\t\tunset($_POST);\n\t\t\tunset($_GET);\n\t\t\tunset($_REQUEST);\n\t\t}\n\t}", "protected function loadRequest() {\n $this->mRequest = $request = $this->getRequest();\n\n $this->mLicense = $request->getText( 'wpLicense' );\n $this->mCopyrightStatus = $request->getText( 'wpUploadCopyStatus' );\n $this->mCopyrightSource = $request->getText( 'wpUploadSource' );\n $this->mUploadClicked = $this->getClicked( $request, 'wpMultipleUpload' );\n if ( $this->mRenameClicked = $this->getClicked( $request, 'wpMultipleRename' ) ) {\n $this->getRenamedFiles( $request );\n };\n $this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning' );\n\n $token = $request->getVal( 'wpEditToken' ); // check for and validate token\n $this->mTokenOk = $this->getUser()->matchEditToken( $token );\n\n $this->mGallery = unserialize( $request->getText( 'wpData' ) );\n if ( empty( $this->mGallery ) ) {\n $this->mGallery = array();\n }\n }", "public function initialize($request)\n {\n $this->_inputStream = new Zendshl_Amf_Parse_InputStream($request);\n $this->_deserializer = new Zendshl_Amf_Parse_Amf0_Deserializer($this->_inputStream);\n $this->readMessage($this->_inputStream);\n return $this;\n }", "protected function init() {\n\t\t$this->COOKIES = array();\n\t\t$this->FILES = array();\n\t\t$this->GET = array();\n\t\t$this->POST = array();\n\n\t\t$this->forms = array();\n\n\t\t$this->UNSET_COOKIES = array();\n\t\t$this->UNSET_FILES = array();\n\t\t$this->UNSET_GET = array();\n\t\t$this->UNSET_POST = array();\n\n\t\t$this->unsetForms = array();\n\n\t\t$this->INVALID_COOKIES = array();\n\t\t$this->INVALID_FILES = array();\n\t\t$this->INVALID_GET = array();\n\t\t$this->INVALID_POST = array();\n\n\t\t$this->invalidForms = array();\n\t}", "public function parse_request() {\n\t\tglobal $wp;\n\n\t\t// Map query vars to their keys, or get them if endpoints are not supported\n\t\tforeach ( $this->query_vars as $key => $var ) {\n\t\t\tif ( isset( $_GET[ $var ] ) ) {\n\t\t\t\t$wp->query_vars[ $key ] = $_GET[ $var ];\n\t\t\t} elseif ( isset( $wp->query_vars[ $var ] ) ) {\n\t\t\t\t$wp->query_vars[ $key ] = $wp->query_vars[ $var ];\n\t\t\t}\n\t\t}\n\t}", "public function __construct()\r\n {\r\n parent::__construct();\r\n $this->_request_params();\r\n }", "function _parseHttpRequest()\n {\n $prefix = $this->_requestPrefix;\n\n // Determine page, sort and direction values\n\n if (!$this->_forcePage) {\n if (isset($_REQUEST[$prefix . 'page'])) {\n // Use POST, GET, or COOKIE value in respective order\n if (isset($_POST[$prefix . 'page'])) {\n $this->page = $_POST[$prefix . 'page'];\n } elseif (isset($_GET[$prefix . 'page'])) {\n $this->page = $_GET[$prefix . 'page'];\n } elseif (isset($_COOKIE[$prefix . 'page'])) {\n $this->page = $_COOKIE[$prefix . 'page'];\n } \n } else {\n $this->page = 1;\n }\n if (!is_numeric ($this->page)) {\n $this->page = 1;\n }\n } \n\n $orderBy = '';\n if (isset($_REQUEST[$prefix . 'orderBy'])) {\n // Use POST, GET, or COOKIE value in respective order\n if (isset($_POST[$prefix . 'orderBy'])) {\n $orderBy = $_POST[$prefix . 'orderBy'];\n } elseif (isset($_GET[$prefix . 'orderBy'])) {\n $orderBy = $_GET[$prefix . 'orderBy'];\n } elseif (isset($_COOKIE[$prefix . 'orderBy'])) {\n $orderBy = $_COOKIE[$prefix . 'orderBy'];\n }\n }\n\n $direction = 'ASC';\n if (isset($_REQUEST[$prefix . 'direction'])) {\n // Use POST, GET, or COOKIE value in respective order\n if (isset($_POST[$prefix . 'direction'])) {\n $direction = $_POST[$prefix . 'direction'];\n } elseif (isset($_GET[$prefix . 'direction'])) {\n $direction = $_GET[$prefix . 'direction'];\n } elseif (isset($_COOKIE[$prefix . 'direction'])) {\n $direction = $_COOKIE[$prefix . 'direction'];\n }\n }\n\n if ($orderBy) {\n $this->sortSpec[$orderBy] = $direction;\n }\n }", "public function setRequestParser(RequestParser $requestParser): void\n {\n $this->requestParser = $requestParser;\n }", "public static function initInitial(\\Request $request)\n\t{\n\t\t\\Request::$initial = $request;\n\t\t\\Request::$client_ip = $request->client_ip();\n\t\t\\Request::$user_agent = $request->client_user_agent();\n\n\t\treturn $request;\n\t}", "public function initializeObject()\n {\n if ($this->request === null) {\n $requestHandler = $this->bootstrap->getActiveRequestHandler();\n if ($requestHandler instanceof HttpRequestHandlerInterface) {\n $this->request = ActionRequest::fromHttpRequest($requestHandler->getHttpRequest());\n } else {\n $httpRequest = ServerRequest::fromGlobals();\n $this->request = ActionRequest::fromHttpRequest($httpRequest);\n }\n }\n\n $uriBuilder = new UriBuilder();\n $uriBuilder->setRequest($this->request);\n\n $this->setControllerContext(new ControllerContext(\n $this->request,\n new ActionResponse(),\n new Arguments([]),\n $uriBuilder\n ));\n }", "public function __construct()\n {\n parent::__construct();\n $this->_request_params();\n }", "public function init(Request $request)\n {\n // $request is a instance of Request class\n $this->_request = $request;\n }", "public function getHttpParser()\n {\n if (!$this->httpParser) {\n $this->httpParser = new Parsers\\Request();\n }\n return $this->httpParser;\n }", "function parse_http_request()\n {\n $this->params = [];\n $p = $this->request_uri_parts;\n if (isset($p[0]) && $p[0] && $p[0][0] != '?') {\n $this->controller = $p[0];\n }\n if (isset($p[1]) && $p[1] && $p[1][0] != '?') {\n $this->action = $p[1];\n }\n if (isset($p[2])) {\n $this->params = array_slice($p, 2);\n }\n return $this;\n }", "public function init() {\n \t$this->_db = new Db();\n \t$this->_router = new Router();\n \t$this->_request = new Request();\n }", "protected function init() {\n switch ($this->requestType) {\n case 'get':\n $this->getData();\n break;\n\n case 'save':\n $this->saveData();\n break;\n\n case 'delete':\n $this->deleteData();\n break;\n\n default:\n $this->getData();\n break;\n }\n }", "public static function createFromGlobals()\n {\n if (self::$instance !== null) {\n throw new \\Exception(\"You only can initialize Request object one time\");\n }\n \n $request = parent::createFromGlobals();\n self::$instance = $request;\n\n return self::$instance;\n }", "protected function _init() {\n parent::_init();\n\n $this->_url = array(\n 'library' => $this->_context->_config['request']->params['library'],\n 'controller' => $this->_context->_config['request']->params['controller'],\n 'action' => $this->_context->_config['request']->params['action']\n );\n\n $this->_page = ($this->_context->_config['data']['page'] + 0) ?: 1;\n $this->_total = $this->_context->_config['data']['total'];\n $this->_limit = $this->_context->_config['data']['limit'];\n }", "public function setUp()\n {\n $parser = new Parser;\n $this->request = $parser->parse( file_get_contents( 'requests/basic.json' ) );\n }", "public function pre_init()\n {\n if(strstr(@$_SERVER[\"CONTENT_TYPE\"], \"application/json\")){\n $raw = file_get_contents(\"php://input\");\n $request = json_decode($raw, true);\n $_REQUEST = array_merge($_REQUEST, $request);\n $_POST = array_merge($_POST, $request);\n }\n }", "function init()\n\t{\n\t\tif (isset($_SERVER['REQUEST_METHOD']))\n\t\t{\n\t\t\t$this->properties = $_REQUEST;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tforeach($_SERVER['argv'] as $arg)\n\t\t{\n\t\t\tif(strpos($arg,'='))\n\t\t\t{\n\t\t\t\tlist($key, $val)=explode(\"=\", $arg);\n\t\t\t\t$this->setProperty($key, $val);\n\t\t\t}\n\t\t}\n\t}", "public function init()\n {\n\t\t$this->_helper->layout->disableLayout();\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t\n\t\t/** reinitialize headers */\n\t\tAnta_Core::setHttpHeaders(\"text/plain\");\n\t\t\n\t\t// initialize json response\n\t\t$this->_response = new Dnst_Json_Response();\n\t\t$this->_response->setStatus( 'ok' );\n\t\t\n\t\t// add verbose information only if it is specified in htttp params\n\t\tif( isset( $_REQUEST[ 'verbose' ] ) ){\n\t\t\t$this->_response->params = $this->_request->getParams(); \n\t\t}\n\t\t\n\t\t$this->_user = $this->_getUser( false );\n\t\t\n\t}", "function _parseHttpRequest()\n {\n //FIXME: with two grids on the same page, one grid with an empty prefix\n //and the other with a non-empty prefix, the first interfers with the \n //second, because _parseHttpRequest() is called from the constructor\n //before setRequestPrefix(). \n \n if (!$this->_forcePage) {\n if (!($this->page = $this->_getRequestArgument('page'))) {\n $this->page = 1;\n }\n if (!is_numeric($this->page)) {\n $this->page = 1;\n }\n } \n\n if (($orderBy = $this->_getRequestArgument('orderBy')) !== null) {\n if (is_array($orderBy)) {\n $direction = $this->_getRequestArgument('direction');\n $this->sortSpec = array();\n foreach ($orderBy as $index => $field) {\n if (!empty($field)) {\n $this->sortSpec[$field] = \n $this->_secureDirection($direction[$index]);\n }\n } \n } else {\n if (!($direction = $this->_getRequestArgument('direction'))) {\n $direction = 'ASC';\n }\n $this->sortSpec = \n array($orderBy => $this->_secureDirection($direction));\n }\n }\n }", "protected function __construct()\n\t{\n\t\t$this->parsevars($_SERVER);\n $this->prefix = '';\n\t}", "public function init()\n {\n // print_r('<pre>');\n // print_r($this->paths);\n // print_r('</pre>');\n // print_r('<hr>'); \n $timerStart = microtime(true);\n //To Be phased out...Don't put new things in this object\n $this->conf = new \\stdClass();\n\n //Set our time zone\n $this->setTimezone(); \n\n $this->main->paths = $this->getPaths();\n\n $this->setRequestedUrl();\n $this->setInitialMethods();\n $this->setFromSettings();\n $this->disableDbCache();\n $this->openDatabaseConnections();\n $beforeStrictLoadTime = (microtime(true) - $timerStart) / 1000;\n //echo \"<hr><hr><font color=\\\"white\\\">BEFORE STRICT LOAD TIME: $beforeStrictLoadTime seconds</font><hr><hr>\"; \n $this->runStrictOrderedMethods();\n\n $this->setInitialized(true);\n\n $initLoadTime = (microtime(true) - $timerStart) / 1000;\n //echo \"<hr><hr><font color=\\\"white\\\">INIT LOAD TIME: $initLoadTime seconds</font><hr><hr>\";\n // print_r('<pre>');\n // print_r($this->paths);\n // print_r('</pre>');\n // die('FILE: ' . __FILE__ . ' LINE: ' . __LINE__);\n }", "public function urlInit(){ $this->requested_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $this->url = $_SERVER['REQUEST_URI']; $this->exts = ['.php','.html','.tpl','.cgi','.html','.inc']; $this->modified_url = ''; $this->base_url = ''; return $this; }", "public function init()\r\n {\r\n self::$configs = [];\r\n $update = file_get_contents('php://input');\r\n \r\n if (\r\n self::$update == null && \r\n !empty($update) && is_string($update)\r\n ) {\r\n $this->setUpdate($update);\r\n }\r\n\r\n parent::init();\r\n }", "public function __construct()\n {\n $this->method = util\\tokenize($_SERVER['REQUEST_METHOD']);\n $this->path = $this->computePath();\n $this->parameters = [];\n $this->parameters['get'] = $_GET;\n $this->parameters['post'] = $_POST;\n $this->parameters['input'] = $this->computeInputParameters();\n $this->generateCSRFToken();\n }", "protected function _initRequest() {\r\n $this->bootstrap('FrontController');\r\n $request = $this->front->getRequest();\r\n \tif (null === $this->front->getRequest()) {\r\n $request = new Zend_Controller_Request_Http();\r\n $this->front->setRequest($request);\r\n }\r\n\r\n \treturn $request;\r\n }", "public function __construct()\n {\n $this->request = $_REQUEST;\n }", "public function init()\n {\n $router = new HttpRouter($this->config['router']);\n if (isset($_GET['q'])) {\n $request = $router->dispatch($_GET['q']);\n } else {\n $request = $router->dispatch($this->config['defaultRequest']);\n }\n\n $action = 'action' . ucfirst($request->action);\n $controller = $this->controller($request->controller);\n\n $controller->run($action, $request);\n }", "private function initialize_request()\n {\n \t//set request method (GET|POST)\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') \n {\n\t\t\t$this->request_method = 'post';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->request_method = 'get';\n\t\t}\n if (isset($_GET['url'])) {\n \t\n\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n // Put URL parts into according properties\n // URL structure will be ?url=Controller/(get_|post_)Method/argument1/argument2.....\n \n $this->request_controller_name = (isset($url[0]) ? $url[0] : 'Home');\n \n //Call index of controller if action is not specified\n $this->request_action = $this->request_method.'_'.(isset($url[1]) ? $url[1] : 'index');\n \n \n unset($url[0]);\t\t//for arguments remove controller\n unset($url[1]);\t\t//for arguments remove action\n \n //set arguments url\n $this->request_action_arguments = (isset($url) && count($url)>0 ? $url : []);\n\n\n\n // for debugging. uncomment this if you are having problems with the URL\n // echo 'URL: ' . $_GET['url'] . '<br />';\n // echo 'Controller: ' . $this->request_controller_name . '<br />';\n // echo 'Controller Method: ' . $this->request_action . '<br />';\n // echo 'Controller Method Arguments: ';\n // var_dump( $this->request_action_arguments);\n\n }else{\n\t \n\t $this->request_controller_name = 'Home';\n\t $this->request_action = $this->request_method.'_index';\n }\n }", "function __construct()\n {\n $this->parser = new Parser();\n $this->startTime = microtime(true) * 1000;\n }", "public function initRequestToken(){\n Request::ini(Request::init()\n ->addHeader('X-Auth-Token', $this->authToken)\n ->addHeader('X-User-Id', $this->userId));\n }", "private function initRequestParameters() {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->getUrl());\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n $this->setCurlHandler($ch);\n }", "public function __construct()\n {\n $this->requestProcessedHandler = new RequestProcessedEventHandlerCollection();\n $this->request = null;\n\n // set timezone\n date_default_timezone_set('Europe/Berlin');\n }", "public static function parseRequest(){\n global $wp_the_query, $wp_query;\n\n $requestUri = $_SERVER['REQUEST_URI'];\n\n $requestUri = apply_filters('Chayka.WP.Query.parseRequest', $requestUri);\n\n $isForbidden = ApplicationDispatcher::isForbiddenRoute($requestUri);\n $canProcess = ApplicationDispatcher::canProcess($requestUri);\n $isHome = !$requestUri || $requestUri == '/';\n $isAPI = preg_match('%^\\/api\\/%', $requestUri);\n\n self::setIs404($isForbidden);\n\n if ($canProcess) {\n self::setIsHome($isHome);\n ini_set('display_errors', 1);\n error_reporting(E_ALL);\n if($isAPI){\n try{\n echo ApplicationDispatcher::dispatch($requestUri);\n }catch(\\Exception $e){\n JsonHelper::respondException($e, 'exception');\n }\n die();\n }\n add_filter('single_template', array('Chayka\\\\WP\\\\Query', 'renderResponse'), 1, 1);\n remove_action( 'template_redirect', 'wp_old_slug_redirect');\n remove_filter ('the_content','wpautop');\n $q = new Query($requestUri);\n $q->copyFrom($wp_the_query);\n $wp_the_query = $wp_query = $q;\n\n }\n }", "public function init_query_vars()\n {\n }", "public function __construct()\n {\n new RequestHandler();\n\n }", "private function init(){ // just keep code DRY\n $this->len = strlen($this->inExpression);\n $this->pos = 0;\n $this->prevTokenName = 'NOTOK'; \n }", "function __construct(){\n $this->request = $_REQUEST;\n }", "public function load()\n {\n\n $this->parseRequestParams();\n\n foreach ($_SERVER as $sName => $sValue) {\n if (substr($sName, 0, 5) == \"HTTP_\") {\n $sName = str_replace(\" \", \"-\", ucwords(strtolower(str_replace(\"_\", \" \", substr($sName, 5)))));\n $this->__addHeader($sName, $sValue);\n }\n }\n\n if (isset($_SERVER['REQUEST_METHOD'])) {\n $this->__setMethod(strtolower($_SERVER['REQUEST_METHOD']));\n }\n\n // Adds multiple cookies\n $this->loadCookies();\n\n if (isset($_SERVER['REMOTE_ADDR'])) {\n $this->sRemoteAddr = $_SERVER['REMOTE_ADDR'];\n }\n\n if (isset($_SERVER['QUERY_STRING'])) {\n $this->__setRequestString($_SERVER['QUERY_STRING']);\n }\n\n if ($this->getMethod() != self::GET) {\n // TODO repair\n if (!isset($_SERVER[\"CONTENT_TYPE\"])) {\n $_SERVER[\"CONTENT_TYPE\"] = ContentType::HTML;\n }\n\n $sContent = $this->getRawData();\n $oContentEncodingHeader = $this->getHeader('Content-Encoding');\n\n if ($oContentEncodingHeader != false && strstr($oContentEncodingHeader->getValue(), 'gzip') == 'gzip') {\n $sContent = gzuncompress($sContent);\n }\n\n $this->__setContent(new Content($sContent, new ContentType($_SERVER[\"CONTENT_TYPE\"])));\n }\n\n return $this;\n }", "private function loadRequestData()\n {\n if(isset($_POST)) {\n foreach ($_POST as $k => $v) {\n $k = Purifier::sanitize($k);\n $v = Purifier::sanitize($v);\n if(!empty($k) && !empty($v)) {\n $this->post[$k] = $v;\n }\n }\n }\n if(isset($_GET)) {\n foreach ($_GET as $k => $v) {\n $k = Purifier::sanitize($k);\n $v = Purifier::sanitize($v);\n if(!empty($k) && !empty($v)) {\n $this->get[$k] = $v;\n }\n }\n }\n\n $this->requestUri = explode('?', $_SERVER['REQUEST_URI'])[0];\n $this->httpHost = $_SERVER['HTTP_HOST'];\n $this->requestType = strtolower($_SERVER['REQUEST_METHOD']);\n }", "protected function parseRequestParams(){\n $this->requestParams = Mage::app()->getRequest()->getParams();\n }", "function set_parser() {\n\t\t\t// MLC set language code\n\t\t\t$this->parser = xml_parser_create( $this->encoding );\n\t\t\txml_set_object($this->parser, &$this);\n\t\t\txml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, $this->case_folding);\n\t\t\txml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->encoding);\n\t\t\txml_set_element_handler($this->parser, \"startElement\", \"endElement\");\n\t\t\txml_set_character_data_handler($this->parser, \"getCharacterData\");\n\t\t}", "public function __construct()\n {\n if (function_exists('apache_request_headers')) $this->headers = apache_request_headers();\n else\n {\n foreach ($_SERVER as $key => $value) \n {\n if (strpos($key, 'HTTP_') === 0) \n {\n $this->headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))))] = $value;\n }\n }\n }\n $this->method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : false;\n $this->body = file_get_contents('php://input');\n $this->data = array_merge($_GET, $_POST, $_FILES);\n $this->isAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) ? ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') : false;\n $this->ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false;\n $this->url = new URL();\n }", "public function init() {\n $this->_helper->_acl->allow(null);\n $this->_helper->contextSwitch()->setAutoJsonSerialization(false);\n $this->_helper->contextSwitch()->setAutoDisableLayout(true)\n ->addContext('rdf',\n array(\n 'suffix' => 'rdf',\n 'headers' => array(\n 'Content-Type' => 'application/rdf+xml',\n )\n ))\n ->addActionContext('index', $this->_contexts)\n ->addActionContext('emperor', $this->_contexts)\n ->addActionContext('data', array('json'))\n ->initContext();\n $this->_emperors = new Emperors();\n \n }", "private function __construct()\n {\n $this->_parse_url();\n }", "public function __construct()\n {\n parent::__construct();\n $this->addOpenRequestHandler([$this, \"onGetRequest\"]);\n }", "function __construct($request = NULL) {\n if($request === NULL) {\n $this->request = array_merge($_GET, $_POST);\n } else {\n $this->request = $request;\n }\n }", "function Service_request_handler()\n\t\t{\n\t\t\tparent::__construct();\n\t\t}" ]
[ "0.70965797", "0.6846626", "0.6783279", "0.6705737", "0.6539404", "0.65229416", "0.65009713", "0.6496175", "0.6493339", "0.6407828", "0.63835484", "0.63816327", "0.6334631", "0.6333814", "0.6330122", "0.63280463", "0.6321373", "0.6320894", "0.62846446", "0.6284256", "0.62841207", "0.6270328", "0.6263184", "0.6241588", "0.62219495", "0.621232", "0.6204162", "0.618549", "0.61791444", "0.6171556", "0.6161373", "0.6137881", "0.6136597", "0.6107548", "0.6094539", "0.6061782", "0.6005381", "0.59994036", "0.5998516", "0.59822154", "0.5975804", "0.5969657", "0.59610313", "0.59597075", "0.59522915", "0.5927698", "0.5916439", "0.5915166", "0.5884886", "0.5881843", "0.58762664", "0.58466387", "0.5843421", "0.583626", "0.5836038", "0.5835007", "0.5829739", "0.58296496", "0.58217156", "0.58121425", "0.57970643", "0.5793424", "0.5791011", "0.57898635", "0.5785756", "0.5781194", "0.57790697", "0.57756203", "0.5753846", "0.5744115", "0.57367367", "0.57151544", "0.5694822", "0.56915355", "0.56885934", "0.56834704", "0.56833136", "0.5676859", "0.5673193", "0.5672455", "0.5665961", "0.5659218", "0.5647016", "0.5640927", "0.56400913", "0.5635951", "0.5632297", "0.56245816", "0.56220186", "0.5611561", "0.5609183", "0.56083155", "0.5606599", "0.5578883", "0.55786103", "0.5576603", "0.5574284", "0.5564779", "0.5558661", "0.5553546" ]
0.7036537
1
Injects query parser instance
Вставляет экземпляр парсера запросов
public function injectQueryParser(HttpQueryParserInterface $queryParser) { // inject query parser $this->queryParser = $queryParser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQueryParser()\n {\n return $this->queryParser;\n }", "public function parse($query = '');", "public function __construct($query = '')\n {\n }", "public function __construct(QueryInputParser $parser, QueryGenerator $generator)\n {\n $this->parser = $parser;\n $this->generator = $generator;\n\n parent::__construct();\n }", "public static function parse($query);", "public function parse_query($query = '')\n {\n }", "public function parse_query($query = '')\n {\n }", "public function parse_query($query = '')\n {\n }", "public function parse_query($query = '')\n {\n }", "public function parseQuery($query);", "public function __construct($query)\n {\n $this->query = $query;\n }", "protected function setQuery()\n {\n // Set CSS selectors.\n if (!empty($this->query['selector'])) {\n $this->cssSelectors = is_array($this->query['selector'])\n ? $this->query['selector']\n : [$this->query['selector']];\n }\n // Set extractors for each selector.\n foreach ($this->cssSelectors as $id => $selector) {\n $this->extractors[$id] = empty($this->query['extract'][$id])\n ? ['_text']\n : (\n is_array($this->query['extract'][$id])\n ? $this->query['extract'][$id]\n : [$this->query['extract'][$id]]\n );\n }\n }", "public function __construct()\n\t{\n\t\t$this->_query = query::factory();\n\t}", "public function withQuery(string $query);", "public function __construct() {\n // TODO think about a way to inject this!\n $this->solrQuery = new tx_solr_Query('');\n }", "function setQuery($query){$this->query=$query;}", "protected function _parse_query()\n {\n $this->_query_args = $this->input->get();\n }", "public function __construct(QueryFactory $query) {\n $this->query = $query;\n }", "public function __construct($query) {\n $this->query = $query;\n $this->numOfQuery = count($query);\n }", "public function setQuery($query) {\n\n $this->query = $query;\n\n }", "public function withQuery($query)\n {\n }", "public function setQuery($query = null) {\n if ($query instanceof QueryString) {\n $this->parts[self::QUERY] = $query;\n } else {\n $this->parts[self::QUERY] = new QueryString($query);\n }\n return $this;\n }", "public function setQuery($query){\r\n \t$this->query = $query;\r\n }", "public function __construct(Query $query)\n {\n $this->query = $query;\n }", "public function setQuery($query)\n {\n $this->query = $query;\n }", "public function __construct($query) {\n\t\t$this->query = $query;\n\t\t$this->monuments = array();\n\t}", "public function __construct(Query $query)\n\t{\n\t\t$this->query = $query;\n\t}", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function query($query)\n {\n }", "public function setQuery($query): void;", "public function __construct(RecordParser $parser, Query $query, array $processors = array()) {\n\t\tparent::__construct($parser->getTable(), $query);\n\t\t$this->parser = $parser;\n\t\t$this->queryProcessors = $processors;\n\t}", "public function pagerDBInjection(&$query)\n {\n // Add query sorter for showed page\n if (sizeof($this->sorter)) {\n $query->order_by($this->sorter[0]->Name, $this->sorter[2]);\n }\n }", "public function _injectQueryInterpreter($queryInterpreter)\n {\n Assert::isTrue($queryInterpreter instanceof ExtBaseInterpreter);\n parent::_injectQueryInterpreter($queryInterpreter);\n }", "public function __construct(?string $query = null)\n\t{\n\t\t$this->absorb($query);\n\t}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "protected function makeQueriable()\n {\n $array = $this->autoParse(true);\n\n if ($array) {\n $this->queries = (new QueryBuilder())->collect($array);\n }\n }", "public function __construct(DatabaseManager $query)\n {\n $this->query = $query;\n }", "public function setQuery($query) {\n $this->query = $query;\n return $this;\n }", "public function __construct( $query )\n\t{\n\t\tparent::__construct();\n\t\t$this->query( $query );\n\t}", "public function setQuery($query)\r\n {\r\n $this->query = $query;\r\n }", "function setQuery($query)\n {\n $this->_query = $query ;\n }", "public function __construct(QueryPath $qp);", "public function setQuery($query)\n {\n //argument 1 must be a string\n Argument::i()->test(1, 'string');\n $this->query['query'] = $query;\n \n return $this;\n }", "public function __construct(QueryBuilder $query)\n {\n $this->query = $query;\n }", "public function __construct(QueryBuilder $query)\n {\n $this->query = $query;\n }", "public function setQuery($query)\n {\n $this->query = $query;\n }", "public function setQuery($query)\n {\n $this->query = $query;\n }", "public function __construct(Doctrine_Query $query)\n {\n $this->query = $query;\n }", "public static function setQuery($query)\n {\n self::$query = $query;\n }", "protected function setGlobalQuery(){}", "public function Query($query);", "public function init_query_vars()\n {\n }", "public function setQuery($query){\n $this->query = $query;\n return $this;\n }", "private function __construct()\n {\n $this->_queryBuilder = new YMKM_SQL_QueryBuilder();\n }", "public function __construct() {\r\n\t$this->parseQuery = new ParseQuery('_User');\r\n }", "public function createQuery()\n {\n parent::__construct($this->args);\n }", "public function query($query);", "public function query($query);", "public function query($query);", "public function __construct(){\n\t\t$this->search_hand = new SearchHandler();\n\t\t$this->q_former = new QueryFormer($this->results_table);\n\t}", "protected function setupQuery()\n {\n $this->checkUser();\n $this->checkSort();\n $this->checkLimit();\n $this->checkFrom();\n $this->checkTo();\n $this->setupCriteria();\n $this->setupFilters();\n\n if (!empty($this->channel)) {\n $this->channel($this->channel);\n }\n\n $this->_built = true;\n }", "public function __construct()\n {\n parent::__construct();\n if (is_string($this->db)) {\n $this->query->connection = $this->db;\n }\n }", "function setQueries($queries){\n $this->query = $queries;\n }", "public function newQuery();", "public function newQuery()\n {\n }", "public function setQuery($query)\n {\n $this->parameters['query'] = $query;\n }", "public function setQueryParams(array $query): self;", "public function initialize_query() {\n\t\t$this->query = new WP_Query( $this->query_args );\n\t\t\n\t\treturn $this;\n\t}", "protected abstract function _query($query);", "public function __construct($parser = null)\n {\n $this->statementsIds = array();\n if (is_null($parser))\n $this->parser = new MysteriousParser();\n else\n $this->parser = $parser;\n KanojoX::start_urabe();\n }", "public function queryResolved($query);", "function parse($query) {\n # Pulls out the first 'word'.\n $command = strtolower(strstr($query, ' ', true));\n # Pulls out the search term.\n $searchTerm = urlencode(substr(strstr($query,\" \"), 1));\n\n $this->go($command, $searchTerm);\n }", "function __construct($query){\n $this->conn = $this->get_Data_Source();\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->query = $query;\n}", "public function setup_queries_from_request() {\n\n\t\t\t$request_query_args = jet_smart_filters()->query->get_query_args();\n\t\t\t$default_queries = jet_smart_filters()->query->get_default_queries();\n\n\t\t\tforeach ( $default_queries as $provider => $queries ) {\n\t\t\t\tforeach ( $queries as $query_id => $query_args ) {\n\n\t\t\t\t\tif ( ! empty( $request_query_args ) && $request_query_args['jet_smart_filters'] === $provider . '/' . $query_id ) {\n\t\t\t\t\t\t$query_args = array_merge( $query_args, $request_query_args );\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->providers_query_args[ $provider . '/' . $query_id ] = $query_args;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static function publishParser(Container $container): void\n {\n $config = $container->getSingleton(Config::class);\n\n $container->setSingleton(\n Parser::class,\n new \\Valkyrja\\Annotation\\Parsers\\Parser(\n $config['annotation']\n )\n );\n }", "public function newQuery()\n {\n return new static($this->client, $this->grammar, $this->processor);\n }", "public function __construct(ConnectionInterface $connection, Search $query = null)\n {\n $this->connection = $connection;\n $this->query = $query ?: $connection->getQueryGrammar();\n }", "public function __construct($query, $datashape)\n {\n $this->query = $query;\n $this->datashape = $datashape;\n }", "abstract public function query($query);", "abstract public function query($query);", "abstract public function query($query);", "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "public function setQuery($query)\n {\n $this->query = $query;\n\n return $this;\n }", "public function __construct(QueryFactory $entity_query) {\n $this->entityQuery = $entity_query;\n }", "abstract public function registerParsers();", "protected function setUp()\n {\n $this->lexer = new QueryLexer;\n $this->object = new QueryParser($this->lexer);\n }", "public function getQueryManager();", "public function __construct($_query = NULL)\n {\n parent::__construct(array('query'=>$_query),false);\n }", "public function initParser()\n {\n $parserType = CheckoutApi_Client_Constant::PARSER_CLASS_GROUP.$this->getRespondType(); \n\n $parserObj = CheckoutApi_Lib_Factory::getSingletonInstance($parserType) ;\n $this->setParser($parserObj); \n }", "public function useEDisMaxQueryParser()\n {\n }" ]
[ "0.634946", "0.6281294", "0.6226959", "0.6185633", "0.6123861", "0.61174756", "0.61174756", "0.61174756", "0.61174756", "0.6103382", "0.6090944", "0.5973109", "0.597155", "0.5943803", "0.5903739", "0.5866716", "0.57936597", "0.5749936", "0.57487386", "0.5745954", "0.574131", "0.5718244", "0.5677718", "0.56722283", "0.5671454", "0.5634023", "0.56190073", "0.5616225", "0.5616225", "0.5616225", "0.5616225", "0.5616131", "0.5616131", "0.56126", "0.5603784", "0.560339", "0.55945635", "0.55820465", "0.5572443", "0.5572443", "0.5572443", "0.5572443", "0.557144", "0.555069", "0.55500484", "0.5539579", "0.5536996", "0.55292314", "0.5525579", "0.5522829", "0.5510954", "0.5510954", "0.55006135", "0.55006135", "0.5483587", "0.5479361", "0.54780376", "0.54497147", "0.54478055", "0.5434463", "0.542535", "0.53953063", "0.5390317", "0.5386151", "0.5386151", "0.5386151", "0.53719634", "0.53580874", "0.53574884", "0.5344351", "0.53396434", "0.5328644", "0.53271556", "0.5303672", "0.52944565", "0.5292259", "0.52913946", "0.5288501", "0.5282649", "0.52763116", "0.5263355", "0.525963", "0.52587026", "0.5258387", "0.52447593", "0.52410954", "0.52410954", "0.52410954", "0.52369493", "0.52369493", "0.52369493", "0.52369493", "0.52369493", "0.5236838", "0.52361274", "0.5233315", "0.5230961", "0.5226149", "0.52228516", "0.5217797" ]
0.7225512
0
Injects http part implementation
Вставляет реализацию части HTTP
public function injectPart(HttpPartInterface $part) { $this->part = $part; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHttpPartInstance()\n {\n }", "public function getHttpPartInstance();", "function __construct() {\n $this->HTTP = parent::__construct();\n }", "public function getHttpPartInstance()\n {\n return $this->part->getInstance();\n }", "public function httpAdapter() {\n\t\tstatic $http;\n\n\t\tif ( isset($http) ) return $http;\n\n\t\t// WP_Http\n\t\tif ( class_exists('WP_Http') ) {\n\t\t\trequire_once 'Discovery/HTTP/WP_Http.php';\n\t\t\treturn $http = new Discovery_HTTP_WP();\n\t\t}\n\n\t\t// Zend_HTTP\n\t\t@include_once 'Zend/Http/Client.php';\n\t\tif ( class_exists('Zend_Http_Client') ) {\n\t\t\trequire_once 'Discovery/HTTP/Zend.php';\n\t\t\treturn $http = new Discovery_HTTP_Zend();\n\t\t}\n\n\t\t// PEAR HTTP_Request2\n\t\t@include_once 'HTTP/Request2.php';\n\t\tif ( class_exists('HTTP_Request2') ) {\n\t\t\trequire_once 'Discovery/HTTP/Pear.php';\n\t\t\treturn $http = new Discovery_HTTP_Pear();\n\t\t}\n\t}", "abstract function serve($full, $base);", "abstract public function getHttp();", "protected function buildHttpProcessor()\n {\n return new HTTP($this);\n }", "public function getHttpFactory();", "public function withHTTPUri($uri);", "function http_depends()\n{\n return array();\n}", "public function __construct(array $parameters)\n{\n\n$this->_parameters = $parameters;\n$baseUrl = $this->getParameter('base_url');\n$client = new Client(['base_url' => $baseUrl]);\n$this->_client = $client;\n}", "function _oembed_rest_pre_serve_request($served, $result, $request, $server)\n{\n}", "public function setPart(int $part, $value) {\n if (!array_key_exists($part, $this->parts)) {\n throw new InvalidArgumentException(\"Unknown URL part constant provided'$part'\");\n }\n if ($part === self::QUERY) {\n $this->setQuery($value);\n } else if ($part === self::PORT) {\n if (!is_int($value) && $value !== null) {\n throw new InvalidArgumentException(\"Invalid URL port $value\");\n }\n $this->parts[$part] = $value;\n } else if ($part === self::SCHEME) {\n if ($value !== null) {\n $value = strtolower($value);\n }\n $this->parts[self::SCHEME] = $value;\n } else if (is_string($value) || $value === null) {\n if ($value === '') {\n $value = null;\n }\n $this->parts[$part] = $value;\n } else {\n $v = var_export($value, true);\n $partName = array_search($part, self::$map);\n throw new InvalidArgumentException(\"Malformed URL $partName $v\");\n }\n return $this;\n }", "public function __construct()\n {\n $this->request = HTTP_OAuthProvider_Request::getInstance();\n\n // Set default handler\n $fetch_consumer = array('HTTP_OAuthProvider', 'fetchConsumerHandler');\n $this->setFetchConsumerHandler($fetch_consumer);\n }", "public function addPart(UploadPartInterface $part);", "public function injectHttpRequest(RequestInterface $httpRequest)\n {\n $this->httpRequest = $httpRequest;\n }", "public function __construct() {\n\n\t\t// set these properties\n\t $this->Request_Method = $_SERVER['REQUEST_METHOD'];\n\t $this->Requested_Url = explode('?', $_SERVER['REQUEST_URI']);\n\t $this->Requested_Url_Components=array_reverse(explode('/', $this->Requested_Url[0]));\n\t\n\t\t//set the version number\n\t\tif(isset($this->Requested_Url_Components[1])){\n\n\t\t $this->version_number=$this->Requested_Url_Components[1];\n\n\t\t}else{\n\n\t\t $this->version_number='version number missing';\n\n\t\t}\n\n\t\t//set the API name\n\t\tif(isset($this->Requested_Url_Components[0])){\n\n\t\t $this->Requested_API=$this->Requested_Url_Components[0];\n\n\t\t}else{\n\n\t\t $this->Requested_API='API name missing';\n\n\t\t}\n\n\t\t//now load it!\n\t\t$this->loadAPI();\n\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->addOpenRequestHandler([$this, \"onGetRequest\"]);\n }", "function setup() {\n //$this->url = $r->getBaseUrl().\"/server.php?q=\";\n $this->url = \"http://localhost/diogo/restserver/tests/server.php?q=\";\n }", "public function __construct () {\r\n\t\t// Split out endpoint class\r\n\t\t$la_script_path = explode('/', $_SERVER['SCRIPT_NAME']);\r\n\t\t$la_script_name = array_pop($la_script_path);\r\n\t\t//\r\n\t\t$la_script_name = explode('.', $la_script_name);\r\n\t\tarray_pop($la_script_name);\r\n\t\t$ls_script_name = ucfirst(implode('.', $la_script_name));\r\n\r\n\t\t$ls_endpoint_file_path = './endpoint/' . $ls_script_name . '.php';\r\n\t\tif (!file_exists($ls_endpoint_file_path)) {\r\n\t\t\t$this->set_http_response(500);\r\n\t\t\tdie(json_encode(array('error' => array(\"Cannot find corresponding endpoint file: $ls_endpoint_file_path\")))); // Convert to json \r\n\t\t}\r\n\t\tinclude $ls_endpoint_file_path;\r\n\r\n\t\t$ls_endpoint_name = 'RestmeEndpoint\\\\' . $ls_script_name;\r\n\t\t$this->endpoint_class = new $ls_endpoint_name;\r\n\r\n\t\t$this->is_json = (array_key_exists('HTTP_ACCEPT', $_SERVER) && strpos($_SERVER['HTTP_ACCEPT'], 'json') !== false);\r\n\t\t$this->method = strtoupper($_SERVER['REQUEST_METHOD']);\r\n\t\t$this->true_method = $this->_get_true_method();\r\n\t\t$this->version = (!empty($_SERVER['ACCEPT_VERSION']) || !empty($_SERVER['HTTP_ACCEPT_VERSION'])) ? $_SERVER['ACCEPT_VERSION'] . $_SERVER['HTTP_ACCEPT_VERSION'] : '0.0.1';\r\n\r\n\t\t$this->query = $this->get_query();\r\n\r\n\t\t$li_path_length = strlen(implode('/', $la_script_path));\r\n\t\t$la_request_uri = parse_url(substr($_SERVER['REQUEST_URI'], $li_path_length)); // get rid of the path up to the file.\r\n\t\t$la_request_uri = explode('/', trim($la_request_uri['path'], '/'));\r\n\t\t\r\n\t\t// $this->url_parts = new RURL_mapper($la_request_uri);\r\n\t\t$this->url_parts = $la_request_uri;\r\n\t}", "function __construct($url,$headers,$content) {\n $this->_url = $url;\n $this->_headers = $headers;\n $this->_content = $content;\n }", "public function __construct()\n {\n $this->cosmetics = new CosmeticsEndpoint();\n $this->shop = new ShopEndpoint();\n $this->news = new NewsEndpoint();\n }", "public function request($uri, $data=null, \\Phalcon\\DiInterface $dependencyInjector=null){ }", "public function init()\n {\n\n // reset the servlet request\n $httpRequest = $this->getHttpRequest();\n\n // initialize the parts\n foreach ($httpRequest->getParts() as $part) {\n $this->addPart(Part::fromHttpRequest($part));\n }\n\n // set the body content if we can find one\n if ($httpRequest->getHeader(HttpProtocol::HEADER_CONTENT_LENGTH) > 0) {\n $this->setBodyStream($httpRequest->getBodyContent());\n }\n\n // copy server variables to members\n $this->setServerName($this->getServerVar(ServerVars::SERVER_NAME));\n $this->setQueryString($this->getServerVar(ServerVars::QUERY_STRING));\n $this->setRequestUri($this->getServerVar(ServerVars::X_REQUEST_URI));\n $this->setDocumentRoot($this->getServerVar(ServerVars::DOCUMENT_ROOT));\n $this->setRequestUrl($this->getServerVar(ServerVars::HTTP_HOST) . $this->getServerVar(ServerVars::X_REQUEST_URI));\n }", "function __construct() {\n\n\t\t$net_uri = str_replace('/' ,' ',$_SERVER['REQUEST_URI']);\n\t\t$parts = explode('/',$_SERVER['REQUEST_URI']);\n\t\t$this->_page = array_shift($parts);\n\t\t\n\t\tif(strpos($parts[count($parts) - 1],'.html') !== false) {\n\t\t\t$this->_theme = array_pop($parts);\n\t\t}\n\n\t\t$this->_parts = $parts;\n\n\t}", "public function __construct(HttpRequestInterface $request, HttpResponseInterface $response)\n {\n // add request and response\n $this->request = $request;\n $this->response = $response;\n }", "public function injectRequest(Lamb_App_Request $request = null);", "function service_request_handler()\r\r\n\t{\r\r\n\t\tparent::__construct();\r\r\n\t}", "public function __construct() {\n $this->url = '/' . $this->getUrl();\n $this->requestMethod = $this->getRequestMethod();\n }", "public function testAddMetaHttp()\n {\n $this->todo('stub');\n }", "protected function setupHttp()\n {\n $this->browser = new \\Neos\\Flow\\Http\\Client\\Browser();\n $this->browser->setRequestEngine(new \\Neos\\Flow\\Http\\Client\\InternalRequestEngine());\n $this->router = $this->browser->getRequestEngine()->getRouter();\n $this->router->setRoutesConfiguration(null);\n\n $serverRequestFactory = new ServerRequestFactory(new UriFactory());\n $request = $serverRequestFactory->createServerRequest('GET', 'http://localhost/neos/flow/test');\n\n /** @var FunctionalTestRequestHandler $activeRequestHandler */\n $activeRequestHandler = self::$bootstrap->getActiveRequestHandler();\n $activeRequestHandler->setHttpRequest($request);\n }", "function micro_set_response( \\Psr\\Http\\Message\\ResponseInterface $response )\n{\n global $app;\n return $app->setResponse( $response );\n}", "protected function transferHttpSettings() {}", "public function __construct() {\n header(\"Access-Control-Allow-Orgin: *\"); //who is allowed to access this page\n header(\"Access-Control-Allow-Methods: GET, POST, UPDATE, DELETE\");\n header(\"Content-Type: application/json; charset=utf8\"); //will be outputing json\n $this->getRestArgs();\n $this->setVerb();\n $this->setServer_data();\n }", "public function boot() {\n\t\tProfiler::record('Boot http kernel');\n\n\t\t$this->sendExposedHeader();\n\t\t$this->detectSubdirectory();\n\t\t$this->createRequest();\n\t\t$this->createResponse();\n\t}", "function micro_set_request( \\Psr\\Http\\Message\\ServerRequestInterface $request )\n{\n global $app;\n return $app->setRequest( $request );\n}", "public function __construct(RestHttp $http = null)\n {\n $this->http = $http !== null ? $http : RestHttp::instance();\n }", "function __construct( $link = null, $Httpheaders = null )\n {\n\n $this->link = $link;\n $this->Httpheaders = $Httpheaders;\n\n //echo 'Http construct<br>';\n }", "function Service_request_handler()\n\t\t{\n\t\t\tparent::__construct();\n\t\t}", "private function url()\n {\n $url = new Url($this->arg);\n $this->response = $url->response;\n }", "public function request(IRequest $request): IHttpHandler;", "public function __construct() {\n $this->method = $_SERVER['REQUEST_METHOD'];\n\n if ($this->method == 'POST' && array_key_exists('HTTP_X_HTTP_METHOD', $_SERVER)) {\n if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'DELETE') {\n $this->method = 'DELETE';\n } else if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'PUT') {\n $this->method = 'PUT';\n } else {\n $this->fail(\"Invalid Request Method in HTTP_X_HTTP_METHOD\", 405);\n }\n }\n\n // Get the parameters\n // We are expecting something like /some/path/queue.php/job_id\n $fname = basename($_SERVER['SCRIPT_NAME']);\n $uriparts = explode($fname, $_SERVER['REQUEST_URI']);\n if ($uriparts === false || count($uriparts) < 2) {\n $this->fail(\"Invalid URI\", 400);\n }\n\n // This now splits /arg1/arg2\n $args = explode('/', $uriparts[1]);\n array_shift($args);\n $this->args = $args;\n\n // log\n //$GLOBALS['log']->info('Incoming REST call for method '.$this->method.' with arguments: '.implode($args));\n }", "protected function initParts() {\r\n return array(\r\n 'getDomainVerification' => new PartnerAPITypeGetDomainVerificationRequest()\r\n );\r\n }", "function getUrlParm($part)\n {\n\n $response = [\"isUrlParm\" => false];\n \n $partL = explode(\":\", $part);\n if(count($partL) != 2) \n return $response;\n\n $response['isUrlParm'] = true;\n $response['type'] = $partL[0];\n $response['varName'] = $partL[1];\n return $response;\n }", "public function injectRequest(GuzzleRequest $request);", "public function http(HttpServer $instance = null);", "public function __construct()\n {\n parent::__construct();\n\n $this->http = new Client();\n }", "public function setUp()\n {\n list($config, $http) = array(new Configuration, new HttpIntegration);\n\n $container = $http->define(new Container, $config);\n\n $response = $container->get(self::RESPONSE);\n\n $this->delegate = new FinalDelegate($response);\n\n $this->dispatcher = new Dispatcher;\n\n $this->request = $container->get(self::REQUEST);\n }", "function __construct(QApp $app)\n\t{\n\t\t$this->Http($app);\n\t}", "function addRoute(\\Slim\\App &$app, string $url, string $file, array $config, int $char_id, string $type = 'get')\n{\n $validTypes = ['get', 'post'];\n if (!in_array($type, $validTypes)) throw new \\IllegalArguementException(\"Invalid type: $type\");\n $app->$type($url, function (\\Psr\\Http\\Message\\ServerRequestInterface $request, \\Psr\\Http\\Message\\ResponseInterface $response, array $args) \n use ($app, $file, $char_id, $config) {\n return (include \"view/\" . $file)->withHeader('Access-Control-Allow-Origin', \"https://\" . $config['domain'])->withHeader('Access-Control-Allow-Methods', 'GET, POST')->withHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept, Origin, Authorization');\n });\n}", "public function __construct()\n {\n $this->http = \\curl_init();\n }", "function __construct()\n {\n $this->edan = new edan_handler();\n $this->service = 'content/v1.1/content/getContent.htm';\n }", "public function __construct(protected ConfigContract $config, protected HttpFactory $http)\n {\n //\n }", "public function init() {\n\t\tparent::init();\n\t\t$this->setActualGet($_GET);\n\t\t$this->setActualRequest($_REQUEST);\n\t}", "function init_api() {\n register_rest_route( 'ppom/v1', '/get/product/', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'get_ppom_meta_info_product'),\n ));\n \n // setting meta fields about meta against product\n register_rest_route( 'ppom/v1', '/set/product/', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'ppom_save_meta_product'),\n ));\n \n // delete meta fields about meta against product\n register_rest_route( 'ppom/v1', '/delete/product/', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'delete_ppom_fields_product'),\n ));\n \n \n // Orders\n // getting ppom fields against product\n register_rest_route( 'ppom/v1', '/get/order/', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'get_ppom_meta_info_order'),\n ));\n \n // setting meta fields about meta against product\n register_rest_route( 'ppom/v1', '/set/order/', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'ppom_update_meta_order'),\n ));\n \n // delete meta fields about meta against product\n register_rest_route( 'ppom/v1', '/delete/order/', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'delete_ppom_fields_order'),\n ));\n }", "private function __construct() {\n\t\t$this->isHttps = $this->checkRequestSecure();\n\t\t$this->headers = $this->getHeaders();\n\t\t$this->httpMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : self::HTTP_GET;\n\t\t$this->contentTypes = $this->getContentTypes(array(ContentType::TEXT));\n\t\t$this->userIP = $_SERVER['REMOTE_ADDR'];\n\n\t\t$this->processUri();\n\n\t\t$content_type = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : (isset($_SERVER['HTTP_CONTENT_TYPE']) ? $_SERVER['HTTP_CONTENT_TYPE'] : null);\n\n\t\tswitch ($content_type) {\n\t\t\tcase ContentType::JSON:\n\t\t\t\t$this->dataPost = json_decode(file_get_contents(\"php://input\"), true);\n\n\t\t\t\tbreak;\n\t\t\tcase ContentType::XML:\n\t\t\t\t$xml = simplexml_load_string(file_get_contents(\"php://input\"));\n\n\t\t\t\tif ($xml != false) {\n\t\t\t\t\t$json = json_encode($xml);\n\t\t\t\t\t$this->dataPost = json_decode($json, true);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'PUT') {\n\t\t\t\t\tparse_str(file_get_contents(\"php://input\"), $this->dataPost);\n\t\t\t\t} else {\n\t\t\t\t\t$this->dataPost = empty($_POST) ? array() : $_POST;\n\t\t\t\t}\n\t\t}\n\n\t\t$this->dataGet = empty($_GET) ? array() : $_GET;\n\t\t$this->dataFiles = empty($_FILES) ? array() : $_FILES;\n\n\t\t// prevent using global variables\n\t\tunset($_POST, $_GET, $_FILES);\n\t}", "public function construct($params){\n return $this->Lianglee_framework_pagehandler($params);\n}", "function __construct()\n {\n try\n {\n module_load_include('inc', 'raptor_glue', 'functions/protocol');\n module_load_include('php', 'raptor_datalayer', 'config/Choices');\n \n $this->m_oPageHelper = new \\raptor\\ProtocolLibPageHelper();\n global $base_url;\n $this->setGobacktoURL($base_url.'/raptor/manageprotocollib');\n } catch (\\Exception $ex) {\n error_log(\"Failed AddProtocolLibPage constructor because \".$ex->getMessage()\n . \"\\n<br>Stack trace...<br>\".Context::debugGetCallerInfo(10));\n throw $ex;\n }\n }", "public function __construct($app) {\n //Defino la aplicacion URI y otros valores\n $config= UrlUri::defineApplicationUri($app->context);\n $config['SESSION_AUTOSTART']= $app->context->getSessionAutostart();\n //Creo el Http request\n $this->httpRequest= new Models\\En_HttpRequest($config);\n $this->httpResponse= new Models\\En_HttpResponse($this->httpRequest);\n $this->app= $app;\n }", "public function add_endpoint() {\n\t\t\\add_rewrite_endpoint( $this->my_account_endpoint, EP_PAGES );\n\t}", "public function __construct()\n\t{\n\t\t$this->processRoute();\n\t\t$this->setHTTPMethod();\n\t}", "public function addPart($part)\r\n {\r\n $this->part.= $part;\r\n }", "function __construct( $http = null ) {\n\t\tif( is_null( $http ) ){\n\t\t\t$this->http = Http::getDefaultInstance();\n\t\t} else {\n\t\t\t$this->http = $http;\n\t\t}\n\t}", "public function fc_endpoint_add_endpoint() {\n\t\tadd_rewrite_endpoint( 'arbitrary', EP_PERMALINK | EP_PAGES );\n\t}", "abstract protected function processing(Request $req);", "public function __construct()\n {\n // Resource type detection\n $request = Request::instance();\n $ext = $request->ext();\n if ('' == $ext) {\n // Automatically detect resource type\n $this->type = $request->type();\n } elseif (!preg_match('/(' . $this->restTypeList . ')$/i', $ext)) {\n // If the resource type is illegal, use the default resource type to access\n $this->type = $this->restDefaultType;\n } else {\n $this->type = $ext;\n }\n // Request method detection\n $method = strtolower($request->method());\n if (!preg_match('/(' . $this->restMethodList . ')$/i', $method)) {\n // If the request method is illegal, use the default request method\n $method = $this->restDefaultMethod;\n }\n $this->method = $method;\n }", "public function resolve($parts, $page) {}", "public function __construct()\n {\n new RequestHandler();\n\n }", "public function __construct() {\n\n // $this->app = &$app;\n $this->app = &Registry::getApp();\n\n $this->request();\n $this->response();\n }", "function __loadHttpSocket(){\n \tif(!$this->Http){\n \t\tApp::import('Core','HttpSocket');\n \t\t$this->Http = new HttpSocket();\n \t}\n }", "public function addPart(PartInterface $part, $name = null)\n {\n if ($name == null) {\n $name = $part->getName();\n }\n $this->parts[$name] = $part;\n }", "public function part($part) {\n get_template_part('parts/' .$part);\n }", "public function init_http_requests() {\r\n\r\n\t\t$post_data = json_decode( file_get_contents( 'php://input' ) );\r\n\r\n\t\t$section = $post_data->section;\r\n\r\n\t\tswitch ( $section ) {\r\n\r\n\t\t\tcase 'getSidebar':\r\n\r\n\t\t\t\tif ( is_active_sidebar( 'lscf_custom_sidebar' ) ) {\r\n\t\t\t\t\tdynamic_sidebar( 'lscf_custom_sidebar' );\r\n\t\t\t\t}\r\n\t\t\t\tdie();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tdie();\r\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->addPostRequestHandler([$this, \"onPostRequest\"]);\n }", "public function inject($stuff) {\r\n\t\t$this->html .= $stuff;\r\n\t}", "function __construct( $url = null ) {\n\t\t$this->http = new Http;\n\t\tif ( $url ) {\n\t\t\t$this->url = $url;\n\t\t}\n\t}", "function http()\n {\n return Http::getInstance();\n }", "public function addPart(ckWsdlPart $part)\r\n {\r\n $this->parts[] = $part;\r\n }", "function add_rewrite_endpoint($name, $places, $query_var = \\true)\n{\n}", "public function build(RequestInterface $request, HttpResponseInterface $httpResponse);", "abstract public function handleSubmission($inject, $submission);", "function __construct()\r\n\t{\r\n\t\t// It is a little complicated\r\n\t\t$protocol = (array_key_exists('HTTPS',$_SERVER) && ($_SERVER['HTTPS'] != \"\" || $_SERVER['HTTPS'] != 'off')) ? \"https\" : \"http\";\r\n\t\t$rUri = $_SERVER['REQUEST_URI'];\r\n\r\n\t\tif(!array_key_exists('REQUEST_URI',$_SERVER) || $_SERVER['REQUEST_URI'] == \"\")\r\n\t\t\t$rUri = $_SERVER['PHP_SELF'];\r\n\t\t$baseUri = strpos($rUri,$_SERVER['SCRIPT_NAME']) === 0 ? $_SERVER['SCRIPT_NAME'] : str_replace('\\\\', '/', dirname($_SERVER['SCRIPT_NAME']));\r\n\t\t$baseUri = rtrim($baseUri, '/');\r\n\t\t$uri = '';\r\n\t\tif(array_key_exists('PATH_INFO',$_SERVER) && $_SERVER['PATH_INFO'] != \"\")\r\n\t\t\t$uri = $_SERVER['PATH_INFO'];\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($_SERVER['REQUEST_URI'] != \"\")\r\n\t\t\t\t$uri = parse_url($protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],PHP_URL_PATH);\r\n\t\t\telseif($_SERVER['PHP_SELF'] == \"\")\r\n\t\t\t\t$uri = $_SERVER['PHP_SELF'];\r\n\t\t\telse\r\n\t\t\t\tthrow new Exception(\"Couldn't detect path.\");\r\n\t\t}\r\n\t\tif($baseUri != \"\" && strpos($uri,$baseUri) === 0)\r\n\t\t\t$uri = substr($uri,strlen($baseUri));\r\n\t\t$uri = trim($uri,'/');\r\n\t\t$this->httpPath = $uri;\r\n\t\t$this->validOutput = explode(',',substr($_SERVER['HTTP_ACCEPT'],0,strpos($_SERVER['HTTP_ACCEPT'],';')));\r\n\t\t$this->httpMethod = $_SERVER['REQUEST_METHOD'];\r\n\t\t$this->functionMap = array();\r\n\t\tswitch(strtoupper($this->httpMethod))\r\n\t\t{\r\n\t\t\tcase 'GET':\r\n\t\t\t\t$this->httpQuery = $_GET;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'POST':\r\n\r\n\t\t\t\t$data = @json_decode(file_get_contents('php://input'), true);\r\n\t\t\t\tif ($data != null){\r\n\t\t\t\t\t$this->httpQuery = $data;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->httpQuery = $_POST;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'PUT':\r\n\t\t\tcase 'DELETE':\r\n\t\t\t\t$this->httpQuery = file_get_contents('php://input');\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "function __construct(){\n\t\t\t/*Instanciamos a la clase UrlParser para crear un objeto que nos devuelva \n\t\t\tun array con las propiedades separadas de la URL */\n\t\t\t$this -> url = new RequestParser();\n\n\t\t\t$this -> segmented_url = explode(\"/\", substr($this -> request_url, 1));\n\t\t\t$this -> redirect_request();\n\t\t}", "public function processApi(){\r\n\r\n\r\n $urlParts = parse_url($_SERVER['REQUEST_URI']);\r\n\r\n parse_str($urlParts['query'], $query);\r\n $this->data=array('param1'=> $query['id']);\r\n\r\n parse_str($urlParts['path'], $path);\r\n\r\n $func=key($path); //yol bilgisi $path ilintili dizisi içerisinde anahtar olarak bulunuyor\r\n\r\n $func=explode(\"/\",$func);\r\n $func=end($func);\r\n\r\n $this->$func();\r\n\t\t\t//else\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}", "public function __construct(){\n $this->appendHeader('1.7');\n }", "public function __construct()\n { \n $this->_boundary = 'BOUNDARY' . md5(time());\n $this->_startpart = '<startpart>';\n $this->_nParts = 0;\n $this->_rawoutput = '';\n }", "public function __construct(){\r\n $this->headers = $_SERVER;\r\n $this->params[\"url\"]=array_merge($_GET, $_POST);\r\n $this->params[\"cookies\"]=$_COOKIE;\r\n }", "function __construct() {\n add_action('rest_api_init', function () {\n register_rest_route(\n 'reins',\n '/products',\n array(\n 'methods' => 'GET',\n 'callback' => array($this, 'view_products'),\n )\n );\n });\n }", "public function register_endpoint() {\n\t\t\tadd_rewrite_endpoint( $this->endpoint, EP_PAGES );\n\t}", "private function __construct() {\n $request = filter_input(INPUT_SERVER,'REQUEST_URI',FILTER_DEFAULT);\n $parts=explode('/',trim($request,'/'));\n //treiem part del nom d'aplicació\n array_shift($parts);\n \n $this->controller=!empty($parts[0])?$parts[0]===\"index.php\"?DEF_CONTROLLER:$parts[0]:DEF_CONTROLLER;\n $this->action=!empty($parts[1])?$parts[1]:DEF_ACTION;\n // completem un array associatiu amb el paràmetres.\n if (!empty($parts[2])){\n $keys=$values=array();\n for($i=2,$cnt=count($parts);$i<$cnt;$i++){\n if($i%2==0){\n // si és parell és una clau\n $keys[]=$parts[$i];\n }\n else{\n //és imparell és un valor\n $values[]=$parts[$i];\n }\n }\n \n $this->params= array_combine($keys, $values);\n \n }\n }", "function init() {\r\n // one of these days....\r\n $serviceroot = '[-placeholder-]'; // populate with the full path to pmwiki.php\r\n\r\n $this->servicecall = $serviceroot.'/pmwiki.php?action=wikimarkup&wikitext=';\r\n\t\t$this->url = get_bloginfo('url').'/wp-content/plugins/'.end(explode(DIRECTORY_SEPARATOR, dirname(__FILE__)));\r\n\t\tadd_action('wp_head', array($this,'head'));\r\n\r\n\t\tadd_action('the_content', array($this,'the_content'), 7);\r\n\r\n\t}", "public function __construct()\n {\n \\Phile\\Event::registerEvent('request_uri', $this);\n }", "function __construct()\n {\n $this->getMethod();\n $this->getUri();\n $this->getPathAndQuery();\n $this->getRequestAndRequestHash();\n $this->parseQuery();\n $this->parseBody();\n $this->getSessionAndCookie();\n }", "public function __construct()\n {\n $this->url = config(\"ipboard.api_url\");\n $this->key = config(\"ipboard.api_key\");\n $this->reference = config(\"ipboard.api_reference_name\");\n\n $this->httpRequest = new HttpClient([\n \"base_uri\" => $this->url,\n \"timeout\" => 3.0,\n \"defaults\" => [\n \"auth\" => [$this->key, \"\"],\n ],\n \"auth\" => [$this->key, \"\"],\n ]);\n }", "public function __construct()\n\t{\n\t\t$this->_oHttp = LetPHP::getClass('letphp.http');\n\t\t// Obtenemos las variables via Ajax locales\n\t\t$this->_aAjaxParams = $this->_oHttp->getParamArray(LetPHP::getConfig('main.session_prefix'));\n\t\t//d($this->_oHttp->getParams());\n\t}", "function _httprequest($url, $fp, $URI, $http_method, $content_type = \"\", $body = \"\")\n {\n }", "public function initialize() {\n\t\t$this->attachObject('response', function() {\n\t\t\treturn Titon::registry()->factory('titon\\net\\Response');\n\t\t});\n\t}", "public function __invoke(RequestInterface $request, ResponseInterface $response) : void;", "public function __construct(){\r\n\t\t$this->attributes = array();\r\n\t\t$this->classes = array();\r\n\t\t\r\n\t\t$this->type = \"http\";\r\n\t\t\r\n\t\t$this->template();\r\n\t}" ]
[ "0.66291976", "0.65138566", "0.5861724", "0.57942736", "0.5726752", "0.55964", "0.5591946", "0.5530913", "0.5395501", "0.53392786", "0.53186554", "0.5219736", "0.5202548", "0.51877224", "0.51600915", "0.5136618", "0.5132149", "0.51241", "0.5115442", "0.5113582", "0.5111931", "0.5102542", "0.5100042", "0.5097805", "0.50958806", "0.506452", "0.5062822", "0.50597316", "0.5055406", "0.5052776", "0.5046112", "0.5043948", "0.5034235", "0.50226074", "0.5011218", "0.5001458", "0.4997413", "0.49919605", "0.49873996", "0.4986637", "0.4979465", "0.49702168", "0.49637938", "0.49608007", "0.49547338", "0.4937639", "0.49318203", "0.49257287", "0.4924889", "0.4924729", "0.49233052", "0.4921718", "0.49143308", "0.49097368", "0.49086982", "0.49083868", "0.48954737", "0.48925695", "0.48920023", "0.48873067", "0.48845392", "0.48803386", "0.48802346", "0.4875852", "0.48705655", "0.48599687", "0.4851696", "0.4835881", "0.4833767", "0.48251194", "0.482494", "0.48176613", "0.48165876", "0.48164997", "0.48163036", "0.4805115", "0.48037094", "0.47978902", "0.47946867", "0.47913042", "0.47863868", "0.47793424", "0.47782782", "0.47731218", "0.47721285", "0.47675565", "0.4766011", "0.47641346", "0.47638887", "0.47608778", "0.47604287", "0.47601274", "0.47572848", "0.4755626", "0.47547367", "0.47541708", "0.47531787", "0.47444823", "0.47428837", "0.47423083" ]
0.74174005
0
Return's the query parser instance
Возвращает экземпляр парсера запросов
public function getQueryParser() { return $this->queryParser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function query() {\n\n $e = new static();\n return new Query($e, $e->__currentSchema);\n\n }", "public function newQuery()\n {\n return new static($this->connection, $this->grammar, $this->processor);\n }", "public function newQuery()\n {\n return new static($this->client, $this->grammar, $this->processor);\n }", "public function getQueryInstance()\n {\n return $this->queryInstance;\n }", "public static function query() {\n return (new static)->newQuery();\n }", "public function getParser()\n {\n return new Parser();\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "public function parser()\n {\n return $this->parser;\n }", "public function parser()\n {\n return $this->parser;\n }", "public function parser()\n {\n return $this->parser;\n }", "public function getQuery()\n {\n // Already resolved\n if (!is_null($this->query))\n return $this->query;\n\n // Create instance\n $instance = new Query($this->getStorageFile());\n\n // Remember\n $this->query = $instance;\n return $this->query;\n }", "public function parser()\n {\n return new Parser($this->current(), $this->all());\n }", "public function parser()\n {\n if (!$this->parser)\n $this->parser = new ModelParser($this);\n\n return $this->parser;\n }", "public function getQuery(): Query\r\n {\r\n return $this->query;\r\n }", "public function getQueryInstance()\n {\n return $this->repository->getQueryInstance();\n }", "public function getInstance()\n {\n if (!$this->parserInstance) {\n\n $this->parserInstance = new Engine($this->parserOptions);\n }\n\n return $this->parserInstance;\n }", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "public function newQuery()\n {\n return new Query($this);\n }", "protected function grammar()\n {\n if (isset($this->grammar)) {\n return $this->grammar;\n }\n\n if (isset(Database::$registrar[$this->driver()])) {\n return $this->grammar = Database::$registrar[$this->driver()]['query']();\n }\n\n switch ($this->driver()) {\n case 'mysql':\n return $this->grammar = new Query\\Grammars\\MySQL($this);\n\n case 'sqlite':\n return $this->grammar = new Query\\Grammars\\SQLite($this);\n\n case 'sqlsrv':\n return $this->grammar = new Query\\Grammars\\SQLServer($this);\n\n case 'pgsql':\n return $this->grammar = new Query\\Grammars\\Postgres($this);\n\n default:\n return $this->grammar = new Query\\Grammars\\Grammar($this);\n }\n }", "public function parser(){\n return $this->parser;\n }", "public function getParser(): Parser\n {\n if (!isset($this->_parser)) {\n $this->_parser = new Parser();\n }\n\n return $this->_parser;\n }", "public function newQuery()\n {\n return new Builder($this->connection, $this->grammar, $this->processor);\n }", "public function getParser() : ParserInterface\n {\n return $this->parser;\n }", "protected function getParser(): Parser\n {\n return new Parser();\n }", "public function newQuery()\n {\n return new static();\n }", "public function getStatementParser();", "public function getStatementParser();", "public function newQuery() {\n return new \\Weblab\\Pipelinedeals\\Query(static::class, static::NAME);\n }", "public static function getInstance()\n {\n static $instance = null;\n if (null === $instance) {\n $instance = new QueryManager();\n }\n return $instance;\n }", "public function getParser()\n {\n\n return $this->parser;\n }", "public function getParser()\n {\n if (!isset($this->_parser)) {\n $this->_parser = new Parser($this->_path);\n }\n return $this->_parser;\n }", "public function getParser()\n {\n return $this->parser;\n }", "public function getParser()\n {\n return $this->parser;\n }", "public function getParser()\n {\n return $this->parser;\n }", "public function getParser()\n {\n return $this->parser;\n }", "public function getParser()\n {\n return $this->parser;\n }", "public function getParser()\n {\n return $this->parser;\n }", "public static function getInstance()\n {\n if (null === \\Spectroscope\\Parser::$instance) {\n \\Spectroscope\\Parser::$instance = new \\Spectroscope\\Parser();\n }\n \n return \\Spectroscope\\Parser::$instance;\n }", "public function getParser(){\n\t\treturn $this->parser;\n\t}", "public static function getInstance(){\r\n\t\treturn new Bkt_Query();\r\n\t}", "public function __get_query() {\n\t\treturn $this->__query;\n\t}", "public function getQuery()\n {\n $query = new \\DrupalConnect\\Query($this->_dm, $this->_documentType, $this->_query);\n $query->setHydrate($this->_hydrate);\n\n return $query;\n }", "public function getParser()\n\t{\n\t\treturn $this->parser;\n\t}", "public function query()\n {\n return $this->my_query;\n }", "public function query()\n {\n return $this->query;\n }", "public function getParser() {\n\t\treturn $this->parser;\n\t}", "public function getParser() {\n\t\treturn $this->parser;\n\t}", "protected function getParser()\n {\n $driver = strtolower(DB::getDriverName());\n\n if (!in_array($driver, $this->drivers)) {\n throw new Exception('The database driver user is not supported!');\n }\n\n $class = sprintf('CrestApps\\CodeGenerator\\DatabaseParsers\\%sParser', ucfirst($driver));\n\n return new $class($this->getTableName(), $this->getDatabaseName(), $this->getLanguages());\n }", "protected function getParser()\n\t{\n\t\tif (!isset($this->parser))\n\t\t{\n\t\t\t$this->parser = ParserBuilder::create()->build($this->path);\n\t\t}\n\n\t\treturn $this->parser;\n\t}", "public static function getQuery() {\n $instance = self::getInstance();\n return $instance->query;\n }", "function parser()\n {\n return o2system()->getService('parser');\n }", "private function getParser()\n {\n if (null === $this->parser) {\n $this->parser = new SeparatorParser();\n }\n\n return $this->parser;\n }", "function get_query()\n {\n return $this->_query;\n }", "protected function queryManager() {\n\t\t\tif (!$this->queryManager)\n\t\t\t\t$this->queryManager = app(QueryManager::class);\n\n\t\t\treturn $this->queryManager;\n\t\t}", "public function getQuery()\n {\n $query = new PhalconMvcQuery($this->getPhql(), $this->_dependencyInjector);\n\n if (is_array($this->_bindParams)) {\n $query->setBindParams($this->_bindParams);\n }\n\n if (is_array($this->_bindTypes)) {\n $query->setBindTypes($this->_bindTypes);\n }\n\n if (is_bool($this->_sharedLock)) {\n $query->setSharedLock($this->_sharedLock);\n }\n\n return $query;\n }", "public static function getQuery()\n {\n return self::$query;\n }", "public function getParser();", "public function getParser();", "public function getQueryGrammar()\n {\n return $this->queryGrammar;\n }", "public function getQueryGrammar()\n {\n return $this->queryGrammar;\n }", "public static function query()\n {\n return new D7Query(static::instantiateAdapter(), get_called_class());\n }", "public function get_query(){\n return $this->query;\n }", "public function getParser() : Spring\\Object\\Parser {\n\t\t\treturn $this->parser;\n\t\t}", "protected function getQuery()\n {\n return $this->_query;\n }", "function getQuery() {\n return $this->query;\n }", "public function newQuery()\n\t{\n\t\t$this->setGlobalQuery();\n\n\t\treturn $this->getModelHandler();\n\t}", "public function getQuery()\r\n {\r\n return $this->query;\r\n }", "public function getQuery() {\n return $this->query; \n }", "function getQuery()\r\n {\r\n// return $this->query;\r\n }", "protected function getQuery() {\n return $this->query;\n }", "public static function parse($query);", "public function getQuery()\n {\n return $this->_query;\n }", "public function getQuery() {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "protected function _getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->_query;\n }" ]
[ "0.7204143", "0.711555", "0.70398426", "0.6993218", "0.69488275", "0.6923009", "0.69061166", "0.68683636", "0.68683636", "0.68683636", "0.68246156", "0.6818362", "0.67632264", "0.6746157", "0.6730583", "0.6707995", "0.6706705", "0.6706705", "0.66858995", "0.6671013", "0.66668665", "0.6635244", "0.66095173", "0.6591496", "0.65700173", "0.6568607", "0.65372205", "0.65372205", "0.65304875", "0.65296656", "0.6521686", "0.65162086", "0.65063804", "0.65063804", "0.65063804", "0.65063804", "0.65063804", "0.65063804", "0.64844376", "0.6473721", "0.6470421", "0.6450822", "0.6438237", "0.6436575", "0.64303315", "0.642715", "0.64159477", "0.64159477", "0.63789594", "0.6376413", "0.6365169", "0.6356456", "0.6342822", "0.63388914", "0.63311726", "0.6310807", "0.63054985", "0.6300095", "0.6300095", "0.6281715", "0.6281715", "0.62795496", "0.6279181", "0.62516695", "0.6250582", "0.62417805", "0.62337095", "0.62269056", "0.6224012", "0.62211764", "0.62145", "0.62059605", "0.61915976", "0.6186769", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6176209", "0.6166097", "0.61645055" ]
0.85367584
0
Parse multipart form data
Парсинг многокомпонентной формы данных
public function parseMultipartFormData($content) { // get request ref to local function context $request = $this->getRequest(); // grab multipart boundary from content type header preg_match('/boundary=(.+)$/', $this->getRequest()->getHeader(HttpProtocol::HEADER_CONTENT_TYPE), $matches); // check if boundary is not set if (!isset($matches[1])) { return; } // get boundary $boundary = $matches[1]; // split content by boundary $blocks = preg_split("/-+$boundary/", $content); // get rid of last -- element array_pop($blocks); // loop data blocks foreach ($blocks as $id => $block) { // of block is empty continue with next one if (empty($block)) { continue; } // check if filename is given // todo: refactor file part generating if (strpos($block, '; filename="') !== false) { // init new part instance $part = $this->getHttpPartInstance(); // seperate headers from body $partHeaders = strstr($block, "\n\r\n", true); $partBody = ltrim(strstr($block, "\n\r\n")); // parse part headers foreach (explode("\n", $partHeaders) as $i => $h) { $h = explode(':', $h, 2); if (isset($h[1])) { $part->addHeader($h[0], trim($h[1])); } } // match name and filename if (preg_match("/name=\"([^\"]*)\"; filename=\"([^\"]*)\".*$/s", $partHeaders, $matches) !== 0) { // set name $part->setName($matches[1]); // set given filename is is set $part->setFilename($matches[2]); // put content to part $part->putContent(preg_replace('/.' . PHP_EOL . '$/', '', $partBody)); // add the part instance to request $request->addPart($part); } // parse all other fields as normal key value pairs } else { // match "name" and optional value in between newline sequences if (preg_match('/name=\"([^\"]*)\"[\r\n]+([^\r\n]*)?/', $block, $matches) !== 0) { $this->getQueryParser()->parseKeyValue($matches[1], $matches[2]); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parse_raw_http_request($input, array &$a_data)\n{\n \n // grab multipart boundary from content type header\n preg_match('/boundary=(.*)$/', $_SERVER['CONTENT_TYPE'], $matches);\n \n // content type is probably regular form-encoded\n if (!count($matches))\n {\n // we expect regular puts to containt a query string containing data\n parse_str(urldecode($input), $a_data);\n return $a_data;\n }\n \n $boundary = $matches[1];\n \n // split content by boundary and get rid of last -- element\n $a_blocks = preg_split(\"/-+$boundary/\", $input);\n array_pop($a_blocks);\n \n // loop data blocks\n foreach ($a_blocks as $id => $block)\n {\n if (empty($block))\n continue;\n \n // you'll have to var_dump $block to understand this and maybe replace \\n or \\r with a visibile char\n \n // parse uploaded files\n if (strpos($block, 'application/octet-stream') !== FALSE)\n {\n // match \"name\", then everything after \"stream\" (optional) except for prepending newlines\n preg_match(\"/name=\\\"([^\\\"]*)\\\".*stream[\\n|\\r]+([^\\n\\r].*)?$/s\", $block, $matches);\n $a_data['files'][$matches[1]] = $matches[2];\n }\n // parse all other fields\n else\n {\n // match \"name\" and optional value in between newline sequences\n preg_match('/name=\\\"([^\\\"]*)\\\"[\\n|\\r]+([^\\n\\r].*)?\\r$/s', $block, $matches);\n $a_data[$matches[1]] = $matches[2];\n }\n }\n}", "private static function getFormData()\n {\n $dados = array();\n $raw_data = file_get_contents('php://input');\n $boundary = substr($raw_data, 0, strpos($raw_data, \"\\r\\n\"));\n if (!$boundary) return $dados;\n\n $parts = array_slice(explode($boundary, $raw_data), 1);\n\n foreach ($parts as $part) {\n if ($part == \"--\\r\\n\") break;\n\n $part = ltrim($part, \"\\r\\n\");\n list($raw_headers, $body) = explode(\"\\r\\n\\r\\n\", $part, 2);\n\n $raw_headers = explode(\"\\r\\n\", $raw_headers);\n $headers = array();\n foreach ($raw_headers as $header) {\n list($name, $value) = explode(':', $header);\n $headers[strtolower($name)] = ltrim($value, ' ');\n }\n\n if (isset($headers['content-disposition'])) {\n $filename = null;\n preg_match(\n '/^(.+); *name=\"([^\"]+)\"(; *filename=\"([^\"]+)\")?/',\n $headers['content-disposition'],\n $matches\n );\n list(, $type, $name) = $matches;\n isset($matches[4]) and $filename = $matches[4];\n\n switch ($name) {\n case 'userfile':\n file_put_contents($filename, $body);\n break;\n default:\n $dados[$name] = substr($body, 0, strlen($body) - 2);\n break;\n }\n }\n }\n return $dados;\n }", "function parse_raw_http_request(array &$data)\n\t{\n\t\t// read incoming data\n\t\t$input = file_get_contents('php://input');\n\n\t\t// grab multipart boundary from content type header\n\t\tpreg_match('/boundary=(.*)$/', $_SERVER['CONTENT_TYPE'], $matches);\n\t\t$boundary = $matches[1];\n\n\t\t// split content by boundary and get rid of last -- element\n\t\t$blocks = preg_split(\"/-+$boundary/\", $input);\n\t\tarray_pop($blocks);\n\n\t\t// loop data blocks\n\t\tforeach ($blocks as $id => $block) {\n\t\t\tif (empty($block)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// you'll have to var_dump $block to understand this and maybe replace \\n or \\r with a visibile char\n\n\t\t\t// parse uploaded files\n\t\t\tif (strpos($block, 'application/octet-stream') !== false) {\n\t\t\t\t// match \"name\", then everything after \"stream\" (optional) except for prepending newlines\n\t\t\t\tpreg_match(\"/name=\\\"([^\\\"]*)\\\".*stream[\\n|\\r]+([^\\n\\r].*)?$/s\", $block, $matches);\n\t\t\t} // parse all other fields\n\t\t\telse {\n\t\t\t\t// match \"name\" and optional value in between newline sequences\n\t\t\t\tpreg_match('/name=\\\"([^\\\"]*)\\\"[\\n|\\r]+([^\\n\\r].*)?\\r$/s', $block, $matches);\n\t\t\t}\n\t\t\t$data[$matches[1]] = $matches[2];\n\t\t}\n\t}", "function parse_raw_http_request(array &$a_data)\n {\n // read incoming data\n $input = file_get_contents('php://input');\n\n if (!isset($_SERVER['CONTENT_TYPE'])) {\n // we expect regular puts to containt a query string containing data\n parse_str(urldecode($input), $a_data);\n return $a_data;\n }\n\n // grab multipart boundary from content type header\n preg_match('/boundary=(.*)$/', $_SERVER['CONTENT_TYPE'], $matches);\n\n // content type is probably regular form-encoded\n if (!count($matches)) {\n // we expect regular puts to containt a query string containing data\n parse_str(urldecode($input), $a_data);\n return $a_data;\n }\n\n $boundary = $matches[1];\n\n // split content by boundary and get rid of last -- element\n $a_blocks = preg_split(\"/-+$boundary/\", $input);\n array_pop($a_blocks);\n\n // loop data blocks\n foreach ($a_blocks as $id => $block) {\n if (empty($block))\n continue;\n\n // you'll have to var_dump $block to understand this and maybe replace \\n or \\r with a visibile char\n\n // parse uploaded files\n if (strpos($block, 'application/octet-stream') !== FALSE) {\n // match \"name\", then everything after \"stream\" (optional) except for prepending newlines\n preg_match(\"/name=\\\"([^\\\"]*)\\\".*stream[\\n|\\r]+([^\\n\\r].*)?$/s\", $block, $matches);\n $a_data['files'][$matches[1]] = $matches[2];\n }\n // parse all other fields\n else {\n // match \"name\" and optional value in between newline sequences\n preg_match('/name=\\\"([^\\\"]*)\\\"[\\n|\\r]+([^\\n\\r].*)?\\r$/s', $block, $matches);\n $a_data[$matches[1]] = $matches[2];\n }\n }\n }", "private function prepareMultipartRequest($data) {\n\t\t$chunks = array();\n\t\t$contentLength = 0;\n\t\t$boundary = \"----moxiehttpclientboundary\";\n\n\t\t$items = $data->getItems();\n\t\tforeach ($items as $name => $item) {\n\t\t\tif (is_string($item)) {\n\t\t\t\t// Normal name/value field\n\t\t\t\t$chunk = \"--\" . $boundary . \"\\r\\n\";\n\t\t\t\t$chunk .= \"Content-Disposition: form-data; name=\\\"\" . $name . \"\\\"\\r\\n\\r\\n\";\n\t\t\t\t$chunk .= $item . \"\\r\\n\";\n\n\t\t\t\t// Add chunk and increase length\n\t\t\t\t$contentLength += strlen($chunk);\n\t\t\t\t$chunks[] = $chunk;\n\t\t\t} else {\n\t\t\t\tif (!file_exists($item[0])) {\n\t\t\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Could not open file: \" . $item[0] . \" for upload using multipart.\");\n\t\t\t\t}\n\n\t\t\t\t// File/stream field\n\t\t\t\t$chunk = \"--\" . $boundary . \"\\r\\n\";\n\t\t\t\t$chunk .= \"Content-Disposition: form-data; name=\\\"\" . $name . \"\\\"; filename=\\\"\" . rawurlencode($item[1]) . \"\\\"\\r\\n\";\n\t\t\t\t$chunk .= \"Content-Type: \" . $item[2] . \"\\r\\n\\r\\n\";\n\n\t\t\t\t// Add before chunk\n\t\t\t\t$contentLength += strlen($chunk);\n\t\t\t\t$chunks[] = $chunk;\n\n\t\t\t\t// Add blob and use the blob size\n\t\t\t\t$contentLength += filesize($item[0]);\n\t\t\t\t$chunks[] = $item;\n\n\t\t\t\t// Add after chunk\n\t\t\t\t$chunk = \"\\r\\n--\" . $boundary . \"--\\r\\n\";\n\t\t\t\t$contentLength += strlen($chunk);\n\t\t\t\t$chunks[] = $chunk;\n\t\t\t}\n\t\t}\n\n\t\t// Set content type, boundary and length\n\t\t$this->setHeader(\"Content-Type\", \"multipart/form-data; boundary=\" . $boundary);\n\t\t$this->setHeader(\"Content-Length\", $contentLength);\n\n\t\treturn $chunks;\n\t}", "public function parse(Request $request): Request\n {\n $contentType = $request->headers->get('CONTENT_TYPE');\n if (empty($contentType)) {\n return $request;\n }\n if (stripos($contentType, 'multipart/form-data') === false) {\n return $request;\n }\n if (!preg_match('/boundary=(.*)$/is', $contentType, $matches)) {\n return $request;\n }\n $boundary = $matches[1];\n\n $rawBody = $request->getContent();\n if (empty($rawBody)) {\n return $request;\n }\n\n $bodyParts = preg_split('/\\\\R?-+' . preg_quote($boundary, '/') . '/s', $rawBody);\n array_pop($bodyParts); // last block always has no data, contains boundary ending like `--`\n\n $bodyParams = [];\n $uploadedFiles = [];\n $filesCount = 0;\n foreach ($bodyParts as $bodyPart) {\n if (empty($bodyPart)) {\n continue;\n }\n\n [$headers, $value] = preg_split('/\\\\R\\\\R/', $bodyPart, 2);\n $headers = $this->parseHeaders($headers);\n\n if (!isset($headers['content-disposition']['name'])) {\n continue;\n }\n\n if (isset($headers['content-disposition']['filename'])) {\n // file upload:\n if ($filesCount >= $this->getUploadFileMaxCount()) {\n continue;\n }\n\n $clientFilename = $headers['content-disposition']['filename'];\n $clientMediaType = Arr::get($headers, 'content-type', 'application/octet-stream');\n $size = mb_strlen($value, '8bit');\n $error = UPLOAD_ERR_OK;\n $tempFilename = '';\n\n if ($size > $this->getUploadFileMaxSize()) {\n $error = UPLOAD_ERR_INI_SIZE;\n } else {\n $tmpResource = tmpfile();\n\n if ($tmpResource === false) {\n $error = UPLOAD_ERR_CANT_WRITE;\n } else {\n $tmpResourceMetaData = stream_get_meta_data($tmpResource);\n $tmpFileName = $tmpResourceMetaData['uri'];\n\n if (empty($tmpFileName)) {\n $error = UPLOAD_ERR_CANT_WRITE;\n @fclose($tmpResource);\n } else {\n fwrite($tmpResource, $value);\n $tempFilename = $tmpFileName;\n $this->tmpFileResources[] = $tmpResource; // save file resource, otherwise it will be deleted\n }\n }\n }\n\n $this->addValue(\n $uploadedFiles,\n $headers['content-disposition']['name'],\n $this->createUploadedFile(\n $tempFilename,\n $clientFilename,\n $clientMediaType,\n $error\n )\n );\n\n $filesCount++;\n } else {\n // regular parameter:\n $this->addValue($bodyParams, $headers['content-disposition']['name'], $value);\n }\n }\n\n return $this->newRequest($request, $bodyParams, $uploadedFiles);\n }", "public function parse()\n {\n $this->stream->rewind();\n parse_str($this->stream->getContents(), $parsed);\n return array_merge($_POST, $parsed);\n }", "public function parse_rawPostToArray($data, $boundary) {\r\n\t\t// Reff : https://stackoverflow.com/a/3290846/10351006\r\n\r\n\t\t$result = array();\r\n\t\t// $boundary = \"------------V2ymHFg03ehbqgZCaKO6jy\"; // take this from content-type\r\n\t\t$rawfields = explode($boundary, $data);\r\n\t\tarray_pop($rawfields); // drop the last -- piece\r\n\r\n\t\tforeach ($rawfields as $id => $block) {\r\n\t\t\tlist($mime, $content) = explode(\"\\r\\n\\r\\n\", $block, 2); // I think it's <cr><lf> by standards, maybe check!\r\n\t\t\tif (preg_match('/name=\"([^\"]*)\"/i', $mime, $match)) {\r\n\t\t\t\t$result[$match[1]] = $content;\r\n\t\t\t\t// todo: do funky stuff with other fields\r\n\t\t\t} else {\r\n\t\t\t\t$result[] = $content; // just in case...\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "public function getFormData()\n {\n $ret = \"\";\n\n if (count($this->formParams) > 0) {\n foreach ($this->formParams as $name => $param) {\n $data = $param->getData();\n $isArray = is_array($data);\n $items = $isArray? $data: array($data);\n $suffix = count($items) > 1? \"[]\" : \"\";\n\n foreach ($items as $key => $item) {\n $str = \"--\" . $this->_formBoundary;\n $suffix = $isArray? \"[$key]\" : \"\";\n\n $contentDisposition = \"Content-Disposition: form-data; name=\\\"\"\n . str_replace(\"\\\"\", '\\\"', $name) . \"$suffix\\\"\";\n $filename = $param->getFilename();\n if (!Text::isEmpty($filename)) {\n $contentDisposition .= \"; filename=\" . urlencode($filename);\n }\n\n $contentType = \"\";\n $mimeType = $param->getMimeType();\n if (!Text::isEmpty($mimeType)) {\n $contentType = \"Content-Type: $mimeType\";\n }\n\n $content = \"\\n$item\";\n\n $str = Text::concat(\"\\n\", $str, $contentDisposition, $contentType, $content);\n $ret = Text::concat(\"\\n\", $ret, $str);\n }\n }\n\n $ret = Text::concat(\"\\n\", $ret, \"--\" . $this->_formBoundary . \"--\\r\\n\");\n }\n\n return $ret;\n }", "public function parse(){\n $urlParams = $this->getURI();\n\n $urlParams = explode(\"/\",$urlParams);\n $controller = null;\n $action = null;\n if (isset($urlParams[0]) && !empty(trim($urlParams[0]))) {\n $this->controller = strtolower(array_splice($urlParams,0,1)[0]);\n }\n\n if (isset($urlParams[0]) && !empty(trim($urlParams[0]))) {\n $this->action = strtolower(array_splice($urlParams,0,1)[0]);\n }\n $this->params = $urlParams;\n $this->postData = $_POST;\n $this->fileData = $_FILES;\n }", "private static function parseIframeRequest()\n {\n self::$isAjax = true;\n self::$isIframe = true;\n self::$parameters = $_POST;\n unset(self::$parameters['method_']);\n if (!empty($_FILES)) {\n foreach ($_FILES as $k => $files) {\n if (isset($files['error']) and $files['error'] == UPLOAD_ERR_NO_FILE) {\n continue;\n }\n if (isset($files['name']) and !is_array($files['name'])) {\n self::parseParam(self::$parameters, $k, $files);\n continue;\n }\n if (substr($k, -2) != '[]') {\n $k = $k . '[]';\n }\n if (isset($files['name']) and is_array($files['name'])) {\n $files2 = $files;\n $files = [];\n foreach ($files2['name'] as $k2 => $v2) {\n $files[] = [\n 'name' => $v2,\n 'type' => $files2['type'][$k2],\n 'tmp_name' => $files2['tmp_name'][$k2],\n 'error' => $files2['error'][$k2],\n 'size' => $files2['size'][$k2]\n ];\n }\n }\n foreach ($files as $file) {\n if ($file['error'] == UPLOAD_ERR_NO_FILE) {\n continue;\n }\n self::parseParam(self::$parameters, $k, $file);\n }\n }\n }\n }", "protected function formData() {\n\t\t$data = array();\n\t\tif ($this->request->is('put')) {\n\t\t\t$data = json_decode($this->request->data, true);\n\t\t} else {\n\t\t\t$data = json_decode(file_get_contents('php://input'), true);\n\t\t}\n\t\treturn $data;\n\t}", "public function parse()\n {\n if ($this->checkSignature()) {\n $this->valid = true;\n $this->parsePostData();\n } else {\n $this->valid = false;\n }\n }", "protected function getFieldHeader()\n {\n # read the input stream until the empty line after the header\n $position = $this->readUntil(\"\\r\\n\\r\\n\");\n\n # separate the header from the field content\n # remove the header content from the buffer\n $header = substr($this->buffer, 0, $position);\n $this->buffer = substr($this->buffer, $position + 4);\n\n $regex =\n \"/content-disposition:[\\t ]+?form-data;\".\n \"[\\t ]+(?:name=\\\"(.*?)\\\")?\".\n \"(?:;[\\t ]+?filename=\\\"(.*?)\\\")?/i\";\n\n if (preg_match($regex, $header, $matches) !== 1) {\n fclose($this->fp);\n throw new \\sndsgd\\http\\data\\DecodeException(\n \"Invalid multipart data; 'Content-Disposition' \".\n \"malformed or missing in file field header\"\n );\n }\n\n # we have no need for the entire match, so we drop it here\n list( , $name, $filename) = array_pad($matches, 3, \"\");\n\n # if a filename was in the content disposition\n # attempt to find its content type in the field header\n if ($filename !== \"\") {\n $regex = \"/content-type:[\\t ]+?(.*)(?:;|$)/mi\";\n if (preg_match($regex, $header, $matches) === 1) {\n $contentType = strtolower($matches[1]);\n } else {\n $contentType = \"\";\n }\n } else {\n $contentType = \"\";\n }\n\n return [$name, $filename, $contentType];\n }", "function _parse_raw_requst_body($input)\n\t{\n\t\t$data = [];\n\t\t// grab multipart boundary from content type header\n\t\tpreg_match('/boundary=[\"]*([^\"\\s;]+)/', $_SERVER['CONTENT_TYPE'], $matches);\n\t\t// content type is probably regular form-encoded\n\t\tif (!count($matches)) {\n\t\t\tKohana::$log->add(Log::DEBUG, 'RAW BODY boundry - not found');\n\t\t\t// we expect regular puts to containt a query string containing data\n\t\t\t//parse_str(urldecode($input), $data);\n\t\t} else {\n\t\t\t$boundary = preg_quote($matches[1]);\n\n\t\t\t// split content by boundary and get rid of last -- element\n\t\t\t$blocks = preg_split(\"/-+$boundary/\", $input);\n\n\t\t\t// loop data blocks\n\t\t\tforeach ($blocks as $block) {\n\t\t\t\tif (empty($block))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$parts = preg_split('/[\\r\\n][\\r\\n]/', trim($block, \"\\r\\n\"), 2, PREG_SPLIT_NO_EMPTY);\n\n\t\t\t\tif (count($parts) != 2) continue;\n\n\t\t\t\tlist($raw_headers, $body) = $parts;\n\n\t\t\t\tif (\n\t\t\t\tpreg_match(\n\t\t\t\t\t'/name=\"([^\"]+)\"(; *filename=\"([^\"]+)\")?/',\n\t\t\t\t\t$raw_headers,\n\t\t\t\t\t$matches\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t$name = rawurldecode($matches[1]);\n\t\t\t\t\t$filename = isset($matches[3]) ? $matches[3] : NULL;\n\n\t\t\t\t\tif (!isset($filename)) {\n\t\t\t\t\t\t$body = Helpers_Text::trimAsNULL($body);\n\t\t\t\t\t\t$_tmp = \"{$name}={$body}\";\n\t\t\t\t\t\t$_data = NULL;\n\t\t\t\t\t\tparse_str($_tmp, $_data);\n\t\t\t\t\t\t$data = Helpers_Arr::merge($data, $_data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_tmpname = tempnam(NULL, 'tmp');\n\t\t\t\t\t\tif (FALSE !== $_tmpname) {\n\t\t\t\t\t\t\tif (preg_match('@^Content-Type:@im', $body)) {\n\t\t\t\t\t\t\t\t$body = trim(preg_replace('@^Content-Type:[^\\n]*@i', \"\", $body), \"\\r\\n\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfile_put_contents($_tmpname, $body);\n\t\t\t\t\t\t\tchmod($_tmpname, 0666);\n\t\t\t\t\t\t\t$deleteOnShutdown = TRUE;\n\t\t\t\t\t\t\t$_FILES[$name] = [\n\t\t\t\t\t\t\t\t'name' => $filename,\n\t\t\t\t\t\t\t\t'type' => mime_content_type($_tmpname),\n\t\t\t\t\t\t\t\t'tmp_name' => $_tmpname,\n\t\t\t\t\t\t\t\t'error' => UPLOAD_ERR_OK,\n\t\t\t\t\t\t\t\t'size' => filesize($_tmpname),\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($deleteOnShutdown)) {\n\t\t\t\tregister_shutdown_function(function () {\n\t\t\t\t\tforeach ($_FILES as $row) @unlink($row['tmp_name']);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "function _mimeParse(&$text)\n {\n /* Taken from Horde's MIME/Structure.php */\n require_once 'Mail/mimeDecode.php';\n\n /* Set up the options for the mimeDecode class. */\n $decode_args = array();\n $decode_args['include_bodies'] = true;\n $decode_args['decode_bodies'] = false;\n $decode_args['decode_headers'] = false;\n\n $mimeDecode = new Mail_mimeDecode($text, MIME_PART_EOL);\n if (!($structure = $mimeDecode->decode($decode_args))) {\n return false;\n }\n\n /* Put the object into imap_parsestructure() form. */\n MIME_Structure::_convertMimeDecodeData($structure);\n\n return array($structure->headers, $ret = &MIME_Structure::parse($structure));\n }", "public function _parse($data) {\n\n\t\tif( array_key_exists('CONTENT_TYPE', $_SERVER) &&\n\t\t\tstrpos($_SERVER[\"CONTENT_TYPE\"], 'application/json') !== false\n\t\t) {\n\t\t\t$this->post_body = json_decode($data);\n\t\t} else {\n\n\t\t\t$data = explode('&', $data);\n\t\t\t$post = array();\n\t\t\tforeach( $data as $item ) {\n\t\t\t\t$temp = explode('=', $item);\n\t\t\t\t$post[$temp[0]] = html_entity_decode($temp[1]);\n\t\t\t}\n\n\t\t\t$_POST = $post;\n\t\t}\n\t}", "function buildMultipart($boundary, $postFields, $name, $fileName, $contentType, $fileData ) {\n\n $data = '';\n\n // populate normal fields first (simpler)\n foreach ($postFields as $key => $content) {\n $data .= \"--\".$boundary. \"\\r\\n\";\n $data .= 'Content-Disposition: form-data; name=\"' . $key . '\"';\n // note: double endline\n $data .= \"\\r\\n\\r\\n\";\n $data.= $content.\"\\r\\n\";\n }\n $data.=\"--\".$boundary.\"\\r\\n\";\n $data .= 'Content-Disposition: form-data; name=\"' . $name . '\";' .\n ' filename=\"' . $fileName . '\"' . \"\\r\\n\";\n\n $data .= 'Content-Type: ' . $contentType . \"\\r\\n\";\n $data .= \"\\r\\n\";\n // the file itself (note: there's no encoding of any kind)\n\n $data .= $fileData . \"\\r\\n\";\n // last delimiter\n $data .= \"--\" . $boundary . \"--\\r\\n\";\n return $data;\n}", "static private function parseFiles()\n {\n $files = new StdClass;\n foreach ($_FILES as $key => $file)\n foreach ($file as $param => $value) {\n self::parseParam($value, $key, $param, $files);\n }\n return $files;\n }", "function _merge_multipart_form_data( $boundary, &$form_fields, &$form_files ) {\n\t\t$boundary = '--' . $boundary;\n\t\t$multipart_body = '';\n\t\tforeach ( $form_fields as $name => $data) {\n\t\t\t$multipart_body .= $boundary . HTTP_CRLF;\n\t\t\t$multipart_body .= 'Content-Disposition: form-data; name=\"' . $name . '\"' . HTTP_CRLF;\n\t\t\t$multipart_body .= HTTP_CRLF;\n\t\t\t$multipart_body .= $data . HTTP_CRLF;\n\t\t}\n\t\tif ( isset($form_files) ) {\n\t\t\tforeach ( $form_files as $data) {\n\t\t\t\t$multipart_body .= $boundary . HTTP_CRLF;\n\t\t\t\t$multipart_body .= 'Content-Disposition: form-data; name=\"' . $data['name'] . '\"; filename=\"' . $data['filename'] . '\"' . HTTP_CRLF;\n\t\t\t\tif ($data['content-type']!='') \n\t\t\t\t\t$multipart_body .= 'Content-Type: ' . $data['content-type'] . HTTP_CRLF;\n\t\t\t\telse\n\t\t\t\t\t$multipart_body .= 'Content-Type: application/octet-stream' . HTTP_CRLF;\n\t\t\t\t$multipart_body .= HTTP_CRLF;\n\t\t\t\t$multipart_body .= $data['data'] . HTTP_CRLF;\n\t\t\t} \n\t\t}\n\t\t$multipart_body .= $boundary . '--' . HTTP_CRLF;\n\t\treturn $multipart_body;\n\t}", "protected function _parseStructure($data)\n {\n $ob = new Horde_Mime_Part();\n\n $ob->setType($this->_mimeTypes[$data->type] . '/' . ($data->ifsubtype ? strtolower($data->subtype) : Horde_Mime_Part::UNKNOWN));\n\n // Optional for multipart-parts, required for all others\n if ($data->ifparameters) {\n $params = array();\n foreach ($data->parameters as $val) {\n $params[$val->attribute] = $val->value;\n }\n\n $params = Horde_Mime::decodeParam('content-type', $params, 'UTF-8');\n foreach ($params['params'] as $key => $val) {\n $ob->setContentTypeParameter($key, $val);\n }\n }\n\n // Optional entries. 'location' and 'language' not supported\n if ($data->ifdisposition) {\n $ob->setDisposition($data->disposition);\n if ($data->ifdparameters) {\n $dparams = array();\n foreach ($data->dparameters as $val) {\n $dparams[$val->attribute] = $val->value;\n }\n\n $dparams = Horde_Mime::decodeParam('content-disposition', $dparams, 'UTF-8');\n foreach ($dparams['params'] as $key => $val) {\n $ob->setDispositionParameter($key, $val);\n }\n }\n }\n\n if ($ob->getPrimaryType() == 'multipart') {\n // multipart/* specific entries\n foreach ($data->parts as $val) {\n $ob->addPart($this->_parseStructure($val));\n }\n } else {\n // Required options\n if ($data->ifid) {\n $ob->setContentId($data->id);\n }\n if ($data->ifdescription) {\n $ob->setDescription(Horde_Mime::decode($data->description, 'UTF-8'));\n }\n\n $ob->setTransferEncoding($this->_mimeEncodings[$data->encoding]);\n $ob->setBytes($data->bytes);\n\n if ($ob->getType() == 'message/rfc822') {\n $ob->addPart($this->_parseStructure(reset($data->parts)));\n }\n }\n\n return $ob;\n }", "public function resolve(): array\n {\n $files = [];\n $data = [];\n // Fetch content and determine boundary\n $rawData = file_get_contents('php://input');\n\n $strPosData = strpos($rawData, \"\\r\\n\");\n\n if(false === $strPosData) return [];\n $boundary = substr($rawData, 0, strpos($rawData, \"\\r\\n\"));\n // Fetch and process each part\n $parts = $rawData ? array_slice(explode($boundary, $rawData), 1) : [];\n foreach ($parts as $part) {\n // If this is the last part, break\n if ($part == \"--\\r\\n\") {\n break;\n }\n // Separate content from headers\n $part = ltrim($part, \"\\r\\n\");\n list($rawHeaders, $content) = explode(\"\\r\\n\\r\\n\", $part, 2);\n $content = substr($content, 0, strlen($content) - 2);\n // Parse the headers list\n $rawHeaders = explode(\"\\r\\n\", $rawHeaders);\n $headers = array();\n foreach ($rawHeaders as $header) {\n list($name, $value) = explode(':', $header);\n $headers[strtolower($name)] = ltrim($value, ' ');\n }\n // Parse the Content-Disposition to get the field name, etc.\n if (isset($headers['content-disposition'])) {\n preg_match(\n '/^form-data; *name=\"([^\"]+)\"(; *filename=\"([^\"]+)\")?/',\n $headers['content-disposition'],\n $matches\n );\n $fieldName = $matches[1];\n $fileName = ($matches[3] ?? null);\n // If we have a file, save it. Otherwise, save the data.\n if ($fileName !== null) {\n $localFileName = tempnam(sys_get_temp_dir(), 'sfy');\n file_put_contents($localFileName, $content);\n $files = $this->transformData($files, $fieldName, [\n 'name' => $fileName,\n 'type' => $headers['content-type'],\n 'tmp_name' => $localFileName,\n 'error' => 0,\n 'size' => filesize($localFileName)\n ]);\n // register a shutdown function to cleanup the temporary file\n register_shutdown_function(function () use ($localFileName) {\n unlink($localFileName);\n });\n } else {\n $data = $this->transformData($data, $fieldName, $content);\n }\n }\n }\n $fields = new ParameterBag($data);\n\n return array_merge($fields->all(),$files);\n }", "public function parseInputs()\n {\n if (count($_GET) !== 0) {\n $this->get = $this->handleGetPost($_GET);\n }\n\n /* Parse post requests */\n $postVars = $_POST;\n\n if (in_array($this->request->getMethod(), ['put', 'patch', 'delete'], false) === true) {\n parse_str(file_get_contents('php://input'), $postVars);\n }\n\n if (count($postVars) !== 0) {\n $this->post = $this->handleGetPost($postVars);\n }\n\n /* Parse get requests */\n if (count($_FILES) !== 0) {\n $this->file = $this->parseFiles();\n }\n }", "public function handlePOST() {\n global $request;\n\n $field = NULL;\n $fields = $request->variable_names();\n\n foreach($fields as $key => $value) {\n if(preg_match('~[0-9]~',$value) === 1) {\n $number = preg_replace('/[^0-9]+/', '', $value);\n $value = preg_replace('/[0-9]/', '', $value);\n }\n\n switch($value) {\n case\"filepond\":\n $field = 'filepond';\n break;\n \n case\"bannerUpload\":\n $field = 'bannerUpload';\n break;\n \n case\"thumbnailUpload\":\n $field = 'thumbnailUpload';\n break;\n\n case\"avatarUpload\":\n $field = 'avatarUpload';\n break;\n\n case\"mentorAvatarUpload\":\n $field = 'mentorAvatarUpload';\n break;\n\n case\"lessonThumbnailUpload\":\n $field = 'lessonThumbnailUpload'.$number;\n break;\n\n case\"materialWorkbookUpload\":\n $field = 'materialWorkbookUpload'.$number;\n break;\n }\n }\n\n if(!empty($field)) {\n // Get submitted field data item, will always be one item in case of async upload\n $items = $this->FilePond->loadFilesByField($field);\n\n // If no items, exit\n if (count($items) === 0) {\n // Something went wrong, most likely a field name mismatch\n header($request->server(\"SERVER_PROTOCOL\") . \" 400 Bad Request\", true, 400);\n\n return;\n }\n // Returns plain text content\n header('Content-Type: text/plain');\n // Remove item from array Response contains uploaded file server id\n echo array_shift($items)->getId();\n } else {\n header($request->server(\"SERVER_PROTOCOL\") . \" 400 Bad Request\", true, 400);\n }\n }", "protected function _parseFileInfo($fileInfo)\n {\n if (!$this->_adapter) {\n $this->_buildAdapter();\n }\n\n // Grab the info from $_FILES array (prior to receiving the files).\n $fileInfoArray = $this->_adapter->getFileInfo($fileInfo);\n\n // Include the index of the form so that we can use that if necessary.\n foreach ($fileInfoArray as $index => $info) {\n // We need the index of this as well b/c the file info is passed\n // around (not the form index).\n $info['form_index'] = $index;\n $fileInfoArray[$index] = $info;\n }\n return $fileInfoArray;\n }", "public function parseRawBody(){\n\t\t\t// First check if this is a possible multipart\n\t\t\tif ($this->isMultipart()){\n\t\t\t\tDebug::log(\"Body is multipart\", Debug::DEBUG_LEVEL_LOW);\n\t\t\t\t$contentType = $this->getDataHeader(\"content-type\");\n\t\t\t\tif (isset($contentType['boundary'])){\n\n\t\t\t\t\t$boundary = $contentType['boundary'];\n\n\t\t\t\t\tDebug::log(\"Parsing body with boundary: $boundary\", Debug::DEBUG_LEVEL_LOW);\n\n\t\t\t\t\t$lines = explode(\"\\r\\n\", $this->rawBody);\n\t\t\t\t\t$parsingState = \"\";\n\t\t\t\t\t$currentChildEnvelope;\n\n\t\t\t\t\tforeach($lines as $line){\n\n\t\t\t\t\t\tDebug::log(\"Parsing body line: $line\", Debug::DEBUG_LEVEL_LOW);\n\n\t\t\t\t\t\tif ($line === \"--$boundary--\" || ($parsingState === \"PARSING BODY\" && $line === \"--$boundary\")){\n\t\t\t\t\t\t\t// End of this boundary, emit the child envelope\n\t\t\t\t\t\t\tif (isset($currentChildEnvelope)){\n\n\t\t\t\t\t\t\t\t// Parse the child envelope\n\t\t\t\t\t\t\t\t$currentChildEnvelope->parseRawDataHeaders();\n\t\t\t\t\t\t\t\t$currentChildEnvelope->parseDataHeaders();\n\t\t\t\t\t\t\t\t$currentChildEnvelope->parseRawBody();\n\n\t\t\t\t\t\t\t\t// Add it to this instance's multiparts\n\t\t\t\t\t\t\t\t$this->multiparts[] = $currentChildEnvelope;\n\n\t\t\t\t\t\t\t\t// Set the parent\n\t\t\t\t\t\t\t\t$this->parentEnvelope = $this;\n\n\t\t\t\t\t\t\t\t// Clear the variable\n\t\t\t\t\t\t\t\t$currentChildEnvelope = null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (($parsingState === \"PARSING BODY\" && $line === \"--$boundary\")){\n\t\t\t\t\t\t\t\t// The body parsing previously ended because a new boundary was ran into\n\t\t\t\t\t\t\t\t$parsingState = \"PARSING HEADERS\";\n\t\t\t\t\t\t\t\t$currentChildEnvelope = new Envelope();\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$parsingState = \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif ($parsingState === \"\"){\n\t\t\t\t\t\t\t\tif ($line === \"--$boundary\"){\n\t\t\t\t\t\t\t\t\t$currentChildEnvelope = new Envelope();\n\t\t\t\t\t\t\t\t\t$parsingState = \"PARSING HEADERS\";\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t// This means there is text OUTSIDE OF A BOUNDARY\n\t\t\t\t\t\t\t\t\t// This is invalid text, ignore it\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}elseif ($parsingState === \"PARSING HEADERS\"){\n\t\t\t\t\t\t\t\tif ($line !== \"\"){\n\t\t\t\t\t\t\t\t\t$currentChildEnvelope->rawDataHeaders .= $line . \"\\r\\n\";\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t// Blank line, switch to parsing the body\n\t\t\t\t\t\t\t\t\t$parsingState = \"PARSING BODY\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}elseif ($parsingState === \"PARSING BODY\"){\n\t\t\t\t\t\t\t\t$currentChildEnvelope->rawBody .= $line . \"\\r\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t// No boundary set, cannot handle multipart accurately\n\t\t\t\t\t$this->body = $this->rawBody;\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t// No parsing needed\n\t\t\t\tDebug::log(\"Body is NOT multipart\", Debug::DEBUG_LEVEL_LOW);\n\t\t\t\t$this->body = $this->rawBody;\n\t\t\t}\n\t\t}", "public static function detectMultiPartForm($file)\n {\n $endpoint = \"detect/\";\n $url = self::$URL . $endpoint;\n\n $fileName = $file['name'];\n $fileType = $file['type'];\n $fileTmpName = $file['tmp_name'];\n $fileError = $file['error'];\n\n if ($fileError === UPLOAD_ERR_OK) {\n // Prepare curl options\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'accept: application/json',\n 'Content-Type: multipart/form-data'\n ));\n // Set the request body as a multipart/form-data\n $postData = array(\n 'files' => curl_file_create($fileTmpName, $fileType, $fileName)\n );\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);\n // Send the request\n $response = curl_exec($curl);\n\n // Check for curl errors\n if (curl_errno($curl)) {\n $error = curl_error($curl);\n // Handle the error, e.g. by logging or displaying an error message\n echo \"cURL error: \" . $error;\n }\n\n // Close curl\n curl_close($curl);\n\n // Handle the response\n if ($response) {\n // Handle the response, e.g. by parsing the JSON or displaying the result\n // echo \"Response: \" . $response;\n return $response;\n } else {\n // Handle the error, e.g. by logging or displaying an error message\n echo \"Error sending HTTP request\";\n }\n } else {\n // Handle file upload error, e.g. by logging or displaying an error message\n echo \"File upload failed with error code: \" . $fileError;\n }\n }", "public function uploadParseFile() {\n\n if (isset($_FILES['po_file'])) {\n\n //if no error found of file extension then Go proceed\n if ($this->validateExtension($_FILES['po_file']['name']) == \"\") {\n\n\n\n //uploaded file will be used to parse data\n $this->uploadedFile = str_replace(\" \", \"_\", $this->uploadPath . $_FILES[\"po_file\"]['name']);\n\n if (move_uploaded_file($_FILES['po_file']['tmp_name'], $this->uploadedFile)) {\n \n }\n $include_header = isset($_POST['include_header']) ? 1 : 0;\n\n $this->parsePoFile($this->uploadedFile, $include_header);\n } else {\n \n }\n }\n }", "public function multipartData() {\n $this->attributes['enctype'] = 'multipart/form-data';\n return $this;\n }", "abstract public function finishMultipart();", "protected function _parse_post()\n {\n $this->_post_args = $_POST;\n\n if ($this->request->format) {\n $this->request->body = $this->input->raw_input_stream;\n }\n }", "protected function parsePostData()\n {\n $defaults = array('FromUserName', 'ToUserName', 'MsgId', 'CreateTime');\n $attrs = array(\n 'text' => array('Content'),\n 'image' => array('PicUrl'),\n 'location' => array('Location_X', 'Location_Y', 'Scale', 'Label'),\n 'voice' => array('MediaId', 'Format'),\n 'event' => array('Event', 'EventKey'),\n 'video' => array('MediaId', 'ThumbMediaId'),\n 'link' => array('Title', 'Description', 'Url')\n );\n\n if ($this->postData) {\n $postObj = @simplexml_load_string($this->postData, 'SimpleXMLElement', LIBXML_NOCDATA);\n $this->msgType = isset($postObj->MsgType) ? (string)$postObj->MsgType : null;\n if (isset($attrs[$this->msgType])) {\n foreach (array_merge($defaults, $attrs[$this->msgType]) as $field) {\n if (isset($postObj->$field)) {\n $name = lcfirst(strtr($field, array('_' => '')));\n $this->$name = (string)$postObj->$field;\n }\n }\n }\n }\n }", "protected function processUpload()\n {\n $names = []; $fields = []; $valid = true;\n foreach($this->fields as $field) {\n $names[] = ($request_name = $this->getFieldName($field));\n $fields[$request_name] = $field;\n\n if ($field instanceof Form\\Upload) {\n\n $uploader = $field->getHandler();\n\n $errors = [];\n foreach($uploader->upload($this->request, $errors, [$this->getFieldName($field)]) as $name => $resource) {\n\n $this->setValue($field, (string)$resource->getUri());\n }\n\n if (!empty($errors)) {\n foreach($errors as $name => $messages) {\n if (isset($fields[$name])) {\n $field = $fields[$name];\n\n foreach($messages as $message) $this->addFieldError($field, $message, []);\n }\n }\n\n $valid = false;\n }\n }\n }\n\n return $valid;\n }", "public function provideTestParseFormData()\n {\n $data = [];\n $matches = null;\n\n $reflector = new \\ReflectionMethod(NormalizationUtility::class, 'parseForm');\n $docComment = $reflector->getDocComment();\n\n preg_match_all('/- ([^:]*) *: ([0-9]+), (.*)$/umU', $docComment, $matches, PREG_SET_ORDER);\n foreach ($matches as $match) {\n list(, $name, $form, $alternatives) = $match;\n $name = trim($name);\n\n $caption = sprintf('%s - parse as string \\'%s\\'', $name, $form);\n $data[$caption] = [(int) $form, (string) $form];\n\n $caption = sprintf('%s - parse as integer %s', $name, $form);\n $data[$caption] = [(int) $form, (int) $form];\n\n $alternatives = array_map('trim', explode(',', $alternatives));\n foreach ($alternatives as $alternative) {\n switch (strtolower($alternative)) {\n case 'empty':\n $caption = sprintf('%s - parse as empty string', $name);\n $data[$caption] = [(int) $form, ''];\n // continue with inner foreach loop\n continue 2;\n case 'null':\n $caption = sprintf('%s - parse as null', $name);\n $data[$caption] = [(int) $form, null];\n break;\n case 'true':\n $caption = sprintf('%s - parse as boolean true', $name);\n $data[$caption] = [(int) $form, true];\n break;\n case 'false':\n $caption = sprintf('%s - parse as boolean false', $name);\n $data[$caption] = [(int) $form, false];\n break;\n }\n $caption = sprintf('%s - parse as string \\'%s\\'', $name, $alternative);\n $data[$caption] = [(int) $form, (string) $alternative];\n }\n }\n\n return $data;\n }", "protected function prepareFormData(array &$data, $object, $request) {}", "function getFormData() \n {\n return $this->formData;\n \n }", "protected function loadFormData() \n {\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState('com_facegallery.edit.image.data', array());\n\n if (empty($data))\n {\n $data = $this->getItem();\n }\n return $data;\n }", "private function gatherFormData() {\n\t\t$data = array();\n\t\tforeach($this->formElements as $id => $el) {\n\t\t\tif($el['type'] == self::TYPE_LABEL) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$data[$id] = $this->getElementdata($el['element'], $el['type']);\n\t\t}\n\t\treturn $data;\n\t}", "function formdata($array)\r\n\t{\r\n\t\t$this->target($array[frmdt_url]);\r\n\t\t$this->method = 'formdata';\r\n\t\t$this->data = '';\r\n\t\t\r\n\t\tif(!isset($array[frmdt_boundary]))\r\n\t\t $this->boundary = 'phpsploit';\r\n\t\telse\r\n\t\t $this->boundary = $array[frmdt_boundary];\r\n\r\n\t\tforeach($array as $key => $value)\r\n\t\t{\r\n\t\t\tif(!preg_match('#^frmdt_(boundary|url)#',$key))\r\n\t\t\t{\r\n\t\t\t\t$this->data .= str_repeat('-',29).$this->boundary.\"\\r\\n\";\r\n\t\t\t\t$this->data .= 'Content-Disposition: form-data; name=\"'.$key.'\";';\r\n\t\t\t\t\r\n\t\t\t\tif(!is_array($value))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->data .= \"\\r\\n\\r\\n\".$value.\"\\r\\n\";\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$this->data .= ' filename=\"'.$array[$key][frmdt_filename].\"\\\";\\r\\n\";\r\n\r\n\t\t\t\t\tif(isset($array[$key][frmdt_type]))\r\n\t\t\t\t\t $this->data .= 'Content-Type: '.$array[$key][frmdt_type].\"\\r\\n\";\r\n\r\n\t\t\t\t\tif(isset($array[$key][frmdt_transfert]))\r\n\t\t\t\t\t $this->data .= 'Content-Transfer-Encoding: '.$array[$key][frmdt_transfert].\"\\r\\n\";\r\n\r\n\t\t\t\t\t$this->data .= \"\\r\\n\".$array[$key][frmdt_content].\"\\r\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->data .= str_repeat('-',29).$this->boundary.\"--\\r\\n\";\r\n\t\treturn $this->sock();\r\n\t}", "function set_submit_multipart()\n {\n }", "public function parseEditFormData(array $data) : array;", "protected function parsePostData()\r\n {\r\n // Check if the WeChat server signature is valid\r\n $query = $this->query;\r\n $tmpArr = array(\r\n $this->token,\r\n isset($query['timestamp']) ? $query['timestamp'] : '',\r\n isset($query['nonce']) ? $query['nonce'] : ''\r\n );\r\n sort($tmpArr, SORT_STRING);\r\n $tmpStr = sha1(implode($tmpArr));\r\n $this->valid = (isset($query['signature']) && $tmpStr === $query['signature']);\r\n\r\n // Parse the message data\r\n if ($this->valid && $this->postData) {\r\n // Do not output libxml error messages to screen\r\n $useErrors = libxml_use_internal_errors(true);\r\n $attrs = simplexml_load_string($this->postData, 'SimpleXMLElement', LIBXML_NOCDATA);\r\n libxml_use_internal_errors($useErrors);\r\n\r\n // Fix the issue that XML parse empty data to new SimpleXMLElement object\r\n $this->attrs = array_map('strval', (array)$attrs);\r\n }\r\n }", "public static function classifyMultiPartForm($file)\n {\n $endpoint = \"classify/\";\n $url = self::$URL . $endpoint;\n\n $fileName = $file['name'];\n $fileType = $file['type'];\n $fileTmpName = $file['tmp_name'];\n $fileError = $file['error'];\n\n if ($fileError === UPLOAD_ERR_OK) {\n // Prepare curl options\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'accept: application/json',\n 'Content-Type: multipart/form-data'\n ));\n // Set the request body as a multipart/form-data\n $postData = array(\n 'files' => curl_file_create($fileTmpName, $fileType, $fileName)\n );\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);\n // Send the request\n $response = curl_exec($curl);\n\n // Check for curl errors\n if (curl_errno($curl)) {\n $error = curl_error($curl);\n // Handle the error, e.g. by logging or displaying an error message\n echo \"cURL error: \" . $error;\n }\n\n // Close curl\n curl_close($curl);\n\n // Handle the response\n if ($response) {\n // Handle the response, e.g. by parsing the JSON or displaying the result\n // echo \"Response: \" . $response;\n return $response;\n } else {\n // Handle the error, e.g. by logging or displaying an error message\n echo \"Error sending HTTP request\";\n }\n } else {\n // Handle file upload error, e.g. by logging or displaying an error message\n echo \"File upload failed with error code: \" . $fileError;\n }\n }", "function get_data()\n{\n $post = @json_decode(file_get_contents('php://input'), TRUE);\n $get = @json_decode(urldecode($_SERVER['QUERY_STRING']), TRUE);\n return array_merge(is_array($post)? $post: array(), is_array($get)? $get: array(), $_REQUEST, $_FILES);\n}", "protected function _parse_patch()\n {\n // It might be a HTTP body\n if ($this->request->format) {\n $this->request->body = $this->input->raw_input_stream;\n } elseif ($this->input->method() === 'patch') {\n // If no file type is provided, then there are probably just arguments\n $this->_patch_args = $this->input->input_stream();\n }\n }", "public function toMultipart(): array;", "public function getFormdata() {\n\t\treturn $this->formData;\n\t}", "function ciniki_ags_formSubmissionParse(&$ciniki, $tnid, $submission_id) {\n\n //\n // Load the form\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'forms', 'private', 'submissionLoad');\n $rc = ciniki_forms_submissionLoad($ciniki, $tnid, $submission_id);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.ags.255', 'msg'=>'Submission not found', 'err'=>$rc['err']));\n }\n $form = isset($rc['form']) ? $rc['form'] : array();\n if( !isset($form['sections']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.ags.254', 'msg'=>'Incomplete form'));\n }\n\n $exhibit = array(\n 'taxtype_id' => 0,\n 'items' => array(),\n );\n\n //\n // Extract the items\n //\n $item = array(); // Global item across all sections (typically items are only in repeat sections\n foreach($form['sections'] as $sid => $section) {\n if( isset($section['fields']) && isset($section['flags']) && ($section['flags']&0x01) == 0x01 ) {\n for($i = 1; $i <= $section['max_repeats']; $i++) {\n $ritem = array(); // repeat section item\n foreach($section['fields'] as $fid => $field) {\n if( !isset($form['submission']['data'][$field['id']]['repeats'][$i]['data']) ) {\n continue;\n }\n $data = $form['submission']['data'][$field['id']]['repeats'][$i]['data'];\n if( $field['field_ref'] == 'ciniki.ags.item.primary_image_id' && $data > 0 ) {\n $ritem['primary_image_id'] = $data; \n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.name' && $data != '' ) {\n $ritem['name'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.flags.1' && $data == 'on' ) {\n $ritem['flags'] = 0x01;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.unit_amount' && $data != '' ) {\n $ritem['unit_amount'] = preg_replace(\"/[^0-9\\.]/\", '', $data);\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.quantity' && $data != '' ) {\n $ritem['quantity'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.description' && $data != '' ) {\n $ritem['description'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.creation_year' && $data != '' ) {\n $ritem['creation_year'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.medium' && $data != '' ) {\n $ritem['medium'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.size' && $data != '' ) {\n $ritem['size'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.framed_size' && $data != '' ) {\n $ritem['framed_size'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.current_condition' && $data != '' ) {\n $ritem['current_condition'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.notes' && $data != '' ) {\n $ritem['notes'] = $data;\n }\n }\n //\n // Add the item if a name is specified\n //\n if( isset($ritem['name']) && $ritem['name'] != '' ) {\n $exhibit['items'][] = $ritem;\n }\n }\n }\n elseif( isset($section['fields']) ) {\n foreach($section['fields'] as $fid => $field) {\n if( isset($form['submission']['data'][$field['id']]['data']) ) {\n $data = $form['submission']['data'][$field['id']]['data'];\n //\n // Item Fields\n //\n if( $field['field_ref'] == 'ciniki.ags.item.primary_image_id' && $data > 0 ) {\n $item['primary_image_id'] = $data; \n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.name' && $data != '' ) {\n $item['name'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.flags.1' && $data == 'on' ) {\n $item['flags'] = 0x01;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.unit_amount' && $data != '' ) {\n $item['unit_amount'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.quantity' && $data != '' ) {\n $item['quantity'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.description' && $data != '' ) {\n $item['description'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.creation_year' && $data != '' ) {\n $item['creation_year'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.medium' && $data != '' ) {\n $item['medium'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.size' && $data != '' ) {\n $item['size'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.current_condition' && $data != '' ) {\n $item['current_condition'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.item.notes' && $data != '' ) {\n $item['notes'] = $data;\n }\n //\n // Exhibit fields\n //\n elseif( $field['field_ref'] == 'ciniki.ags.exhibit.name' && $data != '' ) {\n $exhibit['name'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.exhibit.synopsis' && $data != '' ) {\n $exhibit['synopsis'] = $data;\n }\n elseif( $field['field_ref'] == 'ciniki.ags.exhibit.description' && $data != '' ) {\n $exhibit['description'] = $data;\n }\n elseif( preg_match(\"/ciniki.ags.exhibit.taxtype_id.([0-9]+)$/\", $field['field_ref'], $m) && $data == 'on' ) {\n $exhibit['taxtype_id'] = $m[1];\n }\n }\n }\n }\n }\n\n if( isset($item['name']) && $item['name'] != '' ) {\n $exhibit['items'][] = $item;\n }\n\n return array('stat'=>'ok', 'exhibit'=>$exhibit);\n}", "protected function loadFormData()\n {\n return $this->getData();\n }", "public function OnParseFormData($file, $index) \n\t{\n\t\t// explode files_data\n\t\t//files_data => [{\"index\":0,\"vtsubmit\":true,\"cksubmit\":true,\"tags\":\"tag1,tag2,tag3\"}]\n\t\t$file->tags \t\t\t= '';\n\t\t$file->urls\t\t\t\t= '';\n\t\tif (isset($_REQUEST['files_data'])) \n\t\t{\n\t\t\t$data_files = json_decode($_REQUEST['files_data']);\n\t\t\tif ($data_files && is_array($data_files))\n\t\t\t{\n\t\t\t\tforeach($data_files as $data_file) {\t\t\t\t\n\t\t\t\t\tif (property_exists($data_file, 'index') && $data_file->index == $index) {\n\t\t\t\t\t\tif (property_exists($data_file, 'tags') && $data_file->tags) \t\t\t\t\t$file->tags = $data_file->tags;\n\t\t\t\t\t\tif (property_exists($data_file, 'urls') && $data_file->urls) \t\t\t\t\t$file->urls = $data_file->urls;\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$data = array('file' => &$file, 'index' => $index);\n\t\t$this->modules->Notify(\"OnParseFormData\", $data);\t\n\t\treturn $file;\n\t}", "protected function loadFormData()\r\n\t{\r\n\t\t\r\n\t\treturn (array)$this->getUserData();\r\n\t}", "private function parsePost() {\n ini_set('memory_limit', '-1');\n $postContent = file_get_contents('php://input');\n\n if (!$postContent) {\n throw new Exception('Unable to parse POST data. Contact the administrator');\n } else {\n return json_decode($postContent);\n }\n }", "public function readHttpRequest() {\n $incomingFormData = file_get_contents('php://input');\n\n return $incomingFormData;\n }", "public function processRequest() {\n // Get the fields from the request.\n $request = sfContext::getInstance()->getRequest();\n $fields = $this->getFieldsFromRequest( $request );\n if( null !== $fields ) {\n // check form values\n if( true === $this->isMultipart() ) {\n $this->bind( $fields, $request->getFiles( $this->name ) );\n } else {\n $this->bind( $fields );\n }\n }\n return $this;\n }", "public function getFormData() {\n $data = $this->content()->toArray();\n\n // make sure the title is always there\n $data['title'] = $this->title();\n\n return $data;\n\n }", "abstract protected function parseIncomingParams();", "protected function extract()\n {\n $header = array();\n $fieldList = array();\n $headers = explode(\"\\n\", $this->httpRaw);\n foreach ($headers as $i => $headerLine) {\n if ($headerLine === '') {\n continue;\n }\n $parts = $this->splitRawLine($headerLine);\n if (isset($parts[1])) {\n $fieldList[$parts[0]] = $parts[1];\n } else {\n $header = preg_split('/ /', $headerLine);\n if (count($header) != 3) {\n throw new HttpParserBadFormatException();\n }\n }\n }\n return array($header, $fieldList);\n }", "public function isMultipart(){\n\t\t\t$contentType = $this->getDataHeader(\"content-type\");\n\t\t\tif ($contentType !== \"\" && isset($contentType['content-type'])){\n\t\t\t\treturn preg_match(\"@multipart\\/.+@i\", $contentType['content-type']) === 1;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "protected function loadFormData()\n {\n return $this->getData();\n }", "function pre_process($data)\r\n\t{\r\n\t\treturn $this->EE->file_field->parse_field($data);\r\n\t}", "public function processRequest() {\n if (!isset($_FILES[$this->name])) {\n $this->setValue($this->getDefaultValue());\n return;\n }\n\n $this->uploadPath->create();\n if (!$this->uploadPath->isWritable()) {\n throw new ZiboException('Upload path ' . $this->uploadPath->getAbsolutePath() . ' is not writable');\n }\n\n if (!$this->isMultiple()) {\n $formFile = $this->uploadFile($_FILES[$this->name]);\n $this->setValue($formFile);\n return;\n }\n\n $values = array();\n\n $files = $this->getMultipleFiles($_FILES[$this->name]);\n foreach ($files as $file) {\n if ($file['error'] == UPLOAD_ERR_NO_FILE) {\n continue;\n }\n\n $formFile = $this->uploadFile($file);\n $values[] = $formFile;\n }\n\n $this->setValue($values);\n }", "function processTheForm($data) {\n $upload = new Magikube_core;\n $path = wp_upload_dir();\n\n if(!empty($data['name'])) {\n $image = $upload->readData();\n \n foreach ($image as $image) {\n $delete_path = $path['basedir'] . '/magikube-uploads/' . $image->option_value;\n }\n\n unlink($delete_path);\n\n $status = $upload->uploadImage($data);\n\n if($status == TRUE) {\n $upload->insertData($data);\n } else {\n return FALSE;\n }\n } else {\n return FALSE;\n }\n }", "protected function loadFormData()\n {\n if (empty($data)) {\n $data = $this->getItem();\n if(isset($data -> attribs) && $data -> attribs){\n $attribs = new JRegistry($data -> attribs);\n $data -> attribs = $attribs -> toArray();\n }\n }\n\n return $data;\n }", "protected function loadFormData()\n {\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState('com_labgeneagrogene.edit.request.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n }\n\n return $data;\n }", "protected function parseData()\n {\n $contentType = null;\n $rawData = null;\n\n if (isset($_SERVER['CONTENT_TYPE'])) {\n $contentType = $_SERVER['CONTENT_TYPE'];\n } else if (isset($_SERVER['HTTP_CONTENT_TYPE'])) {\n $contentType = $_SERVER['HTTP_CONTENT_TYPE'];\n }\n\n if (strtoupper($this->getMethod()) == 'GET') {\n $rawData = (isset($_SERVER['QUERY_STRING'])) ? rawurldecode($_SERVER['QUERY_STRING']) : null;\n } else {\n // $_SERVER['X_POP_HTTP_RAW_DATA'] is for testing purposes only\n $rawData = (isset($_SERVER['X_POP_HTTP_RAW_DATA'])) ?\n $_SERVER['X_POP_HTTP_RAW_DATA'] : file_get_contents('php://input');\n }\n\n // If the content-type is JSON\n if (isset($contentType) && (stripos($contentType, 'json') !== false) &&\n (strtoupper($this->getMethod()) != 'GET')) {\n $this->parsedData = json_decode($rawData, true);\n // Else, if the content-type is XML\n } else if (isset($contentType) && (stripos($contentType, 'xml') !== false) &&\n (strtoupper($this->getMethod()) != 'GET')) {\n $matches = [];\n preg_match_all('/<!\\[cdata\\[(.*?)\\]\\]>/is', $rawData, $matches);\n\n foreach ($matches[0] as $match) {\n $strip = str_replace(\n ['<![CDATA[', ']]>', '<', '>'],\n ['', '', '&lt;', '&gt;'],\n $match\n );\n $rawData = str_replace($match, $strip, $rawData);\n }\n\n $this->parsedData = json_decode(json_encode((array)simplexml_load_string($rawData)), true);\n // Else, default regular data parsing\n } else {\n switch (strtoupper($this->getMethod())) {\n case 'GET':\n $this->parsedData = $this->get;\n break;\n case 'POST':\n $this->parsedData = $this->post;\n break;\n default:\n if ((null !== $contentType) && !empty($rawData)) {\n if (stripos($contentType, 'application/x-www-form-urlencoded') !== false) {\n parse_str($rawData, $this->parsedData);\n } else if (stripos($contentType, 'multipart/form-data') !== false) {\n $formContent = (strpos($rawData, 'Content-Type:') === false) ?\n 'Content-Type: ' . $contentType . \"\\r\\n\\r\\n\" . $rawData : $rawData;\n $this->parsedData = \\Pop\\Mime\\Message::parseForm($formContent);\n }\n }\n }\n }\n\n // If request has filters, filter parsed input data\n if ($this->hasFilters()) {\n $this->parsedData = $this->filter($this->parsedData);\n\n if (!empty($this->post)) {\n $this->post = $this->filter($this->post);\n }\n if (!empty($this->get)) {\n $this->get = $this->filter($this->get);\n }\n }\n\n switch (strtoupper($this->getMethod())) {\n case 'PUT':\n $this->put = $this->parsedData;\n break;\n\n case 'PATCH':\n $this->patch = $this->parsedData;\n break;\n\n case 'DELETE':\n $this->delete = $this->parsedData;\n break;\n }\n\n $this->body = new \\Pop\\Mime\\Part\\Body($rawData);\n }", "function post_multipart_helper( $url, $data ) {\n // Get cURL resource\n $curl = curl_init();\n // Set some options - we are passing in a useragent too here\n curl_setopt_array($curl, array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_URL => $url,\n CURLOPT_POST => true,\n CURLOPT_HTTPHEADER => array('Content-Type: multipart/form-data'),\n CURLOPT_POSTFIELDS => $data\n ));\n\n $res = curl_exec($curl);\n curl_close($curl);\n return $res;\n }", "public static function getPostData() {\n\t\t\tif (!function_exists('merge_file_post_data')) {\n\t\t\t\tfunction merge_file_post_data($type, array $file, &$post) {\n\t\t\t\t\tforeach ($file as $key => $value) {\n\t\t\t\t\t\tif (!isset($post[$key])) $post[$key] = array();\n\t\t\t\t\t\tif (is_array($value)) merge_file_post_data($type, $value, $post[$key]);\n\t\t\t\t\t\telse $post[$key][$type] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$files = array(\n\t\t\t\t'name'\t\t=> array(),\n\t\t\t\t'type'\t\t=> array(),\n\t\t\t\t'tmp_name'\t=> array(),\n\t\t\t\t'error'\t\t=> array(),\n\t\t\t\t'size'\t\t=> array()\n\t\t\t);\n\t\t\t$post = $_POST;\n\t\t\t\n\t\t\tif(is_array($_FILES) && !empty($_FILES)){\n\t\t\t\tforeach ($_FILES as $key_a => $data_a) {\n\t\t\t\t\tif(!is_array($data_a)) continue;\n\t\t\t\t\tforeach ($data_a as $key_b => $data_b) {\n\t\t\t\t\t\t$files[$key_b][$key_a] = $data_b;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($files as $type => $data) {\n\t\t\t\tmerge_file_post_data($type, $data, $post);\n\t\t\t}\n\t\t\t\n\t\t\treturn $post;\n\t\t}", "public function handleUploads() {\n // Iterujeme nad přijatými soubory\n foreach(\\Nette\\Environment::getHttpRequest()->getFiles() AS $name => $controlValue) {\n\n // MFU vždy posílá soubory v této struktuře:\n //\n // array(\n //\t\"token\" => \"blablabla\",\n //\t\"files\" => array(\n //\t\t0 => HttpUploadedFile(...),\n //\t\t...\n //\t)\n // )\n\n $isFormMFU = (is_array($controlValue) and isset($controlValue[\"files\"]) and isset($_POST[$name][\"token\"]));\n if($isFormMFU) {\n $token = $_POST[$name][\"token\"];\n\t\tforeach($controlValue[\"files\"] AS $file) {\n self::processFile($token,$file);\n }\n }\n // soubory, které se netýkají MFU nezpracujeme -> zpracuje si je standardním způsobem formulář\n }\n return true; // Skip all next\n }", "function parseParams($from_url)\n {\n // load routes config\n $Route = new Router();\n include CONFIGS.'routes.php';\n $params = $Route->parse ($from_url);\n\n // add submitted form data\n $params['form'] = $_POST;\n if (isset($_POST['data']))\n {\n $params['data'] = (ini_get('magic_quotes_gpc') == 1)?\n $this->stripslashes_deep($_POST['data']) : $_POST['data'];\n }\n if (isset($_GET))\n {\n $params['url'] = $this->urldecode_deep($_GET);\n $params['url'] = (ini_get('magic_quotes_gpc') == 1)?\n $this->stripslashes_deep($params['url']) : $params['url'];\n }\n\n foreach ($_FILES as $name => $data)\n {\n $params['form'][$name] = $data;\n }\n $params['bare'] = empty($params['ajax'])? (empty($params['bare'])? 0: 1): 1;\n\n return $params;\n }", "function mungeFormData(&$formvars) {\n\n // trim off excess whitespace\n $formvars['code'] = trim($formvars['code']);\n $formvars['ckd'] = trim($formvars['ckd']);\n\n $formvars['scode'] = trim($formvars['scode']);\n $formvars['sckd'] = trim($formvars['sckd']);\n $formvars['isdcd'] = trim($formvars['isdcd']);\n\n $formvars['name'] = trim($formvars['name']);\n $formvars['name_k'] = trim($formvars['name_k']);\n $formvars['tel'] = trim($formvars['tel']);\n $formvars['fax'] = trim($formvars['fax']);\n $formvars['zip'] = trim($formvars['zip']);\n $formvars['address'] = trim($formvars['address']);\n\n $formvars['print_flag'] = trim($formvars['print_flag']);\n $formvars['open_date'] = trim($formvars['open_date']);\n $formvars['close_date'] = trim($formvars['close_date']);\n\n $formvars['mail_address'] = trim($formvars['mail_address']);\n $formvars['web_url'] = trim($formvars['web_url']);\n\n }", "protected function loadFormData()\n\t{\n\t\treturn $this->getItem();\n\t}", "function parseParams($from_url)\n {\n // load routes config\n $Route = new Router();\n include CONFIGS.'routes.php';\n $params = $Route->parse ($from_url);\n\n // add submitted form data\n $params['form'] = $_POST;\n if (isset($_POST['data']))\n {\n $params['data'] = (ini_get('magic_quotes_gpc') == 1)?\n \t$this->stripslashes_deep($_POST['data']) : $_POST['data'];\n }\n if (isset($_GET))\n {\n $params['url'] = $this->urldecode_deep($_GET);\n $params['url'] = (ini_get('magic_quotes_gpc') == 1)?\n $this->stripslashes_deep($params['url']) : $params['url'];\n }\n\n foreach ($_FILES as $name => $data)\n {\n $params['form'][$name] = $data;\n }\n\n $params['bare'] = empty($params['ajax'])? (empty($params['bare'])? 0: 1): 1;\n return $params;\n }", "private function extractPostData(array &$options)\n {\n if (empty($options['post_files']) && empty($options['post_fields'])) {\n return;\n }\n\n $contentType = null;\n if (!empty($options['headers'])) {\n foreach ($options['headers'] as $name => $value) {\n if (strtolower($name) === 'content-type') {\n $contentType = $value;\n break;\n }\n }\n }\n\n $fields = [];\n if (isset($options['post_fields'])) {\n if (!isset($options['post_files'])) {\n $options['body'] = http_build_query($options['post_fields']);\n unset($options['post_fields']);\n $options['headers']['Content-Type'] = $contentType ?: 'application/x-www-form-urlencoded';\n return;\n }\n $fields = $options['post_fields'];\n unset($options['post_fields']);\n }\n\n $files = $options['post_files'];\n unset($options['post_files']);\n $options['body'] = new MultipartPostBody($fields, $files);\n $options['headers']['Content-Type'] = $contentType\n ?: 'multipart/form-data; boundary=' . $options['body']->getBoundary();\n }", "protected function processForm($data)\n {\n return array();\n }", "protected function getFormData($data)\n {\n return array(\n 'data' => array(\n 'version' => $data['version'],\n 'question' => $data['prevConviction']\n ),\n 'convictionsConfirmation' => array(\n 'convictionsConfirmation' => $data['convictionsConfirmation']\n )\n );\n }", "public function isFormData()\n {\n $method = $this->getOriginalMethod() ?: $this->getMethod();\n\n return ($method === \"POST\" && is_null($this->getContentType())) || $this->getContentMimeType() ===\n \"application/x-www-form-urlencoded\";\n }", "public function parse_request()\n {\n }", "public function formDataProcessAction(Request $request )\n\t{\n\t\t$this->registrationForm->bindRequest($request);\n\t\tif($this->registrationForm->isValid()){\n\t\t\t// data is an array with \"name\", \"email\", and \"message\" keys\n\t\t\t$data = $this->registrationForm->getData();\n\t\t\techo \"<h2>Form Data</h2>\";\n\t\t\t//foreach( $data as $key = &gt; $value )\n\t\t\t\t//echo \"<p> Index : \".$key. \"- Value: \". $value. \"</p>\";\n\t\t\tforeach( $data as $key=>$value )\n\t\t\t\techo \"<p>\" .$key.\" - Value: \". $value. \"</p>\";\t\t\n\t\t}\n\t}", "public function is_multipart()\n\t{\n\t\treturn (strpos($this->_content_type, \"multipart\") !== false);\n\t}", "private function _getErrorDataFromPost(){\r\n\r\n\t\t$errorData = array();\r\n\r\n\t\tif(isset($_POST['type'])){\r\n\t\t\t$errorData->type = $_POST['type'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['fullUrl'])){\r\n\t\t\t$errorData->fullUrl = $_POST['fullUrl'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['referer'])){\r\n\t\t\t$errorData->referer = $_POST['referer'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['fileName'])){\r\n\t\t\t$errorData->fileName = $_POST['fileName'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['line'])){\r\n\t\t\t$errorData->line = $_POST['line'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['message'])){\r\n\t\t\t$errorData->message = $_POST['message'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['type'])){\r\n\t\t\t$errorData->type = $_POST['type'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['getParams'])){\r\n\t\t\t$errorData->getParams = $_POST['getParams'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['postParams'])){\r\n\t\t\t$errorData->postParams = $_POST['postParams'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['trace'])){\r\n\t\t\t$errorData->trace = $_POST['trace'];\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['context'])){\r\n\t\t\t$errorData->context = $_POST['context'];\r\n\t\t}\r\n\r\n\t\treturn $errorData;\r\n\t}", "function get_message(){\n //get the raw data from the POST request\n $raw_post = file_get_contents(\"php://input\");\n //PHP has a bult in json parser but its very pick so i parse the json here real quick\n $raw_post = str_replace(\"\\\"\",\"\",$raw_post);\n $raw_post = substr($raw_post, 1,strlen($raw_post)-2);\n echo $raw_post;\n $raw_post = explode(\",\",$raw_post);\n $post = [];\n foreach($raw_post as &$postelem){\n $attr = explode(\":\",$postelem);\n $post[$attr[0]] = $attr[1];\n }\n return $post;\n }", "public function getFormData($key)\n\t{\n\t\treturn object_get($this->form_data, $key, null);\n\t}", "protected function handle_form_data($file, $index) {\n\t //return $_REQUEST['category_id'];\n }", "protected function loadFormData()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$input = $app->input;\n\n\t\t// Check the session for previously entered form data.\n\t\t$data = $app->getUserState('com_tjfields.edit.field.data', array());\n\t\t$id = $input->get('id', '0', 'INT');\n\n\t\tif (!empty($id))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\t$this->preprocessData('com_tjfields.field', $data);\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t$session = JFactory::getSession();\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_obhelpdesk.edit.reply.data', array());\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\treturn $data;\n\t}", "function parseIncomingParams() {\n\t$parameters = array();\n\n\t// first of all, pull the GET vars\n\tif (isset($_SERVER['QUERY_STRING'])) {\n\t\tparse_str($_SERVER['QUERY_STRING'], $parameters);\n\t}\n\n\t// now how about PUT/POST bodies? These override what we got from GET\n\t$body = file_get_contents(\"php://input\");\n\t$content_type = false;\n\tif(isset($_SERVER['CONTENT_TYPE'])) {\n\t\t$content_type = $_SERVER['CONTENT_TYPE'];\n\t}\n\tswitch($content_type) {\n\t\tcase \"application/json\":\n\t\t\t$body_params = json_decode($body);\n\t\t\tif($body_params) {\n\t\t\t\tforeach($body_params as $param_name => $param_value) {\n\t\t\t\t\t$parameters[$param_name] = $param_value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//$this->format = \"json\";\n\t\t\tbreak;\n\t\tcase \"application/x-www-form-urlencoded\":\n\t\t\tparse_str($body, $postvars);\n\t\t\tforeach($postvars as $field => $value) {\n\t\t\t\t$parameters[$field] = $value;\n\n\t\t\t}\n\t\t\t//$this->format = \"html\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// we could parse other supported formats here\n\t\t\tbreak;\n\t}\n\treturn $parameters;\n}", "function parseMimeType($str) {\n\n $parameters = [];\n // If no q= parameter appears, then quality = 1.\n $quality = 1;\n\n $parts = explode(';', $str);\n\n // The first part is the mime-type.\n $mimeType = array_shift($parts);\n\n $mimeType = explode('/', trim($mimeType));\n if (count($mimeType) !== 2) {\n // Illegal value\n return null;\n }\n list($type, $subType) = $mimeType;\n\n foreach ($parts as $part) {\n\n $part = trim($part);\n if (strpos($part, '=')) {\n list($partName, $partValue) =\n explode('=', $part, 2);\n } else {\n $partName = $part;\n $partValue = null;\n }\n\n // The quality parameter, if it appears, also marks the end of\n // the parameter list. Anything after the q= counts as an\n // 'accept extension' and could introduce new semantics in\n // content-negotation.\n if ($partName !== 'q') {\n $parameters[$partName] = $part;\n } else {\n $quality = (float)$partValue;\n break; // Stop parsing parts\n }\n\n }\n\n return [\n 'type' => $type,\n 'subType' => $subType,\n 'quality' => $quality,\n 'parameters' => $parameters,\n ];\n\n}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_obhelpdesk.edit.field.data', array());\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\t$data->kb_catid = explode(',', $data->kb_catid);\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_bulletins.edit.message.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}", "protected function transformMultipartBody($body) {\n foreach ($body as $name => $value) {\n if ($value instanceof NingUpload) {\n $body[$name] = (string) $value;\n }\n }\n return $body;\n }", "public function finish()\n {\n if ( $this->parserState != self::PARSE_STATE_POST_LAST )\n {\n // this should never happen\n // let's give the last parser a chance to clean up after himself\n if ( $this->currentPartParser !== null )\n {\n $part = $this->currentPartParser->finish();\n $this->partDone( $part );\n $this->currentPartParser = null;\n }\n }\n $multipart = $this->finishMultipart();\n ezcMailPartParser::parsePartHeaders( $this->headers, $multipart );\n $multipart->boundary = $this->boundary;\n return $multipart;\n }", "protected function _parse_put()\n {\n if ($this->request->format) {\n $this->request->body = $this->input->raw_input_stream;\n if ($this->request->format === 'json') {\n $this->_put_args = json_decode($this->input->raw_input_stream);\n }\n } elseif ($this->input->method() === 'put') {\n // If no file type is provided, then there are probably just arguments\n $this->_put_args = $this->input->input_stream();\n }\n }", "private function parseParts(MailMessage $message) {\n $attachments = $message->getParts();\n $numParts = count($attachments);\n\n $body = null;\n if (isset($attachments[MailMessage::PART_BODY])) {\n $body = $attachments[MailMessage::PART_BODY];\n unset($attachments[MailMessage::PART_BODY]);\n }\n\n $alternative = null;\n if (isset($attachments[MailMessage::PART_ALTERNATIVE])) {\n $alternative = $attachments[MailMessage::PART_ALTERNATIVE];\n unset($attachments[MailMessage::PART_ALTERNATIVE]);\n }\n\n if (!$alternative && $numParts == 1) {\n $this->headers[self::HEADER_CONTENT_TYPE] = self::HEADER_CONTENT_TYPE . ': ' . $body->getMimeType() . '; charset=' . $body->getCharset();\n $this->headers[self::HEADER_CONTENT_TRANSFER_ENCODING] = self::HEADER_CONTENT_TRANSFER_ENCODING . ': ' . $body->getTransferEncoding();\n\n $this->addPartToBody($body, true);\n\n return;\n }\n\n $salt = $this->generateSalt();\n\n if ($alternative && $numParts == 2) {\n $this->headers[self::HEADER_CONTENT_TYPE] = self::HEADER_CONTENT_TYPE . ': ' . self::MIME_MULTIPART_ALTERNATIVE . '; boundary=' . $salt;\n\n $this->addPartsToBody($body, $alternative, $salt);\n\n return;\n }\n\n $this->headers[self::HEADER_CONTENT_TYPE] = self::HEADER_CONTENT_TYPE . ': ' . self::MIME_MULTIPART_MIXED . '; boundary=' . $salt;\n\n if ($alternative) {\n $messageSalt = $this->generateSalt('message');\n\n $this->body .= '--' . $salt . \"\\n\";\n $this->body .= self::HEADER_CONTENT_TYPE . ': ' . self::MIME_MULTIPART_ALTERNATIVE . '; boundary=' . $messageSalt . \"\\n\\n\";\n\n $this->addPartsToBody($body, $alternative, $messageSalt);\n } elseif ($body) {\n $this->body .= '--' . $salt . \"\\n\";\n $this->addPartToBody($body);\n }\n\n if (isset($attachments) && is_array($attachments)) {\n foreach ($attachments as $name => $attachment) {\n $this->body .= '--' . $salt . \"\\n\";\n $this->addAttachmentToBody($attachment, $name);\n }\n }\n\n $this->body .= '--' . $salt . '--' . \"\\n\";\n }", "protected function loadFormData()\n {\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState('com_contactus.contactus.data', array());\n\n if (empty($data))\n {\n $data = array();\n }\n\n return $data;\n }", "protected function fieldsRemain()\n {\n $bufferlen = strlen($this->buffer);\n $minlen = strlen($this->lastBoundary);\n\n # if the buffer is too short to contain the last boundary\n # read enough bytes into the buffer to allow for a strpos test\n if ($bufferlen < $minlen) {\n if (feof($this->fp)) {\n fclose($this->fp);\n throw new \\sndsgd\\http\\data\\DecodeException(\n \"Invalid multipart data encountered; \".\n \"end of content was reached before expected\"\n );\n }\n\n $bytes = fread($this->fp, $this->bytesPerRead);\n if ($bytes === false) {\n fclose($this->fp);\n throw new \\RuntimeException(\n \"failed to read $minlen bytes from input stream\"\n );\n }\n\n $this->buffer .= $bytes;\n }\n\n # if the buffer starts with the last boundary, there are no more fields\n return (strpos($this->buffer, $this->lastBoundary) !== 0);\n }", "public function ParsePostData()\r\n {\r\n\r\n }", "public function parseFormInput() {\n $this->newuniq = isset($_POST[\"newuniq\"]) ? strtoupper(trim(filter_var($_POST[\"newuniq\"], FILTER_SANITIZE_STRING))) : NULL;\n $this->zipcode_abs = isset($_POST[\"zipcode_abs\"]) ? trim(filter_var($_POST[\"zipcode_abs\"], FILTER_SANITIZE_NUMBER_INT)) : NULL ;\n $this->parseFromQs = isset($_POST[\"parseFromQs\"]) ? trim(filter_var($_POST[\"parseFromQs\"], FILTER_SANITIZE_NUMBER_INT)) : NULL ;\n $valid = (empty($this->newuniq) || empty($this->zipcode_abs)) ? false : true;\n $this->emDebug(\"Incoming POST Code + Zip: \", $_POST, $valid);\n return $valid;\n }", "public function isFormData()\n {\n $method = isset($this->env['FTV.method_override.original_method']) ? $this->env['FTV.method_override.original_method'] : $this->getMethod();\n\n return ($method === self::METHOD_POST && is_null($this->getContentType())) || in_array($this->getMediaType(), self::$formDataMediaTypes);\n }", "function _getUploadData(){\n global $smarty;\n global $lang;\n $file = $_FILES['photoupload'];\n\n if (is_uploaded_file($file['tmp_name'])) {\n if(preg_match('=image/p?jpe?g=',$file['type'])){\n $fh = fopen($file['tmp_name'],'r');\n $data = fread($fh,$file['size']);\n fclose($fh);\n unlink($file['tmp_name']);\n return $data;\n } else {\n $smarty->assign('jpegError',$lang['err_wrongFileType']);\n }\n } elseif (preg_match('/http:\\/\\//', $_REQUEST[\"photo\"])) {\n $fd = fopen($_REQUEST[\"photo\"], \"rb\");\n $data = '';\n while (!feof($fd)) {\n $data .= fread($fd, 8192);\n }\n fclose($fd);\n return $data;\n } else {\n $smarty->assign('jpegError',$lang['err_fileNotUploaded']);\n }\n return '';\n}", "function Get_Parts($message)\n{\n\t$parts = array();\n\tif(!isset($message->parts) || empty($message->parts)) return $parts;\n\t\n\tforeach($message->parts as $part)\n\t{\n\t\t//Check if the part has parts\n\t\tif(isset($part->parts) && !empty($part->parts))\n\t\t{\n\t\t\t$parts = array_merge($parts, Get_Parts($part));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$part_type = $part->ctype_primary . '/' . $part->ctype_secondary;\n\t\t\tif(!isset($part->d_parameters['filename']) && \n\t\t\t ($part_type == 'text/plain' || $part_type == 'text/html')) //Plain Text\n\t\t\t{\n\t\t\t\t//Set subject if it's there\n\t\t\t\tif(isset($part->headers['subject']))\n\t\t\t\t{\n\t\t\t\t\t$document_subject = $part->headers['subject'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$document_subject = '';\n\t\t\t\t}\n\t\t\t\t$document_content = $part->body;\n\t\t\t}\n\t\t\telse //Binary\n\t\t\t{\n\t\t\t\t$document_subject = $part->d_parameters['filename'];\n\t\t\t\t$document_content = $part->body;\n\t\t\t}\n\t\t\t\n\t\t\t//Trim Subject\n\t\t\t$document_subject = substr($document_subject, 0, 255);\n\t\t\t\n\t\t\t$parts[] = array(\"TYPE\" => $part_type, \n\t\t\t\t\t\t\t \"SUBJECT\" => $document_subject, \n\t\t\t\t\t\t\t \"CONTENT\" => $document_content);\n\t\t}\n\t}\n\t\n\treturn $parts;\n}" ]
[ "0.69967645", "0.6897124", "0.6846032", "0.681503", "0.65799177", "0.63631964", "0.63392323", "0.63194317", "0.6278498", "0.6237328", "0.61922145", "0.61847335", "0.61460215", "0.6063339", "0.60442203", "0.59056556", "0.588972", "0.5860876", "0.5859004", "0.5833768", "0.5807135", "0.57914567", "0.5779988", "0.57525957", "0.574671", "0.5730832", "0.56473994", "0.5637231", "0.56351376", "0.5619587", "0.56048536", "0.56022453", "0.55817455", "0.55801135", "0.55713916", "0.55326533", "0.5528486", "0.55066836", "0.5501033", "0.54918295", "0.5488297", "0.5479454", "0.5451138", "0.544237", "0.5439585", "0.54133815", "0.5395448", "0.5392147", "0.5387158", "0.53795266", "0.53730965", "0.5371583", "0.5364985", "0.5354746", "0.5351891", "0.5347971", "0.5342916", "0.53413165", "0.53319746", "0.5331231", "0.5317065", "0.5313675", "0.53086925", "0.5292628", "0.52883464", "0.5286205", "0.5271163", "0.52701956", "0.52691394", "0.5258199", "0.52445835", "0.5242411", "0.52332056", "0.5223446", "0.5222626", "0.5220587", "0.5208455", "0.5207819", "0.5203779", "0.5199976", "0.51962095", "0.5191824", "0.5191053", "0.5186613", "0.518624", "0.5180812", "0.51746565", "0.5173833", "0.51621747", "0.51596034", "0.5159148", "0.5158402", "0.51426303", "0.514174", "0.5133233", "0.5129726", "0.5097576", "0.50834185", "0.5081693", "0.508026" ]
0.74854076
0
Get the transaction id matching the order id
Получить идентификатор транзакции, соответствующий идентификатору заказа
public function getTransactionIdByOrderId ($order_id) { $q = $this->db->query( sprintf( "SELECT transaction_id FROM `%1\$smollie_payments` WHERE `order_id` = '%2\$d'", DB_PREFIX, $this->db->escape($order_id) ) ); if ($q->num_rows > 0) { return $q->row["transaction_id"]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_order_id($order)\n {\n }", "public static function getIdTransactionByIdOrder($idOrder)\n {\n $result = Db::getInstance()->getValue('SELECT `transaction_id` FROM `'._DB_PREFIX_.'payline_token` WHERE `id_order`='.(int)$idOrder);\n if (!empty($result)) {\n return $result;\n }\n\n return null;\n }", "function bosa_reservation_action_order_id($order) {\n error_log(basename(__FILE__) . ':' . __LINE__ . ' Var: $order = ' . print_r($order->order_id, 1));\n return $order;\n}", "public function getTransactionId()\n {\n return $this->getParameter('orderID');\n }", "private function _getOrderId()\n {\n $info = $this->getInfoInstance();\n\n if ($this->_isPlaceOrder()) {\n return $info->getOrder()->getIncrementId();\n } else {\n if (!$info->getQuote()->getReservedOrderId()) {\n $info->getQuote()->reserveOrderId();\n }\n return $info->getQuote()->getReservedOrderId();\n }\n }", "public static function getPaytmOrderId($order_id)\n {\n if ($order_id && PaytmConstantsDonation::APPEND_TIMESTAMP) {\n return $order_id . '_' . date(\"YmdHis\");\n } else {\n return $order_id;\n }\n }", "public function orderId(): int\n {\n return $this->order->id();\n }", "public function get_transaction_id() { }", "protected function _getOrderId()\n {\n $info = $this->getInfoInstance();\n\n if ($this->_isPlaceOrder()) {\n return $info->getOrder()->getIncrementId();\n } else {\n if (!$info->getQuote()->getReservedOrderId()) {\n $info->getQuote()->reserveOrderId();\n }\n return $info->getQuote()->getReservedOrderId();\n }\n }", "public function get_order_id_by_order_key($order_key);", "public function getOrderIncrementId();", "public function getOrderIncrementId();", "public function id()\n {\n return $this['order_id'];\n }", "public static function getOrderId($order_id)\n {\n if (($pos = strrpos($order_id, '_')) !== false && PaytmConstantsDonation::APPEND_TIMESTAMP) {\n $order_id = substr($order_id, 0, $pos);\n }\n return $order_id;\n }", "protected function _getOrderId()\n {\n return $this->_getOrder()->getIncrementId();\n }", "function get_order_id()\n\t{\n\t\t// after that a card has been processed,\n\t\t// sometime it is possible retrieve the order id if assign by the gateway.\n\t\treturn $this->order['o_orderID'];\n\t}", "public function get_transaction_id() {\n\n\t\treturn ! empty( $this->response->transaction->id ) ? $this->response->transaction->id : null;\n\t}", "public function getPaymentOrderId();", "function wc_get_order_id_by_order_key($order_key)\n {\n }", "public function get_order_id()\n {\n return $this->_order_id;\n }", "public function getOrderID() {\r\n return $this->_output->quickOrderResponse->orderID;\r\n }", "public function get_order_id_by_order_item_id($item_id);", "private function getTransactionId()\n {\n /** @var \\Magento\\Sales\\Test\\Block\\Adminhtml\\Order\\View\\Tab\\Info $infoTab */\n $infoTab = $this->salesOrderView->getOrderForm()->openTab('info')->getTab('info');\n $latestComment = $infoTab->getCommentsHistoryBlock()->getLatestComment();\n $transactionId = null;\n\n preg_match('/(\\w+-*\\w+)\"/', $latestComment['comment'], $matches);\n if (!empty($matches[1])) {\n $transactionId = $matches[1];\n }\n\n return $transactionId;\n }", "public function order_id()\n\t{\n\t\tif (isset($this->_params['order_id']))\n\t\t\treturn $this->_params['order_id'];\n\t\treturn null;\n\t}", "public function get_transaction_id() {\n\n\t\treturn $this->get_check_transaction_id();\n\n\t}", "public function get_order_id(){\n\t\treturn (int) $this->v_order_id;\n\t}", "public function get_order_id(){\n\t\treturn (int) $this->v_order_id;\n\t}", "protected function _getOrderId()\n {\n $sOrderId = $this->_oData->getId();\n\n return $sOrderId;\n }", "public function getOrderID()\n {\n return $this->orderID;\n }", "protected function getJobId(Mage_Sales_Model_Order $order)\n {\n return $order->getIncrementId();\n }", "public function getTransaction($orderId, $txnId){\n $transaction = NULL;\n\n foreach ($this->getTransactions($orderId) as $key => $_transaction) {\n if ($_transaction->getTxnId() == $txnId) {\n $transaction = $_transaction;\n break;\n }\n }\n\n return $transaction;\n }", "protected function _getShipmentIdByOrder()\n {\n /** @var $select \\Magento\\Framework\\DB\\Select */\n $select = $this->_connection->select();\n $select->from(['s' => $this->getShipmentTable()], 's.entity_id')\n ->join(\n ['o' => $this->getOrderTable()],\n 'o.entity_id = s.order_id',\n []\n )->where('o.increment_id = ?', $this->_currentOrderId);\n\n return $this->_connection->fetchOne($select);\n }", "protected function _getVatIdByOrder($order)\n {\n $shippingAddress = $order->getShippingAddress();\n if ($shippingAddress && $shippingAddress->getVatId()) {\n return $shippingAddress->getVatId();\n }\n return $order->getBillingAddress()->getVatId();\n }", "function get_order_id (){\n return $this->order_id ;\n }", "function wc_get_order_id_by_order_item_id($item_id)\n {\n }", "public function getTxnId()\r\n {\r\n return $this->getParameter('txn_id');\r\n }", "public static function get_existing_customer_id_from_order($order)\n {\n }", "public function getOrderId();", "public function getOrderId();", "public function getOrderId();", "public function getOrderId();", "public function getOrderId();", "public function getOrderId();", "public function getOrderId();", "public function getTxnId()\n {\n return $this->txnId;\n }", "public function get_order_id()\n {\n // $orderId = $this->input->post('orderId');\n $orderId = $this->input->post('orderId');\n $money = $this->input->post('money');\n\n if (!$money || !$orderId) {\n return false;\n }\n\n if ($orderStatus == 1) {\n if ($order_id && $money) {\n $condition = array('u_order_id' => $orderId);\n $this->load->model('Game_order_model');\n\n $game_order = $this->Game_order_model->get_one_by_condition($condition);\n if ($game_order) {\n if (intval($money) == $game_order->money) {\n return $orderId;\n } else {\n log_message('debug', $this->platform.' money errory '.$game_order->money.\" != $money\");\n }\n }\n }\n }\n\n return false;\n }", "public function get_order_id_by_order_key( $order_key ) {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->get_var( $wpdb->prepare( \"SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_key = '_order_key' AND meta_value = %s\", $order_key ) );\n\t}", "public function getTransactionByOrderId($order_id)\n {\n $model = $this->allsecurepayOrder->create();\n $model = $model->load($order_id, 'order_id');\n \n if ($model && $model->getId() > 0) {\n $row = [\n 'id' => $model->getId(),\n 'order_id' => $model->getOrderId(),\n 'response' => $model->getResponse(),\n ];\n return $row;\n } else {\n return false;\n }\n }", "public function getOrderID($orderResponse)\n {\n }", "public function getTransactionID()\n {\n return $this->transactionID;\n }", "public static function idFromOrder($order)\n {\n $return = App::$db->\n create('SELECT `id` FROM `gallery_category` WHERE `order` = :order LIMIT 1')->\n bind((int) $order, 'order', 'int')->\n execute();\n return (int) $return[0]['id'];\n }", "public function orderId()\n {\n return static::generateOrderId($this->id);\n }", "public function orderId(): int\n {\n return (int) $this->orderid;\n }", "public function id() : TransactionId\n {\n return $this->id;\n }", "protected static function getMagentoOrderNumber($order)\n {\n return $order->getRealOrderId();\n\n }", "public function getOrderById($order_id);", "public function get_txn_id()\r\n\t{\r\n\t\treturn $this->txn_id;\r\n\t}", "public function getMerchantTradeNo($orderId)\n {\n if ($this->isTest === true) {\n return $this->orderPrefix . $orderId;\n } else {\n return strval($orderId);\n }\n }", "public function getTransactionId()\n {\n return isset($this->data['invoiceId']) ? $this->data['invoiceId'] : null;\n }", "function get_token_sale_id( $order ) {\r\n\r\n\t\t\t$subscriptions = $this->get_subscriptions_from_order( $order );\r\n\r\n\t\t\tif ( $subscriptions ) {\r\n\r\n\t\t\t\t$subscription = array_shift( $subscriptions );\r\n\r\n\t\t\t\treturn get_post_meta( $subscription->id, '_verotel_sale_id', true );\r\n\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\treturn get_post_meta( $order->id, '_verotel_sale_id', true );\r\n\t\t\t}\r\n\r\n\t\t}", "public function getOrderTxnIdRelationByOrderId(int $orderId);", "public function getOrderId()\n {\n return $this->order_id;\n }", "public function getOrderId()\n {\n return $this->order_id;\n }", "public function getOrderId()\n {\n return $this->order_id;\n }", "public function get_order_id_by_order_key($order_key)\n {\n }", "protected function get_order_number($order_id)\n {\n }", "public function get_order_id($context = 'view')\n {\n }", "private function getTransaction($order, $cpid)\n {\n $query = \"SELECT compropago_data\n FROM \" . DB_PREFIX . \"order\n WHERE order_id = {$order['order_id']}\";\n\n $result = $this->db->query($query);\n\n if ($result->num_rows < 1 || empty($result->row['compropago_data'])) {\n throw new \\Exception(\"Can't find order transaction\");\n }\n\n $transaction = unserialize($result->row['compropago_data']);\n\n if ($cpid != $transaction['compropago_id']) {\n throw new \\Exception(\"Order not found\");\n }\n\n return $transaction;\n }", "function display_transaction_id(){\r\n\t\t\t$order_id = absint( get_query_var( 'order-pay' ) );\r\n\t\t\t$order = new WC_Order( $order_id );\r\n\r\n\t\t\t$payment_method = $order->payment_method;\r\n\r\n\t\t\tif( !isset( $_GET['pay_for_order'] ) && ( 'tbz_webpay_gateway' == $payment_method ) ){\r\n\t\t\t\t$txn_ref =$order_id = WC()->session->get( 'tbz_wc_webpay_txn_id' );\r\n\t\t\t\tWC()->session->__unset( 'tbz_wc_webpay_txn_id' );\r\n\t\t\t\techo '<h4>Transaction Reference: '. $txn_ref .'</h4>';\r\n\t\t\t}\r\n\t\t}", "public function getOrderId() {\n\n $this->throwExceptionIfNotLoaded();\n return $this->order->getId();\n }", "public function get_orderObjId() {\n \n return $this->orderObjId;\n \n }", "public function getOrderNumber($order)\n {\n $id = $order->getOrderId();\n while(strlen($id) < 8) {\n $id = (string)'0'.$id;\n }\n return $id;\n }", "public function getOrderId()\n {\n $value = $this->get(self::order_id);\n return $value === null ? (integer)$value : $value;\n }", "public static function getIdOrderByIdTransaction($idTransaction)\n {\n $result = Db::getInstance()->getValue('SELECT `id_order` FROM `'._DB_PREFIX_.'payline_token` WHERE `transaction_id`=\"'.pSQL($idTransaction).'\"');\n if (!empty($result)) {\n return $result;\n } else {\n // Fallback method, use native PrestaShop table\n $orderReference = Db::getInstance()->getValue('SELECT `order_reference` FROM `'._DB_PREFIX_.'order_payment` WHERE `transaction_id`=\"'.pSQL($idTransaction).'\"');\n if (!empty($orderReference)) {\n $idOrder = Db::getInstance()->getValue('SELECT `id_order` FROM `'._DB_PREFIX_.'orders` WHERE `reference`=\"'.pSQL($orderReference).'\"');\n if (!empty($idOrder)) {\n return $idOrder;\n }\n }\n }\n\n return null;\n }", "public function getTransId() \r\n\t{\r\n\t return $this->transId;\r\n\t}", "public static function getPaymentRecordIdByIdOrder($idOrder)\n {\n $result = Db::getInstance()->getValue('SELECT `payment_record_id` FROM `'._DB_PREFIX_.'payline_token` WHERE `id_order`='.(int)$idOrder);\n if (!empty($result)) {\n return $result;\n }\n\n return null;\n }", "function DRIVE_getOrderById($orderId){\n\tglobal $ch;\n\t// #1 - get Order By Id\n\t$url = backendUrl . '/SearchWS/QueryAsEntities';\n\n\t$params = array('itemQuery' => '{\n\t\t\t\t\t\t\t\t \"entityName\": \"Ft\",\n\t\t\t\t\t\t\t\t \"distinct\": false,\n\t\t\t\t\t\t\t\t \"lazyLoaded\": false,\n\t\t\t\t\t\t\t\t \"SelectItems\": [],\n\t\t\t\t\t\t\t\t \"filterItems\": [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \"filterItem\": \"obs\",\n\t\t\t\t\t\t\t\t\t \"valueItem\": \"'.$orderId.'\",\n\t\t\t\t\t\t\t\t\t \"comparison\": 0,\n\t\t\t\t\t\t\t\t\t \"groupItem\": 1\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \"filterItem\": \"anulada\",\n\t\t\t\t\t\t\t\t\t \"valueItem\": false,\n\t\t\t\t\t\t\t\t\t \"comparison\": 0,\n\t\t\t\t\t\t\t\t\t \"groupItem\": 0\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t ],\n\t\t\t\t\t\t\t\t \"orderByItems\": [],\n\t\t\t\t\t\t\t\t \"JoinEntities\": [],\n\t\t\t\t\t\t\t\t \"groupByItems\": []\n\t\t\t\t\t\t\t\t}');\n\n\n\n\n\t$response=DRIVE_Request($ch, $url, $params);\n\n\tif(empty($response)){\n\t\treturn false;\n\t} else if(count($response['result']) == 0 ){\n\t\treturn null;\n\t}\n\n return $response['result'][0];\n\n}", "public function getTransactionId()\n\t{\n\t\treturn $this->data['transaction_id'];\n\t}", "public function getTransactionId();", "function getTransactionID() {\n\t\treturn $this->_TransactionID;\n\t}", "public function getOrderIncrementId()\n {\n return $this->order->getIncrementId();\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getTransactionId()\n {\n return $this->transaction_id;\n }", "public function getOrderIdByTxnId(string $txnId);", "public function getOrderId(): string\n {\n return $this->getData(self::ORDER_ID);\n }", "public function getUnfiOrderId();", "public function transactionId(): string\n {\n return $this->transactionId;\n }", "public function getTransactionId()\n {\n return (string)$this->_xml->transaction_id;\n }", "public function getOrderId()\n {\n if (is_object($this->_order)) {\n return $this->_order->getId();\n }\n return (int)$this->_order;\n }", "public function getTransactionReference(): ?string\n {\n if (isset($this->data->orders[0]->orderId) && !empty($this->data->orders[0]->orderId)) {\n return (string) $this->data->orders[0]->orderId;\n }\n\n return null;\n }", "function get_order_by_id($order_id){\n\n\tglobal $connection;\n\t\n\t\t$query = \"SELECT *\";\n\t\t$query .= \"\tFROM orders\";\n\t\t$query .= \"\tWHERE id=\" . $order_id;\n\t\t$query .= \" LIMIT 1\";\n\t\t\n\t\t$result_set = mysql_query($query, $connection);\n\t\tconfirm_query($result_set);\n\t\t\n\t\tif($order = mysql_fetch_array($result_set)){\n\t\t\treturn $order;\n\t\t}else{\n\t\t\treturn NULL;\n\t\t}\n\n}", "function orderID()\r\n {\r\n return $this->OrderID;\r\n }", "public function get_order_item_id(){\n\t\treturn (int) $this->v_order_item_id;\n\t}", "public function getIdOrder()\n\t{\n\t\treturn $this->id_order;\n\t}", "public function getTransactionId()\n {\n return $this->transactionID;\n }", "public function getOrderById($orderId);", "public function getTransactionSingle($order_id, $column)\n {\n $connection= $this->resource->getConnection();\n $table = $this->resource->getTableName('allsecureexchange_order');\n $sql = $connection->select()\n ->from($table, [$column])\n ->where('order_id = ?', (int)($order_id));\n return $connection->fetchOne($sql);\n }" ]
[ "0.7456582", "0.7296379", "0.727177", "0.71792465", "0.7137319", "0.7115369", "0.71113825", "0.696729", "0.69478166", "0.6937178", "0.68983126", "0.68983126", "0.68899804", "0.68445045", "0.6837774", "0.6833018", "0.68236524", "0.6805521", "0.6713674", "0.6690056", "0.66866064", "0.66546935", "0.66293764", "0.6627162", "0.6608135", "0.65943134", "0.65943134", "0.6589526", "0.658301", "0.65790063", "0.65733385", "0.6552785", "0.6551786", "0.65500695", "0.6525981", "0.6525404", "0.64989924", "0.6490034", "0.6490034", "0.6490034", "0.6490034", "0.6490034", "0.6490034", "0.6490034", "0.6483718", "0.6480924", "0.6479585", "0.647596", "0.6475176", "0.645176", "0.64507663", "0.6450751", "0.64309657", "0.6426228", "0.6423937", "0.6409091", "0.639861", "0.63953555", "0.63950783", "0.63942224", "0.637981", "0.6378174", "0.6378174", "0.6378174", "0.63651633", "0.6358738", "0.6357689", "0.6352996", "0.63380635", "0.6321025", "0.6314958", "0.6312439", "0.6311535", "0.6305308", "0.6301978", "0.6301205", "0.62975156", "0.62967235", "0.62841976", "0.6258079", "0.6246834", "0.6235933", "0.6235933", "0.6235933", "0.6235933", "0.6235933", "0.6235723", "0.62243754", "0.62213725", "0.6221153", "0.6205593", "0.6200919", "0.62004924", "0.619852", "0.6184761", "0.6179148", "0.6161018", "0.61569303", "0.6151632", "0.614753" ]
0.7845639
0
Removes all entries for this datasource_id_seq in the mapping table
Удаляет все записи для этого datasource_id_seq в таблице сопоставления
public function removeThisTemp_XToIdMappingTable( $datasource_id_seq ){ // Create request vars to pass into the mapping function $request_vars = new Zend_Controller_Request_Http(); $data['authToken'] = $this->authToken; $data['datasource_id_seq'] = $datasource_id_seq; $request_vars->setParams( $data ); $results = $this->mapping->deleteMapping( $request_vars ); return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function clearMappings() {\n self::$ormMappings = [];\n }", "public static function resetMappings();", "public function clear() {\n\t\tif ( ! empty( $this->_map_name ) ) {\n\t\t\tdelete_transient( $this->_map_name );\n\t\t}\n\n\t\t$this->_map_data = null;\n\t\t$this->_dirty = false;\n\t}", "public function drop ()\n {\n //delete the records of the lookup value\n $records = LookupValue::where('lookup_type_id', 7)->get();\n foreach ( $records as $record )\n $record->forceDelete();\n\n //delete the lookup definition itself\n $record = LookupType::find(7);\n $record->forceDelete();\n }", "public function drop ()\n {\n //delete the records of the lookup value\n $records = LookupValue::where('lookup_type_id', 3)->get();\n foreach ( $records as $record )\n $record->forceDelete();\n\n //delete the lookup definition itself\n $record = LookupType::find(3);\n $record->forceDelete();\n }", "public static function deleteMapping($mappingIdsList) {\n\t\t$db = PearDatabase::getInstance();\n\t\t$db->pquery('DELETE FROM vtiger_convertpotentialmapping WHERE cfmid IN ('. generateQuestionMarks($mappingIdsList). ')', $mappingIdsList);\n\t}", "public function clearIdentities()\n {\n $this->collIdentities = null; // important to set this to NULL since that means it is uninitialized\n }", "public function removeAll() {\n\t\t$cmd = $this->entityManager->getClassMetadata($this->getEntityClassName());\n\t\t$connection = $this->entityManager->getConnection();\n\t\t$dbPlatform = $connection->getDatabasePlatform();\n\t\t$connection->query('SET FOREIGN_KEY_CHECKS=0');\n\t\t$q = $dbPlatform->getTruncateTableSql($cmd->getTableName());\n\t\t$connection->executeUpdate($q);\n\t\t$connection->query('SET FOREIGN_KEY_CHECKS=1');\n\t}", "public function removeAll()\n {\n foreach ($this->getLookupElementRepository()->findAll() as $lookupElement) {\n $this->entityManager->remove($lookupElement);\n }\n\n foreach ($this->getLookupMetaRepository()->findAll() as $lookupMeta) {\n $this->entityManager->remove($lookupMeta);\n }\n\n $this->entityManager->flush();\n }", "public static function cleanup() {\n\t\t$old_entries = self::getOldEntries();\n\n\t\tforeach( $old_entries as $entry ) {\n\t\t\tself::delete( $entry->id );\n\t\t}\n\t}", "public function resetMapping()\n {\n $this->client->post(self::PATH_RESET_MAPPINGS);\n }", "private function clearOldData(): void\n {\n $tableName = $this->urlRewrite->getMainTable();\n $conditions = [\n 'metadata LIKE ?' => '{\"category_id\"%',\n 'is_autogenerated = ?' => self::AUTO_GENERATED_ROW_FLAG\n ];\n $this->urlRewrite->getConnection()->delete($tableName, $conditions);\n }", "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in \".$this->getClassNameFromBuilder($joinedTableTableMapBuilder).\" instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n CataloguePdfConfigI18nTableMap::clearInstancePool();\n }", "public function delete_from_lookup_table($id, $table)\n {\n }", "function delete() {\r\n $this->db->delete('fs_blog_tag_map', array('blog_id' => $this->id));\r\n $this->db->delete(self::table_name, array('id' => $this->id));\r\n }", "function deletemap($id){\n global $wpdb;\n $table_map = $wpdb->prefix.'cefiimap';\n $sql = $wpdb->prepare(\"DELETE FROM \".$table_map.\" WHERE id=%d LIMIT 1\",$id);\n $req = $wpdb->query($sql);\n return $req;\n }", "public function uninstall() {\n //Clean UP\n\t\t\n\t\t $layer_id = ORM::factory('wms_settings')->lastBase();\n $this->db->query(\"UPDATE \" . Kohana::config('database.default.table_prefix') . 'settings SET value=\\''.$layer_id.'\\' WHERE `key`=\\'default_map\\'');\n \n\t\t\n $sql =\"DROP TABLE TABLE IF EXISTS `\" . Kohana::config('database.default.table_prefix') . \"wms_layer`; \n DROP TABLE TABLE IF EXISTS `\" . Kohana::config('database.default.table_prefix') . \"wms_settings`;\";\n \n $this->db->query($sql); \n }", "public function Delete(): void {\n if($this->ID !== null) {\n\n //Delete the Mask and its Rows.\n Expression::Delete()\n ->From(\"MetaInformation.MaskRows\")\n ->Where([\"Mask\" => $this->ID])\n ->Execute();\n Expression::Delete()\n ->From(\"MetaInformation.Masks\")\n ->Where([\"ID\" => $this->ID])\n ->Execute();\n\n //Delete DataSets created through this Mask.\n foreach(\n Expression::Select(\"ID\")\n ->From(\"MetaInformation.DataSets\")\n ->Where([\"Mask\" => $this->ID])\n as\n $Row\n ) {\n Expression::Delete()\n ->From(\"MetaInformation.DataSetRows\")\n ->Where([\"DataSet\" => (int)$Row[\"ID\"]])\n ->Execute();\n Expression::Delete()\n ->From(\"MetaInformation.DataSets\")\n ->Where([\"ID\" => (int)$Row[\"ID\"]])\n ->Execute();\n }\n }\n }", "public function clear_cached_map() {\n $this->map = null;\n }", "public function destroy($id)\n {\n $mapping = DataReferenceMapping::find($id);\n $mapping->delete();\n }", "protected function resetResources(): void\n {\n $conn = $this->getServiceLocator()->get('Omeka\\Connection');\n $sql = <<<'SQL'\nSET FOREIGN_KEY_CHECKS = 0;\nTRUNCATE TABLE item;\nTRUNCATE TABLE item_set;\nTRUNCATE TABLE item_item_set;\nTRUNCATE TABLE media;\nTRUNCATE TABLE resource;\nTRUNCATE TABLE value;\nTRUNCATE TABLE bulk_import;\nTRUNCATE TABLE bulk_importer;\nSET FOREIGN_KEY_CHECKS = 1;\nSQL;\n $conn->exec($sql);\n $this->entityManager->clear();\n }", "public function dropPrimaryKey($table);", "public function destroy(): void\n {\n $this->indexes->forEach(new Call('drop', []));\n $this->indexes->clear();\n\n if ($this->lastIndexesConfigurations) {\n $this->setConfigurations($this->lastIndexesConfigurations);\n $this->resetIndexesProperty();\n $this->lastIndexesConfigurations = null;\n $this->factory = null;\n }\n }", "public function clear()\n {\n $this->dbconn->executeQuery(\"DROP TABLE $this->migration_table_name\");\n $this->init( $this->directory );\n }", "public static function clearMACLookupTable()\n {\n $OUITable = self::getClass('OUI', '', true);\n $OUITable = $OUITable['databaseTable'];\n return self::$DB->query(\"TRUNCATE TABLE `$OUITable`\");\n }", "function views_pgsql_drop_primary_key(&$ret, $table) {\n $ret[] = update_sql('ALTER TABLE {'. $table .'} DROP CONSTRAINT {'. $table .'}_pkey');\n}", "function clear($pk=null) {\n if ($this->manytomany) {\n $set = new Dormio_Queryset($this->_through);\n if ($pk) {\n $set = $set->filter($this->_map_self_field, '=', $pk);\n }\n $sql = $set->filter($this->_map_parent_field, '=', $this->_parent->ident())->deleteSQL();\n return $this->batchExecute($sql);\n } else {\n throw new Dormio_Manager_Exception('Unable to clear foreign key sets');\n }\n }", "public function removePathEntityIdMapping($path)\n {\n unset($this->pathEntityIdMapping[$this->unifyPath($path)]);\n }", "private function clearAllData()\n\t{\n\t\t//clear configuration \n\t\tnp6Utils::deleteConfigurationFile();\n\t\t$this->cms_page_list->deleteAllCmsList();\n\t\t$sql = 'DELETE FROM '._DB_PREFIX_.$this->db_name_target_error.' ';\n\t\tDb::getInstance()->Execute($sql);\n\t\t$sql = 'DELETE FROM '._DB_PREFIX_.$this->db_name_mp_link.' ';\n\t\tDb::getInstance()->Execute($sql);\n\t}", "public function delete(){\n\t\t$this->db->delete($this::DB_TABLE, array(\n\t\t\t$this::DB_TABLE_PK => $this->{$this::DB_TABLE_PK},\n\t\t));\n\t\tunset($this->{$this::DB_TABLE_PK});\n\t}", "public function delete_all_stored_sitemap_data() {\n\t\t$this->delete_sitemap_type_data( JP_MASTER_SITEMAP_TYPE );\n\t\t$this->delete_sitemap_type_data( JP_PAGE_SITEMAP_TYPE );\n\t\t$this->delete_sitemap_type_data( JP_PAGE_SITEMAP_INDEX_TYPE );\n\t\t$this->delete_sitemap_type_data( JP_IMAGE_SITEMAP_TYPE );\n\t\t$this->delete_sitemap_type_data( JP_IMAGE_SITEMAP_INDEX_TYPE );\n\t\t$this->delete_sitemap_type_data( JP_VIDEO_SITEMAP_TYPE );\n\t\t$this->delete_sitemap_type_data( JP_VIDEO_SITEMAP_INDEX_TYPE );\n\t}", "public function purge(){\n\t\t\tforeach( $this->data['seomatic'] as $key => $val ){\n\n\t\t\t\tunset( $this->data['seomatic'][ $key ] );\n\t\t\n\t\t\t}\n\t\t}", "function clearRows() {\n\t\t\t$myQuery = \"\n\t\t\t\tDELETE FROM fh_ldv_row\n\t\t\t\tWHERE ldv_id = \" . (int) $this->ldv_id . \"\n\t\t\t\";\n\t\t\t\n\t\t\tDMDatabase::query($myQuery);\n\t\t\n\t\t}", "function clearExistingTags($entry_id) {\n \t$this->sql->execQuery(\"DELETE FROM EntryTag WHERE entry_id=$entry_id\"); // Remove existing Tag connections\n }", "public function clearAllData()\n {\n $tables = $this->getSchemaManager()->tableList();\n foreach ($tables as $table) {\n $this->clearTable($table);\n }\n }", "public function removeAll() {\n $sql = 'SET FOREIGN_KEY_CHECKS = 0; \n TRUNCATE table section; \n SET FOREIGN_KEY_CHECKS = 1;';\n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $count = $stmt->rowCount();\n }", "public function deleteAllData()\n {\n $tableName = $this->getDbTable()->info(Zend_Db_Table::NAME);\n\n $this->getDbTable()->getAdapter()->query(\n 'TRUNCATE TABLE ' . $tableName\n );\n }", "protected function truncateDatabase()\n {\n $this->getEntityManager()->getConnection()->executeQuery('DELETE FROM survey;');\n $this->getEntityManager()->getConnection()->executeQuery('DELETE FROM rule;');\n $this->getEntityManager()->getConnection()->executeQuery('UPDATE filter SET thematic_filter_id = NULL;');\n $this->getEntityManager()->getConnection()->executeQuery('DELETE FROM filter;');\n }", "function unsetMap(ClassMapping $map) {\n $className = $map->getClassName();\n unset($this->classMapping[$className]);\n }", "public function deletelookup($id){\r\n\t\t \r\n\t\t$pdo = self::connect();\r\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t$sql = \"DELETE FROM Lookup WHERE Tuid = ?\";\r\n\t\t$q = $pdo->prepare($sql);\r\n\t\t$q->execute(array($id));\r\n\t\tself::disconnect();\t\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t }", "protected function removeAllPersistentData()\n {\n foreach ($this->session->all() as $key => $value) {\n if (0 !== strpos($key, $this->prefix)) {\n continue;\n }\n\n $this->session->remove($key);\n }\n }", "public static function clean() {\n\t\tself::$entries[self::TABLE] = [];\n\t\tself::$cursor[self::TABLE] = 0;\n\t\tself::$new[self::TABLE] = true;\n\t}", "public function flushPrimaryKey()\n {\n $this->tablePrimaryKey = '';\n }", "private function clearDatabase() {\r\n $this->_dbTableUrlRewrite->delete(\"`generated`='Y'\");\r\n $this->_dbTableUrlRewriteParameter->delete(\"`generated`='Y'\");\r\n }", "function df_db_drop_pk($t) {df_conn()->dropIndex(df_table($t), df_conn()->getPrimaryKeyName($t));}", "public function clearTable()\n {\n // Query: DELETE FROM Intervals\n }", "public function removeReuseMetaTable()\n {\n $this->di->db->statement(\"DROP TABLE IF EXISTS `\" . Settings::REUSE_TABLE . \"`\");\n }", "function _thisted_event_import_delete_organizer_mapping($form, $form_state) {\n $selected_items = $form_state['input']['items'];\n $mapped_libraries = variable_get('mapped_libraries', array());\n foreach ($selected_items as $key => $selected_item) {\n if (!empty($selected_item)) {\n unset($mapped_libraries[$key]);\n }\n }\n variable_set('mapped_libraries', $mapped_libraries);\n}", "private function clear() {\n $params = array(\n \"all\" => $this->_request[0] == \"all\" ? true : false,\n \"id\" => $this->_request[0] ?: $this->_request['id']\n );\n\n IF($params['all'] === true) {\n // clear all cached maps\n\n } ELSEIF($params['id'] > 0) {\n $this->_request['id'] = $params['id'];\n $data = $this->property(true);\n $filename = \"cache/{$data[latitude]},{$data[longitude]}*\";\n $maps = glob($filename);\n FOREACH($maps AS $file) {\n IF(is_file($file) && $file != __FILE__)\n unlink($file);\n }\n }\n }", "protected function _clearTableCache($tableName)\n {\n parent::_clearTableCache($tableName);\n $this->cacheWrite('tables/primarykeys/' . $tableName, '');\n }", "public function clearCache()\n\t{\n\t\t$dbh = $this->dbh;\n\n\t\tif ($this->name)\n\t\t{\n\t\t\t$this->cache->remove($this->dbh->dbname.\"/security/dacl/\".$this->name);\n\t\t\t$this->cache->remove($this->dbh->dbname.\"/security/dacl/\".$this->name.\"/entries\");\n\t\t}\n\n\t\tif ($this->id)\n\t\t{\n\t\t\t$this->cache->remove($this->dbh->dbname.\"/security/dacl/\".$this->id);\n\t\t\t$this->cache->remove($this->dbh->dbname.\"/security/dacl/\".$this->id.\"/entries\");\n\t\t}\n\t}", "private function unregisterId()\n {\n unset(self::$activeIds[$this->templateId][$this->attr_id]);\n }", "protected function removeForeignListEntries()\n {\n $listId = null;\n foreach ($this->syncProperties as $prop) {\n if ($prop->destination_field === 'list_id') {\n $listId = (int) $prop->source_expression;\n }\n }\n\n if ($listId === null) {\n throw new IcingaException(\n 'Cannot sync datalist entry without list_ist'\n );\n }\n\n $no = array();\n foreach ($this->objects as $k => $o) {\n if ($o->list_id !== $listId) {\n $no[] = $k;\n }\n }\n\n foreach ($no as $k) {\n unset($this->objects[$k]);\n }\n }", "public function clear()\n {\n $this->instances = [];\n $this->keysByMask = [];\n }", "public function Destroy() : void {\n $this->Query(\"DROP TABLE `{$this->table}`;\");\n $this->Query(\"DROP TABLE `{$this->logtable}`;\");\n }", "protected function cleanExistingConfigData()\n {\n foreach ($this->configKeys as $configKey) {\n $value = $this->helper->getConfigValue($configKey);\n if ($value) {\n $this->_resourceConfig->deleteConfig($configKey, 'default', 0);\n }\n }\n }", "public function clear() {\n $this->table = array();\n $this->size = 0;\n }", "public function clear()\n {\n $poolName = $this->pool->getName();\n\n $cursor = 1;\n do {\n $scanResult = $this->scan(\"*::{$poolName}::*\");\n\n $cursor = $scanResult['cursor'];\n $keyList = $scanResult['keys'];\n\n foreach ($keyList as $id => $keyname) {\n $this->getConnection()->del($keyname);\n }\n } while ($cursor != 0);\n\n return true;\n }", "protected function _deleteMappings(Certificate $cert,\n ValidatorState $state): void\n {\n $idps = $cert->tbsCertificate()->extensions()\n ->policyMappings()->issuerDomainPolicies();\n // delete each node of depth i in the valid_policy_tree\n // where ID-P is the valid_policy\n foreach ($this->_nodesAtDepth($state->index()) as $node) {\n if (in_array($node->validPolicy(), $idps)) {\n $node->remove();\n }\n }\n $this->_pruneTree($state->index() - 1);\n }", "public static function destroy()\n {\n foreach (static::all() as $key => $value) {\n static::delete($key);\n }\n }", "function views_pgsql_drop_unique_key(&$ret, $table, $name) {\n $name = '{'. $table .'}_'. $name .'_key';\n $ret[] = update_sql('ALTER TABLE {'. $table .'} DROP CONSTRAINT '. $name);\n}", "public static function clear($sessionId) {\r\n\t\treturn Doctrine::getTable ( 'DomainsBulk' )->findBy('sessionid', $sessionId)->delete();\r\n\t}", "public function removeAll()\n\t\t{\n\t\t\tglobal $conn;\n\t\t\t\n\t\t\t$get = $conn->prepare(\"DELETE FROM ITSM_Asset_Worksheet\");\n\t\t\t$get->execute();\n\t\t}", "public function clearSeguirs()\n {\n $this->collSeguirs = null; // important to set this to NULL since that means it is uninitialized\n }", "private function clearNewDb()\n {\n $tableNames = [\n //remove generations\n 'event_generation_assign_event_tags',\n 'event_generation_conflicting_event_tags',\n 'event_generation_date_exception',\n 'event_generation_target_clinic',\n 'event_generation_target_doctor',\n 'event_generation',\n\n //remove offers\n 'event_offer',\n 'event_offer_events',\n\n //remove tags\n 'event_event_tags',\n 'event_tag',\n\n //remove events\n 'event_past',\n 'event',\n\n //remove users\n 'doctor_clinics',\n 'clinic',\n 'doctor',\n\n //remove basic infrastructure\n 'email',\n 'setting',\n ];\n\n foreach ($tableNames as $tableName) {\n $this->executeQuery(self::CURRENT, 'DELETE FROM '.$tableName);\n }\n }", "public function purge() {\n $this->rows = null;\n }", "public function clear(){\n\t\tforeach ($this->getRegularKeys() as $key => $sets){\n\t\t$this->__SETS[$key] = null;\n\t\t}\n\t}", "function remove_delhivery_table() {\n}", "private function dropIndexKeys($table)\n {\n foreach($this->showIndex($table) as $index)\n {\n $col_key_name = '';\n $query_remove_index = '';\n\n // Primary index\n if($index['Key_name'] == 'PRIMARY')\n {\n $col_key_name = $index['Column_name'];\n\n $query_remove_index = 'ALTER TABLE `' . $table . '` DROP PRIMARY KEY';\n }\n else\n {\n $col_key_name = $index['Key_name'];\n\n $query_remove_index = 'ALTER TABLE `' . $table . '` DROP INDEX ' . $col_key_name . ';';\n }\n\n $this->connection->query($query_remove_index);\n }\n }", "public function removeAll()\n {\n $affectedIds = $this->limit(null)->column('ID');\n if (empty($affectedIds)) {\n return;\n }\n\n // Get the join records that apply for the current list\n $records = $this->manipulator->getJoinClass()::get()->filter([\n $this->manipulator->getForeignIDKey() => $this->getForeignID(),\n $this->manipulator->getLocalKey() => $affectedIds,\n ]);\n\n /** @var DataObject $record */\n foreach ($records as $record) {\n $record->delete();\n }\n\n if ($this->removeCallbacks && $affectedIds) {\n $this->removeCallbacks->call($this, $affectedIds);\n }\n }", "public function clearCaches()\n {\n foreach ($this->getClassFields() as $field => $options) {\n if (!empty($options['unique']) || !empty($options['primary'])) {\n $key = sprintf('%s/%s', static::$tableName, $field);\n DB::clearCachedRecord($key);\n }\n }\n }", "public function clear() {\n foreach ($this->_data as $key => $value) {\n unset($this->_data[$key]);\n }\n }", "private function clearTable()\r\n {\r\n $DB = CDatabase::GetModuleConnection('search');\r\n $DB->Query(\"DELETE FROM b_search_content WHERE ITEM_ID LIKE 'seometa%'\");\r\n }", "public function uninstall()\n\t{\n\t\t$this->db->query('DROP TABLE `'.Kohana::config('database.default.table_prefix').'findlocation_settings`');\n\t\t$this->db->query('DROP TABLE `'.Kohana::config('database.default.table_prefix').'findlocation_cache`');\n\t}", "abstract protected function removeAllPersistentData();", "public function deleteQuestionnaires() {\n //delete all the questionnaires that match \n $caseList = array_keys($this->casesMap);\n $strCaseList = \"'\" . implode(\"','\", $caseList) . \"'\";\n\n $this->targetConnection->beginTransaction();\n try {\n //delete existing cases\n $stm = 'DELETE FROM `cases` WHERE `id` in ( ' . $strCaseList . \")\";\n $count = $this->targetConnection->executeUpdate($stm);\n\n //delete notes for these cases\n $stm = 'DELETE FROM `notes` WHERE `case_id` in ( ' . $strCaseList . \")\";\n $this->targetConnection->executeUpdate($stm);\n\n //cascade delete cases from break out tables\n $stm = 'DELETE FROM `level-1` WHERE `case-id` in ( ' . $strCaseList . \")\";\n $count = $this->targetConnection->executeUpdate($stm);\n $this->logger->debug(\"Deleted $count cases\");\n\n $this->targetConnection->commit();\n } catch (\\Exception $e) {\n $strMsg = '[SourceDB: ' . $this->sourcePdo->getDsn() . ' TargetDB: ' . $this->targetConnection->getDatabase();\n $strMsg .= ' Dictionary: ' . $this->dict->getName();\n $strMsg .= '] Failed deleting cases';\n $this->logger->error($strMsg, array(\"context\" => (string) $e));\n $this->targetConnection->rollBack();\n throw new \\Exception($strMsg, 0, $e);\n }\n }", "function db_drop_primary_key($table) {\n return Database::getConnection()->schema()->dropPrimaryKey($table);\n}", "public function removeSitemap()\n {\n try {\n $links = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM `'._DB_PREFIX_.'sitemap_sitemap`');\n if ($links) {\n foreach ($links as $link) {\n if (!@unlink($this->normalizeDirectory(_PS_ROOT_DIR_).$link['link'])) {\n return false;\n }\n }\n }\n } catch (Exception $e) {\n }\n\n if (!Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'sitemap_sitemap`')) {\n return false;\n }\n\n return true;\n }", "public function reset()\n {\n unset( $this->severityMap );\n unset( $this->sourceMap );\n }", "protected function cleanup()\n {\n $relations = [];\n foreach($this->relations as $relation) {\n if (\n isset($this->entities[$relation['source']]) &&\n isset($this->entities[$relation['target']])\n ) {\n $relations[] = $relation;\n }\n }\n\n $this->relations = $relations;\n }", "public function clearIncidentResourceRecords()\n {\n $this->collIncidentResourceRecords = null; // important to set this to NULL since that means it is uninitialized\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "function reset() {\n $this->remove([]);\n M_Sequence::reset(\"\".$this);\n }", "private function delete() {\n\n $table = $this->settings('database table');\n $this->getDb()->createQueryBuilder()\n ->delete($table)\n ->execute();\n print 'Deleted all rows.' . PHP_EOL;\n }", "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in related instance pools,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n AdvertI18nTableMap::clearInstancePool();\n }", "public function delete() {\n\t\tself::deleteAll ( $this->entryID );\n\t}", "public function dropPrimaryKey(PrimaryKeyInterface $primaryKey): void;", "public function recall() {\n $db_util = DbUtilFactory::getDbUtil($this->_phactory);\n $db_util->disableForeignKeys();\n\n try {\n $sql = \"DELETE FROM {$this->_table->getName()}\";\n $this->_phactory->getConnection()->exec($sql);\n } catch(Exception $e) { }\n\n foreach($this->_associations as $association) {\n if($association instanceof Association\\ManyToMany) {\n try {\n $sql = \"DELETE FROM `{$association->getJoinTable()}`\";\n $this->_phactory->getConnection()->exec($sql);\n } catch(Exception $e) { }\n }\n }\n\n $db_util->enableForeignKeys();\n }", "private function destroyTableDefs() {\n\n\t\tunset($this->fields);\n\t\tunset($this->links);\n\n\t\t$this->fields = array();\n\t\t$this->links = array();\n\n\t\t$this->whereClause = NULL;\n\t\t$this->orderBy = NULL;\n\n\t}", "public function purge()\n {\n $this->connection->exec('TRUNCATE TABLE '.$this->tableName);\n }", "public function delete()\n\t{\n\t\tif (!$this->exists()) return;\n\t\t$table = $this->table();\n\t\t$table->delete($this->where());\n\t\t$this->_id = null;\n\t}", "public function removeAll()\n {\n // Remove the join to the join table to avoid MySQL row locking issues.\n $query = $this->dataQuery();\n $foreignFilter = $query->getQueryParam('Foreign.Filter');\n $query->removeFilterOn($foreignFilter);\n\n // Select ID column\n $selectQuery = $query->query();\n $dataClassIDColumn = DataObject::getSchema()->sqlColumnForField($this->dataClass(), 'ID');\n $selectQuery->setSelect($dataClassIDColumn);\n\n $from = $selectQuery->getFrom();\n unset($from[$this->joinTable]);\n $selectQuery->setFrom($from);\n $selectQuery->setOrderBy(); // ORDER BY in subselects breaks MS SQL Server and is not necessary here\n $selectQuery->setLimit(null); // LIMIT in subselects breaks MariaDB (https://mariadb.com/kb/en/subquery-limitations/#limit) and is not necessary here\n $selectQuery->setDistinct(false);\n\n // Use a sub-query as SQLite does not support setting delete targets in\n // joined queries.\n $delete = SQLDelete::create();\n $delete->setFrom(\"\\\"{$this->joinTable}\\\"\");\n $delete->addWhere($this->foreignIDFilter());\n $subSelect = $selectQuery->sql($parameters);\n $delete->addWhere([\n \"\\\"{$this->joinTable}\\\".\\\"{$this->localKey}\\\" IN ($subSelect)\" => $parameters\n ]);\n\n $affectedIds = [];\n if ($this->removeCallbacks) {\n $affectedIds = $delete\n ->toSelect()\n ->setSelect(\"\\\"{$this->joinTable}\\\".\\\"{$this->localKey}\\\"\")\n ->execute()\n ->column();\n }\n\n // Perform the deletion\n $delete->execute();\n\n if ($this->removeCallbacks && $affectedIds) {\n $this->removeCallbacks->call($this, $affectedIds);\n }\n }", "protected function deleteValues()\n\t{\n\t\tforeach ($this->valueTables as $valueTable) {\n\t\t\t$this->owner->dbConnection->createCommand()->delete($valueTable,\n\t\t\t\t\t'ownerId = :ownerId', array(':ownerId' => $this->owner->id));\n\t\t}\n\t}", "public function clean()\n {\n $this->persistenceDriver->flushAll();\n }", "protected function resetTable()\n {\n \\Yii::info(\"Cleaning table\");\n $table = $this->getTableSchema();\n $this->db->createCommand()->delete($table->fullName)->execute();\n }", "public static function reset() {\n\t\tstatic::$_map = [];\n\t}", "public function removeAll()\n {\n foreach ($this->keys() as $key) {\n $this->remove($key);\n }\n }", "public function delete_all()\n {\n $this->prepareExecute('DELETE FROM '. $this->database . '.' .$this->table);\n }", "function drush_orkjern_import_delete_shortcuts() {\n $rows = db_query('SELECT * FROM {shortcut}');\n foreach ($rows as $row) {\n $s = entity_load('shortcut', $row->id);\n $s->delete();\n }\n}", "public function remove_data_set(){\r\n\t\tglobal $db;\r\n\t\t$currenttime = time();\r\n\t\t$timetoremove = $currenttime - (24 * 60 * 60);\r\n\r\n\t\t$sql = \"delete from tbl_datastore_by_session where added_on <= '\". $timetoremove .\"'\";\r\n\t\t$db->mysqlquery($sql);\r\n\t}" ]
[ "0.6620639", "0.6160477", "0.5870823", "0.5780436", "0.57265747", "0.57173616", "0.5644219", "0.56010413", "0.55964017", "0.55955225", "0.5507787", "0.5498555", "0.5497161", "0.54856384", "0.5472143", "0.54675615", "0.545489", "0.5437542", "0.5433815", "0.5401384", "0.5383332", "0.53688014", "0.5329993", "0.5329715", "0.53286004", "0.5318941", "0.5311686", "0.52990407", "0.52830297", "0.52667534", "0.5258805", "0.52573687", "0.5225649", "0.52205676", "0.5210095", "0.5202269", "0.5184744", "0.5178779", "0.5173117", "0.51674783", "0.5152138", "0.5147336", "0.51242983", "0.5118354", "0.5115604", "0.51101416", "0.51071703", "0.5095465", "0.50912404", "0.50888264", "0.5079476", "0.50794643", "0.5078188", "0.5076786", "0.5068971", "0.50637996", "0.5063787", "0.50586003", "0.5051738", "0.503792", "0.5037918", "0.50328416", "0.50322074", "0.50202346", "0.50188696", "0.5013733", "0.50132906", "0.5012532", "0.50050694", "0.50002944", "0.49904692", "0.49843106", "0.49794117", "0.49691904", "0.49616387", "0.4953082", "0.49528658", "0.49447578", "0.49446815", "0.49444377", "0.49411216", "0.4935433", "0.49332637", "0.4918334", "0.49118814", "0.49117473", "0.49081746", "0.4907611", "0.49048176", "0.4904577", "0.49043328", "0.4900775", "0.489357", "0.48896962", "0.4881599", "0.48807257", "0.48804736", "0.48770264", "0.4876998", "0.48738968" ]
0.71107805
0
Surcharge de __set pour donner acces aux valeurs sous la forme $e>attribut=val
Сурчардж __set для предоставления доступа к значениям в форме $e>attribut=val
public function __set($_cle, $_val){ if (array_key_exists($_cle, $this->valeurs)) { // La propriete demandee est bien une cle du tableau des valeurs return $this->valeurs[$_cle] = $_val; } elseif (array_key_exists($_cle, static::$relations_elem)) { return static::$relations_elem[$_cle] = $_val; } throw new \Exception("Attribut '$_cle' inconnu dans '" . get_class($this) . "'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __set($atributo, $valor){\r\n $this->$atributo = $valor;\r\n }", "public function set();", "public function __set($name, $val){}", "function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "public function __SET($atributo, $valor){\n $this->$atributo = $valor;\n }", "public function __SET($atributo,$valor)\r\n {\r\n return $this->$atributo = $valor;\r\n }", "function __set($dom_member, $value) {\r\n# print \"SET: \\n\";\r\n# var_dump($dom_member);\r\n# var_dump($value);\r\n # Catch if an array is given to attr and set the attributes!\r\n switch ($dom_member) {\r\n case 'attr' :\r\n # When assigned remove all current attribute(s)\r\n while ($this->domElement->attributes->length) {\r\n $this->domElement->removeAttributeNode($this->domElement->attributes->item(0));\r\n }\r\n\r\n if (is_array($value)) {\r\n $domElement_attr = new SimpleDOMElementAttr($this->domElement);\r\n foreach ($value as $attribute_name => $attribute_value) {\r\n $domElement_attr[$attribute_name] = $attribute_value;\r\n }\r\n }\r\n break;\r\n case 'nodeValue' :\r\n SimpleDOMFunctions::processNodeValue($this->domElement, $value);\r\n break;\r\n }\r\n\r\n # Get member variable from the DOMElement object\r\n $this->domElement->$dom_member = $value;\r\n }", "function __set($name,$valor)\r\n{\r\n\t$this->$name=$valor;\r\n\r\n}", "function __set($nm,$val)\r\n {\r\n try\r\n {\r\n //Try to get the property from the object\r\n parent::__set($nm,$val);\r\n }\r\n catch (EPropertyNotFound $e)\r\n {\r\n \t\t$this->fieldset($nm,$val);\r\n }\r\n }", "public function __set($name, $value) {}", "public function __set($nom, $valeur) {\n $this->_attributs[$nom] = $valeur;\n }", "function __set($name, $value)\n {\n }", "function __set($name, $value)\n {\n }", "final public function __set($name, $value) {}", "function __set($name,$value){\n\t\tif($is_debug)\n\t\t\techo 'Your val is '.$name.'=>'.$value;\n\t}", "public function __set($atributo, $valor) {\n $this->$atributo = $valor;\n }", "public function __set($atributo, $valor)\n {\n $this->atributo = $valor;\n }", "public function __set($name, $value) { }", "function __set($name, $value)\n {\n// echo $name . \"\\n\";\n// echo $value . \"\\n\";\n }", "public function set($attr,$value){\n\t\t$this->$attr = $value;\n\t}", "static protected function __set(&$arg1, &$arg2, &$arg3) {}", "public function __set($name, $value);", "public function __set($name, $value);", "public function __set($nom, $valeur){\n\t\techo 'Hey oh, jeune Padawan, que fais-tu? La propriété <u><b>'. $nom. '</b></u> n\\'existe pas. Valeur: ' .$valeur;\n\t// se declenche lorsqu'on tente d'affecter une valeur à une propriété qui n'existe pas\n\t//set est utile si on travaille avec des proprietes public. mais dans le cas ou mes proprietes sont private et que j'utilise donc un getter et un setter par propriete, __set n'est pas necessaire car l'user mal intentionné ne peut pas créer des getter et des setter pour acceder à une propriete private\n\t}", "abstract public function set($value);", "public function __set ($name, $value);", "public static function setters();", "public static function setters();", "public static function setters();", "public static function setters();", "public static function setters();", "public static function setters();", "public static function setters();", "public static function setters();", "public static function setters();", "public static function setters();", "public static function setters();", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function __set($var, $val)\n \t{\n \t $this->filter = $val;\n \t}", "function __set( $name, $value )\n\t{\n\t\t// Inner - Outer\n switch ( $name )\n\t\t{\n case 'outerHtml': case 'html' :\treturn $this->outerHtml = $value;\t\t\t\t\n case 'innerHtml':\treturn $this->innerHtml = $value;\n }\n\t\t\n return $this->tag->setAttribute( $name, $value ); \n }", "abstract function set($key,$val);", "public function __set($key, $value)\n {\n \t$this->attributes[$key] = $value;\n }", "public function __set($name, $value)\r\n {\r\n }", "function __set($name, $value)\n\t{\n\t\tif ($this->setAttribute($name, $value) === false)\n\t\t{\n\t\t\tparent::__set($name, $value);\n\t\t}\n\t}", "public function setValues();", "public function __set($name,$val) {\n\t\t$this->_data[$name] = $val;\n\t\t$this->_diffs[$name] = $val;\n\t}", "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "function __set($data, $value)\r\n\t{\r\n\t\techo \"__set is called\".\"<br>\";\r\n\t\techo \"Data is: \".$data.\"<br>\";\r\n\t\techo \"Value is: \".$value;\r\n\t}", "public function __set( $att, $val ) {\n if( empty( $this->cache ) ) {\n $this->keycache = array_keys( get_object_vars( $this ) );\n }\n\n if( array_key_exists( $att, $this->keycache ) ) {\n $this->$att = $val;\n } else {\n $this->user->$att = $val;\n }\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name,$value)\n\t{\n\t\tif(in_array($name,$this->config_other_attributes))\n\t\t\t$this->list_other_attributes[$name]=$value;\n\t\telse \n\t\t\tparent::__set($name,$value);\n\t}", "public function set($value) {}", "function set($value);", "function set() { return $this->op('$set', func_get_args()); }", "public function set($name, $value){}", "public function __set($name,$value){\n $this->$name = $value;\n}", "public function __set( $name, $value ) {\n Helpers::debug(get_called_class() . \"::__set $name \" . var_export($value,true));\n if ( strpos($name,\"__\") === 0 ) {\n $this->{$name} = $value;\n return;\n }\n $meta_table = $this->actual_meta_attributes_table;\n $model_table = $this->actual_model_attributes_table;\n $s = $this->actual_model_settings;\n\n if ( ! isset( $meta_table[$name] ) ) {\n Helpers::debug(get_called_class() . \"::__set $name is not defined in meta_table\");\n }\n if ( isset( $meta_table[$name] ) ) {\n Helpers::debug(get_called_class() . \"::__set is set meta_table $name \" . var_export($value,true));\n $desc = $meta_table[$name];\n if ( isset($desc['setter'])) {\n Helpers::debug(\"::__set is applying setter for $name\");\n apply_setter($value,$desc,'__set');\n } else {\n $this->_meta_attributes[$name] = $value;\n }\n } else if (strtolower($name) == 'id') {\n Helpers::debug(get_called_class() . \"::__set if strtolower id $name \" . var_export($value,true));\n $this->id = $value;\n } else if ( isset( $model_table[$name] ) ) {\n Helpers::debug(get_called_class() . \"::__set if isset mode_table $name \" . var_export($value,true));\n $this->_model_attributes[$name] = $value;\n } else if ( isset( $s['has_many'] ) && $this->inArray( $name, array_keys($s['has_many']) ) ) {\n Helpers::debug(get_called_class() . \"::__set if isset has_many $name \" . var_export($value,true));\n $this->{$name} = $value;\n } else {\n throw new \\Exception( sprintf(__('That attribute %s does not exist to be set to %s. for %s','woocommerce_json_api'),\"`$name`\", (string)var_export($value,true), get_called_class()) );\n }\n }", "final public function __set($name, $value)\n {\n }", "public function __set($prop, $val) {\n\t\t$this->setAttribute($prop, $val);\n\t}", "public function __set($name, $value)\r\n{\r\n $this->$name = $value;\r\n}", "function __set ( $name , $value )\n {\n $this->$name=$value;\n }", "public function __set($name, $value){\n $this->data[$name]= $value;\n }", "public function setAttributes()\n {\n\n }", "public function set()\n\t{\n\t}", "public function set( $name, $value );", "public function __set ( $name,$value )\n {\n if ( $this -> setAttribute ( $name,$value ) === false )\n {\n parent::__set ( $name,$value );\n }\n }", "public function __set(string $name, $value);", "public function setAttribute($key, $val);", "public function set($a)\n{\n\tforeach($a as$k=>$v)$this->$k=$v;\n}", "abstract public function set($name, $value);", "final public function setAttribute($attr,$value){\nif(!self::isAttributeSpecial($attr)){\n$this->validateAttributeValue($attr,$value);\n}else {\n$value=(string)$value;\n}\n$this->attributes[$attr]=$value;\nreturn $this;\n}", "public function __set( $key , $val ){\n\t\t\t$this->data['seomatic'][ $key ] = $val;\n\t\t}", "public function __construct($daten = array())\n{\n if ($daten) {\n foreach ($daten as $k => $v) {\n $setterName = 'set' . ucfirst($k);\n // wenn ein ungültiges Attribut übergeben wurde\n // (ohne Setter), ignoriere es\n if (method_exists($this, $setterName)) {\n $this->$setterName($v);\n }\n }\n }\n}", "public function set()\n {\n }", "public function __set($name,$value) {\n if(substr($name,-3)==='Url') {\n if(isset($this->_urls[substr($name,0,-3)]))\n $this->_urls[substr($name,0,-3)]=$value;\n }\n if(substr($name,-4)==='View') {\n if(isset($this->_views[substr($name,0,-4)]))\n $this->_views[substr($name,0,-4)]=$value;\n }\n\n //parent::__set($name,$value);\n }", "public function set($data) {\n \tforeach ($data AS $key => $value) \n \t\t$this->{$key} = htmlentities($value, ENT_QUOTES);\n \t}", "public function __set($name, $value) {\n switch ($name) {\n case \"id\" :\n $this->_id = $value;\n break;\n case \"id_comuna\" :\n $this->_id_comuna = $value;\n break;\n case \"nombreusuario\" :\n $this->_nombreusuario = $value;\n break;\n case \"contrasena\" :\n $this->_contrasena = $value;\n break;\n case \"nombre\" :\n $this->_nombre = $value;\n break;\n case \"apellido_paterno\" :\n $this->_apellido_paterno = $value;\n break;\n case \"apellido_materno\" :\n $this->_apellido_materno = $value;\n break;\n case \"correo\" :\n $this->_correo = $value;\n break;\n case \"telefono\" :\n $this->_telefono = $value;\n break;\n case \"fecha_creacion\" :\n $this->_fecha_creacion = $value;\n break;\n case \"activo\" :\n $this->_activo = $value;\n break;\n default:\n $trace = debug_backtrace();\n trigger_error(\n 'Undefined property via __set(): ' . $name .\n ' in ' . $trace[0]['file'] .\n ' on line ' . $trace[0]['line'],\n E_USER_NOTICE);\n }\n }", "public function __set($name, $_value)\n {\n throw new LogicException(\"Cannot set new properties on ValueObjects.\");\n }", "function __set($key, $value)\n\t{\n\t$this->{$key} = $value;\n\t}", "public function set_attribute($attr, $value) { $this->attributes[(string)$attr] = $value; }", "public function __set(string $name, $value): void;", "function __set($name, $value) {\n\t\t// only change keys that exist to prevent error on update\n\t\tif (array_key_exists($name, $this->info))\n\t\t\t$this->info[$name] = $this->altered[$name] = $value;\n\t}", "public function __set(string $key, $value) {}", "public function set($value);", "public function set($value);", "function __set($name,$value) {\n\n\t\t$this->$name = $value;\n\t}" ]
[ "0.70271647", "0.70077974", "0.69916743", "0.69017357", "0.6744073", "0.6708873", "0.6673893", "0.65930974", "0.6565433", "0.65647715", "0.65352404", "0.64916897", "0.64916897", "0.64810884", "0.64675033", "0.6463679", "0.6455928", "0.6452254", "0.64119625", "0.63844526", "0.6376553", "0.6375001", "0.6375001", "0.636374", "0.635642", "0.6355869", "0.6351756", "0.6351756", "0.6351756", "0.6351756", "0.6351756", "0.6351756", "0.6351756", "0.6351756", "0.6351756", "0.6351756", "0.6351756", "0.6306922", "0.6306922", "0.6304042", "0.629932", "0.62917286", "0.62752193", "0.6244613", "0.62272584", "0.6226709", "0.6220256", "0.6217908", "0.6217908", "0.6217908", "0.6217908", "0.6215859", "0.6188532", "0.617563", "0.6174714", "0.6174714", "0.61746037", "0.61746037", "0.61746037", "0.61746037", "0.61746037", "0.61746037", "0.61746037", "0.6173863", "0.6172754", "0.6171651", "0.61708695", "0.6157932", "0.6146906", "0.6137732", "0.6119599", "0.61161786", "0.61141574", "0.6110758", "0.61102796", "0.6107922", "0.6099854", "0.60897034", "0.6080264", "0.6076201", "0.60737896", "0.6069978", "0.60675246", "0.6066611", "0.6047147", "0.60449636", "0.6042309", "0.602754", "0.60097903", "0.6009716", "0.60089755", "0.6004706", "0.59998775", "0.59964454", "0.59871966", "0.5986262", "0.5985124", "0.5985111", "0.5985111", "0.5983724" ]
0.7653206
0
Surcharge de __isset pour donner acces aux valeurs sous la forme isset($e>attribut)
Сурчардж __isset для доступа к значениям в виде isset($e>attribut)
public function __isset($_cle) { if (array_key_exists($_cle, $this->valeurs)) { // La propriete demandee est bien une cle du tableau des valeurs return isset($this->valeurs[$_cle]); } elseif (array_key_exists($_cle, static::$relations_elem)) { isset(static::$relations_elem[$_cle]); } throw new \Exception("Attribut '$_cle' inconnu dans '" . get_class($this) . "'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __isset($attr) {\n return isset($this->_attr[$attr]);\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset( $key ) {\n\t\t$attributes = $this->get_attributes_array();\n\t\treturn isset( $attributes[$key] );\n\t}", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "function __isset($name) {\n return isset($this->attPrive[$name]);\n }", "public function __isset($key) {\n return isset($this->attributes[$key]);\n }", "function __isset( $name )\n\t{\n switch ($name)\n\t\t{\n case 'innerHtml': return true;\n case 'outerHtml': return true;\n case 'plaintext': return true;\n }\n\t\t\n\t\t// obtener attrs\n\t\t$attrs = $this->tag->getAttributes();\n\t\t\n //no value attr: nowrap, checked selected...\n return ( array_key_exists( $name, $attrs ) ) ? true : isset( $attrs[ $name ] );\n }", "public function __isset($name) {}", "public function __isset($key)\n {\n return isset($this->_attributes[$key]);\n }", "public function __isset( $key ){\n\t\t\treturn isset( $this->data['seomatic'][ $key ] );\n\t\t}", "public function __isset( $key ) { return false; }", "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "public function __isset($property){ }", "public function __isset($name) {\n if (strpos($name, '_') === 0 || $name == 'attributes') {\n return isset($this->$name);\n } else {\n return isset($this->attributes[$name]);\n }\n }", "public function __isset($name) {\n if (strpos($name, '_') === 0 || $name == 'attributes') {\n return isset($this->$name);\n } else {\n return isset($this->attributes[$name]);\n }\n }", "public function __isset( $key ) { return isset( $this->data[$key] ); }", "public function __isset($name) {\n\t\treturn isset($this->attr[$name]);\n\t}", "function __isset($name)\n\t{\n\t\tif (isset($this->_attributes[$name]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t// We're mostly just concerned with whether the attribute exists,\n\t\t// so even not-yet-set attributes should return 'true' here.\n\t\telse if (in_array($name, $this->attributeNames()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn parent::__isset($name);\n\t\t}\n\t}", "function __isset($p) {\n\t\treturn isset($this->data[$p]) || isset($this->cell[$p]);\n\t}", "public function __isset($name);", "public function __isset($name);", "public function __isset($name);", "public function __isset($name);", "final public function isAttributeSet($attr){\nreturn isset($this->attributes[$attr]);\n}", "function __isset($name)\n {\n }", "function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n\t\t{\n\t\t\treturn in_array($name, $this->_validAttrs) || parent::__isset($name);\n\t\t}", "public function __isset($key) {\n\treturn isset($this->data[$key]);\n}", "public function __isset($offset)\n {\n }", "function __isset($key) { return (bool)$this->load($key); }", "public function __isset($key)\n {\n $attributes = $this->getAttributes();\n return isset($attributes[$key]);\n }", "public function __isset($k) {\n\t\treturn isset($this->data[$k]);\n\t}", "public function contieneAtributo($indice)\n {\n return array_key_exists($indice, $this->leerAtributos());\n }", "public function __isset($property_name);", "public function __isset ($name)\n {\n return array_key_exists($name, $this->_attribs);\n }", "public function __isset($key){\n \n return isset($this->v[$key]);\n \n }", "function __isset($name){\n\t\tif(array_key_exists($name, $this->info)){\n\t\t\treturn !empty($this->info[$name]);\n\t\t}\n\t\treturn false;\n\t}", "private function has_attribute($att)\n {\n \t$obj_vars=get_object_vars($this);\n \treturn array_key_exists($att, $obj_vars);\n\n }", "public function __isset($name)\n {\n if (in_array($name, [\n 'aux'\n ])) {\n return true;\n } else {\n return parent::__isset($name);\n }\n }", "public function __isset($k)\r\n\t{\r\n\t\treturn ($this->__get($k) !== null);\r\n\t}", "public function __isset( $attribute ){\n return isset( $this->_attributes[ $attribute ] );\n }", "public function __isset($property);", "public function __isset($key) \r\n {\r\n if (array_key_exists($key, $this->__data)) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function __isset($key) \n\t{\n\t\treturn isset($this->data[$key]);\n\t}", "public function has_attributes()\n {\n }", "public function has_attributes()\n {\n }", "public function __isset($name)\n {\n return array_key_exists($name, $this->_attributes);\n }", "public function __isset($name) {\n return isset($this->xml->$name);\n }", "public function __isset($key)\n {\n return (isset($this->data[$key]) OR ($global_data = $this->view_global->get() AND isset($global_data[$key])));\n }", "function offsetExists($key){ return isset($this->$key);}", "public function __isset($key){\n\t\treturn isset($this->vars[(string)$key]);\n\t}", "public function __isset($name)\n {\n return isset($this->attributes[$name]) || isset($this->$name);\n }", "public function __isset($name)\n {\n echo \"<br>A propriedade $name não é pública, você não pode acessá-la para ver se está declarada<br>\";\n return true;\n }", "public function __isset($_name)\n {\n throw new \\LogicException(sprintf(\"Cannot check unexisting property %s->%s\", __CLASS__, $_name));\n }", "public function __isset( $key ) {\n\t\treturn isset( $this->data[ $key ] );\n\t}", "public function __isset($key)\n\t{\n\t\treturn isset($this->_data[$key]);\n\t}", "public function __isset($key)\n\t{\n\t\treturn isset($this->data[$key]);\n\t}", "public function __isset( $key ) {\n\t\tif ( isset( $this->legacy_properties[ $key ] ) ) {\n\t\t\treturn true;\n\t\t} elseif ( isset( $this->data[ $key ] ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function __isset($name) {\n return TRUE;\n }", "public function isset($name);", "public function __isset($key)\n {\n return ($this->schema()->hasAttribute($key) && $this->$key !== null);\n }", "final public function __isset($key): bool\n {\n return isset($this->data[$key]);\n }", "public function __isset($key)\n {\n return isset($this->{$key});\n }", "public function __isset( $key ) {\n\t\treturn ! is_null( $this->__get( $key ) );\n\t}", "private function object_has_attribute($key){\n $classProperties = get_object_vars($this);\n return (array_key_exists($key,$classProperties));\n\n }", "public function __isset($key)\n\t{\n\t\treturn null !== $this->___data[lcfirst($key)];\n\t}", "public function __isset($name)\n {\n return isset($this->_elements[$name]);\n }", "public function __isset($pName) \r\n {\r\n \tif (substr($pName,0,5)==\"xmeta\"){\r\n\t \tif (isset($this->_metaData->{substr($pName,5)})){\r\n\t \t\treturn true;\r\n\t \t}\r\n\t \telse \r\n\t \t\treturn false; \r\n \t} elseif (isset($this->_data[$this->_position]->{$pName})) {\r\n \treturn true;\r\n \t} else { \r\n \t\treturn false;\r\n \t}\r\n }", "public function __isset($attr) {\n \n // If the attribute exists or the class property exists\n return isset($this->_pattern[$attr]);\n }", "public function __isset ( $name ) {\n\t\t$name_case = arri_find_key($name, $this->_customAttributes);\n\t\tif ($name_case !== false) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function __isset($key)\n\t{\n\t\treturn isset($this->$key);\n\t}", "function __isset($key) {\n\t\treturn $this->exists($key);\n\t}", "public function __isset($key) {\r\n if (is_object($this->data) && isset($this->data->$key)) {\r\n return true;\r\n } elseif (is_array($this->data) && isset($this->data[$key])) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function __isset($name)\n {\n return (isset($this->attributes[$name]) && !is_null($this->attributes[$name]));\n }", "public function __isset($name)\n {\n $getter = 'get' . $name;\n if (method_exists($this, $getter)) {\n return $this->$getter() !== null;\n } else {\n return ((isset($this->attributes[$name]) || isset($this->relations[$name])) ||\n ($this->hasGetMutator($name) && ! is_null($this->getAttributeValue($name))));\n }\n }" ]
[ "0.6702821", "0.66475606", "0.66475606", "0.66475606", "0.66475606", "0.65937406", "0.6560625", "0.6560625", "0.6559617", "0.6559617", "0.6559617", "0.6559424", "0.6559424", "0.65591556", "0.65591556", "0.65363586", "0.64642334", "0.64429873", "0.64336747", "0.63784635", "0.6372648", "0.6366842", "0.6359906", "0.6359906", "0.6359906", "0.6359906", "0.6359906", "0.6359906", "0.6288757", "0.6267012", "0.6267012", "0.6260893", "0.6250836", "0.61829895", "0.6179739", "0.61743385", "0.61743385", "0.61743385", "0.61743385", "0.61719763", "0.6166089", "0.6166089", "0.6146572", "0.6146205", "0.6146205", "0.6146205", "0.6146205", "0.6146205", "0.6146205", "0.6146205", "0.6146134", "0.6137948", "0.61378646", "0.6134964", "0.6095083", "0.60920507", "0.6085682", "0.6079491", "0.6072954", "0.60498816", "0.602886", "0.60081595", "0.5999093", "0.5974511", "0.5974338", "0.5933131", "0.5923656", "0.59222496", "0.5919376", "0.5913723", "0.5913297", "0.5912079", "0.59089005", "0.59074646", "0.5893749", "0.5872183", "0.5855574", "0.58543396", "0.5849178", "0.584388", "0.583873", "0.58284324", "0.5824231", "0.5815704", "0.5807345", "0.5777948", "0.5774064", "0.5773273", "0.5772763", "0.5765838", "0.57568043", "0.57468754", "0.57466334", "0.57439286", "0.57365984", "0.57250607", "0.5720603", "0.5714522", "0.5714053", "0.57117605" ]
0.7326018
0
Surcharge de __unset pour donner acces aux valeurs sous la forme unset($e>attribut)
Сурчардж __unset для предоставления доступа к значениям в виде unset($e>attribut)
public function __unset($_cle /** Nom de la propriete */) { if (array_key_exists($_cle, $this->valeurs)) {// La propriete demandee est bien une cle du tableau des valeurs return $this->valeurs[$_cle] = null; } elseif (array_key_exists($_cle, static::$relations_elem)) { unset(static::$relations_elem[$_cle]); } throw new \Exception("Attribut '$_cle' inconnu dans '" . get_class($this) . "'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function attr_unset($attr,$key){\n $key = $this->key_prep($key);\n if(is_null($attr)){\n foreach($this->search('ppat',\"{^$key@.+}\") as $ck) unset($this->data[$ck]);\n } else if(is_array($attr)){\n foreach($attr as $ck) unset($this->data[$key . '@' . $ck]);\n } else unset($this->data[$key . '@' . $attr]);\n }", "public function unsetAttribute($attr){\n\t\tif(isset($_SESSION[\"attr\"][$attr])){\n\t\t\tunset($_SESSION[\"attr\"][$attr]);\n\t\t}\n\t}", "public function clearAttributes();", "public function offsetUnset($attribute)\n {\n $this->prop($attribute, false);\n $this->attr($attribute, false);\n }", "public function cleanAttrs($e)\n {\n if (!is_object($e)) return;\n\n $attrs = explode('|', $this->regexps['attrToRemove']);\n\n $elems = $e->getElementsByTagName('*');\n foreach ($elems as $elem) {\n foreach ($attrs as $attr) {\n $elem->removeAttribute($attr);\n }\n }\n }", "public function __unset($name)\n {\n if ($this->hasAttribute($name)) {\n unset($this->_attributes[$name]);\n } \n }", "function clearAttributes();", "function __unset( $name )\n\t{\n\t\t// obtener attrs\n\t\t$attrs = $this->tag->getAttributes();\n\t\t\n if ( isset( $attrs[ $name ] ) )\n return $this->tag->removeAttribute( $name );\n }", "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "public function __unset($key)\n {\n unset($this->attributes[$offset]);\n }", "public function __unset($name)\n {\n if ($this->hasAttribute($name)) {\n unset($this->_attributes[$name]);\n } else {\n parent::__unset($name);\n }\n }", "public function unsetAttribute(string $key);", "public static function __fieldUnset(UnsetPropertyHook $hook): void;", "public function purgeAttributes();", "function __unset($p) {\n\t\tunset($this->data[$p]);\n\t\tunset($this->cell[$p]);\n\t}", "function remove($att) {\n\t\tif(isset($this->attributes[$att])) {\n\t\t\tunset($this->attributes[$att]);\n\t\t}\n\t}", "final public function __unset($name) {}", "public function clear_attributes(){\n $this->attributes = array();\n }", "public function unset(): void\n {\n if (!$this->handle) {\n $this->model->customAttributes()->delete();\n } else {\n $ak = $this->getAttributeKeyByHandle($this->handle);\n $this->model->customAttributes()->where('key_id', $ak->id)->delete();\n }\n\n Cache::forget($this->makeCacheKey($this->handle));\n Cache::forget($this->makeCacheKey());\n }", "public function __unset(string $attribute)\n {\n $this->offsetUnset($attribute);\n }", "public function offsetUnset($offset) {\n unset($this->attribute[$offset]);\n }", "public function __unset($name) {}", "final public function removeAttribute($attr){\nif(!self::isAttributeSpecial($attr)){\n$this->validateAttributeValue($attr,$value=null);\n}\nunset($this->attributes[$attr]);\nreturn $this;\n}", "public function __unset($property) {\n parent::offsetUnset($property);\n }", "public function __unset($property);", "public function __unset($name)\n {\n echo \"<br>A propriedade $name não é pública, você não pode acessá-la para destruí-la\";\n unset($this->$name);\n }", "public function __unset( $key ){\n\t\t\tunset( $this->data['seomatic'][ $key ] );\n\t\t}", "function attrRedefinition($attrName)\n\t{\n\t\tforeach($this->attributes as $key => $value)\n\t\t{// pruchod vsemi atributy\n\t\t\t// kontrola nazvu a dedicnosti\n\t\t\tif($value->attrName == $attrName && $value->inherit)\n\t\t\t{// odstraneni zdedeneho atributu\n\t\t\t\tunset($this->attributes[$key]);\n\t\t\t}\n\t\t}\n\t}", "public function __unset($k) {\n\t\tunset($this->data[$k]);\n\t}", "public function __unset( $key ) { if ( isset( $this->data[$key] ) ) unset( $this->data[$key] ); }", "function clearAttributes() {\n $this->attributes = array();\n }", "public function __unset($property_name);", "function removeAttribute($name) {\r\n unset($this->_attributes[$name]);\r\n }", "public function __unset($attr) {\n \n // Request is an object attribute\n if (@array_key_exists($attr, $this->_pattern)) {\n $this->_pattern[$attr] = null;\n }\n }", "function removeAttribute($name);", "#[\\ReturnTypeWillChange]\n\tfunction offsetunset($key) {\n\t\tif (Base::instance()->visible($this,$key))\n\t\t\tunset($this->$key);\n\t\telse\n\t\t\t$this->clear($key);\n\t}", "public function removeAttr($attr) {\n\t\tif (key_exists($attr, $_SESSION[\"attr\"]))\n\t\t\tunset($_SESSION[\"attr\"][$attr]);\n\t}", "public function __unset($name);", "public function __unset($name);", "public function __unset($name);", "public function offsetUnset($name) {\n\n\t\t$this->removeAttribute($name);\n\t}", "public function __unset($name) {\n\t\tif (!$this->read_only) {\n\t\t\t$this->load();\n\t\t\tunset($this->data[$name]);\n\n\t\t\tif (in_array($name, $this->old_data))\n\t\t\t\t$this->data[$name] = null;\n\t\t}\n\t}", "public function __unset ( $name ) {\n\t\t$name_case = arri_find_key($name, $this->_customAttributes);\n\t\tif ($name_case !== false) {\n\t\t\tunset($this->_customAttributes[$name_case]);\n\t\t}\n\t}", "public function removeAttribute($key);", "function __destruct() {\n\t\tforeach ($this as $index => $value) unset($this->$index);\n\t}", "public function __unset($key)\n {\n }", "public function __unset($key)\n {\n }", "public function clearAttributes() {\n $this->attributes = array();\n }", "public function clearAttributes() {\n $this->attributes = array();\n }", "public function __unset($name) {\n unset($this->_data[$name]);\n }", "public function __unset($name) {\n unset($this->_data[$name]);\n }", "public function offsetUnset($key) {}", "public function __unset($name) {\n $value = &$this->__get($name);\n $value = array();\n }", "public function unsetAttribute($attr) {\n \n // Unset attribute proccess\n $this->__unset($attr);\n return $this;\n }", "public function __unset($key){\n \n unset($this->v[$key]);\n \n }", "function remove($attribname)\n {\n if (is_object($this->m_attribList[$attribname]))\n {\n $listindex = $this->m_attribList[$attribname]->m_index;\n\n unset($this->m_attribList[$attribname]);\n for ($i=0, $_i=count($this->m_listExcludes); $i<$_i; $i++)\n {\n if ($this->m_listExcludes[$i] == $attribname) unset($this->m_listExcludes[$i]);\n }\n for ($i=0, $_i=count($this->m_viewExcludes); $i<$_i; $i++)\n {\n if ($this->m_viewExcludes[$i] == $attribname) unset($this->m_viewExcludes[$i]);\n }\n for ($i=0, $_i=count($this->m_cascadingAttribs); $i<$_i; $i++)\n {\n if ($this->m_cascadingAttribs[$i] == $attribname) unset($this->m_cascadingAttribs[$i]);\n }\n\n unset($this->m_attribIndexList[$listindex]);\n }\n }", "public function __unset($name)\n {\n if (isset($this->$name)) {\n unset($this->_elements[$name]);\n }\n }", "public function clearAttributes(){\n\n\t\t$this->imagem = null;\n\t\t$this->fonte = null;\n\t\t$this->sexo = null;\n\t\t$this->data_nascimento = null;\n\t\t$this->data_desaparecimento = null;\n\t\t$this->local_desaparecimento = null;\n\t\t$this->altura = null;\n\t\t$this->peso = null;\n\t\t$this->cor_olho = null;\n\t\t$this->cor_cabelo = null;\n\t\t$this->cor_pele = null;\n\t\t$this->circunstancia_desaparecimento = null;\n\t\t$this->situacao = null;\n\t\t$this->estado = null;\n\t\t$this->nome = null;\n\t\t$this->idade = null;\n\t\t$this->dados_adicionais = null;\n\t}", "public function __unset($key)\n {\n }", "public function __unset($name) {\n debugging('Can not unset coursecat instance properties!', DEBUG_DEVELOPER);\n }", "public function __destruct() {\n\t\t\tforeach ($this as $key => $value) {\n\t\t\t\tunset($this->$key);\n\t\t\t}\n\t\t}", "public function __destruct() {\n\t\tforeach ($this as $key => $value) {\n\t\t\tunset($this->$key);\n\t\t}\n\t}", "public function __unset($name)\n {\n }", "public function __unset($name)\n {\n }", "public function __unset($name)\n {\n }", "public function __unset($name)\n {\n }", "public function __unset($name)\n {\n }", "public function __unset($name)\n {\n }", "public function __unset($name)\n {\n }", "public function __unset($name)\n {\n }", "public function __unset( $property )\n\t{\n\t\t$property = $this->beau( $property );\n\n\t\tif ( strpos( $property, 'xown' ) === 0 && ctype_upper( substr( $property, 4, 1 ) ) ) {\n\t\t\t$property = substr($property, 1);\n\t\t}\n\t\tunset( $this->properties[$property] );\n\t\t$shadowKey = 'sys.shadow.'.$property;\n\t\tif ( isset( $this->__info[ $shadowKey ] ) ) unset( $this->__info[$shadowKey] );\n\t\t//also clear modifiers\n\t\t$this->clearModifiers();\n\t\treturn;\n\t}", "public function __unset($key)\n {\n unset($this->data[$key], $this->view_global->$key);\n }", "function __unset($name)\n {\n }", "function __unset($name)\n {\n }", "public function cleanAttribute($key)\n {\n unset($this->attributes[$key]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($offset)\n {\n unset($this->attributes[$offset]);\n }", "public function offsetUnset($tag)\n {\n unset($this->entries[$tag]);\n }", "public final function __unset($name) { unset($this->overloaded_data[$name]); }", "public function __unset($key) \n\t{\n\t\tunset($this->data[$key]);\n\t}", "public function __unset($key)\n {\n $index = array_search($key, $this->properties);\n if($index !== false)\n {\n unset($this->properties[$index]);\n\n if(isset($this->data[$key]))\n {\n unset($this->data[$key]);\n }\n }\n }", "public function __unset(string $name)\n {\n $this->removeAttribute($name);\n }", "public function __unset($name)\n {\n // Try to unset property\n switch ($name) {\n // ISerializable\n case 'Status':\n $this->clearStatus();\n break;\n // IIterable\n case 'Parent':\n $this->clearParent();\n break;\n // IDataMapable\n }\n }", "public function clearAttributes()\n {\n $this->storage->emptyContents();\n }", "public function __unset($name)\n {\n if ($name === 'properties') {\n $this->properties = null;\n }\n else {\n unset($this->data[$name]);\n }\n }", "abstract public function offsetUnset($offset);", "public function offsetUnset($offset) {\n\t\t//throw new Exception('Data in HTMLData must be altered outside the object');\n unset($this->stack[$offset]);\n }", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}", "public function offsetUnset($offset) {}" ]
[ "0.68367237", "0.6742835", "0.661256", "0.65722716", "0.651329", "0.6508215", "0.6444632", "0.6436731", "0.6434211", "0.6434211", "0.6434211", "0.6434211", "0.6434211", "0.64272636", "0.6413561", "0.640634", "0.6381452", "0.63453245", "0.6328829", "0.6299918", "0.6294031", "0.62903464", "0.62879926", "0.6283652", "0.62811875", "0.62649906", "0.6255664", "0.6232232", "0.62186724", "0.6216428", "0.6214642", "0.62105614", "0.62040395", "0.6195078", "0.6162794", "0.6135264", "0.6121305", "0.6113982", "0.61078763", "0.609245", "0.60531306", "0.60529923", "0.60529923", "0.60529923", "0.6035767", "0.6029613", "0.6018446", "0.60019076", "0.5995954", "0.5948408", "0.5948408", "0.5943782", "0.5943782", "0.59364533", "0.59364533", "0.59357446", "0.59331083", "0.5916314", "0.5916101", "0.591186", "0.59035224", "0.5899539", "0.5888399", "0.58862597", "0.58793014", "0.5878764", "0.5869173", "0.58690923", "0.58690923", "0.58690923", "0.58690923", "0.58690923", "0.58690923", "0.58690923", "0.5853815", "0.5852463", "0.58503604", "0.58503604", "0.58335316", "0.58292544", "0.58292544", "0.58292544", "0.58292544", "0.58292544", "0.58177716", "0.5811451", "0.5808717", "0.5800144", "0.57959336", "0.5791799", "0.5790797", "0.5790229", "0.5789002", "0.57866794", "0.57824475", "0.57824475", "0.57824475", "0.57824475", "0.57824475", "0.57824475" ]
0.75800914
0
Renames a role (changes the label).
Переименовывает роль (изменяет метку).
public function renameRole($roleId, string $label);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRenameRole() {\n $this->drupalPostForm(\"admin/people/roles/manage/{$this->rid_low}\", array('label' => 'new low'), t('Save'));\n $this->drupalGet('admin/people/permissions');\n $this->assertFieldChecked(\n \"edit-{$this->rid_high}-assign-low-role\",\n t('Permissions are updated when role is renamed.'),\n t('Role Delegation')\n );\n }", "public function renameRole($role, $name)\n {\n $this->wp_roles->roles[$role]['name'] = $name;\n $this->wp_roles->role_names[$role] = $name;\n }", "function members_translate_role_hook( $label, $role ) {\n\n\treturn apply_filters( 'members_translate_role', translate_user_role( $label ), $role );\n}", "public function setRole(string $role);", "public function setRole(string $role);", "public function addAuthRoleName(string $role) : void;", "public function setRole($role);", "public function removeAuthRoleName(string $role) : void;", "public function createRole(string $label) : RoleInterface;", "public function addRole(string $role): void;", "public function set_role($role)\n {\n }", "public function changeRole() {\n $role = $_POST['role'];\n\n $result = $this->db->select(\"SELECT * FROM `as_user_roles` WHERE `role_id` = :r\", array( \"r\" => $role ));\n\n if(count($result) == 0)\n return;\n\n $this->updateInfo(array( \"user_role\" => $role ));\n\n return $result[0]['role'];\n }", "public function removeRole(string $role): void;", "function members_translate_role( $role ) {\n\tglobal $wp_roles;\n\n\treturn members_translate_role_hook( $wp_roles->role_names[ $role ], $role );\n}", "public static function label()\n {\n return __('Roles');\n }", "public function updateRole() \n {\n $this->validate([\n 'name' => ['required']\n ]);\n\n $this->role->update([\n 'name'=> $this->name\n ]);\n\n $this->role->syncPermissions($this->permissions);\n\n $this->emit('saved');\n }", "public function renameName ($name, $newname) {}", "public function assignRole($user, $role);", "function translate_user_role($name)\n{\n}", "public function update(RoleInterface $role)\n\t{\n if(Auth::user()->can('edit', $role)) {\n $response = null;\n\n $name = Input::get('name');\n $role->setName($name);\n if($this->role_repository->save($role)) {\n $response = Redirect::back()->with('name', trans('roles::role.rename success'));\n } else {\n $errors = new MessageBag();\n $errors->add('name', trans('roles::role.rename failed'));\n $response = Redirect::back()->withErrors($errors);\n }\n } else {\n $response = Redirect::home();\n }\n\n return $response;\n\t}", "public function remove_role($role)\n {\n }", "public function remove_role($role)\n {\n }", "public function setLabel(string $label) : RoleBuilderInterface\n {\n return $this->setProperty('label', $label);\n }", "public function setName($name)\n {\n if ($this->getObjectId()) {\n throw new Exception(\n \"A role's name can only be set before it has been saved.\");\n }\n if (!is_string($name)) {\n throw new Exception(\"A role's name must be a string.\");\n }\n return $this->set('roleName', $name);\n }", "public function addRole($role);", "public function addRole($role);", "public function setName($name)\n {\n if (0 !== strpos($name, 'ROLE_')) {\n throw new RuntimeException('Role names must start with \"ROLE_\"');\n }\n\n if (PlatformRoles::contains($this->name)) {\n throw new RuntimeException('Platform roles cannot be modified');\n }\n\n if (PlatformRoles::contains($name)) {\n $this->isReadOnly = true;\n }\n\n $this->name = $name;\n }", "public function setRole($var)\n {\n GPBUtil::checkString($var, True);\n $this->role = $var;\n\n return $this;\n }", "public function changeRole($post, $roleArray)\n {\n $userLogin = $_SESSION['login'];\n $login = $post['login'];\n $newRole = $post['idRole'];\n $newRoleName = '';\n\n if ($userLogin != $login) {\n $result = $this->changeRoleByLogin($login, $newRole);\n\n if ($result === false) {\n GenerateException::getException('Change user role wrong', __CLASS__, __LINE__);\n }\n\n if (! empty($roleArray)) {\n foreach ($roleArray as $arr) {\n if ($arr['idRole'] == $newRole) {\n $newRoleName = $arr['nameRole'];\n }\n }\n }\n\n $returnMsg = \"Теперь пользователь \\\"$login\\\" получил должность \\\"$newRoleName\\\"\";\n } else {\n $returnMsg = 'Себя понижать в должности не нужно, Вы уже самый главный. Других, пожалуйста.';\n }\n\n return $returnMsg;\n }", "public static function singularLabel()\n {\n return __('Role');\n }", "public function removeRole($role);", "#[API\\Input(type: 'UserRole')]\n public function setRole(string $role): void\n {\n if (!Role::canUpdate(self::getCurrent(), $this->role, $role)) {\n $currentRole = self::getCurrent() ? self::getCurrent()->getRole() : self::ROLE_ANONYMOUS;\n\n throw new Exception($currentRole . ' is not allowed to change role from ' . $this->role . ' to ' . $role);\n }\n\n $this->role = $role;\n }", "public function set_role($role)\n {\n }", "public function normalizeRoleName ($role)\n {\n $role = \\trim((string) $role);\n\n if (\"\" === $role)\n {\n throw new \\InvalidArgumentException(\"Role name can't be empty or only contain whitespace.\");\n }\n\n $role = \\strtoupper($role);\n\n return (0 !== \\strpos($role, \"ROLE_\"))\n ? \"ROLE_{$role}\"\n : $role;\n }", "public function rename($title, $type);", "public function role_name() : string {\n\t\tif(NULL === $this->role) {\n\t\t\treturn '';\n\t\t} else {\n\t\t\treturn $this->role->name();\n\t\t}\n\t}", "public function testSetLabel()\n {\n $label = 'role_label';\n $labelProperty = new \\ReflectionProperty(UnglinRole::class, 'label');\n $labelProperty->setAccessible(true);\n\n $this->assertSame($this->instance, $this->instance->setLabel($label));\n $this->assertEquals($label, $labelProperty->getValue($this->instance));\n }", "public function setRole($role) {\n\t\t$this->_role = $role;\n\t}", "public function setRole($role)\n {\n $this->role = $role;\n }", "public function setRole($role) {\n\t\t$this->role = $role;\n\t}", "public function setRole($role) {\n $this->roleid = $role;\n }", "public function attachRole($role);", "public function attachRole($role);", "public function rename($old_name, $new_name);", "public function assignRole(string $name)\n {\n $role = Role::where('name', $name)->first();\n $this->role()->associate($role);\n }", "public function addRole(Role $role);", "public function changePermissions(string $role_name, array $permissions): void;", "public function addRole(string $role): self;", "public function setRoleName($roleName)\n {\n $this->_roleName = $roleName;\n }", "public function rolename()\n {\n return config('variables.role')[$this->attributes['role']];\n }", "function remove_user_role($username, $role) {\n $drush = drush_location_get();\n\n print \"Removing new user role\\n\";\n exec_verbose(array($drush, 'user-remove-role', $role, $username));\n}", "public function giveRoleTo($name)\n {\n $role = Role::where('name', '=', $name)->first();\n\n if ($role) {\n $this->roles()->save($role);\n } else {\n throw new RoleNotFoundException(\"Role {$name} does not exist.\");\n }\n }", "public function add_role($role)\n {\n }", "public function update_role($role_id, $name = '', $description = '')\n {\n $r = new Role($role_id);\n \n if ( $r->exists() )\n {\n if ($name != '')\n {\n $r->name = $name;\n }\n \n if ($description !== '')\n {\n $r->description = $description;\n }\n \n if ($name !== '' OR $description !== '')\n {\n $r->save(); \n }\n }\n }", "function removeRole($role)\n {\n $this->fWarn->add(\"This fUser interface does not support changing roles. Update group membership in the directory for changing roles.\");\n return false;\n }", "public function update($role){\n\t\t$sql = 'UPDATE role SET roleName = ?, roleDescription = ? WHERE roleId = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t$sqlQuery->set($role->roleName);\n\t\t$sqlQuery->set($role->roleDescription);\n\n\t\t$sqlQuery->setNumber($role->roleId);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function tagRole($name, $target, $value = null)\n {\n return $this->tag(PHPDS_tagger::tag_role, $name, $target, $value);\n }", "public function setRoleAttribute($value)\n {\n $this->attributes['role'] = $this->getRoleIdFromNameOrId($value);\n }", "public function title(Role $sowlo_role) {\n return ['#markup' => $role->label()];\n }", "function remove_role($role)\n{\n}", "function addRole($role)\n {\n $this->fWarn->add(\"This fUser interface does not support changing roles. Update group membership in the directory for changing roles.\");\n return false;\n }", "public function set_role( $role ) {\n\t\tglobal $wp_roles;\n\n\t\tif ( $role && ! empty( $wp_roles->roles ) && ! in_array( $role, array_keys( $wp_roles->roles ), true ) ) {\n\t\t\t$this->error( 'student_invalid_role', __( 'Invalid role', 'communityservice' ) );\n\t\t}\n\t\t$this->set_prop( 'role', $role );\n\t}", "public function changeUserRole() {\n $user_id = $_POST['user_id'];\n $user_role = $_POST['user_role'];\n $this->model->changeUserRole( $user_id, $user_role );\n }", "function add_role($role, $display_name, $capabilities = array())\n{\n}", "public function rename($oldName, $newName);", "public function rename($strOldName, $strNewName) {}", "public function removeRole(string $role): self;", "public function updatedNewName()\n {\n $this->newName = 'Professior Oak';\n }", "public function assignRole($role)\n {\n if (is_string($role)) {\n $role = Role::whereName($role)->firstOrFail();\n }\n\n // if there is a similar record it wont fail (sync and false)\n $this->roles()->sync($role, false);\n }", "public function getAttributeName()\n\t{\n\t\treturn 'Role';\n\t}", "public function getRoleName()\n {\n return $this->role_name;\n }", "protected function restoreUserRole($originalRole)\n {\n GeneralUtility::logDeprecatedFunction();\n $userAuthentication = $this->getBackendUserAuthentication();\n\n if ($originalRole !== null && $userAuthentication !== null) {\n $userAuthentication->user['admin'] = $originalRole;\n }\n }", "public function set_Role($userID, $role){\r\n //Call the setName method\r\n $result= $this->setRole($userID, $role);\r\n \r\n if($result){\r\n echo \"<br>Successfull changed role!<br>\";\r\n return true;\r\n }else{\r\n echo \"<br>Error changing role<br>\";\r\n return false;\r\n }\r\n }", "public function setRole($role) {\n\t\tif (is_string($role)) {\n\t\t\t$this->_role = $role;\n\t\t} else {\n\t\t\tthrow new InvalidArgumentException('role should be string');\n\t\t}\n\t}", "public function setRole(string $role)\n {\n return $this->set_role($role);\n }", "public function updated(Role $role)\n {\n //\n }", "public function getRoleName()\n\t {\n\t return (Yii::app()->user->isGuest) ? '' : $this->getUserLabel($this->level);\n\t }", "public function convertedRole()\n {\n return strtoupper(substr($this->role, 0, 1)).strtolower(substr($this->role, 1));\n }", "function clinica_add_role_to_user($user, $role_name) {\n\n if (is_numeric($user)) {\n $user = user_load($user);\n }\n\n $key = array_search($role_name, $user->roles);\n if ($key == FALSE) {\n $roles = user_roles(TRUE);\n $rid = array_search($role_name, $roles);\n if ($rid != FALSE) {\n\n $new_role[$rid] = $role_name;\n $all_roles = $user->roles + $new_role;\n user_save($user, array('roles' => $all_roles));\n }\n }\n}", "function get_role_name($role){\n switch($role){\n case ADMIN: return \"Admin\";\n case SECRETARY: return \"Secretary\";\n case STUDENT: return \"Student\";\n case CHAIR: return \"Chair\";\n case INSTRUCTOR: return \"Instructor\";\n default: return \"INVALID ROLE\";\n }\n}", "public function changeUsername($newUsername);", "public function restored(Role $role)\n {\n //\n }", "public function restored(Role $role)\n {\n //\n }", "public function add_role($role, $display_name, $capabilities = array())\n {\n }", "public function update(RoleRequest $request, Role $role)\n {\n $roleOld = Role::where('name', $request->name)->first();\n if($roleOld && ($role->id != $roleOld->id)){\n $notification = array(\n 'message' => 'يوجد بالفعل رتبة بهذا الاسم',\n 'alert-type' => 'error',\n 'error' => 'يوجد بالفعل رتبة بهذا الاسم',\n );\n return back()->withInput($request->all())->with($notification);\n }\n $role->syncPermissions($request->permissions);\n $role->update(['name' => $request->name]);\n\n\n $notification = array(\n 'message' => 'تم حفظ التعديلات بنجاح',\n 'alert-type' => 'success',\n 'success' => 'تم حفظ التعديلات بنجاح',\n );\n return redirect()->route('roles.index')->with($notification);\n }", "function shorten_role ($role) {\n\tswitch ($role) {\n\t\tcase 'heavyweapons':\n\t\t\treturn 'hwg';\n\t\tcase 'soldier':\n\t\t\treturn 'sold';\n\t\tcase 'engineer':\n\t\t\treturn 'engi';\n\t\tcase 'medic':\n\t\t\treturn 'med';\n\t\tcase 'demoman':\n\t\t\treturn 'demo';\n\t\tdefault:\n\t\t\treturn $role;\n\t}\n}", "public function getRoleName()\n {\n \n return (Yii::app()->user->isGuest) ? '' : $this->getUserLabel($this->level);\n }", "public function setRoleId(?string $value): void {\n $this->getBackingStore()->set('roleId', $value);\n }", "public function addRole($role)\n {\n \t$role = strtoupper($role);\n \tif ($role === static::ROLE_DEFAULT) {\n \t\treturn;\n \t}\n \n \tif (!in_array($role, $this->roles, true)) {\n \t\t$this->roles[] = $role;\n \t}\n }", "public function rename($from, $to);", "public function modifyRole() {\n // Déclaration de la requête SQL qui permet de modifier un role\n $request = 'UPDATE `A12BC_user` '\n . 'SET `id_A12BC_role` = :idRole '\n . 'WHERE `id` = :id ';\n // Prépare la requéte SQL pour éviter les injections \n $modifyRole = $this->db->prepare($request);\n // Remplacement des marqueurs nominatif\n $modifyRole->bindValue(':id', $this->id);\n $modifyRole->bindValue(':idRole', $this->role);\n // Execution de la requête \n if ($modifyRole->execute()) {\n return;\n } else {\n // Si la requête ne c'est pas éxécuté on stock un message d'érreur dans le tableau d'érreur pour informer l'utilisateur\n $formError['execute'] = 'une erreur dans le processus d\\'inscription';\n }\n }", "final public static function hsAliasName(): string\n {\n return 'Role';\n }", "public function assignRole(Role $role){\r\n\t\treturn $this->roles()->save($role);\r\n\t}", "abstract public function rename($source, $dest);", "public function assignRole(Role $role ) {\n\t\t// if not add it\n\n\t\treturn $this->model->roles()->save($role);\n\t}", "public function addRole($role, $accessInherits=null);", "public function setRole($role)\n {\n return $this->getSite()->getWorkflows()->create(\n 'update_site_user_membership',\n ['params' => ['user_id' => $this->getUser()->id, 'role' => $role,],]\n );\n }", "public function roleName() {\n return self::$available_roles[$this->role];\n }", "public function getRoleNameAttribute()\n {\n return $this->role_name = $this->role->name;\n }", "public function getRoleName()\n {\n return $this->_roleName;\n }" ]
[ "0.73363686", "0.7111851", "0.66061836", "0.65901506", "0.65901506", "0.644995", "0.62305814", "0.6198419", "0.61719024", "0.6088936", "0.60333467", "0.5979819", "0.5974803", "0.59533054", "0.59400517", "0.59374565", "0.5895142", "0.58795404", "0.5872866", "0.5839893", "0.5838246", "0.5838246", "0.5828337", "0.58157647", "0.5806356", "0.5806356", "0.5794081", "0.57940793", "0.5779852", "0.5765602", "0.5741689", "0.572691", "0.57076466", "0.56898946", "0.5670276", "0.566613", "0.5666055", "0.5649857", "0.5639773", "0.56238073", "0.56206596", "0.56079257", "0.56079257", "0.5602997", "0.557916", "0.5572286", "0.5568915", "0.55480134", "0.55453825", "0.5543535", "0.55420727", "0.5536939", "0.55263525", "0.5514231", "0.55101544", "0.55092996", "0.54982066", "0.549457", "0.54755044", "0.54689956", "0.54675394", "0.54427934", "0.5429391", "0.5428042", "0.54278064", "0.5425459", "0.5423117", "0.5420274", "0.5417843", "0.5416583", "0.5414659", "0.5408186", "0.54069686", "0.54042274", "0.5393667", "0.53924316", "0.53839815", "0.53462297", "0.5331229", "0.532831", "0.5326572", "0.5322206", "0.5322206", "0.5319337", "0.531682", "0.5311946", "0.53084654", "0.53082615", "0.5302454", "0.5301637", "0.52909285", "0.5290885", "0.52899116", "0.5281903", "0.5280443", "0.52762663", "0.52746636", "0.5269381", "0.5264048", "0.5259208" ]
0.84888524
0
Return the context level associated with the object, for fetching custom fields.
Верните уровень контекста, связанный с объектом, для получения пользовательских полей.
abstract protected function get_field_context_level();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLevel() {}", "public function getContextInfo() {}", "public function getLevel();", "public function getLevel();", "public function getLevel();", "public function getLevel();", "public function getLevel()\n {\n }", "public function getLevel() {\n return $this->get(self::LEVEL);\n }", "public function getLevel()\n {\n return $this->getProperty('level', 'int');\n }", "function level() {\r\n return $this->_level;\r\n }", "private function get_context_fields($context)\n {\n }", "function getUserLevel(){\n\t\treturn $this->userLevel;\n\t}", "public function getLevel() {\n\t\t$this->getData();\n\t\treturn $this->level;\n\t}", "public function getUserLevel(){\n\t\treturn $this->userLevel;\n\t}", "public function getUserLevel()\n {\n return $this->getMetaValue($this->getTablePrefix() . 'user_level');\n }", "public function getLevel() {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->_level;\n }", "public function getLevel()\n {\n return $this->_level;\n }", "public function getLevel()\n {\n return $this->_level;\n }", "public function getLevel()\n {\n if (array_key_exists(\"level\", $this->_propDict)) {\n return $this->_propDict[\"level\"];\n } else {\n return null;\n }\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "function GetLevel() {\n\t\treturn $this->_level;\n\t}", "public function getLevelFieldName()\n {\n return $this->prototype->getLevelFieldName();\n }", "public function getLevel() {\n return $this->level;\n }", "public function getLevel() {\n return $this->_level;\n }", "function getUserLevel() {\r\n\t\t\treturn $this->userlevel;\r\n\t\t}", "public function getContext()\n {\n return $this->safeGet('context');\n }", "public function getLevel() {\n return $this->level;\n }", "public function getLevel() {\n return $this->level;\n }", "public function getLevel() {\n return $this->level;\n }", "public function getLevel() {\n return $this->level;\n }", "public function getLevel() {\n\t\treturn $this->level;\n\t}", "public function getLevel(): string;", "public function getDetailLevel()\n {\n return $this->detailLevel;\n }", "public function getLevel(){\n return $this->Level;\n }", "public function getIdLevel()\n {\n return $this->id_level;\n }", "public function getContext();", "public function getContext();", "public function getContext();", "public function getContext();", "public function getContext();", "public function getContext(){\n return $this->context;\n }", "public function getFeatureLevel() {\n $level = false;\n if($sub = $this->getCurrentAccountSubscription()) {\n $level = $sub->featureLevel;\n }\n return $level;\n }", "public function get_context() {\n\t\treturn $this->context;\n\t}", "public function getLevel(): string\n {\n return $this->level;\n }", "public function getContext(): GraphQLContext\n {\n return Arr::get($this->customAttributes, 'context');\n }", "public function getContext(){\r\n\t\treturn $this->context;\r\n\t}", "public function get_context() {\n return $this->context;\n }", "public function get_context() {\n return $this->context;\n }", "public function get_context() {\n return $this->context;\n }", "public function get_context() {\n return $this->context;\n }", "public function get_context() {\n return $this->context;\n }", "public function get_context() {\n return $this->context;\n }", "public function get_context() {\n return $this->context;\n }", "public static function current_access_level() {\n if (self::$access_level == Customer_Access::LEVEL_UNKNOWN) {\n self::load_current_customer();\n }\n return self::$access_level;\n }", "function get_user_level()\n{\n $current_user = current_user();\n return $current_user['user_level'];\n}", "function reader_get_context($contextlevel, $instanceid=0, $strictness=0) {\n if (class_exists('context_helper')) {\n // use call_user_func() to prevent syntax error in PHP 5.2.x\n // return $classname::instance($instanceid, $strictness);\n $class = context_helper::get_class_for_level($contextlevel);\n return call_user_func(array($class, 'instance'), $instanceid, $strictness);\n } else {\n return reader_get_context($contextlevel, $instanceid);\n }\n}", "public function getLvl()\n {\n return $this->lvl;\n }", "public function context()\n {\n return $this->context;\n }", "function getLevel() {\n\t\tif ($this->_logged) {\n\t\t\treturn $this->_level;\n\t\t}\n\n\t\treturn 100;\n\t}", "public function getIdLevel() {\n return $this->idLevel;\n }", "public function getCrfLevel()\n {\n return $this->crf_level;\n }", "public function getUserLevel(): int\n {\n return $this->userLevel;\n }", "public function getContext()\r\r\n {\r\r\n return $this->context;\r\r\n }", "public function customInfo()\r\n {\r\n return $this->getParent()->customInfo($this[\"client_database_id\"]);\r\n }", "public function getLevel(): int;", "public function getLevel(): int;", "public function getJlptLevel();", "public function context() {\n\t\t\treturn $this->context;\n\t\t}", "public function getContext() {}", "public function getContext()\r\n\t{\r\n\t return $this->_context;\r\n\t}", "public function getContext(){\r\n\t\t\r\n\t\treturn $this->context[$this->contextNode];\t\r\n\t}", "public function getContext()\n {\n return $this->_context;\n }", "function getAccessLevel(){\r\n\t\treturn $this->access_level;\r\n\t}", "static function contextNode ($object) {\n $metaContextKey = 'contextNode:' . spl_object_hash($object);\n if (isset(op\\metaContext(IIData::class)[$metaContextKey]) && op\\metaContext(IIData::class)[$metaContextKey])\n return op\\metaContext(IIData::class)[$metaContextKey];\n return null;\n }", "public function getContext() {\n return $this->_context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }", "public function getContext()\n {\n return $this->context;\n }" ]
[ "0.60792387", "0.6069081", "0.60048324", "0.60048324", "0.60048324", "0.60048324", "0.599567", "0.59292823", "0.59139043", "0.58895236", "0.58827573", "0.58763754", "0.5860698", "0.58442724", "0.5825574", "0.5824983", "0.5809721", "0.5809721", "0.5809721", "0.5808688", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5806809", "0.5800181", "0.5783458", "0.5778786", "0.57681584", "0.5762886", "0.57585514", "0.57549447", "0.57549447", "0.57549447", "0.57549447", "0.573706", "0.5686531", "0.56858194", "0.56737846", "0.56576204", "0.5604255", "0.5604255", "0.5604255", "0.5604255", "0.5604255", "0.558679", "0.55844486", "0.5571653", "0.55641687", "0.5562747", "0.55556726", "0.55394346", "0.55394346", "0.55394346", "0.55394346", "0.55394346", "0.55394346", "0.55394346", "0.553857", "0.55346364", "0.5501218", "0.5500709", "0.5495254", "0.5493884", "0.548734", "0.5484521", "0.54785943", "0.54756874", "0.5472893", "0.54690135", "0.54690135", "0.54641277", "0.5460208", "0.54550797", "0.5434988", "0.5431348", "0.54215914", "0.54204494", "0.54179645", "0.54038215", "0.5402018", "0.5402018", "0.5402018", "0.5402018", "0.5402018", "0.5402018", "0.5402018", "0.5402018", "0.5402018", "0.5402018", "0.5402018", "0.5402018" ]
0.8228132
0
Converts the data_object a dumb object representation (without associations). This is required when using the Moodle _record functions, or get_string. Overridden to add custom fields.
Преобразует данные_объект в примитивное представление объекта (без ассоциаций). Это необходимо при использовании функций Moodle _record или get_string. Переопределено для добавления пользовательских полей.
public function to_object() { $obj = parent::to_object(); $this->_load_field_data(); foreach ($this->_field_data as $name => $value) { $fieldname = "field_{$name}"; $obj->$fieldname = $value; } return $obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toObject()\r\n\t{\r\n\t\t$value = null;\r\n\t\t\r\n\t\tif(isset($this->dataObject) || !is_null($this->dataObject)) //There is an object behind the data object \r\n\t\t{\r\n\t\t\tKalturaLog::debug(\"Take value from data object [\" . print_r($this->dataObject,true) .\"]\");\r\n\t\t\t$value = $this->dataObject;\r\n\t\t}\r\n\t\telse //Simple Type\r\n\t\t{\r\n\t\t\tKalturaLog::debug(\"Take value from value [\" .print_r($this->getValue(),true) .\"]\");\r\n\t\t\t$value = $this->getValue();\r\n\t\t}\r\n\t\t\r\n\t\treturn $value;\r\n\t}", "public function toObject(): object\n {\n return (object) $this->data;\n }", "public function toObject($data) {}", "abstract public function denormalizeObject(array $data);", "public function prepareDataForPersistence(DataObject $object)\n {\n $data = [];\n $fields = $this->getAllowedFields();\n\n foreach (array_keys($fields) as $field) {\n if ($object->hasData($field)) {\n $fieldValue = $object->getData($field);\n\n if ($fieldValue !== null) {\n $data[$field] = $fieldValue;\n } elseif (key_exists('null_value', $fields[$field])) {\n $data[$field] = $fields[$field]['null_value'] == 'NULL'\n ? null\n : $fields[$field]['null_value'];\n }\n }\n }\n\n unset($data[AbstractModel::ID_FIELD_NAME]);\n\n return $data;\n }", "public function denormalize(array $data): object;", "public function getDataObject()\n\t{\n\t\treturn $this->_dataObject;\n\t}", "public function hydrateObject(array $data, $object);", "public function hydrate( $data );", "public function hydrate(array $data, $object);", "public function hydrate(array $data, $object);", "public function hydrate(array $data, $object);", "function &extractMetadataFromDataObject(&$dataObject) {\n\t\t// Must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public static function object(mixed $data) : DataValue {\n return DataValue::create()\n ->setType(DataValueDataValueTypes::Object)\n ->setValue(\n array(\n \"\\$type\" => \"Relewise.Client.DataTypes.DataObject, Relewise.Client\",\n \"Data\" => $data\n ));\n }", "protected function transformDataObjects()\n\t{\n\t\t$dataObjects = $this->data;\n\n\t\tforeach($dataObjects as $key => $row)\n\t\t{\n\t\t\t$this->data[$key] = (array) $row;\n\t\t}\n\t}", "public function toStdClass()\r\n {\r\n $data = null;\r\n\r\n $caca = json_encode($this->originalData);\r\n switch ($this->originalType) {\r\n case self::ARRAY_TYPE:\r\n $data = json_decode(json_encode($this->originalData));\r\n if (count((array) $data) == 0) {\r\n $data = new \\stdClass();\r\n }\r\n break;\r\n default:\r\n $data = $this->originalData;\r\n break;\r\n }\r\n\r\n return $data;\r\n }", "function convertToObject($object) {\r\n\t\tisset ( $object ['userId'] ) ? $this->setId ( $object ['userId'] ) : '';\r\n\t\tisset ( $object ['userName'] ) ? $this->setName ( $object ['userName'] ) : '';\r\n\t\tisset ( $object ['userPassword'] ) ? $this->password = $object ['userPassword'] : '';\r\n\t\tisset ( $object ['userLastLogin'] ) ? $this->setLastLogin ( $object ['userLastLogin'] ) : '';\r\n\t\tisset ( $object ['userJoinDate'] ) ? $this->setJoinDate ( $object ['userJoinDate'] ) : '';\r\n\t\tisset ( $object ['userStatus'] ) ? $this->setStatus ( $object ['userStatus'] ) : 0;\r\n\t\tisset ( $object ['userIndex'] ) ? $this->setIndex ( $object ['userIndex'] ) : '';\r\n\t}", "public function convertData()\n\t{\n\n\t\t$this->_rawdata = serialize($this->_data);\n\n\t\t$this->processField(\"dtstart\", 0);\n\t\t$this->processField(\"dtstartraw\", \"\");\n\t\t$this->processField(\"duration\", 0);\n\t\t$this->processField(\"durationraw\", \"\");\n\t\t$this->processField(\"dtend\", 0);\n\t\t$this->processField(\"dtendraw\", \"\");\n\t\t$this->processField(\"dtstamp\", \"\");\n\t\t$this->processField(\"class\", \"\");\n\t\t$this->processField(\"categories\", \"\");\n\t\t$this->processField(\"description\", \"\");\n\t\tif (strpos($this->description, \"##migration##\") === 0)\n\t\t{\n\t\t\t$this->description = StringHelper::substr($this->description, StringHelper::strlen(\"##migration##\"));\n\t\t\t$this->description = base64_decode($this->description);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->description = str_replace('\\n', \"<br/>\", $this->description);\n\t\t\t$this->description = stripslashes($this->description);\n\t\t}\n\n\t\t$this->processField(\"geolon\", \"0\");\n\t\t$this->processField(\"geolat\", \"0\");\n\t\t$this->processField(\"location\", \"\");\n\t\tif (strpos($this->location, '\\n'))\n\t\t{\n\t\t\t$this->location = str_replace('\\n', '<br>', $this->location);\n\t\t}\n\t\t$this->loc_id = (int) $this->location;\n\t\t$this->processField(\"priority\", \"0\");\n\t\t$this->processField(\"status\", \"\");\n\t\t$this->processField(\"summary\", \"\");\n\t\t$this->processField(\"contact\", \"\");\n\t\t$this->processField(\"organizer\", \"\");\n\t\t$this->processField(\"url\", \"\");\n\t\t$this->processField(\"created\", \"\");\n\t\t$this->processField(\"sequence\", \"0\");\n\n\t\t// Fix some stupid Microsoft IIS driven calendars which don't encode the data properly!\n\t\t// see section 2 of http://www.the-art-of-web.com/html/character-codes/\n\t\t// moved to ical import code directly since this can cause problems with some editor based content (remember strange hyphen in MyEarthHour)\n\t\t//$this->description =str_replace(array(\"\\205\",\"\\221\",\"\\222\",\"\\223\",\"\\224\",\"\\225\",\"\\226\",\"\\227\",\"\\240\"),array(\"...\",\"'\",\"'\",'\"','\"',\"*\",\"-\",\"--\",\" \"),$this->description);\n\t\t//$this->summary =str_replace(array(\"\\205\",\"\\221\",\"\\222\",\"\\223\",\"\\224\",\"\\225\",\"\\226\",\"\\227\",\"\\240\"),array(\"...\",\"'\",\"'\",'\"','\"',\"*\",\"-\",\"--\",\" \"),$this->summary);\n\n\t\t// The description and summary may need escaping !!!\n\t\t// But this will be done by the SQL update function as part of the store so don't do it twice\n\t\t/*\n\t\t$db = Factory::getDbo();\n\t\t$this->description = $db->escape($this->description);\n\t\t$this->summary = $db->escape($this->summary);\n\t\t*/\n\n\t\t// get default value for multiday from params\n\t\t$cfg = JEVConfig::getInstance();\n\t\t$this->processField(\"multiday\", $cfg->get('multiday', 1));\n\n\t\t$this->processField(\"noendtime\", 0);\n\n\t\t$this->processField(\"x-extrainfo\", \"\", \"extra_info\");\n\n\t\t$this->processField(\"x-color\", \"\", \"color\");\n\n\t\t// To make DB searches easier I set the dtend regardless\n\t\tif ($this->dtend == 0 && $this->duration > 0)\n\t\t{\n\t\t\t$this->dtend = $this->dtstart + $this->duration;\n\t\t}\n\t\telse if ($this->dtend == 0)\n\t\t{\n\t\t\t// if no dtend or duration (e.g. from imported iCal) - set no end time\n\t\t\t$this->noendtime = 1;\n\t\t\t$icimport = new iCalImport();\n\t\t\t$this->dtend = $icimport->unixTime($this->dtstartraw);\n\t\t\t// an all day event\n\t\t\tif ($this->dtend == $this->dtstart && StringHelper::strlen($this->dtstartraw) == 8)\n\t\t\t{\n\t\t\t\t// convert to JEvents all day event mode!\n\t\t\t\t//$this->allday = 1;\n\t\t\t\t$this->dtend += 86399;\n\t\t\t}\n\t\t}\n\t\tif ($this->dtend < $this->dtstart && StringHelper::strlen($this->dtstartraw) == 8)\n\t\t{\n\t\t\t// convert to JEvents all day event mode!\n\t\t\t$this->noendtime = 1;\n\t\t\t//$this->allday = 1;\n\t\t\t$this->dtend = $this->dtstart + 86399;\n\t\t}\n\t\t// All day event midnight to same midnight from iCalImport\n\t\telse if ($this->dtstart - $this->dtend == 1 && $this->dtendraw == $this->dtstartraw)\n\t\t{\n\t\t\tif (JevDate::strftime('%H:%M:%S', $this->dtstart) == \"00:00:00\")\n\t\t\t{\n\t\t\t\t// convert to JEvents all day event mode!\n\t\t\t\t$this->noendtime = 1;\n\t\t\t\t$this->dtend = $this->dtstart + 86399;\n\t\t\t}\n\t\t}\n\n\t\t// Process any custom fields\n\t\t$this->processCustom();\n\t}", "public function export()\n {\n // Return a copy of the data cast into an object\n return json_decode(json_encode($this->_object));\n }", "protected function _cleanObjectDatas($object)\n {\n // phpcs:enable\n $object = parent::_cleanObjectDatas($object);\n\n // Other attributes to clean\n $attr2clean = array(\n \"contact\",\n \"contact_id\",\n \"ref_previous\",\n \"ref_next\",\n \"ref_ext\",\n \"table_element_line\",\n \"statut\",\n \"country\",\n \"country_id\",\n \"country_code\",\n \"barcode_type\",\n \"barcode_type_code\",\n \"barcode_type_label\",\n \"barcode_type_coder\",\n \"mode_reglement_id\",\n \"cond_reglement_id\",\n \"cond_reglement\",\n \"fk_delivery_address\",\n \"shipping_method_id\",\n \"modelpdf\",\n \"fk_account\",\n \"note_public\",\n \"note_private\",\n \"note\",\n \"total_ht\",\n \"total_tva\",\n \"total_localtax1\",\n \"total_localtax2\",\n \"total_ttc\",\n \"fk_incoterms\",\n \"libelle_incoterms\",\n \"location_incoterms\",\n \"name\",\n \"lastname\",\n \"firstname\",\n \"civility_id\",\n \t\"canvas\",\n \"cache_msgs_ticket\",\n \"cache_logs_ticket\",\n \t\"cache_types_tickets\",\n \t\"cache_category_tickets\",\n \t\"regeximgext\",\n \"statuts_short\",\n \"statuts\"\n );\n foreach ($attr2clean as $toclean) {\n unset($object->$toclean);\n }\n\n // If object has lines, remove $db property\n if (isset($object->lines) && count($object->lines) > 0) {\n $nboflines = count($object->lines);\n for ($i=0; $i < $nboflines; $i++) {\n $this->_cleanObjectDatas($object->lines[$i]);\n }\n }\n\n // If object has linked objects, remove $db property\n if (isset($object->linkedObjects) && count($object->linkedObjects) > 0) {\n foreach ($object->linkedObjects as $type_object => $linked_object) {\n foreach ($linked_object as $object2clean) {\n $this->_cleanObjectDatas($object2clean);\n }\n }\n }\n return $object;\n }", "public function toPostData() {\n $data = get_object_vars($this);\n $this->manipulatePostData($data);\n\n foreach ($data as $key => $value) {\n $keep_empty = in_array($key, $this->postDataEmptyPropertiesToKeep, TRUE);\n\n $empty = (FALSE === (bool) $value);\n\n if (!$keep_empty && $empty) {\n unset($data[$key]);\n }\n }\n\n return $data;\n }", "public function __toObject() {\n return json_decode($this->_jsonstring);\n }", "public function deserialize($data): object;", "function __custom_fields($data_to_convert){\n return $data_to_convert;\n}", "abstract protected function convert($object);", "function _convertObj($dataObj)\n\t{\n\t\t$cat->first_name = $dataObj['first_name'];\n\t\t$cat->last_name = $dataObj['last_name'];\t\t\n\t\t$cat->email = $dataObj['email'];\n\t\t$cat->member_name = $dataObj['screen_name'];\n\t\tif ($dataObj['password'] <> \"\") {\n\t\t\t$cat->password = ($dataObj['password']);\n\t\t} else {\n\t\t\t$cat->password = \"\";\n\t\t}\n\t\t$cat->address = $dataObj['address'];\n\t\t$cat->phone = $dataObj['phone'];\n\t\t$cat->fax = $dataObj['fax'];\n\t\t$cat->website = $dataObj['website'];\t\t\n\t\t$cat->company_name_chi = $dataObj['company_name_chi'];\n\t\t$cat->company_name_eng = $dataObj['company_name_eng']; \n\t\t\n\t\tif ($dataObj['memberType'] == 'company') {\n\t\t\t$cat->memberType = \"C\";\n\t\t} else {\n\t\t\t$cat->memberType = \"U\";\n\t\t}\n\t\t// default no profile photo for first create member.\n\t\tif ($dataObj['photo'] == \"default\") {\n\t\t\t$cat->photo = \"no-profile-photo.jpg\";\n\t\t}\n\t\t\n\t\treturn $cat;\n\t}", "protected function data($data)\n {\n $class = get_class($this->model);\n\n $model = new $class;\n\n if (! $model->diffRaw()) {\n $model->unguard();\n\n $data = $model->fill($data)->attributesToArray();\n\n $model->reguard();\n }\n\n return $data;\n }", "public function getDataObject()\n {\n return $this->getElement()->getForm()->getDataObject();\n }", "public static function decode($data)\n {\n if (!isset($data) && !is_array($data)) {\n return;\n }\n\n if (!is_array($data)) {\n // atomic value\n return $data;\n }\n\n $typeString = (isset($data['__type']))? $data['__type']: null;\n switch ($typeString) {\n case 'Date':\n return new \\DateTime($data['iso']);\n break;\n case 'Pointer':\n return Object::create($data['className'], $data['objectId']);\n break;\n case 'Relation':\n throw new Exception('Relation not allowed here');\n break;\n case 'GeoPoint':\n return new GeoPoint($data['latitude'], $data['longitude']);\n break;\n default:\n $newDict = [];\n foreach ($data as $key => $value) {\n $newDict[$key] = static::decode($value);\n }\n return $newDict;\n }\n }", "function fix_object(&$object) {\n if (!is_object($object) && gettype($object) == 'object') {\n $object = @unserialize(serialize($object));\n }\n return $object;\n}", "public function _data ()\n\t{\n\t\treturn (object) $this->data;\n\t}", "public static function hydrateObject($object, array $data) {\n $dataFlattened = self::flattenArrayWithDashes($data);\n $object->data = $dataFlattened;\n return $object;\n }", "public function populateDataObject(DataObject &$dataObject): void\n {\n }", "function convertToObject($object) {\r\n\t\t\r\n\t\t$this->setId ( $object ['userId'] ? $object ['userId'] : 0 );\r\n\t\t$this->setName ( $object ['userName'] ? $object ['userName'] : '' );\r\n\t\t$this->password = $object ['userPassword'] ? $object ['userPassword'] : '';\r\n\t\t$this->setAddress ( $object ['userAddress'] ? $object ['userAddress'] : '' );\r\n\t\t\r\n\t\t$this->setEmail ( $object ['userEmail'] ? $object ['userEmail'] : '' );\r\n\t\t//$this->setJoinDate ( isset( $object ['userJoinDate'] )? $object ['userJoinDate'] : '' );\r\n\t\tisset ( $object ['userJoinDate'] ) ? $this->setJoinDate ( $object ['userJoinDate'] ) : '';\r\n\t\t//$this->setLastLogin ( isset( $object ['userLastLogin'] )? $object ['userLastLogin'] : '' );\r\n\t\tisset ( $object ['userLastLogin'] ) ? $this->setLastLogin ( $object ['userLastLogin'] ) : '';\r\n\t\t//$this->setStatus ( isset( $object ['userStatus'] )? $object ['userJoinDate'] : '' );\r\n\t\tisset ( $object ['userStatus'] ) ? $this->setStatus ( $object ['userStatus'] ) : '';\r\n\t\t\r\n\t\tisset ( $object ['userJoinDate'] ) ? $this->setJoinDate ( $object ['userJoinDate'] ) : '';\r\n\t\tisset ( $object ['userInfo'] ) ? $this->setArrayInfo ( unserialize ( $object ['userInfo'] ) ) : '';\r\n\t\tisset ( $object ['userAvatar'] ) ? $this->setAvatar ( $object ['userAvatar'] ) : '';\r\n\t\tisset ( $object ['userFirstName'] ) ? $this->setFirstName ( $object ['userFirstName'] ) : '';\r\n\t\tisset ( $object ['userFullName'] ) ? $this->setFullName ( $object ['userFullName'] ) : '';\r\n\t\tisset ( $object ['userGender'] ) ? $this->setGender ( $object ['userGender'] ) : '';\r\n\t\tisset ( $object ['userBirthday'] ) ? $this->setBirthday ( $object ['userBirthday'] ) : '';\r\n\t\tisset ( $object ['userPhone'] ) ? $this->setPhone ( $object ['userPhone'] ) : '';\r\n\t\tisset ( $object ['userMobile'] ) ? $this->setMobile ( $object ['userMobile'] ) : '';\r\n\t\tisset ( $object ['userCompany'] ) ? $this->setCompany ( $object ['userCompany'] ) : '';\r\n\t\tisset ( $object ['userAgent'] ) ? $this->setAgen ( $object ['userAgent'] ) : '';\r\n\t\tisset ( $object ['userPosition'] ) ? $this->setPosition ( $object ['userPosition'] ) : '';\r\n\t\t\r\n\t\tisset ( $object ['realInterested'] ) ? $this->setRealInterested ( $object ['realInterested'] ) : '';\r\n\t\tisset ( $object ['projectInterested'] ) ? $this->setProjectInterested ( $object ['projectInterested'] ) : '';\r\n\t\tisset ( $object ['userFax'] ) ? $this->setFax ( $object ['userFax'] ) : '';\r\n\t\t\r\n\t\tisset ( $object ['userTown'] ) ? $this->setTown ( $object ['userTown'] ) : '';\r\n\t\tisset ( $object ['userNewsletter'] ) ? $this->setNewsletter ( $object ['userNewsletter'] ) : '';\r\n\t\tisset ( $object ['userCity'] ) ? $this->setCity ( $object ['userCity'] ) : '';\r\n\t\tisset ( $object ['userCountry'] ) ? $this->setCountry ( $object ['defaultAvatar'] ) : '';\r\n\t\tisset ( $object ['userSkype'] ) ? $this->setYahoo ( $object ['userSkype'] ) : '';\r\n\t\tisset ( $object ['userYahoo'] ) ? $this->setSkype ( $object ['userYahoo'] ) : '';\r\n\t\tisset ( $object ['userMobile'] ) ? $this->setMobile ( $object ['userMobile'] ) : '';\r\n\t\tisset ( $object ['userProvince'] ) ? $this->setProvince ( $object ['userProvince'] ) : '';\r\n\t\tisset ( $object ['userScore'] ) ? $this->setScore ( $object ['userScore'] ) : '';\r\n\t\tisset ( $object ['userDealer'] ) ? $this->setDealer ( $object ['userDealer'] ) : '';\r\n\t}", "public function toObject(){\n $data = array();\n\n foreach($this->toArray() as $item){\n array_push($data, (object)$item);\n }\n\n return $data;\n }", "public function dataObjectToDatabaseModel(\n object $data_object\n ): array\n {\n $model_array = [];\n\n $property_reflection = $this->dataObjectProperties($data_object::class);\n\n // Loop through all Column-attributed properties of the object.\n foreach ($this->dataObjectPropertyColumns($property_reflection) as $property => $column)\n {\n // Ignore unset properties.\n if (!isset($data_object->{$property}))\n {\n continue;\n }\n\n // Assign key based on the name property of the Column attribute. Apply value converter when applicable.\n $model_array[$column->getName()] = $this->convertPropertyOnSave(\n $column,\n $data_object->{$property}\n );\n }\n\n return $model_array;\n }", "function toObject() {\n\t\t$this->toObject();\n\t}", "public function toObject(object $object):void;", "public function hydrate(array $data, $object)\n {\n $object->setId($data['id']);\n $object->setActionid($data['actionid']);\n $object->setLogin($data['login']);\n $object->setFullName($data['fullname']);\n $object->setAgent($data['agent']);\n $object->setFilter($data['filter']);\n $object->setPf($data['pf']);\n $object->setParameters($data['parameters']);\n $object->setReceivedAt($data['received_at']);\n return $object;\n }", "public function getData(): \\stdClass\n {\n return $this->data;\n }", "abstract protected function getHydratedObject();", "public function getData(string $field, $object);", "private function formatData() {\n\t\t$data = $this->data;\n\t\tif(is_object($data) && $data instanceof Form) {\n\t\t\t$form = $data;\n\t\t\t$data = array();\n\t\t\tforeach($form->Fields()->dataFields() as $field) {\n\t\t\t\t$name = $field->getName();\n\t\t\t\tif($name && $name != 'SecurityID') {\n\t\t\t\t\tif($field instanceof DateField) {\n\t\t\t\t\t\tif($field->Value())\n\t\t\t\t\t\t\t//oh you, old asp.net\n\t\t\t\t\t\t\t$data[$name] = '/Date('.((int)$field->setConfig('datavalueformat', 'U')->dataValue()*1000/**/).')/';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$data[$name] = $field->dataValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($data) {\n\t\t\tif(is_string($data))\n\t\t\t\t$this->data = $data;\n\t\t\telseif(ArrayLib::is_associative($data) && $this->endpointConfig['expects'] == 'list') {\n\t\t\t\t$this->data = json_encode(array($data)); //array of one object\n\t\t\t}\n\t\t\telseif(is_array($data))\n\t\t\t\t$this->data = json_encode($data); //array\n\t\t\telse\n\t\t\t\t$this->data = \"$data\"; //__toString()!\n\t\t}\n\t}", "public function hydrate(array $data, $object)\n {\n if ($object instanceof User) {\n $object->values = $data;\n } else {\n $object = (new Reflection())->hydrate($data, $object);\n }\n return $object;\n }", "private static function objectToArray($data)\n\t\t{\n\t\t if (is_array($data) || is_object($data))\n\t\t {\n\t\t $result = array();\n\t\t foreach ($data as $key => $value)\n\t\t {\n\t\t $result[$key] = self::objectToArray($value);\n\t\t }\n\t\t return $result;\n\t\t }\n\t\t return $data;\n\t\t}", "public function hydrate(array $data, $object)\n {\n $this->data = $data;\n $this->object = $object;\n // download Image\n $this->hydrateSkimData();\n $reflProperties = self::getReflProperties($object);\n foreach ($this->data as $key => $value) {\n if (isset($reflProperties[$key])) {\n $value = $this->hydrateValue($key, $value);\n $setter = 'set' . ucfirst($key);\n if (method_exists($object, $setter)) {\n $object->$setter($value);\n } else {\n // the values of the entity have to be set explicitly\n $reflProperties[$key]->setValue($object, $this->hydrateValue($key, $value));\n }\n }\n }\n return $object;\n }", "public function toObject($convertRecursively = true)\n {\n if ($convertRecursively) {\n // We use the json serializer as help to recursively convert the Object instances\n return json_decode(json_encode($this));\n } else {\n return $this->data;\n }\n }", "public static function fromDTO($object);", "public function dataFromObject()\n {\n $proto = $this->proto();\n $objMetadata = $proto->metadata();\n $adminMetadata = (isset($objMetadata['admin']) ? $objMetadata['admin'] : null);\n\n if (empty($adminMetadata['lists'])) {\n return [];\n }\n\n $collectionIdent = $this->collectionIdent();\n if (!$collectionIdent) {\n $collectionIdent = $this->collectionIdentFallback();\n }\n\n if ($collectionIdent && $this->isObjRenderable($proto)) {\n $collectionIdent = $proto->render($collectionIdent);\n }\n\n if (!$collectionIdent) {\n return [];\n }\n\n if (isset($adminMetadata['lists'][$collectionIdent])) {\n $objListData = $adminMetadata['lists'][$collectionIdent];\n } else {\n $objListData = [];\n }\n\n $collectionConfig = [];\n\n if (isset($objListData['orders']) && isset($adminMetadata['list_orders'])) {\n $extraOrders = array_intersect(\n array_keys($adminMetadata['list_orders']),\n array_keys($objListData['orders'])\n );\n foreach ($extraOrders as $listIdent) {\n $collectionConfig['orders'][$listIdent] = array_replace_recursive(\n $adminMetadata['list_orders'][$listIdent],\n $objListData['orders'][$listIdent]\n );\n }\n }\n\n if (isset($objListData['filters']) && isset($adminMetadata['list_filters'])) {\n $extraFilters = array_intersect(\n array_keys($adminMetadata['list_filters']),\n array_keys($objListData['filters'])\n );\n foreach ($extraFilters as $listIdent) {\n $collectionConfig['filters'][$listIdent] = array_replace_recursive(\n $adminMetadata['list_filters'][$listIdent],\n $objListData['filters'][$listIdent]\n );\n }\n }\n\n if ($collectionConfig) {\n $this->mergeCollectionConfig($collectionConfig);\n }\n\n return $objListData;\n }", "protected function process_data()\n\t{\n\t\t// this converts arrays to an object\n\t\t$this->data = Jquarry_Primitive::factory('node', $this->data);\n\t\t\n\t\t// this turns the mongo id object into a flat id\n\t\t$id = $this->data->get(\"_id\");\n\t\t\n\t\tif(is_object($id))\n\t\t{\n\t\t\t$prop = '$id';\n\t\t\n\t\t\t$this->data->set(\"_id\", $id->$prop, true);\n\t\t}\n\t}", "public function to_object(){\n $obj = new stdClass();\n $obj->person_id = $this->getPersonID();\n $obj->first_name = $this->getFirstName();\n $obj->last_name = $this->getLastName();\n return $obj;\n }", "public function parse_data( $data ){\n $new_data = array();\n foreach ( $this->_fields as $item ){\n if( 'vk_id' == $item ){\n $new_data['vk_id'] = $data->uid;\n continue;\n }\n if( isset( $data->$item ) ){// we have the db field with returned vk users data\n $_new_data = $data->$item;\n if( is_array( $_new_data ) || is_object( $_new_data ) ){\n $new_data[ $item ] = serialize( $data->$item );\n } else {\n $new_data[ $item ] = $data->$item;\n }\n } else {// no such db field , make it empty\n $new_data[ $item ] = '';\n }\n }\n return $new_data;\n }", "public function CreateFromGenericObject($Data)\n {\n if (property_exists($Data, 'Error'))\n $this->Error = $Data->Error;\n if (property_exists($Data, 'Result'))\n $this->Result = $this->DecodeUTF8($Data->Result);\n// $this->Typ = Kodi_RPC_Data::$ResultTyp;\n if (property_exists($Data, 'Namespace'))\n $this->Namespace = $Data->Namespace;\n if (property_exists($Data, 'Method'))\n $this->Method = $Data->Method;\n if (property_exists($Data, 'Params'))\n $this->Params = $this->DecodeUTF8($Data->Params);\n if (property_exists($Data, 'Typ'))\n $this->Typ = $Data->Typ;\n// $this->Typ = Kodi_RPC_Data::$ParamTyp;\n /* if (property_exists($Data, 'Event'))\n {\n $this->Event = $this->DecodeUTF8($Data->Event);\n $this->Typ = Kodi_RPC_Data::$EventTyp;\n } */\n if (property_exists($Data, 'Id'))\n $this->Id = $Data->Id;\n }", "function unserialize( $data )\n\t{\n\t\t$from_unserialize = unserialize( $data );\n\t\t\n\t\tforeach( $from_unserialize->fields as $f=>$v )\n\t\t{\n\t\t\t$this->f = $v;\n\t\t}\n\t\t$this->fields\t\t= $from_unserialize->fields;\n\t\t$this->table\t\t= $from_unserialize->table;\n\t\t$this->database\t\t= $from_unserialize->database;\n\t\t$this->fields_camel\t= $from_unserialize->fields_camel;\n\t}", "public function get_new_data_object($data=false) {\n return new $this->data_class($data);\n }", "public static function setLegacyProperties()\n {\n $object = self::$pdoFetchIntoObject;\n\n $object->userId = \"12345\";\n $object->lastName = \"Doe\";\n $object->firstName = \"John\";\n $object->emailAddress = null;\n $object->phone = null;\n $object->birthDate = null;\n $object->active = null;\n $object->attributes = null;\n }", "public function hydrate(array $data, $object)\n {\n $object->id_cadastro_reserva_area_comum = $data['id_cadastro_reserva_area_comum'];\n $object->id_area_pai = $data['id_area_pai'];\n $object->id_tipo_area = $data['id_tipo_area'];\n $object->de_cadastro_reserva_area_comum = $data['de_cadastro_reserva_area_comum'];\n $object->de_materiais = $data['de_materiais'];\n $object->nu_valor = $data['nu_valor'];\n $object->hr_inicio = $data['hr_inicio'];\n $object->hr_fim = $data['hr_fim'];\n $object->tmp_duracao = $data['tmp_duracao'];\n $object->st_horario_sn = $data['st_horario_sn'];\n $object->ignora_qtd_reserva = $data['ignora_qtd_reserva'];\n $object->nu_antecedencia_max = $data['nu_antecedencia_max'];\n $object->nu_antecedencia_min = $data['nu_antecedencia_min'];\n $object->qtd_reserva_mes = $data['qtd_reserva_mes'];\n $object->perm_varias_reserva_dia = $data['perm_varias_reserva_dia'];\n $object->qtd_reserva_mes_gratis = $data['qtd_reserva_mes_gratis'];\n $object->qtd_reserva_ano_gratis = $data['qtd_reserva_ano_gratis'];\n\n return $object;\n }", "public static function hydrate($data)\n {\n return self::hydrateModelProperties(\n new self(),\n $data,\n array(),\n array()\n );\n }", "public function toData()\n {\n }", "public function toValueObject(array $data);", "function object_to_array($data){\n\t if(is_array($data) || is_object($data)){\n\t $result = array();\n\t \n\t foreach($data as $key => $value) {\n\t $result[$key] = $this->object_to_array($value);\n\t }\n\t \n\t return $result;\n\t }\n\t \n\t return $data;\n\t}", "private function convertData($data){\n if($data instanceof \\DateTime){\n return $data->format(DateTime::W3C);\n }elseif(is_object($data) || is_array($data)){\n return serialize($data);\n }\n\n return $data;\n }", "public function __clone()\n\t\t{\n\t\t\tif (isset($this->data) && is_object($this->data))\n\t\t\t{\n\t\t\t\t$this->data = clone $this->data;\n\t\t\t}\n\t\t}", "private function transformBcLayer(\\stdClass $data): \\stdClass\n {\n if (isset($data->patternProperties) && !isset($data->properties) && !isset($data->additionalProperties)) {\n // in this case we have a schema with only pattern properties\n $vars = get_object_vars($data->patternProperties);\n if (count($vars) === 1) {\n $data->additionalProperties = reset($vars);\n } else {\n $data->additionalProperties = true;\n }\n }\n\n if (isset($data->{'$extends'})) {\n if (!isset($data->type)) {\n $data->type = 'object';\n }\n if (!isset($data->properties)) {\n $data->properties = new \\stdClass();\n }\n }\n\n if (!isset($data->type)) {\n if (isset($data->properties) || isset($data->additionalProperties)) {\n $data->type = 'object';\n } elseif (isset($data->items)) {\n $data->type = 'array';\n } elseif (isset($data->pattern) || isset($data->minLength) || isset($data->maxLength)) {\n $data->type = 'string';\n } elseif (isset($data->minimum) || isset($data->maximum)) {\n $data->type = 'number';\n }\n }\n\n if (isset($data->type) && $data->type === 'object') {\n if (!isset($data->properties) && !isset($data->additionalProperties)) {\n $data->properties = new \\stdClass();\n }\n }\n\n return $data;\n }", "private function createDataArray($object)\n {\n if ($object && method_exists($object, 'toArray')) {\n return $object->toArray();\n }\n\n return null;\n }", "public function hydrate($data){\n\t\tif($data != false){\n\t \t\tforeach ($data as $key => $value){\n $this->$key = $value;\n\t \t\t}\n \t\t}\n\t}", "protected function _prepareData($data)\n {\n unset($data['created']);\n unset($data['modified']);\n return $data;\n }", "function system_to_data_obj($myObj) {\n\t$ref = new ReflectionClass($myObj);\n\t$data = array();\n\tforeach (array_values($ref->getMethods()) as $method) {\n\t\tif ((0 === strpos($method->name, \"get\")) && $method->isPublic()) {\n\t\t\t$name = substr($method->name, 3);\n\t\t\t$name[0] = strtolower($name[0]);\n\t\t\t$value = $method->invoke($myObj);\n\t\t\tif (\"object\" === gettype($value)) {\n\t\t\t\t$value = system_to_data_obj($value);\n\t\t\t}\n\t\t\t$data[$name] = $value;//htmlentities($value);\n\t\t}\n\t}\n\treturn $data;\n}", "public function getValueObject(){\n // $class = SmartestDataUtility::getClassForDataType($this->getDatatype());\n // return new $class($this->_properties['value']);\n // echo $this->getDatatype();\n return SmartestDataUtility::objectize($this->_properties['value'], $this->getDatatype());\n }", "private function hydrateEmpty ()\r\n {\r\n // set our data\r\n if (isset($this->erLoadData) && is_array($this->erLoadData))\r\n foreach ($this->erLoadData AS $key => $value)\r\n $this->{$key} = $value;\r\n\r\n foreach ($this->getColumnNames() AS $field)\r\n $this->{$field} = null;\r\n\r\n // mark object as new\r\n $this->isNew = true;\r\n }", "protected function load_from_object($data) {\n return false;\n }", "protected function transformData()\n\t{\n\t\t$firstRow = $this->data[0];\n\n\t\tif($firstRow instanceof \\Illuminate\\Support\\Collection)\n\t\t{\n\t\t\t$this->transformDataCollections();\n\t\t\t$firstRow = $this->data[0];\n\t\t}\n\t\telse if(is_object($firstRow))\n\t\t{\n\t\t\t$this->transformDataObjects();\n\t\t\t$firstRow = $this->data[0];\n\t\t}\n\t}", "protected static function hydrate($data, $object)\n {\n foreach($data as $field => $value){\n //$field = \"address_id\", $value = 1\n $explodedField = explode(\"_\", $field); //=> [\"address\", \"id\"]\n if(count($explodedField) >= 2 && array_pop($explodedField) == \"id\"){//est ce une clé étrangère ?\n $field = array_shift($explodedField);//$field = \"address\"\n $id = $value;//$id = 1\n $managerName = ucfirst($field).\"Manager\";//$managerName = \"AddressManager\"\n $managerFQCN = \"App\\\\Model\\\\Manager\\\\\".$managerName;//App\\Model\\Manager\\AddressManager\n $manager = new $managerFQCN();\n $value = $manager->findOneById($id);//$value = Address(1, \"...\", \"...\", \"....\")\n }\n $setter = \"set\".ucfirst($field);\n if(method_exists($object, $setter)){\n $object->$setter($value);\n }\n }\n }", "public function convert($object = null);", "static function de_fuck_noisy_fields($obj)\n\t{\n\t\t$field_list = array(\n\t\t\t'area_id',\n\t\t\t'area_name',\n\t\t\t'batch_id',\n\t\t\t'created_by_mme_id',\n\t\t\t'first_name', // user names leak on batch!?\n\t\t\t'flower_area_id',\n\t\t\t'id',\n\t\t\t'last_name',\n\t\t\t'mme_id',\n\t\t\t'mme_code',\n\t\t\t'mme_name',\n\t\t\t'mother_plant_id',\n\t\t\t'other_area_id',\n\t\t\t'strain_id',\n\t\t\t'strain_name',\n\t\t\t'user_id',\n\t\t);\n\n\t\tforeach ($field_list as $f) {\n\t\t\tunset($obj[$f]);\n\t\t}\n\n\t\treturn $obj;\n\n\t}", "static function de_fuck_noisy_fields($obj)\n\t{\n\t\t$field_list = array(\n\t\t\t'area_id',\n\t\t\t'area_name',\n\t\t\t'batch_id',\n\t\t\t'created_by_mme_id',\n\t\t\t'first_name', // user names leak on batch!?\n\t\t\t'flower_area_id',\n\t\t\t'id',\n\t\t\t'last_name',\n\t\t\t'mme_id',\n\t\t\t'mme_code',\n\t\t\t'mme_name',\n\t\t\t'mother_plant_id',\n\t\t\t'other_area_id',\n\t\t\t'strain_id',\n\t\t\t'strain_name',\n\t\t\t'user_id',\n\t\t);\n\n\t\tforeach ($field_list as $f) {\n\t\t\tunset($obj[$f]);\n\t\t}\n\n\t\treturn $obj;\n\n\t}", "public function to_datastore_format() {\n\n\t\treturn $this->data;\n\t}", "private function _serealizeDataForLog($object)\n {\n $dataLog = [];\n if (is_object($object)) {\n $reflect = new ReflectionClass($object);\n $props = $reflect->getProperties();\n \n foreach ($props as $prop) {\n $methodForProp = 'get' . ucfirst($prop->getName());\n\n /* Check method exist */\n if ($reflect->hasMethod($methodForProp)) {\n $propValue = $object->{$methodForProp}();\n /* Check variable type */\n if (is_object($propValue)) {\n switch (get_class($propValue)) {\n case 'Doctrine\\ORM\\PersistentCollection':\n /* Collection */\n $dataLog[$prop->getName()] = null;\n if (!empty($propValue)) {\n foreach ($propValue as $key => $value) {\n if (is_object($value)) {\n /* Check method getName */\n if (method_exists($value, 'getName')) {\n $dataLog[$prop->getName()][] = [\n 'name' => $value->getName(),\n ];\n } elseif (method_exists($value, 'getTitle')) {\n $dataLog[$prop->getName()][] = [\n 'name' => $value->getTitle(),\n ];\n }\n } else {\n unset($object->{$methodForProp}()[$key]);\n }\n }\n }\n break;\n case 'DateTime':\n $dataLog[$prop->getName()] = $propValue->format(\"Y-m-d\"); \n break;\n default :\n /* Check method getName */\n if (method_exists($propValue, 'getName')) {\n $dataLog[$prop->getName()] = [\n 'name' => $propValue->getName(),\n ];\n } elseif (method_exists($propValue, 'getTitle')) {\n $dataLog[$prop->getName()] = [\n 'name' => $propValue->getTitle(),\n ];\n }\n break;\n }\n } else {\n $dataLog[$prop->getName()] = $propValue;\n }\n }\n }\n } else {\n \n }\n\n return serialize($dataLog);\n }", "public function parseSetData($data) {\n if (!$data) {\n return null;\n }\n\n $result = parent::parseSetData($data);\n $result['field-id'] = $data->getIdField();\n $result['primary'] = $data->isPrimaryMapper();\n $result['title'] = $data->getTitle();\n $result['meta-og'] = $data->getMetaOg();\n $result['format-title-og'] = $data->getOgTitleFormat();\n $result['format-teaser-og'] = $data->getOgTeaserFormat();\n $result['format-image-og'] = $data->getOgImageFormat();\n\n return $result;\n }", "abstract public function convertModelToNative(array &$data);", "private function normalize($object)\n {\n $serializer = new Serializer([new ObjectNormalizer()]);\n $object = $serializer->normalize($object, null,\n ['attributes' => [\n 'id',\n 'title',\n 'content',\n 'commentaries'=>['id','content','user'=>['username','profilePicture'=>['imgPath']]],\n 'lovedBy' => ['id','username','adherent','fname','lname','profilePicture'=>['id','file','path','imgPath']],\n ]]);\n return $object;\n }", "public static function array2Object($data) {\n if(!is_array($data)) return $data;\n $object = new stdClass();\n if (is_array($data) && count($data) > 0) {\n foreach ($data as $name => $value) {\n if(is_numeric($name)){\n // For number key data type\n $name = intval($name);\n $object->$name = self::array2Object($value);\n }\n else if(!empty($name)){\n // For string key data type\n $name = strtolower(trim($name));\n $object->$name = self::array2Object($value);\n }\n else{ }\n }\n }\n return $object;\n }", "abstract public function fromData($data);", "public static function objectToXml($data);", "public function toObject()\n {\n return (object) $this->properties;\n }", "public function hydrate(&$object, array $data, $force = false)\n {\n foreach($data as $field => $value)\n if($force or (!$force and property_exists($object, $field)))\n $object->{$field} = $value;\n }", "function unserialize($data)\r\n\t{\r\n\t\t$propvals = unserialize($data);\r\n\t\t$ro = new ReflectionObject($this);\r\n\r\n\t\tforeach ($ro->getProperties() as $rp )\r\n\t\t{\r\n\t\t\t$propname = $rp->name;\r\n\t\t\tif ( array_key_exists($propname,$propvals) )\r\n\t\t\t{\r\n\t\t\t\tif (method_exists($rp,\"setAccessible\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t$rp->setAccessible(true);\r\n\t\t\t\t\t$rp->setValue($this,$propvals[$propname]);\r\n\t\t\t\t}\r\n\t\t\t\telseif (!$rp->isPrivate())\r\n\t\t\t\t{\r\n\t\t\t\t\t// if < php 5.3 we can't serialize private vars\r\n\t\t\t\t\t$rp->setValue($this,$propvals[$propname]);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getObjectData($object, $data) {\n\t\t\tif (!is_object($this->$object)) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\treturn $this->$object->get($data);\n\t\t\t}\n\t\t}", "public function get_object($object_data)\n {\n }", "abstract public function toData($value);", "public function checkData(mixed $data): object\n {\n $className = $this->getTypeClassName();\n\n if (!$data instanceof $className) {\n $data = $this->createObjectFrom($data);\n }\n\n return $data;\n }", "public function hydrate(array $data, $object)\n {\n if (!$object instanceof NewsPost) {\n return $object;\n }\n\n $object->setId(isset($data['id']) ? intval($data['id']) : null);\n $object->setTitle(isset($data['title']) ? $data['title'] : null);\n $object->setDescription(isset($data['description']) ? $data['description'] : null);\n $object->setContent(isset($data['content']) ? $data['content'] : null);\n $object->setPublishedDate(isset($data['published_date']) ? $data['published_date'] : null);\n\n return $object;\n }", "abstract public function convertNativeToModel(array &$data);", "private function createFromData($data)\n {\n $model = $this->dispense()->hydrate($data);\n $model->isNew = false;\n return $model;\n }", "public function _prep_data_for_db(){\r\n\t\t\t$data = strip_msword_formatting($this->_encrypt_to()->expose_data());\t\t\t\r\n\r\n\t\t\t//FORMAT NULL AND DATES\r\n\t\t\tforeach($data as $k => $v){\r\n\r\n\t\t\t\tif(!isset($this->structure[$k])) continue;\r\n\r\n\t\t\t\tif((empty($v) || is_null($v) || $v == '') && $this->structure[$k]['Null'] == 'YES'){\r\n\t\t\t\t\t$data[$k] = NULL;\r\n\t\t\t\t}\r\n\t\t\t\telseif($this->structure[$k]['Type'] == 'date'){\r\n\t\t\t\t\t$data[$k] = date('Y-m-d', strtotime($v));\r\n\t\t\t\t}\r\n\t\t\t\telseif($this->structure[$k]['Type'] == 'datetime'){\r\n\t\t\t\t\t$data[$k] = date('Y-m-d H:i:s', strtotime($v));\r\n\t\t\t\t}\r\n\t\t\t\telseif($this->structure[$k]['Type'] == 'timestamp'){\r\n\t\t\t\t\t$data[$k] = date('Y-m-d H:i:s', strtotime($v));\r\n\t\t\t\t}\r\n\t\t\t\telseif($this->structure[$k]['Type'] == 'time'){\r\n\t\t\t\t\t$data[$k] = date('H:i:s', strtotime($v)); \r\n\t\t\t\t}\r\n\t\t\t\telseif($this->structure[$k]['Type'] == 'year'){\r\n\t\t\t\t\t$data[$k] = date('Y', strtotime($v));\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->$k = $data[$k];\r\n\t\t\t}\r\n\r\n\t\t\treturn $this;\r\n\r\n\t\t}", "public static function initializeWithRawData($data)\n {\n $item = new CustomField();\n \n foreach ($data as $key => $value) {\n switch ($key) {\n case 'id':\n $item->setId($value);\n break;\n case 'name':\n $item->setName($value);\n break;\n case 'for':\n $item->setFor($value);\n break;\n case 'type':\n $item->setType($value);\n break;\n case 'group':\n $item->setGroup($value);\n break;\n default:\n // ignore empty values\n if ($value === '') {\n continue;\n }\n }\n }\n return $item;\n }", "protected function _mapObjectToDbData(Jg_DomainObject $object) {\n $row_data = array();\n\n foreach ($object->toArray() as $prop_name => $val) {\n if ($col = array_search($prop_name, $this->_map_columns_to_properties)) {\n $row_data[$col] = $val;\n } else {\n $row_data[$prop_name] = $val;\n }\n }\n\n return $row_data;\n }", "public function hydrate(\\stdClass $object)\n {\n $data = get_object_vars($object);\n foreach($data as $key => $value)\n {\n $this->$key = $value;\n }\n //Fix the name values to a more readable format\n if(is_array($this->nameValues))\n {\n $nvps = $this->nameValues;\n $this->nameValues = [];\n foreach($nvps as $nvp)\n {\n if(isset($nvp->name) && isset($nvp->value))\n {\n $this->nameValues[$nvp->name] = $nvp->value;\n }\n }\n }\n }", "protected function hydrateObject($data)\n {\n return $this->getManager()->getUnitOfWork()->getOrCreateEntity($this->getClassName(), $data);\n }", "public function guessData($mixed)\n {\n if (is_object($mixed)) {\n return $this->getDataFromObject($mixed);\n }\n\n return $mixed;\n }" ]
[ "0.6797731", "0.67307115", "0.6721225", "0.6706021", "0.64652896", "0.62282354", "0.608047", "0.60445803", "0.60329986", "0.6030954", "0.6030954", "0.6030954", "0.59903556", "0.59892356", "0.59633243", "0.5938706", "0.5927881", "0.5891116", "0.5862084", "0.5826516", "0.58215755", "0.58195233", "0.57805455", "0.577865", "0.57552135", "0.5754282", "0.5733906", "0.57073796", "0.5691282", "0.56899005", "0.568832", "0.5685783", "0.56811196", "0.56582594", "0.5636823", "0.5603296", "0.55930823", "0.5590895", "0.5577216", "0.5576064", "0.5572776", "0.556657", "0.5557881", "0.55387855", "0.5537388", "0.55341923", "0.55309224", "0.5529324", "0.55104697", "0.55099225", "0.5508186", "0.550652", "0.54997885", "0.5497241", "0.5495574", "0.5495543", "0.5491258", "0.5486356", "0.5482923", "0.5475935", "0.5458771", "0.54541934", "0.54512054", "0.54503196", "0.5448598", "0.5443326", "0.54359883", "0.5430504", "0.54252255", "0.5417594", "0.5417555", "0.5402121", "0.53920925", "0.5385515", "0.537858", "0.537858", "0.5369183", "0.5367611", "0.5358046", "0.5352454", "0.5348911", "0.53455704", "0.5340452", "0.53319234", "0.5330331", "0.5327127", "0.53210115", "0.53175944", "0.53107196", "0.5306299", "0.5300959", "0.5292861", "0.5292302", "0.52893144", "0.5280368", "0.52792", "0.52784866", "0.5276893", "0.52729034", "0.5268" ]
0.70080173
0
Magic Methods Magic get method to returns custom field data when accessed as $this>field_[fieldname], in addition to the parent class' magic getter functionality.
Магические методы Магический метод get для возврата пользовательских данных поля при обращении к нему как $this>field_[fieldname], в дополнение к функциональности магического получателя родительского класса.
public function __get($name) { $prefix_len = strlen(self::CUSTOM_FIELD_PREFIX); if (strncmp($name, self::CUSTOM_FIELD_PREFIX, $prefix_len) == 0) { $this->_load_fields(); $shortname = substr($name, $prefix_len); if (isset(self::$_fields[$this->get_field_context_level()][$shortname])) { // we have a custom field of the same name if (isset($this->_field_data[$shortname])) { // we have data return $this->_field_data[$shortname]; } else if (!$this->_fields_loaded && empty($this->_field_changed[$shortname])) { // custom fields haven't been loaded yet (and the field // hasn't been unset) $this->_load_field_data(); if (isset($this->_field_data[$shortname])) { return $this->_field_data[$shortname]; } } // we have no data for this field return null; } $trace = debug_backtrace(); $classname = get_class($this); trigger_error( "Undefined property via __get(): $classname::\${$name} in {$trace[1]['file']} on line {$trace[1]['line']}", E_USER_NOTICE); return null; } return parent::__get($name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __get( $field ) {\n\t\treturn $this->{$field};\n\t}", "public function __get($field){\n if ($field == 'codigo')\n return $this->codigo;\n else \n return $this->fields[$field];\n }", "function get_field() {\n\t\treturn $this->field;\n\t}", "public function __get( $field )\n {\n return $this->field( $field );\n }", "public function __get($field)\n {\n return $this->_fields[$field];\n }", "private function getCustomFields() {\n\t\t\treturn $this->customFields;\n\t\t}", "public function getCustom()\n {\n return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom;\n }", "public function getCustom()\n {\n return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom;\n }", "public function field($field) { return $this->getField($field);}", "final public function __get($field) {\n\t\treturn $this->get($field);\n\t}", "public function __get( $field ){\n\n\t\t$class = get_called_class();\n\n\t\tif ( array_key_exists($field, $this->fields) ){\n\t\t\treturn $this->fields[$field]->data;\n\t\t} else if ( $field == 'id' ) {\n\n\t\t\treturn $this->id; \n\n\t\t} else if ( array_key_exists($field, $this->relatives) ){\n\n\t\t\treturn $this->getRelated( $field );\n\n\t\t} else {\n\t\t\tthrow new Exception('Model field \"' . $field . '\" does not exist.');\n\t\t}\n\n\t}", "public function __get($field) {\n if(!$this->hasField($field)){\n trigger_error('Undefined property(magic): '.get_class($this).'::$'.$field, E_USER_WARNING);\n }\n if(method_exists($this, $funcName = \"get$field\")) {\n return $this->$funcName();\n }\n// else {\n return $this->getField($field);\n// }\n// return null;\n }", "private function get($field)\r\n\t{\r\n\t\treturn $this->$field;\r\n\t}", "public function get_field() {\r\n\t\treturn ($this->field);\r\n\t}", "public function getGetfield()\n {\n return $this->getfield;\n }", "public function getGetfield()\n {\n return $this->getfield;\n }", "function field(){\n\t\tif(!$this->_loaded){\n\t\t\t$this->load();\n\t\t}\n\t\treturn $this->_field;\n\t}", "protected function getField($field) {\n return $this->$field;\n }", "function getField() {\n\t\treturn $this->field;\n\t}", "public function getGetfield()\n\t{\n\t\treturn $this->getfield;\n\t}", "function getDataField(){\n\t\treturn $this->dataField;\n\t}", "public function getCustom()\n {\n if (is_null($this->custom)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CUSTOM);\n if (is_null($data)) {\n return null;\n }\n\n $this->custom = CustomFieldsModel::of($data);\n }\n\n return $this->custom;\n }", "public function __get(string $field) : mixed\n\t\t{\n\t\t$actualField = $field;\n\n\t\tif (\\str_starts_with($field, 'cf_'))\n\t\t\t{\n\t\t\t$field = 'cf:custom_field_name';\n\t\t\t}\n\n\t\tif (! isset(static::$fields[$field]))\n\t\t\t{\n\t\t\tthrow new \\PHPFUI\\ConstantContact\\Exception\\InvalidField(static::class . \"::{$actualField} is not a valid field\");\n\t\t\t}\n\n\t\t$this->setFields[$actualField] = true;\n\n\t\treturn $this->data[$actualField] ?? null;\n\t\t}", "public function getField();", "public function getField();", "public function getField();", "public function getField();", "public function getField();", "function &getCustomfield()\n\t{\n\t\tif ($this->_loadCustomfield())\n\t\t{\n\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$customfield =& JTable::getInstance('Customfield');\n\t\t\t$customfield->parameters\t= new JParameter( '' );\n\t\t\t$this->_customfield\t\t\t= $customfield;\n\t\t}\n\n\t\t$this->_parseValues();\n\n\t\treturn $this->_customfield;\n\t}", "public function __get($field)\r\n {\r\n return $this->_getAdder($field);\r\n }", "public function getField()\n {\n return $this->_field;\n }", "public function getCustomFields()\n {\n return $this->getVal('custom_fields');\n }", "public function get_custom()\n {\n return $this->custom;\n }", "protected function GetField() {\r\n\t\t\treturn $this->field;\r\n\t\t}", "public function field_data(){\r\n\r\n\t\tif( ! isset( $this->field_data ) ) $this->field_data = $this->fields()->get_custom_fields( TRUE );\r\n\r\n\t\tif ( empty( $this->field_data ) ) return false;\r\n\r\n\t\treturn $this->field_data;\r\n\r\n\t}", "public function __get($field) {\n\t\tif ($field == 'id')\n\t\t\treturn $this->id;\n return $this->info[$field];\n }", "public function getFieldValue();", "public function getCustomFields()\n {\n return $this->custom_fields;\n }", "public function getCustomFields()\n {\n return $this->custom_fields;\n }", "public function getField() {\n\t\treturn $this->_field;\n\t}", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField() {\n return $this->field;\n }", "public function __get($field)\n {\n if($field == 'userId')\n {\n return $this-> uid;\n }\n else\n {\n return $this->fields[$field];\n }\n }", "public function getField() {\n\t\treturn $this->field;\n\t}", "public function getField() {\n\t\treturn $this->field;\n\t}", "public function getField() {\n\t\treturn $this->field;\n\t}", "function __get($name)\n {\n return $this->fieldvalues[$name];\n }", "public function __get($fieldKey) {\n return $this->fields[$fieldKey];\n }", "public function __get($field)\n {\n if (in_array($field, $this->getFields())) {\n return $this->$field;\n }\n }", "function rbm_get_field( $field, $post_ID = false, $args = array() ) {\n\n\tglobal $rbm_fh_deprecated_support;\n\n\treturn $rbm_fh_deprecated_support->fields->get_meta_field( $field, $post_ID, $args );\n}", "public function __get($field)\n {\n if ($field == 'PK')\n {\n return $this->PK;\n }\n else \n {\n return $this->fields[$field];\n }\n }", "public function getField($field)\n {\n if ($this->isAccessibleProperty($field)) {\n return $this->$field;\n }\n return $this->getDynamicData($field);\n }", "public function get($aField);", "public function get(string $field);", "public function getCustom()\n {\n if (is_null($this->custom)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CUSTOM);\n if (is_null($data)) {\n return null;\n }\n\n $this->custom = CustomModel::of($data);\n }\n\n return $this->custom;\n }", "public function getField($name) {\r\n\t\t$method = 'get_' . $name;\r\n\t\tif(method_exists($this, $method)) {\r\n\t\t\treturn $this->$method();\r\n\t\t}\r\n\t\telseif(array_key_exists($name,$this->data)) {\r\n\t\t\treturn $this->data[$name];\r\n\t\t}\r\n\t\t//relation\r\n\t\telse {\r\n\t\t\t$o = $this->getRelated($name);\r\n\t\t\tif ($o) {\r\n\t\t\t\treturn $o;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public function get( $field_name ) {\n\t\t$result = $this->get_base( $field_name );\n\t\tif( ! $result && ! in_array( $field_name, $this->meta_field_array ) ) {\n\t\t\t$result = call_user_func_array( array( $this, 'get_'.$field_name ), array() );\n\t\t}\n\t\treturn $result;\n\t}", "public function __get(string $field)\n\t\t{\n\n\n\t\t\tif (! \\array_key_exists($field, $this->fields))\n\t\t\t{\n\t\t\tthrow new Exception\\Get(\"{$field} is not a valid field for \" . \\get_class($this));\n\t\t\t}\n\n\n\n\n\t\treturn $this->fields[$field];\n\t\t}", "public function getField()\n\t\t{\n\t\t\treturn $this->field;\n\t\t}", "public function getField()\n\t\t{\n\t\t\treturn $this->field;\n\t\t}", "public function get($field){\r\n\t\treturn $this->_item->get($field);\r\n\t}", "public function __get( $field ) {\n\t\t// Allowed fields to retrieve\n\t\tif ( in_array( $field, array( 'key', 'metabox_id', 'title', 'options_page' ), true ) ) {\n\t\t\treturn $this->{$field};\n\t\t}\n \n if ( 'cmb' === $field ) {\n return $this->option_fields();\n }\n\n\t\tthrow new Exception( 'Invalid property: ' . $field );\n\t}", "public function __get( $name ) {\n\t\tif ( in_array( $name, $this->compat_fields, true ) ) {\n\t\t\treturn $this->$name;\n\t\t}\n\t}", "public function getValue()\n {\n\n if ($this->populate == false) {\n return null;\n }\n\n $getter = new Getter();\n $value = $getter->getFieldValue($this); // TODO get field value\n\n\n return $value;\n }", "public function __get($field)\n {\n $method = 'get' . ucfirst($field);\n if (method_exists($this, $method)) {\n return $this->$method();\n }\n }", "public function get($field) {\n return $this->fields[$field];\n }", "function get_custom_field($fieldname)\n{\n\t// the_ID() function won't work because it *prints* its output\n\t$post_id = get_the_ID();\n\treturn get_post_meta($post_id, $fieldname, true);\n}", "public function __get( $name ) {\n\t\tif ( in_array( $name, $this->compat_fields ) ) {\n\t\t\treturn $this->$name;\n\t\t}\n\t}", "public function getField(): string\n {\n return $this->field;\n }", "public function getField(): string\n {\n return $this->field;\n }", "public function getField(): string\n {\n return $this->field;\n }", "public function getCustom();", "public function getCustom();", "public function getCustom();", "public function getCustom();", "public function getCustom();", "private function _get_custom_fields()\n { \n if ( empty(self::$_cache['fields']))\n {\n $fields = array();\n\n $query = ee()->db->select('field_id, field_name, field_type')\n ->get('channel_fields');\n\n if ($query->num_rows() > 0)\n { \n foreach($query->result() as $field)\n {\n $fields['field_id_'.$field->field_id] = $field->field_name;\n }\n } \n\n self::$_cache['fields'] = $fields;\n } \n\n return self::$_cache['fields']; \n }", "public function __get($name) {\r\n $getters = $this->getterSetters( 'getters' );\r\n if( isset( $getters [$name] ) ) {\r\n $method = $getters [$name];\r\n return $this->$method();\r\n }\r\n // 2. check record field\r\n if( !empty( $this->_record ) ) {\r\n $fields = $this->_record->getColumns();\r\n if( array_key_exists( $name, $fields ) ) {\r\n return $this->_record->$name;\r\n }\r\n }\r\n \r\n return null;\r\n }", "public function getFieldAttribute()\n {\n return $this->field()->first();\n }", "public function get($field)\n {\n return $this->fields[$field];\n }", "public function getField($field)\n {\n return $this->data[$field];\n }", "function get($name){\r\n\t\t$f = &$this->field($name);\r\n\t\treturn $f->value;\r\n\t}", "function getField() {\n\t\t\n\t\t$begPos = strpos($this->title, '{');\n\t\t$endPos = strpos($this->title, '}');\n\t\t\n\t\tif($endPos > 0){\n\t\t\t$this->fieldName = substr($this->title, $begPos+1, $endPos-($begPos+1));\n\t\t\t$this->dynamicTitle = true;\n\t\t}\n\t\telse\n\t\t\t$this->dynamicTitle = false;\n\t\t\n\t\tif($this->fieldName)\n\t\t\t$this->fieldData = $GLOBALS['TSFE']->page[\"$this->fieldName\"];\n\t}", "public function customFields();", "public function __get($field)\n\t{\n\t\tif(property_exists($this, $field)) return $this->{$field};\n\t\t\n\t\telse return NULL;\n\t}", "public function getField(): string {}", "public function field() {\n\n\t\treturn $this->field;\n\t}", "public function __get( $field ) {\n\t\t// Allowed fields to retrieve\n\t\tif ( in_array( $field, array( 'key', 'metabox_id', 'title', 'options_page' ), true ) ) {\n\t\t\treturn $this->{$field};\n\t\t}\n\t\tthrow new Exception( 'Invalid property: ' . $field );\n\t}", "public function __get( $field ) {\n\t\t// Allowed fields to retrieve\n\t\tif ( in_array( $field, array( 'key', 'metabox_id', 'title', 'options_page' ), true ) ) {\n\t\t\treturn $this->{$field};\n\t\t}\n\t\tthrow new Exception( 'Invalid property: ' . $field );\n\t}", "public function custom_fields() {\n\t\treturn apply_filters( 'wprm_recipe_custom_fields', array(), $this );\n\t}" ]
[ "0.72999215", "0.72663456", "0.7203015", "0.7149892", "0.7135665", "0.7112115", "0.7106445", "0.7106445", "0.7094841", "0.7052072", "0.70129967", "0.69915134", "0.6984148", "0.69821644", "0.69763035", "0.69472396", "0.69333535", "0.69242346", "0.69209677", "0.69120735", "0.690755", "0.6879591", "0.6854138", "0.68364686", "0.68364686", "0.68364686", "0.68364686", "0.68364686", "0.683637", "0.68257684", "0.681375", "0.68125576", "0.681183", "0.6806296", "0.68019944", "0.6746623", "0.6737341", "0.67307776", "0.67307776", "0.67306036", "0.6715494", "0.6715494", "0.6715494", "0.6715494", "0.6715494", "0.6715494", "0.6715494", "0.6715494", "0.6715494", "0.6715494", "0.6715494", "0.6700774", "0.66946214", "0.66898876", "0.66898876", "0.66898876", "0.6674803", "0.66630334", "0.66551185", "0.66333735", "0.6621836", "0.66193587", "0.6595821", "0.6585777", "0.6571608", "0.6568313", "0.6562002", "0.6544056", "0.6503111", "0.6503111", "0.65008533", "0.6488163", "0.6483935", "0.6468763", "0.6462544", "0.64599", "0.6449763", "0.64475375", "0.64440256", "0.64440256", "0.64440256", "0.6436396", "0.6436396", "0.6436396", "0.6436396", "0.6436396", "0.6405534", "0.640005", "0.6375012", "0.6368547", "0.63683623", "0.6368119", "0.636454", "0.63626856", "0.6361412", "0.63549113", "0.63475966", "0.63470113", "0.63470113", "0.6333109" ]
0.7899576
0
Lowlevel methods Ensure that the context is loaded for this record.
Низкоуровневые методы гарантируют, что контекст загружен для этого записи.
private function _load_context() { if (!isset($this->_context) && isset($this->id)) { $ctxclass = context_elis_helper::get_class_for_level($this->get_field_context_level()); $this->_context = $ctxclass::instance($this->id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initContextAware()\n {\n $this->initialize();\n }", "protected function ensureLoaded()\n {\n if ($this->config === null)\n {\n $this->loadConfig();\n }\n }", "protected function validateContext() { }", "protected function establishContext() { }", "public function initialize() {\n\t\t// Get our context (this takes care of starting the session, too)\n\t\t$context = $this->getDI()->getShared('ltiContext');\n\t\t$this->context = $context;\n\t\tif (!$context->valid) {\n\t\t\treturn;\n\t\t}\n\t\t$this->view->disable();\n\t}", "private function setupContext()\n {\n $apiContext = ApiContext::restore(config('services.bunq.path'));\n $apiContext->ensureSessionActive();\n $apiContext->save(config('services.bunq.path'));\n BunqContext::loadApiContext($apiContext);\n }", "function load(k_Context $context);", "public function loadContext(Request $request);", "protected function _Load_Context() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/context');\r\n // Fire the shortcode init action\r\n do_action('vcff_field_context_init',$this);\r\n }", "protected function getContext() {}", "protected function checkLoaded(): void\n {\n if ($this->isLoaded())\n return;\n\n $this->data = $this->read();\n $this->loaded = true;\n }", "public function preDispatch()\n {\n $this->initContext();\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }" ]
[ "0.656227", "0.6173142", "0.6140396", "0.60515374", "0.60482", "0.6045857", "0.5998239", "0.5964568", "0.5895459", "0.584791", "0.58242816", "0.574518", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971" ]
0.7142743
0
Ensure that the fields that are defined for the context level. This does not load the field data, just the field definitions. See _load_field_data().
Убедитесь, что поля, определенные для уровня контекста, заданы. Это не загружает данные полей, только их определения. См. _load_field_data().
private function _load_fields() { $contextlevel = $this->get_field_context_level(); if (!isset(self::$_fields[$contextlevel])) { $fields = field::get_for_context_level($contextlevel); if (!is_array($fields)) { $fields = $fields->to_array('shortname'); } self::$_fields[$contextlevel] = $fields; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _load_field_data() {\n if (!empty($this->id) && !$this->_fields_loaded) {\n $this->_load_context();\n $this->_load_fields();\n $data = field_data::get_for_context($this->_context);\n foreach (self::$_fields[$this->_context->contextlevel] as $name => $field) {\n if (empty($this->_field_changed[$name]) && isset($data[$name])) {\n // only set the field data if it hasn't been changed\n $this->_field_data[$name] = $data[$name];\n }\n }\n $this->_fields_loaded = true;\n }\n }", "protected function init_field_values() {\n\t\tforeach ( $this->fields as $field ) {\n\t\t\tif ( $this->is_field_included( $field ) ) {\n\t\t\t\t$this->add_field_values( $field );\n\t\t\t}\n\t\t}\n\t}", "function _acf_do_prepare_local_fields() {}", "public function initFields();", "protected function init_fields() {\n\t\t$this->fields = FrmField::get_all_for_form( $this->form_id, '', 'exclude', 'exclude' );\n\t}", "protected function _ensureTrackFields()\n {\n if (! is_array($this->_fields)) {\n // Check for cases where the track id is zero, but there is a field for track 0 in the db\n if ($this->_trackId) {\n $model = $this->getMaintenanceModel();\n $fields = $model->load(array('gtf_id_track' => $this->_trackId), array('gtf_id_order' => SORT_ASC));\n } else {\n $fields = false;\n }\n\n $this->_fields = array();\n $this->_trackFields = array();\n if (is_array($fields)) {\n $this->exists = true;\n\n foreach ($fields as $field) {\n $key = self::makeKey($field['sub'], $field['gtf_id_field']);\n\n $class = 'Field\\\\' . ucfirst($field['gtf_field_type']) . 'Field';\n $this->_fields[$key] = $this->tracker->createTrackClass($class, $this->_trackId, $key, $field);\n\n $this->_trackFields[$key] = $field;\n }\n // \\MUtil_Echo::track($this->_trackFields);\n } else {\n $this->exists = false;\n }\n }\n }", "function loadFieldDefs()\n\t{\n\t\t$fielddefs = array ( ) ;\n\n\t\tforeach ( $this->_fielddefs as $key => $def )\n {\n if ( AbstractMetaDataImplementation::validField ($def) && strcmp ( strtolower($key) , 'deleted' ) != 0)\n\t\t\t{\n $fielddefs [ strtolower ( $key ) ] = $def ;\n }\n }\n $this->_fielddefs = $this->mergeFieldDefinitions ( $this->_viewdefs, $fielddefs );\n\t}", "private function checkFields()\n {\n if (! property_exists(get_class($this), 'gdprFields')) {\n throw new GdprNullifyException(\"Please add the required field to $gdprFields property.\"); \n } \n\n if (!is_array($this->gdprFields)) {\n throw new GdprNullifyException(\"The $gdprFields property is not an array.\"); \n }\n \n if (empty($this->gdprFields)) {\n throw new GdprNullifyException(\"The $gdprFields property is empty.\"); \n }\n\n foreach ($this->gdprFields as $field) {\n\n if (!in_array(DB::getSchemaBuilder()->getColumnType($this->getTable(), $field), $this->allowedFieldTypes)) {\n array_push($this->notTextType, $field);\n }\n\n $this->fieldsAndLengths[$field] = DB::connection()->getDoctrineColumn($this->getTable(), $field)->getLength();\n }\n\n if (!empty($this->notTextType)) {\n throw new GdprNullifyException(\"The following field(s) is/are not TEXT type: \".implode(\",\", $this->notTextType)); \n }\n }", "public static function ensureAllFieldsProcessed()\n {\n if (static::$_processedFields) {\n return;\n }\n static::$_processedFields = true;\n\n $projectConfig = Craft::$app->getProjectConfig();\n $allGroups = $projectConfig->get(Fields::CONFIG_FIELDGROUP_KEY, true) ?? [];\n $allFields = $projectConfig->get(Fields::CONFIG_FIELDS_KEY, true) ?? [];\n\n foreach ($allGroups as $groupUid => $groupData) {\n // Ensure group is processed\n $projectConfig->processConfigChanges(Fields::CONFIG_FIELDGROUP_KEY . '.' . $groupUid);\n }\n\n foreach ($allFields as $fieldUid => $fieldData) {\n // Ensure field is processed\n $projectConfig->processConfigChanges(Fields::CONFIG_FIELDS_KEY . '.' . $fieldUid);\n }\n }", "function checkFields()\n\t{\n\t\t$mandatoryFields = array(\"name\", \"title\", \"version\", \"summary\", \"author\", \"contributor\");\n\n\t\t$notExist = array();\n\n\t\t$vars = get_object_vars($this);\n\n\t\tforeach($mandatoryFields as $field)\n\t\t{\n\t\t\tif (!array_key_exists($field, $vars))\n\t\t\t{\n\t\t\t\t$this->error = true;\n\t\t\t\t$notExist[] = $field;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->error)\n\t\t{\n\t\t\tif (empty($notExist))\n\t\t\t{\n\t\t\t\t$this->message = \"Fatal error: Probably specified file is not XML file or is not acceptable\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->message = \"Fatal error: The following fields are required: \";\n\t\t\t\t$this->message .= join(\", \", $notExist);\n\t\t\t}\n\t\t}\n\t}", "protected function LoadContactFields() {\n\t$this->EmailField();\n\t$this->PhoneField();\n\t// copy blob data to field objects\n\t$this->FormObject()->LoadFields_fromBlob();\n }", "private function checkCourseDefinedFields()\n\t{\n\t\tglobal $ilUser;\n\t\t\n\t\tinclude_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');\n\t\tinclude_once('Modules/Course/classes/Export/class.ilCourseUserData.php');\n\t\t\n\t\t$all_required = true;\n\t\tforeach(ilCourseDefinedFieldDefinition::_getFields($this->obj_id) as $field_obj)\n\t\t{\n\t\t\t$required_given = false;\n\t\t\tswitch($field_obj->getType())\n\t\t\t{\n\t\t\t\tcase IL_CDF_TYPE_SELECT:\n\t\t\t\t\t$tmp_values = ilUtil::stripSlashes($_POST['cdf'][$field_obj->getId()]);\n\t\t\t\t\t$tmp_values = explode('_', $tmp_values,2);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(isset($tmp_values[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp_value = isset($tmp_values[1]) ? $tmp_values[1] : '';\n\t\t\t\t\t\t$value = '';\n\t\t\t\t\t\tforeach((array) $field_obj->getValues() as $v)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($v == $tmp_value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$value = $tmp_value;\n\t\t\t\t\t\t\t\t$required_given = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase IL_CDF_TYPE_TEXT:\n\t\t\t\t\t$value = ilUtil::stripSlashes($_POST['cdf'][$field_obj->getId()]);\n\t\t\t\t\tif($value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$required_given = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$course_user_data = new ilCourseUserData($ilUser->getId(),$field_obj->getId());\n\t\t\t$course_user_data->setValue($value);\n\t\t\t$course_user_data->update();\n\t\t\t\n\t\t\tif($field_obj->isRequired() and !$required_given)\n\t\t\t{\n\t\t\t\t$all_required = false;\n\t\t\t}\n\t\t}\t\n\t\treturn $all_required;\n\t}", "private function load_fields() {\n\n\t\tforeach ( $this->field_types as $type ) {\n\n\t\t\t// Stop here if the field type has already been loaded.\n\t\t\tif ( in_array( $type, self::$field_types_loaded ) )\n\t\t\t\tcontinue;\n\n\t\t\t$path = BEANS_API_COMPONENTS_PATH . \"fields/types/{$type}.php\";\n\n\t\t\tif ( file_exists( $path ) )\n\t\t\t\trequire_once( $path );\n\n\t\t\t// Set flag that field is loaded.\n\t\t\tself::$field_types_loaded[$type] = $type;\n\n\t\t}\n\n\t}", "function _acf_do_prepare_local_fields() {\n\t\n\t// Get fields.\n\t$fields = acf_get_local_fields();\n\t\n\t// If fields have been registered early, re-add to correctly prepare them.\n\tif( $fields ) {\n\t\tacf_add_local_fields( $fields );\n\t}\n}", "public function validate_fields()\n {\n }", "private function check_required_fields()\n {\n\n\n }", "private function _loadFields() {\n\t\t\n\t\tforeach($this->default_fields as $field){\n\t\t\t\n\t\t\t$loc = X_EDITABLE_PATH . 'fields/' . $field . '.php';\n\t\t\tself::$FIELDS[$field] = $loc;\n\t\t}\n\t\tforeach($this->user_fields as $field){\n\t\t\n\t\t\t// default fields location is theme directory with filename {$fieldname}.php\n\t\t\t$default_location = $this->default_user_field_path . $field .'.php';\n\t\t\t$file_location = apply_filters('xe_' . $field . '_field_path', $default_location);\n\t\t\t\n\t\t\tif ( file_exists($file_location) )\n\t\t\t\tself::$FIELDS[$field] = $file_location;\n\t\t}\n\t}", "private function get_context_fields($context)\n {\n }", "protected function registerFields() {\n \n }", "public function init_form_fields()\n {\n\n $this->form_fields = $this->defineFields();\n }", "protected function dataCheck() {\n\t\tif( FALSE === isset( $this->data['egResult'] ) ) {\n\t\t\t$this->data['egResult'] = array();\n\t\t}\n\t\tif( FALSE === isset( $this->data['fields'] ) ) {\n\t\t\t$this->data['fields'] = self::DEFAULT_FIELDS;\n\t\t}\n\t}", "protected function ensureEntityFieldMap() {\n // Try to avoid repeated calls to getFieldMap() assuming it's expensive.\n if (empty($this->entityFieldMap)) {\n $entity_field_manager = \\Drupal::service('entity_field.manager');\n $this->entityFieldMap = $entity_field_manager->getFieldMap();\n }\n }", "public function initFields(): void\n {\n $this->fieldTitle();\n $this->fieldPosition();\n $this->fieldImage();\n }", "public function getDefinedFields() {\n if ($d = $this->getDefinition()) {\n $f = $d->getFields();\n if(!$f) {\n $d->mergeSource(array(\n 'Fields' => array(\n 'Title' => array('CMSField' => 'Text') \n )\n ));\n return $d->getFields();\n }\n return $f;\n }\n return false;\n }", "private function _set_fields()\n {\n\t @$this->form_data->filter_survey = '';\n @$this->form_data->filter_question = '';\n }", "public function prepareForValidation()\n {\n $this->requiredFields = ['title', 'description'];\n $this->merge([\n 'translations' => $this->getSanitizedTranslations(),\n 'url_key' => UrlKeyGenerator::toUrlKey($this->request->get('url_key'))\n ]);\n }", "abstract protected function getRequiredFields();", "protected function _setFieldVars()\n {\n $this->_fields = array(\n 'formtoken' => new Fields\\FormId,\n 'step' => new Fields\\Step,\n 'wallet' => new Fields\\Wallet,\n 'wallet_remember' => new Fields\\Checkbox,\n 'number' => new Fields\\Number,\n 'rate' => new Fields\\BitCoinRate,\n 'amount' => new Fields\\TotalPurchaseAmount,\n 'email' => new Fields\\Email,\n 'bank' => new Fields\\IdealBank,\n );\n\n $this->_setSteps();\n $this->_setNames();\n }", "public function validate_fields()\r\n {\r\n return true;\r\n }", "protected function prepareForValidation()\n {\n if ($this->missing('prerequisites')) {\n $this->merge([\n 'prerequisites' => null\n ]);\n }\n\n if ($this->missing('concurrents')) {\n $this->merge([\n 'concurrents' => null\n ]);\n }\n\n $this->merge([\n 'type' => $this->getType($this->input('abbreviation'))\n ]);\n }", "public function init_fields() {\n\t\tadd_filter( 'ibx_wpfomo_field_fomo_type', array( $this, 'hide_fields' ), 10, 1 );\n\t\tadd_filter( 'ibx_wpfomo_field_conversions_source', array( $this, 'conversion_source' ), 10, 1 );\n\t\tadd_filter( 'ibx_wpfomo_field_reviews_source', array( $this, 'reviews_source' ), 10, 1 );\n\t\tadd_filter( 'ibx_wpfomo_metabox_fields', array( $this, 'add_fields' ), 10, 1 );\n\t}", "protected function validateFields()\n\t{\n\t\t$function = $this->class;\n\t\tif($function == 'CreditSale' && $this->swipe)\n\t\t\t$function .= 'Swipe';\n\n\t\t$fields = array_merge($this->requiredCommon,$this->required[$function]);\n\n\t\tforeach($fields as $var)\n\t\t\tif(!isset($this->$var) || empty($var))\n\t\t\t\tthrow new Exception($function.' borked: '.$var);\n\n\t\tif(method_exists($this, 'validate') && is_callable([$this,'validate']))\n\t\t\t$this->validate();\n\n\t\treturn;\n\t}", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function init_form_fields()\n {\n }", "public function requiredFieldsSet()\n {\n $missing_fields = array_filter(\n get_object_vars($this),\n function ($a) {\n return is_null($a);\n }\n );\n if (!empty($missing_fields)) {\n $keys = array_keys($missing_fields);\n throw new SwiftReachException(\n \"The following fields cannot be blank: \" . implode(\", \", $keys)\n );\n }\n }", "public function fillFieldsWithForm()\n\t{\n\t\tforeach($this->_data->fields as &$field)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(!empty($_POST['isChangedAA'][$field->name]) || !empty($_POST['isChangedAA'][\"{$field->name}_new\"]))\n\t\t\t\t\t$field->isChanged = true;\n\t\t\t\tif(!$field->isReadonly)\n\t\t\t\t\t$field->loadFromForm(isset($_POST[self::INPUT_PREFIX]) ? $_POST[self::INPUT_PREFIX] : array());\n\t\t\t}\n\t\t\tcatch(AAException $e)\n\t\t\t{\n\t\t\t\t$this->processFormError($field, $e->getMessage());\n\t\t\t}\n\t\t}\n\t}", "private function clearFields()\n {\n $this->path = null;\n $this->model = null;\n $this->language = null;\n $this->selectClasses = null;\n $this->localId = null;\n }", "protected function _buildFields()\n {\n $db = CarteBlanche::getContainer()->get('entity_manager')\n ->getStorageEngine($this->getDatabaseName());\n foreach ($this->getStructureEntry('structure') as $_field=>$_data) {\n $_f = null;\n if (preg_match('/^(.*)_id$/i', $_field, $matches)) {\n if (isset($matches[1]) && is_string($matches[1])) {\n $related_object = $matches[1];\n if ($related_object=='parent')\n $related_object = $this->getTableName();\n $table = AutoObjectMapper::getAutoObject($related_object, $this->getDatabaseName());\n $_f = new Relation(\n $_field, $_data, $db, $related_object, $table->getModel()\n );\n }\n } else {\n $_f = new Field( $_field, $_data, $db );\n }\n\n if (!is_null($_f))\n $this->object_fields->setEntry( $_field, $_f );\n }\n }", "private function populateFields()\n {\n // With data_participants, data_forms data_questionnaires, and data_config tables.\n foreach ($this->collection as $model)\n {\n $this->dataParticipants[] = $model['original'];\n $this->dataForms[] = $model->data_form->toArray();\n $this->dataQuestionnaires[] = $model->data_questionnaire->toArray();\n $this->dataConfigs[] = $model->data_config->toArray();\n }\n\n\n // With data_game_phases.\n foreach ($this->collection as $dataParticipantModel)\n {\n foreach ($dataParticipantModel->data_game_phases->toArray() as $phase)\n {\n $this->dataGamePhases[] = $phase;\n }\n }\n\n }", "protected function validateCustomFields()\n\t{\n\t\tglobal $ilUser;\n\t\t\n\n\t\t$required_fullfilled = true;\n\t\tforeach(ilCourseDefinedFieldDefinition::_getFields($this->container->getId()) as $field_obj)\n\t\t{\n\t\t\tswitch($field_obj->getType())\n\t\t\t{\n\t\t\t\tcase IL_CDF_TYPE_SELECT:\n\t\t\t\t\t\n\t\t\t\t\t// Split value id from post\n\t\t\t\t\tlist($field_id,$option_id) = explode('_', $_POST['cdf_'.$field_obj->getId()]);\n\t\t\t\t\t\n\t\t\t\t\t#$GLOBALS['ilLog']->write(__METHOD__.': '.print_r($field_id,TRUE).' '.print_r($option_id,TRUE).' '.print_r($_POST,TRUE));\n\t\t\t\t\t\n\t\t\t\t\t$open_answer_indexes = (array) $field_obj->getValueOptions();\n\t\t\t\t\tif(in_array($option_id, $open_answer_indexes))\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = $_POST['cdf_oa_'.$field_obj->getId().'_'.$option_id];\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$value = $field_obj->getValueById($option_id);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase IL_CDF_TYPE_TEXT:\n\t\t\t\t\t$value = $_POST['cdf_'.$field_obj->getId()];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$GLOBALS['ilLog']->write(__METHOD__.': new value '. $value);\n\t\t\t\n\t\t\t\n\t\t\t$course_user_data = new ilCourseUserData($ilUser->getId(),$field_obj->getId());\n\t\t\t$course_user_data->setValue($value);\n\t\t\t$course_user_data->update();\n\t\t\t\n\t\t\t// #14220\n\t\t\tif($field_obj->isRequired() and $value == \"\")\n\t\t\t{\n\t\t\t\t$required_fullfilled = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $required_fullfilled;\n\t}", "protected function prepareForValidation() {\n\t\tif ( $this->has('institute_id') ) {\n\t\t\t$this->merge(['decoded_institute_id' => GeneralHelpers::decode($this->input('institute_id'))]);\n\t\t}\n\t\tif ( $this->has('course_id') ) {\n\t\t\t$this->merge(['decoded_course_id' => GeneralHelpers::decode($this->input('course_id'))]);\n\t\t}\n\t}", "public function buildFields();", "public function prepareVars()\n {\n $this->vars['fieldOptions'] = FontHelper::instance()->getFontList();\n $this->vars['field'] = $this->formField;\n $this->vars['value'] = $this->getLoadValue();\n }", "public function has_fields()\n {\n }", "private function _set_fields()\n\t{\n \n\t\t$this->form_data->cat_id = 0;\n $this->form_data->cat_layout_type = 0;\n\t\t$this->form_data->cat_name = '';\n\n\t\t$this->form_data->filter_cat_name = '';\n $this->form_data->account_mail_layout = '';\n $this->form_data->password_mail_layout = '';\n\n\t}", "function initFieldDefs() {\n $mTmpFields = $this->getLineNumber($this->headerRow);\n $mSqlInsertFields = array();\n\n /* @var $mTmpField String */\n foreach ($mTmpFields as $mTmpField) {\n\n $mTmpField = strtolower($mTmpField);\n $mFieldDef = new FieldDef($mTmpField);\n $this->fieldDefSet->addFieldDef($mFieldDef);\n $mSqlInsertFields[] = $mTmpField;\n }\n\n $this->sqlInsertFields = implode(\", \", $mSqlInsertFields);\n }", "public function fillFields($fields = null);", "function loadFields(){\n\t\trequire(\"lib/settings-fields.php\");\n\t}", "public function validate_fields()\n {\n return true;\n }", "function fillFieldSettings()\n\t{\t\t\n\t\t$arrFields = $this->pSet->getFieldsList();\n\t\t$this->addFieldsSettings($arrFields, $this->pSet, true, $this->pageType);\n\t\t\t\t\n\t\tif( $this->pageType == PAGE_REGISTER )\n\t\t\t$this->addConfirmToFieldSettings();\n\t\t\n\t\t\t\t\n\t\tif( $this->searchPanelActivated && $this->permis[$this->searchTableName][\"search\"] )\n\t\t{\n\t\t\t$arrFields = $this->pSetSearch->getAllSearchFields();\n\t\t\t$this->addFieldsSettings($arrFields, $this->pSetSearch, true, PAGE_SEARCH);\t\n\t\t}\n\t}", "protected function initTableFields()\r\n {\r\n }", "public function loadFields() {\n\t\t\t// Declare classes\n\t\t\t$RepCourse\t\t= new RepCourse();\n\t\t\t$ModCourse\t\t= new ModCourse();\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t$id_branch\t\t= (isset($_POST['id_branch'])) ? trim($_POST['id_branch']) : false;\n\t\t\t// If branch id was sent\n\t\t\tif ($id_branch) {\n\t\t\t\t// Get all fields\n\t\t\t\t$fields\t\t= $RepCourse->getAllFields($id_branch);\n\t\t\t\t// If fields were found\n\t\t\t\tif ($fields) {\n\t\t\t\t\t// Model return\n\t\t\t\t\t$return\t= $ModCourse->listFieldOptions($fields);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Return\n\t\t\techo $return;\n\t\t}", "protected function prepareFieldsAndOptions(\n array &$fields,\n array &$options\n ) {\n // there is no tca for the table!\n $options['enablefieldsoff'] = true;\n parent::prepareFieldsAndOptions($fields, $options);\n $this->prepareGenericSearcher($options);\n }", "private function getDataFields()\n {\n $fields = Schema::getFromYamlSummaryFile($this->tableName);\n if ($fields === null) {\n $fields = $this->generateYamlSummaryFile();\n }\n\n foreach ($fields as $key => $value) {\n $this->fields[$key] = $this->getFieldClass($value['type']);\n $this->fields[$key]->assignData($value);\n }\n }", "protected function initTableFields()\n {\n }", "protected function initTableFields()\n {\n }", "public function check_fields(): bool\n {\n // Prerequisites\n if (empty($this->variables)) {\n return !user_error('No fields filled');\n } elseif (empty($this->list_fields_table)) {\n return !user_error(sprintf('Class %s: please add list_fields_table in __construct', __CLASS__));\n }\n\n // Ne pas gérer les champs non supportés\n $common_fields = array_intersect_key($this->variables, array_flip($this->list_fields_table));\n $diff_fields = array_diff(array_keys($this->variables), $this->list_fields_table);\n\n if (!empty($diff_fields)) {\n return !user_error('Unsupported fields: '.implode(', ', $diff_fields));\n }\n\n $this->variables = $common_fields;\n\n // Check missing fields\n if (!empty($this->required_fields)) {\n $field_missing = [];\n\n foreach ($this->required_fields as $require) {\n if (empty($this->variables[$require])) {\n $field_missing[] = $require;\n }\n }\n\n if (!empty($field_missing)) {\n return !user_error('Required fields not filleds: '.implode(', ', $field_missing));\n }\n }\n\n return true;\n }", "protected function getFieldDefs()\n {\n if (empty($this->fieldDefs)) {\n require 'metadata/audit_templateMetaData.php';\n $this->fieldDefs = $dictionary['audit']['fields'];\n }\n return $this->fieldDefs;\n }", "public function cleanupFields()\n\t{\n\t\t// create list of fields\n\t\tforeach($this->objects as $object)\n\t\t{\n\t\t\t// file field should not be added since they are kept within the $_FILES\n\t\t\tif(!($object instanceof SpoonFileField)) $this->fields[] = $object->getName();\n\t\t}\n\n\t\t/**\n\t\t * The form key should always automagically be added since the\n\t\t * isSubmitted method counts on this field to check whether or\n\t\t * not the form has been submitted\n\t\t */\n\t\tif(!in_array('form', $this->fields)) $this->fields[] = 'form';\n\n\t\t// post method\n\t\tif($this->method == 'post')\n\t\t{\n\t\t\t// delete unwanted keys\n\t\t\tforeach($_POST as $key => $value) if(!in_array($key, $this->fields)) unset($_POST[$key]);\n\n\t\t\t// create needed keys\n\t\t\tforeach($this->fields as $field) if(!isset($_POST[$field])) $_POST[$field] = '';\n\t\t}\n\n\t\t// get method\n\t\telse\n\t\t{\n\t\t\t// delete unwanted keys\n\t\t\tforeach($_GET as $key => $value) if(!in_array($key, $this->fields)) unset($_GET[$key]);\n\n\t\t\t// create needed keys\n\t\t\tforeach($this->fields as $field) if(!isset($_GET[$field])) $_GET[$field] = '';\n\t\t}\n\t}", "function validate_fields() { return true; }", "abstract protected function fields();", "abstract protected function fields();", "public function init_form_fields()\n\t{\n\t\t$this->form_fields = include( 'settings-cybersource.php' );\n\t}", "public function prepareVars()\n {\n $this->vars['mode'] = $this->mode;\n $this->vars['stretch'] = $this->formField->stretch;\n $this->vars['size'] = $this->formField->size;\n $this->vars['name'] = $this->getFieldName();\n $this->vars['value'] = $this->getLoadValue();\n }", "private function loadFields() {\n $fields = $this->query(\"SELECT * FROM `metagame_fields`\");\n foreach ($fields as $field)\n $this->fields[ $field[ 'id' ] ] = $field[ 'name' ];\n }", "public function prepare_fields()\n {\n\n return array();\n }", "protected static function _defineFields()\n {\n $className = get_called_class();\n\n // skip if fields already defined\n if (isset(static::$_classFields[$className])) {\n return;\n }\n\n // merge fields from first ancestor up\n $classes = class_parents($className);\n array_unshift($classes, $className);\n\n static::$_classFields[$className] = [];\n while ($class = array_pop($classes)) {\n if (!empty($class::$fields)) {\n static::$_classFields[$className] = array_merge(static::$_classFields[$className], $class::$fields);\n }\n $attributeFields = $class::_definedAttributeFields();\n if (!empty($attributeFields['fields'])) {\n static::$_classFields[$className] = array_merge(static::$_classFields[$className], $attributeFields['fields']);\n }\n if (!empty($attributeFields['relations'])) {\n $class::$relationships = $attributeFields['relations'];\n }\n }\n }", "protected function setRequiredFields()\n {\n $requiredFields = [\n 'transaction_id',\n 'card_type',\n 'redeem_type',\n 'amount',\n 'currency',\n 'product_name',\n 'product_category',\n 'customer_name',\n 'customer_email',\n 'customer_phone',\n 'customer_id_number',\n 'customer_bank_id',\n 'bank_account_number'\n ];\n\n $this->requiredFields = \\Genesis\\Utils\\Common::createArrayObject($requiredFields);\n }", "protected function setAvailableFields() {\r\n\r\n\t\t$this->availableFieldsArray = array(\r\n\t\t\t'uid',\r\n\t\t\t'pid',\r\n\t\t\t'cn_iso_2',\r\n\t\t\t'cn_iso_3',\r\n\t\t\t'cn_iso_nr',\r\n\t\t\t'cn_parent_tr_iso_nr',\r\n\t\t\t'cn_official_name_local',\r\n\t\t\t'cn_official_name_en',\r\n\t\t\t'cn_capital',\r\n\t\t\t'cn_tldomain',\r\n\t\t\t'cn_currency_iso_3',\r\n\t\t\t'cn_currency_iso_nr',\r\n\t\t\t'cn_phone',\r\n\t\t\t'cn_eu_member',\r\n\t\t\t'cn_address_format',\r\n\t\t\t'cn_zone_flag',\r\n\t\t\t'cn_short_local',\r\n\t\t\t'cn_short_en',\r\n\t\t\t'cn_uno_member',\r\n\t\t\t'cn_short_de'\t\t\r\n\t\t);\r\n\t\t\r\n\t}", "abstract protected function get_field_context_level();", "protected function clearFields(){\n $this->fields = array();\n }", "function _getModelFields ()\n {\n $modelFields = array();\n $origViewDefs = $this->_getOrigFieldViewDefs();\n// $GLOBALS['log']->debug(\"Original viewdefs = \".print_r($origViewDefs,true));\n foreach ($origViewDefs as $field => $def)\n {\n if (!empty($field))\n {\n if (! is_array($def)) {\n $def = array('name' => $field);\n }\n // get this field's label - if it has not been explicitly provided, see if the fieldDefs has a label for this field, and if not fallback to the field name\n if (! isset($def ['label']))\n {\n if (! empty($this->_fieldDefs [$field] ['vname']))\n {\n $def ['label'] = $this->_fieldDefs [$field] ['vname'];\n } else\n {\n $def ['label'] = $field;\n }\n }\n $modelFields[$field] = array('name' => $field, 'label' => $def ['label']);\n }\n }\n $GLOBALS['log']->debug(print_r($modelFields,true));\n foreach ($this->_fieldDefs as $field => $def)\n {\n if ((!empty($def['studio']) && $def['studio'] == 'visible')\n || (empty($def['studio']) && (empty($def ['source']) || $def ['source'] == 'db' || $def ['source'] == 'custom_fields') && $def ['type'] != 'id' && strcmp($field, 'deleted') != 0 && (empty($def ['dbType']) || $def ['dbType'] != 'id') && (empty($def ['dbtype']) || $def ['dbtype'] != 'id')))\n {\n $label = isset($def['vname']) ? $def['vname'] : $def['name'];\n $modelFields [$field] = array('name' => $field, 'label' => $label);\n }\n else\n {\n $GLOBALS['log']->debug( get_class($this).\"->_getModelFields(): skipping $field from modelFields as it fails the test for inclusion\");\n }\n }\n $GLOBALS['log']->debug( get_class($this).\"->_getModelFields(): remaining entries in modelFields are: \".implode(\",\",array_keys($modelFields)));\n return $modelFields;\n }", "public abstract function prepareFieldData($fieldID);", "protected function get_registered_fields()\n {\n }", "private function initCrmFields(): bool\n\t{\n\t\t$reader = new Crm\\Reader();\n\t\tif (!$reader->errorCollection->isEmpty())\n\t\t{\n\t\t\t$this->errorCollection->add($reader->errorCollection->getValues());\n\n\t\t\treturn false;\n\t\t}\n\t\t$this->crmEntities = $this->eventData['result']['entities'];\n\n\t\t$fields = $reader->getFieldsFromMixedEntities($this->eventData['result']['entities']);\n\t\t$this->crmFields['FIRST_NAME'] = $fields['FIRST_NAME'];\n\t\t$this->crmFields['LAST_NAME'] = $fields['LAST_NAME'];\n\t\t$this->crmFields['PHONE'] = $fields['PHONE'];\n\t\t$this->crmFields['EMAIL'] = $fields['EMAIL'];\n\n\t\treturn true;\n\t}", "public function stdWrap_fieldRequiredDataProvider() {}", "public function init_form_fields()\n {\n $this->form_fields = (include __DIR__ . '/../includes/fields.php');\n }", "public function removeUnsafeFields() {\n\t\t$good = array();\n\t\t\n\t\t$data = $this->_diffs;\n\t\t\n\t\t$rules = $this->rules();\n\t\t\n\t\tforeach($rules as $rule) {\n\t\t\t$field = $rule[0];\n\t\t\t\n\t\t\t$extra = (isset($rule[2])) ? $rule[2] : array();\n\t\t\t\n\t\t\t$sets = (isset($extra['for'])) ? $extra['for'] : array();\n\t\t\t\t\n\t\t\t//no sets means always run the rule\n\t\t\tif($sets) {\n\t\t\t\t//check if the rule is included in the current set\n\t\t\t\tif(!$this->_validator->isRuleInCurrentSet($sets)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($data[$field])) {\n\t\t\t\t$good[$field] = $data[$field];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_diffs = $good;\n\t}", "protected function prepareForValidation(): void\n {\n $data = $this->all();\n\n $member = $this->route('member') ?? app('cortex.auth.member');\n $country = $data['country_code'] ?? null;\n $twoFactor = $member->getTwoFactor();\n\n if ($member->exists && empty($data['password'])) {\n unset($data['password'], $data['password_confirmation']);\n }\n\n // Set abilities\n if (! empty($data['abilities'])) {\n if ($this->user()->can('grant', app('cortex.auth.ability'))) {\n $abilities = array_map('intval', $this->get('abilities', []));\n $data['abilities'] = $this->user()->isA('superadmin') ? $abilities\n : $this->user()->getAbilities()->pluck('id')->intersect($abilities)->toArray();\n } else {\n unset($data['abilities']);\n }\n }\n\n // Set roles\n if (! empty($data['roles'])) {\n if ($data['roles'] && $this->user()->can('assign', app('cortex.auth.role'))) {\n $roles = array_map('intval', $this->get('roles', []));\n $data['roles'] = $this->user()->isA('superadmin') ? $roles\n : $this->user()->roles->pluck('id')->intersect($roles)->toArray();\n } else {\n unset($data['roles']);\n }\n }\n\n if ($twoFactor && (isset($data['phone_verified_at']) || $country !== $member->country_code)) {\n Arr::set($twoFactor, 'phone.enabled', false);\n $data['two_factor'] = $twoFactor;\n }\n\n $this->replace($data);\n }", "private function loadFields() {\r\n\t\tdebug(\"loading fields in table '\".$this->database.\".\".$this->table.\"'\",$this);\r\n\t\t$sql = \"SHOW COLUMNS FROM \".$this->database.\".\".$this->table.\";\";\r\n $result = $this->datasource->query($sql);\r\n\r\n\t\twhile ($row = mysql_fetch_object($result)) {\r\n\t\t\t$field = new ArField();\r\n\r\n\t\t\t$field->setName($row->Field);\r\n\t\t\t$t = explode(\"(\", $row->Type);\r\n\t\t\t\r\n\t\t\tif (count($t) > 1) { \r\n\t\t\t\t$field->setType($t[0]);\r\n\t\t\t\t$field->setSize((int)$t[1]);\r\n\t\t\t} else { \r\n\t\t\t\t$field->setType($row->Type);\r\n\t\t\t\t$field->setSize(false);\r\n\t\t\t}\r\n\r\n\t\t\tif ($row->Key == \"PRI\") $field->setPrimary();\r\n\t\t\t$this->fieldObjects[$field->getName()] = $field;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "abstract protected function getFields();", "abstract protected function getFields();", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }" ]
[ "0.7395008", "0.6419978", "0.641753", "0.64058495", "0.6368504", "0.6360377", "0.6352949", "0.6334571", "0.63203824", "0.62946355", "0.62093157", "0.6200402", "0.6183268", "0.61730736", "0.6165498", "0.6154786", "0.61444575", "0.613229", "0.60770684", "0.60749906", "0.6019037", "0.59952396", "0.59679633", "0.59544855", "0.5920145", "0.59088695", "0.58882636", "0.5831498", "0.58224714", "0.5814902", "0.58082324", "0.58077", "0.58064777", "0.58064777", "0.58064777", "0.5805634", "0.5805634", "0.5805634", "0.5805634", "0.58049977", "0.58049977", "0.58049977", "0.58049977", "0.58049977", "0.58049977", "0.58047754", "0.58047754", "0.58047754", "0.5793375", "0.5783042", "0.5769308", "0.5757699", "0.575484", "0.57544607", "0.5752924", "0.5750587", "0.5719665", "0.5713487", "0.57096964", "0.5708119", "0.57035863", "0.56978935", "0.5689634", "0.56891316", "0.56795645", "0.5677149", "0.566967", "0.56641304", "0.5662041", "0.5662041", "0.56608975", "0.56600636", "0.5648173", "0.564106", "0.5634215", "0.5634215", "0.56207097", "0.5615168", "0.56123084", "0.5602126", "0.5593217", "0.55917174", "0.5587156", "0.5585888", "0.55853677", "0.5569919", "0.5569371", "0.5565412", "0.55557287", "0.55531067", "0.55471516", "0.55422646", "0.5540061", "0.55292034", "0.55146253", "0.55146253", "0.54990774", "0.54990774", "0.54990774", "0.54990774" ]
0.7598058
0
Reset the cached list of custom fields (mainly for testing purposes)
Сбросить кэшированный список пользовательских полей (в основном для целей тестирования)
public function reset_custom_field_list() { $contextlevel = $this->get_field_context_level(); unset(self::$_fields[$contextlevel]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function resetFields()\n {\n $this->fieldsFillable = '';\n $this->fieldsHidden = '';\n $this->fieldsCast = '';\n $this->fieldsDate = '';\n }", "function acf_reset_local() {\n\tacf_get_local_store( 'fields' )->reset();\n\tacf_get_local_store( 'groups' )->reset();\n}", "protected function clearFields(){\n $this->fields = array();\n }", "public static function reset()\n\t{\n\t\tstatic::$field_data = array();\n\t\tstatic::$rules = array();\n\t\tstatic::$messages = array();\n\t\tstatic::$validation = false;\n\t\tstatic::$custom_validators_loaded = null;\n\t}", "public function reset(){\n $this->fieldsState= array();\n }", "public function resetCustomAttributes() {\n $this->custom_attr = array();\n }", "public function resetFieldsArray()\n\t\t\t{\n\t\t\t\t$this->setFormField('cname', '');\n\t\t\t\t$this->setFormField('act', '');\n\t\t\t}", "protected function _reset()\n {\n $this->fields = array();\n $this->keys = array();\n $this->primary_keys = array();\n }", "public function reset() {\n\t\t\tforeach ($this->fields as $key => $vals) {\n\t\t\t\t$this->$vals[0] = array(NULL, NULL, true);\n\t\t\t}\n\t\t\t$this->clearErrors();\n\t\t\t$this->clearErrorFields();\n\t\t}", "function clear_field_values()\n\t{\n\t\t$fields = $this->field_names_as_array();\n\t\tforeach($fields as $key)\n\t\t\t$this->$key = null;\t\t\n\t\t\t\n\t\t$this->clear_model_errors();\n\t}", "public function clear(){\n $this->fields = [];\n }", "public function reset()\n {\n $this->values[self::contractor_list] = array();\n $this->values[self::store_type_list] = array();\n $this->values[self::store_level_list] = array();\n $this->values[self::customer_type_list] = array();\n }", "function Reset()\n\t{\n\t\tforeach($this->input_list as $input)\n\t\t\t$input->data = $input->data_default;\n\t}", "function custom_override_checkout_fields( $fields ) {\nunset($fields['billing']['billing_first_name']);\nunset($fields['billing']['billing_last_name']);\nunset($fields['billing']['billing_company']);\nunset($fields['billing']['billing_address_1']);\nunset($fields['billing']['billing_address_2']);\nunset($fields['billing']['billing_city']);\nunset($fields['billing']['billing_postcode']);\nunset($fields['billing']['billing_country']);\nunset($fields['billing']['billing_state']);\nunset($fields['billing']['billing_phone']);\nunset($fields['order']['order_comments']);\nunset($fields['billing']['billing_email']);\nunset($fields['account']['account_username']);\nunset($fields['account']['account_password']);\nunset($fields['account']['account_password-2']);\nreturn $fields;\n}", "public function reset() {\n\t\t$this->setProperties(CsvimprovedModelAvailablefields::DbFields('users'));\n\t}", "public function clearFields()\n\t{\n\t\t$this->fields->clearItems();\n\t}", "public function resetFields()\n {\n $this->publish = '';\n $this->name = '';\n $this->url = '';\n $this->event_time = '';\n $this->description = '';\n }", "public function reset() {\n\t\t// Get the default values for the class from the table.\n\t\tforeach ($this->getFields() as $k => $v) {\n\t\t\t// If the property is not private, reset it.\n\t\t\tif (strpos($k, '_') !== 0) {\n\t\t\t\t$this->$k = NULL;\n\t\t\t}\n\t\t}\n\t}", "public function reset() {\n\t\t// Get the default values for the class from the table.\n\t\tforeach ($this->getFields() as $k => $v) {\n\t\t\t// If the property is not private, reset it.\n\t\t\tif (strpos($k, '_') !== 0) {\n\t\t\t\t$this->$k = NULL;\n\t\t\t}\n\t\t}\n\t}", "public function reset()\n {\n $this->values[self::customer_id] = null;\n $this->values[self::auth_token] = null;\n $this->values[self::items] = array();\n }", "public function resetListCache();", "function custom_override_checkout_fields( $fields ) {\r\n unset($fields['billing']['billing_company']);\r\n unset($fields['billing']['billing_address_2']);\r\n unset($fields['billing']['billing_country']);\r\n unset($fields['billing']['billing_state']);\r\n return $fields;\r\n }", "public function reset()\n\t{\n\t\t$this->properties = array();\n\t}", "protected function resetObjects()\n {\n $skip = [\n 'requestMethods',\n 'baseUrl',\n 'defaultHeaders',\n 'prefix',\n 'client'\n ];\n\n foreach ($this as $key => $value) {\n if (!in_array($key, $skip)) {\n if (is_string($this->$key)) {\n $this->$key = '';\n }\n\n if (is_array($this->$key)) {\n $this->$key = [];\n }\n }\n }\n }", "function _resetDummyFieldList()\n\t\t{\n\t\t$this->_dummyFieldList \t= null;\n\t\t$lConf\t\t\t\t\t= $this->conf['typodbfield.'];\n\t\t$aDummyFields\t\t\t= null;\n\t\t\n\t\t// For keeping thing more clean - bccms-subplugins makes its settings one level deeper\n\t\t// Example-Normal Plugins: plugin.tx_mmbccms_pi1.typodbfield\n\t\t// Example BCCMS SubPlugin: plugin.tx_mmbccms_pi1.news.typodbfield\n\t\tif(!isset($lConf) && isset($this->internal['bccms_plugin_name'])) {\n\t\t\t$lConf = $this->conf[$this->internal['bccms_plugin_name'] .'.']['typodbfield.'];\n\t\t}\n\n\t\t// Collects all the fields from the typodbfield array, removes the . (dot) and adds it to the dummyField Array\n\t\t$aTempDummyFields = array_keys($lConf);\n\t\t//t3lib_div::debug($lConf,'$lConf');\n\t\t\t\t\n\t\tforeach($aTempDummyFields as $key) {\n\t\t\tif($key == 'dummyfieldlist') continue;\n\t\t\t$aDummyFields[] = trim(str_replace('.','',$key));\n\t\t}\t\t\n\t\t// Old Version - dummyfieldlist array becomes obsolete\n\t\t//$aDummyFields = isset($lConf['dummyfieldlist']) ? explode(',',$lConf['dummyfieldlist']) : null;\n\t\t\n\t\tif($aDummyFields != null)\n\t\t\t{\n\t\t\tforeach($aDummyFields as $fieldname)\n\t\t\t\t{\n\t\t\t\t$value = '';\n\t\t\t\tif(isset($lConf[$fieldname . '.']['value'])) $value = $lConf[$fieldname . '.']['value'];\n\t\t\t\t/*\n\t\t\t\tif(!isset($this->conf['typodbfield'][$fieldname]['fieldtype'])\n\t\t\t\t\t{\n\t\t\t\t\t$this->conf['typodbfield'][$fieldname]['fieldtype'] = 'stdwrap';\n\t\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t$this->_dummyFieldList[$fieldname] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function reset()\n {\n $this->values[self::items] = array();\n $this->values[self::pagination] = null;\n }", "protected function clearFields()\n {\n // Void all the fields\n foreach (array_keys($this->data) as $fieldName) {\n /** @var FieldCollection $field */\n $field = $this->data[$fieldName];\n\n $field->clear();\n $field->syncOriginal();\n }\n }", "public function reset()\n {\n $this->values[self::items] = array();\n $this->values[self::wholesaler_ids] = array();\n $this->values[self::store_id] = null;\n $this->values[self::type] = null;\n $this->values[self::activity_id] = null;\n $this->values[self::user_id] = null;\n }", "private function resetInputFields(){\n $this->feature_title = '';\n $this->status = '';\n $this->unit_price = '';\n $this->service_id = '';\n }", "private function resetInputFields(){\n $this->country = '';\n $this->code = '';\n $this->url = '';\n $this->default = false;\n $this->include = false;\n $this->latinoamerica = false;\n }", "public function resetFields()\n {\n $this->title = '';\n $this->description = '';\n $this->image = '';\n }", "private function resetInputFields(){\n $this->id = '';\n $this->code = '';\n $this->name = '';\n $this->salaryDollar = '';\n $this->salaryDollar = '';\n $this->salaryMx = '';\n $this->address = '';\n $this->state = '';\n $this->city = '';\n $this->telephone = '';\n $this->email = '';\n $this->active = '';\n }", "public function reset()\n {\n $this->values[self::FIELD] = null;\n $this->values[self::PRIORVALUE] = null;\n $this->values[self::VALUE] = null;\n $this->values[self::EFFECTIVEDATE] = null;\n $this->values[self::STATUS] = null;\n $this->values[self::USERNAME] = null;\n $this->values[self::DELEGATEDUSER] = null;\n }", "public function resetAll() {\r\n $this->_global_title_uuid = '';\n $this->_first_name = '';\n $this->_last_name = '';\n $this->_preferred_global_language_uuid = '';\n $this->_username = '';\r\n }", "public function reset()\n {\n $this->values[self::customer_id] = null;\n $this->values[self::auth_token] = null;\n $this->values[self::app_ver] = null;\n $this->values[self::items] = array();\n $this->values[self::payment_method] = null;\n $this->values[self::address] = null;\n $this->values[self::comment] = null;\n $this->values[self::balance] = null;\n $this->values[self::coupon_id] = null;\n }", "public static function reset() {\n\t\tglobal $woocommerce;\n\n\t\tforeach ( self::get_recurring_totals_fields() as $field => $default_value ) {\n\t\t\t$woocommerce->cart->{$field} = $default_value;\n\t\t\tunset( $woocommerce->session->$field );\n\t\t}\n\n\t}", "public function reset()\n {\n $this->values[self::order_ids] = array();\n $this->values[self::fuzzy_increment_id] = null;\n $this->values[self::wholesaler_id] = array();\n }", "private function resetInputFields(){\n $this->umkm = '';\n $this->title = '';\n $this->desc = '';\n $this->image = null;\n }", "private function resetInputFields(){\n $this->name = '';\n $this->$barcode = '';\n $this->$brand = '';\n $this->$price = '';\n $this->image = null;\n $this->$image_url = '';\n }", "public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::TYPE] = self::$fields[self::TYPE]['default'];\n $this->values[self::MEDIA_QUERY_SPEC] = null;\n }", "public function reset() {\n\t\t$this->setProperties(CsvimprovedModelAvailablefields::DbFields('vm_shopper_vendor_xref'));\n\t}", "public static function reset()\n {\n static::$_processedFields = false;\n static::$_processedSites = false;\n static::$_processedUserGroups = false;\n }", "private function resetInputFields()\n {\n $this->name = '';\n $this->description = '';\n $this->excelFile = '';\n }", "public function resetFields(): static\n {\n $this->fields = [];\n return $this;\n }", "function acf_reset_local() {}", "public function reset()\n {\n $this->values[self::TAGS] = array();\n $this->values[self::ATTR_LISTS] = array();\n $this->values[self::MIN_VALIDATOR_REVISION_REQUIRED] = null;\n $this->values[self::SPEC_FILE_REVISION] = self::$fields[self::SPEC_FILE_REVISION]['default'];\n $this->values[self::TEMPLATE_SPEC_URL] = null;\n $this->values[self::STYLES_SPEC_URL] = null;\n $this->values[self::SCRIPT_SPEC_URL] = null;\n $this->values[self::ERROR_FORMATS] = array();\n $this->values[self::ERROR_SPECIFICITY] = array();\n $this->values[self::DESCENDANT_TAG_LIST] = array();\n $this->values[self::CSS_LENGTH_SPEC] = array();\n }", "function custom_override_checkout_fields( $fields ) {\n $fields['billing']['billing_first_name']['placeholder'] = 'First Name*';\n\t$fields['billing']['billing_last_name']['placeholder'] = 'Last Name*';\n $fields['billing']['billing_company']['placeholder'] = 'Company Name';\n $fields['billing']['billing_email']['placeholder'] = 'Email Address';\n $fields['billing']['billing_country']['placeholder'] = 'Country';\n $fields['billing']['billing_city']['placeholder'] = 'Town / City *';\n unset($fields['billing']['billing_phone']);\n unset($fields['billing']['billing_state']);\n unset($fields['billing']['billing_postcode']);\n\n //this loop remove all the label at once\n foreach ($fields as $category => $value) {\n // loop by fields\n foreach ($fields[$category] as $field => $property) {\n // remove label property\n unset($fields[$category][$field]['label']);\n }\n }\n return $fields;\n}", "function custom_override_checkout_fields( $fields ) {\n unset($fields['billing']['billing_company']);\n unset($fields['shipping']['shipping_company']);\n\n return $fields;\n}", "protected function resetProperties() {}", "public function reset()\n {\n $this->values[self::ATTR] = array();\n $this->values[self::TEMPLATE_ID] = null;\n }", "private function reset()\n {\n $this->items = []; //reset in case of duplicate call\n $this->count = null;\n $this->perPage = null;\n $this->page = null;\n }", "public static function reset(): void\n {\n if (array_key_exists(static::class, self::$meta)) {\n unset(self::$meta[static::class]);\n }\n }", "function acf_flush_field_cache($field)\n{\n}", "public function resetValues()\r\n {\r\n foreach ($this->obj_to_db_trans as $obj_prop => $db_field) {\r\n $this->{$obj_prop}=null;\r\n }\r\n }", "function reset()\n\t{\n\t\t$this->data = static::$defaults;\n\t\t$this->data[static::$pk] = null;\n\t}", "private function resetInputFields()\n {\n $this->nome = '';\n $this->descricao = '';\n $this->categoria_id = '';\n }", "public function reset()\n {\n $this->values[self::title] = null;\n $this->values[self::products] = array();\n $this->values[self::subtitle] = null;\n $this->values[self::desc] = null;\n $this->values[self::url] = null;\n $this->values[self::sort] = null;\n $this->values[self::product_block_title_img] = null;\n }", "public function reset()\n {\n $this->values[self::wholesaler_id] = null;\n $this->values[self::product_list] = array();\n }", "public static function reset()\n {\n static::$_registered = [];\n }", "public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::NUMBER] = null;\n $this->values[self::DATE] = null;\n $this->values[self::INFO] = null;\n }", "public function reset()\n\t{\n\t\t// Import meta data\n\t\t$meta = static::meta($this);\n\n\t\t// Get a list of all fields\n\t\t$fields = array_keys($meta->fields);\n\n\t\tforeach ($fields as $name)\n\t\t{\n\t\t\t// Reset the field to the default value\n\t\t\t$this->__unset($name);\n\t\t}\n\n\t\t// Reset the model state\n\t\t$this\n\t\t\t->prepared(FALSE)\n\t\t\t->loading(FALSE)\n\t\t\t->loaded(FALSE)\n\t\t\t;\n\n\t\treturn $this;\n\t}", "function acf_reset_meta($post_id = 0) {}", "function reset() {\n $this->fields = array();\n $this->response = array();\n $this->errors = array();\n }", "protected function refresh()\n {\n $this->data = [];\n $this->fields->clear();\n }", "private function resetInputFields(){\n $this->name = '';\n $this->email = '';\n $this->password = '';\n $this->user_level = '';\n $this->user_id = '';\n }", "public function reset()\n {\n $this->values[self::promotion] = null;\n $this->values[self::list] = array();\n }", "public function reset()\n {\n $this->values[self::KPP] = null;\n $this->values[self::FULLNAME] = null;\n $this->values[self::ADDRESS] = null;\n }", "public function reset()\n {\n $this->values[self::TAG_SPEC_NAME] = null;\n $this->values[self::MANDATORY] = null;\n $this->values[self::UNIQUE] = null;\n }", "function reset()\r\r\n\t{\r\r\n\t\t$k = $this->_tbl_key;\r\r\n\t\tforeach ($this->getProperties() as $name => $value)\r\r\n\t\t{\r\r\n\t\t\tif($name != $k)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->$name\t= $value;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t}", "public function reset() {\r\n\t\t/* Loop through all the properties */\r\n\t\tforeach ($this->propertyValues as &$property) {\r\n\t\t\t$property['Changed'] = false;\r\n\t\t}\r\n\t}", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::INDEX] = null;\n $this->values[self::GUID] = null;\n $this->values[self::ISACTIVE] = null;\n $this->values[self::BALANCE] = null;\n $this->values[self::PICTURE] = null;\n $this->values[self::AGE] = null;\n $this->values[self::EYECOLOR] = null;\n $this->values[self::NAME] = null;\n $this->values[self::GENDER] = null;\n $this->values[self::COMPANY] = null;\n $this->values[self::EMAIL] = null;\n $this->values[self::PHONE] = null;\n $this->values[self::ADDRESS] = null;\n $this->values[self::ABOUT] = null;\n $this->values[self::REGISTERED] = null;\n $this->values[self::LATITUDE] = null;\n $this->values[self::LONGITUDE] = null;\n $this->values[self::TAGS] = array();\n $this->values[self::FRIENDS] = array();\n $this->values[self::GREETING] = null;\n $this->values[self::FAVORITEFRUIT] = null;\n }", "public function reset()\n {\n $this->values[self::category] = null;\n $this->values[self::store_list] = array();\n }", "public function resetFields()\n {\n $this->nama = '';\n $this->nik = '';\n $this->nohp = '';\n \n }", "protected static function clear_cache(){\n\t\tself::$index = array();\n\t\tself::$registry_cache = array();\n\t\tself::$stored_forms = array();\n\t\twp_cache_delete( '_caldera_forms_forms', 'options' );\n\t\tdelete_transient( self::$registry_cache_key );\n\t}", "public function reset() {\n $this->data['id'] = \"\";\n $this->data['class'] = [];\n $this->data['data'] = [];\n $this->data['attributes'] = [];\n $this->data['event'] = [];\n $this->disabled = false;\n }", "private function resetInputFields()\n {\n $this->titulo = '';\n $this->texto = '';\n $this->categoria_id = '';\n }", "private function resetAll() { $this->name = null; }", "public function reset() {\n $this->values[self::CODE] = null;\n $this->values[self::GEO] = null;\n $this->values[self::LEVEL] = null;\n $this->values[self::NAME] = null;\n $this->values[self::SUP_SUBWAY] = null;\n $this->values[self::SUP_LUKUANG] = null;\n $this->values[self::UID] = null;\n $this->values[self::SGEO] = array();\n }", "private function clearFields()\n {\n $this->path = null;\n $this->model = null;\n $this->language = null;\n $this->selectClasses = null;\n $this->localId = null;\n }", "public function maybe_clear_fields_cache() {\n\n\t\t// If the clear_field_cache parameter isn't set, exit.\n\t\tif ( 'true' !== rgget( 'clear_field_cache' )) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clear the cache.\n\t\tdelete_transient( $this->fields_transient_name );\n\n\t\t// Add success message.\n\t\tGFCommon::add_message( esc_html__( 'Custom fields cache has been cleared.', 'gravityformszohocrm' ) );\n\n\t}", "public function reset()\n {\n $this->values[self::ID] = null;\n $this->values[self::TYPE] = null;\n $this->values[self::MAPID] = null;\n $this->values[self::CARDGROUP] = null;\n $this->values[self::FRIENDS] = array();\n $this->values[self::ROOM] = null;\n $this->values[self::INVITE] = null;\n }", "public function reset() {\n\t\t$class_vars = get_class_vars(get_class($this));\n\t\tforeach ($class_vars as $name => $value) {\n\t\t\tif (substr($name, 0, 1) != '_') $this->$name = $value;\n\t\t}\n\t}", "public function reset() {\n\t\t$class_vars = get_class_vars(get_class($this));\n\t\tforeach ($class_vars as $name => $value) {\n\t\t\tif (substr($name, 0, 1) != '_') $this->$name = $value;\n\t\t}\n\t}", "public function reset() {\n\t\t$this->setProperties(CsvimprovedModelAvailablefields::DbFields('vm_tax_rate'));\n\t}", "function ResetAttrs() {\r\n\t\t$this->CssClass = \"\";\r\n\t\t$this->CssStyle = \"\";\r\n \t$this->RowAttrs = array();\r\n\t\tforeach ($this->fields as $fld) {\r\n\t\t\t$fld->ResetAttrs();\r\n\t\t}\r\n\t}", "protected function _reset() {\r\n $this->length = 0;\r\n $this->models = array();\r\n $this->_byId = array();\r\n $this->_byCid = array();\r\n }", "public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::MANDATORY] = null;\n $this->values[self::VALUE] = null;\n $this->values[self::VALUE_DOUBLE] = null;\n }", "protected function reset()\n {\n foreach ($this->defaultAttributes as $attr => $value) {\n $this->$attr = $value;\n }\n }", "public function reset()\n {\n $this->values[self::REMOVES] = array();\n $this->values[self::UPDATES] = array();\n }", "public function reset()\n {\n $this->values[self::activity] = null;\n $this->values[self::pintuan] = null;\n $this->values[self::product_picture] = array();\n $this->values[self::product_name] = null;\n }", "public function reset()\n {\n $this->values[self::unread_list] = array();\n $this->values[self::unread_count] = null;\n }", "private function resetInputFields()\n {\n $this->nome = '';\n $this->endereco = '';\n $this->data_nasc = '';\n $this->pessoa_id = '';\n $this->contatos = [['nome' => '', 'valor' => '']];\n\n }", "public static function reset_cache()\n\t\t{\n\t\t\tself::$tax_class_cache = array();\n\t\t\tself::$_customer_context = null;\n\t\t\tself::$_tax_exempt = false;\n\t\t\tself::$shipping_tax_class = null;\n\t\t}", "protected function resetFields()\n {\n $this->get_uid = null;\n $this->fields = array();\n $this->values = array();\n foreach ($this::$entity_spec[$this::$__table]['fields'] as $field => $type) {\n $this->values[$field] = clone $type;\n if ($type instanceof RexDBType) {\n $this->fields[] = $field;\n } elseif ($type instanceof RexDBArray) {\n $this->values[$field]->setParent($this);\n }\n }\n return $this;\n }", "public function clean_all()\n\t{\n\t\t$this->_list = [];\n\t}", "function clear()\n {\n $this->datafields = array();\n $this->keyvalue = false;\n $this->idvalue = false;\n }", "public function reset()\n {\n $this->values[self::ENTRIES] = array();\n }", "public function resetProperties()\n {\n $this->properties->reset();\n\t}", "final public function resetState(): void\n {\n $fields = \\array_keys($this->initialState);\n\n foreach ($fields as $field) {\n if ($this->{$field} instanceof AbstractValueObject && \\method_exists($this->{$field}, 'resetState')) {\n $this->{$field}->resetState();\n }\n }\n\n $this->initialState = $this->toArray();\n }", "private function resetInputFields()\n {\n $this->client->title = '';\n $this->client->logo = '';\n $this->client->website = '';\n }" ]
[ "0.71905494", "0.7060534", "0.7039433", "0.688733", "0.6845265", "0.6791716", "0.67884797", "0.66991884", "0.66739047", "0.6673888", "0.6651193", "0.6647744", "0.6602937", "0.659861", "0.65890074", "0.65760696", "0.65711063", "0.6569374", "0.6569374", "0.6556151", "0.65500104", "0.6548937", "0.6539111", "0.65339917", "0.65280896", "0.65161675", "0.6486733", "0.64799255", "0.6462487", "0.6439822", "0.64395803", "0.6431489", "0.6426104", "0.641813", "0.6417702", "0.6414196", "0.64133555", "0.6410852", "0.64098644", "0.64028853", "0.6392391", "0.63826424", "0.63822174", "0.6381829", "0.63774896", "0.63634175", "0.634943", "0.6348695", "0.6348085", "0.6342301", "0.63322234", "0.6319989", "0.6315989", "0.6314945", "0.6313589", "0.6303182", "0.6288222", "0.628337", "0.6281362", "0.6272827", "0.62708795", "0.6268146", "0.62529594", "0.624852", "0.62428916", "0.6240711", "0.6238967", "0.6237937", "0.62372434", "0.6236206", "0.6232462", "0.62222123", "0.6216229", "0.6207725", "0.62063444", "0.6187691", "0.6184614", "0.6170733", "0.6156856", "0.6155004", "0.615449", "0.6146742", "0.6146742", "0.6139551", "0.61341023", "0.613378", "0.6123198", "0.61058515", "0.6104321", "0.6103733", "0.6095626", "0.6091818", "0.60893416", "0.60794735", "0.6072995", "0.60688925", "0.60660255", "0.60647815", "0.60544425", "0.6053528" ]
0.8102273
0