query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Set the application locale to $code.
public function setLanguage($code) { Session::set('locale', $code); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCode($code) {\n\t\tif (empty ($code)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->code != $code) {\n\t\t\t$this->messages= null;\n\t\t\t/*\n\t\t\t\t\t\tif (isset ($this->Session)) {\n\t\t\t\t\t\t\t$this->Session->write('Lang.Code', $code);\n\t\t\t\t\t\t}\n\t\t\t*/\n\t\t\t$this->code= $code;\n\t\t\t$this->controller->set('Lang_Code', $code);\n\t\t\tif (function_exists('setlocale')) {\n\t\t\t\tsetlocale(LC_COLLATE | LC_CTYPE | LC_TIME, $this->getLanguageFromTld($code));\n\t\t\t}\n\t\t}\n\t}", "public function setCode($code)\n {\n // set the code\n $this->_code = $code;\n \n // reset the strings\n $this->trans = array();\n }", "public function setLanguage($code)\n {\n $this->lang = $code;\n }", "public function setLanguage($code) {\n\t\tif(preg_match('/^[a-z]{2,3}\\_[A-Z]{2,3}$/',$code)){\n\t\t\t$this->languageCode = $code;\n\t\t} else {\n\t\t\t///TODO:APC: Why does this not throw an I18nException?\n\t\t\tthrow new \\nano\\core\\exception\\CoreException('Could not set language from code \\''.$code.'\\'');\n\t\t}\n\t}", "function setLocale($locale);", "public function settingLocale() {}", "public function setLocale()\n\t{\n\t\tif ($locale = $this->app->session->get('admin_locale'))\n\t\t{\n\t\t\t$this->app->setLocale($locale);\n\t\t} else {\n \\Session::put('admin_locale', \\Config::get('app.locale'));\n }\n\t}", "function setLocale($key) {\n\t\t\t$this->locale = $key;\n\t\t}", "public static function updateLocale($lang_code){\n $lang = Config::get('app.locale');\n if(isset($lang_code)){\n $lang = $lang_code;\n }\n App::setLocale($lang);\n }", "private function setLanguageCode( $code ) {\n\t\t$ttsService = TTSServiceFactory::build( $this->config );\n\t\tif ( !$ttsService->isValidLangCode( $code ) ) {\n\t\t\tthrow new LanguageException(\n\t\t\t\t'The language code ' . $code .\n\t\t\t\t' can not be handled by the currently configured TTS service.' );\n\t\t}\n\n\t\t$this->languagCode = $code;\n\t}", "public function setLocale($val)\n {\n $this->locale = $val;\n }", "public function setLocale($locale);", "function setAmocrmCode(string $code): void {\n\t}", "public function setCode($value)\n {\n $this->set(self::ENTRY_CODE, (string) $value);\n }", "public function setCode($code, $message);", "public function setCode($code)\n {\n $this->code = $code;\n }", "public function setLocale($locale = null);", "abstract public function getLocaleCode();", "public function setCode($code)\n\t{\n\t\t$this->code = (int) $code;\n\t}", "public function setCode($code);", "public function setCode($code);", "function set_language($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t}", "public function setLocale($locale)\n {\n //\n }", "function setLocale($locale) {\n\t\t$this->locale = $locale;\n\t}", "public function getLocaleCode() {\n if (!isset($this->_localeCode)) {\n $this->_localeCode = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);\n }\n return $this->_localeCode;\n }", "public function __construct()\n {\n $this->setCode(SolarLite_Config::get('locale', 'en_US'));\n }", "private function set_locale() {\n\n\t\t$plugin_i18n = new Soisy_Pagamento_Rateale_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\t}", "public function setGlobalCurrencyCode($code);", "function set_locale($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t\treturn $this->i18n_locale;\n\t\t}", "public static function setLocale($locale){\n \\Illuminate\\Foundation\\Application::setLocale($locale);\n }", "function switch_to_locale($locale)\n {\n }", "private function set_locale() {\n\n\t\t$plugin_i18n = new APS_I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "public static function setLocale($app, $locale)\n {\n if ($locale != $app['locale']) {\n $app['config']->set('general/locale', $locale);\n $app['locale'] = $locale;\n\n $app->initLocale();\n \n // Reset translator\n $app['translator'] = new Translator($locale, new MessageSelector());\n $app['translator']->setFallbackLocales($app['locale_fallbacks']);\n foreach ($app['translator.loaders'] as $str => $loader) {\n $app['translator']->addLoader($str, $loader);\n }\n $resources = \\Bolt\\Provider\\TranslationServiceProvider::addResources($app, $locale);\n foreach ($resources as $resource) {\n call_user_func_array(array($app['translator'], 'addResource'), $resource);\n }\n foreach ($app['locale_fallbacks'] as $fallback) {\n if ($fallback !== $locale) {\n $resources = \\Bolt\\Provider\\TranslationServiceProvider::addResources($app, $fallback);\n foreach ($resources as $resource) {\n call_user_func_array(array($app['translator'], 'addResource'), $resource);\n }\n }\n }\n } \n }", "public function setLocale($value)\n {\n return $this->setParameter('locale', $value);\n }", "public function setLocale($locale) {\n $availableLanguages = $this->languageSettings['available'];\n if (array_key_exists($locale, $availableLanguages)) {\n $locale_code = $locale;\n } else {\n $default = $this->languageSettings['default'];\n $locale_code = $default;\n }\n $session = new SessionManager();\n $session->putParameter('locale', $locale_code);\n }", "protected function _($code)\n {\n if (is_object($this->translator)) {\n return $this->translator->trans($code, [], 'FitbaseUserBundle');\n }\n\n return $code;\n }", "public function setLocale()\n {\n $lang = Request::segment(2);\n\n try {\n $this->language->set($lang);\n return Redirect::back();\n } catch (Exception $e) {\n //show error\n }\n }", "public function setCurrentLocale($currentLocale);", "public static function setNextLocale($locale) {\n $_SESSION['core\\locale'] = \\substr($locale, 0, 2);\n }", "private function set_locale() {\n\n\t\t$plugin_i18n = new I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "private function set_locale() {\n\n if (function_exists('determine_locale')) {\n $locale = determine_locale();\n } else {\n // @todo Remove when start supporting WP 5.0 or later.\n $locale = is_admin() ? get_user_locale() : get_locale();\n }\n $locale = apply_filters('plugin_locale', $locale, 'careerfy-frame');\n \n unload_textdomain('careerfy-frame');\n load_textdomain('careerfy-frame', WP_LANG_DIR . '/plugins/careerfy-frame-' . $locale . '.mo');\n load_plugin_textdomain('careerfy-frame', false, dirname(dirname(plugin_basename(__FILE__))) . '/languages');\n }", "function setLocale($locale) {\n\t\treturn $this->setData('locale', $locale);\n\t}", "private function setLocale() {\n if ($this->_language == 'french')\n setlocale (LC_ALL, 'fr_FR.iso88591', 'fr_FR@euro', 'fr_FR', 'french', 'fra');\n else if ($this->_language == 'english')\n setlocale (LC_ALL, 'en_GB.iso88591', 'en_GB', 'english', 'eng');\n }", "private function setLocale($locale)\n {\n // Check if is allowed and set default locale if not\n if (!\\Language::allowed($locale)) {\n $locale = config('app.locale');\n }\n\n // Set app language\n \\App::setLocale($locale);\n\n // Set carbon language\n if (config('language.carbon')) {\n // Carbon uses only language code\n if (config('language.mode.code') == 'long') {\n $locale = explode('-', $locale)[0];\n }\n\n Carbon::setLocale($locale);\n }\n }", "public function setCode($code)\n {\n $this->code = $this->getApiErrorCode($code);\n }", "public function setLocale(MvcEvent $e) {\n $translator = $e->getApplication()->getServiceManager()->get('translator');\n $translator->setLocale('ru_RU');\n \n }", "public function setCode($code)\n {\n $this->code = (int) $code;\n\n return $this->mergeData([static::codeKey() => $this->code]);\n }", "function setLocale($localename)\r\n\t{\r\n\t\t$this->pathLocale = $localename;\r\n\t\t$f = $this->_getFileName();\r\n\t\t/* load language configuration */\r\n\t\tif (file_exists($f))\r\n\t\t{\r\n\t\t\tglobal $tmp;\r\n\t\t\tinclude($f);\r\n\t\t\tif ($this->varMode == 'names')\r\n\t\t\t{\r\n#\t\t\t\t$this->lang = array_merge($this->lang, ${$this->varName});\r\n\t\t\t\t$this->lang = ${$this->varName};\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function setCurrentLocale($locale) {\n if (!$locale instanceof Locale) {\n $locale = $this->getLocale($locale);\n }\n\n $code = $locale->getProperty('full', $locale->getCode());\n\n setlocale(LC_COLLATE, $code);\n setlocale(LC_CTYPE, $code);\n setlocale(LC_MONETARY, $code);\n setlocale(LC_TIME, $code);\n\n $this->locale = $locale->getCode();\n }", "public function __construct()\n {\n app()->setLocale('arm');\n }", "function restore_current_locale()\n {\n }", "function us_wpml_tr_switch_language ( $language_code = NULL ) {\r\n\t\tdo_action( 'wpml_switch_language', $language_code );\r\n\t}", "public function locale();", "public function setLocaleCode($localeCode)\n {\n $this->LocaleCode = $localeCode;\n return $this;\n }", "public function setLocale ($locale) {\n\t\t$this->locale = $locale;\n\t}", "private function set_locale()\n {\n\n $plugin_i18n = new myFOSSIL_Resources_i18n();\n $plugin_i18n->set_domain( $this->get_plugin_name() );\n\n $this->loader->add_action( 'plugins_loaded', $plugin_i18n,\n 'load_plugin_textdomain' );\n\n }", "public function actionSetLocale($locale = 'en_us')\n {\n //Set cookies\n $localeCookie = new CHttpCookie('Locale', $locale);\n $localeCookie->expire = time() + 15 * 24 * 3600;\n Yii::app()->request->cookies['Locale'] = $localeCookie;\n\n //Set application langauge\n Yii::app()->setLanguage($locale);\n }", "private function set_locale() {\n\n\t\t$plugin_i18n = new Service_Tracker_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "public function setCode($Code)\n {\n $this->__set(\"code\", $Code);\n }", "function format_code_lang($code = '')\n {\n }", "public function restore_current_locale()\n {\n }", "public function setLanguage(?LocaleInfo $value): void {\n $this->getBackingStore()->set('language', $value);\n }", "public function setLangcode($langcode) {\n }", "private function maybe_set_locale( $initial_language_code ) {\n\t\t$q = \"SELECT code FROM {$this->wpdb->prefix}icl_locale_map WHERE code=%s\";\n\t\t$q_prepared = $this->wpdb->prepare( $q, $initial_language_code );\n\t\tif ( ! $this->wpdb->get_var( $q_prepared ) ) {\n\t\t\t$q = \"SELECT default_locale FROM {$this->wpdb->prefix}icl_languages WHERE code=%s\";\n\t\t\t$q_prepared = $this->wpdb->prepare( $q, $initial_language_code );\n\t\t\t$default_locale = $this->wpdb->get_var( $q_prepared );\n\t\t\tif ( $default_locale ) {\n\t\t\t\t$this->wpdb->insert(\n\t\t\t\t\t$this->wpdb->prefix . 'icl_locale_map',\n\t\t\t\t\tarray( 'code' => $initial_language_code, 'locale' => $default_locale )\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\t}", "public function settingLanguage() {}", "public function setLocale($locale) {\n\t\t$this->_locale = $locale;\n\t}", "public function switchLanguageAction($code){\n\n //save lang in cookie\n setcookie(\"lang\", $code, time()+31536000, \"/\", \".\".\\Config\\Config::DOMAIN, false);\n\n if (!empty($_GET['redirectTo'])){\n Router::redirect( urldecode($_GET['redirectTo']) );\n }\n Router::redirect( Router::url(\"home\") );\n }", "public function locale(string $locale = null);", "public function setLocale($locale) {\n $this->locale = $locale;\n }", "public function changeLocale($current_route){\n\t\tif(strlen($current_route) <= 2){\n\t\t\t$CountryLanguage = CountryLanguage::where('wp_language', $current_route)->first();\n\t\t\tif(isset($CountryLanguage) && !empty($CountryLanguage->language_code)){\n\t\t\t\tConfig::set('app.locale', $CountryLanguage->language_code);\n\t\t\t}\n\t\t}\n\t}", "protected function setLocaleForMailer(): void\n {\n if (function_exists('switch_to_locale') && ($locale = $this->params->locale)) {\n \\switch_to_locale($locale);\n }\n }", "public function setCode($code) { $this->code = (int)$code; return $this; }", "function setLocale($args) {\n\t\t$setLocale = isset($args[0]) ? $args[0] : null;\n\t\t\n\t\t$site = &Request::getSite();\n\t\t$journal = &Request::getJournal();\n\t\tif ($journal != null) {\n\t\t\t$journalSupportedLocales = $journal->getSetting('supportedLocales');\n\t\t\tif (!is_array($journalSupportedLocales)) {\n\t\t\t\t$journalSupportedLocales = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Locale::isLocaleValid($setLocale) && (!isset($journalSupportedLocales) || in_array($setLocale, $journalSupportedLocales)) && in_array($setLocale, $site->getSupportedLocales())) {\n\t\t\t$session = &Request::getSession();\n\t\t\t$session->setSessionVar('currentLocale', $setLocale);\n\t\t}\n\t\t\n\t\tif(isset($_SERVER['HTTP_REFERER'])) {\n\t\t\tRequest::redirect($_SERVER['HTTP_REFERER']);\n\t\t}\n\t\t\n\t\t$source = Request::getUserVar('source');\n\t\tif (isset($source) && !empty($source)) {\n\t\t\tRequest::redirect(Request::getProtocol() . '://' . Request::getServerHost() . $source, false);\n\t\t}\n\t\t\n\t\tRequest::redirect('index');\t\t\n\t}", "public static function getLocale(string $code): string\n {\n if (Str::contains($code, '_')) {\n $tab = explode('_', $code);\n\n return Str::lower($tab[0]);\n } elseif (Str::contains($code, '-')) {\n $tab = explode('-', $code);\n\n return Str::lower($tab[0]);\n }\n\n return Str::lower($code);\n }", "function _setlocale($category, $locale)\r\n\t{\r\n\t\tglobal $CURRENTLOCALE, $EMULATEGETTEXT;\r\n\t\tif ($locale === 0) { // use === to differentiate between string \"0\"\r\n\t\t\tif ($CURRENTLOCALE != '')\r\n\t\t\t\treturn $CURRENTLOCALE;\r\n\t\t\telse\r\n\t\t\t// obey LANG variable, maybe extend to support all of LC_* vars\r\n\t\t\t// even if we tried to read locale without setting it first\r\n\t\t\t\treturn _setlocale($category, $CURRENTLOCALE);\r\n\t\t} else {\r\n\t\t\tif (function_exists('setlocale')) {\r\n\t\t\t\t$ret = setlocale($category, $locale);\r\n\t\t\t\tif (($locale == '' and !$ret) or // failed setting it by env\r\n\t\t\t\t\t($locale != '' and $ret != $locale)) { // failed setting it\r\n\t\t\t\t\t// Failed setting it according to environment.\r\n\t\t\t\t\t$CURRENTLOCALE = _get_default_locale($locale);\r\n\t\t\t\t\t$EMULATEGETTEXT = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$CURRENTLOCALE = $ret;\r\n\t\t\t\t\t$EMULATEGETTEXT = 0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// No function setlocale(), emulate it all.\r\n\t\t\t\t$CURRENTLOCALE = _get_default_locale($locale);\r\n\t\t\t\t$EMULATEGETTEXT = 1;\r\n\t\t\t}\r\n\t\t\t// Allow locale to be changed on the go for one translation domain.\r\n\t\t\tglobal $text_domains, $default_domain;\r\n\t\t\tif (array_key_exists($default_domain, $text_domains)) {\r\n\t\t\t\tunset($text_domains[$default_domain]->l10n);\r\n\t\t\t}\r\n\t\t\treturn $CURRENTLOCALE;\r\n\t\t}\r\n\t}", "public function setLocale(Locale $locale){\n\t\t$this->_locale = $locale;\n\t}", "public function setCode($code)\n {\n $this->data[1] = (string)$code;\n return $this->data[1];\n }", "protected function setLocale($value)\n {\n if ($value) {\n if ($this->_locales === ['*']) {\n return static::processLocale($value);\n }\n\n foreach ($this->_locales as $locale => $name) {\n $language = explode('_', $locale)[0];\n\n if (strcasecmp($locale, $value) === 0 || strcasecmp($value, $language) === 0) {\n return static::processLocale($locale);\n }\n }\n }\n\n return null;\n }", "public function setLanguage($l)\n {\n $this->setOption('language',$l);\n }", "public function __construct()\n\t{\n\t\t\\App::setLocale('en');\n\t}", "public function setLocale($locale)\n {\n $this['config']->set('app.locale', $locale);\n $this['translator']->setLocale($locale);\n }", "public function setPaypalLocalCode($args)\n {\n $lang = pll_current_language('locale');\n $args['locale.x'] = $lang;\n\n return $args;\n }", "public function setLocale($locale)\n {\n $previous = app('url')->previous();\n $next = str_replace(url('/'), '', $previous);\n $tmp = explode('/', $next);\n array_shift($tmp);\n array_shift($tmp);\n $next = $locale . '/' . implode('/', $tmp);\n\n return redirect($next);\n }", "public function setCodeAttribute($value)\n {\n $this->attributes['code']=mb_strtoupper($value);\n }", "protected function setLanguage() {\r\n\t\t$this->language = $GLOBALS['TSFE']->config['config']['language'];\r\n\t}", "public function setLocale($locale) {\n\n\t\t// Set the locale manually?\n\t\tif (isset($locale) && in_array($locale, $this->validLocales)) {\n\t\t\t$this->locale = $locale;\n\t\t\treturn;\n\t\t}\n\n\t\t// Is the locale explicitly set as a GET parameter?\n\t\tif (isset($_GET['locale']) && in_array($_GET['locale'], $this->validLocales)) {\n\t\t\t$this->locale = $_GET['locale'];\n\t\t\treturn;\n\t\t}\n\n\t\t// Get language from the browser settings and do a 302 redirect\n\t\tif (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n\t\t\t$httpLangs = array();\n\t\t\tforeach ($this->validLocales as $l) {\n\t\t\t\t$httpLangs[] = array('locale' => $l, 'pos' => stripos($_SERVER['HTTP_ACCEPT_LANGUAGE'], $l));\n\t\t\t}\n\t\t\tusort($httpLangs, 'Content::sortHttpLangs');\n\t\t\t$this->locale = $httpLangs[0]['locale'];\n\t\t\theader('Location: /'.$this->locale.$this->getNonLocalUrl(), true, 302);\n\t\t\texit;\n\t\t}\n\n\t\t// Set language to default\n\t\t// This is really just a fallback in case I made a mistake, actually it should never happen\n\t\t$this->locale = $this->validLocales[0];\n\t}", "private function processLocale(): void\n {\n if ($this->request->has(self::LOCALE) && null !== $this->request->get(self::LOCALE, null)) {\n $this->setLocale($this->request->get(self::LOCALE));\n }\n }", "public function setLocale($locale): void\n {\n $this['config']->set('app.locale', $locale);\n\n $this['translator']->setLocale($locale);\n }", "function setCurrencyCode($currencycode) {\n\t\tif (strlen($currencycode) == 3) {\n\t\t\t$this->currencycode = $currencycode;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid Currency Code\";\n\t\t}\n\t}", "function setCurrencyCode($currencycode) {\n\t\tif (strlen($currencycode) == 3) {\n\t\t\t$this->currencycode = $currencycode;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid Currency Code\";\n\t\t}\n\t}", "public function setLocale($locale)\n {\n $this['config']->set('app.locale', $locale);\n\n $this['translator']->setLocale($locale);\n\n $this['events']->dispatch(new LocaleUpdated($locale));\n }", "public function setCode(int $code)\n{\n self::$stored['codes'][] = $code;\n http_response_code($code);\n}", "public function setCode($value) {\n return $this->set(self::CODE, $value);\n }", "function set_idioma($code = 'es')\n\t{\n\t\tif ($code != '' && $code != $this->config->item('language'))\n\t\t{\n\t\t\t$this->config->set_item('language', $code);//CAMBIO EL IDIOMA DEL CONFIG\n\t\t}\n\t\t$this->session->set_userdata('idioma',$code); //adicional por hector en 30/10/2013 para sol y luna\n\t\t$this->session->set_userdata('id_idioma',$this->idioma_model->get_id($code));//AGREGADO POR HECTOR\n\t}", "public function setLocale($locale)\n\t {\n\t \t $this->json['params'][$this->account]['locale'] = $locale;\n\t \t \n\t \t return $this;\n\t }", "public function setCode(string $code)\n {\n $this->code = $code;\n\n return $this;\n }", "public function setStoreCurrencyCode($code);", "public function setCode($code)\r\n {\r\n $this->code = (int) $code;\r\n return $this;\r\n }", "private function set_locale()\n {\n $plugin_i18n = new MailChimp_WooCommerce_i18n();\n $this->loader->add_action('init', $plugin_i18n, 'load_plugin_textdomain');\n }", "private function setLocale()\n {\n $plugin_i18n = new I18n();\n $plugin_i18n->setDomain(Plugin_Name::PLUGIN_ID);\n\n add_action('plugins_loaded', [$plugin_i18n, 'loadPluginTextdomain']);\n }" ]
[ "0.7743295", "0.7004598", "0.6840955", "0.67920136", "0.67087084", "0.67026204", "0.6624256", "0.66186404", "0.65658313", "0.65107757", "0.64037657", "0.633905", "0.62691325", "0.60949105", "0.60895807", "0.6085595", "0.60812926", "0.60785675", "0.6048093", "0.60208327", "0.60208327", "0.6015774", "0.6015365", "0.59976304", "0.5974234", "0.59187406", "0.5905651", "0.5900761", "0.58860976", "0.58662033", "0.58641803", "0.5860165", "0.5836747", "0.58079666", "0.5806039", "0.5800953", "0.57630384", "0.57581836", "0.5751706", "0.574571", "0.5737843", "0.5715841", "0.57107276", "0.5710273", "0.56971264", "0.56688505", "0.56652915", "0.56613505", "0.56612164", "0.56588835", "0.5655939", "0.5654319", "0.56498086", "0.56463546", "0.56363624", "0.56303006", "0.5624948", "0.5623109", "0.5622043", "0.5615218", "0.561517", "0.5608709", "0.56068486", "0.5588652", "0.558793", "0.5587523", "0.55818015", "0.5536163", "0.552848", "0.55281335", "0.5511663", "0.5507382", "0.5505544", "0.5471408", "0.5453343", "0.54406726", "0.54355365", "0.5429455", "0.54058796", "0.5400598", "0.53942055", "0.53930163", "0.53906375", "0.5370846", "0.5356176", "0.5349436", "0.53465164", "0.534329", "0.5341985", "0.5341985", "0.53019625", "0.52906644", "0.5288683", "0.5266937", "0.52636635", "0.52549934", "0.52474064", "0.5239055", "0.52381766", "0.5219565" ]
0.7194498
1
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { MessagingAmqpService::declareSysQueues(); ExchangeService::bindAllExchanges(); MessagingAmqpService::listen( config('amqp.log_queue'), [ MessageService::class, 'consumeLog' ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Validate the RPC caller context.
public function getSettings($params, $context) { $this->validateMethodContext($context, ["role" => OMV_ROLE_ADMINISTRATOR]); // Get the configuration object. $db = \OMV\Config\Database::getInstance(); $object = $db->get("conf.service.webdesk"); // Remove useless properties from the object. $object->remove("links"); return $object->getAssoc(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateWebhookCall()\n {\n // If the webhook was called with an invalid method, throw an error\n if($_SERVER['REQUEST_METHOD'] != 'POST'){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_method',\n ]));\n }\n\n // If the webhook was called without any auth header, throw another error\n if (!isset($_SERVER['HTTP_AUTHORIZATION']) || empty($_SERVER['HTTP_AUTHORIZATION'])) {\n die(json_encode([\n 'success' => false,\n 'error' => 'no_auth_header',\n ]));\n }\n\n if($_SERVER['HTTP_AUTHORIZATION'] != Config::i()->getSXApiKey()){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_auth',\n ]));\n }\n }", "public function testCallReturnTrue()\n {\n $validator = new Rpc( 'SampleRpc' );\n $validator->setMethod( __FUNCTION__ );\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', array( 'context' ) ) ) )\n ->will( $this->returnValue( true ) );\n\n $this->assertTrue( $validator->isValid( 'value', array( 'context' ) ) );\n }", "public function validate(ValueContext $valueContext);", "public function validateRequest();", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "protected function _validate() {\n\t}", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function validateArguments() {}", "protected function isValidModuleRequest() {}", "public static function validate() {}", "public function isValid(Context $context)\n\t{\n\t\treturn true;\n\t}", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "protected function localValidation()\n\t\t{\n\t\t}", "protected function validateOrThrow() {}", "private function validateCall($call)\n {\n $result = null;\n $error = null;\n $data = null;\n $id = is_object($call) && property_exists($call, 'id') ? $call->id : null;\n do {\n if (!is_object($call)) {\n $error = self::InvalidRequest;\n break;\n }\n\n // hack for inputEx smd tester\n if (property_exists($call, 'version')) {\n if ($call->version == 'json-rpc-2.0') {\n $call->jsonrpc = '2.0';\n }\n }\n\n if (!property_exists($call, 'jsonrpc') || $call->jsonrpc != '2.0') {\n $error = self::InvalidRequest;\n break;\n }\n\n $fullMethod = property_exists($call, 'method') ? $call->method : '';\n $methodInfo = explode('.', $fullMethod, 2);\n $namespace = array_key_exists(1, $methodInfo) ? $methodInfo[0] : '';\n $method = $namespace ? $methodInfo[1] : $fullMethod;\n if (!$method || !array_key_exists($namespace, $this->instances) || !method_exists($this->instances[$namespace], $method) || in_array(strtolower($method), $this->hiddenMethods)) {\n $error = self::MethodNotFound;\n break;\n }\n\n if (!array_key_exists($fullMethod, $this->reflectionMethods)) {\n $this->reflectionMethods[$fullMethod] = new ReflectionMethod($this->instances[$namespace], $method);\n }\n\n /** @var $params array */\n $params = property_exists($call, 'params') ? $call->params : null;\n $paramsType = gettype($params);\n if ($params !== null && $paramsType != 'array' && $paramsType != 'object') {\n $error = self::InvalidParams;\n break;\n }\n\n // check parameters\n switch ($paramsType) {\n case 'array':\n $totalRequired = 0;\n // doesn't hold required, null, required sequence of params\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable()) {\n $totalRequired++;\n }\n }\n\n if (count($params) < $totalRequired) {\n $error = self::InvalidParams;\n $data = sprintf('Check numbers of required params (got %d, expected %d)', count($params), $totalRequired);\n }\n break;\n case 'object':\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable() && !array_key_exists($param->getName(), $params)) {\n $error = self::InvalidParams;\n $data = $param->getName() . ' not found';\n\n break 3;\n }\n }\n break;\n case 'NULL':\n if ($this->reflectionMethods[$fullMethod]->getNumberOfRequiredParameters() > 0) {\n $error = self::InvalidParams;\n $data = 'Empty required params';\n break 2;\n }\n break;\n }\n\n } while (false);\n\n if ($error) {\n $result = array($error, $id, $data);\n }\n\n return $result;\n }", "protected function validate()\n {\n }", "public function isValidRequest() {\n }", "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "protected function preValidate() {}", "public function testCallReturnErrorString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( __METHOD__ ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( __METHOD__, $validator->getMessages() );\n }", "public function validate()\n {\n $this->httpRequest->request;\n foreach (func_get_args() as $key) {\n $value = $this->parameters->get($key);\n if (! isset($value)) {\n throw new InvalidRequestException(\"The $key parameter is required\");\n }\n }\n }", "public function validateResolved()\n {\n $this->addRequestChecks();\n\n parent::validateResolved();\n }", "public function validateCallParameter() {\n if ($this->call_asset['parameter']) {\n // Validate parameters to a call.\n // Array, defining each parameter allowed in a call with the expected\n // data type of the value.\n $call_parameter = $this->call_parameter;\n // Parameters of the call request as seen in the request call.\n $call_request_parameter = $this->call_asset['parameter'];\n\n // Validate each parameter.\n foreach($call_request_parameter as $key => $value) {\n if (array_key_exists($key, $call_parameter)) {\n // Key in the request matches predefined parameter of the call.\n $is_valid = $this->matchDataType($value, $call_parameter[ $key ]);\n \n // Value should only match the enumerated value.\n if (is_array($call_parameter[ $key ])) {\n $call_parameter[ $key ] = 'one: ' . implode(',', $call_parameter[ $key ]) . ' - list';\n }\n\n if (!$is_valid) {\n // Data type mismatch.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' expects ' . $call_parameter[ $key ] . ' type.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n else {\n // Undefined parameter to this call.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' not expected for this call.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n }\n }", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "public function testCallReturnNull()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( null ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_NULL, $validator->getMessages() );\n }", "public function cli_validateArgs() {}", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function validateDev()\n {\n return parent::validate();\n }", "protected function validateEventContext(Event $event)\n {\n self::assertSame(\n $this->metadata[ RequestExecutorInterface::META_USER_CONTEXT ],\n $event->getContext(),\n 'Incorrect context'\n );\n }", "public function allowedContexts() {}", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function validated();", "public function doValidate(&$uri, $config, $context) {\n\t\treturn true;\n\t}", "public function validate()\n { \n try {\n $clientToken = $this->serviceGateway->clientToken()->generate([\n \"customerId\" => '123'\n ]);\n } catch (\\Braintree_Exception_Authentication $e) {\n throw new \\Exception('Braintree Exception Authentication Failed');\n } catch (\\Exception $e) {\n // do nothing\n }\n }", "abstract public function validate();", "abstract public function validate();", "protected function validateRequest()\n {\n $validators = [\n 'hasClientId' => null,\n 'knownClientId' => null,\n 'timestamp' => 'signed',\n 'hasSignature' => 'signed',\n 'notExpiredTimestamp' => 'signed',\n 'signature' => 'signed',\n ];\n\n foreach ($validators as $validator => $condition) {\n // First make sure the conditions are fulfilled for the validator\n if ($condition) {\n $method = camel_case('validCondition_'.$condition);\n\n if (! $this->{$method}()) {\n continue;\n }\n }\n\n $method = camel_case('valid_'.$validator);\n $this->{$method}();\n }\n }", "protected function strictlyValidateClient()\n\t{\n\t\treturn $this->validateClient(true);\n\t}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "public function ValidateUserInput()\n {\n $bIsValid = parent::ValidateUserInput();\n\n if ($bIsValid) {\n $oMsgManager = TCMSMessageManager::GetInstance();\n\n if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('accountNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('bankNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['bankNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-bankNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n }\n\n return $bIsValid;\n }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "public function testCallReturnFalse()\n {\n $validator = new Rpc( new ArrayIterator( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( false ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_FALSE, $validator->getMessages() );\n }", "public function valid(){ }", "public function validate_referrer() {\n $status_code = 'ACCESS_RESTRICTED';\n\n preg_match( '~' . site_url() . '~', $_SERVER[ 'HTTP_REFERER' ], $matches );\n\n if ( ! isset( $matches[0] ) || ! wp_get_referer() ) {\n $this->error_occurred( $status_code );\n }\n }", "public function verifyRequest()\n {\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "function is_validated($username = null, $password = null){\n return validate_cred($username, $password);\n}", "public function bmo_validate_request(){\n\t\t $this->is_google = $this->is_request_google();\n\t\t if( ! $this->is_google ) return; // Move along if this isn't even a google request\n\n\t\t //If this is a google request, validate the $_GET[ 'code' ] param\n\t\t $this->valid = $this->google_client->validate_code( $_GET[ 'code' ] );\n\n\t\t //Let's strip the $_GET[ 'code' ] param so nothing else can use it\n\t\t $strip = $this->strip_code_param();\n\n\t\t //Get the Google User\n\t\t $this->google_user = $this->google_client->get_google_user();\n\n\t\t //Check if the Google User Email is allowed agains our list of Approved Domains\n\t\t $approved = $this->approve_google_user();\n\n\t\t return;\n\t}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "public function validate()\n {\n $requiredArguments = $this->getRequiredArguments();\n \n foreach ($requiredArguments as $arg) {\n if ( ! isset($this->arguments[$arg])) {\n return false;\n }\n }\n \n return true;\n }", "public function validateState() {\n\t\tif($this->verification != null){\n\t\t\tthrow new PoserException(\"Mocking is in a invalid state there is a verification currently active\");\n\t\t}\n\t\t\n\t\t$this->argumentMatcherMonitor->validateState();\n\t\t//TODO report that there is unfinished stubbing and verification\n\t}", "public function testCallReturnObjectContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( (object) array(\n 'success' => true\n ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "public function validate()\n {\n return $this->ensureExtensionLoaded() &&\n $this->validateSourceLocation() &&\n $this->validateCondition() &&\n $this->validateExpressions();\n }", "public function validate() {\n }", "public function validate() {\n }", "public function validate($args){\r\n\t\t$responseReceived = false;\r\n\t\tif (!(isset($this->sessionID))){\r\n\t\t\tif ($this->serverDownShouldModerate()){\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}else{\r\n\t\t\t\t// no session ID but the server hasn't experienced downtime.\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$args['lofi'] = $this->languageOrFrameworkID;\r\n\t\t\t$args['lofv'] = $this->languageOrFrameworkVersion;\r\n\t\t\t$args['k'] = $this->accountID;\r\n\t\t\t$args['pwd'] = $this->privateKey;\r\n\t\t\t$args['ua'] = $this->userAction;\r\n if (isset($this->customerSessionID)){\r\n $args['c'] = $this->customerSessionID;\r\n }\r\n\t\t\t$args['upow'] = $this->useProofOfWorkCaptcha ? \"1\" : \"0\";\r\n\t\t\t$args['powt'] = $this->proofOfWorkTime;\r\n\t\t\t$xmlresponse = $this->postData($this->baseURL, \"/validate\", $this->useSSL, $args);\r\n\t\t\tif ($xmlresponse){\r\n\t\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\t\tif ($doc){\r\n\t\t\t\t\t$isValidResponse = $doc->getElementsByTagName('isValid');\r\n\t\t\t\t\tif (!($isValidResponse && $isValidResponse->item(0))){\r\n\t\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// parse out result from spamcaptcher server\r\n\t\t\t\t\t\t$this->spamScore = $doc->getElementsByTagName('spamScore')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$this->isValid = $this->strToBoolean($doc->getElementsByTagName('isValid')->item(0)->nodeValue);\r\n\t\t\t\t\t\t$responseReceived = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($responseReceived){\r\n\t\t\tif (!$this->isValid){\r\n\t\t\t\t// CAPTCHA was NOT solved correctly AND no TrustMe Account was used\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}else{\r\n\t\t\t\tif ($this->spamScore > $this->MAX_MODERATE_SCORE){\r\n\t\t\t\t\t// SpamScore is too high\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t\t}elseif ($this->spamScore > $this->MAX_PASSABLE_SCORE){\r\n\t\t\t\t\t// SpamScore is questionable\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Goldilocks is happy with the SpamScore\r\n\t\t\t\t\t// Yes yes, technically one of the scores\r\n\t\t\t\t\t// should have been \"too low\" for me to make\r\n\t\t\t\t\t// a Goldilocks reference ... I don't care.\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_PASS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->recommendedAction;\r\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "abstract public function valid();", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function testCallReturnArrayContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( array( true ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function valid()\n {\n if ($this->container['call_session_history_id'] === null) {\n return false;\n }\n if ($this->container['account_id'] === null) {\n return false;\n }\n if ($this->container['application_id'] === null) {\n return false;\n }\n if ($this->container['user_id'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['initiator_address'] === null) {\n return false;\n }\n if ($this->container['media_server_address'] === null) {\n return false;\n }\n if ($this->container['log_file_url'] === null) {\n return false;\n }\n return true;\n }", "private function validate()\r\n\t{\r\n\t\tif (!ctype_digit($this -> curComm))\r\n\t\t{\r\n\t\t\t$this -> Error('er1');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the user with chat_id exists\r\n\t\tif (!($this -> Exists()))\r\n\t\t{\r\n\t\t\t$this -> Error('er2');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the inputed chat_id = user chat_id\r\n\t\tif (($this -> isSelf()))\r\n\t\t{\r\n\t\t\t$this -> Error('er3');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 1;\t \t\r\n\t}", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "public function testCallReturnEmpty()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( 0 ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_EMPTY, $validator->getMessages() );\n }", "public function checkValidity()\r\n {\r\n if (!parent::checkValidity())\r\n return false;\r\n\r\n if (!$this->checkUniqueCode())\r\n return false;\r\n \r\n if ($this->workflowState && strlen($this->workflowState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_WORKFLOWSTATE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->name . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->name) > 255)\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->code . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->code) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->fromState && strlen($this->fromState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->toState && strlen($this->toState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n } \r\n \r\n return true;\r\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public abstract function validation();", "public function validate() {\n\n\t\tif ($this->getPrimaryAccountNumber() === null) {\n\t\t\tthrow new ValidationException(\"'primaryAccountNumber' can't be null\", 'primaryAccountNumber', $this);\n\t\t}\n\t}", "public function validate() { return TRUE; }", "public function testCallReturnEmptyString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( '' ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "protected function validate()\n {\n $resolutionArguments = func_get_args();\n $inputArguments = array_get($resolutionArguments, 1, []);\n\n $argumentRules = $this->getRulesForArguments($this->args(), $inputArguments);\n $explicitRules = call_user_func_array([$this, 'rules'], $resolutionArguments);\n $argumentRules = array_merge($argumentRules, $explicitRules);\n\n foreach ($argumentRules as $key => $rules) {\n $resolvedRules[$key] = $this->resolveRules($rules, $resolutionArguments);\n }\n\n if (isset($resolvedRules)) {\n $validationErrorMessages = call_user_func_array([$this, 'validationErrorMessages'], $resolutionArguments);\n $validator = $this->getValidator($inputArguments, $resolvedRules, $validationErrorMessages);\n if ($validator->fails()) {\n throw (new ValidationError('validation'))->setValidator($validator);\n }\n }\n }", "public function validateResolved();" ]
[ "0.6084363", "0.5932464", "0.5608582", "0.55777574", "0.5451368", "0.54418534", "0.54231936", "0.5422019", "0.5397647", "0.5388053", "0.5361162", "0.53166896", "0.530501", "0.5301431", "0.5282658", "0.52696484", "0.5256391", "0.5239617", "0.5213742", "0.5208621", "0.5175152", "0.51739466", "0.515704", "0.5128186", "0.50929123", "0.5047197", "0.50423676", "0.5038366", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.5025046", "0.5017399", "0.5007184", "0.5002242", "0.49982366", "0.49968874", "0.49679834", "0.49424085", "0.49424085", "0.49393523", "0.4933294", "0.49287504", "0.49282792", "0.4923522", "0.4919315", "0.491243", "0.4900123", "0.48990288", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48927826", "0.48926798", "0.48864648", "0.48857507", "0.48758167", "0.48724747", "0.48587644", "0.48503888", "0.48442018", "0.48442018", "0.48374477", "0.4835018", "0.4835018", "0.48282436", "0.48273662", "0.48243818", "0.482248", "0.4814814", "0.48117992", "0.48102224", "0.48090222", "0.48047405", "0.4801734", "0.47969347", "0.47952825", "0.47952825", "0.47952825", "0.47952825", "0.47929466", "0.47921243", "0.47908908", "0.479082", "0.4788136", "0.4787115", "0.4782323" ]
0.0
-1
Validate the RPC caller context.
public function setSettings($params, $context) { $this->validateMethodContext($context, ["role" => OMV_ROLE_ADMINISTRATOR]); // Validate the parameters of the RPC service method. $this->validateMethodParams($params, "rpc.webdesk.setsettings"); // Get the existing configuration object. $db = \OMV\Config\Database::getInstance(); $object = $db->get("conf.service.webdesk"); $object->setAssoc($params); $db->set($object); // Remove useless properties from the object. $object->remove("links"); // Return the configuration object. return $object->getAssoc(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateWebhookCall()\n {\n // If the webhook was called with an invalid method, throw an error\n if($_SERVER['REQUEST_METHOD'] != 'POST'){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_method',\n ]));\n }\n\n // If the webhook was called without any auth header, throw another error\n if (!isset($_SERVER['HTTP_AUTHORIZATION']) || empty($_SERVER['HTTP_AUTHORIZATION'])) {\n die(json_encode([\n 'success' => false,\n 'error' => 'no_auth_header',\n ]));\n }\n\n if($_SERVER['HTTP_AUTHORIZATION'] != Config::i()->getSXApiKey()){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_auth',\n ]));\n }\n }", "public function testCallReturnTrue()\n {\n $validator = new Rpc( 'SampleRpc' );\n $validator->setMethod( __FUNCTION__ );\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', array( 'context' ) ) ) )\n ->will( $this->returnValue( true ) );\n\n $this->assertTrue( $validator->isValid( 'value', array( 'context' ) ) );\n }", "public function validate(ValueContext $valueContext);", "public function validateRequest();", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "protected function _validate() {\n\t}", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function validateArguments() {}", "protected function isValidModuleRequest() {}", "public static function validate() {}", "public function isValid(Context $context)\n\t{\n\t\treturn true;\n\t}", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "protected function localValidation()\n\t\t{\n\t\t}", "protected function validateOrThrow() {}", "private function validateCall($call)\n {\n $result = null;\n $error = null;\n $data = null;\n $id = is_object($call) && property_exists($call, 'id') ? $call->id : null;\n do {\n if (!is_object($call)) {\n $error = self::InvalidRequest;\n break;\n }\n\n // hack for inputEx smd tester\n if (property_exists($call, 'version')) {\n if ($call->version == 'json-rpc-2.0') {\n $call->jsonrpc = '2.0';\n }\n }\n\n if (!property_exists($call, 'jsonrpc') || $call->jsonrpc != '2.0') {\n $error = self::InvalidRequest;\n break;\n }\n\n $fullMethod = property_exists($call, 'method') ? $call->method : '';\n $methodInfo = explode('.', $fullMethod, 2);\n $namespace = array_key_exists(1, $methodInfo) ? $methodInfo[0] : '';\n $method = $namespace ? $methodInfo[1] : $fullMethod;\n if (!$method || !array_key_exists($namespace, $this->instances) || !method_exists($this->instances[$namespace], $method) || in_array(strtolower($method), $this->hiddenMethods)) {\n $error = self::MethodNotFound;\n break;\n }\n\n if (!array_key_exists($fullMethod, $this->reflectionMethods)) {\n $this->reflectionMethods[$fullMethod] = new ReflectionMethod($this->instances[$namespace], $method);\n }\n\n /** @var $params array */\n $params = property_exists($call, 'params') ? $call->params : null;\n $paramsType = gettype($params);\n if ($params !== null && $paramsType != 'array' && $paramsType != 'object') {\n $error = self::InvalidParams;\n break;\n }\n\n // check parameters\n switch ($paramsType) {\n case 'array':\n $totalRequired = 0;\n // doesn't hold required, null, required sequence of params\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable()) {\n $totalRequired++;\n }\n }\n\n if (count($params) < $totalRequired) {\n $error = self::InvalidParams;\n $data = sprintf('Check numbers of required params (got %d, expected %d)', count($params), $totalRequired);\n }\n break;\n case 'object':\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable() && !array_key_exists($param->getName(), $params)) {\n $error = self::InvalidParams;\n $data = $param->getName() . ' not found';\n\n break 3;\n }\n }\n break;\n case 'NULL':\n if ($this->reflectionMethods[$fullMethod]->getNumberOfRequiredParameters() > 0) {\n $error = self::InvalidParams;\n $data = 'Empty required params';\n break 2;\n }\n break;\n }\n\n } while (false);\n\n if ($error) {\n $result = array($error, $id, $data);\n }\n\n return $result;\n }", "protected function validate()\n {\n }", "public function isValidRequest() {\n }", "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "protected function preValidate() {}", "public function testCallReturnErrorString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( __METHOD__ ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( __METHOD__, $validator->getMessages() );\n }", "public function validate()\n {\n $this->httpRequest->request;\n foreach (func_get_args() as $key) {\n $value = $this->parameters->get($key);\n if (! isset($value)) {\n throw new InvalidRequestException(\"The $key parameter is required\");\n }\n }\n }", "public function validateResolved()\n {\n $this->addRequestChecks();\n\n parent::validateResolved();\n }", "public function validateCallParameter() {\n if ($this->call_asset['parameter']) {\n // Validate parameters to a call.\n // Array, defining each parameter allowed in a call with the expected\n // data type of the value.\n $call_parameter = $this->call_parameter;\n // Parameters of the call request as seen in the request call.\n $call_request_parameter = $this->call_asset['parameter'];\n\n // Validate each parameter.\n foreach($call_request_parameter as $key => $value) {\n if (array_key_exists($key, $call_parameter)) {\n // Key in the request matches predefined parameter of the call.\n $is_valid = $this->matchDataType($value, $call_parameter[ $key ]);\n \n // Value should only match the enumerated value.\n if (is_array($call_parameter[ $key ])) {\n $call_parameter[ $key ] = 'one: ' . implode(',', $call_parameter[ $key ]) . ' - list';\n }\n\n if (!$is_valid) {\n // Data type mismatch.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' expects ' . $call_parameter[ $key ] . ' type.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n else {\n // Undefined parameter to this call.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' not expected for this call.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n }\n }", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "public function testCallReturnNull()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( null ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_NULL, $validator->getMessages() );\n }", "public function cli_validateArgs() {}", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function validateDev()\n {\n return parent::validate();\n }", "protected function validateEventContext(Event $event)\n {\n self::assertSame(\n $this->metadata[ RequestExecutorInterface::META_USER_CONTEXT ],\n $event->getContext(),\n 'Incorrect context'\n );\n }", "public function allowedContexts() {}", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function validated();", "public function doValidate(&$uri, $config, $context) {\n\t\treturn true;\n\t}", "public function validate()\n { \n try {\n $clientToken = $this->serviceGateway->clientToken()->generate([\n \"customerId\" => '123'\n ]);\n } catch (\\Braintree_Exception_Authentication $e) {\n throw new \\Exception('Braintree Exception Authentication Failed');\n } catch (\\Exception $e) {\n // do nothing\n }\n }", "abstract public function validate();", "abstract public function validate();", "protected function validateRequest()\n {\n $validators = [\n 'hasClientId' => null,\n 'knownClientId' => null,\n 'timestamp' => 'signed',\n 'hasSignature' => 'signed',\n 'notExpiredTimestamp' => 'signed',\n 'signature' => 'signed',\n ];\n\n foreach ($validators as $validator => $condition) {\n // First make sure the conditions are fulfilled for the validator\n if ($condition) {\n $method = camel_case('validCondition_'.$condition);\n\n if (! $this->{$method}()) {\n continue;\n }\n }\n\n $method = camel_case('valid_'.$validator);\n $this->{$method}();\n }\n }", "protected function strictlyValidateClient()\n\t{\n\t\treturn $this->validateClient(true);\n\t}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "public function ValidateUserInput()\n {\n $bIsValid = parent::ValidateUserInput();\n\n if ($bIsValid) {\n $oMsgManager = TCMSMessageManager::GetInstance();\n\n if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('accountNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('bankNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['bankNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-bankNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n }\n\n return $bIsValid;\n }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "public function testCallReturnFalse()\n {\n $validator = new Rpc( new ArrayIterator( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( false ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_FALSE, $validator->getMessages() );\n }", "public function valid(){ }", "public function validate_referrer() {\n $status_code = 'ACCESS_RESTRICTED';\n\n preg_match( '~' . site_url() . '~', $_SERVER[ 'HTTP_REFERER' ], $matches );\n\n if ( ! isset( $matches[0] ) || ! wp_get_referer() ) {\n $this->error_occurred( $status_code );\n }\n }", "public function verifyRequest()\n {\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "function is_validated($username = null, $password = null){\n return validate_cred($username, $password);\n}", "public function bmo_validate_request(){\n\t\t $this->is_google = $this->is_request_google();\n\t\t if( ! $this->is_google ) return; // Move along if this isn't even a google request\n\n\t\t //If this is a google request, validate the $_GET[ 'code' ] param\n\t\t $this->valid = $this->google_client->validate_code( $_GET[ 'code' ] );\n\n\t\t //Let's strip the $_GET[ 'code' ] param so nothing else can use it\n\t\t $strip = $this->strip_code_param();\n\n\t\t //Get the Google User\n\t\t $this->google_user = $this->google_client->get_google_user();\n\n\t\t //Check if the Google User Email is allowed agains our list of Approved Domains\n\t\t $approved = $this->approve_google_user();\n\n\t\t return;\n\t}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "public function validate()\n {\n $requiredArguments = $this->getRequiredArguments();\n \n foreach ($requiredArguments as $arg) {\n if ( ! isset($this->arguments[$arg])) {\n return false;\n }\n }\n \n return true;\n }", "public function validateState() {\n\t\tif($this->verification != null){\n\t\t\tthrow new PoserException(\"Mocking is in a invalid state there is a verification currently active\");\n\t\t}\n\t\t\n\t\t$this->argumentMatcherMonitor->validateState();\n\t\t//TODO report that there is unfinished stubbing and verification\n\t}", "public function testCallReturnObjectContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( (object) array(\n 'success' => true\n ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "public function validate()\n {\n return $this->ensureExtensionLoaded() &&\n $this->validateSourceLocation() &&\n $this->validateCondition() &&\n $this->validateExpressions();\n }", "public function validate() {\n }", "public function validate() {\n }", "public function validate($args){\r\n\t\t$responseReceived = false;\r\n\t\tif (!(isset($this->sessionID))){\r\n\t\t\tif ($this->serverDownShouldModerate()){\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}else{\r\n\t\t\t\t// no session ID but the server hasn't experienced downtime.\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$args['lofi'] = $this->languageOrFrameworkID;\r\n\t\t\t$args['lofv'] = $this->languageOrFrameworkVersion;\r\n\t\t\t$args['k'] = $this->accountID;\r\n\t\t\t$args['pwd'] = $this->privateKey;\r\n\t\t\t$args['ua'] = $this->userAction;\r\n if (isset($this->customerSessionID)){\r\n $args['c'] = $this->customerSessionID;\r\n }\r\n\t\t\t$args['upow'] = $this->useProofOfWorkCaptcha ? \"1\" : \"0\";\r\n\t\t\t$args['powt'] = $this->proofOfWorkTime;\r\n\t\t\t$xmlresponse = $this->postData($this->baseURL, \"/validate\", $this->useSSL, $args);\r\n\t\t\tif ($xmlresponse){\r\n\t\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\t\tif ($doc){\r\n\t\t\t\t\t$isValidResponse = $doc->getElementsByTagName('isValid');\r\n\t\t\t\t\tif (!($isValidResponse && $isValidResponse->item(0))){\r\n\t\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// parse out result from spamcaptcher server\r\n\t\t\t\t\t\t$this->spamScore = $doc->getElementsByTagName('spamScore')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$this->isValid = $this->strToBoolean($doc->getElementsByTagName('isValid')->item(0)->nodeValue);\r\n\t\t\t\t\t\t$responseReceived = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($responseReceived){\r\n\t\t\tif (!$this->isValid){\r\n\t\t\t\t// CAPTCHA was NOT solved correctly AND no TrustMe Account was used\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}else{\r\n\t\t\t\tif ($this->spamScore > $this->MAX_MODERATE_SCORE){\r\n\t\t\t\t\t// SpamScore is too high\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t\t}elseif ($this->spamScore > $this->MAX_PASSABLE_SCORE){\r\n\t\t\t\t\t// SpamScore is questionable\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Goldilocks is happy with the SpamScore\r\n\t\t\t\t\t// Yes yes, technically one of the scores\r\n\t\t\t\t\t// should have been \"too low\" for me to make\r\n\t\t\t\t\t// a Goldilocks reference ... I don't care.\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_PASS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->recommendedAction;\r\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "abstract public function valid();", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function testCallReturnArrayContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( array( true ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function valid()\n {\n if ($this->container['call_session_history_id'] === null) {\n return false;\n }\n if ($this->container['account_id'] === null) {\n return false;\n }\n if ($this->container['application_id'] === null) {\n return false;\n }\n if ($this->container['user_id'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['initiator_address'] === null) {\n return false;\n }\n if ($this->container['media_server_address'] === null) {\n return false;\n }\n if ($this->container['log_file_url'] === null) {\n return false;\n }\n return true;\n }", "private function validate()\r\n\t{\r\n\t\tif (!ctype_digit($this -> curComm))\r\n\t\t{\r\n\t\t\t$this -> Error('er1');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the user with chat_id exists\r\n\t\tif (!($this -> Exists()))\r\n\t\t{\r\n\t\t\t$this -> Error('er2');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the inputed chat_id = user chat_id\r\n\t\tif (($this -> isSelf()))\r\n\t\t{\r\n\t\t\t$this -> Error('er3');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 1;\t \t\r\n\t}", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "public function testCallReturnEmpty()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( 0 ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_EMPTY, $validator->getMessages() );\n }", "public function checkValidity()\r\n {\r\n if (!parent::checkValidity())\r\n return false;\r\n\r\n if (!$this->checkUniqueCode())\r\n return false;\r\n \r\n if ($this->workflowState && strlen($this->workflowState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_WORKFLOWSTATE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->name . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->name) > 255)\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->code . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->code) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->fromState && strlen($this->fromState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->toState && strlen($this->toState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n } \r\n \r\n return true;\r\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public abstract function validation();", "public function validate() {\n\n\t\tif ($this->getPrimaryAccountNumber() === null) {\n\t\t\tthrow new ValidationException(\"'primaryAccountNumber' can't be null\", 'primaryAccountNumber', $this);\n\t\t}\n\t}", "public function validate() { return TRUE; }", "public function testCallReturnEmptyString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( '' ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "protected function validate()\n {\n $resolutionArguments = func_get_args();\n $inputArguments = array_get($resolutionArguments, 1, []);\n\n $argumentRules = $this->getRulesForArguments($this->args(), $inputArguments);\n $explicitRules = call_user_func_array([$this, 'rules'], $resolutionArguments);\n $argumentRules = array_merge($argumentRules, $explicitRules);\n\n foreach ($argumentRules as $key => $rules) {\n $resolvedRules[$key] = $this->resolveRules($rules, $resolutionArguments);\n }\n\n if (isset($resolvedRules)) {\n $validationErrorMessages = call_user_func_array([$this, 'validationErrorMessages'], $resolutionArguments);\n $validator = $this->getValidator($inputArguments, $resolvedRules, $validationErrorMessages);\n if ($validator->fails()) {\n throw (new ValidationError('validation'))->setValidator($validator);\n }\n }\n }", "public function validateResolved();" ]
[ "0.6084363", "0.5932464", "0.5608582", "0.55777574", "0.5451368", "0.54418534", "0.54231936", "0.5422019", "0.5397647", "0.5388053", "0.5361162", "0.53166896", "0.530501", "0.5301431", "0.5282658", "0.52696484", "0.5256391", "0.5239617", "0.5213742", "0.5208621", "0.5175152", "0.51739466", "0.515704", "0.5128186", "0.50929123", "0.5047197", "0.50423676", "0.5038366", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.5025046", "0.5017399", "0.5007184", "0.5002242", "0.49982366", "0.49968874", "0.49679834", "0.49424085", "0.49424085", "0.49393523", "0.4933294", "0.49287504", "0.49282792", "0.4923522", "0.4919315", "0.491243", "0.4900123", "0.48990288", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48927826", "0.48926798", "0.48864648", "0.48857507", "0.48758167", "0.48724747", "0.48587644", "0.48503888", "0.48442018", "0.48442018", "0.48374477", "0.4835018", "0.4835018", "0.48282436", "0.48273662", "0.48243818", "0.482248", "0.4814814", "0.48117992", "0.48102224", "0.48090222", "0.48047405", "0.4801734", "0.47969347", "0.47952825", "0.47952825", "0.47952825", "0.47952825", "0.47929466", "0.47921243", "0.47908908", "0.479082", "0.4788136", "0.4787115", "0.4782323" ]
0.0
-1
Validate the RPC caller context.
public function getLinkList($params, $context) { $this->validateMethodContext($context, ["role" => OMV_ROLE_ADMINISTRATOR]); // Get the configuration object. $db = \OMV\Config\Database::getInstance(); $objects = $db->get("conf.service.webdesk.link"); // Add additional link informations. $objectsAssoc = []; foreach ($objects as $objectk => &$objectv) { // Add the new property 'sharedfoldername'. /*$objectv->add("sharedfoldername", "string", gettext("n/a")); // Get the shared folder configuration object. $sfObject = $db->get("conf.system.sharedfolder", $objectv->get("sharedfolderref")); // Update the 'sharedfoldername' property. $objectv->set("sharedfoldername", $sfObject->get("name"));*/ $objectsAssoc[] = $objectv->getAssoc(); } // Filter the result. return $this->applyFilter($objectsAssoc, $params['start'], $params['limit'], $params['sortfield'], $params['sortdir']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateWebhookCall()\n {\n // If the webhook was called with an invalid method, throw an error\n if($_SERVER['REQUEST_METHOD'] != 'POST'){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_method',\n ]));\n }\n\n // If the webhook was called without any auth header, throw another error\n if (!isset($_SERVER['HTTP_AUTHORIZATION']) || empty($_SERVER['HTTP_AUTHORIZATION'])) {\n die(json_encode([\n 'success' => false,\n 'error' => 'no_auth_header',\n ]));\n }\n\n if($_SERVER['HTTP_AUTHORIZATION'] != Config::i()->getSXApiKey()){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_auth',\n ]));\n }\n }", "public function testCallReturnTrue()\n {\n $validator = new Rpc( 'SampleRpc' );\n $validator->setMethod( __FUNCTION__ );\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', array( 'context' ) ) ) )\n ->will( $this->returnValue( true ) );\n\n $this->assertTrue( $validator->isValid( 'value', array( 'context' ) ) );\n }", "public function validate(ValueContext $valueContext);", "public function validateRequest();", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "protected function _validate() {\n\t}", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function validateArguments() {}", "protected function isValidModuleRequest() {}", "public static function validate() {}", "public function isValid(Context $context)\n\t{\n\t\treturn true;\n\t}", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "protected function localValidation()\n\t\t{\n\t\t}", "protected function validateOrThrow() {}", "private function validateCall($call)\n {\n $result = null;\n $error = null;\n $data = null;\n $id = is_object($call) && property_exists($call, 'id') ? $call->id : null;\n do {\n if (!is_object($call)) {\n $error = self::InvalidRequest;\n break;\n }\n\n // hack for inputEx smd tester\n if (property_exists($call, 'version')) {\n if ($call->version == 'json-rpc-2.0') {\n $call->jsonrpc = '2.0';\n }\n }\n\n if (!property_exists($call, 'jsonrpc') || $call->jsonrpc != '2.0') {\n $error = self::InvalidRequest;\n break;\n }\n\n $fullMethod = property_exists($call, 'method') ? $call->method : '';\n $methodInfo = explode('.', $fullMethod, 2);\n $namespace = array_key_exists(1, $methodInfo) ? $methodInfo[0] : '';\n $method = $namespace ? $methodInfo[1] : $fullMethod;\n if (!$method || !array_key_exists($namespace, $this->instances) || !method_exists($this->instances[$namespace], $method) || in_array(strtolower($method), $this->hiddenMethods)) {\n $error = self::MethodNotFound;\n break;\n }\n\n if (!array_key_exists($fullMethod, $this->reflectionMethods)) {\n $this->reflectionMethods[$fullMethod] = new ReflectionMethod($this->instances[$namespace], $method);\n }\n\n /** @var $params array */\n $params = property_exists($call, 'params') ? $call->params : null;\n $paramsType = gettype($params);\n if ($params !== null && $paramsType != 'array' && $paramsType != 'object') {\n $error = self::InvalidParams;\n break;\n }\n\n // check parameters\n switch ($paramsType) {\n case 'array':\n $totalRequired = 0;\n // doesn't hold required, null, required sequence of params\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable()) {\n $totalRequired++;\n }\n }\n\n if (count($params) < $totalRequired) {\n $error = self::InvalidParams;\n $data = sprintf('Check numbers of required params (got %d, expected %d)', count($params), $totalRequired);\n }\n break;\n case 'object':\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable() && !array_key_exists($param->getName(), $params)) {\n $error = self::InvalidParams;\n $data = $param->getName() . ' not found';\n\n break 3;\n }\n }\n break;\n case 'NULL':\n if ($this->reflectionMethods[$fullMethod]->getNumberOfRequiredParameters() > 0) {\n $error = self::InvalidParams;\n $data = 'Empty required params';\n break 2;\n }\n break;\n }\n\n } while (false);\n\n if ($error) {\n $result = array($error, $id, $data);\n }\n\n return $result;\n }", "protected function validate()\n {\n }", "public function isValidRequest() {\n }", "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "protected function preValidate() {}", "public function testCallReturnErrorString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( __METHOD__ ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( __METHOD__, $validator->getMessages() );\n }", "public function validate()\n {\n $this->httpRequest->request;\n foreach (func_get_args() as $key) {\n $value = $this->parameters->get($key);\n if (! isset($value)) {\n throw new InvalidRequestException(\"The $key parameter is required\");\n }\n }\n }", "public function validateResolved()\n {\n $this->addRequestChecks();\n\n parent::validateResolved();\n }", "public function validateCallParameter() {\n if ($this->call_asset['parameter']) {\n // Validate parameters to a call.\n // Array, defining each parameter allowed in a call with the expected\n // data type of the value.\n $call_parameter = $this->call_parameter;\n // Parameters of the call request as seen in the request call.\n $call_request_parameter = $this->call_asset['parameter'];\n\n // Validate each parameter.\n foreach($call_request_parameter as $key => $value) {\n if (array_key_exists($key, $call_parameter)) {\n // Key in the request matches predefined parameter of the call.\n $is_valid = $this->matchDataType($value, $call_parameter[ $key ]);\n \n // Value should only match the enumerated value.\n if (is_array($call_parameter[ $key ])) {\n $call_parameter[ $key ] = 'one: ' . implode(',', $call_parameter[ $key ]) . ' - list';\n }\n\n if (!$is_valid) {\n // Data type mismatch.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' expects ' . $call_parameter[ $key ] . ' type.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n else {\n // Undefined parameter to this call.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' not expected for this call.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n }\n }", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "public function testCallReturnNull()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( null ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_NULL, $validator->getMessages() );\n }", "public function cli_validateArgs() {}", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function validateDev()\n {\n return parent::validate();\n }", "protected function validateEventContext(Event $event)\n {\n self::assertSame(\n $this->metadata[ RequestExecutorInterface::META_USER_CONTEXT ],\n $event->getContext(),\n 'Incorrect context'\n );\n }", "public function allowedContexts() {}", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function validated();", "public function doValidate(&$uri, $config, $context) {\n\t\treturn true;\n\t}", "public function validate()\n { \n try {\n $clientToken = $this->serviceGateway->clientToken()->generate([\n \"customerId\" => '123'\n ]);\n } catch (\\Braintree_Exception_Authentication $e) {\n throw new \\Exception('Braintree Exception Authentication Failed');\n } catch (\\Exception $e) {\n // do nothing\n }\n }", "abstract public function validate();", "abstract public function validate();", "protected function validateRequest()\n {\n $validators = [\n 'hasClientId' => null,\n 'knownClientId' => null,\n 'timestamp' => 'signed',\n 'hasSignature' => 'signed',\n 'notExpiredTimestamp' => 'signed',\n 'signature' => 'signed',\n ];\n\n foreach ($validators as $validator => $condition) {\n // First make sure the conditions are fulfilled for the validator\n if ($condition) {\n $method = camel_case('validCondition_'.$condition);\n\n if (! $this->{$method}()) {\n continue;\n }\n }\n\n $method = camel_case('valid_'.$validator);\n $this->{$method}();\n }\n }", "protected function strictlyValidateClient()\n\t{\n\t\treturn $this->validateClient(true);\n\t}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "public function ValidateUserInput()\n {\n $bIsValid = parent::ValidateUserInput();\n\n if ($bIsValid) {\n $oMsgManager = TCMSMessageManager::GetInstance();\n\n if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('accountNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('bankNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['bankNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-bankNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n }\n\n return $bIsValid;\n }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "public function testCallReturnFalse()\n {\n $validator = new Rpc( new ArrayIterator( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( false ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_FALSE, $validator->getMessages() );\n }", "public function valid(){ }", "public function validate_referrer() {\n $status_code = 'ACCESS_RESTRICTED';\n\n preg_match( '~' . site_url() . '~', $_SERVER[ 'HTTP_REFERER' ], $matches );\n\n if ( ! isset( $matches[0] ) || ! wp_get_referer() ) {\n $this->error_occurred( $status_code );\n }\n }", "public function verifyRequest()\n {\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "function is_validated($username = null, $password = null){\n return validate_cred($username, $password);\n}", "public function bmo_validate_request(){\n\t\t $this->is_google = $this->is_request_google();\n\t\t if( ! $this->is_google ) return; // Move along if this isn't even a google request\n\n\t\t //If this is a google request, validate the $_GET[ 'code' ] param\n\t\t $this->valid = $this->google_client->validate_code( $_GET[ 'code' ] );\n\n\t\t //Let's strip the $_GET[ 'code' ] param so nothing else can use it\n\t\t $strip = $this->strip_code_param();\n\n\t\t //Get the Google User\n\t\t $this->google_user = $this->google_client->get_google_user();\n\n\t\t //Check if the Google User Email is allowed agains our list of Approved Domains\n\t\t $approved = $this->approve_google_user();\n\n\t\t return;\n\t}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "public function validate()\n {\n $requiredArguments = $this->getRequiredArguments();\n \n foreach ($requiredArguments as $arg) {\n if ( ! isset($this->arguments[$arg])) {\n return false;\n }\n }\n \n return true;\n }", "public function validateState() {\n\t\tif($this->verification != null){\n\t\t\tthrow new PoserException(\"Mocking is in a invalid state there is a verification currently active\");\n\t\t}\n\t\t\n\t\t$this->argumentMatcherMonitor->validateState();\n\t\t//TODO report that there is unfinished stubbing and verification\n\t}", "public function testCallReturnObjectContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( (object) array(\n 'success' => true\n ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "public function validate()\n {\n return $this->ensureExtensionLoaded() &&\n $this->validateSourceLocation() &&\n $this->validateCondition() &&\n $this->validateExpressions();\n }", "public function validate() {\n }", "public function validate() {\n }", "public function validate($args){\r\n\t\t$responseReceived = false;\r\n\t\tif (!(isset($this->sessionID))){\r\n\t\t\tif ($this->serverDownShouldModerate()){\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}else{\r\n\t\t\t\t// no session ID but the server hasn't experienced downtime.\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$args['lofi'] = $this->languageOrFrameworkID;\r\n\t\t\t$args['lofv'] = $this->languageOrFrameworkVersion;\r\n\t\t\t$args['k'] = $this->accountID;\r\n\t\t\t$args['pwd'] = $this->privateKey;\r\n\t\t\t$args['ua'] = $this->userAction;\r\n if (isset($this->customerSessionID)){\r\n $args['c'] = $this->customerSessionID;\r\n }\r\n\t\t\t$args['upow'] = $this->useProofOfWorkCaptcha ? \"1\" : \"0\";\r\n\t\t\t$args['powt'] = $this->proofOfWorkTime;\r\n\t\t\t$xmlresponse = $this->postData($this->baseURL, \"/validate\", $this->useSSL, $args);\r\n\t\t\tif ($xmlresponse){\r\n\t\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\t\tif ($doc){\r\n\t\t\t\t\t$isValidResponse = $doc->getElementsByTagName('isValid');\r\n\t\t\t\t\tif (!($isValidResponse && $isValidResponse->item(0))){\r\n\t\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// parse out result from spamcaptcher server\r\n\t\t\t\t\t\t$this->spamScore = $doc->getElementsByTagName('spamScore')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$this->isValid = $this->strToBoolean($doc->getElementsByTagName('isValid')->item(0)->nodeValue);\r\n\t\t\t\t\t\t$responseReceived = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($responseReceived){\r\n\t\t\tif (!$this->isValid){\r\n\t\t\t\t// CAPTCHA was NOT solved correctly AND no TrustMe Account was used\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}else{\r\n\t\t\t\tif ($this->spamScore > $this->MAX_MODERATE_SCORE){\r\n\t\t\t\t\t// SpamScore is too high\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t\t}elseif ($this->spamScore > $this->MAX_PASSABLE_SCORE){\r\n\t\t\t\t\t// SpamScore is questionable\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Goldilocks is happy with the SpamScore\r\n\t\t\t\t\t// Yes yes, technically one of the scores\r\n\t\t\t\t\t// should have been \"too low\" for me to make\r\n\t\t\t\t\t// a Goldilocks reference ... I don't care.\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_PASS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->recommendedAction;\r\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "abstract public function valid();", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function testCallReturnArrayContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( array( true ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function valid()\n {\n if ($this->container['call_session_history_id'] === null) {\n return false;\n }\n if ($this->container['account_id'] === null) {\n return false;\n }\n if ($this->container['application_id'] === null) {\n return false;\n }\n if ($this->container['user_id'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['initiator_address'] === null) {\n return false;\n }\n if ($this->container['media_server_address'] === null) {\n return false;\n }\n if ($this->container['log_file_url'] === null) {\n return false;\n }\n return true;\n }", "private function validate()\r\n\t{\r\n\t\tif (!ctype_digit($this -> curComm))\r\n\t\t{\r\n\t\t\t$this -> Error('er1');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the user with chat_id exists\r\n\t\tif (!($this -> Exists()))\r\n\t\t{\r\n\t\t\t$this -> Error('er2');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the inputed chat_id = user chat_id\r\n\t\tif (($this -> isSelf()))\r\n\t\t{\r\n\t\t\t$this -> Error('er3');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 1;\t \t\r\n\t}", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "public function testCallReturnEmpty()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( 0 ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_EMPTY, $validator->getMessages() );\n }", "public function checkValidity()\r\n {\r\n if (!parent::checkValidity())\r\n return false;\r\n\r\n if (!$this->checkUniqueCode())\r\n return false;\r\n \r\n if ($this->workflowState && strlen($this->workflowState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_WORKFLOWSTATE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->name . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->name) > 255)\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->code . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->code) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->fromState && strlen($this->fromState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->toState && strlen($this->toState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n } \r\n \r\n return true;\r\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public abstract function validation();", "public function validate() {\n\n\t\tif ($this->getPrimaryAccountNumber() === null) {\n\t\t\tthrow new ValidationException(\"'primaryAccountNumber' can't be null\", 'primaryAccountNumber', $this);\n\t\t}\n\t}", "public function validate() { return TRUE; }", "public function testCallReturnEmptyString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( '' ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "protected function validate()\n {\n $resolutionArguments = func_get_args();\n $inputArguments = array_get($resolutionArguments, 1, []);\n\n $argumentRules = $this->getRulesForArguments($this->args(), $inputArguments);\n $explicitRules = call_user_func_array([$this, 'rules'], $resolutionArguments);\n $argumentRules = array_merge($argumentRules, $explicitRules);\n\n foreach ($argumentRules as $key => $rules) {\n $resolvedRules[$key] = $this->resolveRules($rules, $resolutionArguments);\n }\n\n if (isset($resolvedRules)) {\n $validationErrorMessages = call_user_func_array([$this, 'validationErrorMessages'], $resolutionArguments);\n $validator = $this->getValidator($inputArguments, $resolvedRules, $validationErrorMessages);\n if ($validator->fails()) {\n throw (new ValidationError('validation'))->setValidator($validator);\n }\n }\n }", "public function validateResolved();" ]
[ "0.6084363", "0.5932464", "0.5608582", "0.55777574", "0.5451368", "0.54418534", "0.54231936", "0.5422019", "0.5397647", "0.5388053", "0.5361162", "0.53166896", "0.530501", "0.5301431", "0.5282658", "0.52696484", "0.5256391", "0.5239617", "0.5213742", "0.5208621", "0.5175152", "0.51739466", "0.515704", "0.5128186", "0.50929123", "0.5047197", "0.50423676", "0.5038366", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.5025046", "0.5017399", "0.5007184", "0.5002242", "0.49982366", "0.49968874", "0.49679834", "0.49424085", "0.49424085", "0.49393523", "0.4933294", "0.49287504", "0.49282792", "0.4923522", "0.4919315", "0.491243", "0.4900123", "0.48990288", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48927826", "0.48926798", "0.48864648", "0.48857507", "0.48758167", "0.48724747", "0.48587644", "0.48503888", "0.48442018", "0.48442018", "0.48374477", "0.4835018", "0.4835018", "0.48282436", "0.48273662", "0.48243818", "0.482248", "0.4814814", "0.48117992", "0.48102224", "0.48090222", "0.48047405", "0.4801734", "0.47969347", "0.47952825", "0.47952825", "0.47952825", "0.47952825", "0.47929466", "0.47921243", "0.47908908", "0.479082", "0.4788136", "0.4787115", "0.4782323" ]
0.0
-1
Validate the RPC caller context.
public function getLink($params, $context) { $this->validateMethodContext($context, ["role" => OMV_ROLE_ADMINISTRATOR]); // Validate the parameters of the RPC service method. $this->validateMethodParams($params, "rpc.common.objectuuid"); // Get the configuration object. $db = \OMV\Config\Database::getInstance(); return $db->getAssoc("conf.service.webdesk.link", $params['uuid']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateWebhookCall()\n {\n // If the webhook was called with an invalid method, throw an error\n if($_SERVER['REQUEST_METHOD'] != 'POST'){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_method',\n ]));\n }\n\n // If the webhook was called without any auth header, throw another error\n if (!isset($_SERVER['HTTP_AUTHORIZATION']) || empty($_SERVER['HTTP_AUTHORIZATION'])) {\n die(json_encode([\n 'success' => false,\n 'error' => 'no_auth_header',\n ]));\n }\n\n if($_SERVER['HTTP_AUTHORIZATION'] != Config::i()->getSXApiKey()){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_auth',\n ]));\n }\n }", "public function testCallReturnTrue()\n {\n $validator = new Rpc( 'SampleRpc' );\n $validator->setMethod( __FUNCTION__ );\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', array( 'context' ) ) ) )\n ->will( $this->returnValue( true ) );\n\n $this->assertTrue( $validator->isValid( 'value', array( 'context' ) ) );\n }", "public function validate(ValueContext $valueContext);", "public function validateRequest();", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "protected function _validate() {\n\t}", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function validateArguments() {}", "protected function isValidModuleRequest() {}", "public static function validate() {}", "public function isValid(Context $context)\n\t{\n\t\treturn true;\n\t}", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "protected function localValidation()\n\t\t{\n\t\t}", "protected function validateOrThrow() {}", "private function validateCall($call)\n {\n $result = null;\n $error = null;\n $data = null;\n $id = is_object($call) && property_exists($call, 'id') ? $call->id : null;\n do {\n if (!is_object($call)) {\n $error = self::InvalidRequest;\n break;\n }\n\n // hack for inputEx smd tester\n if (property_exists($call, 'version')) {\n if ($call->version == 'json-rpc-2.0') {\n $call->jsonrpc = '2.0';\n }\n }\n\n if (!property_exists($call, 'jsonrpc') || $call->jsonrpc != '2.0') {\n $error = self::InvalidRequest;\n break;\n }\n\n $fullMethod = property_exists($call, 'method') ? $call->method : '';\n $methodInfo = explode('.', $fullMethod, 2);\n $namespace = array_key_exists(1, $methodInfo) ? $methodInfo[0] : '';\n $method = $namespace ? $methodInfo[1] : $fullMethod;\n if (!$method || !array_key_exists($namespace, $this->instances) || !method_exists($this->instances[$namespace], $method) || in_array(strtolower($method), $this->hiddenMethods)) {\n $error = self::MethodNotFound;\n break;\n }\n\n if (!array_key_exists($fullMethod, $this->reflectionMethods)) {\n $this->reflectionMethods[$fullMethod] = new ReflectionMethod($this->instances[$namespace], $method);\n }\n\n /** @var $params array */\n $params = property_exists($call, 'params') ? $call->params : null;\n $paramsType = gettype($params);\n if ($params !== null && $paramsType != 'array' && $paramsType != 'object') {\n $error = self::InvalidParams;\n break;\n }\n\n // check parameters\n switch ($paramsType) {\n case 'array':\n $totalRequired = 0;\n // doesn't hold required, null, required sequence of params\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable()) {\n $totalRequired++;\n }\n }\n\n if (count($params) < $totalRequired) {\n $error = self::InvalidParams;\n $data = sprintf('Check numbers of required params (got %d, expected %d)', count($params), $totalRequired);\n }\n break;\n case 'object':\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable() && !array_key_exists($param->getName(), $params)) {\n $error = self::InvalidParams;\n $data = $param->getName() . ' not found';\n\n break 3;\n }\n }\n break;\n case 'NULL':\n if ($this->reflectionMethods[$fullMethod]->getNumberOfRequiredParameters() > 0) {\n $error = self::InvalidParams;\n $data = 'Empty required params';\n break 2;\n }\n break;\n }\n\n } while (false);\n\n if ($error) {\n $result = array($error, $id, $data);\n }\n\n return $result;\n }", "protected function validate()\n {\n }", "public function isValidRequest() {\n }", "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "protected function preValidate() {}", "public function testCallReturnErrorString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( __METHOD__ ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( __METHOD__, $validator->getMessages() );\n }", "public function validate()\n {\n $this->httpRequest->request;\n foreach (func_get_args() as $key) {\n $value = $this->parameters->get($key);\n if (! isset($value)) {\n throw new InvalidRequestException(\"The $key parameter is required\");\n }\n }\n }", "public function validateResolved()\n {\n $this->addRequestChecks();\n\n parent::validateResolved();\n }", "public function validateCallParameter() {\n if ($this->call_asset['parameter']) {\n // Validate parameters to a call.\n // Array, defining each parameter allowed in a call with the expected\n // data type of the value.\n $call_parameter = $this->call_parameter;\n // Parameters of the call request as seen in the request call.\n $call_request_parameter = $this->call_asset['parameter'];\n\n // Validate each parameter.\n foreach($call_request_parameter as $key => $value) {\n if (array_key_exists($key, $call_parameter)) {\n // Key in the request matches predefined parameter of the call.\n $is_valid = $this->matchDataType($value, $call_parameter[ $key ]);\n \n // Value should only match the enumerated value.\n if (is_array($call_parameter[ $key ])) {\n $call_parameter[ $key ] = 'one: ' . implode(',', $call_parameter[ $key ]) . ' - list';\n }\n\n if (!$is_valid) {\n // Data type mismatch.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' expects ' . $call_parameter[ $key ] . ' type.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n else {\n // Undefined parameter to this call.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' not expected for this call.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n }\n }", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "public function testCallReturnNull()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( null ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_NULL, $validator->getMessages() );\n }", "public function cli_validateArgs() {}", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function validateDev()\n {\n return parent::validate();\n }", "protected function validateEventContext(Event $event)\n {\n self::assertSame(\n $this->metadata[ RequestExecutorInterface::META_USER_CONTEXT ],\n $event->getContext(),\n 'Incorrect context'\n );\n }", "public function allowedContexts() {}", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function validated();", "public function doValidate(&$uri, $config, $context) {\n\t\treturn true;\n\t}", "public function validate()\n { \n try {\n $clientToken = $this->serviceGateway->clientToken()->generate([\n \"customerId\" => '123'\n ]);\n } catch (\\Braintree_Exception_Authentication $e) {\n throw new \\Exception('Braintree Exception Authentication Failed');\n } catch (\\Exception $e) {\n // do nothing\n }\n }", "abstract public function validate();", "abstract public function validate();", "protected function validateRequest()\n {\n $validators = [\n 'hasClientId' => null,\n 'knownClientId' => null,\n 'timestamp' => 'signed',\n 'hasSignature' => 'signed',\n 'notExpiredTimestamp' => 'signed',\n 'signature' => 'signed',\n ];\n\n foreach ($validators as $validator => $condition) {\n // First make sure the conditions are fulfilled for the validator\n if ($condition) {\n $method = camel_case('validCondition_'.$condition);\n\n if (! $this->{$method}()) {\n continue;\n }\n }\n\n $method = camel_case('valid_'.$validator);\n $this->{$method}();\n }\n }", "protected function strictlyValidateClient()\n\t{\n\t\treturn $this->validateClient(true);\n\t}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "public function ValidateUserInput()\n {\n $bIsValid = parent::ValidateUserInput();\n\n if ($bIsValid) {\n $oMsgManager = TCMSMessageManager::GetInstance();\n\n if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('accountNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('bankNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['bankNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-bankNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n }\n\n return $bIsValid;\n }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "public function testCallReturnFalse()\n {\n $validator = new Rpc( new ArrayIterator( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( false ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_FALSE, $validator->getMessages() );\n }", "public function valid(){ }", "public function validate_referrer() {\n $status_code = 'ACCESS_RESTRICTED';\n\n preg_match( '~' . site_url() . '~', $_SERVER[ 'HTTP_REFERER' ], $matches );\n\n if ( ! isset( $matches[0] ) || ! wp_get_referer() ) {\n $this->error_occurred( $status_code );\n }\n }", "public function verifyRequest()\n {\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "function is_validated($username = null, $password = null){\n return validate_cred($username, $password);\n}", "public function bmo_validate_request(){\n\t\t $this->is_google = $this->is_request_google();\n\t\t if( ! $this->is_google ) return; // Move along if this isn't even a google request\n\n\t\t //If this is a google request, validate the $_GET[ 'code' ] param\n\t\t $this->valid = $this->google_client->validate_code( $_GET[ 'code' ] );\n\n\t\t //Let's strip the $_GET[ 'code' ] param so nothing else can use it\n\t\t $strip = $this->strip_code_param();\n\n\t\t //Get the Google User\n\t\t $this->google_user = $this->google_client->get_google_user();\n\n\t\t //Check if the Google User Email is allowed agains our list of Approved Domains\n\t\t $approved = $this->approve_google_user();\n\n\t\t return;\n\t}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "public function validate()\n {\n $requiredArguments = $this->getRequiredArguments();\n \n foreach ($requiredArguments as $arg) {\n if ( ! isset($this->arguments[$arg])) {\n return false;\n }\n }\n \n return true;\n }", "public function validateState() {\n\t\tif($this->verification != null){\n\t\t\tthrow new PoserException(\"Mocking is in a invalid state there is a verification currently active\");\n\t\t}\n\t\t\n\t\t$this->argumentMatcherMonitor->validateState();\n\t\t//TODO report that there is unfinished stubbing and verification\n\t}", "public function testCallReturnObjectContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( (object) array(\n 'success' => true\n ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "public function validate()\n {\n return $this->ensureExtensionLoaded() &&\n $this->validateSourceLocation() &&\n $this->validateCondition() &&\n $this->validateExpressions();\n }", "public function validate() {\n }", "public function validate() {\n }", "public function validate($args){\r\n\t\t$responseReceived = false;\r\n\t\tif (!(isset($this->sessionID))){\r\n\t\t\tif ($this->serverDownShouldModerate()){\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}else{\r\n\t\t\t\t// no session ID but the server hasn't experienced downtime.\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$args['lofi'] = $this->languageOrFrameworkID;\r\n\t\t\t$args['lofv'] = $this->languageOrFrameworkVersion;\r\n\t\t\t$args['k'] = $this->accountID;\r\n\t\t\t$args['pwd'] = $this->privateKey;\r\n\t\t\t$args['ua'] = $this->userAction;\r\n if (isset($this->customerSessionID)){\r\n $args['c'] = $this->customerSessionID;\r\n }\r\n\t\t\t$args['upow'] = $this->useProofOfWorkCaptcha ? \"1\" : \"0\";\r\n\t\t\t$args['powt'] = $this->proofOfWorkTime;\r\n\t\t\t$xmlresponse = $this->postData($this->baseURL, \"/validate\", $this->useSSL, $args);\r\n\t\t\tif ($xmlresponse){\r\n\t\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\t\tif ($doc){\r\n\t\t\t\t\t$isValidResponse = $doc->getElementsByTagName('isValid');\r\n\t\t\t\t\tif (!($isValidResponse && $isValidResponse->item(0))){\r\n\t\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// parse out result from spamcaptcher server\r\n\t\t\t\t\t\t$this->spamScore = $doc->getElementsByTagName('spamScore')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$this->isValid = $this->strToBoolean($doc->getElementsByTagName('isValid')->item(0)->nodeValue);\r\n\t\t\t\t\t\t$responseReceived = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($responseReceived){\r\n\t\t\tif (!$this->isValid){\r\n\t\t\t\t// CAPTCHA was NOT solved correctly AND no TrustMe Account was used\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}else{\r\n\t\t\t\tif ($this->spamScore > $this->MAX_MODERATE_SCORE){\r\n\t\t\t\t\t// SpamScore is too high\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t\t}elseif ($this->spamScore > $this->MAX_PASSABLE_SCORE){\r\n\t\t\t\t\t// SpamScore is questionable\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Goldilocks is happy with the SpamScore\r\n\t\t\t\t\t// Yes yes, technically one of the scores\r\n\t\t\t\t\t// should have been \"too low\" for me to make\r\n\t\t\t\t\t// a Goldilocks reference ... I don't care.\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_PASS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->recommendedAction;\r\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "abstract public function valid();", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function testCallReturnArrayContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( array( true ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function valid()\n {\n if ($this->container['call_session_history_id'] === null) {\n return false;\n }\n if ($this->container['account_id'] === null) {\n return false;\n }\n if ($this->container['application_id'] === null) {\n return false;\n }\n if ($this->container['user_id'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['initiator_address'] === null) {\n return false;\n }\n if ($this->container['media_server_address'] === null) {\n return false;\n }\n if ($this->container['log_file_url'] === null) {\n return false;\n }\n return true;\n }", "private function validate()\r\n\t{\r\n\t\tif (!ctype_digit($this -> curComm))\r\n\t\t{\r\n\t\t\t$this -> Error('er1');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the user with chat_id exists\r\n\t\tif (!($this -> Exists()))\r\n\t\t{\r\n\t\t\t$this -> Error('er2');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the inputed chat_id = user chat_id\r\n\t\tif (($this -> isSelf()))\r\n\t\t{\r\n\t\t\t$this -> Error('er3');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 1;\t \t\r\n\t}", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "public function testCallReturnEmpty()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( 0 ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_EMPTY, $validator->getMessages() );\n }", "public function checkValidity()\r\n {\r\n if (!parent::checkValidity())\r\n return false;\r\n\r\n if (!$this->checkUniqueCode())\r\n return false;\r\n \r\n if ($this->workflowState && strlen($this->workflowState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_WORKFLOWSTATE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->name . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->name) > 255)\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->code . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->code) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->fromState && strlen($this->fromState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->toState && strlen($this->toState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n } \r\n \r\n return true;\r\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public abstract function validation();", "public function validate() {\n\n\t\tif ($this->getPrimaryAccountNumber() === null) {\n\t\t\tthrow new ValidationException(\"'primaryAccountNumber' can't be null\", 'primaryAccountNumber', $this);\n\t\t}\n\t}", "public function validate() { return TRUE; }", "public function testCallReturnEmptyString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( '' ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "protected function validate()\n {\n $resolutionArguments = func_get_args();\n $inputArguments = array_get($resolutionArguments, 1, []);\n\n $argumentRules = $this->getRulesForArguments($this->args(), $inputArguments);\n $explicitRules = call_user_func_array([$this, 'rules'], $resolutionArguments);\n $argumentRules = array_merge($argumentRules, $explicitRules);\n\n foreach ($argumentRules as $key => $rules) {\n $resolvedRules[$key] = $this->resolveRules($rules, $resolutionArguments);\n }\n\n if (isset($resolvedRules)) {\n $validationErrorMessages = call_user_func_array([$this, 'validationErrorMessages'], $resolutionArguments);\n $validator = $this->getValidator($inputArguments, $resolvedRules, $validationErrorMessages);\n if ($validator->fails()) {\n throw (new ValidationError('validation'))->setValidator($validator);\n }\n }\n }", "public function validateResolved();" ]
[ "0.6084363", "0.5932464", "0.5608582", "0.55777574", "0.5451368", "0.54418534", "0.54231936", "0.5422019", "0.5397647", "0.5388053", "0.5361162", "0.53166896", "0.530501", "0.5301431", "0.5282658", "0.52696484", "0.5256391", "0.5239617", "0.5213742", "0.5208621", "0.5175152", "0.51739466", "0.515704", "0.5128186", "0.50929123", "0.5047197", "0.50423676", "0.5038366", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.5025046", "0.5017399", "0.5007184", "0.5002242", "0.49982366", "0.49968874", "0.49679834", "0.49424085", "0.49424085", "0.49393523", "0.4933294", "0.49287504", "0.49282792", "0.4923522", "0.4919315", "0.491243", "0.4900123", "0.48990288", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48927826", "0.48926798", "0.48864648", "0.48857507", "0.48758167", "0.48724747", "0.48587644", "0.48503888", "0.48442018", "0.48442018", "0.48374477", "0.4835018", "0.4835018", "0.48282436", "0.48273662", "0.48243818", "0.482248", "0.4814814", "0.48117992", "0.48102224", "0.48090222", "0.48047405", "0.4801734", "0.47969347", "0.47952825", "0.47952825", "0.47952825", "0.47952825", "0.47929466", "0.47921243", "0.47908908", "0.479082", "0.4788136", "0.4787115", "0.4782323" ]
0.0
-1
Validate the RPC caller context.
public function setLink($params, $context) { $this->validateMethodContext($context, ["role" => OMV_ROLE_ADMINISTRATOR]); // Validate the parameters of the RPC service method. $this->validateMethodParams($params, "rpc.webdesk.setlink"); // Prepare the configuration object. $object = new \OMV\Config\ConfigObject("conf.service.webdesk.link"); $object->setAssoc($params); // Set the configuration object. $isNew = $object->isNew(); $db = \OMV\Config\Database::getInstance(); /*if (TRUE === $isNew) { // Check uniqueness - Linkd folder $db->assertIsUnique($object, "uuid"); }*/ $db->set($object); // Return the configuration object. return $object->getAssoc(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateWebhookCall()\n {\n // If the webhook was called with an invalid method, throw an error\n if($_SERVER['REQUEST_METHOD'] != 'POST'){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_method',\n ]));\n }\n\n // If the webhook was called without any auth header, throw another error\n if (!isset($_SERVER['HTTP_AUTHORIZATION']) || empty($_SERVER['HTTP_AUTHORIZATION'])) {\n die(json_encode([\n 'success' => false,\n 'error' => 'no_auth_header',\n ]));\n }\n\n if($_SERVER['HTTP_AUTHORIZATION'] != Config::i()->getSXApiKey()){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_auth',\n ]));\n }\n }", "public function testCallReturnTrue()\n {\n $validator = new Rpc( 'SampleRpc' );\n $validator->setMethod( __FUNCTION__ );\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', array( 'context' ) ) ) )\n ->will( $this->returnValue( true ) );\n\n $this->assertTrue( $validator->isValid( 'value', array( 'context' ) ) );\n }", "public function validate(ValueContext $valueContext);", "public function validateRequest();", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "protected function _validate() {\n\t}", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function validateArguments() {}", "protected function isValidModuleRequest() {}", "public static function validate() {}", "public function isValid(Context $context)\n\t{\n\t\treturn true;\n\t}", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "protected function localValidation()\n\t\t{\n\t\t}", "protected function validateOrThrow() {}", "private function validateCall($call)\n {\n $result = null;\n $error = null;\n $data = null;\n $id = is_object($call) && property_exists($call, 'id') ? $call->id : null;\n do {\n if (!is_object($call)) {\n $error = self::InvalidRequest;\n break;\n }\n\n // hack for inputEx smd tester\n if (property_exists($call, 'version')) {\n if ($call->version == 'json-rpc-2.0') {\n $call->jsonrpc = '2.0';\n }\n }\n\n if (!property_exists($call, 'jsonrpc') || $call->jsonrpc != '2.0') {\n $error = self::InvalidRequest;\n break;\n }\n\n $fullMethod = property_exists($call, 'method') ? $call->method : '';\n $methodInfo = explode('.', $fullMethod, 2);\n $namespace = array_key_exists(1, $methodInfo) ? $methodInfo[0] : '';\n $method = $namespace ? $methodInfo[1] : $fullMethod;\n if (!$method || !array_key_exists($namespace, $this->instances) || !method_exists($this->instances[$namespace], $method) || in_array(strtolower($method), $this->hiddenMethods)) {\n $error = self::MethodNotFound;\n break;\n }\n\n if (!array_key_exists($fullMethod, $this->reflectionMethods)) {\n $this->reflectionMethods[$fullMethod] = new ReflectionMethod($this->instances[$namespace], $method);\n }\n\n /** @var $params array */\n $params = property_exists($call, 'params') ? $call->params : null;\n $paramsType = gettype($params);\n if ($params !== null && $paramsType != 'array' && $paramsType != 'object') {\n $error = self::InvalidParams;\n break;\n }\n\n // check parameters\n switch ($paramsType) {\n case 'array':\n $totalRequired = 0;\n // doesn't hold required, null, required sequence of params\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable()) {\n $totalRequired++;\n }\n }\n\n if (count($params) < $totalRequired) {\n $error = self::InvalidParams;\n $data = sprintf('Check numbers of required params (got %d, expected %d)', count($params), $totalRequired);\n }\n break;\n case 'object':\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable() && !array_key_exists($param->getName(), $params)) {\n $error = self::InvalidParams;\n $data = $param->getName() . ' not found';\n\n break 3;\n }\n }\n break;\n case 'NULL':\n if ($this->reflectionMethods[$fullMethod]->getNumberOfRequiredParameters() > 0) {\n $error = self::InvalidParams;\n $data = 'Empty required params';\n break 2;\n }\n break;\n }\n\n } while (false);\n\n if ($error) {\n $result = array($error, $id, $data);\n }\n\n return $result;\n }", "protected function validate()\n {\n }", "public function isValidRequest() {\n }", "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "protected function preValidate() {}", "public function testCallReturnErrorString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( __METHOD__ ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( __METHOD__, $validator->getMessages() );\n }", "public function validate()\n {\n $this->httpRequest->request;\n foreach (func_get_args() as $key) {\n $value = $this->parameters->get($key);\n if (! isset($value)) {\n throw new InvalidRequestException(\"The $key parameter is required\");\n }\n }\n }", "public function validateResolved()\n {\n $this->addRequestChecks();\n\n parent::validateResolved();\n }", "public function validateCallParameter() {\n if ($this->call_asset['parameter']) {\n // Validate parameters to a call.\n // Array, defining each parameter allowed in a call with the expected\n // data type of the value.\n $call_parameter = $this->call_parameter;\n // Parameters of the call request as seen in the request call.\n $call_request_parameter = $this->call_asset['parameter'];\n\n // Validate each parameter.\n foreach($call_request_parameter as $key => $value) {\n if (array_key_exists($key, $call_parameter)) {\n // Key in the request matches predefined parameter of the call.\n $is_valid = $this->matchDataType($value, $call_parameter[ $key ]);\n \n // Value should only match the enumerated value.\n if (is_array($call_parameter[ $key ])) {\n $call_parameter[ $key ] = 'one: ' . implode(',', $call_parameter[ $key ]) . ' - list';\n }\n\n if (!$is_valid) {\n // Data type mismatch.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' expects ' . $call_parameter[ $key ] . ' type.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n else {\n // Undefined parameter to this call.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' not expected for this call.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n }\n }", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "public function testCallReturnNull()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( null ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_NULL, $validator->getMessages() );\n }", "public function cli_validateArgs() {}", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function validateDev()\n {\n return parent::validate();\n }", "protected function validateEventContext(Event $event)\n {\n self::assertSame(\n $this->metadata[ RequestExecutorInterface::META_USER_CONTEXT ],\n $event->getContext(),\n 'Incorrect context'\n );\n }", "public function allowedContexts() {}", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function validated();", "public function doValidate(&$uri, $config, $context) {\n\t\treturn true;\n\t}", "public function validate()\n { \n try {\n $clientToken = $this->serviceGateway->clientToken()->generate([\n \"customerId\" => '123'\n ]);\n } catch (\\Braintree_Exception_Authentication $e) {\n throw new \\Exception('Braintree Exception Authentication Failed');\n } catch (\\Exception $e) {\n // do nothing\n }\n }", "abstract public function validate();", "abstract public function validate();", "protected function validateRequest()\n {\n $validators = [\n 'hasClientId' => null,\n 'knownClientId' => null,\n 'timestamp' => 'signed',\n 'hasSignature' => 'signed',\n 'notExpiredTimestamp' => 'signed',\n 'signature' => 'signed',\n ];\n\n foreach ($validators as $validator => $condition) {\n // First make sure the conditions are fulfilled for the validator\n if ($condition) {\n $method = camel_case('validCondition_'.$condition);\n\n if (! $this->{$method}()) {\n continue;\n }\n }\n\n $method = camel_case('valid_'.$validator);\n $this->{$method}();\n }\n }", "protected function strictlyValidateClient()\n\t{\n\t\treturn $this->validateClient(true);\n\t}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "public function ValidateUserInput()\n {\n $bIsValid = parent::ValidateUserInput();\n\n if ($bIsValid) {\n $oMsgManager = TCMSMessageManager::GetInstance();\n\n if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('accountNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('bankNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['bankNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-bankNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n }\n\n return $bIsValid;\n }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "public function testCallReturnFalse()\n {\n $validator = new Rpc( new ArrayIterator( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( false ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_FALSE, $validator->getMessages() );\n }", "public function valid(){ }", "public function validate_referrer() {\n $status_code = 'ACCESS_RESTRICTED';\n\n preg_match( '~' . site_url() . '~', $_SERVER[ 'HTTP_REFERER' ], $matches );\n\n if ( ! isset( $matches[0] ) || ! wp_get_referer() ) {\n $this->error_occurred( $status_code );\n }\n }", "public function verifyRequest()\n {\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "function is_validated($username = null, $password = null){\n return validate_cred($username, $password);\n}", "public function bmo_validate_request(){\n\t\t $this->is_google = $this->is_request_google();\n\t\t if( ! $this->is_google ) return; // Move along if this isn't even a google request\n\n\t\t //If this is a google request, validate the $_GET[ 'code' ] param\n\t\t $this->valid = $this->google_client->validate_code( $_GET[ 'code' ] );\n\n\t\t //Let's strip the $_GET[ 'code' ] param so nothing else can use it\n\t\t $strip = $this->strip_code_param();\n\n\t\t //Get the Google User\n\t\t $this->google_user = $this->google_client->get_google_user();\n\n\t\t //Check if the Google User Email is allowed agains our list of Approved Domains\n\t\t $approved = $this->approve_google_user();\n\n\t\t return;\n\t}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "public function validate()\n {\n $requiredArguments = $this->getRequiredArguments();\n \n foreach ($requiredArguments as $arg) {\n if ( ! isset($this->arguments[$arg])) {\n return false;\n }\n }\n \n return true;\n }", "public function validateState() {\n\t\tif($this->verification != null){\n\t\t\tthrow new PoserException(\"Mocking is in a invalid state there is a verification currently active\");\n\t\t}\n\t\t\n\t\t$this->argumentMatcherMonitor->validateState();\n\t\t//TODO report that there is unfinished stubbing and verification\n\t}", "public function testCallReturnObjectContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( (object) array(\n 'success' => true\n ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "public function validate()\n {\n return $this->ensureExtensionLoaded() &&\n $this->validateSourceLocation() &&\n $this->validateCondition() &&\n $this->validateExpressions();\n }", "public function validate() {\n }", "public function validate() {\n }", "public function validate($args){\r\n\t\t$responseReceived = false;\r\n\t\tif (!(isset($this->sessionID))){\r\n\t\t\tif ($this->serverDownShouldModerate()){\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}else{\r\n\t\t\t\t// no session ID but the server hasn't experienced downtime.\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$args['lofi'] = $this->languageOrFrameworkID;\r\n\t\t\t$args['lofv'] = $this->languageOrFrameworkVersion;\r\n\t\t\t$args['k'] = $this->accountID;\r\n\t\t\t$args['pwd'] = $this->privateKey;\r\n\t\t\t$args['ua'] = $this->userAction;\r\n if (isset($this->customerSessionID)){\r\n $args['c'] = $this->customerSessionID;\r\n }\r\n\t\t\t$args['upow'] = $this->useProofOfWorkCaptcha ? \"1\" : \"0\";\r\n\t\t\t$args['powt'] = $this->proofOfWorkTime;\r\n\t\t\t$xmlresponse = $this->postData($this->baseURL, \"/validate\", $this->useSSL, $args);\r\n\t\t\tif ($xmlresponse){\r\n\t\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\t\tif ($doc){\r\n\t\t\t\t\t$isValidResponse = $doc->getElementsByTagName('isValid');\r\n\t\t\t\t\tif (!($isValidResponse && $isValidResponse->item(0))){\r\n\t\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// parse out result from spamcaptcher server\r\n\t\t\t\t\t\t$this->spamScore = $doc->getElementsByTagName('spamScore')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$this->isValid = $this->strToBoolean($doc->getElementsByTagName('isValid')->item(0)->nodeValue);\r\n\t\t\t\t\t\t$responseReceived = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($responseReceived){\r\n\t\t\tif (!$this->isValid){\r\n\t\t\t\t// CAPTCHA was NOT solved correctly AND no TrustMe Account was used\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}else{\r\n\t\t\t\tif ($this->spamScore > $this->MAX_MODERATE_SCORE){\r\n\t\t\t\t\t// SpamScore is too high\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t\t}elseif ($this->spamScore > $this->MAX_PASSABLE_SCORE){\r\n\t\t\t\t\t// SpamScore is questionable\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Goldilocks is happy with the SpamScore\r\n\t\t\t\t\t// Yes yes, technically one of the scores\r\n\t\t\t\t\t// should have been \"too low\" for me to make\r\n\t\t\t\t\t// a Goldilocks reference ... I don't care.\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_PASS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->recommendedAction;\r\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "abstract public function valid();", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function testCallReturnArrayContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( array( true ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function valid()\n {\n if ($this->container['call_session_history_id'] === null) {\n return false;\n }\n if ($this->container['account_id'] === null) {\n return false;\n }\n if ($this->container['application_id'] === null) {\n return false;\n }\n if ($this->container['user_id'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['initiator_address'] === null) {\n return false;\n }\n if ($this->container['media_server_address'] === null) {\n return false;\n }\n if ($this->container['log_file_url'] === null) {\n return false;\n }\n return true;\n }", "private function validate()\r\n\t{\r\n\t\tif (!ctype_digit($this -> curComm))\r\n\t\t{\r\n\t\t\t$this -> Error('er1');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the user with chat_id exists\r\n\t\tif (!($this -> Exists()))\r\n\t\t{\r\n\t\t\t$this -> Error('er2');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the inputed chat_id = user chat_id\r\n\t\tif (($this -> isSelf()))\r\n\t\t{\r\n\t\t\t$this -> Error('er3');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 1;\t \t\r\n\t}", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "public function testCallReturnEmpty()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( 0 ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_EMPTY, $validator->getMessages() );\n }", "public function checkValidity()\r\n {\r\n if (!parent::checkValidity())\r\n return false;\r\n\r\n if (!$this->checkUniqueCode())\r\n return false;\r\n \r\n if ($this->workflowState && strlen($this->workflowState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_WORKFLOWSTATE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->name . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->name) > 255)\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->code . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->code) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->fromState && strlen($this->fromState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->toState && strlen($this->toState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n } \r\n \r\n return true;\r\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public abstract function validation();", "public function validate() {\n\n\t\tif ($this->getPrimaryAccountNumber() === null) {\n\t\t\tthrow new ValidationException(\"'primaryAccountNumber' can't be null\", 'primaryAccountNumber', $this);\n\t\t}\n\t}", "public function validate() { return TRUE; }", "public function testCallReturnEmptyString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( '' ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "protected function validate()\n {\n $resolutionArguments = func_get_args();\n $inputArguments = array_get($resolutionArguments, 1, []);\n\n $argumentRules = $this->getRulesForArguments($this->args(), $inputArguments);\n $explicitRules = call_user_func_array([$this, 'rules'], $resolutionArguments);\n $argumentRules = array_merge($argumentRules, $explicitRules);\n\n foreach ($argumentRules as $key => $rules) {\n $resolvedRules[$key] = $this->resolveRules($rules, $resolutionArguments);\n }\n\n if (isset($resolvedRules)) {\n $validationErrorMessages = call_user_func_array([$this, 'validationErrorMessages'], $resolutionArguments);\n $validator = $this->getValidator($inputArguments, $resolvedRules, $validationErrorMessages);\n if ($validator->fails()) {\n throw (new ValidationError('validation'))->setValidator($validator);\n }\n }\n }", "public function validateResolved();" ]
[ "0.6084363", "0.5932464", "0.5608582", "0.55777574", "0.5451368", "0.54418534", "0.54231936", "0.5422019", "0.5397647", "0.5388053", "0.5361162", "0.53166896", "0.530501", "0.5301431", "0.5282658", "0.52696484", "0.5256391", "0.5239617", "0.5213742", "0.5208621", "0.5175152", "0.51739466", "0.515704", "0.5128186", "0.50929123", "0.5047197", "0.50423676", "0.5038366", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.5025046", "0.5017399", "0.5007184", "0.5002242", "0.49982366", "0.49968874", "0.49679834", "0.49424085", "0.49424085", "0.49393523", "0.4933294", "0.49287504", "0.49282792", "0.4923522", "0.4919315", "0.491243", "0.4900123", "0.48990288", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48927826", "0.48926798", "0.48864648", "0.48857507", "0.48758167", "0.48724747", "0.48587644", "0.48503888", "0.48442018", "0.48442018", "0.48374477", "0.4835018", "0.4835018", "0.48282436", "0.48273662", "0.48243818", "0.482248", "0.4814814", "0.48117992", "0.48102224", "0.48090222", "0.48047405", "0.4801734", "0.47969347", "0.47952825", "0.47952825", "0.47952825", "0.47952825", "0.47929466", "0.47921243", "0.47908908", "0.479082", "0.4788136", "0.4787115", "0.4782323" ]
0.0
-1
Validate the RPC caller context.
public function deleteLink($params, $context) { $this->validateMethodContext($context, ["role" => OMV_ROLE_ADMINISTRATOR]); // Validate the parameters of the RPC service method. $this->validateMethodParams($params, "rpc.common.objectuuid"); // Delete the configuration object. $db = \OMV\Config\Database::getInstance(); $object = $db->get("conf.service.webdesk.link", $params['uuid']); $db->delete($object); // Return the deleted configuration object. return $object->getAssoc(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateWebhookCall()\n {\n // If the webhook was called with an invalid method, throw an error\n if($_SERVER['REQUEST_METHOD'] != 'POST'){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_method',\n ]));\n }\n\n // If the webhook was called without any auth header, throw another error\n if (!isset($_SERVER['HTTP_AUTHORIZATION']) || empty($_SERVER['HTTP_AUTHORIZATION'])) {\n die(json_encode([\n 'success' => false,\n 'error' => 'no_auth_header',\n ]));\n }\n\n if($_SERVER['HTTP_AUTHORIZATION'] != Config::i()->getSXApiKey()){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_auth',\n ]));\n }\n }", "public function testCallReturnTrue()\n {\n $validator = new Rpc( 'SampleRpc' );\n $validator->setMethod( __FUNCTION__ );\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', array( 'context' ) ) ) )\n ->will( $this->returnValue( true ) );\n\n $this->assertTrue( $validator->isValid( 'value', array( 'context' ) ) );\n }", "public function validate(ValueContext $valueContext);", "public function validateRequest();", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "protected function _validate() {\n\t}", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function validateArguments() {}", "protected function isValidModuleRequest() {}", "public static function validate() {}", "public function isValid(Context $context)\n\t{\n\t\treturn true;\n\t}", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "protected function localValidation()\n\t\t{\n\t\t}", "protected function validateOrThrow() {}", "private function validateCall($call)\n {\n $result = null;\n $error = null;\n $data = null;\n $id = is_object($call) && property_exists($call, 'id') ? $call->id : null;\n do {\n if (!is_object($call)) {\n $error = self::InvalidRequest;\n break;\n }\n\n // hack for inputEx smd tester\n if (property_exists($call, 'version')) {\n if ($call->version == 'json-rpc-2.0') {\n $call->jsonrpc = '2.0';\n }\n }\n\n if (!property_exists($call, 'jsonrpc') || $call->jsonrpc != '2.0') {\n $error = self::InvalidRequest;\n break;\n }\n\n $fullMethod = property_exists($call, 'method') ? $call->method : '';\n $methodInfo = explode('.', $fullMethod, 2);\n $namespace = array_key_exists(1, $methodInfo) ? $methodInfo[0] : '';\n $method = $namespace ? $methodInfo[1] : $fullMethod;\n if (!$method || !array_key_exists($namespace, $this->instances) || !method_exists($this->instances[$namespace], $method) || in_array(strtolower($method), $this->hiddenMethods)) {\n $error = self::MethodNotFound;\n break;\n }\n\n if (!array_key_exists($fullMethod, $this->reflectionMethods)) {\n $this->reflectionMethods[$fullMethod] = new ReflectionMethod($this->instances[$namespace], $method);\n }\n\n /** @var $params array */\n $params = property_exists($call, 'params') ? $call->params : null;\n $paramsType = gettype($params);\n if ($params !== null && $paramsType != 'array' && $paramsType != 'object') {\n $error = self::InvalidParams;\n break;\n }\n\n // check parameters\n switch ($paramsType) {\n case 'array':\n $totalRequired = 0;\n // doesn't hold required, null, required sequence of params\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable()) {\n $totalRequired++;\n }\n }\n\n if (count($params) < $totalRequired) {\n $error = self::InvalidParams;\n $data = sprintf('Check numbers of required params (got %d, expected %d)', count($params), $totalRequired);\n }\n break;\n case 'object':\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable() && !array_key_exists($param->getName(), $params)) {\n $error = self::InvalidParams;\n $data = $param->getName() . ' not found';\n\n break 3;\n }\n }\n break;\n case 'NULL':\n if ($this->reflectionMethods[$fullMethod]->getNumberOfRequiredParameters() > 0) {\n $error = self::InvalidParams;\n $data = 'Empty required params';\n break 2;\n }\n break;\n }\n\n } while (false);\n\n if ($error) {\n $result = array($error, $id, $data);\n }\n\n return $result;\n }", "protected function validate()\n {\n }", "public function isValidRequest() {\n }", "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "protected function preValidate() {}", "public function testCallReturnErrorString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( __METHOD__ ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( __METHOD__, $validator->getMessages() );\n }", "public function validate()\n {\n $this->httpRequest->request;\n foreach (func_get_args() as $key) {\n $value = $this->parameters->get($key);\n if (! isset($value)) {\n throw new InvalidRequestException(\"The $key parameter is required\");\n }\n }\n }", "public function validateResolved()\n {\n $this->addRequestChecks();\n\n parent::validateResolved();\n }", "public function validateCallParameter() {\n if ($this->call_asset['parameter']) {\n // Validate parameters to a call.\n // Array, defining each parameter allowed in a call with the expected\n // data type of the value.\n $call_parameter = $this->call_parameter;\n // Parameters of the call request as seen in the request call.\n $call_request_parameter = $this->call_asset['parameter'];\n\n // Validate each parameter.\n foreach($call_request_parameter as $key => $value) {\n if (array_key_exists($key, $call_parameter)) {\n // Key in the request matches predefined parameter of the call.\n $is_valid = $this->matchDataType($value, $call_parameter[ $key ]);\n \n // Value should only match the enumerated value.\n if (is_array($call_parameter[ $key ])) {\n $call_parameter[ $key ] = 'one: ' . implode(',', $call_parameter[ $key ]) . ' - list';\n }\n\n if (!$is_valid) {\n // Data type mismatch.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' expects ' . $call_parameter[ $key ] . ' type.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n else {\n // Undefined parameter to this call.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' not expected for this call.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n }\n }", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "public function testCallReturnNull()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( null ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_NULL, $validator->getMessages() );\n }", "public function cli_validateArgs() {}", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function validateDev()\n {\n return parent::validate();\n }", "protected function validateEventContext(Event $event)\n {\n self::assertSame(\n $this->metadata[ RequestExecutorInterface::META_USER_CONTEXT ],\n $event->getContext(),\n 'Incorrect context'\n );\n }", "public function allowedContexts() {}", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function validated();", "public function doValidate(&$uri, $config, $context) {\n\t\treturn true;\n\t}", "public function validate()\n { \n try {\n $clientToken = $this->serviceGateway->clientToken()->generate([\n \"customerId\" => '123'\n ]);\n } catch (\\Braintree_Exception_Authentication $e) {\n throw new \\Exception('Braintree Exception Authentication Failed');\n } catch (\\Exception $e) {\n // do nothing\n }\n }", "abstract public function validate();", "abstract public function validate();", "protected function validateRequest()\n {\n $validators = [\n 'hasClientId' => null,\n 'knownClientId' => null,\n 'timestamp' => 'signed',\n 'hasSignature' => 'signed',\n 'notExpiredTimestamp' => 'signed',\n 'signature' => 'signed',\n ];\n\n foreach ($validators as $validator => $condition) {\n // First make sure the conditions are fulfilled for the validator\n if ($condition) {\n $method = camel_case('validCondition_'.$condition);\n\n if (! $this->{$method}()) {\n continue;\n }\n }\n\n $method = camel_case('valid_'.$validator);\n $this->{$method}();\n }\n }", "protected function strictlyValidateClient()\n\t{\n\t\treturn $this->validateClient(true);\n\t}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "public function ValidateUserInput()\n {\n $bIsValid = parent::ValidateUserInput();\n\n if ($bIsValid) {\n $oMsgManager = TCMSMessageManager::GetInstance();\n\n if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('accountNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('bankNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['bankNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-bankNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n }\n\n return $bIsValid;\n }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "public function testCallReturnFalse()\n {\n $validator = new Rpc( new ArrayIterator( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( false ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_FALSE, $validator->getMessages() );\n }", "public function valid(){ }", "public function validate_referrer() {\n $status_code = 'ACCESS_RESTRICTED';\n\n preg_match( '~' . site_url() . '~', $_SERVER[ 'HTTP_REFERER' ], $matches );\n\n if ( ! isset( $matches[0] ) || ! wp_get_referer() ) {\n $this->error_occurred( $status_code );\n }\n }", "public function verifyRequest()\n {\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "function is_validated($username = null, $password = null){\n return validate_cred($username, $password);\n}", "public function bmo_validate_request(){\n\t\t $this->is_google = $this->is_request_google();\n\t\t if( ! $this->is_google ) return; // Move along if this isn't even a google request\n\n\t\t //If this is a google request, validate the $_GET[ 'code' ] param\n\t\t $this->valid = $this->google_client->validate_code( $_GET[ 'code' ] );\n\n\t\t //Let's strip the $_GET[ 'code' ] param so nothing else can use it\n\t\t $strip = $this->strip_code_param();\n\n\t\t //Get the Google User\n\t\t $this->google_user = $this->google_client->get_google_user();\n\n\t\t //Check if the Google User Email is allowed agains our list of Approved Domains\n\t\t $approved = $this->approve_google_user();\n\n\t\t return;\n\t}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "public function validate()\n {\n $requiredArguments = $this->getRequiredArguments();\n \n foreach ($requiredArguments as $arg) {\n if ( ! isset($this->arguments[$arg])) {\n return false;\n }\n }\n \n return true;\n }", "public function validateState() {\n\t\tif($this->verification != null){\n\t\t\tthrow new PoserException(\"Mocking is in a invalid state there is a verification currently active\");\n\t\t}\n\t\t\n\t\t$this->argumentMatcherMonitor->validateState();\n\t\t//TODO report that there is unfinished stubbing and verification\n\t}", "public function testCallReturnObjectContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( (object) array(\n 'success' => true\n ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "public function validate()\n {\n return $this->ensureExtensionLoaded() &&\n $this->validateSourceLocation() &&\n $this->validateCondition() &&\n $this->validateExpressions();\n }", "public function validate() {\n }", "public function validate() {\n }", "public function validate($args){\r\n\t\t$responseReceived = false;\r\n\t\tif (!(isset($this->sessionID))){\r\n\t\t\tif ($this->serverDownShouldModerate()){\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}else{\r\n\t\t\t\t// no session ID but the server hasn't experienced downtime.\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$args['lofi'] = $this->languageOrFrameworkID;\r\n\t\t\t$args['lofv'] = $this->languageOrFrameworkVersion;\r\n\t\t\t$args['k'] = $this->accountID;\r\n\t\t\t$args['pwd'] = $this->privateKey;\r\n\t\t\t$args['ua'] = $this->userAction;\r\n if (isset($this->customerSessionID)){\r\n $args['c'] = $this->customerSessionID;\r\n }\r\n\t\t\t$args['upow'] = $this->useProofOfWorkCaptcha ? \"1\" : \"0\";\r\n\t\t\t$args['powt'] = $this->proofOfWorkTime;\r\n\t\t\t$xmlresponse = $this->postData($this->baseURL, \"/validate\", $this->useSSL, $args);\r\n\t\t\tif ($xmlresponse){\r\n\t\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\t\tif ($doc){\r\n\t\t\t\t\t$isValidResponse = $doc->getElementsByTagName('isValid');\r\n\t\t\t\t\tif (!($isValidResponse && $isValidResponse->item(0))){\r\n\t\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// parse out result from spamcaptcher server\r\n\t\t\t\t\t\t$this->spamScore = $doc->getElementsByTagName('spamScore')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$this->isValid = $this->strToBoolean($doc->getElementsByTagName('isValid')->item(0)->nodeValue);\r\n\t\t\t\t\t\t$responseReceived = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($responseReceived){\r\n\t\t\tif (!$this->isValid){\r\n\t\t\t\t// CAPTCHA was NOT solved correctly AND no TrustMe Account was used\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}else{\r\n\t\t\t\tif ($this->spamScore > $this->MAX_MODERATE_SCORE){\r\n\t\t\t\t\t// SpamScore is too high\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t\t}elseif ($this->spamScore > $this->MAX_PASSABLE_SCORE){\r\n\t\t\t\t\t// SpamScore is questionable\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Goldilocks is happy with the SpamScore\r\n\t\t\t\t\t// Yes yes, technically one of the scores\r\n\t\t\t\t\t// should have been \"too low\" for me to make\r\n\t\t\t\t\t// a Goldilocks reference ... I don't care.\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_PASS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->recommendedAction;\r\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "abstract public function valid();", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function testCallReturnArrayContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( array( true ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function valid()\n {\n if ($this->container['call_session_history_id'] === null) {\n return false;\n }\n if ($this->container['account_id'] === null) {\n return false;\n }\n if ($this->container['application_id'] === null) {\n return false;\n }\n if ($this->container['user_id'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['initiator_address'] === null) {\n return false;\n }\n if ($this->container['media_server_address'] === null) {\n return false;\n }\n if ($this->container['log_file_url'] === null) {\n return false;\n }\n return true;\n }", "private function validate()\r\n\t{\r\n\t\tif (!ctype_digit($this -> curComm))\r\n\t\t{\r\n\t\t\t$this -> Error('er1');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the user with chat_id exists\r\n\t\tif (!($this -> Exists()))\r\n\t\t{\r\n\t\t\t$this -> Error('er2');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the inputed chat_id = user chat_id\r\n\t\tif (($this -> isSelf()))\r\n\t\t{\r\n\t\t\t$this -> Error('er3');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 1;\t \t\r\n\t}", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "public function testCallReturnEmpty()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( 0 ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_EMPTY, $validator->getMessages() );\n }", "public function checkValidity()\r\n {\r\n if (!parent::checkValidity())\r\n return false;\r\n\r\n if (!$this->checkUniqueCode())\r\n return false;\r\n \r\n if ($this->workflowState && strlen($this->workflowState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_WORKFLOWSTATE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->name . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->name) > 255)\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->code . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->code) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->fromState && strlen($this->fromState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->toState && strlen($this->toState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n } \r\n \r\n return true;\r\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public abstract function validation();", "public function validate() {\n\n\t\tif ($this->getPrimaryAccountNumber() === null) {\n\t\t\tthrow new ValidationException(\"'primaryAccountNumber' can't be null\", 'primaryAccountNumber', $this);\n\t\t}\n\t}", "public function validate() { return TRUE; }", "public function testCallReturnEmptyString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( '' ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "protected function validate()\n {\n $resolutionArguments = func_get_args();\n $inputArguments = array_get($resolutionArguments, 1, []);\n\n $argumentRules = $this->getRulesForArguments($this->args(), $inputArguments);\n $explicitRules = call_user_func_array([$this, 'rules'], $resolutionArguments);\n $argumentRules = array_merge($argumentRules, $explicitRules);\n\n foreach ($argumentRules as $key => $rules) {\n $resolvedRules[$key] = $this->resolveRules($rules, $resolutionArguments);\n }\n\n if (isset($resolvedRules)) {\n $validationErrorMessages = call_user_func_array([$this, 'validationErrorMessages'], $resolutionArguments);\n $validator = $this->getValidator($inputArguments, $resolvedRules, $validationErrorMessages);\n if ($validator->fails()) {\n throw (new ValidationError('validation'))->setValidator($validator);\n }\n }\n }", "public function validateResolved();" ]
[ "0.6084363", "0.5932464", "0.5608582", "0.55777574", "0.5451368", "0.54418534", "0.54231936", "0.5422019", "0.5397647", "0.5388053", "0.5361162", "0.53166896", "0.530501", "0.5301431", "0.5282658", "0.52696484", "0.5256391", "0.5239617", "0.5213742", "0.5208621", "0.5175152", "0.51739466", "0.515704", "0.5128186", "0.50929123", "0.5047197", "0.50423676", "0.5038366", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.5025046", "0.5017399", "0.5007184", "0.5002242", "0.49982366", "0.49968874", "0.49679834", "0.49424085", "0.49424085", "0.49393523", "0.4933294", "0.49287504", "0.49282792", "0.4923522", "0.4919315", "0.491243", "0.4900123", "0.48990288", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48927826", "0.48926798", "0.48864648", "0.48857507", "0.48758167", "0.48724747", "0.48587644", "0.48503888", "0.48442018", "0.48442018", "0.48374477", "0.4835018", "0.4835018", "0.48282436", "0.48273662", "0.48243818", "0.482248", "0.4814814", "0.48117992", "0.48102224", "0.48090222", "0.48047405", "0.4801734", "0.47969347", "0.47952825", "0.47952825", "0.47952825", "0.47952825", "0.47929466", "0.47921243", "0.47908908", "0.479082", "0.4788136", "0.4787115", "0.4782323" ]
0.0
-1
Validate the RPC caller context.
public function doRescan($params, $context) { $this->validateMethodContext($context, ["role" => OMV_ROLE_ADMINISTRATOR]); // Get the configuration object. $db = \OMV\Config\Database::getInstance(); $object = $db->get("conf.service.webdesk"); if (TRUE !== $object->get("enable")) return; exec("systemctl force-reload webdesk", $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateWebhookCall()\n {\n // If the webhook was called with an invalid method, throw an error\n if($_SERVER['REQUEST_METHOD'] != 'POST'){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_method',\n ]));\n }\n\n // If the webhook was called without any auth header, throw another error\n if (!isset($_SERVER['HTTP_AUTHORIZATION']) || empty($_SERVER['HTTP_AUTHORIZATION'])) {\n die(json_encode([\n 'success' => false,\n 'error' => 'no_auth_header',\n ]));\n }\n\n if($_SERVER['HTTP_AUTHORIZATION'] != Config::i()->getSXApiKey()){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_auth',\n ]));\n }\n }", "public function testCallReturnTrue()\n {\n $validator = new Rpc( 'SampleRpc' );\n $validator->setMethod( __FUNCTION__ );\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', array( 'context' ) ) ) )\n ->will( $this->returnValue( true ) );\n\n $this->assertTrue( $validator->isValid( 'value', array( 'context' ) ) );\n }", "public function validate(ValueContext $valueContext);", "public function validateRequest();", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "protected function _validate() {\n\t}", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function validateArguments() {}", "protected function isValidModuleRequest() {}", "public static function validate() {}", "public function isValid(Context $context)\n\t{\n\t\treturn true;\n\t}", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "protected function localValidation()\n\t\t{\n\t\t}", "protected function validateOrThrow() {}", "private function validateCall($call)\n {\n $result = null;\n $error = null;\n $data = null;\n $id = is_object($call) && property_exists($call, 'id') ? $call->id : null;\n do {\n if (!is_object($call)) {\n $error = self::InvalidRequest;\n break;\n }\n\n // hack for inputEx smd tester\n if (property_exists($call, 'version')) {\n if ($call->version == 'json-rpc-2.0') {\n $call->jsonrpc = '2.0';\n }\n }\n\n if (!property_exists($call, 'jsonrpc') || $call->jsonrpc != '2.0') {\n $error = self::InvalidRequest;\n break;\n }\n\n $fullMethod = property_exists($call, 'method') ? $call->method : '';\n $methodInfo = explode('.', $fullMethod, 2);\n $namespace = array_key_exists(1, $methodInfo) ? $methodInfo[0] : '';\n $method = $namespace ? $methodInfo[1] : $fullMethod;\n if (!$method || !array_key_exists($namespace, $this->instances) || !method_exists($this->instances[$namespace], $method) || in_array(strtolower($method), $this->hiddenMethods)) {\n $error = self::MethodNotFound;\n break;\n }\n\n if (!array_key_exists($fullMethod, $this->reflectionMethods)) {\n $this->reflectionMethods[$fullMethod] = new ReflectionMethod($this->instances[$namespace], $method);\n }\n\n /** @var $params array */\n $params = property_exists($call, 'params') ? $call->params : null;\n $paramsType = gettype($params);\n if ($params !== null && $paramsType != 'array' && $paramsType != 'object') {\n $error = self::InvalidParams;\n break;\n }\n\n // check parameters\n switch ($paramsType) {\n case 'array':\n $totalRequired = 0;\n // doesn't hold required, null, required sequence of params\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable()) {\n $totalRequired++;\n }\n }\n\n if (count($params) < $totalRequired) {\n $error = self::InvalidParams;\n $data = sprintf('Check numbers of required params (got %d, expected %d)', count($params), $totalRequired);\n }\n break;\n case 'object':\n foreach ($this->reflectionMethods[$fullMethod]->getParameters() as $param) {\n if (!$param->isDefaultValueAvailable() && !array_key_exists($param->getName(), $params)) {\n $error = self::InvalidParams;\n $data = $param->getName() . ' not found';\n\n break 3;\n }\n }\n break;\n case 'NULL':\n if ($this->reflectionMethods[$fullMethod]->getNumberOfRequiredParameters() > 0) {\n $error = self::InvalidParams;\n $data = 'Empty required params';\n break 2;\n }\n break;\n }\n\n } while (false);\n\n if ($error) {\n $result = array($error, $id, $data);\n }\n\n return $result;\n }", "protected function validate()\n {\n }", "public function isValidRequest() {\n }", "protected function isValid()\n {\n return !app('request') instanceof Request;\n }", "protected function preValidate() {}", "public function testCallReturnErrorString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( __METHOD__ ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( __METHOD__, $validator->getMessages() );\n }", "public function validate()\n {\n $this->httpRequest->request;\n foreach (func_get_args() as $key) {\n $value = $this->parameters->get($key);\n if (! isset($value)) {\n throw new InvalidRequestException(\"The $key parameter is required\");\n }\n }\n }", "public function validateResolved()\n {\n $this->addRequestChecks();\n\n parent::validateResolved();\n }", "public function validateCallParameter() {\n if ($this->call_asset['parameter']) {\n // Validate parameters to a call.\n // Array, defining each parameter allowed in a call with the expected\n // data type of the value.\n $call_parameter = $this->call_parameter;\n // Parameters of the call request as seen in the request call.\n $call_request_parameter = $this->call_asset['parameter'];\n\n // Validate each parameter.\n foreach($call_request_parameter as $key => $value) {\n if (array_key_exists($key, $call_parameter)) {\n // Key in the request matches predefined parameter of the call.\n $is_valid = $this->matchDataType($value, $call_parameter[ $key ]);\n \n // Value should only match the enumerated value.\n if (is_array($call_parameter[ $key ])) {\n $call_parameter[ $key ] = 'one: ' . implode(',', $call_parameter[ $key ]) . ' - list';\n }\n\n if (!$is_valid) {\n // Data type mismatch.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' expects ' . $call_parameter[ $key ] . ' type.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n else {\n // Undefined parameter to this call.\n $response = [\n 'code' => 400, // Bad Request.\n 'message' => 'Call: Parameter ' . $key . ' not expected for this call.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n\n // Error will exit, but break here to be clear that loop should halt on error.\n break;\n }\n }\n }\n }", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "public function testCallReturnNull()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( null ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_NULL, $validator->getMessages() );\n }", "public function cli_validateArgs() {}", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function validateDev()\n {\n return parent::validate();\n }", "protected function validateEventContext(Event $event)\n {\n self::assertSame(\n $this->metadata[ RequestExecutorInterface::META_USER_CONTEXT ],\n $event->getContext(),\n 'Incorrect context'\n );\n }", "public function allowedContexts() {}", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function validated();", "public function doValidate(&$uri, $config, $context) {\n\t\treturn true;\n\t}", "public function validate()\n { \n try {\n $clientToken = $this->serviceGateway->clientToken()->generate([\n \"customerId\" => '123'\n ]);\n } catch (\\Braintree_Exception_Authentication $e) {\n throw new \\Exception('Braintree Exception Authentication Failed');\n } catch (\\Exception $e) {\n // do nothing\n }\n }", "abstract public function validate();", "abstract public function validate();", "protected function validateRequest()\n {\n $validators = [\n 'hasClientId' => null,\n 'knownClientId' => null,\n 'timestamp' => 'signed',\n 'hasSignature' => 'signed',\n 'notExpiredTimestamp' => 'signed',\n 'signature' => 'signed',\n ];\n\n foreach ($validators as $validator => $condition) {\n // First make sure the conditions are fulfilled for the validator\n if ($condition) {\n $method = camel_case('validCondition_'.$condition);\n\n if (! $this->{$method}()) {\n continue;\n }\n }\n\n $method = camel_case('valid_'.$validator);\n $this->{$method}();\n }\n }", "protected function strictlyValidateClient()\n\t{\n\t\treturn $this->validateClient(true);\n\t}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "public function ValidateUserInput()\n {\n $bIsValid = parent::ValidateUserInput();\n\n if ($bIsValid) {\n $oMsgManager = TCMSMessageManager::GetInstance();\n\n if (!array_key_exists('accountOwner', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountOwner'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountOwner', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('accountNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['accountNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-accountNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n\n if (!array_key_exists('bankNr', $this->aPaymentUserData) || empty($this->aPaymentUserData['bankNr'])) {\n $oMsgManager->AddMessage(self::MSG_MANAGER_NAME.'-bankNr', 'ERROR-USER-REQUIRED-FIELD-MISSING');\n $bIsValid = false;\n }\n }\n\n return $bIsValid;\n }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "public function testCallReturnFalse()\n {\n $validator = new Rpc( new ArrayIterator( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( false ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_FALSE, $validator->getMessages() );\n }", "public function valid(){ }", "public function validate_referrer() {\n $status_code = 'ACCESS_RESTRICTED';\n\n preg_match( '~' . site_url() . '~', $_SERVER[ 'HTTP_REFERER' ], $matches );\n\n if ( ! isset( $matches[0] ) || ! wp_get_referer() ) {\n $this->error_occurred( $status_code );\n }\n }", "public function verifyRequest()\n {\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "function is_validated($username = null, $password = null){\n return validate_cred($username, $password);\n}", "public function bmo_validate_request(){\n\t\t $this->is_google = $this->is_request_google();\n\t\t if( ! $this->is_google ) return; // Move along if this isn't even a google request\n\n\t\t //If this is a google request, validate the $_GET[ 'code' ] param\n\t\t $this->valid = $this->google_client->validate_code( $_GET[ 'code' ] );\n\n\t\t //Let's strip the $_GET[ 'code' ] param so nothing else can use it\n\t\t $strip = $this->strip_code_param();\n\n\t\t //Get the Google User\n\t\t $this->google_user = $this->google_client->get_google_user();\n\n\t\t //Check if the Google User Email is allowed agains our list of Approved Domains\n\t\t $approved = $this->approve_google_user();\n\n\t\t return;\n\t}", "function validateApiCredentials() { \n if( $this->options['api_type'] == \"\" || $this->options['api_path'] == \"\" ) {\n $this->error_handler( 'Repository url not valid' );\n } elseif($this->options['username'] == \"\") {\n $this->error_handler( 'Username Required' );\n } else if($this->options['password'] == \"\") {\n $this->error_handler( 'Password Required' );\n }\n }", "public function validate()\n {\n $requiredArguments = $this->getRequiredArguments();\n \n foreach ($requiredArguments as $arg) {\n if ( ! isset($this->arguments[$arg])) {\n return false;\n }\n }\n \n return true;\n }", "public function validateState() {\n\t\tif($this->verification != null){\n\t\t\tthrow new PoserException(\"Mocking is in a invalid state there is a verification currently active\");\n\t\t}\n\t\t\n\t\t$this->argumentMatcherMonitor->validateState();\n\t\t//TODO report that there is unfinished stubbing and verification\n\t}", "public function testCallReturnObjectContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( (object) array(\n 'success' => true\n ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "public function validate()\n {\n return $this->ensureExtensionLoaded() &&\n $this->validateSourceLocation() &&\n $this->validateCondition() &&\n $this->validateExpressions();\n }", "public function validate() {\n }", "public function validate() {\n }", "public function validate($args){\r\n\t\t$responseReceived = false;\r\n\t\tif (!(isset($this->sessionID))){\r\n\t\t\tif ($this->serverDownShouldModerate()){\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}else{\r\n\t\t\t\t// no session ID but the server hasn't experienced downtime.\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$args['lofi'] = $this->languageOrFrameworkID;\r\n\t\t\t$args['lofv'] = $this->languageOrFrameworkVersion;\r\n\t\t\t$args['k'] = $this->accountID;\r\n\t\t\t$args['pwd'] = $this->privateKey;\r\n\t\t\t$args['ua'] = $this->userAction;\r\n if (isset($this->customerSessionID)){\r\n $args['c'] = $this->customerSessionID;\r\n }\r\n\t\t\t$args['upow'] = $this->useProofOfWorkCaptcha ? \"1\" : \"0\";\r\n\t\t\t$args['powt'] = $this->proofOfWorkTime;\r\n\t\t\t$xmlresponse = $this->postData($this->baseURL, \"/validate\", $this->useSSL, $args);\r\n\t\t\tif ($xmlresponse){\r\n\t\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\t\tif ($doc){\r\n\t\t\t\t\t$isValidResponse = $doc->getElementsByTagName('isValid');\r\n\t\t\t\t\tif (!($isValidResponse && $isValidResponse->item(0))){\r\n\t\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// parse out result from spamcaptcher server\r\n\t\t\t\t\t\t$this->spamScore = $doc->getElementsByTagName('spamScore')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$this->isValid = $this->strToBoolean($doc->getElementsByTagName('isValid')->item(0)->nodeValue);\r\n\t\t\t\t\t\t$responseReceived = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($responseReceived){\r\n\t\t\tif (!$this->isValid){\r\n\t\t\t\t// CAPTCHA was NOT solved correctly AND no TrustMe Account was used\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}else{\r\n\t\t\t\tif ($this->spamScore > $this->MAX_MODERATE_SCORE){\r\n\t\t\t\t\t// SpamScore is too high\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t\t}elseif ($this->spamScore > $this->MAX_PASSABLE_SCORE){\r\n\t\t\t\t\t// SpamScore is questionable\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Goldilocks is happy with the SpamScore\r\n\t\t\t\t\t// Yes yes, technically one of the scores\r\n\t\t\t\t\t// should have been \"too low\" for me to make\r\n\t\t\t\t\t// a Goldilocks reference ... I don't care.\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_PASS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->recommendedAction;\r\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "abstract public function valid();", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function testCallReturnArrayContainsTrue()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( array( true ) ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function valid()\n {\n if ($this->container['call_session_history_id'] === null) {\n return false;\n }\n if ($this->container['account_id'] === null) {\n return false;\n }\n if ($this->container['application_id'] === null) {\n return false;\n }\n if ($this->container['user_id'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n if ($this->container['initiator_address'] === null) {\n return false;\n }\n if ($this->container['media_server_address'] === null) {\n return false;\n }\n if ($this->container['log_file_url'] === null) {\n return false;\n }\n return true;\n }", "private function validate()\r\n\t{\r\n\t\tif (!ctype_digit($this -> curComm))\r\n\t\t{\r\n\t\t\t$this -> Error('er1');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the user with chat_id exists\r\n\t\tif (!($this -> Exists()))\r\n\t\t{\r\n\t\t\t$this -> Error('er2');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//check if the inputed chat_id = user chat_id\r\n\t\tif (($this -> isSelf()))\r\n\t\t{\r\n\t\t\t$this -> Error('er3');\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 1;\t \t\r\n\t}", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "public function testCallReturnEmpty()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( 0 ) );\n\n $this->assertFalse( $validator->isValid( 'value' ) );\n $this->assertContains( 'validate.rpc.' . Rpc::RETURN_EMPTY, $validator->getMessages() );\n }", "public function checkValidity()\r\n {\r\n if (!parent::checkValidity())\r\n return false;\r\n\r\n if (!$this->checkUniqueCode())\r\n return false;\r\n \r\n if ($this->workflowState && strlen($this->workflowState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_WORKFLOWSTATE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->name . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->name) > 255)\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->code . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->code) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->fromState && strlen($this->fromState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->toState && strlen($this->toState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n } \r\n \r\n return true;\r\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public abstract function validation();", "public function validate() {\n\n\t\tif ($this->getPrimaryAccountNumber() === null) {\n\t\t\tthrow new ValidationException(\"'primaryAccountNumber' can't be null\", 'primaryAccountNumber', $this);\n\t\t}\n\t}", "public function validate() { return TRUE; }", "public function testCallReturnEmptyString()\n {\n $validator = new Rpc( array(\n 'service' => 'SampleRpc',\n 'method' => __FUNCTION__,\n ) );\n\n $validator->setServiceLocator( $this->serviceManager );\n\n $this->rpc\n ->expects( $this->once() )\n ->method( 'call' )\n ->with( $this->equalTo( __FUNCTION__ ),\n $this->equalTo( array( 'value', null ) ) )\n ->will( $this->returnValue( '' ) );\n\n $this->assertTrue( $validator->isValid( 'value' ) );\n }", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "protected function validate()\n {\n $resolutionArguments = func_get_args();\n $inputArguments = array_get($resolutionArguments, 1, []);\n\n $argumentRules = $this->getRulesForArguments($this->args(), $inputArguments);\n $explicitRules = call_user_func_array([$this, 'rules'], $resolutionArguments);\n $argumentRules = array_merge($argumentRules, $explicitRules);\n\n foreach ($argumentRules as $key => $rules) {\n $resolvedRules[$key] = $this->resolveRules($rules, $resolutionArguments);\n }\n\n if (isset($resolvedRules)) {\n $validationErrorMessages = call_user_func_array([$this, 'validationErrorMessages'], $resolutionArguments);\n $validator = $this->getValidator($inputArguments, $resolvedRules, $validationErrorMessages);\n if ($validator->fails()) {\n throw (new ValidationError('validation'))->setValidator($validator);\n }\n }\n }", "public function validateResolved();" ]
[ "0.6084363", "0.5932464", "0.5608582", "0.55777574", "0.5451368", "0.54418534", "0.54231936", "0.5422019", "0.5397647", "0.5388053", "0.5361162", "0.53166896", "0.530501", "0.5301431", "0.5282658", "0.52696484", "0.5256391", "0.5239617", "0.5213742", "0.5208621", "0.5175152", "0.51739466", "0.515704", "0.5128186", "0.50929123", "0.5047197", "0.50423676", "0.5038366", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.50379574", "0.5025046", "0.5017399", "0.5007184", "0.5002242", "0.49982366", "0.49968874", "0.49679834", "0.49424085", "0.49424085", "0.49393523", "0.4933294", "0.49287504", "0.49282792", "0.4923522", "0.4919315", "0.491243", "0.4900123", "0.48990288", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48928392", "0.48927826", "0.48926798", "0.48864648", "0.48857507", "0.48758167", "0.48724747", "0.48587644", "0.48503888", "0.48442018", "0.48442018", "0.48374477", "0.4835018", "0.4835018", "0.48282436", "0.48273662", "0.48243818", "0.482248", "0.4814814", "0.48117992", "0.48102224", "0.48090222", "0.48047405", "0.4801734", "0.47969347", "0.47952825", "0.47952825", "0.47952825", "0.47952825", "0.47929466", "0.47921243", "0.47908908", "0.479082", "0.4788136", "0.4787115", "0.4782323" ]
0.0
-1
/ Function to Mark and Display the Date that has Reservations $conn and $day as argument in this function to complete the operation
function getDateReserve($conn, $day, $current_month) { $current_year = date("y"); $select_all_dates = "SELECT * FROM reservation WHERE confirmation = 'Confirmed'"; $q_seleect_all_dates = $conn->query($select_all_dates); if($q_seleect_all_dates->num_rows > 0) { while($q_row = $q_seleect_all_dates->fetch_assoc()) { $date_reserved = strtotime($q_row['reserv_date']); $date_reserved_month = date('m',$date_reserved); $date_reserved_year = date('y',$date_reserved); $date_reserved_day = date('d',$date_reserved); if($date_reserved_month == $current_month && $date_reserved_year == $current_year) { if($day == $date_reserved_day) { return true; } else { echo "."; } } else { echo "false"; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function php_show_reservation_list($date) {\r\n\r\n $returnStatus['status'] = 'undefined';\r\n\r\n $uid = php_get_uid();\r\n\r\n //check the date format is valid\r\n if (!php_check_convert_resv_date($date, $d, $m, $y)) {\r\n $returnResult['status'] = 'Date format incorrect';\r\n return $returnResult;\r\n }\r\n\r\n php_database_connect();\r\n\r\n //Lookup restaurant ID to get the query string from the table\r\n $safe_uid = GetSQLValueString($uid, 'int');\r\n $safe_timeslot = GetSQLValueString($y . '-' . $m . '-' . $d, 'date');\r\n\r\n $query = sprintf(\"SELECT id, cust_id, TIME(timeslot) AS time_timeslot, person, special_request, HEX(response) AS hex_response FROM resv WHERE rest_id = %s AND DATE(timeslot) = %s\", $safe_uid, $safe_timeslot);\r\n $rs = php_database_query($query);\r\n\r\n $responseXML = \"\";\r\n while ($resvInfo = mysql_fetch_array($rs)) {\r\n $safe_custId = GetSQLValueString($resvInfo['cust_id']);\r\n $query = sprintf(\"SELECT fullname FROM customer WHERE id = %s\", $safe_custId);\r\n $cust_rs = php_database_query($query);\r\n\r\n $custInfo = mysql_fetch_array($cust_rs);\r\n $xmlElement['time'] = $resvInfo['time_timeslot'];\r\n $xmlElement['person'] = $resvInfo['person'];\r\n $xmlElement['customer_name'] = $custInfo['fullname'];\r\n $xmlElement['msg'] = $resvInfo['special_request'];\r\n $xmlElement['resv_id'] = $resvInfo['id'];\r\n $xmlElement['response'] = \"undefined\";\r\n\r\n switch (intval($resvInfo['hex_response'])) {\r\n case 0: //pending\r\n $xmlElement['response'] = 'pending';\r\n break;\r\n case 1: //decline\r\n $xmlElement['response'] = 'decline';\r\n break;\r\n case 2: //accept\r\n $xmlElement['response'] = 'accept';\r\n break;\r\n default:\r\n $xmlElement['response'] = 'undefined';\r\n }\r\n \r\n ## <resv>\r\n ## <time>1:00pm</time>\r\n ## <person>4</person>\r\n ## <customer_name>Tom Chan</customer_name>\r\n ## <msg></msg>\r\n ## <resv_id>1234-001</resv_id>\r\n ## <response>accept</response>\r\n ## </resv>\r\n \r\n $responseXMLItem = sprintf(\"<resv><time>%s</time><person>%s</person><customer_name>%s</customer_name><msg>%s</msg><resv_id>%s</resv_id><response>%s</response></resv>\", $xmlElement['time'], $xmlElement['person'], $xmlElement['customer_name'], $xmlElement['msg'], $xmlElement['resv_id'], $xmlElement['response']);\r\n $responseXML = $responseXML . $responseXMLItem;\r\n }\r\n\r\n //Re-factoring the query string\r\n echo $responseXML = '<resv_list>' . $responseXML . '</resv_list>';\r\n\r\n $returnStatus['status'] = 'success';\r\n return $returnStatus;\r\n}", "function day() {\n if($this->request->get('year') && $this->request->get('month') && $this->request->get('day')) {\n $day = new DateValue($this->request->get('year') . '-' . $this->request->get('month') . '-' . $this->request->get('day'));\n } else {\n $day = DateValue::now();\n } // if\n \n $this->wireframe->addBreadCrumb($day->getYear() . ' / ' . $day->getMonth(), Calendar::getProjectMonthUrl($this->active_project, $day->getYear(), $day->getMonth()));\n $objects = Calendar::getProjectDayData($this->logged_user, $this->active_project, $day);\n \n \t$this->smarty->assign(array(\n 'day' => $day,\n 'objects' => $objects,\n ));\n }", "function echoDay($date, $activitiesOfTheDay)\n {\n\n $shoppingcartService = new shoppingcartService();\n\n if (count($activitiesOfTheDay) != 0) {\n $totalPriceDay = 0;\n\n // Bereken de totaalPrijs voor de dag.\n foreach ($activitiesOfTheDay as $activity) {\n if (get_class($activity) == \"activity\") {\n $activityOTD = $activity;\n } else {\n $activityOTD = $activity->getActivity();\n }\n $activityId = $activityOTD->getId();\n $amount = $shoppingcartService->getAmountByActivityId($activityId);\n $price = $activityOTD->getPrice();\n $activityId = $activityOTD->getId();\n $totalPriceActivity = $amount * $price;\n\n $totalPriceDay += $totalPriceActivity;\n }\n // Echo de labels\n echoTitles($date, $totalPriceDay);\n\n // Voor elke activiteit van de dag : echo de activiteit\n foreach ($activitiesOfTheDay as $activity) {\n\n if (get_class($activity) == \"activity\") {\n $activityOTD = $activity;\n } else {\n $activityOTD = $activity->getActivity();\n }\n\n // Haal alle informatie op voor de activiteit.\n $price = $activityOTD->getPrice();\n $activityId = $activityOTD->getId();\n $amount = $shoppingcartService->getAmountByActivityId($activityId);\n $type = $activityOTD->getType();\n $activityId = $activityOTD->getId();\n $startTime = $activityOTD->getStartTime();\n\n $endTime = $activityOTD->getEndTime();\n\n if (get_class($activity) == \"foodactivity\") {\n $activityName = $activity->getRestaurant()->getName();\n } else if (get_class($activity) == \"jazzactivity\") {\n $activityName = $activity->getJazzband()->getName();\n } else if (get_class($activity) == \"danceActivity\") {\n $artists = $activity->getArtists();\n $artistNames = array();\n foreach ($artists as $artist) {\n $artistNames[] = $artist->getName();\n }\n $activityName = implode(\", \", $artistNames);\n } else {\n $activityName = $activity->getType();\n }\n\n $shoppingcartService = new shoppingcartService();\n $amount = $shoppingcartService->getAmountByActivityId($activityId);\n\n // echo de activiteit naar HTML\n cartElement($activityId, $activityName, $type, date(\"Y-m-d\"), $startTime->format('H:i'), $endTime->format('H:i'), $price, $amount);\n }\n\n //return de totale prijs van de dag\n return $totalPriceDay;\n }\n return 0;\n }", "function draw_calendar($conn, $month,$year,$alat){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n\n $booked[] = $days_in_month;\n for($i = 0; $i<=$days_in_month; $i++){\n $booked[$i] = '';\n }\n\n $now = $month + $year *12;\n\n //PENGECEKKAN STATUS UNTUK KEPENTINGAN KALENDER\n //booking\n $result = mysqli_query($conn,\"SELECT * FROM booking NATURAL JOIN alat where nama_alat = '$alat' and ((year(tanggal_rencana_peminjaman)*12 + month(tanggal_rencana_peminjaman)) <= '$now') and ((year(tanggal_rencana_pengembalian)*12 + month(tanggal_rencana_pengembalian)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,2);\n }\n mysqli_free_result($result);\n\n //peminjaman\n $result = mysqli_query($conn,\"SELECT * FROM peminjaman NATURAL JOIN alat where nama_alat = '$alat' and tanggal_pengembalian IS NULL and ((year(tanggal_peminjaman)*12 + month(tanggal_peminjaman)) <= '$now') and ((year(tanggal_rencana_pengembalian)*12 + month(tanggal_rencana_pengembalian)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,1);\n }\n mysqli_free_result($result);\n\n //perbaikan\n $result = mysqli_query($conn,\"SELECT * FROM perbaikan NATURAL JOIN alat where nama_alat = '$alat' and tanggal_selesai_perbaikan IS NULL and ((year(tanggal_mulai_perbaikan)*12 + month(tanggal_mulai_perbaikan)) <= '$now') and ((year(estimasi_selesai_perbaikan)*12 + month(estimasi_selesai_perbaikan)) >= '$now')\");\n if(mysqli_num_rows($result)>0){\n markdate($booked,$result,$days_in_month,$month,3);\n }\n mysqli_free_result($result);\n\n //END OF PENGECEKKAN STATUS\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\n $calendar.= '<td class=\"calendar-day\">';\n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= $booked[$list_day-1];\n\n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n\n\n /* all done, return result */\n return $calendar;\n}", "public function reservation()\n\t{\n\n\t}", "function display_day()\n{\n global $phpcid, $phpc_cal, $phpc_script, $phpcdb, $day, $month, $year;\n\n\t$monthname = month_name($month);\n\n $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);\n\n\t$have_events = false;\n\n\t$html_table = tag('table', attributes('class=\"phpc-main\"'),\n\t\t\ttag('caption', \"$day $monthname $year\"),\n\t\t\ttag('thead',\n\t\t\t\ttag('tr',\n\t\t\t\t\ttag('th', __('Title')),\n\t\t\t\t\ttag('th', __('Time')),\n\t\t\t\t\ttag('th', __('Description'))\n\t\t\t\t )));\n\tif($phpc_cal->can_modify()) {\n\t\t$html_table->add(tag('tfoot',\n\t\t\t\t\ttag('tr',\n\t\t\t\t\t\ttag('td',\n\t\t\t\t\t\t\tattributes('colspan=\"4\"'),\n\t\t\t\t\t\t\tcreate_hidden('action', 'event_delete'),\n\t\t\t\t\t\t\tcreate_hidden('day', $day),\n\t\t\t\t\t\t\tcreate_hidden('month', $month),\n\t\t\t\t\t\t\tcreate_hidden('year', $year),\n\t\t\t\t\t\t\tcreate_submit(__('Delete Selected'))))));\n\t}\n\n\t$html_body = tag('tbody');\n\n\twhile($row = $results->fetch_assoc()) {\n\t\n\t\t$event = new PhpcOccurrence($row);\n\n\t\tif(!$event->can_read())\n\t\t\tcontinue;\n\n\t\t$have_events = true;\n\n\t\t$eid = $event->get_eid();\n\t\t$oid = $event->get_oid();\n\n\t\t$html_subject = tag('td');\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(create_checkbox('eid[]',\n\t\t\t\t\t\t$eid));\n\t\t}\n\n\t\t$html_subject->add(create_occurrence_link(tag('strong',\n\t\t\t\t\t\t$event->get_subject()),\n\t\t\t\t\t'display_event', $oid));\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(\" (\");\n\t\t\t$html_subject->add(create_event_link(\n\t\t\t\t\t\t__('Modify'), 'event_form',\n\t\t\t\t\t\t$eid));\n\t\t\t$html_subject->add(')');\n\t\t}\n\n\t\t$html_body->add(tag('tr',\n\t\t\t\t\t$html_subject,\n\t\t\t\t\ttag('td', $event->get_time_span_string()),\n\t\t\t\t\ttag('td', attributes('class=\"phpc-desc\"'), $event->get_desc())));\n\t}\n\n\t$html_table->add($html_body);\n\n\tif($phpc_cal->can_modify()) {\n\t\t$output = tag('form',\n\t\t\t\tattributes(\"action=\\\"$phpc_script\\\"\"),\n\t\t\t\t$html_table);\n\t} else {\n\t\t$output = $html_table;\n\t}\n\n\tif(!$have_events)\n\t\t$output = tag('h2', __('No events on this day.'));\n\n\treturn tag('', create_day_menu(), $output);\n}", "public function AddReservation($Room_id,$cust_id,$B_date,$E_date)\n{\n$DB=new DBManager();\n\n$DBegin=date_create($B_date);\n$DEnd=date_create($E_date);\n\n$diff=date_diff($DBegin,$DEnd);\n$interval = $DBegin->diff($DEnd);\n$intervalDays=$interval->days;\n\n\n$sql1=\"INSERT INTO reservation(cust_id,dateBegin,DateEnd,Room_id,period) VALUES ('$cust_id','$B_date','$E_date','$Room_id','$intervalDays')\";\n$resSel=$DB->AddDB($sql1);\n\n$sql2=\"UPDATE room SET status=1 WHERE id='$Room_id'\";\n$resUP=$DB->updateDB($sql2);\n\nif($resUP == \"Updated\")\n{\n return \" ***** Congratulations , You Reserved Room Successfully ***** \";\n}\nelse return \"problem\";\n\n}", "public function dateAction() {\n $cal = new calendarlib;\n $br = new bookingRecord();\n $gump = $this->getGump();\n\n // check the session is still around\n if ($br->expired()) {\n \t$this->redirect($this->url('booking/expired'));\n }\n\n // get the needed seats and remaining counts\n $seatsneeded = $br->getAdults() + $br->getChildren();\n list($pcounts, $daymax) = $this->bm->getRemaining();\n\n // process data\n $errors = [];\n if ($request = $this->getRequest()) {\n\n // Validate\n $gump->validation_rules(array(\n 'dateid' => \"required|numeric|min_numeric,1\",\n 'timeid' => \"required|numeric|min_numeric,1\",\n 'trainlimitid' => \"required|numeric|min_numeric,1\",\n ));\n\n if ($data = $gump->run($request)) {\n $dateid = $data['dateid'];\n $timeid = $data['timeid'];\n $trainlimitid = $data['trainlimitid'];\n\n // Recheck limit\n if (!isset($pcounts[$dateid][$timeid])) {\n throw new \\Exception('Invalid date or time somehow selected!');\n }\n if ($pcounts[$dateid][$timeid] < $seatsneeded) {\n $errors[] = 'Unfortunately, there are no longer seats available on your selected service';\n } else {\n $br->setDateid($dateid);\n $br->setTimeid($timeid);\n $br->setTrainlimitid($trainlimitid);\n $br->save();\n $this->redirect($this->Url('booking/ages'));\n }\n }\n }\n\n // Operating days\n $days = $this->bm->getDays();\n\n // Build select\n $structure = $this->bm->getDateTimeSelect($seatsneeded, $pcounts);\n\n // build calendars\n $this->View('booking_date', array(\n 'days' => $days,\n 'structure' => $structure,\n 'errors' => $errors,\n ));\n }", "public function reservation()\n {\n $this -> load -> helper('date');\n $this->load->view('home/reservation');\n }", "function maxWeddingReservation($conn, $day, $month) {\n\t\t\t\t\t\n\t\t\t\t\t$event = 'Wedding';\n\t\t\t\t\t\n\t\t\t\t\t$date = date(\"Y\") . \"-\" . $month . \"-\" . $day;\n\t\t\t\t\t\n\t\t\t\t\t$select_wed = \"SELECT * FROM reservation WHERE reserv_date = '$date' AND event_type = '$event' AND confirmation = 'Confirmed'\";\n\t\t\t\t\t$select_wed_query = $conn->query($select_wed);\n\t\t\t\t\t\n\t\t\t\t\tif($select_wed_query -> num_rows >= 2) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$select_rem_time = \"SELECT * FROM reservation WHERE reserv_date = '$date' AND reserv_time = '5'\";\n\t\t\t\t\t\t$srt_query = $conn->query($select_rem_time);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($srt_query -> num_rows > 0) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn false;\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\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "function list_day_work($date)\n{\n Database::getInstance()->getConnection()->real_escape_string($date);\n // Scoate id_urile din zilele lucrate dupa data\n $row = [];\n $query = \"SELECT wd.id, angajati.surname, angajati.name, loc_activitate.locatie, wd.comment FROM cozagro_db.work_days wd\n INNER JOIN cozagro_db.angajati angajati ON wd.id_angajat=angajati.id \n INNER JOIN cozagro_db.loc_activitate loc_activitate ON wd.id_loc_activitate=loc_activitate.id \n WHERE DATE_FORMAT(submission_date, '%d - %c - %Y') = '$date' AND wd.deleted='0'\n ORDER BY angajati.surname ASC \";\n $result = Database::getInstance()->getConnection()->query($query);\n if (!$result) {\n die(\"Errore la extragere pentru zilele de lucru in function.php\" . Database::getInstance()->getConnection()->error);\n };\n\n $i = 0;\n while ($dates = $result->fetch_assoc()) {\n\n $row[$i] = [\"id_work_days\" => $dates['id'],\n \"nume\" => $dates['surname'] . \" \" . $dates['name'],\n \"loc_activitate\" => $dates['locatie'],\n \"comment\" => $dates['comment']];\n\n //Identifica numele angajatului dupa ID\n\n $i++;\n }\n $result->free_result();\n return $row;\n}", "function createReservation($pdo, $chef, $date, $username, $useremail, $userphone){\n\t\t\n\t\ttry{\n\t\t\t$addReservation = $pdo->prepare('INSERT INTO reservations (id, username, useremail, userphone, chef, date) VALUES (?, ?, ?, ?, ?, ?)');\n\t\t\t$addReservation->execute(array(null,$username, $useremail, $userphone, $chef, $date));\n\t\t\t//echo \"reserved\";\n\t\t\t//$_SESSION['outputR'] = \"A new reservation has been created\";\n\t\t\t$_SESSION['chef'] = str_replace(\"'\", \"\", $chef);\n\t\t\t$_SESSION['date'] = $date;\n\t\t\theader(\"Location: ../../confirmed.php\");\n\t\t}\n\t\t\tcatch(PDOException $e){\n\t\t\t$error = \"Error creating reservation\" . $e->getMessage();\n\t\t\t$_SESSION['outputR'] = $error;\n\t\t\techo $error;\n\t\t\t//header(\"Location: ../../signup.php\");\n\t\t}\n\t\t\n\t\t\n\t}", "public function info()\n{\necho \"Informations en date du \",date(\"d/m/Y H:i:s\"),\"<br>\";\n\n$now=getdate();\n$heure= $now[\"hours\"];\n$jour= $now[\"wday\"];\n\necho \"<h3>Horaires des cotations</h3>\";\nif(($heure>=9 && $heure <=17)&& ($jour!=0 && $jour!=6))\n{ echo \"La Bourse de Paris est ouverte <br>\"; }\nelse\n{ echo \"La Bourse de Paris est fermée <br>\"; }\nif(($heure>=16 && $heure <=23)&& ($jour!=0 && $jour!=6) )\n{ echo \"La Bourse de New York est ouverte <hr>\"; }\nelse\n{ echo \"La Bourse de New York est fermée <hr>\"; }\n}", "public function showDay(Request $request)\n {\n $this->validate($request, [\n 'day' => 'date_format:\"d.m.Y\"',\n ]);\n\n //Generate date\n if (!$request->has('day')){\n $day = Carbon::now();\n }\n else{\n $day = new Carbon($request->input('day'));\n }\n\n if ($request->has('back'))\n {\n $day->subDay();\n }\n if ($request->has('next'))\n {\n $day->addDay();\n }\n if ($request->has('today'))\n {\n $day = Carbon::now();\n }\n\n $orderby1 = \"posp\";\n $orderby2 = \"fullname\";\n $orderbycol = 1;\n\n if ($request->has('section'))\n {\n $orderby1 = \"secname\";\n $orderby2 = \"fullname\";\n $orderbycol = 2;\n }\n\n if ($request->has('entry'))\n {\n $orderby1 = \"entrypresent\";\n $orderby2 = \"entryname\";\n $orderbycol = 3;\n }\n\n $department_id=Auth::user()->department_id;\n\n if ($request->has('save_comment') && $request->has('comment'))\n {\n // return $request->input('comment');\n $comment = \\App\\Comment::findornew($request->input('commentid'));\n\n $comment->date = $day->toDateString();\n\n $comment->text = $request->input('comment');\n\n \\App\\Department::find($department_id)->comments()->save($comment);\n }\n\n $users = \\App\\User::where('department_id', '=', $department_id)\n ->orderBy('name', 'asc')\n ->get();\n\n $userlist = Lists::userlist($department_id);\n\n $entrylist = Lists::entrylist($department_id);\n\n $options = array();\n foreach($entrylist as $el)\n {\n $options[] = \"<option class=' border-option item\".$el->id.\"'' value='\".$el->id.\"'>\".$el->name.\"</option>\";\n }\n //return($options);\n\n $styles = \\App\\Entry::where('department_id', '=', $department_id)\n ->orderBy('name', 'asc')\n ->get();\n\n\n $events = \\App\\User::where('users.department_id', '=', $department_id)\n ->leftJoin('sections', 'sections.id', '=', 'users.section_id')\n ->leftJoin('positions', 'positions.id', '=', 'users.position_id')\n ->leftjoin(db::raw('(select * from events where date = ?) e'), 'users.id', '=', 'e.user_id')\n ->addBinding($day->toDateString(), 'select')\n ->leftjoin('entries', 'e.entry_id', '=', 'entries.id')\n ->selectRaw('CONCAT(lastname, \", \", firstname) as fullname, positions.name as posname, positions.priority as posp, sections.fullname as secname, CONCAT(\"item\", entries.id) as class, if(approved = 1 or e.id is null, \"approved\", \"notapproved\") as class2, users.id as uid, e.id as eventid, e.comment as eventscomment, entries.name as entryname, if (entries.present = 1 , 1, if(entries.present = 0, 2, 0)) as entrypresent')\n ->orderBy($orderby1)\n ->orderBY($orderby2)\n ->get();\n\n $events_present = \\App\\User::where('users.department_id', '=', $department_id)\n ->leftJoin('sections', 'sections.id', '=', 'users.section_id')\n ->leftjoin(db::raw('(select * from events where date = ?) e'), 'users.id', '=', 'e.user_id')\n ->addBinding($day->toDateString(), 'select')\n ->leftjoin('entries', 'e.entry_id', '=', 'entries.id')\n ->selectraw('if(present=0, \"Abwesend\", \"Anwesend\") as presence, count(if(present=0, 0, 1)) as p, count(if(present=1, 0, 1)) as p1')\n ->groupBy('presence')\n ->orderBy('presence', 'desc')\n ->get();\n\n\n\n $events_summary = \\App\\User::where('users.department_id', '=', $department_id)\n ->leftjoin(db::raw('(select * from events where date = ?) e'), 'users.id', '=', 'e.user_id')\n ->addBinding($day->toDateString(), 'select')\n ->leftjoin('entries', 'e.entry_id', '=', 'entries.id')\n ->groupBy('entries.name')\n ->orderBY('entries.name')\n ->selectraw('entries.name as entryname, entries.present as entrypresent, count(present) as entrycount')\n ->get();\n\n $customdate = \\App\\Company::find(Auth::user()->department->company->id)->customdatesitems()\n ->leftJoin('custom_dates', 'custom_dates_items.id', '=', 'custom_dates.items_id')\n ->where('custom_dates.date', '=', $day->toDateString())\n ->select('custom_dates.name as cusname')\n ->get();\n\n $holiday = \\App\\Department::find($department_id)->holidays()\n ->where('date_from', '<=', $day->toDateString())\n ->where('date_to', '>=', $day->toDateString())\n ->get();\n\n $usersthisday = \\App\\User::where('users.department_id', '=',$department_id)\n ->leftjoin(db::raw('(select * from events where date = ?) e'), 'users.id', '=', 'e.user_id') //this is neccessary to get all users not only those with an event date\n ->addBinding($day->toDateString(), 'select')\n ->leftJoin('entries', 'e.entry_id', '=', 'entries.id')\n ->get();\n\n $comment = \\App\\Comment::where('department_id', '=', $department_id)\n ->where('date', '=', $day->toDAteString())\n ->get();\n //return $usersthisday;\n\n return view('day', compact('users', 'day', 'events', 'styles', 'userlist', 'options', 'entrylist', 'customdate', 'holiday', 'events_present', 'events_summary', 'comment', 'orderbycol'));\n\n }", "public static function day_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextdaydate = new DateTime(\"$year-$month-$day\");\r\n $nextdaydate->add(new DateInterval('P1D'));\r\n $previousdaydate = new DateTime(\"$year-$month-$day\");\r\n $previousdaydate->sub(new DateInterval('P1D'));\r\n\r\n $thisday = new DateTime(\"$year-$month-$day\");\r\n $daydescription = ucfirst(format_locale_date($thisday->getTimestamp()));\r\n\r\n $backward = array('day'=>$previousdaydate->format('d'), 'month'=>$previousdaydate->format('m'), 'year' => $previousdaydate->format('Y'));\r\n $foreward = array('day'=>$nextdaydate->format('d'), 'month'=>$nextdaydate->format('m'), 'year' => $nextdaydate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.':&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a>&nbsp;|&nbsp;'.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_day('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">&laquo;</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$daydescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_day('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">&raquo;</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n\r\n $eventlist = Calendar_Events::get_calendar_events(\"day\", \"$year-$month-$day\");\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curhour = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday'].' '.$now['hours'].':'.$now['minutes']);\r\n if ($now['year'].'-'.$now['mon'].'-'.$now['mday'] == \"$year-$month-$day\") {\r\n $thisdayistoday = true;\r\n }\r\n else{\r\n $thisdayistoday = false;\r\n }\r\n $thishour = new DateTime($today->format('Y-m-d H:00'));\r\n $cursorhour = new DateTime(\"$year-$month-$day 00:00\");\r\n $curstarthour = \"\";\r\n\r\n foreach ($eventlist as $thisevent) {\r\n $thiseventstart = new DateTime($thisevent->start);\r\n $thiseventhour = new DateTime($thiseventstart->format('Y-m-d H:00'));\r\n if ($curstarthour != $thiseventhour) { //event date changed\r\n while($cursorhour < $thiseventhour) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n if (intval($cursorhour->diff($thiseventhour,true)->format('%h'))>6) {\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n }\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n //No hour tr for the event\r\n //$calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($thiseventhour->format('H:i')) . \"</b></td></tr>\";\r\n if ($cursorhour <= $thiseventhour) {\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n $curhour += 6;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::day_calendar_item($thisevent, 'even');\r\n $curstarthour = $thiseventhour;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curhour;$i<24;$i+=6) {\r\n if ($thisdayistoday && $thishour>=$cursorhour && intval($cursorhour->diff($thishour,true)->format('%h'))<6)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \"&nbsp;<b>\" . ucfirst($cursorhour->format('H:i')) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorhour->add(new DateInterval('PT6H'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }", "function store(){\n\n date_default_timezone_set( 'Asia/Manila' );\n\n $buffer = '2 Hours';\n\n //INITIAL CHECKS\n if( $_POST['startTime'] < date( 'H:i:s', strtotime( '8:00 am' ) ) || $_POST['startTime'] > date( 'H:i:s', strtotime( '5:00 pm' ) ) ){\n redirect( route( 'reservations?alert=1' ) );\n return false;\n }\n\n $request_start = date( 'Y-m-d H:i:s', strtotime( $_POST['reservation_startdate'].\" \".$_POST['startTime'] ) );\n $duration = where( 'reservation_categories', \"reservation_category = '{$_POST['reservation']}'\")[0]['reservation_duration'];\n\n //Get and Set End of Requested event\n $request_end = date_add(\n date_create( $request_start ),\n date_interval_create_from_date_string( $duration ));\n\n $request_end = date_format( $request_end, 'Y-m-d H:i:s' );\n //END\n\n //Get and Set request date with buffer\n $request_buffered = date_sub(\n date_create( $request_start ),\n date_interval_create_from_date_string( $buffer )\n );\n\n $request_buffered = date_format( $request_buffered, 'Y-m-d H:i:s' );\n //END\n\n\n //First line of defense in checking whether there is already an existing reservation\n $first_check = where( 'reservations', \"'{$request_buffered}' < reservation_enddate AND reservation_enddate < '{$request_end}'\" );\n\n if( !empty( $first_check )){\n\n redirect( route( 'dashboard/reservation/create?alert=1' ) );\n return false;\n\n }\n\n //Last line of defense to check an existing reservation\n $second_check = where( 'reservations', \"'{$request_buffered}' < reservation_startdate AND reservation_startdate < '{$request_end}'\" );\n\n if( !empty( $second_check ) ){\n\n redirect( route( 'dashboard/reservation/create?alert=1' ) );\n return false;\n }\n\n\n\n $data = [\n\n 'reserver_name' => $_POST['reserver_name'],\n 'reserver_contact' => $_POST['reserver_contact'],\n 'reservation' => $_POST['reservation'],\n 'reservation_startdate' => $request_start,\n 'reservation_enddate' => $request_end,\n 'facilitator' => $_POST['facilitator'],\n 'approved_by' => $_POST['approved_by'],\n 'approved_date' => date( 'Y-m-d H:i:s' ),\n 'reservation_status' => 'Approved',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n\n\n ];\n\n\n insert('reservations', $data );\n\n //START SMS\n $settings = get( 'settings', 1);\n\n if( !insert('reservations', $data ) ){\n redirect( route( 'reservations?alert=2' ) );\n }\n\n $number = $_POST['reserver_contact'];\n $message = $settings[0]['approved_message'];\n $apicode = $settings[0]['sms_key'];\n\n //Notify admin\n itexmo( $number, $message, $apicode );\n\n redirect( route( 'dashboard/reservation' ) );\n return true;\n}", "function mkDay($var){\n$eventContent=$this->mkEventContent($var);\n$linkstr=$this->mkUrl($this->actyear,$this->actmonth,$var);\n\tif ($this->javaScriptDay) $linkstr=\"<a href=\\\"javascript:\".$this->javaScriptDay.\"(\".$this->actyear.\",\".$this->actmonth.\",\".$var.\")\\\">\".$var.\"</a>\";\n\tif ($this->isEvent($var)){\n\t\tif ($this->eventUrl){\n\t\t\t$out=\"<td class=\\\"\".$this->eventID.\"\\\"><a href=\\\"\".$this->eventUrl.\"\\\">\".$var.\"</a>\".$eventContent.\"</td>\";\n\t\t\t$this->eventUrl=false;\n\t\t}\n\t\telseif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->selectedday && $this->actmonth==$this->selectedmonth && $this->actyear==$this->selectedyear){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->daytoday && $this->actmonth==$this->monthtoday && $this->actyear==$this->yeartoday){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==0 && $this->crSunClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==6 && $this->crSatClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telse{\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\nreturn $out;\n}", "function draw_calendar($month,$year,$cal,$available_list,$price_list){\n\n /* draw table */\n $calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n /* table headings */\n $headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n $calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n /* days and weeks vars now ... */\n $running_day = date('w',mktime(0,0,0,$month,1,$year));\n $days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n $days_in_this_week = 1;\n $day_counter = 0;\n $dates_array = array();\n\n /* row for week one */\n $calendar.= '<tr class=\"calendar-row\">';\n\n /* print \"blank\" days until the first of the current week */\n for($x = 0; $x < $running_day; $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n $days_in_this_week++;\n endfor;\n\n /* keep going with days.... */\n for($list_day = 1; $list_day <= $days_in_month; $list_day++):\n // echo \" cal: \".($available_list[$list_day - 1] == 't').\"\\n\";\n if ($available_list[$list_day - 1] == 't')\n {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#00FF00\">';\n } else {\n $calendar.= '<td class=\"calendar-day\" bgcolor=\"#FF0000\">';\n\n }\n \n\n /* add in the day number */\n $calendar.= '<div class=\"day-number\" ><font size=\"+3\">'.$list_day.\"</font> \".$price_list[$list_day-1].'</div>';\n\n /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n $calendar.= str_repeat('<p> </p>',2);\n \n $calendar.= '</td>';\n if($running_day == 6):\n $calendar.= '</tr>';\n if(($day_counter+1) != $days_in_month):\n $calendar.= '<tr class=\"calendar-row\">';\n endif;\n $running_day = -1;\n $days_in_this_week = 0;\n endif;\n $days_in_this_week++; $running_day++; $day_counter++;\n endfor;\n\n /* finish the rest of the days in the week */\n if($days_in_this_week < 8):\n for($x = 1; $x <= (8 - $days_in_this_week); $x++):\n $calendar.= '<td class=\"calendar-day-np\"> </td>';\n endfor;\n endif;\n\n /* final row */\n $calendar.= '</tr>';\n\n /* end the table */\n $calendar.= '</table>';\n \n /* all done, return result */\n return $calendar;\n }", "function viewBookings() {\n try {\n $databaseConnection = new PDO( DB_NAME, DB_USERNAME, DB_PASSWORD ); //Creates database connection\n $databaseConnection->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n } \n catch ( PDOException $e ) {\n echo \"Connection failed: \" . $e->getMessage();\n }\n\n $date = $_POST[\"year\"] . \"-\" . $_POST[\"month\"] . \"-\" . $_POST[\"day\"] . \" \" . \"0\" . \":0:0\"; //Converts the date to a mySQL friendly format \n $date = strtotime($date);\n $maxDate = $date + DAY;\n $date = gmdate(\"Y-m-d H:i:s\", $date);\n $maxDate = gmdate(\"Y-m-d H:i:s\", $maxDate);\n $sql = \"SELECT * FROM `bookings` WHERE `time` >= :date AND `time` < :maxDate ORDER BY `time` AND `room`\"; //Selects all bookings for the inputed time\n try {\n $connection = $databaseConnection->prepare( $sql );\n $connection-> bindValue( \":date\", $date, PDO::PARAM_STR );\n $connection-> bindValue( \":maxDate\", $maxDate, PDO::PARAM_STR );\n $connection-> execute();\n $queryResult = $connection->fetchAll();\n $databaseConnection = \"\"; //closes connection\n }\n catch (PDOException $e) {\n $databaseConnection = \"\"; //closes connection\n die ( \"Invalid query: \" . $e->getMessage() );\n }\n \n echo \"<h1>Bookings for \" . $_POST[\"day\"] . \"/\" . $_POST[\"month\"] . \"/\" . $_POST[\"year\"] . \"</h1>\";\n if($queryResult) { //Checks that the query returned data\n echo \"<table><tr><th>Time</th><th>Room Number</th><th>Name</th><th>purpose</th></tr>\"; //table header\n foreach ( $queryResult as $row ) {\n echo \"<tr><td>\" . $row[\"time\"] . \"</td><td>\" . $row[\"room\"] . \"</td><td>\" . User::getUsersName($row[\"user\"]) . \"</td><td>\" . $row[\"purpose\"] . \"</td></tr>\";\n } \n echo \"</table>\";\n }\n else {\n echo \"There are no bookings for that time.\";\n }\n}", "function printsched($index){\n\n\n\n\t$room1s = mysql_fetch_array(mysql_query(\"SELECT * FROM room WHERE ROOM_ID = '\".$_SESSION['room'.$index].\"'\"));\n\n\t$day1s = mysql_fetch_array(mysql_query(\"SELECT * FROM days WHERE DAY_ID = '\".$_SESSION['day'.$index].\"'\"));\n\n\n\n\t$timestart1s = date(\"h:i A\", strtotime($_SESSION['start'.$index]));\n\t$timeend1s = date(\"h:i A\", strtotime($_SESSION['end'.$index]));\n\n\t$sTime1 = strtotime( $_SESSION['start'.$index] );\n\t$eTime1 = strtotime( $_SESSION['end'.$index] );\n\n\techo '<br/><label>ROOM - DAY - TIME</label><input class = \"form-control\" name=\"day\" value=\"'.$room1s['ROOM'].' - '.$day1s['DAY_CODE'].' - '.$timestart1s.'-'.$timeend1s.'\"disabled><br/>';\n\n\treturn 1;\n\n}", "public function readByDay()\n {\n $query = \"select Student.ID, Student.name, Student.last_name, Class.class_name from Student\n inner join Booking on Booking.student_ID = Student.ID\n inner join Booking_Day on Booking_Day.booking_ID = Booking.ID\n inner join Class on Class.ID = Student.class_ID\n where Booking_Day.date = ?\n group by Student.ID\n union\n select Student.ID, Student.name, Student.last_name, Class.class_name from Student\n inner join Booking on Booking.student_ID = Student.ID\n inner join Booking_Extra on Booking_Extra.booking_ID = Booking.ID\n inner join Class on Class.ID = Student.class_ID\n where ? between Booking_Extra.start_date and Booking_Extra.end_date\n and Booking_Extra.\" . $this->dow . \" is not null\n group by Student.ID\";\n\n $stmt = $this->conn->prepare($query);\n // bind data\n $stmt->bindParam(1, $this->date);\n $stmt->bindParam(2, $this->date);\n //$stmt->bindParam(3, $this->dow);\n\n $stmt->execute();\n\n return $stmt;\n }", "function notificarVendedor($member_id, $produto_id, $date, $conn, $query){\n // FAZ A CONEXÃO COM A TABELA PRODUTOS PARA PEGAR AS INFORMAÇÕES DO VENDEDOR\n if ($result = $conn->query($query)) {\n $row = $result->fetch_assoc();\n $vendedor_id = $row['membro_id'];\n // ENVIA A NOTIFICAÇÃO PARA A TABELA DE NOTIFICAÇÕES\n $querynotify = \"INSERT INTO notifications (vendedor_id, member_id, mensagem, visto, data) VALUES ($vendedor_id, $member_id, 'teste', '0', '$date')\";\n\t\t if($conn->query($querynotify)){\n\t\t\t echo \"<script> console.log('[LEONARDO - LOGS] - Enviado notificação para o vendedor que à aposta foi feita') </script>\";\n\t\t }\n }\n }", "function print_take_appointment() {\n\n\ttry\n {\n $db = new PDO('mysql:host=localhost;dbname=g_practitioner;charset=utf8', 'root', 'root');\n }\n catch (Exception $e)\n {\n die('Error: ' . $e->getMessage());\n }\n $find = $db->query(\"SELECT * FROM private_member WHERE type = \\\"doctor\\\"\");\n\n // We search all doctors to show to the patients, he needs to select a doctor and a day\n\n\t$Find_Doctor = \"<form method=\\\"POST\\\" action=\\\"appointments.php\\\" class=\\\"form_style\\\">\\n\n\t\t\t\\t<ul>\n\n\t\t\t\t\\t\\t<input type=\\\"hidden\\\" name=\\\"type\\\" value=\\\"take_appointment\\\"/>\n\n \\t\\t<li><div class=\\\"span_radio_1\\\">\n\n <select name=\\\"doctor\\\" class=\\\"field-style field-split align-left\\\">\";\n \twhile ($doctors = $find->fetch()) $Find_Doctor .= \"<option>\". $doctors['name'] .\" </option>\";\n \t$Find_Doctor .= \"\n \t<input type=\\\"date\\\" name=\\\"date\\\" class=\\\"field-style field-split align-right\\\" placeholder=\\\"Choose a day : yyyy-mm-dd\\\" required/>\n </div></li>\\n\n\n \\t\\t<li class=\\\"button_middle\\\"><input type=\\\"submit\\\" value=\\\"Take an appointment\\\"/></li>\\n\n\n \\t</ul>\\n\n </form>\\n\";\n\n\n $find->closeCursor();\n echo $Find_Doctor;\n\n if (isset($_POST['type']) and $_POST['type'] == \"take_appointment\") {\n\n \tif ($_POST['date'] == null) {\n \t\techo \"<script>alert(\\\"Error, you have to put a date.\\\")\n document.location.href = 'appointments.php'; \n </script>\";\n \t}\n\n\t\t$tableau_jours = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n\n\t\ttry\n {\n $db = new PDO('mysql:host=localhost;dbname=g_practitioner;charset=utf8', 'root', 'root');\n }\n catch (Exception $e)\n {\n die('Error: ' . $e->getMessage());\n }\n // We display a form to show to the patient all the hours where the doctor is free\n\n \t$Find_Appointment = \"\n \t\t<form method=\\\"POST\\\" action=\\\"appointments.php\\\" class=\\\"form_style\\\">\\n\n \\t<ul>\n\n \\t\\t<li>Choose your hour with the Dr. \" . trim($_POST['doctor']) . \" for the \" . $_POST['date'] .\" :\n </li>\\n\n\n \\t\\t<input type=\\\"hidden\\\" name=\\\"type\\\" value=\\\"process_appointment\\\"/>\n\n \\t\\t<input type=\\\"hidden\\\" name=\\\"doctor\\\" value=\\\"\" . trim($_POST['doctor']) . \"\\\"/>\n\n \\t\\t<input type=\\\"hidden\\\" name=\\\"day\\\" value=\\\"\" . $_POST['date'] . \"\\\"/>\n\n \\t\\t<li><div class=\\\"span_radio_3\\\">\n <p>What hour ?</p>\n <select name=\\\"hour\\\" class=\\\"field-style field-split align-right\\\">\";\n\n // We look for all appointments for the day and the select doctor\n\n $find = $db->prepare(\"SELECT * FROM appointment WHERE doctor = :doctor AND day = :day AND state = \\\"OK\\\" ORDER BY time\");\n $find->execute(array('doctor' => trim($_POST['doctor']), 'day' => $_POST['date']));\n\n $hour = $find->fetch();\n\n // We find the open hours of the the chosen day ---\n\n $tabDate = explode('-', $_POST['date']);\n $timestamp = mktime(0, 0, 0, $tabDate[1], $tabDate[2], $tabDate[0]);\n $jour = date('w', $timestamp);\n\n $find_hour = $db->query(\"SELECT * FROM timetable\");\n $time_t = $find_hour->fetch();\n\n $table_time = str_split($time_t[$tableau_jours[$jour]]);\n\n // --------\n\n if (trim($time_t[$tableau_jours[$jour]]) == \"Closed\") {\n // If the day chosen is closed, we print a message\n echo \"<script>alert(\\\"Sorry, it's closed on the day you have chosen.\\\")\n document.location.href = 'appointments.php'; \n </script>\";\n }\n\n // Else, we put the hours in a list, we remove all the hours where is an appointment and display in the form\n\n for ($i = intval(trim($table_time[0]),0); $i < (intval(trim($table_time[6]),0) + 12) ; $i++) {\n\n if ($i.\":00:00\" == $hour['time'] or \"0\".$i.\":00:00\" == $hour['time']) $hour = $find->fetch();\n else {\n if ($i < 10) {\n $Find_Appointment .= \"<option>0\". $i .\":00</option>\";\n }\n else {\n $Find_Appointment .= \"<option>\". $i .\":00</option>\";\n }\n }\n }\n\n $find->closeCursor();\n\n $Find_Appointment .= \"</select>\\n\\t\\t</div></li>\\n\n\n \\t\\t<li><input type=\\\"text\\\" name=\\\"reason\\\" placeholder=\\\"Write the reason\\\" class=\\\"field-style field-full align-none\\\" required/></li>\\n\n\n \\t\\t<li class=\\\"button_middle\\\"><input type=\\\"submit\\\" value=\\\"Take an appointment\\\"/></li>\\n\n\n \\t</ul>\\n\n </form>\\n\";\n\n echo $Find_Appointment;\n\t}\n\telse if (isset($_POST['type']) and $_POST['type'] == 'process_appointment') {\n\n\t\ttry {\n $bdd = new PDO('mysql:host=localhost;dbname=g_practitioner;charset=utf8', 'root', '');\n }\n catch(Exception $e) {\n die('Error: '.$e->getMessage());\n }\n\n $insert = $bdd->prepare('INSERT INTO appointment(name, doctor, day, time, state, reason) VALUES(:name, :doctor, :day, :time, :state, :reason)');\n $insert->execute(array(\n 'name' => $_SESSION['name'],\n 'doctor' => $_POST['doctor'],\n 'day' => $_POST['day'],\n 'time' => $_POST['hour'],\n 'state' => 'Waiting',\n 'reason' => $_POST['reason']\n ));\n \n echo \"<script>alert(\\\"You succesfully take an appointment, the appointment is waiting for the doctor.\\\")\n\t document.location.href = 'appointments.php'; \n\t </script>\";\n\t}\n \n\n}", "function showCheckOutReservation($connect){\n\n\t$sql = \"SELECT *\n\t\t\tFROM reservation\n\t\t\tWHERE checkOut IS NOT NULL\";\n\n\t$result = $connect->query($sql);\n\n\techo \"<br>\" .\n\t\"<table border='1'>\n\t\t<tr>\n\t\t\t<th>ID</th>\n\t\t\t<th>Customer Name</th>\n\t\t\t<th>Customer Tel.</th>\n\t\t\t<th>Reservation Time</th>\n\t\t\t<th>Start Destination</th>\n\t\t\t<th>End Destination</th>\n\t\t\t<th>Vehicle ID</th>\n\t\t\t<th>Driver ID</th>\n\t\t\t<th>Check In</th>\n\t\t\t<th>Check Out</th>\n\t\t</tr>\";\n\n\tif($result->num_rows > 0){\n\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t//change how it is displayed here\n\t\t\techo\n\t\t\t\"<tr>\"\n\t\t\t\t. \"<td>\" . $row[\"ID\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"customerName\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"customerTeleNum\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"reserTime\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"startPlace\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"endPlace\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"vehicleID\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"driverID\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"checkIn\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"checkOut\"] . \"</td>\"\n\t\t\t. \"</tr>\";\n\t\t}\n\t}\n\techo \"</table>\";\n}", "public function findServiseDate(Request $request )\n {\n $request->validate([\n 'id'=>'required',\n 'brojDana'=>'required',\n ]);\n\n $id=$request->id;\n $brojDana=$request->brojDana;\n if($brojDana>0)\n {\n $dateStart=CarInfoResource::findNextFreeDate($id,$brojDana);\n $dateEnd=date('Y-m-d', strtotime($dateStart.\" + $brojDana days\"));\n\n return view('kriticni.zakaziServis2',[\"id\"=>$id,\"dateStart\"=>$dateStart,\"dateEnd\"=>$dateEnd]);\n }\n else\n {\n return $this->kriticni();\n }\n }", "function php_gen_report($date) {\r\n\r\n $uid = php_get_uid();\r\n $returnStatus['status'] = 'undefined';\r\n\r\n php_database_connect();\r\n\r\n $safe_uid = GetSQLValueString($uid, 'int');\r\n\r\n if (!php_check_convert_resv_date($date, $d, $m, $y)) {\r\n $returnStatus['status'] = 'Date format is incorrect';\r\n return $returnStatus;\r\n }\r\n\r\n //Get the date from the MySQL server.\r\n $query = \"SELECT DATE_FORMAT(NOW(),'%d, %M, %Y %h:%i%p') AS 'current_time'\";\r\n $rs = php_database_query($query);\r\n $timeInfo = mysql_fetch_array($rs);\r\n if (empty($timeInfo)) {\r\n $returnStatus['status'] = 'Cannot get the database server time';\r\n return $returnStatus;\r\n }\r\n\r\n $arrMonth = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\r\n $strM = $arrMonth[$m];\r\n\r\n $header = '<h2>Reservation Report</h2>';\r\n $header = $header . '<h4>Current Date Time:' . $timeInfo['current_time'] . '</h4>';\r\n $header = $header . '<h4>Selected from:' . $d . ', ' . $strM . ', ' . $y . ' (Maximum 200 records will be shown)</h4>';\r\n\r\n //lookup table to query the output from restID, date, person, special request\r\n #and then lookup the customer name.\r\n $safe_timeslot = GetSQLValueString($y . '-' . $m . '-' . $d, 'date');\r\n\r\n $query = sprintf(\"SELECT id, cust_id, DATE_FORMAT(timeslot, '%%d, %%M, %%Y %%h:%%i%%p') AS datetime_timeslot, person, special_request, HEX(response) AS hex_response FROM resv WHERE rest_id = %s AND DATE(timeslot) >= DATE(%s) ORDER BY timeslot ASC LIMIT 200\", $safe_uid, $safe_timeslot);\r\n $rs = php_database_query($query);\r\n $body = '';\r\n\r\n while ($resvInfo = mysql_fetch_array($rs)) {\r\n $query = sprintf(\"SELECT fullname FROM customer WHERE id = %s\", $resvInfo['cust_id']);\r\n $custResult = php_database_query($query);\r\n $custInfo = mysql_fetch_array($custResult);\r\n if (empty($custInfo)) {\r\n $returnStatus['status'] = 'Cannot get the customer info';\r\n return $returnStatus;\r\n }\r\n\r\n $htmlElement['time'] = $resvInfo['datetime_timeslot'];\r\n $htmlElement['person'] = $resvInfo['person'];\r\n $htmlElement['customer_name'] = $custInfo['fullname'];\r\n $htmlElement['msg'] = $resvInfo['special_request'];\r\n $htmlElement['resv_id'] = $resvInfo['id'];\r\n $htmlElement['response'] = \"undefined\";\r\n\r\n switch (intval($resvInfo['hex_response'])) {\r\n case 0: //pending\r\n $htmlElement['response'] = 'pending';\r\n break;\r\n case 1: //decline\r\n $htmlElement['response'] = 'decline';\r\n break;\r\n case 2: //accept\r\n $htmlElement['response'] = 'accept';\r\n break;\r\n default:\r\n $htmlElement['response'] = 'undefined';\r\n }\r\n\r\n $body = $body . \"<tr><td>\" . $htmlElement['time'] . \"</td><td>\" . $htmlElement['customer_name'] . \"</td><td>\" . $htmlElement['person'] . \"</td><td>\" . $htmlElement['msg'] . \"</td><td>\" . $htmlElement['resv_id'] . \"</td><td>\" . $htmlElement['response'] . \"</td></tr>\\n\";\r\n }\r\n\r\n $body = \"<table><thead><tr><th>Date Time</th><th>Customer Name</th><th>Person</th><th>Special Request</th><th>Resv ID</th><th>Response</th></tr></thead>\\n<tfoot><tr><td colspan=\\\"6\\\">The end</td></tr></tfoot>\\n<tbody>\" . $body . \"</tbody></table>\";\r\n //re-factoring the query string\r\n\r\n $footer = \"\";\r\n\r\n $reportTxt = $header . $body . $footer;\r\n echo $reportTxt;\r\n\r\n $returnStatus['status'] = 'success';\r\n return $returnStatus;\r\n}", "function draw_calendar_activ($month,$year){\n\n\t/* draw table */\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t/* table headings */\n\t$headings = array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi');\n\t$calendar.= '<tr class=\"calendar-row-day\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t/* days and weeks vars now ... */\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t$days_in_this_week = 1;\n\t$day_counter = 0;\n\t$dates_array = array();\n\n\t/* row for week one */\n\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t/* print \"blank\" days until the first of the current week */\n\tfor($x = 0; $x < $running_day; $x++):\n\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t$days_in_this_week++;\n\tendfor;\n\n\t/* keep going with days.... */\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++){\n\t\t$calendar.= '<td class=\"calendar-day\">';\n\t\t\t/* add in the day number */\n $ddate = $year.\"-\".$month.\"-\".sprintf(\"%02d\", $list_day);\n $newdatabal = sprintf(\"%02d\", $list_day);\n $qq = mysql_query(\"SELECT * FROM reserver WHERE date_deb LIKE('$ddate%')\")or die(mysql_error());\n\n if(mysql_num_rows($qq) >0){\n $newblabla = $ddate.\"<br>\n <a href='afres.php?y=\".$year.\"&m=\".$month.\"&d=\".$newdatabal.\"' target='_blank' style='color: #302C87; text-decoration: none'> Il y'a : \".mysql_num_rows($qq).' reservation(s)</a>';\n }else{\n $newblabla = $ddate.\"<br>no reservations\";\n }\n\t\t\t$calendar.= '<div class=\"day-number\">\n\n '.$newblabla;\n\n\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\n\t\t$calendar.= '</td>';\n\t\tif($running_day == 6):\n\t\t\t$calendar.= '</tr>';\n\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\tendif;\n\t\t\t$running_day = -1;\n\t\t\t$days_in_this_week = 0;\n\t\tendif;\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\n\n\t}\n\n\t/* finish the rest of the days in the week */\n\tif($days_in_this_week < 8):\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\tendfor;\n\tendif;\n\n\t/* final row */\n\t$calendar.= '</tr>';\n\n\t/* end the table */\n\t$calendar.= '</table>';\n\n\t/* all done, return result */\n\treturn $calendar;\n\n\n}", "function showCheckInReservation($connect){\n\n\t$sql = \"SELECT *\n\t\t\tFROM reservation\n\t\t\tWHERE checkIn IS NOT NULL AND checkOut IS NULL\";\n\n\t$result = $connect->query($sql);\n\n\techo \"<br>\" .\n\t\"<table border='1'>\n\t\t<tr>\n\t\t\t<th>ID</th>\n\t\t\t<th>Customer Name</th>\n\t\t\t<th>Customer Tel.</th>\n\t\t\t<th>Reservation Time</th>\n\t\t\t<th>Start Destination</th>\n\t\t\t<th>End Destination</th>\n\t\t\t<th>Vehicle ID</th>\n\t\t\t<th>Driver ID</th>\n\t\t\t<th>Check In</th>\n\t\t</tr>\";\n\n\tif($result->num_rows > 0){\n\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t//change how it is displayed here\n\t\t\techo\n\t\t\t\"<tr>\"\n\t\t\t\t. \"<td>\" . $row[\"ID\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"customerName\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"customerTeleNum\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"reserTime\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"startPlace\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"endPlace\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"vehicleID\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"driverID\"] . \"</td>\"\n\t\t\t\t. \"<td>\" . $row[\"checkIn\"] . \"</td>\"\n\t\t\t. \"</tr>\";\n\t\t}\n\t}\n\techo \"</table>\";\n}", "function displayCalendar(){\r\n $conn= databaseConnection();\r\n\r\n $dia = date (\"d\"); $mes = date (\"n\"); $ano = date (\"Y\");\r\n if($dia[0]=='0') $dia=substr($dia, -1);\r\n\r\n if (isset($_POST[\"userid\"])){\r\n $userid= ($_POST[\"userid\"]);\r\n } \r\n\r\n //(YYYY-MM-DD)\r\n if (isset($_POST[\"date\"])){\r\n //$dia = substr(($_GET[\"date\"]),8,2);\r\n $dia = \"01\";\r\n $mes = substr(($_POST[\"date\"]),5,2);\r\n $ano = substr(($_POST[\"date\"]),0,4);\r\n } \r\n\r\n //include the WeeklyCalClass and create the object !!\r\n include (\"StaffCalendar.php\");\r\n $calendar = new StaffCalendarClass ($userid, $dia, $mes, $ano);\r\n echo $calendar->showCalendar ();\r\n\r\n mysqli_close($conn);\r\n }", "function day($ask,$da,$mo,$ye,$next,$prev){\nglobal $maand,$week,$language,$m,$d,$y,$viewdayok,$searchdayok,$popupevent,$popupeventwidth,$popupeventheight;\n\nif (!isset($yda))\n $yda = '';\n\nif ($viewdayok == 1){\n// als er geen dag is, dan is het vandaag\nif (!$da){\n $da = $d;\n $mo = $m;\n $ye = $y;\n}\n\n$we = mktime(0,0,0,$mo,$da,$ye);\n$we = strftime(\"%w\",$we);\n$we++;\necho \"<h3>\".translate(\"askedday\").\": \".$week[$we].\" \".$da.\" \".$maand[$mo].\" \".$ye.\"</h3>\";\n\n// eerst alle items zoeken (anders serieuze mix-up van vars)\n$query = \"select id,title,description,url,cat_name,day,month,year from events left join calendar_cat on events.cat=calendar_cat.cat_id where day='$da' and month='$mo' and year='$ye' and approved='1' order by title ASC\";\n$result = mysql_query($query);\n\n// als ask = volgende dag...\nif (!$ask || $ask == \"nd\"){\n // bepaal maand en jaar voor previous (moet nu al, anders mix up !)\n $ymo = $mo;\n $yy = $ye;\n // als next is, optellen\n if ($next){\n $ok = 86400*$next;\n $da = date(\"j\",time()+ $ok);\n $next++;\n }\n // geen next, dag is vandag, dus maar 1 keer vermenigvuldigen\n else {\n $da = date(\"j\",time()+86400);\n $next = '2';\n }\n\n // vars voor volgende dag\n // nieuwe dag = 1, maand stijgt\n if ($da == \"1\")\n $mo++;\n // nieuwe maand = dertien, jaar stijgt\n if ($mo == \"13\"){\n $mo = '1';\n $ye += 1;\n }\n // vars voor vorige dag (als die er is natuurlijk)\n // dag\n if ($prev){\n if ($prev != \"O\"){\n $ok = 86400*$prev;\n $yda = date(\"j\",time()+$ok);\n $prev++;\n }\n else {\n $yda = date(\"j\");\n $prev = '1';\n }\n }\n else {\n $prev = 'O';\n }\n // nieuwe dag = 2, maand stijgt\n if ($da == \"2\")\n $ymo--;\n if ($ymo == \"0\")\n $ymo = '12';\n //als nieuwe dag gelijk aan 2 en nieuwe maand gelijk aan 1: jaar +1 pd-vars +1\n if ($da == \"2\" && $ymo == \"1\"){\n $yy -= 1;\n }\n // dag 31 & maand 12 = jaar beneden\n if ($yda == \"31\" && $ymo == \"12\")\n $yy -= 1;\n\n // vorige dag link, als next 2 is = vandaag op scherm, dus geen vorige dag (what's the use eh :)\n if ($next != \"2\")\n echo \"<a href=\\\"calendar.php?op=day&ask=pd&da=$yda&mo=$ymo&ye=$yy&next=$next&prev=$prev\\\"><== \".translate(\"prevday\").\"</a> - \";\n // link naar volgende dag\n echo \"<a href=\\\"calendar.php?op=day&ask=nd&da=$da&mo=$mo&ye=$ye&next=$next&prev=$prev\\\">\".translate(\"nextday\").\" ==></a><br><br>\";\n\n}\n\n// als ask = vorige dag ...\nif ($ask == \"pd\"){\n\n // bepaal maand en jaar voor previous (moet nu al, anders mix up !)\n $ymo = $mo;\n $yy = $ye;\n // next -> optellen\n $next -= 2;\n $ok = 86400*$next;\n $da = date(\"j\",time()+ $ok);\n $next++;\n // vars voor volgende dag\n // nieuwe dag = 1, maand daalt\n if ($da == \"2\")\n $mo--;\n // nieuwe maand = dertien, jaar daalt\n if ($mo == \"0\"){\n $mo = '12';\n $ye -= 1;\n }\n if ($da == \"2\" && $mo == \"13\")\n $mo = \"1\";\n // vars voor vorige dag (als die er is natuurlijk)\n // dag\n $prev -=2;\n if ($prev == \"0\")\n $prev == \"1\";\n $ok = 86400*$prev;\n $yda = date(\"j\",time()+$ok);\n $prev++;\n // nieuwe dag = 2, maand daalt\n if ($da == \"2\"){\n $ymo--;\n $mo++;\n }\n if ($da == \"1\")\n $mo++;\n if ($ymo == \"13\"){\n $ymo = '1';\n $yy -= 1;\n }\n if ($ymo == \"0\")\n $ymo = '12';\n // nieuwe maand = twaalf, jaar daalt\n if ($yda == \"31\" && $ymo == \"12\"){\n $yy -= 1;\n $mo = '1';\n $ye += 1;\n }\n if ($yda == \"30\" && $ymo == \"12\"){\n $mo = '1';\n $ye += 1;\n }\n // als next gelijk is aan twee, dan is prev = O\n if ($next == \"2\")\n $prev ='O';\n\n // vorige dag link, als next 2 is = vandaag op scherm, dus geen vorige dag (what's the use eh :)\n if ($next != \"2\")\n echo \"<a href=\\\"calendar.php?op=day&ask=pd&da=$yda&mo=$ymo&ye=$yy&next=$next&prev=$prev\\\"><== \".translate(\"prevday\").\"</a> - \";\n\t\t// link naar volgende dag\n\t\techo \"<a href=\\\"calendar.php?op=day&ask=nd&da=$da&mo=$mo&ye=$ye&next=$next&prev=$prev\\\">\".translate(\"nextday\").\" ==></a><br><br>\";\n\n}\n// beeld de zaken af van de gevraagde dag\n while ($row = mysql_fetch_object($result)){\n echo \"<li><b><U>\".$row->title.\"</u></b><br>\";\n echo translate(\"cat\").\" : \".$row->cat_name.\"<br>\";\n $de = str_replace(\"<br>\",\"\",$row->description);\n $de = str_replace(\"<br />\",\"\",$row->description);\n echo substr(stripslashes($de),0,100).\" ...\";\n echo \"<br>\";\n if ($popupevent == 1)\n echo \"<a href=\\\"#\\\" onclick=\\\"MM_openBrWindow('cal_popup.php?op=view&id=\".$row->id.\"','Calendar','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=\".$popupeventwidth.\",height=\".$popupeventheight.\"')\\\">\";\n else\n echo \"<a href=calendar.php?op=view&id=\".$row->id.\">\";\n echo translate(\"readmore\").\"</a>\";\n echo \"<br><br>\";\n }\nif ($searchdayok == 1)\n\tsearch();\n}\nelse{\n echo translate(\"disabled\");\n}\n}", "public function sheduleServise(Request $request )\n {\n $request->validate([\n 'id'=>'required',\n 'dateStart'=>'required|date',\n 'dateEnd'=>'required|date',\n ]);\n\n $id=$request->id;\n $dateStart=$request->dateStart;\n $dateEnd=$request->dateEnd;\n \n if(PomFunkResource::freeCar($id,$dateStart,$dateEnd))\n {\n DB::transaction(function() use($id,$dateStart,$dateEnd)\n {\n PomFunkResource::changeCarServis($id);\n PomFunkResource::insertReservation($id,'ADMIN','ADMIN','ADMIN',$dateStart,$dateEnd,'SERVIS',0);\n },5);\n \n return $this->kriticni();\n //end transakcija\n }\n else\n {\n return view('kriticni.zakaziServis2',[\"id\"=>$id,\"dateStart\"=>$dateStart,\"dateEnd\"=>$dateEnd]);\n }\n }", "public function bookingform($customer_id,$product_id,$date,$slot,$stime,$endtime) { \n\t\t\t\t\t\t \n\t\t\t\t\t\t\t$datafomat=str_replace(\"-\",\"/\",$date);\n\t\t\t\t\t\t $timestamp = strtotime($datafomat);\n\t\t\t\t\t\t $day = date('l', $timestamp);\n\t\t\t\t\t\t // echo $date;\n\t\t\t\t\t\t $datasfilds=explode(\"-\",$date);\n\t\t\t\t\t\t $month=$datasfilds[0];\n\t\t\t\t\t\t $list_day=$datasfilds[1];\n\t\t\t\t\t\t $year=$datasfilds[2];\n\t\t\t\t\t\t $monthchar='';\n\t\t\t\t\t\t\t\tif($month=='01'){ $monthchar='January';}\n\t\t\t\t\t\t\t\tif($month=='02'){ $monthchar='February';}\n\t\t\t\t\t\t\t\tif($month=='03'){ $monthchar='March';}\n\t\t\t\t\t\t\t\tif($month=='04'){ $monthchar='April';}\n\t\t\t\t\t\t\t\tif($month=='05'){ $monthchar='May';}\n\t\t\t\t\t\t\t\tif($month=='06'){ $monthchar='June';}\n\t\t\t\t\t\t\t\tif($month=='07'){ $monthchar='July';}\n\t\t\t\t\t\t\t\tif($month=='08'){ $monthchar='August';}\n\t\t\t\t\t\t\t\tif($month=='09'){ $monthchar='September';}\n\t\t\t\t\t\t\t\tif($month=='10'){ $monthchar='October';}\n\t\t\t\t\t\t\t\tif($month=='11'){ $monthchar='November';}\n\t\t\t\t\t\t\t\tif($month=='12'){ $monthchar='December';}\n\t \n\t\t\t\t\t\t\t\t\t \n\t\t $result='<div>\n\t<h5>You are about to request an appointment for administrator. Please review and confirm that you would like to request the following appointment: </h5>\n\t<div class=\"timeslot bookedClearFix\" style=\"padding: 21px 3px 82px 8px;background-color: beige;\">\n\t <h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-calendar-o\" aria-hidden=\"true\"></i> \n\t\t\t\t\t\t\t\t\t\t\t\t\t '.$monthchar.' '.$list_day.', '.$year.' at '.$stime.' – '.$endtime.' \n\t\t\t\t\t\t\t\t\t\t\t\t\t</h3>\n\t</div>\n\t<div style=\"padding: 20px;\">\n\t<span><button style=\"background-color: #ff5501;color: white;\" type=\"button\" onclick=\"booking_add_to_cart(\\''.$date.'\\',\\''.$day.'\\',\\''.$slot.'\\',1,'.$customer_id.','.$product_id.');\">Request Booking</button></span><span></span></div>\n\t</div>'; \n\t\n/* echo $customer_id;\necho $date;\n$datvalue=str_replace(\"-\",\"/\",$date);\n\t return $result; */ \n\t return $result;\n\t}", "function getReservation($studentid){\r\ninclude 'dbConnect.php';\r\n$sql= 'SELECT Student.SName, Course.CourseName, Course.Session, Course.Hours, Classroom.Location, Classroom.StartTime, Classroom.EndTime, Classroom.ClassDate, CRDate \r\nFROM ClassReservation\r\nINNER JOIN Student ON ClassReservation.SID = Student.SID\r\nINNER JOIN Classroom ON ClassReservation.ClassID = Classroom.ClassID\r\nINNER JOIN Course ON ClassReservation.CourseID = Course.CourseID\r\nWHERE ClassReservation.SID = '.$studentid.' And Classroom.ClassDate >= DATE_FORMAT(CURDATE(), \"%m/%d/%Y\");';\r\n$result = mysqli_query($conn, $sql);\r\nif(isset($result)){\r\n\tif(mysqli_num_rows($result) > 0){\r\n\t\t$view = '<table id=\"scheduleTable\" class=\"table table-striped custab\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>Student Name</th>\r\n\t\t\t\t\t\t<th>Course Name</th>\r\n\t\t\t\t\t\t<th>Session</th>\r\n\t\t\t\t\t\t<th>Hours</th>\r\n\t\t\t\t\t\t<th>Location</th>\r\n\t\t\t\t\t\t<th>Start Time</th>\r\n\t\t\t\t\t\t<th>End Time</th>\r\n\t\t\t\t\t\t<th>Class Date</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead><tbody>';\r\n\r\n\r\n\t\twhile($row = mysqli_fetch_assoc($result))\r\n\t\t{\r\n\t\t$view.= '<tr>\r\n <td>'.$row['SName'].'</td>\r\n <td>'.$row['CourseName'].'</td>\r\n\t\t\t\t<td>'.$row['Session'].'</td>\r\n\t\t\t\t<td>'.$row['Hours'].'</td>\r\n\t\t\t\t<td>'.$row['Location'].'</td>\r\n\t\t\t\t<td>'.$row['StartTime'].'</td>\r\n\t\t\t\t<td>'.$row['EndTime'].'</td>\r\n\t\t\t\t<td>'.$row['CRDate'].'</td>\r\n </tr>';\r\n\t\t}\r\n\t\t$view.= '</tbody></table>';\r\n\t}else{\r\n\t\t$view = '<div class=\"alert alert-danger\">\r\n\t\t\t\t Not yet register class!\r\n\t\t\t\t</div>';\r\n\t}\r\n}else{\r\n\t$view = 'Database Connection Error.';\r\n}\r\n\treturn $view;\r\n}", "function bookcar($c_id,$d_id,$u_id,$date)\n{\n\t$sql=\"insert into ride_details(u_id,d_id,c_id,booking_date,dep_date)values($u_id,$d_id,$c_id,'$date','\".date(\"Y-m-d\").\"')\";\n\t$GLOBALS['db']->exec($sql);\n\t$sql=\"update care_detail set status=1 where c_id=$c_id\";\n\t$GLOBALS['db']->exec($sql);\n\t$sql=\"update driver_detail set status=1 where d_id=$d_id\";\n\t$GLOBALS['db']->exec($sql);\n\n}", "function print_ref_can_appointment() {\n\n\ttry\n {\n $bdd = new PDO('mysql:host=localhost;dbname=g_practitioner;charset=utf8', 'root', '');\n }\n catch (Exception $e)\n {\n die('Erreur : ' . $e->getMessage());\n }\n\n $find = $bdd->prepare(\"SELECT * FROM appointment WHERE Name = :name AND (State=\\\"Refused\\\" OR State=\\\"Canceled\\\" )\");\n $find->execute(array('name' => $_SESSION['name']));\n\n // We search all appointments for the patient in session in state Refused or Cancelled\n\n $appointment = $find->fetch();\n\n if ($appointment != null) {\n \t// If there is appointments for the patient in session in state Refused or Cancelled\n\n $find->closeCursor();\n $find = $bdd->prepare(\"SELECT * FROM appointment WHERE Name = :name AND (State=\\\"Refused\\\" OR State=\\\"Canceled\\\" )\");\n \t$find->execute(array('name' => $_SESSION['name']));\n\n \t// We display in a table the appointments\n\n \t$List_Appointments = \"<div><table class=\\\"tab_hour_style\\\"><thead><tr><th>Doctor</th><th>Day</th><th>Time</th><th>State</th><th>Reason</th><th>Comment</th></tr></thead><tbody>\";\n\n\t while ($appointment = $find->fetch()) {\n\n\t $List_Appointments .= \"\n\t <tr>\n\t <td>\" . $appointment['doctor'] . \"</td>\n\t <td>\" . $appointment['day'] . \"</td>\n\t <td>\" . $appointment['time'] . \"</td>\n\t <td>\" . $appointment['state'] . \"</td>\n\t <td>\" . $appointment['reason'] . \"</td>\n\t <td>\" . $appointment['doctor_comment'] . \"</td>\";\n\t }\n\n\t $List_Appointments = $List_Appointments . \"</tbody></table></div>\";\n\n\t $find->closeCursor();\n\t echo $List_Appointments;\n\t}\n\n\telse {\n\t\t// If there isn't appointments for the patient in session in state Refused or Cancelled\n\n\t\techo \"<p>You don't have any canceld or refused appointment.</p>\";\n\t}\n}", "public function notify_date($id,$table){\n $this->date = date(\"d/m/y\");\n $sql = \"UPDATE $table SET SENT = '$this->date' WHERE ID = '$id'\";\n $query = mysqli_query($this->con,$sql);\n }", "public function saveDayResult(){\n\n $this->check == 0 ? $result = 0 : $result = count($this->check);\n\n $date = $this->date;\n\n $listResult[] = $this->check;\n\n dayresult::addRow($date, $result, serialize($listResult), Yii::$app->user->id);\n }", "public function GetSavenDate(Request $request)\n {\n\n $current = Carbon::now();\n $day = array();\n\n for ($i = 0; $i < 7; $i++) {\n\n $day[$i][\"Date\"] = Carbon::now()->addDays($i)->format('D');\n $day[$i][\"name_Day\"] = Carbon::now()->addDays($i);\n }\n\n\n $message = \"show specified info date\";\n return $this->Data('Data', [\n \"day\" => $day,\n \"lang\" => $this->lang(),\n\n ], $message, 200);\n }", "public function requestDate();", "function CallStaff(){\r\n $conn= databaseConnection(); $carGroup=\"\"; $sql=\"\";\r\n if(isset($_POST[\"date\"])) $date= $_POST[\"date\"]; \r\n if(isset($_POST[\"day\"]) &&isset($_POST['month']) &&isset($_POST['year'])) {\r\n $day = $_POST['day']; $month = $_POST['month']; $year = $_POST['year'];\r\n if ($day<10){\r\n switch ($day) {\r\n case 1: $day=\"01\"; break; case 2: $day=\"02\"; break; case 3: $day=\"03\"; break;\r\n case 4: $day=\"04\"; break; case 5: $day=\"05\"; break; case 6: $day=\"06\"; break;\r\n case 7: $day=\"07\"; break; case 8: $day=\"08\"; break; case 9: $day=\"09\"; break;\r\n }\r\n }\r\n if ($month<10){\r\n switch ($month) {\r\n case 1: $month=\"01\"; break; case 2: $month=\"02\"; break; case 3: $month=\"03\"; break;\r\n case 4: $month=\"04\"; break; case 5: $month=\"05\"; break; case 6: $month=\"06\"; break;\r\n case 7: $month=\"07\"; break; case 8: $month=\"08\"; break; case 9: $month=\"09\"; break;\r\n }\r\n }\r\n $fullDate1 =$year.\"-\".$month.\"-\".$day.\" 00:00:00\";\r\n $fullDate2 =$year.\"-\".$month.\"-\".$day.\" 23:59:59\";\r\n }else{\r\n $fullDate1 =$date.\" 00:00:00\"; $fullDate2 =$date.\" 23:59:59\";\r\n }\r\n if(isset($_POST[\"CarGroup\"])) $carGroup= $_POST[\"CarGroup\"]; \r\n if($carGroup !=\"\"){\r\n $sql = \"SELECT AvailabilityDate, UserPayRateId, PayRate,\r\n tblUserAvailability.UserId as UserId,\r\n FirstName,LastName, CanDrive, CarGroup, DefaultUserPayRateId \r\n\r\n FROM tblUserAvailability, tblUsers, tblUserPayRates\r\n WHERE DefaultUserPayRateId=UserPayRateId \r\n AND tblUserAvailability.UserId = tblUsers.UserId\r\n AND CarGroup = '$carGroup' \r\n AND AvailabilityDate >= '$fullDate1'\r\n AND AvailabilityDate <= '$fullDate2'\r\n ORDER BY FirstName;\";\r\n }\r\n else{\r\n $sql = \"SELECT AvailabilityDate, UserPayRateId, PayRate, \r\n tblUserAvailability.UserId as UserId,\r\n FirstName,LastName, CanDrive, CarGroup, DefaultUserPayRateId\r\n \r\n FROM tblUserAvailability, tblUsers, tblUserPayRates\r\n WHERE DefaultUserPayRateId=UserPayRateId \r\n and tblUserAvailability.UserId = tblUsers.UserId\r\n AND AvailabilityDate >= '$fullDate1'\r\n AND AvailabilityDate <= '$fullDate2'\r\n ORDER BY FirstName;\";\r\n }\r\n $sqlBusyStaff = \"SELECT UserId\r\n FROM tblStockTakes, tblStockTakeUsers\r\n WHERE tblStockTakes.StockTakeId=tblStockTakeUsers.StockTakeId \r\n AND StockTakeDate >= '$fullDate1'\r\n AND StockTakeDate <= '$fullDate2'\r\n\r\n UNION\r\n\r\n SELECT SupervisorUserId as UserId\r\n FROM tblStockTakes\r\n where StockTakeDate >= '$fullDate1'\r\n AND StockTakeDate <= '$fullDate2';\";\r\n $busyFlag=\"\";\r\n $resultBusyStaff = mysqli_query($conn, $sqlBusyStaff); \r\n $result_list = array();\r\n while($busyStaffRows = mysqli_fetch_assoc($resultBusyStaff)) {\r\n $result_list[] = $busyStaffRows['UserId'];\r\n }\r\n /*\r\n members €9.50 || TD (deputies) €10 || Team leader €11 or €15\r\n */\r\n $result = mysqli_query($conn, $sql);\r\n if (mysqli_num_rows($result) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($result)) {\r\n $staffInfo=\"\"; $Classes =\"staffList \";\r\n //=========================\r\n if($row[\"CanDrive\"]==1)\r\n {\r\n $staffInfo .=\"[D]\"; $Classes .=\"D\";\r\n }\r\n //==========================\r\n if($row[\"PayRate\"]==10)\r\n {\r\n $staffInfo .=\"[TD]\"; $Classes .=\"TD\";\r\n }\r\n else if($row[\"PayRate\"]>=11)\r\n {\r\n $staffInfo .=\"[TL]\"; $Classes .=\"TL\";\r\n }\r\n else\r\n {\r\n $Classes .=\" Member\";\r\n }\r\n //=============================\r\n if($Classes==\"\")\r\n $Classes= \"Member\";\r\n //=====================================\r\n $busyFlag=\"\";\r\n if(in_array($row[\"UserId\"],$result_list,'false'))\r\n {\r\n $busyFlag='style=\"background-color:orange;\"';\r\n }\r\n echo '<label id=\"'. $row[\"UserId\"].'\" class=\"btn '.$Classes\r\n .'\" draggable=\"true\" '.$busyFlag.'ondragstart=\"drag(event)\" style=\"cursor:move\">'\r\n . $row[\"FirstName\"].' '.$row[\"LastName\"].'<span style=\"float:right;\">'.$staffInfo.'</span>'\r\n .'<br><p style=\"float:right;\">'.' Car Group: '.$row[\"CarGroup\"]\r\n .'</p></label> ';\r\n }\r\n } \r\n else echo \"0 results\";\r\n }", "function showDate()\n\t{\n\t\t$lines = file('/home/int322_161a19/secret/topsecret');\n\t\t$j=0;\n\t\t$host = trim($lines[$j++]);\n\t\t$user = trim($lines[$j++]);\n\t\t$pass = trim($lines[$j++]);\n\t\t$dbnm = trim($lines[$j++]);\n\n\t\t//Establish connection\n\t\t$conn = mysqli_connect($host,$user,$pass,$dbnm) or die('Error connecting to database: ' . mysqli_error($conn));\n\n\t\t//Execute command and make sure it worked\n\t\t$sqlCmd = 'SELECT CURDATE()';\n\n\t\t$query = mysqli_query($conn, $sqlCmd) or die('query failed'. mysqli_error($conn));\n\n\t\t//Get result\n\t\t$result = mysqli_fetch_assoc($query);\n\t\techo('<p>' . $result['CURDATE()'] . '</p>');\n\n\t\t//Close connection\n\t\tmysqli_close($conn);\n\t}", "function verifDate($idEvenement, $idAgenda)\n{\n $connection = new mysqli($_SESSION['db_host'], $_SESSION['db_user'], $_SESSION['db_password'], $_SESSION['db_dbname']);\n $req = \"SELECT * from evenement where idEvenement = \" . $idEvenement;\n $res = mysqli_query($connection, $req);\n $ligne = mysqli_fetch_object($res);\n $debEvent = $ligne->HeureDebut;\n $finEvent = $ligne->HeureFin;\n\n\n $timestamp = date_create_from_format('Y-m-d H:i:s', $debEvent);\n $debEvent = date_format($timestamp, 'YmdHi');\n $timestamp = date_create_from_format('Y-m-d H:i:s', $finEvent);\n $finEvent = date_format($timestamp, 'YmdHi');\n\n $req = \"SELECT * from evenement where idEvenement = \" . $idAgenda;\n $res = mysqli_query($connection, $req);\n $ligne = mysqli_fetch_object($res);\n $debAge = $ligne->HeureDebut;\n $finAge = $ligne->HeureFin;\n\n $timestamp = date_create_from_format('Y-m-d H:i:s', $debAge);\n $debAge = date_format($timestamp, 'YmdHi');\n $timestamp = date_create_from_format('Y-m-d H:i:s', $finAge);\n $finAge = date_format($timestamp, 'YmdHi');\n\n\n if ($debEvent <= $debAge) {\n if ($debAge <= $finEvent)\n return false;\n return true;\n\n }\n\n\n if ($debEvent <= $finAge) {\n if ($finEvent >= $finAge)\n return false;\n return true;\n\n }\n return true;\n}", "public function lista_busca_registros_fecha($fecha_inicial, $fecha_final){\n\n $conectar= parent::conexion();\n\n \n $date_inicial = $_POST[\"fecha_inicial\"];\n $date = str_replace('/', '-', $date_inicial);\n $fecha_inicial = date(\"Y-m-d\", strtotime($date));\n \n $date_final = $_POST[\"fecha_final\"];\n $date = str_replace('/', '-', $date_final);\n $fecha_final = date(\"Y-m-d\", strtotime($date));\n\n \n \n $sql= \"SELECT * FROM compras WHERE fecha_compra>=? and fecha_compra<=? \";\n\n\n\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1,$fecha_inicial);\n $sql->bindValue(2,$fecha_final);\n $sql->execute();\n return $result = $sql->fetchAll(PDO::FETCH_ASSOC);\n\n }", "function allDays($month,$day,$con,$prodID){\n\t\t$m1 = date(\"m\",strtotime($month));\n\t\t$m2 = date(\"m\",strtotime(\"now\"));\n\t\t$year = \"\";\n\t\tif($m2>$m1){\n\t\t\t\n\t\t\t$year = date(\"Y\",strtotime(\"now +1 year\"));\n\t\t}\n\n $last = strtotime(\"last $day of $month $year\");\n $first = strtotime(\"first $day of $month $year\");\n $week = 0;\n for ($i=$first; $i < $last; ) {\n $i=strtotime(\"first $day of $month $year +$week week\");\n $ed = date(\"D M d Y\",$i);\n $checkReserved = $con->prepare(\"SELECT * FROM tbl_reserved WHERE prodID ='$prodID' AND EventDate = '$ed' \");\n $checkReserved->execute();\n $cr = $checkReserved->fetch(); \n if(!$cr){\n if(strtotime(\"now\") >= strtotime(date(\"M d Y\",$i))){\n echo \"<option>\".date(\"M d Y\",strtotime(date(\"M d Y\",$i).\" +1 year\")).\"</option>\";\n }else{\n echo \"<option>\".date(\"M d Y\",$i).\"</option>\";\n }\n \n }\n \n $week++;\n }\n }", "public function schedule_by_date(Request $request) {\n //\n $currentDate = $request->segment(2);\n $day = \\Helpers\\DateHelper::getDay($currentDate);\n $weekDays = \\Helpers\\DateHelper::getWeekDays($currentDate, $day); \n $workouts = \\App\\Schedule::getScheduledWorkouts($weekDays);\n \n return view('user/schedule', ['number_of_day' => $day, 'current_date' => $currentDate, 'weekDays' => $weekDays])\n ->with('target_areas', json_decode($this->target_areas, true))\n ->with('movements', json_decode($this->movements, true))\n ->with('workouts', $workouts); \n }", "public function setDays($regNr, $ssNr) {\n // Selecting the right row from history table bases on the personal number and registration number to update on right place.\n $historyQuery = \"SELECT * FROM history WHERE regNr = :regNr AND ssNr = :ssNr ORDER BY checkOutTime DESC LIMIT 1\";\n $historyStatement = $this->db->prepare($historyQuery);\n $historyParameters = [\"regNr\" => $regNr, \"ssNr\" => $ssNr];\n $historyRows = $historyStatement->execute($historyParameters);\n if (!$historyRows) die(\"Fatal Error\");\n \n // Fetching the checkin and checkout time from row selected above.\n $time = $historyStatement->fetch();\n $checkOut = $time[\"checkOutTime\"];\n $checkIn = $time[\"checkInTime\"];\n \n // Redefining times as Datetime-objects.\n $checkOutTime = new \\DateTime($checkOut);\n $checkInTime = new \\DateTime($checkIn);\n \n // Adding days, hours, minutes and seconds to total amount of minutes car has been rented.\n $difference = $checkOutTime->diff($checkInTime);\n $minutes = $difference->days * 24 * 60;\n $minutes += $difference->h * 60;\n $minutes += $difference->i;\n $minutes += $difference->s / 60;\n \n // Divide minutes with minutes in an hour and then hours in a day to get the amount in days and then rounding it up so we get amount of started days.\n $unroundedDays = $minutes / 60 / 24;\n $days = ceil($unroundedDays);\n \n // Updating history row we selected above with the total amount of days started.\n $historyQuery = \"UPDATE history SET days = :days WHERE regNr = :regNr AND ssNr = :ssNr ORDER BY checkOutTime DESC LIMIT 1\";\n $historyStatement = $this->db->prepare($historyQuery);\n $historyParameters = [\"days\" => $days, \"regNr\" => $regNr, \"ssNr\" => $ssNr];\n $historyStatement->execute($historyParameters);\n if (!$historyStatement) die(\"Fatal Error\");\n \n }", "public function sea($name , $date){\n\n $sql = \" SELECT users.fname ,users.status , users.lname , users.Email,work_done.tId , work_done.documantation ,work_done.task , mid(date ,1,10 ) as'date' from work_done join users using(userid) where live = 1 and date like concat( :date, '%') and fname like concat( :dangerousstring, '%') or lname like concat( :dangerousstring, '%') or status like concat( '%', :dangerousstring, '%') order by tId desc ;\n \";\n $stmt = $this->link->prepare($sql);\n $stmt->execute([':dangerousstring'=>$name , ':date'=>$date]);\n $rows = $stmt->fetchAll();\n $count = $stmt->rowCount();\n if($count < 1){\n echo ' <div class=\"card border-left-warning shadow mb-5 ml-3\" >\n \n <div class=\"card-header p-3\" >\n <p> '. $date .' <a class=\" ml-7 font-weight-bold text-primary \" href=\"home.php?report=de\"> × </a> </p>\n \n </div>\n <div class=\"card-body\" >\n <div class=\" alert alert-warning p-5 \"> <h6> No Report on that search </h6> </div>\n </div>\n </div> ';\n }\n\n else{\n\n echo ' <div class=\"row\">\n\n \n\n\n <div class=\"col-xl-12 col-lg-12\">\n <div class=\"card border-left-success shadow mb-5 ml-3\">\n \n <div class=\"card-header py-3 d-flex flex-row align-items-center justify-content-between\">\n <h6 class=\"m-0 font-weight-bold text-primary\">Result on '. $name .' and year '. $date.' </h6>\n <h6 class=\"m-0 ml-7 font-weight-bold text-primary\"> <a href=\"home.php?report=de\"> × </a></h6>\n \n </div>\n <div class=\"card-body\">\n\n \n\n\n\n \n \n \n\n <div class=\"container\">\n <table class=\"table table-striped \">\n <thead>\n <tr>\n <th>First name</th>\n <th>Last name</th>\n <th>Email</th>\n <th> Done </th>\n <th>Dail/task</th>\n <th> date </th>\n <th> From </th>\n \n \n \n </tr>\n </thead>\n <tbody>';\n foreach($rows as $row){\n if($row['status'] == 'cuser'){\n $st = 'Company user';\n }\n elseif($row['status'] == 'intente'){\n $st = 'intente ';\n }\n echo '\n <tr>\n <td> '. $row['fname'] .' </td>\n <td> '. $row['lname'] .' </td>\n <td> '. $row['Email'] .' </td>\n <td> '. $row['documantation'] .' </td>\n <td> '. $row['task'] .' </td>\n <td> '. $row['date'] .' </td>\n <td> '. $st .' </td>\n \n \n </tr>\n \n \n ';\n \n }\n echo '\n \n \n </tbody>\n </table>\n </div>\n </div>\n\n </div>\n\n </div>\n </div>\n \n ';\n\n\n\n\n\n\n\n\n \n }\n}", "public function getSelectedDayLoanDetails($selectedDate) {\n\n\n date_default_timezone_set(\"Asia/Calcutta\");\n $time = date('H:i:s');\n $today = date('Y-m-d H:i:s');\n\n $numOfInstallments = DefaultData::getNumOfInstlByPeriodAndType($this->loan_period, $this->installment_type);\n $first_installment_date = '';\n $paid_aditional_interrest = 0;\n $INSTALLMENT = new Installment(NULL);\n $total_paid_installment = 0;\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $loan_amount = $numOfInstallments * $this->installment_amount;\n $actual_due = $loan_amount - $total_paid_installment;\n\n //daily installment\n if ($this->installment_type == 30) {\n\n $FID = new DateTime($this->effective_date);\n $FID->modify('+1 day');\n $first_installment_date = $FID->format('Y-m-d ' . $time);\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d ' . $time);\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n $last_od_amount = 0;\n $od_interest = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FID = new DateTime($date);\n $FID->modify($modify_range);\n $day_remove = '-1 day';\n $FID->modify($day_remove);\n $second_installment_date = $FID->format('Y-m-d ' . $time);\n $amount = $this->installment_amount;\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n foreach ($INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id) as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n $last_od_amount = (float) end($od_amount_all_array);\n\n $balance = $actual_due;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $AllOd = $OD->allOdByLoan();\n\n\n //get daily loan od amount \n if (!$AllOd || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($AllOd) {\n foreach ($AllOd as $key => $allod) {\n\n if (strtotime($allod['od_date_start']) <= strtotime($date) && strtotime($date) <= strtotime($allod['od_date_end']) && (-1 * ($allod['od_interest_limit'])) > $balance) {\n\n if (strtotime($date) >= strtotime($selectedDate)) {\n break;\n }\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify(' +23 hours +59 minutes +58 seconds');\n\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n $paid_all_amount_before_ins_date1 = 0;\n $before_payment_amounts1 = $INSTALLMENT->getPaidAmountByBeforeDate($od_date_morning, $this->id);\n\n foreach ($before_payment_amounts1 as $before_payment_amount1) {\n $paid_all_amount_before_ins_date1 += $before_payment_amount1['paid_amount'];\n }\n\n $od_interest = $this->getOdIntereset1(-$ins_total + $paid_all_amount_before_ins_date1, $allod['od_interest_limit']);\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n if ($od_amount_all > 0 || $paid_all_od_before_ins_date == $last_od_amount) {\n\n array_push($od_amount_all_array, $od_amount_all);\n }\n }\n }\n }\n }\n\n $total_installment_amount += $installment_amount;\n\n if (strtotime($selectedDate) <= strtotime($date)) {\n break;\n }\n\n $start->modify($modify_range);\n $x++;\n\n //end of the installment\n if ($numOfInstallments == $x) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify('+23 hours +59 minutes +58 seconds');\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n //check log ends with od or installment\n $last_od_date = date('D/M/Y', strtotime($od_date_morning));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+1 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n $days_between = floor(abs($end - $start) / 86400) - 1;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n $y = 0;\n\n $od_date_start1 = new DateTime($date);\n $od_date_start1->modify('+47 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n $od_amount_all_array_1 = array();\n\n while ($y <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start1->format('Y-m-d H:i:s');\n\n //getting echo $od_date; before of date from current od date\n $OLDODDATE = new DateTime($od_date);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime($selectedDate) < strtotime($old_od_date) || strtotime($selectedDate) < strtotime($od_date) || strtotime($od['od_date_end'] . $time) < strtotime($old_od_date)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n if ($od_amount_all > 0 || $paid_all_od_before_ins_date == $last_od_amount) {\n\n array_push($od_amount_all_array_1, $od_amount_all);\n }\n\n $od_date_start1->modify($od_dates);\n\n $y++;\n }\n\n $last_od_amount = (float) end($od_amount_all_array_1);\n }\n }\n }\n //weekly installment\n } else if ($this->installment_type == 4) {\n\n $FID = new DateTime($this->effective_date);\n $FID->modify('+7 day');\n $first_installment_date = $FID->format('Y-m-d ' . $time);\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d ' . $time);\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FID = new DateTime($date);\n $FID->modify($modify_range);\n $day_remove = '-1 day';\n $FID->modify($day_remove);\n $second_installment_date = $FID->format('Y-m-d ' . $time);\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $total_paid_installment - $ins_total;\n\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($od !== false) {\n\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n $od_date_start = new DateTime($date);\n $defult_val = 6;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= 6 && $this->od_date <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n //// od dates range\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n\n if (strtotime($od_date) >= strtotime($selectedDate)) {\n break;\n }\n array_push($od_amount_all_array, $od_interest);\n\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n $last_od_amount = (float) end($od_amount_all_array);\n }\n }\n }\n\n if ($selectedDate . \" \" . $time == $date) {\n $total_installment_amount += $installment_amount;\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || strtotime($selectedDate) < strtotime($date)) {\n break;\n }\n } else {\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || strtotime($selectedDate) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n }\n\n\n $start->modify($modify_range);\n $x++;\n\n if ($numOfInstallments == $x) {\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+7 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n $defult_val = $days_between;\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n// $od_amount_all_array_1 = array();\n\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n\n $od_date1 = $od_date_start1->format('Y-m-d H:i:s');\n\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime($selectedDate) <= strtotime($od_date1)) {\n break;\n }\n\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n// if ($od_amount_all > 0 || $paid_all_od_before_ins_date == $last_od_amount) {\n//\n// array_push($od_amount_all_array_1, $od_amount_all);\n// }\n array_push($od_amount_all_array, $od_interest);\n\n// $last_od_amount = (float) end($od_amount_all_array_1);\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n } else if ($this->installment_type == 1) {\n\n $FID = new DateTime($this->effective_date);\n $FID->modify('+1 months');\n $first_installment_date = $FID->format('Y-m-d ' . $time);\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $no_of_installments = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d ' . $time);\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FID = new DateTime($date);\n $FID->modify($modify_range);\n $day_remove = '-1 day';\n $FID->modify($day_remove);\n $second_installment_date = $FID->format('Y-m-d ' . $time);\n $amount = $this->installment_amount;\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $last_od_amount;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($od !== false) {\n $y = 0;\n //get how many dates in month\n $dateValue = strtotime($date);\n $year = date(\"Y\", $dateValue);\n $month = date(\"m\", $dateValue);\n\n $daysOfMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\n $od_date_start = new DateTime($date);\n $defult_val = $daysOfMonth - 1;\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysOfMonth - 1 && $this->od_date <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d');\n\n\n if (strtotime($date) >= strtotime($selectedDate) || strtotime($od_date) >= strtotime($selectedDate)) {\n break;\n }\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n array_push($od_amount_all_array, $od_amount_all);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n if ($selectedDate . \" \" . $time == $date) {\n $total_installment_amount += $installment_amount;\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || strtotime($selectedDate) < strtotime($date)) {\n break;\n }\n } else {\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || strtotime($selectedDate) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n }\n\n $start->modify($modify_range);\n $x++;\n\n if ($numOfInstallments == $x) {\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+' . $daysOfMonth . ' day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n $od_amount_all_array_1 = array();\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d');\n\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n if (strtotime($selectedDate) <= strtotime($old_od_date) || strtotime($od['od_date_end'] . $time) < strtotime($old_od_date)) {\n break;\n }\n $last_od_amount = (float) end($od_amount_all_array_1);\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n if ($od_amount_all > 0 || $paid_all_od_before_ins_date == $last_od_amount) {\n\n array_push($od_amount_all_array_1, $od_amount_all);\n }\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n }\n\n $last_od_amount_balance = $last_od_amount - $paid_aditional_interrest;\n\n if ($last_od_amount_balance > 0) {\n $last_od_amount_balance = $last_od_amount_balance;\n } else {\n $last_od_amount_balance = 0;\n }\n\n $all_arress = ($total_paid_installment) - ($total_installment_amount );\n $system_due = $loan_amount - $total_installment_amount;\n $system_due_num_of_ins = $system_due / $this->installment_amount;\n $actual_due_num_of_ins = $actual_due / $this->installment_amount;\n\n\n if ($this->installment_type == 4 || $this->installment_type == 1) {\n $actual_due = $all_arress + ($last_od_amount - $paid_aditional_interrest);\n }\n return [\n 'date' => $date,\n 'od_amount' => $last_od_amount_balance,\n 'all_arress' => $all_arress,\n 'all_amount' => $balance,\n 'system-due-num-of-ins' => $system_due_num_of_ins,\n 'system-due' => $system_due,\n 'actual-due-num-of-ins' => $actual_due_num_of_ins,\n 'actual-due' => $actual_due,\n 'receipt-num-of-ins' => $total_paid_installment / $this->installment_amount,\n 'receipt' => $total_paid_installment + $paid_aditional_interrest,\n 'arrears-excess-num-of-ins' => ($total_installment_amount - $total_paid_installment) / $this->installment_amount,\n 'arrears-excess' => $total_installment_amount - $total_paid_installment,\n 'installment_amount' => $amount,\n ];\n }", "public static function makeReservation($requestObject, $db_conn) {\n $fromDate = ProjectUtils::constructDate($requestObject['FROM_DATE'], $requestObject['FROM_TIME']);\n $toDate = ProjectUtils::constructDate($requestObject['TO_DATE'], $requestObject['TO_TIME']);\n \n $insertDetails = \"'\" . $requestObject['VTNAME'] . \"'\" . \", \" . $requestObject['DLICENSE'] . \", \" . $fromDate . \", \" . $toDate . \", '\" . $requestObject['LOCATION'] . \"'\";\n $confNo = hash('ripemd160', $insertDetails . rand());\n \n $result = $db_conn->executePlainSQL(\"INSERT INTO reservations VALUES (\" . \"'\" . $confNo . \"'\" . \", \" . $insertDetails . \")\");\n $db_conn->commit();\n\n return $confNo;\n }", "public function get_calendrier() {\r\n\r\n\t\tif(!empty($_SESSION['zone_vacs']) && $_SESSION['zone_vacs']!= 0)\r\n\t\t{\r\n\t\t$vacs = $_SESSION['zone_vacs'];\r\n\t\t$req = $this->dbh->query(\"SELECT * FROM semaine WHERE zone_semaine ='$vacs'\");\r\n\t\t$data = $req->fetchall();\r\n\r\n\t\t\tif(!empty($_GET['moisForm']))\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['Mois'] = $_GET['moisForm'];\r\n\t\t\t}\r\n\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['Mois'] = date(\"n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t$_SESSION['annéeEnCours'] = date(\"Y\");\r\n\t\t\t\t$_SESSION['année'] = date(\"Y\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif($_SESSION['Mois']>12)\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['année']++;\r\n\t\t\t}\r\n\t\t\t$_SESSION['MoisForm'] = date(\"n\");\r\n\r\n\t\t$var3=date(\"w\", mktime(0,0,0,$_SESSION['Mois'],1,$_SESSION['année']));\r\n\t\t$var4=date(\"t\");$var6=date(\"d\");\r\n\t\t$jour = date(\"j\");\r\n\t\t$semaine=date(\"W\", mktime(0,0,0,$_SESSION['Mois'],1,$_SESSION['année']));\r\n\t\t$var7=date(\"w\", mktime(0,0,0,$_SESSION['Mois'],$jour,$_SESSION['année']));\r\n\t\t$mois=array(\"\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Aout\", \"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Aout\", \"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\r\n\t\tif ($var3==0) {$var3=7;}\r\n\t\techo\"<table border=0 style='font-size:15pt;font-family:verdana,arial,tahoma'>\\n\r\n\t\t<th colspan=7 align=center>\".$mois[$_SESSION['Mois']].\" \".$_SESSION['année'].\"</th>\r\n\t\t<tr>\\n<td>Lu</td><td>Ma</td><td>Me</td><td>Je</td><td>Ve</td><td>Sa</td><td>Di</td></tr>\\n<tr>\\n\";\r\n\t\t$i=1;\r\n\t\twhile ($i<$var3) { echo \"<td>&nbsp;</td>\";$i++; }\r\n\t\t$i=1;\r\n\r\n\t\twhile ($i<=$var4){\r\n\t\t$var5=($i+$var3-1)%7;\r\n\r\n\t\tif(basename($_SERVER['PHP_SELF']) == 'semaine.php' and empty($data)) {\r\n\t\t\t$var = '<td onClick=\"get_date('.date(\"W\", mktime(0,0,0,$_SESSION['Mois'],$i,$_SESSION['année'])).')\">';\r\n\t\t}\r\n\t\telseif(empty($data)) {\r\n\t\t\t$var = '<td>';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tunset($var);\r\n\t\t\t$boucle = false;\r\n\t\t\tforeach($data as $elem) {\r\n\t\t\t\tif($elem['num_semaine'] == date(\"W\", mktime(0,0,0,$_SESSION['Mois'],$i,$_SESSION['année']))) {\r\n\t\t\t\t\t$var = '<td onClick=\"get_date('.date(\"W\", mktime(0,0,0,$_SESSION['Mois'],$i,$_SESSION['année'])).')\" bgcolor=\"#00FF00\">';\r\n\t\t\t\t\t$boucle = true;\r\n\t\t\t\t}\r\n\t\t\t\telseif(empty($var) and $boucle == false) {\r\n\t\t\t\t\t$var = '<td>';\r\n\t\t\t\t\tif(basename($_SERVER['PHP_SELF']) == 'semaine.php') {\r\n\t\t\t\t\t\t$var = '<td onClick=\"get_date('.date(\"W\", mktime(0,0,0,$_SESSION['Mois'],$i,$_SESSION['année'])).')\">';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$boucle = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo $var;\r\n\r\n\t\tif ($i==$var6) { \r\n\t\t\techo\"<span style='font-size:15pt;font-family:verdana,arial,tahoma'>$i</span>\"; \r\n\t\t}\r\n\t\telse if ($var5==0) { echo\"<span style='font-size:15pt;font-family:verdana,arial,tahoma'>$i</span>\"; }\r\n\t\telse { echo \"$i\"; \r\n\t\t}\r\n\t\techo\"</td>\\n\";\r\n\t\tif ($var5==0) { echo \"</tr>\\n<tr>\\n\"; }\r\n\t\t$i++;}\r\n\r\n\t\techo\"</tr></table>\\n\";\r\n\t\t?>\r\n\t\t\r\n\t\t\r\n\t\t<center>\r\n\t\t<form action=\"<?php echo basename($_SERVER['PHP_SELF']); ?>\" method=\"GET\">\r\n\t\t<?php if(!empty($_GET['site'])) { ?>\r\n\t\t<input type=\"hidden\" name=\"site\" value=\"<?php echo $_GET['site']; ?>\"/>\r\n\t\t<?php } ?>\r\n\t\t<p><select name=\"moisForm\">\r\n\t\t<?php\r\n\t\t$_SESSION['année'] = $_SESSION['annéeEnCours'];\r\n\t\tfor ($ii = 0; $ii < 13; $ii++) {\r\n\t\t$a = date(\"n\")+$ii;\r\n\t\t\t\t\t\t\r\n\t\t\t\tif($a==13)\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t$_SESSION['année']++;\r\n\t\t\t\t}\r\n\t\t\t\t\t\tif($a<12)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$_SESSION['année'] = $_SESSION['annéeEnCours'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t?>\r\n\r\n\t\t<option value=\"<?php echo $a;?>\"><?php echo $mois[$a].\" \".$_SESSION['année'];?></option>\r\n\r\n\t\t<?php\r\n\r\n\t\t} \r\n\r\n\t\t?> \r\n\t\t</select>\r\n\t\t<input type=\"submit\" value=\"Choisir le mois\" /></p>\r\n\t\t</form>\r\n\t\t</center>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tfunction get_date(nb) {\r\n\t\t\t\tdocument.getElementById('date').value = nb;\r\n\t\t\t}\r\n\t\t</script>\r\n\t\t\r\n\t\t\r\n\t\t<?php\r\n\t\t}\r\n\r\n\t}", "function view(){\n global $DOPBSP;\n \n /*\n * Check if reservations have expired each time you open the reservations page.\n */\n $this->clean();\n \n /*\n * Display reservations template.\n */\n $DOPBSP->views->backend_reservations->template();\n }", "function ShowDocument($conn,$DATA){\n $boolean = false;\n $count = 0;\n $deptCode = $DATA[\"deptCode\"];\n $DocNo = str_replace(' ', '%', $DATA[\"xdocno\"]);\n\n $sDate = $DATA[\"sDate\"];\n $eDate = $DATA[\"eDate\"];\n\n $sl1 = strlen($sDate);\n $sl2 = strlen($eDate);\n\n//\t $Sql = \"INSERT INTO log ( log ) VALUES ('$sl1 : $sl2')\";\n// mysqli_query($conn,$Sql);\n\n $Sql = \"SELECT\n contract_parties_hospital.RowID,\n contract_parties_hospital.StartDate, \n contract_parties_hospital.EndDate, \n IFNULL(Detail,'') AS Detail, \n (EndDate-DATE(NOW())) AS LeftDay, \n site.HptName\n FROM contract_parties_hospital \n INNER JOIN site ON contract_parties_hospital.HptCode = site.HptCode\n WHERE contract_parties_hospital.IsStatus = 0 \";\n if(($sl1 > 9) && ($sl2 > 9)) $Sql .= \"AND EndDate BETWEEN '$sDate' AND '$eDate' \";\n $Sql .= \"ORDER BY (EndDate-DATE(NOW())) ASC\";\n $return['sql'] = $Sql;\n $meQuery = mysqli_query($conn,$Sql);\n while ($Result = mysqli_fetch_assoc($meQuery)) {\n\t$return[$count]['RowID'] \t\t= $Result['RowID'];\n\t$return[$count]['HptName'] \t\t= $Result['HptName'];\n\t$return[$count]['StartDate'] \t= $Result['StartDate'];\n $return[$count]['EndDate'] \t\t= $Result['EndDate'];\n $return[$count]['Detail'] \t\t= $Result['Detail'];\n $return[$count]['LeftDay'] \t\t= $Result['LeftDay'];\n $boolean = true;\n $count++;\n }\n\n if($boolean){\n $return['status'] = \"success\";\n $return['form'] = \"ShowDocument\";\n echo json_encode($return);\n mysqli_close($conn);\n die;\n }else{\n $return[$count]['DocNo'] = \"\";\n $return[$count]['DocDate'] = \"\";\n $return[$count]['Qty'] = \"\";\n $return[$count]['Elc'] = \"\";\n $return['status'] = \"failed\";\n $return['form'] = \"ShowDocument\";\n\t$return['msg'] = \"nodetail\";\n echo json_encode($return);\n mysqli_close($conn);\n die;\n }\n}", "public function getDateDebut();", "function new_reservation($room, $fromTime, $toTime, $subject, $category, $description='', $allDay=0, $recurrence_id=0, $printresult=0) {\n global $USER, $DB;\n\n /*\n if ($colision = check_availability($room, $fromTime, $toTime)) {\n echo '<b>COLLISION!!! : </b>';\n print_r($colision);\n }\n * \n */\n \n//check if start time == end time\n//this should result in no reservation\n \n$starttime_notEqual_endtime = !($fromTime == $toTime);\n\n if ($starttime_notEqual_endtime && !check_availability($room, $fromTime, $toTime)) {\n $reservation = new stdClass();\n $reservation->subject = $subject;\n $reservation->startdate = $fromTime;\n $reservation->enddate = $toTime;\n $reservation->alldayevent = $allDay;\n $reservation->meetingorganizer = $USER->id;\n $reservation->categories = $category;\n $reservation->description = $description;\n $reservation->location = $room;\n $reservation->active = 1;\n $reservation->confirm = 0;\n $reservation->recurrence_id = $recurrence_id;\n\n \n\n $reservationID = $DB->insert_record('roomscheduler_reservations', $reservation);\n\n if($printresult){//used if want id of reservation returned with ajax\n print $reservationID;\n }\n\n return $reservationID;\n } else {\n return false;\n }\n}", "public function getAllDate($datoDesde,$datoHasta){\n $sql = \"SELECT Id, Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago From \" .self::$tablename. \" WHERE FechaSolicitud BETWEEN '{$datoDesde}' AND '{$datoHasta}' ORDER BY Id DESC\";\n return Executor::doit($sql);\n }", "public static function auto_mark_slot($connection, $register_event_slot_id) {\r\n\t\r\n\t\tglobal $USER;\r\n\t\r\n\t\t//Query to get default marks\r\n\t\t$lookup_sql = \"SELECT object_type, usage_code FROM usages WHERE object_type IN ('T','R') AND is_default_usage = 'Y' AND is_positive = 'Y'\";\r\n\t\t\r\n\t\t$lookup_statement = oci_parse($connection, $lookup_sql);\r\n\t\t\r\n\t\tif(!$lookup_statement) {\r\n\t\t\t$error = oci_error($lookup_statement);\r\n\t\t\tdie(\"An error was encountered parsing the default usages lookup query: \" . $error[\"message\"]);\r\n\t\t}\r\n\t\r\n\t\tif(!oci_execute($lookup_statement, OCI_DEFAULT)) {\r\n\t\t\t$error = oci_error($lookup_statement);\r\n\t\t\tdie(\"An error was encountered executing the default usages lookup query: \" . $error[\"message\"]);\r\n\t\t}\r\n\t\t\r\n\t\twhile($row = oci_fetch_array($lookup_statement, OCI_DEFAULT)) {\r\n\t\t\r\n\t\t\t$mark_sql = \"\r\n\t\t\t\tUPDATE\r\n\t\t\t\t\tregister_event_details_slots\r\n\t\t\t\tSET\r\n\t\t\t\t\tusage_code = :usage_code,\r\n\t\t\t\t\tactual_start_date = planned_start_date,\r\n\t\t\t\t\tactual_end_date = planned_end_date,\r\n\t\t\t\t\tupdated_by = :username,\r\n\t\t\t\t\tupdated_date = SYSDATE\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tregister_event_slot_id = :register_event_slot_id\r\n\t\t\t\t\tAND object_type = :object_type\r\n\t\t\t\t\tAND usage_code IS NULL\r\n\t\t\t\";\r\n\t\t\t\r\n\t\t\t$mark_statement = oci_parse($connection, $mark_sql);\r\n\t\t\t\r\n\t\t\tif(!$mark_statement) {\r\n\t\t\t\t$error = oci_error($mark_startement);\r\n\t\t\t\tdie(\"An error was encountered parsing the detail slot marking query: \" . $error[\"message\"]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\toci_bind_by_name($mark_statement, \":usage_code\", $row[\"USAGE_CODE\"]);\r\n\t\t\toci_bind_by_name($mark_statement, \":username\", $USER->username);\r\n\t\t\toci_bind_by_name($mark_statement, \":register_event_slot_id\", $register_event_slot_id);\r\n\t\t\toci_bind_by_name($mark_statement, \":object_type\", $row[\"OBJECT_TYPE\"]);\r\n\t\t\t\r\n\t\t\tif(!oci_execute($mark_statement, OCI_DEFAULT)) {\r\n\t\t\t\t$error = oci_error($mark_statement);\r\n\t\t\t\tdie(\"An error was encountered executing the detail slot marking query: \" . $error[\"message\"]);\r\n\t\t\t}\r\n\t\t}\t\t\t\t\r\n\t}", "function getDay(Request $request, Response $response) {\n error_log(\"server getDay\");\n $sql = \"select current_day FROM pizza_sys_tab\";\n $db = getConnection();\n $stmt = $db->query($sql);\n // fetch just column 0 value--\n return $stmt->fetch(PDO::FETCH_COLUMN, 0);\n}", "public function getDayBookingData($date){\n\t\t$reservations = $this->db->select('reservation_detail.control_id, reservation_detail.cat_room_id')\n\t\t\t->from('reservation_detail')\n\t\t\t->join('reservation', 'reservation.id_reserve = reservation_detail.reservation_id')\n\t\t\t->where(\"reservation_detail.date_reservation ='$date' AND (reservation.status_reserve =1 OR reservation.status_reserve =3)\")\n\t\t\t->get();\n\t\t$allotments = $this->getAllotments();\n\t\t\n\t\tif($reservations->num_rows() > 0){\n\t\t\t$acum = 0;\n\t\t\tforeach ($reservations->result() as $row){\n\t\t\t\tforeach ($row as $key => $value) {\n\t\t\t\t\t$res[$acum][$key] = $value;\n\t\t\t\t}\n\t\t\t\t$acum++;\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "function setDateForRapport($idsRoy){\n \t\t\n //récupère les royalty pour les livres sélectionnés\n $sql = \"SELECT \n COUNT(DISTINCT r.id_royalty) nbRoy\n ,SUM(v.montant_livre) rMtVente, SUM(v.nombre) unit, v.type typeVente\n ,SUM(r.montant_livre) rMtRoy\n ,MIN(r.taxe_taux) taux, MIN(r.taxe_deduction) deduction, MIN(r.pourcentage) pc\n ,l.id_livre, l.titre_en, l.titre_fr, l.titre_es\n ,c.type typeContrat\n ,com.id_comite, com.titre_fr, com.titre_en, com.titre_es\n FROM iste_royalty r \n INNER JOIN iste_vente v ON v.id_vente = r.id_vente\n INNER JOIN iste_isbn i ON i.id_isbn = v.id_isbn\n INNER JOIN iste_livre l ON l.id_livre = i.id_livre\n INNER JOIN iste_comitexlivre cl ON cl.id_livre = l.id_livre\n INNER JOIN iste_auteurxcontrat ac ON ac.id_auteurxcontrat = r.id_auteurxcontrat AND ac.id_comite = cl.id_comite\n INNER JOIN iste_comite com ON c.id_comite = ac.id_comite\n INNER JOIN iste_contrat c ON c.id_contrat = ac.id_contrat\n WHERE r.id_royalty IN (\".$idsRoy.\")\n GROUP BY com.id_comite\";\n //echo $sql;\n $stmt = $this->_db->query($sql);\n \n return $stmt->fetchAll(); \n \n }", "public function bookingCreate($empID, $dt, $custEmail = '', $typeId='')\n {\n require_once('models/Customer.class.php');\n require_once('models/Calendar.class.php');\n require_once('models/CanWork.class.php');\n require_once('models/AppType.class.php');\n require_once('views/BookingView.class.php');\n\n $site = new SiteContainer($this->db);\n $bkv = new BookingView();\n $cal = new Calendar($this->db);\n $cust = null; // Needed in order to not print a customer dropdown if logged in as customer\n \n // If no email supplied, we are booking for the current customer\n if ($this->custLoggedIn() && empty($custEmail))\n {\n $custEmail = $_SESSION['email'];\n } else if ($this->ownerLoggedIn() && empty($custEmail))\n {\n $errors= \"Please provide a valid email address to create this appointment\";\n $this->bookingConfirm($empID, $dt, $typeId, $errors);\n return;\n } else if ($this->ownerLoggedIn()) // email not empty\n {\n try{\n $cust = new Customer($custEmail, $this->db);\n } catch(Exception $e){\n // Was unable to find customer with this email\n $errors = \"Email must be of an existing valid customer\";\n // Re=present the booking confirmation\n $this->bookingConfirm($empID, $dt, $typeId, $errors);\n return;\n }\n }\n \n // Grab the canwork from the databse\n $cw = new CanWork($empID, $dt, $this->db); // Still not a booking!!\n $appType = new AppType($typeId, $this->db);\n \n // Grab the employee from the database\n if (! ($empdata = $this->fetchEmployeeFromDb($empID)) )\n throw new Exception(\"Employee $empID could not be found for booking at time: \".$dt->format('Y-m-d H:i:s'));\n\n // check that it hasnt already been taken\n try {\n $b_meta = $cal->bookingCheckAndReturnMeta($empID, $dt, $appType);\n } catch (Exception $e) {\n $site->printHeader();\n $site->printNav($_SESSION['type']);\n $bkv->printError($e->getMessage());\n $site->printFooter();\n $this->writeLog(\"Creation of booking failed: \" . $e->getMessage());\n return; // Its not possible to create this booking\n }\n \n // Here we want to insert the booking\n $sql = \"INSERT INTO Bookings (empID, email, datetime, startTime, endTime, appType) VALUES (?,?,?,?,?,?);\";\n $stmt = $this->db->prepare($sql);\n\n // Insert our given username into the statement safely\n $stmt->bind_param('sssssi',\n $empID,\n $custEmail,\n $b_meta['dateTime'],\n $b_meta['startTime'],\n $b_meta['endTime'],\n $b_meta['typeid']\n );\n \n \n $site->printHeader();\n $site->printNav($_SESSION['type']);\n \n if( $stmt->execute() ) // Our appointment was successfully booked, now it is a booking\n {\n $bk = new Booking($empID, $cw->get_dateTime(), $this->db);\n $this->writeLog(\"Booking for a \" . $bk->get_type() . \" successfully created at \" . $dt->format('Y-m-d H:i:s')\n . \" with employee \" . $empdata->fullName\n . \" for customer with email \" . $custEmail);\n $bkv->printSuccess($bk, $empdata, $cust);\n } else\n {\n $this->writeLog(\"Creation of a booking failed: \" . $stmt->error);\n $bkv->printError($stmt->error);\n }\n\n $site->printFooter(); \n \n }", "public function changeStatusDayAction(Request $request, $idOutputDay)\n\t{\t\n\t\t$em = $this->getDoctrine()->getManager();\t\t\n\t\t$outputDay=$em->getRepository('OptimusOptimusBundle:APSwitchOutputDay')->findBy(array(\"id\"=>$idOutputDay));\n\t\t$elementsForm=array();\n\t\t\n\t\tif($outputDay)\n\t\t{\t\t\t\n\t\t\tparse_str($request->request->get('data'), $elementsForm);\t\t\t\n\t\t\t$status=(int)$elementsForm['filter'];\n\t\t\t$outputDay[0]->setStatus($status);\n\t\t\t$em->flush();\n\t\t\t\n\t\t\t//event change status\n\t\t\t$user=$em->getRepository('OptimusOptimusBundle:Users')->find($this->container->get('security.context')->getToken()->getUser()->getId());\n\t\t\t\n\t\t\tif($status==0) \t\t\t$newStatus=\"unknowns\";\n\t\t\telseif($status==1) \t\t$newStatus=\"accepts\";\n\t\t\telse \t\t\t\t\t$newStatus=\"declines\";\n\t\t\t\n\t\t\t$textEvent=\" Scheduling the on/off of the heating system \";\n\t\t\t$context=\"Action plan - Scheduling the on/off of the heating system\";\n\t\t\t$visible=1;\n\t\t\t$ip=$this->container->get('request_stack')->getCurrentRequest()->getClientIp();\n\t\t\t\n\t\t\t$idActionPlan=(int)$elementsForm['idActionPlan'];\n\t\t\t\n\t\t\t$this->get('service_event')->createEvent($user, $textEvent, $context, $idActionPlan, 1, $ip, $request->request->get('idBuilding'), $newStatus);\n\t\t}\n\t\t\n\t\treturn new Response(\"ok\");\n\t}", "function day_name($date,$session_nik,$datacuti,$dataliburbersama,$datalibur,$datasakittanpasuratdokter,$datasakitdengansuratdokter){\n\n $tanggal = date('Y-m-d', strtotime($date));\n\n $query = mysql_query(\"SELECT * FROM tbl_holiday WHERE Tanggal='$tanggal'\");\n $total = mysql_num_rows($query);\n $data = mysql_fetch_array($query);\n \n $cutiid = \"\";\n \n\n $countdatacuti = sizeof($datacuti); //untuk mengecek data di dalam array\n $countdataliburbersama = sizeof($dataliburbersama); //untuk mengecek data di dalam array\n $countsakittanpasuratdokter = sizeof($datasakittanpasuratdokter); //untuk mengecek data di dalam array\n $countsakitdengansuratdokter = sizeof($datasakitdengansuratdokter); //untuk mengecek data di dalam array\n \n \n $N = date('N', strtotime($date));\n\n if ($N==1){\n $kyou = 'Senin';\n }\n elseif ($N==2){\n $kyou = 'Selasa';\n }\n elseif ($N==3){\n $kyou = 'Rabu';\n }\n elseif ($N==4){\n $kyou = 'Kamis';\n }\n elseif ($N==5){\n $kyou = 'Jumat';\n }\n elseif ($N==6){\n $kyou = 'Sabtu';\n }\n elseif ($N==7){\n $kyou = 'Minggu';\n }\n else{\n $kyou = '';\n }\n\n\n if ($total>0 || $kyou=='Minggu' || $kyou=='Sabtu' || $countdataliburbersama>0){\n return '<font color=\"red\"><strong>'.$kyou.'</strong></font>';\n }elseif($countdatacuti>0 || $countsakittanpasuratdokter || $countsakitdengansuratdokter) {\n return '<font color=\"blue\"><strong>'.$kyou.'</strong></font>';\n }else{\n return $kyou;\n }\n\n \n\n}", "public function vacation_registerPT() {\n\t\t$colaboradores=$this->user_model->getPagination(null);\n\n\t\tforeach ($colaboradores as $colaborador):\n\t\t\t\n\t\t\t$aniversario = date('m-d',strtotime($colaborador->fecha_ingreso));\n\n\t\t\t$ingreso = new DateTime($colaborador->fecha_ingreso);\n\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\t\t\t$diferencia = $ingreso->diff($hoy);\n\t\t\t$ingreso->add(new DateInterval('P'.$diferencia->y.'Y'));\n\t\t\t$actualidad = new DateTime($ingreso->format('Y-m-d'));\n\t\t\t$actualidad->add(new DateInterval('P18M'));\n\t\t\t$caducidad = $actualidad->format('Y-m-d');\n\t\t\t\n\t\t\techo $colaborador->id.\"<br>\".$colaborador->nombre.\"<br>Ingreso: \".$colaborador->fecha_ingreso.\"<br>Años: \".$diferencia->y.\"<br>Cumplimiento: \".$ingreso->format('Y-m-d').\"<br>Caducidad: \".$caducidad.\"<br><br>\";\n//-----------------------------\n\t\t\t/*echo \"<br>\".$colaborador->id.\"<br>\".$colaborador->nombre.\"<br>Ingreso: \".$colaborador->fecha_ingreso;\n\t\t\t$fecha = new DateTime($colaborador->fecha_ingreso);\n\n\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\n\t\t\t\n\t\t\t$diff = $fecha->diff($hoy);\n\n\t\t\t$fecha->add(new DateInterval('P'.$diff->y.'Y'));\n\t\t\techo \"<br>Cumplimiento: \".$fecha->format('Y-m-d').\"<br> Años: \".$diff->y.\"<br>\";\n\t\t\t//echo \"<br>\".$diff->y;\n\n\t\t\t$fv = new DateTime($fecha->format('Y-m-d'));\n\t\t\t$fv->add(new DateInterval('P18M'));\n\t\t\techo \"Caducidad: \".$fv->format('Y-m-d').\"<br>\";*/\n\t\t\t//echo strtotime('+18 month',strtotime($colaborador->fecha_ingreso)).\"<br>\";\n\n\t\t\t/*$fecha = new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t\techo $fecha->add(new DateInterval('P18M'))->format('Y-m-d').\"<br>\";*/\n\t\t// ---------------------------\n\n\t\t\tif($aniversario == date('m-d')):\n\n\t\t\t\t$ingreso=new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t$hoy=new DateTime(date('Y-m-d'));\n\t\t\t\t$diff = $ingreso->diff($hoy);\n\t\t\t\t\n\t\t\t\tswitch ($diff->y):\n\t\t\t\t\tcase 0: $dias=0;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1: $dias=6;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2: $dias=8;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3: $dias=10;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4: $dias=12;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:case 6:case 7:case 8:case 9: $dias=14;\t\t\tbreak;\n\t\t\t\t\tcase 10:case 11:case 12:case 13:case 14: $dias=16;\t\tbreak;\n\t\t\t\t\tcase 15:case 16:case 17:case 18:case 19: $dias=18;\t\tbreak;\n\t\t\t\t\tcase 20:case 21:case 22:case 23:case 24: $dias=20;\t\tbreak;\n\t\t\t\t\tdefault: $dias=22;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tendswitch;\n\t\t\t\t\n\t\t\t\t$ingreso = new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\t\t\t\t$diferencia = $ingreso->diff($hoy);\n\t\t\t\t$ingreso->add(new DateInterval('P'.$diferencia->y.'Y'));\n\t\t\t\t$actualidad = new DateTime($ingreso->format('Y-m-d'));\n\t\t\t\t$actualidad->add(new DateInterval('P18M'));\n\t\t\t\t$caducidad = $actualidad->format('Y-m-d');\n\n\t\t\t\tif($acumulados = $this->solicitudes_model->getAcumulados($colaborador->id)){\n\t\t\t\t\t\n\t\t\t\t\t/*$datos['dias_dos']=$dias;\n\t\t\t\t\t$datos['vencimiento_dos'] = strtotime('+18 month',strtotime($colaborador->fecha_ingreso));\n\t\t\t\t\t$datos['dias_acumulados'] = (int)$acumulados->dias_acumulados + (int)$dias;*/\n\n\t\t\t\t\t$datos['dias_dos'] = $dias;\n\t\t\t\t\t$datos['vencimiento_dos'] = $caducidad;\n\t\t\t\t\t$datos['dias_acumulados'] = (int)$acumulados->dias_acumulados + (int)$dias;\n\t\t\t\t\n\t\t\t\t}else{\n\n\t\t\t\t\t/*$datos['dias_uno']=$dias;\n\t\t\t\t\t$datos['vencimiento_uno'] = strtotime('+18 month',strtotime($colaborador->fecha_ingreso));\n\t\t\t\t\t$datos['dias_acumulados'] = $dias;*/\n\n\t\t\t\t\t$datos['dias_uno'] = $dias;\n\t\t\t\t\t$datos['vencimiento_uno'] = $caducidad;\n\t\t\t\t\t$datos['dias_acumulados'] = $dias;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->solicitudes_model->actualiza_dias_vacaciones($colaborador->id,$datos);\n\n\t\t\tendif;\n\n\t\tendforeach;\nexit;\n\t}", "function addReservation($date, $table, $hour, $mealId, $userId): int\r\n {\r\n $user = $this->getUser($userId);\r\n $user = $user['useFirstName'] . ' ' . $user['useLastName'];\r\n $subject = 'Réservation de ' . $user;\r\n $body = $user . ' a réservé un menu végétarien pour le ' . $date . /*$table . ' ' . $meal*/ ' à ' . $hour . 'h.';\r\n\r\n $this->sendMail($subject, $body);\r\n\r\n return $this->addData('t_reservation', ['resDate', 'resTable', 'resHour', 'fkMeal', 'fkUser'], [$date, $table, $hour, $mealId, $userId]);\r\n }", "public function get_calendar_data_spec(){\r\n\r\n if (Go_to::is_on_page(\"edit_calendar\")){\r\n \r\n $this->active_month = $_GET['month'];\r\n $this->active_year = $_GET['year']; \r\n \r\n \r\n }\r\n if (Go_to::is_on_page(\"calendar_submit\")){\r\n \r\n $this->active_month = $_SESSION['active_month'];\r\n $this->active_year = $_SESSION['active_year']; \r\n// echo \"MIJESECCCCCC \" . $this->active_month; \r\n \r\n }\r\n \r\n \r\n if (Go_to::is_on_page(\"print_calendar\")){\r\n $room_id = $_POST['room_id'];\r\n \r\n }\r\n \r\n \r\n }", "public function getCalendarInfo()\n\t{\n\t\t\n\t\t//get URL to calendar page\n\t\t$url = $this->calendarLink;\n\t\t//Get the sourcecode\t\t\t\n\t\t$data = $this->curl->curlGetReq($url);\n\t\t//find all links to each person\n\t\t$query = \"//a\";\n\t\t$aTagNodes = $this->curl-> getDOMData($data,$query);\n\t\t\n\t\t$calendarDates = new CalendarDateRepository();\n\t\t//loop through each link, representing a person\n\t\tforeach ($aTagNodes as $at)\n\t\t{\n\t\t\t//get the href to that persons calendar\n\t\t\t$calURL =$at->getAttribute(\"href\");\n\t\t\t//get the sourcecode of that page\n\t\t\t$data = $this->curl->curlGetReq($url.$calURL);\n\t\t\t//get the table header containing name of the days\n\t\t\t$query = \"//th\";\n\t\t\t$days = $this->curl->getDOMData($data,$query);\n\t\t\t//get the table data containing availability\n\t\t\t$query = \"//td\";\n\t\t\t$availibility = $this->curl->getDOMData($data,$query);\t\t\t\n\n\t\t\t$dates = array();\n\t\t\t/*\n\t\t\t* loop table data, if the availability of that day is ok\n\t\t\t* save that data.\n\t\t\t*/\n\t\t\tfor ($i=0; $i < $days->length ; $i++)\n\t\t\t{ \n\t\t\t\t$availibilityStr =$availibility[$i]->nodeValue;\n\t\n\t\t\t\tif(strtolower($availibilityStr) === \"ok\")\n\t\t\t\t{\t\n\t\t\t\t\t//$calendarDates->add($days[$i]->nodeValue);\n\t\t\t\t\t$dates[] = new Day($days[$i]->nodeValue);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$calendarDates->add($dates);\n\t\t\t\n\t\t }\n\t\t\n\t\treturn $calendarDates; \n\t}", "function selDate($date_input)\n{\n\tglobal $connect, $tableD;\n\t$objResponse = new xajaxResponse();\n\t$reg_date=$date_input;\n\t$date_input=str_replace(\"-\",\"\",$date_input);// '-' 제거\n\n\t$selSql=\"SELECT * FROM `toto_closedsale` where `reg_date` = \". $date_input;\n\t$result = mysql_query($selSql, $connect); \n\t$rows = mysql_fetch_row($result);\n\t$rowc=0;\n\t$year=substr($date_input,0,4);\n\t$month=substr($date_input,4,2);\n\t$day=substr($date_input,6,2);\n\t$foredate=date(\"Ymd\",mktime( 0, 0, 0, $month, $day-1, $year ));\n\t$selSqlC=\"SELECT * FROM `toto_closedsale` where `reg_date` = \".$foredate;\n\t$resultC = mysql_query($selSqlC, $connect);\n\t$rowc = mysql_fetch_row($resultC);\n\n\n// 피부과 통장\n\t$selBI=\"SELECT * FROM `toto_bankbookinfo` where `use_flag` = '01'\";\n\t$resBI = mysql_query($selBI, $connect);\n\t$totBI = mysql_num_rows($resBI); // 총 레코드 수\n\n\t$bank_info='<br /><br /><table cellspacing=\"0\" cellpadding=\"0\" border=\"1\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"100\" class=\"style2\">\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td width=\"100\" class=\"style2\">전일이월</td>\n\t\t\t\t\t\t<td width=\"100\" class=\"style2\">입금</td>\n\t\t\t\t\t\t<td width=\"100\" class=\"style2\">지출</td>\n\t\t\t\t\t\t<td width=\"100\" class=\"style2\">잔액</td>\n\t\t\t\t\t</tr>';\n\nwhile($rowBI = mysql_fetch_row($resBI)){\n\t$bnum++;\n\t$cnum=$bnum-1;\n\t$selBank=\"SELECT * FROM `toto_bankbook` where `reg_date` = '\".$foredate.\"' and bkbk_idid='\".$rowBI[0].\"'\";\n\t$resBank = mysql_query($selBank, $connect);\n\t$rowBank[] = mysql_fetch_row($resBank);//전일 내역\n\n\t$selBank=\"SELECT * FROM `toto_bankbook` where `reg_date` = '\".$date_input.\"' and bkbk_idid='\".$rowBI[0].\"'\";\n\t$resBank = mysql_query($selBank, $connect);\n\t$rowBankC[] = mysql_fetch_row($resBank);//현재 내역\n\n\t//통장 내역 출력\n$bank_info=$bank_info.'<tr><td class=\"style2\">'.$rowBI[1].'</td><td class=\"style3\">'.comma($rowBank[$cnum][4]).'</td><td class=\"style3\">'.comma($rowBankC[$cnum][2]).'</td><td class=\"style3\">'.comma($rowBankC[$cnum][3]).'</td><td class=\"style3\">'.comma($rowBankC[$cnum][4]).'</td></tr>';\n\t$sum[0]=$rowBankC[$cnum][3]+$sum[0];//피부과 출금 합계\n\t$sum[1]=$rowBank[$cnum][4]+$sum[1];//전일 내역 합계\n\t$sum[2]=$rowBankC[$cnum][2]+$sum[2];//입금 내역 합계\n\t$sum[3]=$rowBankC[$cnum][3]+$sum[3];//출금 내역 합계\n\t$sum[4]=$rowBankC[$cnum][4]+$sum[4];//잔액 내역 합계\n}\n\n// 코스메틱 통장\n\t$selBI=\"SELECT * FROM `toto_bankbookinfo` where `use_flag` = '02'\";\n\t$resBI = mysql_query($selBI, $connect);\n\t$totBI = mysql_num_rows($resBI); // 총 레코드 수\n\t$bnum=0;\nwhile($rowBI = mysql_fetch_row($resBI)){\n\t$bnum++;\n\t$cnum=$bnum-1;\n\t$selBank=\"SELECT * FROM `toto_bankbook` where `reg_date` = '\".$foredate.\"' and bkbk_idid='\".$rowBI[0].\"'\";\n\t$resBank = mysql_query($selBank, $connect);\n\t$rowBank2[] = mysql_fetch_row($resBank);//전일 내역\n\n\t$selBank=\"SELECT * FROM `toto_bankbook` where `reg_date` = '\".$date_input.\"' and bkbk_idid='\".$rowBI[0].\"'\";\n\t$resBank = mysql_query($selBank, $connect);\n\t$rowBankC2[] = mysql_fetch_row($resBank);//현재 내역\n\n\t//통장 내역 출력\n$bank_info=$bank_info.'<tr><td class=\"style2\">'.$rowBI[1].'</td><td class=\"style3\">'.comma($rowBank2[$cnum][4]).'</td><td class=\"style3\">'.comma($rowBankC2[$cnum][2]).'</td><td class=\"style3\">'.comma($rowBankC2[$cnum][3]).'</td><td class=\"style3\">'.comma($rowBankC2[$cnum][4]).'</td></tr>';\n\t$sum[5]=$rowBankC2[$cnum][3]+$sum[5];//코스메틱 출금 합계\n\t$sum[1]=$rowBank2[$cnum][4]+$sum[1];//전일 내역 합계\n\t$sum[2]=$rowBankC2[$cnum][2]+$sum[2];//입금 내역 합계\n\t$sum[3]=$rowBankC2[$cnum][3]+$sum[3];//출금 내역 합계\n\t$sum[4]=$rowBankC2[$cnum][4]+$sum[4];//잔액 내역 합계\n}\n\n\n//통장 내역 합계\n$bank_info=$bank_info.'<tr><td class=\"style2\">합계</td><td class=\"style3\">'.comma($sum[1]).'</td><td class=\"style3\">'.comma($sum[2]).'</td><td class=\"style3\">'.comma($sum[3]).'</td><td class=\"style3\">'.comma($sum[4]).'</td></tr></table>';\n\n\t$updated=$tableD.'\n\t <tr>\n\t\t<td colspan=\"2\" class=\"style2\">계정과목</td>\n\t\t<td class=\"style2\">피부과</td>\n\t\t<td class=\"style2\">코스메틱</td>\n\t\t<td class=\"style2\">합계</td>\n\t </tr>\n\t <tr>\n\t\t<td colspan=\"2\" class=\"style2\" align=\"center\">전일이월</td>\n\t\t<td class=\"cashStyle\">'.comma($rowc[1]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rowc[15]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rowc[1]+$rowc[15]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td rowspan=\"6\" class=\"style2\" align=\"center\" width=\"100\">현금</td>\n\t\t<td width=\"100\" class=\"style2\">일반</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[2]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[16]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[2]+$rows[16]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td><div align=\"left\" class=\"style2\">현금영수증</div></td>\n\t\t<td class=\"cashStyle\">'.comma($rows[4]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[17]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[4]+$rows[17]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td class=\"style2\">보험</div></td>\n\t\t<td class=\"cashStyle\">'.comma($rows[3]).'</td>\n\t\t<td class=\"cashStyle\">-</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[3]).'</td></td>\n\t </tr>\n\t <tr>\n\t\t<td class=\"style2\">보험현금영수증</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[5]).'</td>\n\t\t<td class=\"cashStyle\">-</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[5]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td class=\"style2\">소계</td></td>\n\t\t<td class=\"style4\">'.comma($rows[2]+$rows[3]+$rows[4]+$rows[5]).'</td>\n\t\t<td class=\"style4\">'.comma($rows[16]+$rows[17]).'</td>\n\t\t<td class=\"style4\">'.comma($rows[2]+$rows[3]+$rows[4]+$rows[5]+$rows[16]+$rows[17]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td class=\"style2\">외상회수</td>\n\t\t<td class=\"cashStyle\">-</td>\n\t\t<td class=\"cashStyle\">-</td>\n\t\t<td class=\"cashStyle\">-</td>\n\t </tr>\n\t <tr>\n\t\t<td colspan=\"2\" class=\"style2\" align=\"center\">현금수입계</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[2]+$rows[3]+$rows[4]+$rows[5]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[16]+$rows[17]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[2]+$rows[3]+$rows[4]+$rows[5]+$rows[16]+$rows[17]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td rowspan=\"5\" align=\"center\" class=\"style2\">지출</td>\n\t\t<td class=\"style2\">현금일반</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[11]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[22]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[11]+$rows[22]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td class=\"style2\">통장출금</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[12]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[23]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[12]+$rows[23]).'</td>\n\t </tr>\n\t\t<td class=\"style2\">카드(법인)</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[13]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[24]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[13]+$rows[24]).'</td>\n\t </tr>\n\t\t<td class=\"style2\">카드(개인)</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[14]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[25]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[14]+$rows[25]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td class=\"style2\">지출계</td>\n\t\t<td class=\"style4\">'.comma($rows[11]+$rows[12]+$row[13]+$row[14]).'</td>\n\t\t<td class=\"style4\">'.comma($rows[22]+$rows[23]+$row[24]+$row[25]).'</td>\n\t\t<td class=\"style4\">'.comma($rows[11]+$rows[12]+$row[13]+$row[14]+$rows[22]+$rows[23]+$row[24]+$row[25]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td colspan=\"2\" class=\"style2\" align=\"center\">원장인출</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[10]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[21]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[10]+$rows[21]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td colspan=\"2\" class=\"style2\" align=\"center\">차일이월</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[1]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[15]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[1]+$rows[15]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td rowspan=\"4\" align=\"center\" class=\"style2\">카드</td>\n\t\t<td><div align=\"left\" class=\"style2\">일반</div></td>\n\t\t<td class=\"cashStyle\">'.comma($rows[6]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[16]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[6]+$rows[16]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td class=\"style2\">보험</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[7]).'</td>\n\t\t<td class=\"cashStyle\">-</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[7]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td class=\"style2\">소계</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[6]+$rows[7]).'</td><!--카드일반+카드보험-->\n\t\t<td class=\"cashStyle\">'.comma($rows[18]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[6]+$rows[7]+$rows[18]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td><div align=\"left\" class=\"style2\">외상회수</div></td>\n\t\t<td class=\"cashStyle\">-</td>\n\t\t<td class=\"cashStyle\">-</td>\n\t\t<td class=\"cashStyle\">-</td>\n\t </tr>\n\t <tr>\n\t\t<td colspan=\"2\" align=\"center\" class=\"style2\">통장입금</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[8]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[19]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[8]+$rows[19]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td colspan=\"2\" align=\"center\" class=\"style2\">매출환불(통장)</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[9]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[20]).'</td>\n\t\t<td class=\"cashStyle\">'.comma($rows[9]+$rows[20]).'</td>\n\t </tr>\n\t <tr>\n\t\t<td colspan=\"2\" align=\"center\" class=\"style2\">매출총계</td>\n\t\t<td class=\"style4\">'.comma($rows[2]+$rows[3]+$rows[4]+$rows[5]+$rows[6]+$rows[7]+$rows[8]+$rows[9]).'</td>\n\t\t<td class=\"style4\">'.comma($rows[16]+$rows[17]+$rows[18]+$rows[19]+$rows[20]).'</td>\n\t\t<td class=\"style4\">'.comma($rows[2]+$rows[3]+$rows[4]+$rows[5]+$rows[6]+$rows[7]+$rows[8]+$rows[9]+$rows[16]+$rows[17]+$rows[18]+$rows[19]+$rows[20]).'</td>\n\t </tr>\n\t</table>'.$bank_info;\n\t\n\tif($rows[30]==\"Y\"){\n\t\t$objResponse->assign('end', 'disabled', TRUE);\n\t\t$objResponse->assign('end', 'value', '일마감완료');\n\t}else if($rowc[30]!=\"Y\"){\n\t\t$objResponse->assign('end', 'disabled', TRUE);\n\t\t$objResponse->assign('end', 'value', '이전 근무일 마감 필요');\n\t}else if($rows[29]==\"Y\"){\n\t\tif($rows[12]==$sum[0] && $rows[23]==$sum[5]){\n\t\t\t$objResponse->assign('end', 'disabled', FALSE);\n\t\t\t$objResponse->assign('end', 'value', '일마감');\n\t\t}else{\n\t\t\t$objResponse->assign('end', 'disabled', TRUE);\n\t\t\t$objResponse->assign('end', 'value', '지출통장출금액과 통장지출 금액이 다릅니다');\n\t\t}\n\t}else{\n\t\t$objResponse->assign('end', 'disabled', TRUE);\n\t\t$objResponse->assign('end', 'value', '일마감(요청)전');\n\t}\n\n\t$msg=$_SESSION['sunap'].\"님은 \".$reg_date.\"일자 자료입력 중입니다.\";\n\t$objResponse->assign('msgDiv', 'innerHTML', $msg);\n\t$objResponse->assign('selDate', 'value', $reg_date);\n\t$objResponse->assign('divtable', 'innerHTML', $updated);\n\t\n\treturn $objResponse;\n}", "public function retosSemana(){\n\n\n //$s = explode(\"-\",$fecha);\n\n\t\t//$actualDate = Carbon::create(intval($s[2]),intval($s[1]),intval($s[0]));\n\t\t\n\t\t$actualDate= Carbon::now();\n\n \n\n $date1 = Carbon::now();\n $date2 = Carbon::now();\n $date3 = Carbon::now();\n $date4 = Carbon::now();\n $date5 = Carbon::now();\n $date6 = Carbon::now();\n $date7 = Carbon::now();\n\n \n \n \n $nD = $date1->dayOfWeekIso;\n\n \n if($nD==1){\n //Lunes\n\n $monday = $date1;\n $tuesday = $date2->addDay();\n $wednesday = $date3->addDays(2);\n $thursday= $date4->addDays(3);\n $friday= $date5->addDays(4);\n $saturday= $date6->addDays(5);\n $sunday= $date7->addDays(6);\n\n }elseif(intval($nD==2)){\n //Martes\n $monday = $date1->subDay();\n $tuesday = $date2;\n $wednesday = $date3->addDay();\n $thursday= $date4->addDays(2);\n $friday= $date5->addDays(3);\n $saturday= $date6->addDays(4);\n $sunday= $date7->addDays(5);\n\n }\n elseif(intval($nD==3)){\n //Miercoles\n \n $monday = $date1->subDays(2);\n $tuesday = $date2->subDay();\n $wednesday = $date3;\n $thursday= $date4->addDay();\n $friday= $date5->addDays(2);\n $saturday= $date6->addDays(3);\n $sunday= $date7->addDays(4);\n\n \n\n }elseif($nD==4){\n //Jueves\n $monday = $date1->subDays(3);\n $tuesday = $date2->subDays(2);\n $wednesday = $date3->subDay();\n $thursday= $date4;\n $friday= $date5->addDay();\n $saturday= $date6->addDays(2);\n $sunday= $date7->addDays(3);\n }elseif($nD==5){\n //Viernes\n $monday = $date1->subDays(4);\n $tuesday = $date2->subDays(3);\n $wednesday = $date3->subDays(2);\n $thursday= $date4->subDay();\n $friday= $date5;\n $saturday= $date6->addDay();\n $sunday= $date7->addDays(2);\n }elseif($nD==6){\n //Sabado\n $monday = $date1->subDays(5);\n $tuesday = $date2->subDays(4);\n $wednesday = $date3->subDays(3);\n $thursday= $date4->subDays(2);\n $friday= $date5->subDay();\n $saturday= $date6;\n $sunday= $date7->addDay();\n }else{\n //Domingo\n $monday = $date1->subDays(6);\n $tuesday = $date2->subDays(5);\n $wednesday = $date3->subDays(4);\n $thursday= $date4->subDays(3);\n $friday= $date5->subDays(2);\n $saturday= $date6->subDay();\n $sunday= $date7;\n\t\t}\n\n\n\t\t$company_id = auth()->user()->company_id;\n\t\t\n\n\t\t$sumaLunes = count(DB::table('innovations')->where(function ($query) {\n\t\t\t$query->where('innovations.type', '=', 'solucion')\n\t\t\t\t->orWhere('innovations.type', '=', 'idea');\n\n\t\t})->where('company_id',$company_id)->whereDate('created_at',$monday->toDateString())->get());\n\t\t$sumaMartes = count(DB::table('innovations')->where(function ($query) {\n\t\t\t$query->where('innovations.type', '=', 'solucion')\n\t\t\t\t->orWhere('innovations.type', '=', 'idea');\n\n\t\t})->where('company_id',$company_id)->whereDate('created_at',$tuesday->toDateString())->get());\n\t\t$sumaMiercoles = count(DB::table('innovations')->where(function ($query) {\n\t\t\t$query->where('innovations.type', '=', 'solucion')\n\t\t\t\t->orWhere('innovations.type', '=', 'idea');\n\n\t\t})->where('company_id',$company_id)->whereDate('created_at',$wednesday->toDateString())->get());\n\t\t$sumaJueves = count(DB::table('innovations')->where(function ($query) {\n\t\t\t$query->where('innovations.type', '=', 'solucion')\n\t\t\t\t->orWhere('innovations.type', '=', 'idea');\n\n\t\t})->where('company_id',$company_id)->whereDate('created_at',$thursday->toDateString())->get());\n\t\t$sumaViernes = count(DB::table('innovations')->where(function ($query) {\n\t\t\t$query->where('innovations.type', '=', 'solucion')\n\t\t\t\t->orWhere('innovations.type', '=', 'idea');\n\n\t\t})->where('company_id',$company_id)->whereDate('created_at',$friday->toDateString())->get());\n\t\t$sumaSabado = count(DB::table('innovations')->where(function ($query) {\n\t\t\t$query->where('innovations.type', '=', 'solucion')\n\t\t\t\t->orWhere('innovations.type', '=', 'idea');\n\n\t\t})->where('company_id',$company_id)->whereDate('created_at',$saturday->toDateString())->get());\n\t\t$sumaDomingo = count(DB::table('innovations')->where(function ($query) {\n\t\t\t$query->where('innovations.type', '=', 'solucion')\n\t\t\t\t->orWhere('innovations.type', '=', 'idea');\n\n\t\t})->where('company_id',$company_id)->whereDate('created_at',$sunday->toDateString())->get());\n\n\t\t\n\n\n\n\t\t$sumaSemanal = array(\n\n\t\t\t'Lunes ' =>$sumaLunes,\n\t\t\t'Martes'=>$sumaMartes,\n\t\t\t'Miércoles'=>$sumaMiercoles,\n\t\t\t'Jueves'=>$sumaJueves,\n\t\t\t'Viernes'=>$sumaViernes,\n\t\t\t'Sábado'=>$sumaSabado,\n\t\t\t'Domingo ' =>$sumaDomingo,\n\t\t);\n\n\t\treturn $sumaSemanal;\n\t}", "function book5 () {\n $name = $email = $phone = \"\";\n $people = $_POST[\"people5\"];\n $tempin5 = $_POST[\"checkin5\"];\n $tempout5 = $_POST[\"checkout5\"];\n $checkin5 = strtotime($_POST[\"checkin5\"]);\n $checkout5 = strtotime($_POST[\"checkout5\"]);\n $date = $checkout5 - $checkin5;\n $datediff = number_format(round($date /(60 * 60 * 24)));\n if ($datediff == 0)\n $datediff = 1;\n $totalcost = $datediff*$_POST[\"people5\"]*19400;\n\n $conn = mysqli_connect('localhost:3308','root', '','hotelmanagement');\n if(isset($_SESSION['name']) && isset($_SESSION['email']) && isset($_SESSION['phone'])) {\n $name = $_SESSION['name'];\n $phone = $_SESSION['phone'];\n $email = $_SESSION['email'];\n $sql = \"INSERT INTO booking (name, email, contactno, checkin, checkout, roomtype, days, people, cost) VALUES ('$name', '$email', '$phone', '$tempin5', '$tempout5', 'Luxury - 5 Star', '$datediff', '$people', '$totalcost')\";\n }\n else {\n $name = $_SESSION['nameSC'];\n $phone = $_SESSION['phoneSC'];\n $email = $_SESSION['emailSC'];\n $sql = \"INSERT INTO booking (name, email, contactno, checkin, checkout, roomtype, days, people, cost) VALUES ('$name', '$email', '$phone', '$tempin5', '$tempout5', 'Luxury - 5 Star', '$datediff', '$people', '$totalcost')\";\n }\n if (mysqli_query($conn, $sql)) {\n echo \"<script type = 'text/javascript'>alert('Booking confirmed! Payment will be processed at the Hotel. Thank you for choosing Four Seasons!');\n window.location='CustomerDisplayPage.php';</script>\";\n } \n else {\n echo \"Error: \" . $sql . \"<br>\" . mysqli_error($conn);\n }\n }", "function getEyes_showDate() {\n # === Deutsche Wochentage \n $a_days[0] = 'Sonntag';\n $a_days[1] = 'Montag';\n $a_days[2] = 'Dienstag';\n $a_days[3] = 'Mittwoch';\n $a_days[4] = 'Donnerstag';\n $a_days[5] = 'Freitag';\n $a_days[6] = 'Samstag';\n $s_day = $a_days[date('w')];\n \n # === Aktueller Zeitstempel \n $s_date = date('j.n.Y');\n $s_time = date('G:i');\n \n # === Ausgabe des Datums \n echo \"Heute ist $s_day, der $s_date, es ist $s_time Uhr.\";\n}", "public function get_recibos_print($mes_recibo,$ano_recibo,$empresa_recibo){\n $conectar=parent::conexion();\n parent::set_names();\n\n $mes=$_POST[\"mes_recibo\"];\n $ano=$_POST[\"ano_recibo\"]; \n $fecha= ($ano.\"-\".$mes.\"%\");\n\n $sql=\"select r.fecha,r.numero_recibo,r.numero_venta,r.abono_act,r.paciente,r.empresa,r.id_recibo,v.tipo_pago from ventas as v inner join recibos as r on v.numero_venta=r.numero_venta where fecha like ? and r.empresa=? AND v.tipo_pago='Descuento en Planilla';\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha);\n $sql->bindValue(2,$empresa_recibo);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function getTasks($connect,$workerID = null, $date = null){\r\n\r\n if ($workerID == 'null'){\r\n \r\n $sqlTasks = \"SELECT\r\n AufgabenID, AufgabenTitel, AufgabenKapazität, AufgabenEndtermin, AufgabenMitarbeiterID\r\n FROM kt_aufgaben\r\n WHERE AufgabenEndtermin = ?;\";\r\n\r\n $stmtTasks = mysqli_stmt_init($connect);\r\n \r\n //Prüfen ob die Abfrage funktionieren würde (ohne Usereingaben)\r\n if(!mysqli_stmt_prepare($stmtTasks, $sqlTasks)){\r\n return $error = true;\r\n }\r\n \r\n mysqli_stmt_bind_param($stmtTasks, \"s\", $date);\r\n mysqli_stmt_execute($stmtTasks);\r\n }\r\n\r\n elseif ($date == 'null'){\r\n \r\n $sqlTasks = \"SELECT\r\n AufgabenID, AufgabenTitel, AufgabenKapazität, AufgabenEndtermin, AufgabenMitarbeiterID\r\n FROM kt_aufgaben\r\n WHERE AufgabenMitarbeiterID = ?;\";\r\n\r\n $stmtTasks = mysqli_stmt_init($connect);\r\n \r\n //Prüfen ob die Abfrage funktionieren würde (ohne Usereingaben)\r\n if(!mysqli_stmt_prepare($stmtTasks, $sqlTasks)){\r\n return $error = true;\r\n }\r\n \r\n mysqli_stmt_bind_param($stmtTasks, \"i\", $workerID);\r\n mysqli_stmt_execute($stmtTasks);\r\n }\r\n\r\n else{\r\n $sqlTasks = \"SELECT\r\n AufgabenID, AufgabenTitel, AufgabenKapazität, AufgabenEndtermin, AufgabenMitarbeiterID\r\n FROM kt_aufgaben\r\n WHERE AufgabenMitarbeiterID = ?\r\n AND AufgabenEndtermin = ?;\";\r\n\r\n $stmtTasks = mysqli_stmt_init($connect);\r\n \r\n //Prüfen ob die Abfrage funktionieren würde (ohne Usereingaben)\r\n if(!mysqli_stmt_prepare($stmtTasks, $sqlTasks)){\r\n return $error = true;\r\n }\r\n \r\n mysqli_stmt_bind_param($stmtTasks, \"is\", $workerID, $date);\r\n mysqli_stmt_execute($stmtTasks);\r\n } \r\n \r\n //$resultData = mysqli_stmt_get_result($stmt);\r\n $resultData=mysqli_stmt_get_result($stmtTasks);\r\n \r\n \r\n while ($row = $resultData->fetch_assoc()) {\r\n $workerListForTasksExist = getListOfWorker($connect, 'false', $row['AufgabenMitarbeiterID']);\r\n $hourTaskCapacity = 'Stunden';\r\n \r\n if($row['AufgabenKapazität']==1){\r\n $hourTaskCapacity = 'Stunde';\r\n }\r\n\r\n \r\n echo '<tr>\r\n <td><input class= \"tasks\" type=\"text\" name=\"AufgabenTitel'.$row['AufgabenID'].'\" maxlength=\"50\" value=\"'.$row['AufgabenTitel'].'\"></td>\r\n <td><input class= \"tasksCapacity\" type=\"number\" name=\"AufgabenKapazität'.$row['AufgabenID'].'\" value=\"'.$row['AufgabenKapazität'].'\"min=\"1\" max=\"500\">'.$hourTaskCapacity.'</td>\r\n <td><input class= \"tasks\" type=\"date\" name=\"AufgabenEndtermin'.$row['AufgabenID'].'\" value=\"'.$row['AufgabenEndtermin'].'\"></td>\r\n <td><Select class=\"select\" name=\"MitarbeiterID'.$row['AufgabenID'].'\">'.$workerListForTasksExist.'</Select></td>\r\n <td class=\"button\"><button type=\"submit\" class=\"submit_button\" name=\"save\" value=\"'.$row['AufgabenID'].'\">Speichern</button></td>\r\n <td class=\"button\"><button type=\"submit\" class=\"submit_button\" name=\"delete\" value=\"'.$row['AufgabenID'].'\">Löschen</button></td>\r\n </tr>';\r\n }\r\n $workerListForNewTasks = getListOfWorker($connect, 'false');\r\n \r\n $currentYear = date('Y');\r\n $currentMonth = date('m');\r\n $currentDay = date('d');\r\n $currentDate = $currentYear.'-'.$currentMonth.'-'.$currentDay;\r\n $date = date('Y-m-d', strtotime($currentDate . ' +1 Weekday'));//Neue Aufgaben können nur eine Deadline in der Zukunft haben\r\n \r\n echo '<tr>\r\n <td><input class= \"newTasks\" type=\"text\" name=\"newTaskTitle\" maxlength=\"50\" placeholder=\"Neue Aufgabe\"></td>\r\n <td style=\"color:grey;\"><input class= \"newTaskCapacity\" type=\"number\" name=\"newTaskCapacity\" placeholder=\"1\" min=\"1\" max=\"500\">Stunde</td>\r\n <td><input class= \"newTasks\" type=\"date\" name=\"newTaskDeadline\" min=\"'.$date.'\"></td>\r\n <td><Select class=\"newTaskSelectWorker\" name=\"newTaskWorker\">'.$workerListForNewTasks.'</Select></td>\r\n <td class=\"button\"><button type=\"submit\" class=\"submit_button\" name=\"save\" value=\"newTask\">Speichern</button></td>\r\n </tr>';\r\n }", "function teacherSchedule($dbconnection){\n}", "function annuler_reservation($data){\n\n\t\t$query = $this->db->query(\"SELECT * FROM reservations WHERE id = ?\", array($data['id']));\n\t\t$val = 0;\n\t\t$valToUpdate = array('status' => 'annuler','place'=>$val);\n\t\t$this->db->where('id', $data['id_reservation']);\n\t\t$resultat = $this->db->update('reservations', $valToUpdate);\n\t\t\t\t\n\t\tif ($resultat) {\n\t\t\t$valToUpdates = array('place_disponible'=>$data['place_disponible']);\n\t\t\t$this->db->where('id', $data['id_trajet']);\n\t\t\t$result = $this->db->update('trajet', $valToUpdates);\n\t\t\tif($result){\n\t\t\t\techo json_encode($message=array('etat' => 1,'message'=>'Reservation annulée avec success'));\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo json_encode($message=array('etat' => 0,'message'=>'Annulation échouée'));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\techo json_encode($message=array('etat' => 0,'message'=>'Annulation échouée'));\n\t\t}\n\t\t\n\t\treturn !empty($message)?$message:null;\n\t}", "public function dayview()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\t$db = JFactory::getDbo();\n\t\t$view = $this->getView('pbbooking','html');\n\n\t\t$dateparam = $input->get('dateparam',date_create(\"now\",new DateTimeZone(PBBOOKING_TIMEZONE))->format(DATE_ATOM),'string');\n\t\t$view->dateparam = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$cals = $db->setQuery('select * from #__pbbooking_cals')->loadObjectList();\n\t\t$config = $db->setQuery('select * from #__pbbooking_config')->loadObject();\n\t\t$opening_hours = json_decode($config->trading_hours,true);\n\t\t$start_time_arr = str_split($opening_hours[(int)$view->dateparam->format('w')]['open_time'],2);\n\t\t$end_time_arr = str_split($opening_hours[(int)$view->dateparam->format('w')]['close_time'],2);\n\n\t\t$view->cals = array();\n\t\t$view->opening_hours = $opening_hours[(int)$view->dateparam->format('w')];\n\t\t$view->day_dt_start = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$view->day_dt_end = date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE));\n\t\t$view->day_dt_start->setTime($start_time_arr[0],$start_time_arr[1],0);\n\t\t$view->day_dt_end->setTime($end_time_arr[0],$end_time_arr[1],0);\n\t\t$view->config = $config;\n\n\t\t//step back one time slot on $view->day_dt_end\n\t\t$view->dt_last_slot = clone $view->day_dt_end;\n\t\t$view->dt_last_slot->modify('- '.$config->time_increment.' minutes');\n\n\t\tforeach ($cals as $i=>$cal) {\n\t\t\t$view->cals[$i] = new Calendar();\n\t\t\t$view->cals[$i]->loadCalendarFromDbase(array($cal->id)); \n\t\t}\n\n\t\t$view->setLayout('dayview');\n\t\t$view->display();\n\t\t\n\t}", "public function listDoctorAsRow($type,$fromMonth,$fromDay,$fromYear,$toMonth,$toDay,$toYear){\n\necho \"<style type='text/css'>\n#docPF:hover { background-color:yellow; color:black; }\n</style>\";\n\n$con = ($GLOBALS[\"___mysqli_ston\"] = mysqli_connect($this->myHost, $this->username, $this->password));\nif (!$con)\n {\n die('Could not connect: ' . ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n }\n\n((bool)mysqli_query( $con, \"USE \" . $this->database));\n\n$result = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"SELECT * from Doctors order by Name asc \");\n\nwhile($row = mysqli_fetch_array($result))\n {\necho \"<tr id='docPF'>\";\necho \"<td>&nbsp;\".$row['Name'].\"&nbsp;</td>\";\n$this->reportRowBranch_PF($type,$row['Name'],$fromMonth,$fromDay,$fromYear,$toMonth,$toDay,$toYear);\necho \"</tr>\";\n }\n\n\n}", "public function indexAction()\n\t{\n\t\t$order_id = session_id();\n\t\t\n\t\t$this->view->headTitle('Reservation');\n\t\t$objReser = new Models_Reservation();\n\t\t\n\t\t$resId = $this->_getParam('rid', false);\n\t\tif (false === $resId) {\n\t\t $this->_redirect('');\n\t\t}\n\t\t\n /**\n * Get restaurant\n */\n $objRes = new Models_Restaurant();\n $res = $objRes->find($resId)->toArray();\n $res = current($res);\n if (false == $res || '0' == $res['reser_onoff']) {\n $this->_redirect('');\n }\n /**\n * Check active restaurant\n */\n $this->_checkReservationOfRestaurant($res);\n// echo '<pre>';print_r($res);die;\n /**\n * All time in a day\n */\n $defaultTimeZone = date_default_timezone_get();\n date_default_timezone_set('UTC');\n $allTimes = array();\n for ($i = 0; $i < 48; $i++) {\n $time = 1800 * $i;\n $allTimes[] = array(\n 'time' => $time,\n 'text' => date('g:i A', $time)\n );\n }\n date_default_timezone_set($defaultTimeZone);\n// echo date('g:i A', 0);die;\n// echo '<pre>';print_r($allTimes);die;\n \n /**\n * Get search condition\n */\n $search = $this->_getParam('search', array(\n 'date' => date('m/d/Y'),\n 'time' => (date('G') * 3600 + (ceil(date('i')/30)) * 1800),\n 'quantity' => 2\n ));\n $search['quantity'] = intval($search['quantity']);\n \n \n $pointerDate = explode('/', $search['date']);\n $pointerDate = mktime(0, 0, 0, $pointerDate[0], $pointerDate[1], $pointerDate[2]) + $search['time'];\n $search['unixTime'] = $pointerDate;\n \n $this->session->reserSearch = $search;\n// echo '<pre>';print_r($search);die;\n\n /**\n * Get next 7 day often\n */\n $searchDateArr = array();\n $count = 0;\n $pointerDate = $search['unixTime'];\n $dateArr = array('date_mon', 'date_tue', 'date_wed', 'date_thu', 'date_fri', 'date_sat', 'date_sun');\n\n while (true) {\n $field = 'date_' . strtolower(date('D', $pointerDate));\n if ('1' == $res[$field]) {\n $searchDateArr[] = array(\n 'time' => $pointerDate,\n 'field' => $field,\n 'date' => date('D, m/d/Y g:i A', $pointerDate)\n );\n $count++;\n }\n if( 8 <= $count) {\n break;\n }\n $pointerDate += 3600 * 24;\n }\n /**\n * Get available hour for each date\n */\n foreach ($searchDateArr as &$date) {\n $date['startTime'] = $date['time'] - 1800 * 3;\n $date['endTime'] = $date['time'] + 1800 * 3;\n $maxTotal = $res['reser_quantity'] - $search['quantity'];\n \n $date['exitResers'] = $objReser->searchExistRerservation($date['startTime'], $date['endTime'], $maxTotal);\n $date['available'] = array();\n \n for ($i = $date['startTime']; $i <= $date['endTime']; $i = $i + 1800) {\n $flag = true;\n foreach ($date['exitResers'] as $exist) {\n if ($i == $exist['time']) {\n $flag = false;\n break;\n }\n }\n \n $date['available'][$i] = $flag;\n }\n }\n unset($date);\n \n// echo '<pre>';print_r($searchDateArr);die;\n// $searchDateArr[1]['available']['1301472000'] = false;\n// $searchDateArr[1]['available']['1301477400'] = false;\n// $searchDateArr[1]['available']['1301482800'] = false;\n /**\n * Data for view\n */\n $this->view->res = $res;\n $this->view->arr_restaurant = $res;\n $this->view->resId = $resId;\n $this->view->allTimes = $allTimes;\n $this->view->search = $search;\n $this->view->searchDateArr = $searchDateArr;\n $this->view->currentTime = time();\n $this->view->address_restaurant = $res['street'].\" \".$res['city'].\" \".$res['state'];\n\t}", "function draw_calendar($month,$year){\r\n\t/*Naredi koledar*/\r\n\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\r\n\t\r\n\t$headings = array('Nedelja','Ponedeljek','Torek','Sreda','Cetrtek','Petek','Sobota');\r\n\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\r\n\r\n\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\r\n\t$days_in_this_week = 1;\r\n\t$day_counter = 0;\r\n\t$dates_array = array();\r\n\r\n\t$calendar.= '<tr class=\"calendar-row\">';\r\n\r\n\tfor($x = 0; $x < $running_day; $x++):\r\n\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\t$days_in_this_week++;\r\n\tendfor;\r\n\r\n\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\r\n\t\tif($list_day < 10) {\r\n $list_day = str_pad($list_day, 2, '0', STR_PAD_LEFT);\r\n }\r\n\t\t$month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n\t\t$event_day = $year.'-'.$month.'-'.$list_day;\r\n\r\n\t\t$calendar.= '<td class=\"calendar-day\"><div name=\"test\" style=\"height:100px; width:120px; overflow: auto; white-space:nowrap\" id=' .$event_day. ' onclick=\"modal(this.id);\">';\r\n\t\t$calendar.= '<div>'.$list_day.'</div>';\t\r\n\t\t$query = \"SELECT CONCAT_WS(' ',s.firstname,s.lastname) as Zaposleni, a.name, aa.aktivnost_id\r\n\t\t\tFROM ost_staff s, ost_agent_aktivnost aa, ost_aktivnosti a\r\n\t\t\tWHERE s.staff_id = aa.staff_id and a.id=aa.aktivnost_id and '$event_day' BETWEEN aa.aktivnost_od AND aa.aktivnost_do AND aa.aktivnost_id > 1 AND aa.aktivnost_id != 9 AND aa.aktivnost_id != 10\";\r\n\t\t\t$result = db_query($query) or die('Ne morem pridobiti rezultata!');\r\n\t\t\twhile($row = db_fetch_array($result)) {\r\n\t\t\t\t$words = explode(' ',$row['Zaposleni']);\r\n\t\t\t\t$calendar .= '<div>'.$words[0][0].'. '.$words[1][0].'. : '.$row['name'].'</div>';\r\n\t\t\t}\r\n\t\t$calendar.= '</div></td>';\r\n\t\tif($running_day == 6):\r\n\t\t\t$calendar.= '</tr>';\r\n\t\t\tif(($day_counter+1) != $days_in_month):\r\n\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\r\n\t\t\tendif;\r\n\t\t\t$running_day = -1;\r\n\t\t\t$days_in_this_week = 0;\r\n\t\tendif;\r\n\t\t$days_in_this_week++; $running_day++; $day_counter++;\r\n\tendfor;\r\n\r\n\tif($days_in_this_week < 8):\r\n\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\r\n\t\t\t$calendar.= '<td class=\"calendar-day-np\">&nbsp;</td>';\r\n\t\tendfor;\r\n\tendif;\r\n\r\n\t$calendar.= '</tr>';\r\n\r\n\t$calendar.= '</table>';\r\n\r\n\t$calendar = str_replace('</td>','</td>'.\"\\n\",$calendar);\r\n\t$calendar = str_replace('</tr>','</tr>'.\"\\n\",$calendar);\r\n\r\n\treturn $calendar;\r\n}", "public function read_single() {\n try{\n // Create query\n $query = 'SELECT * FROM ' . $this->table . ' WHERE Date= '.$this->Date. ' AND City= ' .$this->City ;\n\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n\n // print_r($this->Date);\n // print_r($this->City);\n\n\n // print_r($stmt);\n // Execute query\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // print_r($row);\n // Set properties\n $this->id = $row['id'];\n $this->City = $row['City'];\n $this->Date = $row['Date'];\n $this->Day = $row['Day'];\n $this->Imsak = $row['Imsak'];\n $this->Dawn = $row['Dawn'];\n $this->Sunrise = $row['Sunrise'];\n $this->Noon = $row['Noon'];\n $this->Sunset = $row['Sunset'];\n $this->Maghrib = $row['Maghrib'];\n $this->Midnight = $row['Midnight'];\n }\n catch(Exception $e)\n {\n echo \"Error: \" . $e->getMessage();\n }\n\n }", "function this_every($temp_day_of_week,$checkday,$res2,$remdt,$lastdayofmonth,$firstdayofmonth,$visits)\n{\n\n\tmysql_data_seek($res2,0); // returns the resultset pointer to the first row\n\tdo\n\t{\n\t\t$resultset = MySQL_Fetch_Array($res2);\n\t\tif($resultset[\"dday\"]== $checkday)\n\t\t{\n\t\t\tif($resultset[\"type\"] == \"2\")\n\t\t\t{\n \n\t\t\t\t//return '<p class=&#34;event&#34;>'.$resultset[\"tsta\"].'-'.$resultset[\"tsto\"].'<br />'.$resultset[\"header\"].'</p>';\n \n if($resultset[\"tsta\"]!='' && $resultset[\"tsto\"]!='')\n {\n\n return '<p />'.$resultset[\"tsta\"].'-'.$resultset[\"tsto\"].': '.$resultset[\"header\"].'</p>';\n }\n else if($resultset[\"tsta\"]!='')\n {\n return '<p >'.$resultset[\"tsta\"].': '.$resultset[\"header\"].'</p>';\n }\n else\n {\n return '<p >'.$resultset[\"header\"].'</p>';\n }\n\t\t\t}\n\t\t\telseif($resultset[\"type\"] == \"3\")\n\t\t\t{\n\n\n $newkty = $resultset[\"kty\"];\n\n\n\t\t\t\tif($newkty == 10)\n\t\t\t\t{\n\n\t\t\t\t\t$newkty = 0;\n\t\t\t\t\t$day_in_week= $firstdayofmonth;\n\t\t\t\t\t$foundfirst = false;\n\n\n\t\t\t\t\tfor($enumerator= 1; $enumerator<= $lastdayofmonth; $enumerator++)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif($day_in_week == $resultset[\"dday\"])\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$newkty++;\n\t\t\t\t\t\t\t$foundfirst=true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($day_in_week == 0 && $foundfirst== false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$newkty++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$day_in_week = ($day_in_week+1)%7;\n\n\n\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\telse if($checkday < $remdt)\n\t\t\t\t{\n\n\t\t\t\t\t$newkty = $newkty + 1;\n\n\n\t\t\t\t}\n\n\t\t\t\tif($newkty == $temp_day_of_week)\n\t\t\t\t{\n\n\t\t\t\t\t$bgb = $resultset[\"colo\"];\n\t\t\t\t\tif(!$bgb)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bgb = \"#E1E1E1\";\n\t\t\t\t\t}\n\n \n\t\t\t\t\t//return '<p class=&#34;event&#34;>'.$resultset[\"tsta\"].'-'.$resultset[\"tsto\"].'<br />'.$resultset[\"header\"].'</p><hr />';\n //return '<p />'.$resultset[\"tsta\"].'-'.$resultset[\"tsto\"].'<br />'.$resultset[\"header\"].'</p><hr />';\n if($resultset[\"tsta\"]!='' && $resultset[\"tsto\"]!='')\n {\n\n return '<p />'.$resultset[\"tsta\"].'-'.$resultset[\"tsto\"].': '.$resultset[\"header\"].'</p>';\n }\n else if($resultset[\"tsta\"]!='')\n {\n return '<p >'.$resultset[\"tsta\"].': '.$resultset[\"header\"].'</p>';\n }\n else\n {\n return '<p >'.$resultset[\"header\"].'</p>';\n }\n\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{}\n\t\t}\n\t}\n\twhile($resultset);\n\n}", "public function reservations() {\n $this->template->content = View::instance(\"v_reservations_reservations\");\n $this->template->title = \"Reservations\";\n\n # Build the query to get all the users\n // $q = \"SELECT * FROM reservations\";\n\n\t $q = \"SELECT *\n FROM reservations\n WHERE user_id = \".$this->user->user_id.\" order by reservation_id desc\";\n\n # Execute the query to get all the users.\n # Store the result array in the variable $users\n $reservations = DB::instance(DB_NAME)->select_rows($q);\n\n # Build the query to figure out what reservations does this user already have?\n # I.e. who are they following\n $q = \"SELECT *\n FROM reservations\n WHERE user_id = \".$this->user->user_id;\n\n\n\n # Pass data (reservations) to the view\n $this->template->content->reservations = $reservations;\n\n\n # Render the view\n echo $this->template;\n }", "function day_cell_html($text, $link, $date)\n{\n $html = '';\n $html .= tdcell(\"row_labels\", 1, array('name' => 'date', 'value' => $date));\n $html .= \"<div class=\\\"celldiv slots1\\\">\\n\";\n $html .= \"<a href=\\\"$link\\\" title=\\\"\" . get_vocab(\"viewday\") . \"\\\">$text</a>\\n\";\n $html .= \"</div></td>\\n\";\n return $html;\n}", "function reserve_for_guest(){\n if($_SERVER['REQUEST_METHOD']==\"POST\" || isset($_POST['submit'])){\n $First_name = escape_string(trim($_POST['fname']));\n $Last_name = escape_string(trim($_POST['lname']));\n $P_no = escape_string(trim($_POST['pno']));\n $Seat_id = escape_string(trim($_POST['seat_id']));\n $Schedule_id = escape_string(trim($_POST['sc_id']));\n $Date = date('Y-m-d H:m:s');\n $Guest = query(\"INSERT INTO cinetest_guest(first_name,last_name,phone,created_at) VALUES ('{$First_name}','{$Last_name}','{$P_no}',curdate())\");\n confirm($Guest);\n $Saved_Guest = query(\"SELECT * FROM cinetest_guest WHERE first_name='{$First_name}' AND last_name='{$Last_name}' AND phone='{$P_no}' AND created_at=curdate()\");\n confirm($Saved_Guest);\n $G_row = fetch_array($Saved_Guest);\n if(num_rows($Saved_Guest)>0){\n $G_id = $G_row['id'];\n $_SESSION['G_id'] = $Schedule_id;\n echo $G_id;\n $Reservation = query(\"INSERT INTO cinetest_reservations(created_at,guest_id,schedule_id,seat_id,is_valid ) VALUES(curdate(), '{$G_id}','{$Schedule_id}','{$Seat_id}',1)\");\n confirm($Reservation);\n redirect(\"../schedule/index.php?s_id={$Schedule_id}\");\n }\n else{\n $_SESSION['G_id'] = 'G_id';\n }\n redirect(\"../schedule/index.php?s_id={$Schedule_id}\");\n }\n}", "function maxCountLimit($conn, $day, $current_month) {\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$current_year = date(\"y\");\n\t\t\t\t\t\n\t\t\t\t\t$select_all_dates = \"SELECT * FROM reservation\";\n\t\t\t\t\t$q_seleect_all_dates = $conn->query($select_all_dates);\n\t\t\t\t\t\n\t\t\t\t\tif($q_seleect_all_dates->num_rows > 0) {\n\t\t\t\t\t\twhile($q_row = $q_seleect_all_dates->fetch_assoc()) {\n\t\t\t\t\t\t\t$date_reserved = strtotime($q_row['reserv_date']);\n\t\t\t\t\t\t\t$date_reserved_month = date('m',$date_reserved);\n\t\t\t\t\t\t\t$date_reserved_year = date('y',$date_reserved);\n\t\t\t\t\t\t\t$date_reserved_day = date('d',$date_reserved);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($date_reserved_month == $current_month && $date_reserved_year == $current_year) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($day == $date_reserved_day) {\n\t\t\t\t\t\t\t\t\t$r_date = $date_reserved_year . \"-\" . $date_reserved_month . \"-\" . $date_reserved_day;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$select_date = \"SELECT DISTINCT event_type, reserv_time FROM reservation WHERE reserv_date = '$r_date'\";\n\t\t\t\t\t\t\t\t\t$select_date_query = $conn->query($select_date);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$r_count = $select_date_query -> num_rows;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif($r_count >= 10) {\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "public function bookingView($empId, $dt)\n {\n require_once('models/Calendar.class.php');\n require_once('models/Customer.class.php');\n require_once('models/Booking.class.php');\n require_once('models/CanWork.class.php');\n require_once('views/BookingView.class.php');\n\n $site = new SiteContainer($this->db);\n $cal = new Calendar($this->db);\n $bkv = new BookingView();\n \n // Grab the booking we want\n $bk = new Booking($empId, $dt, $this->db);\n \n // This wont be different regardless of owner/customer\n if (! ($empdata = $this->fetchEmployeeFromDb($empId)) )\n throw new Exception(\"Employee $empId could not be found for booking at time: \".$dt->format('Y-m-d H:i:s'));\n \n try {\n // Customer already throws an exception if it cant find a user, we need to catch it\n // and rethrow a new error\n $cust = new Customer($bk->get_email(), $this->db, false); // no bookings please\n }\n catch(Exception $e) { // No Customer was found\n $site->printHeader();\n $site->printNav(\"owner\");\n if ( empty($bk->get_email()) )\n echo \"Unable to find a booking at time \".$dt->format('Y-m-d H:i:s').\" with Employee: $empId\";\n else // Some other error\n echo \"Unable to find customer with email: \".$bk->get_email().\" booking at time: \".$dt->format('Y-m-d H:i:s').\" with Employee: $empId\";\n \n $site->printFooter();\n // return, nothing we can do\n return;\n }\n \n $site->printHeader();\n \n $site->printNav(\"owner\");\n $bkv->printOwnerBookingInfo($bk, $empdata, $cust); \n \n $site->printFooter();\n }", "function draw_calendar($month,$year){\n\n\t\t/* draw table */\n\t\t$calendar = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"calendar\">';\n\n\t\t/* table headings */\n\t\t$headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\n\t\t$calendar.= '<tr class=\"calendar-row\"><td class=\"calendar-day-head\">'.implode('</td><td class=\"calendar-day-head\">',$headings).'</td></tr>';\n\n\t\t/* days and weeks vars now ... */\n\t\t$running_day = date('w',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_month = date('t',mktime(0,0,0,$month,1,$year));\n\t\t$days_in_this_week = 1;\n\t\t$day_counter = 0;\n\t\t$dates_array = array();\n\n\t\t/* row for week one */\n\t\t$calendar.= '<tr class=\"calendar-row\">';\n\n\t\t/* print \"blank\" days until the first of the current week */\n\t\tfor($x = 0; $x < $running_day; $x++):\n\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\t$days_in_this_week++;\n\t\tendfor;\n\n\t\t/* keep going with days.... */\n\t\tfor($list_day = 1; $list_day <= $days_in_month; $list_day++):\n\t\t\t$calendar.= '<td class=\"calendar-day\"><a href=\"appointments.php?day=' . $list_day . '&month=' . $GLOBALS['curMonth'] . '&year=' . $GLOBALS['curYear'] . '\">';\n\t\t\t\t/* add in the day number */\n\t\t\t\t$calendar.= '<div class=\"day-number\">'.$list_day.'</div>';\n\n\t\t\t\t/** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/\n\t\t\t\t$calendar.= str_repeat('<p> </p>',2);\n\t\t\t\t\n\t\t\t$calendar.= '</a></td>';\n\t\t\tif($running_day == 6):\n\t\t\t\t$calendar.= '</tr>';\n\t\t\t\tif(($day_counter+1) != $days_in_month):\n\t\t\t\t\t$calendar.= '<tr class=\"calendar-row\">';\n\t\t\t\tendif;\n\t\t\t\t$running_day = -1;\n\t\t\t\t$days_in_this_week = 0;\n\t\t\tendif;\n\t\t\t$days_in_this_week++; $running_day++; $day_counter++;\n\t\tendfor;\n\n\t\t/* finish the rest of the days in the week */\n\t\tif($days_in_this_week < 8):\n\t\t\tfor($x = 1; $x <= (8 - $days_in_this_week); $x++):\n\t\t\t\t$calendar.= '<td class=\"calendar-day-np\"> </td>';\n\t\t\tendfor;\n\t\tendif;\n\n\t\t/* final row */\n\t\t$calendar.= '</tr>';\n\n\t\t/* end the table */\n\t\t$calendar.= '</table>';\n\t\t\n\t\t/* all done, return result */\n\t\treturn $calendar;\n\t}", "function _format_date($row, &$params)\n\t{\n\t\t//Get needed timestamps and format\n\t\t$yesterday_stamp\t= mktime(0, 0, 0, date(\"m\") , date(\"d\")-1, date(\"Y\"));\n\t\t$yesterday \t\t\t= strftime(\"%Y-%m-%d\", $yesterday_stamp);\n\t\t$today_stamp\t\t= mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\"));\n\t\t$today \t\t\t\t= date('Y-m-d');\n\t\t$tomorrow_stamp \t= mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\"));\n\t\t$tomorrow \t\t\t= strftime(\"%Y-%m-%d\", $tomorrow_stamp);\n\t\t\n\t\t$dates_stamp\t\t= strtotime($row->dates);\n\t\t$enddates_stamp\t\t= $row->enddates ? strtotime($row->enddates) : null;\n\n\t\t//if datemethod show day difference\n\t\tif($params->get('datemethod', 1) == 2) {\n\t\t\t//check if today or tomorrow\n\t\t\tif($row->dates == $today) {\n\t\t\t\t$result = JText::_( 'TODAY' );\n\t\t\t} elseif($row->dates == $tomorrow) {\n\t\t\t\t$result = JText::_( 'TOMORROW' );\n\t\t\t} elseif($row->dates == $yesterday) {\n\t\t\t\t$result = JText::_( 'YESTERDAY' );\n\t\t\t\n\t\t\t//This one isn't very different from the DAYS AGO output but it seems \n\t\t\t//adequate to use a different language string here.\n\t\t\t//\n\t\t\t//the event has an enddate and it's earlier than yesterday\n\t\t\t} elseif($row->enddates && $enddates_stamp < $yesterday_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $enddates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'ENDED DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the event has an enddate and it's later than today but the startdate is earlier than today\n\t\t\t//means a currently running event \n\t\t\t} elseif($row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $dates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'STARTED DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the events date is earlier than yesterday\n\t\t\t} elseif($dates_stamp < $yesterday_stamp) {\n\t\t\t\t$days = round( ($today_stamp - $dates_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'DAYS AGO', $days );\n\t\t\t\t\n\t\t\t//the events date is later than tomorrow\n\t\t\t} elseif($dates_stamp > $tomorrow_stamp) {\n\t\t\t\t$days = round( ($dates_stamp - $today_stamp) / 86400 );\n\t\t\t\t$result = JText::sprintf( 'DAYS AHEAD', $days );\n\t\t\t}\n\t\t} else {\n\t\t\t//single day event\n\t\t\t$date = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->dates.' '.$row->times ));\n\t\t\t$result = JText::sprintf('ON DATE', $date);\n\t\t\t\n\t\t\t//Upcoming multidayevent (From 16.10.2008 Until 18.08.2008)\n\t\t\tif($dates_stamp > $tomorrow_stamp && $enddates_stamp) {\n\t\t\t\t$startdate = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->dates.' '.$row->times ));\n\t\t\t\t$enddate = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->enddates.' '.$row->endtimes ));\n\t\t\t\t$result = JText::sprintf('FROM UNTIL', $startdate, $enddate);\n\t\t\t}\n\t\t\t\n\t\t\t//current multidayevent (Until 18.08.2008)\n\t\t\tif( $row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp ) {\n\t\t\t\t//format date\n\t\t\t\t$result = strftime($params->get('formatdate', '%d.%m.%Y'), strtotime( $row->enddates.' '.$row->endtimes ));\n\t\t\t\t$result = JText::sprintf('UNTIL', $result);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn $result;\n\t}", "function findAppointment(PDO $dbConn, string $email)\n{\n $email = strtolower($email);\n $query = \"SELECT date, time FROM appointments WHERE DATE(CONCAT(date, ' ', time)) > NOW() AND email = ?\";\n\n $stmt = $dbConn->prepare($query);\n $stmt->execute([$email]);\n $fetch = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if (is_array($fetch)) { // Appointment found\n $date = $fetch['date'];\n $time = $fetch['time'];\n $tz = date(\"O\");\n $dateTime = DateTime::createFromFormat(DateTime::ISO8601, \"${date}T${time}${tz}\");\n\n printSuccess($dateTime);\n } else {\n printError('No appointment found with that email.');\n }\n}", "function dateConfirm($dCode, $startDate, $stopDate)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT * FROM discount WHERE code = %s AND start_date <= %s AND stop_date > %s\",\n\t\t\t\t\t\t\t\t\t\tGetSQLValueString($dCode, \"text\"),\n\t\t\t\t\t\t\t\t\t\tGetSQLValueString($startDate, \"text\"),\n\t\t\t\t\t\t\t\t\t\tGetSQLValueString($stopDate, \"text\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\tif ($totalRows_ConsultaFuncion!=0) \n\t\treturn true;\n\telse return false;\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}", "public function insert_reservation($name,$phone,$date,$food_category,$username_account){\n $sql = \"INSERT INTO reservation (Name,Phone,Data,Food_Category,Username_Account) VALUES(?,?,?,?,?)\";\n $result =$this->connection()->prepare($sql);\n $result->execute(array($name,$phone,$date,$food_category,$username_account));\n }", "function afficherreservation(){\n\t\t$sql=\"SElECT * From reservation\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function display()\n\t{\n\t\tob_start();\n\t\t\n\t\t// Get the current information\n\t\t$actualMonth = date('m');\n\t\t$actualYear = date('Y');\n\t\t$actualDay = date('d'); // 09\n\t\t\n\t\t// Current day month and year we are viewing\n\t\tif (isset($_GET['m']))\n\t\t\t$curMonth = intval($_GET['m']);\n\t\telse\n\t\t\t$curMonth = $actualMonth; // 03 \n\t\t\n\t\tif (isset($_GET['y']))\n\t\t\t$curYear = intval($_GET['y']);\n\t\telse\n\t\t\t$curYear = $actualYear; // 2009\n\t\t\t\n\t\t\n\t\t// We need to get the info from the first day of the month by using maketime with the current info\n\t\t//mktime(hour, minute, second, monnth, day, year);\n\t\t$firstDayOfMonth = mktime(0,0,0,$curMonth, 1, $curYear); \n\t\t\n\t\t\n\t\t// Get the full month name of the current month (ex: March)\n\t\t$monthName = date('F', $firstDayOfMonth); \n\t\t\n\t\t// We need to know what day the first day is so that we know how many empty spots we need and when we wil\n\t\t// start the calendar\n\t\t$firstDayName = date('D', $firstDayOfMonth);\n\t\t\n\t\t// We need to increment a day counter so we can use it in the mysql search\n\t\t$curDay = mktime(0,0,0,$curMonth, 1, $curYear); \n\t\t\n\t\t// We need to get a count of how many blank days we have. Assuming the calendar starts on sunday.\n\t\tswitch($firstDayName)\n\t\t{\n\t\t\tcase \"Sun\": $blank = 0; break;\n\t\t\tcase \"Mon\": $blank = 1; break;\n\t\t\tcase \"Tue\": $blank = 2; break;\n\t\t\tcase \"Wed\": $blank = 3; break;\n\t\t\tcase \"Thu\": $blank = 4; break;\n\t\t\tcase \"Fri\": $blank = 5; break;\n\t\t\tcase \"Sat\": $blank = 6; break;\n\t\t}\n\t\t\n\t\t// how many days are in the current month?\n\t\t$daysInMonth = cal_days_in_month(CAL_GREGORIAN, $curMonth, $curYear);\n\t\t\n\t\t$lastDayOfMonth = mktime(0,0,0,$curMonth, $daysInMonth, $curYear); \n\t\t\n\t\t// We need to get the information about the previous month (to display the days at the end of the last month)\n\t\t// make sure it doesn't roll over the year.\n\t\tif ($curMonth == 1)\n\t\t{\n\t\t\t$prevMonth = 12;\n\t\t\t$prevYear = $curYear - 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$prevMonth = $curMonth-1;\n\t\t\t$prevYear = $curYear;\n\t\t}\n\t\t\t\n\t\t\n\t\t$daysInPrevMonth = cal_days_in_month(CAL_GREGORIAN, $prevMonth, $prevYear);\n\t\t\n\t\t// This is our counter for how many days we are at so far. When we hit 7, we need to make a new row and start over\n\t\t//\t\tIt keeps our table square, instead of all in one row.\n\t\t$dayCounter = 1;\n\t\t\n\t\t// Counter we will increment through the days while we make the calendar\n\t\t$day_num = 1;\n\n\t\t// We need to generate the urls for the prev and next links\n\t\t\n\t\tif ($curMonth == 1)\n\t\t{\n\t\t\t$linkPrevM = 12;\n\t\t\t$linkPrevY = $curYear - 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$linkPrevM = $curMonth - 1;\n\t\t\t$linkPrevY = $curYear;\n\t\t}\n\t\t\n\t\tif ($curMonth == 12)\n\t\t{\n\t\t\t$linkNextM = 1;\n\t\t\t$linkNextY = $curYear + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$linkNextM = $curMonth + 1;\n\t\t\t$linkNextY = $curYear;\n\t\t}\n\t\t?>\n\t\t<table class=\"calendar\" border=\"0\">\n\t\t\t<caption class=\"catrow\"><a href=\"index.php?act=calendar&amp;m=<?php echo $linkPrevM?>&amp;y=<?php echo $linkPrevY?>\">&laquo;</a> <?php echo $monthName?> <a href=\"index.php?act=calendar&amp;m=<?php echo $linkNextM?>&amp;y=<?php echo $linkNextY?>\">&raquo;</a></caption>\n\t\t\t<tr>\n\t\t\t\t<th>Sun</th>\n\t\t\t\t<th>Mon</th>\n\t\t\t\t<th>Tue</th>\n\t\t\t\t<th>Wed</th>\n\t\t\t\t<th>Thu</th>\n\t\t\t\t<th>Fri</th>\n\t\t\t\t<th>Sat</th>\n\t\t\t</tr>\n\t\t<?php\n\t\techo \"<tr>\";\n\t\t//first we take care of those blank days\n\t\tfor ($i = $blank-1; $i >= 0; $i--)\n\t\t{\n\t\t\techo '<td class=\"inactive\">\n\t\t\t'.($daysInPrevMonth-$i).'\n\t\t\t</td>';\n\t\t\t$dayCounter++;\n\t\t} \n\t\t\n\t\t// Set the timezone to match php (This might not work on all installations.\n\t\t$GLOBALS['super']->db->query(\"SET time_zone = '\".date_default_timezone_get().\"'\");\n\t\t\n /*\n This needs to be changed. Potential solution:\n use time() to figure out the time of the beggining of the month,\n and the end of the month.\n */\n $start = mktime(0,0,0,$curMonth,0,$curYear);\n \n $end = mktime(0,0,0,$curMonth,$daysInPrevMonth,$curYear); \n /*echo \"Start: \".$start.\"<br />\";\n echo \"End: \".$end.\"<br />\";\n echo \"End - Start: \".($end-$start).\"<br />\";\n */\n\t\t$topicsQuery = \"\n\t\tSELECT DATE(FROM_UNIXTIME(time_added)) AS date , count(*) AS topicCount\n\t\tFROM \".TBL_PREFIX.\"topics\n\t\tWHERE time_added BETWEEN '\".$start.\"' AND '\".$end.\"'\n\t\tGROUP BY DATE(FROM_UNIXTIME(time_added))\n\t\tORDER BY DATE(FROM_UNIXTIME(time_added))\";\n\t\t$topicsQuery = $GLOBALS['super']->db->query($topicsQuery);\n\n\t\t$postsQuery = \"\n\t\tSELECT DATE(FROM_UNIXTIME(time_added)) AS date , count(*) AS postCount\n\t\tFROM \".TBL_PREFIX.\"posts\n\t\tWHERE time_added BETWEEN '\".$start.\"' AND '\".$end.\"' \n\t\tGROUP BY DATE(FROM_UNIXTIME(time_added))\n\t\tORDER BY DATE(FROM_UNIXTIME(time_added))\";\n\t\t$postsQuery = $GLOBALS['super']->db->query($postsQuery);\n\t\t\n\t\t$usersQuery = \"\n\t\tSELECT DATE(FROM_UNIXTIME(time_added)) AS date , count(*) AS userCount\n\t\tFROM \".TBL_PREFIX.\"users\n\t\tWHERE time_added BETWEEN '\".$start.\"' AND '\".$end.\"' \n\t\tGROUP BY DATE(FROM_UNIXTIME(time_added))\n\t\tORDER BY DATE(FROM_UNIXTIME(time_added))\";\n\t\t$usersQuery = $GLOBALS['super']->db->query($usersQuery);\n\t\t\n\t\t//echo $GLOBALS['super']->db->fetch_result($GLOBALS['super']->db->query(\"SELECT NOW()\"));\n\t\t$perDayArray = array();\n\t\t\n\t\twhile($day = $GLOBALS['super']->db->fetch_assoc($topicsQuery))\n\t\t{\n\t\t\t//$formatteddate = date(\"Y-m-d\",$day['date']);\n\t\t\t$perDayArray[$day['date']][\"Topics\"] = $day['topicCount'];\n\t\t}\n\t\twhile($day = $GLOBALS['super']->db->fetch_assoc($postsQuery))\n\t\t{\n\t\t\t//$formatteddate = date(\"Y-m-d\",$day['date']);\n\t\t\t// have to subtract the number of topics today from number of posts today\n\t\t\tif (isset($perDayArray[$day['date']][\"Topics\"]))\n\t\t\t\t$daysTopics = $perDayArray[$day['date']][\"Topics\"];\n\t\t\telse \n\t\t\t\t$daysTopics = 0;\n\t\t\t\t\n\t\t\t$perDayArray[$day['date']][\"Reply\"] = $day['postCount']-$daysTopics;\n\t\t}\n\t\twhile($day = $GLOBALS['super']->db->fetch_assoc($usersQuery))\n\t\t{\n\t\t\t$perDayArray[$day['date']][\"Users\"] = $day['userCount'];\n\t\t}\n\t\t\n\t\t//$GLOBALS['super']->functions->print_array($perDayArray);\n\t\t\n\t\t// go through all the days in the month and print them in a <td>\n\t\t// when we go through 7, lets reset the counter\n\t\twhile ($day_num <= $daysInMonth)\n\t\t{\n\t\t\t\n\t\t\t$mysqlFormat = date('Y-m-d', $curDay);\n\t\t\t//echo \"cur day:\".$mysqlFormat.\"<br />\";\n\t\t\tif (key_exists($mysqlFormat, $perDayArray))\n\t\t\t{\n\t\t\t\tif(isset($perDayArray[$mysqlFormat][\"Topics\"]) && $perDayArray[$mysqlFormat][\"Topics\"] > 0)\n\t\t\t\t{\n\t\t\t\t\t$plural = plural($perDayArray[$mysqlFormat][\"Topics\"]);\n\t\t\t\t\t$topicsToday = \"<li>\".$perDayArray[$mysqlFormat][\"Topics\"].\" Topic\".$plural.\"</li>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$topicsToday = \"\";\n\t\t\t\t\t\n\t\t\t\tif(isset($perDayArray[$mysqlFormat][\"Reply\"]) && $perDayArray[$mysqlFormat][\"Reply\"] > 0)\n\t\t\t\t{\n\t\t\t\t\t$plural = plural($perDayArray[$mysqlFormat][\"Reply\"],true);\n\t\t\t\t\t$postsToday = \"<li>\".$perDayArray[$mysqlFormat][\"Reply\"].\" Repl\".$plural.\"</li>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$postsToday = \"\";\n\t\t\t\t\t\n\t\t\t\tif(isset($perDayArray[$mysqlFormat][\"Users\"]) && $perDayArray[$mysqlFormat][\"Users\"] > 0)\n\t\t\t\t{\n\t\t\t\t\t$plural = plural($perDayArray[$mysqlFormat][\"Users\"]);\n\t\t\t\t\t$usersToday = \"<li>\".$perDayArray[$mysqlFormat][\"Users\"].\" User\".$plural.\"</li>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$usersToday = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$topicsToday = \"\";\n\t\t\t\t\t$postsToday = \"\";\n\t\t\t\t\t$usersToday = \"\";\n\t\t\t}\n\t\t\t\n\t\t\t// increment our time value by one day. We need this to use in our mysql statement.\n\t\t\t$curDay = mktime(null, null, null, $curMonth, $day_num+1, $curYear);\n\t\t\t\n\t\t\t//echo $curDay.\"<br />\";\n\t\t\t// We want to make the class be current on the cell that is the current date.\n\t\t\t$class = \"\";\n\t\t\tif ($actualMonth == $curMonth && $actualYear == $curYear && $day_num == $actualDay)\n\t\t\t{\n\t\t\t\t$class = ' class=\"current\"';\n\t\t\t}\n\t\t\t\n\t\t\t// we need to format $curDay to match mysql's date format:\n\t\t\t\n\t\t\t// 2007-12-31\n\t\t\t\n\t\t\t/*\n\t\t\t<span>4 Posts</span>\n\t\t\t\t\t<span>4 Topics</span>\n\t\t\t\t\t<span>1 New Member</span>\n\t\t\t*/\n\t\t\techo '<td'.$class.'>\n\t\t\t\t<ul>\n\t\t\t\t<li class=\"daynum\">'.$day_num.'</li>\n\t\t\t\t'.$topicsToday.\n\t\t\t\t$postsToday.\n\t\t\t\t$usersToday.'\n\t\t\t\t</ul>\n\t\t\t\t</td>';\n\t\t\t$day_num++;\n\t\t\t$dayCounter++;\n\t\t\t\n\t\t\t//Make sure we start a new row every week\n\t\t\tif ($dayCounter > 7)\n\t\t\t{\n\t\t\t\techo \"</tr><tr>\";\n\t\t\t\t$dayCounter = 1;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t}\n\t\t// if we don't have an even square, lets finish out this week\n\t\t// We are reseting the counter to make it count for the next month\n\t\t$day_num = 1;\n\t\twhile($dayCounter >1 && $dayCounter <= 7)\n\t\t{\n\t\t\techo '<td class=\"inactive\">'. $day_num.'</td>';\n\t\t\t$day_num++;\n\t\t\t$dayCounter++;\n\t\t}\n\t\techo \"</tr>\";\n\t\techo \"</table>\";\n\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $output;\n\t}", "public function created(InDay $inDay)\n {\n //\n }", "public function selectReservations() {\n $tab=[];\n $pdo=$this->connect_db('boutique');\n $reqlogin = $pdo->prepare(\"SELECT r.id, r.id_utilisateur, r.titrereservation, r.typeevenement, r.datedebut, r.heuredebut FROM reservation AS r INNER JOIN utilisateurs AS u ON r.id_utilisateur = u.id\");\n $reqlogin->execute($tab);\n $result=$reqlogin->fetchAll();\n return $result;\n }", "function getReservationLecturer($classid,$crdate){\r\ninclude 'dbConnect.php';\r\n$sql= 'SELECT Student.SID, Classroom.ClassID, Course.CourseID, Student.SName, Course.CourseName, Classroom.Location, Classroom.StartTime, Classroom.EndTime, CRDate \r\nFROM ClassReservation\r\nINNER JOIN Student ON ClassReservation.SID = Student.SID\r\nINNER JOIN Classroom ON ClassReservation.ClassID = Classroom.ClassID\r\nINNER JOIN Course ON ClassReservation.CourseID = Course.CourseID\r\nWHERE Classroom.ClassID = '.$classid.'\r\nAND CRDate = \"'.$crdate.'\";';\r\n$result = mysqli_query($conn, $sql);\r\nif(isset($result)){\r\n\tif(mysqli_num_rows($result) > 0){\r\n\t\t$view = '<form method=\"post\" action=\"attendance.php\">\r\n\t\t\t\t<table class=\"table table-striped custab\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>Student Name</th>\r\n\t\t\t\t\t\t<th>Course Name</th>\r\n\t\t\t\t\t\t<th>Location</th>\r\n\t\t\t\t\t\t<th>Start Time</th>\r\n\t\t\t\t\t\t<th>End Time</th>\r\n\t\t\t\t\t\t<th>Class Date</th>\r\n\t\t\t\t\t\t<th>Attendance</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead><tbody>';\r\n\r\n\t\t$count = 0;\r\n\t\twhile($row = mysqli_fetch_assoc($result))\r\n\t\t{\r\n\t\t$dt = strtotime($row['CRDate']);\r\n\t\t$day = date(\"l\", $dt);\r\n\t\t\r\n\t\t$view.= '<tr>\r\n <td>'.$row['SName'].'</td>\r\n <td>'.$row['CourseName'].'</td>\r\n\t\t\t\t<td>'.$row['Location'].'</td>\r\n\t\t\t\t<td>'.$row['StartTime'].'</td>\r\n\t\t\t\t<td>'.$row['EndTime'].'</td>\r\n\t\t\t\t<td>'.$row['CRDate'].' / ('.$day.')</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<div class=\"switch-field\">\r\n\t\t\t\t <input type=\"radio\" id=\"switch_left'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Present\" checked/>\r\n\t\t\t\t <label for=\"switch_left'.$count.'\">Present</label>\r\n\t\t\t\t <input type=\"radio\" id=\"switch_right'.$count.'\" name=\"tableRow['.$count.'][attendance]\" value=\"Absent\" />\r\n\t\t\t\t <label for=\"switch_right'.$count.'\">Absent</label>\r\n\t\t\t\t</div>\r\n\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][sid]\" value=\"'.$row[\"SID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][classid]\" value=\"'.$row[\"ClassID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][courseid]\" value=\"'.$row[\"CourseID\"].'\"/></div>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"tableRow['.$count.'][crdate]\" value=\"'.$row[\"CRDate\"].'\"/></div>';\r\n\t\t$count++;\r\n\t\t}\r\n\t\t$view.= '</tbody></table>\r\n\t\t\t\t<div><input type=\"hidden\" name=\"lid\" value=\"'.$_SESSION[\"Luserid\"].'\"/></div>\r\n\t\t\t\t<input class=\"btn btn-success\" type=\"submit\" name=\"record\" value=\"Record Attendance\"/>\r\n\t\t\t\t</form>';\r\n\t}else{\r\n\t\t$view = '<div class=\"alert alert-danger\">\r\n\t\t\t\t No student register this class yet!\r\n\t\t\t\t</div>';\r\n\t}\r\n}else{\r\n\t$view = 'Database Connection Error.';\r\n}\r\n\treturn $view;\r\n}", "function cal_body ($erster,$dat0,$dat1,$dath,$script,$params,$seldate) {\n\t$head = <<<HTML\n<table class=\"caltab2\" width=100%>\n<tr>\n<td align=center class=\"calwt\">Mon</td>\n<td align=center class=\"calwt\">Tue</td>\n<td align=center class=\"calwt\">Wed</td>\n<td align=center class=\"calwt\">Thu</td>\n<td align=center class=\"calwt\">Fri</td>\n<td align=center class=\"calwt\">Sat</td>\n<td align=center class=\"calwt\">Sun</td>\n</tr>\nHTML;\n\tif (strpos($script,'?') === false) $script .= '?';\n\t$script .= $params;\n\tif($erster!=1) {\n\t\tif($erster==0) $erster=7;\n\t\t$body .= \"<tr>\";\n\t\tfor($i=0;$i<$erster-1;$i++) {\n\t\t\t$body .= \"<td class=\\\"calat\\\">&nbsp;</td>\\n\";\n\t\t}\n\t}\n\tfor($i=1; $i<=31; $i++) {\n\t\t$dat4 = getdate(strtotime($i.\" \".$dath));\n\t\t$heute = $dat4[wday];\n\t\tif($heute==0) $heute=7;\n\t\tif($dat1[mon]==$dat4[mon]) {\n\t\t\t$stil=\"calat\";\n\t\t\t$dum1=$dat0[mday].\".\".$dat0[mon].\".\".$dat0[year];\n\t\t\t$dum2=$dat4[mday].\".\".$dat4[mon].\".\".$dat4[year];\n\t\t\tif($dum1==$dum2) {\n\t\t\t\tif(($heute==6) || ($heute==7)) {\n\t\t\t\t\t$stil=\"calhe\"; \n\t\t\t\t\t$stil_l=\"sellinkbold\"; \n\t\t\t\t} else {\n\t\t\t\t\t$stil=\"calht\"; $stil_l=\"sellink\"; \n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\tif(($heute==6) || ($heute==7)) {\n\t\t\t\t\t$stil=\"calwe\"; \n\t\t\t\t\t$stil_l=\"sellinkbold\"; \n\t\t\t\t} else {\n\t\t\t\t\t$stil=\"calat\"; \n\t\t\t\t\t$stil_l=\"sellink\"; \n\t\t\t\t}\n\t\t\t}\n\t\t\t$i = sprintf('%02d',$i);\n\t\t\tif($heute==1) $body .= \"<tr>\";\n\t\t\t$seldate = sprintf(\"%04d-%02d-%02d\",$dat1[year],$dat1[mon],$i);\n\t\t\t$body .= \"<td align=center class=\\\"\".$stil.\"\\\">\".\n\t\t\t\t \"<a class=$stil_l href=\\\"${script}$seldate\\\">\".$i.\n\t\t\t\t \"</a></td>\\n\";\n\t\t\tif($heute==7) $body .= \"</tr>\";\n\t\t\t$j = $heute;\n\t\t}\n\t}\n\tif ($j < 7) {\n\t\tfor ($i=0;$i<7-$j;$i++) {\n\t\t\t$body .= \"<td class=\\\"calat\\\">&nbsp;</td>\\n\";\n\t\t}\n\t\t$body .= \"</tr>\\n\";\n\t}\n\treturn $head.$body;\n}", "function print_own_appointment() {\n\n try\n {\n $db = new PDO('mysql:host=localhost;dbname=g_practitioner;charset=utf8', 'root', 'root');\n }\n catch (Exception $e)\n {\n die('Error: ' . $e->getMessage());\n }\n\n $find = $db->prepare(\"SELECT * FROM appointment WHERE Name = :name AND (State=\\\"Waiting\\\" OR State=\\\"OK\\\" )\");\n $find->execute(array('name' => $_SESSION['name']));\n\n $appointment = $find->fetch();\n\n if ($appointment != null) {\n \t// If there is appointments for the patient in session and in state OK or Waiting\n\n $find->closeCursor();\n\n $find = $db->prepare(\"SELECT * FROM appointment WHERE Name = :name AND (State=\\\"Waiting\\\" OR State=\\\"OK\\\" )\");\n \t$find->execute(array('name' => $_SESSION['name']));\n\n \t// We display a form with appointments and button to cancel\n\n $List_Appointments = \"<div><table class=\\\"tab_hour_style\\\"><thead><tr><th>ID</th><th>Name</th><th>Doctor</th><th>Day</th><th>Time</th><th>State</th><th>Reason</th></tr></thead><tbody>\";\n\n while ($appointment = $find->fetch()) {\n\n $List_Appointments .= \"\n\t <tr><form method=\\\"GET\\\">\n\t <td>\" . $appointment['id'] . \"</td>\n\t <input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"\" . $appointment['id'] . \"\\\"/>\n\t <td>\" . $appointment['name'] . \"</td>\n\t <td>\" . $appointment['doctor'] . \"</td>\n\t\t <td>\" . $appointment['day'] . \"</td>\n\t\t <td>\" . $appointment['time'] . \"</td>\n\t\t <td>\" . $appointment['state'] . \"</td>\n\t <td>\" . $appointment['reason'] . \"</td>\n\t <td class=\\\"button\\\"><input type=\\\"submit\\\" name=\\\"submit\\\" class=\\\"button_like_form_style\\\" value=\\\"Cancel\\\"/></td>\n\t </form></tr>\";\n }\n\n $List_Appointments .= \"</tbody></table></div>\";\n \n $find->closeCursor();\n echo $List_Appointments;\n\n }\n else {\n \t// If there is no appointments for the patient in session and in state OK or Waiting\n\n \techo \"<p>You don't have any waiting appointment.</p>\";\n }\n\n}", "function headerTable($conn)\n\t{\n\t\t$query = $conn->query(\"SELECT * FROM `tbl_transaction` NATURAL JOIN `tbl_guest` WHERE `transaction_id` LIKE $_REQUEST[transaction_id] \") or die(mysql_error());\n\t\t$fetch = $query->fetch_array();\n\n\t\t$this->SetFont(\"Times\",\"I\",9);\n\t\t$this->Cell(18,7,\"RefNo. \",0,0);\n\t\t$this->Cell(35,7,\": hr-\".$fetch['transaction_id'],0,0);\n\t\t$this->SetFont(\"Arial\",\"\",9);\n\t\t$this->Cell(26,7,\"Reservation Date \",0,0);\n\t\t$this->Cell(35,7,\": \".$fetch['reserve_date'],0,1);\n\t\t$this->Cell(18,7,\"Guest \",0,0);\n\t\t$this->Cell(35,7,\": \".$fetch['name'].' '.$fetch['surname'],0,0);\n\t\t$this->Cell(26,7,\"Email Address \",0,0);\n\t\t$this->Cell(35,7,\": \".$fetch['email_id'],0,1);\n\t\t$this->Cell(188,4,\"\",0,1);\n\t\t$this->Ln(4);\n\n\t\t//Reservation Details Title\n\t\t$this->SetFont(\"Arial\",\"U\",12);\n\t\t$this->Cell(35,10,\"Reservation Details\",0,1);\n\t\t//header\n\t\t$this->SetFont('Times','B',12);\n\t\t$this->Cell(41,10,'Room Type',1,0,'C');\n\t\t$this->Cell(22,10,'Room No.',1,0,'C');\n\t\t$this->Cell(25,10,'Check in',1,0,'C');\n\t\t$this->Cell(13,10,'Days',1,0,'C');\n\t\t$this->Cell(25,10,'Check out',1,0,'C');\n\t\t$this->Cell(22,10,'Extra bed',1,0,'C');\n\t\t$this->Cell(42,10,'Bill',1,1,'C');\n\t\t//$this->Cell(18,10,'Payment',1,1,'C');\n\t\t//$this->Ln();\n\t}", "public function get_recibos_contado($mes_recibo,$ano_recibo){\n $conectar=parent::conexion();\n parent::set_names();\n\n $mes=$_POST[\"mes_recibo\"];\n $ano=$_POST[\"ano_recibo\"]; \n $fecha= ($ano.\"-\".$mes.\"%\");\n\n if($mes=='todos'){\n $sql=\"select r.fecha,r.numero_recibo,r.numero_venta,r.abono_act,r.paciente,r.empresa,r.id_recibo,v.tipo_pago from ventas as v inner join recibos as r on v.numero_venta=r.numero_venta where v.tipo_venta='Contado';\";\n $sql=$conectar->prepare($sql); \n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n }else{\n $sql=\"select r.fecha,r.numero_recibo,r.numero_venta,r.abono_act,r.paciente,r.empresa,r.id_recibo,v.tipo_pago from ventas as v inner join recibos as r on v.numero_venta=r.numero_venta where fecha like ? and v.tipo_venta='Contado';\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha); \n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}\n}", "function daySearch($sql){ // Search Function\n include(\"connection.php\");\n \n // Setting 'Today'\n date_default_timezone_set('EST');\n $today = date(\"l\"); // Integer Representing Today\n \n global $dayArray; // Must declare to use outside var's\n global $dayString;\n echo \"<div id='tableContainer' class='tableContainer'>\";\n echo \"<table class='scrollTable'>\";\n echo \"<thead class='fixedHeader'>\n <tr class='headerWrap animated fadeInUp'>\n <th class='headerLocation'>Location</th>\";\n \n // Create the headers for each day selected\n for ($j = 0; $j < count($dayArray); $j++){\n if ($dayArray[$j] == $today){\n echo \"<th class='headerDay today'>\" . $dayArray[$j] . \"</th>\";\n }\n else {\n echo \"<th class='headerDay'>\" . $dayArray[$j] . \"</th>\";\n }\n }\n echo \"</thead>\";\n echo \"</tr>\";\n echo \"<tbody class='scrollContent'>\"; \n \n // Query Database \n $result = $mysqli->query($sql); \n $array = array();\n $odd = true;\n \n while($row = mysqli_fetch_assoc($result)){ \n $array[] = $row;\n };\n\n if ($result->num_rows !=0){\n \n for ($i = 0; $i < count($array); $i++){\n //echo ($array['deal']);\n // Creating Odd and Even Classes\n if ($odd == true){\n echo \"<tr class='odd animated flipInX'>\";\n \n } else {\n echo \"<tr class='even animated flipInX'>\";\n } // End Odd & Even\n \n echo \"<td class='location'>\" . $array[$i]['location'] . \"<hr class='locLine'>\n <a href=\" . $array[$i]['url'] . \"><img src='Images/locations/\" . $array[$i]['location'] . \".png' class='locIcon'></a>\n </td>\";\n \n // For Loop for Each Day Chosen\n for ($j = 0; $j < count($dayArray) - 1; $j++){\n \n echo \"<td class='deal'>\" . $array[$i]['deal'] . \"</td>\";\n $i++;\n } // For Loop\n \n echo \"<td class='deal'>\" . $array[$i]['deal'] . \"</td>\";\n\n echo \"</tr>\";\n \n $odd = !$odd;\n };\n echo \"</tbody>\";\n echo \"</table>\"; \n echo \"</div>\";\n } // If Results != 0\n \n else {\n // Format as Image Later //\n echo \"<img src='Images/noResults.png' class='noResults animated flipInX'>\";\n } \n}" ]
[ "0.620296", "0.619164", "0.5761321", "0.57592064", "0.57196337", "0.57176465", "0.57060397", "0.56374925", "0.5577489", "0.55640554", "0.555707", "0.5507494", "0.54930604", "0.54928577", "0.5492568", "0.5482267", "0.5481299", "0.54778254", "0.547304", "0.54701036", "0.5440296", "0.54370975", "0.54357916", "0.54282564", "0.5411263", "0.53850144", "0.53718334", "0.537084", "0.5355852", "0.53489685", "0.5331269", "0.53216153", "0.5317509", "0.53028405", "0.5294338", "0.52891105", "0.52823925", "0.52616656", "0.52580565", "0.5255634", "0.5244764", "0.52431756", "0.52392536", "0.5236458", "0.5234446", "0.52020097", "0.5192952", "0.5176672", "0.5173025", "0.5171226", "0.51697874", "0.51622504", "0.5158807", "0.51561934", "0.5150481", "0.51429975", "0.5124713", "0.5111578", "0.51107967", "0.51095605", "0.51004034", "0.5094699", "0.50902736", "0.50896174", "0.50891113", "0.5085814", "0.50831354", "0.50787306", "0.50770104", "0.50736135", "0.50721496", "0.5065028", "0.506319", "0.50608635", "0.5057095", "0.50505567", "0.5048742", "0.5041448", "0.50403965", "0.5033502", "0.5030818", "0.5030335", "0.50280243", "0.50231963", "0.5019522", "0.5016057", "0.5015051", "0.5013797", "0.5013084", "0.5011496", "0.5000226", "0.4995604", "0.49952343", "0.49879327", "0.49861676", "0.49821776", "0.4974933", "0.49731728", "0.4962311", "0.49572742" ]
0.6941607
0
/ Functio to get determine the maximum number of reservation per day (10)
function maxCountLimit($conn, $day, $current_month) { $current_year = date("y"); $select_all_dates = "SELECT * FROM reservation"; $q_seleect_all_dates = $conn->query($select_all_dates); if($q_seleect_all_dates->num_rows > 0) { while($q_row = $q_seleect_all_dates->fetch_assoc()) { $date_reserved = strtotime($q_row['reserv_date']); $date_reserved_month = date('m',$date_reserved); $date_reserved_year = date('y',$date_reserved); $date_reserved_day = date('d',$date_reserved); if($date_reserved_month == $current_month && $date_reserved_year == $current_year) { if($day == $date_reserved_day) { $r_date = $date_reserved_year . "-" . $date_reserved_month . "-" . $date_reserved_day; $select_date = "SELECT DISTINCT event_type, reserv_time FROM reservation WHERE reserv_date = '$r_date'"; $select_date_query = $conn->query($select_date); $r_count = $select_date_query -> num_rows; if($r_count >= 10) { return true; } else { return false; } } } else { return false; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxDaysOnMarket();", "function maxWeddingReservation($conn, $day, $month) {\n\t\t\t\t\t\n\t\t\t\t\t$event = 'Wedding';\n\t\t\t\t\t\n\t\t\t\t\t$date = date(\"Y\") . \"-\" . $month . \"-\" . $day;\n\t\t\t\t\t\n\t\t\t\t\t$select_wed = \"SELECT * FROM reservation WHERE reserv_date = '$date' AND event_type = '$event' AND confirmation = 'Confirmed'\";\n\t\t\t\t\t$select_wed_query = $conn->query($select_wed);\n\t\t\t\t\t\n\t\t\t\t\tif($select_wed_query -> num_rows >= 2) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$select_rem_time = \"SELECT * FROM reservation WHERE reserv_date = '$date' AND reserv_time = '5'\";\n\t\t\t\t\t\t$srt_query = $conn->query($select_rem_time);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($srt_query -> num_rows > 0) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn false;\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\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "function exibeAtualMax(){\n $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n return $nmax= ($this->numpage + $nmin)-1;\n }", "public function count_reservation()\n\t {\n\t\t$query = $this->db->get('tbb_reservasi');\n\t\treturn $query->num_rows();\n\t }", "public function getMaximalNumberOfDays()\n {\n return isset($this->MaximalNumberOfDays) ? $this->MaximalNumberOfDays : null;\n }", "public function getMaximumAttempts();", "function recupererid(){\n\t\t$sql=\"select max(idres) maximum from reservation \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\t foreach($liste as $row){$id=$row['maximum'] ;}\n\t\t return $id;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function getTimeLimit(): int;", "public function getTimeLimit(): int;", "function set_thirty_day_min_booking($min_days){\n $min_days = 30;\n return $min_days;\n}", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "function limite_trazadora($fecha) {\r\n $fecha = strtotime(fecha_db($fecha));\r\n $actualm = date('m', $fecha);\r\n $actualy = $actualy2 = date('Y', $fecha);\r\n // $ano = date('Y', $fecha);\r\n $desdem1 = '01';\r\n $hastam1 = '04';\r\n $desdem2 = '05';\r\n $hastam2 = '08';\r\n $desdem3 = '09';\r\n $hastam3 = '12';\r\n if ($actualm >= $desdem1 && $actualm <= $hastam1) {\r\n $cuatrimestre = 1;\r\n $cuatrimestrem = 3;\r\n //$actualy2++;\r\n }\r\n if ($actualm >= $desdem2 && $actualm <= $hastam2) {\r\n $cuatrimestre = 2;\r\n $cuatrimestrem = $cuatrimestre - 1;\r\n // $actualy2++;\r\n }\r\n if ($actualm >= $desdem3 && $actualm <= $hastam3) {\r\n $cuatrimestre = 3;\r\n $cuatrimestrem = $cuatrimestre - 1;\r\n $actualy2++;\r\n }\r\n\r\n $query2 = \"SELECT desde\r\n\t\t\t\t\tFROM facturacion.cuatrimestres\r\n\t\t\t\t\t WHERE cuatrimestre='$cuatrimestre'\";\r\n $res_sql2 = sql($query2) or excepcion(\"Error al buscar cuatrimestre\");\r\n $valor['desde'] = $actualy . '-' . $res_sql2->fields['desde'];\r\n\r\n $query2 = \"SELECT limite\r\n\t\t\t\t\tFROM facturacion.cuatrimestres\r\n\t\t\t\t\t WHERE cuatrimestre='$cuatrimestre'\";\r\n $res_sql2 = sql($query2) or excepcion(\"Error al buscar cuatrimestre\");\r\n\r\n $valor['limite'] = $actualy2 . '-' . $res_sql2->fields['limite'];\r\n\r\n return $valor;\r\n}", "public function getMaxFreeDays($holidaysRes)\n {\n $previousDate = null;\n $count = 1;\n $daysInRow = [];\n $startCount = true;\n \n foreach ($holidaysRes as $holidaysArr) {\n foreach ($holidaysArr as $holiday) {\n $currentDate = $holiday->getDate();\n \n if ($startCount) {\n $startCount = false;\n $previousDate = $currentDate;\n } else {\n if ($previousDate->diff($currentDate)->days == 1) {\n $count++;\n $daysInRow[] = $count; // not in else below, in case last cycle it will not reach else\n } else {\n $count = 1;\n }\n \n $previousDate = $currentDate;\n }\n }\n }\n\n return !empty($daysInRow) ? max($daysInRow) : 0;\n }", "public function tolerantion()\n {\n $row =$this->db->select('*')->from('c_history')->orderBy('date')->asc()->fetchPairs('date', 'idc_history');\n $date =new DateTime('1991-01-01');\n $max =0;\n while($date->format('Y-m-d') != '2010-01-28')\n {\n $buffer =0;\n while(!isset($row[$date->format('Y-m-d')]))\n {\n $date->modify('+1 day');\n $buffer++;\n }\n if($buffer > $max)\n $max =$buffer;\n $date->modify('+1 day');\n }\n return $max;\n }", "function getMaximoRetirable($fecha = false){\n\t\tif ( $fecha == false ){\n\t\t\t$fecha = fechasys();\n\t\t}\n\t\tif ( $this->mCuentaIniciada == false ) {\n\t\t $this->init();\n\t\t}\n\t\t//Obtener la Captacion Total\n\t\t$xSoc\t\t\t\t\t= new cSocio($this->mSocioTitular);\n\t\t$DTCap\t\t\t\t\t= $xSoc->getTotalCaptacionActual();\n\t\t$this->mMessages \t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, El Saldo Total de Captacion es \" . $DTCap[\"saldo\"] . \" \\r\\n\";\n\t\t$this->mMessages \t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, El saldo por Esta Cuenta es \" . $this->mNuevoSaldo . \" \\r\\n\";\n\t\t$saldo\t\t\t\t\t= $this->mSaldoAnterior;\n\t\t$saldo\t\t\t\t\t= ( $DTCap[\"saldo\"] - $saldo ) + $this->mNuevoSaldo ;\n\t\t$maximo_retirable\t\t= 0;\n\t\t//obtener los maximos retirables por credito\n\t\t//2011-1-30 cambio de monto_autorizado a saldo_actual\n\t\t$sqlCompCreditos = \"SELECT\n\t\t\t\t\t\t\t\tSUM(`creditos_solicitud`.`saldo_actual`) AS `monto`\n\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t`creditos_solicitud` `creditos_solicitud`\n\t\t\t\t\t\t\t\t\tINNER JOIN `eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\t\t\t\t\tON `creditos_solicitud`.`tipo_convenio` =\n\t\t\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`miembro`\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t(`creditos_solicitud`.`numero_socio` = \" . $this->mSocioTitular . \")\n\t\t\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t\t\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` = 1110)\n\t\t\t\t\t\t\t\t\tAND\n \t\t\t\t\t(`creditos_solicitud`.`saldo_actual` > \" . TOLERANCIA_SALDOS . \")\n\t\t\t\t\t\t\t\tGROUP BY\n\t\t\t\t\t\t\t\t\t`creditos_solicitud`.`numero_socio`,\n\t\t\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`\n \";\n\t\t$d\t\t\t\t\t\t\t= obten_filas($sqlCompCreditos);\n\t\t//Obtener el Maximo Comprometidos por Garantia Liquida\n\t\t$sqlCC = \"SELECT\n\t\t\t\t\t\t\t`creditos_solicitud`.`numero_socio`,\n\t\t\t\t\t\t\tSUM(`creditos_solicitud`.`saldo_actual`) AS 'monto_creditos',\n\t\t\t\t\t\t\tSUM(`creditos_solicitud`.`saldo_Actual` *\n\t\t\t\t\t\t\t`creditos_tipoconvenio`.`porciento_garantia_liquida`) AS 'monto_garantia'\n\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`creditos_solicitud` `creditos_solicitud`\n\t\t\t\t\t\t\t\tINNER JOIN `creditos_tipoconvenio` `creditos_tipoconvenio`\n\t\t\t\t\t\t\t\tON `creditos_solicitud`.`tipo_convenio` = `creditos_tipoconvenio`.\n\t\t\t\t\t\t\t\t`idcreditos_tipoconvenio`\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t(`creditos_solicitud`.`numero_socio` =\" . $this->mSocioTitular . \")\n\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t(`creditos_solicitud`.`saldo_actual` > \" . TOLERANCIA_SALDOS . \")\n\t\t\t\t\t\tGROUP BY\n\t\t\t\t\t\t\t`creditos_solicitud`.`numero_socio` \";\n\t\t$comprometido_por_garantia\t= 0;\n\n\t\t$comprometido_por_creditos\t= (isset($d[\"monto\"])) ? csetNoMenorQueCero( $d[\"monto\"] ) : 0;\n\t\t$comprometido_por_ide\t\t= 0;\t\t\t//Terminar el saldo de IDE retirable\n\t\t$this->mMessages \t\t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, Lo Comprometido por Creditos es de $comprometido_por_creditos \\r\\n\";\n\t\t$this->mMessages \t\t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, Lo Comprometido por IDE es de $comprometido_por_ide\\r\\n\";\n\n\t\t//\n\t\tif ( $this->mSubProducto == CAPTACION_PRODUCTO_GARANTIALIQ){\n\t\t\t$c\t\t\t\t\t\t\t= obten_filas($sqlCC);\n\t\t\t$comprometido_por_garantia\t= setNoMenorQueCero( $c[\"monto_garantia\"] );\n\t\t\t$this->mMessages \t\t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, Lo Comprometido por GARANTIA LIQUIDA ES $comprometido_por_garantia \\r\\n\";\n\t\t\t$saldo\t\t\t\t\t\t= $this->mNuevoSaldo;\t//correccion por garantia liquida\n\t\t\t$comprometido_por_creditos\t= 0;\t\t\t\t\t//La ganartia liquida solo es presionado por lo comprometido por garantia\n\t\t}\n\t\t//\n\n\n\t\t$maximo_retirable\t\t\t= $saldo - ($comprometido_por_creditos + $comprometido_por_ide + $comprometido_por_garantia);\n\t\t$maximo_retirable\t\t\t= setNoMenorQueCero($maximo_retirable);\n\t\t$this->mMessages \t\t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, El Maximo Retirable es de $maximo_retirable de un Monto de $saldo\\r\\n\";\n\t\t//Componer el Saldo, no puede ser mayor al nuevo saldo\n\t\treturn ($maximo_retirable <= $this->mNuevoSaldo ) ? round($maximo_retirable, 2) : round($this->mNuevoSaldo, 2);\n\t}", "function getEscalatinMaxCnt($DbConnection)\n{\n\t$query =\"SELECT Max(serial)+1 as seiral_no FROM escalation\"; ///// for auto increament of geo_id /////////// \n\t$result=mysql_query($query,$DbConnection);\n\t$row=mysql_fetch_row($result);\n\treturn $row[0];\n}", "function getLimit() ;", "public function getMaxDit() {\n\t\treturn $this->maxDit;\n\t}", "function get_month_max($date, $labels) {\n global $DB;\n\n $fechainicio = new DateTime(\"1-\".$date->month.\"-\".$date->year);\n $maxday = cal_days_in_month(CAL_GREGORIAN, $date->month, $date->year);\n $fechafin = new DateTime($maxday.\"-\".$date->month.\"-\".$date->year);\n $fechafin->setTime(23, 59, 59);\n $result = array();\n foreach ($labels as $label) {\n $result[] = 0;\n }\n\n $sql = \"SELECT id, connectedusers, date FROM {report_user_statistics} WHERE date >= ? AND date <= ? ORDER BY date;\";\n $todaslasconexiones = $DB->get_records_sql($sql, [$fechainicio->getTimestamp(), $fechafin->getTimestamp()]);\n $day = 0;\n $temp = array();\n $i = 1;\n foreach ($todaslasconexiones as $conexiones) {\n $fecha = new DateTime(\"@$conexiones->date\");\n if (($fecha->format('m') == $date->month) && ($fecha->format('Y') == $date->year)) {\n if ($day == 0) {\n $day = $fecha->format('d');\n $temp[] = $conexiones->connectedusers;\n $i++;\n } else if ($day == $fecha->format('d')) {\n $temp[] = $conexiones->connectedusers;\n $i++;\n } else if ($day < $fecha->format('d')) {\n $key = array_search($day, $labels);\n $result[$key] = max($temp);\n $temp = array();\n $day = $fecha->format('d');\n $temp[] = $conexiones->connectedusers;\n }\n if (count($todaslasconexiones) == $i) {\n $key = array_search($day, $labels);\n $result[$key] = max($temp);\n } else if (count($temp) > 1) {\n $key = array_search($day, $labels);\n $result[$key] = max($temp);\n }\n }\n }\n return $result;\n}", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "private function getMaxAvailableVersion()\n {\n echo \"Getting the max available version: \";\n\n $maxAvailableVersion = 0;\n\n foreach ($this->getDeltas() as $deltaNum => $delta) {\n if ($maxAvailableVersion < $deltaNum) {\n $maxAvailableVersion = $deltaNum;\n }\n }\n\n echo \"$maxAvailableVersion.\\n\";\n\n return $maxAvailableVersion;\n }", "public function obtenerUltimoCodigoCanton() {\n\n $resultado = mysqli_query($this->connection, \"select max(codigoCanton) as ultimoCodigoCanton from tbcanton \");\n $ultimoCodigoCanton = 0;\n\n while ($filaTemporal = mysqli_fetch_array($resultado)) {\n $ultimoCodigoCanton = $filaTemporal['ultimoCodigoCanton'];\n }\n return $ultimoCodigoCanton;\n }", "public function getMaxNotaFiscalNumero() {\r\n\r\n $sql = \"SELECT MAX(nflno_numero) + 1 as nflno_numero FROM nota_fiscal WHERE nflserie = 'A'\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result['nflno_numero']; \r\n }", "public function GetMaxCount ();", "public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "public function getMaximumAttendees()\n {\n $query = 'select count(attendeeID) from attendees';\n if ($this->connectedModel->runQuery($query)) //query\n {\n if ($row = $this->connectedModel->getResultsRow())\n return $row[0]; //count()\n }\n else\n {\n return -1;\n }\n }", "protected function initDefaultNumberOfDays() {}", "public function getLimit() {}", "function getIdMaxNouvelle($idRSS) {\n /*$sql = \"SELECT MAX(id) as max FROM Nouvelle WHERE idRSS = ?\";\n $req = $this->db->prepare($sql);\n $params = array($idRSS);\n $res = $req->execute($params);\n debug($this->db,$sql,$params);\n if ($res === FALSE) {\n die(\"getIdMaxNouvelle error: Requête impossible !\\n\");\n }\n $res = $req->fetchAll();\n if (isset($res[0]))\n return $res[0]['max'];\n else\n return 0;*/\n die(\"Fonction getIdMaxNouvelle utilisée ! Faut me garder !\");\n }", "public function getMaxValue();", "public function getMaxValue();", "protected function getLeaveAssignDateLimit() {\n // If no leave period, don't allow apply/assign beyond next calender year\n $todayNextYear = new DateTime();\n $todayNextYear->add(new DateInterval('P1Y'));\n \n if ($this->getConfigService()->isLeavePeriodDefined()) {\n $period = $this->getLeavePeriodService()->getCurrentLeavePeriodByDate($todayNextYear->format('Y-m-d'));\n $maxDate = $period[1];\n } else {\n $nextYear = $todayNextYear->format('Y');\n $maxDate = $nextYear . '-12-31';\n } \n \n return $maxDate;\n }", "public function getMaxFindings()\n {\n return $this->max_findings;\n }", "public function maxExceptions();", "public static function getMaxUsedNumber()\n {\n $query = new Query;\n\n $query->select('recepient_num, count(recepient_num) as quan')\n ->from('call')\n ->groupBy('recepient_num')\n ->orderBy('quan desc')\n ->limit(1);\n\n $rows = $query->all();\n\n return $rows[0]['recepient_num'];\n }", "abstract public function maxMax(): int;", "public function get_limit();", "public function getSlotMaxAttribute()\n {\n return ($this->trainer_slot_id ? $this->trainer_count * $this->slot_max_potential : $this->slot_max_potential);\n }", "public function maxNumberMonster(){\n $count = Monster::all()->count();\n return response()-> json([\n \"max_number_monsters\" => $count\n ]);\n }", "public function getMinimalNumberOfDays()\n {\n return isset($this->MinimalNumberOfDays) ? $this->MinimalNumberOfDays : null;\n }", "function recurrence($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_type, $parameters) {\n global $DB,$CFG;\n\n //Take parameters and convert to array\n $parameters = urldecode($parameters);\n $params = explode(';', $parameters);\n //print_r($params);\n //echo 'TYPE: ' . $recurrence_type;\n\n if($recurrence_type == 'none'){\n $recurrence_id = 0;\n }\n else{\n $recurrences = $DB->get_records_select('roomscheduler_reservations', 'location=\\''.$room.'\\' GROUP BY {roomscheduler_reservations}.recurrence_id',array(),\"\",'{roomscheduler_reservations}.recurrence_id');\n $recurrence_id = sizeof($recurrences);\n }\n\n //No recursion\n if ($recurrence_type == 'none') {\n return new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n\n //Daily: Every x days\n else if ($recurrence_type == 'everyxdays') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $xdays = $params[2];\n if ($xdays <= 0 || $endtype_param<0) {}\n \n\n //Condition 1: End by \n else if ($endtype == 'endby') {\n\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += $xdays * (24 * 60 * 60);\n $toTime += $xdays * (24 * 60 * 60);\n }\n }\n //Condition 2: End after\n else if ($endtype == 'endafter') {\n for ($occurences = 1; $occurences <= $endtype_param; $occurences++) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += $xdays * (24 * 60 * 60);\n $toTime += $xdays * (24 * 60 * 60);\n }\n }\n }\n //Daily: Every week day\n else if ($recurrence_type == 'everyweekday') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n\n //Condition 1: End by\n if ($endtype == 'endby') {\n\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n if ($dayofweek == 6 || $dayofweek == 7) {\n \n } else {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n }\n //Condition 2: End after\n else if ($endtype == 'endafter') {\n\n $occurences = 0;\n while ($occurences < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n if ($dayofweek == 6 || $dayofweek == 7) {\n \n } else {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $occurences++;\n }\n\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n }\n }\n\n\n //Weekly: Every x weeks\n else if ($recurrence_type == 'everyxweeks') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $xweeks = $params[2];\n $dayofweek = explode('?', $params[3]);\n\n if ($xweeks <= 0 || $xweeks > 48 || $endtype_param <0) {\n \n }\n\n //Condition 1: End by\n else if ($endtype == 'endby') {\n $counter = 0;\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n if ($counter == 0) {\n for ($day = 1; $day <= 7; $day++) {\n\n $dayofweek_temp = strftime_dayofweek_compatible($fromTime);\n if (in_array($dayofweek_temp, $dayofweek)) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n $counter++;\n } else if ($counter == $xweeks) {\n $counter = 0;\n } else if ($counter != 0) {\n\n for ($day = 1; $day <= 7; $day++) {\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n $counter++;\n }\n }\n }\n\n\n //Condition 2: End after\n else if ($endtype == 'endafter') {\n $occurences = 0;\n $counter = 0;\n while ($occurences < $endtype_param) {\n if ($counter == 0) {\n for ($day = 1; $day <= 7; $day++) {\n\n $dayofweek_temp = strftime_dayofweek_compatible($fromTime);\n if (in_array($dayofweek_temp, $dayofweek)) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n $counter++;\n $occurences++;\n } else if ($counter == $xweeks) {\n $counter = 0;\n } else if ($counter != 0) {\n\n for ($day = 1; $day <= 7; $day++) {\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n $counter++;\n }\n }\n }\n }\n\n //Monthly: Day x of every x month(s)\n else if ($recurrence_type == 'everyxmonthxday') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $xmonths_param = $params[3];\n $dayofmonth_param = $params[2];\n if ($dayofmonth_param <= 0 || $dayofmonth_param > 31 || $xmonths_param <= 0 || $endtype_param < 0) {\n \n }\n\n //Condition 1: End by\n if ($endtype == 'endby') {\n $counter = 0;\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n\n while ($firstmatch == 0) {\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == $dayofmonth_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $firstmatch = 1;\n }\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n }\n\n if ($dayofmonth == $dayofmonth_param && $counter == 0) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n } else {\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n }\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter++;\n }\n if ($dayofmonth_param == 29) {\n if ($dayofmonth == 28) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n if ($dayofmonth_param == 30) {\n if ($dayofmonth == 29) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n if ($dayofmonth_param == 31) {\n if ($dayofmonth == 30) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n\n\n if ($counter == $xmonths_param) {\n $counter = 0;\n $occurences++;\n }\n }\n }\n //Condition 2: End after\n else if ($endtype == 'endafter') {\n $counter = 0;\n $occurences = 0;\n $firstmatch = 0;\n\n while ($occurences < $endtype_param) {\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n\n while ($firstmatch == 0) {\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == $dayofmonth_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $firstmatch = 1;\n $occurences++;\n }\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n }\n\n if ($dayofmonth == $dayofmonth_param && $counter == 0) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n } else {\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n }\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter++;\n }\n if ($dayofmonth_param == 29) {\n if ($dayofmonth == 28) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n if ($dayofmonth_param == 30) {\n if ($dayofmonth == 29) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n if ($dayofmonth_param == 31) {\n if ($dayofmonth == 30) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n\n\n if ($counter == $xmonths_param) {\n $counter = 0;\n $occurences++;\n }\n }\n }\n }\n\n //Monthly: The x(first/second/third/fourth) y(m,t,w,t,f,s,s) of every z(1-12) month(s)\n else if ($recurrence_type == 'thexyofeveryzmonths') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $numberdate_param = $params[2];\n $dayofweek_param = $params[3];\n $xmonths_param = $params[4];\n if ($xmonths_param <= 0 || $endtype_param <0) {\n \n }\n //Condition 1: End by\n if ($endtype == 'endby') {\n $numberdatecounter = 0;\n $xmonthscounter = 0;\n $firstmatch = 0;\n\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n while ($firstmatch == 0) {\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param && $xmonthscounter == 0) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n //$xmonthscounter++;\n $firstmatch = 1;\n }\n }\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n\n if ($dayofmonth == 01) {\n $numberdatecounter = 0;\n }\n }\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param) {\n $xmonthscounter++;\n if ($xmonthscounter == $xmonths_param) {\n $xmonthscounter = 0;\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n }\n }\n\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n\n if ($dayofmonth == 01) {\n $numberdatecounter = 0;\n }\n }\n }\n //Condition 2: End after\n if ($endtype == 'endafter') {\n $numberdatecounter = 0;\n $xmonthscounter = 0;\n $occurences = 0;\n $firstmatch = 0;\n\n while ($occurences < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n while ($firstmatch == 0) {\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param && $xmonthscounter == 0) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n //$xmonthscounter++;\n $occurences++;\n $firstmatch = 1;\n }\n }\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n\n if ($dayofmonth == 01) {\n $numberdatecounter = 0;\n }\n }\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param) {\n $xmonthscounter++;\n if ($xmonthscounter == $xmonths_param) {\n $xmonthscounter = 0;\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $occurences++;\n }\n }\n }\n\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n\n if ($dayofmonth == 01) {\n $numberdatecounter = 0;\n }\n }\n }\n }\n //Yearly: Every xmonth xday\n else if ($recurrence_type == 'everyxmonthxdayyear') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $xmonth_param = $params[2];\n $xday_param = $params[3];\n if ($xday_param <= 0 || $xday_param > 31 || $endtype_param <0) {\n\n }\n //Condition1: End by\n if ($endtype == 'endby') {\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n $xmonth = strftime('%m', $fromTime);\n $xday = strftime_dayofmonth_compatible($fromTime);\n if ($xmonth == $xmonth_param && $xday == $xday_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += ( 150 * 24 * 60 * 60);\n $toTime += ( 150 * 24 * 60 * 60);\n } else {\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n }\n }\n }\n //Condition2: End After\n else if ($endtype == 'endafter') {\n $occurences = 0;\n while ($occurences < $endtype_param) {\n $xmonth = strftime('%m', $fromTime);\n $xday = strftime_dayofmonth_compatible($fromTime);\n if ($xmonth == $xmonth_param && $xday == $xday_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $occurences++;\n $fromTime += ( 150 * 24 * 60 * 60);\n $toTime += ( 150 * 24 * 60 * 60);\n } else {\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n }\n }\n }\n }\n //Yearly: The x(first/second/third/fourth) y(1-7) of (1-12)\n else if ($recurrence_type == 'thexyofz') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $numberdate_param = $params[2];\n $dayofweek_param = $params[4];\n $xmonth_param = $params[3];\n\n //Condition 1: Endby\n if ($endtype == 'endby') {\n $numberdatecounter = 0;\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n $xmonth = strftime('%m', $fromTime);\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param && $xmonth_param == $xmonth) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += (150*24*60*60);\n $toTime += (150*24*60*60);\n\n }\n }\n\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n\n $dayofthemonth = strftime_dayofmonth_compatible($fromTime);\n\n if ($dayofthemonth == 1) {\n $numberdatecounter = 0;\n }\n }\n }\n //Condition 2: End after\n if ($endtype == 'endafter') {\n $occurences = 0;\n $numberdatecounter = 0;\n while ($occurences < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n $xmonth = strftime('%m', $fromTime);\n $xmonthday = strftime('%d', $fromTime);\n $year = strftime('%Y', $fromTime);\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param && $xmonth_param == $xmonth) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $occurences++;\n $fromTime += (150*24*60*60);\n $toTime += (150*24*60*60);\n\n }\n }\n\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n\n $dayofthemonth = strftime_dayofmonth_compatible($fromTime);\n\n if ($dayofthemonth == 1) {\n $numberdatecounter = 0;\n }\n }\n }\n }\n}", "public function maxTries();", "function loanExpire(){\n\tglobal $driver;\n\t$sql\t=\t\"SELECT loanduration FROM settings\"; //Retrieve the maximum days the loanee will be given before being flagged as a defaulter\n\tif($loanexpire\t=\t$driver->perform_request($sql)):\n\t\t$row\t=\t$driver->load_data($loanexpire);\n\t\t$maxdays\t=\t($row['loanduration']>0)?($row['loanduration']):30; //Retrieved loan duration\n\telse:\n\t\tdie('<p class=\"error\">ERROR Retrieving Loan duration.<br/>'.mysql_error().'</p>');\n\tendif;\n\treturn $maxdays; //The maximum days before loan is pushed to arrear\n}", "public static function getValidDays() {\n\t\treturn 30;\n\t}", "function cemhub_get_limit_submissions_per_day($webform_nid) {\n $webforms_settings = cemhub_get_integrated_webform_settings_by_node_id($webform_nid);\n $limit = isset($webforms_settings->limit_submissions) ? $webforms_settings->limit_submissions : CEMHUB_DEFAULT_LIMIT_SUBMISSION;\n\n return $limit;\n}", "public function getMaxAgeInDays() {\n\t\treturn $this->maxAgeInDays;\n\t}", "public function getMaxBeds();", "public static function numero_dernier_episode() {\n\n\t\t$database = new Database();\n\t\t$sql = \"SELECT MAX(numero_episode) FROM episodes\";\n\t\t$reponse = $database->execute_query($sql);\n\n\t\t$numero_dernier_episode = $reponse->fetch();\n\n\t\treturn $numero_dernier_episode[0];\n\t}", "public function getMaxResults();", "function getMaxInShowcase();", "public function MaxTranefsactionId($account_id,$startdate)\n{\n $id =$this->db->select_max('transaction_id')\n ->where('created_at <',$startdate)\n ->where('account_id',$account_id)\n ->get($this->postingsTable)\n ->result()[0]\n ->transaction_id;\n //if the sum is null which means there is no transaction for this account then instead of return \n // null let us return 0\n\n return (is_null($id))?0:$id; \n\n}", "public function selecMaximoNumero2($empresa_id, $tipo_documento_id, $serie){\n $sql = \"SELECT MAX(CAST(numero AS UNSIGNED)) numero FROM comprobantes WHERE 1 = 1 AND empresa_id = $empresa_id AND tipo_documento_id = $tipo_documento_id AND serie = '\".$serie.\"'\";\n $query = $this->db->query($sql);\n $rowNumero = $query->row_array();\n\n if($rowNumero['numero'] == null){\n //BUSQUEDA DE NUMERO 12-01-2021\n $rsNumero = $this->db->from('ser_nums')\n ->where('empresa_id',$empresa_id)\n ->where('tipo_documento_id',$tipo_documento_id)\n ->where('serie',$serie)\n ->where('estado',ST_ACTIVO)\n ->get()\n ->row();\n $rowNumero['numero'] = ($rsNumero->numero == null) ? 1 : $rsNumero->numero;\n }else{\n $rowNumero['numero']++;\n }\n\n return $rowNumero;\n }", "public function getMaxOccupancy()\n {\n return $this->maxOccupancy;\n }", "public function getOverfillLimit()\n {\n return 20;\n }", "public function hasMaxAnger(){\r\n return $this->_has(6);\r\n }", "function getNumDaysDemo(){ //numero de dias para la prueba del sistema\n\treturn campo('config_system','id','1','days_block');\n}", "function getNumDaysDemo(){ //numero de dias para la prueba del sistema\n\treturn campo('config_system','id','1','days_block');\n}", "function amountOfAvailablePrizesToday($conn)\n{\n $amount = 0;\n if (isSunday() && !isLastSunday()) {\n $amount = 7;\n } else {\n $amount = 8;\n }\n return ($amount - todaysSentPrizes($conn));\n}", "public function getMaxDateRange()\n {\n return $this->_getBorderDateRange(self::MAX_DATE_RANGE_KEY);\n }", "public function get_RecertificationDays() {\n if ($this->isUpForRecertification()) {\n $renewalDate = date_create($this->get_lifelineCertificationRenewalDate());\n return intval(date_diff(new DateTime('now'), $renewalDate)->format('%r%a'));\n } else {\n return 99999;\n }\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "abstract public function getMaxPorts();", "abstract protected function getMaxParameter(): int;", "public function ultimoNumeroFactura(){\n $pdo = Database::connect();\n $sql = \"select max(idfactura) numero from facturas\";\n $consulta = $pdo->prepare($sql);\n $consulta->execute();\n //obtenemos el registro especifico:\n $res=$consulta->fetch(PDO::FETCH_ASSOC);\n $numero=$res['numero'];\n Database::disconnect();\n //retornamos el numero encontrado:\n if(!isset($numero))\n return 0;\n return $numero;\n }", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(a.idagrupacion) as maximo')\r\n ->from('NomAgrupacion a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "public function getReservationsPerDayPerHourPerMeal($date) {\r\n $req = $this->queryPrepareExecute(\r\n \"SELECT resHour, fkMeal, count(idReservation) AS numberReservations FROM t_reservation WHERE date(resDate) = :varDate GROUP BY resHour, fkMeal ORDER BY resHour, fkMeal\",\r\n array(\r\n array(\r\n \"marker\" => \"varDate\",\r\n \"var\" => $date,\r\n \"type\" => PDO::PARAM_STR\r\n )\r\n )\r\n );\r\n $result = $this->formatData($req);\r\n $this->unsetData($req);\r\n return $result;\r\n }", "function getEndId($LastRunEndId,$numUsers,$currentStartId){\n\n//Check if Users less then 900, if so start start at 0\n if($numUsers < 900){\n \n $currentEndId = $numUsers;\n return $currentEndId;\n }\n \n//Check if Run will not reach end of Users \n \n elseif($LastRunEndId + 900 < $numUsers){\n \n $currentEndId = $currentStartId + 900;\n return $currentEndId;\n\n }\n \n //If Run reaches end of Users \n \n else{\n $numDistance = $numUsers - $currentStartId;\n $currentEndId = 900 - $numDistance;\n return $currentEndId;\n\n }\n \n\n}", "function rate_limit($key, $interval, $max, $error = 'Slow down a bit, yo.')\n{\n $unit = round(time() / $interval);\n $key .= '-'.$unit;\n $count = 0;\n\n if (apcu_exists($key)) {\n $count = apcu_fetch($key);\n if ($count >= $max) {\n throw new Exception($error);\n }\n }\n\n $count++;\n apcu_store($key, $count, $interval);\n\n return $count;\n}", "function rate_limit($key, $interval, $max, $error = 'Slow down a bit, yo.')\n{\n $unit = round(time() / $interval);\n $key .= '-'.$unit;\n $count = 0;\n\n if (apcu_exists($key)) {\n $count = apcu_fetch($key);\n if ($count >= $max) {\n throw new Exception($error);\n }\n }\n\n $count++;\n apcu_store($key, $count, $interval);\n\n return $count;\n}", "function getMaxDocketNoConsignmentInfo($account_id_local,$DbC)\n{\n\t$query1=\"SELECT MAX(docket_no) as max_count FROM consignment_info WHERE account_id=$account_id_local\";\n\t$result1=mysql_query($query1,$DbC);\n\t$max_no = mysql_fetch_object($result1);\n\t$max_no1=$max_no->max_count;\n\treturn $max_no1;\n}", "public function getMaxPrice();", "public function getMax(): int;", "public function getFreeSupportDays() {\n\t\tif (!$this->startfgp) {\n\t\t\treturn 0;\n\t\t}\n\t\t$end = $this->getFreeSupportEndDate();\n\t\t$diff = $end - time();\n\t\tif ($diff < 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\treturn round($diff / 60 / 60 / 24);\n\t}", "function NUMERO_DE_HIJOS_MAYORES_ESTUDIANDO($_ARGS) {\r\n\t$_PARAMETROS = PARAMETROS();\r\n\t\r\n\tlist($a, $m)=SPLIT( '[/.-]', $_ARGS[\"PERIODO\"]); \r\n\r\n $anio = $a - 18;\r\n\t$fecha18 = \"$anio-$m-01\";\r\n\t\r\n\t $anio = $a - 25;\r\n\t$fecha25 = \"$anio-$m-01\";\r\n\r\n\t$sql = \"SELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\trh_cargafamiliar\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tParentesco = 'HI' \r\n\t\t\t\tAND\tFechaNacimiento <= '\".$fecha18.\"'\r\n\t\t\t\tAND\tFechaNacimiento >= '\".$fecha25.\"'\r\n\t\t\t\tAND rh_cargafamiliar.Parentesco = 'HI' \r\n\t\t\t\tAND rh_cargafamiliar.FlagEstudia = 'S'\t\r\n\t\t\t\t\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\treturn intval(mysql_num_rows($query));\r\n}", "public function melyikFelev()\n {\n $datum = date(\"m\");\n if ((($datum >= 9) and ($datum <= 12)) || ($datum == 1)) {\n return 1;\n } elseif (($datum >= 2) and ($datum < 9)) {\n return 2;\n }\n }", "public function getMaximumAttendeesCount()\n {\n if (array_key_exists(\"maximumAttendeesCount\", $this->_propDict)) {\n return $this->_propDict[\"maximumAttendeesCount\"];\n } else {\n return null;\n }\n }", "public function getMaxNumber()\n {\n return $this->maxNumber;\n }", "function getMaxDailySteps(){\n $time = array();\n $steps = array();\n $mysqli = $GLOBALS['mysqli'];\n $result = $mysqli->query(\"SELECT DATE(time) AS time, MAX(steps) AS steps FROM steps GROUP BY DAY(time)\");\n $rows = array();\n while($row = $result->fetch_assoc()) {\n $time[] = $row['time'];\n $steps[] = $row['steps'];\n }\n return array($time, $steps);\n}", "function getTotalDays();", "function bestTimeToBuyAndSellStock($arr) {\n $len = count($arr);\n $minPrice = 999;\n $maxPro = 0;\n for ($i=0; $i<$len; $i++) {\n $minPrice = min($minPrice, $arr[$i]);\n $maxPro = max($maxPro, $arr[$i] - $minPrice);\n }\n return $maxPro;\n}", "function getMonthDays($month,$year){\n$has31days=checkdate($month,31,$year);\n$isSchalt=checkdate(2,29,$year);\n\tif ($isSchalt==1 && $month==2) $maxdays=29;\n\telseif ($isSchalt!=1 && $month==2) $maxdays=28;\n\telseif ($has31days==1) $maxdays=31;\n\telse $maxdays=30;\nreturn $maxdays;\n}", "public function noReservationsAvailableCase5($reservation)\n\t{\n\t\t$newDateFrom = new DateTime();\n\t\t$newDateFrom = DateTime::createFromFormat('Y-m-d',$this->_dateOverlapFromObj->format('Y-m-d'));\n\t\t$newDateFrom->add(new DateInterval('P1D'));\n\n\t\t\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $newDateFrom->format('Y-m-d'),\n\t\t\t\t'numberofnights'=> $this->_numberofnights + 1,\n\t\t\t\t));\n\t\t\n\t\t$this->assertFalse($reservation->save()); \n\t}", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(n.idnivelutilizacion) as maximo')\r\n ->from('NomNivelUtilizacion n')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "function getMax() { return $this->readMaxValue(); }", "public function getMaximumId($restaurant){\r\n $stmt = $this->db->prepare(\"SELECT MAX(id_event) as max_id FROM event WHERE restaurant = ?\");\r\n $stmt->execute(array($restaurant));\r\n $max = $stmt->fetch(PDO::FETCH_ASSOC);\r\n $aux = $max['max_id'];\r\n return $aux;\r\n }", "public function testNoReservationsAvailable()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t//We should be able to reserver two rooms max, as this is the quantity of the room type\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertTrue($reservation->save());\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertTrue($reservation->save());\n\t\t\n\n\t\t/**\n\t\t * Test the date overlapping works correctly\n\t\t * Date From |------| Date To\n\t\t * *************************************************************************************\n\t\t * Original Reservation |---------------|\n\t\t * Case 1 |---------------|\n\t\t * Case 2 |--------------------------|\n\t\t * Case 3 |------|\n\t\t * Case 4 |-------------|\n\t\t * Case 5 |------------------|\n\t\t * *************************************************************************************\n\t\t */\n\t\t$this->noReservationsAvailableCase1($reservation);\n\t\t$this->noReservationsAvailableCase2($reservation);\n\t\t$this->noReservationsAvailableCase3($reservation);\n\t\t$this->noReservationsAvailableCase4($reservation);\n\t\t$this->noReservationsAvailableCase5($reservation);\n\n\t}", "function max() { return $this->max; }", "private function getNewTicketsCount() {\r\n\t\t$sql = \"SELECT count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Entered_UTC >= DATEADD(day, -1, GETDATE()) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r = $row['count'];\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function getMaxResults()\n {\n return $this->max_results;\n }", "public function numbersAction() {\n global $CFG;\n\n $br = new bookingRecord();\n $gump = $this->getGump();\n\n // check the session is still around\n if ($br->expired()) {\n $this->redirect($this->url('booking/expired'));\n }\n \n // get fares\n $fares = \\ORM::for_table('fares')->find_one(1);\n\n // choices\n $adultchoices = $this->fill(1, $CFG->select_limit);\n $childrenchoices = $this->fill(0, $CFG->select_limit);\n $childrenchoices[0] = 'None';\n $infantchoices = $this->fill(0, $CFG->select_limit);\n $infantchoices[0] = 'None';\n\n // form submitted?\n $errors = [];\n if ($request = $this->getRequest()) {\n if (!empty($request['cancel'])) {\n $this->redirect($this->Url('booking/start'));\n }\n\n $lim = $CFG->select_limit;;\n $gump->validation_rules(array(\n 'adults' => \"required|numeric|min_numeric,1|max_numeric,$lim\",\n 'children' => \"required|numeric|min_numeric,0|max_numeric,$lim\",\n 'infants' => \"required|numeric|min_numeric,0|max_numeric,$lim\",\n ));\n if ($data = $gump->run($request)) {\n $adults = $data['adults'];\n $children = $data['children'];\n $infants = $data['infants'];\n $partysize = $adults + $children;\n if ($partysize > $CFG->select_limit) {\n $errors[] = 'The total party size may not be greater than ' . $CFG->select_limit;\n } else {\n $br->setAdults($adults);\n $br->setChildren($children);\n $br->setInfants($infants);\n $br->save();\n $this->redirect($this->Url('booking/date'));\n }\n }\n }\n \n // Form\n $form = new \\stdClass;\n $form->adults = $this->form->select('adults',\n 'Number of adults - £'.number_format($fares->adult/100, 2).' each',\n $br->getAdults(),\n $adultchoices,\n '',\n 8);\n $form->children = $this->form->select('children',\n 'Number of children - £'.number_format($fares->child/100, 2).' each <small class=\"santa-subtext\">(18 months to 15 years)</small>',\n $br->getChildren(),\n $childrenchoices,\n '',\n 8);\n $form->infants = $this->form->select('infants',\n 'Number of infants <small class=\"santa-subtext\">(17 months and under)</small>',\n $br->getInfants(),\n $infantchoices,\n '',\n 8);\n $form->buttons = $this->form->buttons('Next', 'Back', true);\n\n $this->View('booking_numbers', array(\n 'br' => $br,\n 'form' => $form,\n 'adultchoices' => $adultchoices,\n 'childrenchoices' => $childrenchoices,\n 'infantchoices' => $infantchoices,\n 'fares' => $fares,\n 'errors' => $gump->errors(),\n ));\n }", "function Count_Max_Reattempts($schedule, $origin_id=null)\n{\n\tstatic $recursion_level;\n\tif (empty($origin_id))\n\t{\n\t\t$max_level = 0;\n\t\t$reatt_count = 0;\n\t\tfor($x = 0; $x < count($schedule); $x++)\n\t\t{\n\t\t\t$e = $schedule[$x];\n\t\t\t$recursion_level = 1;\n\t\t\tif ($e->origin_id !== NULL && $e->origin_id > 0)\n\t\t\t{\n\t\t\t\t$reatt_count = max($reatt_count, Count_Max_Reattempts($schedule, $e->origin_id));\n\t\t\t\t$recursion_level--;\n\t\t\t\tif($recursion_level > $max_level) $max_level = $recursion_level;\n\t\t\t}\n\t\t}\n\t\t//return $reatt_count;\n\t\treturn $max_level;\n\t}\n\telse\n\t{\n\t\t$recursion_level++;\n\t\tfor($i = 0; $i < count($schedule); $i++)\n\t\t{\n\t\t\t$e = $schedule[$i];\n\t\t\tif ($e->transaction_register_id === $origin_id)\n\t\t\t{\n\t\t\t\tif ($e->origin_id === NULL) return 0;\n\t\t\t\telse return (Count_Max_Reattempts($schedule, $e->origin_id) + 1);\n\t\t\t}\n\t\t}\n\t}\n}", "public function updatePeriodMaxCycles()\r\n {\r\n // edit period max cycles if It is greater than or equal 0 and is numeric\r\n // If period max cycles <= 0 or null, recurring profile will run forever\r\n if ($periodMaxCycles = $this->_recurringProfile->getPeriodMaxCycles()) {\r\n if ((string)(int) $periodMaxCycles === ltrim($periodMaxCycles, '0') && $periodMaxCycles > 0) {\r\n $periodMaxCycles = (int) $periodMaxCycles - 1;\r\n $this->_recurringProfile->setPeriodMaxCycles($periodMaxCycles);\r\n $this->_recurringProfile->save();\r\n }\r\n }\r\n }", "public function getMaxcount()\n {\n return $this->maxCount;\n }", "public function getCountMax(): int\n {\n return $this->countMax;\n }" ]
[ "0.64599305", "0.6252814", "0.5860589", "0.5843933", "0.5834099", "0.58009493", "0.5767756", "0.5679431", "0.5679431", "0.5649597", "0.5589756", "0.55835575", "0.55743355", "0.55072856", "0.5498549", "0.54798365", "0.5461858", "0.54602593", "0.545082", "0.53927004", "0.53927004", "0.53927004", "0.53927004", "0.53927004", "0.5343909", "0.5329539", "0.53127825", "0.5278167", "0.5270031", "0.5264999", "0.5262836", "0.5259729", "0.52583283", "0.5240936", "0.5240936", "0.522699", "0.52269447", "0.5218121", "0.5179923", "0.517713", "0.515798", "0.5154748", "0.51530164", "0.51461524", "0.51441103", "0.5143912", "0.5132711", "0.51147383", "0.5107502", "0.5106686", "0.51021725", "0.50994384", "0.5094511", "0.50881356", "0.50880295", "0.50764644", "0.50581", "0.50490403", "0.5046997", "0.5040801", "0.5040801", "0.5039968", "0.5039742", "0.50346875", "0.50175804", "0.50175804", "0.5010168", "0.50062996", "0.50002927", "0.4985452", "0.49820822", "0.49820092", "0.4981235", "0.4978929", "0.4978929", "0.4976638", "0.49737945", "0.4970647", "0.49680915", "0.4952849", "0.49492148", "0.49477223", "0.49456725", "0.4934745", "0.49329063", "0.49293253", "0.4926691", "0.49198967", "0.491646", "0.4914458", "0.49060422", "0.4905956", "0.49059528", "0.4901614", "0.48998547", "0.48939505", "0.48931345", "0.48921734", "0.48852238", "0.48726854" ]
0.69595766
0
Function to Get Wedding Reservations for a day
function maxWeddingReservation($conn, $day, $month) { $event = 'Wedding'; $date = date("Y") . "-" . $month . "-" . $day; $select_wed = "SELECT * FROM reservation WHERE reserv_date = '$date' AND event_type = '$event' AND confirmation = 'Confirmed'"; $select_wed_query = $conn->query($select_wed); if($select_wed_query -> num_rows >= 2) { $select_rem_time = "SELECT * FROM reservation WHERE reserv_date = '$date' AND reserv_time = '5'"; $srt_query = $conn->query($select_rem_time); if($srt_query -> num_rows > 0) { return true; } else { return false; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function schedulingsDay(Request $request)\n {\n $date = $request->input('date_scheduling');\n $schedulings = Scheduling::where('date_scheduling', $date)->get();\n foreach ($schedulings as $value) {\n $value->room->local;\n }\n\n return SchedulingResource::collection($schedulings);\n }", "function retrieve_trailing_weekly_guest_list_reservation_requests(){\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->retrieve_trailing_weekly_guest_list_reservation_requests($this->promoter->up_id);\n\t}", "public function reservationsArray(){\n\t\t$reponse = new Reponse();\n\t\t$date=new Zend_Date();\n\t\t$dateres=$date->get('dd-MM-YYYY');\n\t\t$datestart=new Zend_Date( $dateres.' 00:00:00', 'dd-MM-YYYY HH:mm:ss');\n\t\t$dateend=new Zend_Date( $dateres.' 23:59:59', 'dd-MM-YYYY HH:mm:ss');\n\t\t$start=$datestart->getTimestamp();\n\t\t$end=$dateend->getTimestamp();\n\n\t\t$mylocation = $this->selectedLocation;\n\t\tif( $mylocation instanceof Object_Location ){\n\t\t\t$this->view->reservations= $mylocation->getResource()->getReservationsByDate($start,$end);\n\t\t}\n\t}", "public function weekSchedule(Request $request)\n\t{\n\t\t$doctor = $request->user()->doctor;\n\n\t\t$endDate = new Carbon($request->end_date);\n $startDate = new Carbon($request->start_date);\n $values = Schedule::with(['leave'])\n\t \t->whereDate('date', '>=', $startDate->toDateString())\n\t ->whereDate('date', '<=', $endDate->toDateString())\n\t ->where('doctor_id', $doctor->id)\n\t ->get();\n\n\t\treturn $values;\n\t}", "public function getDayBookingData($date){\n\t\t$reservations = $this->db->select('reservation_detail.control_id, reservation_detail.cat_room_id')\n\t\t\t->from('reservation_detail')\n\t\t\t->join('reservation', 'reservation.id_reserve = reservation_detail.reservation_id')\n\t\t\t->where(\"reservation_detail.date_reservation ='$date' AND (reservation.status_reserve =1 OR reservation.status_reserve =3)\")\n\t\t\t->get();\n\t\t$allotments = $this->getAllotments();\n\t\t\n\t\tif($reservations->num_rows() > 0){\n\t\t\t$acum = 0;\n\t\t\tforeach ($reservations->result() as $row){\n\t\t\t\tforeach ($row as $key => $value) {\n\t\t\t\t\t$res[$acum][$key] = $value;\n\t\t\t\t}\n\t\t\t\t$acum++;\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "public function reservations() {\n return $this->hasMany('App\\Reservation')->getResults();\n }", "public function index()\n {\n $reservations = Reservation::all();\n return view('calendarreservation', compact('reservations'));\n }", "public function reservations()\n {\n\n return $this->hasMany('App\\Models\\reservation');\n }", "public function getEventsByDay( $day ) {\n\n\t\t$rangestart = strtotime($day) * 1000; // zimbra always works with milliseconds in timestamps\n\t\t$rangeend = $rangestart + (24 * 60 * 60 * 1000);\n\n\t\t/**\n\t\t* build full call url\n\t\t*/\n\t\t$calendar = $this->getFromZimbra(\"/calendar?start=\" . $rangestart . \"&end=\" . $rangeend);\n\n\t\t$events = array();\n\t\tif( !property_exists($calendar, \"appt\") ) return $events;\n\n\t\tforeach ($calendar->appt as $meetingSeries) {\n\n\t\t\t/**\n\t\t\t* collect values for the current appointment\n\t\t\t*/\n\t\t\t$finalstartdate = null;\n\t\t\t$finalenddate = null;\n\t\t\t$finalname = null;\n\t\t\t$finallocation = null;\n\n\t\t\t/**\n\t\t\t* iterate over all sub events in order to find the right one\n\t\t\t* single events just have one item = easy, we just take this one\n\t\t\t* series of events contain the original item plus all execptions, more difficult to handle\n\t\t\t*/\n\t\t\tforeach ($meetingSeries->inv as $meeting) {\n\n\t\t\t\t$startdate = isset($meeting->comp[0]->s[0]->u) ? $meeting->comp[0]->s[0]->u : \"\";\n\t\t\t\t$enddate = isset($meeting->comp[0]->e[0]->u) ? $meeting->comp[0]->e[0]->u: \"\";\n\t\t\t\t$name = $meeting->comp[0]->name;\n\t\t\t\t$location = $meeting->comp[0]->loc;\n\n\t\t\t\t/**\n\t\t\t\t* we take the original, if nothing is set yet\n\t\t\t\t* the original events hold the time from the original day only, so we need to recalculate\n\t\t\t\t* since we are only getting the data from one day, we can kill the day information on extract the hours only\n\t\t\t\t*/\n\t\t\t\tif( $finalstartdate == null && !property_exists($meeting->comp[0], \"recurId\")) {\n\t\t\t\t\t$finalstartdate = date(\"Y-m-d\", $rangestart/1000) . \" \" . date(\"H:i\", $startdate / 1000);\n\t\t\t\t\t$finalenddate = date(\"Y-m-d\", $rangestart/1000) . \" \" . date(\"H:i\", $enddate / 1000);\n\t\t\t\t\t$finalname = $name;\n\t\t\t\t\t$finallocation = $location;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t* overwrite if got an exception of the series taking place on the current day\n\t\t\t\t*/\n\t\t\t\tif( property_exists($meeting, \"recurId\") &&\n\t\t\t\t\t($startdate <= $rangeend && $enddate >= $rangestart)) {\n\t\t\t\t\t$finalstartdate = date(\"Y-m-d H:i\", $startdate / 1000);\n\t\t\t\t\t$finalenddate = date(\"Y-m-d H:i\", $enddate / 1000);\n\t\t\t\t\t$finalname = $name;\n\t\t\t\t\t$finallocation = $location; \n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$events[]= array(\n\t\t\t\t\"name\" => $finalname,\n\t\t\t\t\"location\" => $finallocation,\n\t\t\t\t\"startdate\" => $finalstartdate, // timestamp has milli seconds as well\n\t\t\t\t\"enddate\" => $finalenddate\n\t\t\t);\n\t\t}\n\n\t\tusort($events, array(\"self\", \"cmp\"));\n\t\treturn $events;\n\t}", "public function reservations()\n {\n return $this->hasMany(Reservation::class);\n }", "public function getStationsWithSchedules();", "public function getReserv()\r\n {\r\n $query = \"SELECT * FROM list_reservation\";\r\n $stmt = $this->connexion()->prepare($query);\r\n $stmt->execute();\r\n\r\n while ($result = $stmt->fetchAll()) {\r\n return $result;\r\n }\r\n }", "function get_reservation_byId($id) {\n global $DB;\n\n return $DB->get_record('roomscheduler_reservations', array('id' => $id));\n}", "public function reservations() {\n $this->template->content = View::instance(\"v_reservations_reservations\");\n $this->template->title = \"Reservations\";\n\n # Build the query to get all the users\n // $q = \"SELECT * FROM reservations\";\n\n\t $q = \"SELECT *\n FROM reservations\n WHERE user_id = \".$this->user->user_id.\" order by reservation_id desc\";\n\n # Execute the query to get all the users.\n # Store the result array in the variable $users\n $reservations = DB::instance(DB_NAME)->select_rows($q);\n\n # Build the query to figure out what reservations does this user already have?\n # I.e. who are they following\n $q = \"SELECT *\n FROM reservations\n WHERE user_id = \".$this->user->user_id;\n\n\n\n # Pass data (reservations) to the view\n $this->template->content->reservations = $reservations;\n\n\n # Render the view\n echo $this->template;\n }", "public function index()\n {\n $reservation = Reservation::all();\n return $reservation;\n }", "public function index()\n {\n return Reservation::all();\n }", "public function reservationsList(Request $request)\n {\n $id = $request->get('id');\n $search = $request->get('search');\n\n $placeReservations = $this->repository->scopeQuery(function ($query) use ($id) {\n return $query->where(['place_id' => $id, 'is_pre_reservation' => false])->orderBy('date', 'ASC');\n })->with('client')->whereHas('client', function($q) use ($search){\n $q->where('name', 'LIKE', '%'.$search.'%');\n $q->orWhere('last_name', 'LIKE', '%'.$search.'%');\n })->paginate(10);\n\n if (request()->wantsJson()) {\n\n return response()->json($placeReservations);\n }\n }", "function get_avaliable_rooms($fromTime, $toTime){\n global $DB, $USER, $CFG;\n\n //reservation starts: Start = S, End = E\n //Location: Above Given Start Time : A, Between given start/end: M, After End Time: E\n\n //Cases:\n //SA EA, --(start above, end above) non useful\n //SA EM, --(start above, end mid)\n //SA EE, -- (Start above, end after)\n //SM EA -- (start mid, end above) -- no useful\n //SM EM -- start mid, end mid\n //SM EE -- start mid, end after\n //SE EA -- non useful\n //SE EM -- non useful\n //SE EE -- non useful\n\n\n $sql = \"SELECT DISTINCT * FROM {roomscheduler_rooms} room \".\n\"WHERE room.active = 1 AND room.id not in ( \". //check which rooms are not avaliable\n\"SELECT DISTINCT rom.id FROM {roomscheduler_reservations} res, {roomscheduler_rooms} rom \".\n\"WHERE rom.id = res.location AND res.active=1 AND ( \".\n\"(res.startdate <= $fromTime AND res.enddate <= $toTime and res.enddate > $fromTime ) OR \". //--(start above, end mid)\n\"(res.startdate <= $fromTime AND res.enddate > $toTime ) OR \". //-- (Start above, end after)\n\"(res.startdate >= $fromTime AND res.startdate < $toTime and res.enddate > $fromTime AND res.enddate <= $toTime ) OR \". //-- start mid, end mid\n\"(res.startdate >= $fromTime AND res.startdate < $toTime AND res.enddate > $toTime )) \".//-- start mid, end after\n\");\";\n\n$rooms = $DB->get_records_sql($sql, array(), $limitfrom=0, $limitnum=0);\n\n\nprint '<center><table id=\"open_rooms_table\">';\nprint '<tr><th>'.get_string('room','block_roomscheduler');\nprint '</th><th>'.get_string('resources','block_roomscheduler');\nprint '</th><th>'.get_string('bookroom','block_roomscheduler').'</th></tr>';\nif($rooms){\n$index = 1;\nforeach($rooms as $room){\n\nprint '<tr onclick=\"\"><td>';\n\nprint \"$index. \".$room->name;\n\nprint '</td><td>';\nprint $room->resources;\nprint '</td><td>';\n\nprint '<form><center>';\nif($room->reservable){\nprint '<input type=\"image\" src=\"img/success.gif\" value=\"Book Room\" onclick=\"book_room('.$room->id.');return false;\" />';\n} else {\n$email = $CFG->roomscheduler_manage_email;\n$subject = get_string('book_room_email_subject','block_roomscheduler');\n\n$information = get_string('email_room','block_roomscheduler').\" \".$room->name . \"%0A\";\n$information .= get_string('email_start','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $fromTime ). \"%0A\";\n$information .= get_string('email_end','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $toTime ). \"%0A\";\n$information .= get_string('email_reason','block_roomscheduler').\" _______________________________%0A%0A\";\n\n$body = get_string('book_room_email_body','block_roomscheduler') . $information;\n$body .= get_string('book_room_email_close','block_roomscheduler') . $USER->firstname .\" \".$USER->lastname ;\n\n\nprint '<a href=\"mailto:'.$email.'?subject='.$subject.'&body='.$body.'\" border=\"0\">\n <img src=\"img/email.png\"></a>';\n\n}\nprint '</form></center>';\nprint '</td></tr>';\n\n\n\n\n $index++;\n}\n}\nprint '</table></center>';\n\n}", "function php_show_reservation_list($date) {\r\n\r\n $returnStatus['status'] = 'undefined';\r\n\r\n $uid = php_get_uid();\r\n\r\n //check the date format is valid\r\n if (!php_check_convert_resv_date($date, $d, $m, $y)) {\r\n $returnResult['status'] = 'Date format incorrect';\r\n return $returnResult;\r\n }\r\n\r\n php_database_connect();\r\n\r\n //Lookup restaurant ID to get the query string from the table\r\n $safe_uid = GetSQLValueString($uid, 'int');\r\n $safe_timeslot = GetSQLValueString($y . '-' . $m . '-' . $d, 'date');\r\n\r\n $query = sprintf(\"SELECT id, cust_id, TIME(timeslot) AS time_timeslot, person, special_request, HEX(response) AS hex_response FROM resv WHERE rest_id = %s AND DATE(timeslot) = %s\", $safe_uid, $safe_timeslot);\r\n $rs = php_database_query($query);\r\n\r\n $responseXML = \"\";\r\n while ($resvInfo = mysql_fetch_array($rs)) {\r\n $safe_custId = GetSQLValueString($resvInfo['cust_id']);\r\n $query = sprintf(\"SELECT fullname FROM customer WHERE id = %s\", $safe_custId);\r\n $cust_rs = php_database_query($query);\r\n\r\n $custInfo = mysql_fetch_array($cust_rs);\r\n $xmlElement['time'] = $resvInfo['time_timeslot'];\r\n $xmlElement['person'] = $resvInfo['person'];\r\n $xmlElement['customer_name'] = $custInfo['fullname'];\r\n $xmlElement['msg'] = $resvInfo['special_request'];\r\n $xmlElement['resv_id'] = $resvInfo['id'];\r\n $xmlElement['response'] = \"undefined\";\r\n\r\n switch (intval($resvInfo['hex_response'])) {\r\n case 0: //pending\r\n $xmlElement['response'] = 'pending';\r\n break;\r\n case 1: //decline\r\n $xmlElement['response'] = 'decline';\r\n break;\r\n case 2: //accept\r\n $xmlElement['response'] = 'accept';\r\n break;\r\n default:\r\n $xmlElement['response'] = 'undefined';\r\n }\r\n \r\n ## <resv>\r\n ## <time>1:00pm</time>\r\n ## <person>4</person>\r\n ## <customer_name>Tom Chan</customer_name>\r\n ## <msg></msg>\r\n ## <resv_id>1234-001</resv_id>\r\n ## <response>accept</response>\r\n ## </resv>\r\n \r\n $responseXMLItem = sprintf(\"<resv><time>%s</time><person>%s</person><customer_name>%s</customer_name><msg>%s</msg><resv_id>%s</resv_id><response>%s</response></resv>\", $xmlElement['time'], $xmlElement['person'], $xmlElement['customer_name'], $xmlElement['msg'], $xmlElement['resv_id'], $xmlElement['response']);\r\n $responseXML = $responseXML . $responseXMLItem;\r\n }\r\n\r\n //Re-factoring the query string\r\n echo $responseXML = '<resv_list>' . $responseXML . '</resv_list>';\r\n\r\n $returnStatus['status'] = 'success';\r\n return $returnStatus;\r\n}", "private function prepareGoogleCalendarEventPayload($reservations)\n {\n $payload = [];\n\n foreach ($reservations as $reservation) {\n $payload[$reservation['id']]['summary'] = $this->prepareEventSummary($reservation);\n $payload[$reservation['id']]['start']['dateTime'] = $reservation['date_from'];\n $payload[$reservation['id']]['end']['dateTime'] = $reservation['date_to'];\n $payload[$reservation['id']]['description'] = $reservation['notes'];\n $payload[$reservation['id']]['attendees'] = $this->getEventAttendees($reservation['clients']->toArray());\n }\n\n return array_values($payload);\n }", "public function run()\n {\n\t\t$reservations = [[\n\t\t\t'valid_from' => Carbon::parse('2019-01-01'),\n\t\t\t'valid_until' => Carbon::parse('2019-03-08'),\n\t\t\t'user_id' => 2,\n\t\t\t'room_id' => 1,\n\t\t],\n\t\t[\n\t\t\t'valid_from' => Carbon::parse('2019-01-04'),\n\t\t\t'valid_until' => Carbon::parse('2019-12-12'),\n\t\t\t'user_id' => 3,\n\t\t\t'room_id' => 2,\n\t\t],\n [\n 'valid_from' => Carbon::parse('2020-01-04'),\n 'valid_until' => Carbon::parse('2021-12-12'),\n 'user_id' => 4,\n 'room_id' => 2,\n ]\n ];\n\t\tforeach ($reservations as $r){\n\t\t Reservation::create($r);\n }\n }", "public function index()\n {\n //\n $reservations = Reservation::get()->all();\n return view('reservationdates', compact('reservations'));\n }", "static public function getAllReservations() {\n\t\ttry {\n\t\t\t$rep = Model::$pdo->query('SELECT * FROM reservation WHERE idFestival =' . $_SESSION[\"idFestival\"]);\n\t\t\t$rep->setFetchMode(PDO::FETCH_CLASS, 'ModelReservation');\n\t\t\t$tab_prod = $rep->fetchAll();\n\t\t\treturn $tab_prod;\n\t\t} catch (PDOException $e) {\n\t\t\techo('Error tout casse ( /!\\ method getAllReservations() /!\\ )');\n\t\t}\n\t}", "public function walk_in_reservation(Request $request, GuestDetail $guest_detail)\n {\n $guest_detail = new GuestDetail;\n $guest_detail->last_name = $request['last_name'];\n $guest_detail->first_name = $request['first_name'];\n $guest_detail->mi = $request['mi'];\n $guest_detail->email_address = $request['email_address'];\n $guest_detail->address = $request['address'];\n $guest_detail->contact_number = $request['contact_number'];\n $guest_detail->purpose = $request['purpose'];\n $guest_detail->gender = $request['gender'];\n $guest_detail->nationality = $request['nationality'];\n $guest_detail->check_in_date = date('Y-m-d', strtotime($request['check_in']));\n $guest_detail->check_out_date = date('Y-m-d', strtotime($request['check_out']));\n $guest_detail->save();\n\n $guest_id = DB::table('guest_details')->orderBy('id',\"DESC\")->take(1)->value('id');\n\n $date_start = date('Y-m-d', strtotime($request['check_in']));\n $date_end = date('Y-m-d', strtotime($request['check_out']));\n $interval = Carbon::parse($date_end)->diffInDays($date_start);\n\n $bookings = new Booking;\n $bookings->guest_id = $guest_id;\n $bookings->number_of_rooms = $request['number_of_rooms'];\n $bookings->grand_total = $interval;\n $bookings->payment_mode = 'Unpaid';\n $bookings->paid_status = 0;\n $bookings->viewed_status = 0;\n $bookings->save();\n\n for($i=0; $i < $request['number_of_rooms']; $i++)\n { \n $booking_id = DB::table('bookings')->orderBy('id',\"DESC\")->take(1)->value('id');\n\n $booking_details = new BookingDetail;\n \n $booking_details->booking_id = $booking_id;\n $booking_details->room_cat_id = $request['room_cat_id'];\n $booking_details->room_no = $request['room_no'];\n $booking_details->room_rate = $request['room_rate'];\n $booking_details->status = 'occupied';\n $booking_details->check_in = date('Y-m-d', strtotime($request['check_in']));\n $booking_details->check_out = date('Y-m-d', strtotime($request['check_out']));\n $booking_details->nights = $interval;\n $booking_details->total = ($request['room_rate']) * $interval;\n // $booking_details->total = ($request['room_rate'] * $request['number_of_rooms']) * $interval;\n $booking_details->save();\n\n $grand_total = BookingDetail::where('booking_id', $booking_id)->sum('total');\n $bookings = Booking::findOrFail($booking_id);\n $bookings->grand_total = $grand_total;\n $bookings->save();\n\n $accept_booking = new ConfirmedBooking;\n\n $accept_booking->booking_id = $booking_id;\n $accept_booking->room_cat_id = $request['room_cat_id'];\n $accept_booking->room_no = $request['room_no'];\n $accept_booking->room_rate = $request['room_rate'];\n $accept_booking->status = 'occupied';\n $accept_booking->check_in = date('Y-m-d', strtotime($request['check_in']));\n $accept_booking->check_out = date('Y-m-d', strtotime($request['check_out']));\n $accept_booking->nights = $interval;\n $accept_booking->total = ($request['room_rate']) * $interval;\n $accept_booking->save();\n\n }\n\n return ['bookings' => $bookings];\n }", "public function reservation()\n\t{\n\n\t}", "public function testNoReservationsAvailable()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t//We should be able to reserver two rooms max, as this is the quantity of the room type\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertTrue($reservation->save());\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertTrue($reservation->save());\n\t\t\n\n\t\t/**\n\t\t * Test the date overlapping works correctly\n\t\t * Date From |------| Date To\n\t\t * *************************************************************************************\n\t\t * Original Reservation |---------------|\n\t\t * Case 1 |---------------|\n\t\t * Case 2 |--------------------------|\n\t\t * Case 3 |------|\n\t\t * Case 4 |-------------|\n\t\t * Case 5 |------------------|\n\t\t * *************************************************************************************\n\t\t */\n\t\t$this->noReservationsAvailableCase1($reservation);\n\t\t$this->noReservationsAvailableCase2($reservation);\n\t\t$this->noReservationsAvailableCase3($reservation);\n\t\t$this->noReservationsAvailableCase4($reservation);\n\t\t$this->noReservationsAvailableCase5($reservation);\n\n\t}", "public function indexAction()\n\t{\n\t\t$order_id = session_id();\n\t\t\n\t\t$this->view->headTitle('Reservation');\n\t\t$objReser = new Models_Reservation();\n\t\t\n\t\t$resId = $this->_getParam('rid', false);\n\t\tif (false === $resId) {\n\t\t $this->_redirect('');\n\t\t}\n\t\t\n /**\n * Get restaurant\n */\n $objRes = new Models_Restaurant();\n $res = $objRes->find($resId)->toArray();\n $res = current($res);\n if (false == $res || '0' == $res['reser_onoff']) {\n $this->_redirect('');\n }\n /**\n * Check active restaurant\n */\n $this->_checkReservationOfRestaurant($res);\n// echo '<pre>';print_r($res);die;\n /**\n * All time in a day\n */\n $defaultTimeZone = date_default_timezone_get();\n date_default_timezone_set('UTC');\n $allTimes = array();\n for ($i = 0; $i < 48; $i++) {\n $time = 1800 * $i;\n $allTimes[] = array(\n 'time' => $time,\n 'text' => date('g:i A', $time)\n );\n }\n date_default_timezone_set($defaultTimeZone);\n// echo date('g:i A', 0);die;\n// echo '<pre>';print_r($allTimes);die;\n \n /**\n * Get search condition\n */\n $search = $this->_getParam('search', array(\n 'date' => date('m/d/Y'),\n 'time' => (date('G') * 3600 + (ceil(date('i')/30)) * 1800),\n 'quantity' => 2\n ));\n $search['quantity'] = intval($search['quantity']);\n \n \n $pointerDate = explode('/', $search['date']);\n $pointerDate = mktime(0, 0, 0, $pointerDate[0], $pointerDate[1], $pointerDate[2]) + $search['time'];\n $search['unixTime'] = $pointerDate;\n \n $this->session->reserSearch = $search;\n// echo '<pre>';print_r($search);die;\n\n /**\n * Get next 7 day often\n */\n $searchDateArr = array();\n $count = 0;\n $pointerDate = $search['unixTime'];\n $dateArr = array('date_mon', 'date_tue', 'date_wed', 'date_thu', 'date_fri', 'date_sat', 'date_sun');\n\n while (true) {\n $field = 'date_' . strtolower(date('D', $pointerDate));\n if ('1' == $res[$field]) {\n $searchDateArr[] = array(\n 'time' => $pointerDate,\n 'field' => $field,\n 'date' => date('D, m/d/Y g:i A', $pointerDate)\n );\n $count++;\n }\n if( 8 <= $count) {\n break;\n }\n $pointerDate += 3600 * 24;\n }\n /**\n * Get available hour for each date\n */\n foreach ($searchDateArr as &$date) {\n $date['startTime'] = $date['time'] - 1800 * 3;\n $date['endTime'] = $date['time'] + 1800 * 3;\n $maxTotal = $res['reser_quantity'] - $search['quantity'];\n \n $date['exitResers'] = $objReser->searchExistRerservation($date['startTime'], $date['endTime'], $maxTotal);\n $date['available'] = array();\n \n for ($i = $date['startTime']; $i <= $date['endTime']; $i = $i + 1800) {\n $flag = true;\n foreach ($date['exitResers'] as $exist) {\n if ($i == $exist['time']) {\n $flag = false;\n break;\n }\n }\n \n $date['available'][$i] = $flag;\n }\n }\n unset($date);\n \n// echo '<pre>';print_r($searchDateArr);die;\n// $searchDateArr[1]['available']['1301472000'] = false;\n// $searchDateArr[1]['available']['1301477400'] = false;\n// $searchDateArr[1]['available']['1301482800'] = false;\n /**\n * Data for view\n */\n $this->view->res = $res;\n $this->view->arr_restaurant = $res;\n $this->view->resId = $resId;\n $this->view->allTimes = $allTimes;\n $this->view->search = $search;\n $this->view->searchDateArr = $searchDateArr;\n $this->view->currentTime = time();\n $this->view->address_restaurant = $res['street'].\" \".$res['city'].\" \".$res['state'];\n\t}", "public function getBookingsByDate(Request $request)\n {\n $booking_obj = new Booking();\n return $booking_obj->getFutureBookingsByServiceAndDate($request->sv_id, $request->start, $request->end);\n }", "public function reservations()\n {\n return $this->hasMany('App\\Reservation', 'restaurant_id');\n }", "public function getReservations(): string\n {\n $html = '\n <table>\n <thead>\n <tr>\n <th>ID</th>\n <th>Nom</th>\n <th>Annonce</th>\n <th>Date de réservations</th>\n </tr>\n </thead>\n <tbody>';\n\n // Get all Reservations :\n $reservationsService = new ReservationsService();\n $reservations = $reservationsService->getReservations();\n\n // Get html :\n foreach ($reservations as $reservation) {\n $usersHtml = '';\n if (!empty($reservation->getUser())) {\n $usersHtml .= 'Réservé par ';\n foreach ($reservation->getUser() as $user) {\n $usersHtml .= $user->getFirstname() . ' ' . $user->getLastname() . ' ';\n }\n }\n $annoncesHtml = '';\n if (!empty($reservation->getAnnonce())) {\n foreach ($reservation->getAnnonce() as $annonce) {\n $annoncesHtml .= $annonce->getLieuDepart() . ' ==> ' . $annonce->getLieuArrivee() . ' '. $annonce->getDateDepart()->format('H:i d-m-Y'). ' ';\n }\n }\n $html .=\n '<tr>\n <td> #'.$reservation->getId() . ' </td>' .\n '<td> '.$usersHtml . ' </td>' .\n '<td> '.$annoncesHtml . ' </td>' .\n '<td> '.$reservation->getDateReservation()->format('H:i d-m-Y') . '</td>\n </tr>';\n }\n $html .='</tbody>\n </table>';\n\n return $html;\n }", "function recurrence($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_type, $parameters) {\n global $DB,$CFG;\n\n //Take parameters and convert to array\n $parameters = urldecode($parameters);\n $params = explode(';', $parameters);\n //print_r($params);\n //echo 'TYPE: ' . $recurrence_type;\n\n if($recurrence_type == 'none'){\n $recurrence_id = 0;\n }\n else{\n $recurrences = $DB->get_records_select('roomscheduler_reservations', 'location=\\''.$room.'\\' GROUP BY {roomscheduler_reservations}.recurrence_id',array(),\"\",'{roomscheduler_reservations}.recurrence_id');\n $recurrence_id = sizeof($recurrences);\n }\n\n //No recursion\n if ($recurrence_type == 'none') {\n return new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n\n //Daily: Every x days\n else if ($recurrence_type == 'everyxdays') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $xdays = $params[2];\n if ($xdays <= 0 || $endtype_param<0) {}\n \n\n //Condition 1: End by \n else if ($endtype == 'endby') {\n\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += $xdays * (24 * 60 * 60);\n $toTime += $xdays * (24 * 60 * 60);\n }\n }\n //Condition 2: End after\n else if ($endtype == 'endafter') {\n for ($occurences = 1; $occurences <= $endtype_param; $occurences++) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += $xdays * (24 * 60 * 60);\n $toTime += $xdays * (24 * 60 * 60);\n }\n }\n }\n //Daily: Every week day\n else if ($recurrence_type == 'everyweekday') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n\n //Condition 1: End by\n if ($endtype == 'endby') {\n\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n if ($dayofweek == 6 || $dayofweek == 7) {\n \n } else {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n }\n //Condition 2: End after\n else if ($endtype == 'endafter') {\n\n $occurences = 0;\n while ($occurences < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n if ($dayofweek == 6 || $dayofweek == 7) {\n \n } else {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $occurences++;\n }\n\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n }\n }\n\n\n //Weekly: Every x weeks\n else if ($recurrence_type == 'everyxweeks') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $xweeks = $params[2];\n $dayofweek = explode('?', $params[3]);\n\n if ($xweeks <= 0 || $xweeks > 48 || $endtype_param <0) {\n \n }\n\n //Condition 1: End by\n else if ($endtype == 'endby') {\n $counter = 0;\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n if ($counter == 0) {\n for ($day = 1; $day <= 7; $day++) {\n\n $dayofweek_temp = strftime_dayofweek_compatible($fromTime);\n if (in_array($dayofweek_temp, $dayofweek)) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n $counter++;\n } else if ($counter == $xweeks) {\n $counter = 0;\n } else if ($counter != 0) {\n\n for ($day = 1; $day <= 7; $day++) {\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n $counter++;\n }\n }\n }\n\n\n //Condition 2: End after\n else if ($endtype == 'endafter') {\n $occurences = 0;\n $counter = 0;\n while ($occurences < $endtype_param) {\n if ($counter == 0) {\n for ($day = 1; $day <= 7; $day++) {\n\n $dayofweek_temp = strftime_dayofweek_compatible($fromTime);\n if (in_array($dayofweek_temp, $dayofweek)) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n $counter++;\n $occurences++;\n } else if ($counter == $xweeks) {\n $counter = 0;\n } else if ($counter != 0) {\n\n for ($day = 1; $day <= 7; $day++) {\n $fromTime += 1 * (24 * 60 * 60);\n $toTime += 1 * (24 * 60 * 60);\n }\n $counter++;\n }\n }\n }\n }\n\n //Monthly: Day x of every x month(s)\n else if ($recurrence_type == 'everyxmonthxday') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $xmonths_param = $params[3];\n $dayofmonth_param = $params[2];\n if ($dayofmonth_param <= 0 || $dayofmonth_param > 31 || $xmonths_param <= 0 || $endtype_param < 0) {\n \n }\n\n //Condition 1: End by\n if ($endtype == 'endby') {\n $counter = 0;\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n\n while ($firstmatch == 0) {\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == $dayofmonth_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $firstmatch = 1;\n }\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n }\n\n if ($dayofmonth == $dayofmonth_param && $counter == 0) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n } else {\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n }\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter++;\n }\n if ($dayofmonth_param == 29) {\n if ($dayofmonth == 28) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n if ($dayofmonth_param == 30) {\n if ($dayofmonth == 29) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n if ($dayofmonth_param == 31) {\n if ($dayofmonth == 30) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n\n\n if ($counter == $xmonths_param) {\n $counter = 0;\n $occurences++;\n }\n }\n }\n //Condition 2: End after\n else if ($endtype == 'endafter') {\n $counter = 0;\n $occurences = 0;\n $firstmatch = 0;\n\n while ($occurences < $endtype_param) {\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n\n while ($firstmatch == 0) {\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == $dayofmonth_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $firstmatch = 1;\n $occurences++;\n }\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n }\n\n if ($dayofmonth == $dayofmonth_param && $counter == 0) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n } else {\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n }\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter++;\n }\n if ($dayofmonth_param == 29) {\n if ($dayofmonth == 28) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n if ($dayofmonth_param == 30) {\n if ($dayofmonth == 29) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n if ($dayofmonth_param == 31) {\n if ($dayofmonth == 30) {\n $fromTime += 24 * 60 * 60;\n $toTime += 24 * 60 * 60;\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n if ($dayofmonth == 01) {\n $counter--;\n }\n $fromTime -= 24 * 60 * 60;\n $toTime -= 24 * 60 * 60;\n }\n }\n\n\n if ($counter == $xmonths_param) {\n $counter = 0;\n $occurences++;\n }\n }\n }\n }\n\n //Monthly: The x(first/second/third/fourth) y(m,t,w,t,f,s,s) of every z(1-12) month(s)\n else if ($recurrence_type == 'thexyofeveryzmonths') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $numberdate_param = $params[2];\n $dayofweek_param = $params[3];\n $xmonths_param = $params[4];\n if ($xmonths_param <= 0 || $endtype_param <0) {\n \n }\n //Condition 1: End by\n if ($endtype == 'endby') {\n $numberdatecounter = 0;\n $xmonthscounter = 0;\n $firstmatch = 0;\n\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n while ($firstmatch == 0) {\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param && $xmonthscounter == 0) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n //$xmonthscounter++;\n $firstmatch = 1;\n }\n }\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n\n if ($dayofmonth == 01) {\n $numberdatecounter = 0;\n }\n }\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param) {\n $xmonthscounter++;\n if ($xmonthscounter == $xmonths_param) {\n $xmonthscounter = 0;\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n }\n }\n }\n\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n\n if ($dayofmonth == 01) {\n $numberdatecounter = 0;\n }\n }\n }\n //Condition 2: End after\n if ($endtype == 'endafter') {\n $numberdatecounter = 0;\n $xmonthscounter = 0;\n $occurences = 0;\n $firstmatch = 0;\n\n while ($occurences < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n while ($firstmatch == 0) {\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param && $xmonthscounter == 0) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n //$xmonthscounter++;\n $occurences++;\n $firstmatch = 1;\n }\n }\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n\n if ($dayofmonth == 01) {\n $numberdatecounter = 0;\n }\n }\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param) {\n $xmonthscounter++;\n if ($xmonthscounter == $xmonths_param) {\n $xmonthscounter = 0;\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $occurences++;\n }\n }\n }\n\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n $dayofmonth = strftime_dayofmonth_compatible($fromTime);\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n\n if ($dayofmonth == 01) {\n $numberdatecounter = 0;\n }\n }\n }\n }\n //Yearly: Every xmonth xday\n else if ($recurrence_type == 'everyxmonthxdayyear') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $xmonth_param = $params[2];\n $xday_param = $params[3];\n if ($xday_param <= 0 || $xday_param > 31 || $endtype_param <0) {\n\n }\n //Condition1: End by\n if ($endtype == 'endby') {\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n $xmonth = strftime('%m', $fromTime);\n $xday = strftime_dayofmonth_compatible($fromTime);\n if ($xmonth == $xmonth_param && $xday == $xday_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += ( 150 * 24 * 60 * 60);\n $toTime += ( 150 * 24 * 60 * 60);\n } else {\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n }\n }\n }\n //Condition2: End After\n else if ($endtype == 'endafter') {\n $occurences = 0;\n while ($occurences < $endtype_param) {\n $xmonth = strftime('%m', $fromTime);\n $xday = strftime_dayofmonth_compatible($fromTime);\n if ($xmonth == $xmonth_param && $xday == $xday_param) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $occurences++;\n $fromTime += ( 150 * 24 * 60 * 60);\n $toTime += ( 150 * 24 * 60 * 60);\n } else {\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n }\n }\n }\n }\n //Yearly: The x(first/second/third/fourth) y(1-7) of (1-12)\n else if ($recurrence_type == 'thexyofz') {\n $endtype = $params[0];\n $endtype_param = $params[1];\n $numberdate_param = $params[2];\n $dayofweek_param = $params[4];\n $xmonth_param = $params[3];\n\n //Condition 1: Endby\n if ($endtype == 'endby') {\n $numberdatecounter = 0;\n while ($fromTime < $endtype_param && $toTime < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n $xmonth = strftime('%m', $fromTime);\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param && $xmonth_param == $xmonth) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $fromTime += (150*24*60*60);\n $toTime += (150*24*60*60);\n\n }\n }\n\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n\n $dayofthemonth = strftime_dayofmonth_compatible($fromTime);\n\n if ($dayofthemonth == 1) {\n $numberdatecounter = 0;\n }\n }\n }\n //Condition 2: End after\n if ($endtype == 'endafter') {\n $occurences = 0;\n $numberdatecounter = 0;\n while ($occurences < $endtype_param) {\n $dayofweek = strftime_dayofweek_compatible($fromTime);\n $xmonth = strftime('%m', $fromTime);\n $xmonthday = strftime('%d', $fromTime);\n $year = strftime('%Y', $fromTime);\n if ($dayofweek == $dayofweek_param) {\n $numberdatecounter++;\n if ($numberdatecounter == $numberdate_param && $xmonth_param == $xmonth) {\n new_reservation($room, $fromTime, $toTime, $subject, $category, $description, $allday, $recurrence_id);\n $occurences++;\n $fromTime += (150*24*60*60);\n $toTime += (150*24*60*60);\n\n }\n }\n\n $fromTime += ( 24 * 60 * 60);\n $toTime += ( 24 * 60 * 60);\n\n $dayofthemonth = strftime_dayofmonth_compatible($fromTime);\n\n if ($dayofthemonth == 1) {\n $numberdatecounter = 0;\n }\n }\n }\n }\n}", "private function getWonOpportunitiesByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, date_closed)) AS day, count(Opportunity_RecID) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Opportunity \";\r\n\t\t$sql .= \"WHERE date_closed >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, date_closed)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, date_closed)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000);\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function noReservationsAvailableCase2($reservation)\n\t{\t\n\t\t$newDateFrom = new DateTime();\n\t\t$newDateFrom = DateTime::createFromFormat('Y-m-d',$this->_dateOverlapFromObj->format('Y-m-d'));\n\t\t\n\t\t$newDateFrom->add(new DateInterval('P1D'));\n\t\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $newDateFrom->format('Y-m-d'),\n\t\t\t\t'numberofnights'=> $this->_numberofnights + 1,\n\t\t\t\t));\n\t\t\t\t\t\n\t\t$this->assertFalse($reservation->save()); \n\t}", "public function noReservationsAvailableCase5($reservation)\n\t{\n\t\t$newDateFrom = new DateTime();\n\t\t$newDateFrom = DateTime::createFromFormat('Y-m-d',$this->_dateOverlapFromObj->format('Y-m-d'));\n\t\t$newDateFrom->add(new DateInterval('P1D'));\n\n\t\t\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $newDateFrom->format('Y-m-d'),\n\t\t\t\t'numberofnights'=> $this->_numberofnights + 1,\n\t\t\t\t));\n\t\t\n\t\t$this->assertFalse($reservation->save()); \n\t}", "public function getDayEvents($date){\n\t\t$object = $this->events_ob;\n\t\t$event = new $object();\n\t\t$events = array();\n\t\t\n\t\t# Get Non-Reoccurring events\n\t\t$query = \"WHERE `start_date` = '\".$date.\"' AND `repeating` = '0' AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Reoccurring events\n\t\t# Get Events that Reoccur on a daily basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'daily' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(DAY, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a weekly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'weekly' AND `repeat_wednesday` = '1' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(WEEK, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a monthly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'monthly' AND ((`repeat_by` = 'day_of_month' AND DAY(`start_date`) = '16') OR (`repeat_by` = 'day_of_week' AND DAYOFWEEK(`start_date`) = '4' AND MOD((TIMESTAMPDIFF(WEEK, '2017-08-01', '\".$date.\"')+1), `repeat_every`) = 0)) AND `repeat_every` <> 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\t# Get Events that Reoccur on a yearly basis\n\t\t$query = \"WHERE `repeating` = '1' AND `start_date` <= '\".$date.\"' AND (`repeat_end` >= '\".$date.\"' OR `repeat_end` = '0000-00-00') AND `repeat_type` = 'yearly' AND DAY(`start_date`) = '16' AND MONTH(`start_date`) = '8' AND `repeat_every` <> 0 AND MOD(TIMESTAMPDIFF(YEAR, `start_date`, '\".$date.\"'), `repeat_every`) = 0 AND `active` = '1'\";\n\t\t$events = array_merge($events, $event->fetchQuery($query));\n\t\t\n\t\treturn $events;\n\t}", "public function getReservations()\n {\n return $this->hasMany(Reservation::className(), ['service_id' => 'id']);\n }", "public function reservations()\n {\n return $this->hasManyThrough(Reservation::class, Operator::class);\n }", "public function getTodayBookingList()\n {\n return DB::table('bookings')\n ->leftJoin('users', 'users.id', '=', 'bookings.user_id')\n ->leftJoin('rooms', 'rooms.id', '=', 'bookings.room_id')\n ->whereBetween('booking_time', [\n date('Y-m-d 00:00:01'),\n date('Y-m-d 23:59:59')\n ])\n ->select(\n 'bookings.booking_time', 'bookings.total_person', 'bookings.noted',\n 'users.id as user_id', 'users.email', 'rooms.room_name'\n )\n ->get()\n ->toArray();\n }", "public function show(Room $room, $id)\n {\n\n $year = date(\"Y\"); // Year 2010\n if ($id <= 9) {\n $week = \"0\" . $id;\n } else {\n $week = $id;\n };\n\n $date1 = date( \"Y-m-d\", strtotime($year.\"W\".$week.\"0\") ); // First day of week\n $date2 = date( \"Y-m-d\", strtotime($year.\"W\".$week.\"5\") ); // Last day of week\n // echo $date1 . \" - \" . $date2;\n\n $room_resavations = DB::table('reservations as r')\n ->join('rooms', 'id', '=', 'r.room_id')\n ->join('users as u', 'u.id', '=', 'r.rekv_id')\n ->select('rooms.id', 'rooms.type', 'r.res_date', 'r.res_module', 'u.id as uid', 'u.name')\n ->where('rooms.id', '=', $room->id)\n ->where('r.res_date', '>', $date1)\n ->where('r.res_date', '<', $date2)\n ->get();\n\n if (!$room_resavations->count()) {\n $room->{\"now_week\"} = $id;\n $room->{\"has_reservations\"} = false;\n $room->{\"week_start_date\"} = $date1;\n\n return view('room.show', compact('room'));\n } else {\n $room = $room_resavations;\n $room[0]->{\"now_week\"} = $id;\n $room[0]->{\"week_start_date\"} = $date1;\n $room[0]->{\"has_reservations\"} = true;\n\n return view('room.show', compact('room'));\n }\n }", "static function getSplitRoomReservationsReport() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT reservation_id, guest_name, checkin_date, checkout_date, data_href, lh_status, \n booking_reference, booking_source, booked_date, eta, viewed_yn, notes, created_date\n FROM wp_lh_rpt_split_rooms\n WHERE job_id IN (SELECT CAST(value AS UNSIGNED) FROM wp_lh_job_param WHERE name = 'allocation_scraper_job_id' AND job_id = (SELECT MAX(job_id) FROM wp_lh_jobs WHERE classname = 'com.macbackpackers.jobs.SplitRoomReservationReportJob' AND status = 'completed'))\n ORDER BY checkin_date\");\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n return $resultset;\n }", "function new_reservation($room, $fromTime, $toTime, $subject, $category, $description='', $allDay=0, $recurrence_id=0, $printresult=0) {\n global $USER, $DB;\n\n /*\n if ($colision = check_availability($room, $fromTime, $toTime)) {\n echo '<b>COLLISION!!! : </b>';\n print_r($colision);\n }\n * \n */\n \n//check if start time == end time\n//this should result in no reservation\n \n$starttime_notEqual_endtime = !($fromTime == $toTime);\n\n if ($starttime_notEqual_endtime && !check_availability($room, $fromTime, $toTime)) {\n $reservation = new stdClass();\n $reservation->subject = $subject;\n $reservation->startdate = $fromTime;\n $reservation->enddate = $toTime;\n $reservation->alldayevent = $allDay;\n $reservation->meetingorganizer = $USER->id;\n $reservation->categories = $category;\n $reservation->description = $description;\n $reservation->location = $room;\n $reservation->active = 1;\n $reservation->confirm = 0;\n $reservation->recurrence_id = $recurrence_id;\n\n \n\n $reservationID = $DB->insert_record('roomscheduler_reservations', $reservation);\n\n if($printresult){//used if want id of reservation returned with ajax\n print $reservationID;\n }\n\n return $reservationID;\n } else {\n return false;\n }\n}", "public function today(Request $request)\n {\n $reservations = Reservation::query()\n ->whereDate('start_date', '<=', Carbon::now()->endOfDay())\n ->paginate();\n\n return $this->success($reservations);\n }", "public static function forApartment($apartment_id) {\n\t\t\t\n\t\t\treturn ReservedDay::where('apartment_id', $apartment_id)->get();\n\t\t}", "public function noReservationsAvailableCase4($reservation)\n\t{\n\t\t$newDateFrom = new DateTime();\n\t\t$newDateFrom = DateTime::createFromFormat('Y-m-d',$this->_dateOverlapFromObj->format('Y-m-d'));\n\t\t$newDateFrom->sub(new DateInterval('P1D'));\n\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $newDateFrom->format('Y-m-d'),\n\t\t\t\t'numberofnights'=> $this->_numberofnights - 1,\n\t\t\t\t));\n\t\t\n\n\t\t\n\t\t$this->assertFalse($reservation->save()); \n\t}", "function getAvailableSlotByCase_managerByDate($date, $case_manager) {\n $weekday = strftime(\"%A\", $date);\n\n $this->db->where('date', $date);\n $this->db->where('case_manager', $case_manager);\n $holiday = $this->db->get('holidays')->result();\n\n if (empty($holiday)) {\n $this->db->where('date', $date);\n $this->db->where('case_manager', $case_manager);\n $query = $this->db->get('patient_care')->result();\n\n\n $this->db->where('case_manager', $case_manager);\n $this->db->where('weekday', $weekday);\n $this->db->order_by('s_time_key', 'asc');\n $query1 = $this->db->get('time_slot')->result();\n\n $availabletimeSlot = array();\n $bookedTimeSlot = array();\n\n foreach ($query1 as $timeslot) {\n $availabletimeSlot[] = $timeslot->s_time . ' To ' . $timeslot->e_time;\n }\n foreach ($query as $bookedTime) {\n if ($bookedTime->status != 'Cancelled') {\n $bookedTimeSlot[] = $bookedTime->time_slot;\n }\n }\n\n $availableSlot = array_diff($availabletimeSlot, $bookedTimeSlot);\n } else {\n $availableSlot = array();\n }\n\n return $availableSlot;\n }", "public function getHotelBookingWindowDays()\n {\n return $this->hotel_booking_window_days;\n }", "public function reservationValidation($reservation, $start, $end)\n {\n $usedTables = DB::table('individual_reservations')->where('table_id', $reservation->table_id)->where('id', '!=', $reservation->id)/*->where('start_date', '>', $date)*/\n ->get();\n\n\n foreach ($usedTables as $res)\n {\n if (($res->start_date >= $start && $res->start_date <= $end) || ($res->end_date >= $start && $res->end_date <= $end))\n {\n return ['start' => $res->start_date, 'end' => $res->end_date];\n }\n }\n\n return null;\n }", "public function selectReservations() {\n $tab=[];\n $pdo=$this->connect_db('boutique');\n $reqlogin = $pdo->prepare(\"SELECT r.id, r.id_utilisateur, r.titrereservation, r.typeevenement, r.datedebut, r.heuredebut FROM reservation AS r INNER JOIN utilisateurs AS u ON r.id_utilisateur = u.id\");\n $reqlogin->execute($tab);\n $result=$reqlogin->fetchAll();\n return $result;\n }", "public function get_todays_available_slots()\n {\n return $this->db\n ->select([\n 'availability.*',\n 'appointments.doctor_id',\n 'appointments.patient_id',\n 'appointments.availability_id',\n 'appointments.status',\n 'users.first_name',\n 'users.last_name'\n ])\n ->join('users', 'users.id = availability.user_id', 'left')\n ->join('appointments', 'appointments.availability_id = availability.id', 'left')\n ->get_where('availability', [\n 'date' => date('Y-m-d'),\n 'availability_id' => NULL\n ]);\n }", "public function actionBookeddays(): array\n {\n $request = Yii::$app->request;\n\n if ($request->isPost) {\n return Appointments::getBookedDays($request->post('service_id'), $request->post('date'));\n }\n \n return [];\n }", "function get_room_current_availability($room_id)\n{\n\t$rooms = load_rooms(null,array('id'=>$room_id));\n\n\tforeach($rooms as $room)\n\t\tbreak;\n\n\t$room->max_gap->start_time = 0;\n\t$room->max_gap->end_time = 0;\n\n\tfor($section=1;$section<=$room->max_simultaneous_reservations;$section++)\n\t{\n\t\t// check for current/upcoming reservations for this room\n\t\t$upcoming_reservations = load_reservations(array('room_id'=>$room_id,'room_section'=>$section,'sched_end_time gte'=>date(\"Y-m-d H:i:s\"),'status'=>array(\"Scheduled\",\"Checked Out\"),'active'=>'1','limit'=>'1'));\n\t\tunset($next_reservation);\n\t\tforeach($upcoming_reservations as $next_reservation)\n\t\t\tbreak;\n\n\t\t// print(\"next res:\\n\");\n\t\t// pr($next_reservation);\n\n\t\t// check to see if any of the keys are checked out for this room\n\t\tforeach($room->keys as $key)\n\t\t{\n\t\t\tif(!strcmp($key->status,'Checked Out'))\n\t\t\t{\n\t\t\t\t// room section is checked out\n\n\t\t\t\t// load reservation\n\t\t\t\t$current_checkout = load_reservations(array('room_id'=>$room_id,'room_section'=>$section,'status'=>'Checked Out','key_barcode'=>$key->key_barcode,'active'=>'1','limit'=>'1'));\n\n\t\t\t\tif(strtotime($current_checkout->sched_end_time) >= strtotime('now'))\n\t\t\t\t{\n\t\t\t\t\t// checkout is not overdue, so it is not available for others\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(strcmp($next_reservation->sched_start_time,'') && strtotime($next_reservation->sched_start_time) < strtotime('now'))\n\t\t{\n\t\t\t// there is a reservation scheduled for now\n\t\t\tcontinue;\n\t\t}\n\n\t\t// room section has some availability right now\n\t\t$current_minute = date('i');\n\t\tif($current_minute < 30)\n\t\t\t$current_minute = \"00\";\n\t\telse\n\t\t\t$current_minute = \"30\";\n\t\t$start_time = date(\"Y-m-d H:\".$current_minute.\":00\");\n\n\t\t// TODO: HACK: change on the fly reservations to start at the next unit of precision, rather than the previous\n\t\t$start_time = date(\"Y-m-d H:i:s\",strtotime(\"+\".RES_PRECISION.\" minutes\",strtotime($start_time)));\n\n\t\tif(strcmp($next_reservation->sched_start_time,''))\n\t\t{\n\t\t\tif(strtotime($start_time) + (DEFAULT_MAX_RES_LEN)*60 > strtotime($next_reservation->sched_start_time))\n\t\t\t{\n\t\t\t\t$end_time = $next_reservation->sched_start_time;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$end_time = date(\"Y-m-d H:i:s\",strtotime(\"+ \".DEFAULT_MAX_RES_LEN.\" minutes\",strtotime($start_time)));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$end_time = date(\"Y-m-d H:i:s\",strtotime(\"+ \".DEFAULT_MAX_RES_LEN.\" minutes\",strtotime($start_time)));\n\t\t}\n\n\t\t// if this is the biggest gap, update max gap\n\t\tif(strtotime($end_time) - strtotime($start_time) > strtotime($room->max_gap->end_time) - strtotime($room->max_gap->start_time))\n\t\t{\n\t\t\t$room->max_gap->room_section = $section;\n\t\t\t$room->max_gap->start_time = $start_time;\n\t\t\t$room->max_gap->end_time = $end_time;\n\t\t}\n\t}\n\n\treturn($room);\n}", "public function bookingListByDate()\n {\n $dateOptipns = [];\n $bookingMgr = new BookingMgr();\n $bookings = $bookingMgr->getBookings();\n foreach ($bookings->toArray() as $booking) {\n $dateOptipns[] = $booking['reserve_date'];\n }\n $dateOptipns = array_unique($dateOptipns);\n $dateOptipns = array_sort($dateOptipns);\n \n return view('booking/date', [\n 'dateOptipns' => $dateOptipns,\n ]);\n }", "public function testcal(Request $request, Person $person, Item $item, Week $week, Day $day)\n {\n $weekdata = $week::where('week_no', 32)->get()->first();\n\n // dd($weekdata->id);\n\n // Get days in week\n $days = $day::where('weeks_id', $weekdata->id)->get();\ndd($days); \n // Get data for each day\n foreach ($days as $day) \n {\n\n $itemarray[] = Item::orderBy('roles_id')->where('days_id', $day->id)->get();;\n }\n }", "public function getDatesFromReservations(Collection $reservations)\n {\n // init\n $interval = $this->getInterval();\n $length = $this->getLength();\n $dateFormat = $this->getDateFormat();\n $timeFormat = $this->getTimeFormat();\n\n // sort reservations by date and count time slots before reservation and during the reservation\n $dates = [];\n foreach ($reservations as $reservation) {\n\n // init dates\n $startDate = $this->getStartDate($reservation, $length, $interval);\n $endDate = $this->getEndDate($reservation, $length);\n $reservationDay = $reservation->date->format($dateFormat);\n\n // save each booked interval\n while ($startDate < $endDate) {\n $time = $startDate->format($timeFormat);\n $dates[$reservationDay][$time] = $time;\n $startDate->modify('+' . $interval . ' minutes');\n }\n }\n\n return $dates;\n }", "public function listMyReservations()\n {\n $clubs = Club::all();\n $reservations = Reservation::all();\n\n return view('client/listmyreservations', ['reservations' => $reservations], ['clubs' => $clubs]);\n }", "function getDates($anzWochentage){\n $montag = $this->app->DB->Select(\"SELECT DATE_SUB(CURDATE(),INTERVAL WEEKDAY(CURDATE()) day)\");\n $week = array();\n for($i=0;$i<$anzWochentage;$i++)\n $week[$i] = $this->app->DB->Select(\"SELECT DATE_ADD('$montag',INTERVAL $i day)\");\n return $week;\n }", "public function run()\n {\n $reservations = [\n [\n 'user_id' => '1',\n 'room_id' => '1',\n 'num_of_guests' => '4',\n 'arrival' => '2020/5/18',\n 'departure' => '2020/5/28'\n ],\n [\n 'user_id' => '1',\n 'room_id' => '2',\n 'num_of_guests' => '1',\n 'arrival' => '2020/5/10',\n 'departure' => '2020/5/12'\n ],\n [\n 'user_id' => '1',\n 'room_id' => '3',\n 'num_of_guests' => '3',\n 'arrival' => '2020/5/6',\n 'departure' => '2020/5/7'\n ],\n [\n 'user_id' => '1',\n 'room_id' => '4',\n 'num_of_guests' => '2',\n 'arrival' => '2020/5/12',\n 'departure' => '2020/5/15'\n ],\n [\n 'user_id' => '1',\n 'room_id' => '2',\n 'num_of_guests' => '2',\n 'arrival' => '2020/5/20',\n 'departure' => '2020/5/24'\n ]\n ];\n\n foreach($reservations as $reservation) {\n Reservation::create(array(\n 'user_id' => $reservation['user_id'],\n 'room_id' => $reservation['room_id'],\n 'num_of_guests' => $reservation['num_of_guests'],\n 'arrival' => $reservation['arrival'],\n 'departure' => $reservation['departure']\n ));\n }\n }", "function map_add_booking ($entry, &$column, $start_first_slot, $start_last_slot)\n{\n // Enters the contents of the booking found in $entry into $column, which is\n // a column of the map of the bookings being prepared ready for display.\n //\n // $column the column of the map that is being prepared (see below)\n // $entry a booking from the database\n // $start_first_slot the start of the first slot of the booking day (Unix timestamp)\n // $start_last_slot the start of the last slot of the booking day (Unix timestamp)\n \n // $entry is expected to have the following keys, when present:\n // room_id\n // start_time\n // end_time\n // name\n // repeat_id\n // id\n // type\n // description\n // create_by\n // status\n \n // $column is a column of the map of the screen that will be displayed\n // It looks like:\n // $column[s][n][id]\n // [is_repeat]\n // [is_multiday_start] a boolean indicating if the booking stretches\n // beyond the day start\n // [is_multiday_end] a boolean indicating if the booking stretches\n // beyond the day end\n // [color]\n // [data]\n // [long_descr]\n // [create_by]\n // [room_id]\n // [start_time]\n // [slots]\n // [status]\n \n // s is the number of nominal seconds (ie ignoring DST changes] since the\n // start of the calendar day which has the start of the booking day\n \n // slots records the duration of the booking in number of time slots.\n // Used to calculate how high to make the block used for clipping\n // overflow descriptions.\n\n // Fill in the map for this meeting. Start at the meeting start time,\n // or the day start time, whichever is later. End one slot before the\n // meeting end time (since the next slot is for meetings which start then),\n // or at the last slot in the day, whichever is earlier.\n // Time is of the format HHMM without leading zeros.\n //\n // [n] exists because it's possible that there may be multiple bookings\n // in the same time slot. Normally this won't be the case. However it\n // can arise legitimately if you increase the resolution, or shift the \n // displayed day. For example if you previously had a resolution of 1800 \n // seconds you might have a booking (A) for 1000-1130 and another (B) for 1130-1230.\n // If you then increase the resolution to 3600 seconds, these two bookings \n // will both occupy the 1100-1200 time slot. [n] starts at 0. For\n // the example above the map for the room would look like this\n //\n // 0 1\n // 1000 A\n // 1100 A B\n // 1200 B\n //\n // Adjust the starting and ending times so that bookings which don't\n // start or end at a recognized time still appear.\n \n global $resolution;\n global $is_private_field;\n \n $user = getUserName();\n if (is_private_event($entry['status'] & STATUS_PRIVATE) &&\n !getWritable($entry['create_by'], $user, $entry['room_id']))\n {\n $entry['status'] |= STATUS_PRIVATE; // Set the private bit\n if ($is_private_field['entry.name'])\n {\n $entry['name'] = \"[\".get_vocab('unavailable').\"]\";\n }\n if ($is_private_field['entry.description'])\n {\n $entry['description'] = \"[\".get_vocab('unavailable').\"]\";\n }\n if (!empty($is_private_field['entry.type']))\n {\n $entry['type'] = 'private_type';\n }\n }\n else\n {\n $entry['status'] &= ~STATUS_PRIVATE; // Clear the private bit\n }\n\n $is_multiday_start = ($entry['start_time'] < $start_first_slot);\n $is_multiday_end = ($entry['end_time'] > ($start_last_slot + $resolution));\n \n $start_t = max(round_t_down($entry['start_time'], $resolution, $start_first_slot), $start_first_slot);\n $end_t = min(round_t_up($entry['end_time'], $resolution, $start_first_slot) - $resolution, $start_last_slot);\n \n // calculate the times used for indexing - we index by nominal seconds since the start\n // of the calendar day which has the start of the booking day\n $start_s = nominal_seconds($start_t);\n $end_s = nominal_seconds($end_t);\n \n for ($s = $start_s; $s <= $end_s; $s += $resolution)\n { \n // find the first free index (in case there are multiple bookings in a timeslot)\n $n = 0;\n while (!empty($column[$s][$n][\"id\"]))\n {\n $n++;\n }\n \n // fill in the id, type and start time\n $column[$s][$n][\"id\"] = $entry['id'];\n $column[$s][$n][\"is_repeat\"] = isset($entry['repeat_id']);\n $column[$s][$n][\"is_multiday_start\"] = $is_multiday_start;\n $column[$s][$n][\"is_multiday_end\"] = $is_multiday_end;\n $column[$s][$n][\"status\"] = $entry['status'];\n $column[$s][$n][\"color\"] = $entry['type'];\n $column[$s][$n][\"start_time\"] = hour_min($start_s);\n $column[$s][$n][\"slots\"] = NULL; // to avoid undefined index NOTICE errors\n // if it's a multiple booking also fill in the name and description\n if ($n > 0)\n {\n $column[$s][$n][\"data\"] = $entry['name'];\n $column[$s][$n][\"long_descr\"] = $entry['description'];\n $column[$s][$n][\"create_by\"] = $entry['create_by'];\n $column[$s][$n][\"room_id\"] = $entry['room_id'];\n }\n // otherwise just leave them blank (we'll fill in the first whole slot later)\n // use NULL rather than '' just in case the value really is ''\n else\n {\n $column[$s][$n][\"data\"] = NULL;\n $column[$s][$n][\"long_descr\"] = NULL;\n $column[$s][$n][\"create_by\"] = NULL;\n $column[$s][$n][\"room_id\"] = NULL;\n }\n } // end for\n \n \n // Show the name of the booker, the description and the number of complete\n // slots in the first complete slot that the booking happens in, or at the \n // start of the day if it started before today.\n\n // Find the number of time slots that the booking occupies, and the index\n // of the first slot that this booking has entirely to itself\n // We need to adjust the start and end times for DST transitions as the display\n // ignores DST\n $n_slots = intval((($end_t - $start_t) - cross_dst($start_t, $end_t))/$resolution) + 1;\n $first_slot = $start_s;\n \n // If the last time slot is already occupied, we have a multiple\n // booking in the last slot, so decrement the number of slots that\n // we will display for this booking\n if (isset($column[$end_s][1][\"id\"]))\n {\n $n_slots--;\n // If we're only the second booking to land on this time slot\n // then we'll have to adjust the information held for the first booking\n // (unless it's just one slot long in the first place, when it \n // doesn't matter as it will now be part of a multiple booking).\n // If we are the third booking or more, then it will have already\n // been adjusted.\n if (!isset($column[$end_s][2][\"id\"]))\n {\n if ($column[$end_s][0][\"slots\"] > 1)\n {\n // Move the name and description into the new first slot and decrement the number of slots\n $column[$end_s + $resolution][0][\"data\"] = $column[$end_s][0][\"data\"];\n $column[$end_s + $resolution][0][\"long_descr\"] = $column[$end_s][0][\"long_descr\"];\n $column[$end_s + $resolution][0][\"create_by\"] = $column[$end_s][0][\"create_by\"];\n $column[$end_s + $resolution][0][\"room_id\"] = $column[$end_s][0][\"room_id\"];\n $column[$end_s + $resolution][0][\"slots\"] = $column[$end_s][0][\"slots\"] - 1;\n }\n }\n }\n \n // and if the first time slot is already occupied, decrement\n // again, adjust the first slot for this booking\n if (isset($column[$start_s][1][\"id\"]))\n {\n $n_slots--;\n $first_slot += $resolution;\n // If we're only the second booking to land on this time slot\n // then we'll have to adjust the information held for the first booking\n if (!isset($column[$start_s][2][\"id\"]))\n {\n // Find the first slot ($s) of the first booking\n $first_booking_id = $column[$start_s][0][\"id\"];\n $r = $start_s;\n // If you've got to the first slot of the day then that must be the\n // first slot of the first booking\n while ($r > $start_first_slot)\n {\n // Otherwise, step back one slot.\n $r -= $resolution;\n // If that slot contains the first booking, then step back again\n if (isset($column[$r]))\n {\n foreach ($column[$r] as $booking)\n {\n if ($booking[\"id\"] == $first_booking_id)\n {\n continue 2; // next iteration of the while loop\n }\n }\n }\n // If not, then we've stepped back one slot past the start of\n // the first booking, so step forward again and finish\n $r += $resolution;\n break;\n } // end while\n \n // Now we've found the time ($r) of the first slot of the first booking\n // we need to find its index ($i)\n foreach ($column[$r] as $i => $booking)\n {\n if ($booking[\"id\"] == $first_booking_id)\n {\n break;\n }\n }\n\n // Finally decrement the slot count for the first booking\n // no need to worry about count going < 1: the multiple booking display\n // does not use the slot count.\n $column[$r][$i][\"slots\"]--;\n // and put the name and description in the multiply booked slot\n $column[$start_s][0][\"data\"] = $column[$r][$i][\"data\"];\n $column[$start_s][0][\"long_descr\"] = $column[$r][$i][\"long_descr\"];\n $column[$start_s][0][\"create_by\"] = $column[$r][$i][\"create_by\"];\n $column[$start_s][0][\"room_id\"] = $column[$r][$i][\"room_id\"];\n }\n }\n \n // now we've got all the information we can enter it in the first complete\n // slot for the booking (provided it's not a multiple booking slot)\n if (!isset($column[$first_slot][1][\"id\"]))\n {\n $column[$first_slot][0][\"data\"] = $entry['name'];\n $column[$first_slot][0][\"long_descr\"] = $entry['description'];\n $column[$first_slot][0][\"create_by\"] = $entry['create_by']; \n $column[$first_slot][0][\"room_id\"] = $entry['room_id']; \n $column[$first_slot][0][\"slots\"] = $n_slots;\n }\n\n}", "public function index(Request $request)\n {\n //\n\n $date = $request->query('date');\n \n if($date){\n $booking = Booking::whereDate('start_time', $date)\n ->with('vehicle')->with('startLocation')->with('endLocation')\n ->with('trip')->with('seat')->get();\n return $this->formatSuccessResponse('Booking', $booking);\n }\n // $booking = Booking::with('startLocation')->with('endLocation')->get();\n $booking = Booking::with('vehicle')->with('startLocation')->with('endLocation')\n ->with('trip')->with('seat')->get();\n return $this->formatSuccessResponse('Booking', $booking);\n\n }", "public function prepare_getCalendarAvailability($params)\n\t{\n\t\t$xml_string = \"StartDate=\".$params['StartDate'].\"&Days=\".$params['Days'].\"&VillaGroup=\".$params['VillaGroup'].\"&VillaSubGroup=\".$params['VillaSubGroup'].\"&VillaID=\".$params['VillaID'].\"&CountryID=\".$params['CountryID'].\"&LocationID=\".$params['LocationID'].\"&BedRm=\".$params['BedRm'].\"&SubLoc=\".$params['SubLoc'].\"&Agent=\".$params['Agent'].\"\";\n\t\treturn $xml_string;\n\t}", "public function schedule_by_date(Request $request) {\n //\n $currentDate = $request->segment(2);\n $day = \\Helpers\\DateHelper::getDay($currentDate);\n $weekDays = \\Helpers\\DateHelper::getWeekDays($currentDate, $day); \n $workouts = \\App\\Schedule::getScheduledWorkouts($weekDays);\n \n return view('user/schedule', ['number_of_day' => $day, 'current_date' => $currentDate, 'weekDays' => $weekDays])\n ->with('target_areas', json_decode($this->target_areas, true))\n ->with('movements', json_decode($this->movements, true))\n ->with('workouts', $workouts); \n }", "public function generate() {\r\n\t\t$busyEvents = new ArrayCollection ();\r\n\t\t\r\n\t\t// start time\r\n\t\t$startTime = $this->getStartTime ();\r\n\t\t$startTime_hour = $startTime->getHour ();\r\n\t\t$startTime_minute = $startTime->getMinute ();\r\n\t\t$startTime_second = $startTime->getSecond ();\r\n\t\t\r\n\t\t// end time\r\n\t\t$endTime = $this->getEndTime ();\r\n\t\t$endTime_hour = $endTime->getHour ();\r\n\t\t$endTime_minute = $endTime->getMinute ();\r\n\t\t$endTime_second = $endTime->getSecond ();\r\n\t\t\r\n\t\t// time slot start date\r\n\t\t$timeSlot = $this->getTimeSlot ();\r\n\t\t$startDate = $timeSlot->getStartDate ();\r\n\t\t$startDate_year = $startDate->getYear ();\r\n\t\t$startDate_month = $startDate->getMonth ();\r\n\t\t$startDate_day = $startDate->getDay ();\r\n\t\t\r\n\t\t// days\r\n\t\t$days = $this->getDays ();\r\n\t\t\r\n\t\t$j = ($startTime->is_greater_or_equal($endTime)) ? 1 : 0;\r\n\t\t\r\n\t\t//debug\r\n\t\t//echo 'j = ' . $j . ' $startTime : '. $startTime. ' $endTime : '. $endTime. '<br><br>';\r\n\t\t\r\n\t\t$floor_days = $timeSlot->duration ()->floor_days ();\r\n\t\t\r\n\t\tfor($i = -1; $i <= $floor_days; $i ++) {\r\n\t\t\t$current_startDate = new CalendarDate ( $startDate_year, $startDate_month, $startDate_day + $i, $startTime_hour, $startTime_minute, $startTime_second );\r\n\t\t\t// $current_startDate_next_day = clone $current_startDate;\r\n\t\t\t// $current_startDate_next_day->modify('tomorrow');\r\n\t\t\t$add_condition = $days->contains ( $current_startDate->format ( 'l' ) );\r\n\t\t\t// || (($j == 1) && $days->contains ( $current_startDate_next_day->format ( 'l' ) ))\r\n\t\t\t\r\n\t\t\tif ($add_condition) {\r\n\t\t\t\t$current_endDate = new CalendarDate ( $startDate_year, $startDate_month, $startDate_day + $i + $j, $endTime_hour, $endTime_minute, $endTime_second );\r\n\t\t\t\t$current_event = new CalendarEvent ( $current_startDate, $current_endDate );\r\n\t\t\t\t$busyEvents->add ( $current_event );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $busyEvents;\r\n\t}", "public function get_available_days($type){\n $sql = \"SELECT DISTINCT `day` FROM wp_dcms_reservation_config\n WHERE `type`='{$type}' and qty > 0\";\n $result = $this->wpdb->get_results( $sql );\n\n error_log(print_r($result,true));\n\n $res = [];\n foreach ($result as $item){\n $res[] = $item->day;\n }\n\n return $res;\n }", "public function index()\n {\n //translatedIn(app() -> getLocale())->\n $reservations = Appointment::paginate(PAGINATION_COUNT);\n return view('Admin.reservations.index', compact('reservations'));\n }", "function findAppointmentsDue(){\n\t$db = dbConnect();\n\n\t$sql = \"SELECT id FROM Appointment WHERE start_date > date_add(NOW(),INTERVAL 15 MINUTE) AND start_date <= date_add(NOW(),INTERVAL 30 MINUTE) AND status = 2 AND (type = 0 OR type = 1)\";\n\n\t$results = $db->query($sql);\n\n\treturn $results;\n}", "function allDays($month,$day,$con,$prodID){\n\t\t$m1 = date(\"m\",strtotime($month));\n\t\t$m2 = date(\"m\",strtotime(\"now\"));\n\t\t$year = \"\";\n\t\tif($m2>$m1){\n\t\t\t\n\t\t\t$year = date(\"Y\",strtotime(\"now +1 year\"));\n\t\t}\n\n $last = strtotime(\"last $day of $month $year\");\n $first = strtotime(\"first $day of $month $year\");\n $week = 0;\n for ($i=$first; $i < $last; ) {\n $i=strtotime(\"first $day of $month $year +$week week\");\n $ed = date(\"D M d Y\",$i);\n $checkReserved = $con->prepare(\"SELECT * FROM tbl_reserved WHERE prodID ='$prodID' AND EventDate = '$ed' \");\n $checkReserved->execute();\n $cr = $checkReserved->fetch(); \n if(!$cr){\n if(strtotime(\"now\") >= strtotime(date(\"M d Y\",$i))){\n echo \"<option>\".date(\"M d Y\",strtotime(date(\"M d Y\",$i).\" +1 year\")).\"</option>\";\n }else{\n echo \"<option>\".date(\"M d Y\",$i).\"</option>\";\n }\n \n }\n \n $week++;\n }\n }", "public function getCustomersNextDayAppointments($notificationType)\n {\n $couponsTable = CouponsTable::getTableName();\n $customerBookingsExtrasTable = CustomerBookingsToExtrasTable::getTableName();\n $paymentsTable = PaymentsTable::getTableName();\n\n $startCurrentDate = \"STR_TO_DATE('\" .\n DateTimeService::getCustomDateTimeObjectInUtc(\n DateTimeService::getNowDateTimeObject()->setTime(0, 0, 0)->format('Y-m-d H:i:s')\n )->modify('+1 day')->format('Y-m-d H:i:s') . \"', '%Y-%m-%d %H:%i:%s')\";\n\n $endCurrentDate = \"STR_TO_DATE('\" .\n DateTimeService::getCustomDateTimeObjectInUtc(\n DateTimeService::getNowDateTimeObject()->setTime(23, 59, 59)->format('Y-m-d H:i:s')\n )->modify('+1 day')->format('Y-m-d H:i:s') . \"', '%Y-%m-%d %H:%i:%s')\";\n\n try {\n $statement = $this->connection->query(\n \"SELECT\n a.id AS appointment_id,\n a.bookingStart AS appointment_bookingStart,\n a.bookingEnd AS appointment_bookingEnd,\n a.notifyParticipants AS appointment_notifyParticipants,\n a.serviceId AS appointment_serviceId,\n a.providerId AS appointment_providerId,\n a.locationId AS appointment_locationId,\n a.internalNotes AS appointment_internalNotes,\n a.status AS appointment_status,\n a.zoomMeeting AS appointment_zoom_meeting,\n \n cb.id AS booking_id,\n cb.customerId AS booking_customerId,\n cb.status AS booking_status,\n cb.price AS booking_price,\n cb.customFields AS booking_customFields,\n cb.info AS booking_info,\n cb.utcOffset AS booking_utcOffset,\n cb.aggregatedPrice AS booking_aggregatedPrice,\n cb.persons AS booking_persons,\n \n p.id AS payment_id,\n p.amount AS payment_amount,\n p.dateTime AS payment_dateTime,\n p.status AS payment_status,\n p.gateway AS payment_gateway,\n p.gatewayTitle AS payment_gatewayTitle,\n p.data AS payment_data,\n \n cbe.id AS bookingExtra_id,\n cbe.extraId AS bookingExtra_extraId,\n cbe.customerBookingId AS bookingExtra_customerBookingId,\n cbe.quantity AS bookingExtra_quantity,\n cbe.price AS bookingExtra_price,\n cbe.aggregatedPrice AS bookingExtra_aggregatedPrice,\n \n c.id AS coupon_id,\n c.code AS coupon_code,\n c.discount AS coupon_discount,\n c.deduction AS coupon_deduction,\n c.limit AS coupon_limit,\n c.customerLimit AS coupon_customerLimit,\n c.status AS coupon_status\n FROM {$this->appointmentsTable} a\n INNER JOIN {$this->bookingsTable} cb ON cb.appointmentId = a.id\n LEFT JOIN {$paymentsTable} p ON p.customerBookingId = cb.id\n LEFT JOIN {$customerBookingsExtrasTable} cbe ON cbe.customerBookingId = cb.id\n LEFT JOIN {$couponsTable} c ON c.id = cb.couponId\n WHERE a.bookingStart BETWEEN $startCurrentDate AND $endCurrentDate\n AND cb.status = 'approved'\n AND a.notifyParticipants = 1 AND\n a.id NOT IN (\n SELECT nl.appointmentId \n FROM {$this->table} nl \n INNER JOIN {$this->notificationsTable} n ON nl.notificationId = n.id \n WHERE n.name = 'customer_appointment_next_day_reminder' AND n.type = '{$notificationType}'\n )\"\n );\n\n $rows = $statement->fetchAll();\n } catch (\\Exception $e) {\n throw new QueryExecutionException('Unable to find appointments in ' . __CLASS__, $e->getCode(), $e);\n }\n\n return AppointmentFactory::createCollection($rows);\n }", "public function hotelDetail($hotelID, Request $request)\n {\n $ratingTypes = RatingType::all();\n\n if($request->get('search') == 'room')\n {\n $hotel = Hotel::findOrfail($hotelID);\n\n $availableRoomType = RoomType::where('hotel_id', $hotelID)->get();\n $gallery = $hotel->images()->where('type','gallery')->get();\n $logo = $hotel->images()->where('type','logo')->get();\n $avg = number_format($hotel->roomTypes()->min('price'), 2);\n\n\n $checkIn = date('Y-m-d', strtotime($request->date_from));\n $checkOut = date('Y-m-d', strtotime($request->date_to));\n $adult = Input::get('num_of_adult');\n $child = Input::get('num_of_child');\n $totalRoom = Input::get('num_of_room');\n $diff = date_diff(date_create($request->date_from), date_create($request->date_to));\n $dayCount = $diff->format(\"%a\");\n $checkDay = ['checkIn' => $checkIn, 'checkOut' => $checkOut, 'adult' => $adult, 'child' => $child];\n $availableRooms=[];\n// $dates = array($checkIn);\n// while ($checkIn!= $checkOut) {\n// $checkIn = date('Y-m-d', strtotime($checkIn . ' +1 day'));\n// $dates[] = $checkIn;\n// $dayCount++;\n// }\n// echo $checkIn.' '.$checkOut;\n// $roomAvailableBaseOnDate = $hotel->rooms()->where('date_from','<=', $checkIn)->where('date_to', '>=', $checkOut)->where('total_available_room', '>=', $totalRoom)->get();\n $roomAvailableBaseOnDate = $hotel->rooms()->where('date_from','<=', $checkIn)->where('date_to', '>=', $checkOut)->get();\n\n// dd($roomAvailableBaseOnDate);\n $roomTypeStatus = null;\n if(! $roomAvailableBaseOnDate->isEmpty() )\n {\n\n foreach($roomAvailableBaseOnDate as $rooms) {\n\n $totalAvailableDay = $rooms->total_available_room;\n\n $roomTypes[$rooms->hotel_room_group_id] = $rooms->roomType()->where('adult_allowed', '>=', $adult)->where('child_allowed', '>=', $child)->get();\n // echo $roomTypes[$rooms->hotel_room_group_id];\n foreach($roomTypes[$rooms->hotel_room_group_id] as $roomType)\n {\n\n $booking = $roomType->booking()\n ->whereBetween('date_from', [$checkIn, $checkOut])\n ->orWhere(function($query)\n {\n $checkIn = date(\"Y-m-d\", strtotime(Input::get('date_from')));\n $checkOut = date(\"Y-m-d\", strtotime(Input::get('date_to')));\n $query->whereBetween('date_to', [$checkIn, $checkOut])\n ->orWhere(function($query){\n $checkIn = date(\"Y-m-d\", strtotime(Input::get('date_from')));\n $checkOut = date(\"Y-m-d\", strtotime(Input::get('date_to')));\n $query->where('date_from','>', $checkIn)\n ->where('date_to','<', $checkOut);\n });\n\n })->get();\n if($booking->count() < $totalAvailableDay )\n {\n /* Set Available room price info */\n $roomTypeStatus[$rooms->hotel_room_group_id] = 't';\n $roomTypePrice[$rooms->hotel_room_group_id] = $rooms->price_per_room ;\n $availableRooms[] = $rooms->hotel_room_group_id;\n// $roomTypeStatus = array_add($roomTypeStatus, $rooms->hotel_room_group_id, 't' );\n }\n\n }\n\n\n }\n// dd($availableRooms);\n $unavailableRooms = $hotel->roomTypes()->whereNotIn('id', $availableRooms)->get();\n foreach($unavailableRooms as $unavailableRoom) {\n $roomTypeStatus[$unavailableRoom->id] = 'f';\n }\n\n }else\n {\n $unavailableRooms = $hotel->roomTypes()->whereNotIn('id', $availableRooms)->get();\n foreach($unavailableRooms as $unavailableRoom) {\n $roomTypeStatus[$unavailableRoom->id] = 'f';\n }\n }\n /**\n * similar hotel listings\n */\n $similar_hotels = Hotel::where('status', 1)->where('city', '=', $hotel->city)->where('id', '!=', $hotel->id)->Limit(3)->get();\n return view('hotels.template.hotel-detail', compact('hotel', 'roomTypeStatus', 'availableRoomType', 'gallery', 'logo', 'galleryThumb', 'avg', 'roomTypePrice', 'dayCount', 'totalRoom', 'checkDay', 'similar_hotels', 'ratingTypes'));\n }else\n {\n $hotel = Hotel::findOrfail($hotelID);\n // $roomAvailable = [];\n $availableRoomType = RoomType::where('hotel_id', $hotelID)->get();\n $gallery = $hotel->images()->where('type','gallery')->get();\n $logo = $hotel->images()->where('type','logo')->get();\n $avg = number_format($hotel->roomTypes()->min('price'), 2);\n foreach($availableRoomType as $roomType) {\n $roomTypeStatus[$roomType->id] = 'n';\n }\n /**\n * similar hotel listings\n */\n $similar_hotels = Hotel::where('status', 1)->where('city', '=', $hotel->city)->where('id', '!=', $hotel->id)->Limit(3)->get();\n\n return view('hotels.template.hotel-detail', compact('hotel', 'roomTypeStatus', 'availableRoomType', 'gallery', 'logo', 'galleryThumb', 'avg', 'similar_hotels', 'ratingTypes'));\n }\n }", "public function get_reservation_per_teacher($res_teach_code=NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t $res_room_code=NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t $tm_row=NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t $res_todate)\n\t\t{\n \t\t\t$where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\". date(\"Y-m-d\").\"'\";\n\t\t if(!empty($res_todate))\n\t\t\t $where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\".date('Y-m-d',strtotime($res_todate)).\"'\";\n\t\t \n\t\t\t\n\t \n \t\t\t$reservs = $this->db->query(\"select Distinct res_teach_code, res_admin_note from \n\t\t\t\t\t\t\t\t\t\t reservations \n \t\t\t where res_teach_code = \".$res_teach_code.\"\n\t\t\t\t\t\t\t and res_room_code = \".$res_room_code.\"\n\t\t\t\t\t\t\t and DATE_FORMAT(res_time_start, '%H:%i') <= '\".$tm_row.\"'\n\t\t\t\t\t\t\t and DATE_FORMAT(res_time_end, '%H:%i') >= '\".$tm_row.\"' \".\n\t\t\t\t\t\t $where .\n \t\t\t\t\t\t\t \" order by res_code desc \")->result();\n \t\t\t //\t \n\t \n\t\t\treturn $reservs;\n\t\t}", "function get_appointment_times($db, $appointments) {\n $unavailable_times = array();\n $available_times = array();\n foreach ($appointments as $appointment) {\n array_push($unavailable_times, date(\"Y-m-d H:i:s\", strtotime($appointment['appt_time'])));\n }\n foreach ($unavailable_times as $unavailable_time) {\n $possible_time = date(\"Y-m-d H:i:s\", strtotime($unavailable_time . \"+1 hour\"));\n if (!in_array($possible_time, $unavailable_times)) {\n array_push($available_times, $possible_time);\n }\n }\n return $available_times;\n}", "private function getTodayAdvertisements() {\n \treturn AdvertisementQuery::create()\n\t\t\t\t->filterByCurrent()\n\t\t\t\t->filterByBillboard($this)\n\t\t\t\t->find();\n }", "public function notSyncedReservations()\n {\n if (request()->wantsJson()) {\n $reservations = Reservation::with(['hotel', 'clients', 'rooms', 'status'])\n ->whereNull('google_event_id')->get();\n\n $payload = $this->prepareGoogleCalendarEventPayload($reservations);\n\n return response($payload);\n }\n }", "public function index()\n {\n $resultsPerPage = 4;\n\n if (request()->wantsJson()) {\n $reservations = Reservation::with(['status', 'hotel'])\n ->withCount(['clients', 'rooms'])\n ->paginate($resultsPerPage);\n\n $data = $reservations->makeHidden([\n 'reservation_status_id',\n 'created_at',\n 'updated_at',\n 'hotel_id'\n ]);\n $reservations->data = $data;\n\n return response($reservations);\n }\n\n return view('reservations.index');\n }", "public function index()\n {\n //\n\n $reservation=Reservation::all();\n\n // print_r($reservation[1]->created_at);\n // $reservation =Reservation::latest()->paginate(5);\n\n return view('front.reservations.index', ['reservationData'=>$reservation]);\n \n }", "public function actionWorkingdays(): array\n {\n $request = Yii::$app->request;\n\n if ($request->isPost) {\n return Appointments::WORKING_DAYS;\n }\n \n return [];\n }", "function searchForReservations() {\r\n $type = ($_POST['searchType']);\r\n \r\n if ($type == \"Select Search Type\") {\r\n echo (\"Please choose what you're searching for from the drop down menu below.\");\r\n } else if ($type == \"Request ID\") {\r\n \r\n $roomReservationRequestId = ($_POST[\"searchParam\"]);\r\n error_log(\"searching by request id = \".$roomReservationRequestId);\r\n $Reservation = retrieve_RoomReservationActivity_byRequestId($roomReservationRequestId);\r\n // retrieval routine returns just one reservation, so return an array consisting of one record\r\n if (!$Reservation)\r\n { \r\n error_log(\"retrieve_RoomReservationActivity_byRequestID returned false\");\r\n $Reservations = false;\r\n }\r\n else\r\n {\r\n $Reservations = array();\r\n $Reservations[] = $Reservation;\r\n }\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Social Worker (Last Name)\") {\r\n $socialWorkerLastName = ($_POST[\"searchParam\"]);\r\n // $Reservations = array();\r\n $Reservations = (retrieve_SocialWorkerLastName_RoomReservationActivity($socialWorkerLastName));\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Staff Approver (Last Name)\") {\r\n $rmhStaffLastName = ($_POST[\"searchParam\"]);\r\n // $Reservations = array();\r\n $Reservations = (retrieve_RMHStaffLastName_RoomReservationActivity($rmhStaffLastName));\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Family (Last Name)\") {\r\n $parentLastName = ($_POST[\"searchParam\"]);\r\n \r\n $Reservations = (retrieve_FamilyLastName_RoomReservationActivity($parentLastName));\r\n return $Reservations;\r\n } else if ($type == \"Status\") {\r\n $status = ($_POST[\"searchParam\"]);\r\n $Reservations = (retrieve_RoomReservationActivity_byStatus($status));\r\n return $Reservations;\r\n } else if ($type == \"Last Activity\") {\r\n $activity = ($_POST[\"searchParam\"]);\r\n $Reservations = (retrieve_RoomReservationActivity_byLastActivity($activity));\r\n return $Reservations;\r\n }\r\n}", "public function index(Request $request)\n {\n $reservations = Reservation::active();\n\n return $this->afterId($request, $reservations)->get();\n }", "public static function getExperienceLocationScheduleDay1($productID, $productVendorLocationID = NULL, $day=NULL) {\n //$day = (is_null($day)) ? strtolower(date(\"D\")) : strtolower($day);\n\n $schedules = DB::table('schedules')\n ->join(DB::raw('time_slots as ts'),'ts.id','=','schedules.time_slot_id')\n ->join(DB::raw('product_vendor_location_booking_schedules as pvlbs'),'pvlbs.schedule_id','=','schedules.id')\n ->join(DB::raw('product_vendor_locations as pvl'),'pvlbs.product_vendor_location_id','=','pvl.id')\n ->where('pvl.product_id', $productID)\n ->select('pvl.id as vendor_location_id','schedules.day_short','schedules.day_numeric','schedules.id','ts.time','ts.slot_type')\n ->get();\n\n\n #array to hold information\n $arrData = array();\n\n if($schedules) {\n foreach($schedules as $row) {\n //echo \"<prE>\"; print_r($row);\n $arrData[$row->vendor_location_id][$row->day_numeric] = $row->day_short; \n\n }\n }\n return $arrData;\n }", "function get_all(){\n $where = \"reservation_status <> 'Pending'\";\n $reservations = where( 'reservations', $where );\n\n echo json_encode( $reservations );\n exit;\n}", "public function index() {\n $reservations = Reservation::paginate(15);\n return view('reservations.index', compact('reservations'));\n }", "public function actionReservationIndex()\n {\n $searchModel = new ServicesReservationSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('reservationindex', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getOnceAWeekNewsletterSchedulesForDate($date) {\r\n\t\t\r\n\t\t//obtenemos el dia de la semana en el cual se debe realizar el envio\r\n\t\t$timestamp = strtotime($date);\r\n\t\t$day = date(\"D\",$timestamp);\r\n\t\t$criteria = new Criteria();\r\n\t\t$criteria->add(NewsletterSchedulePeer::DELIVERYDAY,$day);\r\n\t\t$criteria->add(NewsletterSchedulePeer::ACTIVE,1);\t\t\r\n\t\t$criteria->add(NewsletterSchedulePeer::DELIVERYMODE,NewsletterSchedulePeer::ONCE_A_WEEK_MODE);\r\n\t\treturn NewsletterSchedulePeer::doSelect($criteria);\r\n\t\t\r\n\t}", "public static function getSchedDay($date, $user) {\n\n // Slot defaults\n $schedDay = new SchedDay($date);\n /*\n $sql = SchedDao::SQL_SELECT_SCHED .\n \" WHERE user_id=\" . $user->id . \" AND date=\" . quote($date) .\n \" ORDER BY time_start, client_id\";\n $res = query($sql); \n $scheds = array();\n while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $sched = SchedDao::buildSched($row);\n $sched->client = SchedDao::getClient($sched->clientId);\n $scheds[] = $sched;\n }\n */\n logit_r('here getschedday');\n $scheds = Scheduling::getAppts($date, $user->id);\n $schedUser = new SchedUser($user->id, $user->uid, $user->name);\n $schedUser->scheds = $scheds;\n $schedDay->users[] = $schedUser;\n return $schedDay;\n }", "public static function soon()\n\t{\n\t\t$reservations = \\Model_Lessontime::find(\"all\", [\n\t\t\t\"where\" => [\n\t\t\t\t[\"deleted_at\", 0],\n\t\t\t\t[\"status\", 1],\n\t\t\t\t[\"freetime_at\", \"<=\", time() + 600],\n\t\t\t\t[\"freetime_at\", \">=\", time()],\n\t\t\t]\n\t\t]);\n\n\t\tforeach($reservations as $reservation){\n\n\t\t\t// for teacher\n\t\t\t$url = \"http://game-bootcamp.com/teachers/top\";\n\n\t\t\t$body = \\View::forge(\"email/teachers/reminder_soon\",[\"url\" => $url]);\n\t\t\t$sendmail = \\Email::forge(\"JIS\");\n\t\t\t$sendmail->from(\\Config::get(\"statics.info_email\"),\\Config::get(\"statics.info_name\"));\n\t\t\t$sendmail->to($reservation->teacher->email);\n\t\t\t$sendmail->subject(\"Your lesson will start.\");\n\t\t\t$sendmail->html_body(htmlspecialchars_decode($body));\n\n\t\t\t$sendmail->send();\n\n\t\t\t// for student\n\t\t\t$url = \"http://game-bootcamp.com/students/top\";\n\n\t\t\t$body = \\View::forge(\"email/students/reminder_soon\",[\"url\" => $url]);\n\t\t\t$sendmail = \\Email::forge(\"JIS\");\n\t\t\t$sendmail->from(\\Config::get(\"statics.info_email\"),\\Config::get(\"statics.info_name\"));\n\t\t\t$sendmail->to($reservation->student->email);\n\t\t\t$sendmail->subject(\"Your lesson will start.\");\n\t\t\t$sendmail->html_body(htmlspecialchars_decode($body));\n\n\t\t\t$sendmail->send();\n\t\t}\n\t}", "public static function SEARCH_STOP_DATE_RANGE_BOOKING(){\n\t $SQL_String = \"SELECT * FROM area_booking WHERE am_id=:am_id AND (date_enter BETWEEN :stop_start AND :stop_end OR date_exit BETWEEN :stop_start AND :stop_end) AND _keep=1\";\n\t return $SQL_String;\n\t}", "public function getBusySchedules($date,$activity_type,$engineer_id)\n {\n $this->db->where('start_date',$date);\n if($activity_type!='')\n $this->db->where('activity_type', $activity_type); \n if($engineer_id!='')\n $this->db->where('engineer_id', $engineer_id); \n\n $query = $this->db->get('job');\n\n $busy_slots = array();\n\n foreach ($query->result() as $key => $book_detail)\n {\n $busy_slots[] = array(\n \"begin\"=>new DateTime($book_detail->start_time),\n \"end\"=>new DateTime($book_detail->end_time),\n \"engineer_id\"=>$book_detail->engineer_id,\n \"customer_id\"=>$book_detail->customer_id,\n \"req_id\"=>$book_detail->id,\n \"status\"=>$book_detail->status,\n );\n }\n return $busy_slots;\n }", "public function buildDayList($date){\n\t\t$events = $this->getDayEvents($date);\n\t\t$count = 0;\n\t\t\n\t\tob_start();\n\t\tif(count($events) > 0){\n\t\t\tforeach($events as $key => $event){\t\t\t\n\t\t\t\t$recurringDays = $event->getRecurringDays();\n\t\t\t\t\t\t\n\t\t\t\t$dayOfWeek = date_create($date);\n\t\t\t\t$dayOfWeek = strtolower(date_format($dayOfWeek, \"l\"));\n\t\t\t\t//echo $dayOfWeek;\n\n\t\t\t\tif(count($recurringDays)){\n\t\t\t\t\tif(in_array($dayOfWeek, $recurringDays)){\n\t\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\t\techo '<hr />';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<h4>Events for ' . $this->getDate($date) . '</h4>';\n\t\t\t\t\techo $event->toHtml('listing');\n\t\t\t\t\techo '<hr />';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "function getWeeks($date) {\n\t\n\t\t$start = strtotime($date);\n\t\t$end = strtotime(date(\"Y-m-t\", strtotime($date)));\n\t\t$arr = array();\n\t\twhile ($start <= $end) {\n\t\t\t$d = getdate($start);\n\t\t\t$dayOfWeek = $d['wday'];\n\t\t\t$endDate = date('Y-m-d', strtotime(date(\"Y-m-d\",$start) . \" + \" . (6 - $dayOfWeek) . \" days\"));\n\t\t\tif(date(\"m\", strtotime($endDate)) != date(\"m\", strtotime($date))) {\n\t\t\t\t$endDate = date(\"Y-m-t\", strtotime($date));\n\t\t\t}\n\t\t\t$arr[] = array(date(\"Y-m-d\",$start), $endDate);\n\t\t\t$start = strtotime($endDate) + (60*60*24);\n\t\t\t\n\t\t\n\t\t}\n\t\treturn $arr;\n\t}", "public function showFreeSlots($id,Request $request){\n\n $user_id = $request->session()->get('id');\n $user = \\DB::table('users')->whereId($user_id)->first();\n $data['user'] = $user;\n $userDetails = UserDetails::where('user_id', $user_id)->first();\n $data['profilePath'] = $userDetails->profilePhotoPath;\n $data['name'] = $userDetails->name;\n \n $i = 0;\n $calendarEvent = CalendarEvent::where('id',$id)->first();\n $title = $calendarEvent->title;\n $startDateTime = $calendarEvent->start;\n $startDateTime= Carbon::parse($startDateTime);\n $endDateTime = $calendarEvent->end;\n $endDateTime = Carbon::parse($endDateTime);\n $startTime = $startDateTime->toTimeString();\n $endTime = $endDateTime->toTimeString();\n $dayNo= date('w', strtotime($startDateTime));\n global $day;\n switch ($dayNo){\n case 0: $day =\"Sunday\";\n break;\n case 1: $day = \"Monday\";\n break;\n case 2: $day = \"Tuesday\";\n break;\n case 3: $day =\"Wednesday\";\n break;\n case 4: $day = \"Thursday\";\n break;\n case 5: $day = \"Friday\";\n break;\n case 6: $day = \"Saturday\";\n break;\n }\n $calendar_event=array(\n 'id'=> $id,\n 'title'=>$title,\n 'day'=>$day,\n 'startTime'=>$startTime,\n 'endTime'=>$endTime\n );\n\n return view('appointments.showFreeSlots', compact('calendar_event'),$data);\n }", "public function get_rooms_of_teachers(\n\t\t \t\t\t\t\t\t\t\t $res_room_code=NULL,\n\t\t\t\t\t\t\t\t\t\t $tm_row=NULL,\n\t\t\t\t\t\t\t\t\t\t $res_todate)\n\t\t{\n \t\t//\t$where = \" and res_todate = '\". date(\"Y-m-d\").\"'\";\n\t\t// if(!empty($res_todate))\n\t\t\t// $where = \" and res_todate = '\".date('Y-m-d',strtotime($res_todate)).\"'\";\n\t\t \n\t\t\t\t$where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\". date(\"Y-m-d\").\"'\";\n\t\t if(!empty($res_todate))\n\t\t\t $where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\".date('Y-m-d',strtotime($res_todate)).\"'\";\n\t \n \t\t\t$Oth_reservs = $this->db->query(\"select Distinct te_name from \n\t\t\t\t\t\t\t\t\t\t\t\t\t reservations , \n\t\t\t\t\t\t\t\t\t\t\t\t\t teachers\n \t\t\t where res_room_code = \".$res_room_code.\"\n\t\t\t\t\t\t\t and res_teach_code = te_code \n \t\t\t\t\t\t\t and DATE_FORMAT(res_time_start, '%H:%i') <= '\".$tm_row.\"'\n\t\t\t\t\t\t\t and DATE_FORMAT(res_time_end, '%H:%i') >= '\".$tm_row.\"' \".\n\t\t\t\t\t\t $where .\n \t\t\t\t\t\t\t \" order by res_code desc \")->result();\n \t\t\t //\t \n\t \n\t\t\treturn $Oth_reservs;\n\t\t}", "private function getNewOpportunitiesByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Became_Lead)) AS day, count(Opportunity_RecID) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Opportunity \";\r\n\t\t$sql .= \"WHERE Date_Became_Lead >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Became_Lead)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Became_Lead)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000);\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function getreservationsraw() {\n return $this->data;\n }", "public function getDayOfTheWeek();", "function get_time_conflicts($room_id,$room_section,$user_id,$date,$start_time,$end_time,$otf,$reschedule_reservation_id=null)\n{\n\tglobal $db;\n\n\t$conflicts = array();\n\n\t$rooms = load_rooms(null,array('id'=>$room_id));\n\tforeach($rooms as $room)\n\t\tbreak;\n\n\t$hours = load_hours($db,$date);\n\n\t// check to make sure there aren't any conflicts for the room\n\t$select_conflicts = \"select * from reservations where room_id like '$room_id' and room_section like '$room_section' and ((sched_end_time > '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_start_time <= '\".date('Y-m-d H:i:s',strtotime($start_time)).\"') OR (sched_end_time >= '\".date('Y-m-d H:i:s',strtotime($end_time)).\"' AND sched_start_time < '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') OR (sched_start_time >= '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_end_time <= '\".date('Y-m-d H:i:s',strtotime($end_time)).\"')) AND cancelled like '0' AND key_checkin_time is null and active like '1'\";\n\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t//print(\"select: $select_conflicts<br>\\n\");\n\t$res_conflicts = $db->query($select_conflicts);\n\t$num_conflicts = $res_conflicts->numRows();\n\tif($num_conflicts > 0)\n\t{\n\t\tunset($conflict);\n\t\tif($num_conflicts == 1)\n\t\t\t$conflict->message = \"The room reservation you selected conflicts with an existing room reservation.\";\n\t\telse\n\t\t\t$conflict->message = \"The room reservation you selected conflicts with multiple existing room reservations.\";\n\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t$conflict->data[] = $res;\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// check to make sure there aren't any conflicts for the patron\n\t$select_conflicts = \"select * from reservations where user_id like '$user_id' and (sched_end_time > '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_start_time < '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') AND cancelled like '0' AND status not like 'Cancelled' AND status not like 'Completed' AND active like '1'\";\n\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t//print(\"select: $select_conflicts<br>\\n\");\n\t$res_conflicts = $db->query($select_conflicts);\n\t$num_conflicts = $res_conflicts->numRows();\n\tif($num_conflicts > 0)\n\t{\n\t\tunset($conflict);\n\t\tif($num_conflicts == 1)\n\t\t\t$conflict->message = \"An existing reservation overlaps with this reservation.\";\n\t\telse\n\t\t\t$conflict->message = \"Multiple existing reservations overlap with this reservation.\";\n\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t$conflict->data[] = $res;\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check the libary is not closed\n\tif(strtotime($start_time) < strtotime($hours->open_time) || strtotime($end_time) > strtotime($hours->close_time))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that falls outside of the available hours for \" . date('m/d/Y',strtotime($date)) . \".\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check the reservation is not for a time too far in the future\n\t$max_date_hours = load_hours($db,date('Y-m-d',strtotime(\"+\".(MAX_FUTURE_RES_DAYS-1).\" days\",strtotime('now'))));\n\tif(strtotime($start_time) > strtotime($max_date_hours->close_time))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that is too far in the future. Reservations may only be made as far as \".MAX_FUTURE_RES_DAYS.\" days in advance.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check to make sure the reservation length is not greater than the max allowed\n\t$res_length = round((strtotime($end_time) - strtotime($start_time))/60);\n\tif($res_length > DEFAULT_MAX_RES_LEN && strcmp($otf,\"1\"))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that exceeds the maximum allowed duration of \".DEFAULT_MAX_RES_LEN.\" minutes.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check to make sure the reservation length is not shorter than the min allowed\n\tif($res_length < DEFAULT_MIN_RES_LEN)\n\t{\n\t\tif((in_array('Staff',$_SESSION['LibRooms']['Roles']) || in_array('Admin',$_SESSION['LibRooms']['Roles'])) && !strcmp($otf,\"1\"))\n\t\t{\n\t\t\t// on the fly checkouts are allowed to be shorter than the minimum reservation length\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset($conflict);\n\t\t\t$conflict->message = \"You have selected a reservation that is shorter than the minimum allowed duration of \".DEFAULT_MIN_RES_LEN.\" minutes.\";\n\t\t\t$conflicts[] = $conflict;\n\t\t}\n\t}\n\n\t// double-check that the end time comes after the start time\n\tif($res_length <= 0)\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected an invalid start time or end time for your reservation.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check reservation start time is for a time in the future (if staff/admin -> minus 1 res_precision)\n\tif(isset($_SESSION['LibRooms']['Roles']) && (in_array('Staff',$_SESSION['LibRooms']['Roles']) || in_array('Admin',$_SESSION['LibRooms']['Roles'])))\n\t\t$min_start_time = strtotime(RES_PRECISION . \" minutes ago\",strtotime('now'));\n\telse\n\t\t$min_start_time = strtotime('now');\n\tif(strtotime($start_time) < $min_start_time)\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a start time in the past.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\n\t// double-check room is not out-of-order\n\tif(!strcmp($room->out_of_order,'Yes'))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"The room you selected is currently out of order.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// confirm user has a staff or admin role before allowing first come first serve reservations\n\tif(isset($_SESSION['LibRooms']['Roles']) && !in_array('Staff',$_SESSION['LibRooms']['Roles']) && !in_array('Admin',$_SESSION['LibRooms']['Roles']) && !strcmp($room->fcfs,'Yes'))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You do not have permission to reserve first come first serve rooms.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// if back-to-back reservations are not allowed, check to make sure this is not a back-to-back\n\tif(!strcmp(BACK_TO_BACK_RESERVATIONS,\"No\"))\n\t{\n\t\t$select_conflicts = \"select * from reservations where user_id like '$user_id' and room_id like '$room_id' and (sched_end_time like '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' OR sched_start_time like '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') AND cancelled like '0' and active like '1'\";\n\t\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t\t//print(\"select: $select_conflicts<br>\\n\");\n\t\t$res_conflicts = $db->query($select_conflicts);\n\t\t$num_conflicts = $res_conflicts->numRows();\n\t\tif($num_conflicts > 0)\n\t\t{\n\t\t\tunset($conflict);\n\t\t\t$conflict->message = \"Back to back reservations by the same patron for the same room are not allowed.\";\n\t\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t\t$conflict->data[] = $res;\n\t\t\t$conflicts[] = $conflict;\n\t\t}\n\t}\n\n\treturn($conflicts);\n}", "function store(){\n\n date_default_timezone_set( 'Asia/Manila' );\n\n $buffer = '2 Hours';\n\n //INITIAL CHECKS\n if( $_POST['startTime'] < date( 'H:i:s', strtotime( '8:00 am' ) ) || $_POST['startTime'] > date( 'H:i:s', strtotime( '5:00 pm' ) ) ){\n redirect( route( 'reservations?alert=1' ) );\n return false;\n }\n\n $request_start = date( 'Y-m-d H:i:s', strtotime( $_POST['reservation_startdate'].\" \".$_POST['startTime'] ) );\n $duration = where( 'reservation_categories', \"reservation_category = '{$_POST['reservation']}'\")[0]['reservation_duration'];\n\n //Get and Set End of Requested event\n $request_end = date_add(\n date_create( $request_start ),\n date_interval_create_from_date_string( $duration ));\n\n $request_end = date_format( $request_end, 'Y-m-d H:i:s' );\n //END\n\n //Get and Set request date with buffer\n $request_buffered = date_sub(\n date_create( $request_start ),\n date_interval_create_from_date_string( $buffer )\n );\n\n $request_buffered = date_format( $request_buffered, 'Y-m-d H:i:s' );\n //END\n\n\n //First line of defense in checking whether there is already an existing reservation\n $first_check = where( 'reservations', \"'{$request_buffered}' < reservation_enddate AND reservation_enddate < '{$request_end}'\" );\n\n if( !empty( $first_check )){\n\n redirect( route( 'dashboard/reservation/create?alert=1' ) );\n return false;\n\n }\n\n //Last line of defense to check an existing reservation\n $second_check = where( 'reservations', \"'{$request_buffered}' < reservation_startdate AND reservation_startdate < '{$request_end}'\" );\n\n if( !empty( $second_check ) ){\n\n redirect( route( 'dashboard/reservation/create?alert=1' ) );\n return false;\n }\n\n\n\n $data = [\n\n 'reserver_name' => $_POST['reserver_name'],\n 'reserver_contact' => $_POST['reserver_contact'],\n 'reservation' => $_POST['reservation'],\n 'reservation_startdate' => $request_start,\n 'reservation_enddate' => $request_end,\n 'facilitator' => $_POST['facilitator'],\n 'approved_by' => $_POST['approved_by'],\n 'approved_date' => date( 'Y-m-d H:i:s' ),\n 'reservation_status' => 'Approved',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n\n\n ];\n\n\n insert('reservations', $data );\n\n //START SMS\n $settings = get( 'settings', 1);\n\n if( !insert('reservations', $data ) ){\n redirect( route( 'reservations?alert=2' ) );\n }\n\n $number = $_POST['reserver_contact'];\n $message = $settings[0]['approved_message'];\n $apicode = $settings[0]['sms_key'];\n\n //Notify admin\n itexmo( $number, $message, $apicode );\n\n redirect( route( 'dashboard/reservation' ) );\n return true;\n}", "public function noReservationsAvailableCase1()\n\t{\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertFalse($reservation->save()); \n\t}", "public function getWeek($date){\n // OUTPUT : JSON format of all the week according the the DB\n $week = $this->_makeWeek($date);\n for($i = 0; $i < count($week); $i += 1){\n $_day = $week[$i];\n // Get from the data base if a date exists (this means that there is somekind of agenda stored in the DB w.r.t. this day)\n $day = \\App\\Day::where('date', $_day['full_date'])->first();\n if ($day != null){\n foreach($day->Agenda as $agenda){\n $week[$i]['items'][] = $this->_makeAgenda($agenda);\n }\n }\n }\n return $week;\n }", "public function index()\n {\n $reservation = Reservation::orderBy('id', 'desc')->paginate(10);\n\n if(request()->has('search')){\n\n\n $searchTerm = request()->input('search');\n $whereTerm = \" `reservations`.`reservation_name` like '%\".$searchTerm.\"%' OR\n `reservations`.`number_of_people` like '%\".$searchTerm.\"%' OR \n `reservations`.`phone_number` like '%\".$searchTerm.\"%' OR \n `reservations`.`email` like '%\".$searchTerm.\"%'\";\n\n $reservation = Reservation::whereRaw($whereTerm)->paginate(10);\n\n }\n\n\n if(request()->input('time')=='Upcoming'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'desc')->paginate(10);\n\n }\n else if(request()->input('time')=='Present'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::today()->toDateString())->whereDate('reservation_time', '<', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'asc')->paginate(10);\n\n }\n if(request()->input('time')=='Past'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '<', Carbon\\Carbon::today()->toDateString())->orderBy('id', 'asc')->orderBy('id', 'desc')->paginate(10);\n\n }\n\n \n\n $date = date(\"Y-m-d\");\n\n if(request()->has('pdf')){\n\n $reservation = Reservation::get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email', 'reservations.created_at','reservations.status', DB::raw('CURRENT_TIMESTAMP as current')));\n\n\n if(request()->has('search')&&request()->input('pdf')=='filtered'){\n\n $searchTerm = request()->input('search');\n $whereTerm = \" `reservations`.`reservation_name` like '%\".$searchTerm.\"%' OR\n `reservations`.`number_of_people` like '%\".$searchTerm.\"%' OR \n `reservations`.`phone_number` like '%\".$searchTerm.\"%' OR \n `reservations`.`email` like '%\".$searchTerm.\"%'\";\n\n $reservation = Reservation::whereRaw($whereTerm)->get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email','reservations.status', 'reservations.created_at',DB::raw('CURRENT_TIMESTAMP as current')));\n\n }\n\n if((request()->input('time')=='Upcoming')&&request()->input('pdf')=='filtered'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'desc')->get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email','reservations.status', 'reservations.created_at',DB::raw('CURRENT_TIMESTAMP as current')));\n\n }\n\n if((request()->input('time')=='Present')&&request()->input('pdf')=='filtered'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::today()->toDateString())->whereDate('reservation_time', '<', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'asc')->get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email','reservations.status', 'reservations.created_at',DB::raw('CURRENT_TIMESTAMP as current')));\n\n }\n\n if((request()->input('time')=='Past')&&request()->input('pdf')=='filtered'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '<', Carbon\\Carbon::today()->toDateString())->orderBy('id', 'asc')->orderBy('id', 'desc')->get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email','reservations.status', 'reservations.created_at',DB::raw('CURRENT_TIMESTAMP as current')));\n\n }\n\n $pdf = PDF::setOptions(['isHtml5ParserEnabled' => true, 'isRemoteEnabled' => true])->loadView('download.reservationpdf',['reservation'=>$reservation]);\n return $pdf->download('Reservation - '.$date.'.pdf');\n }\n\n if(request()->has('csv')){\n\n\n $reservation = Reservation::get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n if(request()->has('search')&&request()->input('csv')=='filtered'){\n\n $searchTerm = request()->input('search');\n $whereTerm = \" `reservations`.`reservation_name` like '%\".$searchTerm.\"%' OR\n `reservations`.`number_of_people` like '%\".$searchTerm.\"%' OR \n `reservations`.`phone_number` like '%\".$searchTerm.\"%' OR \n `reservations`.`email` like '%\".$searchTerm.\"%'\";\n\n $reservation = Reservation::whereRaw($whereTerm)->get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n }\n\n if((request()->input('time')=='Upcoming')&&request()->input('csv')=='filtered'){\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'desc')->get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n }\n\n if((request()->input('time')=='Present')&&request()->input('csv')=='filtered'){\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::today()->toDateString())->whereDate('reservation_time', '<', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'asc')->get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n }\n\n if((request()->input('time')=='Past')&&request()->input('csv')=='filtered'){\n\n $reservation = Reservation::whereDate('reservation_time', '<', Carbon\\Carbon::today()->toDateString())->orderBy('id', 'asc')->orderBy('id', 'desc')->get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n }\n\n $formatter = Formatter::make($reservation->toArray(), Formatter::ARR);\n\n $csv = $formatter->toCsv();\n\n $date = date(\"Y-m-d\");\n\n header('Content-Disposition: attachment; filename= \"Reservation\"'.$date.\".csv\");\n header(\"Cache-control: private\");\n header(\"Content-type: application/force-download\");\n header(\"Content-transfer-encoding: binary\\n\");\n\n echo $csv;\n\n exit;\n\n }\n\n return view('reservation.index', compact('reservation'));\n }", "function getDateReserve($conn, $day, $current_month) {\n\t\t\t\t\t\n\t\t\t\t\t$current_year = date(\"y\");\n\t\t\t\t\t\n\t\t\t\t\t$select_all_dates = \"SELECT * FROM reservation WHERE confirmation = 'Confirmed'\";\n\t\t\t\t\t$q_seleect_all_dates = $conn->query($select_all_dates);\n\t\t\t\t\t\n\t\t\t\t\tif($q_seleect_all_dates->num_rows > 0) {\n\t\t\t\t\t\twhile($q_row = $q_seleect_all_dates->fetch_assoc()) {\n\t\t\t\t\t\t\t$date_reserved = strtotime($q_row['reserv_date']);\n\t\t\t\t\t\t\t$date_reserved_month = date('m',$date_reserved);\n\t\t\t\t\t\t\t$date_reserved_year = date('y',$date_reserved);\n\t\t\t\t\t\t\t$date_reserved_day = date('d',$date_reserved);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($date_reserved_month == $current_month && $date_reserved_year == $current_year) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($day == $date_reserved_day) {\n\t\t\t\t\t\t\t\t\treturn true;\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\techo \".\";\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\telse {\n\t\t\t\t\t\t\t\techo \"false\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\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}", "function ScheduleDates()\n {\n $dateids=$this->CGI2Dates();\n\n $dates=array();\n foreach ($this->Dates() as $did => $date)\n {\n if (preg_grep('/^'.$date[ \"ID\" ].'$/',$dateids))\n {\n array_push($dates,$date);\n }\n }\n\n return $dates;\n }" ]
[ "0.62732154", "0.60634863", "0.6062732", "0.58741355", "0.58535534", "0.5840862", "0.58329326", "0.57965505", "0.5705613", "0.5690353", "0.5682623", "0.5641847", "0.5586593", "0.55172485", "0.5515463", "0.551159", "0.54993033", "0.54981244", "0.5493283", "0.54828846", "0.5482285", "0.5474098", "0.5465108", "0.5463748", "0.5461376", "0.5458915", "0.5455336", "0.5449301", "0.54452515", "0.5423521", "0.5422581", "0.54071736", "0.5398844", "0.5397501", "0.5380468", "0.5363826", "0.536213", "0.5362083", "0.5358071", "0.5345545", "0.5340985", "0.5340096", "0.53393584", "0.5335685", "0.5330834", "0.5329633", "0.53286964", "0.5325536", "0.5325185", "0.53228784", "0.5316819", "0.5311308", "0.52963173", "0.52541053", "0.52518606", "0.52476746", "0.5240309", "0.5224447", "0.5223709", "0.5205493", "0.5201518", "0.5192914", "0.5191294", "0.5180929", "0.5164783", "0.51614285", "0.515393", "0.5152698", "0.51497906", "0.5143999", "0.5141829", "0.5136202", "0.5134178", "0.51284903", "0.51276875", "0.5123348", "0.5120585", "0.511598", "0.51070267", "0.50932634", "0.50910234", "0.50904757", "0.5088231", "0.5088012", "0.5083769", "0.5080962", "0.50751907", "0.5074787", "0.50603914", "0.5058695", "0.50574106", "0.505623", "0.5055586", "0.50547993", "0.50523204", "0.50507826", "0.5048755", "0.504551", "0.5032757", "0.50307596" ]
0.5531961
13
Display a listing of the resource.
public function index(Request $request) { if ($request) { $query=trim($request->get('searchText')); $articulos=DB::table('articulo as a') ->join('categoria as c','a.idcategoria','=','c.idcategoria') ->select('a.idarticulo','a.nombre','a.codigo','a.stock','c.nombre as categoria','a.descripcion','a.imagen','a.estado') ->where('a.nombre','LIKE','%'.$query.'%') ->orwhere('a.codigo','LIKE','%'.$query.'%') ->orderBy('a.idarticulo','desc') ->paginate(2); return view('almacen.articulo.index',["articulos"=>$articulos,"searchText"=>$query ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $categorias=DB::table('categoria')->where('condicion','=','1')->get(); return view('almacen.articulo.create',['categorias'=>$categorias]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(ArticuloFormRequest $request) { $articulo = new Articulo($request->all()); $articulo->estado='activo'; if (Input::hasFile('imagen')){ $file=Input::file('imagen'); $file->move(public_path().'/imagenes/articulos/',$file->getClientOriginalName()); $articulo->imagen=$file->getClientOriginalName(); } $articulo->save(); // flash::success("Categoria creada correctamente"); return Redirect::to('almacen/articulo'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { return view('almacen.articulo.show',["articulo"=>Articulo::findOrFail($id)]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $articulo=Articulo::findOrFail($id); $categorias=DB::table('categoria')->where('condicion','=','1')->get(); return view('almacen.articulo.edit',["articulo"=>$articulo,"categorias"=>$categorias]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(ArticuloFormRequest $request,$id) { $articulo = Articulo::find($id); $articulo->fill($request->all()); $articulo->save(); // flash::warning("categoria editada correctamente"); return Redirect::to('almacen/articulo'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $articulo=Articulo::findOrFail($id); $articulo->estado='Inactivo'; $articulo->update(); return Redirect::to('almacen/articulo'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Display a listing of the resource.
public function index() { $posts = Post::where('user_id', Auth::id())->get(); return view('registred.posts.index', compact('posts')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $data = [ 'tags' => Tag::all(), ]; return view('registred.posts.insert', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate($this->validateRules); $data = $request->all(); $newPost = new Post; $newPost->title = $data['title']; $newPost->body = $data['body']; $newPost->slug = rand(1, 100) . '-' . Str::slug($newPost->title); $newPost->user_id = Auth::id(); $newPost->published = $data['published']; if (!empty($data['path_image'])) { $path = Storage::disk('public')->put('images', $data['path_image']); $newPost->path_image = $path; } $saved = $newPost->save(); if (!$saved) { return redirect()->back()->with('error', 'Post Store ERROR!');; } if (!empty($data['tags'])){ $newPost->tags()->attach($data['tags']); } return redirect()->route('registred.posts.show', $newPost->slug)->with('message', 'Post Stored!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($slug) { $post = Post::where('slug', $slug)->first(); return view('registred.posts.show', compact('post')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $data = [ 'post' => Post::find($id), 'tags' => Tag::all() ]; return view('registred.posts.edit', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request,Post $post) { if (empty($post)) { abort(404); } if ($post->user->id != Auth::id()) { abort(404); } $request->validate($this->validateRules); $data = $request->all(); $post->title = $data['title']; $post->body = $data['body']; $post->slug = rand(1, 100) . '-' . Str::slug($post->title); $post->user_id = Auth::id(); $post->updated_at = Carbon::now(); $post->published = $data['published']; if (!empty($data['path_image'])) { $path = Storage::disk('public')->put('images', $data['path_image']); $post->path_image = $path; } $saved = $post->update(); if (!$saved) { return redirect()->back()->with('error', 'Post Update ERROR!');; } if (!empty($data['tags'])) { $post->tags()->sync($data['tags']); } return redirect()->route('registred.posts.show', $post->slug)->with('message', 'Post Updated!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Post $post) { if (empty($post)) { abort(404); } $post->tags()->detach(); $post->delete(); //no error only for color return redirect()->route('registred.posts.index')->with('error', 'Post Deleted!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
get all possible states of printer
public static function getStates() { $db = Zend_Registry::get('dbAdapterReadOnly'); $select = $db->select() ->from(array('ps' => 'printer_states')) ->order('ps.id'); return $db->fetchAll($select); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrintState() {}", "function printState() {\n\t\t$state = $this->getState();\n\t\techo $state;\n\n\t\n\t}", "public static function availableStates()\n {\n return array(\n self::STATUS_CLOSED,\n self::STATUS_MODERATED,\n self::STATUS_PUBLISHED,\n self::STATUS_VALIDATED\n );\n }", "public function getAvailableStates()\n {\n return [\n self::STATE_NEW => 'New',\n self::STATUS_DONE => 'Done',\n self::STATUS_ERROR => 'Error'\n ];\n }", "abstract public function states();", "public static function getStates()\n {\n return array('ACTIVE', 'DISABLED', 'DELETED');\n }", "function cpc_get_cp_state(){\n\tglobal $wpdb;\n\t$sql = $wpdb->prepare( \n\t\t\"\n\t\t\tSELECT `field_values` \n\t\t\tFROM `$wpdb->cp_ad_fields` \n\t\t\tWHERE `field_name`='cp_state'\n\t\t\", $meta_key\n\t);\n\t$states = $wpdb->get_var( $sql );\n\tif( !$states ){ $states = cpc_default_state_list();}\n\treturn explode(',',$states);\n}", "function getStateInfo() {\n\t\t$state = $this->getState();\n\t\t$label = \"Unknown state ($state)\";\n\n\t\tswitch($state)\n\t\t{\n\t\t\tcase \"\":\n\t\t\tcase self::STATE_NONE:\t\t\t\t\t\t\t\t$label = \"Not started yet\"; break;\n\n\t\t\tcase self::STATE_RUNNING:\t\t\t\t\t\t\t$label = \"Running\"; break;\n\t\t\tcase self::STATE_PAUSED:\t\t\t\t\t\t\t$label = \"Paused\"; break;\n\t\t\tcase self::STATE_STOPPED:\t\t\t\t\t\t\t$label = \"Stopped\"; break;\n\t\t}\n\n\t\tif ($this->data->get(\"resetNeeded\") == 1)\n\t\t\t$label = \"Waiting for reset to complete\";\n\n\t\treturn Array(\n\t\t\t\"state\" => $state,\n\t\t\t\"label\" => $label\n\t\t);\n\t}", "public function getStates() {\n return $this->state;\n }", "public function state(): array;", "public function getStates(): array\n {\n return $this->states;\n }", "public function getStateMachine();", "public function getOrderState();", "public function getState(): array\n {\n return [\n 'Pressure' => $this->pressure,\n 'Humidity' => $this->humidity,\n 'Temperature' => $this->temperature,\n ];\n }", "public function getPrintFlag() {}", "function get_post_states($post)\n {\n }", "function permitted( $state, Grammar $Grammar ){\n\t\tif( ! isset($this->table[$state]) ){\n\t\t\treturn array();\n\t\t}\n\t\t$all = array_keys( $this->table[$state] );\n\t\t//return $all;\n\t\t$a = array();\t\n\t\tforeach( $all as $t ){\n\t\t\tif( $Grammar->is_terminal($t) ){\n\t\t\t\t$a[] = $t;\n\t\t\t}\n\t\t}\n\t\treturn $a;\n\t}", "function get_status() { \n\n\t\t/* Construct the Array */\n\t\t$array['state'] \t= false; //$this->_mpd->state;\n\t\t$array['volume']\t= $this->XBMCCmd(\"GetVolume\");\n\n\t\treturn $array;\n\n\t}", "function getstates() {\n\t\t$sql = Processwire\\wire('database')->prepare(\"SELECT abbreviation as state, name FROM states\");\n\t\t$sql->execute();\n\t\treturn $sql->fetchAll(PDO::FETCH_ASSOC);\n\t}", "abstract public function getState(): array;", "public function getPrintOptions() {\r\n\t\treturn $this->options->getPrint();\r\n\t}", "function getTradeStateInfo() {\n\t\t$state = $this->getTradeState();\n\t\t$label = \"Unknown state ($state)\";\n\n\t\t$label = $this->getTradeStateLabel($state);\n\n\t\treturn Array(\n\t\t\t\"state\" => $state,\n\t\t\t\"label\" => $label\n\t\t);\n\t}", "public function getStates() {\n\t\t$statement = $this->database->prepare(\"SELECT * FROM tbl_state\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "static function getStateOptions()\n\t{\n\t\t// Build the filter options.\n\t\t$options = array();\n\t\t$options[] = JHtml::_('select.option', '0', JText::_('COM_REALTOR_ACTIVE'));\n\t\t$options[] = JHtml::_('select.option', '1', JText::_('COM_REALTOR_INACTIVE'));\n\n\t\treturn $options;\n\t}", "public function testSelectPrintModeAcceptedValues()\n {\n \n for ($i = -1; $i <= 256; $i++) {\n $invalid = ($i < 0) || ($i > 255) || (($i & 2) == 2) || (($i & 4) == 4) || (($i & 64) == 64);\n $failed = false;\n try {\n $this -> printer -> selectPrintMode($i);\n } catch (Exception $e) {\n $failed = true;\n }\n $this -> assertEquals($failed, $invalid);\n }\n }", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getAllStatesByCode(){\n return array(\"AC\",\"AL\",\"AM\",\"AP\",\"BA\",\"CE\",\"DF\",\"ES\",\"GO\",\"MA\",\"MT\",\"MS\",\"MG\",\"PA\",\"PB\",\"PR\",\"PE\",\"PI\",\"RJ\",\"RN\",\"RO\",\"RS\",\"RR\",\"SC\",\"SE\",\"SP\",\"TO\");\n }", "public function getUserStateOptions()\r\n {\r\n $stAr = array();\r\n for ($i = CRUGEUSERSTATE_NOTACTIVATED; $i <= CRUGEUSERSTATE_SUSPENDED; $i++) {\r\n $stAr[$i] = $this->getStateName($i);\r\n }\r\n return $stAr;\r\n }", "function getState() {\n\t\t$sql = \"select * from gamestate_characters\";\n\t\t$results = getResult($sql);\n\n\t\t$i = 0;\n\t\t$output = \"\";\n\t\t$output = $output . \"// <![CDATA[\\n\";\n\t\t$output = $output . $this->makeStatus();\n\t\t$output .= $this->makeCities();\n\n\n\t\t// write out all \"player\" data (should change this to character eventually)\n\t\t// this doesn't use any of your fancy new OO functions, but it's elegant and robust,\n\t\t// so it stays\n\t\twhile($row = $results->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n\t\t\t$output .= \"gamestate.characters[\".$i.\"] = { \";\n\t\t\tforeach($row as $field => $value) {\n\t\t\t\tif (!((string)intval($value) === $value)) {\n\t\t\t\t\t$output .= $field.' : \"'.$value.'\", ';\n\t\t\t\t} else {\n\t\t\t\t\t$output .= $field.' : '.$value.', ';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output = trim($output, \", \").\"};\\n\";\n\t\t\t$i++;\n\t\t}\n\t\t$output .= $this->makeCards();\t\t\n\t\t\n\t\tif ($this->IAmPlaying) {\n\t\t\t$output = $output.$this->makeAllCommands();\n\t\t} else {\n\t\t\t$output = $output.\"\\ngamestate.therearenocommands=true;\\n\";\n\t\t}\n\t\t$output = $output . \"// ]]>\";\n\t\treturn $output;\n\n\t\n\t}", "public function getExportState() {}", "public function getStates() {\n $stateList = array();\n if (!empty($this->shipping_country)) {\n /*\n * PCM\n */\n $stateList = Subregion::model()->findAll('region_id=\"' . $this->shipping_country . '\"');\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n }\n return $stateList;\n }", "public function enumStates()\n {\n $rVal = [];\n foreach ($this->xml->xpath('state') as $node) {\n $rVal[] = (string)$node[0]->attributes()->value;\n }\n\n return $rVal;\n }", "static function get_default_state();", "protected function getCurrentPackageStates(): array\n {\n $savePackageStates = false;\n $loadedPackageStates = $this->loadPackageStates();\n if (\n empty($loadedPackageStates)\n || !isset($loadedPackageStates['version'])\n || $loadedPackageStates['version'] < self::PACKAGESTATE_FORMAT_VERSION\n ) {\n $loadedPackageStates = $this->scanAvailablePackages();\n $savePackageStates = true;\n }\n\n if ($savePackageStates) {\n $loadedPackageStates = $this->sortAndSavePackageStates($loadedPackageStates);\n }\n\n return $loadedPackageStates;\n }", "public function getSubElementStates() {\r\n\t\t$data = array();\r\n\t\t\t$data[0] = 'Disabled';\r\n\t\t\t$data[1] = 'Enabled';\r\n\t\treturn $data; //array\r\n\t}", "public function getState()\n {\n return MQStateKeys::get($this->state);\n }", "static function getStateOptions()\n\t{\n\t\t// Build the filter options.\n\t\t$options = array();\n\t\t$options[] = Html::select('option', '1', Lang::txt('COM_MESSAGES_OPTION_READ'));\n\t\t$options[] = Html::select('option', '0', Lang::txt('COM_MESSAGES_OPTION_UNREAD'));\n\t\t$options[] = Html::select('option', '-2', Lang::txt('JTRASHED'));\n\n\t\treturn $options;\n\t}", "private static function getKnownStatus(): array\n {\n //====================================================================//\n // Already Loaded\n if (isset(self::$psKnownStatus)) {\n return self::$psKnownStatus;\n }\n //====================================================================//\n // Load Default Orders Statuses\n self::$psKnownStatus = self::$psOrderStatus;\n //====================================================================//\n // NOT ALLOWED WRITE => STOP HERE\n if (!self::isAllowedWrite()) {\n return self::$psKnownStatus;\n }\n //====================================================================//\n // Complete Status from User Settings\n foreach (SplashStatus::getAll() as $status) {\n //====================================================================//\n // Load Target Status from Settings\n $psStateId = Configuration::get('SPLASH_ORDER_'.strtoupper($status));\n if ($psStateId > 0) {\n self::$psKnownStatus[$psStateId] = $status;\n }\n }\n\n return self::$psKnownStatus;\n }", "public function getStates() {\n $stateList = array();\n \n if (!empty($this->billing_country)) {\n /*\n * PCM\n */\n $stateList = Subregion::model()->findAll('region_id=\"' . $this->billing_country . '\"');\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n \n }\n return $stateList;\n }", "public function getState(): ReportState\n {\n return $this->state;\n }", "public static function dump(){\n self::_print(\"enabled : \". (int)self::$enabled .\"\\n\");\n self::_print(\"disabled : \". (int)self::$disabled .\"\\n\");\n self::_print_r(self::$list);\n }", "function motor_status() {\n // Read pin values.\n $leftPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . LEFT_PIN));\n $rightPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . RIGHT_PIN));\n $forwardPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . FORWARD_PIN));\n $backwardPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . BACKWARD_PIN));\n\n $status = array();\n\n // Get status of front motor.\n if (($leftPinVal == 0 && $rightPinVal == 0) || ($leftPinVal == 1 && $rightPinVal == 1)) {\n $status['front'] = 'neutral';\n }\n else if ($leftPinVal == 1 && $rightPinVal == 0) {\n $status['front'] = 'left';\n }\n else {\n $status['front'] = 'right';\n }\n\n // Get status of back motor.\n if (($forwardPinVal == 0 && $backwardPinVal == 0) || ($forwardPinVal == 1 && $backwardPinVal == 1)) {\n $status['back'] = 'neutral';\n }\n else if ($forwardPinVal == 1 && $backwardPinVal == 0) {\n $status['back'] = 'forward';\n }\n else {\n $status['back'] = 'backward';\n }\n\n return $status;\n}", "public function getState()\n {\n return $this->properties;\n }", "public function getPrinter();", "public function getStateList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('state');\n\t\t$this->db->where('state_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "public function getStates() {\n\t\treturn empty( $this->container['states'] ) ? null : $this->container['states'];\n\t}", "public function getState(){\n\t\treturn $this->state;\n\t}", "abstract public function getState() ;", "public static function getStates()\n {\n /** @var Loyalty $module */\n $module = Module::getInstanceByName('loyalty');\n\n return [\n static::getDefaultId() => $module->getL('Awaiting validation'),\n static::getValidationId() => $module->getL('Available'),\n static::getCancelId() => $module->getL('Cancelled'),\n static::getConvertId() => $module->getL('Already converted'),\n ];\n }", "public function getFromStates() {\n return $this->fromStates;\n }", "public function getStatesAsOptionList()\n {\n $result = [];\n\n $result[self::STATE_AVAILABLE] = __('Available');\n $result[self::STATE_USED] = __('Used');\n $result[self::STATE_REDEEMED] = __('Redeemed');\n $result[self::STATE_EXPIRED] = __('Expired');\n\n return $result;\n }", "public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public static function getPossibleStatuses()\n {\n return array(\n 'Not started',\n 'Started',\n 'Finished',\n );\n }", "public function getState() {}", "public function getState() {}", "public function getState() {}", "public function setPrintState($state = \\SetaPDF_Core_Document_Catalog_OptionalContent::STATE_ON) {}", "public function getOrderStates() {\n // Load the list items.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select('o.id as id, o.value as value');\n $query->from('#__sdi_sys_orderstate AS o');\n $query->where('o.state = 1');\n $query->order('o.ordering');\n $query->group('o.ordering');\n $query->group('o.id');\n $query->group('o.value');\n\n try {\n $items = $this->_getList($query);\n } catch (RuntimeException $e) {\n $this->setError($e->getMessage());\n return false;\n }\n return $items;\n }", "public function getProductState()\n {\n return $this->product_state;\n }", "public static function getOrderStatusChoices(): array\n {\n //====================================================================//\n // Load Prestashop Status List\n $psStates = OrderState::getOrderStates(SLM::getDefaultLangId());\n $choices = array();\n //====================================================================//\n // Walk on Prestashop States List\n foreach ($psStates as $psState) {\n //====================================================================//\n // If State is Know\n if (!self::isKnown($psState[\"id_order_state\"])) {\n continue;\n }\n //====================================================================//\n // Detect Splash State Code\n $code = self::getSplashCode($psState[\"id_order_state\"]);\n if (isset($choices[$code])) {\n continue;\n }\n $choices[$code] = $psState[\"name\"];\n }\n\n return $choices;\n }", "public function getReviewstate() {}", "function &getObligatoryStates()\n\t{\n\t\tglobal $ilDB;\n\t\t$obligatory_states = array();\n\t\t$result = $ilDB->queryF(\"SELECT * FROM svy_qst_oblig WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\tif ($result->numRows())\n\t\t{\n\t\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t\t{\n\t\t\t\t$obligatory_states[$row[\"question_fi\"]] = $row[\"obligatory\"];\n\t\t\t}\n\t\t}\n\t\treturn $obligatory_states;\n\t}", "public function getState(){\n return $this->_getData(self::STATE);\n }", "public static function getAvailableStatus()\n {\n return array(\n self::STATUS_DRAFT => self::STATUS_DRAFT,\n self::STATUS_REVIEWED => self::STATUS_REVIEWED,\n self::STATUS_PUBLISH => self::STATUS_PUBLISH,\n self::STATUS_HIDDEN => self::STATUS_HIDDEN\n );\n }", "public function get_state() {\n\t\treturn $this->data['state'];\n\t}", "protected function getState()\n {\n return Str::random(40);\n }", "protected function getState()\n {\n return Str::random(40);\n }", "public function get_state()\n {\n return $this->get_default_property(self::PROPERTY_STATE);\n }", "public static function getOpenStates()\n {\n return [\n self::STATUS_OPEN,\n self::STATUS_ASSIGNED,\n self::STATUS_OVERDUE,\n ];\n }", "public function getState()\n {\n return $this->getParameter('billingState');\n }", "static function getStateOptions()\n\t{\n\t\t// Build the filter options.\n\t\t$options = array();\n\t\t$options[] = JHtml::_('select.option', '1', JText::_('JPUBLISHED'));\n\t\t$options[] = JHtml::_('select.option', '0', JText::_('JUNPUBLISHED'));\n\t\t$options[] = JHtml::_('select.option', '-2', JText::_('JTRASHED'));\n\t\treturn $options;\n\t}", "function get_states_array() {\n include(PMDROOT.'/includes/state_codes.php');\n $states = array();\n foreach($state_codes AS $code=>$state) {\n $state = ucwords(strtolower($state));\n $states[$state] = $state;\n }\n unset($state_codes,$code,$state);\n return $states;\n}", "public static function getStates()\n {\n return self::$statesUSA;\n }", "public static function us_states(): array\n\t{\n\t\treturn ArrayLists::us_states();\n\t}", "public function GetState()\n\t{\n\t\treturn SPUtils::join_key_values_encode(\"=\", \"&\", array_intersect_key($this->__oauth, array_flip($this->include_in_state)));\n\t}", "function snmp_set_enum_print ($enum_print) {}", "public function getInvoiceState()\n {\n return $this->getParameter('invoiceState');\n }", "function return_state_text($state)\r\n{\r\n\t$text[0]='Valid';\r\n\t$text[1]='Currently Validating';\r\n\t$text[2]='Temporary Problem';\r\n\t$text[10]='API Timeout - Valid at last check';\r\n\t$text[98]='API Key missing or invalid';\r\n\t$text[99]='Invalid';\r\n\treturn $text[$state];\r\n}", "public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\t\r\n\t}", "static function plInfo()\n {\n return (array(\n \"plShortName\" => _(\"Service\"),\n \"plDescription\" => _(\"Terminal service\"),\n \"plSelfModify\" => FALSE,\n \"plDepends\" => array(),\n \"plPriority\" => 3,\n \"plSection\" => array(\"administration\"),\n \"plCategory\" => array(\"terminal\"),\n\n \"plProvidedAcls\"=> array(\n\n \"gotoXMonitor\" => _(\"Monitor\"),\n \"gotoXMethod\" => _(\"Method\"),\n \"gotoXdmcpServer\" => _(\"Remote desktop\"),\n \"gotoXDriver\" => _(\"Graphic driver\"),\n \"gotoXResolution\" => _(\"Graphic resolution\"),\n \"gotoXColordepth\" => _(\"Graphic color depth\"),\n \"gotoXHsync\" => _(\"Horizontal synchronization\"),\n \"gotoXVsync\" => _(\"Vertical synchronization\"),\n \"AutoSync\" => _(\"Auto-Sync\"),\n \"gotoScannerEnable\" => _(\"Scanner enabled\"),\n \"gotoLpdEnable\" => _(\"Printer enabled\"),\n \"gotoXKbModel\" => _(\"Keyboard model\"),\n \"gotoXKbLayout\" => _(\"Keyboard layout\"),\n \"gotoXKbVariant\" => _(\"Keyboard variant\"),\n \"gotoXMouseType\" => _(\"Mouse type\"),\n \"gotoXMouseport\" => _(\"Mouse port\"),\n \"gotoLpdEnable\" => _(\"Printer enabled\"),\n \"goFonHardware\" => _(\"Telephone hardware\"))\n ));\n }", "public static function getOrderFormStatusChoices(): array\n {\n //====================================================================//\n // Load Prestashop Status List\n return array_merge_recursive(\n array(array(\n \"id_order_state\" => 0,\n \"name\" => \"Use Generic Status\",\n )),\n OrderState::getOrderStates(SLM::getDefaultLangId())\n );\n }", "public static function excelStateHeadings()\n {\n return [\n 'Code',\n 'Qualification',\n 'Priority',\n 'Qualification type',\n 'Employer size'\n ];\n }", "public static function getStateOptions()\n\t{\n\t\t// Build the filter options.\n\t\t$options = array();\n\t\t$options[] = Html::select('option', '0', Lang::txt('JENABLED'));\n\t\t$options[] = Html::select('option', '1', Lang::txt('JDISABLED'));\n\n\t\treturn $options;\n\t}", "public function getAllStates() {\n $states = [];\n $values = DB::table(self::TABLE_NAME)\n ->select([self::C_STATE, self::C_STATE_FULL_NAME])\n ->distinct()\n ->where('region', '!=', \" \")\n ->orderBy(self::C_STATE)\n ->get();\n\n foreach ($values as $value) {\n $states[$value->state] = $value->stateFullName;\n }\n\n return $states;\n }", "function parse_print_mode_buttons()\n\t\t{\n\t\t\t$this->t->set_block('run_activity', 'block_print_mode_zone', 'print_mode_zone');\n\t\t\t\n\t\t\tif (($this->conf['use_automatic_parsing']) && ($this->enable_print_mode))\n\t\t\t{\n\t\t\t\tif ($this->print_mode)\n\t\t\t\t{\n\t\t\t\t\t$this->t->set_var(array(\n\t\t\t\t\t\t'print_mode_value'\t=> lang('Close Printer friendly mode'),\n\t\t\t\t\t\t'print_mode_name'\t=> 'not_print_mode',\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->t->set_var(array(\n\t\t\t\t\t\t'print_mode_value'\t=> lang('Printer friendly'),\n\t\t\t\t\t\t'print_mode_name' => 'print_mode',\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t$this->t->parse('print_mode_zone', 'block_print_mode_zone', true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->t->set_var(array( 'print_mode_zone' => ''));\n\t\t\t}\n\t\t}", "public function state();", "public function getDeviceRunStates()\n {\n if (array_key_exists(\"deviceRunStates\", $this->_propDict)) {\n return $this->_propDict[\"deviceRunStates\"];\n } else {\n return null;\n }\n }" ]
[ "0.78884524", "0.61644274", "0.5958475", "0.587656", "0.580595", "0.5762199", "0.5739749", "0.57038975", "0.5654974", "0.5576311", "0.55649626", "0.5554681", "0.55470526", "0.5542125", "0.5538455", "0.54023296", "0.53825295", "0.53648686", "0.5346411", "0.5344111", "0.5333615", "0.53322726", "0.53309333", "0.53182477", "0.530153", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.5297648", "0.52885693", "0.5284832", "0.5272985", "0.526282", "0.52617115", "0.5243205", "0.52386904", "0.52381504", "0.52361965", "0.5218786", "0.5194175", "0.516242", "0.5149564", "0.51429427", "0.5141695", "0.5099721", "0.50992274", "0.5097022", "0.5087245", "0.50821346", "0.50806504", "0.50654054", "0.5051491", "0.5041125", "0.50363743", "0.5030291", "0.50255406", "0.5017358", "0.50160867", "0.50157446", "0.50061864", "0.5003082", "0.4993795", "0.49922642", "0.4990521", "0.49811602", "0.49692506", "0.4951556", "0.49485815", "0.4940794", "0.4940794", "0.49376413", "0.49370345", "0.49339876", "0.4929781", "0.4923326", "0.4916467", "0.4916096", "0.49113432", "0.49103194", "0.4908236", "0.49032894", "0.48981237", "0.48855454", "0.48832795", "0.48831114", "0.48815343", "0.48795176", "0.48752272", "0.48703444", "0.48695022" ]
0.69640666
1
Display a listing of the resource.
public function index() { return Player::all(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'name' => 'required', 'nationality' => 'required', 'rank' => 'required' ]); return Player::create($request->all()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { return Player::find($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // $request->validate([ // 'name' => 'required', // 'nationality' => 'required', // 'rank' => 'required' // ]); $player = Player::find($id); $player->update($request->all()); return $player; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { return Player::destroy($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Conexion a la BD
public function __construct() { include('../Controlador/conexion.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function conectarDB(){\n\t\t$dsn = 'mysql:dbname='.self::nombre_db.' ;host='.self::servidor;\n\t\ttry {\n\t\t\t#metodo abstracto para la conexion a la bd\n\t\t\t$this->_conn = new PDO($dsn, self::usuario_db, self::pwd_db);\n\t\t \t\n\t\t } catch (PDOException $e) {\n\t\t \techo \"Falló la conexión: \".$e->getMessage();\n\t\t } \n\t}", "public function Conecta()\n\t{\n\t\t$this->conn = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->database, $this->user, $this->password);\n\n\t}", "public function conectar(){\n $this->conexion = mysqli_connect($this->hostname, $this->user, $this->password, $this->database);\n }", "public function conectar() {\n $this->conexion=new mysqli($this->servidor, $this->usuario, $this->clave, $this->baseDatos);\n }", "function Conecta(){\n\t\t$this->conexao = @mysql_connect($this->servidor,$this->usuario,$this->senha); //varaivel link desntro desta classa recebera a conex�o\n\t\tif(!$this->conexao){\n\t\t\techo 'Falha na conex�o com o banco de dados<br>';\n\t\t\texit();\n\t\t}elseif(!mysql_select_db($this->banco,$this->conexao)){\n\t\t\techo 'Falha ao selecionar o banco de dados<br>';\n\t\t\texit();\n\t\t}\n\t}", "private function conect(){\r\n\t\tglobal $HOST;\r\n\t\tglobal $BASEDEDATOS;\r\n\t\tglobal $USUARIO;\r\n\t\tglobal $PASS;\r\n\t\t$this->myconn = mysql_connect($HOST,$USUARIO,$PASS);\r\n\t\tif (! $this->myconn){\r\n\t\t\techo \"Error al intentar conectarse con el servidor MySQL\";\r\n\t\texit(); \r\n\t\t}\r\n\r\n\t\tif (! @mysql_select_db($BASEDEDATOS,$this->myconn)){\r\n\t\t\techo \"No se pudo conectar correctamente con la Base de datos\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t}", "private function connect()\r\n {\r\n\r\n /**\r\n * A TENTATIVA DE CRIAR UM OBJETO COM A CONEXAO DO BANCO É FEITA\r\n */\r\n try {\r\n /**\r\n * SALVA NA VARIAVEL ESTATICA O OBJETO REFERENTE A CONEXÃO COM O BANCO.\r\n * AS VARIAVEIS QUE SAO USADAS PARA CONEXAO SÃO DA CLASSE PAI\r\n */\r\n self::$con = new PDO('mysql:host=' . $this->getHost() . ';dbname=' . $this->getDatabase() . '', $this->getUser(), $this->getPassword(), array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"));\r\n /**\r\n * DEFINE O TIPO DE MANIPULAÇÃO DE ERRO SERÁ USADO PELO PDO\r\n */\r\n self::$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n /**\r\n * CAPTURA O ERRO, SE GERADO\r\n */\r\n } catch (\\PDOException $error) {\r\n /**\r\n * O ERRO É IMPRESSO NA TELA\r\n */\r\n echo $error->getMessage();\r\n }\r\n }", "private function conectar()\n {\n try {\n $options = [\n PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ];\n\n $this->pdo = new PDO(\"mysql:dbname=usuarios;host=localhost\", 'root', '', $options);\n\n } catch (PDOException $e) {\n echo 'Falhou: ' . $e->getMessage();\n }\n }", "function abrir_conexion()\n {\n $this->db = Conectar::conexion();\n }", "public function conectarBD() {\n $db_host=\"127.0.0.1\"; \n $db_port=\"3306\";\n $db_name=\"exempel\"; \n $db_user=\"root\"; \n $db_pass=\"\";\n \n $conn = mysqli_connect($db_host.':'.$db_port, $db_user, $db_pass) or die (\"Error conectando a la base de datos.\");\n mysqli_select_db($conn,$db_name) or die(\"Error seleccionando la base de datos.\");\n mysqli_set_charset($conn,\"utf8\");\n return $conn;\n }", "public function Cl_Conexion() {\r\n try {\r\n $this->cone= mysqli_connect($this->host, $this->usuario, $this->password, $this->base);\r\n } catch (Exception $ex) {\r\n echo $exc->getTraceAsString();\r\n }\r\n }", "public function conectar() {\n //Establecer conexion con el servidor\n $this->linkId = @mysql_connect($this->servidor, $this->usuario, $this->password);\n if ($this->linkId == true) {//Si se conecto al servidor.\n //Asignar la conexion a la base de datos\n if (!mysql_select_db($this->baseDatos)) {\n throw new Exception(\"No se pudo conectar a la base de datos\");\n }\n } else {//Si no se conecto al servidro\n throw new Exception(\"No se pudo conectar al servidor\");\n }\n }", "private function conectar(){\n try{\n\t\t\t$this->conexion = Conexion::abrirConexion(); /*inicializa la variable conexion, llamando el metodo abrirConexion(); de la clase Conexion por medio de una instancia*/\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage()); /*Si la conexion no se establece se cortara el flujo enviando un mensaje con el error*/\n\t\t}\n }", "private function connect()\n {\n //variable con el nombre del server\n $server = \"localhost\";\n //variable con el nombre de la base\n $database = \"candidatossv\";\n //variable con el usuario de la base\n $username = \"root\";\n //variable con la contra de la base\n $password = \"\";\n try {\n //realizando conexion\n @self::$connection = new PDO(\"mysql:host=$server; dbname=$database; charset=utf8\", $username, $password);\n } catch (PDOException $exception) {\n //mostrando el tipo de excepcion al realizar la conexion\n throw new Exception($exception->getCode());\n }\n }", "public function conexion(){\n\n $bbdd = $this->driver .':host='. $this->host . ';dbname=' . $this->database . ';charset=' . $this->charset;\n\n //$bbdd = ' mysql:host=localhost;dbname=mvc1;charset=utf8';\n try {\n $connection = new PDO($bbdd, $this->user, $this->pass);\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $connection;\n } catch (PDOException $e) {\n //Lanzamos la excepción\n throw new Exception('Problema al establecer conexión.');\n }\n }", "public function conectar(){\r\n try { //tratar a execucao do codigo\r\n //criar conexao com o PDO\r\n //new instanciar uma classe (gerar um novo objeto baseado na classe)\r\n $con = new PDO(\"mysql:host={$this->servidor};dbname={$this->banco};charset=utf8;\",$this->usuario, $this->senha);\r\n \r\n return $con; //retornando a conexao\r\n }catch(PDOException $msg){ // devolver mensagem caso de erro\r\n echo \"Nao possivel possivel conectar com o banco de dados {$msg->getMessage()}\";\r\n }\r\n \r\n }", "private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function connect(){\n try {\n $this->_dbh = new PDO('mysql:host='.$this->_host.';dbname='.$this->_db,$this->_user,$this->_pass);\n echo \"connexion reussi\";\n }\n catch(PDOException $e)\n {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "public function conectar()\n {\n if(!isset($this->conexion)){\n $this->conexion = (mysql_connect($this->localhost, $this->usuario,$this->password)) or die(mysql_error() );\n mysql_select_db($this->database , $this->conexion) or die(mysql_error()); \n }\n }", "function conectar(){\n global $Usuario;\n global $Clave;\n global $_SESSION;\n $this->dataOrdenTrabajo->SetUserName($Usuario);\n $this->dataOrdenTrabajo->SetUserPassword($Clave);\n $this->dataOrdenTrabajo->SetDatabaseName($_SESSION['database']);\n $this->dataOrdenTrabajo->setConnected(true);\n }", "public function connectToDB() {}", "protected function conectaBD(){\n\t\t$db_host= \"localhost\";\n\t\t$db_user= \"root\";\n\t\t$db_password= \"\";\n\t\t$db_name= \"transportApp\";\n\t\t$db = mysqli_connect($db_host,$db_user,$db_password,$db_name);\n\t\treturn $db;\n\t}", "function conectar() \n\t {\n\t\t//conectarme con el servidor de base de datos\n\t\t$con=mysql_connect($this->Servidor,$this->Usuario,$this->Clave);\n\t\t// si hubo problemas al conectarme con el servidor de base de datos\n\t\tif (!$con)\n\t\t{\n\t\t\tdie(\"Error al conectarme con el Servidor de Base de Datos\");\n\t\t}\n\t\t//Seleccionar la base de datos\n\t\t$bd=mysql_select_db($this->BaseDatos,$con);\n\t\t//error al seleccionar la base de datos\n\t\tif (!$bd)\n\t\t{\n\t\t\tdie(\"Error al seleccionar la Base de Datos\");\n\t\t}\n\t\t//almaceno la conexion en la propiedad conect\n\t\t$this->conect=$con;\n\t\t//devuelvo la conexion desde donde fue invocada\n\t\treturn true;\t\n\t}", "public function connect(){\n $this->database->connect($this->server, $this->login, $this->password, $this->db_name);\n if($this->database->connect_errno){\n return;\n }\n //nastavi kodovanie databazy na UTF-8\n $this->database->query(\"SET CHARACTER SET utf8\");\n $this->connected=true;\n }", "private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }", "public function connectDB() {}", "static public function conectar () {\n # tiene tres parametros\n\n $link = new PDO('mysql:host=localhost;dbname=aplicacionphp','root','');\n # var_dump($link);\n\n return $link;\n\n }", "function conectarBD ()\n{\n\ttry {\n\t\t$pdo= new PDO('mysql:host=127.0.0.1;dbname=tareas','root','');\n\t\treturn $pdo;\n\t\t} \n\t\tcatch(PDOException $e) \n\t\t{\n\t \tdd($e->getmessage());\n\t // con el operador -> se invocan las funciones de la clase \n\t}\n}", "public function ConectarBDD(){\r\n $this->conexion=pg_connect('dbname=sanjuanitas user=DBA password=12345678');\r\n if(!$this->conexion){\r\n echo json_encode(\"Error al intentar conectar la base de datos\");\r\n }\r\n }", "private function conectar_base_datos(){\n\t\t$this->descriptor = mysqli_connect($this->servidor,$this->usuario,$this->pass,$this->base_datos);\n\t\tif (mysqli_connect_errno()) {\n \t\t?>\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\">\n\t\t\t\talert (\"Falló conexión al servidor:<?php printf(\"%s\\n\", mysqli_connect_error());?>\"); \n\t\t\t</script>\n\t\t\t<?\n\t\t\texit();\n\t\t}\n\t}", "function conectar_bd() {\n\t\t$conexion_bd = mysqli_connect(\"localhost\",\"root\",\"\",\"almacenciasa\");\n\n\t\t//verificar si la base de datos se conecto\n\t\tif( $conexion_bd == NULL){\n\t\t\tdie(\"No se pudo conectar con la base de datos\");\n\t\t}\n\t\treturn $conexion_bd;\n\t}", "public static function conectar()\n {\n\n // $link->exec(\"set names utf8\");\n\n // // return $link;\n\n $link = new PDO(\"mysql:host=88.198.24.90;dbname=inventar_proyectofinal\", \"inventariosadsi\", \"SETQDnuHgv(_\");\n $link->exec(\"set names utf8\");\n return $link;\n\n $link->exec(\"set names utf8\");\n\n return $link;\n\n }", "function conexionBD()\r\n{\r\n\t\t\tdefine('DB_SERVER','localhost');\r\n\t\t\tdefine('DB_NAME','usuarios');\r\n\t\t\tdefine('DB_USER','root');\r\n\t\t\tdefine('DB_PASS','');\r\n\t\t\r\n\t\t\t$con = new mysqli(DB_SERVER,DB_USER,DB_PASS,DB_NAME);\r\n\t\t\tif ($con->connect_errno) \r\n\t\t\t{\r\n\t\t\t\techo \"EROOR AL CONCECTAR CON MySQL: (\" . $con->connect_errno . \") \" . $con->connect_error;\r\n\t\t\t}\r\n}", "function fconectar(){\n\t\t$this->conexion = new mysqli($this->servidor, $this->usuario, $this->pwd, $this->bd);\n\t\tif ($this->conexion->connect_error) {\n \t\tdie('Error de Conexión (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);\n\t\t}\t\t\n\t}", "function comprobarConexion(){\n if ($this->conexion->connect_errno) \n {\n echo \"Fallo al conectar a MySQL: (\" . $this->conexion->connect_errno . \") \" . $this->conexion->connect_error;\n }\n }", "function conectar () {\n $username = \"root\";\n $password = \"root\";\n try {\n $conn = new PDO ('mysql:host=localhost;dbname=its', $username, $password);\n } catch (Exception $errorConexion) {\n echo \"ERROR: $errorConexion\";\n }\n return $conn;\n }", "function conexion (){\r\n\t\t\r\n\t\ttry{\r\n\t\t\t$conexion=new PDO('mysql:host=localhost; dbname=socor', 'root', '');\r\n\t\t\t$conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t\t$conexion->exec(\"SET CHARACTER SET UTF8\");\t\t\t\r\n\t\t}catch(exception $e){\r\n\t\t\tdie(\"error gafo\" . getMessage());\t\t\t\r\n\t\t\techo \"linea del error gafo \" . $e->getLine();\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\treturn $conexion;\t\t\r\n\t}", "function comprobarConexion(){\n if ($this->conexion->connect_errno) {\n echo \"Fallo al conectar a MySQL: (\" . $this->conexion->connect_errno . \") \" . $this->conexion->connect_error;\n }\n }", "public function connectToDatabase(){\n\t\t$dbinfo=$this->getDBinfo();\n\n\t\t$host=$dbinfo[\"host\"];\n\t\t$dbname=$dbinfo[\"dbname\"];\n\t\t$user=$dbinfo[\"user\"];\n\t\t\n $pass=$this->getPassword();//don't share!!\n\n try{\n $DBH = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n $DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }catch(PDOException $e){\n $this->processException($e);\n }\n \n $this->setDBH($DBH);\n }", "final public function Selado ()\n {\n if(!self::$conn)\n {\n try\n {\n self::$conn = new PDO(\n $this->param['socket'].\n \":host=\".$this->param['endereco'].\n \";dbname=\".$this->param['bdados'].\n \";charset=\".$this->param['charset'].\n \";\",$this->param['usuario']\n ,$this->param['senha']);\n self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n self::$conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n } catch (PDOException $e)\n {\n print \"***********<br/><h3>Servidor de dados não responde!. <br/><a href=''>tente novamente...</a></h3> \";\n die(\"****************************\");\n }\n }\n }", "function conecta() {\n $conexao = mysql_connect(\"localhost\", \"root\", \"\") or die(\"Erro na conexão do banco de dados.\");\n $selecionabd = mysql_select_db(\"controlemotorista\", $conexao) or die(\"Banco de dados inexistente.\");\n return $conexao;\n }", "function conectar(&$enlace){\r\n\t\t\t\t$enlace=mysqli_connect(\"localhost\",\"root\",\"\");\r\n\t\t\t\tif($enlace==false)\r\n\t\t\t\t\tdie (\"No puede establecer la conexión<br>\");\r\n else echo\"CONEXIÓN REALIZADA\". \"<BR>\";\r\n\t\t\t\t//Seleccionar la base de datos\r\n\t\t\t\t$seleccion=mysqli_select_db($enlace,\"universidad\");\r\n\t\t\t\tif($seleccion==false)\r\n\t\t\t\t\tdie (\"No se pudo seleccionar la base de datos<br>\");\r\n else echo\"BASE DE DATOS SELECCIONADA\". \"<BR><BR>\";\r\n\t\t\t}", "private function databaseConnection()\n {\n // Les connexions sont établies en créant des instances de la classe de base de PDO\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }", "public function getConnexion(){\n $this->connexion = null; \n try{\n $this->connexion = new PDO('mysql:host=' . $this->host . ';dbname=' . $this->name,\n $this->user, $this->pass, array(PDO::MYSQL_ATTR_INIT_COMMAND =>'SET NAMES UTF8', \n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING, PDO::ATTR_EMULATE_PREPARES, false));\n }catch (PDOException $e){\n echo 'false';\n\n }\n }", "public function Connect() {\n\n try {\n //atribuindo usuario de acesso ao banco ao atributo user\n $this->user = \"root\";\n \n //atribuindo a senha de acesso ao banco no atributo pass\n $this->pass = \"\";\n\n //atribuindo o endereço do banco no atributoi host \n $this->host = \"localhost\";\n \n //atribuindo o nome do banco criado no atributo base\n $this->base = \"mydb\";\n\n\n\n $parametros = array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES UTF8\"); //Definimos a conexão com o banco no padrão URF-8\n\n\n\n // atribuindo os parametros de conexao no atrinuto file\n $this->file = \"mysql:host=\" . $this->host . \";dbname=\" . $this->base;\n\n //atribuido a linha de comando PDO(para iniciação na conexao) no atributo pdo\n $this->pdo = new PDO($this->file, $this->user, $this->pass, $parametros);\n\n\n\n //atribuindo os atributos complementares PDO no atributo pdo\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\n $this->pdo->setAttribute(PDO::ATTR_PERSISTENT, true);\n\n if (!$this->pdo) {\n echo \"Erro na conexão\";\n }\n \n return $this->pdo;\n } catch (PDOException $ex) {\n\n echo \"Erro no sistema\" . $ex->getMessage();\n }\n }", "public function conectar(){\r\n\t\t\t$con = mysqli_connect(HOST,USER,PASS,DB);\r\n\t\t\treturn $con;\r\n\t\t}", "public function connect(){\n\t\t$this->conn=mysqli_connect($this->host,$this->user,$this->pass); //menghubungkan ke localhost\n\t\tmysqli_select_db($this->conn,$this->database); //menghubungkan ke database\n\t\tif(!$this->conn){ //menghubungkan ke database\n\t\t\treturn die('Maaf, koneksi belum tersambung: '.mysqli_connect_error()); //Maaf,koneksi belum tersambung\n\t\t}\n\t}", "public function conectar(){\r\n\t\t$this->conexion=mysqli_connect(\"localhost\",\"root\",\"\",\"digitalgamesBD\");\r\n\t\t//$this->conexion=mysqli_connect(\"52.40.90.253:3306\",\"usuario\",\"dg5\",\"digitalgamesbd\");\r\n\t\treturn $this->conexion;\r\n\t}", "public function Conect_bbdd(){\n $conn=mysqli_connect($this->localhost, $this->user, $this->pass, $this->bbdd);\n \n //si la connexio es correcte mostrara Conectat a la bbdd sino error.\n if($conn)\n {\n echo json_encode(\"Conectat a la bbdd\") . \"<br>\";\n }\n else\n {\n die(json_encode(\"Connection failed: \" . mysqli_connect_error()));\n }\n\n return $conn;\n }", "private function openConnexion()\n {\n try {\n $bdd = new PDO($this->db, $this->login, $this->pass);\n $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $bdd->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n $this->connec = $bdd;\n // return $this->connec;\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function connect()\n {\n $data = $this->app->file->requireFile('config.php');\n extract($data);\n try {\n static::$DB = new PDO('mysql:host=' . $server . ';dbname=' . $dbname , $dbuser , $dbpass);\n\n static::$DB->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE , PDO::FETCH_OBJ);\n static::$DB->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n static::$DB->exec('SET NAMES utf8');\n\n }\n catch (PDOException $e){\n die($e->getMessage());\n }\n }", "function Conecta() {\r\n $conexao = mysqli_connect(\"mysql.hostinger.com.br\", \"u172114687_admin\", \"00Lavaauto\", \"u172114687_dados\");\r\n return $conexao;\r\n }", "public static function connect(){\n\n// con el this obtengo valores de fuera de esta funcion, luego a la variable se instancia con los valores de la conexion\n\t\t\t$connection_db = new mysqli (DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n// este if es para obtener datos en caso de tener algun error\n\t\t\tif($connection_db->connect_errno){\n\n\t\t\t\techo \"Fallo la conexion a la base de datos: \" . $connection_db->connect_error;\n\t\t\t\treturn;\n\t\t\t}// else{\n\t\t\t// \techo \"Conexion exitosa\";\n\t\t\t// \treturn $connection_db;\n\t\t\t// } solo en caso de querer probar el exito de la conexion\n\n// el charset es por si en la base de datos hay comas aqui se muestren tambien\n\t\t\t$connection_db->set_charset(DB_CHARSET);\n\t\t}", "function conexion(){\n $server = \"localhost\";\n $user = \"root\"; \n $pass = \"\";\n\n //$conexion = new mysqli($server, $user, $pass);\n try{\n $conexion = new PDO('mysql:host=localhost;dbname=tarea02', $user, $pass);\n echo \"conexion exitosa\";\n } catch (PDOException $e) {\n print \"¡Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n}", "function Conectar(){\n\n\n\t$servername = \"127.0.0.1\";\n\t$username = \"root\";\n\t$password = \"\";\n\t$dbname = \"normalizacion_beco_web\";\n\t\n\t\n\t// Create connection\n\t$conection = new mysqli($servername, $username, $password, $dbname);\n\t// Check connection\n\tif ($conection->connect_error) {\n\t\tdie(\"Connection failed: \" . $conection->connect_error);\n\t}else {\n\t\t//echo 'Connection OK '.$conection;\n\t}\n\treturn $conection;\n}", "function conexion(){\n\n\t\trequire(\"/home/cc409/pekes-tote/data/dbData.inc\");\n\t\t$conexion=new mysqli($host,$user,$pass,$database);\n\t\tif($conexion->connect_errno){\n \tdie('Error de Conexion '. $conexion->connect_errno .\" : \".$conexion->connect_error);\n }\n return $conexion;\n }", "function conexion(){\n $server = \"localhost\";\n $user = \"root\"; \n $pass = \"\";\n\n //$conexion = new mysqli($server, $user, $pass);\n try{\n $conexion = new PDO('mysql:host=localhost;dbname=tarea02', $user, $pass);\n // echo \"conexion exitosa\";\n } catch (PDOException $e) {\n print \"¡Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n}", "public function conectar(){\n\t\t\t\n\t\t\t\n\t\t\t$host = \"localhost\";\n\t\t\t$user = \"root\";\n\t\t\t$password = \"\";\n\t\t\t$database = \"ssca\";\n\t\t\t\n\t\t\n\t\t\t$conexion = mysqli_connect($host, $user, $password);\n\t\t\tmysqli_select_db($conexion, $database);\n\t\t\treturn $conexion;\n\t\t}", "function conectarse() {\n\t\tif(!($conexion = mysql_connect(\"localhost\", \"root\", \"\"))) {\n\t\t\techo \"Error al conectarse a la Base de datos\";\n\t\t\texit();\n\t\t}\n\t\tif(!mysql_select_db(\"precioscuidados\", $conexion)) {\n\t\t\techo \"Error al seleccionar a la Base de datos\";\n\t\t\texit();\n\t\t}\n\t\treturn $conexion;\n\t}", "function conectar()\n\t{\n $this->conexion = new \\mysqli($this->servidor,$this->usuario,$this->clave,$this->base) \n or die (\"Error de Conexion MySQL \".$this->conexion->connect_errno);\n $this->bandera = true;\n $this->conexion->set_charset(\"utf8\");\n return $this->conexion;\n }", "private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }", "static function conectar(){\n R::setup(\"mysql:host=\".CONFIG_HOST.\";dbname=\".CONFIG_BD,CONFIG_USER,CONFIG_PASS);\n\t\t\tself::$mysqli = new mysqli(CONFIG_HOST, CONFIG_USER, CONFIG_PASS, CONFIG_BD);\n\t\t\tself::$mysqli->set_charset('utf8');\n }", "function conexao_mysql(){\n\t\t$conexao = mysqli_connect($this->host, $this->usuario, $this->senha, $this->banco_de_dados);\n\n\t\t//ajustar o charset de comunicação entre a aplicação e o banco de dados recebe dois paramentros.\n\t\tmysqli_set_charset($conexao,'utf8');\n\n\t\t//verficar se houve algum erro de conexao com banco de dados.\n\t\t//mysqli_connect_errno = se nao for 0 existe sim um erro com banco de dados.\n\t\t//mysqli_connect_error = mensagem do erro.\n\t\tif(mysqli_connect_errno()){\n\t\t\techo 'Erro ao tentar se conectar com banco de dados:'.mysqli_connect_error();\n\t\t}\n\t\t\n\t\treturn $conexao;\n\t}", "protected function start(){\n\t\n\t\t\t$this->con = new PDO(\"mysql:host=$this->host;dbname=$this->banco;\", \"$this->user\" , \"$this->senha\");\n\t\t}", "public function connect_db() {\n }", "function conectar()\n\t\t{\n\t\t\t//$connectionInfo = array(\"Database\"=>$this->db, \"UID\"=>$this->user, \"PWD\"=>$this->pass);\n\n\t\t\t$connectionInfo = array(\"Database\"=>$this->db);\n\t\t\t$this->conexion = sqlsrv_connect($this->server,$connectionInfo);\n\t\t\tif(!$this->conexion)\n\t\t\t{\n\t\t\t\techo \"Error al Conectar\";\n\t\t\t\tdie( print_r( sqlsrv_errors(), true));\n\t\t\t}\n\t\t}", "private function openConnection() {\n $this->db = new PDO(\"mysql:host=127.0.0.1;dbname=mvc\", \"gert\", \"becode\");\n }", "static public function conectar(){\n /* SE CREA UN OBJETO LLAMADO PDO */\n $link = new PDO(\"mysql:host=localhost;dbname=sefaureo2\",\n \"jaengine_sef219\",\n \"yD$4QM4LJ2s2\");\n\n /* LA FUNCION EXEC SIRVE PARA QUE ACEPTE LOS CARACTERES LATINOS */\n $link->exec(\"set names utf8\");\n \n return $link;\n\n }", "function conexionBD()\n\t\t{\n\t\t\t\t$mysqli=mysqli_connect(\"127.0.0.1\",\"root\",\"iu\",\"iu2\");\n\t\t\t\tif(!$mysqli)\n\t\t\t\t{\n\t\t\t\t\techo \"Error: No se pudo conectar a MySQL.\" . PHP_EOL;\n \t\t\t\techo \"error de depuración: \" . mysqli_connect_errno() . PHP_EOL;\n \t\t\t\techo \"error de depuración: \" . mysqli_connect_error() . PHP_EOL;\n \t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\treturn $mysqli;\n\t\t}", "private function connectDB()\n\t{\n\t\t$this->db = ECash::getMasterDb();\n\t\t\n\t//\t$this->dbconn = $this->db->getConnection();\n\t}", "public function connect() {\n if ($this->db == null) {\n $this->db = new mysqli($this->host_name, $this->user_name, $this->password, $this->db_name);\n if ($this->db->connect_errno > 0) {\n throw new Eccezione(\"C'è stato un errore nella connessione con il database. L'errore che si è verificato è il seguente: \" . $this->db->connect_error);\n } else {\n $this->is_connected = TRUE;\n }\n }\n }", "private function connect()\n\t{\n\t\t$connectionData = $this->app->file->requireFile('config.php');\n\t\t\n\t\textract($connectionData);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tstatic::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\n\t\t\tstatic::$connection->exec('SET NAMES utf8');\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\t\t\t\t\n\t}", "function conectar(){\n // USER : u402480197_melredes\n // SENHA : K#f:S>F9o\n\n\n $host= \"mysql:host=localhost;dbname=melprotecoes\";\n $user= \"root\";\n $pass= \"\";\n\n try {\n $pdo= new PDO($host, $user, $pass);\n return $pdo;\n } catch (PDOException $e) {\n echo \"Erro de login: \" . $e->getMessage();\n } catch (Exception $e) {\n echo \"Erro: \" . $e->getMessage();\n }\n\n }", "function conectarBD() {\n $conexion = mysqli_connect(\"localhost\", \"id10812361_root\", \"12345\", \"id10812361_sgv\");\n return $conexion;\n}", "function conexion(){\n $conexion=mysqli_connect(\n\n\n $this ->servidor,\n $this ->usuario,\n $this ->contraseña,\n $this ->BaseDatos\n\n\n );\n\n //return deuelve un objeto a la conexion\n return $conexion;\n }", "public function conectarBanco(){\n try{\n //instanciamos a classe nativa PDO\n $conexao = New PDO(\n //driveconexao: host=nome_host;dbname=nome_banco, \n \"mysql:host=$this->host;dbname=$this->dbname\",\n \"$this->usuario\",\n \"$this->senha\"\n );\n\n return $conexao;\n\n } catch (PDOException $e) {\n echo '<p>' . $e->getMessage() . '</p>';\n\n }\n }", "function conectarse()\n{\n$enlace =mysqli_connect(\"localhost\",\"Kim\", \"revick93\",\"dbweb\");//nombreservidor, usuario,contraseña,nombre base datos\nif (!$enlace)\n {\n\n\techo \"ERROR: No se pudo conectar a MYSQL\".PHP_EOL;\n\techo \"ERROR de depuracion\".mysqli_connect_error().PHP_EOL;\n\techo \"ERROR de depuracion\".mysqli_connect_error().PHP_EOL;\n\texit;\t\n\n }\n mysqli_close($enlace);\n}", "private function dbConnection() {\r\n //if (!is_resource($this->connessione))\r\n // $this->connessione = mysql_connect($this->db_server,$this->db_username,$this->db_pass) or die(\"Error connectin to the DBMS: \" . mysql_error());\r\n if (!is_resource($this->connessione)) {\r\n try {\r\n $this->connessione = new PDO($this->db_type . \":dbname=\" . $this->db_name . \";host=\" . $this->db_server, $this->db_username, $this->db_pass);\r\n //echo \"PDO connection object created\";\r\n $this->setupSQLStatement();\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n }\r\n }", "private function connect()\n {\n $connection_string = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';';\n $this->connection = new PDO($connection_string, DB_USER, DB_PASS);\n }", "public function connToDB(){\n $this->conn=new mysqli(\"localhost\",\"root\",\"SQLroot\",\"Dispensary\");\n if(($this->conn)->connect_error){\n return 0;\n }\n }", "private static function connect(){\n try{\n $conn_data = json_decode(file_get_contents(__DIR__.\"/../config/connection.json\"), true);\n self::$connection = new PDO($conn_data['CONN_STRING'], $conn_data['DB_USER'], $conn_data['DB_PASS']);\n\t\t} catch (PDOException $e){\n\t\t\techo \"Database error: \".$e->getMessage();\n\t\t\tdie();\n\t\t}\n }", "private function dbConnect(){\n\t\t\t$mysqli = $this->mysqli = new mysqli(self::DB_SERVER, self::DB_USER, self::DB_PASSWORD, self::DB);\n mysqli_set_charset($mysqli, \"utf8\");\n if ($mysqli->connect_errno) {\n $this->response('', 204); // server error \n }\n\t\t}", "function conectar(){\n $this->conexion_bd = pg_connect(\"host=190.109.100.36 port=5432 dbname=scdat user=postgres password=invepal1nv3p4l\") or die('No pudo conectarse: ' . pg_last_error());\n// $this->conexion_bd = pg_connect(\"host=localhost port=5432 dbname=scdat user=postgres password=l4v1rg3n\") or die('No pudo conectarse: ' . pg_last_error());\n return ($this->conexion_bd);\n }", "function conectar() {\r\n\t\n\t$conexion = mysql_connect(constant(\"HOST_NAME\"),constant(\"USUARIO_BD\"),constant(\"PASS_BD\"));\r\n\tmysql_select_db(constant(\"BD\"),$conexion);\r\n\t\r\n\treturn $conexion;\r\n}", "public function connect():void\n {\n try{\n $this->pdo = new PDO('mysql:host='.\n $this->settingsBDD['host'].';dbname='.$this->settingsBDD['dbname'],\n $this->settingsBDD['user'],\n $this->settingsBDD['password'],\n [\n PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC,\n PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8mb4\",\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ]\n );\n }catch(PDOException $e){\n print \"Erreur!\".$e->getMessage().\"<br>\";\n die();\n }\n\n }", "public function conectionDB(){\n $mysqlConnect = \"mysql:host=$this->dbHost;dbname=$this->dbName\";\n $dbConnection = new PDO($mysqlConnect,$this->dbUser,$this->dbPass);\n $dbConnection -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $acentos = $dbConnection->query(\"SET NAMES 'utf8'\");\n return $dbConnection;\n\n }", "private function connect(){\n\t\t\t$this->conn = mysql_connect($this->host, $this->user, $this->pass) or die(\"dbGreska (conn)\"); \n\t\t\tmysql_select_db($this->db_name, $this->conn) or die(\"dbGreska (select)\");\n\t\t\tmysql_query(\"SET NAMES UTF8\");\n\t\t}", "function conecta_alumno($nombrebase) {\n\n // --- Realizar la conexion\n @ $db = mysqli_pconnect($mihost,\"PequeLiante\",\"H@y59ONGs\"); \n\n if (!$db){\n echo mensaje_error('No se ha podido abrir la base de datos. Inténtelo más tarde',1);\n exit;\n }\n\n // --- Abrir la base de datos\n $mibase = mysqli_select_db($nombrebase);\n\n if (!$mibase){\n echo mensaje_error('No existe la base de datos donde se almacena la información. Inténtelo más tarde',1);\n exit;\n }\n }", "function connetti(&$db) {\n\tglobal $host, $user, $pass, $nomedb;\n\t$db = new mysqli($host, $user, $pass, $nomedb);\n\tif (mysqli_connect_errno()) {\n\t\techo 'Connessione fallita';\n\t\texit ;\n\t}\n}", "public function connexion(){\n $db = new PDO(\"mysql:host=localhost;dbname=human_helps\",'root','');\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }", "private function dbconnect()\n {\n $this->db = new mysqli(Config::$dbhost, Config::$dbuser, Config::$dbpass, Config::$database);\n if (mysqli_connect_errno()) {\n Log::info(sprintf(\"Connect failed: %s\\n\", mysqli_connect_error()));\n exit();\n }\n }", "protected function connect(){\n $dsn = \"mysql:host=\".$this->servidor.\";dbname=\".$this->base_datos;\n // Creamos un objeto pdo que crea la conexion con la base de datos\n $db = new PDO($dsn, $this->user, $this->pswd);\n // Añadimos un atributo que hara que los datos que nos devuelva la base de datos\n // se agrupen en forma de array asociativo\n $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n // Devolvemos el objeto db\n return $db;\n }", "private static function Conectar() {\n try {\n if (self::$Connect == null):\n $dsn = 'mysql:host=' . self::$Host . ';dbname=' . self::$Dbsa;\n $options = [ PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8'];\n self::$Connect = new PDO($dsn, self::$User, self::$Pass, $options);\n endif;\n } catch (PDOException $e) {\n PHPErro($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());\n die;\n }\n\n self::$Connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return self::$Connect;\n }", "public function conexion()\r\n\t{\r\n\t\tif($this->driver=='mysql' || $this->driver==null)\r\n\t\t{\r\n\t\t\t$con = new mysqli($this->host, $this->user, $this->pass, $this->database);\r\n\r\n\t\t\t//se setea el tipo de acotejamiento\r\n\r\n\t\t\t$con->query(\"SET NAMES\".$this->charset);\r\n\t\t}\r\n\r\n\t\treturn $con;\r\n\t}", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}", "public static function connect()\n {\n try {\n $db_host = DbConfig::$host_url;\n $db_name = DbConfig::$database_name;\n $db_user = DbConfig::$database_user;\n $user_pw = DbConfig::$password;\n \n $con = new PDO('mysql:host='.$db_host.'; dbname='.$db_name, $db_user, $user_pw); \n $con->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n $con->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ );\n $con->setAttribute( PDO::ATTR_EMULATE_PREPARES, false );\n $con->exec(\"SET CHARACTER SET utf8\");\n\n return $con;\n }\n catch (PDOException $err) { \n $err->getMessage() . \"<br/>\";\n file_put_contents(__DIR__.'/log/PDOErrors.txt', $err.PHP_EOL.PHP_EOL, FILE_APPEND);\n die( $err->getMessage());\n }\n }", "private static function conectar()\n {\n include_once 'config.php';\n try {\n $con = new PDO(DSN, USER, PASS);\n //Cambiamos sus atributos\n $con->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); //Desactivamos la emulación de preparadas\n $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); //Establecemos modo error para lanzar excepciones\n return $con;\n } catch (PDOException $e) {\n die('No he podido conectarme a la BD Error: ' . $e->getMessage() . 'Línea: ' . $e->getLine());\n }\n }", "protected function connectionBD(){\n try {\n $bd = new PDO('mysql:host=localhost;dbname=sistema', 'root', '');\n return $bd;\n } catch (PDOException $error) {\n return $error->getMessage();\n }\n }", "private function Connect()\n {\n $config = ConfigDb::dbConfig();\n $dsn = 'mysql:dbname='.$config['database'].';host='.$config['host'];\n try\n {\n $this->pdo = new PDO($dsn, $config['username'], $config['password'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);\n $this->bConnected = true;\n }\n catch (PDOException $e)\n {\n echo $this->ExceptionLog($e->getMessage());\n die();\n }\n }", "public static function conectar() {\n\t\t$options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\");\n\n\t\t$link = new PDO(\"mysql:host=localhost;dbname=ecommerce_php\", \"root\", \"\", $options);\n\n\t\treturn $link;\n\n\t}" ]
[ "0.82985485", "0.8021048", "0.8020601", "0.7925399", "0.79222584", "0.78918356", "0.7837028", "0.7798241", "0.7781498", "0.7745928", "0.7728946", "0.77138495", "0.76894933", "0.760983", "0.7603191", "0.7562865", "0.7521866", "0.748938", "0.74585193", "0.7456362", "0.7439002", "0.7431938", "0.7426678", "0.74243534", "0.74019665", "0.7400315", "0.7388475", "0.7349748", "0.73497075", "0.73480994", "0.73434865", "0.73137665", "0.73084295", "0.7299138", "0.72990817", "0.72859937", "0.7284883", "0.7267628", "0.72586864", "0.7247154", "0.7238218", "0.72378004", "0.7232236", "0.722331", "0.71979123", "0.7197071", "0.7191055", "0.71854615", "0.7175027", "0.7174875", "0.71670985", "0.7158244", "0.71574336", "0.7156721", "0.7137845", "0.7131672", "0.7126957", "0.7124935", "0.71184844", "0.71144354", "0.71025586", "0.7101336", "0.7095832", "0.7088963", "0.7082349", "0.70813346", "0.7080183", "0.7073966", "0.70723295", "0.70671296", "0.70609546", "0.7058508", "0.7057249", "0.7050932", "0.7050667", "0.7050256", "0.7042518", "0.7039721", "0.7037191", "0.70307815", "0.7028149", "0.7017254", "0.7007326", "0.70003396", "0.6995215", "0.699299", "0.69863105", "0.6977358", "0.6976297", "0.6970273", "0.69667155", "0.69568354", "0.6952157", "0.694519", "0.69415593", "0.69401634", "0.6930877", "0.6930216", "0.6924288", "0.6921571", "0.69194585" ]
0.0
-1
Get y Set de $codigo
public function getcodigo() { return $this->codigo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCodigo($codigo){\n $this->codigo = $codigo;\n }", "public function setCodigo($codigo)\n {\n $this->codigo = $codigo;\n }", "public function setCodigo($codigo)\n {\n $this->codigo = $codigo;\n }", "public function asignarCodigo($codigo){\n\t\t$this->codigo = $codigo;\n\t}", "public function setCodice($codice) \n\t{\n $this->codice = $codice;\n }", "private function setCodigo($iCodigo) {\n $this->iCodigo = $iCodigo;\n }", "public function setCodigo($iCodigo) {\n $this->iCodigo = $iCodigo;\n }", "public function setCodigo($iCodigo) {\n $this->iCodigo = $iCodigo;\n }", "public function getCodigo(){\n return $this->codigo;\n }", "public function setCodiNoti($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_noti = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function setCodigo($iCodigo) {\n $this->iCodigo = $iCodigo;\n }", "public function setCodare($codare){\n\t\t$this->codare = $codare;\n\t}", "public function setCodigo($codigo)\n {\n $this->codigo = $codigo;\n\n return $this;\n }", "private function setCodigoOrdem($iCodigoOrdem){\n $this->iCodigoOrdem = $iCodigoOrdem;\n }", "function setChangeCodigo($numero_nuevo){\n\t\t\t$numero_socio \t= $this->mCodigo ;\n\t\t\t\n\t\t\t$xQL\t\t\t= new MQL();\n\t\t\t$msg = \"\";\n\t\t\t$msg .= \"================== MODIFICANDO UN NUMERO DE SOCIO \\r\\n\";\n\t\t\t$msg .= \"================== SE ACTUALIZA DEL $numero_socio AL $numero_nuevo \\r\\n\";\n\n\t\t\t$var[\"aml_alerts\"]\t\t\t\t\t= \"persona_de_destino\";\n\t\t\t$var[\"aml_risk_register\"]\t\t\t= \"persona_relacionada\";\n\t\t\t$var[\"bancos_operaciones\"]\t\t\t= \"numero_de_socio\";\n\t\t\t$var[\"captacion_cuentas\"]\t\t\t= \"numero_socio\";\n\t\t\t$var[\"captacion_sdpm_historico\"]\t= \"numero_de_socio\";\n\t\t\t$var[\"contable_polizas_proforma\"]\t= \"socio\";\n\t\t\t$var[\"creditos_flujoefvo\"]\t\t\t= \"socio_flujo\";\n\t\t\t$var[\"creditos_garantias\"]\t\t\t= \"socio_garantia\";\n\t\t\t$var[\"creditos_lineas\"]\t\t\t\t= \"numero_socio\";\n\t\t\t$var[\"creditos_parametros_negociados\"]\t= \"numero_de_socio\";\n\t\t\t$var[\"creditos_sdpm_historico\"]\t\t= \"numero_de_socio\";\n\t\t\t$var[\"creditos_solicitud\"]\t\t\t= \"numero_socio\";\n\t\t\t\n\t\t\t$var[\"general_sucursales\"]\t\t\t= \"clave_de_persona\";\n\t\t\t$var[\"operaciones_mvtos\"]\t\t\t= \"socio_afectado\";\n\t\t\t$var[\"operaciones_recibos\"]\t\t\t= \"numero_socio\";\n\t\t\t\n\t\t\t$var[\"personas_documentacion\"]\t\t= \"clave_de_persona\";\n\t\t\t$var[\"personas_perfil_transaccional\"]\t= \"clave_de_persona\";\n\t\t\t$var[\"seguimiento_compromisos\"]\t\t= \"socio_comprometido\";\n\t\t\t$var[\"seguimiento_llamadas\"]\t\t= \"numero_socio\";\n\t\t\t$var[\"seguimiento_notificaciones\"]\t= \"socio_notificado\";\n\t\t\t$var[\"socios_aeconomica\"]\t\t\t= \"socio_aeconomica\";\n\t\t\t$var[\"socios_aeconomica_dependencias\"]\t= \"clave_de_persona\";\n\t\t\t$var[\"socios_aportaciones\"]\t\t\t= \"numero_socio\";\n\t\t\t$var[\"socios_baja\"]\t\t\t\t\t= \"numero_de_socio\";\n\t\t\t$var[\"socios_cajalocal\"]\t\t\t= \"ultimosocio\";\n\t\t\t$var[\"socios_firmas\"]\t\t\t\t= \"numero_de_socio\";\n\t\t\t$var[\"socios_general\"]\t\t\t\t= \"codigo\";\n\n\t\t\t$var[\"socios_grupossolidarios\"]\t\t= \"clave_de_persona\";\n\t\t\t$var[\"socios_memo\"]\t\t\t\t\t= \"numero_socio\";\n\t\t\t$var[\"socios_otros_parametros\"]\t\t= \"clave_de_persona\";\n\t\t\t$var[\"socios_patrimonio\"]\t\t\t= \"socio_patrimonio\";\n\t\t\t$var[\"socios_relaciones\"]\t\t\t= \"socio_relacionado\";\n\t\t\t\n\t\t\t$var[\"socios_scoring_simple\"]\t\t= \"numero_socio\";\n\t\t\t$var[\"socios_vivienda\"]\t\t\t\t= \"socio_numero\";\n\t\t\t$var[\"t_03f996214fba4a1d05a68b18fece8e71\"]\t= \"codigo_de_persona\";\n\t\t\t$var[\"tesoreria_cajas_movimientos\"]\t= \"persona\";\n\t\t\t$var[\"usuarios\"]\t\t\t\t\t= \"codigo_de_persona\";\n\t\t\t$var[\"usuarios_web_notas\"]\t\t\t= \"socio\";\n\t\t\tforeach ($var as $tabla => $campo){\n\t\t\t\t$msg\t.= \"WARN\\tCambiar Registros de la Tabla $tabla, Campo $campo de $numero_socio a $numero_nuevo\\r\\n\";\n\t\t\t\t$xQL->setRawQuery(\"UPDATE $tabla SET $campo = $numero_nuevo WHERE $campo = $numero_socio\");\n\t\t\t}\n\t\t\t$var2[\"aml_alerts\"]\t\t\t\t\t= \"persona_de_origen\";\n\t\t\t$var2[\"creditos_solicitud\"]\t\t\t= \"persona_asociada\";\n\t\t\t$var2[\"operaciones_recibos\"]\t\t\t= \"persona_asociada\";\n\t\t\t$var2[\"socios_relaciones\"]\t\t\t= \"numero_socio\";\n\t\t\t$var2[\"socios_grupossolidarios\"]\t\t= \"representante_numerosocio\";\n\t\t\t//$var2[\"socios_grupossolidarios\"]\t\t= \"vocalvigilancia_numerosocio\";\t\t\t\n\t\t\tforeach ($var2 as $tabla => $campo){\n\t\t\t\t$msg\t.= \"WARN\\tCambiar Registros de la Tabla $tabla, Campo $campo de $numero_socio a $numero_nuevo\\r\\n\";\n\t\t\t\t$xQL->setRawQuery(\"UPDATE $tabla SET $campo = $numero_nuevo WHERE $campo = $numero_socio\");\n\t\t\t}\n\t\treturn $msg;\n\t}", "function setCausaleEvasione($codice)\n {\n $this->cauEvasione = $codice; \n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function setCodiCasa($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_casa = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function getCodigo()\n {\n return $this->codigo;\n }", "function set_idioma($code = 'es')\n\t{\n\t\tif ($code != '' && $code != $this->config->item('language'))\n\t\t{\n\t\t\t$this->config->set_item('language', $code);//CAMBIO EL IDIOMA DEL CONFIG\n\t\t}\n\t\t$this->session->set_userdata('idioma',$code); //adicional por hector en 30/10/2013 para sol y luna\n\t\t$this->session->set_userdata('id_idioma',$this->idioma_model->get_id($code));//AGREGADO POR HECTOR\n\t}", "public function setCodiEmis($value) {\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_emis = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function setCode($code);", "public function setCode($code);", "public function setCodigo($rg_codigo){\n\t\t$this->rg_codigo = $rg_codigo;\n\t}", "function setCodigoMovimentos($aCodigosMovimentos) {\n $this->aCodigoMovimentos = $aCodigosMovimentos; \n }", "function getCodUsu() {\n return $this->codUsu;\n }", "public function getCodice() \n\t{\n return $this->codice;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodare(){\n\t\treturn $this->codare;\n\t}", "public function setCodProy($codProy) {\n $this->codProy = $codProy;\n }", "public function set_taplicacion_codigo(string $taplicacion_codigo): void {\n $this->taplicacion_codigo = $taplicacion_codigo;\n }", "public function getCodice()\n {\n return $this->codice;\n }", "function setEstanteria($_codigoEstanteria){\r\n $this->estanteria=$_codigoEstanteria;\r\n }", "public function getCodiceFiscale(){ return $this->codiceFiscale;}", "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "public function _setCodigoCliente($entregableid, $codigo_cliente)\n {\n $id = (int)$entregableid;\n $row = $this->fetchRow('cod_le = ' . $id);\n if (!$row) {\n throw new Exception(\"No hay resultados para ese transmittal\");\n }\n $row->codigo_cliente = $codigo_cliente;\n $row->save();\n if ($row->codigo_anddes != null && $row->codigo_anddes != '' &&\n $row->codigo_cliente != null && $row->codigo_cliente != '' &&\n $row->estado_entregable != 7) {\n $row->estado_entregable = 7;\n }\n $row->save();\n }", "public function setCodServico($cod_servico)\n {\n $this->cod_servico = $cod_servico;\n\n return $this;\n }", "public function setIdempresa($idempresa){\n $this->idempresa = $idempresa;\n }", "public function setCode(int $code)\n{\n self::$stored['codes'][] = $code;\n http_response_code($code);\n}", "public function modificarEstadoDocumetoCodigoAsociado($codigo,$estado){\n $filter->COMPGUI_FlagEstado = $estado;\n $where = array(\"CPP_Codigo\" => $codigo);\n $this->db->where($where);\n $this->db->update('cji_comprobante_guiarem', (array) $filter);\n }", "public function setCode($code)\n {\n $this->code = (int) $code;\n\n return $this->mergeData([static::codeKey() => $this->code]);\n }", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function setCode($code)\n\t{\n\t\t$this->code = (int) $code;\n\t}", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "public function setCode($code) { $this->code = (int)$code; return $this; }", "public function testSetCode() {\n\n $obj = new TestIntegerCodeTrait();\n\n $obj->setCode(1);\n $this->assertEquals(1, $obj->getCode());\n }", "public function SetIdConvocatoria($valor){\n\t\t $this->id_convocatoria= $valor;\n\t }", "public function getCodigo(){\n\t\treturn $this->rg_codigo;\n\t}", "public function setCodope($codope){\n\t\t$this->codope = $codope;\n\t}", "public function get($codigo=\"\"){\n if($codigo!=\"\"){\n $this->parametros = array($codigo);\n $this->sp = \"str_consultaBanco_info\";\n $this->executeSPConsulta();\n }\n\n if (count($this->rows)>=1){\n foreach($this->rows[0] as $propiedad=>$valor){\n $this->$propiedad=$valor;\n }\n $this->mensaje=\"Banco encontrado\";\n }else{\n $this->mensaje=\"Banco no encontrado\";\n }\n }", "public function setCodProy($codProy) {\n $this->codProy = $codProy;\n }", "public function setVida($valor){\n $this->vida=$valor;\n }", "public function testSetCodeClient() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "public function set_paises_codigo($paises_codigo) {\n $this->paises_codigo = $paises_codigo;\n }", "public function __construct(){\n $this->idade = 10;\n }", "public function setCodage($codage)\n {\n $this->codage = $codage; return $this;\n }", "public function setCode($code)\n {\n $this->code = $code;\n }", "public function testSetCodeChantier() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setCodeChantier(\"codeChantier\");\n $this->assertEquals(\"codeChantier\", $obj->getCodeChantier());\n }", "function __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}", "function getCodUsuario() {\n return $this->codUsuario;\n }", "public function __set($propriedade, $valor) {\n $this->data[$propriedade] = $valor;\n }", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "function setIdCliente($id_cliente)\r\n\t {\r\n\t\t $this->id_cliente = $id_cliente;\r\n\t }", "public function editar($codigo)\n {\n echo \"<br>Editar:\".$codigo;\n $parametros = DB::table('parametros')->get();\n $items = DB::table('menus')->get();\n $infoCabecera_ = DB::table('cotizacioninternas')\n ->where('codigo',$codigo)\n ->get(); \n $infoCabecera = [\n 'codigo' => $infoCabecera_[0]->codigo,\n 'usuario' => $infoCabecera_[0]->usuario,\n 'total' => $infoCabecera_[0]->total,\n 'observaciones' => $infoCabecera_[0]->descripcion,\n 'nombre' => $infoCabecera_[0]->nombre];\n\n\n $carritoCotizacion = DB::table('cotizacioninternas_detalle')\n ->where('codigo',$codigo)\n ->get(); \n return view(\"admin.adminCotizacionInternoEditar\",compact('parametros','items','infoCabecera','carritoCotizacion')); \n \n \n }", "public function testSetCode() {\n\n $obj = new Collaborateurs();\n\n $obj->setCode(\"code\");\n $this->assertEquals(\"code\", $obj->getCode());\n }", "public function setArticulo($nombre, $codigo, $descripcion, $alto, $ancho, $largo, $diametro, $peso, $empaque, $categoria, $tipo) {\n\t\trequire_once 'phputils/mysqlConexion.php';\n\t\t/*$nombre = strtolower($nombre);\n\t\t$codigo = strtolower($codigo);\n\t\t$descripcion = strtolower($descripcion);*/\n\t\t\n\t\t$newArticulo = new Articulos;\n\t\t$newArticulo -> nombre = $nombre;\n\t\t$newArticulo -> codigo = $codigo;\n\t\t$newArticulo -> descripcion = $descripcion;\n\t\tif ($alto != null)\n\t\t\t$newArticulo -> alto = $alto;\n\t\tif ($ancho != null)\n\t\t\t$newArticulo -> ancho = $ancho;\n\t\tif ($largo != null)\n\t\t\t$newArticulo -> largo = $largo;\n\t\tif ($diametro != null)\n\t\t\t$newArticulo -> diametro = $diametro;\n\t\tif ($peso != null)\n\t\t\t$newArticulo -> peso = $peso;\n\t\tif ($empaque != null)\n\t\t\t$newArticulo -> empaque = $empaque;\n\t\t$today = time() - 18720; \n\t\t$mysqldate = date('Y-m-d h:i:s',$today);\n\t\t$newArticulo -> fechaingreso = $mysqldate;\n\t\t$newArticulo -> categoria = $categoria;\n\t\t$newArticulo -> tipo = $tipo;\n\n\t\ttry {\n\t\t\t$newArticulo -> save();\n\t\t\treturn $newArticulo -> id;\n\t\t} catch (Exception $e) {\n\t\t\treturn 'false';\n\t\t} \n\t\t\n\t}", "public function getIdempresa(){\n return $this->idempresa;\n }", "function setSumarPais(){\n\t\t$this->cantidad_paises++;\n\t}", "public function enviar_codigo($cliente)\n {\n if (Config::get('params.enviar_codigo_correo'))\n {\n $numero = rand(1000, 9999) . \"-\" . rand(1000, 9999) . \"-\" . rand(1000, 9999);\n $codigo = new Codigo;\n $codigo->numero = $numero;\n $codigo->usado = false;\n $codigo->cliente()->associate($cliente);\n if ($codigo->save())\n {\n $data = array('nombre' => $cliente->nombre,\n 'codigo' => $numero,\n );\n $email = $cliente->user->email;\n $nombre = $cliente->nombre;\n Mail::queue('emails.send_promotional_code', $data, function($message) use ($email, $nombre) {\n $message->to($email, $nombre)->subject('Código promocional');\n });\n return true;\n }\n else\n {\n return false;\n }\n }\n }", "public function getCodServico()\n {\n return $this->cod_servico;\n }", "public static function getByCodigoEntidad($codigo){\n $e = new Entidad();\n\t\t$conexion = new Database();\n\t\t$sql = sprintf( \"SELECT * FROM agenda_entidades where entidad_id = %d\", $codigo );\n\t\t$rows = $conexion->query( $sql );\n\t\t\n\t\tif( $rows->rowCount() == 0 )\n\t\t\treturn null;\n\t\telse{\n\t\t\t$e = new Entidad();\n\t\t\t$row = $rows->fetch();\n\t\t\t$e->entidad = $row['ENTIDAD'];\n $e->codigo = $codigo;\n\t\t\treturn $e;\n\t\t}\n\t}", "function getId_carrera(){\n\t\treturn $this->id_carrera;\n\t}", "public function setCode($code)\n {\n $this->data[1] = (string)$code;\n return $this->data[1];\n }", "public function setIdusuario($value){\n $this->idusuario = $value;\n }", "public function setProducto($pro){ $this->producto = $pro;}", "public function getCodigoOrdem(){\n return $this->iCodigoOrdem;\n }", "public function getCodage()\n {\n return $this->codage;\n }", "public function setCodCliente($codCliente) {\n $this->codCliente = $codCliente;\n return $this;\n }", "function setComprobantePagoARegistroPago() {\n\t\tglobal $bd;\t\t\n\t\tglobal $x_correlativo_comprobante;\n\t\t$correlatico_comprobante = $x_correlativo_comprobante;\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$id_registro_pago = $_POST['idregistro_pago'];\n\n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\t\n\t\t$sqlrp=\"update registro_pago set idtipo_comprobante_serie=\".$idtipo_comprobante_serie.\" where idregistro_pago=\".$id_registro_pago;\n\t\t$idregistro_pago=$bd->xConsulta_NoReturn($sqlrp);\n\t}", "function _set_id( $idGrupo ){\n \t\t$this->idGrupo = $idGrupo;\n }", "public function getCidade(){\n return $this->cidade;\n }", "protected function setCodigo($iCodHistBem) {\n $this->iHistBem = $iCodHistBem;\n }", "public function testSetCodeVentilCompta() {\n\n $obj = new Collaborateurs();\n\n $obj->setCodeVentilCompta(\"codeVentilCompta\");\n $this->assertEquals(\"codeVentilCompta\", $obj->getCodeVentilCompta());\n }", "public function testSetNumero() {\n\n $obj = new Collaborateurs();\n\n $obj->setNumero(\"numero\");\n $this->assertEquals(\"numero\", $obj->getNumero());\n }", "public function setCode($code)\r\n {\r\n $this->code = (int) $code;\r\n return $this;\r\n }", "public function getCodCliente()\n {\n return $this->codCliente;\n }", "function setAmocrmCode(string $code): void {\n\t}", "public function datos_empresa_controlador($tipo,$codigo){\n\t\t$codigo=mainModel::decryption($codigo);\n\t\t$tipo=mainModel::limpiar_cadena($tipo);\n\n\t\treturn empresaModelo::datos_empresa_modelo($tipo,$codigo);\n\t}", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function getCodUbicacion()\n {\n return $this->codUbicacion;\n }", "public function getCodPersona()\n {\n return $this->codPersona;\n }", "public function setCodGenero($cod_genero)\n {\n $this->cod_genero = $cod_genero;\n\n return $this;\n }" ]
[ "0.79133844", "0.75222516", "0.75222516", "0.7259844", "0.70875806", "0.7014087", "0.69622695", "0.69622695", "0.6841414", "0.6664111", "0.6624511", "0.65522164", "0.6419159", "0.63785225", "0.63516206", "0.6350782", "0.6307545", "0.6307545", "0.6307545", "0.6305509", "0.63048065", "0.62979317", "0.6231843", "0.62134093", "0.62134093", "0.6204557", "0.6136752", "0.6127384", "0.6118163", "0.6114672", "0.6114672", "0.6114672", "0.6114672", "0.6114672", "0.5991454", "0.59703475", "0.5969864", "0.5963898", "0.5959245", "0.59389675", "0.59244007", "0.5907597", "0.59041095", "0.59038967", "0.590306", "0.5894201", "0.5892295", "0.58739126", "0.5870984", "0.5852958", "0.58330834", "0.58233684", "0.57907206", "0.57905996", "0.5785158", "0.5735902", "0.57345605", "0.57336825", "0.5721594", "0.57154137", "0.57078147", "0.569874", "0.56960905", "0.5695836", "0.56881064", "0.56794506", "0.5657157", "0.5641594", "0.5641594", "0.56397086", "0.5631916", "0.5628478", "0.5622709", "0.5620957", "0.56139684", "0.56022954", "0.5596695", "0.5577658", "0.5559995", "0.5558259", "0.55571884", "0.55378884", "0.55287176", "0.55204135", "0.5519766", "0.5517673", "0.5511226", "0.55056745", "0.55009174", "0.5495012", "0.54885185", "0.54864043", "0.54811585", "0.54779047", "0.5474932", "0.54702306", "0.5469966", "0.5464415", "0.54640865" ]
0.6653165
11
Get y Set de $fecha
public function getfecha() { return $this->fecha; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFecha($fecha) {\r\n $this->fecha = $fecha;\r\n }", "function getFecha(){\n\t\treturn $this->fecha;\n\t}", "function getFecha() {\r\n return $this->fecha;\r\n }", "public function setFecha($fecha) {\n $date = Funciones::gConvertirFecha($fecha, TRUE);\n $orden = $this->orden;\n if ($date && $date != $this->fecha) {\n // Si cambia la fecha, recarga los datos.\n $this->cargarAsistentes($date, $orden);\n }\n }", "public function getFecha()\n {\n return $this->fecha;\n }", "public function getFecha()\n {\n return $this->fecha;\n }", "public function setDateDuJour()\n{\n$this->setDateSysteme(date(\"Y-m-d\"));\n$this->setDateUtilisateur(date(\"d/m/Y\"));\n}", "public function getFecha() {\n return $this->fecha;\n }", "public function getFecha() {\n return $this->fecha;\n }", "public function fecha();", "public function setFecha($fecha)\n\t{\n\t\t$this->fecha=$fecha;\n\t\treturn $this;\n\t}", "public function getfechaentrega()\r\n {\r\n return $this->fechaentrega;\r\n }", "public function getDateFecha()\n {\n return $this->dateFecha;\n }", "public function setFecha($fecha)\n {\n $this->fecha = $fecha;\n\n return $this;\n }", "public function modificarFechaVista() /// modifica fecha a dia mes año\n\t{\n\t\t$fecha = $_GET['fecha'];\n\t\t$fecha = strtotime($fecha);\n\t\t$nuevafecha = date('d-m-Y', $fecha);\n\t\treturn response()->json($nuevafecha);\n\t}", "public function buscarFecha($fecha) {\n\t\t$visita = $this->findOneByFecha($fecha);\n\t\treturn $visita;\n\t}", "public function getFecha()\n {\n return $this->c_fecha;\n }", "protected function setDateUtilisateur($date)\n{\n$this->dateUtilisateur = $date;\t\n}", "public function setFechaInicialAttribute($value)\n {\n return $this->attributes['fecha_inicial'] = date($this->setDateFormatTarifasVehiculo,strtotime(Carbon::createFromFormat('d/m/Y', $value)->toDateTimeString()));\n }", "public function setFecha($n)\n {\n $this->c_fecha=$n;\n }", "public function setFecha($fecha)\n {\n $this->fecha = $this->db->real_escape_string($fecha);\n\n return $this;\n }", "function getFecha(){\n\t\t\treturn date(\"Y-m-d H:i:s\");\n\t}", "function filtrarFecha( $fecha )\n{\n $fecha = new DateTime( $fecha );\n $fecha = DATE_FORMAT( $fecha, 'Y-m-d' );\n \n return $fecha;\n}", "function fecha($cadena){\n\t\treturn date($cadena);\n\t}", "public function getrep_fecha()\r\n {\r\n return $this->rep_fecha;\r\n }", "public function sanitizarFecha($fecha)\n{\n $date =New DateTime();\n return $fechaPedidoDesde= date_format($date->createFromFormat('d/m/Y',$fecha), 'd/m/Y');\n}", "function __construct($fecha,$estanteriaconcaja) {\r\n $this->fecha = $fecha;\r\n $this->estanteriaconcaja=$estanteriaconcaja;\r\n \r\n }", "public function fechaInicioPublicacion($fechainicio){\r\n\t\t$año = substr($fechainicio, 0, 4);\r\n\t\t$mes = substr($fechainicio, 5, 2);\r\n\t\t$dia = substr($fechainicio, 8, 2);\r\n\t\t$fecha = date_create();\r\n\t\tdate_date_set($fecha, $año, $mes, $dia);\r\n\t\treturn $fecha;\r\n\t}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function sanitizarFecha($fecha)\n{\n $date = date_create($fecha);\n return date_format($date,'Y-m-d');\n}", "public function getEncuestaFechacreacion()\r\n {\r\n return $this->encuesta_fechaCreacion;\r\n }", "function fecha($usuario, $password, $operador, $id, $folioCliente){\n $respuesta = checkOrder($usuario, $password, $operador, $id, $folioCliente);\n //$respuesta = checkOrder($usuario, $password, $operador, $id, $folioCliente);\n $Fecha = $respuesta['TopUpResult']['date'];\n //echo $Fecha;\n return $Fecha;\n}", "public function sanitizarFechaF($fecha)\n{\n $date =New DateTime();\n return $fechaPedidoDesde= date_format($date->createFromFormat('d/m/Y',$fecha), 'd/m/Y');\n \n}", "function leerlafecha($fechaentrada, $idioma) {\n\t\t//devuelve variables en el idioma dado por la variable $idioma que puede valer 'cas' o 'cat'\n\t\t//Así podremos leer la fecha en formato humanoide.\n\t\t\n\t\tdate_default_timezone_set('Europe/Madrid');\t//Esta definicion de la zona horaria me la pide el php del hosting en freehostia.com para dejarme usar strtotime en el script\n\t\t\n\t\t//Dependiendo del idioma definimos los nombres de los meses del año y los dias de la semana\n\t\tif ($idioma == 'cat' or empty($idioma)) {$anno = array (\"gener\", \"febrer\", \"març\", \"abril\", \"maig\", \"juny\", \"juliol\", \"agost\", \"setembre\", \"octubre\", \"novembre\", \" desembre \"); $dias = array ('', 'Dilluns', 'Dimarts', 'Dimecres', 'Jueves', 'Divendres', 'Dissabte', 'Diumenge');}\n\t\telse if ($idioma == 'cas') {$anno = array(\"enero\", \"febrero\", \"marzo\", \"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\"); $dias = array('','Lunes','Martes','Miercoles','Jueves','Viernes','Sabado','Domingo');}\n\t\t\n\t\tif (empty($fechaentrada)==false){\n\t\t\t$dia = substr ($fechaentrada, 8 , 2 ); //número del dia\n\t\t\t$mesnumerico = substr($fechaentrada,5,2); //número del mes\n\t\t\t$ano = substr ($fechaentrada,0,4); //número del año\n\t\t\t$indicemes = intval($mesnumerico) - 1;\n\t\t\t$nombremes = $anno[$indicemes]; //nombre del mes en el idioma escojido\n\t\t\t$nombredia = $dias[date('N', strtotime($fechaentrada))]; //nombre del dia en el idioma elejido\n\t\t}\n\t\t\n\t\t return array ($dia,$mesnumerico,$ano,$nombremes,$nombredia);\n\t\t\n\t}", "public function setDate($date);", "function getDatosF_acta()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'f_acta'));\n $oDatosCampo->setEtiqueta(_(\"fecha acta\"));\n $oDatosCampo->setTipo('fecha');\n return $oDatosCampo;\n }", "function setLocalDate($loca,$dat){\n $this->local = $loca;\n $this->dates = $dat;\n }", "function getFecha(){\n\t\t$anio = date(\"Y\");\n\t\t$dia = date(\"j\");\n\t\t$mes = date(\"m\");\n\t\t$fechactual = $anio.\"-\".$mes.\"-\".$dia;\n\t\treturn $fechactual;\n\t}", "public function getDateDebut();", "public function formateaFecha($fecha){\n\n\n\t\t$array=explode(\"-\",$fecha);\n\t\t$numeromes=$array[1];\n\t\t$dia=$array[2];\n\t\t$año=$array[0];\n\n\t\tif($numeromes<10){\n\t\t\t$numeromes=substr($numeromes,1);\n\t\t}\n\n\t\t$meses=array(\"enero\",\"febrero\",\"marzo\",\"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\");\n\n\t\t$mes=$meses[$numeromes-1];\n\t\t \n\t\t$fecha=$dia . \" de \" . $mes .\" de \".$año;\n\n\t\treturn $fecha;\n\n}", "public static function componenteFecha( $nombre, $id, $defecto = \"0000-00-00\", $estiloClase = \"\", $conNom = false ){\n\t\tif( $defecto == \"0000-00-00\" ){\n\t\t\t$defecto = date(\"Y-m-d\");\n\t\t}\n\t\t\n\t\t$actual = strtotime($defecto);\n\t\t$newformat = date('Y-m-d',$actual);\n\t\t$defecto = $newformat;\n\t\t$anyo = date('Y',$actual);\n\t\t$mes = date('m',$actual) * 1;\n\t\t$dia = date('d',$actual) * 1;\n\t\t\n\t\t$ai = \"a_\" . $id;\n\t\t$mi = \"m_\" . $id;\n\t\t$di = \"d_\" . $id;\n\t\t\n\t\t$ani = ( $conNom ? \" name=\\\"a_\" . $nombre . \"\\\"\" : \"\");\n\t\t$mni = ( $conNom ? \" name=\\\"m_\" . $nombre . \"\\\"\" : \"\");\n\t\t$dni = ( $conNom ? \" name=\\\"d_\" . $nombre . \"\\\"\" : \"\");\n\t\t\n\t\t$jsCom = \"onkeyup=\\\"ut.ComponenteFecha('#\" . $id . \"', '#\" . $ai . \"', '#\" . $mi . \"', '#\" . $di . \"');\\\" \";\n\t\t$jsCom .= \"onchange=\\\"ut.ComponenteFecha('#\" . $id . \"', '#\" . $ai . \"', '#\" . $mi . \"', '#\" . $di . \"');\\\"\";\n\t\t\n\t\t$selAnyo = \"<select \" . $jsCom . $ani . \" id=\\\"\" . $ai . \"\\\" style=\\\"width: 55px;\\\" >\";\n\t\tfor ($i = ($anyo - 1); $i < date('Y', strtotime('+10 year')); $i++) {\n\t\t\t$sel = ($i == $anyo ? \"selected=\\\"selected\\\" \" : \"\");\n\t\t\t$selAnyo .= \"<option \" . $sel . \"value=\\\"\" . $i . \"\\\">\" . $i . \"</option>\";\n\t\t}\n\t\t$selAnyo .= \"</select>\";\n\t\t\n\t\t$selMes = \"<select \" . $jsCom . $mni . \" id=\\\"\" . $mi . \"\\\" style=\\\"width: 40px;\\\" >\";\n\t\tfor ($i = 1; $i <= 12; $i++) {\n\t\t\t$vlMes = (strlen( $i ) == 1 ? \"0\" . $i : $i );\n\t\t\t$sel = ($i == $mes ? \"selected=\\\"selected\\\" \" : \"\");\n\t\t\t$selMes .= \"<option \" . $sel . \"value=\\\"\" . $vlMes . \"\\\">\" . $vlMes . \"</option>\";\n\t\t}\n\t\t$selMes .= \"</select>\";\n\t\t\n\t\t$selDia = \"<select \" . $jsCom . $dni . \" id=\\\"\" . $di . \"\\\" style=\\\"width: 40px;\\\" >\";\n\t\tfor ($i = 1; $i <= 31; $i++) {\n\t\t\t$vlMes = (strlen( $i ) == 1 ? \"0\" . $i : $i );\n\t\t\t$sel = ($i == $dia ? \"selected=\\\"selected\\\" \" : \"\");\n\t\t\t$selDia .= \"<option \" . $sel . \"value=\\\"\" . $vlMes . \"\\\">\" . $vlMes . \"</option>\";\n\t\t}\n\t\t$selDia .= \"</select>\";\n\t\t\n\t\t\n\t\t$html = \"<table class=\\\"\" . $estiloClase . \"\\\" >\";\n\t\t$html .= \"\t<tbody>\";\n\t\t$html .= \"\t\t<tr>\";\n\t\t$html .= \"\t\t\t<th><label for=\\\"\" . $ai . \"\\\">A&ntilde;o</label></th>\";\n\t\t$html .= \"\t\t\t<th><label for=\\\"\" . $mi . \"\\\">Mes</label></th>\";\n\t\t$html .= \"\t\t\t<th><label for=\\\"\" . $di . \"\\\">D&iacute;a</label></th>\";\n\t\t$html .= \"\t\t</tr>\";\n\t\t$html .= \"\t\t<tr>\";\n\t\t$html .= \"\t\t\t<td>\" . $selAnyo . \"</td>\";\n\t\t$html .= \"\t\t\t<td>\" . $selMes . \"</td>\";\n\t\t$html .= \"\t\t\t<td>\" . $selDia . \"</td>\";\n\t\t$html .= \"\t\t</tr>\";\n\t\t$html .= \"\t</tbody>\";\n\t\t$html .= \"</table>\";\n\t\t$html .= \"<input type=\\\"hidden\\\" name=\\\"\" . $nombre . \"\\\" id=\\\"\" . $id . \"\\\" value=\\\"\" . $defecto. \"\\\" />\";\n\t\treturn $html;\n\t}", "public function setFechaFinalAttribute($value)\n {\n return $this->attributes['fecha_final'] = date($this->setDateFormatTarifasVehiculo,strtotime(Carbon::createFromFormat('d/m/Y', $value)->toDateTimeString()));\n }", "public function setFechaIngresoAttribute($value)\n {\n if(!empty($value))\n {\n $this->attributes['fecha_ingreso'] = date_format(date_create(substr($value, 3, 2) . '/' . substr($value, 0, 2) . '/' . substr($value, 6, 4)), 'Y-m-d');\n }\n }", "public function getDateUtilisateur()\n{\nif (!strcmp($this->dateUtilisateur, \"00/00/0000\"))\n\t$date = \"\";\nelse $date = $this->dateUtilisateur;\nreturn $date;\n}", "public function getDate($date=null)\n {\n if ($date != null && is_array($this->livres) && count($this->livres)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE date = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$date]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId($d['id']);\n$this->setTitre($d['titre']);\n$this->setDescription($d['description']);\n$this->setDate($d['date']);\n$this->setClivres_id($d['clivres_id']);\n$this->setAuteur($d['auteur']);\n$this->setPhoto($d['photo']);\n$this->setChemin($d['chemin']);\n$this->livres =$data; \n return $this;\n }\n \n } else {\n return $this->date;\n }\n \n }", "function _fecha_tabla($fecha, $formato) {\n return ($fecha == null) ? null : date($formato,strtotime($fecha));\n }", "public function getFechaConversionEnergetica(){\n return $this->fechaConversionEnergetica;\n }", "private static function SetarFusorario(){\n date_default_timezone_set('America/Sao_paulo');\n }", "public function dias_del_mes(){\n \n $fecha= date('Y-m-d');\n return; date('t',strtotime($fecha));\n \n}", "public function getFechaVencimientoSegunFecha($fecha)\r\n\t\t{\r\n\t\t\t$a = date('Y', strtotime($fecha));\r\n\t\t\t$m = date('m', strtotime($fecha));\r\n\t\t\t$d = date('d', strtotime($fecha));\r\n\r\n\t\t\t$ultimo = self::getUltimoDia($a, $m);\r\n\t\t\t$fechaVcto = $a . '-' . $m . '-' . $ultimo;\r\n\t\t\treturn $fechaVcto = date('Y-m-d', strtotime($fechaVcto));\r\n\t\t}", "public function testfecha() {\n $tiempo = new TiempoFalso();\n $tarjeta = new Tarjeta( $tiempo );\n $colectivo = new Colectivo(NULL, NULL, NULL);\n $boleto = new Boleto(NULL, NULL, $tarjeta, NULL,NULL, NULL, NULL, NULL, $tiempo);\n\n $this->assertEquals($boleto->obtenerfecha(), $tiempo);\n }", "private function actualizar_fechaenvio_docxpagarcpe(){\n\n $this->docxpagar_cpe->fecha_envio = Carbon::now();\n $this->docxpagar_cpe->save();\n\n }", "public function fechaVigencia() // funcion que suma fecha usada para años biciestos\n\t{\n\n\t\t$fecha = $_GET['fecha'];\n\t\t$nuevafecha = strtotime('+365 day', strtotime($fecha));\n\t\t$nuevafecha = date('Y-m-d', $nuevafecha);\n\t\treturn $nuevafecha;\n\t}", "function evt__cuadro_fechas__seleccionar ($fecha_cuadro){\n }", "private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}", "public function cargarAsistencia($fecha, $tipo, $valor, $dni_alumno, $id_curso) {\n //date_default_timezone_set('UTC');\n //$fecha = date(\"Y\") . \"-\" . date(\"m\") . \"-\" . date(\"d\");\n $con = ConexionBD::getConexion();\n $con->insertar(\"INSERT INTO `asistencia`(`idasistencia`, `fecha`, `tipo`, `valor`, `alumnoxcurso_alumno_dni`, `alumnoxcurso_curso_idcurso`) VALUES (default,'\" . $fecha . \"','\" . $tipo . \"','\" . $valor . \"','\" . $dni_alumno . \"','\" . $id_curso . \"')\");\n }", "function restar_dias_a_una_fecha($dia,$mes,$anio,$numdias){\r\nif (!checkdate($mes,$dia,$anio)) die(\"error en restar_dias_a_una_fecha() - Se le ha mandado a la función una fecha incorrecta\");\r\n$fecha=mktime ( 0,0,0, $mes,$dia-$numdias,$anio);\r\nreturn date( \"Y-m-d\", $fecha);\r\n}", "public function testSetDtDebutEmploi() {\n\n // Set a Date/time mock.\n $dtDebutEmploi = new DateTime(\"2018-09-10\");\n\n $obj = new AttestationCacm();\n\n $obj->setDtDebutEmploi($dtDebutEmploi);\n $this->assertSame($dtDebutEmploi, $obj->getDtDebutEmploi());\n }", "private function _setDate(){\n\t\tif($this->_year>=1970&&$this->_year<=2038){\n\t\t\t$this->_day = date('d', $this->_timestamp);\n\t\t\t$this->_month = date('m', $this->_timestamp);\n\t\t\t$this->_year = date('Y', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, true);\n\t\t\t$this->_day = sprintf('%02s', $dateParts['mday']);\n\t\t\t$this->_month = sprintf('%02s', $dateParts['mon']);\n\t\t\t$this->_year = $dateParts['year'];\n\t\t}\n\t\t$this->_date = $this->_year.'-'.$this->_month.'-'.$this->_day;\n\t}", "public function getFechaModificacion()\n {\n return $this->fechaModificacion;\n }", "public function setDataCadastro($v)\n\t{\n\t\t$dt = PropelDateTime::newInstance($v, null, 'DateTime');\n\t\tif ($this->data_cadastro !== null || $dt !== null) {\n\t\t\t$currentDateAsString = ($this->data_cadastro !== null && $tmpDt = new DateTime($this->data_cadastro)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n\t\t\tif ($currentDateAsString !== $newDateAsString) {\n\t\t\t\t$this->data_cadastro = $newDateAsString;\n\t\t\t\t$this->modifiedColumns[] = UsuarioPeer::DATA_CADASTRO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function testSetDateTransfert() {\n\n // Set a Date/time mock.\n $dateTransfert = new DateTime(\"2018-09-10\");\n\n $obj = new FichesControlesEntetes();\n\n $obj->setDateTransfert($dateTransfert);\n $this->assertSame($dateTransfert, $obj->getDateTransfert());\n }", "public function cadastrar() \n{\n //DEFINIR A DATA\n $this->data = date(\"Y:m:d H:i:s\");\n \n //INSERIR A VAGA NO BANCO\n\n //ATRIBUIR O ID NA VAGA DA INSTANCIA\n\n //RETORNAR SUCESSO\n\n}", "public function getFechaComentario()\n {\n return $this->fecha_comentario;\n }", "function fecha($fecha){\n $timestamp = strtotime($fecha);\n $meses = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'];\n\n $dia = date('d', $timestamp);\n $mes = date('m', $timestamp) - 1;\n $year = date('Y', $timestamp);\n\n $fecha = \"$dia de \" . $meses[$mes] . \" del $year\";\n return $fecha; \n}", "public function getFechaInicio()\n {\n $fechaInicio = null;\n if (count($this->objetivos)==0) return $fechaInicio;\n foreach ($this->objetivos as $objetivo)\n {\n if (count($objetivo->getActividades())!=0)\n {\n foreach($objetivo->getActividades() as $actividad)\n {\n $fechaActividad = $actividad->getFechaIni(); \n $fechaInicio = (($fechaActividad < $fechaInicio)||\n $fechaInicio==null)? $fechaActividad:$fechaInicio;\n }\n }\n }\n return $fechaInicio;\n }", "function date_modif_manuelle_autoriser() {\n}", "function Fecha_estandar($IngresoFecha){\t\n$date = date_create($IngresoFecha);\nreturn date_format($date, 'd-m-Y');\n}", "public function getFechaCreacion()\n {\n return $this->fecha_creacion;\n }", "public function getFechaCreacion()\n {\n return $this->fecha_creacion;\n }", "public function setDataRescisao($v)\n\t{\n\t\t$dt = PropelDateTime::newInstance($v, null, 'DateTime');\n\t\tif ($this->data_rescisao !== null || $dt !== null) {\n\t\t\t$currentDateAsString = ($this->data_rescisao !== null && $tmpDt = new DateTime($this->data_rescisao)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n\t\t\tif ($currentDateAsString !== $newDateAsString) {\n\t\t\t\t$this->data_rescisao = $newDateAsString;\n\t\t\t\t$this->modifiedColumns[] = UsuarioPeer::DATA_RESCISAO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "function setDate($date = null)\r\n\t{\t\r\n\t\t$day = substr($date ,8, 2);\r\n\t\t$month = substr($date ,5, 2);\r\n\t\t$year = substr($date ,0, 4);\r\n\t\t\r\n\t\t$newDate = $day.'-'.$month.'-'.$year;\r\n\t\t\r\n\t\treturn $newDate;\r\n\t}", "function _fechaInput($fecha = ''){\n return \\Carbon\\Carbon::parse($fecha)->format('d/m/Y');\n // return \"{$d}/{$m}/{$y}\";\n\n\n\n\n }", "public function formatear_fecha($fecha) {\n return date_format(date_create($fecha), 'd/m/Y');\n }", "function primer_dia_periodo() {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where actual=true\";\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n \n }", "public function getDataPagamento()\n {\n return $this->dataPagamento ?? date('Y-m-d');\n }", "public function testSetDateControle() {\n\n // Set a Date/time mock.\n $dateControle = new DateTime(\"2018-09-10\");\n\n $obj = new FichesControlesEntetes();\n\n $obj->setDateControle($dateControle);\n $this->assertSame($dateControle, $obj->getDateControle());\n }", "public function obtener_x_fecha($fecha = \"\") {\n if ($fecha != '')\n $this->db->where('TIPCAMC_Fecha', $fecha);\n $this->db->where('TIPCAMC_FlagEstado', 1);\n $this->db->order_by('TIPCAMC_Fecha', 'desc');\n $this->db->group_by('TIPCAMC_Fecha');\n $query = $this->db->get('cji_tipocambio');\n if ($query->num_rows > 0) {\n return $query->result();\n }\n }", "function validar_Fecha()\n {\n $this->resource = 'Actividades';\n $fecha_menor = strtotime(\"2021-01-01 00:00:00\");\n $fecha_mayor = strtotime(\"2050-01-01 00:00:00\");\n $fecha_entrada = strtotime($this->fecha);\n\n if ($this->no_vacio($this->fecha) === false) {\n $this->code = '70027';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->formato_fecha($this->fecha) === false) {\n $this->code = '70028';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($fecha_entrada > $fecha_mayor) {\n $this->code = '70029';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($fecha_entrada < $fecha_menor) {\n $this->code = '70030';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }", "public function getFechaModificacion()\n {\n return $this->fecha_modificacion;\n }", "public function getFechaModificacion()\n {\n return $this->fecha_modificacion;\n }", "public function setDate($value) {\n\t\t$this->_date = $value;\n\t}", "public static function getDiaMesAno($fecha){\n \n $timestamp = strtotime($fecha);\n \n return date('d/m/Y', $timestamp);\n \n }", "public function getFechaInicialAttribute($value) \n {\n return $value ? Carbon::parse($value)->format($this->getDateFormatTarifasVehiculo) : null;\n }", "public function getFechaEmision() {\n return $this->fecha_emision;\n }", "function formatear_fecha($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$hora = substr($parametro, 11, 2);\n\t\t$minuto = substr($parametro, 14, 2);\n\t\t$dia = substr($parametro, 8, 2);\n\t\t$mes = substr($parametro, 5, 2);\n\t\t$anno = substr($parametro, 0, 4);\n\n\t\t/* Generamos el formato */\n\t\t$temp = $dia.\"/\".$mes.\"/\".$anno.\" (\".$hora.\":\".$minuto.\")\";\n\t\t\n\t\treturn $temp;\n\t}", "function errorFecha($valor){\n\tswitch($valor){\n\t\tcase 1: //Date of begininig is bigger than the date of end\n\t\techo \"La fecha de Inicio es mayor que la de fin </br>\";\n\t\tbreak;\n\t\t\n\t\tcase 2: //Date of beginning is less of the date of now\n\t\techo \"La fecha de inicio es menor que la de ahora </br>\";\n\t\tbreak;\n\t\t\n\t\tcase 3://Date of end is less of the date of now\n\t\techo \"La fecha de fin es menor que la actual </br>\";\n\t\tbreak;\n\t\t\n\t\tcase 4://Date of beginning is not enough to create dates of class\n\t\techo \"La fecha de inicio es corta para crear los dias de clase que pidio </br>\";\n\t\tbreak;\n\t\n\t}\n}", "public function getEstadoFecha($estado,$desde,$hasta)\n {\n $sql = \"SELECT Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago From \" .self::$tablename. \" WHERE AutorizadoPago = '{$estado}' AND FechaAutorizado BETWEEN '{$desde}' AND '{$hasta}' ORDER BY Id DESC\" ;\n return Executor::doit($sql);\n }", "public function get_pedido_por_fecha($cedula,$fecha_inicial,$fecha_final){\n\n $conectar=parent::conexion();\n parent::set_names();\n \n \n $date_inicial = $_POST[\"datepicker\"];\n $date = str_replace('/', '-', $date_inicial);\n $fecha_inicial = date(\"Y-m-d\", strtotime($date));\n\n \n $date_final = $_POST[\"datepicker2\"];\n $date = str_replace('/', '-', $date_final);\n $fecha_final = date(\"Y-m-d\", strtotime($date));\n\n\n $sql=\"select * from detalle_compras where cedula_proveedor=? and fecha_compra>=? and fecha_compra<=? and estado='1';\";\n\n \n $sql=$conectar->prepare($sql);\n\n $sql->bindValue(1,$cedula);\n $sql->bindValue(2,$fecha_inicial);\n $sql->bindValue(3,$fecha_final);\n $sql->execute();\n\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n \n\n }", "public function convertirFechas($fecha){\n if(!empty($fecha)){\n $fecha = str_replace(\"/\", \"-\", $fecha);\n $fecha = new DateTime($fecha);\n $fecha = $fecha->format('Y-m-d');\n }\n return $fecha;\n }", "public function getFechaVencimientoEstudianteDocumento( ){\n\t\t\treturn $this->fechaVencimientoEstudianteDocumento;\n\t\t}", "public function testSetDateAncien() {\n\n // Set a Date/time mock.\n $dateAncien = new DateTime(\"2018-09-10\");\n\n $obj = new Employes();\n\n $obj->setDateAncien($dateAncien);\n $this->assertSame($dateAncien, $obj->getDateAncien());\n }", "public function getFechaAsignacionAttribute($value)\n {\n return $value === NULL ? $value : date('d/m/Y' , strtotime($value));\n }", "public function getDateEmbauche() \n {\n return $this->dateEmbauche;\n }", "public function graficDate(Registro $registro)\n {\n //\n }", "public function testSetCarteSejourExpireLe() {\n\n // Set a Date/time mock.\n $carteSejourExpireLe = new DateTime(\"2018-09-10\");\n\n $obj = new Employes();\n\n $obj->setCarteSejourExpireLe($carteSejourExpireLe);\n $this->assertSame($carteSejourExpireLe, $obj->getCarteSejourExpireLe());\n }", "public function testSetDtFinEmploi() {\n\n // Set a Date/time mock.\n $dtFinEmploi = new DateTime(\"2018-09-10\");\n\n $obj = new AttestationCacm();\n\n $obj->setDtFinEmploi($dtFinEmploi);\n $this->assertSame($dtFinEmploi, $obj->getDtFinEmploi());\n }" ]
[ "0.80408186", "0.75071865", "0.74781007", "0.7468652", "0.7069885", "0.7069885", "0.70468664", "0.7010231", "0.7010231", "0.69862115", "0.6923586", "0.6911116", "0.6856427", "0.67400396", "0.6726927", "0.67047626", "0.66677964", "0.6663142", "0.6579852", "0.657022", "0.6407692", "0.64038354", "0.6389065", "0.63728553", "0.6353258", "0.6302319", "0.6283086", "0.6272729", "0.6260647", "0.6260647", "0.6260647", "0.6260647", "0.6260647", "0.62558186", "0.62314093", "0.62070805", "0.6201717", "0.6180872", "0.6161664", "0.61193675", "0.611654", "0.6110197", "0.60991", "0.6095244", "0.6093818", "0.608722", "0.60843873", "0.6081294", "0.60692596", "0.60658044", "0.60618144", "0.6051374", "0.6039333", "0.60343254", "0.601627", "0.60113305", "0.59925413", "0.5991217", "0.5990757", "0.5989839", "0.59748954", "0.59684545", "0.59637034", "0.5957704", "0.59559786", "0.5950185", "0.5927016", "0.5921118", "0.5903366", "0.59001774", "0.5886451", "0.58853745", "0.58853745", "0.5878251", "0.58764786", "0.5876048", "0.5867558", "0.5862216", "0.58595467", "0.5858228", "0.58538145", "0.5852162", "0.5841876", "0.5841876", "0.5839074", "0.5837849", "0.58349115", "0.5831363", "0.5824385", "0.58206326", "0.5799062", "0.57981473", "0.5796181", "0.57904416", "0.57881916", "0.57828426", "0.57808805", "0.5776706", "0.576998", "0.5768632" ]
0.75844604
1
Get y Set de $empleado
public function getempleado() { return $this->empleado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmpleado() {\r\n return $this->empleado;\r\n }", "public function empleado()\n {\n return \\App\\Models\\Empleado::where('user_id', $this->user_id)->first();\n }", "public function getEmpleado_idemp(){\n return $this->empleado_idemp;\n }", "public function getEmenta()\n {\n return $this->ementa;\n }", "public function setEmpleado_idemp($empleado_idemp){\n $this->empleado_idemp = $empleado_idemp;\n }", "function set_employee($emp)\n\t\t{\n\t\t\t$this->employee = $emp;\n\t\t}", "public function getId_empresa()\n {\n return $this->id_empresa;\n }", "public function setEmpresa($value = false) {\n $this->_empresa = $value;\n return $this;\n }", "public function setEmpresa($value = false) {\n $this->_empresa = $value;\n return $this;\n }", "public static function save($empleado){\n\t\t$db=Db::getConnect();\n\t\t\t\t\n\t\t$insert=$db->prepare('INSERT INTO empleado VALUES (NULL, :nombre,:apellidos,:id_provincia,\n\t\t\t:direccion,:estado,:id_tienda)');\n\n\t\t$insert->bindValue('nombre',$empleado->getNombre());\n\t\t$insert->bindValue('apellidos',$empleado->getApellidos());\n\t\t$insert->bindValue('id_provincia',$empleado->getProvincia());\n\t\t$insert->bindValue('direccion',$empleado->getDireccion());\t\t\n\t\t$insert->bindValue('estado',$empleado->getEstado());\n\t\t$insert->bindValue('id_tienda',$empleado->getTienda());\n\t\t$insert->execute();\n\n\t}", "function setEmpresa($empresa, $puesto, $depto = \"\", $idempleado = \"\", $nss = 0, $ExtTelefonica = 0 ){\n\t\t$this->mClaveEmpresa\t= $empresa;\n\t\t$this->mPuesto\t\t\t= $puesto;\n\t\t$this->mDepto\t\t\t= $depto;\n\t\t$this->mIDEmpleado\t\t= $idempleado;\n\t\t$this->mNSS\t\t\t\t= $nss;\n\t\t$this->mExtTelefonica\t= $ExtTelefonica;\n\t\t//iniciar domicilio?\n\t\t$xEmp\t\t\t\t\t= new cEmpresas($this->mCodigoPostal);\n\t\tif($xEmp->init() == true){\n\t\t\t$this->mNombreEmpresa\t= $xEmp->getNombreCorto();\n\t\t\t$this->mDomicilio\t\t= $xEmp->getDomicilio();\n\t\t\t$OPers\t\t\t\t\t= $xEmp->getOPersona();\n\t\t\tif($OPers != null){\n\t\t\t\t$xViv\t\t\t\t= $OPers->getODomicilio();\n\t\t\t\tif($xViv != null){\n\t\t\t\t\t$this->mClaveDeEstado\t\t= $xViv->getClaveDeEstado();\n\t\t\t\t\t$this->mClaveDeMunicipio\t= $xViv->getClaveDeMunicipio();\n\t\t\t\t\t$this->mClaveDeLocalidad\t= $xViv->getClaveDeLocalidad();\n\t\t\t\t\t\n\t\t\t\t\t$this->mNombreDeLocalidad\t= $xViv->getLocalidad();\n\t\t\t\t\t$this->mNombreDeMunicipio\t= $xViv->getMunicipio();\n\t\t\t\t\t$this->mNombreDeEstado\t\t= $xViv->getEstado();\n\t\t\t\t\t$this->mCodigoPostal\t\t= $xViv->getCodigoPostal();\n\t\t\t\t\t$this->mIDDomicilio\t\t\t= $xViv->getClaveUnica();\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getEmailEmpresa()\n {\n return $this->emailEmpresa;\n }", "private function setExercicio(){\n\t\t$this->Enunciado = $this->Data['enunciado'];\n\t\t$this->A = $this->Data['opA'];\n\t\t$this->B = $this->Data['opB'];\n\t\t$this->C = $this->Data['opC'];\n\t\t$this->D = $this->Data['opD'];\n\t\t$this->E = $this->Data['opE'];\n\t\t$this->Correta = $this->Data['correta'];\n\n\t\t$this->Query = ['c_enumexer' => $this->Enunciado,\n\t\t\t\t\t\t'c_altaexer' => $this->A,\n\t\t\t\t\t\t'c_altbexer' => $this->B,\n\t\t\t\t\t\t'c_altcexer' => $this->C,\n\t\t\t\t\t\t'c_altdexer' => $this->D,\n\t\t\t\t\t\t'c_alteexer' => $this->E,\n\t\t\t\t\t\t'c_correxer' => $this->Correta];\n\n\t}", "public function edit(Empleado $empleado)\n {\n //\n }", "function modificarEmpleado(){\n\t$ced=$this->objEmpleado->getCedula();\n\t$nom=$this->objEmpleado->getNombre();\n\t$fechaIng=$this->objEmpleado->getFechaIngreso();\n\t$fechaRet=$this->objEmpleado->getFechaRetiro();\n\t$salBas=$this->objEmpleado->getSalarioBasico();\n\t$ded=$this->objEmpleado->getDeducciones();\n\t$foto=$this->objEmpleado->getFoto();\n\t$hojaV=$this->objEmpleado->getHojaVida();\n\t$email=$this->objEmpleado->getEmail();\n\t$tel=$this->objEmpleado->getTelefono();\n\t$cel=$this->objEmpleado->getCelular();\n\t$estado=$this->objEmpleado->getEstado();\n\t$usuario=$this->objEmpleado->getUsuario();\n\t$contrasena=$this->objEmpleado->getContrasena();\n\t$nomTmp=$this->objEmpleado->getNombreTmp();\n\t$fotoTmp=$this->objEmpleado->getFotoTmp();\n\t$hojaVTmp=$this->objEmpleado->getHojaVidaTmp();\n\t$emailTmp=$this->objEmpleado->getEmailTmp();\n\t$telTmp=$this->objEmpleado->getTelefonoTmp();\n\t$celTmp=$this->objEmpleado->getCelularTmp();\n\n\t$objConexion = new ControlConexion();\n\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t$comandoSql=\"UPDATE EMPLEADO SET NOMBRE_TMP='\".$nomTmp.\"', FECHAINGRESO='\".$fechaIng.\"', \n\tSALARIOBASICO='\".$salBas.\"', DEDUCCIONES='\".$ded.\"', FOTO_TMP='\".$fotoTmp.\"', HOJAVIDA_TMP='\".$hojaVTmp.\"', EMAIL_TMP='\".$emailTmp.\"',\n\tTELEFONO_TMP='\".$telTmp.\"', CELULAR_TMP='\".$celTmp.\"',CONTRASENA='\".$contrasena.\"' WHERE CEDULA='\".$ced.\"'\";\n\t$objConexion->ejecutarComandoSql($comandoSql);\n\t$objConexion->cerrarBd();\n}", "public function getNombre_empresa(){\n return $this->nombre_empresa;\n }", "private function iniciar_indice_empresas(){\n\t\t//==========necesarios para empresa================\n\t\trequire_once 'inc/clases/public/empresa.class.php';\t\t\t//pagina de empresa (y empresas)\n\t\trequire_once 'inc/clases/config/builder_config.class.php';\t//clase builder(reservas)\n\t\trequire_once 'inc/clases/public/salida_anuncios.class.php';\n\n\t\t$this->Empresa = new Empresa();\n\t\t$this->Modulos = new Salida_anuncios();\n\t\t// if(is_null($this->Empresa->user)){\n\t\t// \t//es null, devolvera inmobiliarias\n\t\t// }else if($this->Empresa->user == false){\n\t\t// \t$this->forzar_404();\n\t\t// }else{\n\t\t// \t//es bien\n\t\t// \t$this->empresa = $this->Empresa->salida;\n\t\t// }\n\t}", "public function getEdicion()\n {\n return $this->edicion;\n }", "function getEstanteria(){\r\n return $this->estanteria;\r\n }", "public function testSetEmploi() {\n\n $obj = new Employes();\n\n $obj->setEmploi(\"emploi\");\n $this->assertEquals(\"emploi\", $obj->getEmploi());\n }", "public function getE() {}", "function getEmperor(){\r\n\t\t$this->retriveDataRow();\r\n\r\n\t\tif(!is_null($this->data)){\r\n\t\t\treturn $this->data['czlonek_1'];\r\n\t\t}else{\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\t}", "public function getEtunimi(){\n return $this->etunimi;\n }", "function modificarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_empresa','id_empresa','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo_sociedad','tipo_sociedad','varchar');\n\t\t$this->setParametro('objeto','objeto','text');\n\t\t$this->setParametro('dir_comercial','dir_comercial','varchar');\n\t\t$this->setParametro('nit','nit','varchar');\n\t\t$this->setParametro('clase','clase','varchar');\n\t\t$this->setParametro('domicilio','domicilio','text');\n\t\t$this->setParametro('matricula','matricula','int8');\n\t\t$this->setParametro('renovado','renovado','int4');\n\t\t$this->setParametro('domicilio_legal','domicilio_legal','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('seccion','seccion','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('divission','divission','varchar');\n\t\t$this->setParametro('estado_matricula','estado_matricula','varchar');\n\t\t$this->setParametro('mail','mail','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function updating(Empleado $empleado)\n {\n //\n }", "function consultarUserEmpleado(){\n\t\t\n\t\t$usu=$this->objEmpleado->getUsuario();\n\t\t//SELECT ESTADO FROM `cliente` WHERE `usuario`=\"lili\"\n\t\t$objConexion = new ControlConexion();\n\t\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE USUARIO='\".$usu.\"' \";\n\t\t\n\t\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\t\n\t\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\t\n\t\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t\t$this->objEmpleado->setCedula($registro[\"cedula\"]);\n\t\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\n\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$objConexion->cerrarBd(); \n\t\t\treturn $this->objEmpleado; \t\t\n\t}", "function entrada_por_traspaso(){\n\t\t$e= new Entrada();\n\t\t$e->usuario_id=$GLOBALS['usuarioid'];\n\t\t$e->empresas_id=$GLOBALS['empresaid'];\n\t\t$related = $e->from_array($_POST);\n\t\t//if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n\t\t$e->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$e->costo_total=($e->cantidad * $e->costo_unitario);\n\t\t$e->cproveedores_id=1;\n\t\t$e->fecha=date(\"Y-m-d H:i:s\");\n\t\tif($e->id==0)\n\t\t\tunset($e->id);\n\t\tif($e->save($related)) {\n\t\t\techo $e->id;\n\t\t} else\n\t\t\techo 0;\n\t}", "function consultarEmpleado(){\n\t$ced=$this->objEmpleado->getCedula();\n\t$objConexion = new ControlConexion();\n\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE CEDULA='\".$ced.\"' \";\n\n\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\n\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\n\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\t\t}\t\n\t\t$objConexion->cerrarBd(); \n\t\treturn $this->objEmpleado; \t\t\n}", "public function GuardarEmpleado()\n {\n //Creo la conexion a la DB.\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();\n\n //Creo la consulta INSERT.\n $consulta = $objetoAccesoDato->RetornarConsulta(\"INSERT into empleado (nombre,turno,tipo)values('$this->nombre','$this->tipo','$this->turno')\");\n\n //Ejecuto la consulta.\n $consulta->execute();\n\n //Guardo su ID.\n $this->id = $objetoAccesoDato->RetornarUltimoIdInsertado();\n\n //Retorno\n return $this->id;\n }", "public function getCD_Empresa()\n {\n return $this->CD_Empresa;\n }", "public function edit(Empresa $empresa)\n {\n \n }", "public function getEmissao(){\n return $this->oEmissao;\n }", "public function getFacebookEmpresa()\n {\n return $this->facebookEmpresa;\n }", "public function getPaisEmpresa()\n {\n return $this->paisEmpresa;\n }", "function insertarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo_sociedad','tipo_sociedad','varchar');\n\t\t$this->setParametro('actividad','actividad','text');\n\t\t$this->setParametro('actividad_esp','actividad_esp','varchar');\n\t\t$this->setParametro('nit','nit','varchar');\n\t\t$this->setParametro('actividad_gral','actividad_gral','varchar');\n\t\t$this->setParametro('domicilio','domicilio','text');\n\t\t$this->setParametro('matricula','matricula','int8');\n\t\t$this->setParametro('renovado','renovado','int4');\n\t\t$this->setParametro('actividad_prim','actividad_prim','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('departamento','departamento','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('municipio','municipio','varchar');\n\t\t$this->setParametro('estado_matricula','estado_matricula','varchar');\n\t\t$this->setParametro('mail','mail','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getCodigoEmpresa()\n {\n return $this->codigoEmpresa;\n }", "public function edit(Empresa $empresa)\n {\n //\n }", "function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}", "public function Get_Esta()\n {\n\t\t\t$empr_id = empresa();\n\t\t\t//$url = 'http://localhost:9132/oeosft/api/rest/esta';\n\t\t\t$url = AJST.'/services/asp/ALMDataService/establecimientos/empresa/'.$empr_id;\n $array = $this->rest->callAPI(\"GET\",$url);\n $resp = json_decode($array['data']);\t\t\n return $resp->establecimientos->establecimiento;\n\t}", "public function ObtenerDat()\n {\n $this->validate([\n 'folio'=>'required'\n ]) ;\n\n $datos = Empleado::where('folio', $this->folio)->first();\n\n if($datos){\n\n $this->nombre= $datos->nombre; \n\n $this->apellido_p= $datos->apellido_p;\n \n $this->apellido_m= $datos->apellido_m;\n \n $this->puesto= $datos->puestos->puesto;\n \n if(!empty($this->imagen)){\n $this->imagen=$datos->imagen->store(\"public\");\n }else{\n $this->imagen= null;\n }\n\n }else{\n\n session()->flash('MensajeD','El empleado no trabaja en este Hotel.');\n\n $this->nombre= ''; \n\n $this->apellido_p= '';\n \n $this->apellido_m= '';\n \n $this->puesto= '';\n \n }\n\n }", "public function getDataAlteracao()\n {\n return $this->dataAlteracao;\n }", "public function setEmenta($ementa)\n {\n $this->ementa = $ementa;\n\n return $this;\n }", "public function getEstudiante( ){\n\t\treturn $this->estudiante;\n\t}", "public function getDireccion_empresa(){\n return $this->direccion_empresa;\n }", "public function getNombreEmpresa()\n {\n return $this->nombreEmpresa;\n }", "function getByNameAndPosition($employee){\n //devolver Empleado\n }", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }", "function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}", "public function setEdicion($edicion)\n {\n $this->edicion = $edicion;\n }", "function get_employee()\n\t\t{\n\t\t\treturn EmployeeFactory::createEmployee($this->empID);\n\t\t}", "public function testSetCodeEmploye() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setCodeEmploye(\"codeEmploye\");\n $this->assertEquals(\"codeEmploye\", $obj->getCodeEmploye());\n }", "public function save(){\r\n\t\tif(empty($this->idPrestamoEjemplar)){\t\t\t\r\n\t\t\t$this->idPrestamoEjemplar = $this->con->autoInsert(array(\r\n\t\t\t\"Prestamo_idPrestamo\" => $this->prestamoIdPrestamo,\r\n\t\t\t\"Ejemplar_idEjemplar\" => $this->ejemplarIdEjemplar,\r\n\t\t\t),\"prestamo_has_ejemplar\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\treturn $this->con->autoUpdate(array(\r\n\t\t\t\"Prestamo_idPrestamo\" => $this->prestamoIdPrestamo,\r\n\t\t\t\"Ejemplar_idEjemplar\" => $this->ejemplarIdEjemplar,\r\n\t\t\t),\"prestamo_has_ejemplar\",\"idPrestamo_Ejemplar=\".$this->getId());\r\n\t}", "public function selectEmpresas() {\r\n return $this->getDb()->query(\"SELECT E.ID_EMPRESA,E.NOMBRE,E.TELEFONO,E.DIRECCION,concat(U.NOMBRE,concat(' ',U.APELLIDO)) \\\"USUARIO ENCARGADO\\\" ,E.ESTADO FROM EMPRESA E LEFT JOIN USUARIO U ON(E.ID_PERSONA_ENCARGADA=U.IDENTIFICADOR)\");\r\n }", "private function iniciar_pagina_empresas(){\n\t\t//==========necesarios para empresa================\n\t\trequire_once 'inc/clases/public/empresa.class.php';\t\t\t//pagina de empresa (y empresas)\n\t\trequire_once 'inc/clases/config/builder_config.class.php';\t//clase builder(reservas)\n\t\trequire_once 'inc/clases/form_busqueda_builder.class.php';\t//para formularios ($Form)\n\t\trequire_once 'inc/clases/public/salida_anuncios.class.php';\n\n\t\t$this->Empresa = new Empresa();\n\t\t$this->Modulos = new Salida_anuncios();\n\t\tif(is_null($this->Empresa->user)){\n\t\t\t//es null, devolvera inmobiliarias\n\t\t}else if($this->Empresa->user == false){\n\t\t\t$this->forzar_404();\n\t\t}else{\n\t\t\t//es bien\n\t\t\t$this->empresa = $this->Empresa->salida;\n\t\t}\n\t}", "public static function update($empleado){\n\t\t$db=Db::getConnect();\n\t\t$update=$db->prepare('UPDATE empleado SET nombre=:nombre, apellidos=:apellidos,\n\t\t\tdireccion=:direccion, estado=:estado WHERE id=:id');\n\t\t$update->bindValue('nombre', $empleado->getNombre());\n\t\t$update->bindValue('apellidos',$empleado->getApellidos());\n\t\t$update->bindValue('direccion',$empleado->getDireccion());\n\t\t$update->bindValue('estado',$empleado->getEstado());\n\t\t$update->bindValue('id',$empleado->getId());\n\t\t$update->execute();\n\t}", "public function edit(Emploi $emploi)\n {\n //\n }", "function asignarJefeEquipo($idEmpleado){\n\t$objResponse = new xajaxResponse();\n\t\n\t\t$sql = sprintf(\"SELECT id_empleado ,CONCAT_WS(' ',nombre_empleado,apellido) AS nombre_empleado FROM pg_empleado \n\t\t\tWHERE id_empleado = %s\",\n\t\tvalTpDato($idEmpleado,\"int\"));\n\t\t$rs = mysql_query($sql);\n\t\tif (!$rs) return $objResponse->alert(\"Error \".mysql_error().\"\\nError Nro: \".mysql_errno().\"\\nLine: \".__LINE__);\n\t\t$rows = mysql_fetch_array($rs);\n\t\t\n\t\t$objResponse->assign(\"idHiddJefeEquipo\",\"value\",$rows['id_empleado']);\n\t\t$objResponse->assign(\"textJefeEquipo\", \"value\",$rows['nombre_empleado']);\n\t\t$objResponse->script(\"byId('butCancelarJefeEquipo').click();\");\n\t\t\n\treturn $objResponse;\n}", "public function edit(Empleado $empleado)\n {\n //\n $oficinas = Oficina::get();\n $edit=true;\n return view('empleado.create',['empleado'=>$empleado,'edit'=>$edit, 'oficinas'=>$oficinas]);\n }", "public function getTwitterEmpresa()\n {\n return $this->twitterEmpresa;\n }", "public function getNit_empresa(){\n return $this->nit_empresa;\n }", "public function edit(Empleado $emplea)\n {\n return view('empleados.edit',[\n // 'project => Project::find($id'\n 'empleadItem' => $emplea //Empleado::findOrFail($id)\n ]);\n }", "public function ConsultarEmpleado(){\n\t\t$sql = \"CALL HAR_ConsultarEmpleado(?)\";\n\t\t$stm = $this->db->prepare($sql);\n\t\t$stm ->bindParam(1, $this->CedulaEmpleado);\n\t\t$stm->execute();\n\t\t//Fetch retorna solo un valor, el fetchall varios\n\t\treturn $stm->fetch();\n\n\t\t}", "public function examen(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idExamen=\"\";\t\t\r\n\t\t$this->tipoExamen=\"\";\t\r\n\t\t$this->descripcion=\"\";\r\n\t}", "public function getIdempresa(){\n return $this->idempresa;\n }", "public function consultaEmpresas() {\n\t\t\treturn $this->entidad->getRepository('\\Entidades\\Expertos\\UsuariosEmpresa')->findBy(array('estado' => 1));\n\t\t}", "function editarMaterial($empleados, $pentalon,$fecha, $talla,$cantidad){\n //realizamos la consuta y la guardamos en $sql\n $sql=\"INSERT INTO material_entregado(id, empleado,materiales,fecha_entrega,talla,cantidad) VALUES (null, \".$empleados.\",'\".$pentalon.\"','\".$fecha.\"','\".$talla.\"', '\".$cantidad.\"')\";\n //Realizamos la consulta utilizando la funcion creada en db.php\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n return true;\n }else{\n return null;\n }\n\n }", "public function getUsuarioAlteracao()\n {\n return $this->usuarioAlteracao;\n }", "function getE() {\n return $this->E;\n }", "function alta_entrada(){\n $e = new Entrada();\n\t\t$precio=$_POST['costo_unitario'];\n\t\t$producto_id=$_POST['cproductos_id'];\n $e->usuario_id = $GLOBALS['usuarioid'];\n $e->empresas_id = $GLOBALS['empresaid'];\n $related = $e->from_array($_POST);\n //if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n $f = new Pr_factura();\n $f->get_by_id($e->pr_facturas_id);\n $e->espacios_fisicos_id = $f->espacios_fisicos_id;\n $e->lote_id = $f->lote_id;\n $e->costo_total = ($e->cantidad * $e->costo_unitario);\n\t\t$e->existencia = $e->cantidad;\n $e->cproveedores_id = $f->cproveedores_id;\n $e->fecha = date(\"Y-m-d H:i:s\");\n if ($e->id == 0)\n unset($e->id);\n if ($e->save($related)) {\n echo $e->id;\n\t\t\t$this->db->query(\"update cproductos set precio_compra='$precio' where id=$producto_id\");\n } else\n echo 0;\n }", "public function getidEstudiante()\n {\n return $this->id_est;\n }", "public function getLogoEmpresa()\n {\n return $this->logoEmpresa;\n }", "public function testSetEtat() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setEtat(\"etat\");\n $this->assertEquals(\"etat\", $obj->getEtat());\n }", "public function _setEntregable($data)\n {\n try {\n $id = (int)$data['entregableid'];\n if ($id == 0) {\n $sql = $this->_db->query(\"select codigo_prop_proy from proyecto where\n proyectoid = '\".$data['proyectoid'].\"'\");\n $codigo = $sql->fetch();\n $ent = $this->createRow();\n $ent->codigo_prop_proy = $codigo['codigo_prop_proy'];\n $ent->proyectoid = $data['proyectoid'];\n $ent->revision_entregable = 'A';\n $ent->edt = '000';\n $ent->tipo_documento = $data['tipo_documento'];\n $ent->disciplina = $data['disciplina'];\n $ent->codigo_anddes = $data['codigo_anddes'];\n $ent->codigo_cliente = $data['codigo_cliente'];\n $ent->descripcion_entregable = $data['descripcion'];\n $ent->estado = 'Ultimo';\n $ent->clase = $data['clase'];\n $ent->revision_documento = $data['revision'];\n $ent->estado_entregable = 9;\n $ent->save();\n $resp['resultado'] = 'guardado';\n return $resp;\n } else {\n $ent = $this->fetchRow('cod_le = '.$id);\n $ent->tipo_documento = $data['tipo_documento'];\n $ent->disciplina = $data['disciplina'];\n $ent->codigo_anddes = $data['codigo_anddes'];\n $ent->codigo_cliente = $data['codigo_cliente'];\n $ent->descripcion_entregable = $data['descripcion'];\n $ent->save();\n $resp['resultado'] = 'guardado';\n return $resp;\n }\n return $id;\n } catch (Exception $e) {\n print $e->getMessage();\n }\n }", "public function save () {\n // Atualiza\n // @ verifico se o atributo \"id_emprestimo\" existe neste objeto.\n // lembrando que este atributo é apagado se criamos um novo emprestimo.\n if ( isset($this->id_emprestimo) ) {\n $this->db->update('emprestimos', $this, array('id_emprestimo' => $this->id_emprestimo));\n }\n\n // Salva\n else {\n $this->db->insert('emprestimos', $this);\n }\n }", "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "public function editar(){\r\n\t\tif(!$this->_validarCampos())\r\n\t\t\t// levantando a excessao CamposObrigatorios //\r\n\t\t\tthrow new CamposObrigatorios();\r\n\t\t\r\n\t\tif($this->_testarServicoExisteEdicao($this->getId(), $this->getNome()))\r\n\t\t\t// levanto a excessao//\r\n\t\t\tthrow new Exception(\"Servico já cadastrado en nossa base de dados\");\r\n\t\t\r\n\t\t// recuperando a instancia da classe de acesso a dados //\r\n\t\t$instancia = ServicoDAO::getInstancia(); \r\n\t\t// retornando o Usuario //\r\n\t\treturn $servico = $instancia->editar($this);\r\n\t}", "public function saveEntidad(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_entidades SET entidad = \"%s\" WHERE entidad_id = %d',\n $this->entidad,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_entidades(entidad) VALUES (\"%s\")',\n $this->usuario);\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function show(Empleado $empleado)\n {\n //\n }", "public function show(Empleado $empleado)\n {\n //\n }", "function empleadores($id) {\n\t\t$this->Rubro->contain(\"Empleador\");\n\t\t$this->data = $this->Rubro->read(null, $id);\n\t}", "public function getCriadoEm()\n {\n return $this->criadoEm;\n }", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function getSelectedEmployeeProperty(){\n if(!$this->state['employee']){\n return null;\n }\n return Employee::find($this->state['employee']);\n }", "function setInstancia($tabla){\r\n\t\t//DB_DataObject::debugLevel(1);\r\n\t\t//Crea una nueva instancia de $tabla a partir de DataObject\r\n\t\t$objDBO = DB_DataObject::Factory($tabla);\r\n\t\t\r\n\t\t$campos = $objDBO->table();\r\n\t\tunset($campos[\"id\"]);\r\n\t\tunset($campos[\"fecha\"]);\r\n\t\t\r\n\t\t//Asigna los valores\r\n\t\tforeach($campos as $key => $value){\r\n\t\t\t$objDBO->$key = utf8_decode($this->$key);\r\n\t\t}\r\n\t\t$objDBO->fecha = date(\"Y-m-d H:i:s\");\r\n\t\t$objDBO->find();\r\n\t\tif($objDBO->fetch()){\r\n\t\t\t$ret = $objDBO->id;\r\n\t\t}else{\r\n\t\t\t$ret = $objDBO->insert();\r\n\t\t}\r\n\t\t\r\n\t\t//Libera el objeto DBO\r\n\t\t$objDBO->free();\r\n\t\t\r\n\r\n\t\treturn ($ret);\r\n\t}", "public function getPasswordEmpresa()\n {\n return $this->passwordEmpresa;\n }", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function displayDatoSeguimiento($etapa_id){\n try{\n log_message(\"INFO\", \"Obteniendo valor de campo para etapa: \".$etapa_id, FALSE);\n log_message(\"INFO\", \"Nombre campo: \".$this->nombre, FALSE);\n\n $dato = Doctrine::getTable('DatoSeguimiento')->findByNombreHastaEtapa($this->nombre,$etapa_id);\n if(!$dato ){\n //Se deben crear\n $dato = new DatoSeguimiento();\n $dato->nombre = $this->nombre;\n $dato->etapa_id = $etapa_id;\n $dato->valor = NULL;\n }\n log_message(\"INFO\", \"Nombre dato: \".$dato->nombre, FALSE);\n log_message(\"INFO\", \"Valor dato: .\".$dato->valor.\".\", FALSE);\n log_message(\"INFO\", \"this->valor_default: \".$this->valor_default, FALSE);\n if(isset($this->valor_default) && strlen($this->valor_default) > 0 && $dato->valor === NULL){\n $regla=new Regla($this->valor_default);\n $valor_dato=$regla->getExpresionParaOutput($etapa_id);\n $dato->valor = $valor_dato;\n $dato->save();\n }else{\n $valor_dato = $dato->valor;\n }\n\n log_message(\"INFO\", \"valor_default: \".$valor_dato, FALSE);\n\n return $valor_dato;\n }catch(Exception $e){\n log_message('error',$e->getMessage());die;\n throw $e;\n }\n }", "public function getAllEmp(){\n\t\t$sql = \"SELECT * FROM empreendimento;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function getCodeEmploi() {\n return $this->codeEmploi;\n }", "function __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}", "function evt__enviar(){\n if($this->dep('datos')->tabla('mesa')->esta_cargada()){\n $m = $this->dep('datos')->tabla('mesa')->get();\n // print_r($m);\n $m['estado'] = 2;//Cambia el estado de la mesa a Enviado\n $this->dep('datos')->tabla('mesa')->set($m);\n // print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n // $this->dep('datos')->tabla('mesa')->resetear();\n \n $m = $this->dep('datos')->tabla('mesa')->get_listado($m['id_mesa']);\n if($m[0]['estado'] == 2){//Obtengo de la BD y verifico que hizo cambios en la BD\n //Se enviaron correctamente los datos\n toba::notificacion()->agregar(utf8_decode(\"Los datos fueron enviados con éxito\"),\"info\");\n }\n else{\n //Se generó algún error al guardar en la BD\n toba::notificacion()->agregar(utf8_decode(\"Error al enviar la información, verifique su conexión a internet\"),\"info\");\n }\n }\n \n }", "function salida_por_traspaso(){\n\t\t$e= new Salida();\n\t\t$e->usuario_id=$GLOBALS['usuarioid'];\n\t\t$e->empresas_id=$GLOBALS['empresaid'];\n\t\t$related = $e->from_array($_POST);\n\t\t//if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n\t\t$e->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$e->costo_total=($e->cantidad * $e->costo_unitario);\n\t\t$e->cclientes_id=1;\n\t\t$e->fecha=date(\"Y-m-d H:i:s\");\n\t\tif($e->id==0)\n\t\t\tunset($e->id);\n\t\tif($e->save($related)) {\n\t\t\techo $e->id;\n\t\t} else\n\t\t\techo 0;\n\t}", "public function testSetAutreAlleg() {\n\n $obj = new Employes();\n\n $obj->setAutreAlleg(true);\n $this->assertEquals(true, $obj->getAutreAlleg());\n }", "public function setE($e)\n {\n $this->E = $e;\n return $this;\n }", "function setEgresos($data){\n $query = $this->db->insert('ingreso_egreso', $data);\n return $query;\n }", "public function getFkEmpenhoEmpenho()\n {\n return $this->fkEmpenhoEmpenho;\n }", "public function getInstagramEmpresa()\n {\n return $this->instagramEmpresa;\n }", "public function get_datos_empresa($empresa){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n\t$sql=\"select *from empresas where nombre=?\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$empresa);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}" ]
[ "0.74684316", "0.6651155", "0.6545242", "0.646015", "0.6434012", "0.64185774", "0.637984", "0.62619704", "0.62619704", "0.6247043", "0.622682", "0.6135711", "0.6108316", "0.6107448", "0.6101456", "0.60973835", "0.602096", "0.59854954", "0.59677655", "0.5964302", "0.59473115", "0.59027815", "0.58937156", "0.58816636", "0.58460325", "0.584182", "0.58178365", "0.57946885", "0.5793865", "0.57834715", "0.57663774", "0.57589567", "0.57538635", "0.5744179", "0.57308084", "0.57220036", "0.5718959", "0.5671864", "0.5663707", "0.5661495", "0.5659899", "0.56509155", "0.5643716", "0.56418586", "0.56230867", "0.56174856", "0.560708", "0.5599907", "0.55800796", "0.55800563", "0.5577987", "0.5576161", "0.55704874", "0.5569232", "0.5557056", "0.5548565", "0.55451816", "0.5544733", "0.5544472", "0.5541028", "0.55380625", "0.55349267", "0.5526773", "0.5523325", "0.55208033", "0.55067116", "0.5500822", "0.5490397", "0.5485761", "0.547787", "0.5455186", "0.5452475", "0.5446266", "0.5442275", "0.5438148", "0.5436158", "0.54282993", "0.5423799", "0.5423799", "0.5422081", "0.5418439", "0.5408994", "0.5398908", "0.5397011", "0.5395315", "0.53921413", "0.53921413", "0.53913736", "0.5388315", "0.53880304", "0.538132", "0.5376926", "0.5366857", "0.53664017", "0.5363462", "0.53593755", "0.5356087", "0.5354618", "0.5351411" ]
0.75943446
1
Consultar datos de una produccion
public function ConsultarDatosProduccion($codigo) { $objetoBD = new Conexion(); $objetoBD->conectar(); $mysqli = $objetoBD->cadenaconexion(); $consulta = "SELECT prod_id , prod_fecha, emp_nombres, emp_apellidos FROM empleados, produccion WHERE empleados.emp_id=produccion.emp_id AND prod_id=".$codigo; $resultado = $mysqli->query($consulta); $tabla = mysqli_fetch_object($resultado); return $tabla; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function consultarProyectos() {\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectos\",\"\");\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "function consultar(){\n\n\n\t\t$this->db->select('p.NUMERO, p.FACULTAD, p.PROGRAMA, p.FORMATO_PROYECTO, c.ESTADO');\n\t\t$this->db->from('PROYECTO p');\n\t\t$this->db->join('VICERRECTORIA_INVESTIGACION c', 'c.FK_PROYECTO = p.NUMERO');\n\n\n\t\t$query = $this->db->get();\n\n\t\treturn $data[]=$query->result();\n\t}", "public function select(){\n\t\t$sql=\"SELECT PROGRA_ID,PROGRA_CODIGO, PROGRA_NOMBRE, PROGRA_EMAIL, PROGRA_USUADIGI, PROGRA_FECHDIGI, PROGRA_HORADIGI\n\t\t FROM programa\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "function consultarEstudiantes($codProyecto) {\r\n $variables=array('codProyecto'=>$codProyecto,\r\n 'ano'=> $this->ano,\r\n 'periodo'=> $this->periodo);\r\n $cadena_sql=$this->sql->cadena_sql(\"consultarEstudiantes\",$variables);\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "function listarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function consultarProyectosCoordinador($cod_proyecto=\"\") {\n $datos['identificacion']= $this->identificacion;\n $datos['cod_proyecto']=$cod_proyecto;\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectosCoordinador\",$datos);\n //echo \"<br>sql proy curr \".$cadena_sql ;\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "function listarProcesoCompraPedido(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROCPED_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function consultarEstudiantesParaHomologacion($cod_proyecto){\n $cadena_sql = $this->sql->cadena_sql(\"consultarEstudiantesProyecto\",$cod_proyecto);\n return $resultadoEspacio = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "public function BuscarComprasProveedor() \n{\n\tself::SetNames();\t\t\n\t$sql = \" SELECT compras.codcompra, compras.subtotalivasic, compras.subtotalivanoc, compras.ivac, compras.totalivac, compras.descuentoc, compras.totaldescuentoc, compras.totalc, compras.statuscompra, compras.fechavencecredito, compras.fechacompra, proveedores.ritproveedor, proveedores.nomproveedor, SUM(detallecompras.cantcompra) AS articulos FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN detallecompras ON detallecompras.codcompra = compras.codcompra WHERE proveedores.codproveedor = ? GROUP BY compras.codcompra\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_GET[\"codproveedor\"]) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN COMPRAS DE PRODUCTOS PARA EL PROVEEDOR SELECCIONADO</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}", "function consultarProyectos($facultad) {\r\n $cadena_sql=$this->sql->cadena_sql(\"datos_proyectos\",$facultad);\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "public function buscarEstudiante() {\n\n $sql = \"SELECT D.tipodocumento, D.nombrecortodocumento, E.codigocarrera,\n EG.numerodocumento, EG.idestudiantegeneral, EG.nombresestudiantegeneral, \n EG.apellidosestudiantegeneral, EG.expedidodocumento, EG.codigogenero, \n EG.ciudadresidenciaestudiantegeneral, EG.fechanacimientoestudiantegeneral, EG.direccionresidenciaestudiantegeneral, \n EG.telefonoresidenciaestudiantegeneral, EG.emailestudiantegeneral, D.nombredocumento\n\t\tFROM \n estudiantegeneral EG\n\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\tINNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n\t\tWHERE\n E.codigoestudiante = ? \";\n /* FIN MODIFICACION */\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n $this->setFechaNacimiento($this->persistencia->getParametro(\"fechanacimientoestudiantegeneral\"));\n $this->setDireccion($this->persistencia->getParametro(\"direccionresidenciaestudiantegeneral\"));\n $this->setTelefono($this->persistencia->getParametro(\"telefonoresidenciaestudiantegeneral\"));\n $this->setEmail($this->persistencia->getParametro(\"emailestudiantegeneral\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $this->setCarrera($carrera);\n\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n $tipoDocumento->setNombreDocumento($this->persistencia->getParametro(\"nombredocumento\"));\n\n $genero = new Genero(null);\n $genero->setCodigo($this->persistencia->getParametro(\"codigogenero\"));\n\n $ciudad = new Ciudad(null);\n $ciudad->setId($this->persistencia->getParametro(\"ciudadresidenciaestudiantegeneral\"));\n\n $this->setCiudad($ciudad);\n $this->setGenero($genero);\n $this->setTipoDocumento($tipoDocumento);\n }\n\n $this->persistencia->freeResult();\n }", "public static function proba(){\n \n $prodaja = new Application_Model_DbTable_Prodaja();\n \n //$upit=\"SELECT naziv_proizvoda FROM prodaja WHERE id=\".$id;\n \n //$rezultat=$db->query($upit);\n \n $select = $prodaja->select();\n \n $rezultat=$prodaja->fetchAll($select);\n \n return $rezultat;\n \n \n \n }", "public function get_detalle_proveedor($numero_compra){\n\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select c.fecha_compra,c.numero_compra, c.proveedor, c.cedula_proveedor,c.total,p.id_proveedor,p.cedula,p.razon_social,p.telefono,p.correo,p.direccion,p.fecha,p.estado\n from compras as c, proveedor as p\n where \n \n c.cedula_proveedor=p.cedula\n and\n c.numero_compra=?\n \n ;\";\n\n //echo $sql; exit();\n\n $sql=$conectar->prepare($sql);\n \n\n $sql->bindValue(1,$numero_compra);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n\n \n \n }", "function afficherProduits(){\n\t\t$sql=\"SElECT * From product\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "function RellenaDatos()\n{//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t\t\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t} //si no se ejecuta con éxito \n\telse\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "function afficherProduits(){\n\t\t$sql=\"SElECT * From paniers \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t\n }", "public function ConsultarDetalleProduccion($codigo)\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n\r\n $consulta = \"SELECT deta_cantidad_materia_prima, mp_nombre FROM detalle_produccion, materia_prima WHERE\r\n materia_prima.mp_id=detalle_produccion.mp_id AND prod_id=\".$codigo;\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "function obtiene_proyectos(){\r\n $funciones = new funciones();\r\n $funciones->conectar();\r\n $sql=\"Select idProyecto,nomProyecto from tblproyecto where fecbaja is null\";\r\n $result = mysql_query($sql) or die(mysql_error());\r\n $datos=array();\r\n while($fila = mysql_fetch_array($result)){\r\n $datos[]=$fila;\r\n }\r\n return $datos;\r\n }", "public function get($estado) {\n $sql=\"call sp_selectProvincias('$estado')\";\n return parent::getConsultar($sql); \n }", "public function readProveedores(){\n $sql='SELECT idProveedor, nombreProveedor, direccion, telefono,correo FROM proveedor where estado=1 AND proveedor.estadoEliminacion=1';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}", "function consultarProducto (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM producto');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "public function ObtenerPaciente() {\n $sql= $this->config_mdl->_get_data_condition('os_rx',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n $info= $this->config_mdl->_get_data_condition('os_triage',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n if(!empty($sql)){\n $this->setOutput(array('accion'=>'1','rx'=>$sql[0],'paciente'=>$info[0]));\n }else{\n $this->setOutput(array('accion'=>'2'));\n }\n }", "function ConsultarPersonalReporteAPH(){\n $sql = \"CALL spPersonalReporteAPH(?)\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(1, $this->idAsignacionPersonal);\n $query->execute();\n if ($query->rowCount() > 0) {\n return $query->fetchAll();\n }else{\n return null;\n }\n }", "function consultarEstudiantesSinPrueba(){\n $cadena_sql=$this->cadena_sql(\"estudiantesSinPrueba\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "public function readProductos(){\n $sql='SELECT idProducto, foto, nombre, precio, cantidad, nombreProveedor, producto.estado from producto, proveedor where proveedor.idProveedor=producto.idProveedor and producto.estadoEliminacion= 1';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }", "public function dataProveedoresInicial ($id_prod, $id_prov) {\n\n //Busqueda de todos los paises donde quiere recibir el productor para filtrar los metodos de envio\n $paises_prod = DB::select(DB::raw(\"SELECT id_pais FROM rdj_productores_paises\n WHERE id_productor=? ORDER BY id_pais\"),[$id_prod]);\n\n $prov = []; //Variable donde se almacenan los datos a responder de la solicitud HTTP\n\n //Busqueda de información basica del proveedor\n $query = DB::select(\n DB::raw(\"SELECT pr.id AS idp, pr.nombre AS prov, pa.nombre AS pais FROM \n rdj_paises pa, rdj_proveedores pr WHERE pa.id=pr.id_pais AND pr.id=?\"),\n [$id_prov]);\n\n //Almacenamiento de la info basica en aux\n $prov[\"idp\"] = $query[0]->idp;\n $prov[\"prov\"] = $query[0]->prov;\n $prov[\"pais\"] = $query[0]->pais;\n \n //Busqueda de los metodos de pago del proveedor\n $query = DB::select(\n DB::raw(\"SELECT CASE WHEN pa.tipo='c' THEN 'Cuota única' WHEN pa.tipo='p'\n THEN 'Por cuotas' END AS tipo, pa.num_cuotas AS numc, pa.porcentaje AS porc,\n pa.meses AS meses, pa.id FROM rdj_metodos_pagos pa WHERE pa.id_proveedor=?\"),\n [$prov[\"idp\"]]);\n \n //Almacenamiento de arreglo de metodos de pagos del proveedor\n $prov[\"pagos\"] = $query;\n\n //Para los metodos de envio, creamos un arreglo ya que pueden ser varios\n $prov[\"envios\"] = [];\n foreach($paises_prod as $pais) { //Para cada pais del productor buscamos si hay metodo de envio\n\n $query = DB::select(\n DB::raw(\"SELECT e.duracion, e.precio, e.id AS id_envio, p.id AS id_pais, p.nombre AS pais,\n CASE WHEN e.tipo='t' THEN 'Terrestre' WHEN e.tipo='a' THEN 'Aéreo'\n WHEN e.tipo='m' THEN 'Marítimo' END AS tipo FROM rdj_paises p,\n rdj_metodos_envios e WHERE e.id_pais=? AND e.id_proveedor=?\n AND e.id_pais=p.id ORDER BY e.id_pais\"),[$pais->id_pais, $prov[\"idp\"]]);\n\n //Agregamos al arreglo si conseguimos un metodo de envio para el pais\n //como pueden haber varios metodos de envio con el mismo pais necesitamos\n //hacer otro foreach\n if($query != []) {\n foreach($query as $met) {\n $metodo = [];\n $metodo[\"detalles\"] = [];\n $metodo[\"id_envio\"] = $met->id_envio;\n $metodo[\"id_pais\"] = $met->id_pais;\n $metodo[\"duracion\"] = $met->duracion;\n $metodo[\"precio\"] = $met->precio;\n $metodo[\"pais\"] = $met->pais;\n $metodo[\"tipo\"] = $met->tipo;\n array_push($prov[\"envios\"],$metodo);\n }\n }\n }\n\n //Para los detalles o modificadores de los metodos de envios conseguidos\n for($i = 0; $i <= sizeof($prov[\"envios\"]) - 1; $i++) {\n //Busqueda de los detalles de un metodo de envio\n $query = DB::select(\n DB::raw(\"SELECT d.id, d.nombre AS det, d.mod_precio AS precio, d.mod_duracion AS duracion\n FROM rdj_detalles_metodos_envios d WHERE d.id_envio=? AND d.id_proveedor=?\n AND d.id_pais=?\"),[$prov[\"envios\"][$i][\"id_envio\"], $id_prov, $prov[\"envios\"][$i][\"id_pais\"]]\n );\n //Agregamos al arreglo si conseguimos un detalle de envio para el metodo\n //como pueden haber varios detalles de envio con el mismo metodo necesitamos\n //hacer otro foreach\n if($query != []) {\n foreach($query as $det) {\n $detalle = [];\n $detalle[\"id\"] = $det->id;\n $detalle[\"det\"] = $det->det;\n $detalle[\"precio\"] = $det->precio;\n $detalle[\"duracion\"] = $det->duracion;\n array_push($prov[\"envios\"][$i][\"detalles\"],$detalle);\n }\n } \n }\n\n /* Buscamos todas las esencias del proveedor y las guardamos */\n $prov[\"esencias\"] = $query = DB::select(\n DB::raw(\"SELECT e.cas_ing_esencia AS cas, e.nombre AS ing, CASE WHEN\n e.naturaleza='n' THEN 'natural' WHEN e.naturaleza='s' THEN 'sintetica' END\n AS tipo FROM rdj_ingredientes_esencias e WHERE e.id_proveedor=? \n ORDER BY e.cas_ing_esencia\"), \n [$id_prov]);\n \n /* Buscamos todos los otros ingredientes del proveedor y los guardamos */\n $prov[\"otros\"] = $query = DB::select(\n DB::raw(\"SELECT o.cas_otro_ing AS cas, o.nombre AS ing\n FROM rdj_otros_ingredientes o WHERE o.id_proveedor=? \n ORDER BY o.cas_otro_ing\"), \n [$id_prov]);\n\n /* Proceso que elimina ingredientes contratados exclusivamente de la lista de ingredientes disponibles */\n $ingsExclusivos = DB::select(DB::raw(\"SELECT dc.cas_ing_esencia AS cas_esen, dc.cas_otro_ing AS cas_otro \n FROM rdj_contratos c, rdj_detalles_contratos dc WHERE c.fecha_apertura=dc.fecha_apertura \n AND c.id_proveedor=dc.id_proveedor AND c.id_proveedor=? AND c.exclusivo=true AND c.cancelacion=false\"),[$id_prov]);\n\n $esenFiltradas = [];\n $otrosFiltrados = [];\n\n foreach($prov[\"esencias\"] as $esen) {\n $cond = false;\n foreach($ingsExclusivos as $ing) {\n if($ing->cas_esen != null && $esen->cas == $ing->cas_esen) \n $cond = true;\n }\n if($cond == false) array_push($esenFiltradas, $esen);\n }\n\n foreach($prov[\"otros\"] as $otro) {\n $cond = false;\n foreach($ingsExclusivos as $ing) {\n if($ing->cas_otro != null && $otro->cas == $ing->cas_otro) \n $cond = true;\n }\n if($cond == false) array_push($otrosFiltrados, $otro);\n }\n\n $prov[\"esencias\"] = $esenFiltradas;\n $prov[\"otros\"] = $otrosFiltrados;\n \n /* Buscamos las presentaciones de cada esencia y las guardamos */\n foreach($prov[\"esencias\"] as $esen) {\n $query = DB::select(\n DB::raw(\"SELECT p.id, p.volumen AS vol, p.precio\n FROM rdj_presents_ings_esencias p WHERE p.cas_ing_esencia=?\n ORDER BY p.id\"),\n [$esen->cas]);\n $esen->cas = Controller::stringifyCas($esen->cas);\n $esen->pres = $query;\n }\n \n /* Buscamos las presentaciones de cada otro ing y las guardamos */\n foreach($prov[\"otros\"] as $otro) {\n $query = DB::select(\n DB::raw(\"SELECT p.id, p.volumen AS vol, p.precio\n FROM rdj_present_otros_ings p WHERE p.cas_otro_ing=?\n ORDER BY p.id\"),\n [$otro->cas]);\n $otro->cas = Controller::stringifyCas($otro->cas);\n $otro->pres = $query;\n }\n\n \n //Devolvemos a la interfaz la data necesaria para continuar\n return response([$prov],200);\n }", "function listar_procesos($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre, tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_procesos\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "public function busquedaEstudianteplanificacion() {\n $con = \\Yii::$app->db_academico;\n $estado = 1;\n \n $sql = \"SELECT est.per_id as id, concat(/*est.per_id, ' - ',*/ pers.per_cedula, ' - ', \n ifnull(pers.per_pri_nombre, ' ') ,' ', \n ifnull(pers.per_pri_apellido,' ')) as name\n FROM db_academico.estudiante est\n JOIN db_asgard.persona pers ON pers.per_id = est.per_id\n WHERE pers.per_estado = :estado AND\n pers.per_estado_logico = :estado AND\n est.est_estado = :estado AND\n est.est_estado_logico = :estado;\";\n\n $comando = $con->createCommand($sql);\n $comando->bindParam(\":estado\", $estado, \\PDO::PARAM_STR);\n $resultData = $comando->queryAll();\n return $resultData;\n }", "function consultarNotaAprobatoria() {\r\n\r\n $variables=array('codProyectoEstudiante'=> $this->datosEstudiante['CARRERA'] \r\n );\r\n $cadena_sql = $this->sql->cadena_sql(\"nota_aprobatoria\", $variables);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n return $resultado[0][0];\r\n }", "public function read(){\n $sql = 'SELECT * FROM produtos';\n\n // Preparar a query \n $stmt = Conexao::getConn()->prepare($sql);\n // Executando query\n $stmt->execute();\n\n // Verificando se retornou algo do banco\n if($stmt->rowCount()>0){\n // Criando um array com todos os registros\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n return $result;\n }else{// Se nao encontrar nenhum dado no banco\n return [];\n }\n }", "public function readall(){ //read\r\n\r\n $sql=\"select * from proveedor\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n }", "function listarCotizacionProcesoCompra(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COTPROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function readValoraciones(){\n $sql='SELECT valoracion, producto.nombre as producto, cliente.nombre as cliente FROM cliente, producto, valoraciones WHERE producto.idProducto=valoraciones.idProducto AND cliente.idCliente=valoraciones.idCliente and producto.idProducto = ?';\n $params=array($this->id);\n return Database::getRows($sql, $params);\n }", "public function get_data_prospektus()\n {\n \t$this->db->from('prospektus as p');\n \t$this->db->join('unit as u', 'u.id_unit = p.unit', 'inner');\n\n \treturn $this->db->get();\n }", "public function ConsultarDetallePedidos($codigo)\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n\r\n $consulta = \"SELECT productos.pro_id, pro_descripcion, pro_precio, dep_cantidad, dep_subtotal FROM productos, detalle_pedido WHERE\r\n productos.pro_id=detalle_pedido.pro_id AND ped_id=\".$codigo;\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "function ConsultarMotivoConsultaAPH(){\n $sql = \"CALL spConsultarMotivoConsultaAPH(?)\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(1, $this->idReporteAPH);\n $query->execute();\n if ($query->rowCount() > 0) {\n return array('motivosConsulta' => $query->fetchAll());\n }else{\n return array('motivosConsulta' => null);\n }\n }", "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function Readto()\n {\n $conexion=floopets_BD::Connect();\n $conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n $consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia \";\n // $consulta=\"SELECT * FROM citas WHERE Cod_usu=?\";\n $query=$conexion->prepare($consulta);\n $query->execute(array());\n\n\t$resultado=$query->fetchAll(PDO::FETCH_BOTH);\n\n\tfloopets_BD::Disconnect();\n\n\treturn $resultado;\n }", "public function loadChargeProcesses() {\n $this->logger->debug(\"== En loadchargeProcesses == \");\n\n $sql = \"SELECT cs.id, carrier, suscriptionId, cantidad_intentos, tipo, dias_reintentos\n FROM suscriptions.cobros_suscripciones cs INNER JOIN suscriptions.horarios_cobros hc ON cs.id = hc.id_cobro_suscripcion\n inner join suscriptions.suscriptions s on s.id = cs.suscriptionId\n WHERE hour(hora) = hour(curtime())\";\n //WHERE concat(hour(hora), ':', minute(hora)) = concat(hour(curtime()),':',minute(curtime()))\";\n\n $this->logger->debug(\"SQL generado: \" . $sql);\n $rs = mysql_query($sql, $this->db);\n if($rs) {\n while($row = mysql_fetch_assoc($rs)) {\n $proceso = new ProcesoCobro($row['id'], $row['carrier'], $row['suscriptionId'],\n $row['cantidad_intentos'], $row['tipo'],\n $row['dias_reintentos'],\n $this->db);\n $this->procesos[] = $proceso;\n }\n } else {\n $this->logger->error(\"SQL ERROR: \" . mysql_error() .\" :: $sql \");\n }\n\n $this->logger->debug(\"== Cantidad de procesos cargados: \" . count($this->procesos));\n $this->logger->info(\"== Cantidad de procesos de cobro cargados: \" . count($this->procesos));\n }", "public function getAllProtypes(){\r\n\t\t//viet cau sql\r\n\t\t$sql =\"SELECT * FROM protypes\";\r\n\t\t//thuc thi cau truy van\r\n\t\t$obj = self::$conn->query($sql);\r\n\t\treturn $this->getData($obj);\r\n\t}", "public function costo_suaje($proceso) {\n\n $sql = \"SELECT * from proc_suaje where status = 'A' and nombre = '\" . $proceso . \"'\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }", "public function costo_digital_rango($proceso) {\n\n $nombre_tmp = trim(strval($proceso));\n\n $sql = \"SELECT * from proc_digital where status = 'A' and nombre = '\" . $nombre_tmp . \"'\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }", "public function Buscar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t//por medio del objeto de la clase datos llamamos el metodo encargado de hacer consultas en la base de datos\n\t\t\treturn $this->cn->consultar(\"call SPDepartamentoGet()\");\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\t$this->log->write('Error en la clase Departamento metodo buscar '.$e->getMessage());\n\t\t}\n\t}", "public function get_data_pros_con()\n {\n \t$this->db->select('p.add_time, n.nama_pengguna, p.id_prospektus, p.status');\n \t$this->db->from('prospektus as p');\n \t$this->db->join('pengguna as n', 'n.id_pengguna = p.id_pengguna', 'inner');\n \t$this->db->where('p.status !=', null);\n \t$this->db->order_by('p.add_time', 'desc');\n\n \treturn $this->db->get();\n }", "function setColeccion() {\n $this->query = \"SELECT * FROM PROFESOR\";\n $this->datos = BDConexionSistema::getInstancia()->query($this->query);\n\n for ($x = 0; $x < $this->datos->num_rows; $x++) {\n $this->addElemento($this->datos->fetch_object(\"Profesor\"));\n }\n }", "function consultar(){\n\t\t\n\t\t$this->mysqli = conectarBD();\n\t\t\n\t\t$sql = \"SELECT Linea_Factura.Id_Linea_Factura,Linea_Factura.Id_Factura,Servicio.Nombre,Linea_Factura.Importe,Linea_Factura.Descripcion FROM Linea_Factura INNER JOIN Servicio WHERE Linea_Factura.Id_Factura='\".$this->factura.\"' AND Linea_Factura.Id_Servicio=Servicio.Id_Servicio AND Linea_Factura.Borrado='0';\";\n\t\t$resultado = $this->mysqli->query($sql);\t\n\t\tif ($resultado->num_rows > 0){\n\t\t\twhile($row = $resultado->fetch_array()){\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t\treturn $array;\n\t\t}\n\t}", "function GetPeliculasConGenero(){\n //$sentencia = $this->db->prepare(\"SELECT * FROM peliculas INNER JOIN genero ON peliculas.titulo = genero.nombre\");\n $sentenciasad = $this->db->prepare(\"SELECT peliculas.titulo, genero.nombre FROM peliculas INNER JOIN genero ON peliculas.id_genero = genero.id_genero\");\n $sentencias->executing();\n //print_r( $sentencia->fetchAll(PDO::FETCH_OBJ));// vemos que este cargado y con que \n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "public function select(){\n\t\t$sql = \"SELECT * FROM producto\n\t\t\t\twhere prod_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function listarPorCpf(){\n $query = \"select * from usuario where cpf=?\";\n\n //preparando a consulta para a execução\n $stmt=$this->conn->prepare($query);\n\n //vamos fazer um blind(ligação) do cpf pesquisado\n //com o paramêtro da consulta, neste caso é o \n //ponto de interrogação\n $stmt ->bindParam(1,$this->cpf);\n\n //executar efetivamente a consulta \n $stmt ->execute();\n\n //Organizar os dados retornados da consulta para \n // a exibição em formato de json\n // Vamos usar uma variavel e um array para associar \n // os campos da tabela\n $linha = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //organizar no objeto usuario(aqrquivo usuario.php)\n //os dados retornados\n //da tabela usuario que está no banco de dados\n \n $this->idusuario = $linha['idusuario'];\n $this->email = $linha['email'];\n $this->senha = $linha['senha'];\n $this->nome = $linha['nome'];\n $this->cpf = $linha['cpf'];\n $this->telefone = $linha['telefone'];\n $this->foto = $linha['foto'];\n\n\n }", "public function Buscar($conexion)\n {\n $conectar = $conexion;\n $codigo = $this->codigo;\n $resultado = $conectar->query(\"SELECT * FROM tblpropiedad WHERE codigo = '$codigo'\");\n if($resultado->num_rows == 0)\n { \n return false;\n }\n $resultado = mysqli_fetch_object($resultado);\n return $resultado;\n }", "public function buscar() {\n $buscarUsuario = new SqlQuery(); //instancio la clase\n (string) $tabla = get_class($this); //uso el nombre de la clase que debe coincidir con la BD \n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $statement = $this->refControladorPersistencia->ejecutarSentencia(\n $buscarUsuario->buscar($tabla)); //senencia armada desde la clase SqlQuery sirve para comenzar la busqueda\n $arrayUsuario = $statement->fetchAll(PDO::FETCH_ASSOC); //retorna un array asociativo para no duplicar datos\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n return $arrayUsuario; //regreso el array para poder mostrar los datos en la vista... con Ajax... y dataTable de JavaScript\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n }\n }", "public function listar()\n {\n $sql = \"SELECT CO.idconsulta, US.nombre, US.area, US.email, CO.problema, CO.tipo_problema,CO.estado, CO.tipo_estado,date(CO.fecha_hora) as fecha \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado IN ('Pendiente','En Proceso') AND CO.condicion=''\";\n return ejecutarConsulta($sql);\n\n }", "function consultarPedido (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM pedido');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function costo_accesorios($proceso) {\n\n $sql = \"SELECT * from proc_accesorios where status = 'A' and nombre = '\" . $proceso . \"'\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }", "public function consultarStartup($conexao,$id_pessoa){\n $query = \"select * from empresa_startup where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$id_pessoa]);\n $s = $stmt->fetch();\n $this->setLogo($s[\"logo\"]);\n $this->setNome($s['nome']);\n $this->setRazaoSocial($s['razao_social']);\n $this->setCnpj($s['cnpj']);\n $this->setEmail($s['email']);\n $this->setDataFundacao($s['data_fundacao']);\n $this->setTelefone($s['telefone']);\n $this->setDescricaoCurta($s['descricao_curta']);\n $this->setDescricao($s['descricao']);\n $this->setTags($s['tags']);\n $this->setModeloNegocio($s['modelo_negocio']);\n $this->setPublicoAlvo($s['publico_alvo']);\n $this->setMomento($s['momento']);\n $this->setSegmentoPricipal($s['segmento_principal']);\n $this->setSegmentoSecundario($s['segmento_secundario']);\n $this->setTamanhoTime($s['tamanho_time']);\n $this->setFaturamentoAnual($s['faturamento_anual']);\n $this->setWebsite($s['website']);\n $this->setLinkedin($s['linkedin']);\n $this->setFacebook($s['facebook']);\n $this->setAppStore($s['app_store']);\n $this->setGooglePlay($s['google_play']);\n $this->setYoutube($s['youtube']);\n $this->setInstagram($s['instagram']);\n $this->setCep($s['cep']);\n $this->setNumero($s['numero']);\n $this->setLogradouro($s['logradouro']);\n $this->setComplemento($s['complemento']);\n $this->setBairro($s['bairro']);\n $this->setEstado($s['estado']);\n $this->setEnderecoPrincipal($s['endereco_principal']);\n $this->setCargoFuncao($s['cargo_funcao']);\n $this->setNivelHieraquico($s['nivel_hierarquico']);\n }", "public function readPreDetalle(){\n $sql='SELECT idPreDetalle, producto.nombre as producto, predetalle.cantidad as cantidad, producto.precio as precio, producto.foto as foto,(producto.precio * predetalle.cantidad) as total , producto.cantidad as cantidadP FROM producto, predetalle WHERE producto.idProducto = predetalle.idProducto AND idCliente = ?';\n $params=array($this->cliente);\n return Database::getRows($sql, $params);\n }", "function getProdotto($id){\n $db = databaseConnection();\n $db -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $query = \"SELECT * FROM Prodotto WHERE ID=$id;\";\n $rows = $db -> query($query);\n return $rows -> fetchAll(PDO::FETCH_ASSOC);\n}", "function listarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_sel';\n\t\t$this->transaccion='PRE_PRE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_presupuesto','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('gestion','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function consultaSeguimientos(){\n\t\t$conect= Yii::app()->db;\n\t\t$sqlConsSegPaiDer=\"select fecha_seguim_compderecho,seguim_compderecho from seguimiento_compderecho \n\t\twhere id_pai=:id_pai and id_derechocespa=:id_derechocespa and num_doc=:num_doc order by fecha_seguim_compderecho desc\";\n\t\t$segCompDer=$conect->createCommand($sqlConsSegPaiDer);\n\t\t$segCompDer->bindParam(\":id_pai\",$this->id_pai,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":id_derechocespa\",$this->id_derechocespa,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":num_doc\",$this->num_doc,PDO::PARAM_STR);\n\t\t$readConsSegPaiDer=$segCompDer->query();\n\t\t$resConsSegPaiDer=$readConsSegPaiDer->readAll();\n\t\t$readConsSegPaiDer->close();\n\t\treturn $resConsSegPaiDer;\n\t}", "public function getProdutos(){\n $pdo = Banco::conectar();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sqlQuery = \"SELECT id, nome, valor, quantidade, descricao FROM produto\";\n $stmt = $pdo->prepare($sqlQuery);\n $stmt->execute();\n Banco::desconectar();\n return $stmt;\n }", "function consultarproduto(Connection $con, $codproduto){\r\n\trequire_once(\"../class/consultaproduto.class.php\");\r\n\r\n\t$consultaproduto = new ConsultaProduto($con);\r\n\t$consultaproduto->addcodproduto($codproduto);\r\n\t$consultaproduto->consultar();\r\n\t$encontrado = $consultaproduto->getencontrado();\r\n\treturn array_shift($encontrado);\r\n}", "function afficher_produits()\n{\n\t$sql = \"SELECT * FROM produit\";\n\tglobal $connection;\n\treturn mysqli_query($connection, $sql);\n}", "public function read($conexao){\n\n //$pessoa_user=new PessoaVO();\n // Consulta ao banco de dados\n\n $sql = \"SELECT * from pessoa where permissao='user' order by id_pessoa desc;\";\n $resposta=mysqli_query($conexao,$sql);\n if(($resposta==true) && (mysqli_affected_rows($conexao)>0)){\n $pessoa_user=new PessoaVO();\n while ($res=mysqli_fetch_array($resposta)){\n $pessoa_user->setIdPessoa($res['id_pessoa']);\n $pessoa_user->setNome($res['nome']);\n $pessoa_user->setCpf($res['cpf']);\n $pessoa_user->setEmail($res['email']);\n $pessoa_user->setEndereco($res['endereco']);\n $pessoa_user->setTelefone($res['telefone']);\n $pessoa_user->setPermissao($res['permissao']);\n\n $return[]=clone $pessoa_user;\n }\n return $return;\n }else{\n echo\"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\"> Não há nenhum cliente cadastrado !!!</div>\";\n return 0;\n }\n }", "public function buscarDocente($codigo){\r\n $query = \"SELECT * FROM docente WHERE codigo = \".$codigo.\";\";\r\n $statement = $this->cdb->prepare($query);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\r\n return $rows; \r\n }", "public function get_datos_pac_rec_ini($sucursal,$id_usuario){\n\n $conectar= parent::conexion();\n\t \n\t $sql= \"select v.id_ventas,v.sucursal,v.subtotal,v.numero_venta,p.nombres,p.telefono,p.id_paciente,v.tipo_pago,v.vendedor from ventas as v join pacientes as p where p.id_paciente=v.id_paciente and v.sucursal=? and v.id_usuario=? order by id_ventas DESC limit 1;\";\n\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $sucursal);\n $sql->bindValue(2, $id_usuario);\n $sql->execute();\n\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n\n}", "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('prdo');\n\n\t\t$response = $grid->getData('prdo', array(array()), array(), false, $mWHERE, 'id', 'Desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "function consultarNotas(){ \n $cadena_sql=$this->cadena_sql(\"notas\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "public function consultarPeriodoplanifica() {\n $con = \\Yii::$app->db_academico;\n $estado = 1;\n $condition = \"\";\n\n $sql = \"SELECT distinct pla_periodo_academico as id,\n pla_periodo_academico as name\n FROM \" . $con->dbname . \".planificacion\n WHERE pla_estado = :estado AND\n pla_estado_logico = :estado;\";\n\n $comando = $con->createCommand($sql);\n $comando->bindParam(\":estado\", $estado, \\PDO::PARAM_STR);\n $resultData = $comando->queryAll();\n return $resultData;\n }", "function precioConsulta(){\n\t\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT precioConsulta\n\t\t\t\t\tFROM tb_configuraciones\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['precioConsulta'];\t\t\t\t\n\t\t\n\t}", "public function BuscarProductosVendidos() \n{\n\tself::SetNames();\n\t$sql =\"SELECT productos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, categorias.nomcategoria, SUM(detalleventas.cantventa) as cantidad FROM (productos LEFT JOIN detalleventas ON productos.codproducto=detalleventas.codproducto) \n\tLEFT JOIN categorias ON categorias.codcategoria=productos.codcategoria WHERE DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') <= ? GROUP BY detalleventas.codproducto, detalleventas.precioventa ORDER BY productos.codproducto ASC\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN PRODUCTOS FACTURADOS PARA EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function carga_datos($idproveedor)\n\t{\n\n\t\t// carga los datos generales\n\t\t$sql=\"\n\t\tSELECT\n\t\t\tcp.IDPROVEEDOR, cp.NOMBREFISCAL, cp.NOMBRECOMERCIAL, \n\t\t\tcp.IDTIPODOCUMENTO, cp.IDDOCUMENTO, cp.EMAIL1, cp.EMAIL2, cp.EMAIL3,\n\t\t\tcp.BRSCH, cp.FDGRV, cp.ZTERM, cp.MWSKZ, cp.PARVO, cp.PAVIP,\n\t\t\tcp.ACTIVO,cp.INTERNO,\n\t\t\tcp.ARREVALRANKING,\n\t\t\tcp.CDE,\n\t\t\tcp.SKILL,\n\t\t\tcp.EVALFIDELIDAD,\n\t\t\tcp.EVALINFRAESTRUCTURA,\n\t\t\tcp.EVALSATISFACCION,\n\t\t\tcp.IDMONEDA,\n\t\t\tcp.OBSERVACIONES,\n\t\t\tYEAR(cp.FECHAINICIOACTIVIDADES) ANIO,\n\t\t\tMONTH(cp.FECHAINICIOACTIVIDADES) MES, \n\t\t\tDAY(cp.FECHAINICIOACTIVIDADES) DIA\n\t\tFROM\n\t\t$this->catalogo.catalogo_proveedor cp\n\t\tWHERE\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\";\n\n\t\t$result=$this->query($sql);\n\t\twhile ($reg = $result->fetch_object()) {\n\t\t\t$this->idproveedor= $reg->IDPROVEEDOR;\n\t\t\t$this->nombrefiscal= $reg->NOMBREFISCAL;\n\t\t\t$this->nombrecomercial = $reg->NOMBRECOMERCIAL;\n\t\t\t$this->idtipodocumento = $reg->IDTIPODOCUMENTO;\n\t\t\t$this->iddocumento = $reg->IDDOCUMENTO;\n\t\t\t$this->idubigeo = $reg->IDUBIGEO;\n\t\t\t$this->activo = $reg->ACTIVO;\n\t\t\t$this->interno = $reg->INTERNO;\n\t\t\t$this->arrevalranking = $reg->ARREVALRANKING;\n\t\t\t$this->cde = $reg->CDE;\n\t\t\t$this->skill = $reg->SKILL;\n\t\t\t$this->evalfidelidad = $reg->EVALFIDELIDAD;\n\t\t\t$this->evalinfraestructura = $reg->EVALINFRAESTRUCTURA;\n\t\t\t$this->evalsatisfaccion = $reg->EVALSATISFACCION;\n\t\t\t$this->moneda = new moneda();\n\t\t\t$this->moneda->carga_datos($reg->IDMONEDA);\n\t\t\t$this->observaciones = $reg->OBSERVACIONES;\n\n\t\t\t$this->email1 = $reg->EMAIL1;\n\t\t\t$this->email2 = $reg->EMAIL2;\n\t\t\t$this->email3 = $reg->EMAIL3;\n\t\t\t$this->brsch = $reg->BRSCH;\n\t\t\t$this->fdgrv = $reg->FDGRV;\n\t\t\t$this->zterm = $reg->ZTERM;\n\t\t\t$this->mwskz = $reg->MWSKZ;\n\t\t\t$this->parvo = $reg->PARVO;\n\t\t\t$this->pavip = $reg->PAVIP;\n\t\t\t$this->anio = $reg->ANIO;\n\t\t\t$this->mes = $reg->MES;\n\t\t\t$this->dia = $reg->DIA;\n\n\t\t}\n\n\t\t// carga los datos de ubigeo\n\t\t$sql=\"\n\t\tselect \n\t\t\t* \n\t\tfrom\n\t\t$this->catalogo.catalogo_proveedor_ubigeo\n\t\twhere\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\twhile ($reg=$resul->fetch_object()) {\n\t\t\t$this->cvepais = $reg->CVEPAIS;\n\t\t\t$this->cveentidad1 = $reg->CVEENTIDAD1;\n\t\t\t$this->cveentidad2 = $reg->CVEENTIDAD2;\n\t\t\t$this->cveentidad3 = $reg->CVEENTIDAD3;\n\t\t\t$this->cveentidad4 = $reg->CVEENTIDAD4;\n\t\t\t$this->cveentidad5 = $reg->CVEENTIDAD5;\n\t\t\t$this->cveentidad6 = $reg->CVEENTIDAD6;\n\t\t\t$this->cveentidad7 = $reg->CVEENTIDAD7;\n\t\t\t$this->cvetipovia = $reg->CVETIPOVIA;\n\t\t\t$this->descripcion = $reg->DESCRIPCION;\n\t\t\t$this->direccion = $reg->DIRECCION;\n\t\t\t$this->codpostal = $reg->CODPOSTAL;\n\t\t\t$this->numero = $reg->NUMERO;\n\t\t\t$this->latitud = $reg->LATITUD;\n\t\t\t$this->longitud = $reg->LONGITUD;\n\t\t\t$this->referencia1 = $reg->REFERENCIA1;\n\t\t\t$this->referencia2 = $reg->REFERENCIA2;\n\t\t}\n\n\t\t// \t CARGA DE LOS TELEFONOS DEL PROVEEDOR //\n\t\t$sql=\"\nSELECT \n\tcpt.IDPROVEEDOR, \n\tcpt.CODIGOAREA,\n\tcpt.IDTIPOTELEFONO,\n\tcpt.NUMEROTELEFONO,\n\tcpt.EXTENSION,\n\tcpt.IDTSP,\n\tcpt.COMENTARIO,\n\tcpt.PRIORIDAD,\n\tcd.DESCRIPCION NOMBRECODIGOAREA,\n\tctsp.DESCRIPCION NOMBRETSP,\n\tctt.DESCRIPCION NOMBRETIPOTELEFONO\nFROM\n\tcatalogo_proveedor_telefono cpt\n\tLEFT JOIN catalogo_ddn cd ON cd.DDN = cpt.CODIGOAREA\n\tLEFT JOIN catalogo_tsp ctsp ON ctsp.IDTSP = cpt.IDTSP\n\tLEFT JOIN catalogo_tipotelefono\tctt ON ctt.IDTIPOTELEFONO = cpt.IDTIPOTELEFONO\nWHERE\n\tcpt.IDPROVEEDOR ='$idproveedor'\n\tORDER BY cpt.PRIORIDAD;\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\tunset($this->telefonos);\n\t\twhile ($reg = $resul->fetch_object())\n\t\t{\n\t\t\tif ($reg->NUMEROTELEFONO!='')\n\t\t\t{\n\t\t\t\t$this->telefonos[$reg->PRIORIDAD-1]= array(\n\t\t\t\t'IDTIPOTELEFONO'=>$reg->IDTIPOTELEFONO,\n\t\t\t\t'CODIGOAREA' => $reg->CODIGOAREA,\n\t\t\t\t'NUMEROTELEFONO' => strip_tags($reg->NUMEROTELEFONO),\n\t\t\t\t'EXTENSION' => $reg->EXTENSION,\n\t\t\t\t'IDTSP' => $reg->IDTSP,\n\t\t\t\t'TELF_COMENTARIO'=>$reg->COMENTARIO,\n\t\t\t\t'NOMBRECODIGOAREA'=>$reg->NOMBRECODIGOAREA,\n\t\t\t\t'NOMBRETSP'=>$reg->NOMBRETSP,\n\t\t\t\t'NOMBRETIPOTELEFONO'=>$reg->NOMBRETIPOTELEFONO\n\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// CARGA DE LOS SERVICIOS DEL PROVEEDOR //\n\t\t$sql=\"\n\t\tSELECT \n\t\t\tIDSERVICIO\n\t\tFROM\n\t\t\tcatalogo_proveedor_servicio\n\t\tWHERE\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\twhile ($reg = $resul->fetch_object()) {\n\t\t\t$this->servicios[]=$reg->IDSERVICIO;\n\n\t\t}\n\n\t\t// CARGA DE SOCIEDADES DEL PROVEEDOR\n\t\t$sql=\"\n\t\tSELECT \n\t\t\tIDSOCIEDAD\n\t\tFROM\n\t\t\tcatalogo_proveedor_sociedad\n\t\tWHERE\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\twhile ($reg = $resul->fetch_object()) {\n\t\t\t$this->sociedades[$reg->IDSOCIEDAD]=$reg->IDSOCIEDAD;\n\n\t\t}\n\n\t\t// CARGA DE CONTACTOS //\n\t\t$sql=\"\n\t\tSELECT * \n\t\t\tFROM $this->catalogo.catalogo_proveedor_contacto\n\t\tWHERE\t\n\t\t\tIDPROVEEDOR ='$idproveedor'\n\t\t\tORDER BY RESPONSABLE DESC\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\twhile ($reg = $resul->fetch_object()) {\n\t\t\t$this->contactos[$reg->IDCONTACTO]=$reg->APPATERNO.' '.$reg->APMATERNO.' '.$reg->NOMBRE;\n\t\t}\n\t\treturn;\n\t}", "public function get(){\r\n\t\t\r\n\t\t$assoc = [];\r\n\t\t$listado = [];\r\n\t\t$numeros = [];\r\n\t\t$totales = [];\r\n\r\n\t\t $where = \"WHERE 1=1 \";\r\n\r\n\t\t if ($_GET['rut']){\r\n\t\t \t$where .= \" and p.RUT_PROVEEDOR = '\" . $_GET['rut'] . \"'\";\r\n\t\t }\r\n\r\n if ($_GET['razon_social']){\r\n $where .= \" and p.RUT_PROVEEDOR = '\" . $_GET['razon_social'] . \"'\";\r\n }\r\n \r\n\t\t// consulta principal\r\n\t\t$consulta = \"\r\n\t\t\tSELECT \r\n\t\t\t\t \r\n\t\t\t\tp.RUT_PROVEEDOR,\r\n\t\t\t\tp.RAZON_SOCIAL,\r\n\t\t\t\tpc.NOMBRE,\r\n\t\t\t\tpc.TELEFONO,\r\n\t\t\t\tpc.EMAIL \r\n\t\t\tFROM\r\n\t\t\t\t PROVEEDORES P LEFT JOIN PROVEEDORES_CONTACTO PC ON P.RUT_PROVEEDOR=PC.RUT_PROVEEDOR \r\n\t\t\t\t \r\n\t\t\t$where\t \r\n\t\t\t\t \r\n\t\t\t\";\r\n\t\t\t\r\n\t\t// $consulta = \"SELECT * FROM PROVEEDORES\";\r\n\r\n\t\t//consulta paginada\r\n\t\t$query = queryPagination($consulta, $this->page);\r\n\t\t$result = oci_parse($this->pdo, $query);\r\n\t\toci_execute($result);\r\n\t\t$listado = queryResultToAssoc($result);\r\n\r\n\t\t//consulta para recuperar todos los numeros de licitaciones\r\n\t\t$result = oci_parse($this->pdo, $consulta);\r\n\t\toci_execute($result);\r\n\t\t$numeros = queryResultToAssoc($result);\r\n\r\n\t\t//consulta para recuperar cantidad de páginas disponibles\r\n\t\t$result = oci_parse($this->pdo, $consulta);\r\n\r\n\t\tif ($result){\r\n\t\t\t$_SESSION[\"feedback\"] = \"Contrato asignado correctamente\";\r\n\t\t}\r\n\t\t\r\n\t\toci_execute($result);\r\n\t\t$totales = queryResultToAssoc($result);\r\n\r\n\t\t\r\n\r\n\t\tarray_push($assoc, $listado);\r\n\t\tarray_push($assoc, $numeros);\r\n\t\tarray_push($assoc, $totales);\r\n\r\n\t\toci_close($this->pdo);\r\n\t\treturn $assoc;\r\n\t}", "public function buscarEstudianteActa() {\n\n $sql = \"SELECT\n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n WHERE \n E.codigoestudiante = ?\n AND E.codigoestudiante NOT IN ( \n SELECT \n DC.EstudianteId\n FROM \n DetalleAcuerdoActa DC\n WHERE \n CodigoEstado = 100)\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n $carrera = new Carrera(null);\n\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $fechaGrado->setCarrera($carrera);\n $this->setTipoDocumento($tipoDocumento);\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "public function get_detalle_recibo_paciente($numero_venta){\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select e.nombre,p.nombres,p.telefono,r.numero_venta,r.numero_recibo,r.cant_letras,r.monto,r.a_anteriores,r.abono_act,r.saldo,r.forma_pago,r.asesor,r.id_usuario,r.prox_abono,r.marca_aro,r.modelo_aro,r.color_aro from pacientes as p inner join recibos as r on p.id_paciente=r.id_paciente inner join empresas as e on p.id_empresas=e.id_empresas where numero_venta=? order by r.numero_recibo desc limit 1;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$numero_venta);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function listar_acciones_procesos($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre, tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_acciones\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}", "function consultar()\n{\n global $conexao, $tipoServicos;\n\n $tipoServicos = $conexao->query(\"SELECT * FROM tipoServico\") or die($conexao->error);\n}", "function consultarEstudiantesPruebaAcademica(){\n $cadena_sql=$this->cadena_sql(\"estudiantesPruebaAcademica\", $this->codProyecto);\n $estudiantes_prueba=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,\"busqueda\" );\n return $estudiantes_prueba;\n }", "function ConsultarMedicamentosAPH(){\n $sql = \"CALL spConsultarMedicamentosAPH(?)\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(1, $this->idReporteAPH);\n $query->execute();\n if ($query->rowCount() > 0) {\n return array('medicamentos' => $query->fetchAll());\n }else{\n return array('medicamentos' => null);\n }\n }", "public function readTaskc(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore \n INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine WHERE stato = 2\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "function afficher_produits_commande($id_resto) {\n global $connexion;\n try {\n $select = $connexion -> prepare(\"SELECT * \n FROM lunchr_commandes as lc, \n lunchr_ligne_commande as lcl, \n lunchr_produits as lp\n WHERE lc.lc_id = lcl.lc_id\n AND lp.lp_id = lcl.lp_id\n AND lc.lc_id = :id_resto\");\n $select -> execute(array(\"id_resto\" => $id_resto));\n $select -> setFetchMode(PDO::FETCH_ASSOC);\n $resultat = $select -> fetchAll();\n return $resultat;\n }\n \n catch (Exception $e) {\n print $e->getMessage();\n return false;\n }\n }", "public function selecionarEmpresaContratada()\n {\n try\n {\n $sql = \"SELECT * FROM empresa_contratada\";\n $busca = $this->conexao->conectar()->prepare($sql);\n $busca->execute();\n return $busca->fetchALL(PDO::FETCH_OBJ);\n }\n catch(PDOException $erro)\n {\n echo \"Erro\" . $erro->getMessage();\n }\n\n }", "private function _consultar() {\n $where = \"\";\n if(!empty($this->_idDato)){\n $where = \"AND b.id_valor = $this->_idDato \";\n }\n if(!empty($this->_valor)){\n if(is_array($this->_valor)){\n $aux = each($this->_valor);\n $where = \"AND b.valor {$aux['key']} '{$aux['value']}' \";\n }else{\n $where = \"AND b.valor = '$this->_valor' \";\n }\n \n }\n $query = \"SELECT a.nom_tabla,b.* FROM \nmt_tablas a,\nmt_contenidos b\nWHERE a.id_tablas = {$this->_idTabla}\nAND a.estado = 1 $where\nAND a.id_tablas = b.id_tabla\nAND b.estado = 1\";\n \n if(is_array($this->_orden) && count($this->_orden) == 2){\n $query .= (\" ORDER BY \" . ($this->_orden[0] == 1 ? \"id_valor \" : \"valor \") . $this->_orden[1] );\n }\n $con = ConexionSQL::getInstance();\n $id = $con->consultar($query);\n if($res = $con->obenerFila($id)){\n $R = array();\n do{\n $aux = array();\n foreach($res as $key => $valor){\n if(!is_numeric($key)){\n $aux[$key] = $valor;\n }\n }\n $R[] = $aux;\n }while($res = $con->obenerFila($id));\n return $R;\n }\n return false;\n }", "function ReadAll(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='Pendiente'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "function consultarDetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM detalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "static function getAllProduit() {\n $rep = Model::$pdo->query('SELECT *\n\t\t\t\t\t\t\t\tFROM PRODUIT');\n $rep->setFetchMode(PDO::FETCH_CLASS, 'ModelProduit');\n $ans = $rep->fetchAll();\n return $ans;\n }", "public function consultarDatosReporte($arrDatos) {\n\t\t$usuarios = array();\n\t\t$comandosql = $sql = '';\n\t\t\n\t\tif(array_key_exists(\"txtEmail\", $arrDatos) && $arrDatos[\"txtEmail\"] != '-'){\n\t\t\t$sql .= \" AND U.USUARIO = '$txtEmail' \";\n\t\t}\n\t\tif(array_key_exists(\"txtNroId\", $arrDatos) && $arrDatos[\"txtNroId\"] != '0'){\n\t\t\t$sql .= \" AND P.cedula = '$txtNroId' \";\n\t\t}\n\t\tif(array_key_exists(\"txtNombre1\", $arrDatos) && $arrDatos[\"txtNombre1\"] != '-'){\n\t\t\t$sql .= \" AND LOWER(P.primer_nombre) LIKE LOWER('%$txtNombre1%') \";\n\t\t}\n\t\tif(array_key_exists(\"txtNombre2\", $arrDatos) && $arrDatos[\"txtNombre2\"] != '-'){\n\t\t\t$sql .= \" AND LOWER(P.segundo_nombre) LIKE LOWER('%$txtNombre2%') \";\n\t\t}\n\t\tif(array_key_exists(\"txtApellido1\", $arrDatos) && $arrDatos[\"txtApellido1\"] != '-'){\n\t\t\t$sql .= \" AND LOWER(P.primer_apellido) LIKE LOWER('%$txtApellido1%') \";\n\t\t}\n\t\tif(array_key_exists(\"txtApellido2\", $arrDatos) && $arrDatos[\"txtApellido2\"] != '-'){\n\t\t\t$sql .= \" AND LOWER(P.segundo_apellido) LIKE LOWER('%$txtApellido2%') \";\n\t\t}\n\t\t\n\t\t$comandosql = \"SELECT U.id_usuarios, U.nro_encuesta_form, U.USUARIO, LOWER(U.USUARIO) AS usu_minuscula, P.cedula, P.primer_nombre, P.segundo_nombre, P.primer_apellido, P.segundo_apellido,\n\t\t\t\t\tC.FK_ESTADO, e.desc_estado, V.C1I1_DPTO, D.DEPTO, V.C1I2_MPIO, M.MPIO, CL.CLASE, V.C1I4_CO, V.C1I5_AO, V.C1I6_UC, V.C1IV10_DIR \n\t\t\t\t\tFROM cnp_admin_usuarios U \n\t\t\t\t\n\t\t\t\t\tLEFT JOIN cnp_preregistro P ON U.nro_encuesta_form = P.nro_encuesta_form \n\t\t\t\t\tLEFT JOIN cnpv_admin_control C ON U.nro_encuesta_form = C.nro_encuesta_form \n\t\t\t\t\tLEFT JOIN cnpv_param_estados E ON C.fk_estado = E.id_estado \n\t\t\t\t\tLEFT JOIN cnpv_vivienda V ON V.C0I1_ENCUESTA = U.nro_encuesta_form \n\t\t\t\t\tLEFT JOIN (SELECT to_number(VALOR_MINIMO) VALOR_MINIMO, DESCRIPCION DEPTO FROM cnp_respuesta_dominio WHERE ID_DOMINIO = 1) D ON D.valor_minimo = V.C1I1_DPTO \n\t\t\t\t\tLEFT JOIN (SELECT to_number(VALOR_MINIMO) VALOR_MINIMO, DESCRIPCION MPIO FROM cnp_respuesta_dominio WHERE ID_DOMINIO = 2) M ON M.valor_minimo = V.C1I2_MPIO \n\t\t\t\t\tLEFT JOIN (SELECT to_number(VALOR_MINIMO) VALOR_MINIMO, DESCRIPCION CLASE FROM cnp_respuesta_dominio WHERE ID_DOMINIO = 3) CL ON CL.valor_minimo = V.C1I3_CLASE \n\t\t\t\t\tWHERE 1=1 \" . $sql;\n\t\t\n\t\t$comandosql .= \" ORDER BY usu_minuscula ASC \";\n\t\t//echo $comandosql; exit;\n\t\t$query = $this->db->query($comandosql);\n\t\tif ($query->num_rows() > 0){\n\t\t\t$i = 0;\n\t\t\tforeach($query->result() as $row) {\n\t\t\t\t$usuarios[$i][\"codiEncuesta\"] = $row->NRO_ENCUESTA_FORM;\n\t\t\t\t$usuarios[$i][\"txtEmail\"] = $row->USUARIO;\n\t\t\t\t$usuarios[$i][\"txtNroId\"] = $row->CEDULA;\n\t\t\t\t$usuarios[$i][\"txtNombre1\"] = $row->PRIMER_NOMBRE;\n\t\t\t\t$usuarios[$i][\"txtNombre2\"] = $row->SEGUNDO_NOMBRE;\n\t\t\t\t$usuarios[$i][\"txtApellido1\"] = $row->PRIMER_APELLIDO;\n\t\t\t\t$usuarios[$i][\"txtApellido2\"] = $row->SEGUNDO_APELLIDO;\n\t\t\t\t$usuarios[$i][\"txtEstado\"] = $row->DESC_ESTADO;\n\t\t\t\t$usuarios[$i][\"txtcodDepto\"] = $row->C1I1_DPTO;\n\t\t\t\t$usuarios[$i][\"txtDepto\"] = $row->DEPTO;\n\t\t\t\t$usuarios[$i][\"txtcodMPIO\"] = $row->C1I2_MPIO;\n\t\t\t\t$usuarios[$i][\"txtMPIO\"] = $row->MPIO;\n\t\t\t\t$usuarios[$i][\"txtClase\"] = $row->CLASE;\n\t\t\t\t$usuarios[$i][\"txtcodCO\"] = $row->C1I4_CO;\n\t\t\t\t$usuarios[$i][\"txtcodAO\"] = $row->C1I5_AO;\n\t\t\t\t$usuarios[$i][\"txtcodUC\"] = $row->C1I6_UC;\n\t\t\t\t$usuarios[$i][\"txtDireccion\"] = $row->C1IV10_DIR;\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t$this->db->close();\n\t\treturn $usuarios;\n\t}", "public function busca_promocion($id){\n\n try{\n \n \n $pdo = AccesoDB::getCon();\n\n \n\n $sql = \"select b.id_promo, a.nom_anuncio, b.desc_promo, b.img_promo, b.duracion_promo, qr_promo, a.maps_anuncio, \n (stock - IFNULL((select count(id_uso_promo) from uso_promo u where b.id_promo = u.fk_id_promo),0)) stock\n from anuncios a inner join promo b on a.id_anuncio = b.fk_id_anuncio \n where b.vig_promo = 1 and b.id_promo = :id\";\n\n \n \n \n\n $stmt = $pdo->prepare($sql);\n $stmt->bindParam(\":id\", $id, PDO::PARAM_INT);\n $stmt->execute();\n\n $response = $stmt->fetchAll();\n return $response;\n\n } catch (Exception $e) {\n echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='index.php';</script>\";\n }\n }", "public function select(){\n\t$sql=\"SELECT * FROM tipousuario\";\n\treturn ejecutarConsulta($sql);\n}", "public function listaProyectos(){\n\t\t$query = \"SELECT * FROM alm_proyecto WHERE ISNULL(alm_proy_usr_baja) ORDER BY alm_proy_estado\";\n\t\treturn $this->mysql->query($query);\n\t}", "function searchProdotti($nome){\n $db = databaseConnection();\n $db -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $nome = $db -> quote($nome);\n $query = \"SELECT * FROM Prodotto WHERE nome=$nome\";\n $rows = $db -> query($query);\n return $rows -> fetchAll(PDO::FETCH_ASSOC);\n}", "public function SelecionaData($data) {\n try {\n $query = HelperFactory::getInstance()->getPDOInstance();\n $sth = $query->prepare(\"call procedureData('$data')\");\n $sth->execute();\n $resultado = $sth->fetchAll();\n\n return $resultado;\n } catch (Doctrine_Exception $e) {\n echo $e->getMessage();\n }\n }", "public function BuscarVentasCajas() \n{\n\tself::SetNames();\n\t$sql =\"SELECT detalleventas.codventa, cajas.nrocaja, ventas.idventa, ventas.codcliente, ventas.codcaja, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, SUM(detalleventas.cantventa) as articulos FROM (detalleventas LEFT JOIN ventas ON detalleventas.fechadetalleventa=ventas.fechaventa) \n\tLEFT JOIN cajas ON cajas.codcaja=ventas.codcaja LEFT JOIN clientes ON ventas.codcliente=clientes.codcliente WHERE ventas.codcaja = ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? GROUP BY detalleventas.codventa\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim($_GET['codcaja']));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(3, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN VENTAS DE PRODUCTOS PARA LA CAJA Y EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function buscarProspect($email=null){\n try{\n $conexaoDB = $this->conectarBanco(); // recebe um objeto de conexão.\n }catch(\\Exception $e){\n die($e->getMessage());\n }\n $prospects = array();\n\n if($email === null){\n $sqlBusca = $conexaoDB->prepare(\"select id, nome, cpf, email, telefone, whatsapp, rua, numero, facebook, bairro, cidade, estado, cep \n from prospect\");// proteje contra sql injection.\n $sqlBusca->execute();// executa o banco.\n }else{\n $sqlBusca = $conexaoDB->prepare(\"select id, nome, cpf, email, telefone, whatsapp, rua, numero, facebook, bairro, cidade, estado, cep \n from prospect \n where\n email = ?\");// proteje contra sql injection.\n $sqlBusca->bind_param(\"s\", $email);\n $sqlBusca->execute();// executa o banco.\n }\n \n $resultado = $sqlBusca->get_result(); // recebe o resultado do banco de dados.\n\n if($resultado->num_rows !== 0){ // se o resultado for diferente de 0 os atributos não serão null.\n while($linha = $resultado->fetch_assoc()){ // as variáveis receberão um array com as informações.\n $prospect = new Prospect();\n $prospect->addProspecto($linha['id'], $linha['nome'], $linha['cpf'], $linha['email'],\n $linha['telefone'], $linha['whatsapp'], $linha['rua'], $linha['numero'], \n $linha['facebook'],$linha['bairro'], $linha['cidade'], $linha['estado'],$linha['cep']);\n $prospects[] = $prospect;\n }\n }\n \n $sqlBusca->close(); // fecha o sql.\n $conexaoDB->close(); // fecha a conexão.\n return $prospects; \n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}" ]
[ "0.747568", "0.7167626", "0.69718736", "0.6929163", "0.6892436", "0.6863533", "0.68526465", "0.6843467", "0.67624694", "0.6757574", "0.6756848", "0.6712972", "0.66795474", "0.6673222", "0.6667948", "0.66446143", "0.66403365", "0.6614841", "0.65862846", "0.65782017", "0.65719694", "0.65652275", "0.6560906", "0.6544585", "0.6509708", "0.65064377", "0.6505139", "0.6470646", "0.6462918", "0.64495456", "0.6440238", "0.64259857", "0.64229774", "0.64202905", "0.6419578", "0.64031875", "0.63960934", "0.63815296", "0.6370331", "0.6368261", "0.63667536", "0.63657725", "0.6359638", "0.634838", "0.6346873", "0.6331321", "0.63294256", "0.63281834", "0.63261527", "0.6325619", "0.63207626", "0.6312543", "0.6312009", "0.6298508", "0.62973195", "0.629358", "0.6291786", "0.6288967", "0.6282878", "0.62719005", "0.6271695", "0.6269631", "0.62662154", "0.62518936", "0.6244981", "0.6244087", "0.6229797", "0.6229734", "0.6228799", "0.6226728", "0.6222363", "0.6217547", "0.6216161", "0.6214721", "0.6213269", "0.6211456", "0.6208366", "0.6205965", "0.6199826", "0.61996317", "0.6199515", "0.6192388", "0.6190666", "0.61906314", "0.6185991", "0.6174911", "0.6174518", "0.616061", "0.6154109", "0.6150926", "0.6145683", "0.61428356", "0.61425257", "0.6141923", "0.6139708", "0.61371344", "0.6134932", "0.6125599", "0.6125354", "0.6119936" ]
0.69619346
3
Consultar detalles de una produccion
public function ConsultarDetalleProduccion($codigo) { $objetoBD = new Conexion(); $objetoBD->conectar(); $mysqli = $objetoBD->cadenaconexion(); $consulta = "SELECT deta_cantidad_materia_prima, mp_nombre FROM detalle_produccion, materia_prima WHERE materia_prima.mp_id=detalle_produccion.mp_id AND prod_id=".$codigo; $resultado = $mysqli->query($consulta); return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function consultarProyectos() {\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectos\",\"\");\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "function afficherProduits(){\n\t\t$sql=\"SElECT * From paniers \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t\n }", "function consultarDetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM detalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "function afficherProduits(){\n\t\t$sql=\"SElECT * From product\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "function listarProcesoCompraPedido(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROCPED_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function listarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function get_AllDetalleproductos() \n {\n $sql=\"select pb.PAR_D_NOMBRE,pa.PAR_D_NOMBRE,p.PRO_D_NOMBRE,p.PRO_E_ESTADOVENTAS from dg_productos p\n INNER JOIN dg_parametros pa on pa.PAR_C_CODIGO=p.PAR_C_CODIGO\n INNER JOIN dg_parametros pb on pb.PAR_C_CODIGO=pa.PAR_C_PADRE;\";\n $res = mysql_query($sql);\n return $res;\n }", "function consultar(){\n\n\n\t\t$this->db->select('p.NUMERO, p.FACULTAD, p.PROGRAMA, p.FORMATO_PROYECTO, c.ESTADO');\n\t\t$this->db->from('PROYECTO p');\n\t\t$this->db->join('VICERRECTORIA_INVESTIGACION c', 'c.FK_PROYECTO = p.NUMERO');\n\n\n\t\t$query = $this->db->get();\n\n\t\treturn $data[]=$query->result();\n\t}", "function listar_procesos($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre, tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_procesos\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "function listarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_sel';\n\t\t$this->transaccion='GM_DET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_analisis_porque_det','int4');\n\t\t$this->captura('id_analisis_porque','int4');\n\t\t$this->captura('solucion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porque','varchar');\n\t\t$this->captura('respuesta','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getAllProtypes(){\r\n\t\t//viet cau sql\r\n\t\t$sql =\"SELECT * FROM protypes\";\r\n\t\t//thuc thi cau truy van\r\n\t\t$obj = self::$conn->query($sql);\r\n\t\treturn $this->getData($obj);\r\n\t}", "public function readProveedores(){\n $sql='SELECT idProveedor, nombreProveedor, direccion, telefono,correo FROM proveedor where estado=1 AND proveedor.estadoEliminacion=1';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "public function findPagoDetalleApuesta()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioApuestaLicita();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoIgualCero($codigoPresupuestario, [7]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Apuesta Licitas'));\r\n\t\t\t}\r\n\t\t}", "function listarCotizacionProcesoCompra(){\n\t\t$this->procedimiento='adq.f_cotizacion_sel';\n\t\t$this->transaccion='ADQ_COTPROC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cotizacion','int4');\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function ConsultarDetallePedidos($codigo)\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n\r\n $consulta = \"SELECT productos.pro_id, pro_descripcion, pro_precio, dep_cantidad, dep_subtotal FROM productos, detalle_pedido WHERE\r\n productos.pro_id=detalle_pedido.pro_id AND ped_id=\".$codigo;\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "public function get_detalle_proveedor($numero_compra){\n\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select c.fecha_compra,c.numero_compra, c.proveedor, c.cedula_proveedor,c.total,p.id_proveedor,p.cedula,p.razon_social,p.telefono,p.correo,p.direccion,p.fecha,p.estado\n from compras as c, proveedor as p\n where \n \n c.cedula_proveedor=p.cedula\n and\n c.numero_compra=?\n \n ;\";\n\n //echo $sql; exit();\n\n $sql=$conectar->prepare($sql);\n \n\n $sql->bindValue(1,$numero_compra);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n\n \n \n }", "function listar2(){\n\t\t\n\t\t$sql = \"SELECT c.id, c.codigo, c.nombre from prd_pasos_producto a\n\t\tinner join prd_pasos_acciones_producto b on b.id_paso=a.id\n\t\tinner join app_productos c on c.id=a.id_producto\n\t\tgroup by a.id_producto;\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "function affiche_relais_demande () {\n\t\tglobal $bdd;\n\t\t\n\t\t$req = $bdd->query(\"SELECT * FROM relais_mail JOIN utilisateur ON relais_mail.utilisateur_id_utilisateur = utilisateur.id_utilisateur WHERE status_relais = '2'\");\n\t\treturn $req;\n\t\t\n\t\t$req->closeCursor();\n\t}", "public function VerDetallesCompras()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria WHERE detallecompras.codcompra = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET[\"codcompra\"])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\n\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t{\n\t\t$this->p[]=$row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "function GetPeliculasConGenero(){\n //$sentencia = $this->db->prepare(\"SELECT * FROM peliculas INNER JOIN genero ON peliculas.titulo = genero.nombre\");\n $sentenciasad = $this->db->prepare(\"SELECT peliculas.titulo, genero.nombre FROM peliculas INNER JOIN genero ON peliculas.id_genero = genero.id_genero\");\n $sentencias->executing();\n //print_r( $sentencia->fetchAll(PDO::FETCH_OBJ));// vemos que este cargado y con que \n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function findPagoDetalleEspectaculo()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioEspectaculoPublico();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoIgualCero($codigoPresupuestario, [6]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Espectaculo Publico'));\r\n\t\t\t}\r\n\t\t}", "function listarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_sel';\n\t\t$this->transaccion='PRE_PRE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_presupuesto','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('gestion','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function consultarEstudiantesParaHomologacion($cod_proyecto){\n $cadena_sql = $this->sql->cadena_sql(\"consultarEstudiantesProyecto\",$cod_proyecto);\n return $resultadoEspacio = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "public function listProById()\n {\n\n // obtener el perfil por id\n $id = 3985390143818633;\n print_r($this->getProfile($id)); \n\n }", "public function DetallesComprasPorId()\n\t{\n\t\tif(base64_decode($_GET['tipoentrada'])==\"PRODUCTO\"){\n\n\t\t\tself::SetNames();\n\t\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria LEFT JOIN productos ON detallecompras.codproducto = productos.codproducto WHERE detallecompras.coddetallecompra = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"coddetallecompra\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num==0)\n\t\t\t{\n\t\t\t\techo \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t} else {\n\n\t\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN ingredientes ON detallecompras.codproducto = ingredientes.codingrediente WHERE detallecompras.coddetallecompra = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"coddetallecompra\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num==0)\n\t\t\t{\n\t\t\t\techo \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\n\t\t}\n\t}", "public function VerDetallesKardexProducto()\n\t\t{\n\t\t\tself::SetNames();\n\t\t\t$sql =\"SELECT kardexproductos.codproducto, kardexproductos.codresponsable, kardexproductos.movimiento, kardexproductos.entradas, kardexproductos.salidas, kardexproductos.stockactual, kardexproductos.preciom, kardexproductos.costototal, kardexproductos.documento, kardexproductos.fechakardex, proveedores.nomproveedor as proveedor, clientes.nomcliente as clientes FROM (productos LEFT JOIN kardexproductos ON productos.codproducto=kardexproductos.codproducto) LEFT JOIN proveedores ON proveedores.codproveedor=kardexproductos.codresponsable LEFT JOIN clientes ON clientes.codcliente=kardexproductos.codresponsable WHERE kardexproductos.codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[]=$row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}", "static function getAllProduit() {\n $rep = Model::$pdo->query('SELECT *\n\t\t\t\t\t\t\t\tFROM PRODUIT');\n $rep->setFetchMode(PDO::FETCH_CLASS, 'ModelProduit');\n $ans = $rep->fetchAll();\n return $ans;\n }", "function afficherprods(){\r\n\t\t$sql=\"SElECT * From categorie\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function get_data_prospektus()\n {\n \t$this->db->from('prospektus as p');\n \t$this->db->join('unit as u', 'u.id_unit = p.unit', 'inner');\n\n \treturn $this->db->get();\n }", "public function liste()\n {\n $this->load->database();\n\n // Exécute la requête (toujours avec $this->db)\n $results = $this->db->query(\"SELECT * FROM produits\"); \n \n // Récupération des résultats grâce à la methode \"result()\" qui fait un tableau d'objet (chaque ligne de la db est un objet) \n $aProduits = $results->result(); \n return $aProduits;\n }", "function listar_acciones_procesos($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre, tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_acciones\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "public function ListarProveedores()\n{\n\tself::SetNames();\n\t$sql = \" select * from proveedores \";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function readall(){ //read\r\n\r\n $sql=\"select * from proveedor\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n }", "function afficher_produits_commande($id_resto) {\n global $connexion;\n try {\n $select = $connexion -> prepare(\"SELECT * \n FROM lunchr_commandes as lc, \n lunchr_ligne_commande as lcl, \n lunchr_produits as lp\n WHERE lc.lc_id = lcl.lc_id\n AND lp.lp_id = lcl.lp_id\n AND lc.lc_id = :id_resto\");\n $select -> execute(array(\"id_resto\" => $id_resto));\n $select -> setFetchMode(PDO::FETCH_ASSOC);\n $resultat = $select -> fetchAll();\n return $resultat;\n }\n \n catch (Exception $e) {\n print $e->getMessage();\n return false;\n }\n }", "public function listarp()\n\t{\n\t\t$sql=\"SELECT * FROM persona WHERE tipo_persona = 'Proveedor';\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function select(){\n\t\t$sql=\"SELECT PROGRA_ID,PROGRA_CODIGO, PROGRA_NOMBRE, PROGRA_EMAIL, PROGRA_USUADIGI, PROGRA_FECHDIGI, PROGRA_HORADIGI\n\t\t FROM programa\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "function showprodetail($iddm){\n $ssp = \"select * from sp_free_hot where idsp = \".$iddm;\n $ssp.= \" order by idsp asc\";\n\n // code show danhmuc cố định\n $conn = getConnection();\n $stmt = $conn->prepare($ssp);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n return $stmt->fetchAll(); // nguyen 1 danh sach ferchAll\n }", "public function DetalleProductosPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "public static function proba(){\n \n $prodaja = new Application_Model_DbTable_Prodaja();\n \n //$upit=\"SELECT naziv_proizvoda FROM prodaja WHERE id=\".$id;\n \n //$rezultat=$db->query($upit);\n \n $select = $prodaja->select();\n \n $rezultat=$prodaja->fetchAll($select);\n \n return $rezultat;\n \n \n \n }", "public function VerDetallesCreditos()\n{\n\tself::SetNames();\n\t$sql = \" select * FROM abonoscreditos INNER JOIN ventas ON abonoscreditos.codventa = ventas.codventa WHERE abonoscreditos.codventa = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET[\"codventa\"])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN ABONOS PARA CR&Eacute;DITOS ACTUALMENTE</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}", "public function ListarDetallesCompras()\n{\n\tself::SetNames();\n\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n\telse {\n\n\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria WHERE detallecompras.codigo = \".$_SESSION[\"codigo\"].\"\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "function obtenerDetalles ($codPedido){\n\t\t$x = $this->pdo->prepare('SELECT * FROM detalles where codPedido = ?');\n\t\t$x->execute(array($codPedido));\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function produits()\n {\n $data[\"list\"]= $this->produit->list();\n $this->template_admin->displayad('liste_Produits');\n }", "function consultarProyectos($facultad) {\r\n $cadena_sql=$this->sql->cadena_sql(\"datos_proyectos\",$facultad);\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "public function findPagoDetalleVehiculo()\r\n\t\t{\r\n\t\t\t$codigoPresupuestario = self::getCodigoPresupuestarioVehiculo();\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos mayores a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoMayorCero($codigoPresupuestario, [3]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Vehiculo periodo mayores a cero'));\r\n\t\t\t}\r\n\r\n\t\t\t$registers = [];\r\n\t\t\t// Pagos con periodos iguales a cero\r\n\t\t\t$registers = self::findPagoDetallePeriodoIgualCero($codigoPresupuestario, [3]);\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Vehiculo periodo iguales a cero'));\r\n\t\t\t}\r\n\t\t}", "function listar_proveedores(){\n\t\t$sql=\"\n\tSELECT\n\t\tcp.IDPROVEEDOR IDPROV, cp.NOMBREFISCAL, cp.NOMBRECOMERCIAL, \n\t\tcp.IDTIPODOCUMENTO, cp.IDDOCUMENTO, cp.EMAIL1, cp.EMAIL2, cp.EMAIL3,\n\t\tcp.BRSCH, csb.RAMO, cp.FDGRV, cp.ZTERM, cp.MWSKZ, cp.PARVO, cp.PAVIP,\n\t\tcp.ACTIVO,cp.INTERNO,\n\t\tcp.ARREVALRANKING,\n\t\tcp.CDE,\n\t\tcp.SKILL,\n\t\tcp.EVALFIDELIDAD,\n\t\tcp.EVALINFRAESTRUCTURA,\n\t\tcp.EVALSATISFACCION,\n\t\tcp.IDMONEDA,\n\t\tYEAR(cp.FECHAINICIOACTIVIDADES) ANIO,\n\t\tMONTH(cp.FECHAINICIOACTIVIDADES) MES, \n\t\tDAY(cp.FECHAINICIOACTIVIDADES) DIA,\n\t\tcpu.*,\n\t\tcpt.*\n\tFROM\n\t$this->catalogo.catalogo_proveedor cp\n\t\tLEFT JOIN $this->catalogo.catalogo_proveedor_ubigeo cpu ON cp.IDPROVEEDOR=cpu.IDPROVEEDOR \n\t\tLEFT JOIN $this->catalogo.catalogo_sap_brsch csb ON cp.BRSCH = csb.BRSCH\t\n\t\tLEFT JOIN $this->catalogo.catalogo_proveedor_telefono cpt ON cp.IDPROVEEDOR = cpt.IDPROVEEDOR AND cpt.PRIORIDAD=1\n\t\n\t\t\";\n\n\t$result =$this->query($sql);\n\treturn $result;\n\t}", "function consultarNotas(){ \n $cadena_sql=$this->cadena_sql(\"notas\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "function consultarEstudiantesSinPrueba(){\n $cadena_sql=$this->cadena_sql(\"estudiantesSinPrueba\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "public function listaProyectos(){\n\t\t$query = \"SELECT * FROM alm_proyecto WHERE ISNULL(alm_proy_usr_baja) ORDER BY alm_proy_estado\";\n\t\treturn $this->mysql->query($query);\n\t}", "function obtiene_proyectos(){\r\n $funciones = new funciones();\r\n $funciones->conectar();\r\n $sql=\"Select idProyecto,nomProyecto from tblproyecto where fecbaja is null\";\r\n $result = mysql_query($sql) or die(mysql_error());\r\n $datos=array();\r\n while($fila = mysql_fetch_array($result)){\r\n $datos[]=$fila;\r\n }\r\n return $datos;\r\n }", "public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }", "function consultarenviodetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM enviodetalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function listar(){\n $sql = \"CALL sp_ListarTipoPago\";\n return ejecutarConsulta($sql);\n }", "function consultarNotaAprobatoria() {\r\n\r\n $variables=array('codProyectoEstudiante'=> $this->datosEstudiante['CARRERA'] \r\n );\r\n $cadena_sql = $this->sql->cadena_sql(\"nota_aprobatoria\", $variables);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n return $resultado[0][0];\r\n }", "function listarRelacionProceso(){\n $this->objParam->defecto('ordenacion','id_relacion_proceso_pago');\n $this->objParam->defecto('dir_ordenacion','asc');\n\n\n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam,$this);\n $this->res = $this->objReporte->generarReporteListado('MODObligacionPago','listarRelacionProceso');\n } else{\n $this->objFunc=$this->create('MODObligacionPago');\n\n $this->res=$this->objFunc->listarRelacionProceso($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "function lista_proveedores($ubicacion,$idfamilia,$idservicio,$interno,$activo,$texto)\n\t{\n\n\t\t$condicion =\" WHERE 1 \";\n\n\t\tif ($idfamilia!='') $condicion.= \" AND cs.IDFAMILIA ='$idfamilia'\";\n\t\tif ($activo!='') $condicion.= \" AND (cp.ACTIVO = $activo)\";\n\t\tif ($idservicio!='') $condicion.= \" AND (cps.IDSERVICIO = '$idservicio' OR cps.IDSERVICIO ='0' )\";\n\t\tif ($interno!='') $condicion.= \" AND cp.INTERNO = '$interno' \";\n\t\tif ($texto!='') $condicion.= \" AND (cp.NOMBRECOMERCIAL like '%$texto%' OR cp.NOMBREFISCAL like '%$texto%')\";\n\n\t\t/* QUERY BUSCA LOA PROVEEDORES QUE PRESTAN EL SERVICIO*/\n\n\t\t$sql=\"\n\t\t\tSELECT \n\t\t\t\tcp.IDPROVEEDOR\n\t\t\tFROM \n\t\t\t$this->catalogo.catalogo_proveedor cp\n\t\t\t\tLEFT JOIN $this->catalogo.catalogo_proveedor_servicio cps ON cps.IDPROVEEDOR = cp.IDPROVEEDOR \n\t\t\t\tLEFT JOIN $this->catalogo.catalogo_servicio cs ON cs.IDSERVICIO = cps.IDSERVICIO\n\t\t\t\t$condicion\n\t\t\t\t\n\t\t\tGROUP BY cps.IDPROVEEDOR\n\t\t\torder by cp.INTERNO DESC, cp.NOMBRECOMERCIAL ASC\n\t\t\";\n\n\n\t\t\t//\techo $sql;\n\t\t\t\t$res_prv= $this->query($sql);\n\t\t\t\t$lista_prov= array();\n\t\t\t\t$prov = new proveedor();\n\t\t\t\t$poli = new poligono();\n\t\t\t\t$circulo = new circulo();\n\t\t\t\t$point= array('lat'=>$ubicacion->latitud,'lng'=>$ubicacion->longitud);\n\n\t\t\t\tif ($ubicacion->cveentidad1==0){\n\t\t\t\t\twhile ($reg=$res_prv->fetch_object())\n\t\t\t\t\t{\n\t\t\t\t\t\t$lista_prov[$reg->IDPROVEEDOR][DISTANCIA]='';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\twhile ($reg_prv=$res_prv->fetch_object())\n\t\t\t\t\t{\n\t\t\t\t\t\t$prov->carga_datos($reg_prv->IDPROVEEDOR);\n\t\t\t\t\t\t$distancia= geoDistancia($ubicacion->latitud,$ubicacion->longitud,$prov->latitud,$prov->longitud,$prov->lee_parametro('UNIDAD_LONGITUD'));\n\t\t\t\t\t\t$sw=0;\n\n\t\t\t\t\t\t$condicion=\"\";\n\t\t\t\t\t\t$condicion.= \" cuf.CVEPAIS = '$ubicacion->cvepais'\";\n\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD1 in ('$ubicacion->cveentidad1','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD2 in ('$ubicacion->cveentidad2','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD3 in ('$ubicacion->cveentidad3','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD4 in ('$ubicacion->cveentidad4','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD5 in ('$ubicacion->cveentidad5','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD6 in ('$ubicacion->cveentidad6','0'))\";\n\t\t\t\t\t\t$condicion.= \" AND (cuf.CVEENTIDAD7 in ('$ubicacion->cveentidad7','0'))\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$condicion.= \" OR (\"; \n\n\t\t\t\t\t\tif ($ubicacion->cveentidad1!='0') $condicion.= \" (cuf.CVEENTIDAD1 = '$ubicacion->cveentidad1')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad2!='0') $condicion.= \" AND (cuf.CVEENTIDAD2 = '$ubicacion->cveentidad2')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad3!='0') $condicion.= \" AND (cuf.CVEENTIDAD3 = '$ubicacion->cveentidad3')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad4!='0') $condicion.= \" AND (cuf.CVEENTIDAD4 = '$ubicacion->cveentidad4')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad5!='0') $condicion.= \" AND (cuf.CVEENTIDAD5 = '$ubicacion->cveentidad5')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad6!='0') $condicion.= \" AND (cuf.CVEENTIDAD6 = '$ubicacion->cveentidad6')\";\n\t\t\t\t\t\tif ($ubicacion->cveentidad7!='0') $condicion.= \" AND (cuf.CVEENTIDAD7 = '$ubicacion->cveentidad7')\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$condicion .= \" )\";\n\n\t\t\t\t\t\t/* QUERY BUSCA LAS UNIDADES FEDERATIVAS QUE COINCIDAN CON LA UBICACION PARA CADA PROVEEDOR*/\n\t\t\t\t\t\t$sql=\"\n\t\t\tSELECT \n\t\t\t\tcpsxuf.IDPROVEEDOR, cpsxuf.IDUNIDADFEDERATIVA,cpsxuf.ARRAMBITO\n\t\t\tFROM\n\t\t\t $this->catalogo.catalogo_proveedor_servicio_x_unidad_federativa cpsxuf\n\t\t\t\tLEFT JOIN $this->catalogo.catalogo_unidadfederativa cuf ON $condicion\n\t\t\tWHERE \n\t\t\t\tcpsxuf.IDUNIDADFEDERATIVA = cuf.IDUNIDADFEDERATIVA\n\t\t\t\tAND\tcpsxuf.IDPROVEEDOR ='$reg_prv->IDPROVEEDOR'\n\t\t\t\tand cpsxuf.IDSERVICIO IN ('$idservicio', '0')\n\t\t\t\tORDER BY 3 DESC\n\t\t\t\";\n\t\t\t\t\t//echo $sql;\n\t\t\t$res_prv_entid= $this->query($sql);\n\t\t\twhile ($reg_prv_entid= $res_prv_entid->fetch_object())\n\t\t\t{\n\t\t\t\t$lista_prov[$reg_prv_entid->IDPROVEEDOR][DISTANCIA]= $distancia;\n\t\t\t\t$lista_prov[$reg_prv_entid->IDPROVEEDOR][AMBITO]=\t$reg_prv_entid->ARRAMBITO;\n\t\t\t\t$lista_prov[$reg_prv_entid->IDPROVEEDOR][TIPOPOLIGONO] ='ENTIDAD';\n\t\t\t\t$lista_prov[$reg_prv_entid->IDPROVEEDOR][ID] = $reg_prv_entid->IDUNIDADFEDERATIVA;\n\t\t\t\tif ($reg_prv_entid->ARRAMBITO=='LOC') $sw=1; // si hubo algun entidad LOC se activa el sw\n\n\t\t\t}\n\t\t\tif (($ubicacion->latitud !='' )&& ($ubicacion->longitud!=''))\n\t\t\t{\n\t\t\t\t$sql=\"\n\t\t\t\tSELECT \n\t\t\t\t\tcpsxp.IDPROVEEDOR, cpsxp.IDPOLIGONO\n\t\t\t\tFROM \n\t\t\t\t$this->catalogo.catalogo_proveedor_servicio_x_poligono cpsxp\n\t\t\t\tWHERE\n\t\t\t\t\tcpsxp.IDPROVEEDOR ='$reg_prv->IDPROVEEDOR'\n\t\t\t\t\";\n\t\t\t\t$res_prv_poli= $this->query($sql);\n\t\t\t\twhile ($reg_prv_poli = $res_prv_poli->fetch_object())\n\t\t\t\t{\n\t\t\t\t\t// verifica si el punto esta incluido en el poligono\n\t\t\t\t\t$in = pointInPolygon($point,$poli->lee_vertices($reg_prv_poli->IDPOLIGONO));\n\t\t\t\t\tif (( $in ) && ($sw==0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$lista_prov[$reg_prv_poli->IDPROVEEDOR][DISTANCIA]= $distancia;\n\t\t\t\t\t\t$lista_prov[$reg_prv_poli->IDPROVEEDOR][AMBITO]=\t$reg_prv_poli->ARRAMBITO;\n\t\t\t\t\t\t$lista_prov[$reg_prv_poli->IDPROVEEDOR][TIPOPOLIGONO] ='POLIGONO';\n\t\t\t\t\t\t$lista_prov[$reg_prv_poli->IDPROVEEDOR][ID] = $reg_prv_poli->IDPOLIGONO;\n\t\t\t\t\t\tif ($reg_prv_poli->ARRAMBITO=='LOC') $sw=1; // si hubo algun poligono LOC se activa el sw\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$sql=\"\n\t\t\t\tSELECT \n\t\t\t\t\tcpsxc.IDPROVEEDOR, cpsxc.IDCIRCULO\n\t\t\t\tFROM\n\t\t\t\t$this->catalogo.catalogo_proveedor_servicio_x_circulo cpsxc\n\t\t\t\tWHERE\n\t\t\t\t\tcpsxc.IDPROVEEDOR='$res_prv->IDPROVEEDOR'\n\t\t\t\t\";\n\n\t\t\t\t$res_prv_circ = $this->query($sql);\n\t\t\t\twhile ($reg_prv_circ = $res_prv_circ->fetch_object())\n\t\t\t\t{\n\t\t\t\t\t$circulo->leer($reg_prv_circ->IDCIRCULO);\n\t\t\t\t\t$vertices = $circulo->verticesCircle($circulo->latitud,$circulo->longitud,$circulo->radio,$circulo->idmedida);\n\t\t\t\t\t$in= pointInPolygon($point,$vertices);\n\n\t\t\t\t\tif (($in ) && ($sw==0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$lista_prov[$reg_prv_circ->IDPROVEEDOR][DISTANCIA]= $distancia;\n\t\t\t\t\t\t$lista_prov[$reg_prv_circ->IDPROVEEDOR][AMBITO]=\t$reg_prv_circ->ARRAMBITO;\n\t\t\t\t\t\t$lista_prov[$reg_prv_circ->IDPROVEEDOR][TIPOPOLIGONO] ='CIRCULO';\n\t\t\t\t\t\t$lista_prov[$reg_prv_circ->IDPROVEEDOR][ID] = $reg_prv_circ->IDCIRCULO;\n\t\t\t\t\t\tif ($reg_prv_circ->ARRAMBITO=='LOC') $sw=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // fin de la busqueda por LATITUD Y LONGITUD\n\n\n\n\n\n\t\t\t\t\t} // fin del while del proveedor\n\t\t\t\t}\n\n\t\t\t\t/* LEE LAS PROPORCIONES DE LA FORMULA DEL RANKING */\n\t\t\t\t$sql=\"\n\t\t\tSELECT \t\n\t\t\t\tELEMENTO,PROPORCION \n\t\t\tFROM \n\t\t\t$this->catalogo.catalogo_proporciones_ranking\n\t\t\t\";\n\t\t\t$result=$this->query($sql);\n\n\t\t\twhile($reg = $result->fetch_object())\n\t\t\t$proporcion[$reg->ELEMENTO] = $reg->PROPORCION;\n\n\n\t\t\t$max_costo_int=0;\n\t\t\t$max_costo_ext=0;\n\n\n\t\t\t/* OBTENER DATOS PARA EVALUAR EL RANKING */\n\t\t\tforeach ($lista_prov as $idproveedor=>$proveedor)\n\t\t\t{\n\t\t\t\t$sql=\"\n\t\tSELECT \n\t\t\tIF (cp.ARREVALRANKING='SKILL',IF (cp.SKILL>0,cp.SKILL/100,0), IF (cp.CDE>0,cp.CDE/100,0)) VALRANKING,\n\t\t\tIF (cpscn.MONTOLOCAL IS NULL,0,cpscn.MONTOLOCAL) COSTO,\n\t\t\tIF (cp.EVALSATISFACCION>0,cp.EVALSATISFACCION/100,0) EVALSATISFACCION ,\n\t\t\tcp.EVALINFRAESTRUCTURA EVALINFRAESTRUCTURA,\n\t\t\tcp.EVALFIDELIDAD EVALFIDELIDAD,\n\t\t\tcp.INTERNO\n\t\tFROM \n\t\t$this->catalogo.catalogo_proveedor cp\n\t\t\tLEFT JOIN $this->catalogo.catalogo_proveedor_servicio_costo_negociado cpscn ON cpscn.IDPROVEEDOR = cp.IDPROVEEDOR AND cpscn.IDSERVICIO = '$idservicio' AND cpscn.IDCOSTO = 1\n\t\tWHERE \n\t\t\tcp.IDPROVEEDOR = '$idproveedor' \n\t\t\";\n\t\t//\t\t\t\techo $sql;\n\t\t$result = $this->query($sql);\n\n\t\twhile ($reg=$result->fetch_object())\n\t\t{\n\t\t\tif ($reg->INTERNO){\n\t\t\t\t$temp_prov_int[$idproveedor][VALRANKING] = $reg->VALRANKING;\n\t\t\t\t$temp_prov_int[$idproveedor][COSTO] = $reg->COSTO;\n\t\t\t\t$temp_prov_int[$idproveedor][EVALSATISFACCION] = $reg->EVALSATISFACCION;\n\t\t\t\t$temp_prov_int[$idproveedor][EVALINFRAESTRUCTURA] = $reg->EVALINFRAESTRUCTURA;\n\t\t\t\t$temp_prov_int[$idproveedor][EVALFIDELIDAD] = $reg->EVALFIDELIDAD;\n\t\t\t\tif ($reg->COSTO > $max_costo_int) $max_costo_int= $reg->COSTO;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$temp_prov_ext[$idproveedor][VALRANKING] = $reg->VALRANKING;\n\t\t\t\t$temp_prov_ext[$idproveedor][COSTO] = $reg->COSTO;\n\t\t\t\t$temp_prov_ext[$idproveedor][EVALSATISFACCION] = $reg->EVALSATISFACCION;\n\t\t\t\t$temp_prov_ext[$idproveedor][EVALINFRAESTRUCTURA] = $reg->EVALINFRAESTRUCTURA;\n\t\t\t\t$temp_prov_ext[$idproveedor][EVALFIDELIDAD] = $reg->EVALFIDELIDAD;\n\t\t\t\tif ($reg->COSTO > $max_costo_ext) $max_costo_ext= $reg->COSTO;\n\t\t\t}\n\t\t}\n\n\t\t\t}\n\n\t\t\t/*calcula el Ranking de proveedores internos */\n\n\t\t\tforeach ($temp_prov_int as $idproveedor=>$proveedor)\n\t\t\t{\n\t\t\t\t$valranking = round($proveedor[VALRANKING] * $proporcion[CDE_SKILL],4);\n\t\t\t\t$valcosto = ($proveedor[COSTO]==0)?0:(1-($proveedor[COSTO]/$max_costo_int))*$proporcion[COSTO];\n\t\t\t\t$evalsatisfaccion = round($proveedor[EVALSATISFACCION] * $proporcion[SATISFACCION],2);\n\t\t\t\t$evalinfraestructura = round($proveedor[EVALINFRAESTRUCTURA] * $proporcion[INFRAESTRUCTURA],2);\n\t\t\t\t$evalfidelidad = round($proveedor[EVALFIDELIDAD] * $proporcion[FIDELIDAD],2);\n\t\t\t\t$lista_prov_int[$idproveedor][RANKING] = ($valranking + $valcosto+$evalsatisfaccion + $evalinfraestructura + $evalfidelidad)*100;\n\t\t\t}\n\n\t\t\t/*calcula el Ranking de proveedores externos */\n\t\t\tforeach ($temp_prov_ext as $idproveedor=>$proveedor)\n\t\t\t{\n\t\t\t\t$valranking = round($proveedor[VALRANKING] * $proporcion[CDE_SKILL],4);\n\t\t\t\t$valcosto = ($proveedor[COSTO]==0)?0:(1-($proveedor[COSTO]/$max_costo_ext))*$proporcion[COSTO];\n\t\t\t\t$evalsatisfaccion = round($proveedor[EVALSATISFACCION] * $proporcion[SATISFACCION],2);\n\t\t\t\t$evalinfraestructura = round($proveedor[EVALINFRAESTRUCTURA] * $proporcion[INFRAESTRUCTURA],2);\n\t\t\t\t$evalfidelidad = round($proveedor[EVALFIDELIDAD] * $proporcion[FIDELIDAD],2);\n\t\t\t\t$lista_prov_ext[$idproveedor][RANKING] = ($valranking + $valcosto+$evalsatisfaccion + $evalinfraestructura + $evalfidelidad)*100;\n\t\t\t}\n\n\t\t\t$temp_prov_int = ordernarArray($lista_prov_int,'RANKING',1);\n\t\t\t$temp_prov_ext = ordernarArray($lista_prov_ext,'RANKING',1);\n\n\n\t\t\tforeach ($temp_prov_int as $idproveedor => $proveedor)\n\t\t\t{\n\t\t\t\t$lista_ordenada[$idproveedor] = $lista_prov[$idproveedor];\n\t\t\t\t$lista_ordenada[$idproveedor][RANKING] = $lista_prov_int[$idproveedor][RANKING];\n\t\t\t}\n\t\t\tforeach ($temp_prov_ext as $idproveedor => $proveedor)\n\t\t\t{\n\t\t\t\t$lista_ordenada[$idproveedor] = $lista_prov[$idproveedor];\n\t\t\t\t$lista_ordenada[$idproveedor][RANKING] = $lista_prov_ext[$idproveedor][RANKING];\n\t\t\t}\n\t\t\t/* DEVUELVE EL ARRAY*/\n\t\t\treturn $lista_ordenada ;\n\n\t}", "function get_all_prodi()\n {\n $this->db->join('jurusan', 'jurusan.id_jurusan = prodi.fk_id_jurusan');\n $this->db->order_by('id_prodi', 'desc');\n return $this->db->get('prodi')->result_array();\n }", "public function DetallesVentasPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codcliente as cliente, detalleventas.codproducto, detalleventas.producto, detalleventas.codcategoria, detalleventas.cantventa, detalleventas.precioventa, detalleventas.preciocompra, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, productos.ivaproducto, productos.existencia, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, usuarios.nombres FROM detalleventas LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN clientes ON detalleventas.codcliente = clientes.codcliente LEFT JOIN productos ON detalleventas.codproducto = productos.codproducto LEFT JOIN usuarios ON detalleventas.codigo = usuarios.codigo WHERE detalleventas.coddetalleventa = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"coddetalleventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function ambil_proyek_dpp()\n\t{\n\t\t$sql=\"SELECT * FROM irena_view_sbsn_proyek_dpp\";\n\t\treturn $this->db->query($sql);\n\t}", "function consultarProyectosCoordinador($cod_proyecto=\"\") {\n $datos['identificacion']= $this->identificacion;\n $datos['cod_proyecto']=$cod_proyecto;\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectosCoordinador\",$datos);\n //echo \"<br>sql proy curr \".$cadena_sql ;\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}", "function consultarEstudiantes($codProyecto) {\r\n $variables=array('codProyecto'=>$codProyecto,\r\n 'ano'=> $this->ano,\r\n 'periodo'=> $this->periodo);\r\n $cadena_sql=$this->sql->cadena_sql(\"consultarEstudiantes\",$variables);\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "function listarDetallePeriodoAgencia(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_PERDETAG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setCount(false);\n\n $this->setParametro('id_periodo_venta','id_periodo_venta','int4');\n $this->setParametro('id_agencia','id_agencia','int4');\n $this->setParametro('tipo','tipo','varchar');\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_periodo_venta','int4');\n $this->captura('tipo','varchar');\n $this->captura('fecha','text');\n $this->captura('pnr','varchar');\n $this->captura('apellido','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto_boleto','numeric');\n $this->captura('comision','numeric');\n $this->captura('monto_credito_debito','numeric');\n $this->captura('ajuste','varchar');\n $this->captura('garantia','varchar');\n $this->captura('autorizacion_deposito','varchar');\n $this->captura('monto_credito_debito_mb','numeric');\n $this->captura('tipo_cambio','numeric');\n $this->captura('cierre_periodo','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function BuscarComprasProveedor() \n{\n\tself::SetNames();\t\t\n\t$sql = \" SELECT compras.codcompra, compras.subtotalivasic, compras.subtotalivanoc, compras.ivac, compras.totalivac, compras.descuentoc, compras.totaldescuentoc, compras.totalc, compras.statuscompra, compras.fechavencecredito, compras.fechacompra, proveedores.ritproveedor, proveedores.nomproveedor, SUM(detallecompras.cantcompra) AS articulos FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN detallecompras ON detallecompras.codcompra = compras.codcompra WHERE proveedores.codproveedor = ? GROUP BY compras.codcompra\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_GET[\"codproveedor\"]) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN COMPRAS DE PRODUCTOS PARA EL PROVEEDOR SELECCIONADO</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function readPreDetalle(){\n $sql='SELECT idPreDetalle, producto.nombre as producto, predetalle.cantidad as cantidad, producto.precio as precio, producto.foto as foto,(producto.precio * predetalle.cantidad) as total , producto.cantidad as cantidadP FROM producto, predetalle WHERE producto.idProducto = predetalle.idProducto AND idCliente = ?';\n $params=array($this->cliente);\n return Database::getRows($sql, $params);\n }", "public function readProductos(){\n $sql='SELECT idProducto, foto, nombre, precio, cantidad, nombreProveedor, producto.estado from producto, proveedor where proveedor.idProveedor=producto.idProveedor and producto.estadoEliminacion= 1';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "public function listaProyectosTerminados(){\n\t\t$query = \"SELECT * FROM alm_proyecto WHERE ISNULL(alm_proy_usr_baja) AND \talm_proy_estado='13'\";\n\t\treturn $this->mysql->query($query);\n\t}", "public function VerDetallesIngredientesProductos()\n{\n\tself::SetNames();\n\t$sql =\"SELECT productosvsingredientes.codproducto, productosvsingredientes.cantracion, ingredientes.codingrediente, ingredientes.nomingrediente, ingredientes.costoingrediente, ingredientes.cantingrediente, ingredientes.unidadingrediente FROM (productos LEFT JOIN productosvsingredientes ON productos.codproducto=productosvsingredientes.codproducto) LEFT JOIN ingredientes ON ingredientes.codingrediente=productosvsingredientes.codingrediente WHERE productosvsingredientes.codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t$num = $stmt->rowCount();\n\n\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[]=$row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}", "public function VerDetallesVentas()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM detalleventas LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria WHERE detalleventas.codventa = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET[\"codventa\"])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\n\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[]=$row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}", "public function readAll(){\n\t\t\t$req = \"SELECT recette.idRec, recette.nom AS lib, descriptif, difficulte, prix, nbPersonnes, \n\t\t\t\t\tdureePreparation, dureeCuisson, dureeTotale, qteCalories, qteProteines, qteGlucides, qteLipides, \n\t\t\t\t\tutilisateur.nom AS utilNom, utilisateur.prenom AS utilprenom, illustration.adresse\n\t\t\t\t\tFROM recette \n\t\t\t\t\tINNER JOIN utilisateur\n\t\t\t\t\tON recette.idUtil = utilisateur.idUtil\n\t\t\t\t\tINNER JOIN illustration\n\t\t\t\t\tON recette.idRec = illustration.idRec\n\t\t\t\t\tORDER BY recette.nom ASC\";\n\t\t\t$curseur=$this->cx->query($req);\n\t\t\treturn $curseur;\n\t\t}", "function consultarenviodetallesCedula (){\n\t\t$x = $this->pdo->prepare('SELECT En.empresa,En.telefono,En.fechaEnvio,Cl.cedula FROM enviodetalles EN INNER JOIN cliente Cl ON En.cedulaCliente = Cl.cedula');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "function listarPrograma(){\n\t\t$this->procedimiento='sigep.ft_programa_sel';\n\t\t$this->transaccion='SIGEP_PRO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_programa_boa','int4');\n\t\t$this->captura('id_cp_programa','int4');\n\t\t$this->captura('id_gestion','int4');\n\t\t$this->captura('programa','int4');\n\t\t$this->captura('desc_catprg','varchar');\n\t\t$this->captura('id_entidad','int4');\n\t\t$this->captura('nivel','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_catprg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('gestion','int4');\n\t\t$this->captura('desc_programa','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function getAllMco_proveedores()\n {\n $data_mco_proveedores = $this->gateway->getAllMco_proveedores();\n return $data_mco_proveedores;\n\n }", "public function GetRetencionesPendientes($data)\n {\n \t$q\t=\tDoctrine_Query::create()\n \t->from('CobranzaDetalle cd')\n \t->innerJoin('cd.Cobranza c')\n \t->innerJoin('c.Cliente cl')\n \t->andWhere('c.FechaAnulacion IS NULL')\n \t->andWhere('cd.RetencionUtilizada = ?', 'NO')\n \t->andWhereIn('cd.PagoTipoId', array(6,7,8,9,10,11));\n \t\n \tif(isset($data['TipoRetencion']))\n \t{\n \t\t$q->andWhere('cd.PagoTipoId = ?', $data['TipoRetencion']);\n \t}\n \t// si el un proveedor de impuestos de retencion, filtrar por proveedor\n \t// ej AFIP iva, IIBB, etc.\n \tif(isset($data['ProveedorId']))\n \t{\n \t\t// relacionar proveedor con tipo de pago que tengo a favor para saldar\n \t\tif($data['ProveedorId'] == 175) // afip iva\n \t\t{\n \t\t\t$q->andWhere('cd.PagoTipoId = ?', 9);\n \t\t}\n \t\t/*\n \t\tif($data['ProveedorId'] == 175) // afip iva\n \t\t{\n \t\t\t$q->andWhere('p.PagoTipoId = ?', 9);\n \t\t}\n \t\t\n \t\tif($data['ProveedorId'] == 175) // afip iva\n \t\t{\n \t\t\t$q->andWhere('p.PagoTipoId = ?', 9);\n \t\t}\n \t\t\n \t\tif($data['ProveedorId'] == 175) // afip iva\n \t\t{\n \t\t\t$q->andWhere('p.PagoTipoId = ?', 9);\n \t\t}\n \t\t\n \t\t($data['ProveedorId']==168)||($data['ProveedorId']==175)||\n \t\t($data['ProveedorId']==130)||($data['ProveedorId']==135))\n \t\t*/\n \t}\n \t\n \t// quitar las agregadas en session\n\t $s\t=\tnew Classes_Session();\n\t\t\t$s->Session();\n\t\t\t$pagos\t=\t$s->GetPagosLiquidadosOrdenDePago();\n\t\t\t\n\t\t\tif(count($pagos))\n\t\t\t{\n\t\t\t\tforeach ($pagos as $p)\n\t\t\t\t{\n\t\t\t\t\tif(isset($p['RetencionId']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$q->andWhere('cd.Id <> ?', $p['RetencionId']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n \t\n \t$q->orderBy('cd.PagoTipoId DESC, c.Fecha ASC');\n \t //echo $q->getSqlQuery();\n \treturn $q->execute();\n }", "function listarSolicitudObligacionPago()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPG_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n $this->setParametro('historico', 'historico', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n //Funcionario responsable de el plan de pagos\r\n $this->captura('id_funcionario_responsable', 'integer');\r\n $this->captura('desc_fun_responsable', 'text');\r\n\r\n $this->captura('id_conformidad', 'int4');\r\n $this->captura('conformidad_final', 'text');\r\n $this->captura('fecha_conformidad_final', 'date');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('fecha_fin', 'date');\r\n $this->captura('observaciones', 'varchar');\r\n $this->captura('fecha_certificacion_pres', 'date');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function consultaPermisos() {\n\t\t\treturn $this->entidad->getRepository('\\Entidades\\Expertos\\Permisos')->findBy(array('estado' => 1), array('nombre' => 'ASC'));\n\t\t}", "function ConsultarMedicamentosAPH(){\n $sql = \"CALL spConsultarMedicamentosAPH(?)\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(1, $this->idReporteAPH);\n $query->execute();\n if ($query->rowCount() > 0) {\n return array('medicamentos' => $query->fetchAll());\n }else{\n return array('medicamentos' => null);\n }\n }", "function list_cites_requerimientos_proy($proy_id){\n $sql = 'select *\n from cite_mod_requerimientos ci\n Inner Join funcionario as f On ci.fun_id=f.fun_id\n Inner Join _componentes as c On ci.com_id=c.com_id\n Inner Join _proyectofaseetapacomponente as pfe On pfe.pfec_id=c.pfec_id\n Inner Join _proyectos as p On p.proy_id=pfe.proy_id\n where p.proy_id='.$proy_id.' and pfe.pfec_estado=\\'1\\' and pfe.estado!=\\'3\\' and ci.cite_estado!=\\'3\\'\n order by ci.cite_id asc';\n\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "function ConsultarMotivoConsultaAPH(){\n $sql = \"CALL spConsultarMotivoConsultaAPH(?)\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(1, $this->idReporteAPH);\n $query->execute();\n if ($query->rowCount() > 0) {\n return array('motivosConsulta' => $query->fetchAll());\n }else{\n return array('motivosConsulta' => null);\n }\n }", "public function getProyectosSinAtender()\r\n {\r\n $datos = array();\r\n $consulta = $this->consulta('select p.Id,p.Ticket,p.Nombre,e.Nombre Estado,s.Nombre Sucursal,p.FechaInicio,p.FechaTermino '\r\n . 'from t_proyectos p inner join cat_v3_sucursales s on p.IdSucursal = s.Id '\r\n . 'inner join cat_v3_estados e on s.IdEstado = e.Id where p.IdEstatus = 1');\r\n if (!empty($consulta)) {\r\n foreach ($consulta as $value) {\r\n array_push($datos, array(\r\n 'Id' => $value['Id'],\r\n 'Ticket' => $value['Ticket'],\r\n 'Nombre' => $value['Nombre'],\r\n 'Sucursal' => $value['Sucursal'],\r\n 'Estado' => $value['Estado'],\r\n 'FechaInicio' => $value['FechaInicio'],\r\n 'FechaTermino' => $value['FechaTermino']\r\n ));\r\n }\r\n }\r\n return $datos;\r\n }", "public function read_alltiendas(){\r\n $sql=\"select p.id_proveedor, p.nombre_establecimiento, p.direccion_fisica, p.direccion_web,\r\n p.descripcion_tienda, p.id_usuario\r\n from proveedor p\r\n INNER JOIN usuario u on p.id_usuario = u.id_usuario\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n\r\n }", "public function get_detalle_recibo_paciente($numero_venta){\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select e.nombre,p.nombres,p.telefono,r.numero_venta,r.numero_recibo,r.cant_letras,r.monto,r.a_anteriores,r.abono_act,r.saldo,r.forma_pago,r.asesor,r.id_usuario,r.prox_abono,r.marca_aro,r.modelo_aro,r.color_aro from pacientes as p inner join recibos as r on p.id_paciente=r.id_paciente inner join empresas as e on p.id_empresas=e.id_empresas where numero_venta=? order by r.numero_recibo desc limit 1;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$numero_venta);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function findDetalleRecolectado()\r\n\t\t{\r\n\t\t\t$findModel = self::findDetalleRecaudacionModel();\r\n\t\t\treturn $findModel->orderBy([\r\n\t\t\t\t\t\t\t\t\t'lapso' => SORT_ASC,\r\n\t\t\t\t\t\t\t\t\t'fecha_pago' => SORT_ASC,\r\n\t\t\t\t\t\t\t\t\t'codigo' => SORT_ASC,\r\n\t\t\t\t\t\t\t\t])\r\n\t\t\t\t\t\t\t ->asArray()\r\n\t\t\t\t \t\t ->all();\r\n\t\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function ConsultarPersonalReporteAPH(){\n $sql = \"CALL spPersonalReporteAPH(?)\";\n $query = $this->_CONEXION->prepare($sql);\n $query->bindParam(1, $this->idAsignacionPersonal);\n $query->execute();\n if ($query->rowCount() > 0) {\n return $query->fetchAll();\n }else{\n return null;\n }\n }", "public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function listar()\n {\n $sql = \"SELECT I.idingreso, DATE(I.fecha_hora) AS fecha, I.idproveedor, I.tipo_comprobante, I.serie_comprobante, I.num_comprobante, I.total_compra, I.estado,\"\n . \" U.idusuario, U.nombre AS usuario, P.nombre as proveedor\"\n . \" FROM ingreso I INNER JOIN persona P ON I.idproveedor=P.idpersona INNER JOIN usuario U ON I.idusuario=U.idusuario\"\n . \" ORDER BY I.idingreso desc;\";\n return ejecutarConsulta($sql);\n }", "public function getList() {\r\n\t\t$query = \"\r\n\t\t\tSELECT \t*\r\n\t\t\tFROM\tprobleem\r\n\t\t\tORDER BY probleem.ProbleemID\r\n\t\t\t\";\r\n\t\t\r\n\t\t$dbh = parent::connectDB();\r\n\t\t\r\n\t\tif($dbh) {\r\n\t\t\t$sth = $dbh->query($query);\r\n\t\t\t$result = $sth->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t$dhb = null;\r\n\r\n\t\t\treturn $result;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public function ConsultarDatosProduccion($codigo)\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n\r\n $consulta = \"SELECT prod_id , prod_fecha, emp_nombres, emp_apellidos FROM empleados, produccion WHERE\r\n empleados.emp_id=produccion.emp_id AND prod_id=\".$codigo;\r\n $resultado = $mysqli->query($consulta);\r\n $tabla = mysqli_fetch_object($resultado);\r\n return $tabla;\r\n }", "protected function getAllDetails()\n\t{\n\t\t $qbLogin = $this->getDefaultEntityManager()->createQueryBuilder();\n\t\t $qbLogin->select('m')\n ->from('MailingList\\Entity\\PhoenixMailingList', 'm')\n\t\t\t ->where('m.status=:st')\n\t\t\t ->andwhere('m.subscribe=:s')\n\t\t\t ->setParameter('s',1)\n\t\t\t ->setParameter('st',1);\n\t\t $result = $qbLogin->getQuery()->getResult();\t\n\t\treturn $result;\n\t}", "function listarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_sel';\n\t\t$this->transaccion='VF_REFACOR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_venta', 'id_venta', 'int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_reenvio_factura','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_venta','int4');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('correo_copia','varchar');\n\t\t$this->captura('observacion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('estado_envio_correo','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listar(){\n\t\t$sql = \"SELECT * FROM producto\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}", "function consultarProducto (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM producto');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "function listarPartidaEjecucion(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_PAREJE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_tipo_cc','id_tipo_cc','int4');\n\t\t\n\t\t$this->capturaCount('total_egreso_mb','numeric');\n\t\t$this->capturaCount('total_ingreso_mb','numeric');\n\t\t$this->capturaCount('total_monto_anticipo_mb','numeric');\n\t\t$this->capturaCount('total_monto_desc_anticipo_mb','numeric');\n\t\t$this->capturaCount('total_monto_iva_revertido_mb','numeric');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_partida_ejecucion','int4');\n\t\t$this->captura('id_int_comprobante','int4');\n\t\t$this->captura('id_moneda','int4');\n $this->captura('moneda','varchar');\n\t\t$this->captura('id_presupuesto','int4');\n $this->captura('desc_pres','varchar');\n $this->captura('codigo_categoria','varchar');\n\t\t$this->captura('id_partida','int4');\n $this->captura('codigo','varchar');\n $this->captura('nombre_partida','varchar');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('tipo_cambio','numeric');\n\t\t$this->captura('columna_origen','varchar');\n\t\t$this->captura('tipo_movimiento','varchar');\n\t\t$this->captura('id_partida_ejecucion_fk','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('egreso_mb','numeric');\n\t\t$this->captura('ingreso_mb','numeric');\n\t\t$this->captura('monto_mb','numeric');\n\t\t$this->captura('monto','numeric');\n\t\t$this->captura('valor_id_origen','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\t\t\n\t\t$this->captura('id_tipo_cc','int4');\n\t\t$this->captura('desc_tipo_cc','varchar');\n\t\t\n\t\t$this->captura('nro_cbte','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t\n\t\t$this->captura('monto_anticipo_mb','numeric');\n\t\t$this->captura('monto_desc_anticipo_mb','numeric');\n\t\t$this->captura('monto_iva_revertido_mb','numeric');\n\t\t\n\t\t$this->captura('glosa1','varchar');\t\t\n\t\t$this->captura('glosa','varchar');\n\t\t\n\t\t$this->captura('cantidad_descripcion','numeric');\n\n $this->captura('total_pago','numeric');\n $this->captura('desc_contrato','varchar');\n $this->captura('obs','varchar');\n $this->captura('tipo_ajuste_formulacion','varchar'); //#41\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function get($estado) {\n $sql=\"call sp_selectProvincias('$estado')\";\n return parent::getConsultar($sql); \n }" ]
[ "0.68525565", "0.6644121", "0.6601485", "0.66014785", "0.65899247", "0.657516", "0.65255386", "0.6453339", "0.64483917", "0.6419183", "0.64122784", "0.63947666", "0.63836515", "0.6377999", "0.63537925", "0.6330314", "0.62709", "0.62630385", "0.6245447", "0.6244744", "0.62443733", "0.6240476", "0.6234633", "0.62126917", "0.61919117", "0.6190057", "0.6184947", "0.6171634", "0.6169188", "0.616618", "0.6161535", "0.61540973", "0.61413056", "0.61320525", "0.61191934", "0.61112356", "0.6101978", "0.6095148", "0.60944885", "0.6092436", "0.6090087", "0.60894424", "0.6087762", "0.6073166", "0.6068944", "0.6068459", "0.6065436", "0.60651517", "0.60630655", "0.604911", "0.6041734", "0.60382557", "0.60207707", "0.6016228", "0.6015861", "0.59786814", "0.5977247", "0.59713334", "0.5965596", "0.5965452", "0.5957296", "0.595637", "0.5952355", "0.5941739", "0.5940916", "0.59138966", "0.59114003", "0.5910408", "0.58969843", "0.5875388", "0.58726686", "0.58716816", "0.5866372", "0.5861875", "0.5858727", "0.5856659", "0.585566", "0.58530766", "0.5851885", "0.58435285", "0.5839439", "0.5833107", "0.5831787", "0.5827519", "0.5820654", "0.5815717", "0.58154887", "0.58140075", "0.58107364", "0.5809633", "0.58092505", "0.58048004", "0.5798171", "0.5794703", "0.57928205", "0.5791619", "0.5791034", "0.5790649", "0.57892305", "0.5786433" ]
0.6711395
1
Consultar codigo maximo de la produccion
public function CodigoProduccion() { $objetoBD = new Conexion(); $objetoBD->conectar(); $mysqli=$objetoBD->cadenaConexion(); $consulta="SELECT max(prod_id) as maximo FROM produccion "; $resultado=$mysqli->query($consulta); $maximo=""; while($fila=mysqli_fetch_object($resultado)){ $maximo=$fila->maximo; } return $maximo+1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CodigoPedido()\r\n\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli=$objetoBD->cadenaConexion();\r\n\r\n $consulta=\"SELECT max(ped_id) as maximo FROM pedidos \";\r\n $resultado=$mysqli->query($consulta);\r\n\r\n $maximo=\"\";\r\n while($fila=mysqli_fetch_object($resultado)){\r\n\r\n $maximo=$fila->maximo;\r\n\r\n\r\n }\r\n return $maximo+1;\r\n\r\n }", "public function obtenerUltimoCodigoCanton() {\n\n $resultado = mysqli_query($this->connection, \"select max(codigoCanton) as ultimoCodigoCanton from tbcanton \");\n $ultimoCodigoCanton = 0;\n\n while ($filaTemporal = mysqli_fetch_array($resultado)) {\n $ultimoCodigoCanton = $filaTemporal['ultimoCodigoCanton'];\n }\n return $ultimoCodigoCanton;\n }", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(n.idnivelutilizacion) as maximo')\r\n ->from('NomNivelUtilizacion n')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "function maxbolsa($cod,$ponto,$qtd,$tpselecao,$ano){\r\n\t\t$fMax = new fachada_maxbolsa();\r\n\t\t$oMax = $fMax->maxbolsa($cod,$ponto,$qtd,$tpselecao,$ano);\r\n\t\treturn $oMax;\r\n\t}", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n // eliminar el campo\r\n $result = $query->select('max(a.idcampo) as maximo')\r\n ->from('NomCampoestruc a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "public function ultimoRegistro() {\n \n //FUNCION CON LA CONSULTA A REALIZAR\n $sql = \"SELECT MAX(MAQUICODIGO) AS CODIGO FROM MAQUINA\";\n $this->_conexion->ejecutar_sentencia($sql);\n return $this->_conexion->retorna_select();\n \n }", "public function obtenerUltimoCodigoTipoResiduo(){\n //Insertar provincia se invoca al metodo en datos\n $this->tipoResiduoAccesoDatos->conectar();\n $resultado = $this->tipoResiduoAccesoDatos->obtenerUltimoCodigoTipoResiduo();\n $this->tipoResiduoAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(a.idagrupacion) as maximo')\r\n ->from('NomAgrupacion a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "public function obtenerUltimoCodigoGestor(){\n //Insertar provincia se invoca al metodo en datos\n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerUltimoCodigoGestor();\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function ultimoNumeroFactura(){\n $pdo = Database::connect();\n $sql = \"select max(idfactura) numero from facturas\";\n $consulta = $pdo->prepare($sql);\n $consulta->execute();\n //obtenemos el registro especifico:\n $res=$consulta->fetch(PDO::FETCH_ASSOC);\n $numero=$res['numero'];\n Database::disconnect();\n //retornamos el numero encontrado:\n if(!isset($numero))\n return 0;\n return $numero;\n }", "public function getMax(): int;", "private function queryMaxId(){\r\n $this->conexion->conectar();\r\n $consultaMaxId =\"SELECT (max(id_perfil)+1) AS id FROM perfil\";\r\n $queryId = $this->conexion->ejecutar($consultaMaxId);\r\n while(OCIFetch($queryId)){\r\n $id = ociresult($queryId, \"ID\");\r\n }\r\n $this->conexion->desconectar();\r\n return $id;\r\n }", "public function selecMaximoNumero2($empresa_id, $tipo_documento_id, $serie){\n $sql = \"SELECT MAX(CAST(numero AS UNSIGNED)) numero FROM comprobantes WHERE 1 = 1 AND empresa_id = $empresa_id AND tipo_documento_id = $tipo_documento_id AND serie = '\".$serie.\"'\";\n $query = $this->db->query($sql);\n $rowNumero = $query->row_array();\n\n if($rowNumero['numero'] == null){\n //BUSQUEDA DE NUMERO 12-01-2021\n $rsNumero = $this->db->from('ser_nums')\n ->where('empresa_id',$empresa_id)\n ->where('tipo_documento_id',$tipo_documento_id)\n ->where('serie',$serie)\n ->where('estado',ST_ACTIVO)\n ->get()\n ->row();\n $rowNumero['numero'] = ($rsNumero->numero == null) ? 1 : $rsNumero->numero;\n }else{\n $rowNumero['numero']++;\n }\n\n return $rowNumero;\n }", "public function getMaxNotaFiscalNumero() {\r\n\r\n $sql = \"SELECT MAX(nflno_numero) + 1 as nflno_numero FROM nota_fiscal WHERE nflserie = 'A'\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result['nflno_numero']; \r\n }", "public function maximoPosicion(){\n\t\t$parametro = func_get_args();\n\t\t$resultado=$this->execSql($this->MAYORORDEN,$parametro);\n\t\tif (!$resultado){\n\t\t\t$this->onError(\"COD_COLECCION\",$this->MAYORORDEN);\n\t\t}\n\t\treturn $resultado;\n\t}", "public function ultimoPedido(){\n //$conexao = $c->conexao();\n\n $query = \"SELECT max(idpedido)idpedido FROM tbpedidos c;\";\n $query = $this->conexao->query($query);\n $row = $query->fetch_assoc();\n\n return $row;\n\n }", "public function getCargaMaxima()\n {\n return $this->cargaMaxima;\n }", "function maximo( $resultado, $valor) {\n\t$resultado = ($valor > $resultado ) ? $valor : $resultado; \n\treturn $resultado;\n}", "public function ultimoProduto()\n {\n //$conexao = $c->conexao();\n\n $query = \"SELECT max(id)id FROM tbproduto c;\";\n $query = $this->conexao->query($query);\n $row = $query->fetch_assoc();\n\n return $row;\n }", "public function getMaxPedimento() {\n $sql = \"SELECT MAX(sPedimento) AS sPedimento FROM ope_referenciasExternas WHERE skEstatus != 'EL' \";\n ////exit($sql);\n $result = $this->db->query($sql);\n if ($result) {\n return $result->fetch_assoc();\n } else {\n return false;\n }\n }", "function ultimoCliente()\n\t{\n\t\t$query = $this->db->query('SELECT MAX(idCliente) as idCliente from cliente');\n\t\tforeach($query->result_array() as $d)\n\t{\n\t\t\treturn( $d['idCliente']);\n\t\t}\n\t}", "function getMax() { return $this->readMaxValue(); }", "function exibeAtualMax(){\n $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n return $nmax= ($this->numpage + $nmin)-1;\n }", "function maxLoanCoded(){\n global $driver;\n $sql\t=\t\"SELECT maxloan_coded FROM settings\"; //Retrieve maximum loan amount to be given\n if($maxloan\t\t=\t$driver->perform_request($sql)):\n $row\t\t=\t$driver->load_data($maxloan);\n $maxloanamt\t=\t(($row['maxloan'])>0)?($row['maxloan']):500000;\n else:\n die('<p class=\"error\">ERROR Retrieving Maximum Loan Amount.<br/>'.mysql_error().'</p>');\n endif;\n return $maxloanamt; //The maximum amount to loan\n}", "public function getMax();", "public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "private static function getMaxId () {\n return Dao::queryValue(\"select max(id) from medicines where id < 10000000\");\n }", "public function getMaxCode() {\r\n if ( !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $setting = $this->M_setting->getSetting()->row();\r\n $max = $this->generateGroupCode($setting->thn_ajaran, $setting->smt);\r\n // $max = ltrim($this->M_kelompok->getMaxCode($setting->thn_ajaran, $setting->smt), 'TPS');\r\n // if ( $max ) {\r\n // $max = $max + 1 ;\r\n\r\n // $max = $max <= 9 ? '0'.$max : $max; \r\n \r\n // } else {\r\n // $max = '01';\r\n // }\r\n\r\n echo json_encode($max);\r\n }", "public static function generateMaxPartyOrderNo(){\n $maxPartyOrderId = 0;\n try{\n $connection = Yii::App()->db;\n $sql= \" SELECT COALESCE(MAX(por.id), 0) partyOrderId\n FROM DK_PARTYORDERS_REQUEST por\n WHERE 1\";\n $command = $connection->createCommand($sql);\n $partyOrderDetailsArr = $command->queryAll();\n if(count($partyOrderDetailsArr)==1 && $partyOrderDetailsArr!=false){\n $maxPartyOrderId = $partyOrderDetailsArr[0]['partyOrderId']; \n }\n }catch(Exception $ex){}\n return $maxPartyOrderId;\n }", "public function getFiltroPrecoMaximoMinimo()\n {\n return Query::fetchFirst('Busca/Filtros/QryBuscarPrecoMaximoMinimo');\n }", "abstract public function maxMax(): int;", "public function getMaxValue();", "public function getMaxValue();", "function idUltimaEstructura()\r\n {\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $q = Doctrine_Query::create($conn);\r\n\r\n ///$resultTotal \t= $this->conn->getTable ('DatEstructura')->findAll ();\r\n $result = $q->select(\"max(idestructuraop)\")->from('DatEstructuraop ')->execute();\r\n $arrelo = $result->toArray();\r\n return $arrelo[0]['max'];\r\n //$solve \t\t\t= array ('cant' => $resultTotal->count (), 'datos' => $resultado);\r\n\r\n }", "function getMaxDocketNoConsignmentInfo($account_id_local,$DbC)\n{\n\t$query1=\"SELECT MAX(docket_no) as max_count FROM consignment_info WHERE account_id=$account_id_local\";\n\t$result1=mysql_query($query1,$DbC);\n\t$max_no = mysql_fetch_object($result1);\n\t$max_no1=$max_no->max_count;\n\treturn $max_no1;\n}", "public function getMaxID(){\n\t\t try{\n\t\t\t$conn = DBConnection::GetConnection();\t\n\t\t\t$queryForGetMaxId=\"SELECT MAX(product_id) AS max_value FROM product\";\n\t\t\t$max_result=$conn->prepare($queryForGetMaxId);\n\t\t\t$max_result->execute();\n\t\t\t$maxId = $max_result->fetch(PDO::FETCH_ASSOC); \n\t\t\t$pId=$maxId['max_value']; \n\t\t\t$incrementPid=$pId+1;\n\t\t\treturn $incrementPid;\n\t\t}catch(PDOException $e){\n\t\t\techo 'Fail to connect';\n\t\t\techo $e->getMessage();\n\t\t}\t\n }", "public function idMax ()\n {\n $db = $this->dbConnect ();\n $req = $db->query ('SELECT id_chapter,number_chapter FROM chapter ORDER BY id_chapter DESC LIMIT 0,1');\n $resultat = $req->fetch ();\n return $resultat;\n }", "function cek_rev_p2hp($id_p2hp) {\n $sql = \"SELECT max(rev_ke) as no_rev FROM rev_p2hp WHERE rev_p2hp='$id_p2hp'\";\n $row = $this->db->query($sql)->row();\n $max_no = $row->no_rev + 1;\n return $max_no;\n }", "function getMaxValue() { return $this->readMaxValue(); }", "public function getMax() {\n return $this->max;\n }", "public function getdernierid(){ \n $req=\"SELECT id FROM contrat WHERE id = (SELECT MAX(id) FROM contrat)\";\n //print_r($req);\n $resultat = $this->pdo->query($req);\n $ligne = $resultat->fetch();\n $donnees = $ligne['id'];\n return intval($donnees);\n }", "public function getUltimoCap($emergencia_id) {\n\t\t$max = self::find ()->where ( [ \n\t\t\t\t'emergencia_id' => $emergencia_id \n\t\t] )->orderBy ( 'sequencecap desc' )->one ();\n\t\treturn $max;\n\t}", "function findMaxMboxID() {\n global $db;\n\n $dbq = $db->execute(\"select mbox_id from tblMailBoxes\");\n $dbq->lastrow();\n $this->mbox_id = $dbq->fields['mbox_id'];\n $dbq->close();\n\n return $this->mbox_id;\n }", "public function findMaxNumByIdDico($idDico)\n {\n \t$query = $this->select()\n \t->from( array(\"g\" => \"gen_determinants\"),array(\"maxNum\"=>\"MAX(num)\"))\n \t->where( \"g.id_dico = ?\", $idDico);\n \t \n \treturn $this->fetchAll($query)->toArray();\n }", "function getMaxValue() { return $this->readMaxValue(); }", "public function getMax() {\n\n $this->db->select_max('codigo');\n $query = $this->db->get($this->table);\n if($query -> num_rows() >= 1)\n {\n return $query->row_array();\n }\n else\n {\n\n return $this->db->get_compiled_select();\n } \n\n }", "public function maxNumber(): int\n {\n try {\n return (int) $this->createQueryBuilder('b')\n ->select('max(b.number) as maxi')\n ->getQuery()\n ->getSingleScalarResult()\n ;\n } catch (NonUniqueResultException $exception) {\n //this should not be reached.\n return 0;\n } catch (NoResultException $exception) {\n return 0;\n }\n }", "function max() { return $this->max; }", "public function VerUltimoID()\r\n {\r\n\t\r\n\t$reg=mysql_query(\"select max($this->ID) as maxID from $this->tabla\", $this->con) or die('no se pudo encontrar el ultimo ID en VerUltimoID: ' . mysql_error());\r\n\t$reg=mysql_fetch_array($reg);\t\r\n\t\r\n\treturn($reg[\"maxID\"]);\r\n\t\r\n\t}", "function getLastOrderNo() {\n\t\t$SQL=\"SELECT MAX(CAST(order_no AS DECIMAL)) AS max_order_no FROM user_privilage_tab\";\n\t\t$this->db->executeQuery($SQL);\n\n\t\t$result = array();\n\t\t$count = 0;\n\n\t\twhile($rs = $this->db->nextRecord())\n\t\t{\n\t\t\t$user_privilage = new User_Privilage();\n\t\t\t$user_privilage->setId($rs['id']);\n\t\t\t$user_privilage->setOrder_no($rs['order_no']);\n\t\t\t$user_privilage->setCode($rs['code']);\n\t\t\t$user_privilage->setUser_id($rs['user_id']);\n\t\t\t$user_privilage->setPrivilage_id($rs['privilage_id']);\n\t\t\t$user_privilage->setIs_view($rs['is_view']);\n\t\t\t$user_privilage->setIs_save($rs['is_save']);\n\t\t\t$user_privilage->setIs_edit($rs['is_edit']);\n\t\t\t$user_privilage->setIs_delete($rs['is_delete']);\n\t\t\t$user_privilage->setData_date($rs['data_date']);\n\t\t\t$user_privilage->setStatus($rs['status']);\n\t\t\t$user_privilage->setDate_($rs['date_']);\n\t\t\t$user_privilage->setMax_order_no($rs['max_order_no']);\n\t\t\t$result[$count++] = $user_privilage;\n\t\t}\n\n\t\t$this->db->closeRs();\n\t\tif(count($result) > 0 ){\n\t\t\treturn $result[0];\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "function getMaximoRetirable($fecha = false){\n\t\tif ( $fecha == false ){\n\t\t\t$fecha = fechasys();\n\t\t}\n\t\tif ( $this->mCuentaIniciada == false ) {\n\t\t $this->init();\n\t\t}\n\t\t//Obtener la Captacion Total\n\t\t$xSoc\t\t\t\t\t= new cSocio($this->mSocioTitular);\n\t\t$DTCap\t\t\t\t\t= $xSoc->getTotalCaptacionActual();\n\t\t$this->mMessages \t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, El Saldo Total de Captacion es \" . $DTCap[\"saldo\"] . \" \\r\\n\";\n\t\t$this->mMessages \t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, El saldo por Esta Cuenta es \" . $this->mNuevoSaldo . \" \\r\\n\";\n\t\t$saldo\t\t\t\t\t= $this->mSaldoAnterior;\n\t\t$saldo\t\t\t\t\t= ( $DTCap[\"saldo\"] - $saldo ) + $this->mNuevoSaldo ;\n\t\t$maximo_retirable\t\t= 0;\n\t\t//obtener los maximos retirables por credito\n\t\t//2011-1-30 cambio de monto_autorizado a saldo_actual\n\t\t$sqlCompCreditos = \"SELECT\n\t\t\t\t\t\t\t\tSUM(`creditos_solicitud`.`saldo_actual`) AS `monto`\n\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t`creditos_solicitud` `creditos_solicitud`\n\t\t\t\t\t\t\t\t\tINNER JOIN `eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\t\t\t\t\tON `creditos_solicitud`.`tipo_convenio` =\n\t\t\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`miembro`\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t(`creditos_solicitud`.`numero_socio` = \" . $this->mSocioTitular . \")\n\t\t\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t\t\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` = 1110)\n\t\t\t\t\t\t\t\t\tAND\n \t\t\t\t\t(`creditos_solicitud`.`saldo_actual` > \" . TOLERANCIA_SALDOS . \")\n\t\t\t\t\t\t\t\tGROUP BY\n\t\t\t\t\t\t\t\t\t`creditos_solicitud`.`numero_socio`,\n\t\t\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`\n \";\n\t\t$d\t\t\t\t\t\t\t= obten_filas($sqlCompCreditos);\n\t\t//Obtener el Maximo Comprometidos por Garantia Liquida\n\t\t$sqlCC = \"SELECT\n\t\t\t\t\t\t\t`creditos_solicitud`.`numero_socio`,\n\t\t\t\t\t\t\tSUM(`creditos_solicitud`.`saldo_actual`) AS 'monto_creditos',\n\t\t\t\t\t\t\tSUM(`creditos_solicitud`.`saldo_Actual` *\n\t\t\t\t\t\t\t`creditos_tipoconvenio`.`porciento_garantia_liquida`) AS 'monto_garantia'\n\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`creditos_solicitud` `creditos_solicitud`\n\t\t\t\t\t\t\t\tINNER JOIN `creditos_tipoconvenio` `creditos_tipoconvenio`\n\t\t\t\t\t\t\t\tON `creditos_solicitud`.`tipo_convenio` = `creditos_tipoconvenio`.\n\t\t\t\t\t\t\t\t`idcreditos_tipoconvenio`\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t(`creditos_solicitud`.`numero_socio` =\" . $this->mSocioTitular . \")\n\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t(`creditos_solicitud`.`saldo_actual` > \" . TOLERANCIA_SALDOS . \")\n\t\t\t\t\t\tGROUP BY\n\t\t\t\t\t\t\t`creditos_solicitud`.`numero_socio` \";\n\t\t$comprometido_por_garantia\t= 0;\n\n\t\t$comprometido_por_creditos\t= (isset($d[\"monto\"])) ? csetNoMenorQueCero( $d[\"monto\"] ) : 0;\n\t\t$comprometido_por_ide\t\t= 0;\t\t\t//Terminar el saldo de IDE retirable\n\t\t$this->mMessages \t\t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, Lo Comprometido por Creditos es de $comprometido_por_creditos \\r\\n\";\n\t\t$this->mMessages \t\t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, Lo Comprometido por IDE es de $comprometido_por_ide\\r\\n\";\n\n\t\t//\n\t\tif ( $this->mSubProducto == CAPTACION_PRODUCTO_GARANTIALIQ){\n\t\t\t$c\t\t\t\t\t\t\t= obten_filas($sqlCC);\n\t\t\t$comprometido_por_garantia\t= setNoMenorQueCero( $c[\"monto_garantia\"] );\n\t\t\t$this->mMessages \t\t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, Lo Comprometido por GARANTIA LIQUIDA ES $comprometido_por_garantia \\r\\n\";\n\t\t\t$saldo\t\t\t\t\t\t= $this->mNuevoSaldo;\t//correccion por garantia liquida\n\t\t\t$comprometido_por_creditos\t= 0;\t\t\t\t\t//La ganartia liquida solo es presionado por lo comprometido por garantia\n\t\t}\n\t\t//\n\n\n\t\t$maximo_retirable\t\t\t= $saldo - ($comprometido_por_creditos + $comprometido_por_ide + $comprometido_por_garantia);\n\t\t$maximo_retirable\t\t\t= setNoMenorQueCero($maximo_retirable);\n\t\t$this->mMessages \t\t\t.= \"MAX_RETIRABLE\\tA la fecha $fecha, El Maximo Retirable es de $maximo_retirable de un Monto de $saldo\\r\\n\";\n\t\t//Componer el Saldo, no puede ser mayor al nuevo saldo\n\t\treturn ($maximo_retirable <= $this->mNuevoSaldo ) ? round($maximo_retirable, 2) : round($this->mNuevoSaldo, 2);\n\t}", "abstract protected function getMaxParameter(): int;", "function recupererid(){\n\t\t$sql=\"select max(idres) maximum from reservation \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\t foreach($liste as $row){$id=$row['maximum'] ;}\n\t\t return $id;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function get_max_invoice_id()\n {\n $data = $this->db->query(\"SELECT MAX(id) AS id FROM invoices\");\n\n return $data->result();\n }", "public function maxSortingNumber(){\n $result = $this->repo->maxSortingNumber();\n return $result;\n }", "function getIdMaxNouvelle($idRSS) {\n /*$sql = \"SELECT MAX(id) as max FROM Nouvelle WHERE idRSS = ?\";\n $req = $this->db->prepare($sql);\n $params = array($idRSS);\n $res = $req->execute($params);\n debug($this->db,$sql,$params);\n if ($res === FALSE) {\n die(\"getIdMaxNouvelle error: Requête impossible !\\n\");\n }\n $res = $req->fetchAll();\n if (isset($res[0]))\n return $res[0]['max'];\n else\n return 0;*/\n die(\"Fonction getIdMaxNouvelle utilisée ! Faut me garder !\");\n }", "public function generar_codigo($basedatos,$cantidad) {\n\t\t\t$tabla = DB::table($basedatos)\n ->select(DB::raw('max(codigo) as codigo'))\n ->get();\n\n //conversion a string y suma uno para el siguiente id\n $idsuma = (int)$tabla[0]->codigo + 1;\n\n\t\t \t//concatenar con ceros\n\t\t \t$correlativocompleta = str_pad($idsuma, $cantidad, \"0\", STR_PAD_LEFT); \n\n\t \t\treturn $correlativocompleta;\n\n\t}", "public function getMaxID(){\n\t\t try{\n\t\t\t$conn = DBConnection::GetConnection();\t\n\t\t\t$queryForGetMaxId=\"SELECT MAX(video_id) AS max_value FROM video\";\n\t\t\t$max_result=$conn->prepare($queryForGetMaxId);\n\t\t\t$max_result->execute();\n\t\t\t$maxId = $max_result->fetch(PDO::FETCH_ASSOC); \n\t\t\t$pId=$maxId['max_value']; \n\t\t\t$incrementPid=$pId+1;\n\t\t\treturn $incrementPid;\n\t\t}catch(PDOException $e){\n\t\t\techo 'Fail to connect';\n\t\t\techo $e->getMessage();\n\t\t}\t\n }", "static Public function mdlgetUltNumCancelado(){\n\ttry{ \n\t $stmt=Conexion::conectar()->prepare(\"SELECT MAX(num_cancelacion)+1 AS num_cancelacion FROM cancela_venta\");\n\n\t $stmt->execute();\n\t \n\t return $stmt->fetch();\n\n\t} catch (Exception $e) {\n\t\techo \"Failed: \" . $e->getMessage();\n }\n\t //$stmt->close();\n\t \n\t $stmt=null;\n }", "function ObtieneNumPedido($CardCode){\n\t\t try{\n\t\tif($this->con->conectar()==true){\n\t\t\t$NumPedido = mysql_query(\"SELECT MAX( NumPedido ) AS NumPedido FROM `ENC_PedidosSolicitados` WHERE `CardCode` = '\" .$CardCode. \"'\");\n\t\t\t\n\t\t\tif($NumPedido){\n\t\t\t $Consecutivo = mysql_fetch_array($NumPedido); \n\t\t\t\t return $Consecutivo['NumPedido'];\n\t\t\t}\n\t\t}\n\t\t}catch(Exception $e){\n return \"Error al agrega ObtieneNumPedido\" & $e;\n\t\t\t\t}\n\t}", "function getMaxID()\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n COUNT(sek_id)\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\";\r\n try {\r\n $res = $db->fetchOne($stmt);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n return $res;\r\n }", "public function getMaxNumber()\n {\n return $this->maxNumber;\n }", "function cria_seq()\n{\n global $db;\n $sql=\"SELECT max(seq_restauro) as valor from restauro where tombo = '$_REQUEST[pNum_registro]' and controle='$_REQUEST[controle]' and tipo=4 and interna='I'\";\n $db->query($sql);\n $res=$db->dados(); \n if($res['valor']==null){\n echo 1;}\n else{\n echo $res['valor']+1;}\n}", "public function getIdMax() {\n $sql = \"select ItemID from Mst_ItemList\";\n $query = $this->db->query($sql);\n $jml = $query->num_rows();\n if ($jml == 0) {\n $ItemID = \"001\";\n return $ItemID;\n } else {\n $sql = \"select max(ItemID) as ItemID from Mst_ItemList\";\n $query = $this->db->query($sql);\n $hasil = $query->result();\n $ItemID = $hasil[0]->ItemID;\n $ItemID = sprintf('%06u', $ItemID + 1);\n return $ItemID;\n }\n }", "public function selectMaxKey(): ?int;", "function cek_rev_lhp($id_p2hp) {\n $sql = \"SELECT max(rev_ke) as no_rev FROM rev_lhp WHERE rev_fk_p2hp='$id_p2hp'\";\n $row = $this->db->query($sql)->row();\n $max_no = $row->no_rev + 1;\n return $max_no;\n }", "public function getMax()\n {\n return $this->_maxValue;\n }", "function do_get_max_s_id() {\n\t# Dim some Vars\n\t\tglobal $_CCFG, $_DBCFG, $db_coin;\n\t\t$max_s_id = $_CCFG['BASE_SUPPLIER_ID'];\n\n\t# Set Query and select for max field value.\n\t\t$query\t= 'SELECT max(s_id) FROM '.$_DBCFG['suppliers'];\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\tIF ($db_coin->db_query_numrows($result) ) {\n\n\t\t# Get Max Value\n\t\t\twhile(list($_max_id) = $db_coin->db_fetch_row($result)) {$max_s_id = $_max_id;}\n\t\t}\n\n\t# Check / Set Value for return\n\t\treturn $max_s_id;\n}", "public function getMax()\n {\n return $this->_fields['Max']['FieldValue'];\n }", "function get_id_max_ins()\n\t{\n\t\t$kode = 'INS';\n\t\t$sql = \"SELECT MAX(id_instansi) as max_id FROM tb_instansi\";\n\t\t$row = $this->db->query($sql)->row_array();\n\t\t$max_id = $row['max_id'];\n\t\t$max_no = (int) substr($max_id,4,8);\n\t\t$new_no = $max_no + 1;\n\t\t$new_id_instansi = $kode.sprintf(\"%05s\",$new_no);\n\t\treturn $new_id_instansi;\n\t}", "function saisonMaximum(){\n \t// On va récupreer la journée Maximum de la dernière saison \n\tglobal $bdd;\n\t// On récupère la saison maximum\n\t$rMaxSaison = mysqli_query($bdd, 'SELECT max(saison) FROM positions');\n\t$donnees = mysqli_fetch_assoc($rMaxSaison);\n\t$maxSaison = $donnees['max(saison)'];\n\tmysqli_free_result($rMaxSaison);\n\n\treturn $maxSaison;\n}", "public function maxIdNoticia()\n\t{\n\t\t$data_table = $this->data_source->ejecutarConsulta(\"SELECT MAX(id_noticia) as maxid FROM noticias \");\n\t\treturn $data_table;\n\t}", "public function getMaxValue()\n {\n return $this->get('MaxValue');\n }", "public function getMaximum()\n {\n return $this->max;\n }", "function get_maxcustindexrecnbr($debug = false) {\n\t\t$q = (new QueryBuilder())->table('custindex');\n\t\t$q->field($q->expr('MAX(recno)'));\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery();\n\t\t} else {\n\t\t\t$sql->execute();\n\t\t\treturn $sql->fetchColumn();\n\t\t}\n\t}", "public function get_recibo_sucursal($sucursal){\n\n $conectar= parent::conexion();\t \n\t $sql= \"select max(numero_recibo)+1 as numero_rec from recibos where sucursal=?\";\n\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $sucursal);\n $sql->execute();\n\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n\n}", "function getEscalatinMaxCnt($DbConnection)\n{\n\t$query =\"SELECT Max(serial)+1 as seiral_no FROM escalation\"; ///// for auto increament of geo_id /////////// \n\t$result=mysql_query($query,$DbConnection);\n\t$row=mysql_fetch_row($result);\n\treturn $row[0];\n}", "public static function getMaxUsedNumber()\n {\n $query = new Query;\n\n $query->select('recepient_num, count(recepient_num) as quan')\n ->from('call')\n ->groupBy('recepient_num')\n ->orderBy('quan desc')\n ->limit(1);\n\n $rows = $query->all();\n\n return $rows[0]['recepient_num'];\n }", "public function max(): Option;", "public static function get_max_value() {\n return self::MAX_VALUE;\n }", "function getCIMaxcnt($account_id_local,$DbConnection)\n{\n\t$query=\"SELECT MAX(docket_no) as max_count from consignment_info USE INDEX(accountId_status) WHERE\".\n\t\t \" account_id=$account_id_local AND status=1\";\n\t$result=mysql_query($query,$DbConnection);\n\t$max_no = mysql_fetch_row($result1);\n\treturn $row[0];\n}", "static public function mdlObtenerUltimoId() {\r\n\r\n $sql = \"SELECT * FROM compras ORDER BY id DESC Limit 1\";\r\n\r\n $stmt = Conexion::conectar()->prepare($sql);\r\n\r\n $stmt -> execute();\r\n\r\n return $stmt -> fetch();\r\n\r\n }", "function getMaxInShowcase();", "function verCodLong($acceso,$valor){\t\n\t$cont = verCo($acceso,$valor);\n\t\tif($cont<100000)\n\t\t\t$cont=\"0\".$cont;\n\t\tif($cont<1000000)\n\t\t\t$cont=\"0\".$cont;\n\t\tif($cont<10000000)\n\t\t\t$cont=\"0\".$cont;\n\treturn $cont;\t\n}", "public static function BuscarUltimaID() {\n try {\n $sql = \"SELECT max(id) as id FROM tb_consultorio\";\n $op = Conexao::getInstance()->prepare($sql);\n $op->execute();\n return (object) $op->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n print \"Ocorreu um erro ao tentar executar esta ação, tente novamente mais tarde.\";\n print_r ($e);\n }\n }", "public function poslednji_vestackiId() \n {\n $ocene=$this->findAll();\n $maxId=-1;\n foreach ($ocene as $ocena)\n {\n if ($ocena->VestackiId>$maxId)\n {\n $maxId=$ocena->VestackiId; \n }\n }\n return $maxId;\n }", "function getDatosNota_max()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'nota_max'));\n $oDatosCampo->setEtiqueta(_(\"nota max\"));\n return $oDatosCampo;\n }", "function getDatosNota_max()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'nota_max'));\n $oDatosCampo->setEtiqueta(_(\"nota max\"));\n return $oDatosCampo;\n }", "function maxLoan(){\n\tglobal $driver;\n\t$sql\t=\t\"SELECT maxloan FROM settings\"; //Retrieve maximum loan amount to be given\n\tif($maxloan\t\t=\t$driver->perform_request($sql)):\n\t\t$row\t\t=\t$driver->load_data($maxloan);\n\t\t$maxloanamt\t=\t(($row['maxloan'])>0)?($row['maxloan']):500000;\n\telse:\n\t\tdie('<p class=\"error\">ERROR Retrieving Maximum Loan Amount.<br/>'.mysql_error().'</p>');\n\tendif;\n\treturn $maxloanamt; //The maximum amount to loan\n}", "public static function get_max_order_detail_id(){\r\t\t$qry = \"SELECT MAX(`ord_dtl_id`) as last_detail FROM \".TBL_ORDER_DETAILS.RET;\r\t\t$res = mysql_query($qry);\r\t\tif($res && is_gt_zero_num(mysql_num_rows($res))){\r\t\t\treturn mysql_result($res,0); \t\t\r\t\t}\t\t\r\t\treturn 0;\r\t}", "static function maxint() {\n /* assumes largest integer is of form 2^n - 1 */\n $to_test = pow(2, 16);\n while (1) {\n $last = $to_test;\n $to_test = 2 * $to_test;\n if (($to_test < $last) || (!is_int($to_test))) {\n return($last + ($last - 1));\n }\n }\n }", "function getCalibrationMaxSerial($DbConnection)\n{\n\t$query =\"select Max(sno)+1 as seiral_no from calibration\"; \n\t$result=mysql_query($query,$DbConnection);\n\t$row=mysql_fetch_row($result);\n\treturn $row[0];\n}", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "public function getMaximum() {\r\n return $this->maximumvalue;\r\n }", "public function generarCodigoTipoUsuario() {\n $pdo = Database::connect();\n $sql = \"select max(ID_TIPO_USU) as cod from INV_TAB_TIPO_USUARIO\";\n $consulta = $pdo->prepare($sql);\n $consulta->execute();\n $res = $consulta->fetch(PDO::FETCH_ASSOC);\n $nuevoCod = '';\n if ($res['cod'] == NULL) {\n $nuevoCod = 'TUSU-0001';\n } else { \n $rest= ((substr($res['cod'], -4))+1).''; // Separacion de la parte numerica TUSU-0023 --> 23\n // Ciclo que completa el codigo segun lo retornado para completar los 9 caracteres \n // TUSU-00 --> 67, TUSU-0 --> 786\n if($rest >1 && $rest <=9){\n $nuevoCod = 'TUSU-000'.$rest;\n }else{\n if($rest >=10 && $rest <=99){\n $nuevoCod = 'TUSU-00'.$rest;\n }else{\n if($rest >=100 && $rest <=999){\n $nuevoCod = 'TUSU-0'.$rest;\n }else{\n $nuevoCod = 'TUSU-'.$rest; \n } \n } \n }\n }\n Database::disconnect();\n return $nuevoCod; // RETORNO DEL NUEVO CODIGO DE TIPO USUARIO\n }", "function getmaxno()\n\t{\n\t\t$this->db->select_max('device_no', 'no');\n\t\treturn $this->db->get($this->table);\n\t}", "public function getkodepegawai()\n {\n $query = $this->db->query(\"select max(id_pegawai) as max_code FROM pegawai\");\n\n $row = $query->row_array();\n\n $max_id = $row['max_code'];\n $max_fix = (int) substr($max_id, 1, 4);\n\n $max_nik = $max_fix + 1;\n\n $nik = \"P\".sprintf(\"%04s\", $max_nik);\n return $nik;\n }", "private function getHigherCr($lpcid) {\r\n $query1 = $this->db->select('CAST(MAX(cr) AS DECIMAL(8,6)) AS max', FALSE)\r\n ->from('landing_page')\r\n ->where('landingpage_collectionid', $lpcid)\r\n ->get();\r\n return $query1->row()->max;\r\n }" ]
[ "0.74850863", "0.7206991", "0.71918726", "0.7175867", "0.7147372", "0.7140071", "0.7140071", "0.7093192", "0.70545185", "0.7021588", "0.69857293", "0.6867222", "0.68574476", "0.6855183", "0.6839303", "0.6818563", "0.6815775", "0.6761565", "0.6754523", "0.6751725", "0.6620329", "0.66156965", "0.660325", "0.6602521", "0.6598108", "0.6586089", "0.65423065", "0.65373814", "0.6520666", "0.6513829", "0.64913315", "0.64684683", "0.64455396", "0.64434403", "0.64434403", "0.6419223", "0.639074", "0.6368617", "0.6358836", "0.63424087", "0.6341484", "0.6324175", "0.63193196", "0.6314373", "0.63088036", "0.630569", "0.63029164", "0.62933403", "0.6288876", "0.6284078", "0.6283719", "0.6273933", "0.62695277", "0.62431884", "0.62362474", "0.6234924", "0.62114394", "0.6202378", "0.6198838", "0.61987555", "0.61985296", "0.61932015", "0.6191923", "0.6190364", "0.6188564", "0.6159589", "0.61532116", "0.614798", "0.61432755", "0.61240876", "0.612173", "0.61190385", "0.61188346", "0.61150753", "0.60965395", "0.60835576", "0.60801786", "0.60677665", "0.6056835", "0.6046408", "0.60380656", "0.60347736", "0.60171366", "0.6007934", "0.60001767", "0.5996635", "0.59953326", "0.5992643", "0.59868896", "0.59868896", "0.5984926", "0.598414", "0.5981126", "0.59649926", "0.59600794", "0.5953032", "0.595077", "0.5949647", "0.5948872", "0.5924454" ]
0.8060826
0
Consultar Pedidos de hoy
public function ReportesHoy() { $objetoBD = new Conexion(); $objetoBD->conectar(); $mysqli = $objetoBD->cadenaconexion(); $consulta = "SELECT COUNT(rep_id) AS Reportes from reporte where rep_fecha=CURDATE()"; $resultado = $mysqli->query($consulta); return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readPedidos(){\n $sql='SELECT IdEncabezado, u.Nombre, u.Apellido, Fecha, TipoEstado \n FROM encabezadopedidos en INNER JOIN usuarios u USING (IdUsuario) \n INNER JOIN estadopedidos es USING(IdEstadoPedido) ORDER by IdEncabezado ASC ';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "public function PedidosDelDia()\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n \r\n $consulta = \"SELECT ped_id, clie_nombres, clie_apellidos, ped_hora_entrega, ped_direccion, ped_estado\r\n FROM pedidos, clientes WHERE clientes.clie_id=pedidos.clie_id AND ped_estado='PENDIENTE' AND ped_fecha_entrega=CURDATE() GROUP BY ped_id\";\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "public function PedidosDelDia2()\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n \r\n $consulta = \"SELECT ped_id, clie_nombres, clie_apellidos, ped_hora_entrega, ped_direccion, ped_estado\r\n FROM pedidos, clientes WHERE clientes.clie_id=pedidos.clie_id AND ped_fecha_entrega=CURDATE() GROUP BY ped_id\";\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "public function pedidosHoy()\n {\n $pedidos = \\App\\Pedido::with('usuario')\n ->with('repartidor')\n ->with('productos.establecimiento')\n ->where(DB::raw('DAY(created_at)'),DB::raw('DAY(now())'))\n ->where(DB::raw('MONTH(created_at)'),DB::raw('MONTH(now())'))\n ->where(DB::raw('YEAR(created_at)'),DB::raw('YEAR(now())'))\n ->orderBy('id', 'desc')\n ->get();\n\n if(count($pedidos) == 0){\n return response()->json(['error'=>'No existen pedidos para hoy.'], 404); \n }else{\n return response()->json(['pedidos'=>$pedidos], 200);\n } \n }", "function consultarPedido (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM pedido');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "function listarPersonalAlmacenDisponible($conexion){\n\ttry{\n\t\t$consulta = \"SELECT PID FROM PERSONAL WHERE DEPARTAMENTO='Almacen' AND ESTADO='Libre' ORDER BY PID\"; \n \t$stmt = $conexion->query($consulta);\n\t\treturn $stmt;\n\t}catch(PDOException $e) {\n\t\treturn $e->getMessage();\n }\n}", "function contarServicios()\n\t{\n\t\treturn \"select count(*) as number\nfrom trabajadores, servicios,sucursales where servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 1 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "function consultarEstudiantesParaHomologacion($cod_proyecto){\n $cadena_sql = $this->sql->cadena_sql(\"consultarEstudiantesProyecto\",$cod_proyecto);\n return $resultadoEspacio = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "public function hospitalizacionesPendientes(){\n\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT count(H.idHospitalizacion) as cantidadHospitalizaciones\n\t\t\t\t\t\tFROM tb_hospitalizacion AS H \n\t\t\t\t\t\tINNER JOIN tb_hospitalizacionAlta AS HA ON HA.idHospitalizacion = H.idHospitalizacion\n \t\t\t\tWHERE Not H.idHospitalizacion IN (SELECT idTipoDetalle FROM tb_pago_factura_caja_detalle WHERE tipoDetalle = 'Hospitalizacion' AND estado = 'Activo' )\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['cantidadHospitalizaciones'];\t\t\n\n\n\t\t\n\t}", "public function consultasPendientes(){\n\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT count(C.idConsulta) as cantidadConsultas\n\t\t\n\t\t\t\t\t\tFROM tb_consultas AS C \n\t\t\t\t\t\t\n \t\t\t\tWHERE Not C.idConsulta IN (SELECT idTipoDetalle FROM tb_pago_factura_caja_detalle WHERE tipoDetalle = 'Consulta' AND estado = 'Activo' )\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['cantidadConsultas'];\t\n\n\n\t\t\n\t}", "public function get_ventas_consulta($id_paciente){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$sql=\"select*from ventas where id_paciente=?;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$id_paciente);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function buscarhorario()\n\t{\n\t\t$query=\"SELECT * FROM horario WHERE idhorario=\".$this->idhorario;\n\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t\n\t\t//echo $total;\n\t\treturn $resp;\n\t}", "function getPedidos($db) {\n //Trae todos los pedidos\n $query = \"SELECT p.id, p.idusuario, p.fechayhora, p.monto, \n (select COUNT(c.clavecarrito) FROM carrito c WHERE c.idpedido = p.id) as items, \n u.fullname, p.cumplido FROM pedidos p INNER JOIN usuarios u ON p.idusuario=u.id \n ORDER BY p.fechayhora DESC\";\n\n return mysqli_query($db, $query);\n}", "function padres_consultan_hijos($id_padre){\r\n\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t\r\n \t\r\n\t \t$sql=\"select * from $this->tabla_alumno where id_padre='$id_padre'\";\r\n\t\t\t\r\n\t $rs = mysql_query($sql,$cn);\r\n \r\n \t\r\n\t\t\twhile($fila=mysql_fetch_object($rs)){\r\n\t\t\t\t$cursos[]=$fila;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t$respuesta=\"\";\r\n\t\t\tif($cursos){\r\n\t\t\t\t\t\r\n\t\t\t\tforeach($cursos as $q):\r\n\t\t\t\t\t\r\n\t\t\t\t\t$respuesta.=$q->codigo.\"{\".$q->nombres.\"{\".$q->apellido_paterno.\"{\".$q->apellido_materno.\"{\".$q->nivel.\"{\".$q->grado.\"{\".$q->seccion.\"{\";\r\n\t\t\t\t\t\r\n\t\t\t\tendforeach;\t\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t$respuesta=\"no data\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmysql_close($cn);\r\n\r\n\t\t\treturn $respuesta;\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "public function consultarTodos()\n\t{\n\t\t$sql = \t' SELECT colores.* '.\n\t\t\t\t' FROM colores '.\n\t\t\t\t' ORDER BY nombre ';\n\t\n\t\t$stmt = $this->getEntityManager()->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll(); //Se utiliza el fecth por que es un registro\n\t\t\n\t\t//Elimina los espacios\n\t\tforeach($result as &$reg)\n\t\t{\n\t\t\t$reg['nombre'] = trim($reg['nombre']);\n\t\t}//end foreach\n\t\n\t\treturn $result;\n\t}", "public function consultaSeguimientos(){\n\t\t$conect= Yii::app()->db;\n\t\t$sqlConsSegPaiDer=\"select fecha_seguim_compderecho,seguim_compderecho from seguimiento_compderecho \n\t\twhere id_pai=:id_pai and id_derechocespa=:id_derechocespa and num_doc=:num_doc order by fecha_seguim_compderecho desc\";\n\t\t$segCompDer=$conect->createCommand($sqlConsSegPaiDer);\n\t\t$segCompDer->bindParam(\":id_pai\",$this->id_pai,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":id_derechocespa\",$this->id_derechocespa,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":num_doc\",$this->num_doc,PDO::PARAM_STR);\n\t\t$readConsSegPaiDer=$segCompDer->query();\n\t\t$resConsSegPaiDer=$readConsSegPaiDer->readAll();\n\t\t$readConsSegPaiDer->close();\n\t\treturn $resConsSegPaiDer;\n\t}", "public function listarPorId(){\n $query = \"select * from usuario where idusuario=?\";\n\n //preparando a consulta para a execução\n $stmt=$this->conn->prepare($query);\n\n //vamos fazer um blind(ligação) do id pesquisado\n //com o paramêtro da consulta, neste caso é o \n //ponto de interrogação\n $stmt ->bindParam(1,$this->idusuario);\n\n //executar efetivamente a consulta \n $stmt ->execute();\n\n //Organizar os dados retornados da consulta para \n // a exibição em formato de json\n // Vamos usar uma variavel e um array para associar \n // os campos da tabela\n $linha = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //organizar no objeto usuario(aqrquivo usuario.php)\n //os dados retornados\n //da tabela usuario que está no banco de dados\n \n $this->email = $linha['email'];\n $this->senha = $linha['senha'];\n $this->nome = $linha['nome'];\n $this->cpf = $linha['cpf'];\n $this->telefone = $linha['telefone'];\n $this->foto = $linha['foto'];\n\n }", "function getMisPedidos($db, $idusuario) {\n $idusuario = mysqli_real_escape_string($db, $idusuario);\n //Trae todos los pedidos de un usuario\n $query = \"SELECT p.id, p.fechayhora, p.monto, u.fullname,\n (select COUNT(c.clavecarrito) FROM carrito c WHERE c.idpedido = p.id) as items, p.cumplido \n FROM pedidos p INNER JOIN usuarios u ON p.idusuario=u.id where p.idusuario=\".$idusuario.\" \n ORDER BY p.fechayhora DESC\";\n\n return mysqli_query($db, $query);\n}", "public function MesasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM mesas INNER JOIN salas ON salas.codsala = mesas.codsala where mesas.codmesa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "private function consultar_usuario_todos() {\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u;\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "public function getAllByUser(){\n //hacemos la consulta y lo guardamos en una variable\n $sql=\"SELECT * FROM pedidos\"\n .\" where usuario_id={$this->getUsuario_id()} order by id desc\";\n $pedido=$this->db->query($sql);\n //devolvemos un valor en especifico \n return $pedido;\n }", "static function getEntradasHoy() {\n\n $ped = new PedidosCab();\n $tablaPedidos = $ped->getDataBaseName() . \".\" . $ped->getTableName();\n $prov = new Proveedores();\n $tablaProveedores = $prov->getDataBaseName() . \".\" . $prov->getTableName();\n\n $rows = array();\n $hoy = date('Y-m-d');\n\n $em = new EntityManager($ped->getConectionName());\n if ($em->getDbLink()) {\n $query = \"select a.PrimaryKeyMD5 as PrimaryKeyMD5,IDPedido,Fecha,RazonSocial,TotalBases from {$tablaPedidos} as a left join {$tablaProveedores} as c on a.IDProveedor=c.IDProveedor where (IDEstado='1') and FechaEntrega='{$hoy}' order by Fecha ASC\";\n $em->query($query);\n $rows = $em->fetchResult();\n }\n unset($em);\n unset($ped);\n unset($prov);\n\n return $rows;\n }", "public function CreditosPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.direccliente, clientes.emailcliente, ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.tipopagove, ventas.formapagove, ventas.fechaventa, ventas.fechavencecredito, ventas.statusventa, usuarios.nombres, cajas.nrocaja, abonoscreditos.codventa as cod, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (ventas LEFT JOIN clientes ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN usuarios ON ventas.codigo = usuarios.codigo WHERE ventas.codventa =? GROUP BY cod\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function ListarProductosVendidos() \n\t{\n\t\tself::SetNames();\n\t\t$sql =\"SELECT \n\tproductos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, productos.stockminimo, categorias.nomcategoria, SUM(detalleventas.cantventa) as cantidad \n\tFROM\n\t(productos LEFT OUTER JOIN detalleventas ON productos.codproducto=detalleventas.codproducto) LEFT OUTER JOIN categorias ON \n\tcategorias.codcategoria=productos.codcategoria WHERE DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') <= ? AND detalleventas.codproducto is not null GROUP BY productos.codproducto\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\n\t\t\techo \"<div class='alert alert-danger'>\";\n\t\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN PRODUCTOS VENDIDOS PARA EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\t\techo \"</div>\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[]=$row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "function listar($objeto){\n\t\t$condicion.=(!empty($objeto['id']))?' AND r.id='.$objeto['id']:'';\n\t// Filtra por los insumos preparados\n\t\t$condicion.=(!empty($objeto['insumos_preparados']))?' AND ids_insumos_preparados!=\\'\\'':'';\n\t// Filtra por tipo\n\t\t$condicion.=(!empty($objeto['tipo'])) ? ' AND p.tipo_producto = '.$objeto['tipo'] : '';\n\t// Filtros\n\t\t$condicion.=(!empty($objeto['filtro']) && $objeto['filtro'] == 'insumos_preparados_formula') ? ' AND (p.tipo_producto = 8 OR p.tipo_producto = 9) ' : '';\n\n\n\t// Ordena la consulta si existe\n\t\t$condicion.=(!empty($objeto['orden']))?' ORDER BY '.$objeto['orden']:'';\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tp.id AS idProducto, p.nombre, p.costo_servicio AS costo,\n\t\t\t\t\tp.id_unidad_compra AS idunidadCompra, p.id_unidad_venta AS idunidad, p.factor as multiplo,\n\t\t\t\t\t(SELECT\n\t\t\t\t\t\tnombre\n\t\t\t\t\tFROM\n\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad, u.factor, p.tipo_producto,\n\t\t\t\t\tr.ids_insumos_preparados AS insumos_preparados, r.ids_insumos AS insumos,\n\t\t\t\t\tr.preparacion, r.ganancia, ROUND(p.precio, 2) AS precio, p.codigo, p.minimos\n\t\t\t\tFROM\n\t\t\t\t\tapp_productos p\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_campos_foodware f\n\t\t\t\t\tON\n\t\t\t\t\t\tp.id = f.id_producto\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tcom_recetas r\n\t\t\t\t\tON\n\t\t\t\t\t\tr.id = p.id\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_unidades_medida u\n\t\t\t\t\tON\n\t\t\t\t\t\tu.id = p.id_unidad_compra\n\t\t\t\tWHERE\n\t\t\t\t\tp.status = 1 AND (p.tipo_producto = 8 OR p.tipo_producto = 9)\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "public function listar_mis_pedidos() {\n \n try {\n $sql = \"\n select \n c.nro_documento,\n c.nombre,\n c.correo,\n c.telefono_celular,\n p.direccion_entrega,\n p.referencia_entrega,\n p.observacion,\n d.descripcion,\n c.cod_distrito,\n f.descripcion,\n p.importe_total,\n p.fecha_pedido,\n p.nro_pedido,\n p.cantidad_productos,\n p.estado,\n p.id_pedido\n from \n cliente c inner join pedido p\n on\n c.id_cliente = p.id_cliente inner join distrito d\n on\n c.cod_distrito = d.cod_distrito inner join forma_pago f\n on\n f.id_forma_pago = p.id_forma_pago\n where\n p.estado = 'PENDIENTE' and c.id_cliente = '$_SESSION[cliente_id]'; \n \";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "public function VentasPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.direccliente, clientes.emailcliente, ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente as cliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.tipopagove, ventas.formapagove, ventas.montopagado, ventas.montodevuelto, ventas.fechaventa, ventas.fechavencecredito, ventas.statusventa, ventas.delivery, ventas.repartidor, ventas.observaciones, mediospagos.mediopago, salas.nombresala, mesas.codmesa, mesas.nombremesa, usuarios.nombres, cajas.nrocaja, abonoscreditos.codventa as cod, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (ventas LEFT JOIN clientes ON clientes.codcliente = ventas.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN salas ON mesas.codsala = salas.codsala LEFT JOIN mediospagos ON ventas.formapagove = mediospagos.codmediopago LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN usuarios ON ventas.codigo = usuarios.codigo WHERE ventas.codventa =? GROUP BY cod\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function consultarEstudiantes($codProyecto) {\r\n $variables=array('codProyecto'=>$codProyecto,\r\n 'ano'=> $this->ano,\r\n 'periodo'=> $this->periodo);\r\n $cadena_sql=$this->sql->cadena_sql(\"consultarEstudiantes\",$variables);\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "function contarServiciosFinalizados()\n\t{\n\t\treturn \"select count(*) as number\nfrom trabajadores, servicios,sucursales \nwhere servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 0\nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "function consultarProyectos() {\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectos\",\"\");\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "public function SalasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM salas LEFT JOIN mesas ON salas.codsala = mesas.codsala where salas.codsala = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codsala\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function BuscarIngredientesVendidos() \n{\n\tself::SetNames();\n\t$sql = \"SELECT productos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, ingredientes.costoingrediente, ingredientes.codingrediente, ingredientes.nomingrediente, ingredientes.cantingrediente, productosvsingredientes.cantracion, detalleventas.cantventa, SUM(productosvsingredientes.cantracion*detalleventas.cantventa) as cantidades FROM productos INNER JOIN detalleventas ON productos.codproducto=detalleventas.codproducto INNER JOIN productosvsingredientes ON productos.codproducto=productosvsingredientes.codproducto LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente WHERE DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') <= ? GROUP BY ingredientes.codingrediente\";\n\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN INGREDIENTES FACTURADOS PARA EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function DetallesVentasPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codcliente as cliente, detalleventas.codproducto, detalleventas.producto, detalleventas.codcategoria, detalleventas.cantventa, detalleventas.precioventa, detalleventas.preciocompra, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, productos.ivaproducto, productos.existencia, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, usuarios.nombres FROM detalleventas LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN clientes ON detalleventas.codcliente = clientes.codcliente LEFT JOIN productos ON detalleventas.codproducto = productos.codproducto LEFT JOIN usuarios ON detalleventas.codigo = usuarios.codigo WHERE detalleventas.coddetalleventa = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"coddetalleventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function getPedidoById($db,$Id) {\n $id = mysqli_real_escape_string($db, $Id);\n\n //Trae un pedido con su carro de compras\n $queryProductobyId = \"SELECT p.id, p.idusuario, p.fechayhora, p.monto, \n (select COUNT(c.clavecarrito) FROM carrito c WHERE c.idpedido = p.id) as items, \n u.fullname, p.cumplido FROM pedidos p, usuarios u where p.idusuario=u.id and p.id=\".$id;\n //echo $queryProductobyId;\n\n $ProductoDetalle = mysqli_query($db, $queryProductobyId);\n /*echo \"ProductoDetalle:\";\n print_r($ProductoDetalle);*/\n\n // tomamos todas las precauciones por si la consulta da error o si no devuelve registros\n if (!$ProductoDetalle or $ProductoDetalle == null) return array();\n else {\n $ProductoDetalle = mysqli_fetch_assoc($ProductoDetalle);\n //echo \"ProductoDetalle2:\";\n if ($ProductoDetalle != null) {\n //print_r($ProductoDetalle);\n return $ProductoDetalle;\n }\n else {\n //echo \"null\";\n return array();\n }\n }\n}", "public function ClientesPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes where codcliente = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function AbonosCreditosId() \n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, ventas.idventa, ventas.codventa, ventas.totalpago, ventas.statusventa, abonoscreditos.codventa as codigo, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (clientes INNER JOIN ventas ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa WHERE abonoscreditos.codabono = ? AND clientes.cedcliente = ? AND ventas.codventa = ? AND ventas.tipopagove ='CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET['codabono'])));\n\t$stmt->bindValue(2, trim(base64_decode($_GET['cedcliente'])));\n\t$stmt->bindValue(3, trim(base64_decode($_GET['codventa'])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function MediosPagosPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from mediospagos where codmediopago = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codmediopago\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function listarProcesoCompraPedido(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROCPED_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function recuperarTodos() {\n $query = \"select * from tb_atividade where id_evento = :id\";\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id']);\n // $stmt->bindValue(':id', 8);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function IngredientesPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM ingredientes LEFT JOIN proveedores ON ingredientes.codproveedor = proveedores.codproveedor WHERE ingredientes.codingrediente = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codingrediente\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function EntregarPedidos()\n\t{\n\t\tself::SetNames();\n\t\t\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" cocinero = ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $cocinero);\n\t\t$stmt->bindParam(2, $codventa);\n\t\t\n\t\t$cocinero = strip_tags(\"0\");\n\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t$sala = strip_tags(base64_decode($_GET[\"nombresala\"]));\n\t\t$mesa = strip_tags(base64_decode($_GET[\"nombremesa\"]));\n\t\t$stmt->execute();\n\t\t\n echo \"<div class='alert alert-info'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-check-square-o'></span> EL PEDIDO DE LA \".$sala.\" Y \".$mesa.\" FUE ENTREGADO EXITOSAMENTE </center>\";\n\t\techo \"</div>\"; \n\t\texit;\n\t\n }", "public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}", "function getFoodpornsByHostory()\n {\n $stmt = self::$_db->prepare(\"SELECT * FROM foodporn WHERE fs_user=:uid\");\n $uid = self::getUserID();\n $stmt->bindParam(\":uid\", $uid);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function BusquedaDetallesVentas()\n\t{\n self::SetNames();\n\n if ($_SESSION['acceso'] == \"administrador\") {\n\n\tif ($_GET['tipobusquedad'] == \"1\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria WHERE ventas.codventa = ? ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"codventa\"]));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS CON ESTE N&deg; DE FACTURA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusquedad'] == \"2\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, cajas.nrocaja, cajas.nombrecaja FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE ventas.codcaja = ? ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcaja']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA CAJA SELECCIONADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusquedad'] == \"3\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, cajas.nrocaja, cajas.nombrecaja FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') = ? ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(date(\"Y-m-d\",strtotime($_GET['fecha']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA FECHA INGRESADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\t\t } \n\n ################# AQUI BUSCAMOS POR CAJEROS Y DISTRIBUIDOR ################\n\n\t } else {\n\n\n\t\t \tif ($_GET['tipobusquedad'] == \"1\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria WHERE ventas.idventa = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"codventa\"]));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS CON ESTE N&deg; DE FACTURA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusquedad'] == \"2\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, cajas.nrocaja, cajas.nombrecaja FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE ventas.codcaja = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcaja']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA CAJA SELECCIONADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusquedad'] == \"3\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, cajas.nrocaja, cajas.nombrecaja FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(date(\"Y-m-d\",strtotime($_GET['fecha']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA FECHA INGRESADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\t\t }\n\t }\n}", "function listarServicios()\n\t{\n\t\treturn \"select servicios.servicio_id,servicios.nombre_servicio, servicios.estado_servicio, servicios.descripcion, servicios.fecha_creacion,\n trabajadores.nombre,\nsucursales.nombre_sucursal\nfrom trabajadores, servicios,sucursales where servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 1 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "public function seleccionarTodosEuno() {\n\n $planConsulta = \"SELECT c.IdContacto,c.ConNombres,c.ConApellidos,c.ConCorreo,r.Idrolcontacto,r.Nomrol\";\n $planConsulta .= \" FROM contacto c\";\n $planConsulta .= \" JOIN rolcontacto r ON c.rolcontacto_Idrolcontacto=r.Idrolcontacto \";\n $planConsulta .= \" WHERE c.Estado = 1 \";\n $planConsulta .= \" ORDER BY c.IdContacto ASC \";\n\n $registrosContactos = $this->conexion->prepare($planConsulta);\n $registrosContactos->execute(); //Ejecución de la consulta \n\n $listadoRegistrosContacto = array();\n\n while ($registro = $registrosContactos->fetch(PDO::FETCH_OBJ)) {\n $listadoRegistrosContacto[] = $registro;\n }\n\n $this->cierreBd();\n\n return $listadoRegistrosContacto;\n }", "function listarPais(){\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='CLI_LUG_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n //Definicion de la lista del resultado del query\n $this->captura('id_lugar','int4');\n $this->captura('codigo','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_lugar_fk','int4');\n $this->captura('nombre','varchar');\n $this->captura('sw_impuesto','varchar');\n $this->captura('sw_municipio','varchar');\n $this->captura('tipo','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('es_regional','varchar');\n\n //$this->captura('nombre_lugar','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta); exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function listarDeportestodo(){\n $sql = \"SELECT `Sport`.`id` as iddeporte, `Sport`.`nombre` FROM `sporte`.`coaches` AS `Coach` LEFT JOIN `sporte`.`users` AS `User` ON (`Coach`.`user_id` = `User`.`id`) LEFT JOIN `sporte`.`ligas` AS `Liga` ON (`Coach`.`liga_id` = `Liga`.`id`) LEFT JOIN `sporte`.`sports` AS `Sport` ON (`Liga`.`sport_id` = `Sport`.`id`) WHERE 1=1\";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute(); \n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "public function BusquedaVentas()\n\t{\n\n self::SetNames();\n\n if ($_SESSION['acceso'] == \"administrador\") {\n\n\n\tif ($_GET['tipobusqueda'] == \"1\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE ventas.codcliente = ? GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcliente']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS PARA EL CLIENTE INGRESADO !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusqueda'] == \"2\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, cajas.nombrecaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE ventas.codcaja = ? GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcaja']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA CAJA SELECCIONADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusqueda'] == \"3\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') = ? GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(date(\"Y-m-d\",strtotime($_GET['fecha']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA FECHA INGRESADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\t\t } \n\n ################# AQUI BUSCAMOS POR CAJEROS Y DISTRIBUIDOR ################\n\n\t } else {\n\n\n\t\t \tif ($_GET['tipobusqueda'] == \"1\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE ventas.codcliente = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcliente']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS PARA EL CLIENTE INGRESADO !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusqueda'] == \"2\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, cajas.nombrecaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE ventas.codcaja = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcaja']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA CAJA SELECCIONADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusqueda'] == \"3\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(date(\"Y-m-d\",strtotime($_GET['fecha']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA FECHA INGRESADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\t\t }\n\t }\n}", "function dptos_hojas()\r\n\t{\r\n\r\n\t\t$Consulta = '\r\n\t\t\tselect distinct dpto.id_dpto, departamento\r\n\t\t\tfrom departamentos dpto, revision_item item\r\n\t\t\twhere dpto.id_dpto = item.id_dpto\r\n\t\t';\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\r\n\r\n\t\treturn $Resultado->result_array();\r\n\r\n\t}", "public function pedidosEncurso()\n {\n $pedidos = \\App\\Pedido::with('usuario')\n //->with('repartidor')\n ->with(['repartidor.usuario' => function ($query) {\n $query->select('usuarios.id', 'usuarios.nombre', 'usuarios.telefono');\n }])\n ->with('productos.establecimiento')\n ->where('estado_pago','aprobado')\n ->where(function ($query) {\n $query\n ->where('estado',1)\n ->orWhere('estado',2)\n ->orWhere('estado',3);\n })\n ->where(DB::raw(\"PERIOD_DIFF(DATE_FORMAT(now(), '%y%m') ,DATE_FORMAT(created_at, '%y%m'))\"), '<=', 1)\n ->orderBy('id', 'desc')\n ->get();\n\n if(count($pedidos) == 0){\n return response()->json(['error'=>'No existen pedidos en curso.'], 404); \n }else{\n return response()->json(['pedidos'=>$pedidos], 200);\n } \n }", "function consultar_opedidos(){\n \n $query_RecordsetResumo = \"SELECT * FROM CAIXACUPOM \";\n $query_RecordsetResumo .= \" WHERE TIPOATENDIMENTO = 'DELIVERY' \";\n #$query_RecordsetResumo .= \" AND STATUS_GO4YOU != '4' \";\n $query_RecordsetResumo .= \" ORDER BY CAIXACUPOM_CONTROLE DESC\";\n $query_RecordsetResumo .= \" LIMIT 20\";\n $RecordsetResumo = mysql_query($query_RecordsetResumo, $con) or die(mysql_error());\n $row_RecordsetResumo = mysql_fetch_assoc($RecordsetResumo);\n $totalRows_RecordsetResumo = mysql_num_rows($RecordsetResumo);\n \n $tempo = $_SESSION['TEMPO_PREPARACAO'];\n $pedidos = array();\n $i = 0;\n if($totalRows_RecordsetResumo != 0 ){\n do {\n \n # Checa se percisa alterar o status\n if(dif_hora(acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo)) == 2 && $row_RecordsetResumo['STATUS_GO4YOU'] == \"0\"){\n update_status($row_RecordsetResumo['CAIXACUPOM_CONTROLE'], 2);\n }\n \n # Condicao para gerar contador de Tempo\n $status = \" excedido \";\n if($row_RecordsetResumo['STATUS_GO4YOU'] == \"0\" && dif_hora(acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo)) != 2){\n $status = dif_hora_draw(acrescenta_min($row_RecordsetResumo['DATAHORA'], $tempo), date('Y-m-d H:i:s'));\n }\n \n $pedidos[$i]['CAIXACUPOM_CONTROLE'] = $row_RecordsetResumo['CAIXACUPOM_CONTROLE' ];\n $pedidos[$i]['DATAHORA' ] = dataMySql2BR($row_RecordsetResumo['DATAHORA' ]);\n $pedidos[$i]['TEMPO_PREVISTO' ] = acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo);\n $pedidos[$i]['STATUS_GO4YOU' ] = trata_texto(status($row_RecordsetResumo['STATUS_GO4YOU']));\n $pedidos[$i]['TEMPO' ] = $status;\n $pedidos[$i]['STATUS_BTN' ] = $row_RecordsetResumo['STATUS_GO4YOU'] < 4 ? \n '<input type=\"submit\" value=\"'.trata_texto(status($row_RecordsetResumo['STATUS_GO4YOU'] + 1)).'\" onClick=\"update_status('.$row_RecordsetResumo['CAIXACUPOM_CONTROLE'].', '.$row_RecordsetResumo['STATUS_GO4YOU'].')\" style=\"cursor: pointer;\" />' :\n '<input type=\"button\" value=\"Entregue\" disabled />' ;\n ++$i;\n } while ($row_RecordsetResumo = mysql_fetch_assoc($RecordsetResumo)); \n }\n \n return json_encode($pedidos);\n \n}", "function contarServiciosNombre($nombre_buscado)\n\t{\n\t\treturn \"select count(*) as number\nfrom trabajadores, servicios,sucursales where servicios.nombre_servicio like '%$nombre_buscado%'\nand servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 1 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "function listarVendedores($conexao){\r\n $dados = $conexao->query('SELECT * FROM vendedor');\r\n return $listaVendedores = $dados->fetchAll(PDO::FETCH_OBJ); \r\n}", "public function listServRequetes($idFournisseur){\n $requete = \" SELECT idForfaitFournisseur, (SELECT count(idservice) FROM bitvoix_db.services WHERE idFournisseur = ?) AS nroServ\n FROM fournisseur WHERE idFournisseur = ?\";\n // var_dump($requete);\n $stmt = $this->_pdo->prepare($requete);\n $stmt->execute(array($idFournisseur,$idFournisseur));\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n return $result;\n }", "public function consultaTodos()\n\t{\n\t\t$sql = \"SELECT * FROM \" . $this->tabela;\n\n\t\t// $this->resultado = mysqli_query($this->conn, $sql);\n\t\t$this->resultado = $this->conn->prepare($sql);\n\t\treturn $this->resultado->execute();\n\t}", "function listarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_sel';\n\t\t$this->transaccion='SNX_HAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_herrajeaccesorio','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('herrajeaccesorio','varchar');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function pesquisa()\n {\n $query = \"SELECT * FROM noticia WHERE titulo LIKE :titulo\";\n $stmt = $this->db->prepare($query);\n $stmt->bindValue(\":titulo\", $this->titulo.\"%\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function listar_procesos($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre, tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_procesos\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "public static function pesquisaTodos($request){\n $externa = \"https://www.seminovosbh.com.br/resultadobusca/index/\";\n\n //Filtro veículo\n if($request->veiculo == \"carro\")\n $externa .= \"veiculo/carro/\";\n if($request->veiculo == \"moto\")\n $externa .= \"veiculo/moto/\";\n if($request->veiculo == \"caminhao\")\n $externa .= \"veiculo/caminhao/\";\n \n //Filtro estado de conservação\n if($request->estado_conservacao == \"0km\")\n $externa .= \"estado-conservacao/0km/\";\n if($request->estado_conservacao == \"seminovo\")\n $externa .= \"estado-conservacao/seminovo/\";\n\n //Filtro de marca e modelo\n $externa .= \"marca/\".$request->marca.\"/\";\n $externa .= \"modelo/\".$request->modelo.\"/\";\n\n //Filtro de cidade\n if(isset($request->cidade))\n $externa .= \"cidade/\".$request->cidade.\"/\";\n \n //Filtro de valores\n if(isset($request->valor1) && isset($request->valor2))\n $externa .= \"valor1/\".$request->valor1.\"/valor2/\".$request->valor2.\"/\";\n \n //Filtro de anos\n if(isset($request->ano1) && isset($request->ano2))\n $externa .= \"ano1/\".$request->ano1.\"/ano2/\".$request->ano2.\"/\";\n \n //Filtro de tipo de usuário\n if($request->usuario == \"particular\")\n $externa .= \"usuario/particular/\";\n else if($request->usuario == \"revenda\")\n $externa .= \"usuario/revenda/\";\n else \n $externa .= \"usuario/todos/\";\n \n //Maior quantidade de registros possíveis\n $externa .= \"qtdpag/50/\";\n\n //Escolhe a página\n if(isset($request->pagina))\n $externa .= \"pagina/\".$request->pagina.\"/\";\n \n //Extrai os dados da página e retira deles a lista de carros resultante\n $resultados = file_get_contents($externa);\n $resultados_filtro = explode('<dd class=\"titulo-busca\">', $resultados);\n unset($resultados_filtro[0]);\n\n //Pega a quantidade total de páginas da consulta\n $aux1 = explode('<strong class=\"total\">', $resultados);\n $aux2 = explode('</strong>', $aux1[1]);\n $totalPaginas = $aux2[0];\n\n //Cria o array que será utilizado como retorno e informa na primeira posição qual a quantidade de páginas para o usuário navegar entre os resultados\n $compilado = array();\n $compilado[0] = array(\"totalpaginas\" => $totalPaginas);\n $i = 1;\n\n //Para cada resultado, separa-se o título e o código do anúncio para utilizar no outro endpoint \n foreach($resultados_filtro as $resultado){\n $resto = explode('</dd>', $resultado);\n $linha = $resto[0];\n\n $arrayCodigo = explode('/', $linha);\n $codigo = $arrayCodigo[1].\"/\".$arrayCodigo[2].\"/\".$arrayCodigo[3].\"/\".$arrayCodigo[4].\"/\".$arrayCodigo[5].\"/\";\n\n $aux1 = explode('<h4>', $linha);\n $aux2 = explode('</h4>', $aux1[1]);\n $titulo = strip_tags($aux2[0]);\n\n $compilado[$i] = array(\"codigo\"=> $codigo, \"titulo\" => $titulo);\n $i++;\n }\n\n return response()->json($compilado, 200);\n }", "function consultarEstudiantesSinPrueba(){\n $cadena_sql=$this->cadena_sql(\"estudiantesSinPrueba\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "public function listadoHospitalizacionesSinPagar(){\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT \n\t\t\t\t H.idHospitalizacion,\n\t\t\t\t H.fechaIngreso,\n\t\t\t\t DATE_FORMAT(H.horaIngreso, '%H:%i') AS hora,\n\t\t\t\t DATE_FORMAT(concat(H.fechaIngreso,' ',H.horaIngreso), '%Y-%m-%d %H:%i') As inicioHospitalizacion,\n\t\t\t\t DATE_FORMAT(concat(HA.fecha,' ',HA.hora), '%Y-%m-%d %H:%i') As alta, \n\t\t\t\t P.nombre AS nombrePaciente,\n\t\t\t\t PP.idPropietario,\n\t\t\t\t PP.identificacion,\n\t\t\t\t PP.nombre AS nombre,\n\t\t\t\t PP.apellido,\n\t\t\t\t U.nombre AS nombreMedico,\n\t\t\t\t U.apellido AS apellidoMedico\n\t\t\t\tFROM\n\t\t\t\t tb_hospitalizacion AS H\n\t\t\t\t INNER JOIN\n\t\t\t\t tb_hospitalizacionAlta AS HA ON HA.idHospitalizacion = H.idHospitalizacion\n\t\t\t\t INNER JOIN\n\t\t\t\t tb_mascotas AS P ON P.idMascota = H.idMascota\n\t\t\t\t INNER JOIN\n\t\t\t\t tb_propietarios AS PP ON PP.idPropietario = P.idPropietario\n\t\t\t\t INNER JOIN\n\t\t\t\t tb_usuarios AS U ON U.idUsuario = H.idUsuario\n\t\t\t\tWHERE\n\t\t\t\t NOT H.idHospitalizacion IN (SELECT \n\t\t\t\t idTipoDetalle\n\t\t\t\t FROM\n\t\t\t\t tb_pago_factura_caja_detalle\n\t\t\t\t WHERE\n\t\t\t\t tipoDetalle = 'Hospitalizacion'\n\t\t\t\t AND estado = 'Activo')\n\t\t\t\tORDER BY HA.fecha DESC , HA.hora \";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado;\t\t\n\t}", "function consultarNotas(){ \n $cadena_sql=$this->cadena_sql(\"notas\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "function consultar(){\n global $conexion, $data;\n $eliminado = $data[\"eliminado\"];\n $usuario = $data[\"usuario\"];\n $resultado= pg_query($conexion, \"SELECT * FROM decidim_users WHERE email='$usuario' AND id='$password'\");\n codificarJSON($resultado);\n }", "public function get_datos_pac_rec_ini($sucursal,$id_usuario){\n\n $conectar= parent::conexion();\n\t \n\t $sql= \"select v.id_ventas,v.sucursal,v.subtotal,v.numero_venta,p.nombres,p.telefono,p.id_paciente,v.tipo_pago,v.vendedor from ventas as v join pacientes as p where p.id_paciente=v.id_paciente and v.sucursal=? and v.id_usuario=? order by id_ventas DESC limit 1;\";\n\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $sucursal);\n $sql->bindValue(2, $id_usuario);\n $sql->execute();\n\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n\n}", "public function SelecionarServicosPorFilial($dados){\n\n\n $sql=\"select * from view_servico_filial where idFilial=\".$dados->idFilial;\n\n echo $sql;\n\n $conex = new Mysql_db();\n\n $PDO_conex = $conex->Conectar();\n\n $select = $PDO_conex->query($sql);\n\n $cont=0;\n\n while ($rs=$select->fetch(PDO::FETCH_ASSOC)) {\n $listFiliaisServicoServico[] = new servico_filial();\n\n $listFiliaisServicoServico[$cont]->idFilialServico= $rs['idFilialServico'];\n $listFiliaisServicoServico[$cont]->idFilial= $rs['idFilial'];\n $listFiliaisServicoServico[$cont]->nomeFilial= $rs['nomeFilial'];\n $listFiliaisServicoServico[$cont]->idServico= $rs['idServico'];\n $listFiliaisServicoServico[$cont]->nomeServico= $rs['nome'];\n $listFiliaisServicoServico[$cont]->descricao= $rs['descricao'];\n\n $cont+=1;\n\n }\n\n $conex->Desconectar();\n\n if (isset($listFiliaisServico)) {\n return $listFiliaisServico;\n }\n }", "public function AgregaPedidos()\n{\n\n\tif(empty($_SESSION[\"CarritoVentas\"]))\n\t\t\t\t{\n\t\t\t\t\techo \"3\";\n\t\t\t\t\texit;\n\n\t\t\t\t} \n\n\t$ver = $_SESSION[\"CarritoVentas\"];\n\tfor($i=0;$i<count($ver);$i++){ \n\n\t\t$sql = \"select existencia from productos where codproducto = '\".$ver[$i]['txtCodigo'].\"'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$existenciadb = $row['existencia'];\n\n\t\tif($ver[$i]['cantidad'] > $existenciadb) {\n\n\t\t\techo \"4\";\n\t\t\texit; }\n\t\t}\n\n\t$ven = $_SESSION[\"CarritoVentas\"];\n\tfor($i=0;$i<count($ven);$i++){\n\n\t$sql = \"select existencia from productos where codproducto = '\".$ven[$i]['txtCodigo'].\"'\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\t$existenciadb = $row['existencia'];\n\n\n\t\t$sql = \"select * from detalleventas where codventa = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array( $_POST[\"codventa\"], $ven[$i]['txtCodigo'] ) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num>0)\n\t\t{\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $row;\n\t\t\t}\n\t\t\t$codproducto = $pae[0]['codproducto'];\n\t\t\t$cantven = $pae[0]['cantventa'];\n\t\t\t$import = $pae[0]['importe'];\n\t\t\t$import2 = $pae[0]['importe2'];\n\n\t\t\t$sql = \" update detalleventas set \"\n\t\t\t.\" cantventa = ?, \"\n\t\t\t.\" importe = ?, \"\n\t\t\t.\" importe2 = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codventa = '\".$_POST[\"codventa\"].\"' and codproducto = '\".$ven[$i]['txtCodigo'].\"';\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $cantidad);\n\t\t\t$stmt->bindParam(2, $importe);\n\t\t\t$stmt->bindParam(3, $importe2);\n\n\t\t\t$cantidad = rount($ven[$i]['cantidad']+$cantven,2);\n\t\t\t$importe = strip_tags($ven[$i]['cantidad'] * $ven[$i]['precio2']+$import);\n\t\t\t$importe2 = strip_tags($ven[$i]['cantidad'] * $ven[$i]['precio']+$import2);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = '\".$ven[$i]['txtCodigo'].\"';\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$existencia = rount($existenciadb-$ven[$i]['cantidad'],2);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" statusproducto = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = '\".$ven[$i]['txtCodigo'].\"' and existencia = '0';\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $statusproducto);\n\t\t\t$statusproducto = \"INACTIVO\";\n\t\t\t$stmt->execute();\n\n################## REGISTRAMOS LOS DATOS DE PRODUCTOS EN KARDEX #################\n\t\t\t$query = \" insert into kardexproductos values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t$stmt->bindParam(1, $codventa);\n\t\t\t$stmt->bindParam(2, $codcliente);\n\t\t\t$stmt->bindParam(3, $codproducto);\n\t\t\t$stmt->bindParam(4, $movimiento);\n\t\t\t$stmt->bindParam(5, $entradas);\n\t\t\t$stmt->bindParam(6, $salidas);\n\t\t\t$stmt->bindParam(7, $devolucion);\n\t\t\t$stmt->bindParam(8, $stockactual);\n\t\t\t$stmt->bindParam(9, $preciounit);\n\t\t\t$stmt->bindParam(10, $costototal);\n\t\t\t$stmt->bindParam(11, $documento);\n\t\t\t$stmt->bindParam(12, $fechakardex);\n\n\t\t\t$codventa = strip_tags($_POST[\"codventa\"]);\n\t\t\t$codcliente = strip_tags($_POST[\"cliente\"]);\n\t\t\t$codproducto = strip_tags($ven[$i]['txtCodigo']);\n\t\t\t$movimiento = strip_tags(\"SALIDAS\");\n\t\t\t$entradas = strip_tags(\"0\");\n\t\t\t$salidas = rount($ven[$i]['cantidad'],2);\n\t\t\t$devolucion = strip_tags(\"0\");\n\t\t\t$stockactual = rount($existenciadb-$ven[$i]['cantidad'],2); \n\t\t\t$preciounit = strip_tags($ven[$i]['precio2']);\n\t\t\t$costototal = strip_tags($ven[$i]['precio2'] * $ven[$i]['cantidad']);\n\t\t\t$documento = strip_tags(\"VENTA - FACTURA: \".$codventa);\n\t\t\t$fechakardex = strip_tags(date(\"Y-m-d h:i:s\"));\n\t\t\t$stmt->execute();\n\n\n############## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ###############\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array( $ven[$i]['txtCodigo'] ) );\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto IN ('\".$ven[$i]['txtCodigo'].\"')\";\n\n\t $array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\n\t\t\t$codproducto = $row['codproducto'];\n\t\t\t$codingrediente = $row['codingrediente'];\n\t\t\t$cantracion = $row['cantracion'];\n\t\t\t$cantingrediente = $row['cantingrediente'];\n\t\t\t$costoingrediente = $row['costoingrediente'];\n\n\n\t\t\t$update = \" update ingredientes set \"\n\t\t\t.\" cantingrediente = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codingrediente = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($update);\n\t\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t\t$racion = rount($cantracion*$cantidad,2);\n\t\t\t$cantidadracion = rount($cantingrediente-$racion,2);\n\t\t\t$stmt->execute();\n\n\n##################### REGISTRAMOS LOS DATOS DE INGREDIENTES EN KARDEX #####################\n\t\t\t\t\t$query = \" insert into kardexingredientes values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t\t\t$stmt->bindParam(1, $codventa);\n\t\t\t\t\t$stmt->bindParam(2, $codcliente);\n\t\t\t\t\t$stmt->bindParam(3, $codproducto);\n\t\t\t\t\t$stmt->bindParam(4, $codingrediente);\n\t\t\t\t\t$stmt->bindParam(5, $movimientoing);\n\t\t\t\t\t$stmt->bindParam(6, $entradasing);\n\t\t\t\t\t$stmt->bindParam(7, $salidasing);\n\t\t\t\t\t$stmt->bindParam(8, $stockactualing);\n\t\t\t\t\t$stmt->bindParam(9, $preciouniting);\n\t\t\t\t\t$stmt->bindParam(10, $costototaling);\n\t\t\t\t\t$stmt->bindParam(11, $documentoing);\n\t\t\t\t\t$stmt->bindParam(12, $fechakardexing);\n\n\t\t\t\t\t$codcliente = strip_tags($_POST[\"cliente\"]);\n\t\t\t\t\t$codproducto = strip_tags($codproducto);\n\t\t\t\t\t$codingrediente = strip_tags($codingrediente);\n\t\t\t\t\t$movimientoing = strip_tags(\"SALIDAS\");\n\n\t\t\t\t\t$entradasing = strip_tags(\"0\");\n\t\t\t\t\t$salidasing = rount($cantracion*$cantidad,2);\n\t\t\t\t\t$stockactualing = rount($cantingrediente-$racion,2);\n\t\t\t\t\t$preciouniting = strip_tags($costoingrediente);\n\t\t\t\t\t$costototaling = strip_tags($costoingrediente * $cantidad);\n\n\t\t\t\t\t$documentoing = strip_tags(\"VENTA - FACTURA: \".$codventa);\n\t\t\t\t\t$fechakardexing = strip_tags(date(\"Y-m-d h:i:s\"));\n\t\t\t\t\t$stmt->execute();\n\t##################### REGISTRAMOS LOS DATOS DE INGREDIENTES EN KARDEX ###################\n\n\t\t }\n\n}\n############## FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ###########\t\n\n\n\t\t}\n\t\telse\n\t\t{\n\n\n\t\t\t$query = \" insert into detalleventas values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t$stmt->bindParam(1, $codventa);\n\t\t\t$stmt->bindParam(2, $codcliente);\n\t\t\t$stmt->bindParam(3, $codproducto);\n\t\t\t$stmt->bindParam(4, $producto);\n\t\t\t$stmt->bindParam(5, $codcategoria);\n\t\t\t$stmt->bindParam(6, $cantidad);\n\t\t\t$stmt->bindParam(7, $preciocompra);\n\t\t\t$stmt->bindParam(8, $precioventa);\n\t\t\t$stmt->bindParam(9, $ivaproducto);\n\t\t\t$stmt->bindParam(10, $importe);\n\t\t\t$stmt->bindParam(11, $importe2);\n\t\t\t$stmt->bindParam(12, $fechadetalleventa);\n\t\t\t$stmt->bindParam(13, $statusdetalle);\n\t\t\t$stmt->bindParam(14, $codigo);\n\n\t\t\t$codventa = strip_tags($_POST[\"codventa\"]);\n\t\t\t$codcliente = strip_tags($_POST[\"cliente\"]);\n\t\t\t$codproducto = strip_tags($ven[$i]['txtCodigo']);\n\t\t\t$producto = strip_tags($ven[$i]['descripcion']);\n\t\t\t$codcategoria = strip_tags($ven[$i]['tipo']);\n\t\t\t$cantidad = rount($ven[$i]['cantidad'],2);\n\t\t\t$preciocompra = strip_tags($ven[$i]['precio']);\n\t\t\t$precioventa = strip_tags($ven[$i]['precio2']);\n\t\t\t$ivaproducto = strip_tags($ven[$i]['ivaproducto']);\n\t\t\t$importe = strip_tags($ven[$i]['cantidad'] * $ven[$i]['precio2']);\n\t\t\t$importe2 = strip_tags($ven[$i]['cantidad'] * $ven[$i]['precio']);\n\t\t\t$fechadetalleventa = strip_tags(date(\"Y-m-d h:i:s\"));\n\t\t\t$statusdetalle = \"1\";\n\t\t\t$codigo = strip_tags($_SESSION['codigo']);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = '\".$ven[$i]['txtCodigo'].\"';\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$existencia = rount($existenciadb-$ven[$i]['cantidad'],2);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" statusproducto = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = '\".$ven[$i]['txtCodigo'].\"' and existencia = '0';\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $statusproducto);\n\t\t\t$statusproducto = \"INACTIVO\";\n\t\t\t$stmt->execute();\n\n##################### REGISTRAMOS LOS DATOS DE PRODUCTOS EN KARDEX ###################\n\t\t\t$query = \" insert into kardexproductos values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t$stmt->bindParam(1, $codventa);\n\t\t\t$stmt->bindParam(2, $codcliente);\n\t\t\t$stmt->bindParam(3, $codproducto);\n\t\t\t$stmt->bindParam(4, $movimiento);\n\t\t\t$stmt->bindParam(5, $entradas);\n\t\t\t$stmt->bindParam(6, $salidas);\n\t\t\t$stmt->bindParam(7, $devolucion);\n\t\t\t$stmt->bindParam(8, $stockactual);\n\t\t\t$stmt->bindParam(9, $preciounit);\n\t\t\t$stmt->bindParam(10, $costototal);\n\t\t\t$stmt->bindParam(11, $documento);\n\t\t\t$stmt->bindParam(12, $fechakardex);\n\n\t\t\t$codcliente = strip_tags($_POST[\"cliente\"]);\n\t\t\t$codproducto = strip_tags($ven[$i]['txtCodigo']);\n\t\t\t$movimiento = strip_tags(\"SALIDAS\");\n\t\t\t$entradas = strip_tags(\"0\");\n\t\t\t$salidas =rount($ven[$i]['cantidad'],2);\n\t\t\t$devolucion = strip_tags(\"0\");\n\t\t\t$stockactual = rount($existenciadb-$ven[$i]['cantidad'],2);\n\t\t\t$preciounit = strip_tags($ven[$i]['precio2']);\n\t\t\t$costototal = strip_tags($ven[$i]['precio2'] * $ven[$i]['cantidad']);\n\t\t\t$documento = strip_tags(\"VENTA - FACTURA: \".$codventa);\n\t\t\t$fechakardex = strip_tags(date(\"Y-m-d h:i:s\"));\n\t\t\t$stmt->execute();\t\n\n\n############### CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array( $ven[$i]['txtCodigo'] ) );\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto IN ('\".$ven[$i]['txtCodigo'].\"')\";\n\n\t $array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\n\t\t\t$codproducto = $row['codproducto'];\n\t\t\t$codingrediente = $row['codingrediente'];\n\t\t\t$cantracion = $row['cantracion'];\n\t\t\t$cantingrediente = $row['cantingrediente'];\n\t\t\t$costoingrediente = $row['costoingrediente'];\n\n\n\t\t\t$update = \" update ingredientes set \"\n\t\t\t.\" cantingrediente = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codingrediente = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($update);\n\t\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t\t$racion = rount($cantracion*$cantidad,2);\n\t\t\t$cantidadracion = rount($cantingrediente-$racion,2);\n\t\t\t$stmt->execute();\n\n\n##################### REGISTRAMOS LOS DATOS DE INGREDIENTES EN KARDEX #####################\n$query = \" insert into kardexingredientes values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t\t\t$stmt->bindParam(1, $codventa);\n\t\t\t\t\t$stmt->bindParam(2, $codcliente);\n\t\t\t\t\t$stmt->bindParam(3, $codproducto);\n\t\t\t\t\t$stmt->bindParam(4, $codingrediente);\n\t\t\t\t\t$stmt->bindParam(5, $movimientoing);\n\t\t\t\t\t$stmt->bindParam(6, $entradasing);\n\t\t\t\t\t$stmt->bindParam(7, $salidasing);\n\t\t\t\t\t$stmt->bindParam(8, $stockactualing);\n\t\t\t\t\t$stmt->bindParam(9, $preciouniting);\n\t\t\t\t\t$stmt->bindParam(10, $costototaling);\n\t\t\t\t\t$stmt->bindParam(11, $documentoing);\n\t\t\t\t\t$stmt->bindParam(12, $fechakardexing);\n\n\t\t\t\t\t$codcliente = strip_tags($_POST[\"cliente\"]);\n\t\t\t\t\t$codproducto = strip_tags($codproducto);\n\t\t\t\t\t$codingrediente = strip_tags($codingrediente);\n\t\t\t\t\t$movimientoing = strip_tags(\"SALIDAS\");\n\n\t\t\t\t\t$entradasing = strip_tags(\"0\");\n\t\t\t\t\t$salidasing = rount($cantracion*$cantidad,2);\n\t\t\t\t\t$stockactualing = rount($cantingrediente-$racion,2);\n\t\t\t\t\t$preciouniting = strip_tags($costoingrediente);\n\t\t\t\t\t$costototaling = strip_tags($costoingrediente * $cantidad);\n\n\t\t\t\t\t$documentoing = strip_tags(\"VENTA - FACTURA: \".$codventa);\n\t\t\t\t\t$fechakardexing = strip_tags(date(\"Y-m-d h:i:s\"));\n\t\t\t\t\t$stmt->execute();\n##################### REGISTRAMOS LOS DATOS DE INGREDIENTES EN KARDEX ###################\n\n\t\t }\n\n}\n############# FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS #############\t\n\n\t\t}\n\t}\n\n\t$sql4 = \"select * from ventas where codventa = ? \";\n\t$stmt = $this->dbh->prepare($sql4);\n\t$stmt->execute( array($_POST[\"codventa\"]) );\n\t$num = $stmt->rowCount();\n\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$paea[] = $row;\n\t\t}\n\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\n\n\t\t$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array($_POST[\"codventa\"]));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$preciocompraiva = $p[0][\"preciocompra\"];\n\t\t$importeiva = $p[0][\"importe\"];\n\t\t$importe2iva = $p[0][\"importe2\"];\n\n\t\t$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array($_POST[\"codventa\"]));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $row;\n\t\t\t}\n\t\t\t$preciocompra = $row[\"preciocompra\"];\n\t\t\t$importe = $row[\"importe\"];\n\t\t\t$importe2 = $row[\"importe2\"];\t\t\n\n\t\t\t$sql = \" update ventas set \"\n\t\t\t.\" subtotalivasive = ?, \"\n\t\t\t.\" subtotalivanove = ?, \"\n\t\t\t.\" totalivave = ?, \"\n\t\t\t.\" totaldescuentove = ?, \"\n\t\t\t.\" totalpago= ?, \"\n\t\t\t.\" totalpago2= ?, \"\n\t\t\t.\" observaciones= ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codventa = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $subtotalivasive);\n\t\t\t$stmt->bindParam(2, $subtotalivanove);\n\t\t\t$stmt->bindParam(3, $totaliva);\n\t\t\t$stmt->bindParam(4, $totaldescuentove);\n\t\t\t$stmt->bindParam(5, $total);\n\t\t\t$stmt->bindParam(6, $total2);\n\t\t\t$stmt->bindParam(7, $observaciones);\n\t\t\t$stmt->bindParam(8, $codventa);\n\n\t\t\t$subtotalivasive= rount($importeiva,2);\n\t\t\t$subtotalivanove= rount($importe,2);\n\t\t\t$totaliva= rount($subtotalivasive*$iva,2);\n\t\t\t$tot= rount($subtotalivasive+$subtotalivanove+$totaliva,2);\n\t\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t\t$total= rount($tot-$totaldescuentove,2);\n\t\t\t$total2= rount($preciocompra,2);\nif (strip_tags(isset($_POST['observaciones']))) { $observaciones = strip_tags($_POST['observaciones']); } else { $observaciones =''; }\n\t\t\t$codventa = strip_tags($_POST[\"codventa\"]);\n\t\t\t$stmt->execute();\n\n###### AQUI DESTRUIMOS TODAS LAS VARIABLES DE SESSION QUE RECIBIMOS EN CARRITO DE VENTAS ######\n\t\t\tunset($_SESSION[\"CarritoVentas\"]);\n\n\necho \"<div class='alert alert-success'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<span class='fa fa-check-square-o'></span> LOS DETALLES FUERON AGREGADOS A LA \".$_POST[\"nombremesa\"].\", EXITOSAMENTE <a href='reportepdf?codventa=\".base64_encode($codventa).\"&tipo=\".base64_encode(\"TICKETCOMANDA\").\"' class='on-default' data-placement='left' data-toggle='tooltip' data-original-title='Imprimir Comanda' target='_black'><strong>IMPRIMIR COMANDA</strong></a>\";\necho \"</div>\";\n\necho \"<script>window.open('reportepdf?codventa=\".base64_encode($codventa).\"&tipo=\".base64_encode(\"TICKETCOMANDA\").\"', '_blank');</script>\";\nexit;\n\n\t\t}", "function find_all_secretaria($pdo) {\r\n $sql = \"select * FROM secretaria WHERE ativo = 0 order by id_secretaria\";\r\n $query = $pdo->prepare($sql);\r\n $query->execute();\r\n return $query;\r\n}", "function listar_historial_pedido($id){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t\n\t\t$sql=\"SELECT * FROM historial WHERE pertenece_his='$id' ORDER BY id_his ASC\";\n\t\t\n\t\t$consulta=mysql_query($sql);\n\t\t$num=1;\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$resultado['numero']=$num++;\n\t\t\t$resultado['fecha_his']=$this->convertir_fecha($resultado['fecha_his']);\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}", "public function consulta_asistencia()\n {\n $fecha_reporte = cambiaf_a_mysql($this->txt_fecha_desde->Text);\n $dir = $this->drop_direcciones->SelectedValue;\n $cod_organizacion = usuario_actual('cod_organizacion');\n\n // se obtienen las justificaciones del día seleccionado\n $sql=\"SELECT (p.cedula) as cedula_just, p.nombres, p.apellidos, j.codigo, jd.fecha_desde, jd.hora_desde,\n jd.fecha_hasta, jd.hora_hasta, jd.observaciones, jd.lun, jd.mar, jd.mie, jd.jue, jd.vie,\n tf.descripcion as descripcion_falta, tj.descripcion as descripcion_tipo_justificacion\n\t\t\t\t\t FROM asistencias.justificaciones as j, asistencias.justificaciones_dias as jd,\n\t\t\t\t\t\t asistencias.justificaciones_personas as jp, organizacion.personas as p, organizacion.personas_nivel_dir as n, asistencias.tipo_faltas tf, asistencias.tipo_justificaciones tj\n\t\t\t\t\t\tWHERE ((p.cedula = jp.cedula) and\n\t\t\t\t\t\t (p.cedula = n.cedula) and (jd.codigo_tipo_falta = tf.codigo) and (tj.id = jd.codigo_tipo_justificacion) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t (jd.fecha_desde <= '$fecha_reporte') and\n\t\t\t\t\t\t\t (jd.fecha_hasta >= '$fecha_reporte') and\n\t\t\t\t\t\t\t (j.estatus='1') and (j.codigo=jd.codigo_just) and (j.codigo=jp.codigo_just))\n\t\t\t\t\t\tORDER BY p.nombres, p.apellidos, jp.cedula \";\n $this->justificaciones=cargar_data($sql,$this); \n\n // se obtiene el horario vigente para la fecha seleccionada\n $this->horario_vigente = obtener_horario_vigente($cod_organizacion,$fecha_reporte,$this);\n \n // se realizan las consultas para mostrar los listados\n // Se consultan los asistentes\n $sql=\"SELECT (p.cedula) as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre,\n e.cedula, e.fecha, MIN(e.hora) as entrada, MAX(e.hora) as salida\n FROM asistencias.entrada_salida as e, organizacion.personas as p, organizacion.personas_nivel_dir as n\n WHERE ((p.cedula = e.cedula) and\n (p.cedula = n.cedula) and\n (n.cod_direccion LIKE '$dir%') and\n (p.fecha_ingreso <= '$fecha_reporte') and\n (e.fecha <= '$fecha_reporte') and\n (e.fecha >= '$fecha_reporte'))\n GROUP BY e.cedula\n ORDER BY entrada, p.nombres, p.apellidos \";\n $this->asistentes=cargar_data($sql,$this);\n $this->ind_asistentes = count($this->asistentes);\n\n // se consultan los inasistentes\n $sql2=\"SELECT p.cedula as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre\n\t\t\t\t\t\t\t\t\t FROM organizacion.personas as p, asistencias.personas_status_asistencias as s,\n\t\t\t\t\t\t\t\t\t organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t WHERE ((s.status_asistencia = '1') and\n\t\t\t\t\t\t\t\t\t \t\t (s.cedula = p.cedula) and\n\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t (p.cedula not in\n\t\t\t\t\t\t\t\t\t (SELECT e.cedula\n\t\t\t\t\t\t\t\t\t\t FROM asistencias.entrada_salida as e, organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t\t \t WHERE ((e.fecha = '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%'))\n\t\t\t\t\t\t\t\t\t\t\t GROUP BY e.cedula)))\n\t\t\t\t\t\t\t\t\t ORDER BY p.nombres, p.apellidos\";\n $this->inasistentes=cargar_data($sql2,$this);\n\n\n // Se consultan los asistentes para comparar inconsistencia de horas en el marcado\n // Si le falta hora\n $inconsistentes = array();\n foreach($this->asistentes as $arreglo){\n \n $sql2=\"SELECT COUNT(*) as n_horas FROM asistencias.entrada_salida as e\n\t\t\t WHERE e.fecha = '$fecha_reporte' AND e.cedula = '$arreglo[cedula_integrantes]' \";\n $resultado2=cargar_data($sql2,$this);\n if(!empty($resultado2)){\n if ($resultado2[0][n_horas]%2!=0) {//impar\n array_unshift($inconsistentes, array('cedula'=>$arreglo[cedula_integrantes], 'nombre'=>$arreglo[nombre],'salida'=>$arreglo[salida]));\n }//fin si\n }//fin si\n }//fin each\n\n\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n //$this->DataGrid_fj->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n if(!empty($inconsistentes)){\n $this->DataGrid_fh->DataSource=$inconsistentes;\n $this->DataGrid_fh->dataBind();\n }\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n $this->DataGrid->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n $this->DataGrid->DataSource=$this->asistentes;\n $this->DataGrid->dataBind();\n\n\n $this->DataGrid_ina->Caption=\"Inasistentes el d&iacute;a \".$this->txt_fecha_desde->Text;\n $this->DataGrid_ina->DataSource=$this->inasistentes;\n $this->DataGrid_ina->dataBind();\n\n /* Por un error que no supe identificar, el cual suma un numero adicional a la variable\n * de inasistentes no justificados, he tenido que sacarla del procedimiento donde normalmente\n * se contaba y tuve que realizarla por resta en esta sección.\n */\n $this->ind_inasistentes_no_just = count($this->inasistentes) - $this->ind_inasistentes_si_just;\n\n $this->Repeater->DataSource = $this->justificaciones;\n $this->Repeater->dataBind();\n\n $xale=rand(100,99999);\n // Se realiza la construcción del gráfico para indicadores\n\n $chart = new PieChart();\n $dataSet = new XYDataSet();\n if ($this->ind_asistentes>=1) {$dataSet->addPoint(new Point(\"Funcionarios Asistentes: (\".$this->ind_asistentes.\")\", $this->ind_asistentes));};\n if ($this->ind_inasistentes_no_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes NO JUSTIFICADOS: (\".$this->ind_inasistentes_no_just.\")\", $this->ind_inasistentes_no_just));};\n if ($this->ind_inasistentes_si_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes JUSTIFICADOS: (\".$this->ind_inasistentes_si_just.\")\", $this->ind_inasistentes_si_just));};\n $chart->setDataSet($dataSet);\n $chart->setTitle(\"Porcentajes de Asistencias / Inasistencias del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_01.png\");\n $chart->render(\"imagenes/temporales/\".$xale.\"_01.png\");\n $this->grafico1->ImageUrl = \"imagenes/temporales/\".$xale.\"_01.png\";\n\n\n $chart2 = new PieChart();\n $dataSet2 = new XYDataSet();\n $this->ind_asistentes_no_retrasados=$this->ind_asistentes-$this->ind_asistentes_tarde_no_just-$this->ind_asistentes_tarde_si_just;\n if ($this->ind_asistentes_no_retrasados>=1) {$dataSet2->addPoint(new Point(\"Puntuales: (\".$this->ind_asistentes_no_retrasados.\")\", $this->ind_asistentes_no_retrasados));};\n if ($this->ind_asistentes_tarde_no_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales NO JUSTIFICADOS: (\".$this->ind_asistentes_tarde_no_just.\")\", $this->ind_asistentes_tarde_no_just));};\n if ($this->ind_asistentes_tarde_si_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales JUSTIFICADOS: (\".$this->ind_asistentes_tarde_si_just.\")\", $this->ind_asistentes_tarde_si_just));};\n $chart2->setDataSet($dataSet2);\n $chart2->setTitle(\"Porcentajes de Retrasos del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_02.png\");\n $chart2->render(\"imagenes/temporales/\".$xale.\"_02.png\");\n $this->grafico2->ImageUrl = \"imagenes/temporales/\".$xale.\"_02.png\";\n\n // si la consulta de asistentes tiene resultados se habilita la impresion, sino, se deshabilita\n if (!empty($this->asistentes)) {$this->btn_imprimir->Enabled = true;} else {$this->btn_imprimir->Enabled = false;}\n\n }", "function consultaJuegoUsuario($Usuario_idUsuario, $Juego_idJuego){\n $conexion = openBD();\n\n $sentenciaText = \"select * from usuario_has_juego where Usuario_idUsuario=$Usuario_idUsuario and Juego_idJuego=$Juego_idJuego\";\n\n $sentencia =$conexion->prepare($sentenciaText);\n $sentencia->execute();\n $resultado = $sentencia->fetch();\n $conexion = closeBD();\n\n \n\n return $resultado;\n\n\n }", "public function MediosPagosId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" select * from mediospagos where codmediopago = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"formapagove\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "function listarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_sel';\n\t\t$this->transaccion='GM_DET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_analisis_porque_det','int4');\n\t\t$this->captura('id_analisis_porque','int4');\n\t\t$this->captura('solucion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porque','varchar');\n\t\t$this->captura('respuesta','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function contar(){\n $sql = \"Select (select count(cita.id) from cita) as Citas,( select count(medico.id) from medico) as Medicos, (select count(paciente.id) from paciente)as Pacientes\";\n $conexion = new Conexion();\n return $conexion->executeQuery($sql)->fetch_object();\n }", "private function query_ordenes_servicios($co_usuario){\n\n \t$respuesta = false;\n\n\t\ttry {\n\n\t\t\t$this->db->select('cao_os.co_os');\n\t\t\t$this->db->select('cao_os.co_usuario');\n\t\t\t$this->db->from('cao_os');\n\t\t\t$this->db->where('cao_os.co_os is NOT NULL', NULL, FALSE);\n\t\t\t$this->db->where_in('cao_os.co_usuario',$co_usuario);\n\t\t\t$this->db->order_by(\"cao_os.co_usuario\", \"asc\");\t\t\t\t\n\n\t\t\t$query = $this->db->get();\n\n\t\t if ($query && $query->num_rows() > 0)\n\t\t {\n\t\t\t\t$respuesta = $query->result_array();\n\n\t\t }else{\n\n\t\t throw new Exception('Error al intentar listar las ordenes de servicio del consultor');\n\t\t\t log_message('error', 'Error al intentar listar las ordenes de servicio del consultor');\t\t\t \n\n\t\t $respuesta = false;\t\t\t\t\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\n\t\t\t$respuesta = false;\n\t\t}\t\t\t\n\n\t\treturn $respuesta;\n }", "public static function obtenerVehiculos()\n {\n $consulta = \"SELECT * FROM vehiculos WHERE estado=1 ORDER BY id_vehiculo\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "public function Select_pendentes(){\n\t\t\t$sql=\"SELECT p.*, e.* FROM tbl_paciente AS p INNER JOIN tbl_endereco AS e ON p.id_endereco = e.id_endereco WHERE status = 0;\";\n\n\t\t\t//Instancio o banco e crio uma variavel\n\t\t\t$conex = new Mysql_db();\n\n\t\t\t/*Chama o método para conectar no banco de dados e guarda o retorno da conexao\n\t\t\tna variavel que $PDO_conex*/\n\t\t\t$PDO_conex = $conex->Conectar();\n\n\t\t\t//Executa o select no banco de dados e guarda o retorno na variavel select\n\t\t\t$select = $PDO_conex->query($sql);\n\n\t\t\t//Contador\n\t\t\t$cont = 0;\n\n\t\t\t//Estrutura de repetição para pegar dados\n\n $lista_pacientes = array();\n\n\t\t\twhile ($rs = $select->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t#Cria um array de objetos na classe contatos\n\n //var_dump($rs);exit();\n\n\t\t\t\t$lista_paciente[] = $rs;\n\n\t\t\t\t// Soma mais um no contador\n\t\t\t\t$cont+=1;\n\t\t\t}\n\n\t\t\t$conex::Desconectar();\n\n\t\t\t//Apenas retorna o $list_contatos se existir dados no banco de daos\n\t\t\tif (isset($lista_paciente)) {\n\t\t\t\t# code...\n\t\t\t\treturn $lista_paciente;\n\t\t\t}\n }", "public function BuscarVentasCajas() \n{\n\tself::SetNames();\n\t$sql =\"SELECT detalleventas.codventa, cajas.nrocaja, ventas.idventa, ventas.codcliente, ventas.codcaja, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, SUM(detalleventas.cantventa) as articulos FROM (detalleventas LEFT JOIN ventas ON detalleventas.fechadetalleventa=ventas.fechaventa) \n\tLEFT JOIN cajas ON cajas.codcaja=ventas.codcaja LEFT JOIN clientes ON ventas.codcliente=clientes.codcliente WHERE ventas.codcaja = ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? GROUP BY detalleventas.codventa\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim($_GET['codcaja']));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(3, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN VENTAS DE PRODUCTOS PARA LA CAJA Y EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function ObtieneDiaEntrega($NumPedido,$CodArti){\n\t\tif($this->con->conectar()==true){\n\t\treturn mysql_query(\"SELECT * FROM `DET_PedidosSolicitados` WHERE `NumPedido` = '\" .$NumPedido. \"' and `NumPedido` = '\" .$CodArti. \"'\");\n\t\t}\n\t}", "function getAllPedidos()\n {\n $query = $this->db->prepare(\"SELECT * FROM pedido\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "function cuantos_son($where)\n\t{\n\t\t//calculo cuantos son..\n $this->sql=\"SELECT count(*) FROM contactos WHERE 1=1 \".$where.\";\";\n $rs2=$this->procesar_query($this->sql);\n $this->num_rows=$rs2[0][0];\n ////////////////////////////////////////////\n\t}", "function listar_acciones_procesos($objeto){\n\n\t\t$sql = \"SELECT\n\t\t\t\t\t\t\tid, nombre, tiempo_hrs\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tprd_acciones\n\t\t\t\t\t\tORDER BY id\";\n\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "public function obtenerViajesplus();", "public function listar()\n {\n $sql = \"SELECT CO.idconsulta, US.nombre, US.area, US.email, CO.problema, CO.tipo_problema,CO.estado, CO.tipo_estado,date(CO.fecha_hora) as fecha \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado IN ('Pendiente','En Proceso') AND CO.condicion=''\";\n return ejecutarConsulta($sql);\n\n }", "public function consultarTodos() {\n $query = $this->gestor->getRepository('Grupo');\n $profesores = $query->findAll();\n $data_to_json = array();\n foreach($profesores as $item){\n $data_to_json[] = $item->getArray();\n }\n if ( !is_null($profesores) ) {\n header(\"HTTP/1.1 200 OK\");\n return (($data_to_json)); \n } else {\n header(\"HTTP/1.1 404 Not found\");\n return '{\"response\":\"error\"}'; \n }\n }", "public function BuscarProductosVendidos() \n{\n\tself::SetNames();\n\t$sql =\"SELECT productos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, categorias.nomcategoria, SUM(detalleventas.cantventa) as cantidad FROM (productos LEFT JOIN detalleventas ON productos.codproducto=detalleventas.codproducto) \n\tLEFT JOIN categorias ON categorias.codcategoria=productos.codcategoria WHERE DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') <= ? GROUP BY detalleventas.codproducto, detalleventas.precioventa ORDER BY productos.codproducto ASC\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN PRODUCTOS FACTURADOS PARA EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function pesquisar($objeto) {\n\n $linhas = \" and 1=1 and \";\n if( $objeto->dataInicial != \"\" and $objeto->dataFinal != \"\" ){\n $linhas .= \"r.data BETWEEN '\" .$this->query->dateEua($objeto->dataInicial).\"'\";\n $linhas .= \" and '\" .$this->query->dateEua($objeto->dataFinal).\"'\";\n $linhas .= \" and \";\n }\n \n if( $objeto->hora != \"\" ){\n $linhas .= \"r.hora = '\".$objeto->hora.\"'\";\n $linhas .= \" and \";\n }\n \n if( $objeto->pesquisa != \"\" ){\n $linhas .= \"r.idTurma like '%\".$objeto->pesquisa.\"%'\";\n $linhas .= \" or \";\n $linhas .= \"r.idSala like '%\".$objeto->pesquisa.\"%'\";\n $linhas .= \" or \";\n $linhas .= \"r.obs like '%\".$objeto->pesquisa.\"%'\";\n $linhas .= \" and \";\n }\n \n $linhas .= \" r.status = 0 \";\n \n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora,\n d.nome AS DisciplinaNome,\n c.nome AS cursoNome,\n r.obs\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n INNER JOIN\n disciplinas d\n ON\n d.idDisciplina = t.idDisciplina\n INNER JOIN\n cursos c\n ON\n c.idCurso = d.idCurso\n WHERE\n r.idPessoa = '$objeto->idPessoa'\n $linhas\n \";\n\n \n\n $query = $this->query->setQuery($sql);\n return $query;\n }", "public function consultarListado()\n {\n $sql = \"SELECT * FROM examen\";\n $execute = $this->con->query($sql);\n $request = $execute->fetchall(PDO::FETCH_ASSOC);\n return $request; \n }", "function consultarListadoPesadasRecolector($idOferta, $cedula)\n{\n\t$sql = \"SELECT pesadas.fecha, pesadas.kilos, ofertas.valorpago as valorkilo, (pesadas.kilos \t* ofertas.valorpago ) as valorpesada \n\t\t\tFROM pesadas JOIN ofertas ON pesadas.idoferta = ofertas.id \n\t\t\tWHERE pesadas.idoferta = {$idOferta} AND pesadas.idrecolector = (SELECT usuarios.id FROM usuarios WHERE usuarios.cedula = '{$cedula}')\";\n\tleerRegistro($sql);\n}", "public static function verCompetencia(){\n\n $rel=Conexion::conectar('localhost','proyecto','root','');\n $resultado=$rel->prepare(\"SELECT * FROM resultados_aprendizaje\");\n $resultado->execute();\n\n return $resultado;\n }", "public function getHijos($id_contenido){\r\n\t\t$sql = 'SELECT c1.* '.\r\n\t\t\t'FROM contenidos c1 '.\r\n\t\t\t'WHERE padre = ? '.\r\n\t\t\t'ORDER BY c1.nombre ASC ';\r\n\t\t \r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($id_contenido);\r\n\t\t \r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function listadoPedidos(){\n $pedido=new Pedido();\n\n //Conseguimos todos los usuarios\n $allPedido=$pedido->getAll();\n print_r(json_encode($allPedido));\n //echo $allClientes\n }", "public function consultaRetorno($id_retorno, $primeiraPalavraCliente, $ultimoRetorno, $consultaUltima)\n {\n $this->logSis('DEB', 'Entrou no Retorno. idRetorno: ' . $id_retorno . ' Palavra: ' . $primeiraPalavraCliente . ' UltimoRetorno: ' . $ultimoRetorno . ' Tipo da consulta: ' . $consultaUltima['tipo']);\n\n include(\"dados_conexao.php\");\n include_once(\"horarios.php\");\n include_once(\"servicos.php\");\n\n\n\n if ($consultaUltima['tipo'] == 8) { //( Verifica se o retorno trata-se de uma marcação de horário\n\n\n //( Verifica qual o último subtipo para pesquisar o próximo retorno de acordo com o próximo subtipo\n if ($consultaUltima['subtipo'] == 'mes') {\n $proximoSubtipo = 'dia';\n } else if ($consultaUltima['subtipo'] == 'dia') {\n $proximoSubtipo = 'hora';\n } else if ($consultaUltima['subtipo'] == 'hora') { //( Envia a pergunta de confirmação\n $this->logSis('DEB', 'Entrou no subtipo Hora');\n if (is_numeric($primeiraPalavraCliente)) {\n $this->logSis('DEB', 'É número');\n\n //( Decodifica o Json que foi salvo no BD\n $opcoes = json_decode($this->opcoesVariaveis, true);\n $this->logSis('DEB', 'opcoes->' . print_r($opcoes, true));\n\n $indice = array_search($primeiraPalavraCliente, array_column($opcoes, 'ind'));\n $idHorario = $opcoes[$indice]['id'];\n $this->logSis('DEB', 'idHorario->' . $idHorario);\n\n\n //( Consulta o horário encontrado pra ver se está disponível ainda\n\n $result = fctConsultaParaArray(\n 'ConsultaHorario',\n \"SELECT *, DATE_FORMAT(horario, '%d/%m/%Y %H:%i') AS hora_formatada FROM tbl_horarios WHERE status = 1 AND horario >= NOW() AND id_horario = $idHorario\",\n array('hora_formatada')\n );\n $this->logSis('DEB', 'result->' . print_r($result, true));\n\n if ($result == false) {\n //& VEr se realmente vai ser possível escolher um outro horário\n //& Sugestão aqui seria voltar ao menu anterior\n $this->sendMessage('MensageErro', $this->numero, \"Esse horário não está mais disponível, favor escolher uma outra data.\", \"\");\n } else {\n $horaFormatada = $result[0]['hora_formatada'];\n $texto = \"CONFIRME O HORÁRIO\\n\";\n $texto .= \"*$horaFormatada*\\n\\n\";\n $texto .= \"Você confirma esse horário?\";\n\n $arrayRetorno = array(\n \"modo\" => 9, //tipo confirmação\n \"subtipo\" => 'horario',\n \"id_retorno\" => '',\n \"opcoes\" => $idHorario\n );\n\n //& Organizar o array retorno\n $this->confirmacao($texto, $arrayRetorno);\n }\n } else {\n $this->sendMessage('MensageErro', $this->numero, \"Responda somente com o número referente à opção desejada.\", \"\");\n }\n }\n\n //( Faz a pesquisa do retorno\n $sql = \"SELECT * FROM tbl_retornos WHERE tipo = 8 AND coringa = '$proximoSubtipo'\";\n } else if ($consultaUltima['tipo'] == 9) { //( Uma solicitação de confirmação\n\n //( Verifica que é uma confirmação de horário \n if ($consultaUltima['subtipo'] == 'horario') {\n\n //( Verifica se tem SIM ou NÃO na mensagem do cliente\n $nao = $this->verficaPalavras('', $this->mensagem, array('não', 'nao', 'NÃO', 'Nao', 'NAO', 'NO', 'no'));\n $sim = $this->verficaPalavras('', $this->mensagem, array('sim', 'Sim', 'Si', 'si', 'SI', 'sin', 'Sin', 'SIN', 'SIM'));\n\n\n if ($nao == 1) { //( Se tiver NÃO, é enviada o MENU RAIZ \n $this->envioMenuRaiz($this->numero, \"*OPERAÇÃO CANCELADA*\\n\\n\");\n } else if ($sim == 1) { //( Se tiver SIM, é reservado o horário\n $this->reservaHorario($this->opcoesVariaveis);\n } else { //( Se na mensagem não tem nem SIM nem Não, é enviado a mensagem de erro dizendo que não entendeu\n $this->sendMessage('MensageErro', $this->numero, \"Não compreendi a sua resposta, favor responder exatamente como foi solicitado.\", \"\");\n }\n }\n } else if ($id_retorno == '') { //ou seja, não sei qual o retorno\n $sql = \"SELECT * FROM tbl_retornos WHERE id_retorno = (SELECT resposta FROM tbl_opcoes WHERE id_instancia = $this->idInstancia AND indice = '$primeiraPalavraCliente' AND id_retorno = $ultimoRetorno)\";\n } else { //Sei qual o retorno atual\n //$idInstancia = $this->idInstancia;\n $sql = \"SELECT * FROM tbl_retornos WHERE id_instancia = $this->idInstancia AND id_retorno = $id_retorno\";\n }\n\n $this->logSis('DEB', $sql);\n\n $query = mysqli_query($conn['link'], $sql);\n $consultaRetorno = mysqli_fetch_array($query, MYSQLI_ASSOC);\n $this->logSis('DEB', 'Sql: ' . $sql . ' consultaRetorno->' . print_r($consultaRetorno, true));\n\n $numRow = mysqli_num_rows($query);\n if (!$query) {\n $this->logSis('ERR', 'Mysql Connect: ' . mysqli_error($conn['link']));\n exit(0);\n }\n if ($numRow == 0) { //VERIFICA SE EXISTE NO BANCO DE DADOS\n $this->logSis('ERR', 'Não encontrou a mensagem inicial Instância. Instância: ' . $this->idInstancia);\n exit(0);\n } else {\n\n //& VERIFICAR AQUI SE VAI TER AMBIGUIDADE COM A PRIMEIRA CONSULTA \n $id_retorno = $consultaRetorno['id_retorno']; //ID da tabela retorno (chave)\n $mensagem = utf8_encode($consultaRetorno['mensagem']);\n //Consulta das opções\n $sql = \"SELECT * FROM tbl_opcoes WHERE listavel = 1 AND id_instancia = $this->idInstancia AND id_retorno = $id_retorno ORDER BY indice ASC\";\n $this->logSis('DEB', $sql);\n\n $query = mysqli_query($conn['link'], $sql);\n $numRow = mysqli_num_rows($query);\n\n //Teste DEploy\n if ($numRow != 0) {\n $mensagem .= \"\\n\";\n while ($opcao = mysqli_fetch_array($query)) {\n $mensagem .= '*' . $opcao['indice'] . '.* ' . utf8_encode($opcao['mensagem']) . \"\\n\";\n }\n if ($consultaRetorno['modo'] == 1 && $consultaRetorno['id_retorno'] != $this->menuRaiz) {\n $mensagem .= \"*0.* Voltar ao menu anterior\\n\";\n }\n }\n\n $retorno = array(\n 'id_retorno' => $consultaRetorno['id_retorno'],\n 'nome' => $consultaRetorno['nome'],\n 'modo' => $consultaRetorno['modo'],\n 'tipo' => $consultaRetorno['tipo'],\n 'coringa' => $consultaRetorno['coringa'], //para tipo 6 (Inclusão lista) -> lista_X\n 'mensagem' => $mensagem,\n 'url' => $consultaRetorno['url'],\n 'lat' => $consultaRetorno['lat'],\n 'lng' => $consultaRetorno['lng'],\n 'name' => $consultaRetorno['name'],\n 'address' => $consultaRetorno['address']\n );\n $this->logSis('DEB', 'Retorno->' . print_r($retorno, true));\n\n return $retorno;\n }\n }", "function listarServiciosTerminados()\n\t{\n\t\treturn \"select servicios.servicio_id,servicios.nombre_servicio, servicios.estado_servicio, servicios.descripcion, servicios.fecha_creacion,\n trabajadores.nombre,\nsucursales.nombre_sucursal\nfrom trabajadores, servicios,sucursales where servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 0 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "public function vendasHoje(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT ifnull(count(*),0) as total FROM tbpedidos c WHERE DAY(c.data_finaliza) = Day(now()) and c.status = 'F';\";\n $rsvendahj = $this->conexao->query($sql);\n $result = $rsvendahj->fetch_array();\n $vendashoje = $result['total'];\n\n return $vendashoje;\n }", "public function seleccionarhistoricoAction(Request $request)\n {\n $usr = $this->get('security.context')->getToken()->getUser();\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n //Seguridad\n $securityContext = $this->get('security.context');\n\n $data = $request->request->all();\n\n // Tomo la dependencia actual\n if ($this->getUser()->multidep_multi){\n $usuarioDependencia = $this->getUser()->multidep_actual_codigo;\n } else {\n $usuarioDependencia = $this->getUser()->IdEstablecimiento;\n }\n\n $busqueda = $data['busqueda'];\n\n $filtro = $data['filtro'];\n\n if ((true === $securityContext->isGranted('ROLE_1')) || (true === $securityContext->isGranted('ROLE_2')) || (true === $securityContext->isGranted('ROLE_15')) || (true === $securityContext->isGranted('ROLE_16')) || (true === $securityContext->isGranted('ROLE_17')) || (true === $securityContext->isGranted('ROLE_18')) || (true === $securityContext->isGranted('ROLE_22'))) {\n switch ($filtro) {\n case 1:\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro;\n break;\n case 2:\n $busqueda = ltrim(rtrim(str_replace(' ', '_', $busqueda)));\n $busqueda = str_replace('ñ', 'n', $busqueda);\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro;\n break;\n case 3:\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro;\n break;\n }\n\n } else {\n switch ($filtro) {\n case 1:\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro.','.$usuarioDependencia;\n break;\n case 2:\n $busqueda = ltrim(rtrim(str_replace(' ', '_', $busqueda)));\n $busqueda = str_replace('ñ', 'n', $busqueda);\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro.','.$usuarioDependencia;\n break;\n case 3:\n $sql = 'EXEC haberes.haberes.spBuscarPersonaPorLegajoLiquidaciones '.$busqueda.','.$filtro.','.$usuarioDependencia;\n break;\n }\n }\n\n\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n $conn = $this->getDoctrine()->getManager(\"ms_haberes_web\")->getConnection();\n\n $stmt = $conn->prepare($sql);\n\n $stmt->execute();\n $rResult = 0;\n\n $rResult = $stmt->fetchAll();\n\n return array(\n 'resultados' => $rResult,\n );\n }", "function leerCreditos(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idcredito, t.NombreCte,c.tipoContrato, c.montoTotal, c.plazo,c.mensualidad, c.interes,\"\n . \" c.metodoPago, c.observaciones, c.status FROM tarjetas_clientes t join credito c on t.idClienteTg=c.cteId where c.status=1 or c.status=3\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function listar(){\n\t\t$sql = \"SELECT * FROM cargo\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }", "public static function obtenerVehiculosTodos()\n {\n $consulta = \"SELECT * FROM vehiculos ORDER BY id_vehiculo\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "public function get_detalle_proveedor($numero_compra){\n\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select c.fecha_compra,c.numero_compra, c.proveedor, c.cedula_proveedor,c.total,p.id_proveedor,p.cedula,p.razon_social,p.telefono,p.correo,p.direccion,p.fecha,p.estado\n from compras as c, proveedor as p\n where \n \n c.cedula_proveedor=p.cedula\n and\n c.numero_compra=?\n \n ;\";\n\n //echo $sql; exit();\n\n $sql=$conectar->prepare($sql);\n \n\n $sql->bindValue(1,$numero_compra);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n\n \n \n }" ]
[ "0.6686876", "0.6685819", "0.66687274", "0.6602002", "0.6558771", "0.65036404", "0.64841896", "0.64787143", "0.6473413", "0.6464244", "0.64489913", "0.64476746", "0.644637", "0.6438975", "0.6431052", "0.63749784", "0.63638145", "0.6336698", "0.6317326", "0.6291482", "0.6285828", "0.6272944", "0.6269046", "0.6208766", "0.6208043", "0.61988866", "0.61910385", "0.61734456", "0.6160453", "0.6149495", "0.6146161", "0.61344045", "0.61199915", "0.61024034", "0.6098247", "0.60914487", "0.6086756", "0.6077603", "0.6075281", "0.60738635", "0.60713094", "0.6071215", "0.6068658", "0.6067134", "0.6064137", "0.6064064", "0.60533947", "0.6051186", "0.6041059", "0.6040228", "0.60397995", "0.6030917", "0.6022841", "0.6021013", "0.6016857", "0.60158396", "0.6006769", "0.59981763", "0.5993605", "0.59841347", "0.598134", "0.5981117", "0.5979815", "0.5978157", "0.5976243", "0.5969005", "0.596366", "0.5963082", "0.59597945", "0.5955776", "0.59528726", "0.59512", "0.5949793", "0.5943615", "0.5939823", "0.59376425", "0.5934553", "0.59310347", "0.5921101", "0.59205914", "0.59170103", "0.59139293", "0.59125257", "0.5908318", "0.5908034", "0.5904879", "0.59046215", "0.5902031", "0.59016925", "0.5896237", "0.5893655", "0.58925027", "0.5891545", "0.5889065", "0.5883502", "0.58827466", "0.58825165", "0.5873651", "0.586623", "0.5861711", "0.5857752" ]
0.0
-1
Registers settings and controls with the Customizer.
function thyme_customizer_register( $wp_customize ) { $childthemesettings = genesis_get_config( 'child-theme-settings' )[ GENESIS_SETTINGS_FIELD ]; $wp_customize->add_setting( 'thyme_link_color', [ 'default' => thyme_get_default_link_color(), 'sanitize_callback' => 'sanitize_hex_color', ] ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'thyme_link_color', [ 'description' => __( 'Change the hover color of linked titles, menu items, and more.', 'thyme-theme' ), 'label' => __( 'Link Color', 'thyme-theme' ), 'section' => 'colors', 'settings' => 'thyme_link_color', ] ) ); $wp_customize->add_setting( 'thyme_button_color', [ 'default' => thyme_get_default_button_color(), 'sanitize_callback' => 'sanitize_hex_color', ] ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'thyme_button_color', [ 'description' => __( 'Change the default background color of all buttons.', 'thyme-theme' ), 'label' => __( 'Button Color', 'thyme-theme' ), 'section' => 'colors', 'settings' => 'thyme_button_color', ] ) ); $wp_customize->add_setting( 'thyme_primary_color', [ 'default' => thyme_get_default_primary_color(), 'sanitize_callback' => 'sanitize_hex_color', ] ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'thyme_primary_color', [ 'description' => __( 'Change the primary color for your site. This affects the overlay background of post titles and the grid section title background on your site.', 'thyme-theme' ), 'label' => __( 'Primary Color', 'thyme-theme' ), 'section' => 'colors', 'settings' => 'thyme_primary_color', ] ) ); $wp_customize->add_setting( 'thyme_banner_color', [ 'default' => thyme_get_default_banner_color(), 'sanitize_callback' => 'sanitize_hex_color', ] ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'thyme_banner_color', [ 'description' => __( 'Change the banner color for your site. This affects the Top Banner of our site only.', 'thyme-theme' ), 'label' => __( 'Banner Color', 'thyme-theme' ), 'section' => 'colors', 'settings' => 'thyme_banner_color', ] ) ); $wp_customize->add_setting( 'thyme_accent_color', [ 'default' => thyme_get_default_accent_color(), 'sanitize_callback' => 'sanitize_hex_color', ] ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'thyme_accent_color', [ 'description' => __( 'Change the accent color for your site. This affects the Bottom CTA space.', 'thyme-theme' ), 'label' => __( 'Accent Color', 'thyme-theme' ), 'section' => 'colors', 'settings' => 'thyme_accent_color', ] ) ); $wp_customize->add_setting( 'thyme_body_color', [ 'default' => thyme_get_default_body_color(), 'sanitize_callback' => 'sanitize_hex_color', ] ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'thyme_body_color', [ 'description' => __( 'Change the default color for your body text and heading titles.', 'thyme-theme' ), 'label' => __( 'Body Color', 'thyme-theme' ), 'section' => 'colors', 'settings' => 'thyme_body_color', ] ) ); $wp_customize->add_setting( 'thyme_logo_width', [ 'default' => 400, 'sanitize_callback' => 'absint', 'validate_callback' => 'thyme_validate_logo_width', ] ); // Adds a control for the logo size. $wp_customize->add_control( 'thyme_logo_width', [ 'label' => __( 'Logo Width', 'thyme-theme' ), 'description' => __( 'The maximum width of the logo in pixels.', 'thyme-theme' ), 'priority' => 9, 'section' => 'title_tagline', 'settings' => 'thyme_logo_width', 'type' => 'number', 'input_attrs' => [ 'min' => 100, ], ] ); // Adds control for the nav mini logo upload. $wp_customize->add_setting( 'thyme-mini-logo', array( 'default' => thyme_get_default_mini_logo(), 'sanitize_callback' => 'esc_attr', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'thyme-mini-logo', array( 'description' => __( 'Select an image to display to the left of your top navigation menu.', 'thyme-theme' ), 'label' => __( 'Nav Mini Logo', 'thyme-theme' ), 'section' => 'title_tagline', 'settings' => 'thyme-mini-logo', ) ) ); // Adds control for the footer logo upload. $wp_customize->add_setting( 'thyme-footer-logo', array( 'default' => thyme_get_default_footer_logo(), 'sanitize_callback' => 'esc_attr', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'thyme-footer-logo', array( 'description' => __( 'Select an image to display above the footer credits.', 'thyme-theme' ), 'label' => __( 'Footer Logo', 'thyme-theme' ), 'section' => 'title_tagline', 'settings' => 'thyme-footer-logo', ) ) ); // Top Banner Section. $wp_customize->add_section( 'thyme-top-banner-settings', array( 'description' => sprintf( '<strong>%s</strong><p>%s</p>', __( 'Modify the settings for the top banner section.', 'thyme-theme' ), __( 'Each time the customizer is opened, the top banner will be displayed in the live preview so you can easily customize the content.', 'thyme-theme' ) ), 'title' => __( 'Top Banner Section', 'thyme-theme' ), ) ); $wp_customize->add_setting( 'thyme-top-banner-visibility', array( 'default' => 1, 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'thyme-top-banner-visibility', array( 'description' => __( 'Check the box to display a dismissible banner at the top of all pages.', 'thyme-theme' ), 'label' => __( 'Show Top Banner?', 'thyme-theme' ), 'section' => 'thyme-top-banner-settings', 'settings' => 'thyme-top-banner-visibility', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'thyme-top-banner-text', array( 'default' => thyme_get_default_top_banner_text(), 'sanitize_callback' => 'wp_kses_post', 'transport' => isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh', ) ); $wp_customize->add_control( 'thyme-top-banner-text', array( 'description' => __( 'Change the text for the dismissible banner (allows HTML).', 'thyme-theme' ), 'label' => __( 'Top Banner Text', 'thyme-theme' ), 'section' => 'thyme-top-banner-settings', 'settings' => 'thyme-top-banner-text', 'type' => 'textarea', ) ); if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'thyme-top-banner-text', array( 'selector' => '.thyme-top-banner', 'settings' => array( 'thyme-top-banner-text' ), 'render_callback' => function() { return get_theme_mod( 'thyme-top-banner-text' ); }, ) ); } $wp_customize->add_setting( 'thyme_archive_full_width_content', [ 'default' => $childthemesettings['content_archive_full_width'], 'sanitize_callback' => 'absint', 'type' => 'theme_mod', ] ); // Add a control for the show archive post content. $wp_customize->add_control( 'thyme_archive_full_width_content', [ 'label' => __( 'Enable Full Width', 'thyme-theme' ), 'priority' => 9, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_full_width_content', 'type' => 'checkbox', 'std' => 1, ] ); $wp_customize->add_setting( 'thyme_archive_grid', [ 'default' => $childthemesettings['content_archive_grid'], 'sanitize_callback' => 'absint', ] ); // Add a control for the select grid. $wp_customize->add_control( 'thyme_archive_grid', [ 'label' => __( 'Grid Column', 'thyme-theme' ), 'description' => __( 'Select column for archive.', 'thyme-theme' ), 'priority' => 9, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_grid', 'type' => 'select', 'choices' => array( '2' => __( '2', 'thyme-theme' ), '3' => __( '3', 'thyme-theme' ), '4' => __( '4', 'thyme-theme' ), ), ] ); $wp_customize->add_setting( 'thyme_archive_show_info', [ 'default' => $childthemesettings['content_archive_show_info'], 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ] ); // Add a control for the show archive post info. $wp_customize->add_control( 'thyme_archive_show_info', [ 'label' => __( 'Show Post Info', 'thyme-theme' ), 'priority' => 12, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_show_info', 'type' => 'checkbox', 'std' => 1, ] ); $wp_customize->add_setting( 'thyme_archive_show_content', [ 'default' => $childthemesettings['content_archive_show_content'], 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ] ); // Add a control for the show archive post content. $wp_customize->add_control( 'thyme_archive_show_content', [ 'label' => __( 'Show Post Content', 'thyme-theme' ), 'priority' => 13, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_show_content', 'type' => 'checkbox', 'std' => 1, ] ); $wp_customize->add_setting( 'thyme_archive_show_meta', [ 'default' => $childthemesettings['content_archive_show_meta'], 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ] ); // Add a control for the show archive post meta. $wp_customize->add_control( 'thyme_archive_show_meta', [ 'label' => __( 'Show Post Meta', 'thyme-theme' ), 'priority' => 14, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_show_meta', 'type' => 'checkbox', 'std' => 1, ] ); $wp_customize->add_setting( 'thyme_archive_image_position', [ 'default' => $childthemesettings['content_archive_image_position'], 'sanitize_callback' => 'sanitize_text_field', ] ); // Add a control for the select grid. $wp_customize->add_control( 'thyme_archive_image_position', [ 'label' => __( 'Image Position', 'thyme-theme' ), 'priority' => 20, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_image_position', 'type' => 'select', 'choices' => array( 'after-title' => __( 'After Title', 'thyme-theme' ), 'before-title' => __( 'Before Title', 'thyme-theme' ), ), ] ); $wp_customize->add_setting( 'thyme_archive_meta_position', [ 'default' => $childthemesettings['content_archive_meta_position'], 'sanitize_callback' => 'sanitize_text_field', ] ); // Add a control for add meta text. $wp_customize->add_control( 'thyme_archive_meta_position', [ 'label' => __( 'Post Meta Position', 'thyme-theme' ), 'priority' => 20, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_meta_position', 'type' => 'select', 'choices' => array( 'no' => __( 'No Changes', 'thyme-theme' ), 'after-title' => __( 'After Title', 'thyme-theme' ), 'before-title' => __( 'Before Title', 'thyme-theme' ), ), ] ); $wp_customize->add_setting( 'thyme_archive_info_text', [ 'default' => $childthemesettings['content_archive_info_text'], 'sanitize_callback' => 'sanitize_text_field', ] ); // Add a control for info text. $wp_customize->add_control( 'thyme_archive_info_text', [ 'label' => __( 'Post Info Text', 'thyme-theme' ), 'priority' => 20, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_info_text', 'type' => 'text', ] ); $wp_customize->add_setting( 'thyme_archive_meta_text', [ 'default' => $childthemesettings['content_archive_meta_text'], 'sanitize_callback' => 'sanitize_text_field', ] ); // Add a control for meta text. $wp_customize->add_control( 'thyme_archive_meta_text', [ 'label' => __( 'Post Meta Text', 'thyme-theme' ), 'priority' => 20, 'section' => 'genesis_archives', 'settings' => 'thyme_archive_meta_text', 'type' => 'text', ] ); $wp_customize->add_setting( 'thyme_more_text', [ 'default' => $childthemesettings['read_more_text'], 'sanitize_callback' => 'sanitize_text_field', ] ); // Add a control for meta text. $wp_customize->add_control( 'thyme_more_text', [ 'label' => __( 'Read More Text (if applied) ', 'thyme-theme' ), 'priority' => 20, 'section' => 'genesis_archives', 'settings' => 'thyme_more_text', 'type' => 'text', ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_customization( $wp_customize ) {\n\tadd_settings( $wp_customize );\n\tadd_sections( $wp_customize );\n\tadd_controls( $wp_customize );\n}", "public function add_control( $wp_customize ) {}", "function settingsCustomizeRegister($wp_customize)\n{\n\t$wp_customize->add_section(\n\t\t'settings_section',\n\t\tarray(\n\t\t\t'title' => 'Theme Settings',\n\t\t\t'description' => 'Edit the theme setings.',\n\t\t\t'priority' => 0,\n\t\t)\n\t);\n\t\n\t$wp_customize->add_setting(\n\t\t'google_maps_api_key',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\t\n\t$wp_customize->add_control(\n\t\t'google_maps_api_key',\n\t\tarray(\n\t\t\t'label' => 'Google Maps API Key',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\t\n\t$wp_customize->add_setting(\n\t\t'navbar_type',\n\t\tarray(\n\t\t\t'default' => 'Inline',\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\t\n\t$wp_customize->add_control(\n\t\t'navbar_type',\n\t\tarray(\n\t\t\t'label' => 'Navbar Type',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'select',\n\t\t\t'choices' => array(\n\t\t\t\t'inline' => 'Inline',\n\t\t\t\t'layered' => 'Layered',\n\t\t\t\t'layered--centered' => 'Layered but Centered',\n\t\t\t\t'logo-center' => 'Layered with logo in center',\n\t\t\t)\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'facebook_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\t\n\t$wp_customize->add_control(\n\t\t'facebook_url',\n\t\tarray(\n\t\t\t'label' => 'Facebook Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'twitter_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'twitter_url',\n\t\tarray(\n\t\t\t'label' => 'Twitter Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'instagram_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'instagram_url',\n\t\tarray(\n\t\t\t'label' => 'Instagram Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'github_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'github_url',\n\t\tarray(\n\t\t\t'label' => 'Github Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'linkedin_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'linkedin_url',\n\t\tarray(\n\t\t\t'label' => 'LinkedIn Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n $wp_customize->add_setting(\n 'youtube_url',\n array(\n 'type' => 'option',\n )\n );\n\n $wp_customize->add_control(\n 'youtube_url',\n array(\n 'label' => 'Youtube Channel URL',\n 'section' => 'settings_section',\n 'type' => 'text'\n )\n );\n\n}", "protected function _register_controls()\n\t{\n\n\t\t$this->start_controls_section(\n\t\t\t'section_settings',\n\t\t\t[\n\t\t\t\t'label' => __('Settings', 'algolia-wp-plugin'),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'index_name',\n\t\t\t[\n\t\t\t\t'label' => __('Search Index', 'algolia-wp-plugin'),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'show_label' => true,\n\t\t\t\t'default' => 'wp_searchable_posts',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'facet_filters',\n\t\t\t[\n\t\t\t\t'label' => __('Facet Filters', 'algolia-wp-plugin'),\n\t\t\t\t'type' => Controls_Manager::CODE,\n\t\t\t\t'show_label' => true,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hits_per_page',\n\t\t\t[\n\t\t\t\t'label' => __('Hits Per Page', 'algolia-wp-plugin'),\n\t\t\t\t'show_label' => true,\n\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t'default' => 5,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'localize',\n\t\t\t[\n\t\t\t\t'label' => __('Localize', 'algolia-wp-plugin'),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'default' => true,\n\t\t\t\t'frontend_available' => true,\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "protected function _register_controls() {\r\n\r\n\t\t$this->start_controls_section(\r\n\t\t\t'settings_section',\r\n\t\t\t[\r\n\t\t\t\t'label' => esc_html__( 'General Settings', 'aapside-master' ),\r\n\t\t\t\t'tab' => Controls_Manager::TAB_CONTENT,\r\n\t\t\t]\r\n\t\t);\r\n\t\t$this->add_control( 'title', [\r\n\t\t\t'label' => esc_html__( 'Title', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::TEXT,\r\n\t\t\t'default' => esc_html__( 'Primary Plan', 'aapside-master' ),\r\n\t\t\t'description' => esc_html__( 'enter title', 'aapside-master' )\r\n\t\t] );\r\n\t\t$this->add_control( 'featured', [\r\n\t\t\t'label' => esc_html__( 'Featured', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::SWITCHER,\r\n\t\t\t'default' => 'no',\r\n\t\t\t'description' => esc_html__( 'enable featured', 'aapside-master' )\r\n\t\t] );\r\n\t\t$this->add_control( 'price', [\r\n\t\t\t'label' => esc_html__( 'Price', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::TEXT,\r\n\t\t\t'default' => esc_html__( '250', 'aapside-master' ),\r\n\t\t\t'description' => esc_html__( 'enter price', 'aapside-master' )\r\n\t\t] );\r\n\t\t$this->add_control( 'sign', [\r\n\t\t\t'label' => esc_html__( 'Sign', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::TEXT,\r\n\t\t\t'default' => esc_html__( '$', 'aapside-master' ),\r\n\t\t\t'description' => esc_html__( 'enter sign', 'aapside-master' )\r\n\t\t] );\r\n\t\t$this->add_control( 'month', [\r\n\t\t\t'label' => esc_html__( 'Month', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::TEXT,\r\n\t\t\t'default' => esc_html__( '/Mo', 'aapside-master' ),\r\n\t\t\t'description' => esc_html__( 'enter month', 'aapside-master' )\r\n\t\t] );\r\n\t\t$this->add_control( 'btn_text', [\r\n\t\t\t'label' => esc_html__( 'Button Text', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::TEXT,\r\n\t\t\t'default' => esc_html__( 'Get Started', 'aapside-master' ),\r\n\t\t\t'description' => esc_html__( 'enter button text', 'aapside-master' )\r\n\t\t] );\r\n\t\t$this->add_control( 'btn_link', [\r\n\t\t\t'label' => esc_html__( 'Button Link', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::URL,\r\n\t\t\t'default' => array(\r\n\t\t\t\t'url' => '#'\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'enter button link', 'aapside-master' )\r\n\t\t] );\r\n\r\n\t\t$this->add_control( 'feature_items', [\r\n\t\t\t'label' => esc_html__( 'Feature Item', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::REPEATER,\r\n\t\t\t'default' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t'feature' => esc_html__( '5 Analyzer', 'aapside-master' )\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'fields' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t'name' => 'feature',\r\n\t\t\t\t\t'label' => esc_html__( 'Feature', 'aapside-master' ),\r\n\t\t\t\t\t'type' => Controls_Manager::TEXT,\r\n\t\t\t\t\t'description' => esc_html__( 'enter feature item.', 'aapside-master' ),\r\n\t\t\t\t\t'default' => esc_html__( '5 Analyzer', 'aapside-master' )\r\n\t\t\t\t]\r\n\t\t\t],\r\n\t\t] );\r\n\t\t$this->end_controls_section();\r\n\r\n\t\t$this->start_controls_section( 'styling_section', [\r\n\t\t\t'label' => esc_html__( 'Styling Settings', 'aapside-master' ),\r\n\t\t\t'tab' => Controls_Manager::TAB_STYLE\r\n\t\t] );\r\n\t\t$this->add_control( 'title_color', [\r\n\t\t\t'label' => esc_html__( 'Title Color', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::COLOR,\r\n\t\t\t'selectors' => [\r\n\t\t\t\t\"{{WRAPPER}} .single-price-plan-02 .price-header .name\" => \"color: {{VALUE}}\"\r\n\t\t\t]\r\n\t\t] );\r\n\t\t$this->add_control( 'price_color', [\r\n\t\t\t'label' => esc_html__( 'Price Color', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::COLOR,\r\n\t\t\t'selectors' => [\r\n\t\t\t\t\"{{WRAPPER}} .single-price-plan-02 .price-header .price-wrap .price\" => \"color: {{VALUE}}\"\r\n\t\t\t]\r\n\t\t] );\r\n\t\t$this->add_control( 'month_color', [\r\n\t\t\t'label' => esc_html__( 'Month Color', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::COLOR,\r\n\t\t\t'selectors' => [\r\n\t\t\t\t\"{{WRAPPER}} .single-price-plan-02 .price-header .price-wrap .month\" => \"color: {{VALUE}}\"\r\n\t\t\t]\r\n\t\t] );\r\n\t\t$this->add_control( 'features_color', [\r\n\t\t\t'label' => esc_html__( 'Features Color', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::COLOR,\r\n\t\t\t'selectors' => [\r\n\t\t\t\t\"{{WRAPPER}} .single-price-plan-02 .price-body ul\" => \"color: {{VALUE}}\"\r\n\t\t\t]\r\n\t\t] );\r\n\t\t$this->end_controls_section();\r\n\r\n\t\t/* button styling start */\r\n\t\t$this->start_controls_section( 'button_styling_section', [\r\n\t\t\t'label' => esc_html__( 'Button Styling', 'aapside-master' ),\r\n\t\t\t'tab' => Controls_Manager::TAB_STYLE\r\n\t\t] );\r\n\t\t$this->start_controls_tabs(\r\n\t\t\t'button_style_tabs'\r\n\t\t);\r\n\r\n\t\t$this->start_controls_tab(\r\n\t\t\t'button_style_normal_tab',\r\n\t\t\t[\r\n\t\t\t\t'label' => __( 'Normal', 'aapside-master' ),\r\n\t\t\t]\r\n\t\t);\r\n\t\t$this->add_control( 'button_normal_color', [\r\n\t\t\t'label' => esc_html__( 'Color', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::COLOR,\r\n\t\t\t'selectors' => [\r\n\t\t\t\t\"{{WRAPPER}} .single-price-plan-02 .price-footer .boxed-btn\" => \"color: {{VALUE}}\"\r\n\t\t\t]\r\n\t\t] );\r\n\t\t$this->add_group_control( Group_Control_Background::get_type(), [\r\n\t\t\t'label' => esc_html__( 'Button Background', 'aapside-master' ),\r\n\t\t\t'name' => 'button_normal_bg_color',\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02 .price-footer .boxed-btn\"\r\n\t\t] );\r\n\t\t$this->add_group_control( Group_Control_Border::get_type(), [\r\n\t\t\t'label' => esc_html__( 'Border', 'aapside-master' ),\r\n\t\t\t'name' => 'button_normal_border',\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02 .price-footer .boxed-btn\"\r\n\t\t] );\r\n\r\n\t\t$this->end_controls_tab();\r\n\r\n\t\t$this->start_controls_tab(\r\n\t\t\t'button_style_hover_tab',\r\n\t\t\t[\r\n\t\t\t\t'label' => __( 'Hover', 'aapside-master' ),\r\n\t\t\t]\r\n\t\t);\r\n\t\t$this->add_control( 'button_hover_color', [\r\n\t\t\t'label' => esc_html__( 'Color', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::COLOR,\r\n\t\t\t'selectors' => [\r\n\t\t\t\t\"{{WRAPPER}} .single-price-plan-02 .price-footer .boxed-btn:hover\" => \"color: {{VALUE}}\"\r\n\t\t\t]\r\n\t\t] );\r\n\t\t$this->add_group_control( Group_Control_Background::get_type(), [\r\n\t\t\t'label' => esc_html__( 'Button Background', 'aapside-master' ),\r\n\t\t\t'name' => 'button_hover_bg_color',\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02 .price-footer .boxed-btn:hover\"\r\n\t\t] );\r\n\t\t$this->add_group_control( Group_Control_Border::get_type(), [\r\n\t\t\t'label' => esc_html__( 'Border', 'aapside-master' ),\r\n\t\t\t'name' => 'button_hover_border',\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02 .price-footer .boxed-btn:hover\"\r\n\t\t] );\r\n\r\n\t\t$this->end_controls_tab();\r\n\r\n\t\t$this->end_controls_tabs();\r\n\t\t$this->add_control( 'button_divider', [\r\n\t\t\t'type' => Controls_Manager::DIVIDER\r\n\t\t] );\r\n\t\t$this->add_responsive_control( 'button_border_radius', [\r\n\t\t\t'label' => esc_html__( 'Border Radius', 'aapside-master' ),\r\n\t\t\t'type' => Controls_Manager::DIMENSIONS,\r\n\t\t\t'units' => [ 'px', '%', 'em' ],\r\n\t\t\t'selectors' => [\r\n\t\t\t\t\"{{WRAPPER}} .single-price-plan-02 .price-footer .boxed-btn\" => \"border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};\"\r\n\t\t\t]\r\n\t\t] );\r\n\t\t$this->end_controls_section();\r\n\t\t/* button styling end */\r\n\r\n\t\t/* border color start */\r\n\t\t$this->start_controls_section( 'hover_border_section', [\r\n\t\t\t'label' => esc_html__( 'Hover Border Style', 'aapside-master' ),\r\n\t\t\t'tab' => Controls_Manager::TAB_STYLE\r\n\t\t] );\r\n\r\n\t\t$this->add_group_control( Group_Control_Background::get_type(), [\r\n\t\t\t'name' => 'hover_background',\r\n\t\t\t'label' => esc_html__( 'Active Border Color', 'aapside-master' ),\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02:after\"\r\n\t\t] );\r\n\r\n\t\t$this->end_controls_section();\r\n\t\t/* border color end */\r\n\r\n\r\n\t\t/* button styling start */\r\n\t\t$this->start_controls_section( 'typography_section', [\r\n\t\t\t'label' => esc_html__( 'Typography Settings', 'aapside-master' ),\r\n\t\t\t'tab' => Controls_Manager::TAB_STYLE\r\n\t\t] );\r\n\t\t$this->add_group_control( Group_Control_Typography::get_type(), [\r\n\t\t\t'name' => 'title_typography',\r\n\t\t\t'label' => esc_html__( 'Title Typography', 'aapside-master' ),\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02 .price-header .name\"\r\n\t\t] );\r\n\t\t$this->add_group_control( Group_Control_Typography::get_type(), [\r\n\t\t\t'name' => 'price_typography',\r\n\t\t\t'label' => esc_html__( 'Price Typography', 'aapside-master' ),\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02 .price-header .price-wrap\"\r\n\t\t] );\r\n\t\t$this->add_group_control( Group_Control_Typography::get_type(), [\r\n\t\t\t'name' => 'features_typography',\r\n\t\t\t'label' => esc_html__( 'Features Typography', 'aapside-master' ),\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02 .price-body ul\"\r\n\t\t] );\r\n\t\t$this->add_group_control( Group_Control_Typography::get_type(), [\r\n\t\t\t'name' => 'button_typography',\r\n\t\t\t'label' => esc_html__( 'Button Typography', 'aapside-master' ),\r\n\t\t\t'selector' => \"{{WRAPPER}} .single-price-plan-02 .price-footer .boxed-btn\"\r\n\t\t] );\r\n\t\t$this->end_controls_section();\r\n\t\t/* button styling end */\r\n\t}", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'main_clients_settings',\n\t\t\t[\n\t\t\t\t'label' => __( 'Clients Settings', 'elementor-main-clients' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t 'clients-columns',\n\t\t \t[\n\t\t \t'label' \t=> esc_html__( 'Column', 'essential-addons-elementor' ),\n\t\t \t'type' \t\t\t=> Controls_Manager::SELECT,\n\t\t \t'default' \t\t=> '2',\n\t\t \t'options' \t\t=> [\t\t\t\t\n\t\t\t\t\t'1' => esc_html__('1 Column', 'baldiyaat'),\n\t\t\t\t\t'2' => esc_html__('2 Column', 'baldiyaat'),\n\t\t\t\t\t'3' => esc_html__('3 Column', 'baldiyaat'),\n\t\t\t\t\t'4' => esc_html__('4 Column', 'baldiyaat'),\n\t\t\t\t\t'6' => esc_html__('6 Column', 'baldiyaat')\n\t\t \t],\n\t\t \t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'thumbnail-size',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Thumbnail Size', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'label_block' \t=> false,\n\t\t\t\t'default' => esc_html__( 'hide', 'essential-addons-elementor' ),\n\t\t \t'options' => wpha_get_thumbnail_list(),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'num-fetch',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Num Fetch', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => 10,\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t\n\t\t/**\n\t\t * Clients Text Settings\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'main_clients_config_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Clients Images', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'slider',\n\t\t\t[\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'seperator' => 'before',\n\t\t\t\t'default' => [\n\t\t\t\t\t[ 'main_clients_settings_slide' => KODEFOREST_MAIN_URL . 'assets/clients/simple-clients.png' ],\n\t\t\t\t\t[ 'main_clients_settings_slide' => KODEFOREST_MAIN_URL . 'assets/clients/simple-clients.png' ],\n\t\t\t\t\t[ 'main_clients_settings_slide' => KODEFOREST_MAIN_URL . 'assets/clients/simple-clients.png' ],\n\t\t\t\t\t[ 'main_clients_settings_slide' => KODEFOREST_MAIN_URL . 'assets/clients/simple-clients.png' ],\n\t\t\t\t\t[ 'main_clients_settings_slide' => KODEFOREST_MAIN_URL . 'assets/clients/simple-clients.png' ],\n\t\t\t\t\t[ 'main_clients_settings_slide' => KODEFOREST_MAIN_URL . 'assets/clients/simple-clients.png' ],\n\t\t\t\t\t[ 'main_clients_settings_slide' => KODEFOREST_MAIN_URL . 'assets/clients/simple-clients.png' ],\n\t\t\t\t],\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'main_clients_settings_slide',\n\t\t\t\t\t\t'label' => esc_html__( 'Image', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t\t\t'default' => [\n\t\t\t\t\t\t\t'url' => KODEFOREST_MAIN_URL . 'assets/clients/simple-clients.png',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'main_clients_settings_slide_title',\n\t\t\t\t\t\t'label' => esc_html__( 'Image Title', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '', 'essential-addons-elementor' )\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'main_clients_settings_slide_caption',\n\t\t\t\t\t\t'label' => esc_html__( 'Image Caption', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '', 'essential-addons-elementor' )\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'main_clients_settings_enable_slide_link',\n\t\t\t\t\t\t'label' => __( 'Enable Image Link', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t\t\t'default' => 'false',\n\t\t\t\t\t\t'label_on' => esc_html__( 'Yes', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'label_off' => esc_html__( 'No', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'return_value' => 'true',\n\t\t\t\t\t\t\n\t\t\t\t \t],\n\t\t\t\t \t[\n\t\t\t\t\t\t'name' => 'main_clients_settings_slide_link',\n\t\t\t\t\t\t'label' => esc_html__( 'Image Link', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => [\n\t\t \t\t\t'url' => '#',\n\t\t \t\t\t'is_external' => '',\n\t\t \t\t\t],\n\t\t \t\t\t'show_external' => true,\n\t\t \t\t\t'condition' => [\n\t\t \t\t\t\t'main_clients_settings_enable_slide_link' => 'true'\n\t\t \t\t\t]\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'title_field' => '{{main_clients_settings_slide_title}}',\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\t\t\n\t\t/**\n\t\t * Clients Text Settings\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'main_clients_color_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color & Design', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'main_clients_sub_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Image Sub Title Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#f4f4f4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .slide-item .slide-caption .kode-sub-title' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'main_clients_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Image Title Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#f4f4f4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .slide-item .slide-caption .slide-caption-title' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'main_clients_caption_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Image Caption Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#f4f4f4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .slide-item .slide-caption .slide-caption-des' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'main_clients_button_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Image Button Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#f4f4f4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .slide-item .slide-caption .banner_text_btn .bg-color' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'main_clients_button_bg_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Image Button BG Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#f4f4f4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .slide-item .slide-caption .banner_text_btn .bg-color' => 'background-color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t\n\t\t\n\t}", "protected function _register_controls() {\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => esc_html__( 'Content', 'Alita-extensions' ),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'title',\n [\n 'label' => esc_html__( 'Title', 'Alita-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'default' => '',\n 'placeholder' => esc_html__( 'Enter title', 'Alita-extensions' ),\n ]\n );\n\n $this->add_control(\n 'show_savings',\n [\n 'label' => esc_html__( 'Show Savings Details', 'Alita-extensions' ),\n 'type' => Controls_Manager::SWITCHER,\n 'label_on' => esc_html__( 'Enable', 'Alita-extensions' ),\n 'label_off' => esc_html__( 'Disable', 'Alita-extensions' ),\n 'return_value' => true,\n 'default' => false,\n ]\n );\n\n $this->add_control(\n 'savings_in',\n [\n 'label' => esc_html__( 'Savings in', 'Alita-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n\n 'amount' => esc_html__( 'Amount', 'Alita-extensions' ),\n 'percentage' => esc_html__( 'Percentage', 'Alita-extensions' ),\n ],\n 'default'=> 'amount',\n ]\n );\n\n $this->add_control(\n 'savings_text',\n [\n 'label' => esc_html__('Savings Text', 'Alita-extensions'),\n 'type' => Controls_Manager::TEXT,\n ]\n );\n\n $this->add_control(\n 'limit',\n [\n 'label' => esc_html__( 'Number of Products to display', 'Alita-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'description' => esc_html__('Enter the number of products to display', 'Alita-extensions'),\n ]\n );\n\n $this->add_control(\n 'product_choice',\n [\n 'label' => esc_html__( 'Product Choice', 'Alita-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n\n 'recent' =>esc_html__( 'Recent', 'Alita-extensions' ),\n 'random' =>esc_html__( 'Random', 'Alita-extensions' ),\n 'specific' =>esc_html__( 'Specific', 'Alita-extensions' ),\n ],\n 'default'=> 'recent',\n ]\n );\n\n\n $this->add_control(\n 'product_id',\n [\n 'label' => esc_html__('Product ID', 'Alita-extensions'),\n 'type' => Controls_Manager::TEXT,\n 'description' => esc_html__('Enter the product id seperate by comma(,).', 'Alita-extensions'),\n ]\n );\n\n $this->end_controls_section();\n\n }", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'section_content',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Content', 'elementor-gastenboek' ),\n\t\t\t)\n\t\t);\n\n $this->end_controls_section();\n\t}", "public function register_controls()\n {\n }", "protected function _register_controls() {\n\t}", "protected function _register_controls()\n {\n $this->start_controls_section(\n 'section_content',\n [\n 'label' => __('Content', 'uap-uganda'),\n ]\n );\n\n $this->add_control(\n 'posts',\n [\n 'label' => __('Number of Posts', 'uap-uganda'),\n 'type' => Controls_Manager::NUMBER,\n 'default' => 2\n ]\n );\n\n $this->add_control(\n 'posts_per_page',\n [\n 'label' => __('Posts Per Page', 'uap-uganda'),\n 'type' => Controls_Manager::NUMBER,\n 'default' => 2\n ]\n );\n\n $this->end_controls_section();\n }", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'section_content',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'elementor-hello-world' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Title', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'description',\n\t\t\t[\n\t\t\t\t'label' => __( 'Description', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'content',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::WYSIWYG,\n\t\t\t\t\n\t\t\t]\n\t\t);\n\n\n\t\t$this->end_controls_section();\n\t}", "protected function _register_controls() {\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => esc_html__( 'Content', 'electro-extensions' ),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'title',\n [\n 'label' => esc_html__( 'Title', 'electro-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'default' => '',\n 'placeholder' => esc_html__( 'Enter title', 'electro-extensions' ),\n ]\n );\n\n $this->add_control(\n 'show_savings',\n [\n 'label' => esc_html__( 'Show Savings Details', 'electro-extensions' ),\n 'type' => Controls_Manager::SWITCHER,\n 'label_on' => esc_html__( 'Enable', 'electro-extensions' ),\n 'label_off' => esc_html__( 'Disable', 'electro-extensions' ),\n 'return_value' => 'true',\n 'default' => 'false',\n ]\n );\n\n $this->add_control(\n 'savings_in',\n [\n 'label' => esc_html__( 'Savings in', 'electro-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n\n 'amount' => esc_html__( 'Amount', 'electro-extensions' ),\n 'percentage' => esc_html__( 'Percentage', 'electro-extensions' ),\n ],\n 'default'=> 'amount',\n ]\n );\n\n $this->add_control(\n 'savings_text',\n [\n 'label' => esc_html__('Savings Text', 'electro-extensions'),\n 'type' => Controls_Manager::TEXT,\n ]\n );\n\n $this->add_control(\n 'limit',\n [\n 'label' => esc_html__( 'Number of Products to display', 'electro-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'description' => esc_html__('Enter the number of products to display', 'electro-extensions'),\n ]\n );\n\n $this->add_control(\n 'product_choice',\n [\n 'label' => esc_html__( 'Product Choice', 'electro-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n\n 'recent' =>esc_html__( 'Recent', 'electro-extensions' ),\n 'random' =>esc_html__( 'Random', 'electro-extensions' ),\n 'specific' =>esc_html__( 'Specific', 'electro-extensions' ),\n ],\n 'default'=> 'recent',\n ]\n );\n\n\n $this->add_control(\n 'product_id',\n [\n 'label' => esc_html__('Product ID', 'electro-extensions'),\n 'type' => Controls_Manager::TEXT,\n 'description' => esc_html__('Enter the product id seperate by comma(,).', 'electro-extensions'),\n ]\n );\n\n $this->end_controls_section();\n\n }", "function customize_controls_init()\n {\n }", "function shoper_customize_register( $wp_customize ) {\n\n\t// Load custom controls.\n\n\tload_template( get_template_directory() . '/inc/customizer/core/control.php', true ) ;\n\t// Load customize sanitize.\n\tload_template( get_template_directory() . '/inc/customizer/core/sanitize.php', true ) ;\n\n\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\n\t\n\t/*theme option panel details*/\n\tload_template( get_template_directory() . '/inc/customizer/theme-option.php', false ) ;\n\t\n\t// Register custom section types.\n\t$wp_customize->register_section_type( 'shoper_Customize_Section_Upsell' );\n\n\t// Register sections.\n\t$wp_customize->add_section(\n\t\tnew shoper_Customize_Section_Upsell(\n\t\t\t$wp_customize,\n\t\t\t'theme_upsell',\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Upgrade to shoper Pro!', 'shoper' ),\n\t\t\t\t'pro_text' => esc_html__( 'Go PRO', 'shoper' ),\n\t\t\t\t'pro_url' => 'https://athemeart.com/downloads/shoper-best-woocommerce-themes/',\n\t\t\t\t'priority' => 1,\n\t\t\t)\n\t\t)\n\t);\n\t\n\t\n}", "public function register_hooks() {\n\t\t/*\n\t\t * ================================\n\t\t * Tackle the Customify sections and fields\n\t\t */\n\n\t\t/**\n\t\t * A few important notes regarding the capabilities that are at hand when configuring the Customizer sections:\n\t\t *\n\t\t * Each section, besides the 'options' array entry (aka the section fields), has a series of configurable attributes.\n\t\t * These are the defaults being used:\n\t\t *\n\t\t * 'priority' => 10, // This controls the order of each section (lower priority means earlier - towards the top)\n\t\t * 'panel' => $panel_id,\n\t\t * 'capability' => 'edit_theme_options', // what capabilities the current logged in user needs to be able to see this section\n\t\t * 'theme_supports' => '', // if the theme needs to declare some theme-supports for this section to be shown\n\t\t * 'title' => esc_html__( 'Title Section is required', '' ),\n\t\t * 'description' => '',\n\t\t * 'type' => 'default',\n\t\t * 'description_hidden' => false, // If the description should be hidden behind a (?) bubble\n\t\t *\n\t\t * @see WP_Customize_Section for more details about each of them.\n\t\t *\n\t\t * A few important notes regarding the capabilities that are at hand when configuring the 'options' (aka the fields):\n\t\t *\n\t\t * The array key of each option is the field ID.\n\t\t * Each option (aka field) has a series of configurable attributes.\n\t\t * These are the defaults being used:\n\t\t * 'type' => 'text', // The field type\n\t\t * 'label' => '', // The field label\n\t\t * 'priority' => 10, // This controls the order of each field (lower priority means earlier - towards the top)\n\t\t * 'desc' => '', // The field description\n\t\t * 'choices' => array(), // Used for radio, select, select2, preset, and radio_image types\n\t\t * 'input_attrs' => array(), // Used for range types\n\t\t * 'default' => '', // The default value of the field (numeric or string)\n\t\t * 'capability' => 'edit_theme_options', // What capabilities the current user needs to be able to see this field\n\t\t * 'active_callback' => '', // A callback function to determine if the field should be shown or not\n\t\t * 'sanitize_callback' => '', // A callback function to sanitize the field value on save\n\t\t * 'live' => false, // Whether to live refresh on option change\n\t\t *\n\t\t * There are our custom field types that support further attributes.\n\t\t * For details\n\t\t * @see PixCustomifyPlugin::register_field()\n\t\t * A look at these core classes (that are used by Customify) might also reveal valuable insights\n\t\t * @see WP_Customize_Setting\n\t\t * @see WP_Customize_Control\n\t\t * Please note that due to the fact that right now Customify \"holds\" the setting and control configuration\n\t\t * under the same array entry some deduction might be made upon fields registration\n\t\t * (e.g. the 'type' refers to the control type, but not the setting 'type' - that is under 'setting_type').\n\t\t */\n\n\t\t// Setup our footer Customify options\n\t\tadd_filter( 'customify_filter_fields', array( $this, 'addCustomifyOptions' ), 40, 1 );\n\n\t\t/*\n\t\t * ================================\n\t\t * Tackle the consequences of those Customify fields\n\t\t * Meaning adding classes, data attributes, etc here and there\n\t\t */\n\n\t\t// Add classes to the body element\n\t\tadd_filter( 'body_class', array( $this, 'bodyClasses' ), 10, 1 );\n\t}", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'plugin-name' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'url',\n\t\t\t[\n\t\t\t\t'label' => __( 'Nothing to do with this', 'elhelper' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'input_type' => 'url',\n\t\t\t\t'placeholder' => __( 'https://your-link.com ', 'elhelper' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t}", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'section_image',\n\t\t\t[\n\t\t\t\t'label' => __( 'Image', 'happyden' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'width',\n\t\t\t[\n\t\t\t\t'label' => __( 'Width', 'happyden' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t],\n\t\t\t\t'tablet_default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t],\n\t\t\t\t'mobile_default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ '%', 'px', 'vw' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .happyden-feature-image img' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'space',\n\t\t\t[\n\t\t\t\t'label' => __( 'Max Width', 'happyden' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t],\n\t\t\t\t'tablet_default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t],\n\t\t\t\t'mobile_default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ '%', 'px', 'vw' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .happyden-feature-image img' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'height',\n\t\t\t[\n\t\t\t\t'label' => __( 'Height', 'happyden' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'tablet_default' => [\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'mobile_default' => [\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px', 'vh' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 500,\n\t\t\t\t\t],\n\t\t\t\t\t'vh' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .happyden-feature-image img' => 'height: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'object-fit',\n\t\t\t[\n\t\t\t\t'label' => __( 'Object Fit', 'happyden' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'height[size]!' => '',\n\t\t\t\t],\n\t\t\t\t'options' => [\n\t\t\t\t\t'' => __( 'Default', 'happyden' ),\n\t\t\t\t\t'fill' => __( 'Fill', 'happyden' ),\n\t\t\t\t\t'cover' => __( 'Cover', 'happyden' ),\n\t\t\t\t\t'contain' => __( 'Contain', 'happyden' ),\n\t\t\t\t],\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .happyden-feature-image img' => 'object-fit: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\t}", "function options_theme_customizer_register($wp_customize) {\n\t \n\t$options = optionsframework_options();\n\t\n\t/* Add Layout Section */\n\n\t$wp_customize->add_section( 'options_theme_customizer_layout', array(\n\t\t'title' => __( 'Layout', 'options_theme_customizer' ),\n\t\t'priority' => 150\n\t) );\n\n\n\t\n\t// layout css selector\n\t\n\t$wp_customize->add_setting( 'options_theme_customizer[layout]', array(\n\t\t'default' => $options['layout']['std'],\n\t\t'type' => 'option'\n\t) );\n\n\t$wp_customize->add_control( 'options_theme_customizer_layout', array(\n\t\t'label' => $options['layout']['name'],\n\t\t'section' => 'options_theme_customizer_layout',\n\t\t'settings' => 'options_theme_customizer[layout]',\n\t\t'type' => $options['layout']['type'],\n\t\t'choices' => $options['layout']['options']\n\t) );\n\t\t\n\t\n\t// logo Uploader\n\t\n\t$wp_customize->add_setting( 'options_theme_customizer[logo]', array(\n\t\t'type' => 'option'\n\t) );\n\t\n\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo', array(\n\t\t'label' => $options['logo']['name'],\n\t\t'section' => 'options_theme_customizer_layout',\n\t\t'settings' => 'options_theme_customizer[logo]'\n\t) ) );\n\t\n\t\n\t//\n\t/* Typography Section */\n\t//\n\t\n\n\t$wp_customize->add_section( 'options_theme_customizer_typography', array(\n\t\t'title' => __( 'Typography', 'options_theme_customizer' ),\n\t\t'priority' => 130\n\t) );\n\t\n\t\n\t// Typography in customizer\n\t\n\t\n\t$wp_customize->add_setting( 'options_theme_customizer[typography]', array(\n\t\t'type' => 'option'\n\t) );\n\n\t$wp_customize->add_control( 'options_theme_customizer_typography', array(\n\t\t'label' => $options['typography']['name'],\n\t\t'section' => 'options_theme_customizer_typography',\n\t\t'settings' => 'options_theme_customizer[typography]',\n\t\t'type' => $options['typography']['type'],\n\t\t'choices' => $options['typography']['options']\n\t) );\n\t\n\t//\n\t\n\t\n\t//\n\t/* colors Section */\n\t//\n\t\n\t$wp_customize->add_section( 'options_theme_customizer_colors', array(\n\t\t'title' => __( 'Colors', 'options_theme_customizer' ),\n\t\t'priority' => 140\n\t) );\n\t\n\t\n\t// colors in customizer\n\t\n\t$wp_customize->add_setting( 'options_theme_customizer[colors]', array(\n\t\t'type' => 'option'\n\t) );\n\n\t$wp_customize->add_control( 'options_theme_customizer_colors', array(\n\t\t'label' => $options['colors']['name'],\n\t\t'section' => 'options_theme_customizer_colors',\n\t\t'settings' => 'options_theme_customizer[colors]',\n\t\t'type' => $options['colors']['type'],\n\t\t'choices' => $options['colors']['options']\n\t) );\n\t\n}", "protected function register_controls() {\n $this->start_controls_section(\n 'developer_tools',\n [\n 'label' => esc_html__( 'Developer Tools', 'bridge-core' ),\n 'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'shortcode_snippet',\n [\n 'label' => esc_html__( 'Show Shortcode Snippet', 'bridge-core' ),\n 'type' => \\Elementor\\Controls_Manager::SELECT,\n 'default' => 'no',\n 'options' => array(\n 'no' => esc_html__( 'No', 'bridge-core' ),\n 'yes' => esc_html__( 'Yes', 'bridge-core' ),\n ),\n ]\n );\n\n $this->end_controls_section();\n }", "protected function _register_controls()\n {\n $this->tab_content();\n $this->tab_style();\n }", "function chocorocco_customizer_register_controls( $wp_customize ) {\n\t\t// ---------------------------------\n\t\t\n\t\t// Remove unused sections\n\t\t$wp_customize->remove_section( 'colors');\n\t\t$wp_customize->remove_section( 'static_front_page');\n\n\t\t// Reorder standard WP sections\n\t\t$sec = $wp_customize->get_panel( 'nav_menus' );\n\t\tif (is_object($sec)) $sec->priority = 30;\n\t\t$sec = $wp_customize->get_panel( 'widgets' );\n\t\tif (is_object($sec)) $sec->priority = 40;\n\t\t$sec = $wp_customize->get_section( 'title_tagline' );\n\t\tif (is_object($sec)) $sec->priority = 50;\n\t\t$sec = $wp_customize->get_section( 'background_image' );\n\t\tif (is_object($sec)) $sec->priority = 60;\n\t\t$sec = $wp_customize->get_section( 'header_image' );\n\t\tif (is_object($sec)) $sec->priority = 80;\n\t\t$sec = $wp_customize->get_section( 'custom_css' );\n\t\tif (is_object($sec)) {\n\t\t\t$sec->title = '* ' . $sec->title;\n\t\t\t$sec->priority = 2000;\n\t\t}\n\t\t\n\t\t// Modify standard WP controls\n\t\t$sec = $wp_customize->get_control( 'blogname' );\n\t\tif (is_object($sec))\n\t\t\t$sec->description = esc_html__('Use \"[[\" and \"]]\" to modify style and color of parts of the text, \"||\" to break current line',\n\t\t\t\t\t\t\t\t\t\t\t'chocorocco');\n\t\t$sec = $wp_customize->get_setting( 'blogname' );\n\t\tif (is_object($sec)) $sec->transport = 'postMessage';\n\n\t\t$sec = $wp_customize->get_setting( 'blogdescription' );\n\t\tif (is_object($sec)) $sec->transport = 'postMessage';\n\t\t\n\t\t$sec = $wp_customize->get_section( 'background_image' );\n\t\tif (is_object($sec)) {\n\t\t\t$sec->title = esc_html__('Background', 'chocorocco');\n\t\t\t$sec->description = esc_html__('Used only if \"Content - Body style\" equal to \"boxed\"', 'chocorocco');\n\t\t}\n\t\t\n\t\t// Move standard option 'Background Color' to the section 'Background Image'\n\t\t$wp_customize->add_setting( 'background_color', array(\n\t\t\t'default' => get_theme_support( 'custom-background', 'default-color' ),\n\t\t\t'theme_supports' => 'custom-background',\n\t\t\t'transport'\t\t => 'postMessage',\n\t\t\t'sanitize_callback' => 'sanitize_hex_color_no_hash',\n\t\t\t'sanitize_js_callback' => 'maybe_hash_hex_color',\n\t\t) );\n\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'background_color', array(\n\t\t\t'label' => esc_html__( 'Background color', 'chocorocco' ),\n\t\t\t'section' => 'background_image',\n\t\t) ) );\n\t\t\n\n\t\t// Add Theme specific controls\n\t\t// ---------------------------------\n\t\t\n\t\t$panels = array('');\n\t\t$p = 0;\n\t\t$sections = array('');\n\t\t$s = 0;\n\t\t$i = 0;\n\n\t\t// Reload Theme Options before create controls\n\t\tif (is_admin()) {\n\t\t\tchocorocco_storage_set('options_reloaded', true);\n\t\t\tchocorocco_load_theme_options();\n\t\t}\n\t\t$options = chocorocco_storage_get('options');\n\t\t\n\t\tforeach ($options as $id=>$opt) {\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\tif (!empty($opt['hidden'])) continue;\n\t\t\t\n\t\t\tif ($opt['type'] == 'panel') {\n\n\t\t\t\t$sec = $wp_customize->get_panel( $id );\n\t\t\t\tif ( is_object($sec) && !empty($sec->title) ) {\n\t\t\t\t\t$sec->title = $opt['title'];\n\t\t\t\t\t$sec->description= $opt['desc'];\n\t\t\t\t\tif ( !empty($opt['priority']) )\t$sec->priority = $opt['priority'];\n\t\t\t\t} else {\n\t\t\t\t\t$wp_customize->add_panel( esc_attr($id) , array(\n\t\t\t\t\t\t'title' => $opt['title'],\n\t\t\t\t\t\t'description'=> $opt['desc'],\n\t\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\tarray_push($panels, $id);\n\t\t\t\t$p++;\n\n\t\t\t} else if ($opt['type'] == 'panel_end') {\n\n\t\t\t\tarray_pop($panels);\n\t\t\t\t$p--;\n\n\t\t\t} else if ($opt['type'] == 'section') {\n\n\t\t\t\t$sec = $wp_customize->get_section( $id );\n\t\t\t\tif ( is_object($sec) && !empty($sec->title) ) {\n\t\t\t\t\t$sec->title = $opt['title'];\n\t\t\t\t\t$sec->description= $opt['desc'];\n\t\t\t\t\tif ( !empty($opt['priority']) )\t$sec->priority = $opt['priority'];\n\t\t\t\t} else {\n\t\t\t\t\t$wp_customize->add_section( esc_attr($id) , array(\n\t\t\t\t\t\t'title' => $opt['title'],\n\t\t\t\t\t\t'description'=> $opt['desc'],\n\t\t\t\t\t\t'panel' => esc_attr($panels[$p]),\n\t\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\tarray_push($sections, $id);\n\t\t\t\t$s++;\n\n\t\t\t} else if ($opt['type'] == 'section_end') {\n\n\t\t\t\tarray_pop($sections);\n\t\t\t\t$s--;\n\n\t\t\t} else if ($opt['type'] == 'select') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => apply_filters('chocorocco_filter_options_get_list_choises', $opt['options'], $id)\n\t\t\t\t) );\n\n\t\t\t} else if ($opt['type'] == 'radio') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'choices' => apply_filters('chocorocco_filter_options_get_list_choises', $opt['options'], $id)\n\t\t\t\t) );\n\n\t\t\t} else if ($opt['type'] == 'switch') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new CHOCOROCCO_Customize_Switch_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'choices' => apply_filters('chocorocco_filter_options_get_list_choises', $opt['options'], $id)\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'checkbox') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'type' => 'checkbox'\n\t\t\t\t) );\n\n\t\t\t} else if ($opt['type'] == 'color') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'image') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else if (in_array($opt['type'], array('media', 'audio', 'video'))) {\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'icon') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new CHOCOROCCO_Customize_Icon_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'input_attrs' => array(\n\t\t\t\t\t\t'value' => chocorocco_get_theme_option($id),\n\t\t\t\t\t)\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'checklist') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new CHOCOROCCO_Customize_Checklist_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'choices' => apply_filters('chocorocco_filter_options_get_list_choises', $opt['options'], $id),\n\t\t\t\t\t'input_attrs' => array(\n\t\t\t\t\t\t'value' => chocorocco_get_theme_option($id),\n\t\t\t\t\t\t'sortable' => !empty($opt['sortable']),\n\t\t\t\t\t\t'dir' => !empty($opt['dir']) ? $opt['dir'] : 'horizontal'\n\t\t\t\t\t)\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'scheme_editor') {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( new CHOCOROCCO_Customize_Scheme_Editor_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'input_attrs' => array(\n\t\t\t\t\t\t'value' => chocorocco_get_theme_option($id),\n\t\t\t\t\t)\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'button') {\n\t\t\t\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\n\t\t\t\t$wp_customize->add_control( new CHOCOROCCO_Customize_Button_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'input_attrs' => array(\n\t\t\t\t\t\t'caption' => $opt['caption'],\n\t\t\t\t\t\t'action' => $opt['action']\n\t\t\t\t\t),\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'info') {\n\t\t\t\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_value',\n\t\t\t\t\t'transport' => 'postMessage'\n\t\t\t\t) );\n\n\t\t\t\t$wp_customize->add_control( new CHOCOROCCO_Customize_Info_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else if ($opt['type'] == 'hidden') {\n\t\t\t\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_html',\n\t\t\t\t\t'transport' => 'postMessage'\n\t\t\t\t) );\n\n\t\t\t\t$wp_customize->add_control( new CHOCOROCCO_Customize_Hidden_Control( $wp_customize, $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority' => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t) ) );\n\n\t\t\t} else {\t// if (in_array($opt['type'], array('text', 'textarea'))) {\n\n\t\t\t\t$wp_customize->add_setting( $id, array(\n\t\t\t\t\t'default' => chocorocco_get_theme_option($id),\n\t\t\t\t\t'sanitize_callback' => 'chocorocco_sanitize_html',\n\t\t\t\t\t'transport' => !isset($opt['refresh']) || $opt['refresh'] ? 'refresh' : 'postMessage'\n\t\t\t\t) );\n\t\t\t\n\t\t\t\t$wp_customize->add_control( $id, array(\n\t\t\t\t\t'label' => $opt['title'],\n\t\t\t\t\t'description' => $opt['desc'],\n\t\t\t\t\t'section' => esc_attr($sections[$s]),\n\t\t\t\t\t'priority'\t => !empty($opt['priority']) ? $opt['priority'] : CUSTOMIZE_PRIORITY+$i,\n\t\t\t\t\t'type' => $opt['type']\t//'text' | 'textarea'\n\t\t\t\t) );\n\t\t\t}\n\n\t\t}\n\t}", "protected function _register_controls() {\n\n\t\t//link\n\t\t//image\n\t\t//featured\n\t\t//term\n\t\t//style alternative-imagebox\n\t\t//\n\t\t//\n\n\n\t\t$this->start_controls_section(\n\t\t\t'section_content',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Content', 'elementor-listeo' ),\n\t\t\t)\n\t\t);\n\n\n\t\t$this->add_control(\n\t\t\t'url',\n\t\t\t[\n\t\t\t\t'label' => __( 'Link','elementor-listeo' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::URL,\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'elementor-listeo' ),\n\t\t\t\t'show_external' => true,\n\t\t\t\t'default' => [\n\t\t\t\t\t'url' => '',\n\t\t\t\t\t'is_external' => true,\n\t\t\t\t\t'nofollow' => true,\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\n\t\t$this->add_control(\n\t\t\t'background',\n\t\t\t[\n\t\t\t\t'label' => __( 'Choose Background Image', 'elementor-listeo' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::MEDIA,\n\t\t\t\t'default' => [\n\t\t\t\t\t'url' => \\Elementor\\Utils::get_placeholder_image_src(),\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\n\n\n\t\t// $this->add_control(\n\t\t// \t'featured',\n\t\t// \t[\n\t\t// \t\t'label' => __( 'Featured badge', 'elementor-listeo' ),\n\t\t// \t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t// \t\t'label_on' => __( 'Show', 'your-plugin' ),\n\t\t// \t\t'label_off' => __( 'Hide', 'your-plugin' ),\n\t\t// \t\t'return_value' => 'yes',\n\t\t// \t\t'default' => 'yes',\n\t\t// \t]\n\t\t// );\n\n\t\t$this->add_control(\n\t\t\t'taxonomy',\n\t\t\t[\n\t\t\t\t'label' => __( 'Taxonomy', 'elementor-listeo' ),\n\t\t\t\t'type' => Controls_Manager::SELECT2,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => [],\n\t\t\t\t'options' => $this->get_taxonomies(),\n\t\t\t\t\n\t\t\t]\n\t\t);\n\n\t\t$taxonomy_names = get_object_taxonomies( 'listing','object' );\n\t\tforeach ($taxonomy_names as $key => $value) {\n\t\n\t\t\t$this->add_control(\n\t\t\t\t$value->name.'term',\n\t\t\t\t[\n\t\t\t\t\t'label' => __( 'Show term from '.$value->label, 'elementor-listeo' ),\n\t\t\t\t\t'type' => Controls_Manager::SELECT2,\n\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t'default' => [],\n\t\t\t\t\t'options' => $this->get_terms($value->name),\n\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t'taxonomy' => $value->name,\n\t\t\t\t\t],\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\n\n\t\t$this->add_control(\n\t\t\t'show_counter',\n\t\t\t[\n\t\t\t\t'label' => __( 'Show listings counter', 'elementor-listeo' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'your-plugin' ),\n\t\t\t\t'label_off' => __( 'Hide', 'your-plugin' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t]\n\t\t);\n\n\n\t\t$this->add_control(\n\t\t\t'style',\n\t\t\t[\n\t\t\t\t'label' => __( 'Style ', 'elementor-listeo' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t'default' => 'alternative-imagebox',\n\t\t\t\t'options' => [\n\t\t\t\t\t'standard' => __( 'Standard', 'elementor-listeo' ),\n\t\t\t\t\t'alternative-imagebox' => __( 'Alternative', 'elementor-listeo' ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\n\t\t\n\n\t\t$this->end_controls_section();\n\n\t}", "private function setup_actions() {\r\n\r\n\t\t// Register panels, sections, settings, controls, and partials.\r\n\t\tadd_action( 'customize_register', array( $this, 'sections' ) );\r\n\r\n\t\t// Register scripts and styles for the controls.\r\n\t\tadd_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );\r\n\t}", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'settings',\n\t\t\t[\n\t\t\t\t'label' => __( 'Brand list Settings', 'xstore-core' ),\n\t\t\t\t'tab' \t=> \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'ids',\n\t\t\t[\n\t\t\t\t'label' \t=>\t__( 'Select Brand', 'xstore-core' ),\n\t\t\t\t'type' \t\t=>\t\\Elementor\\Controls_Manager::SELECT2,\n\t\t\t\t'multiple' \t=>\ttrue,\n\t\t\t\t'options' \t=>\tElementor::get_terms('brand'),\n\t\t\t\t'label_block'\t=> 'true',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hide_a_z',\n\t\t\t[\n\t\t\t\t'label' => __( 'Display A-Z filter', 'xstore-core' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'description' => __( 'Do not forget switch on Customize -> Speed Optimization -> Masonry Scripts', 'xstore-core' ),\n\t\t\t\t'label_on' => __( 'Yes', 'xstore-cores' ),\n\t\t\t\t'label_off' => __( 'No', 'xstore-cores' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'columns',\n\t\t\t[\n\t\t\t\t'label' \t=> __( 'Columns', 'xstore-core' ),\n\t\t\t\t'type' \t\t=> \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t'default' \t=> '',\n\t\t\t\t'options' \t=> [\n\t\t\t\t\t'1' => esc_attr__( '1', 'xstore' ),\n\t\t\t\t\t'2' => esc_attr__( '2', 'xstore' ),\n\t\t\t\t\t'3' => esc_attr__( '3', 'xstore' ),\n\t\t\t\t\t'4' => esc_attr__( '4', 'xstore' ),\n\t\t\t\t\t'5' => esc_attr__( '5', 'xstore' ),\n\t\t\t\t\t'6' => esc_attr__( '6', 'xstore' ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'alignment',\n\t\t\t[\n\t\t\t\t'label' \t => __( 'Alignment', 'xstore-core' ),\n\t\t\t\t'type' \t\t => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t'options' \t => [\n\t\t\t\t\t'left' \t => esc_html__('Left', 'xstore-core') , \n\t\t\t\t\t'center' => esc_html__('Center', 'xstore-core') , \n\t\t\t\t\t'right'\t => esc_html__('Right', 'xstore-core') \n\t\t\t\t],\n\t\t\t\t'default'\t => 'left'\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'capital_letter',\n\t\t\t[\n\t\t\t\t'label' => __( 'Display brands capital letter', 'xstore-core' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'xstore-cores' ),\n\t\t\t\t'label_off' => __( 'No', 'xstore-cores' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => '',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'brand_image',\n\t\t\t[\n\t\t\t\t'label' => __( 'Brand image', 'xstore-core' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'xstore-cores' ),\n\t\t\t\t'label_off' => __( 'No', 'xstore-cores' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => '',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'size',\n\t\t\t[\n\t\t\t\t'label' \t=>\t__( 'Images size', 'xstore-core' ),\n\t\t\t\t'type' \t\t=>\t\\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'condition' => ['brand_image' => 'yes'],\n\t\t\t\t'default' \t=>\t'',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'brand_title',\n\t\t\t[\n\t\t\t\t'label' \t\t=> __( 'Brand title', 'xstore-core' ),\n\t\t\t\t'type'\t\t\t=> \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' \t\t=> __( 'Yes', 'xstore-cores' ),\n\t\t\t\t'label_off' \t=> __( 'No', 'xstore-cores' ),\n\t\t\t\t'return_value' \t=> 'yes',\n\t\t\t\t'default' \t\t=> 'yes',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'tooltip',\n\t\t\t[\n\t\t\t\t'label' \t\t=> __( 'Title with tooltip', 'xstore-core' ),\n\t\t\t\t'type'\t\t\t=> \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' \t\t=> __( 'Yes', 'xstore-cores' ),\n\t\t\t\t'label_off' \t=> __( 'No', 'xstore-cores' ),\n\t\t\t\t'return_value' \t=> 'yes',\n\t\t\t\t'default' \t\t=> '',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'brand_desc',\n\t\t\t[\n\t\t\t\t'label' \t\t=> __( 'Brand description', 'xstore-core' ),\n\t\t\t\t'type'\t\t\t=> \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' \t\t=> __( 'Yes', 'xstore-cores' ),\n\t\t\t\t'label_off' \t=> __( 'No', 'xstore-cores' ),\n\t\t\t\t'return_value' \t=> 'yes',\n\t\t\t\t'default' \t\t=> '',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hide_empty',\n\t\t\t[\n\t\t\t\t'label' \t\t=> __( 'Hide empty', 'xstore-core' ),\n\t\t\t\t'type'\t\t\t=> \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' \t\t=> __( 'Yes', 'xstore-cores' ),\n\t\t\t\t'label_off' \t=> __( 'No', 'xstore-cores' ),\n\t\t\t\t'return_value' \t=> 'yes',\n\t\t\t\t'default' \t\t=> '',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'show_product_counts',\n\t\t\t[\n\t\t\t\t'label' \t\t=> __( 'Show Product Counts', 'xstore-core' ),\n\t\t\t\t'type'\t\t\t=> \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' \t\t=> __( 'Yes', 'xstore-cores' ),\n\t\t\t\t'label_off' \t=> __( 'No', 'xstore-cores' ),\n\t\t\t\t'return_value' \t=> 'yes',\n\t\t\t\t'default' \t\t=> '',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'class',\n\t\t\t[\n\t\t\t\t'label' \t=>\t__( 'Extra Class', 'xstore-core' ),\n\t\t\t\t'type' \t\t=>\t\\Elementor\\Controls_Manager::TEXT,\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t}", "protected function _register_controls() {\n\n $nav_menus = wp_get_nav_menus();\n\n $nav_menus_option = array(\n esc_html__( 'Select a menu', 'Alita-extensions' ) => '',\n );\n\n foreach ( $nav_menus as $key => $nav_menu ) {\n $nav_menus_option[$nav_menu->name] = $nav_menu->name;\n }\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => esc_html__( 'Content', 'Alita-extensions' ),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'title',\n [\n 'label' => esc_html__( 'Title', 'Alita-extensions' ),\n 'description' => esc_html__( 'Enter the title of menu.', 'Alita-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'default' => 'Alita Best Selling:',\n ]\n );\n\n $this->add_control(\n 'menu',\n [\n\n 'label' => esc_html__( 'Menu', 'Alita-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'default' => 'vertical-menu',\n 'options' => $nav_menus_option,\n ]\n );\n \n\n $this->end_controls_section();\n\n }", "function fik_2012_customize_register($wp_customize) {\n\n // We remove the Static front page customization section from theme customization screen with this theme\n //$wp_customize->remove_section('static_front_page');\n\n class fik_2012_Customize_Thumb_Select_Control extends WP_Customize_Control {\n\n public $type = 'select';\n\n public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n <select <?php $this->link(); ?>>\n <option value=\"fik2012-thumb-sq\" <?php selected($this->value(), \"fik2012-thumb-sq\"); ?>><?php _e('Square thumbnails', 'twentytwelve'); ?></option>\n <option value=\"fik2012-thumb-h\" <?php selected($this->value(), \"fik2012-thumb-h\"); ?>><?php _e('Horizontal thumbnails (4:3 ratio)', 'twentytwelve'); ?></option>\n <option value=\"fik2012-thumb-v\" <?php selected($this->value(), \"fik2012-thumb-v\"); ?>><?php _e('Vertical thumbnails (3:4 ratio)', 'twentytwelve'); ?></option>\n </select>\n </label>\n <?php\n }\n\n }\n\n class fik_2012_Customize_amount_input_Control extends WP_Customize_Control {\n\n public $type = 'input';\n\n public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n <input type=\"number\" <?php $this->link(); ?> min=\"1\" max=\"30\" step=\"1\" value=\"<?php echo $this->value(); ?>\" required=\"\">\n </label>\n <?php\n }\n\n }\n\n class fik_2012_Customize_Section_Select_Control extends WP_Customize_Control {\n\n public $type = 'select';\n\n public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n <?php\n $args = array(\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => true,\n 'fields' => 'all',\n 'hierarchical' => false\n );\n $myterms = get_terms('store-section', $args);\n echo \"<select \";\n $this->link();\n echo \">\";\n echo \"<option value=''>\" . __('All sections') . \"</option>\";\n foreach ($myterms as $term) {\n $root_url = get_bloginfo('url');\n $term_slug = $term->slug;\n $term_name = $term->name;\n echo \"<option value='\" . $term_slug . \"' \";\n selected($this->value(), $term_slug);\n echo \">\" . $term_name . \"</option>\";\n }\n echo \"</select>\";\n ?>\n <br>\n <div style=\"margin-left:4px;\"><?php _e('Most recent products from the specified Store Section will be displayed'); ?></div>\n </label>\n <?php\n }\n\n }\n\n class fik_2012_Customize_Category_Select_Control extends WP_Customize_Control {\n\n public $type = 'select';\n\n public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n <?php\n $args = array(\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => true,\n 'fields' => 'all',\n 'hierarchical' => false\n );\n $myterms = get_terms('category', $args);\n echo \"<select \";\n $this->link();\n echo \">\";\n echo \"<option value=''>\" . __('All categories') . \"</option>\";\n foreach ($myterms as $term) {\n $root_url = get_bloginfo('url');\n $term_slug = $term->slug;\n $term_name = $term->name;\n echo \"<option value='\" . $term_slug . \"' \";\n selected($this->value(), $term_slug);\n echo \">\" . $term_name . \"</option>\";\n }\n echo \"</select>\";\n ?>\n <br>\n <div style=\"margin-left:4px;\"><?php _e('Most recent posts from the specified Blog Category will be displayed'); ?></div>\n </label>\n <?php\n }\n\n }\n\n class fik_2012_Customize_Head_Align_Control extends WP_Customize_Control {\n\n public $type = 'radio';\n\n public function render_content() {\n ?>\n <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n <label>\n <input type=\"radio\" name=\"fik_head_align\" <?php $this->link(); ?> value=\"align-left\" <?php checked($this->value(), \"align-left\"); ?>><?php _e('Left', 'twentytwelve'); ?><br>\n </label>\n <label>\n <input type=\"radio\" name=\"fik_head_align\" <?php $this->link(); ?> value=\"align-center\" <?php checked($this->value(), \"align-center\"); ?>><?php _e('Center', 'twentytwelve'); ?><br>\n </label>\n <label>\n <input type=\"radio\" name=\"fik_head_align\" <?php $this->link(); ?> value=\"align-right\" <?php checked($this->value(), \"align-right\"); ?>><?php _e('Right', 'twentytwelve'); ?>\n </label>\n <?php\n }\n\n }\n\n class fik_2012_Customize_Head_Font_Control extends WP_Customize_Control {\n\n public $type = 'select';\n\n public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n <select <?php $this->link(); ?>>\n <option value=\"Open Sans\" <?php selected($this->value(), \"Open Sans\"); ?>><?php _e('Default (Open Sans)', 'twentytwelve'); ?></option>\n <option value=\"PT Sans\" <?php selected($this->value(), \"PT Sans\"); ?>><?php _e('PT Sans', 'twentytwelve'); ?></option>\n <option value=\"Josefin Sans\" <?php selected($this->value(), \"Josefin Sans\"); ?>><?php _e('Josefin Sans', 'twentytwelve'); ?></option>\n <option value=\"Krona One\" <?php selected($this->value(), \"Krona One\"); ?>><?php _e('Krona One', 'twentytwelve'); ?></option>\n <option value=\"McLaren\" <?php selected($this->value(), \"McLaren\"); ?>><?php _e('McLaren', 'twentytwelve'); ?></option>\n <option value=\"Cutive\" <?php selected($this->value(), \"Cutive\"); ?>><?php _e('Cutive', 'twentytwelve'); ?></option>\n <option value=\"Bree Serif\" <?php selected($this->value(), \"Bree Serif\"); ?>><?php _e('Bree Serif', 'twentytwelve'); ?></option>\n <option value=\"Clicker Script\" <?php selected($this->value(), \"Clicker Script\"); ?>><?php _e('Clicker Script', 'twentytwelve'); ?></option>\n <option value=\"Sacramento\" <?php selected($this->value(), \"Sacramento\"); ?>><?php _e('Sacramento', 'twentytwelve'); ?></option>\n <option value=\"Averia Libre\" <?php selected($this->value(), \"Averia Libre\"); ?>><?php _e('Averia Libre', 'twentytwelve'); ?></option>\n <option value=\"Press Start 2P\" <?php selected($this->value(), \"Press Start 2P\"); ?>><?php _e('Press Start 2P', 'twentytwelve'); ?></option>\n <option value=\"Sancreek\" <?php selected($this->value(), \"Sancreek\"); ?>><?php _e('Sancreek', 'twentytwelve'); ?></option>\n <option value=\"Fontdiner Swanky\" <?php selected($this->value(), \"Fontdiner Swanky\"); ?>><?php _e('Fontdiner Swanky', 'twentytwelve'); ?></option>\n </select>\n </label>\n <?php\n }\n\n }\n\n class fik_2012_Customize_Head_Size_Control extends WP_Customize_Control {\n\n public $type = 'select';\n\n public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n <select <?php $this->link(); ?>>\n <option value=\"26px\" <?php selected($this->value(), \"26px\"); ?>><?php _e('Default (26px)', 'twentytwelve'); ?></option>\n <option value=\"36px\" <?php selected($this->value(), \"36px\"); ?>><?php _e('36px', 'twentytwelve'); ?></option>\n <option value=\"46px\" <?php selected($this->value(), \"46px\"); ?>><?php _e('46px', 'twentytwelve'); ?></option>\n <option value=\"56px\" <?php selected($this->value(), \"56px\"); ?>><?php _e('56px', 'twentytwelve'); ?></option>\n <option value=\"66px\" <?php selected($this->value(), \"66px\"); ?>><?php _e('66px', 'twentytwelve'); ?></option>\n <option value=\"86px\" <?php selected($this->value(), \"86px\"); ?>><?php _e('86px', 'twentytwelve'); ?></option>\n <option value=\"106px\" <?php selected($this->value(), \"106px\"); ?>><?php _e('106px', 'twentytwelve'); ?></option>\n </select>\n </label>\n <?php\n }\n\n }\n\n //All our sections, settings, and controls will be added here\n $wp_customize->add_setting('fik_head_font', array(\n 'default' => 'Open Sans',\n 'transport' => 'refresh',\n ));\n $wp_customize->add_control(new fik_2012_Customize_Head_Font_Control($wp_customize, 'fik_head_font', array(\n 'label' => __('Site Title Font', 'twentytwelve'),\n 'section' => 'title_tagline',\n 'settings' => 'fik_head_font',\n )));\n $wp_customize->add_setting('fik_head_size', array(\n 'default' => '26px',\n 'transport' => 'refresh',\n ));\n $wp_customize->add_control(new fik_2012_Customize_Head_Size_Control($wp_customize, 'fik_head_size', array(\n 'label' => __('Site Title Size', 'twentytwelve'),\n 'section' => 'title_tagline',\n 'settings' => 'fik_head_size',\n )));\n $wp_customize->add_setting('fik_head_align', array(\n 'default' => 'align-center',\n 'transport' => 'refresh',\n ));\n $wp_customize->add_control(new fik_2012_Customize_Head_Align_Control($wp_customize, 'fik_head_align', array(\n 'label' => __('Site Header Alignment', 'twentytwelve'),\n 'section' => 'title_tagline',\n 'settings' => 'fik_head_align',\n )));\n $wp_customize->add_section('fik_2012_home_options', array(\n 'title' => __('Front Page Options', 'twentytwelve'),\n 'priority' => 100,\n ));\n $wp_customize->add_setting('fik_product_thumb_type', array(\n 'default' => 'fik2012-thumb-sq',\n 'transport' => 'refresh',\n ));\n $wp_customize->add_control(new fik_2012_Customize_Thumb_Select_Control($wp_customize, 'fik_product_thumb_type', array(\n 'label' => __('Product Thumbnail type', 'twentytwelve'),\n 'section' => 'fik_2012_home_options',\n 'settings' => 'fik_product_thumb_type',\n )));\n $wp_customize->add_setting('fik_home_section', array(\n 'default' => '',\n 'transport' => 'refresh',\n ));\n $wp_customize->add_control(new fik_2012_Customize_Section_Select_Control($wp_customize, 'fik_home_section', array(\n 'label' => __('Products to display in home', 'twentytwelve'),\n 'section' => 'fik_2012_home_options',\n 'settings' => 'fik_home_section',\n )));\n $wp_customize->add_setting('fik_home_product_amount', array(\n 'default' => '10',\n 'transport' => 'refresh',\n ));\n $wp_customize->add_control(new fik_2012_Customize_amount_input_Control($wp_customize, 'fik_home_product_amount', array(\n 'label' => __('Number of products in home', 'twentytwelve'),\n 'section' => 'fik_2012_home_options',\n 'settings' => 'fik_home_product_amount',\n )));\n $wp_customize->add_setting('fik_home_category', array(\n 'default' => '',\n 'transport' => 'refresh',\n ));\n $wp_customize->add_control(new fik_2012_Customize_Category_Select_Control($wp_customize, 'fik_home_category', array(\n 'label' => __('Posts to display in home', 'twentytwelve'),\n 'section' => 'fik_2012_home_options',\n 'settings' => 'fik_home_category',\n )));\n $wp_customize->add_setting('fik_home_post_amount', array(\n 'default' => '2',\n 'transport' => 'refresh',\n ));\n $wp_customize->add_control(new fik_2012_Customize_amount_input_Control($wp_customize, 'fik_home_post_amount', array(\n 'label' => __('Number of blog posts in home', 'twentytwelve'),\n 'section' => 'fik_2012_home_options',\n 'settings' => 'fik_home_post_amount',\n )));\n }", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'section_content',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'elementor-hello-world' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Title', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'Subtitle',\n\t\t\t[\n\t\t\t\t'label' => __( 'SubTitle', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'gallery',\n\t\t\t[\n\t\t\t\t'label' => __( 'Add Images', 'plugin-domain' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::GALLERY,\n\t\t\t\t'default' => [],\n\t\t\t]\n\t\t);\n\t\t\n\t\t\n\t\t\n\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'section_style',\n\t\t\t[\n\t\t\t\t'label' => __( 'Style', 'elementor-hello-world' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\n\t\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'content_typography',\n\t\t\t\t'label' => __( 'Typography', 'elementor-hello-world' ),\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .title',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'title_color',\n\t\t\t[\n\t\t\t\t'label' => __( 'Title Color', 'elementor-hello-world' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .title' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->add_control(\n\t\t\t'width',\n\t\t\t[\n\t\t\t\t'label' => __( 'Width', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t\t'step' => 5,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'size' => 50,\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .box' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'show_title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Show Title', 'elementor-hello-world' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'elementor-hello-world' ),\n\t\t\t\t'label_off' => __( 'Hide', 'elementor-hello-world' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t]\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\n\t\t\n\n\t\t$this->end_controls_section();\n\t\t\n\t\t$this->start_controls_section(\n\t\t\t'section_advanced',\n\t\t\t[\n\t\t\t\t'label' => __( 'Opacity Change', 'elementor-hello-world' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_ADVANCED,\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'title_color1', \n\t\t\t[\n\t\t\t\t'label' => __( 'Title Color', 'elementor-hello-world' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .title' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'transparent',\n\t\t\t[\n\t\t\t\t'label' => __( 'Enable', 'elementor-hello-world' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'On', 'elementor-hello-world' ),\n\t\t\t\t'label_off' => __( 'Off', 'elementor-hello-world' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => '',\n\t\t\t\t'frontend_available' => true,\n\t\t\t\t'prefix_class' => 'opacity-siva-border-',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .title2' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t\n\t\t$this->end_controls_section();\n\t}", "public function register(): void {\n\t\tacf_add_options_page($this->args);\n\t}", "protected function _register_controls()\n\t{\n\t\t$this->start_controls_section(\n\t\t\t'section_custom_notice',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Custom Notice', 'elementor'),\n\t\t\t\t'tab' => Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'custom_notice',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Custom Notice', 'webt'),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t'placeholder' => esc_html('A custom notice to any page on your site'),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'custom_type_notice',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Custom Notice Type', 'webt'),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'solid',\n\t\t\t\t'options' => [\n\t\t\t\t\t'success' => __('Success', 'webt'),\n\t\t\t\t\t'error' => __('Error', 'webt'),\n\t\t\t\t\t'notice' => __('Notice', 'webt'),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'wc_custom_notice_warning',\n\t\t\t[\n\t\t\t\t'type' => Controls_Manager::RAW_HTML,\n\t\t\t\t'raw' => esc_html__('Add a custom notice to any page on your site', 'webt'),\n\t\t\t\t'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\t}", "protected function _register_controls()\n {\n\n $this->start_controls_section(\n 'section_content',\n [\n 'label' => __('Content', 'elementor-super-cat'),\n ]\n );\n\n\n $this->add_control(\n 'taxonomy',\n [\n 'label' => __('Name of taxonomy to filter', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::SELECT2,\n 'label_block' => true,\n 'options' => $this->get_taxonomies(),\n 'default' => isset($this->get_taxonomies()[0]) ? $this->get_taxonomies()[0] : []\n ]\n );\n\n $this->add_control(\n 'post_id',\n [\n 'label' => __('CSS ID of the post widget', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::TEXT,\n ]\n );\n\n $this->add_control(\n 'order_by',\n [\n 'label' => __('Order By', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::SELECT,\n 'default' => 'name',\n 'options' => [\n 'name' => __('Name', 'elementor-super-cat'),\n 'slug' => __('Slug', 'elementor-super-cat'),\n ],\n ]\n );\n\n $this->add_control(\n 'all_text',\n [\n 'label' => __('Text to show for <b>Show All</b>', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::TEXT,\n 'default' => \"all\"\n ]\n );\n\n $this->add_control(\n 'hide_empty',\n [\n 'label' => __('Hide empty', 'elementor'),\n 'type' => \\Elementor\\Controls_Manager::SWITCHER,\n 'description' => __('If ON empty filters will be hidden.', 'elementor'),\n ]\n );\n\n\n $this->add_control(\n 'invisible_filter',\n [\n 'label' => __('Remove Filter and display only currenct taxonomy', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::SWITCHER,\n 'description' => __('Removes the filter bar and only display related single related taxonomy', 'elementor'),\n ]\n );\n\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'section_style',\n [\n 'label' => __('Style', 'elementor-super-cat'),\n 'tab' => \\Elementor\\Controls_Manager::TAB_STYLE,\n ]\n );\n\n $this->add_control(\n 'color_filter',\n [\n 'label' => __('Color', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .elementor-portfolio__filter' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'color_filter_active',\n [\n 'label' => __('Active Color', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .elementor-portfolio__filter.elementor-active' => 'color: {{VALUE}};',\n ],\n ]\n );\n\n $this->add_group_control(\n 'typography',\n [\n 'name' => 'typography_filter',\n 'selector' => '{{WRAPPER}} .elementor-portfolio__filter',\n ]\n );\n\n $this->add_control(\n 'filter_item_spacing',\n [\n 'label' => __('Space Between', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::SLIDER,\n 'default' => [\n 'size' => 10,\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'selectors' => [\n '{{WRAPPER}} .elementor-portfolio__filter:not(:last-child)' => 'margin-right: calc({{SIZE}}{{UNIT}}/2)',\n '{{WRAPPER}} .elementor-portfolio__filter:not(:first-child)' => 'margin-left: calc({{SIZE}}{{UNIT}}/2)',\n ],\n ]\n );\n\n $this->add_control(\n 'filter_spacing',\n [\n 'label' => __('Spacing', 'elementor-super-cat'),\n 'type' => \\Elementor\\Controls_Manager::SLIDER,\n 'default' => [\n 'size' => 10,\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'selectors' => [\n '{{WRAPPER}} .elementor-portfolio__filters' => 'margin-bottom: {{SIZE}}{{UNIT}}',\n ],\n ]\n );\n\n $this->end_controls_section();\n }", "protected function register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'_section_style',\n\t\t\t[\n\t\t\t\t'label' => __( 'Advanced', 'elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_ADVANCED,\n\t\t\t]\n\t\t);\n\n\t\t// Element Name for the Navigator\n\t\t$this->add_control(\n\t\t\t'_title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Title', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::HIDDEN,\n\t\t\t\t'render_type' => 'none',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_margin',\n\t\t\t[\n\t\t\t\t'label' => __( 'Margin', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%', 'rem' ],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} > .elementor-widget-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_padding',\n\t\t\t[\n\t\t\t\t'label' => __( 'Padding', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%', 'rem' ],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} > .elementor-widget-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_z_index',\n\t\t\t[\n\t\t\t\t'label' => __( 'Z-Index', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t'min' => 0,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}}' => 'z-index: {{VALUE}};',\n\t\t\t\t],\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_element_id',\n\t\t\t[\n\t\t\t\t'label' => __( 'CSS ID', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'dynamic' => [\n\t\t\t\t\t'active' => true,\n\t\t\t\t],\n\t\t\t\t'default' => '',\n\t\t\t\t'title' => __( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'elementor' ),\n\t\t\t\t'style_transfer' => false,\n\t\t\t\t'classes' => 'elementor-control-direction-ltr',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_css_classes',\n\t\t\t[\n\t\t\t\t'label' => __( 'CSS Classes', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'dynamic' => [\n\t\t\t\t\t'active' => true,\n\t\t\t\t],\n\t\t\t\t'prefix_class' => '',\n\t\t\t\t'title' => __( 'Add your custom class WITHOUT the dot. e.g: my-class', 'elementor' ),\n\t\t\t\t'classes' => 'elementor-control-direction-ltr',\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'section_effects',\n\t\t\t[\n\t\t\t\t'label' => __( 'Motion Effects', 'elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_ADVANCED,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_animation',\n\t\t\t[\n\t\t\t\t'label' => __( 'Entrance Animation', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::ANIMATION,\n\t\t\t\t'frontend_available' => true,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'animation_duration',\n\t\t\t[\n\t\t\t\t'label' => __( 'Animation Duration', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => '',\n\t\t\t\t'options' => [\n\t\t\t\t\t'slow' => __( 'Slow', 'elementor' ),\n\t\t\t\t\t'' => __( 'Normal', 'elementor' ),\n\t\t\t\t\t'fast' => __( 'Fast', 'elementor' ),\n\t\t\t\t],\n\t\t\t\t'prefix_class' => 'animated-',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_animation!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_animation_delay',\n\t\t\t[\n\t\t\t\t'label' => __( 'Animation Delay', 'elementor' ) . ' (ms)',\n\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t'default' => '',\n\t\t\t\t'min' => 0,\n\t\t\t\t'step' => 100,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_animation!' => '',\n\t\t\t\t],\n\t\t\t\t'render_type' => 'none',\n\t\t\t\t'frontend_available' => true,\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'_section_background',\n\t\t\t[\n\t\t\t\t'label' => __( 'Background', 'elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_ADVANCED,\n\t\t\t]\n\t\t);\n\n\t\t$this->start_controls_tabs( '_tabs_background' );\n\n\t\t$this->start_controls_tab(\n\t\t\t'_tab_background_normal',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Background::get_type(),\n\t\t\t[\n\t\t\t\t'name' => '_background',\n\t\t\t\t'selector' => '{{WRAPPER}} > .elementor-widget-container',\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'_tab_background_hover',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Background::get_type(),\n\t\t\t[\n\t\t\t\t'name' => '_background_hover',\n\t\t\t\t'selector' => '{{WRAPPER}}:hover .elementor-widget-container',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_background_hover_transition',\n\t\t\t[\n\t\t\t\t'label' => __( 'Transition Duration', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 3,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'render_type' => 'ui',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} > .elementor-widget-container' => 'transition: background {{SIZE}}s',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'_section_border',\n\t\t\t[\n\t\t\t\t'label' => __( 'Border', 'elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_ADVANCED,\n\t\t\t]\n\t\t);\n\n\t\t$this->start_controls_tabs( '_tabs_border' );\n\n\t\t$this->start_controls_tab(\n\t\t\t'_tab_border_normal',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\t[\n\t\t\t\t'name' => '_border',\n\t\t\t\t'selector' => '{{WRAPPER}} > .elementor-widget-container',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_border_radius',\n\t\t\t[\n\t\t\t\t'label' => __( 'Border Radius', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} > .elementor-widget-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\t[\n\t\t\t\t'name' => '_box_shadow',\n\t\t\t\t'selector' => '{{WRAPPER}} > .elementor-widget-container',\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'_tab_border_hover',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\t[\n\t\t\t\t'name' => '_border_hover',\n\t\t\t\t'selector' => '{{WRAPPER}}:hover .elementor-widget-container',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_border_radius_hover',\n\t\t\t[\n\t\t\t\t'label' => __( 'Border Radius', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}}:hover > .elementor-widget-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\t[\n\t\t\t\t'name' => '_box_shadow_hover',\n\t\t\t\t'selector' => '{{WRAPPER}}:hover .elementor-widget-container',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_border_hover_transition',\n\t\t\t[\n\t\t\t\t'label' => __( 'Transition Duration', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 3,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .elementor-widget-container' => 'transition: background {{_background_hover_transition.SIZE}}s, border {{SIZE}}s, border-radius {{SIZE}}s, box-shadow {{SIZE}}s',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'_section_masking',\n\t\t\t[\n\t\t\t\t'label' => __( 'Mask', 'elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_ADVANCED,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_mask_switch',\n\t\t\t[\n\t\t\t\t'label' => __( 'Mask', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'On', 'elementor' ),\n\t\t\t\t'label_off' => __( 'Off', 'elementor' ),\n\t\t\t\t'default' => '',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control( '_mask_shape', [\n\t\t\t'label' => __( 'Shape', 'elementor' ),\n\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t'options' => $this->get_shapes(),\n\t\t\t'default' => 'circle',\n\t\t\t'selectors' => $this->get_mask_selectors( '-webkit-mask-image: url( ' . ELEMENTOR_ASSETS_URL . '/mask-shapes/{{VALUE}}.svg );' ),\n\t\t\t'condition' => [\n\t\t\t\t'_mask_switch!' => '',\n\t\t\t],\n\t\t] );\n\n\t\t$this->add_control(\n\t\t\t'_mask_image',\n\t\t\t[\n\t\t\t\t'label' => __( 'Image', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'media_type' => 'image',\n\t\t\t\t'should_include_svg_inline_option' => true,\n\t\t\t\t'library_type' => 'image/svg+xml',\n\t\t\t\t'dynamic' => [\n\t\t\t\t\t'active' => true,\n\t\t\t\t],\n\t\t\t\t'selectors' => $this->get_mask_selectors( '-webkit-mask-image: url( {{URL}} );' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_mask_switch!' => '',\n\t\t\t\t\t'_mask_shape' => 'custom',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_mask_notice',\n\t\t\t[\n\t\t\t\t'type' => Controls_Manager::HIDDEN,\n\t\t\t\t'raw' => __( 'Need More Shapes?', 'elementor' ) . '<br>' . sprintf( __( 'Explore additional Premium Shape packs and use them in your site. <a target=\"_blank\" href=\"%s\">Learn More</a>', 'elementor' ), 'https://go.elementor.com/mask-control' ),\n\t\t\t\t'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_mask_switch!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_mask_size',\n\t\t\t[\n\t\t\t\t'label' => __( 'Size', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'options' => [\n\t\t\t\t\t'contain' => __( 'Fit', 'elementor' ),\n\t\t\t\t\t'cover' => __( 'Fill', 'elementor' ),\n\t\t\t\t\t'custom' => __( 'Custom', 'elementor' ),\n\t\t\t\t],\n\t\t\t\t'default' => 'contain',\n\t\t\t\t'selectors' => $this->get_mask_selectors( '-webkit-mask-size: {{VALUE}};' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_mask_switch!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_mask_size_scale',\n\t\t\t[\n\t\t\t\t'label' => __( 'Scale', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', 'em', '%', 'vw' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 500,\n\t\t\t\t\t],\n\t\t\t\t\t'em' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'size' => 100,\n\t\t\t\t],\n\t\t\t\t'selectors' => $this->get_mask_selectors( '-webkit-mask-size: {{SIZE}}{{UNIT}};' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_mask_switch!' => '',\n\t\t\t\t\t'_mask_size' => 'custom',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_mask_position',\n\t\t\t[\n\t\t\t\t'label' => __( 'Position', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'options' => [\n\t\t\t\t\t'center center' => __( 'Center Center', 'elementor' ),\n\t\t\t\t\t'center left' => __( 'Center Left', 'elementor' ),\n\t\t\t\t\t'center right' => __( 'Center Right', 'elementor' ),\n\t\t\t\t\t'top center' => __( 'Top Center', 'elementor' ),\n\t\t\t\t\t'top left' => __( 'Top Left', 'elementor' ),\n\t\t\t\t\t'top right' => __( 'Top Right', 'elementor' ),\n\t\t\t\t\t'bottom center' => __( 'Bottom Center', 'elementor' ),\n\t\t\t\t\t'bottom left' => __( 'Bottom Left', 'elementor' ),\n\t\t\t\t\t'bottom right' => __( 'Bottom Right', 'elementor' ),\n\t\t\t\t\t'custom' => __( 'Custom', 'elementor' ),\n\t\t\t\t],\n\t\t\t\t'default' => 'center center',\n\t\t\t\t'selectors' => $this->get_mask_selectors( '-webkit-mask-position: {{VALUE}};' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_mask_switch!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_mask_position_x',\n\t\t\t[\n\t\t\t\t'label' => __( 'X Position', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', 'em', '%', 'vw' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => -500,\n\t\t\t\t\t\t'max' => 500,\n\t\t\t\t\t],\n\t\t\t\t\t'em' => [\n\t\t\t\t\t\t'min' => -100,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => -100,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => -100,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'size' => 0,\n\t\t\t\t],\n\t\t\t\t'selectors' => $this->get_mask_selectors( '-webkit-mask-position-x: {{SIZE}}{{UNIT}};' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_mask_switch!' => '',\n\t\t\t\t\t'_mask_position' => 'custom',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_mask_position_y',\n\t\t\t[\n\t\t\t\t'label' => __( 'Y Position', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', 'em', '%', 'vw' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => -500,\n\t\t\t\t\t\t'max' => 500,\n\t\t\t\t\t],\n\t\t\t\t\t'em' => [\n\t\t\t\t\t\t'min' => -100,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => -100,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => -100,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default' => [\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t\t'size' => 0,\n\t\t\t\t],\n\t\t\t\t'selectors' => $this->get_mask_selectors( '-webkit-mask-position-y: {{SIZE}}{{UNIT}};' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_mask_switch!' => '',\n\t\t\t\t\t'_mask_position' => 'custom',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_mask_repeat',\n\t\t\t[\n\t\t\t\t'label' => __( 'Repeat', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'options' => [\n\t\t\t\t\t'no-repeat' => __( 'No-Repeat', 'elementor' ),\n\t\t\t\t\t'repeat' => __( 'Repeat', 'elementor' ),\n\t\t\t\t\t'repeat-x' => __( 'Repeat-X', 'elementor' ),\n\t\t\t\t\t'repeat-Y' => __( 'Repeat-Y', 'elementor' ),\n\t\t\t\t\t'round' => __( 'Round', 'elementor' ),\n\t\t\t\t\t'space' => __( 'Space', 'elementor' ),\n\t\t\t\t],\n\t\t\t\t'default' => 'no-repeat',\n\t\t\t\t'selectors' => $this->get_mask_selectors( '-webkit-mask-repeat: {{VALUE}};' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_mask_switch!' => '',\n\t\t\t\t\t'_mask_size!' => 'cover',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'_section_position',\n\t\t\t[\n\t\t\t\t'label' => __( 'Positioning', 'elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_ADVANCED,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_element_width',\n\t\t\t[\n\t\t\t\t'label' => __( 'Width', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => '',\n\t\t\t\t'options' => [\n\t\t\t\t\t'' => __( 'Default', 'elementor' ),\n\t\t\t\t\t'inherit' => __( 'Full Width', 'elementor' ) . ' (100%)',\n\t\t\t\t\t'auto' => __( 'Inline', 'elementor' ) . ' (auto)',\n\t\t\t\t\t'initial' => __( 'Custom', 'elementor' ),\n\t\t\t\t],\n\t\t\t\t'selectors_dictionary' => [\n\t\t\t\t\t'inherit' => '100%',\n\t\t\t\t],\n\t\t\t\t'prefix_class' => 'elementor-widget%s__width-',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}}' => 'width: {{VALUE}}; max-width: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_element_custom_width',\n\t\t\t[\n\t\t\t\t'label' => __( 'Custom Width', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_element_width' => 'initial',\n\t\t\t\t],\n\t\t\t\t'device_args' => [\n\t\t\t\t\tControls_Stack::RESPONSIVE_TABLET => [\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'_element_width_tablet' => [ 'initial' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\tControls_Stack::RESPONSIVE_MOBILE => [\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'_element_width_mobile' => [ 'initial' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px', '%', 'vw' ],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}}' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_element_vertical_align',\n\t\t\t[\n\t\t\t\t'label' => __( 'Vertical Align', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => [\n\t\t\t\t\t'flex-start' => [\n\t\t\t\t\t\t'title' => __( 'Start', 'elementor' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-top',\n\t\t\t\t\t],\n\t\t\t\t\t'center' => [\n\t\t\t\t\t\t'title' => __( 'Center', 'elementor' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-middle',\n\t\t\t\t\t],\n\t\t\t\t\t'flex-end' => [\n\t\t\t\t\t\t'title' => __( 'End', 'elementor' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-bottom',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_element_width!' => '',\n\t\t\t\t\t'_position' => '',\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}}' => 'align-self: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_position_description',\n\t\t\t[\n\t\t\t\t'raw' => '<strong>' . __( 'Please note!', 'elementor' ) . '</strong> ' . __( 'Custom positioning is not considered best practice for responsive web design and should not be used too frequently.', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::RAW_HTML,\n\t\t\t\t'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',\n\t\t\t\t'render_type' => 'ui',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_position!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_position',\n\t\t\t[\n\t\t\t\t'label' => __( 'Position', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => '',\n\t\t\t\t'options' => [\n\t\t\t\t\t'' => __( 'Default', 'elementor' ),\n\t\t\t\t\t'absolute' => __( 'Absolute', 'elementor' ),\n\t\t\t\t\t'fixed' => __( 'Fixed', 'elementor' ),\n\t\t\t\t],\n\t\t\t\t'prefix_class' => 'elementor-',\n\t\t\t\t'frontend_available' => true,\n\t\t\t]\n\t\t);\n\n\t\t$start = is_rtl() ? __( 'Right', 'elementor' ) : __( 'Left', 'elementor' );\n\t\t$end = ! is_rtl() ? __( 'Right', 'elementor' ) : __( 'Left', 'elementor' );\n\n\t\t$this->add_control(\n\t\t\t'_offset_orientation_h',\n\t\t\t[\n\t\t\t\t'label' => __( 'Horizontal Orientation', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'toggle' => false,\n\t\t\t\t'default' => 'start',\n\t\t\t\t'options' => [\n\t\t\t\t\t'start' => [\n\t\t\t\t\t\t'title' => $start,\n\t\t\t\t\t\t'icon' => 'eicon-h-align-left',\n\t\t\t\t\t],\n\t\t\t\t\t'end' => [\n\t\t\t\t\t\t'title' => $end,\n\t\t\t\t\t\t'icon' => 'eicon-h-align-right',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'classes' => 'elementor-control-start-end',\n\t\t\t\t'render_type' => 'ui',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_position!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_offset_x',\n\t\t\t[\n\t\t\t\t'label' => __( 'Offset', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => -1000,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vh' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => '0',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px', '%', 'vw', 'vh' ],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'body:not(.rtl) {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}',\n\t\t\t\t\t'body.rtl {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_offset_orientation_h!' => 'end',\n\t\t\t\t\t'_position!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_offset_x_end',\n\t\t\t[\n\t\t\t\t'label' => __( 'Offset', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => -1000,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vh' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => '0',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px', '%', 'vw', 'vh' ],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'body:not(.rtl) {{WRAPPER}}' => 'right: {{SIZE}}{{UNIT}}',\n\t\t\t\t\t'body.rtl {{WRAPPER}}' => 'left: {{SIZE}}{{UNIT}}',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_offset_orientation_h' => 'end',\n\t\t\t\t\t'_position!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'_offset_orientation_v',\n\t\t\t[\n\t\t\t\t'label' => __( 'Vertical Orientation', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'toggle' => false,\n\t\t\t\t'default' => 'start',\n\t\t\t\t'options' => [\n\t\t\t\t\t'start' => [\n\t\t\t\t\t\t'title' => __( 'Top', 'elementor' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-top',\n\t\t\t\t\t],\n\t\t\t\t\t'end' => [\n\t\t\t\t\t\t'title' => __( 'Bottom', 'elementor' ),\n\t\t\t\t\t\t'icon' => 'eicon-v-align-bottom',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'render_type' => 'ui',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_position!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_offset_y',\n\t\t\t[\n\t\t\t\t'label' => __( 'Offset', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => -1000,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vh' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px', '%', 'vh', 'vw' ],\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => '0',\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}}' => 'top: {{SIZE}}{{UNIT}}',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_offset_orientation_v!' => 'end',\n\t\t\t\t\t'_position!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'_offset_y_end',\n\t\t\t[\n\t\t\t\t'label' => __( 'Offset', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => -1000,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vh' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t\t'vw' => [\n\t\t\t\t\t\t'min' => -200,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px', '%', 'vh', 'vw' ],\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => '0',\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}}' => 'bottom: {{SIZE}}{{UNIT}}',\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'_offset_orientation_v' => 'end',\n\t\t\t\t\t'_position!' => '',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'_section_responsive',\n\t\t\t[\n\t\t\t\t'label' => __( 'Responsive', 'elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_ADVANCED,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'responsive_description',\n\t\t\t[\n\t\t\t\t'raw' => __( 'Responsive visibility will take effect only on preview or live page, and not while editing in Elementor.', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::RAW_HTML,\n\t\t\t\t'content_classes' => 'elementor-descriptor',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hide_desktop',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hide On Desktop', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'default' => '',\n\t\t\t\t'prefix_class' => 'elementor-',\n\t\t\t\t'label_on' => 'Hide',\n\t\t\t\t'label_off' => 'Show',\n\t\t\t\t'return_value' => 'hidden-desktop',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hide_tablet',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hide On Tablet', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'default' => '',\n\t\t\t\t'prefix_class' => 'elementor-',\n\t\t\t\t'label_on' => 'Hide',\n\t\t\t\t'label_off' => 'Show',\n\t\t\t\t'return_value' => 'hidden-tablet',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'hide_mobile',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hide On Mobile', 'elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'default' => '',\n\t\t\t\t'prefix_class' => 'elementor-',\n\t\t\t\t'label_on' => 'Hide',\n\t\t\t\t'label_off' => 'Show',\n\t\t\t\t'return_value' => 'hidden-phone',\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t\tPlugin::$instance->controls_manager->add_custom_attributes_controls( $this );\n\n\t\tPlugin::$instance->controls_manager->add_custom_css_controls( $this );\n\t}", "function media_customize_register( $wp_customize )\n{\n\t$wp_customize->add_section( 'media_integration' , array(\n 'title' => __('Media Integration'),\n 'priority' => 30,\n 'description'=> __('Necessary details for the accounts that are to be integrated into the Theme.')\n\t) );\n\t$wp_customize->add_setting( 'vimeo_user_id' , array(\n\t 'default' => '',\n\t 'transport' => 'refresh',\n\t 'type'\t\t => 'option'\n\t) );\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'vimeo_id', array(\n\t\t'label' => __( 'Vimeo User ID' ),\n\t\t'section' => 'media_integration',\n\t\t'settings' => 'vimeo_user_id'\n\t) ) );\n\t$wp_customize->add_setting( 'flickr_api_key' , array(\n\t 'default' => '',\n\t 'transport' => 'refresh',\n\t 'type'\t\t => 'option'\n\t) );\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'flickr_api_key', array(\n\t\t'label' => __( 'Flickr API Key' ),\n\t\t'section' => 'media_integration',\n\t\t'settings' => 'flickr_api_key'\n\t) ) );\n\t$wp_customize->add_setting( 'flickr_user_id' , array(\n\t 'default' => '',\n\t 'transport' => 'refresh',\n\t 'type'\t\t => 'option'\n\t) );\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'flickr_id', array(\n\t\t'label' => __( 'Flickr User ID' ),\n\t\t'section' => 'media_integration',\n\t\t'settings' => 'flickr_user_id'\n\t) ) );\n}", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'section_style',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Style', 'woocommerce-builder-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'wc_style_warning',\n\t\t\t[\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::RAW_HTML,\n\t\t\t\t'raw' => esc_html__( 'This is the preview mode of the builder, this widget may not show properly you should view the result in the Product Page and The style of this widget is often affected by your theme and plugins. If you experience any such issue, try to switch to a basic theme and deactivate related plugins.', 'woocommerce-builder-elementor' ),\n\t\t\t\t'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',\n\t\t\t]\n\t\t);\n\t\t\n\n\t\t$this->end_controls_section();\n\n\t}", "protected function _register_controls() { \n /*Testimonials Content Section */\n $this->start_controls_section('premium_testimonial_person_settings',\n [\n 'label' => __('Author', 'premium-addons-for-elementor'),\n ]\n );\n \n /*Person Image*/\n $this->add_control('premium_testimonial_person_image',\n [\n 'label' => __('Image','premium-addons-for-elementor'),\n 'type' => Controls_Manager::MEDIA,\n 'dynamic' => [ 'active' => true ],\n 'default' => [\n 'url' => Utils::get_placeholder_image_src()\n ],\n 'description' => __( 'Choose an image for the author', 'premium-addons-for-elementor' ),\n 'show_label' => true,\n ]\n ); \n\n /*Person Image Shape*/\n $this->add_control('premium_testimonial_person_image_shape',\n [\n 'label' => __('Image Style', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SELECT,\n 'description' => __( 'Choose image style', 'premium-addons-for-elementor' ),\n 'options' => [\n 'square' => __('Square','premium-addons-for-elementor'),\n 'circle' => __('Circle','premium-addons-for-elementor'),\n 'rounded' => __('Rounded','premium-addons-for-elementor'),\n ],\n 'default' => 'circle',\n ]\n );\n \n /*Person Name*/ \n $this->add_control('premium_testimonial_person_name',\n [\n 'label' => __('Name', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::TEXT,\n 'dynamic' => [ 'active' => true ],\n 'default' => __('Person Name', 'premium-addons-for-elementor'),\n 'description' => __( 'Enter author name', 'premium-addons-for-elementor' ),\n 'label_block' => true\n ]\n );\n \n /*Name Title Tag*/\n $this->add_control('premium_testimonial_person_name_size',\n [\n 'label' => __('HTML Tag', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SELECT,\n 'description' => __( 'Select a heading tag for author name', 'premium-addons-for-elementor' ),\n 'options' => [\n 'h1' => 'H1',\n 'h2' => 'H2',\n 'h3' => 'H3',\n 'h4' => 'H4',\n 'h5' => 'H5',\n 'h6' => 'H6',\n ],\n 'default' => 'h3',\n 'label_block' => true,\n ]\n );\n \n /*End Person Content Section*/\n $this->end_controls_section();\n\n /*Start Company Content Section*/ \n $this->start_controls_section('premium_testimonial_company_settings',\n [\n 'label' => __('Company', 'premium-addons-for-elementor')\n ]\n );\n \n /*Company Name*/\n $this->add_control('premium_testimonial_company_name',\n [\n 'label' => __('Name', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::TEXT,\n 'dynamic' => [ 'active' => true ],\n 'default' => __('Company Name','premium-addons-for-elementor'),\n 'description' => __( 'Enter company name', 'premium-addons-for-elementor' ),\n 'label_block' => true,\n ]\n );\n \n /*Company Name Tag*/\n $this->add_control('premium_testimonial_company_name_size',\n [\n 'label' => __('HTML Tag', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SELECT,\n 'description' => __( 'Select a heading tag for company name', 'premium-addons-for-elementor' ),\n 'options' => [\n 'h1' => 'H1',\n 'h2' => 'H2',\n 'h3' => 'H3',\n 'h4' => 'H4',\n 'h5' => 'H5',\n 'h6' => 'H6', \n ],\n 'default' => 'h4',\n 'label_block' => true,\n ]\n );\n \n $this->add_control('premium_testimonial_company_link_switcher',\n [\n 'label' => __('Link', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n ]\n );\n \n /*Company Link */\n $this->add_control('premium_testimonial_company_link',\n [\n 'label' => __('Link', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::TEXT,\n 'dynamic' => [\n 'active' => true,\n 'categories' => [\n TagsModule::POST_META_CATEGORY,\n TagsModule::URL_CATEGORY\n ]\n ],\n 'description' => __( 'Add company URL', 'premium-addons-for-elementor' ),\n 'label_block' => true,\n 'condition' => [\n 'premium_testimonial_company_link_switcher' => 'yes'\n ]\n ]\n );\n \n /*Link Target*/ \n $this->add_control('premium_testimonial_link_target',\n [\n 'label' => __('Link Target', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SELECT,\n 'description' => __( 'Select link target', 'premium-addons-for-elementor' ),\n 'options' => [\n 'blank' => __('Blank'),\n 'parent' => __('Parent'),\n 'self' => __('Self'),\n 'top' => __('Top'),\n ],\n 'default' => __('blank','premium-addons-for-elementor'),\n 'condition' => [\n 'premium_testimonial_company_link_switcher' => 'yes'\n ]\n ]\n );\n \n /*End Company Content Section*/\n $this->end_controls_section();\n\n /*Start Testimonial Content Section*/\n $this->start_controls_section('premium_testimonial_settings',\n [\n 'label' => __('Content', 'premium-addons-for-elementor'),\n ]\n );\n\n /*Testimonial Content*/\n $this->add_control('premium_testimonial_content',\n [ \n 'label' => __('Testimonial Content', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::WYSIWYG,\n 'dynamic' => [ 'active' => true ],\n 'default' => __('Donec id elit non mi porta gravida at eget metus. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cras mattis consectetur purus sit amet fermentum. Nullam id dolor id nibh ultricies vehicula ut id elit. Donec id elit non mi porta gravida at eget metus.','premium-addons-for-elementor'),\n 'label_block' => true,\n ]\n );\n \n /*End Testimonial Content Section*/\n $this->end_controls_section();\n \n /*Image Styling*/\n $this->start_controls_section('premium_testimonial_image_style',\n [\n 'label' => __('Image', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE, \n ]\n );\n \n /*Image Size*/\n $this->add_control('premium_testimonial_img_size',\n [\n 'label' => __('Size', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', 'em'],\n 'default' => [\n 'unit' => 'px',\n 'size' => 110,\n ],\n 'range' => [\n 'px'=> [\n 'min' => 10,\n 'max' => 150,\n ]\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-img-wrapper'=> 'width: {{SIZE}}{{UNIT}}; height:{{SIZE}}{{UNIT}};',\n ]\n ]\n );\n\n /*Image Border Width*/\n $this->add_control('premium_testimonial_img_border_width',\n [\n 'label' => __('Border Width (PX)', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'unit' => 'px',\n 'size' => 2,\n ],\n 'range' => [\n 'px'=> [\n 'min' => 0,\n 'max' => 15,\n ]\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-person-image' => 'border-width: {{SIZE}}{{UNIT}};',\n ]\n ]\n );\n \n /*Image Border Color*/\n $this->add_control('premium_testimonial_image_border_color',\n [\n 'label' => __('Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-img-wrapper' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n $this->end_controls_section();\n \n /*Start Person Settings Section*/\n $this->start_controls_section('premium_testimonials_person_style', \n [\n 'label' => __('Author', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE, \n ]\n );\n \n /*Person Name Color*/\n $this->add_control('premium_testimonial_person_name_color',\n [\n 'label' => __('Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-person-name' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n /*Authohr Name Typography*/\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'author_name_typography',\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .premium-testimonial-person-name',\n ]\n );\n \n /*Separator Color*/\n $this->add_control('premium_testimonial_separator_color',\n [\n 'label' => __('Divider Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-separator' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n $this->end_controls_section();\n \n /*Start Company Settings Section*/\n $this->start_controls_section('premium_testimonial_company_style',\n [\n 'label' => __('Company', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE, \n ]\n );\n\n /*Company Name Color*/\n $this->add_control('premium_testimonial_company_name_color',\n [\n 'label' => __('Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_2,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-company-link' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n /*Company Typography*/\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'company_name_typography',\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .premium-testimonial-company-link',\n ]\n ); \n\n /*End Color Section*/\n $this->end_controls_section();\n \n /*Start Content Settings Section*/\n $this->start_controls_section('premium_testimonial_content_style',\n [\n 'label' => __('Content', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE, \n ]\n );\n\n /*Content Color*/\n $this->add_control('premium_testimonial_content_color',\n [\n 'label' => __('Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-text-wrapper' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n /*Content Typography*/\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'content_typography',\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .premium-testimonial-text-wrapper',\n ]\n ); \n \n \n /*Testimonial Text Margin*/\n $this->add_responsive_control('premium_testimonial_margin',\n [\n 'label' => __('Margin', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'default' =>[\n 'top' => 15,\n 'bottom'=> 15,\n 'left' => 0 ,\n 'right' => 0 ,\n 'unit' => 'px',\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-text-wrapper' => 'margin: {{top}}{{UNIT}} {{right}}{{UNIT}} {{bottom}}{{UNIT}} {{left}}{{UNIT}};',\n ]\n ]\n );\n\n /*End Content Settings Section*/\n $this->end_controls_section();\n \n /*Start Quotes Style Section*/\n $this->start_controls_section('premium_testimonial_quotes',\n [\n 'label' => __('Quotation Icon', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n \n /*Quotes Color*/ \n $this->add_control('premium_testimonial_quote_icon_color',\n [\n 'label' => __('Color','premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'default' => 'rgba(110,193,228,0.2)',\n 'selectors' => [\n '{{WRAPPER}} .fa' => 'color: {{VALUE}};',\n ]\n ]\n );\n\n /*Quotes Size*/\n $this->add_control('premium_testimonial_quotes_size',\n [\n 'label' => __('Size', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', '%', 'em'],\n 'default' => [\n 'unit' => 'px',\n 'size' => 120,\n ],\n 'range' => [\n 'px' => [\n 'min' => 5,\n 'max' => 250,\n ]\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-upper-quote, {{WRAPPER}} .premium-testimonial-lower-quote' => 'font-size: {{SIZE}}{{UNIT}};',\n ]\n ]\n );\n \n /*Upper Quote Position*/\n $this->add_responsive_control('premium_testimonial_upper_quote_position',\n [\n 'label' => __('Top Icon Position', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'default' =>[\n 'top' => 70,\n 'left' => 12 ,\n 'unit' => 'px',\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-upper-quote' => 'top: {{TOP}}{{UNIT}}; left:{{LEFT}}{{UNIT}};',\n ]\n ]\n );\n \n /*Lower Quote Position*/\n $this->add_responsive_control('premium_testimonial_lower_quote_position',\n [\n 'label' => __('Bottom Icon Position', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'default' =>[\n 'bottom' => 3,\n 'right' => 12,\n 'unit' => 'px',\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-lower-quote' => 'right: {{RIGHT}}{{UNIT}}; bottom: {{BOTTOM}}{{UNIT}};',\n ]\n ]\n );\n\n /*End Typography Section*/\n $this->end_controls_section();\n \n $this->start_controls_section('premium_testimonial_container_style',\n [\n 'label' => __('Container','premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n \n $this->add_group_control(\n Group_Control_Background::get_type(),\n [\n 'name' => 'premium_testimonial_background',\n 'types' => [ 'classic' , 'gradient' ],\n 'selector' => '{{WRAPPER}} .premium-testimonial-content-wrapper'\n ]\n );\n \n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'premium_testimonial_container_border',\n 'selector' => '{{WRAPPER}} .premium-testimonial-content-wrapper',\n ]\n );\n\n $this->add_control('premium_testimonial_container_border_radius',\n [\n 'label' => __('Border Radius', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', '%', 'em'],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-content-wrapper' => 'border-radius: {{SIZE}}{{UNIT}}'\n ]\n ]\n );\n \n $this->add_group_control(\n Group_Control_Box_Shadow::get_type(),\n [\n 'name' => 'premium_testimonial_container_box_shadow',\n 'selector' => '{{WRAPPER}} .premium-testimonial-content-wrapper',\n ]\n );\n \n $this->add_responsive_control('premium_testimonial_box_padding',\n [\n 'label' => __('Padding', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-content-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',\n ]\n ]\n );\n\n $this->end_controls_section();\n \n }", "protected function _register_controls() {\n parent::_register_controls();\n\n $this->start_controls_section(\n 'section_title',\n [\n 'label' => __( 'Single Product MultiVendor List', 'dokan' ),\n ]\n );\n\n $this->add_control(\n 'text',\n [\n 'label' => __( 'Title', 'dokan' ),\n 'default' => __( 'Other Available Vendor', 'dokan' ),\n 'placeholder' => __( 'Other Available Vendor', 'dokan' ),\n ]\n );\n\n $this->end_controls_section();\n }", "private function setup_actions() {\n\n\t\t// Register panels, sections, settings, controls, and partials.\n\t\tadd_action( 'customize_register', array( $this, 'sections' ) );\n\n\t\t// Register scripts and styles for the controls.\n\t\tadd_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );\n\t}", "private function setup_actions() {\n\n\t\t// Register panels, sections, settings, controls, and partials.\n\t\tadd_action( 'customize_register', array( $this, 'sections' ) );\n\n\t\t// Register scripts and styles for the controls.\n\t\tadd_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );\n\t}", "function themename_customize_register($wp_customize){\n \n $wp_customize->add_section('themename_color_scheme', array(\n 'title' => __('Color Scheme', 'themename'),\n 'description' => '',\n 'priority' => 120,\n ));\n\n $wp_customize->add_section('main-menu', array(\n 'title' => __('Main Menu'),\n 'description' => __('Edit Main Menu Navigation Items, currently only five menu items are allowed and can be edited.'),\n 'priority' => 160\n ));\n \n // =============================\n // = Text Input =\n // =============================\n $wp_customize->add_setting('themename_theme_options[text_test]', array(\n 'default' => 'Arse!',\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n \n ));\n \n $wp_customize->add_control('themename_text_test', array(\n 'label' => __('Text Test', 'themename'),\n 'section' => 'themename_color_scheme',\n 'settings' => 'themename_theme_options[text_test]',\n ));\n \n // =============================\n // = Radio Input =\n // =============================\n $wp_customize->add_setting('themename_theme_options[color_scheme]', array(\n 'default' => 'value2',\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n ));\n \n $wp_customize->add_control('themename_color_scheme', array(\n 'label' => __('Color Scheme', 'themename'),\n 'section' => 'themename_color_scheme',\n 'settings' => 'themename_theme_options[color_scheme]',\n 'type' => 'radio',\n 'choices' => array(\n 'value1' => 'Choice 1',\n 'value2' => 'Choice 2',\n 'value3' => 'Choice 3',\n ),\n ));\n \n // =============================\n // = Checkbox =\n // =============================\n $wp_customize->add_setting('themename_theme_options[checkbox_test]', array(\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n ));\n \n $wp_customize->add_control('display_header_text', array(\n 'settings' => 'themename_theme_options[checkbox_test]',\n 'label' => __('Display Header Text'),\n 'section' => 'themename_color_scheme',\n 'type' => 'checkbox',\n ));\n \n \n // =============================\n // = Select Box =\n // =============================\n $wp_customize->add_setting('themename_theme_options[header_select]', array(\n 'default' => 'value2',\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n \n ));\n $wp_customize->add_control( 'example_select_box', array(\n 'settings' => 'themename_theme_options[header_select]',\n 'label' => 'Select Something:',\n 'section' => 'themename_color_scheme',\n 'type' => 'select',\n 'choices' => array(\n 'value1' => 'Choice 1',\n 'value2' => 'Choice 2',\n 'value3' => 'Choice 3',\n ),\n ));\n \n \n // =============================\n // = Image Upload =\n // =============================\n $wp_customize->add_setting('themename_theme_options[image_upload_test]', array(\n 'default' => 'image.jpg',\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n \n ));\n \n $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'image_upload_test', array(\n 'label' => __('Image Upload Test', 'themename'),\n 'section' => 'themename_color_scheme',\n 'settings' => 'themename_theme_options[image_upload_test]',\n )));\n \n // =============================\n // = File Upload =\n // =============================\n $wp_customize->add_setting('themename_theme_options[upload_test]', array(\n 'default' => 'arse',\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n \n ));\n \n $wp_customize->add_control( new WP_Customize_Upload_Control($wp_customize, 'upload_test', array(\n 'label' => __('Upload Test', 'themename'),\n 'section' => 'themename_color_scheme',\n 'settings' => 'themename_theme_options[upload_test]',\n )));\n \n \n // =============================\n // = Color Picker =\n // =============================\n $wp_customize->add_setting('themename_theme_options[link_color]', array(\n 'default' => '#000',\n 'sanitize_callback' => 'sanitize_hex_color',\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n \n ));\n \n $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array(\n 'label' => __('Link Color', 'themename'),\n 'section' => 'themename_color_scheme',\n 'settings' => 'themename_theme_options[link_color]',\n )));\n \n \n // =============================\n // = Page Dropdown =\n // =============================\n $wp_customize->add_setting('themename_theme_options[page_test]', array(\n 'capability' => 'edit_theme_options',\n 'type' => 'option',\n \n ));\n \n $wp_customize->add_control('themename_page_test', array(\n 'label' => __('Page Test', 'themename'),\n 'section' => 'themename_color_scheme',\n 'type' => 'dropdown-pages',\n 'settings' => 'themename_theme_options[page_test]',\n ));\n\n // =====================\n // = Category Dropdown =\n // =====================\n $categories = get_categories();\n $cats = array();\n $i = 0;\n foreach($categories as $category){\n if($i==0){\n $default = $category->slug;\n $i++;\n }\n $cats[$category->slug] = $category->name;\n }\n \n $wp_customize->add_setting('_s_f_slide_cat', array(\n 'default' => $default\n ));\n $wp_customize->add_control( 'cat_select_box', array(\n 'settings' => '_s_f_slide_cat',\n 'label' => 'Select Category:',\n 'section' => '_s_f_home_slider',\n 'type' => 'select',\n 'choices' => $cats,\n ));\n}", "public function add_setting( $wp_customize ) {}", "protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore \n\n\t\t$this->register_general_content_controls();\n\n\t\t$this->register_count_content_controls();\n\n\t\t$this->register_helpful_information();\n\t}", "public function customize_controls_init()\n {\n }", "function theme_custamize_add_control($name, $id, $section, $default, $wp_customize) {\n $wp_customize->add_setting( $id, array( 'default' => $default, ) );\n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize,\n $id,\n array(\n 'label' => __( $name, $id ),\n 'section' => $section,\n 'settings' => $id,\n )\n )\n );\n}", "public function register() {\n\t\tadd_filter( 'mce_external_plugins', array( $this, 'enqueue_plugin_scripts' ) );\n\t\tadd_filter( 'mce_buttons', array( $this, 'register_buttons_to_editor' ) );\n\t\tadd_action( 'admin_head', array( $this, 'my_add_styles_admin' ) );\n\t\tadd_action( 'add_meta_boxes', array( $this, 'create_meta_box' ) );\n\t\tadd_action( 'save_post', array( $this, 'slider_meta_save' ) );\n\n\t}", "public function register ( $wp_customize ) {\n\n // Get enabled customizer panels\n $enabled_panels = array( 'styling' => true );\n $enabled_panels = get_option( 'athen_customizer_panels', $enabled_panels );\n if ( empty( $enabled_panels['styling'] ) ) {\n return;\n }\n\n // Top Bar\n $wp_customize->add_section( 'athen_topbar_styling' , array(\n 'title' => __( 'Styling', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_headertop',\n ) );\n\n // Toggle Bar\n $wp_customize->add_section( 'athen_togglebar_styling' , array(\n 'title' => __( 'Styling', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_togglebar',\n ) );\n\n // Header\n $wp_customize->add_section( 'athen_header_styling' , array(\n 'title' => __( 'Styling', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_header',\n ) );\n\n // Menu\n $wp_customize->add_section( 'athen_main_menu_styling' , array(\n 'title' => __( 'Styling: Main', 'athen_transl' ),\n 'priority' => 997,\n 'panel' => 'athen_menu',\n ) );\n\n // Mobile Menu\n $wp_customize->add_section( 'athen_mobile_menu_icons_styling' , array(\n 'title' => __( 'Styling: Mobile Icons Menu', 'athen_transl' ),\n 'priority' => 998,\n 'panel' => 'athen_menu',\n ) );\n\n // Sidr\n $wp_customize->add_section( 'athen_sidr_styling' , array(\n 'title' => __( 'Styling: Mobile Sidebar Menu', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_menu',\n ) );\n\n // Toggle Mobile Menu\n $wp_customize->add_section( 'athen_toggle_mobile_menu_styling' , array(\n 'title' => __( 'Styling: Mobile Toggle Menu', 'athen_transl' ),\n 'priority' => 9999,\n 'panel' => 'athen_menu',\n ) );\n\n // Sidebar styling\n $wp_customize->add_section( 'athen_sidebar_styling' , array(\n 'title' => __( 'Styling', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_sidebar',\n ) );\n\n // Footer\n $wp_customize->add_section( 'athen_footer_styling' , array(\n 'title' => __( 'Styling: Footer', 'athen_transl' ),\n 'priority' => 997,\n 'panel' => 'athen_footer',\n ) );\n\n // Footer - Bottom\n $wp_customize->add_section( 'athen_footer_bottom_styling' , array(\n 'title' => __( 'Styling: Footer Bottom', 'athen_transl' ),\n 'priority' => 998,\n 'panel' => 'athen_footer',\n ) );\n\n // Footer - Back to top link\n $wp_customize->add_section( 'athen_scroll_up_button_styling' , array(\n 'title' => __( 'Styling: Scroll Up Button', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_footer',\n ) );\n\n // Links & Buttons\n $wp_customize->add_section( 'athen_general_links_buttons' , array(\n 'title' => __( 'Links & Buttons', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_general',\n ) );\n\n // Forms\n $wp_customize->add_section( 'athen_general_forms' , array(\n 'title' => __( 'Forms', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_general',\n ) );\n\n // Callout\n $wp_customize->add_section( 'athen_callout_styling' , array(\n 'title' => __( 'Styling', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_callout',\n ) );\n\n // WooCommerce\n if ( ATHEN_CHECK_WOOCOMMERCE ) {\n $wp_customize->add_section( 'athen_woocommerce_styling' , array(\n 'title' => __( 'Styling', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_woocommerce',\n ) );\n }\n\n // Visual Composer\n if ( ATHEN_CHECK_VC ) {\n $wp_customize->add_section( 'athen_visual_composer_styling' , array(\n 'title' => __( 'Styling', 'athen_transl' ),\n 'priority' => 999,\n 'panel' => 'athen_visual_composer',\n ) );\n }\n\n // Get Styling Options\n $styling_options = $this->styling_options();\n\n // Loop through color options and add a theme customizer setting for it\n $count = 0;\n foreach( $styling_options as $option ) {\n\n // Get vals\n $count++;\n $id = $option[ 'id' ];\n $default = isset( $option[ 'default' ] ) ? $option[ 'default' ] : '';\n $transport = isset( $option[ 'transport' ] ) ? $option[ 'transport' ] : 'postMessage';\n $type = isset( $option[ 'type' ] ) ? $option[ 'type' ] : 'color';\n $section = isset( $option[ 'section' ] ) ? $option[ 'section' ] : 'athen_styling_other';\n $description = isset( $option[ 'description' ] ) ? $option[ 'description' ] : '';\n\n /* Check theme mod and set transport to refresh when value is set to fix a bug with the clear button\n if ( 'postMessage' == $transport && get_theme_mod( $option[ 'id' ] ) ) {\n $transport = 'refresh';\n }*/\n\n // Set all transports to refresh...too many WP bugs, lets see how people react\n $transport = 'refresh';\n\n // Setting\n if ( 'hr' == $type ) {\n $id = 'athen_hr_control[ '. $count .' ]';\n }\n $wp_customize->add_setting( $id, array(\n 'type' => 'theme_mod',\n 'default' => $default,\n 'transport' => $transport,\n 'sanitize_callback' => false,\n ) );\n\n // Control\n if ( 'hr' == $type ) {\n $wp_customize->add_control( new WPEX_HR_Control( $wp_customize, $id, array(\n 'label' => '',\n 'section' => $section,\n 'settings' => $id,\n 'priority' => $count,\n ) ) );\n } elseif ( 'text' == $type ) {\n $wp_customize->add_control( $option[ 'id' ], array(\n 'label' => $option[ 'label' ],\n 'section' => $section,\n 'settings' => $id,\n 'priority' => $count,\n 'type' => 'text',\n 'description' => $description,\n ) );\n } elseif( 'text_align' == $type ) {\n $wp_customize->add_control( $option[ 'id' ], array(\n 'label' => $option[ 'label' ],\n 'section' => $section,\n 'settings' => $id,\n 'priority' => $count,\n 'type' => 'select',\n 'description' => $description,\n 'choices' => array(\n 'default' => __( 'Default','athen_transl' ),\n 'left' => __( 'Left','athen_transl' ),\n 'right' => __( 'Right','athen_transl' ),\n 'center' => __( 'Center','athen_transl' ),\n ),\n ) );\n } else {\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $id, array(\n 'label' => $option[ 'label' ],\n 'section' => $section,\n 'settings' => $id,\n 'priority' => $count,\n 'description' => $description,\n ) ) );\n }\n }\n }", "function genesis_sample_customizer_register( $wp_customize ) {\n\n\t$appearance = genesis_get_config( 'appearance' );\n\n\t// Socials\n\t\n\t// Color Link\n\t$wp_customize->add_setting(\n\t\t'genesis_sample_link_color',\n\t\t[\n\t\t\t'default' => $appearance['default-colors']['link'],\n\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t]\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'genesis_sample_link_color',\n\t\t\t[\n\t\t\t\t'description' => __( 'Change the color of post info links and button blocks, the hover color of linked titles and menu items, and more.', 'genesis-sample' ),\n\t\t\t\t'label' => __( 'Link Color', 'genesis-sample' ),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'settings' => 'genesis_sample_link_color',\n\t\t\t]\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'genesis_sample_accent_color',\n\t\t[\n\t\t\t'default' => $appearance['default-colors']['accent'],\n\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t]\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'genesis_sample_accent_color',\n\t\t\t[\n\t\t\t\t'description' => __( 'Change the default hover color for button links, menu buttons, and submit buttons. The button block uses the Link Color.', 'genesis-sample' ),\n\t\t\t\t'label' => __( 'Accent Color', 'genesis-sample' ),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'settings' => 'genesis_sample_accent_color',\n\t\t\t]\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'genesis_sample_logo_width',\n\t\t[\n\t\t\t'default' => 350,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'genesis_sample_validate_logo_width',\n\t\t]\n\t);\n\n\t// Add a control for the logo size.\n\t$wp_customize->add_control(\n\t\t'genesis_sample_logo_width',\n\t\t[\n\t\t\t'label' => __( 'Logo Width', 'genesis-sample' ),\n\t\t\t'description' => __( 'The maximum width of the logo in pixels.', 'genesis-sample' ),\n\t\t\t'priority' => 9,\n\t\t\t'section' => 'title_tagline',\n\t\t\t'settings' => 'genesis_sample_logo_width',\n\t\t\t'type' => 'number',\n\t\t\t'input_attrs' => [\n\t\t\t\t'min' => 100,\n\t\t\t],\n\n\t\t]\n\t);\n\n}", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'main_gallery_settings',\n\t\t\t[\n\t\t\t\t'label' => __( 'Gallery Settings', 'elementor-main-gallery' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t 'style',\n\t\t \t[\n\t\t \t'label' \t=> esc_html__( 'Slider Type', 'essential-addons-elementor' ),\n\t\t \t'type' \t\t\t=> Controls_Manager::SELECT,\n\t\t \t'default' \t\t=> 'bxslider',\n\t\t \t'label_block' \t=> false,\n\t\t \t'options' \t\t=> [\t\t\t\t\n\t\t\t\t\t'instagram'=> esc_html__('Instagram', 'baldiyaat'),\n\t\t\t\t\t'gallery-slider'=> esc_html__('Gallery Slider Carousel', 'baldiyaat'),\n\t\t\t\t\t'simple-gallery'=> esc_html__('Simple Gallery', 'baldiyaat'),\n\t\t\t\t\t'video-slider'=> esc_html__('Video Gallery', 'baldiyaat')\n\t\t \t],\n\t\t \t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t 'gallery-columns',\n\t\t \t[\n\t\t \t'label' \t=> esc_html__( 'Column', 'essential-addons-elementor' ),\n\t\t \t'type' \t\t\t=> Controls_Manager::SELECT,\n\t\t \t'default' \t\t=> '2',\n\t\t \t'options' \t\t=> [\t\t\t\t\n\t\t\t\t\t'1' => esc_html__('1 Column', 'baldiyaat'),\n\t\t\t\t\t'2' => esc_html__('2 Column', 'baldiyaat'),\n\t\t\t\t\t'3' => esc_html__('3 Column', 'baldiyaat'),\n\t\t\t\t\t'4' => esc_html__('4 Column', 'baldiyaat'),\n\t\t\t\t\t'6' => esc_html__('6 Column', 'baldiyaat')\n\t\t \t],\n\t\t \t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'thumbnail-size',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Thumbnail Size', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'label_block' \t=> false,\n\t\t\t\t'default' => esc_html__( 'hide', 'essential-addons-elementor' ),\n\t\t \t'options' => wpha_get_thumbnail_list(),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'num-fetch',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Num Fetch', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => 10,\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'pagination',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Pagination', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'yes', 'essential-addons-elementor' ),\n\t\t\t\t'label_off' => __( 'no', 'essential-addons-elementor' ),\n\t\t\t\t'return_value' => 'enable',\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t\n\t\t/**\n\t\t * Gallery Text Settings\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'main_gallery_config_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Gallery Images', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'slider',\n\t\t\t[\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'seperator' => 'before',\n\t\t\t\t'default' => [\n\t\t\t\t\t[ 'main_gallery_settings_slide' => KODEFOREST_MAIN_URL . 'assets/gallery/simple-gallery.png' ],\n\t\t\t\t\t[ 'main_gallery_settings_slide' => KODEFOREST_MAIN_URL . 'assets/gallery/simple-gallery.png' ],\n\t\t\t\t\t[ 'main_gallery_settings_slide' => KODEFOREST_MAIN_URL . 'assets/gallery/simple-gallery.png' ],\n\t\t\t\t\t[ 'main_gallery_settings_slide' => KODEFOREST_MAIN_URL . 'assets/gallery/simple-gallery.png' ],\n\t\t\t\t\t[ 'main_gallery_settings_slide' => KODEFOREST_MAIN_URL . 'assets/gallery/simple-gallery.png' ],\n\t\t\t\t\t[ 'main_gallery_settings_slide' => KODEFOREST_MAIN_URL . 'assets/gallery/simple-gallery.png' ],\n\t\t\t\t\t[ 'main_gallery_settings_slide' => KODEFOREST_MAIN_URL . 'assets/gallery/simple-gallery.png' ],\n\t\t\t\t],\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'main_gallery_settings_slide',\n\t\t\t\t\t\t'label' => esc_html__( 'Image', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t\t\t'default' => [\n\t\t\t\t\t\t\t'url' => KODEFOREST_MAIN_URL . 'assets/gallery/simple-gallery.png',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'main_gallery_settings_slide_title',\n\t\t\t\t\t\t'label' => esc_html__( 'Image Title', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '', 'essential-addons-elementor' )\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'main_gallery_settings_slide_caption',\n\t\t\t\t\t\t'label' => esc_html__( 'Image Caption', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '', 'essential-addons-elementor' )\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'main_gallery_settings_enable_slide_link',\n\t\t\t\t\t\t'label' => __( 'Enable Image Link', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t\t\t'default' => 'false',\n\t\t\t\t\t\t'label_on' => esc_html__( 'Yes', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'label_off' => esc_html__( 'No', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'return_value' => 'true',\n\t\t\t\t\t\t\n\t\t\t\t \t],\n\t\t\t\t \t[\n\t\t\t\t\t\t'name' => 'main_gallery_settings_slide_link',\n\t\t\t\t\t\t'label' => esc_html__( 'Image Link', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => [\n\t\t \t\t\t'url' => '#',\n\t\t \t\t\t'is_external' => '',\n\t\t \t\t\t],\n\t\t \t\t\t'show_external' => true,\n\t\t \t\t\t'condition' => [\n\t\t \t\t\t\t'main_gallery_settings_enable_slide_link' => 'true'\n\t\t \t\t\t]\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'title_field' => '{{main_gallery_settings_slide_title}}',\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\t\t\n\t\t/**\n\t\t * Gallery Text Settings\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'main_gallery_color_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color & Design', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'main_galleryt_bghover_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Hover Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#d2973b',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .kode_gallery_fig:hover img' => 'background-color: {{VALUE}} !important;',\n\t\t\t\t],\n\t\t\t]\n\t\t);\t\t\n\t\t\n\t\t$this->add_control(\n\t\t\t'main_gallery_caption_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Image Caption Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#f4f4f4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .slide-item .slide-caption .slide-caption-des' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t\n\t\t$this->add_control(\n\t\t\t'main_gallery_button_bg_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Image Button BG Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#f4f4f4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .kode_gallery_fig:hover a' => 'background-color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t\n\t\t\n\t}", "public function register($wp_customize) {\n\n $wp_customize->get_setting('blogname')->transport = 'postMessage';\n $wp_customize->get_setting('blogdescription')->transport = 'postMessage';\n $wp_customize->remove_section('custom_css');\n\n $wp_customize->selective_refresh->add_partial('blogname', array(\n 'selector' => '.site-title a',\n 'render_callback' => array($this, 'customize_partial_blogname'),\n ));\n $wp_customize->selective_refresh->add_partial('blogdescription', array(\n 'selector' => '.site-description',\n 'render_callback' => array($this, 'customize_partial_blogdescription'),\n ));\n\n /**\n * LAYOUT/COLORS OPTIONS\n * ************************************************************************ */\n // Add Section for theme layout/colors\n $wp_customize->add_section('wp_chianti_layout_section', array(\n 'title' => __('WP Chianti Layout Settings', 'wp-chianti'),\n 'description' => __('', 'wp-chianti'),\n 'priority' => 1, // the higher the number the lower in the customizer from the top\n ));\n\n // Setting for Layout: Classico / Riserva\n $wp_customize->add_setting('wp_chianti_layout_option', array(\n 'default' => 'classico', // The default setting\n //'type' => 'theme_mod', // can use 'theme_mod' or 'option'\n ));\n\n // Add Control for Layout\n $wp_customize->add_control('wp_chianti_layout_option_control', array(\n 'label' => __('Layout', 'wp-chianti'), // label for the control\n 'description' => __('Layout description here...', 'wp-chianti'), // description of the control\n 'section' => 'wp_chianti_layout_section', // core ones are: 'title_tagline', 'colors', 'header_image', 'background_image', 'nav', 'static_front_page'\n 'settings' => 'wp_chianti_layout_option', // the setting \n 'type' => 'select', // core ones include: 'checkbox', 'radio', 'select', 'textarea', 'dropdown-pages', 'text'\n 'choices' => array(\n 'classico' => __('Classico', 'wp-chianti'),\n 'riserva' => __('Riserva', 'wp-chianti'),\n ), // associative array of 'value' => 'option user sees'\n 'priority' => 30, // the higher the number the lower it will appear from the top\n ));\n\n\n // Setting for Color scheme\n $wp_customize->add_setting('wp_chianti_colors_scheme_option', array(\n 'default' => 'prato',\n 'transport' => 'postMessage',\n ));\n\n // Add Control for Color Scheme\n $wp_customize->add_control(new WP_Chianti_Color_Scheme_Control($wp_customize, 'wp_chianti_colors_scheme_option_control', array(\n 'label' => __('Color Scheme', 'wp-chianti'),\n 'description' => __('Color Scheme description here...', 'wp-chianti'),\n 'settings' => 'wp_chianti_colors_scheme_option',\n 'section' => 'wp_chianti_layout_section',\n 'type' => 'radio',\n 'choices' => $this->theme_settings->getColors(),\n 'priority' => 31,\n ), $this->theme_settings->getColorsValues()));\n /*\n // Add Fonts Options\n $wp_customize->add_setting('wp_chianti_fonts_option', array(\n 'default' => 'opensans',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Chianti_Fonts_Control($wp_customize, 'wp_chianti_fonts_option_control', array(\n 'label' => __('Fonts', 'wp-chianti'),\n 'description' => __('Fonts description here...', 'wp-chianti'),\n 'settings' => 'wp_chianti_fonts_option',\n 'section' => 'wp_chianti_layout_section',\n 'type' => 'select',\n 'choices' => [\n 'lato' => 'Lato',\n 'opensans' => 'Open Sans'\n ],\n 'priority' => 29,\n )));\n */\n /**\n * SOCIAL OPTIONS\n * ************************************************************************ */\n // Add Section for theme Social Links\n $wp_customize->add_section('wp_chianti_social_section', array(\n 'title' => __('WP Chianti Social Settings', 'wp-chianti'),\n 'description' => __('Leave blank if you do not want to show the social link.', 'wp-chianti'),\n 'description_hidden' => false,\n 'priority' => 2, // the higher the number the lower in the customizer from the top\n ));\n\n\n // Facebook\n $wp_customize->add_setting('wp_chianti_social_facebook', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'social_sanitize_url')\n ));\n $wp_customize->add_control('wp_chianti_social_facebook', array(\n 'label' => __('Facebook', 'wp-chianti'),\n 'section' => 'wp_chianti_social_section',\n 'type' => 'text',\n ));\n\n // Twitter\n $wp_customize->add_setting('wp_chianti_social_twitter', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'social_sanitize_url')\n ));\n $wp_customize->add_control('wp_chianti_social_twitter', array(\n 'label' => __('Twitter', 'wp-chianti'),\n 'section' => 'wp_chianti_social_section',\n 'type' => 'text',\n ));\n\n // Google Plus\n $wp_customize->add_setting('wp_chianti_social_google_plus', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'social_sanitize_url')\n ));\n $wp_customize->add_control('wp_chianti_social_google_plus', array(\n 'label' => __('Google Plus', 'wp-chianti'),\n 'section' => 'wp_chianti_social_section',\n 'type' => 'text',\n ));\n\n // LinkedIn\n $wp_customize->add_setting('wp_chianti_social_linkedin', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'social_sanitize_url')\n ));\n $wp_customize->add_control('wp_chianti_social_linkedin', array(\n 'label' => __('LinkedIn', 'wp-chianti'),\n 'section' => 'wp_chianti_social_section',\n 'type' => 'text',\n ));\n\n // Youtube\n $wp_customize->add_setting('wp_chianti_social_youtube', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'social_sanitize_url')\n ));\n $wp_customize->add_control('wp_chianti_social_youtube', array(\n 'label' => __('YouTube', 'wp-chianti'),\n 'section' => 'wp_chianti_social_section',\n 'type' => 'text',\n ));\n\n // Instagram\n $wp_customize->add_setting('wp_chianti_social_instagram', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'social_sanitize_url')\n ));\n $wp_customize->add_control('wp_chianti_social_instagram', array(\n 'label' => __('Instagram', 'wp-chianti'),\n 'section' => 'wp_chianti_social_section',\n 'type' => 'text',\n ));\n\n // Pinterest\n $wp_customize->add_setting('wp_chianti_social_pinterest', array(\n 'default' => '',\n 'sanitize_callback' => array($this, 'social_sanitize_url')\n ));\n $wp_customize->add_control('wp_chianti_social_pinterest', array(\n 'label' => __('Pinterest', 'wp-chianti'),\n 'section' => 'wp_chianti_social_section',\n 'type' => 'text',\n ));\n\n // End register() \n }", "function admin_init() {\r\n register_setting($this->optionsName, $this->optionsName);\r\n wp_register_style('custom-page-extensions-admin-css', $this->pluginURL . '/includes/custom-page-extensions-admin.css');\r\n wp_register_script('custom-page-extensions-js', $this->pluginURL . '/js/custom-page-extensions.js');\r\n }", "function mtm_customize_register( $wp_customize ) {\n\t/**\n\t* Custom Control Base Class\n\t*\n\t* @author Anthony Hortin <http://maddisondesigns.com>\n\t* @license http://www.gnu.org/licenses/gpl-2.0.html\n\t* @link https://github.com/maddisondesigns\n\t*/\n\tclass Mtm_Custom_Control extends WP_Customize_Control {\n\t\tprotected function get_mtm_resource_url() {\n\t\t\tif ( strpos( wp_normalize_path( __DIR__ ), wp_normalize_path( WP_PLUGIN_DIR ) ) === 0 ) {\n\t\t\t\t// We're in a plugin directory and need to determine the url accordingly.\n\t\t\t\treturn plugin_dir_url( __DIR__ );\n\t\t\t}\n\n\t\t\treturn MTM_OPTIONS_PLUGIN_DIR;\n\t\t}\n\t}\n\n\t/**\n\t * Custom Section Base Class\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Custom_Section extends WP_Customize_Section {\n\t\tprotected function get_mtm_resource_url() {\n\t\t\tif ( strpos( wp_normalize_path( __DIR__ ), wp_normalize_path( WP_PLUGIN_DIR ) ) === 0 ) {\n\t\t\t\t// We're in a plugin directory and need to determine the url accordingly.\n\t\t\t\treturn plugin_dir_url( __DIR__ );\n\t\t\t}\n\n\t\t\treturn MTM_OPTIONS_PLUGIN_DIR;\n\t\t}\n\t}\n\n\t/**\n\t* Image Checkbox Custom Control\n\t*\n\t* @author Anthony Hortin <http://maddisondesigns.com>\n\t* @license http://www.gnu.org/licenses/gpl-2.0.html\n\t* @link https://github.com/maddisondesigns\n\t*/\n\tclass Mtm_Image_Checkbox_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t* The type of control being rendered\n\t\t*/\n\t\tpublic $type = 'image_checkbox';\n\t\t/**\n\t\t* Enqueue our scripts and styles\n\t\t*/\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t* Render the control in the customizer\n\t\t*/\n\t\tpublic function render_content() { ?>\n\t\t\t<div class=\"image_checkbox_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php\t$chkbox_values = explode( ',', esc_attr( $this->value() ) ); ?>\n\t\t\t\t<input type=\"hidden\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-multi-image-checkbox\" <?php $this->link(); ?> />\n\t\t\t\t<?php foreach ( $this->choices as $key => $value ) { ?>\n\t\t\t\t\t<label class=\"checkbox-label\">\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"<?php echo esc_attr( $key ); ?>\" value=\"<?php echo esc_attr( $key ); ?>\" <?php checked( in_array( esc_attr( $key ), $chkbox_values, true ), 1 ); ?> class=\"multi-image-checkbox\"/>\n\t\t\t\t\t\t<img src=\"<?php echo esc_attr( $value['image'] ); ?>\" alt=\"<?php echo esc_attr( $value['name'] ); ?>\" title=\"<?php echo esc_attr( $value['name'] ); ?>\" />\n\t\t\t\t\t</label>\n\t\t\t\t<?php\t} ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t* Text Radio Button Custom Control\n\t*\n\t* @author Anthony Hortin <http://maddisondesigns.com>\n\t* @license http://www.gnu.org/licenses/gpl-2.0.html\n\t* @link https://github.com/maddisondesigns\n\t*/\n\tclass Mtm_Text_Radio_Button_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'text_radio_button';\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"text_radio_button_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\n\t\t\t\t<div class=\"radio-buttons\">\n\t\t\t\t\t<?php foreach ( $this->choices as $key => $value ) { ?>\n\t\t\t\t\t\t<label class=\"radio-button-label\">\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $key ); ?>\" <?php $this->link(); ?> <?php checked( esc_attr( $key ), $this->value() ); ?>/>\n\t\t\t\t\t\t\t<span><?php echo esc_attr( $value ); ?></span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t<?php\t} ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t* Image Radio Button Custom Control\n\t*\n\t* @author Anthony Hortin <http://maddisondesigns.com>\n\t* @license http://www.gnu.org/licenses/gpl-2.0.html\n\t* @link https://github.com/maddisondesigns\n\t*/\n\tclass Mtm_Image_Radio_Button_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t* The type of control being rendered\n\t\t*/\n\t\tpublic $type = 'image_radio_button';\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t* Render the control in the customizer\n\t\t*/\n\t\tpublic function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"image_radio_button_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\n\t\t\t\t<?php foreach ( $this->choices as $key => $value ) { ?>\n\t\t\t\t\t<label class=\"radio-button-label\">\n\t\t\t\t\t\t<input type=\"radio\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $key ); ?>\" <?php $this->link(); ?> <?php checked( esc_attr( $key ), $this->value() ); ?>/>\n\t\t\t\t\t\t<img src=\"<?php echo esc_attr( $value['image'] ); ?>\" alt=\"<?php echo esc_attr( $value['name'] ); ?>\" title=\"<?php echo esc_attr( $value['name'] ); ?>\" />\n\t\t\t\t\t</label>\n\t\t\t\t<?php\t} ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Single Accordion Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Single_Accordion_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'single_accordion';\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t$allowed_html = array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'href' => array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'class' => array(),\n\t\t\t\t\t'target' => array(),\n\t\t\t\t),\n\t\t\t\t'br' => array(),\n\t\t\t\t'em' => array(),\n\t\t\t\t'strong' => array(),\n\t\t\t\t'i' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t);\n\t\t\t?>\n\t\t\t<div class=\"single-accordion-custom-control\">\n\t\t\t\t<div class=\"single-accordion-toggle\"><?php echo esc_html( $this->label ); ?><span class=\"accordion-icon-toggle dashicons dashicons-plus\"></span></div>\n\t\t\t\t<div class=\"single-accordion customize-control-description\">\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( is_array( $this->description ) ) {\n\t\t\t\t\t\techo '<ul class=\"single-accordion-description\">';\n\t\t\t\t\t\tforeach ( $this->description as $key => $value ) {\n\t\t\t\t\t\t\techo '<li>' . esc_attr( $key ) . wp_kses( $value, $allowed_html ) . '</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</ul>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo wp_kses( $this->description, $allowed_html );\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Simple Notice Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Simple_Notice_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'simple_notice';\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t$allowed_html = array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'href' => array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'class' => array(),\n\t\t\t\t\t'target' => array(),\n\t\t\t\t),\n\t\t\t\t'br' => array(),\n\t\t\t\t'em' => array(),\n\t\t\t\t'strong' => array(),\n\t\t\t\t'i' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t\t'span' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t\t'code' => array(),\n\t\t\t);\n\t\t\t?>\n\t\t\t<div class=\"simple-notice-custom-control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo wp_kses( $this->description, $allowed_html ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Slider Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Slider_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'slider_control';\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"slider-custom-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span><input type=\"number\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-slider-value\" <?php $this->link(); ?> />\n\t\t\t\t<div class=\"slider\" slider-min-value=\"<?php echo esc_attr( $this->input_attrs['min'] ); ?>\" slider-max-value=\"<?php echo esc_attr( $this->input_attrs['max'] ); ?>\" slider-step-value=\"<?php echo esc_attr( $this->input_attrs['step'] ); ?>\"></div><span class=\"slider-reset dashicons dashicons-image-rotate\" slider-reset-value=\"<?php echo esc_attr( $this->value() ); ?>\"></span>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Toggle Switch Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Toggle_Switch_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'toggle_switch';\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"toggle-switch-control\">\n\t\t\t\t<div class=\"toggle-switch\">\n\t\t\t\t\t<input type=\"checkbox\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" class=\"toggle-switch-checkbox\" value=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t\t<?php\n\t\t\t\t\t$this->link();\n\t\t\t\t\tchecked( $this->value() );\n\t\t\t\t\t?>\n\t\t\t\t\t>\n\t\t\t\t\t<label class=\"toggle-switch-label\" for=\"<?php echo esc_attr( $this->id ); ?>\">\n\t\t\t\t\t\t<span class=\"toggle-switch-inner\"></span>\n\t\t\t\t\t\t<span class=\"toggle-switch-switch\"></span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Sortable Repeater Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Sortable_Repeater_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'sortable_repeater';\n\t\t/**\n\t\t * Button labels\n\t\t */\n\t\tpublic $button_labels = array();\n\t\t/**\n\t\t * Constructor\n\t\t */\n\t\tpublic function __construct( $manager, $id, $args = array(), $options = array() ) {\n\t\t\tparent::__construct( $manager, $id, $args );\n\t\t\t// Merge the passed button labels with our default labels\n\t\t\t$this->button_labels = wp_parse_args(\n\t\t\t\t$this->button_labels,\n\t\t\t\tarray(\n\t\t\t\t\t'add' => __( 'Add', 'mtm' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"sortable_repeater_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<input type=\"hidden\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-sortable-repeater\" <?php $this->link(); ?> />\n\t\t\t\t<div class=\"sortable_repeater sortable\">\n\t\t\t\t\t<div class=\"repeater\">\n\t\t\t\t\t\t<input type=\"text\" value=\"\" class=\"repeater-input\" placeholder=\"https://\" /><span class=\"dashicons dashicons-sort\"></span><a class=\"customize-control-sortable-repeater-delete\" href=\"#\"><span class=\"dashicons dashicons-no-alt\"></span></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<button class=\"button customize-control-sortable-repeater-add\" type=\"button\"><?php echo wp_kses_post( $this->button_labels['add'] ); ?></button>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Dropdown Select2 Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Dropdown_Select2_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'dropdown_select2';\n\t\t/**\n\t\t * The type of Select2 Dropwdown to display. Can be either a single select dropdown or a multi-select dropdown. Either false for true. Default = false\n\t\t */\n\t\tprivate $multiselect = false;\n\t\t/**\n\t\t * The Placeholder value to display. Select2 requires a Placeholder value to be set when using the clearall option. Default = 'Please select...'\n\t\t */\n\t\tprivate $placeholder = 'Please select...';\n\t\t/**\n\t\t * Constructor\n\t\t */\n\t\tpublic function __construct( $manager, $id, $args = array(), $options = array() ) {\n\t\t\tparent::__construct( $manager, $id, $args );\n\t\t\t// Check if this is a multi-select field\n\t\t\tif ( isset( $this->input_attrs['multiselect'] ) && $this->input_attrs['multiselect'] ) {\n\t\t\t\t$this->multiselect = true;\n\t\t\t}\n\t\t\t// Check if a placeholder string has been specified\n\t\t\tif ( isset( $this->input_attrs['placeholder'] ) && $this->input_attrs['placeholder'] ) {\n\t\t\t\t$this->placeholder = $this->input_attrs['placeholder'];\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-select2-js', $this->get_mtm_resource_url() . 'js/select2.full.min.js', array( 'jquery' ), '4.0.13', true );\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'mtm-select2-js' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.1', 'all' );\n\t\t\twp_enqueue_style( 'mtm-select2-css', $this->get_mtm_resource_url() . 'css/select2.min.css', array(), '4.0.13', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t$default_value = $this->value();\n\t\t\tif ( $this->multiselect ) {\n\t\t\t\t$default_value = explode( ',', $this->value() );\n\t\t\t}\n\t\t\t?>\n\t\t\t<div class=\"dropdown_select2_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<label for=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-title\">\n\t\t\t\t\t\t<?php echo esc_html( $this->label ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<input type=\"hidden\" id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-dropdown-select2\" value=\"<?php echo esc_attr( $this->value() ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" <?php $this->link(); ?> />\n\t\t\t\t<select name=\"select2-list-<?php echo ( $this->multiselect ? 'multi[]' : 'single' ); ?>\" class=\"customize-control-select2\" data-placeholder=\"<?php echo esc_attr( $this->placeholder ); ?>\" <?php echo ( $this->multiselect ? 'multiple=\"multiple\" ' : '' ); ?>>\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( ! $this->multiselect ) {\n\t\t\t\t\t\t// When using Select2 for single selection, the Placeholder needs an empty <option> at the top of the list for it to work (multi-selects dont need this)\n\t\t\t\t\t\techo '<option></option>';\n\t\t\t\t\t}\n\t\t\t\t\tforeach ( $this->choices as $key => $value ) {\n\t\t\t\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t\t\t\techo '<optgroup label=\"' . esc_attr( $key ) . '\">';\n\t\t\t\t\t\t\tforeach ( $value as $optgroupkey => $optgroupvalue ) {\n\t\t\t\t\t\t\t\tif ( $this->multiselect ) {\n\t\t\t\t\t\t\t\t\techo '<option value=\"' . esc_attr( $optgroupkey ) . '\" ' . ( in_array( esc_attr( $optgroupkey ), $default_value, true ) ? 'selected=\"selected\"' : '' ) . '>' . esc_attr( $optgroupvalue ) . '</option>';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\techo '<option value=\"' . esc_attr( $optgroupkey ) . '\" ' . selected( esc_attr( $optgroupkey ), $default_value, false ) . '>' . esc_attr( $optgroupvalue ) . '</option>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo '</optgroup>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ( $this->multiselect ) {\n\t\t\t\t\t\t\t\techo '<option value=\"' . esc_attr( $key ) . '\" ' . ( in_array( esc_attr( $key ), $default_value, true ) ? 'selected=\"selected\"' : '' ) . '>' . esc_attr( $value ) . '</option>';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo '<option value=\"' . esc_attr( $key ) . '\" ' . selected( esc_attr( $key ), $default_value, false ) . '>' . esc_attr( $value ) . '</option>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Dropdown Posts Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Dropdown_Posts_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'dropdown_posts';\n\t\t/**\n\t\t * Posts\n\t\t */\n\t\tprivate $posts = array();\n\t\t/**\n\t\t * Constructor\n\t\t */\n\t\tpublic function __construct( $manager, $id, $args = array(), $options = array() ) {\n\t\t\tparent::__construct( $manager, $id, $args );\n\t\t\t// Get our Posts\n\t\t\t$this->posts = get_posts( $this->input_attrs );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"dropdown_posts_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<label for=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-title\">\n\t\t\t\t\t\t<?php echo esc_html( $this->label ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<select name=\"<?php echo esc_attr( $this->id ); ?>\" id=\"<?php echo esc_attr( $this->id ); ?>\" <?php $this->link(); ?>>\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( ! empty( $this->posts ) ) {\n\t\t\t\t\t\tforeach ( $this->posts as $post ) {\n\t\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t\t'<option value=\"%s\" %s>%s</option>',\n\t\t\t\t\t\t\t\tesc_attr( $post->ID ),\n\t\t\t\t\t\t\t\tselected( $this->value(), $post->ID, false ),\n\t\t\t\t\t\t\t\tesc_html( $post->post_title )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Dropdown Category Custom Control\n\t *\n\t * @link https://www.cssigniter.com/wordpress-customizer-custom-controls-categories-dropdown/\n\t */\n\tclass Mtm_Dropdown_Category_Custom_Control extends Mtm_Custom_Control {\n\n\t\tpublic $type = 'dropdown-category';\n\n\t\tprotected $dropdown_args = false;\n\n\t\tprotected function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t<?php if ( ! empty( $this->label ) ) : ?>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php if ( ! empty( $this->description ) ) : ?>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php\n\t\t\tendif;\n\n\t\t\t$dropdown_args = wp_parse_args(\n\t\t\t\t$this->dropdown_args,\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t'show_option_none' => ' ',\n\t\t\t\t\t'selected' => $this->value(),\n\t\t\t\t\t'show_option_all' => '',\n\t\t\t\t\t'orderby' => 'id',\n\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t'show_count' => 1,\n\t\t\t\t\t'hide_empty' => 1,\n\t\t\t\t\t'child_of' => 0,\n\t\t\t\t\t'exclude' => '',\n\t\t\t\t\t'hierarchical' => 1,\n\t\t\t\t\t'depth' => 0,\n\t\t\t\t\t'tab_index' => 0,\n\t\t\t\t\t'hide_if_empty' => false,\n\t\t\t\t\t'option_none_value' => 0,\n\t\t\t\t\t'value_field' => 'term_id',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$dropdown_args['echo'] = false;\n\n\t\t\t$dropdown = wp_dropdown_categories( $dropdown_args );\n\t\t\t$dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown );\n\t\t\techo $dropdown;\n\t\t\t?>\n\n\t\t\t</label>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * TinyMCE Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_TinyMCE_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'tinymce_editor';\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t\twp_enqueue_editor();\n\t\t}\n\t\t/**\n\t\t * Pass our TinyMCE toolbar string to JavaScript\n\t\t */\n\t\tpublic function to_json() {\n\t\t\tparent::to_json();\n\t\t\t$this->json['mtmtinymcetoolbar1'] = isset( $this->input_attrs['toolbar1'] ) ? esc_attr( $this->input_attrs['toolbar1'] ) : 'bold italic bullist numlist alignleft aligncenter alignright link';\n\t\t\t$this->json['mtmtinymcetoolbar2'] = isset( $this->input_attrs['toolbar2'] ) ? esc_attr( $this->input_attrs['toolbar2'] ) : '';\n\t\t\t$this->json['mtmmediabuttons'] = isset( $this->input_attrs['mediaButtons'] ) && ( true === $this->input_attrs['mediaButtons'] ) ? true : false;\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Google Font Select Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Google_Font_Select_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'google_fonts';\n\t\t/**\n\t\t * The list of Google Fonts\n\t\t */\n\t\tprivate $font_list = false;\n\t\t/**\n\t\t * The saved font values decoded from json\n\t\t */\n\t\tprivate $font_values = array();\n\t\t/**\n\t\t * The index of the saved font within the list of Google fonts\n\t\t */\n\t\tprivate $font_list_index = 0;\n\t\t/**\n\t\t * The number of fonts to display from the json file. Either positive integer or 'all'. Default = 'all'\n\t\t */\n\t\tprivate $font_count = 'all';\n\t\t/**\n\t\t * The font list sort order. Either 'alpha' or 'popular'. Default = 'alpha'\n\t\t */\n\t\tprivate $font_order_by = 'alpha';\n\t\t/**\n\t\t * Get our list of fonts from the json file\n\t\t */\n\t\tpublic function __construct( $manager, $id, $args = array(), $options = array() ) {\n\t\t\tparent::__construct( $manager, $id, $args );\n\t\t\t// Get the font sort order\n\t\t\tif ( isset( $this->input_attrs['orderby'] ) && strtolower( $this->input_attrs['orderby'] ) === 'popular' ) {\n\t\t\t\t$this->font_order_by = 'popular';\n\t\t\t}\n\t\t\t// Get the list of Google fonts\n\t\t\tif ( isset( $this->input_attrs['font_count'] ) ) {\n\t\t\t\tif ( 'all' !== strtolower( $this->input_attrs['font_count'] ) ) {\n\t\t\t\t\t$this->font_count = ( abs( (int) $this->input_attrs['font_count'] ) > 0 ? abs( (int) $this->input_attrs['font_count'] ) : 'all' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->font_list = $this->mtm_getGoogleFonts( 'all' );\n\t\t\t// Decode the default json font value\n\t\t\t$this->font_values = json_decode( $this->value() );\n\t\t\t// Find the index of our default font within our list of Google fonts\n\t\t\t$this->font_list_index = $this->mtm_getFontIndex( $this->font_list, $this->font_values->font );\n\t\t}\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-select2-js', $this->get_mtm_resource_url() . 'js/select2.full.min.js', array( 'jquery' ), '4.0.13', true );\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'mtm-select2-js' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.1', 'all' );\n\t\t\twp_enqueue_style( 'mtm-select2-css', $this->get_mtm_resource_url() . 'css/select2.min.css', array(), '4.0.13', 'all' );\n\t\t}\n\t\t/**\n\t\t * Export our List of Google Fonts to JavaScript\n\t\t */\n\t\tpublic function to_json() {\n\t\t\tparent::to_json();\n\t\t\t$this->json['mtmfontslist'] = $this->font_list;\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t$font_counter = 0;\n\t\t\t$is_font_in_list = false;\n\t\t\t$font_list_str = '';\n\n\t\t\tif ( ! empty( $this->font_list ) ) {\n\t\t\t\t?>\n\t\t\t\t<div class=\"google_fonts_select_control\">\n\t\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t\t<input type=\"hidden\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-google-font-selection\" <?php $this->link(); ?> />\n\t\t\t\t\t<div class=\"google-fonts\">\n\t\t\t\t\t\t<select class=\"google-fonts-list\" control-name=\"<?php echo esc_attr( $this->id ); ?>\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tforeach ( $this->font_list as $key => $value ) {\n\t\t\t\t\t\t\t\t$font_counter++;\n\t\t\t\t\t\t\t\t$font_list_str .= '<option value=\"' . $value->family . '\" ' . selected( $this->font_values->font, $value->family, false ) . '>' . $value->family . '</option>';\n\t\t\t\t\t\t\t\tif ( $this->font_values->font === $value->family ) {\n\t\t\t\t\t\t\t\t\t$is_font_in_list = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( is_int( $this->font_count ) && $font_counter === $this->font_count ) {\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\tif ( ! $is_font_in_list && $this->font_list_index ) {\n\t\t\t\t\t\t\t\t// If the default or saved font value isn't in the list of displayed fonts, add it to the top of the list as the default font\n\t\t\t\t\t\t\t\t$font_list_str = '<option value=\"' . $this->font_list[ $this->font_list_index ]->family . '\" ' . selected( $this->font_values->font, $this->font_list[ $this->font_list_index ]->family, false ) . '>' . $this->font_list[ $this->font_list_index ]->family . ' (default)</option>' . $font_list_str;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Display our list of font options\n\t\t\t\t\t\t\techo $font_list_str;\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"customize-control-description\"><?php esc_html_e( 'Select weight & style for regular text', 'mtm' ); ?></div>\n\t\t\t\t\t<div class=\"weight-style\">\n\t\t\t\t\t\t<select class=\"google-fonts-regularweight-style\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tforeach ( $this->font_list[ $this->font_list_index ]->variants as $key => $value ) {\n\t\t\t\t\t\t\t\techo '<option value=\"' . esc_attr( $value ) . '\" ' . selected( $this->font_values->regularweight, $value, false ) . '>' . esc_attr( $value ) . '</option>';\n\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</div>\n\t\t\t\t\t<div class=\"customize-control-description\"><?php esc_html_e( 'Select weight for', 'mtm' ); ?> <strong><?php esc_html_e( 'bold text', 'mtm' ); ?></strong></div>\n\t\t\t\t\t<div class=\"weight-style\">\n\t\t\t\t\t\t<select class=\"google-fonts-boldweight-style\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$option_count = 0;\n\t\t\t\t\t\t\tforeach ( $this->font_list[ $this->font_list_index ]->variants as $key => $value ) {\n\t\t\t\t\t\t\t\t// Only add options that aren't italic\n\t\t\t\t\t\t\t\tif ( strpos( $value, 'italic' ) === false ) {\n\t\t\t\t\t\t\t\t\techo '<option value=\"' . esc_attr( $value ) . '\" ' . selected( $this->font_values->boldweight, $value, false ) . '>' . esc_attr( $value ) . '</option>';\n\t\t\t\t\t\t\t\t\t$option_count++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This should never evaluate as there'll always be at least a 'regular' weight\n\t\t\t\t\t\t\tif ( 0 === $option_count ) {\n\t\t\t\t\t\t\t\techo '<option value=\"\">Not Available for this font</option>';\n\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</div>\n\t\t\t\t\t<input type=\"hidden\" class=\"google-fonts-category\" value=\"<?php echo esc_attr( $this->font_values->category ); ?>\">\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Find the index of the saved font in our multidimensional array of Google Fonts\n\t\t */\n\t\tpublic function mtm_getFontIndex( $haystack, $needle ) {\n\t\t\tif ( $haystack ) {\n\t\t\t\tforeach ( $haystack as $key => $value ) {\n\t\t\t\t\tif ( $value->family === $needle ) {\n\t\t\t\t\t\treturn $key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Return the list of Google Fonts from our json file. Unless otherwise specfied, list will be limited to 30 fonts.\n\t\t */\n\t\tpublic function mtm_getGoogleFonts( $count = 50 ) {\n\t\t\t// Google Fonts json generated from https://www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key=YOUR-API-KEY\n\t\t\t$font_file = $this->get_mtm_resource_url() . 'lib/google-fonts-alphabetical.json';\n\t\t\tif ( 'popular' === $this->font_order_by ) {\n\t\t\t\t$font_file = $this->get_mtm_resource_url() . 'lib/google-fonts-popularity.json';\n\t\t\t}\n\n\t\t\t// disable ssl verify here because it breaks on certain local installs\n\t\t\t$request = wp_remote_get( $font_file, array( 'sslverify' => false ) );\n\t\t\tif ( is_wp_error( $request ) ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\t$body = wp_remote_retrieve_body( $request );\n\t\t\t$content = json_decode( $body );\n\n\t\t\tif ( 'all' === $count ) {\n\t\t\t\treturn $content->items;\n\t\t\t} else {\n\t\t\t\treturn array_slice( $content->items, 0, $count );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Alpha Color Picker Custom Control\n\t *\n\t * @author Braad Martin <http://braadmartin.com>\n\t * @license http://www.gnu.org/licenses/gpl-3.0.html\n\t * @link https://github.com/BraadMartin/components/tree/master/customizer/alpha-color-picker\n\t */\n\tclass Mtm_Customize_Alpha_Color_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'alpha-color';\n\t\t/**\n\t\t * Add support for palettes to be passed in.\n\t\t *\n\t\t * Supported palette values are true, false, or an array of RGBa and Hex colors.\n\t\t */\n\t\tpublic $palette;\n\t\t/**\n\t\t * Add support for showing the opacity value on the slider handle.\n\t\t */\n\t\tpublic $show_opacity;\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'wp-color-picker' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array( 'wp-color-picker' ), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\n\t\t\t// Process the palette\n\t\t\tif ( is_array( $this->palette ) ) {\n\t\t\t\t$palette = implode( '|', $this->palette );\n\t\t\t} else {\n\t\t\t\t// Default to true.\n\t\t\t\t$palette = ( false === $this->palette || 'false' === $this->palette ) ? 'false' : 'true';\n\t\t\t}\n\n\t\t\t// Support passing show_opacity as string or boolean. Default to true.\n\t\t\t$show_opacity = ( false === $this->show_opacity || 'false' === $this->show_opacity ) ? 'false' : 'true';\n\n\t\t\t?>\n\t\t\t\t<label>\n\t\t\t\t\t<?php\n\t\t\t\t\t// Output the label and description if they were passed in.\n\t\t\t\t\tif ( isset( $this->label ) && '' !== $this->label ) {\n\t\t\t\t\t\techo '<span class=\"customize-control-title\">' . esc_html( sanitize_text_field( $this->label ) ) . '</span>';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset( $this->description ) && '' !== $this->description ) {\n\t\t\t\t\t\techo '<span class=\"description customize-control-description\">' . esc_html( sanitize_text_field( $this->description ) ) . '</span>';\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</label>\n\t\t\t\t<input class=\"alpha-color-control\" type=\"text\" data-show-opacity=\"<?php echo esc_attr( $show_opacity ); ?>\" data-palette=\"<?php echo esc_attr( $palette ); ?>\" data-default-color=\"<?php echo esc_attr( $this->settings['default']->default ); ?>\" <?php $this->link(); ?> />\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * WPColorPicker Alpha Color Picker Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t *\n\t * Props @kallookoo for WPColorPicker script with Alpha Channel support\n\t *\n\t * @author Sergio <https://github.com/kallookoo>\n\t * @license http://www.gnu.org/licenses/gpl-3.0.html\n\t * @link https://github.com/kallookoo/wp-color-picker-alpha\n\t */\n\tclass Mtm_Alpha_Color_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'wpcolorpicker-alpha-color';\n\t\t/**\n\t\t * ColorPicker Attributes\n\t\t */\n\t\tpublic $attributes = '';\n\t\t/**\n\t\t * Color palette defaults\n\t\t */\n\t\tpublic $default_palette = array(\n\t\t\t'#000000',\n\t\t\t'#ffffff',\n\t\t\t'#dd3333',\n\t\t\t'#dd9933',\n\t\t\t'#eeee22',\n\t\t\t'#81d742',\n\t\t\t'#1e73be',\n\t\t\t'#8224e3',\n\t\t);\n\t\t/**\n\t\t * Constructor\n\t\t */\n\t\tpublic function __construct( $manager, $id, $args = array(), $options = array() ) {\n\t\t\tparent::__construct( $manager, $id, $args );\n\t\t\t$this->attributes .= 'data-default-color=\"' . esc_attr( $this->value() ) . '\"';\n\t\t\t$this->attributes .= 'data-alpha=\"true\"';\n\t\t\t$this->attributes .= 'data-reset-alpha=\"' . ( isset( $this->input_attrs['resetalpha'] ) ? $this->input_attrs['resetalpha'] : 'true' ) . '\"';\n\t\t\t$this->attributes .= 'data-custom-width=\"0\"';\n\t\t}\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t\twp_enqueue_script( 'wp-color-picker-alpha', $this->get_mtm_resource_url() . 'js/wp-color-picker-alpha.js', array( 'wp-color-picker' ), '1.0', true );\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t}\n\t\t/**\n\t\t * Pass our Palette colours to JavaScript\n\t\t */\n\t\tpublic function to_json() {\n\t\t\tparent::to_json();\n\t\t\t$this->json['colorpickerpalette'] = isset( $this->input_attrs['palette'] ) ? $this->input_attrs['palette'] : $this->default_palette;\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"wpcolorpicker_alpha_color_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<input type=\"text\" class=\"color-picker\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-colorpicker-alpha-color\" <?php echo esc_attr( $this->attributes ); ?> <?php $this->link(); ?> />\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Sortable Pill Checkbox Custom Control\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t */\n\tclass Mtm_Pill_Checkbox_Custom_Control extends Mtm_Custom_Control {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'pill_checkbox';\n\t\t/**\n\t\t * Define whether the pills can be sorted using drag 'n drop. Either false or true. Default = false\n\t\t */\n\t\tprivate $sortable = false;\n\t\t/**\n\t\t * The width of the pills. Each pill can be auto width or full width. Default = false\n\t\t */\n\t\tprivate $fullwidth = false;\n\t\t/**\n\t\t * Constructor\n\t\t */\n\t\tpublic function __construct( $manager, $id, $args = array(), $options = array() ) {\n\t\t\tparent::__construct( $manager, $id, $args );\n\t\t\t// Check if these pills are sortable\n\t\t\tif ( isset( $this->input_attrs['sortable'] ) && $this->input_attrs['sortable'] ) {\n\t\t\t\t$this->sortable = true;\n\t\t\t}\n\t\t\t// Check if the pills should be full width\n\t\t\tif ( isset( $this->input_attrs['fullwidth'] ) && $this->input_attrs['fullwidth'] ) {\n\t\t\t\t$this->fullwidth = true;\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.1', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the control in the customizer\n\t\t */\n\t\tpublic function render_content() {\n\t\t\t$reordered_choices = array();\n\t\t\t$saved_choices = explode( ',', esc_attr( $this->value() ) );\n\n\t\t\t// Order the checkbox choices based on the saved order\n\t\t\tif ( $this->sortable ) {\n\t\t\t\tforeach ( $saved_choices as $key => $value ) {\n\t\t\t\t\tif ( isset( $this->choices[ $value ] ) ) {\n\t\t\t\t\t\t$reordered_choices[ $value ] = $this->choices[ $value ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$reordered_choices = array_merge( $reordered_choices, array_diff_assoc( $this->choices, $reordered_choices ) );\n\t\t\t} else {\n\t\t\t\t$reordered_choices = $this->choices;\n\t\t\t}\n\t\t\t?>\n\t\t\t<div class=\"pill_checkbox_control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<input type=\"hidden\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"customize-control-sortable-pill-checkbox\" <?php $this->link(); ?> />\n\t\t\t\t<div class=\"sortable_pills<?php echo ( $this->sortable ? ' sortable' : '' ) . ( $this->fullwidth ? ' fullwidth_pills' : '' ); ?>\">\n\t\t\t\t<?php foreach ( $reordered_choices as $key => $value ) { ?>\n\t\t\t\t\t<label class=\"checkbox-label\">\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"<?php echo esc_attr( $key ); ?>\" value=\"<?php echo esc_attr( $key ); ?>\" <?php checked( in_array( esc_attr( $key ), $saved_choices, true ), true ); ?> class=\"sortable-pill-checkbox\"/>\n\t\t\t\t\t\t<span class=\"sortable-pill-title\"><?php echo esc_attr( $value ); ?></span>\n\t\t\t\t\t\t<?php if ( $this->sortable && $this->fullwidth ) { ?>\n\t\t\t\t\t\t\t<span class=\"dashicons dashicons-sort\"></span>\n\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t</label>\n\t\t\t\t<?php\t} ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * Upsell section\n\t *\n\t * @author Anthony Hortin <http://maddisondesigns.com>\n\t * @license http://www.gnu.org/licenses/gpl-2.0.html\n\t * @link https://github.com/maddisondesigns\n\t *\n\t */\n\tclass Mtm_Upsell_Section extends Mtm_Custom_Section {\n\t\t/**\n\t\t * The type of control being rendered\n\t\t */\n\t\tpublic $type = 'mtm-upsell';\n\t\t/**\n\t\t * The Upsell URL\n\t\t */\n\t\tpublic $url = '';\n\t\t/**\n\t\t * The background color for the control\n\t\t */\n\t\tpublic $backgroundcolor = '';\n\t\t/**\n\t\t * The text color for the control\n\t\t */\n\t\tpublic $textcolor = '';\n\t\t/**\n\t\t * Enqueue our scripts and styles\n\t\t */\n\t\tpublic function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}\n\t\t/**\n\t\t * Render the section, and the controls that have been added to it.\n\t\t */\n\t\tprotected function render() {\n\t\t\t$bkgrndcolor = ! empty( $this->backgroundcolor ) ? esc_attr( $this->backgroundcolor ) : '#fff';\n\t\t\t$color = ! empty( $this->textcolor ) ? esc_attr( $this->textcolor ) : '#555d66';\n\t\t\t?>\n\t\t\t<li id=\"accordion-section-<?php echo esc_attr( $this->id ); ?>\" class=\"mtm_upsell_section accordion-section control-section control-section-<?php echo esc_attr( $this->id ); ?> cannot-expand\">\n\t\t\t\t<h3 class=\"upsell-section-title\" <?php echo ' style=\"color:' . esc_attr( $color ) . ';border-left-color:' . esc_attr( $bkgrndcolor ) . ';border-right-color:' . esc_attr( $bkgrndcolor ) . ';\"'; ?>>\n\t\t\t\t\t<a href=\"<?php echo esc_url( $this->url ); ?>\" target=\"_blank\"<?php echo ' style=\"background-color:' . esc_attr( $bkgrndcolor ) . ';color:' . esc_attr( $color ) . ';\"'; ?>><?php echo esc_html( $this->title ); ?></a>\n\t\t\t\t</h3>\n\t\t\t</li>\n\t\t\t<?php\n\t\t}\n\t}\n\n\t/**\n\t * URL sanitization\n\t *\n\t * @param string Input to be sanitized (either a string containing a single url or multiple, separated by commas)\n\t * @return string Sanitized input\n\t */\n\tif ( ! function_exists( 'mtm_url_sanitization' ) ) {\n\t\tfunction mtm_url_sanitization( $input ) {\n\t\t\tif ( strpos( $input, ',' ) !== false ) {\n\t\t\t\t$input = explode( ',', $input );\n\t\t\t}\n\t\t\tif ( is_array( $input ) ) {\n\t\t\t\tforeach ( $input as $key => $value ) {\n\t\t\t\t\t$input[ $key ] = esc_url_raw( $value );\n\t\t\t\t}\n\t\t\t\t$input = implode( ',', $input );\n\t\t\t} else {\n\t\t\t\t$input = esc_url_raw( $input );\n\t\t\t}\n\t\t\treturn $input;\n\t\t}\n\t}\n\n\t/**\n\t * Switch sanitization\n\t *\n\t * @param string Switch value\n\t * @return integer Sanitized value\n\t */\n\tif ( ! function_exists( 'mtm_switch_sanitization' ) ) {\n\t\tfunction mtm_switch_sanitization( $input ) {\n\t\t\tif ( true === $input ) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Radio Button and Select sanitization\n\t *\n\t * @param string Radio Button value\n\t * @return integer Sanitized value\n\t */\n\tif ( ! function_exists( 'mtm_radio_sanitization' ) ) {\n\t\tfunction mtm_radio_sanitization( $input, $setting ) {\n\t\t\t//get the list of possible radio box or select options\n\t\t\t$choices = $setting->manager->get_control( $setting->id )->choices;\n\n\t\t\tif ( array_key_exists( $input, $choices ) ) {\n\t\t\t\treturn $input;\n\t\t\t} else {\n\t\t\t\treturn $setting->default;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Integer sanitization\n\t *\n\t * @param string Input value to check\n\t * @return integer Returned integer value\n\t */\n\tif ( ! function_exists( 'mtm_sanitize_integer' ) ) {\n\t\tfunction mtm_sanitize_integer( $input ) {\n\t\t\treturn (int) $input;\n\t\t}\n\t}\n\n\t/**\n\t * Text sanitization\n\t *\n\t * @param string Input to be sanitized (either a string containing a single string or multiple, separated by commas)\n\t * @return string Sanitized input\n\t */\n\tif ( ! function_exists( 'mtm_text_sanitization' ) ) {\n\t\tfunction mtm_text_sanitization( $input ) {\n\t\t\tif ( strpos( $input, ',' ) !== false ) {\n\t\t\t\t$input = explode( ',', $input );\n\t\t\t}\n\t\t\tif ( is_array( $input ) ) {\n\t\t\t\tforeach ( $input as $key => $value ) {\n\t\t\t\t\t$input[ $key ] = sanitize_text_field( $value );\n\t\t\t\t}\n\t\t\t\t$input = implode( ',', $input );\n\t\t\t} else {\n\t\t\t\t$input = sanitize_text_field( $input );\n\t\t\t}\n\t\t\treturn $input;\n\t\t}\n\t}\n\n\t/**\n\t * Array sanitization\n\t *\n\t * @param array Input to be sanitized\n\t * @return array Sanitized input\n\t */\n\tif ( ! function_exists( 'mtm_array_sanitization' ) ) {\n\t\tfunction mtm_array_sanitization( $input ) {\n\t\t\tif ( is_array( $input ) ) {\n\t\t\t\tforeach ( $input as $key => $value ) {\n\t\t\t\t\t$input[ $key ] = sanitize_text_field( $value );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$input = '';\n\t\t\t}\n\t\t\treturn $input;\n\t\t}\n\t}\n\n\t/**\n\t * Alpha Color (Hex & RGBa) sanitization\n\t *\n\t * @param string Input to be sanitized\n\t * @return string Sanitized input\n\t */\n\tif ( ! function_exists( 'mtm_hex_rgba_sanitization' ) ) {\n\t\tfunction mtm_hex_rgba_sanitization( $input, $setting ) {\n\t\t\tif ( empty( $input ) || is_array( $input ) ) {\n\t\t\t\treturn $setting->default;\n\t\t\t}\n\n\t\t\tif ( false === strpos( $input, 'rgba' ) ) {\n\t\t\t\t// If string doesn't start with 'rgba' then santize as hex color\n\t\t\t\t$input = sanitize_hex_color( $input );\n\t\t\t} else {\n\t\t\t\t// Sanitize as RGBa color\n\t\t\t\t$input = str_replace( ' ', '', $input );\n\t\t\t\tsscanf( $input, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha );\n\t\t\t\t$input = 'rgba(' . mtm_in_range( $red, 0, 255 ) . ',' . mtm_in_range( $green, 0, 255 ) . ',' . mtm_in_range( $blue, 0, 255 ) . ',' . mtm_in_range( $alpha, 0, 1 ) . ')';\n\t\t\t}\n\t\t\treturn $input;\n\t\t}\n\t}\n\n\t/**\n\t * Only allow values between a certain minimum & maxmium range\n\t *\n\t * @param number Input to be sanitized\n\t * @return number Sanitized input\n\t */\n\tif ( ! function_exists( 'mtm_in_range' ) ) {\n\t\tfunction mtm_in_range( $input, $min, $max ) {\n\t\t\tif ( $input < $min ) {\n\t\t\t\t$input = $min;\n\t\t\t}\n\t\t\tif ( $input > $max ) {\n\t\t\t\t$input = $max;\n\t\t\t}\n\t\t\treturn $input;\n\t\t}\n\t}\n\n\t/**\n\t * Google Font sanitization\n\t *\n\t * @param string JSON string to be sanitized\n\t * @return string Sanitized input\n\t */\n\tif ( ! function_exists( 'mtm_google_font_sanitization' ) ) {\n\t\tfunction mtm_google_font_sanitization( $input ) {\n\t\t\t$val = json_decode( $input, true );\n\t\t\tif ( is_array( $val ) ) {\n\t\t\t\tforeach ( $val as $key => $value ) {\n\t\t\t\t\t$val[ $key ] = sanitize_text_field( $value );\n\t\t\t\t}\n\t\t\t\t$input = wp_json_encode( $val );\n\t\t\t} else {\n\t\t\t\t$input = wp_json_encode( sanitize_text_field( $val ) );\n\t\t\t}\n\t\t\treturn $input;\n\t\t}\n\t}\n\n\t/**\n\t * Date Time sanitization\n\t *\n\t * @param string Date/Time string to be sanitized\n\t * @return string Sanitized input\n\t */\n\tif ( ! function_exists( 'mtm_date_time_sanitization' ) ) {\n\t\tfunction mtm_date_time_sanitization( $input, $setting ) {\n\t\t\t$datetimeformat = 'Y-m-d';\n\t\t\tif ( $setting->manager->get_control( $setting->id )->include_time ) {\n\t\t\t\t$datetimeformat = 'Y-m-d H:i:s';\n\t\t\t}\n\t\t\t$date = DateTime::createFromFormat( $datetimeformat, $input );\n\t\t\tif ( false === $date ) {\n\t\t\t\t$date = DateTime::createFromFormat( $datetimeformat, $setting->default );\n\t\t\t}\n\t\t\treturn $date->format( $datetimeformat );\n\t\t}\n\t}\n\n\t/**\n\t * Slider sanitization\n\t *\n\t * @param string Slider value to be sanitized\n\t * @return string Sanitized input\n\t */\n\tif ( ! function_exists( 'mtm_range_sanitization' ) ) {\n\t\tfunction mtm_range_sanitization( $input, $setting ) {\n\t\t\t$attrs = $setting->manager->get_control( $setting->id )->input_attrs;\n\n\t\t\t$min = ( isset( $attrs['min'] ) ? $attrs['min'] : $input );\n\t\t\t$max = ( isset( $attrs['max'] ) ? $attrs['max'] : $input );\n\t\t\t$step = ( isset( $attrs['step'] ) ? $attrs['step'] : 1 );\n\n\t\t\t$number = floor( $input / $attrs['step'] ) * $attrs['step'];\n\n\t\t\treturn mtm_in_range( $number, $min, $max );\n\t\t}\n\t}\n\n}", "protected function _register_controls()\n {\n\n /**\n * Style tab\n */\n\n $this->start_controls_section(\n 'general',\n [\n 'label' => __('Content', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n\t\t\t'menu_style',\n\t\t\t[\n\t\t\t\t'label' => __( 'Border Style', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'inline',\n\t\t\t\t'options' => [\n\t\t\t\t\t'inline' => __( 'Inline', 'akash-hp' ),\n\t\t\t\t\t'flyout' => __( 'Flyout', 'akash-hp' ),\n\t\t\t\t],\n\t\t\t]\n );\n \n $this->add_control(\n\t\t\t'trigger_label',\n\t\t\t[\n\t\t\t\t'label' => __( 'Trigger Label', 'akash-hp' ),\n 'type' => Controls_Manager::TEXT,\n\t\t\t]\n );\n \n $this->add_control(\n\t\t\t'trigger_open_icon',\n\t\t\t[\n\t\t\t\t'label' => __( 'Trigger Icon', 'text-domain' ),\n\t\t\t\t'type' => Controls_Manager::ICONS,\n\t\t\t\t'default' => [\n\t\t\t\t\t'value' => 'fa fa-align-justify',\n\t\t\t\t\t'library' => 'solid',\n ],\n \n\t\t\t]\n );\n \n $this->add_control(\n\t\t\t'trigger_close_icon',\n\t\t\t[\n\t\t\t\t'label' => __( 'Trigger Close Icon', 'text-domain' ),\n\t\t\t\t'type' => Controls_Manager::ICONS,\n\t\t\t\t'default' => [\n\t\t\t\t\t'value' => 'far fa-window-close',\n\t\t\t\t\t'library' => 'solid',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_responsive_control(\n 'menu_align',\n [\n 'label' => __('Align', 'akash-hp'),\n 'type' => Controls_Manager::CHOOSE,\n 'options' => [\n 'start' => [\n 'title' => __('Left', 'akash-hp'),\n 'icon' => 'fa fa-align-left',\n ],\n 'center' => [\n 'title' => __('top', 'akash-hp'),\n 'icon' => 'fa fa-align-center',\n ],\n 'flex-end' => [\n 'title' => __('Right', 'akash-hp'),\n 'icon' => 'fa fa-align-right',\n ],\n ],\n 'default' => 'left',\n\t\t\t\t'toggle' => true,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .akash-main-menu-wrap.navbar' => 'justify-content: {{VALUE}}'\n\t\t\t\t\t] \n ]\n );\n $this->end_controls_section();\n $this->start_controls_section(\n\t\t\t'header_infos_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Header Info', 'akash-hp' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_CONTENT,\n\t\t\t]\n );\n \n $this->add_control(\n\t\t\t'show_infos',\n\t\t\t[\n\t\t\t\t'label' => __( 'Show Title', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'akash-hp' ),\n\t\t\t\t'label_off' => __( 'Hide', 'akash-hp' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'no',\n\t\t\t]\n\t\t);\n\n\t\t$repeater = new Repeater();\n\n\t\t$repeater->add_control(\n\t\t\t'info_title', [\n\t\t\t\t'label' => __( 'Title', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'default' => __( 'info Title' , 'akash-hp' ),\n\t\t\t\t'label_block' => true,\n\t\t\t]\n\t\t);\n\n\t\t$repeater->add_control(\n\t\t\t'info_content', [\n\t\t\t\t'label' => __( 'Content', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::WYSIWYG,\n\t\t\t\t'default' => __( 'info Content' , 'akash-hp' ),\n\t\t\t\t'show_label' => false,\n\t\t\t]\n );\n \n $repeater->add_control(\n\t\t\t'info_url',\n\t\t\t[\n\t\t\t\t'label' => __( 'Link', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t'placeholder' => __( 'https://your-link.com', 'akash-hp' ),\n\t\t\t\t'show_external' => true,\n\t\t\t]\n );\n \n\t\t$this->add_control(\n\t\t\t'header_infos',\n\t\t\t[\n\t\t\t\t'label' => __( 'Repeater info', 'akash-hp' ),\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'fields' => $repeater->get_controls(),\n\t\t\t\t'default' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'info_title' => __( 'Call us:', 'akash-hp' ),\n\t\t\t\t\t\t'info_content' => __( '(234) 567 8901', 'akash-hp' ),\n\t\t\t\t\t],\n\t\t\t\t],\n 'title_field' => '{{{ info_title }}}',\n 'condition' => [\n 'show_infos' => 'yes',\n ]\n\t\t\t]\n\t\t);\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'section_menu_style',\n [\n 'label' => __('Menu Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n 'condition' => [\n 'menu_style' => 'inline',\n ]\n ]\n );\n\n\n\n\t\t$this->start_controls_tabs(\n\t\t\t'menu_items_tabs'\n );\n \n\t\t$this->start_controls_tab(\n\t\t\t'menu_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'akash-hp' ),\n\t\t\t]\n );\n \n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'menu_typography',\n 'label' => __('Menu Typography', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .main-navigation ul.navbar-nav>li>a',\n ]\n );\n\n $this->add_control(\n 'menu_color',\n [\n 'label' => __('Item Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav>li>a, \n {{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav > .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav > .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n \n ],\n ]\n );\n\n $this->add_control(\n 'menu_bg_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav>li>a' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n \n $this->add_responsive_control(\n 'item_gap',\n [\n 'label' => __('Menu Gap', 'akash-hp'),\n 'type' => Controls_Manager::SLIDER,\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'devices' => ['desktop', 'tablet', 'mobile'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'margin-left: {{SIZE}}{{UNIT}};margin-right: {{SIZE}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'margin-right: {{SIZE}}{{UNIT}};margin-right: {{SIZE}}{{UNIT}};',\n ],\n\n ]\n );\n\n $this->add_responsive_control(\n 'item_padding',\n [\n 'label' => __('Item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>.menu-item-has-children>a' => 'padding: {{TOP}}{{UNIT}} calc({{RIGHT}}{{UNIT}} + 20px) {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n \n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>.menu-item-has-children>a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} calc({{RIGHT}}{{UNIT}} + 20px);',\n ],\n\n ]\n );\n\n $this->add_responsive_control(\n 'item_readius',\n [\n 'label' => __('Item Radius', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li>a' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'menu_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'akash-hp' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n 'menu_hover_color',\n [\n 'label' => __('Menu Hover Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav>li>a:hover, \n {{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav > .menu-item-has-children > a:hover .dropdownToggle,\n {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav li.current-menu-item>a' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'menu_bg_hover_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav>li:hover>a' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'dropdown_style',\n [\n 'label' => __('Dropdown Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n 'condition' => [\n 'menu_style' => 'inline',\n ]\n ]\n );\n\n\t\t$this->start_controls_tabs(\n\t\t\t'dropdown_items_tabs'\n\t\t);\n\t\t$this->start_controls_tab(\n\t\t\t'dropdown_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'akash-hp' ),\n\t\t\t]\n );\n \n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'dripdown_typography',\n 'label' => __('Menu Typography', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav>li .sub-menu a',\n ]\n );\n \n $this->add_control(\n 'dropdown_item_color',\n [\n 'label' => __('Item Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a,\n {{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'dropdown_item_bg_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'ddown_menu_border_color',\n [\n 'label' => __('Menu Border Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu' => 'border-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'dropdown_item_radius',\n [\n 'label' => __('Menu radius', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n\n ]\n );\n\n $this->add_responsive_control(\n 'dropdown_item_padding',\n [\n 'label' => __('Item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'dropdown_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'akash-hp' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n 'dropdown_item_hover_color',\n [\n 'label' => __('Item Hover Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a:hover,\n {{WRAPPER}} .menu-style-inline.navbar:not(.active) .main-navigation ul.navbar-nav .sub-menu .menu-item-has-children > a:hover .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'dropdown_item_bg_hover_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-inline .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a:hover' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->end_controls_tab();\n \n $this->end_controls_tabs();\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'section_flyout_style',\n [\n 'label' => __('Flyout/Mobile Menu Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n\n\t\t$this->start_controls_tabs(\n\t\t\t'flyout_items_tabs'\n );\n \n\t\t$this->start_controls_tab(\n\t\t\t'flyout_menu_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'akash-hp' ),\n\t\t\t]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'flyout_menu_typography',\n 'label' => __('Item Typography', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li>a',\n ]\n );\n\n $this->add_control(\n 'flyout_menu_color',\n [\n 'label' => __('Item Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li>a, \n {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav > .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav > .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n $this->add_responsive_control(\n 'flyout_item_padding',\n [\n 'label' => __('Item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li>a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body:not(.rtl) {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>.menu-item-has-children>a' => 'padding: {{TOP}}{{UNIT}} calc({{RIGHT}}{{UNIT}} + 20px) {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n \n 'body.rtl {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li>a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>.menu-item-has-children>a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} calc({{RIGHT}}{{UNIT}} + 20px);',\n ],\n\n ]\n );\n\n $this->add_responsive_control(\n 'flyout_menu_padding',\n [\n 'label' => __('Menu Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-flyout .main-navigation' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\n 'body.rtl {{WRAPPER}} .menu-style-flyout .main-navigation' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n \n ],\n\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'flyout_menu_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'akash-hp' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n 'flyout_menu_hover_color',\n [\n 'label' => __('Menu Hover Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .menu-style-flyout .main-navigation ul.navbar-nav>li>a:hover, \n {{WRAPPER}} .menu-style-flyout .menu-style-flyout .main-navigation ul.navbar-nav > .menu-item-has-children > a:hover .dropdownToggle,\n {{WRAPPER}} .menu-style-flyout .menu-style-flyout .main-navigation ul.navbar-nav li.current-menu-item>a' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n\n\t\t$this->end_controls_tab();\n\n $this->end_controls_tabs();\n \n $this->end_controls_section();\n\n $this->start_controls_section(\n 'flyout_dropdown_style',\n [\n 'label' => __('Flyout/Mobile Dropdown Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n\t\t$this->start_controls_tabs(\n\t\t\t'flyout_dropdown_items_tabs'\n\t\t);\n\t\t$this->start_controls_tab(\n\t\t\t'flyout_dropdown_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Normal', 'akash-hp' ),\n\t\t\t]\n\t\t);\n \n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'flyout_dripdown_typography',\n 'label' => __('Dropdown Typography', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav>li .sub-menu a',\n ]\n );\n\n $this->add_control(\n 'flyout_dropdown_item_color',\n [\n 'label' => __('Item Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a,\n {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children > a .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'flyout_dropdown_item_bg_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'flyout_dropdown_item_padding',\n [\n 'label' => __('Item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n 'body:not(.rtl) {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n\n ]\n );\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'flyout_dropdown_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => __( 'Hover', 'akash-hp' ),\n\t\t\t]\n\t\t);\n\n $this->add_control(\n 'flyout_dropdown_item_hover_color',\n [\n 'label' => __('Item Hover Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a:hover,\n {{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .sub-menu .menu-item-has-children > a:hover .dropdownToggle' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'flyout_dropdown_item_bg_hover_color',\n [\n 'label' => __('Item Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .main-navigation ul.navbar-nav .menu-item-has-children .sub-menu a:hover' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n\t\t$this->end_controls_tab();\n $this->end_controls_tabs();\n\n $this->end_controls_section();\n\n\n $this->start_controls_section(\n 'trigger_style',\n [\n 'label' => __('Trigger Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n\n $this->start_controls_tabs(\n 'trigger_style_tabs'\n );\n \n $this->start_controls_tab(\n 'trigger_style_normal_tab',\n [\n 'label' => __('Normal', 'akash-hp'),\n ]\n );\n \n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'trigger_typography',\n 'label' => __('Trigger Typography', 'akash-hp'),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .navbar-toggler.open-menu',\n ]\n );\n\n $this->add_control(\n 'trigger_color',\n [\n 'label' => __('Trigger Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'trigger_background',\n [\n 'label' => __('Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'trigger_border',\n 'label' => __('Border', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .navbar-toggler.open-menu',\n ]\n );\n\n $this->add_control(\n\t\t\t'trigger_icon_size',\n\t\t\t[\n\t\t\t\t'label' => __( 'Icon size', 'plugin-domain' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .navbar-toggler.open-menu .navbar-toggler-icon svg' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .navbar-toggler.open-menu .navbar-toggler-icon i' => 'font-size: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_control(\n\t\t\t'trigger_icon_gap',\n\t\t\t[\n\t\t\t\t'label' => __( 'Icon Gap', 'plugin-domain' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .navbar-toggler.open-menu .navbar-toggler-icon' => 'margin-right: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_responsive_control(\n 'trigger_radius',\n [\n 'label' => __('Border Radius', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .navbar-toggler.open-menu' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}\n ;',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'trigger_padding',\n [\n 'label' => __('Button Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .navbar-toggler.open-menu' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n ]\n );\n $this->end_controls_tab();\n\n $this->start_controls_tab(\n 'trigger_style_hover_tab',\n [\n 'label' => __('Hover', 'akash-hp'),\n ]\n );\n \n\n $this->add_control(\n 'trigger_hover_color',\n [\n 'label' => __('Trigger Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu:hover' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'trigger_hover_background',\n [\n 'label' => __('Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu:hover' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'trigger_hover_border',\n 'label' => __('Border', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .navbar-toggler.open-menu:hover',\n ]\n );\n\n $this->add_control(\n 'trigger_hover_animation',\n [\n 'label' => __('Hover Animation', 'akash-hp'),\n 'type' => Controls_Manager::HOVER_ANIMATION,\n ]\n );\n\n $this->add_responsive_control(\n 'trigger_hover_radius',\n [\n 'label' => __('Border Radius', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.open-menu:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .navbar-toggler.open-menu:hover' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}\n ;',\n ],\n ]\n );\n \n $this->end_controls_tab();\n \n $this->end_controls_tabs();\n\n $this->end_controls_section();\n \n $this->start_controls_section(\n 'infos_style_section',\n [\n 'label' => __('Info Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n 'condition' => [\n 'show_infos' => 'yes',\n ]\n ]\n );\n\n $this->start_controls_tabs(\n 'info_style_tabs'\n );\n \n $this->start_controls_tab(\n 'info_style_normal_tab',\n [\n 'label' => __('Normal', 'akash-hp'),\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'info_title_typography',\n 'label' => __('Title Typography', 'akash-hp'),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .header-info span',\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'info_typography',\n 'label' => __('Info Typography', 'akash-hp'),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .header-info h3 ',\n ]\n );\n\n $this->add_control(\n 'info_title_color',\n [\n 'label' => __('Info Title Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .header-info span' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'info_color',\n [\n 'label' => __('Info Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .header-info h3' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'info_box_border',\n 'label' => __('Box Border', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .akash-header-infos',\n ]\n );\n\n $this->add_control(\n\t\t\t'info_title_gap',\n\t\t\t[\n\t\t\t\t'label' => __( 'Info Title Gap', 'plugin-domain' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .header-info span' => 'margin-bottom: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n $this->add_responsive_control(\n 'ifno_item_padding',\n [\n 'label' => __('Info item Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .header-info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\n 'body.rtl {{WRAPPER}} .header-info' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n ]\n );\n\n $this->end_controls_tab();\n\n $this->start_controls_tab(\n 'info_style_hover_tab',\n [\n 'label' => __('Hover', 'akash-hp'),\n ]\n );\n \n $this->add_control(\n 'info_title_color_hover',\n [\n 'label' => __('Info Title Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .header-info:hover span' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'info_color_hover',\n [\n 'label' => __('Info Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .header-info:hover h3' => 'color: {{VALUE}}',\n ],\n ]\n );\n \n \n $this->end_controls_tab();\n \n $this->end_controls_tabs();\n\n $this->end_controls_section();\n $this->start_controls_section(\n 'panel_style',\n [\n 'label' => __('Panel Style', 'akash-hp'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'panel_label_typography',\n 'label' => __('Label Typography', 'akash-hp'),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler',\n ]\n );\n\n \n $this->add_control(\n 'panel_label_color',\n [\n 'label' => __('Label Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler' => 'color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'close_trigger_color',\n [\n 'label' => __('Close Trigger Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler i' => 'color: {{VALUE}}',\n '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler svg path' => 'stroke: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'close_trigger_fill_color',\n [\n 'label' => __('Close Trigger Fill Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner .navbar-toggler svg path' => 'fill: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n 'close_label_background',\n [\n 'label' => __('Label Background Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .navbar-toggler.close-menu' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n \n $this->add_control(\n 'panel_background',\n [\n 'label' => __('Panel Color', 'akash-hp'),\n 'type' => Controls_Manager::COLOR,\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner' => 'background-color: {{VALUE}}',\n ],\n ]\n );\n\n $this->add_control(\n\t\t\t'trigger_cloxe_icon_size',\n\t\t\t[\n\t\t\t\t'label' => __( 'Close Icon size', 'plugin-domain' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => [ 'px', '%' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t],\n\t\t\t\t\t'%' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .menu-style-flyout .navbar-toggler.close-menu .navbar-toggler-icon svg' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t\t'{{WRAPPER}} .menu-style-flyout .navbar-toggler.close-menu .navbar-toggler-icon i' => 'font-size: {{SIZE}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n \n $this->add_group_control(\n Group_Control_Box_Shadow::get_type(),\n [\n 'name' => 'panel_shadow',\n 'label' => __('Panel Shadow', 'akash-hp'),\n 'selector' => '{{WRAPPER}} .navbar-inner',\n ]\n );\n\n $this->add_responsive_control(\n 'close_label_padding',\n [\n 'label' => __('Label Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-toggler.close-menu' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .navbar-toggler.close-menu' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n ]\n );\n \n $this->add_responsive_control(\n 'panel_padding',\n [\n 'label' => __('Panel Padding', 'akash-hp'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'selectors' => [\n '{{WRAPPER}} .menu-style-flyout .navbar-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n 'body.rtl {{WRAPPER}} .menu-style-flyout .navbar-inner' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',\n ],\n ]\n );\n\n\n $this->end_controls_section();\n }", "function sp_customizer_register( $wp_customize ) {\n\n\t// Make sure preview refreshes on change.\n\t$wp_customize->get_setting( 'header_image' )->transport = 'refresh';\n\n\t// Globals.\n\tglobal $wp_customize, $sp_colors;\n\n\t// Loop through array and display colors.\n\tforeach ( $sp_colors as $id => $hex ) {\n\n\t\t$section = 'colors';\n\t\t$setting = \"sp_{$id}_color\";\n\t\t$label\t = ucwords( str_replace( '_', ' ', $id ) );\n\n\t\t// Add color setting.\n\t\t$wp_customize->add_setting(\n\t\t\t$setting,\n\t\t\tarray(\n\t\t\t\t'default' => $hex,\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t)\n\t\t);\n\n\t\t// Add color control.\n\t\t$wp_customize->add_control(\n\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t$wp_customize,\n\t\t\t\t$setting,\n\t\t\t\tarray(\n\t\t\t\t\t'label' => $label,\n\t\t\t\t\t'section' => $section,\n\t\t\t\t\t'settings' => $setting,\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}\n\n\t// Footer widget areas.\n\t$wp_customize->add_setting(\n\t\t'sp_footer_widgets',\n\t\tarray(\n\t\t\t'default' => 3,\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'type'\t\t\t\t=> 'option',\n\t\t\t'transport' \t\t=> 'refresh',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'sp_footer_widgets',\n\t\tarray(\n\t\t\t'type'\t\t => 'number',\n\t\t\t'label' => __( 'Footer Widget Areas', 'store-pro' ),\n\t\t\t'description' => __( 'Select the number of widget areas to display in the footer section.', 'store-pro' ),\n\t\t\t'section' => 'genesis_layout',\n\t\t\t'settings' => 'sp_footer_widgets',\n\t\t\t'priority'\t => 20,\n\t\t)\n\t);\n\n\t// Front page widget areas.\n\t$wp_customize->add_setting(\n\t\t'sp_frontpage_widgets',\n\t\tarray(\n\t\t\t'default' => 1,\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'type'\t\t\t\t=> 'option',\n\t\t\t'transport' \t\t=> 'refresh',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'sp_frontpage_widgets',\n\t\tarray(\n\t\t\t'type'\t\t => 'number',\n\t\t\t'label' => __( 'Front Page Widget Areas', 'store-pro' ),\n\t\t\t'description' => __( 'Select the number of widget areas to display on the home page.', 'store-pro' ),\n\t\t\t'section' => 'static_front_page',\n\t\t\t'settings' => 'sp_frontpage_widgets',\n\t\t)\n\t);\n\n\t// Add front page setting to the Customizer.\n\t$wp_customize->add_setting(\n\t\t'sp_frontpage_content',\n\t\tarray(\n\t\t 'default' => 'true',\n\t\t 'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'sp_frontpage_content',\n\t\tarray(\n\t\t\t'label' => __( 'Front Page Content', 'store-pro' ),\n\t\t\t'description' => __( 'Show or hide the front page content.', 'store-pro' ),\n\t\t\t'section' => 'static_front_page',\n\t\t\t'settings' => 'sp_frontpage_content',\n\t\t\t'type' => 'select',\n\t\t\t'choices' => array(\n\t\t\t\t'false' => __( 'Hide content', 'store-pro' ),\n\t\t\t\t'true' => __( 'Show content', 'store-pro' ),\n\t\t\t),\n\t )\n\t);\n\n\t// Front page content order.\n\t$wp_customize->add_setting(\n\t\t'sp_frontpage_order',\n\t\tarray(\n\t\t 'default' => 'true',\n\t\t 'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'sp_frontpage_order',\n\t\tarray(\n\t\t\t'label' => __( 'Front Page Order', 'store-pro' ),\n\t\t\t'description' => __( 'Show the front page widgets before or after the page content.', 'store-pro' ),\n\t\t\t'section' => 'static_front_page',\n\t\t\t'settings' => 'sp_frontpage_order',\n\t\t\t'type' => 'select',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => __( 'Before content', 'store-pro' ),\n\t\t\t\t'false' => __( 'After content', 'store-pro' ),\n\t\t\t),\n\t )\n\t);\n}", "function customizer_extension( $wp_customize ){\n\n\t$wp_customize->add_section( 'contato_networking', array(\n\t\t 'title' => __( 'Contato Menu', 'styled-store' ),\n\t\t 'priority' => 50,\n\t ) );\n\n\n\n\t// Setting for hiding the social bar\n\t$wp_customize->add_setting( 'show_contato', array(\n\t\t'sanitize_callback' => 'styledstore_sanitize_checkbox',\n\t));\n\n\n\t// Control for hiding the social bar\n\t$wp_customize->add_control( 'show_contato', array(\n\t\t'label' => __( 'Mostrar contato', 'styled-store' ),\n\t\t'type' => 'checkbox',\n\t\t'section' => 'contato_networking',\n\t\t'priority' => 1,\n\t) );\n\n\n\t\t// Setting group for Facebook\n\t\t$wp_customize->add_setting( 'sac_uid', array(\n\t\t\t'sanitize_callback' => 'esc_html',\n\t\t) );\n\n\t\t$wp_customize->add_control( 'sac_uid', array(\n\t\t\t'settings' => 'sac_uid',\n\t\t\t'label' => __( 'SAC', 'styled-store' ),\n\t\t\t'section' => 'contato_networking',\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 1,\n\t\t) );\n\t//Setting group for e-mail\n\t$wp_customize->add_setting( 'email_uid', array(\n\t\t'sanitize_callback' => 'esc_html',\n\t) );\n\n\t$wp_customize->add_control( 'email_uid', array(\n\t\t'settings' => 'email_uid',\n\t\t'label' => __( 'Email de Contato', 'lojamissdaisy' ),\n\t\t'label' => esc_html__( 'Email de Contato', 'lojamissdaisy' ),\n\t\t'section' => 'contato_networking',\n\t\t'type' => 'text',\n\t\t'priority' => 1,\n\t) );\n}", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Number\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_number',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Counter Number', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Enter Counter Number' , 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t// Counter Title\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_title',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Enter Counter Title' , 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t// end of the Content tab section\n\t\t\n\t\t// start of the Style tab section\n\t\t$this->start_controls_section(\n\t\t\t'style_section',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Content Style', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->start_controls_tabs(\n\t\t\t'style_tabs'\n\t\t);\n\t\t\n\t\t// start everything related to Normal state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Box Options\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_box_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Counter Box', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Box Background Color\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_box_background',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background-Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#f7f7f7',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .counter-box' => 'background: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Box Border\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_box_border',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#eee',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .counter-box' => 'border: 8px solid {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t// Counter Number Options\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_number_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Counter Number', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t// Counter Number Color\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_number_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Number Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '232332',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .counter-box h3' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Number Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_counter_number_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .counter-box h3',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Title Options\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_title_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Counter Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Title Color\n\t\t$this->add_control(\n\t\t\t'portfolio_counter_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#232332',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .counter-box h6' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Counter Title Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_counter_title_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .counter-box h6',\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Normal state here\n\n\t\t// start everything related to Hover state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Hover state here\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t\t// end of the Style tab section\n\n\t}", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'section_content',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Content', 'elementive' ),\n\t\t\t)\n\t\t);\n\n\t\t$repeater = new Repeater();\n\n\t\t$repeater->add_control(\n\t\t\t'client_logo',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Choose Image', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$repeater->add_control(\n\t\t\t'client_name',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Title', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'default' => __( 'Client Name', 'elementive' ),\n\t\t\t\t'placeholder' => __( 'Type your client name here', 'elementive' ),\n\t\t\t)\n\t\t);\n\n\t\t$repeater->add_control(\n\t\t\t'client_link',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Link', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::URL,\n\t\t\t\t'placeholder' => __( 'https://your-client.com', 'elementive' ),\n\t\t\t\t'show_external' => true,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => '',\n\t\t\t\t\t'is_external' => true,\n\t\t\t\t\t'nofollow' => true,\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'clients',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Clients List', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'fields' => $repeater->get_controls(),\n\t\t\t\t'default' => array(),\n\t\t\t\t'title_field' => '{{{ client_name }}}',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'section_style',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Carousel', 'elementive' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'max_width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Logo max width', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 600,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 120,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'size' => 120,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'size' => 120,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-clients-grid .elementive-client-grid-logo img' => 'max-width : {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs(\n\t\t\t'style_tabs'\n\t\t);\n\n\t\t$this->start_controls_tab(\n\t\t\t'style_normal_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'elementive' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'grayscale',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Crayscale', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'elementive' ),\n\t\t\t\t'label_off' => __( 'No', 'elementive' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'opacity',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array(),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => 0.5,\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-clients-grid .elementive-client-grid-logo' => 'opacity : {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'style_hover_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'elementive' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'grayscale_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Crayscale', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'elementive' ),\n\t\t\t\t'label_off' => __( 'No', 'elementive' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'opacity_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Opacity', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array(),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => 1,\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-clients-grid .elementive-client-grid-logo:hover' => 'opacity : {{SIZE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'section_carousel',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Carousel', 'elementive' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_SETTINGS,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'vertical_align',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Vertical align', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'uk-flex-top',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'uk-flex-top' => __( 'Top', 'elementive' ),\n\t\t\t\t\t'uk-flex-middle' => __( 'Middle', 'elementive' ),\n\t\t\t\t\t'uk-flex-bottom' => __( 'Bottom', 'elementive' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'auto_play',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Enable auto play', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'elementive' ),\n\t\t\t\t'label_off' => __( 'No', 'elementive' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => '',\n\t\t\t\t'separator' => 'after',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'columns',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Columns', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array(),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 6,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 3,\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'size' => 2,\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'size' => 1,\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'margins',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Column margin', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array(),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 30,\n\t\t\t\t),\n\t\t\t\t'tablet_default' => array(\n\t\t\t\t\t'size' => 30,\n\t\t\t\t),\n\t\t\t\t'mobile_default' => array(\n\t\t\t\t\t'size' => 0,\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'overflow',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Overflow', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'True', 'elementive' ),\n\t\t\t\t'label_off' => __( 'False', 'elementive' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'loop',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Loop', 'elementive' ),\n\t\t\t\t'description' => __( 'Set to yes to enable continuous loop mode', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'True', 'elementive' ),\n\t\t\t\t'label_off' => __( 'False', 'elementive' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'centered',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Centered slider', 'elementive' ),\n\t\t\t\t'description' => __( 'If yes, then active slide will be centered, not always on the left side.', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'True', 'elementive' ),\n\t\t\t\t'label_off' => __( 'False', 'elementive' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'speed',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Speed', 'elementive' ),\n\t\t\t\t'description' => __( 'Speed of the enter/exit transition.', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 10,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t\t'step' => 10,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => 500,\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'navigation',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Navigation', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'True', 'elementive' ),\n\t\t\t\t'label_off' => __( 'False', 'elementive' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'navigation_diameter_width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Diameter', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 30,\n\t\t\t\t\t\t'max' => 200,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 40,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation ' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'navigation_icon_width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Icon width', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 5,\n\t\t\t\t\t\t'max' => 20,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 10,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation svg' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'navigation_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border radius', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation' => 'border-radius: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs(\n\t\t\t'navigation_tabs',\n\t\t\tarray(\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tab(\n\t\t\t'navigation_normal_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'elementive' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'navigation_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation svg' => 'color: {{VALUE}}',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'navigation_border',\n\t\t\t\t'label' => __( 'Border', 'elementive' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation_diameter' => 'yes',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Background::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'navigation_background',\n\t\t\t\t'label' => __( 'Background', 'elementive' ),\n\t\t\t\t'types' => array( 'classic', 'gradient' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation_diameter' => 'yes',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation',\n\t\t\t\t'separator' => 'before',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'navigation_box_shadow',\n\t\t\t\t'label' => __( 'Box Shadow', 'elementive' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation_diameter' => 'yes',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation',\n\t\t\t\t'separator' => 'before',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'navigation_hover_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Hover', 'elementive' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'navigation_color_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation:hover svg' => 'color: {{VALUE}}',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'navigation_border_hover',\n\t\t\t\t'label' => __( 'Border', 'elementive' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation:hover',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Background::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'navigation_background_hover',\n\t\t\t\t'label' => __( 'Background', 'elementive' ),\n\t\t\t\t'types' => array( 'classic', 'gradient' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation .navigation-background-hover',\n\t\t\t\t'separator' => 'before',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'navigation_box_shadow_hover',\n\t\t\t\t'label' => __( 'Box Shadow', 'elementive' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'navigation' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .elementive-carousel-navigation:hover',\n\t\t\t\t'separator' => 'before',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->add_control(\n\t\t\t'pagination',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Pagination', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'True', 'elementive' ),\n\t\t\t\t'label_off' => __( 'False', 'elementive' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'pagination_bullet_align',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Bullet align', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'uk-text-center',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'uk-text-center' => __( 'Center', 'elementive' ),\n\t\t\t\t\t'uk-text-left' => __( 'Left', 'elementive' ),\n\t\t\t\t\t'uk-text-right' => __( 'Right', 'elementive' ),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'pagination_bottom',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Bottom size', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => -100,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 0,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .elementive-carousel-pagination ' => 'bottom: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'pagination_bullet_margin',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Bullet margin', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 20,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 3,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet ' => 'margin: 0 {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'pagination_bullet_width',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Bullet width', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 3,\n\t\t\t\t\t\t'max' => 20,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 5,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet ' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'pagination_bullet_height',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Bullet height', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 20,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 5,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet ' => 'height: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'pagination_radius',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Border radius', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet' => 'border-radius: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tabs(\n\t\t\t'pagination_tabs',\n\t\t\tarray(\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->start_controls_tab(\n\t\t\t'pagination_normal_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Normal', 'elementive' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'pagination_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet' => 'background-color: {{VALUE}}',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'pagination_border',\n\t\t\t\t'label' => __( 'Border', 'elementive' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination_diameter' => 'yes',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'pagination_box_shadow',\n\t\t\t\t'label' => __( 'Box Shadow', 'elementive' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination_diameter' => 'yes',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet',\n\t\t\t\t'separator' => 'before',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'pagination_hover_tab',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Active', 'elementive' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'pagination_diameter_width_active',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Bullet width', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 5,\n\t\t\t\t\t\t'max' => 40,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'devices' => array( 'desktop', 'tablet', 'mobile' ),\n\t\t\t\t'desktop_default' => array(\n\t\t\t\t\t'size' => 8,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet-active' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'pagination_color_hover',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'elementive' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_2,\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet-active' => 'background-color: {{VALUE}}',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'pagination_border_hover',\n\t\t\t\t'label' => __( 'Border', 'elementive' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet-active',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'pagination_box_shadow_hover',\n\t\t\t\t'label' => __( 'Box Shadow', 'elementive' ),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'pagination' => 'true',\n\t\t\t\t),\n\t\t\t\t'selector' => '{{WRAPPER}} .elementive-carousel .swiper-pagination-bullet-active',\n\t\t\t\t'separator' => 'before',\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->end_controls_tabs();\n\n\t\t// End carousel navigation section.\n\t\t$this->end_controls_section();\n\t}", "protected function _register_controls()\r\n {\r\n\r\n\r\n $this->start_controls_section(\r\n 'slider_settings_section',\r\n [\r\n 'label' => esc_html__('Query Settings', 'aapside-master'),\r\n 'tab' => Controls_Manager::TAB_CONTENT,\r\n ]\r\n );\r\n $this->add_control(\r\n 'column',\r\n [\r\n 'label' => esc_html__('Column', 'aapside-master'),\r\n 'type' => Controls_Manager::SELECT,\r\n 'options' => array(\r\n '3' => esc_html__('04 Column', 'aapside-master'),\r\n '4' => esc_html__('03 Column', 'aapside-master'),\r\n '2' => esc_html__('06 Column', 'aapside-master')\r\n ),\r\n 'label_block' => true,\r\n 'description' => esc_html__('select grid column', 'aapside-master'),\r\n 'default' => '4'\r\n ]\r\n );\r\n $this->add_control(\r\n 'total',\r\n [\r\n 'label' => esc_html__('Total Post', 'aapside-master'),\r\n 'type' => Controls_Manager::TEXT,\r\n 'description' => esc_html__('enter how many post you want to show, enter -1 for unlimited', 'aapside-master'),\r\n 'default' => '-1'\r\n ]\r\n );\r\n $this->add_control(\r\n 'category',\r\n [\r\n 'label' => esc_html__('Category', 'aapside-master'),\r\n 'type' => Controls_Manager::SELECT2,\r\n 'multiple' => true,\r\n 'label_block' => true,\r\n 'description' => esc_html__('select category, for all category leave it blank', 'aapside-master'),\r\n 'options' => appside_master()->get_terms_names('portfolio-cat', 'id', true)\r\n ]\r\n );\r\n $this->add_control(\r\n 'orderby',\r\n [\r\n 'label' => esc_html__('Order By', 'aapside-master'),\r\n 'type' => Controls_Manager::SELECT,\r\n 'options' => array(\r\n 'ID' => esc_html__('ID', 'aapside-master'),\r\n 'title' => esc_html__('Title', 'aapside-master'),\r\n 'date' => esc_html__('Date', 'aapside-master'),\r\n ),\r\n 'description' => esc_html__('select order by', 'aapside-master'),\r\n 'default' => 'ID'\r\n ]\r\n );\r\n $this->add_control(\r\n 'order',\r\n [\r\n 'label' => esc_html__('Order', 'aapside-master'),\r\n 'type' => Controls_Manager::SELECT,\r\n 'options' => array(\r\n 'ASC' => esc_html__('Ascending', 'aapside-master'),\r\n 'DESC' => esc_html__('Descending', 'aapside-master'),\r\n ),\r\n 'description' => esc_html__('select order.', 'aapside-master'),\r\n 'default' => 'ASC'\r\n ]\r\n );\r\n $this->add_control(\r\n 'pagination',\r\n [\r\n 'label' => esc_html__('Pagination', 'aapside-master'),\r\n 'type' => Controls_Manager::SWITCHER,\r\n 'description' => esc_html__('you can set yes to show pagination.', 'aapside-master'),\r\n 'default' => 'yes'\r\n ]\r\n );\r\n $this->add_control(\r\n 'pagination_alignment',\r\n [\r\n 'label' => esc_html__('Pagination Alignment', 'aapside-master'),\r\n 'type' => Controls_Manager::SELECT,\r\n 'options' => array(\r\n 'left' => esc_html__('Left Align', 'aapside-master'),\r\n 'center' => esc_html__('Center Align', 'aapside-master'),\r\n 'right' => esc_html__('Right Align', 'aapside-master'),\r\n ),\r\n 'description' => esc_html__('you can set pagination alignment.', 'aapside-master'),\r\n 'default' => 'left',\r\n 'condition' => array('pagination' => 'yes')\r\n ]\r\n );\r\n $this->end_controls_section();\r\n\r\n $this->start_controls_section(\r\n 'thumbnail_settings_section',\r\n [\r\n 'label' => esc_html__('Thumbnail Styling', 'aapside-master'),\r\n 'tab' => Controls_Manager::TAB_STYLE,\r\n ]\r\n );\r\n $this->add_control('thumb_border_radius', [\r\n 'label' => esc_html__('Border Radius', 'aapside-master'),\r\n 'type' => Controls_Manager::DIMENSIONS,\r\n 'size_units' => ['px', '%', 'em'],\r\n 'selectors' => [\r\n \"{{WRAPPER}} .hard-single-item-02 .thumb img\" => \"border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};\"\r\n ]\r\n ]);\r\n $this->add_control(\r\n 'thumbnail_bottom_gap',\r\n [\r\n 'label' => esc_html__('Thumbnail Bottom Gap', 'aapside-master'),\r\n 'type' => Controls_Manager::SLIDER,\r\n 'size_units' => ['px', '%'],\r\n 'range' => [\r\n 'px' => [\r\n 'min' => 0,\r\n 'max' => 100,\r\n 'step' => 1,\r\n ],\r\n '%' => [\r\n 'min' => 0,\r\n 'max' => 100,\r\n ],\r\n ],\r\n 'selectors' => [\r\n '{{WRAPPER}} .hard-single-item-02 .thumb' => 'margin-bottom: {{SIZE}}{{UNIT}};',\r\n ],\r\n ]\r\n );\r\n $this->end_controls_section();\r\n\r\n\r\n /* title styling tabs start */\r\n $this->start_controls_section(\r\n 'title_settings_section',\r\n [\r\n 'label' => esc_html__('Title Styling', 'aapside-master'),\r\n 'tab' => Controls_Manager::TAB_STYLE,\r\n ]\r\n );\r\n $this->start_controls_tabs(\r\n 'style_tabs'\r\n );\r\n\r\n $this->start_controls_tab(\r\n 'style_normal_tab',\r\n [\r\n 'label' => __('Normal', 'aapside-master'),\r\n ]\r\n );\r\n\r\n $this->add_control('title_color', [\r\n 'label' => esc_html__('Color', 'aapside-master'),\r\n 'type' => Controls_Manager::COLOR,\r\n 'selectors' => [\r\n '{{WRAPPER}} .hard-single-item-02 .content .title' => \"color:{{VALUE}}\"\r\n ]\r\n ]);\r\n $this->end_controls_tab();\r\n\r\n $this->start_controls_tab(\r\n 'style_hover_tab',\r\n [\r\n 'label' => __('Hover', 'aapside-master'),\r\n ]\r\n );\r\n $this->add_control('title_hover_color', [\r\n 'label' => esc_html__('Color', 'aapside-master'),\r\n 'type' => Controls_Manager::COLOR,\r\n 'selectors' => [\r\n '{{WRAPPER}} .hard-single-item-02 .content .title:hover' => \"color:{{VALUE}}\"\r\n ]\r\n ]);\r\n\r\n $this->end_controls_tab();\r\n\r\n $this->end_controls_tabs();\r\n\r\n $this->end_controls_section();\r\n\r\n /* title styling tabs end */\r\n\r\n /* readmore styling tabs start */\r\n $this->start_controls_section(\r\n 'readmore_settings_section',\r\n [\r\n 'label' => esc_html__('Category Styling', 'aapside-master'),\r\n 'tab' => Controls_Manager::TAB_STYLE,\r\n ]\r\n );\r\n\r\n $this->start_controls_tabs(\r\n 'readmore_style_tabs'\r\n );\r\n\r\n $this->start_controls_tab(\r\n 'readmore_style_normal_tab',\r\n [\r\n 'label' => __('Normal', 'aapside-master'),\r\n ]\r\n );\r\n\r\n $this->add_control('readmore_color', [\r\n 'label' => esc_html__('Color', 'aapside-master'),\r\n 'type' => Controls_Manager::COLOR,\r\n 'selectors' => [\r\n '{{WRAPPER}} .hard-single-item-02 .content .catagory a' => \"color:{{VALUE}}\"\r\n ]\r\n ]);\r\n $this->end_controls_tab();\r\n\r\n $this->start_controls_tab(\r\n 'readmore_style_hover_tab',\r\n [\r\n 'label' => __('Hover', 'aapside-master'),\r\n ]\r\n );\r\n\r\n $this->add_control('readmore_hover_color', [\r\n 'label' => esc_html__('Color', 'aapside-master'),\r\n 'type' => Controls_Manager::COLOR,\r\n 'selectors' => [\r\n '{{WRAPPER}} .hard-single-item-02 .content .catagory a:hover' => \"color:{{VALUE}}\"\r\n ]\r\n ]);\r\n $this->end_controls_tab();\r\n\r\n $this->end_controls_tabs();\r\n\r\n $this->end_controls_section();\r\n /* readmore styling tabs end */\r\n\r\n /* pagination styling tabs start */\r\n $this->start_controls_section(\r\n 'pagination_settings_section',\r\n [\r\n 'label' => esc_html__('Pagination Settings', 'aapside-master'),\r\n 'tab' => Controls_Manager::TAB_STYLE,\r\n ]\r\n );\r\n\r\n $this->start_controls_tabs(\r\n 'pagination_style_tabs'\r\n );\r\n\r\n $this->start_controls_tab(\r\n 'pagination_style_normal_tab',\r\n [\r\n 'label' => __('Normal', 'aapside-master'),\r\n ]\r\n );\r\n\r\n $this->add_control('pagination_color', [\r\n 'type' => Controls_Manager::COLOR,\r\n 'label' => esc_html__('Color', 'aapside-master'),\r\n 'selectors' => [\r\n \"{{WRAPPER}} .portfolio-pagination` ul li a\" => \"color: {{VALUE}}\",\r\n \"{{WRAPPER}} .portfolio-pagination ul li span\" => \"color: {{VALUE}}\",\r\n ]\r\n ]);\r\n $this->add_control('pagination_border_color', [\r\n 'type' => Controls_Manager::COLOR,\r\n 'label' => esc_html__('Border Color', 'aapside-master'),\r\n 'selectors' => [\r\n \"{{WRAPPER}} .portfolio-pagination ul li a\" => \"border-color: {{VALUE}}\",\r\n \"{{WRAPPER}} .portfolio-pagination ul li span\" => \"border-color: {{VALUE}}\",\r\n ]\r\n ]);\r\n $this->add_control('pagination_hr', [\r\n 'type' => Controls_Manager::DIVIDER\r\n ]);\r\n $this->add_group_control(Group_Control_Background::get_type(), [\r\n 'name' => 'pagination_background',\r\n 'label' => esc_html__('Background', 'aapside-master'),\r\n 'selector' => \"{{WRAPPER}} .portfolio-pagination ul li a, {{WRAPPER}} .portfolio-pagination ul li span\"\r\n ]);\r\n\r\n $this->end_controls_tab();\r\n\r\n $this->start_controls_tab(\r\n 'pagination_style_hover_tab',\r\n [\r\n 'label' => __('Hover', 'aapside-master'),\r\n ]\r\n );\r\n $this->add_control('pagination_hover_color', [\r\n 'type' => Controls_Manager::COLOR,\r\n 'label' => esc_html__('Color', 'aapside-master'),\r\n 'selectors' => [\r\n \"{{WRAPPER}} .portfolio-pagination ul li a:hover\" => \"color: {{VALUE}}\",\r\n \"{{WRAPPER}} .portfolio-pagination ul li span.current\" => \"color: {{VALUE}}\",\r\n ]\r\n ]);\r\n $this->add_control('pagination_hover_border_color', [\r\n 'type' => Controls_Manager::COLOR,\r\n 'label' => esc_html__('Border Color', 'aapside-master'),\r\n 'selectors' => [\r\n \"{{WRAPPER}} .portfolio-pagination ul li a:hover\" => \"border-color: {{VALUE}}\",\r\n \"{{WRAPPER}} .portfolio-pagination ul li span.current\" => \"border-color: {{VALUE}}\",\r\n ]\r\n ]);\r\n $this->add_control('pagination_hover_hr', [\r\n 'type' => Controls_Manager::DIVIDER\r\n ]);\r\n $this->add_group_control(Group_Control_Background::get_type(), [\r\n 'name' => 'pagination_hover_background',\r\n 'label' => esc_html__('Background', 'aapside-master'),\r\n 'selector' => \"{{WRAPPER}} .portfolio-pagination ul li a:hover, {{WRAPPER}} .Portfolio-pagination ul li span.current\"\r\n ]);\r\n\r\n\r\n $this->end_controls_tab();\r\n\r\n $this->end_controls_tabs();\r\n\r\n $this->end_controls_section();\r\n /* pagination styling tabs end */\r\n\r\n /* Typography tabs start */\r\n $this->start_controls_section(\r\n 'typography_settings_section',\r\n [\r\n 'label' => esc_html__('Typography Settings', 'aapside-master'),\r\n 'tab' => Controls_Manager::TAB_STYLE,\r\n ]\r\n );\r\n $this->add_group_control(Group_Control_Typography::get_type(), [\r\n 'name' => 'title_typography',\r\n 'label' => esc_html__('Title Typography', 'aapside-master'),\r\n 'selector' => \"{{WRAPPER}} .hard-single-item-02 .content .title\"\r\n ]);\r\n $this->add_group_control(Group_Control_Typography::get_type(), [\r\n 'name' => 'post_meta_typography',\r\n 'label' => esc_html__('Category Typography', 'aapside-master'),\r\n 'selector' => \"{{WRAPPER}} .hard-single-item-02 .content .cats\"\r\n ]);\r\n $this->end_controls_section();\r\n\r\n /* Typography tabs end */\r\n }", "protected function _register_controls()\n {\n\n global $rand_num;\n $rand_num = rand(10000000, 99909999);\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => __('Section Heading Settings', 'careerfy-frame'),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n $this->add_control(\n 'view',\n [\n 'label' => __('Style', 'careerfy-frame'),\n 'type' => Controls_Manager::SELECT2,\n 'default' => 'view1',\n 'options' => [\n 'view1' => __('Style 1', 'careerfy-frame'),\n 'view2' => __('Style 2', 'careerfy-frame'),\n 'view3' => __('Style 3', 'careerfy-frame'),\n 'view4' => __('Style 4', 'careerfy-frame'),\n 'view5' => __('Style 5', 'careerfy-frame'),\n 'view6' => __('Style 6', 'careerfy-frame'),\n 'view7' => __('Style 7', 'careerfy-frame'),\n 'view8' => __('Style 8', 'careerfy-frame'),\n 'view9' => __('Style 9', 'careerfy-frame'),\n 'view10' => __('Style 10', 'careerfy-frame'),\n 'view11' => __('Style 11', 'careerfy-frame'),\n 'view12' => __('Style 12', 'careerfy-frame'),\n 'view13' => __('Style 13', 'careerfy-frame'),\n 'view14' => __('Style 14', 'careerfy-frame'),\n 'view15' => __('Style 15', 'careerfy-frame'),\n 'view16' => __('Style 16', 'careerfy-frame'),\n 'view17' => __('Style 17', 'careerfy-frame'),\n 'view18' => __('Style 18', 'careerfy-frame'),\n ],\n ]\n );\n $this->add_control(\n 's_title',\n [\n 'label' => __('Small Title', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'condition' => [\n 'view' => ['view6','view18']\n ],\n ]\n );\n $this->add_control(\n 'heading_img',\n [\n 'label' => __('Image', 'careerfy-frame'),\n 'type' => Controls_Manager::MEDIA,\n 'dynamic' => [\n 'active' => true,\n ],\n 'default' => [\n 'url' => Utils::get_placeholder_image_src(),\n ],\n 'condition' => [\n 'view' => array('view8', 'view15')\n ],\n ]\n );\n $this->add_control(\n 'h_title',\n [\n 'label' => __('Title', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n\n ]\n );\n $this->add_control(\n 'num_title',\n [\n 'label' => __('Title Number', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'condition' => [\n 'view' => 'view6'\n ],\n ]\n );\n $this->add_control(\n 'h_fancy_title',\n [\n 'label' => __('Fancy Title', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'condition' => [\n 'view' => array('view1', 'view2', 'view3', 'view4', 'view5')\n ],\n ]\n );\n\n $this->add_control(\n 'hc_icon',\n [\n 'label' => __('Icon', 'careerfy-frame'),\n 'type' => Controls_Manager::ICONS,\n 'description' => __(\"This will apply to heading style 3 only.\", \"careerfy-frame\"),\n 'condition' => [\n 'view' => array('view1', 'view2', 'view3', 'view4', 'view5')\n ],\n ]\n );\n $this->add_control(\n 'h_desc',\n [\n 'label' => __('Description', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXTAREA,\n ]\n );\n\n $this->add_control(\n 'text_align',\n [\n 'label' => __('Text Align', 'careerfy-frame'),\n 'type' => Controls_Manager::SELECT2,\n 'default' => 'center',\n 'options' => [\n 'center' => __('Center', 'careerfy-frame'),\n 'left' => __('Left', 'careerfy-frame'),\n\n ],\n 'condition' => [\n 'view' => array('view7', 'view8', 'view17','view18')\n ],\n ]\n );\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'section_style',\n [\n 'label' => __('Heading Style', 'careerfy-frame'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n\n $this->add_control(\n 'hc_title',\n [\n 'label' => __('Color Title', 'careerfy-frame'),\n 'type' => Controls_Manager::COLOR,\n 'condition' => [\n 'view' => array('view1', 'view2', 'view3', 'view4', 'view5')\n ],\n ]\n );\n $this->add_control(\n 's_title_clr',\n [\n 'label' => __('Choose Small Title Color', 'careerfy-frame'),\n 'type' => Controls_Manager::COLOR,\n 'condition' => [\n 'view' => ['view6','view18']\n ],\n ]\n );\n $this->add_control(\n 'hc_title_clr',\n [\n 'label' => __('Choose Title Color', 'careerfy-frame'),\n 'type' => Controls_Manager::COLOR,\n 'description' => __(\"This Color will apply to 'Color Title'.\", \"careerfy-frame\"),\n\n ]\n );\n $this->add_control(\n 'desc_clr',\n [\n 'label' => __('Choose Description Color', 'careerfy-frame'),\n 'type' => Controls_Manager::COLOR,\n 'condition' => [\n 'view' => 'view6'\n ],\n ]\n );\n $this->add_control(\n 'proc_num_clr',\n [\n 'label' => __('Choose Process Number Color', 'careerfy-frame'),\n 'type' => Controls_Manager::COLOR,\n 'condition' => [\n 'view' => 'view6'\n ],\n ]\n );\n $this->add_control(\n 'hc_dcolor',\n [\n 'label' => __('Description Color', 'careerfy-frame'),\n 'type' => Controls_Manager::COLOR,\n 'description' => __(\"This will apply to the description only.\", \"careerfy-frame\"),\n\n ]\n );\n\n\n $this->end_controls_section();\n }", "protected function _register_controls()\n {\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => __('Video Testimonials Settings', 'careerfy-frame'),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'vid_testimonial_view',\n [\n 'label' => __('Style', 'careerfy-frame'),\n 'type' => Controls_Manager::SELECT2,\n 'default' => 'view1',\n 'options' => [\n 'view1' => __('Style 1', 'careerfy-frame'),\n 'view2' => __('Style 2', 'careerfy-frame'),\n 'view3' => __('Style 3', 'careerfy-frame'),\n ],\n ]\n );\n\n $repeater = new \\Elementor\\Repeater();\n $repeater->add_control(\n 'vid_testimonial_img', [\n 'label' => __('Image', 'careerfy-frame'),\n 'type' => Controls_Manager::MEDIA,\n 'label_block' => true,\n 'dynamic' => [\n 'active' => true,\n ],\n 'default' => [\n 'url' => Utils::get_placeholder_image_src(),\n ],\n ]\n );\n\n $repeater->add_control(\n 'vid_url', [\n 'label' => __('Video URL', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n \"description\" => __(\"Put Video URL of Vimeo, Youtube.\", \"careerfy-frame\")\n ]\n );\n\n $repeater->add_control(\n 'client_title', [\n 'label' => __('Client Name', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'label_block' => true,\n \"description\" => __('client Title will be applied on style 1 and style 3.', \"careerfy-frame\")\n ]\n );\n\n\n $repeater->add_control(\n 'rank_title', [\n 'label' => __('Client Rank', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'label_block' => true,\n \"description\" => __('Client Rank will be applied on style 1 and style 3.', \"careerfy-frame\")\n ]\n );\n\n $repeater->add_control(\n 'company_title', [\n 'label' => __('Client Company', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'label_block' => true,\n \"description\" => __(\"Client Company will be applied to style 1 and style 2.\", \"careerfy-frame\")\n ]\n );\n\n $repeater->add_control(\n 'testimonial_desc', [\n 'label' => __('Description', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXTAREA,\n 'label_block' => true,\n \"description\" => __(\"Testimonial Description will be applied to style 3 only.\", \"careerfy-frame\")\n ]\n );\n\n $repeater->add_control(\n 'client_location', [\n 'label' => __('Client Location', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'label_block' => true,\n \"description\" => __(\"Client Location will be applied to style 3 only.\", \"careerfy-frame\")\n ]\n );\n $this->add_control(\n 'careerfy_video_testimonial_item',\n [\n 'label' => __('Add video testimonial item', 'careerfy-frame'),\n 'type' => Controls_Manager::REPEATER,\n 'fields' => $repeater->get_controls(),\n 'title_field' => '{{{ company_title }}}',\n ]\n );\n $this->end_controls_section();\n }", "function wpbasic_customizer( $wp_customize ) {\n\n // Social Account - Section\n // Please note: You will not be able to see the settings section until it contains at least one setting\n $wp_customize->add_section(\n 'wpbasic_social_accounts',\n array(\n 'title' => 'Social Account',\n 'priority' => 10\n )\n );\n \n // Twitter Setting and Control (these go hand in hand like two peas in a pod)\n // Please note: You will not be able to see this new setting until it has it’s own control\n $wp_customize->add_setting(\n 'wpbasic_social_accounts', // The unique ID of this setting\n array(\n //default option that is registerd under choices\n 'default' => '@Facebook',\n 'type' => 'theme_mod',\n )\n );\n \n \n // Controls are simply the interface used to change a setting\n $wp_customize->add_control(\n 'wpbasic_social_accounts',\n array(\n \n 'type' => 'select',\n \n 'label' => 'Social Accounts:',\n 'section' => 'wpbasic_social_accounts',\n \n 'choices' => array(\n '@Twitter' => '@Twitter',\n '@Facebook' => '@Facebook',\n '@Instagram' => '@Instagram',\n ),\n )\n );\n \n // Email Setting and Control\n $wp_customize->add_setting(\n \"wpbasic_social_accounts_email\", // The unique ID of this setting\n array(\n 'default' => '[email protected]',\n )\n );\n\t\n\t$wp_customize->add_control(\n\t\t\"wpbasic_social_accounts_email\",\n\t\tarray(\n\t\t\t\"label\" => \"Email\",\n\t\t\t\"section\" => \"wpbasic_social_accounts\",\n\t\t\t\"type\" => \"email\",\n\t\t)\n\t);\n\t\n}", "public function customize_register( $wp_customize ) {\n\t\trequire_once( ATMEDLEY_DIR . '/includes/class-atmedley-customize-control-textarea.php' );\n\n\t\t$wp_customize->add_section( 'atmedley_credits', array(\n\t\t\t'title' => __( 'Theme Credits', 'audiotheme-medley' ),\n\t\t\t'priority' => 1000,\n\t\t) );\n\n\t\t$wp_customize->add_setting( 'atmedley[credits_text]', array(\n\t\t\t'default' => '',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'atmedley_allowed_tags',\n\t\t\t'type' => 'option',\n\t\t) );\n\n\t\t$wp_customize->add_control( new ATMedley_Customize_Control_Textarea( $wp_customize, 'atmedley_credits_text', array(\n\t\t\t'label' => __( 'Credits', 'audiotheme-medley' ),\n\t\t\t'rows' => 3,\n\t\t\t'section' => 'atmedley_credits',\n\t\t\t'settings' => 'atmedley[credits_text]',\n\t\t) ) );\n\n\t\t$wp_customize->add_setting( 'atmedley[credits_placement]', array(\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'type' => 'option',\n\t\t) );\n\n\t\t$wp_customize->add_control( 'atmedley_credits_placement', array(\n\t\t\t'choices' => array(\n\t\t\t\t'' => '',\n\t\t\t\t'before' => __( 'Before', 'audiotheme-medley' ),\n\t\t\t\t'after' => __( 'After', 'audiotheme-medley' ),\n\t\t\t\t'replace' => __( 'Replace', 'audiotheme-medley' ),\n\t\t\t\t'remove' => __( 'Remove All', 'audiotheme-medley' )\n\t\t\t),\n\t\t\t'label' => __( 'Placement', 'audiotheme-medley' ),\n\t\t\t'section' => 'atmedley_credits',\n\t\t\t'settings' => 'atmedley[credits_placement]',\n\t\t\t'type' => 'select',\n\t\t) );\n\t}", "public static function register($wp_customize)\n {\n require_once(get_template_directory().\"/customizer/alpha-color-picker-customizer.php\");\n\n if (!isset($lc_customize['menu_mobile_bg_color'])) {\n $lc_customize['menu_mobile_bg_color'] = 'rgba(35, 35, 35, 1)';\n }\n if (!isset($lc_customize['mobile_border_bottom_color'])) {\n $lc_customize['mobile_border_bottom_color'] = '#333333';\n }\n\n\n //Define a new section (if desired) to the Theme Customizer\n $wp_customize->add_section( 'lc_second_color',\n array(\n 'title' => esc_html__('Vibrant Color', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 1, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Choose the link color', 'heritage'), //Descriptive tooltip\n )\n );\n\n //Register new settings to the WP database...\n $wp_customize->add_setting( 'lc_customize[lc_second_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#18aebf', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //Finally, we define the control itself (which links a setting to a section and renders the HTML controls)...\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_second_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Secondary Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_second_color', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_second_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 1, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*\n MENU OPTIONS\n */\n $wp_customize->add_section('lc_menu_options',\n array(\n 'title' => esc_html__('Menu Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 2, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Choose menu colors', 'heritage'), //Descriptive tooltip\n )\n );\n\n /*menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_bar_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 0)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_bar_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_bar_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*sticky menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_sticky_bar_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 1)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_sticky_bar_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Sticky Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_sticky_bar_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*mobile menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_mobile_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 1)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_mobile_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Mobile Menu Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_mobile_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*mobile menu border bottom color*/\n $wp_customize->add_setting('lc_customize[mobile_border_bottom_color]',\n array(\n 'default' => '#e1e1e1', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'mobile_border_bottom_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Mobile Menu Border Bottom Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[mobile_border_bottom_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*above the menu bar*/\n $wp_customize->add_setting('lc_customize[above_the_menu_bar]',\n array(\n 'default' => 'rgba(241, 246, 247, 0.9)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'above_the_menu_bar', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Above The Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[above_the_menu_bar]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*menu text color*/\n $wp_customize->add_setting('lc_customize[menu_text_color]',\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_menu_text_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Text Color', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_text_color]',\n 'priority' => 2,\n )\n ));\n\n /*menu text hover color*/\n $wp_customize->add_setting('lc_customize[menu_text_hover_color]',\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_menu_text_hover_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Text Color on Hover', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_text_hover_color]',\n 'priority' => 3,\n )\n ));\n\n /*current menu item text color*/\n $wp_customize->add_setting('lc_customize[current_menu_item_text_color]',\n array(\n 'default' => '#18aebf',\t\t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_current_menu_item_text_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Current Menu Item Text Color', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[current_menu_item_text_color]',\n 'priority' => 5,\n )\n ));\n\n /*sub menu bg color*/\n $wp_customize->add_setting('lc_customize[submenu_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 0)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'submenu_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Sub Menu Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[submenu_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 6\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*menu bar color*/\n $wp_customize->add_setting('lc_customize[creative_menu_overlay_bg]',\n array(\n 'default' => 'rgba(255, 255, 255, 0.9)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'creative_menu_overlay_bg', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Creative Menu Overlay Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[creative_menu_overlay_bg]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 7\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*top icons on creative menu*/\n $wp_customize->add_setting('lc_customize[creative_icons_color]',\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_creative_icons_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Top Icons Color For Creative Menu. Also, the color for mobile menu icons, menu icon and search icon.', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[creative_icons_color]',\n 'priority' => 8\n )\n ));\n\n /*login signup wish list color*/\n $wp_customize->add_setting('lc_customize[login_wishlist_color]',\n array(\n 'default' => '#959595', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'at_login_wishlist_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Text color for login, sign-up and wish list links on the menu bar.', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[login_wishlist_color]',\n 'priority' => 8\n )\n ));\n\n /*buttons*/\n $wp_customize->add_section( 'lc_button_colors',\n array(\n 'title' => esc_html__('Button Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 3, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Set button colors.', 'heritage'), //Descriptive tooltip\n )\n );\n\n $wp_customize->add_setting( 'lc_customize[lc_use_custom_btn_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => 'use_defaults', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback'\t=> 'HERITAGE_sanitize_buttons_custom',\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control('lc_use_custom_btn_color_control' ,\n array(\n 'label' \t=> esc_html__('Buttons Colors', 'heritage'),\n 'section' \t=> 'lc_button_colors',\n 'settings' \t=> 'lc_customize[lc_use_custom_btn_color]',\n 'priority' \t=> 1,\n 'type'\t\t=> 'select',\n 'choices' => array(\n 'use_defaults' \t\t=> esc_html__('Use Theme Defaults', 'heritage'),\n 'custom_btn_colors' => esc_html__('Use Custom Colors', 'heritage' ),\n ),\n )\n );\n\n /*btn bg color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Background Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn text color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_txt_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_txt_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Text Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_txt_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn border color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_border_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_border_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Border Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_border_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn bg color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_bg_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#555555', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_bg_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Background Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_bg_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn text color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_txt_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_txt_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Text Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_txt_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn border color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_border_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#555555', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_border_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Border Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_border_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n\n /*Various*/\n $wp_customize->add_section( 'lc_various_colors',\n array(\n 'title' => esc_html__('Various Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 3, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Set general colors.', 'heritage'), //Descriptive tooltip\n )\n );\n\n /*bg color for single post with no featured img in blog template*/\n $wp_customize->add_setting( 'lc_customize[lc_blog_brick_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#1d1d1d', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_blog_brick_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color For Blog Items With No Featured Image', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_blog_brick_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 1, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*bg color for minicart and wishlist popups*/\n $wp_customize->add_setting( 'lc_customize[lc_minicart_wishlist_popup_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //define the control\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_minicart_wishlist_popup_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color For Minciart And Wishlist Popups', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_minicart_wishlist_popup_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n\n /*bg color for overlay on shop page*/\n $wp_customize->add_setting( 'lc_customize[lc_shop_overlay_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => 'rgba(255,255,255, 0.7)', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //define the control\n $wp_customize->add_control( new Customize_Alpha_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_shop_overlay_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color Product Actions Overlay On Shop Page', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_shop_overlay_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 4, //Determines the order this control appears in for the specified section\n )\n ));\n\n }", "function eggnews_additional_settings_register( $wp_customize ) {\n $wp_customize->add_panel(\n 'eggnews_additional_settings_panel',\n array(\n 'priority' => 7,\n 'capability' => 'edit_theme_options',\n 'theme_supports' => '',\n 'title' => esc_html__( 'Additional Settings', 'eggnews' ),\n )\n );\n/*--------------------------------------------------------------------------------------------*/\n\t// Category Color Section\n $wp_customize->add_section(\n 'eggnews_categories_color_section',\n array(\n 'title' => esc_html__( 'Categories Color', 'eggnews' ),\n 'priority' => 5,\n 'panel' => 'eggnews_additional_settings_panel',\n )\n );\n\n\t$priority = 3;\n\t$categories = get_terms( 'category' ); // Get all Categories\n\t$wp_category_list = array();\n\n\tforeach ( $categories as $category_list ) {\n\n\t\t$wp_customize->add_setting(\n\t\t\t'eggnews_category_color_'.esc_html( strtolower( $category_list->name ) ),\n\t\t\tarray(\n\t\t\t\t'default' => '#408c40',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t$wp_customize,\n\t\t\t\t'eggnews_category_color_'.esc_html( strtolower($category_list->name) ),\n\t\t\t\tarray(\n\t\t\t\t\t/* translators: %s: category namet */\n\t\t\t\t\t'label' => sprintf( esc_html__( ' %s', 'eggnews' ), esc_html( $category_list->name ) ),\n\t\t\t\t\t'section' => 'eggnews_categories_color_section',\n\t\t\t\t\t'priority' => absint($priority)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$priority++;\n\t}\n/*--------------------------------------------------------------------------------------------*/\n\t//Social icons\n\t$wp_customize->add_section(\n 'eggnews_social_media_section',\n array(\n 'title' => esc_html__( 'Social Media', 'eggnews' ),\n 'priority' => 10,\n 'panel' => 'eggnews_additional_settings_panel',\n )\n );\n\n\t//Add Facebook Link\n $wp_customize->add_setting(\n 'social_fb_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_fb_link',\n array(\n 'type' => 'text',\n 'priority' => 5,\n 'label' => esc_html__( 'Facebook', 'eggnews' ),\n 'description' => esc_html__( 'Your Facebook Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add twitter Link\n $wp_customize->add_setting(\n 'social_tw_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_tw_link',\n array(\n 'type' => 'text',\n 'priority' => 6,\n 'label' => esc_html__( 'Twitter', 'eggnews' ),\n 'description' => esc_html__( 'Your Twitter Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add Google plus Link\n $wp_customize->add_setting(\n 'social_gp_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_gp_link',\n array(\n 'type' => 'text',\n 'priority' => 7,\n 'label' => esc_html__( 'Google Plus', 'eggnews' ),\n 'description' => esc_html__( 'Your Google Plus Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add LinkedIn Link\n $wp_customize->add_setting(\n 'social_lnk_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_lnk_link',\n array(\n 'type' => 'text',\n 'priority' => 8,\n 'label' => esc_html__( 'LinkedIn', 'eggnews' ),\n 'description' => esc_html__( 'Your LinkedIn Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add youtube Link\n $wp_customize->add_setting(\n 'social_yt_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_yt_link',\n array(\n 'type' => 'text',\n 'priority' => 9,\n 'label' => esc_html__( 'YouTube', 'eggnews' ),\n 'description' => esc_html__( 'Your YouTube Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add vimeo Link\n $wp_customize->add_setting(\n 'social_vm_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_vm_link',\n array(\n 'type' => 'text',\n 'priority' => 10,\n 'label' => esc_html__( 'Vimeo', 'eggnews' ),\n 'description' => esc_html__( 'Your Vimeo Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add Pinterest link\n $wp_customize->add_setting(\n 'social_pin_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_pin_link',\n array(\n 'type' => 'text',\n 'priority' => 11,\n 'label' => esc_html__( 'Pinterest', 'eggnews' ),\n 'description' => esc_html__( 'Your Pinterest Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add Instagram link\n $wp_customize->add_setting(\n 'social_insta_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_insta_link',\n array(\n 'type' => 'text',\n 'priority' => 12,\n 'label' => esc_html__( 'Instagram', 'eggnews' ),\n 'description' => esc_html__( 'Your Instagram Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n}", "protected function _register_controls() {\n\n\t\t\t\t$this->start_controls_section(\n\t\t\t\t\t'section_sc_booked',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'ThemeREX Booked Calendar', 'trx_addons' ),\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'style',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Layout', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t\t'calendar' => esc_html__('Calendar', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t'list' => esc_html__('List', 'trx_addons')\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'calendar'\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'calendar',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Calendar', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => trx_addons_array_merge(array(0 => esc_html__('- Select calendar -', 'trx_addons')), trx_addons_get_list_terms(false, 'booked_custom_calendars')),\n\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'month',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Month', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => trx_addons_array_merge(array(0 => esc_html__('- Current month -', 'trx_addons')), trx_addons_get_list_months()),\n\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'year',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Year', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => trx_addons_array_merge(array(0 => esc_html__('- Current year -', 'trx_addons')), trx_addons_get_list_range(date('Y'), date('Y')+25)),\n\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->end_controls_section();\n\t\t\t}", "protected function _register_controls() {\n \n \t$this->start_controls_section(\n \t\t'section_listing_posts',\n \t\t[\n \t\t\t'label' => __( 'Listing Posts', 'listslides' ),\n \t\t\t'tab' => Controls_Manager::TAB_CONTENT,\n \t\t]\n \t); \n\n \t$this->add_control(\n \t\t'item_per_page',\n \t\t[\n \t\t\t'label' => __( 'Number of Listings', 'listslides' ),\n \t\t\t'type' => Controls_Manager::SELECT,\n \t\t\t'default' => 5,\n \t\t\t'options' => [\n \t\t\t\t2 => __( 'Two', 'listslides' ),\n \t\t\t\t3 => __( 'Three', 'listslides' ),\n \t\t\t\t4 => __( 'Four', 'listslides' ),\n \t\t\t\t5 => __( 'Five', 'listslides')\n \t\t\t]\n \t\t]\n \t);\n\n \t$this->end_controls_section();\n\n \t$this->start_controls_section(\n\t\t\t'slide_settings',\n\t\t\t[\n\t\t\t\t'label' => __( 'Slides Settings', 'listslides' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'nav',\n\t\t\t[\n\t\t\t\t'label' => __( 'Navigation Arrow', 'listslides' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'listslides' ),\n\t\t\t\t'label_off' => __( 'Hide', 'listslides' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => 'true',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'dots',\n\t\t\t[\n\t\t\t\t'label' => __( 'Dots', 'listslides' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'listslides' ),\n\t\t\t\t'label_off' => __( 'Hide', 'listslides' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => 'true',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'autoplay',\n\t\t\t[\n\t\t\t\t'label' => __( 'Auto Play', 'listslides' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'listslides' ),\n\t\t\t\t'label_off' => __( 'No', 'listslides' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => 'true',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'loop',\n\t\t\t[\n\t\t\t\t'label' => __( 'Loop', 'listslides' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'listslides' ),\n\t\t\t\t'label_off' => __( 'No', 'listslides' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => 'true',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'mouseDrag',\n\t\t\t[\n\t\t\t\t'label' => __( 'Mouse Drag', 'listslides' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'listslides' ),\n\t\t\t\t'label_off' => __( 'No', 'listslides' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => 'true',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'touchDrag',\n\t\t\t[\n\t\t\t\t'label' => __( 'Touch Motion', 'listslides' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Yes', 'listslides' ),\n\t\t\t\t'label_off' => __( 'No', 'listslides' ),\n\t\t\t\t'return_value' => 'true',\n\t\t\t\t'default' => 'true',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'autoplayTimeout',\n\t\t\t[\n\t\t\t\t'label' => __( 'Autoplay Timeout', 'listslides' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => '3000',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'autoplay' => 'true',\n\t\t\t\t],\n\t\t\t\t'options' => [\n\t\t\t\t\t'2000' => __( '2 Seconds', 'listslides' ),\n\t\t\t\t\t'3000' => __( '3 Seconds', 'listslides' ),\n\t\t\t\t\t'5000' => __( '5 Seconds', 'listslides' ),\n\t\t\t\t\t'10000' => __( '10 Seconds', 'listslides' ),\n\t\t\t\t\t'15000' => __( '15 Seconds', 'listslides' ),\n\t\t\t\t\t'20000' => __( '20 Seconds', 'listslides' ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n }", "public function register()\n {\n\n if( ! $this->activated( 'cf_manager' ) ) return;\n\n\n $this->settings = new SettingsApi();\n\n $this->callbacks = new AdminCallbacks();\n\n $this->cf_callbacks = new CfCallbacks();\n\n $this->setSubpages();\n\n $this->metaBoxes = array();\n\n\n $this->setSettings();\n $this->setSections();\n $this->setFields();\n\n\n $this->settings->addSubPages( $this->subpages )->register();\n\n\n $this->showPosts();\n\n if( ! empty( $this->metaBoxes ) ) {\n\n add_action( 'add_meta_boxes', array( $this, 'addMultipleMetaBoxes' ) );\n\n }\n\n }", "protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore\n\n\t\t$this->register_controls();\n\t}", "function twentynineteen_xili_customize_register( $wp_customize ) {\n\t$wp_customize->add_section( 'texts_section' , array(\n\t\t\t\t\t'title' => __( 'Other texts section', 'twentynineteen-xili' ),\n\t\t\t\t\t'priority' => 421\n\t));\n\n\t$wp_customize->add_setting(\n\t\t'copyright',\n\t\tarray(\n\t\t\t'sanitize_callback' => 'twentynineteenxili_sanitize_text',\n\t\t\t'default' => __( 'My company', 'twentynineteen-xili' ),\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control( 'copyright', array(\n\t\t\t\t'label' => __( 'Your copyright (footer)', 'twentynineteen-xili' ),\n\t\t\t\t'section' => 'texts_section',\n\t\t\t\t'settings' => 'copyright',\n\t\t\t\t'priority' => 1,\n\t\t) );\n\n}", "private function setup_actions() {\n\n\t\t// Register panels, sections, settings, controls, and partials.\n\t\tadd_action( 'customize_register', array( $this, 'sections' ) );\n\n\t}", "protected function _register_controls()\n {\n \n // start_controls_section -----\n $this->start_controls_section(\n 'general_settings_section',\n [\n 'label' => __('General Settings', 'elementor-hello-world'),\n ]\n );\n $this->add_control(\n 'title',\n [\n 'label' => __('Title', 'elementor-hello-world'),\n 'type' => Controls_Manager::TEXTAREA,\n 'default' => ''\n ]\n );\n $this->add_control(\n 'description',\n [\n 'label' => 'Description',\n 'type' => Controls_Manager::WYSIWYG,\n 'default' => ''\n ]\n );\n \n $this->add_control(\n 'extra_classes',\n [\n 'label' => __('Extra Classes', 'elementor-hello-world'),\n 'type' => Controls_Manager::TEXT,\n 'default' => ''\n ]\n );\n $this->end_controls_section();\n \n $oRepeater = new \\Elementor\\Repeater();\n $this->start_controls_section(\n 'tab_name',\n [\n 'label' => __('Tab Name', 'elementor-hello-world'),\n ]\n );\n $oRepeater->add_control(\n 'tab_name',\n [\n 'label' => __('Tab Name', 'hslanding-elementor'),\n 'type' => \\Elementor\\Controls_Manager::TEXT,\n 'label_block' => true,\n ]\n );\n \n $oRepeater->add_control(\n 'tab_description',\n [\n 'label' => __('Tab Description', 'hslanding-elementor'),\n 'type' => \\Elementor\\Controls_Manager::WYSIWYG,\n 'label_block' => true,\n ]\n );\n \n $oRepeater->add_control(\n 'right_image',\n [\n 'label' => __('Right Image', 'hslanding-elementor'),\n 'type' => \\Elementor\\Controls_Manager::MEDIA,\n 'label_block' => true,\n ]\n );\n $oRepeater->add_control(\n 'right_content',\n [\n 'label' => __('Right Content', 'hslanding-elementor'),\n 'type' => \\Elementor\\Controls_Manager::WYSIWYG,\n 'label_block' => true,\n ]\n );\n $this->add_control(\n 'tabs',\n [\n 'label' => __('Tab Settings', 'plugin-domain'),\n 'type' => \\Elementor\\Controls_Manager::REPEATER,\n 'fields' => $oRepeater->get_controls()\n ]\n );\n \n // end_controls_section -----\n $this->end_controls_section();\n }", "protected function _register_controls() {\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'General Settings', 'essential-addons-elementor' )\n \t\t\t]\n \t\t);\n \t\t$this->add_control(\n\t\t 'eael_google_map_type',\n\t\t \t[\n\t\t \t\t'label' \t=> esc_html__( 'Google Map Type', 'essential-addons-elementor' ),\n\t\t \t'type' \t\t\t=> Controls_Manager::SELECT,\n\t\t \t'default' \t\t=> 'basic',\n\t\t \t'label_block' \t=> false,\n\t\t \t'options' \t\t=> [\n\t\t \t\t'basic' \t=> esc_html__( 'Basic', 'essential-addons-elementor' ),\n\t\t \t\t'marker' \t=> esc_html__( 'Multiple Marker', 'essential-addons-elementor' ),\n\t\t \t\t'static' \t=> esc_html__( 'Static', 'essential-addons-elementor' ),\n\t\t \t\t'polyline' => esc_html__( 'Polyline', 'essential-addons-elementor' ),\n\t\t \t\t'polygon' \t=> esc_html__( 'Polygon', 'essential-addons-elementor' ),\n\t\t \t\t'overlay' \t=> esc_html__( 'Overlay', 'essential-addons-elementor' ),\n\t\t \t\t'routes' \t=> esc_html__( 'With Routes', 'essential-addons-elementor' ),\n\t\t \t\t'panorama' => esc_html__( 'Panorama', 'essential-addons-elementor' ),\n\t\t \t]\n\t\t \t]\n\t\t);\n\t\t$this->add_control(\n 'eael_google_map_address_type',\n [\n 'label' => __( 'Address Type', 'essential-addons-elementor' ),\n 'type' => Controls_Manager::CHOOSE,\n 'options' => [\n\t\t\t\t\t'address' => [\n\t\t\t\t\t\t'title' => __( 'Address', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-map',\n\t\t\t\t\t],\n\t\t\t\t\t'coordinates' => [\n\t\t\t\t\t\t'title' => __( 'Coordinates', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-map-marker',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default' => 'address',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['basic']\n\t\t\t\t]\n ]\n );\n $this->add_control(\n\t\t\t'eael_google_map_addr',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Geo Address', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Marina Bay, Singapore', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_address_type' => ['address'],\n\t\t\t\t\t'eael_google_map_type' => ['basic']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type!' => ['routes'],\n\t\t\t\t\t'eael_google_map_address_type' => ['coordinates']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type!' => ['routes'],\n\t\t\t\t\t'eael_google_map_address_type' => ['coordinates']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t// Only for static\n\t\t$this->add_control(\n\t\t\t'eael_google_map_static_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['static'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_static_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['static'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_resolution_title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Map Image Resolution', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => 'static'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_static_width',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Static Image Width', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 610\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 1400,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => 'static'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_static_height',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Static Image Height', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 300\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 700,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => 'static'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t// Only for Overlay\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['overlay'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['overlay'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t// Only for panorama\n\t\t$this->add_control(\n\t\t\t'eael_google_map_panorama_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['panorama'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_panorama_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['panorama'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_content',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Overlay Content', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t'label_block' => True,\n\t\t\t\t'default' => esc_html__( 'Add your content here', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => 'overlay'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n \t\t$this->end_controls_section();\n \t\t/**\n \t\t * Map Settings (With Marker only for Basic)\n \t\t */\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_basic_marker_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'Map Marker Settings', 'essential-addons-elementor' ),\n \t\t\t\t'condition' => [\n \t\t\t\t\t'eael_google_map_type' => ['basic']\n \t\t\t\t]\n \t\t\t]\n \t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_title',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Title', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Google Map Title', 'essential-addons-elementor' )\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_content',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Content', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Google map content', 'essential-addons-elementor' )\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_icon_enable',\n\t\t\t[\n\t\t\t\t'label' => __( 'Custom Marker Icon', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'default' => 'no',\n\t\t\t\t'label_on' => __( 'Yes', 'essential-addons-elementor' ),\n\t\t\t\t'label_off' => __( 'No', 'essential-addons-elementor' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t]\n\t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_icon',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Marker Icon', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'default' => [\n\t\t\t\t\t// 'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_basic_marker_icon_enable' => 'yes'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_icon_width',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Marker Width', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 32\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 150,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_basic_marker_icon_enable' => 'yes'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_icon_height',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Marker Height', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 32\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 150,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_basic_marker_icon_enable' => 'yes'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n \t\t/**\n \t\t * Map Settings (With Marker)\n \t\t */\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_marker_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'Map Marker Settings', 'essential-addons-elementor' ),\n \t\t\t\t'condition' => [\n \t\t\t\t\t'eael_google_map_type' => ['marker', 'polyline', 'routes', 'static']\n \t\t\t\t]\n \t\t\t]\n \t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_markers',\n\t\t\t[\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'seperator' => 'before',\n\t\t\t\t'default' => [\n\t\t\t\t\t[ 'eael_google_map_marker_title' => esc_html__( 'Map Marker 1', 'essential-addons-elementor' ) ],\n\t\t\t\t],\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_lat',\n\t\t\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_lng',\n\t\t\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_title',\n\t\t\t\t\t\t'label' => esc_html__( 'Title', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( 'Marker Title', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_content',\n\t\t\t\t\t\t'label' => esc_html__( 'Content', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( 'Marker Content. You can put html here.', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_icon_color',\n\t\t\t\t\t\t'label' => esc_html__( 'Default Icon Color', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'description' => esc_html__( '(Works only on Static mode)', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t\t'default' => '#e23a47',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_icon_enable',\n\t\t\t\t\t\t'label' => __( 'Use Custom Icon', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t'label_on' => __( 'Yes', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'label_off' => __( 'No', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'return_value' => 'yes',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_icon',\n\t\t\t\t\t\t'label' => esc_html__( 'Custom Icon', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t\t\t'default' => [\n\t\t\t\t\t\t\t// 'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'eael_google_map_marker_icon_enable' => 'yes'\n\t\t\t\t\t\t]\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_icon_width',\n\t\t\t\t\t\t'label' => esc_html__( 'Icon Width', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t\t\t'default' => esc_html__( '32', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'eael_google_map_marker_icon_enable' => 'yes'\n\t\t\t\t\t\t]\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_icon_height',\n\t\t\t\t\t\t'label' => esc_html__( 'Icon Height', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t\t\t'default' => esc_html__( '32', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'eael_google_map_marker_icon_enable' => 'yes'\n\t\t\t\t\t\t]\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'title_field' => '{{eael_google_map_marker_title}}',\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\n\n \t\t/**\n \t\t * Polyline Coordinates Settings (Polyline)\n \t\t */\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_polyline_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'Coordinate Settings', 'essential-addons-elementor' ),\n \t\t\t\t'condition' => [\n \t\t\t\t\t'eael_google_map_type' => ['polyline', 'polygon']\n \t\t\t\t]\n \t\t\t]\n \t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_polylines',\n\t\t\t[\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'seperator' => 'before',\n\t\t\t\t'default' => [\n\t\t\t\t\t[ 'eael_google_map_polyline_title' => esc_html__( '#1', 'essential-addons-elementor' ) ],\n\t\t\t\t],\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_polyline_title',\n\t\t\t\t\t\t'label' => esc_html__( 'Title', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '#', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_polyline_lat',\n\t\t\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_polyline_lng',\n\t\t\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'title_field' => '{{eael_google_map_polyline_title}}',\n\t\t\t]\n\t\t);\n \t\t$this->end_controls_section();\n\n \t\t/**\n \t\t * Routes Coordinates Settings (Routes)\n \t\t */\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_routes_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'Routes Coordinate Settings', 'essential-addons-elementor' ),\n \t\t\t\t'condition' => [\n \t\t\t\t\t'eael_google_map_type' => ['routes']\n \t\t\t\t]\n \t\t\t]\n \t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_routes_origin',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Origin', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'after',\n\t\t\t]\n\t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_routes_origin_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_routes_origin_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_routes_dest',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Destination', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'after',\n\t\t\t]\n\t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_routes_dest_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2833808', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_routes_dest_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8585377', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t \t'eael_google_map_routes_travel_mode',\n\t\t \t[\n\t\t \t\t'label' \t=> esc_html__( 'Travel Mode', 'essential-addons-elementor' ),\n\t\t \t'type' \t\t\t=> Controls_Manager::SELECT,\n\t\t \t'default' \t\t=> 'walking',\n\t\t \t'label_block' \t=> false,\n\t\t \t'options' \t\t=> [\n\t\t \t\t'walking' \t=> esc_html__( 'Walking', 'essential-addons-elementor' ),\n\t\t \t\t'bicycling' => esc_html__( 'Bicycling', 'essential-addons-elementor' ),\n\t\t \t\t'driving' \t=> esc_html__( 'Driving', 'essential-addons-elementor' ),\n\t\t \t]\n\t\t \t]\n\t\t);\n \t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'section_map_controls',\n\t\t\t[\n\t\t\t\t'label'\t=> esc_html__( 'Map Controls', 'essential-addons-elementor' )\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_zoom',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Zoom Level', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '14', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_streeview_control',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Street View Controls', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'true',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'true',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_type_control',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Map Type Control', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_zoom_control',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Zoom Control', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_fullscreen_control',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Fullscreen Control', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_scroll_zoom',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Scroll Wheel Zoom', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\t\t \n\t\t/**\n \t\t * Map Theme Settings\n \t\t */\n \t\t$this->start_controls_section(\n\t\t\t'eael_section_google_map_theme_settings',\n\t\t\t[\n\t\t\t\t'label'\t\t=> esc_html__( 'Map Theme', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type!'\t=> ['static', 'panorama']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n 'eael_google_map_theme_source',\n [\n 'label'\t\t=> __( 'Theme Source', 'essential-addons-elementor' ),\n\t\t\t\t'type'\t\t=> Controls_Manager::CHOOSE,\n 'options' => [\n\t\t\t\t\t'gstandard' => [\n\t\t\t\t\t\t'title' => __( 'Google Standard', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-map',\n\t\t\t\t\t],\n\t\t\t\t\t'snazzymaps' => [\n\t\t\t\t\t\t'title' => __( 'Snazzy Maps', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-map-marker',\n\t\t\t\t\t],\n\t\t\t\t\t'custom' => [\n\t\t\t\t\t\t'title' => __( 'Custom', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-edit',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default'\t=> 'gstandard'\n ]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_gstandards',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Google Themes', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'standard',\n\t\t\t\t'options' => [\n\t\t\t\t\t'standard' => __( 'Standard', 'essential-addons-elementor' ),\n\t\t\t\t\t'silver' => __( 'Silver', 'essential-addons-elementor' ),\n\t\t\t\t\t'retro' => __( 'Retro', 'essential-addons-elementor' ),\n\t\t\t\t\t'dark' => __( 'Dark', 'essential-addons-elementor' ),\n\t\t\t\t\t'night' => __( 'Night', 'essential-addons-elementor' ),\n\t\t\t\t\t'aubergine' => __( 'Aubergine', 'essential-addons-elementor' )\n\t\t\t\t],\n\t\t\t\t'description' => sprintf( '<a href=\"https://mapstyle.withgoogle.com/\" target=\"_blank\">%1$s</a> %2$s',__( 'Click here', 'essential-addons-elementor' ), __( 'to generate your own theme and use JSON within Custom style field.', 'essential-addons-elementor' ) ),\n\t\t\t\t'condition'\t=> [\n\t\t\t\t\t'eael_google_map_theme_source'\t=> 'gstandard'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_snazzymaps',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'SnazzyMaps Themes', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'label_block'\t\t\t=> true,\n\t\t\t\t'default' => 'colorful',\n\t\t\t\t'options' => [\n\t\t\t\t\t'default'\t\t=> __( 'Default', 'essential-addons-elementor' ),\n\t\t\t\t\t'simple'\t\t=> __( 'Simple', 'essential-addons-elementor' ),\n\t\t\t\t\t'colorful'\t\t=> __( 'Colorful', 'essential-addons-elementor' ),\n\t\t\t\t\t'complex'\t\t=> __( 'Complex', 'essential-addons-elementor' ),\n\t\t\t\t\t'dark'\t\t\t=> __( 'Dark', 'essential-addons-elementor' ),\n\t\t\t\t\t'greyscale'\t\t=> __( 'Greyscale', 'essential-addons-elementor' ),\n\t\t\t\t\t'light'\t\t\t=> __( 'Light', 'essential-addons-elementor' ),\n\t\t\t\t\t'monochrome'\t=> __( 'Monochrome', 'essential-addons-elementor' ),\n\t\t\t\t\t'nolabels'\t\t=> __( 'No Labels', 'essential-addons-elementor' ),\n\t\t\t\t\t'twotone'\t\t=> __( 'Two Tone', 'essential-addons-elementor' )\n\t\t\t\t],\n\t\t\t\t'description' => sprintf( '<a href=\"https://snazzymaps.com/explore\" target=\"_blank\">%1$s</a> %2$s',__( 'Click here', 'essential-addons-elementor' ), __( 'to explore more themes and use JSON within custom style field.', 'essential-addons-elementor' ) ),\n\t\t\t\t'condition'\t=> [\n\t\t\t\t\t'eael_google_map_theme_source'\t=> 'snazzymaps'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_custom_style',\n\t\t\t[\n\t\t\t\t'label' => __( 'Custom Style', 'essential-addons-elementor' ),\n\t\t\t\t'description' => sprintf( '<a href=\"https://mapstyle.withgoogle.com/\" target=\"_blank\">%1$s</a> %2$s',__( 'Click here', 'essential-addons-elementor' ), __( 'to get JSON style code to style your map', 'essential-addons-elementor' ) ),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n 'condition' => [\n 'eael_google_map_theme_source' => 'custom',\n ],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section(); \n \t\t/**\n\t\t * -------------------------------------------\n\t\t * Tab Style Google Map Style\n\t\t * -------------------------------------------\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'eael_section_google_map_style_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'General Style', 'essential-addons-elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_max_width',\n\t\t\t[\n\t\t\t\t'label' => __( 'Max Width', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 1140,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1400,\n\t\t\t\t\t\t'step' => 10,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-google-map' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_max_height',\n\t\t\t[\n\t\t\t\t'label' => __( 'Max Height', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 400,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1400,\n\t\t\t\t\t\t'step' => 10,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-google-map' => 'height: {{SIZE}}{{UNIT}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_margin',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%' ],\n\t\t\t\t'selectors' => [\n\t \t\t\t\t\t'{{WRAPPER}} .eael-google-map' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t \t\t\t],\n\t\t\t]\n\t\t);\n\n \t\t$this->end_controls_section();\n\n \t\t/**\n\t\t * -------------------------------------------\n\t\t * Tab Style Google Map Style\n\t\t * -------------------------------------------\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'eael_section_google_map_overlay_style_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Overlay Style', 'essential-addons-elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['overlay']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_overlay_width',\n\t\t\t[\n\t\t\t\t'label' => __( 'Width', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 200,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1100,\n\t\t\t\t\t\t'step' => 10,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_bg_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#fff',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'background-color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_mapoverlay_padding',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%' ],\n\t\t\t\t'selectors' => [\n\t \t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t \t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_overlay_margin',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%' ],\n\t\t\t\t'selectors' => [\n\t \t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t \t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'eael_google_map_overlay_border',\n\t\t\t\t'label' => esc_html__( 'Border', 'essential-addons-elementor' ),\n\t\t\t\t'selector' => '{{WRAPPER}} .eael-gmap-overlay',\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_overlay_border_radius',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%' ],\n\t\t\t\t'selectors' => [\n\t \t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t \t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'eael_google_map_overlay_box_shadow',\n\t\t\t\t'selector' => '{{WRAPPER}} .eael-gmap-overlay',\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\t[\n \t'name' => 'eael_google_map_overlay_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .eael-gmap-overlay',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#222',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\n\t\t/**\n\t\t * -------------------------------------------\n\t\t * Tab Style Google Map Stroke Style\n\t\t * -------------------------------------------\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'eael_section_google_map_stroke_style_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Stroke Style', 'essential-addons-elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['polyline', 'polygon', 'routes']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_stroke_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#e23a47',\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_stroke_opacity',\n\t\t\t[\n\t\t\t\t'label' => __( 'Opacity', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 0.8,\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0.2,\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_stroke_weight',\n\t\t\t[\n\t\t\t\t'label' => __( 'Weight', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 4,\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_stroke_fill_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Fill Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#e23a47',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['polygon']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_stroke_fill_opacity',\n\t\t\t[\n\t\t\t\t'label' => __( 'Fill Opacity', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 0.4,\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0.2,\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['polygon']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\t}", "function estore_woocommerce_settings_register($wp_customize) {\n\n\t// WooCommerce Category Color Options\n\t$wp_customize->add_panel( 'estore_woocommerce_panel', array(\n\t\t'priority' => 1000,\n\t\t'title' => esc_html__( 'WooCommerce Settings', 'estore' ),\n\t\t'capability' => 'edit_theme_options',\n\t\t'description' => esc_html__( 'Change WooCommerce settings related to theme.', 'estore' )\n\t));\n\n\t// Header My Account Link\n\t$wp_customize->add_setting( 'estore_header_ac_btn', array(\n\t\t\t'default' => '',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'estore_sanitize_checkbox',\n\t\t)\n\t);\n\n\t$wp_customize->add_control( 'estore_header_ac_btn', array(\n\t\t\t'label' => esc_html__( 'Enable My Account Button', 'estore' ),\n\t\t\t'section' => 'estore_header_integrations',\n\t\t\t'type' => 'checkbox',\n\t\t\t'priority' => 10\n\t\t)\n\t);\n\n\t// Header Currency Info\n\t$wp_customize->add_setting( 'estore_header_currency', array(\n\t\t\t'default' => '',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'estore_sanitize_checkbox',\n\t\t)\n\t);\n\n\t$wp_customize->add_control( 'estore_header_currency', array(\n\t\t\t'label' => esc_html__( 'Enable Currency Symbol', 'estore' ),\n\t\t\t'section' => 'estore_header_integrations',\n\t\t\t'type' => 'checkbox',\n\t\t\t'priority' => 20\n\t\t)\n\t);\n\n\t$wp_customize->add_section( 'estore_woocommerce_category_color_setting', array(\n\t\t'priority' => 1,\n\t\t'title' => esc_html__( 'Category Color Settings', 'estore' ),\n\t\t'panel' => 'estore_woocommerce_panel'\n\t));\n\n\t$priority = 1;\n\t$categories = get_terms( 'product_cat' ); // Get all WooCommerce Categories\n\t$wp_category_list = array();\n\n\tforeach ($categories as $category_list ) {\n\n\t\t$wp_customize->add_setting( 'estore_woocommerce_category_color_'.$category_list->term_id,\n\t\t\tarray(\n\t\t\t\t'default' => '',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'sanitize_callback' => 'estore_hex_color_sanitize',\n\t\t\t\t'sanitize_js_callback' => 'estore_color_escaping_sanitize'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t$wp_customize, 'estore_woocommerce_category_color_'.$category_list->term_id,\n\t\t\t\tarray(\n\t\t\t\t\t'label' => sprintf(__(' %s', 'estore' ), $category_list->name ),\n\t\t\t\t\t'section' => 'estore_woocommerce_category_color_setting',\n\t\t\t\t\t'settings' => 'estore_woocommerce_category_color_'.$category_list->term_id,\n\t\t\t\t\t'priority' => $priority\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$priority++;\n\t}\n\n\t// WooCommerce Pages layout\n\t$wp_customize->add_section(\n\t\t'estore_woocommerce_global_layout_section',\n\t\tarray(\n\t\t\t'priority' => 10,\n\t\t\t'title' => esc_html__( 'Archive Page Layout', 'estore' ),\n\t\t\t'panel' => 'estore_woocommerce_panel'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'estore_woocommerce_global_layout',\n\t\tarray(\n\t\t\t'default' => 'no_sidebar_full_width',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'estore_sanitize_radio'\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Estore_Image_Radio_Control (\n\t\t\t$wp_customize,\n\t\t\t'estore_woocommerce_global_layout',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'This layout will be reflected in archives, categories, search page etc. of WooCommerce.', 'estore' ),\n\t\t\t\t'section' => 'estore_woocommerce_global_layout_section',\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'right_sidebar' => Estore_ADMIN_IMAGES_URL . '/right-sidebar.png',\n\t\t\t\t\t'left_sidebar' => Estore_ADMIN_IMAGES_URL . '/left-sidebar.png',\n\t\t\t\t\t'no_sidebar_full_width' => Estore_ADMIN_IMAGES_URL . '/no-sidebar-full-width-layout.png',\n\t\t\t\t\t'no_sidebar_content_centered' => Estore_ADMIN_IMAGES_URL . '/no-sidebar-content-centered-layout.png'\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\n\t// WooCommerce Product Page Layout\n\t$wp_customize->add_section(\n\t\t'estore_woocommerce_product_layout_section',\n\t\tarray(\n\t\t\t'priority' => 20,\n\t\t\t'title' => esc_html__( 'Product Page Layout', 'estore' ),\n\t\t\t'panel' => 'estore_woocommerce_panel'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'estore_woocommerce_product_layout',\n\t\tarray(\n\t\t\t'default' => 'right_sidebar',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'estore_sanitize_radio'\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Estore_Image_Radio_Control (\n\t\t\t$wp_customize,\n\t\t\t'estore_woocommerce_product_layout',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'This layout will be reflected in product page of WooCommerce.', 'estore' ),\n\t\t\t\t'section' => 'estore_woocommerce_product_layout_section',\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'right_sidebar' => Estore_ADMIN_IMAGES_URL . '/right-sidebar.png',\n\t\t\t\t\t'left_sidebar' => Estore_ADMIN_IMAGES_URL . '/left-sidebar.png',\n\t\t\t\t\t'no_sidebar_full_width' => Estore_ADMIN_IMAGES_URL . '/no-sidebar-full-width-layout.png',\n\t\t\t\t\t'no_sidebar_content_centered' => Estore_ADMIN_IMAGES_URL . '/no-sidebar-content-centered-layout.png'\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\n}", "protected function _register_controls()\n\t{\n\t\t// Heading\n\t\t$this->start_controls_section(\n\t\t\t'heading_style',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Heading', 'elementor'),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'heading_typography',\n\t\t\t\t'label' => esc_html__('Typography', 'elementor'),\n\t\t\t\t'selector' => '{{WRAPPER}} .woocommerce-additional-fields > h3',\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'heading_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Color', 'elementor'),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields > h3' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'heading_align',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Alignment', 'elementor'),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => [\n\t\t\t\t\t'left' => [\n\t\t\t\t\t\t'title' => esc_html__('Left', 'elementor'),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t],\n\t\t\t\t\t'center' => [\n\t\t\t\t\t\t'title' => esc_html__('Center', 'elementor'),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t],\n\t\t\t\t\t'right' => [\n\t\t\t\t\t\t'title' => esc_html__('Right', 'elementor'),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'prefix_class' => '',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields > h3' => 'text-align: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\n\t\t// label\n\t\t$this->start_controls_section(\n\t\t\t'label_style',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Label', 'webt'),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'label_typography',\n\t\t\t\t'label' => esc_html__('Typography', 'elementor'),\n\t\t\t\t'selector' => '{{WRAPPER}} .woocommerce-additional-fields .form-row label',\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'label_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Label Color', 'webt'),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields .form-row label' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'label_align',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Alignment', 'elementor'),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'options' => [\n\t\t\t\t\t'left' => [\n\t\t\t\t\t\t'title' => esc_html__('Left', 'elementor'),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t],\n\t\t\t\t\t'center' => [\n\t\t\t\t\t\t'title' => esc_html__('Center', 'elementor'),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t],\n\t\t\t\t\t'right' => [\n\t\t\t\t\t\t'title' => esc_html__('Right', 'elementor'),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'prefix_class' => '',\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields .form-row label' => 'text-align: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\n\t\t// Input Fields\n\t\t$this->start_controls_section(\n\t\t\t'input_style',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__('Input Fields', 'webt'),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'input_typography',\n\t\t\t\t'label' => esc_html__('Typography', 'elementor'),\n\t\t\t\t'selector' => '{{WRAPPER}} .woocommerce-additional-fields input , {{WRAPPER}} .woocommerce-additional-fields textarea',\n\t\t\t)\n\t\t);\n\t\t$this->add_control(\n\t\t\t'input_placeholder_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Field Placeholder Input Color', 'webt'),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input::placeholder' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input::-webkit-input-placeholder' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input::-moz-placeholder' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input:-ms-input-placeholder' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields textarea::placeholder' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields textarea::-webkit-input-placeholder' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields textarea::-moz-placeholder' => 'color: {{VALUE}};',\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields textarea:-ms-input-placeholder' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'input_padding',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Padding', 'elementor'),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => ['px', 'em'],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input, {{WRAPPER}} .woocommerce-additional-fields textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\n\t\t$this->start_controls_tabs('tabs_input_style');\n\t\t$this->start_controls_tab(\n\t\t\t'tab_input_normal',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Normal', 'webt'),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'input_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Text Color', 'webt'),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input, {{WRAPPER}} .woocommerce-additional-fields textarea' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'input_border',\n\t\t\t\t'selector' => '{{WRAPPER}} .woocommerce-additional-fields input, {{WRAPPER}} .woocommerce-additional-fields textarea',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'input_bg_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Background Color', 'webt'),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input, {{WRAPPER}} .woocommerce-additional-fields textarea' => 'background-color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'input_border_radius',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Radius', 'webt'),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => ['px', '%'],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} woocommerce-additional-fields input, {{WRAPPER}} .woocommerce-additional-fields textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'input_box_shadow',\n\t\t\t\t'selector' => '{{WRAPPER}} woocommerce-additional-fields input, {{WRAPPER}} .woocommerce-additional-fields textarea',\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_tab();\n\n\t\t$this->start_controls_tab(\n\t\t\t'tab_input_focus',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Focus', 'webt'),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'input_focus_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Text Color', 'webt'),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input:focus, {{WRAPPER}} .woocommerce-additional-fields textarea:focus' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'input_focus_border',\n\t\t\t\t'selector' => '{{WRAPPER}} .woocommerce-additional-fields input:focus, {{WRAPPER}} .woocommerce-additional-fields textarea:focus',\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'input_focus_bg_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Background Color', 'webt'),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .woocommerce-additional-fields input:focus, {{WRAPPER}} .woocommerce-additional-fields textarea:focus' => 'background-color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'input_focus_border_radius',\n\t\t\t[\n\t\t\t\t'label' => esc_html__('Radius', 'webt'),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => ['px', '%'],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} woocommerce-additional-fields input:focus, {{WRAPPER}} .woocommerce-additional-fields textarea:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'input_focus_box_shadow',\n\t\t\t\t'selector' => '{{WRAPPER}} woocommerce-additional-fields input:focus, {{WRAPPER}} .woocommerce-additional-fields textarea:focus',\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_tab();\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t}", "protected function register_controls() {\n\n\t\t$this->render_team_member_content_control();\n\t\t$this->register_content_separator();\n\t\t$this->register_content_social_icons_controls();\n\t\t$this->register_helpful_information();\n\n\t\t/* Style */\n\t\t$this->register_style_team_member_image();\n\t\t$this->register_style_team_member_name();\n\t\t$this->register_style_team_member_designation();\n\t\t$this->register_style_team_member_desc();\n\t\t$this->register_style_team_member_icon();\n\t\t$this->register_content_spacing_control();\n\t}", "protected function _register_controls_parent() {\n $this->start_controls_section(\n 'custom_css_section',\n [\n 'label' => __('Custom CSS', 'unifato_addons'),\n 'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n ]\n );\n\n\n\t\t$this->add_control(\n\t\t\t'custom_css',\n\t\t\t[\n\t\t\t\t'label' => __( 'Custom CSS', 'unifato_addons' ),\n 'description' => __('Use <span style=\"color: red\">[SELECTOR]</span> to target selector. <br/><br/> <i>Example:</i> <br /><pre style=\"font-style: normal\">[SELECTOR] a {<br /> color: red;<br />}</pre>', 'unifato_addons'),\n 'default' => '',\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::CODE,\n\t\t\t\t'language' => 'css',\n\t\t\t\t'rows' => 20,\n\t\t\t]\n\t\t);\n\n $this->end_controls_section();\n\n $this->start_controls_section(\n 'additional_style_section',\n [\n 'label' => __('Additional Style', 'unifato_addons'),\n 'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'white_skin',\n [\n 'label' => __('White Skin?', 'unifato_addons'),\n 'type' => \\Elementor\\Controls_Manager::SWITCHER,\n 'label_on' => __( 'Yes', 'unifato_addons' ),\n 'label_off' => __( 'No', 'unifato_addons' ),\n 'return_value' => 'text-white',\n 'default' => 'no',\n 'dynamic' => [\n 'active' => true\n ],\n 'prefix_class' => '',\n ]\n );\n\n $this->end_controls_section();\n }", "public static function register( $wp_customize ) {\n\n\t\t$sizes = apply_filters( 'maketador_sizes',\n\t\t\tarray(\n\t\t\t\t'1' => 1,\n\t\t\t\t'2' => 2,\n\t\t\t\t'3' => 3,\n\t\t\t\t'4' => 4,\n\t\t\t\t'5' => 5,\n\t\t\t\t'6' => 6,\n\t\t\t\t'7' => 7,\n\t\t\t\t'8' => 8,\n\t\t\t\t'9' => 9,\n\t\t\t\t'10' => 10,\n\t\t\t\t'11' => 11,\n\t\t\t\t'12' => 12,\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_panel( 'maketador_panel', array(\n\t\t\t'title' => __( 'Maketador', 'maketador' ),\n\t\t\t'description' => '<p>' . __( 'Theme specific options', 'maketador' ) . '.</p>',\n\t\t\t'priority' => 1,\n\t\t) );\n\n\t\t$wp_customize->add_section( 'header',\n\t\t\tarray(\n\t\t\t\t'panel' => 'maketador_panel',\n\t\t\t\t'title' => __( 'Header', 'maketador' ),\n\t\t\t\t'priority' => 1,\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'description' => __( 'Choose header type, colors, etc.', 'maketador' ),\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting( 'header_type',\n\t\t\tarray(\n\t\t\t\t'default' => self::get_defaults( 'header_type' ),\n\t\t\t\t'type' => 'theme_mod',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'transport' => 'refresh',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting( 'logo',\n\t\t\tarray(\n\t\t\t\t'default' => self::get_defaults( 'logo' ),\n\t\t\t\t'type' => 'theme_mod',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'transport' => 'refresh',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'header_type',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Header Type', 'maketador' ),\n\t\t\t\t'section' => 'header',\n\t\t\t\t'settings' => 'header_type',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'navbar-static-top' => __( 'Static', 'maketador' ),\n\t\t\t\t\t'navbar-fixed-top' => __( 'Fixed', 'maketador' ),\n\t\t\t\t\t'normal' => __( 'Normal', 'maketador' ),\n\t\t\t\t\t'normal-affix' => __( 'Normal then fixed navbar', 'maketador' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\tnew WP_Customize_Image_Control(\n\t\t\t\t$wp_customize,\n\t\t\t\t'logo',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Logo Image', 'maketador' ),\n\t\t\t\t\t'section' => 'header',\n\t\t\t\t\t'settings' => 'logo',\n\t\t\t\t\t'context' => 'your_setting_context'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_section( 'layout',\n\t\t\tarray(\n\t\t\t\t'panel' => 'maketador_panel',\n\t\t\t\t'title' => __( 'Layout', 'maketador' ),\n\t\t\t\t'priority' => 2,\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'description' => __( 'Layout options', 'maketador' ),\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting( 'layout_type',\n\t\t\tarray(\n\t\t\t\t'default' => self::get_defaults( 'layout_type' ),\n\t\t\t\t'type' => 'theme_mod',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'transport' => 'refresh',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'layout_type',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Layout Type', 'maketador' ),\n\t\t\t\t'section' => 'layout',\n\t\t\t\t'settings' => 'layout_type',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'content-sidebar' => __( 'Content Sidebar', 'maketador' ),\n\t\t\t\t\t'sidebar-content' => __( 'Sidebar Content', 'maketador' ),\n\t\t\t\t\t'no-sidebar' => __( 'No Sidebar', 'maketador' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting( 'content_size',\n\t\t\tarray(\n\t\t\t\t'default' => self::get_defaults( 'content_size' ),\n\t\t\t\t'type' => 'theme_mod',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'transport' => 'refresh',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field'\n\t\t\t)\n\t\t);\n\n\n\t\t$wp_customize->add_control(\n\t\t\t'content_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Content Size', 'maketador' ),\n\t\t\t\t'section' => 'layout',\n\t\t\t\t'settings' => 'content_size',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'choices' => $sizes,\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting( 'sidebar_size',\n\t\t\tarray(\n\t\t\t\t'default' => self::get_defaults( 'sidebar_size' ),\n\t\t\t\t'type' => 'theme_mod',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'transport' => 'refresh',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'sidebar_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Sidebar Size', 'maketador' ),\n\t\t\t\t'section' => 'layout',\n\t\t\t\t'settings' => 'sidebar_size',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'choices' => $sizes,\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting( 'full_width_class',\n\t\t\tarray(\n\t\t\t\t'default' => self::get_defaults( 'full_width_class' ),\n\t\t\t\t'type' => 'theme_mod',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'transport' => 'refresh',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'full_width_class',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Full width class', 'maketador' ),\n\t\t\t\t'section' => 'layout',\n\t\t\t\t'settings' => 'full_width_class',\n\t\t\t\t'type' => 'text',\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_section( 'footer',\n\t\t\tarray(\n\t\t\t\t'panel' => 'maketador_panel',\n\t\t\t\t'title' => __( 'Footer', 'maketador' ),\n\t\t\t\t'priority' => 3,\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'description' => __( 'Footer options', 'maketador' ),\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_setting( 'footer_text',\n\t\t\tarray(\n\t\t\t\t'default' => self::get_defaults( 'footer_text' ),\n\t\t\t\t'type' => 'theme_mod',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'transport' => 'refresh',\n\t\t\t\t'sanitize_callback' => 'wp_kses_post'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\t'footer_text',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Footer Text', 'maketador' ),\n\t\t\t\t'section' => 'footer',\n\t\t\t\t'settings' => 'footer_text',\n\t\t\t\t'type' => 'textarea',\n\n\t\t\t)\n\t\t);\n\n\t}", "function site_customize_register($wp_customize){\n\n\t\t$wp_customize->remove_section('title_tagline');\n\t\t$wp_customize->remove_section('nav');\n\t\t$wp_customize->remove_panel('widgets');\n\t\t$wp_customize->remove_section('static_front_page');\n\n\t\t$wp_customize->add_section('custom_options_section_id', array( \n\t\t\t'title' => 'Дополнительные настройки',\n\t\t\t'description' => 'Настройки для разных частей сайта',\n\t\t\t// 'priority' => 10\n\t\t));\n\n\t\t$wp_customize->add_setting('languages_letsgo_russian', array(\n\t\t\t// 'default' => ''\n\t\t));\n\t\t \n\t\t$wp_customize->add_control('languages_letsgo_russian', array(\n\t\t\t'label' => 'Текст на русском языке под фото преподавателя',\n\t\t\t'section' => 'custom_options_section_id',\n\t\t\t'description' => 'aka <em>Поехали!</em>',\n\t\t\t'type' => 'text'\n\t\t));\n\t}", "public function afterLoadRegisterControlsUI(){\n\t\t\n\t}", "public function enqueue_control_scripts() {\r\n\r\n\t\twp_enqueue_script( 'example-1-customize-controls', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/customize-controls.js', array( 'customize-controls' ) );\r\n\r\n\t\twp_enqueue_style( 'example-1-customize-controls', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/customize-controls.css' );\r\n\t}", "protected function _register_controls(){\n //Name of the content section\n $this->start_controls_section(\n 'header_slider',\n array(\n 'label' => __('Slider', 'reveal'),\n 'tab' => Controls_Manager::TAB_CONTENT\n )\n );\n\n //input fields for the content\n $this->add_control(\n 'title',\n array(\n 'label' => __( 'Title', 'reveal' ),\n 'type' => Controls_Manager::WYSIWYG\n )\n ); // end add_control\n\n //button for the slider\n $this->add_control(\n 'button1_text',\n array(\n 'label' => __( 'Button 1 Text', 'reveal' ),\n 'type' => Controls_Manager::TEXT\n )\n );\n $this->add_control(\n 'button1_url',\n array(\n 'label' => __( 'Button 1 Url', 'reveal' ),\n 'type' => Controls_Manager::URL\n )\n );\n\n $this->add_control(\n 'button2_text',\n array(\n 'label' => __( 'Button 2', 'reveal' ),\n 'type' => Controls_Manager::TEXT\n )\n );\n $this->add_control(\n 'button2_url',\n array(\n 'label' => __( 'Button 2 Url', 'reveal' ),\n 'type' => Controls_Manager::URL\n )\n );\n\n //slider image\n $this->add_control(\n 'gallery',\n array(\n 'label' => __( 'Add Slider Images', 'reveal' ),\n 'type' => Controls_Manager::GALLERY,\n 'default' => [],\n )\n );\n\n $this->add_control(\n 'img_height',\n array(\n 'label' => __( 'Slider Images Height', 'reveal' ),\n 'type' => Controls_Manager::NUMBER,\n 'default' => 350,\n )\n );\n $this->end_controls_section(); //end of field creation\n\n //Section for style sheet\n $this->start_controls_section( //input field label\n 'content_style', //unique id\n [\n 'label' => __( 'Style', 'reveal' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n $this->end_controls_section();\n\n\n\n }", "function audioman_register_option( $wp_customize, $option ) {\n\n\t// Initialize Setting.\n\t$wp_customize->add_setting( $option['name'], array(\n\t\t'sanitize_callback' => $option['sanitize_callback'],\n\t\t'default' => isset( $option['default'] ) ? $option['default'] : '',\n\t\t'transport' => isset( $option['transport'] ) ? $option['transport'] : 'refresh',\n\t\t'theme_supports' => isset( $option['theme_supports'] ) ? $option['theme_supports'] : '',\n\t\t'description_hidden' => isset( $option['description_hidden'] ) ? $option['description_hidden'] : 0,\n\t) );\n\n\t$control = array(\n\t\t'label' => $option['label'],\n\t\t'section' => $option['section'],\n\t\t'settings' => $option['name'],\n\t);\n\n\tif ( isset( $option['active_callback'] ) ) {\n\t\t$control['active_callback'] = $option['active_callback'];\n\t}\n\n\tif ( isset( $option['priority'] ) ) {\n\t\t$control['priority'] = $option['priority'];\n\t}\n\n\tif ( isset( $option['choices'] ) ) {\n\t\t$control['choices'] = $option['choices'];\n\t}\n\n\tif ( isset( $option['type'] ) ) {\n\t\t$control['type'] = $option['type'];\n\t}\n\n\tif ( isset( $option['input_attrs'] ) ) {\n\t\t$control['input_attrs'] = $option['input_attrs'];\n\t}\n\n\tif ( isset( $option['description'] ) ) {\n\t\t$control['description'] = $option['description'];\n\t}\n\n\tif ( isset( $option['custom_control'] ) ) {\n\t\t$wp_customize->add_control( new $option['custom_control']( $wp_customize, $option['name'], $control ) );\n\t} else {\n\t\t$wp_customize->add_control( $option['name'], $control );\n\t}\n}", "function indie_studio_customize_register( $wp_customize ) {\n \n //Add Site Identity Settings\n include ( 'identity.php' );\n \n //Add any general settings\n include ( 'general.php' );\n \n //Add footer settings\n include ( 'footer.php' );\n \n //Add font and theme colour options\n include ( 'fonts_colours.php' );\n \n include ( 'social/register_social.php' );\n \n //Add custom scripts fields\n include ( 'scripts.php' );\n \n //Add API key fields\n include ( 'API.php' );\n \n}", "public function register_settings()\n {\n }", "public function register_settings()\n {\n }", "function graff_customize_register( $wp_customize ) {\n \n $wp_customize->add_setting( 'logo_image' , array(\n 'transport' => 'refresh',\n ) );\n \n $wp_customize->add_section( 'graff_logo' , array(\n 'title' => __( 'Logo', 'graff' ),\n 'priority' => 15,\n ) );\n \n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'upload_logo', array(\n\t'label' => __( 'Upload_logo', 'graff' ),\n\t'section' => 'graff_logo',\n\t'settings' => 'logo_image',\n ) ) );\n \n \n $wp_customize->add_setting( 'background_image' , array(\n 'transport' => 'refresh',\n ) );\n \n $wp_customize->add_section( 'background' , array(\n 'title' => __( 'Background', 'graff' ),\n 'priority' => 30,\n ) );\n \n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'upload_background', array(\n\t'label' => __( 'Upload_background', 'graff' ),\n\t'section' => 'background',\n\t'settings' => 'background_image',\n ) ) );\n \n \n $wp_customize->add_setting( 'facebook' , array(\n 'transport' => 'refresh',\n ) );\n \n $wp_customize->add_section( 'social' , array(\n 'title' => __( 'Social', 'graff' ),\n 'priority' => 50,\n ) );\n \n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'facebook', array(\n\t'label' => __( 'Facebook', 'graff' ),\n\t'section' => 'social',\n\t'settings' => 'facebook',\n ) ) );\n \n \n $wp_customize->add_setting( 'twitter' , array(\n 'transport' => 'refresh',\n ) );\n \n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'twitter', array(\n\t'label' => __( 'Twitter', 'graff' ),\n\t'section' => 'social',\n\t'settings' => 'twitter',\n ) ) );\n \n \n $wp_customize->add_setting( 'skype' , array(\n 'transport' => 'refresh',\n ) );\n \n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'skype', array(\n\t'label' => __( 'Skype', 'graff' ),\n\t'section' => 'social',\n\t'settings' => 'skype',\n ) ) );\n \n \n $wp_customize->add_setting( 'google' , array(\n 'transport' => 'refresh',\n ) );\n \n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'google', array(\n\t'label' => __( 'Google', 'graff' ),\n\t'section' => 'social',\n\t'settings' => 'google',\n ) ) );\n}", "function svs_customizer_register ($wp_customize){\n\n//removing default customisation settings\n\t//title_tagline - Site Title & Tagline\n\t//colors - Colors\n\t//header_image - Header Image\n\t//background_image - Background Image\n\t//nav - Navigation\n\t//static_front_page - Static Front Page\n\t\n\t$wp_customize->remove_section('nav'); //removing this section as we don't want our users to mess up our bootstrap menu with modals\n\t$wp_customize->remove_section('header_image'); //removing this section as we're going to have it as a display option\n\t$wp_customize->remove_section('colors'); //removing this section as we're going to have it as a display option\n\t\n\t\n//adding our own customisation settings\n\n\t//the theme colors customisation section \n\t$wp_customize->add_section('svs_colors', array(\n\t\t'title' => __('Colors', 'Super Video Scout'),\n\t\t'description' => 'Modify Theme Colors',\n\t\t'priority' => 2\n\t\t\n\t));\n\t\t//customise the background color\n\t\t$wp_customize->add_setting('background_color', array(\n\t\t\t'default' => '#ffffff'\n\t\t));\n\t\t\t//background color control\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'background_color', array(\n\t\t\t'label' => __('Edit Background Color', 'Super Video Scout'),\n\t\t\t'section' => 'svs_colors',\n\t\t\t'settings' => 'background_color'\n\t\t\t)));\n\t\t\t\n\t\t//customise our headers color\n\t\t$wp_customize->add_setting('headers_color', array(\n\t\t\t'default' => '#4b4b4b'\n\t\t));\n\t\t\t//links color control\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'headers_color', array(\n\t\t\t'label' => __('Edit Headers Color', 'Super Video Scout'),\n\t\t\t'section' => 'svs_colors',\n\t\t\t'settings' => 'headers_color'\n\t\t\t)));\n\t\t\n\t\t//customise our links color\n\t\t$wp_customize->add_setting('link_color', array(\n\t\t\t'default' => '#428BCA'\n\t\t));\n\t\t\t//links color control\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array(\n\t\t\t'label' => __('Edit Link Color', 'Super Video Scout'),\n\t\t\t'section' => 'svs_colors',\n\t\t\t'settings' => 'link_color'\n\t\t\t)));\n\t\t\n\t\t//customise our links hover color\n\t\t$wp_customize->add_setting('link_hover_color', array(\n\t\t\t'default' => '#2a6496'\n\t\t));\t\n\t\t\t//links hover color control\n\t\t\t$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_hover_color', array(\n\t\t\t'label' => __('Edit Link Hover Color', 'Super Video Scout'),\n\t\t\t'section' => 'svs_colors',\n\t\t\t'settings' => 'link_hover_color'\n\t\t\t)));\n\t\n\t\n\t//the theme's logo customisation section\n\t$template_url = get_bloginfo('template_url'); //Variable theme path for our default img\n\t$def_logo_path = $template_url.\"/images/thumbnail01.png\";\n\t\n\t\n\t$wp_customize->add_section('title_tagline', array(\n\t\t\t'title' => __('Title, Tagline & Logo', 'Super Video Scout'),\n\t\t\t'description' => 'Edit Site Title, Tagline & Logo',\n\t\t\t'priority' => 1\n\t\t));\n\t\n\t\t//enabling logo image customisation under title_tagline options\n\t\t$wp_customize->add_setting('logo_image', array(\n\t\t\t'default' => $def_logo_path\n\t\t));\n\t\t\t//image control\n\t\t\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'logo_image', array(\n\t\t\t'label' => __('Logo Image', 'Super Video Scout'),\n\t\t\t'section' => 'title_tagline',\n\t\t\t'settings' => 'logo_image'\n\t\t\t)));\n\t\n\t//the theme's copyright customisation section\t\t\t\t\n\t\t$wp_customize->add_section('svs_copyright', array(\n\t\t\t'title' => __('Copyright Details', 'Super Video Scout'),\n\t\t\t'description' => 'Add/Edit Copyright Information',\n\t\t\t'priority' => 9999\n\t\t));\n\t\t\t//customise our logo image\n\t\t\t$wp_customize->add_setting('copyright_details', array(\n\t\t\t\t'default' => '&copy; 2014 Super Video Scout all rights reserved (v.0.4)'\n\t\t\t));\n\t\t\t\t//image control\n\t\t\t\t$wp_customize->add_control('copyright_details', array(\n\t\t\t\t'label' => __('Copyright Information', 'Super Video Scout'),\n\t\t\t\t'section' => 'svs_copyright',\n\t\t\t\t'settings' => 'copyright_details'\n\t\t\t\t));\n\t\t\t\t\n\t//the theme's layout settings\t\t\t\t\n\t\t$wp_customize->add_section('svs_layout', array(\n\t\t\t'title' => __('Layout Settings', 'Super Video Scout'),\n\t\t\t'description' => \"Change Theme's Layout Configuration\",\n\t\t\t'priority' => 3\n\t\t));\n\t\t\t//our default top layout setting\n\t\t\t$wp_customize->add_setting('top_layout_setting', array(\n\t\t\t\t'default' => 'featured'\n\t\t\t));\t\t\n\t\t\t\t//radio button options\n\t\t\t\t$wp_customize->add_control('top_layout_control', array(\n\t\t\t\t'label' => __('Top Section Display', 'Super Video Scout'),\n\t\t\t\t'section' => 'svs_layout',\n\t\t\t\t'settings' => 'top_layout_setting',\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'featured' => 'Featured Videos',\n\t\t\t\t\t'banner' => 'Site Logo/Banner Image',\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t\t\n\t\t\t//our default content layout setting\n\t\t\t$wp_customize->add_setting('content_layout_setting', array(\n\t\t\t\t'default' => 'thumbs'\n\t\t\t));\t\t\n\t\t\t\t//radio button options\n\t\t\t\t$wp_customize->add_control('content_layout_control', array(\n\t\t\t\t'label' => __('Content Display', 'Super Video Scout'),\n\t\t\t\t'section' => 'svs_layout',\n\t\t\t\t'settings' => 'content_layout_setting',\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'thumbs' => 'Thumbnails',\n\t\t\t\t\t'compressed' => 'Compressed',\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t\n}", "public function register_settings() {\n\t\t$section = 'janrain-capture';\n\n\t\tregister_setting( $this->option_group, 'pn_theme_janrain_enable', array( $this, 'sanitize_input_checkbox' ) );\n\t\tregister_setting( $this->option_group, 'pn_theme_janrain_debug', array( $this, 'sanitize_input_checkbox' ) );\n\n\t\tadd_settings_section( $section, 'Janrain Capture', '__return_false', $this->option_group );\n\t\tadd_settings_field( 'pn_theme_janrain_enable', 'Enable Janrain Capture', array( $this, 'render_input_checkbox' ), $this->option_group, $section, array( 'key' => 'pn_theme_janrain_enable', 'help' => 'Used by theme to register proper click events. eg. Janrain vs. Press+' ) );\n\t\tadd_settings_field( 'pn_theme_janrain_debug', 'Enable Janrain Debug', array( $this, 'render_input_checkbox' ), $this->option_group, $section, array( 'key' => 'pn_theme_janrain_debug', 'help' => 'Turns on Janrain event logging' ) );\n\t}", "function julia_kaya_customizer_settings() \r\n\t{\r\n\t\tadd_theme_page( esc_html__('Customizer Import','julia'), esc_html__('Customizer Import','julia'), 'edit_theme_options', 'import', array( $this,'julia_kaya_customize_import_option_page'));\r\n add_theme_page( esc_html__('Customizer Export','julia'), esc_html__('Customizer Export','julia'), 'edit_theme_options', 'export', array( $this,'julia_kaya_customize_export_option_page'));\r\n }", "function register() {\n\tadd_action( 'admin_menu', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\add_menu' );\n\tadd_action( 'admin_init', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\action_handler' );\n\tadd_action( 'admin_enqueue_scripts', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\register_style' );\n\n\t\\Sgdd\\Admin\\SettingsPages\\Basic\\register();\n\t\\Sgdd\\Admin\\SettingsPages\\Advanced\\register();\n\t\\Sgdd\\Admin\\Editor\\register();\n}", "protected function _register_controls() {\n // `Testimonial Carousel` Section\n $this->start_controls_section( 'testimonial_carousel', array(\n 'label' => 'Testimonial Carousel',\n 'tab' => Controls_Manager::TAB_CONTENT,\n ) );\n\n $repeater = new \\Elementor\\Repeater();\n\n $repeater->add_control( 'testimonial_image', array(\n 'label' => 'Choose Image',\n 'type' => Controls_Manager::MEDIA,\n 'default' => array(\n 'url' => \\Elementor\\Utils::get_placeholder_image_src(),\n ),\n ) );\n\n $repeater->add_group_control( \\Elementor\\Group_Control_Image_Size::get_type(), array(\n 'name' => 'testimonial_img_size',\n 'exclude' => array(),\n 'include' => array(),\n 'default' => 'thumbnail',\n ) );\n\n $repeater->add_control( 'testimonial_content', array(\n 'label' => 'Content',\n 'type' => Controls_Manager::TEXTAREA,\n 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.',\n ) );\n\n $repeater->add_control( 'testimonial_name', array(\n 'label' => 'Name',\n 'type' => Controls_Manager::TEXT,\n 'default' => 'John Doe',\n ) );\n\n $repeater->add_control( 'testimonial_title', array(\n 'label' => 'Title',\n 'type' => Controls_Manager::TEXT,\n 'default' => 'Web Developer',\n ) );\n\n $this->add_control( 'testimonial_list', array(\n 'label' => 'Testimonials',\n 'type' => Controls_Manager::REPEATER,\n 'fields' => $repeater->get_controls(),\n 'default' => array(\n array(\n 'testimonial_content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pharetra magna eu nisi porttitor, ut auctor felis commodo. Fusce nunc nisl, volutpat vel dolor eget, dapibus congue mauris. Nullam vestibulum eros vitae augue sagittis aliquet. Nulla tempor imperdiet enim eu pulvinar.',\n ),\n array(\n 'testimonial_content' => 'Suspendisse nec imperdiet nisi, eu pulvinar turpis. Maecenas consequat pharetra mi eget volutpat. Vivamus quis pulvinar ante. Mauris vitae bibendum orci. Quisque porta dui mauris, eget facilisis nunc cursus et. Pellentesque condimentum mollis dignissim. Cras vehicula lacinia nulla, blandit luctus lectus ornare quis.',\n ),\n array(\n 'testimonial_content' => 'Etiam ac ligula magna. Nam tempus lorem a leo fermentum, eget iaculis eros vulputate. Fusce sollicitudin nulla ac aliquam scelerisque. Fusce nec dictum magna. Ut maximus ultrices pulvinar. Integer sit amet felis tellus. Phasellus turpis ex, luctus vulputate egestas eget, laoreet et nunc.',\n ),\n ),\n 'title_field' => '{{{ testimonial_name }}}'\n ) );\n\n $this->end_controls_section();\n\n // `Image` Section\n $this->start_controls_section( 'testimonial_image_style', array(\n 'label' => 'Image',\n 'tab' => Controls_Manager::TAB_STYLE,\n ) );\n\n $this->add_control( 'testimonial_image_size', array(\n 'label' => 'Image Size',\n 'type' => Controls_Manager::SLIDER,\n 'range' => array(\n 'px' => array(\n 'min' => 50,\n 'max' => 500,\n 'step' => 5,\n ),\n ),\n 'selectors' => array(\n '{{WRAPPER}} .img-box' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',\n ),\n ) );\n\n $this->add_group_control( \\Elementor\\Group_Control_Border::get_type(), array(\n 'name' => 'testimonial_image_border',\n 'label' => 'Border Type',\n 'selector' => '{{WRAPPER}} .img-box',\n ) );\n\n $this->add_control( 'testimonial_image_border_radius', array(\n 'label' => 'Border Radius',\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units'=> array( 'px', '%' ),\n 'selectors' => array(\n '{{WRAPPER}} .img-box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n '{{WRAPPER}} .img-box img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n ), \n ) );\n\n $this->end_controls_section();\n\n // `Content` Section\n $this->start_controls_section( 'testimonial_content_style', array(\n 'label' => 'Content',\n 'tab' => Controls_Manager::TAB_STYLE,\n ) );\n\n $this->add_control( 'testimonial_content_text_color', array(\n 'label' => 'Text Color',\n 'type' => Controls_Manager::COLOR,\n 'scheme' => array(\n 'type' => \\Elementor\\Scheme_Color::get_type(),\n 'value' => \\Elementor\\Scheme_Color::COLOR_3,\n ),\n 'selectors' => array(\n '{{WRAPPER}} .testimonial-content' => 'color: {{VALUE}}',\n ),\n ) );\n\n $this->add_group_control( \\Elementor\\Group_Control_Typography::get_type(), array(\n 'name' => 'testimonial_content_typography',\n 'label' => 'Typography',\n 'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_3,\n 'selector' => '{{WRAPPER}} .testimonial-content',\n ) );\n\n $this->add_group_control( \\Elementor\\Group_Control_Text_Shadow::get_type(),array(\n 'name' => 'testimonial_content_text_shadow',\n 'label' => 'Text Shadow',\n 'selector' => '{{WRAPPER}} .testimonial-content',\n ) );\n\n $this->end_controls_section();\n\n // `Name` Section\n $this->start_controls_section( 'testimonial_name_style', array(\n 'label' => 'Name',\n 'tab' => Controls_Manager::TAB_STYLE,\n ) );\n\n $this->add_control( 'testimonial_name_text_color', array(\n 'label' => 'Text Color',\n 'type' => Controls_Manager::COLOR,\n 'scheme' => array(\n 'type' => \\Elementor\\Scheme_Color::get_type(),\n 'value' => \\Elementor\\Scheme_Color::COLOR_1,\n ),\n 'selectors' => array(\n '{{WRAPPER}} .testimonial_name' => 'color: {{VALUE}}',\n ),\n ) );\n\n $this->add_group_control( \\Elementor\\Group_Control_Typography::get_type(), array(\n 'name' => 'testimonial_name_typography',\n 'label' => 'Typography',\n 'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .testimonial_name',\n ) );\n\n $this->add_group_control( \\Elementor\\Group_Control_Text_Shadow::get_type(),array(\n 'name' => 'testimonial_name_text_shadow',\n 'label' => 'Text Shadow',\n 'selector' => '{{WRAPPER}} .testimonial_name',\n ) );\n\n $this->end_controls_section();\n\n // `Title` Section\n $this->start_controls_section( 'testimonial_title_style', array(\n 'label' => 'Title',\n 'tab' => Controls_Manager::TAB_STYLE,\n ) );\n\n $this->add_control( 'testimonial_title_text_color', array(\n 'label' => 'Text Color',\n 'type' => Controls_Manager::COLOR,\n 'scheme' => array(\n 'type' => \\Elementor\\Scheme_Color::get_type(),\n 'value' => \\Elementor\\Scheme_Color::COLOR_3,\n ),\n 'selectors' => array(\n '{{WRAPPER}} .testimonial_title' => 'color: {{VALUE}}',\n ),\n ) );\n\n $this->add_group_control( \\Elementor\\Group_Control_Typography::get_type(), array(\n 'name' => 'testimonial_title_typography',\n 'label' => 'Typography',\n 'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_3,\n 'selector' => '{{WRAPPER}} .testimonial_title',\n ) );\n\n $this->add_group_control( \\Elementor\\Group_Control_Text_Shadow::get_type(),array(\n 'name' => 'testimonial_title_text_shadow',\n 'label' => 'Text Shadow',\n 'selector' => '{{WRAPPER}} .testimonial_title',\n ) );\n\n $this->end_controls_section();\n }", "function theme_customizer_register( $wp_customize ) {\n \n //Removed Unused Areas\n $wp_customize->remove_section( 'static_front_page' );\n\n //Add Customizer Section \n $wp_customize->add_section( 'footer_content', array(\n 'title' => __('Footer Content'),\n 'description' => __('Add social links and other content.'),\n 'priority' => 35,\n )\n );\n\n //Add Customizer Settings \n $wp_customize->add_setting( 'theme_facebook_url' );\n $wp_customize->add_setting( 'theme_twitter_url' );\n $wp_customize->add_setting( 'theme_instagram_url' );\n $wp_customize->add_setting( 'theme_pinterest_url' );\n $wp_customize->add_setting( 'theme_footer_text' );\n $wp_customize->add_setting( 'theme_logo' );\n $wp_customize->add_setting( 'theme_inverted_logo' );\n \n //Add Customizer Controls \n $wp_customize->add_control( 'theme_facebook_url',\n array(\n 'label' => 'Facebook URL',\n 'section' => 'footer_content',\n 'type' => 'text',\n )\n );\n $wp_customize->add_control( 'theme_twitter_url',\n array(\n 'label' => 'Twitter URL',\n 'section' => 'footer_content',\n 'type' => 'text',\n )\n );\n $wp_customize->add_control( 'theme_instagram_url',\n array(\n 'label' => 'Instagram URL',\n 'section' => 'footer_content',\n 'type' => 'text',\n )\n );\n $wp_customize->add_control( 'theme_pinterest_url',\n array(\n 'label' => 'Pinterest URL',\n 'section' => 'footer_content',\n 'type' => 'text',\n )\n );\n $wp_customize->add_control( 'theme_footer_text',\n array(\n 'label' => 'Footer Credit',\n 'section' => 'footer_content',\n 'type' => 'text',\n )\n );\n $wp_customize->add_control( \n new WP_Customize_Media_Control( $wp_customize, 'theme_logo',\n array(\n 'label' => 'Logo',\n 'section' => 'title_tagline',\n 'settings' => 'theme_logo',\n ) \n ) \n );\n $wp_customize->add_control( \n new WP_Customize_Media_Control( $wp_customize, 'theme_inverted_logo',\n array(\n 'label' => 'Inverted Logo',\n 'section' => 'title_tagline',\n 'settings' => 'theme_inverted_logo',\n ) \n ) \n );\n}", "public function registerCustomizerControl( $wp_customize, $section, $priority = 1 ) {\r\n $wp_customize->add_control( new TitanFrameworkOptionFileUploadControl( $wp_customize, $this->getID(), array(\r\n 'label' => $this->settings['name'],\r\n 'section' => $section->getID(),\r\n 'settings' => $this->getID(),\r\n 'description' => $this->settings['desc'],\r\n 'priority' => $priority,\r\n 'caption' => $this->settings['label'],\r\n ) ) );\r\n }", "public function register_settings() {\n\n\t\t// This include creates a variable called $settings.\n\t\t// TODO: Load this from a file instead ...\n\t\t$settings = array(\n\t\t\tarray(\n\t\t\t\t/*Sections*/\n\t\t\t\t'name'\t\t=> 'default',\n\t\t\t\t'title'\t\t=> __('General Settings','wpchaosclient'),\n\t\t\t\t'fields'\t=> array(\n\t\t\t\t\t/*Section fields*/\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-servicepath',\n\t\t\t\t\t\t'title' => __('Service Path','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-clientguid',\n\t\t\t\t\t\t'title' => __('Client GUID','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-accesspoint-guid',\n\t\t\t\t\t\t'title' => __('Access Point GUID','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-email',\n\t\t\t\t\t\t'title' => __('E-mail used for authentication','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-password',\n\t\t\t\t\t\t'title' => __('Password','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'password'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$this->settings = apply_filters('wpchaos-config', $settings);\n\n\t\tforeach($this->settings as $section) {\n\n\t\t\t//Validate\n\t\t\tif(!isset($section['name'],$section['title'],$section['fields']))\n\t\t\t\tcontinue;\n\n\t\t\t//Add section to WordPress\n\t\t\tadd_settings_section(\n\t\t\t\t$section['name'],\n\t\t\t\t$section['title'],\n\t\t\t\tnull,\n\t\t\t\t$this->menu_page\n\t\t\t);\n\n\t\t\tforeach($section['fields'] as $setting) {\n\t\t\t\t//Validate\n\t\t \t\tif(!isset($setting['title'],$setting['name'],$setting['type']))\n\t\t \t\t\tcontinue;\n\n\t\t \t\t//Are there any preconditions for this field to work properly?\n\t\t \t\tif(isset($setting['precond'])) {\n\t\t \t\t\tforeach($setting['precond'] as $precondition) {\n\t\t \t\t\t\tif(!$precondition['cond'])\n\t\t \t\t\t\t\tadd_action( 'admin_notices', function() use(&$precondition) { echo '<div class=\"error\"><p>'.$precondition['message'].'</p></div>'; },10);\n\t\t \t\t\t}\n\t\t \t\t}\n\n\t\t \t\t// Add field to section\n\t\t \t\tadd_settings_field($setting['name'],\n\t\t\t\t\t$setting['title'],\n\t\t\t\t\tarray(&$this,'create_setting_field'),\n\t\t\t\t\t$this->menu_page,\n\t\t\t\t\t$section['name'],\n\t\t\t\t\t$setting);\n\n\t\t \t\t// Register field to be manipulated with\n\t\t \t\tregister_setting($this->menu_page,$setting['name']);\n\t\t\t}\n\n\t\t}\n\n\t }", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Title\n\t\t$this->add_control(\n\t\t 'portfolio_section_heading_title',\n\t\t\t[\n\t\t\t 'label' => esc_html__('Section Heading Title','portfolio-elementor'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'placeholder' => esc_html__('Enter Section Heading Title','portfolio-elementor'),\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title \n\t\t$this->add_control(\n\t\t 'portfolio_section_heading_sub_title',\n\t\t\t[\n\t\t\t 'label' => esc_html__('Section Heading Sub Title','portfolio-elementor'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'placeholder' => esc_html__('Enter Section Heading Sub Title','portfolio-elementor'),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t// end of the Content tab section\n\t\t\n\t\t// start of the Style tab section\n\t\t$this->start_controls_section(\n\t\t\t'style_section',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Content Style', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->start_controls_tabs(\n\t\t\t'style_tabs'\n\t\t);\n\t\t\n\t\t// start everything related to Normal state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Title Options\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_title_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Section Heading Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Title Color\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Title Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#dee3e4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .section-title h2' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Title Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_section_heading_title_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .section-title h2',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title Options\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_sub_title_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Section Heading Sub Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Sub Title Color\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_sub_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Sub Title Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#343a40',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .section-title p' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_section_heading_sub_title_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .section-title p',\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Normal state here\n\n\t\t// start everything related to Hover state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Hover state here\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t\t// end of the Style tab section\n\n\t}", "public function customize_register( $wp_customize ) {\n\t\t// Include our custom control.\n\t\trequire dirname( __FILE__ ) . '/class-site-logo-control.php';\n\n\t\t// Add a setting to hide header text if the theme isn't supporting the feature itself\n\t\tif ( ! current_theme_supports( 'custom-header' ) ) {\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t'site_logo_header_text',\n\t\t\t\tarray(\n\t\t\t\t\t'default' => 1,\n\t\t\t\t\t'sanitize_callback' => array( $this, 'sanitize_checkbox' ),\n\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew WP_Customize_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t'site_logo_header_text',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => __( 'Display Header Text', 'jetpack' ),\n\t\t\t\t\t\t'section' => 'title_tagline',\n\t\t\t\t\t\t'settings' => 'site_logo_header_text',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Add the setting for our logo value.\n\t\t$wp_customize->add_setting(\n\t\t\t'site_logo',\n\t\t\tarray(\n\t\t\t\t'capability' => 'manage_options',\n\t\t\t\t'default' => array(\n\t\t\t\t\t'id' => 0,\n\t\t\t\t\t'sizes' => array(),\n\t\t\t\t\t'url' => false,\n\t\t\t\t),\n\t\t\t\t'sanitize_callback' => array( $this, 'sanitize_logo_setting' ),\n\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t'type' => 'option',\n\t\t\t)\n\t\t);\n\n\t\t// Add our image uploader.\n\t\t$wp_customize->add_control(\n\t\t\tnew Site_Logo_Image_Control(\n\t\t\t\t$wp_customize,\n\t\t\t\t'site_logo',\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Logo', 'jetpack' ),\n\t\t\t\t\t'section' => 'title_tagline',\n\t\t\t\t\t'settings' => 'site_logo',\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "function register() {\n $this->settings = new SettingApi();\n\n $this->setPages();\n $this->setSubpages();\n\n $this->setCustomPostTypes();\n $this->setTaxonomies();\n $this->setMetaboxes();\n $this->setFrontEndPages();\n\n $this->settings->loadPages($this->pages)->withSubPage('Action control')->loadSubPages($this->subpages)->register();\n }", "public function enqueue() {\n\t\tgutenberg_widgets_init( 'gutenberg_customizer' );\n\t}", "function clea_base_load_customize_controls() {\n\n\t/* Loads the textarea customize control class. */\n\trequire_once( trailingslashit( HYBRID_CLASSES ) . 'customize-control-textarea.php' );\n}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "function wm_customize_register( $wp_customize ) {\n\n // Allow users to toggle on and off some settings of Wiki Modern.\n require 'wm-theme-options.php';\n }", "protected function _register_controls() {\n /*-----------------------------------------------------------------------------------*/\n /* Content TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_section',\n array(\n 'label' => __('APR Heading', 'apr-core' ),\n )\n );\n /* Heading 1*/\n $this->add_control(\n 'title',\n array(\n 'label' => __( 'Title', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' => true\n ),\n 'placeholder' => __( 'Enter your title', 'apr-core' ),\n 'default' => __( 'Enter your title', 'apr-core' ),\n 'label_block' => true,\n )\n );\n $this->add_control(\n 'heading_size',\n array(\n 'label' => __( 'HTML Tag', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => array(\n 'h1' => __( 'H1', 'apr-core' ),\n 'h2' => __( 'H2', 'apr-core' ),\n 'h3' => __( 'H3', 'apr-core' ),\n 'h4' => __( 'H4', 'apr-core' ),\n 'h5' => __( 'H5', 'apr-core' ),\n 'p' => __( 'p', 'apr-core' ),\n ),\n 'default' => 'h3',\n )\n );\n $this->add_control(\n 'link',\n [\n 'label' => __( 'Link', 'elementor' ),\n 'type' => Controls_Manager::URL,\n 'dynamic' => [\n 'active' => true,\n ],\n 'default' => [\n 'url' => '',\n ],\n 'separator' => 'before',\n ]\n );\n $this->add_responsive_control(\n 'alignment',\n array(\n 'label' => __('Alignment', 'apr-core'),\n 'type' => Controls_Manager::CHOOSE,\n 'default' => 'left',\n 'options' => array(\n 'left' => array(\n 'title' => __( 'Left', 'apr-core' ),\n 'icon' => 'fa fa-align-left',\n ),\n 'center' => array(\n 'title' => __( 'Center', 'apr-core' ),\n 'icon' => 'fa fa-align-center',\n ),\n 'right' => array(\n 'title' => __( 'Right', 'apr-core' ),\n 'icon' => 'fa fa-align-right',\n )\n ),\n )\n );\n $this->add_control(\n 'description',\n array(\n 'label' => __( 'Description', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' \t=> true\n ),\n )\n );\n $this->add_control(\n 'description_position',\n [\n 'label' => __( 'Description Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'default' => 'bottom',\n 'options' => [\n 'aside' => __( 'Aside', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' ),\n ],\n ]\n );\n $this->add_control(\n 'list_divider',\n [\n 'label' => __( 'Divider', 'apr-core' ),\n 'type' => Controls_Manager::SWITCHER,\n 'default' => 'no',\n 'separator' => 'before',\n ]\n );\n\n $this->add_control(\n 'divider_position',\n [\n 'label' => __( 'Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'top' => __( 'Top', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' )\n ],\n 'default' => 'bottom',\n 'condition' => [\n 'list_divider' => 'yes',\n ]\n ]\n );\n\n $this->add_control(\n 'divider_color',\n [\n 'label' => __( 'Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'divider_color_hover',\n [\n 'label' => __( 'Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:hover:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_responsive_control(\n 'divider_top',\n [\n 'label' => __( 'Top Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'top: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_left',\n [\n 'label' => __( 'Left Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'left: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_weight',\n [\n 'label' => __( 'Height', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => 1,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'height: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_width',\n [\n 'label' => __( 'Width', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'default' => [\n 'size' => 100,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'width: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n \n $this->end_controls_section();\n /*-----------------------------------------------------------------------------------*/\n /* Style TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_style_section',\n array(\n 'label' => __( 'Color', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n $this->add_control(\n 'title_color',\n [\n 'label' => __( 'Title Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title,\n {{WRAPPER}} .heading-modern .heading-title a' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color',\n [\n 'label' \t=> __( 'Description color', 'apr-core' ),\n 'type' \t\t=> Controls_Manager::COLOR,\n 'scheme' \t=> [\n 'type' \t\t=> Scheme_Color::get_type(),\n 'value' \t=> Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n $this->start_controls_section(\n 'desc_style',\n array(\n 'label' => __( 'Typography', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'title_typo',\n 'label' \t=> __( 'Title', 'apr-core' ),\n 'selector' => '{{WRAPPER}} .heading-modern .heading-title',\n ]\n );\n $this->add_responsive_control(\n 'title_width',\n array(\n 'label' => __('Max width Title','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .heading-title' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'desc_typo',\n 'label' \t=> __( 'Description', 'apr-core' ),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' \t=> '{{WRAPPER}} .heading-modern .description',\n ]\n );\n $this->add_responsive_control(\n 'desc_width',\n array(\n 'label' => __('Max width Description','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .description' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_responsive_control(\n 'title_margin',\n array(\n 'label' => __( 'Margin Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n\n $this->add_responsive_control(\n 'title_padding',\n [\n 'label' => __( 'Padding Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_responsive_control(\n 'desc_margin',\n array(\n 'label' => __( 'Margin Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n $this->add_responsive_control(\n 'description_padding',\n [\n 'label' => __( 'Padding Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_control(\n 'title_color_hover',\n [\n 'label' => __( 'Title Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title:hover,\n {{WRAPPER}} .heading-modern .heading-title a:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color_hover',\n [\n 'label' => __( 'Description Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .description:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n }" ]
[ "0.7574842", "0.7336966", "0.7297163", "0.72384036", "0.7175507", "0.7070218", "0.7057177", "0.7046315", "0.70378554", "0.69862145", "0.69836956", "0.6966868", "0.6930361", "0.6923847", "0.69035375", "0.6893971", "0.68853354", "0.6882601", "0.68814313", "0.6879227", "0.6869407", "0.6867296", "0.6849167", "0.6840051", "0.6829961", "0.68175876", "0.68103385", "0.6808239", "0.68070626", "0.68042827", "0.6792739", "0.67844105", "0.67836547", "0.67812216", "0.67808616", "0.676775", "0.6767659", "0.6767659", "0.67563474", "0.6756324", "0.67337954", "0.6727057", "0.6698531", "0.66896546", "0.6686433", "0.6685018", "0.6665761", "0.6663799", "0.6663158", "0.666078", "0.6659082", "0.6646941", "0.6637119", "0.66309327", "0.6630162", "0.6620481", "0.6616548", "0.6615823", "0.66108793", "0.65992165", "0.65960073", "0.6591566", "0.65625745", "0.65565735", "0.65547925", "0.65387815", "0.6537661", "0.65307796", "0.6525293", "0.65188056", "0.65157235", "0.65085405", "0.650747", "0.650555", "0.6500144", "0.64975435", "0.6489434", "0.6487998", "0.64820164", "0.6481327", "0.6474961", "0.6474482", "0.6473308", "0.64319795", "0.64308614", "0.64298385", "0.64161897", "0.6416002", "0.64151126", "0.64068013", "0.6406429", "0.6404917", "0.6389817", "0.63821983", "0.6382115", "0.63740593", "0.63716674", "0.63633984", "0.63633984", "0.636277", "0.636173" ]
0.0
-1
Displays a message if the entered width is not numeric or greater than 100.
function thyme_validate_logo_width( $validity, $width ) { if ( empty( $width ) || ! is_numeric( $width ) ) { $validity->add( 'required', __( 'You must supply a valid number.', 'thyme-theme' ) ); } elseif ( $width < 100 ) { $validity->add( 'logo_too_small', __( 'The logo width cannot be less than 100.', 'thyme-theme' ) ); } return $validity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkWidth(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_numeric($this->_Width) && $this->_Width !== null && $this->_Width !== 0 ) {\n\t\t\t$inMessage .= \"{$this->_Width} is not a valid value for Width\";\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}", "public function setDisplayWidth($width)\n {\n\t\t$err = \"display width can be expressed in two ways: -(m | m,d) \";\n\t\t$err .= \"m and d must be integers \";\n\n\t\tif (is_string($width)) {\n\t\t\t$width = explode(',', $width);\n\t\t\t$max = count($width);\n\t\t\tif (1 === $max) {\n\t\t\t\t$width = $width[0];\n\t\t\t\tif (empty($width) || ! is_numeric($width)) {\n\t\t\t\t\t$err = \"single display width detected but is empty \";\n\t\t\t\t\t$err .= \"or is not an integer\";\n\t\t\t\t\techo \"\\n\", print_r('insert here',1), \"\\n\";exit;\n\t\t\t\t\tthrow new Exception($err);\n\t\t\t\t}\n\t\t\t\t$width =(int)$width;\n\t\t\t}\n\t\t\telse if (2 === $max) {\n\t\t\t\t$m = $width[0];\n\t\t\t\t$d = $width[1];\n\t\t\t\tif (empty($m) || !is_numeric($m) || empty($d) ||\n\t\t\t\t\t! is_numeric($d)) {\n\t\t\t\t\t$err = \"syntax m,d detected but either m or d or \";\n\t\t\t\t\t$err .= \"both is empty or not an integer\";\n\t\t\t\t\tthrow new Exception($err);\n\t\t\t\t}\n\t\t\t\t$m =(int) $m;\n\t\t\t\t$d =(int) $d;\n\t\t\t\t$width = \"$m,$d\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Exception($err);\n\t\t\t}\n\t\t}\n\t\telse if (! is_int($width)) {\n\t\t\tthrow new Exception($err);\n\t\t}\n\n\t\treturn $this->addAttribute('display-width', $width);\n\n }", "public function testWidthWithNumericString()\n {\n $this->box->setWidth('200');\n static::assertEquals(200, $this->box->getWidth());\n }", "public function setWidth($width)\n {\n if(is_numeric($width) && $width > 0)\n {\n $this->width = (int)$width;\n \n return false;\n }\n }", "public function testWidthWithNonNumericString()\n {\n static::setExpectedExceptionRegExp('LogicException');\n $this->box->setWidth('test');\n }", "function genesis_sample_validate_logo_width( $validity, $width ) {\n\n\tif ( empty( $width ) || ! is_numeric( $width ) ) {\n\t\t$validity->add( 'required', __( 'You must supply a valid number.', 'genesis-sample' ) );\n\t} elseif ( $width < 100 ) {\n\t\t$validity->add( 'logo_too_small', __( 'The logo width cannot be less than 100.', 'genesis-sample' ) );\n\t}\n\n\treturn $validity;\n\n}", "private static function errBadWidth($width)\n {\n $msg = wfMsgForContent('embedvideo-illegal-width', @htmlspecialchars($width));\n return '<div class=\"errorbox\">' . $msg . '</div>';\n }", "public function setWidth($width)\n\t{\n\t\tif (preg_match('/^\\d+$/', $width))\n\t\t{\n\t\t\tif ($width > 0)\n\t\t\t{\n\t\t\t\t$this->_width = $width;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tthrow new Lumia_Placeholder_Exception(__METHOD__ . '() Width must be greater than zero.');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tthrow new Lumia_Placeholder_Exception(__METHOD__ . '() Width must be an integer.');\n\t\t}\n\t}", "private static function sanitizeWidth($entry, &$width)\n {\n global $wgEmbedVideoMinWidth, $wgEmbedVideoMaxWidth;\n if ($width === null || $width == '*' || $width == '') {\n if (isset($entry['default_width']))\n $width = $entry['default_width'];\n else\n $width = 425;\n return true;\n }\n if (!is_numeric($width))\n return false;\n return $width >= $wgEmbedVideoMinWidth && $width <= $wgEmbedVideoMaxWidth;\n }", "public function setWidth($width) {\r\n $this->width = max(1,$width);\r\n }", "public function setWidth($width)\r\n {\r\n if (is_numeric($width))\r\n {\r\n $this->width = (int)$width;\r\n }\r\n }", "function isCharLenght($field, $msg, $min, $max){\n\t\t$value = $this->_getValue($field);\n\t\tif(strlen(trim($value))>$max || strlen(trim($value))<$min) {\n\t\t\t$this->_errorList[] = array(\"field\" => $field, \"value\" => $value, \"msg\" => $msg);\n\t\t\treturn false;\n\t\t}else{\n\t\treturn true;\n\t\t}\n\t}", "function isToo($v,$t='',$min=3,$max=50){\n\n\tif(strlen($v)<=$min){return showIn($t,'page') . calglb_too_short;}\n\telse if(strlen($v)>=$max){return showIn($t,'page') . calglb_too_long;}\n\telse{return '';}\n}", "public function getMissingWidth() {}", "public function getMissingWidth() {}", "public function getMissingWidth() {}", "public function getMissingWidth() {}", "public function getMissingWidth() {}", "public function setWidth($width) {\n\t\t$width = (int) $width;\n\t\t$this->width = (($width > 0) && ($width <= self::MAX_WIDTH)) ? $width : self::DEFAULT_WIDTH;\n\t}", "function pqurc_display_width()\n {\n $width = get_option('pqurcode_width');\n printf(\"<input type='text' id='%s' name='%s' value='%s' />\", 'pqurcode_width', 'pqurcode_width', $width);\n }", "public function testWidthWithInteger()\n {\n $this->box->setWidth(200);\n static::assertEquals(200, $this->box->getWidth());\n }", "public function testSetMaxDimensionsNotNumericWidth() {\n $this->assertFalse($this->up->setMaxDimensions(\"Hello\", 480));\n }", "function islenincorrect($str = null){\n if ($str) {\n if (strlen($str)<2 || strlen($str)>50 ) {\n echo \"input is less than 2 or more than 20 Characters<br>\";\n return true;\n }else\n return false;\n }\n}", "function strNumValid($val = '',$type = 's', $min_len = 0) {\r\n if(!empty($val)) {\r\n\t\tif(strlen($val)>=$min_len) {\r\n\t\t\tif($type == 'n' && ctype_digit($val)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if($type == 's' && is_string($val) && !ctype_digit($val)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse return false;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "public function testSetPrintWidthDefault()\n {\n $this -> printer -> setPrintWidth();\n $this -> checkOutput(\"\\x1b@\\x1dW\\x00\\x02\");\n }", "function showInputError($errorType)\n{\n if ($errorType !== '') {\n return \"<p class='error-alert'>$errorType</p>\";\n }\n}", "protected static function _maxLength() {\n if (self::$_ruleValue) {\n if (strlen(trim(self::$_elementValue)) > self::$_ruleValue) {\n self::setErrorMessage(\"Enter at most \" . self::$_ruleValue . \" charachters only\");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }", "public function check()\n {\n return ctype_digit($this->value);\n }", "function width($w) {\r\n\t\treturn ((!empty($w)) ? ' width:'.$w. 'px;' : '');\r\n\t}", "function vcex_validate_px_pct( $input ) {\n\tif ( ! $input ) {\n\t\treturn;\n\t}\n\tif ( 'none' === $input || '0px' === $input ) {\n\t\treturn '0';\n\t}\n\tif ( strpos( $input, '%' ) ) {\n\t\treturn wp_strip_all_tags( $input );\n\t}\n\tif ( $input = floatval( $input ) ) {\n\t\treturn wp_strip_all_tags( $input ) . 'px';\n\t}\n}", "function validateNumber ( $validatedValue, $stringName ) {\n\tif ( !is_numeric ( $validatedValue ) ) {\n\t\techo \"<script>alert('$stringName should be a number!!!!')</script>\";\n\t\texit ();\n\t} else if ( $validatedValue < 0 ) {\n\t\techo \"<script>alert('$stringName should be greater or equal 0!!!!')</script>\";\n\t\texit ();\n\t}\n}", "protected static function _minLength() {\n if (self::$_ruleValue) {\n if (self::$_ruleValue > strlen(trim(self::$_elementValue))) {\n self::setErrorMessage(\"Enter at least \" . self::$_ruleValue . \" charachters \");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }", "public function validate()\r\n {\r\n if(($this->length_n>=MIN_LENGTH AND $this->length_n<MAX_LENGTH) AND ($this->width_m>=MIN_WIDTH AND $this->width_m<MAX_WIDTH))\r\n {\r\n return true;\r\n }else {\r\n return false;\r\n }\r\n\r\n \r\n }", "public function setWidth($width) {}", "public function setWidth($width) {}", "public function setWidth($width) {}", "public function testWidenWithZeroWidth()\n {\n $this->box->setWidth(0);\n static::setExpectedExceptionRegExp('InvalidArgumentException');\n $this->box->widen(50);\n }", "public static function validate_len_text($text,$num){\r\n $len_text = strlen($text);\r\n $num = (int) $num;\r\n if($num >= $len_text) return TRUE;\r\n return FALSE;\r\n }", "public function sanitize_dimension( $value, $dimension ) {\n\n\t\t// Allows 0 to be used as valid dimension.\n\t\tif ( null === $value ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t// Allow special 'auto' value for fixed-height layout.\n\t\tif ( 'width' === $dimension && 'auto' === $value ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t// Accepts both integers and floats & prevents negative values.\n\t\tif ( is_numeric( $value ) ) {\n\t\t\treturn max( 0, (float) $value );\n\t\t}\n\n\t\tif ( AMP_String_Utils::endswith( $value, 'px' ) ) {\n\t\t\treturn absint( $value );\n\t\t}\n\n\t\tif ( AMP_String_Utils::endswith( $value, '%' ) && 'width' === $dimension && isset( $this->args['content_max_width'] ) ) {\n\t\t\t$percentage = absint( $value ) / 100;\n\t\t\treturn round( $percentage * $this->args['content_max_width'] );\n\t\t}\n\n\t\treturn '';\n\t}", "function has_length( $value, $options ) {\n if ( isset( $options[ 'min' ] ) && !has_length_greater_than( $value, $options[ 'min' ] ) ) {\n return false;\n } elseif ( isset( $options[ 'max' ] ) && !has_length_less_than( $value, $options[ 'max' ] ) ) {\n return false;\n } elseif ( isset( $options[ 'exact' ] ) && !has_length_exactly( $value, $options[ 'exact' ] ) ) {\n return false;\n } else {\n return true;\n }\n}", "public function testSetBarcodeWidthDefault()\n {\n $this -> printer -> setBarcodeWidth();\n $this -> checkOutput(\"\\x1b@\\x1dw\\x03\");\n }", "public function getTextWidth() {}", "function has_length($value , $options = []){\r\n if(isset($options['max']) && (strlen($value) > (int)$options['max'])){\r\n return false;\r\n }\r\n if(isset($options['min']) && (strlen($value) < (int)$options['min'])){\r\n return false;\r\n }\r\n if(isset($options['exact']) && (strlen($value) != (int)$options['exact'])){\r\n return false;\r\n }\r\n return true;\r\n}", "private function varIsNumeric($var): void {\r\n\t\t$numericTable = '<table class=\"dBug_table dBug_numeric\">' . \"\\n\" . '<tr>' . \"\\n\" . '<th class=\"dBug_clickable_table dBug_numericHeader\">' . gettype($var) . '</th>' . \"\\n\" . '</tr>'.\"\\n\";\r\n\t\t$numericTable .= '<tr>' . \"\\n\" . '<td>' . $var . '</td>' . \"\\n\" . '</tr>' . \"\\n\";\r\n\t\t$numericTable .= '</table>'.\"\\n\";\r\n\t\techo $numericTable;\r\n\t}", "function has_length($value, $options) {\n if(isset($options['min']) && !has_length_greater_than($value, $options['min'])) {\n return false;\n } elseif(isset($options['max']) && !has_length_less_than($value, $options['max'])) {\n return false;\n } elseif(isset($options['exact']) && !has_length_exactly($value, $options['exact'])) {\n return false;\n } else {\n return true;\n }\n}", "public function message()\n {\n return \"The first :attribute may not be greater than $this->length characters.\";\n }", "function captionError($captionBox)\n{\n\t// Check if anything has been entered into the caption box\n\tif(!isset($_REQUEST[$captionBox]))\n\t\techo \"<p style=\\\"color:red;\\\">Please enter a caption.</p>\\n\";\n\telse\n\t{\n\t\t// Trim any whitespace\n\t\t$caption = trim($_REQUEST[$captionBox]);\n\t\t\n\t\t// Check if the entered caption is empty or more than 20 characters\n\t\tif( (strlen($caption) == 0) || (strlen($caption) > 20) )\n\t\t\techo \"<p style=\\\"color:red;\\\">Please enter a caption that is less than 20 characters long.</p>\\n\";\n\t}\n}", "private static function VerifyWidthMinAndMax()\n {\n global $wgEmbedVideoMinWidth, $wgEmbedVideoMaxWidth;\n if (!is_numeric($wgEmbedVideoMinWidth) || $wgEmbedVideoMinWidth < 100)\n $wgEmbedVideoMinWidth = 100;\n if (!is_numeric($wgEmbedVideoMaxWidth) || $wgEmbedVideoMaxWidth > 1024)\n $wgEmbedVideoMaxWidth = 1024;\n }", "public function getWidthLimit()\n {\n }", "public function setWidth($width)\n {\n if (is_numeric($width)) {\n $this->width = \"{$width}px\";\n } else {\n $this->width = $width;\n }\n $this->setAttributes(\"Width\");\n }", "public function validate()\n\t{\n\t\tif(strlen($this->value) <= $this->argument)\n\t\t\treturn true;\n\n\t\t$this->addError('Please enter no more than ' . $this->argument . ' characters.');\n\t\treturn false;\n\t}", "public function setWidth($width);", "public function setWidth($width);", "public function setWidth($width)\n {\n $this->width = (int) $width;\n }", "function validate_input($input_data, $input_type) {\n $output_data = trim($input_data);\n $output_data = stripslashes($output_data);\n $output_data = htmlspecialchars($output_data);\n if($input_type == 'text') {\n // not sure what to do here; \n }\n if($input_type == 'number') {\n if(!is_numeric($output_data)) {\n return false;\n }\n }\n return $output_data;\n}", "function check_length($value = \"\", $min, $max) {\n $result = (mb_strlen($value) < $min || mb_strlen($value) > $max);\n return !$result;\n}", "function filepro_fieldwidth($field_number)\n{\n}", "public static function validateSize(TextBase $control, $range)\n\t{\n\t\tif (!is_array($range)) {\n\t\t\t$range = array($range, $range);\n\t\t}\n\t\t$size = count($control->getValue());\n\t\treturn ($range[0] === NULL || $size >= $range[0]) && ($range[1] === NULL || $size <= $range[1]);\n\t}", "function has_length($value, $options=array()) {\n //for first/last name [1,256]\n //for username [7, 256]\n if(strlen($value) > $options[0] && strlen($value) < $options[1]) {\n return 1;\n }\n return 0;\n }", "public function allowsTruncate($value): bool;", "public function getDefaultWidth() {}", "function validate_is_number($field_input, array &$field): bool\n{\n if (!is_numeric($field_input)) {\n $field['error'] = 'Type in integer';\n return false;\n }\n return true;\n}", "private function validateYear($year) {\n if (empty($year)) {\n exit(\"<h1>Please Provide Year.</h1>\");\n }\n if (!is_numeric($year) || strlen($year) != 4) {\n exit(\"<h1>Please Provide Valid Year.</h1>\");\n }\n }", "function get_width($width){\n\t\t$this->width = $width;\n\t}", "function Solicitar_Stock_ali($Value){\n echo \"<label for='Stock'><b>Stock</b></label>\";\n echo \"<input type='text' placeholder='Stock del alimento' name='Stock' required maxlength='100' value='\".$Value.\"'\";\n echo \"title='Ingrse un numero mayor a 1 y menor a 999' pattern='^\\d{1,3}$'>\";\n echo \"<br><br>\";\n}", "function set_width($width) {\n $this->width = $width;\n }", "function NeedQuotesNumeric($type)\n{\n if($type == 203 || $type == 8 || $type == 129 || $type == 130 || \n\t\t$type == 7 || $type == 133 || $type == 134 || $type == 135 ||\n\t\t$type == 201 || $type == 205 || $type == 200 || $type == 202 || $type==72 || $type==13)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function plugin_customfields_showValue($value, $size='') {\n if ($size!='') {\n echo '<div style=\"text-align:left;overflow:auto;border:1px solid #999;'.$size.'\">';\n }\n\n if ($value != '' && $value != '&nbsp;') {\n echo $value;\n } else {\n echo '-';\n }\n\n if ($size != '') {\n echo '</div>';\n }\n}", "public function testWidthWithFloat()\n {\n $this->box->setWidth(200.10);\n static::assertEquals(200, $this->box->getWidth());\n }", "private function validate()\n {\n if (! is_numeric($this->number)) {\n throw new \\InvalidArgumentException(\"Invalid numeric value provided ($this->number).\");\n }\n }", "function smarty_function_product_width($params, $template)\r\n{\r\n\tglobal $content;\r\n\n\tif ($content['Content']['content_type_id'] != 2) return;\r\n\n\t$width = $content['ContentProduct']['width'];\r\n\t\n\tif ($width > 0) {\n\techo $width;\n\t}\r\n}", "function TypeCheck($i) \n{\n\n\tif (intval($i) == 0) {\n\n \t echo \"Bad String\";\n\n\t} else {\n\n echo intval($i);\n\n\t}\n}", "public static function validateLength(TextBase $control, $range)\r\n\t{\r\n\t\tif (!is_array($range)) {\r\n\t\t\t$range=array($range, $range);\r\n\t\t\t}\r\n\t\t$len=count($control->getValue());\r\n\t\treturn ($range[0]===NULL || $len>=$range[0]) && ($range[1]===NULL || $len<=$range[1]);\r\n\t}", "function validate(int $number):string{\n\treturn \"You dont have any error\";\n}", "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "public static function isVeryLong($width)\n {\n return $width > self::REAL_VLS_CHUNK;\n }", "public function setWidth($value)\n {\n $this->_width = $value;\n }", "function field_error( $problem ){\n\tif( isset( $problem ) ){\n\t\techo 'class=\"error\"';\n\t}\n}", "public function validateCharLimit(string $attribute)\n {\n if ($this->charLimit) {\n $columnTypeMax = Db::getTextualColumnStorageCapacity($this->columnType);\n\n if ($columnTypeMax && $columnTypeMax < $this->charLimit) {\n $this->addError($attribute, Craft::t('app', 'Character Limit is too big for your chosen Column Type.'));\n }\n }\n }", "function swf_textwidth($str)\n{\n}", "public function isNumeric();", "function isNumber($value){\n \n if (!preg_match('/^[0-9]+(\\\\.[0-9]+)?$/', $value)){\n \n header(\"Location: ..\\Graduate_form.html?error=\"); \n \n }else{\n return $value; \n }\n}", "function validate_any_field( $field ) {\n\t\t\n\t\t// width has changed\n\t\tif( isset($field['column_width']) ) {\n\t\t\t\n\t\t\t$field['wrapper']['width'] = acf_extract_var($field, 'column_width');\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// return\n\t\treturn $field;\n\t\t\n\t}", "protected function min($length, $field_name, $data)\n {\n if (strlen($data) >= $length) {\n return true;\n } else {\n $this->errors[$field_name][] = \"minimum {$length} char\";\n }\n// $this->errors[$field_name][] = \"minimum {$length} char\";\n// return empty(strlen($data) >= $length) ? false : true;\n }", "function validate_text_length($field_input, array &$field, array $params): bool\n{\n $length = strlen($field_input);\n if ($length > $params['max']) {\n $field['error'] = 'Word is too long';\n\n return false;\n\n } elseif ($length < $params['min']) {\n $field['error'] = 'Word is too short';\n\n return false;\n }\n\n return true;\n}", "function isnumeric($n) {\n\t//$n = round(readline(\"Digite o primeiro número: \"), 2);\n\tif (is_numeric($n)){\n\t\tprint(\"$n\");\n\treturn $n;\n}else{\n\t\texit;\n}\n}", "private function checkTextField($data,$minlength=1,$maxlength=256) {\n\t\tif(strlen($data)>$minlength && strlen($data)<$maxlength) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function input_number_is_valid( $number ) {\n\t\treturn ( is_numeric( $number ) && $number > 0 );\n\t}", "public function fieldWidths();", "function has_length($value, $options) {\r\n if(isset($options['min']) && !has_length_greater_than($value, $options['min'] - 1)) {\r\n return false;\r\n } elseif(isset($options['max']) && !has_length_less_than($value, $options['max'] + 1)) {\r\n return false;\r\n } elseif(isset($options['exact']) && !has_length_exactly($value, $options['exact'])) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "function validateAmount($amount)\n{ \n return is_numeric($amount) && $amount > 0;\n}", "public function testHeightWithNonNumericString()\n {\n static::setExpectedExceptionRegExp('LogicException');\n $this->box->setHeight('test');\n }", "private function validate_percentile($new_percentile)\n\t{\n\t\tif ($new_percentile)\n\t\t{\n\t\t\t$this->form_validation->set_rules('testcat', lang('testcat'), 'callback_not_zero');\n\t\t}\n\t\t$this->form_validation->set_rules('score', lang('score'), 'trim|required|integer');\n\t\t$this->form_validation->set_rules('percentile', lang('percentile'), 'trim|required|integer|greater_than[0]|less_than[100]');\n\n\t\treturn $this->form_validation->run();\n\t}", "protected function applyWidth()\n {\n }", "function check($a, $b) {\n if (is_numeric($a) && is_numeric($b)) {\n return true;\n } else {\n return \"please enter numbers only.\";\n }\n}", "function has_length_greater_than($value, $min) {\r\n $length = strlen($value);\r\n return $length > $min;\r\n}", "function check_input($value)\n\t{\n\tif(!empty($value))\n\t\t{\n\t\t$value = substr($value,0,50); \n\t\t}\n\t\tif (get_magic_quotes_gpc()) \n\t\t\t{\n\t\t\t$value = stripslashes($value);\n\t\t\t}\n\t\tif (!ctype_digit($value)) \t\n\t\t\t{\n\t\t\t$value = \"'\" . mysql_real_escape_string($value) . \"'\";\n\t\t\t}\n\telse\n\t\t{\n\t\t$value = intval($value);\n\t\t}\n\treturn $value;\n\t}", "protected function max($length, $field_name, $data)\n {\n if (strlen($data) <= $length) {\n return true;\n } else {\n $this->errors[$field_name][] = \"maximum {$length} char\";\n }\n// $this->errors[$field_name][] = \"maximum {$length} char\";\n// return empty(strlen($data) <= $length) ? false : true;\n }", "private function setTitleWidth($titleWidth) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER)\n\t\t));\n\n\t\t$this->titleWidth = $titleWidth;\n\t}" ]
[ "0.6768302", "0.6681152", "0.63489157", "0.62193644", "0.61063486", "0.60746413", "0.6050299", "0.59691983", "0.590934", "0.5707985", "0.5596151", "0.5507725", "0.549055", "0.5427789", "0.5427789", "0.5427789", "0.5427789", "0.5427789", "0.5397178", "0.53710747", "0.535891", "0.5352396", "0.5297194", "0.52271754", "0.518936", "0.5181018", "0.5173356", "0.5153289", "0.513529", "0.51193994", "0.51006293", "0.50813407", "0.5080021", "0.5076599", "0.5076411", "0.5076411", "0.5066553", "0.5030844", "0.5018548", "0.5012008", "0.49946815", "0.4980726", "0.49787852", "0.49709764", "0.4953174", "0.49507982", "0.4946663", "0.49463814", "0.494569", "0.4945374", "0.49415502", "0.49375284", "0.49375284", "0.4936287", "0.4933886", "0.49331555", "0.49148047", "0.4907614", "0.48987812", "0.48891628", "0.48888412", "0.4888417", "0.48812878", "0.4869146", "0.4868346", "0.48638934", "0.48540556", "0.48534787", "0.48488367", "0.48479", "0.4816882", "0.48141298", "0.4813646", "0.4813222", "0.48109937", "0.48109937", "0.48058257", "0.48027146", "0.479933", "0.4795218", "0.47947288", "0.4788027", "0.47855806", "0.47810197", "0.47780907", "0.4775211", "0.47733077", "0.47729436", "0.47727215", "0.47615057", "0.47605467", "0.47578332", "0.47497088", "0.4747952", "0.47467238", "0.47459784", "0.4741282", "0.47292042", "0.472792", "0.47269043" ]
0.6046882
7
get toolbar html for the specified position (top, left, right, bottom)
function get($pos, $mode='design') { $buf = ''; if (!empty($this->toolbars[$pos.'_'.$mode])) { if ($pos == 'top' || $pos == 'bottom') { // horizontal toolbar $tb_pos_start = '<table border="0" cellpadding="0" cellspacing="0" width="100%">'; $tb_pos_end = '</table>'; $tb_item_sep = ''; } else { // vertical toolbar $tb_pos_start = '<table border="0" cellpadding="0" cellspacing="0"><tr>'; $tb_pos_end = '</tr></table>'; $tb_item_sep = '<br>'; } $buf = $tb_pos_start; while (list(,$tb) = each($this->toolbars[$pos.'_'.$mode])) { if ($pos == 'top' || $pos == 'bottom') { // horizontal toolbar $tb_start = '<tr><td align="'.$tb['settings']['align'].'" valign="'.$tb['settings']['valign'].'" class="SPAW_'.$this->theme.'_toolbar_'.$pos.'" nowrap="yes">'; $tb_end = '</td></tr>'; } else { // vertical toolbar $tb_start = '<td align="'.$tb['settings']['align'].'" valign="'.$tb['settings']['valign'].'" class="SPAW_'.$this->theme.'_toolbar_'.$pos.'">'; $tb_end = '</td>'; } $buf .= $tb_start; while (list(,$tbitem) = each($tb['data'])) { $buf .= $this->getTbItem($tbitem['name'],$tbitem['type'],isset($tbitem['attributes'])?$tbitem['attributes']:'', isset($tbitem['data'])?$tbitem['data']:'') . $tb_item_sep; } $buf .= $tb_end; } $buf .= $tb_pos_end; } return $buf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getToolbarHtml()\n {\n return $this->getChildHtml('toolbar');\n }", "public function getToolbarHtml()\n {\n return $this->getChildHtml('toolbar');\n }", "public function getToolbarHtml()\n {\n $cedToolbar = $this->getChildHtml('toolbar');\n return $cedToolbar;\n }", "function getHtml()\r\n\t{\r\n\t\tglobal $spaw_dir;\r\n\t\tglobal $spaw_wysiwyg_instCount;\r\n\t\tglobal $spaw_active_toolbar;\r\n\r\n\r\n\t\t$n = $this->control_name;\r\n\t\t$orn = $this->original_name;\r\n\t\t// todo: make more customizable\r\n\r\n\t\t$buf = '';\r\n\t\tif (SPAW_Util::checkBrowser())\r\n\t\t{\r\n\t\t\tif ($spaw_wysiwyg_instCount == 1)\r\n\t\t\t{\r\n\t\t\t\t$buf.= $this->getCssScript();\r\n\t\t\t}\r\n\t\t\t// theme based css file and javascript\r\n\t\t\t$buf.= '<script language=\"JavaScript\" src=\"'.$spaw_dir.'lib/themes/'.$this->theme.'/js/toolbar.js.php\"></script>';\r\n\t\t\t$buf.= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$spaw_dir.'lib/themes/'.$this->theme.'/css/toolbar.css\">';\r\n\r\n\t\t\t$buf.= '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"'.$this->getWidth().'\" height=\"'.$this->getHeight().'\">';\r\n\t\t\t$buf.= '<tr>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_top_design\" class=\"SPAW_'.$this->theme.'_toolbar\" colspan=\"3\">';\r\n\t\t\t$buf.= $this->toolbars->get('top');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_top_html\" class=\"SPAW_'.$this->theme.'_toolbar\" colspan=\"3\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('top','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '</tr>';\r\n\r\n\t\t\t$buf.= '<tr>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_left_design\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" >';\r\n\t\t\t$buf.= $this->toolbars->get('left');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_left_html\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('left','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td align=\"left\" valign=\"top\" width=\"100%\" height=\"100%\">';\r\n\r\n\t\t\t//$buf.= '<input type=\"hidden\" id=\"'.$n.'\" name=\"'.$n.'\">';\r\n\t\t\t$buf.= '<textarea id=\"'.$n.'\" name=\"'.$orn.'\" style=\"width:'.$this->getWidth().'; height:'.$this->getHeight().'; display:none;\" class=\"SPAW_'.$this->theme.'_editarea\"></textarea>';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_editor_mode\" name=\"SPAW_'.$n.'_editor_mode\" value=\"design\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_lang\" value=\"'.$this->lang->lang.'\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_theme\" value=\"'.$this->theme.'\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_borders\" value=\"on\">';\r\n\r\n\t\t\t$buf.= '<iframe id=\"'.$n.'_rEdit\" style=\"width:100%; height:'.$this->getHeight().'; direction:'.$this->lang->getDir().';\" class=\"SPAW_'.$this->theme.'_editarea\" frameborder=\"no\" src=\"'.$spaw_dir.'empty.html\"></iframe><br>';\r\n\r\n\t\t\t$buf.= \"\\n<script language=\\\"javascript\\\">\\n<!--\\n\";\r\n\r\n\t\t\t$tmpstr = str_replace(\"\\r\\n\",\"\\n\",$this->getValue());\r\n\t\t\t$tmpstr = str_replace(\"\\r\",\"\\n\",$tmpstr);\r\n\t\t\t$content = explode(\"\\n\",$tmpstr);\r\n\t\t\t$plus = \"\";\r\n\t\t\tforeach ($content as $line)\r\n\t\t\t{\r\n\t\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value \".$plus.\"=\\\"\".str_replace('-->','@@END_COMMENT',str_replace('<!--','@@START_COMMENT',str_replace('\"','&quot;',str_replace(\"'\",\"\\'\",str_replace(\"\\\\\",\"\\\\\\\\\\\\\\\\\",$line))))).\"\\\\\\\\n\\\";',0);\\n\";\r\n\t\t\t\t$plus = \"+\";\r\n\t\t\t}\r\n\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/&quot;/g,\\'\\\"\\');',0);\".\"\\n\";\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/@@START_COMMENT/g,\\'<!--\\');',0);\".\"\\n\";\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/@@END_COMMENT/g,\\'-->\\');',0);\".\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"alert(document.all.'.$n.'.value);\",0);'.\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"'.$n.'_rEdit.document.body.innerHTML += document.all.'.$n.'.value;\",0);'.\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"SPAW_toggle_borders(\\''.$n.'\\',this[\\''.$n.'_rEdit\\'].document.body,null);\",0);'.\"\\n\";\r\n\r\n\t\t\t// editor init\r\n\t\t\t$buf.='setTimeout(\"SPAW_editorInit(\\''.$n.'\\',\\''.htmlspecialchars($this->getCssStyleSheet()).'\\',\\''.$this->lang->getDir().'\\');\",0);'.\"\\n\";\r\n\r\n\t\t\t$buf.= '//--></script>';\r\n\r\n\t\t\t$buf.= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_right_design\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\">';\r\n\t\t\t$buf.= $this->toolbars->get('right');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_right_html\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('right','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '</tr>';\r\n\t\t\t$buf.= '<tr><td class=\"SPAW_'.$this->theme.'_toolbar\"></td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_bottom_design\" class=\"SPAW_'.$this->theme.'_toolbar\" width=\"100%\">';\r\n\t\t\t$buf.= $this->toolbars->get('bottom');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_bottom_html\" class=\"SPAW_'.$this->theme.'_toolbar\" width=\"100%\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('bottom','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td class=\"SPAW_'.$this->theme.'_toolbar\"></td></tr>';\r\n\t\t\t$buf.= '</table>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// show simple text area\r\n\t\t\t$buf = '<textarea cols=\"20\" rows=\"5\" name=\"'.$n.'\" style=\"width:'.$this->getWidth().'; height:'.$this->getHeight().'\">'.htmlspecialchars($this->getValue()).'</textarea>';\r\n\t\t}\r\n\t\treturn $buf;\r\n\t}", "public function get_toolbar_positions() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_toolbar_positions();\n\n }", "public function getToolbarPosition()\n {\n return $this->toolbar['position'];\n }", "public function drawPanelToolbar() {\n\t\t$html = '';\n\t\t$html .= '<div id=\"toolbar\">'.\"\\n\";\n\t\t$html .= '\t<div id=\"toolbar_container\">'.\"\\n\";\n\t\t$html .= '\t<div class=\"logo\"><a href=\"/treeline/\"><img src=\"/treeline/img/logo.gif\" alt=\"Treeline\" /></a></div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"options\">'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button\" name=\"treeline\" id=\"treeline\" value=\"Save changes\" />'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button cancel\" name=\"treeline\" id=\"treeline\" value=\"Discard changes\" />'.\"\\n\";\t\t\t\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"clear\"></div>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "protected function renderToolbar() {}", "public function drawToolbar($pagestyle='', $disableStyles, $toolmode=\"page\") {\n\t\t$template=2;\n\t\t$helptitle=\"Page edit toolbar\";\n\t\t\n\t\t\n\t\tif ($toolmode==\"panel\") {\n\t\t\t$template=6;\n\t\t\t$helptitle='Panel edit toolbar';\n\t\t}\n\t\telse if ($toolmode==\"landing\") {\n\t\t\t$template=67;\n\t\t}\n\t\t\n\t\t$html = '\n<div id=\"toolbar\">\n\t<div class=\"logo\"><a href=\"/treeline/\"><img src=\"/treeline/img/logo.gif\" alt=\"Treeline\" /></a></div>\n\t<a href=\"javascript:openhelp(\\''.Help::helpLinkByTitle($helptitle).'\\');\" style=\"float:right;margin:20px;\">'.$this->getLabel(\"tl_help_get_help\", true).'</a>\n\t<div id=\"toolbar_container\">\n\t\t<div class=\"options\" style=\"'.($disableStyles?\"visibility:hidden\":\"\").';width:200px;\">\n\t\t\t<p>'.ucfirst($this->getLabel(\"tl_toolb_change_style\", true)).'</p>\n\t\t\t'.($disableStyles?\"\":$this->drawStyleSwitcherMenu($pagestyle, $template)).'\n\t\t</div>\n\t\t<div class=\"options\" id=\"toolbar-quick-links\" style=\"\">\n\t\t\t<p>'.ucfirst($this->getLabel(\"tl_toolb_quick\", true)).'</p>\n\t\t\t<a class=\"tl_link\" href=\"javascript:alert(\\'Inline asset create\\n\\nThis function is not yet supported.\\');\">'.$this->getLabel(\"tl_toolb_create_ass\", true).'</a>\n\t\t\t'.($toolmode==\"page\"?'<a class=\"tl_link\" href=\"javascript:panelManager(\\''.$this->getGUID().'\\');\">'.$this->getLabel(\"tl_toolb_man_panels\", true).'</a>':\"\").'\n\t\t\t<a class=\"tl_link\" href=\"javascript:editorNotes(\\''.$this->getGUID().'\\');\">'.$this->getLabel(\"tl_toolb_editor_note\", true).'</a>\n\t\t</div>\n\t\t<div class=\"options\" style=\"float:right;\">\n\t\t\t<p>'.$this->getLabel(\"tl_toolb_manage_title\", true).'</p>\n\t\t\t<input type=\"button\" class=\"button cancel\" name=\"treeline\" value=\"'.$this->getLabel(\"tl_toolb_but_discard\", true).'\" id=\"btn_discard\" onclick=\"javascript:setTarget(0);setAction(\\'Discard changes\\')\" />\n\t\t\t<input type=\"button\" class=\"button cancel\" name=\"treeline\" value=\"'.ucfirst($this->getLabel(\"tl_generic_preview\", true)).'\" id=\"btn_preview\" onclick=\"javascript:setTarget(1);setAction(\\'Preview\\')\" />\n\t\t\t<input type=\"button\" class=\"button\" name=\"treeline\" value=\"'.ucfirst($this->getLabel(\"tl_generic_save_changes\", true)).'\" id=\"btn_save\" onclick=\"javascript:setTarget(0);setAction(\\'Save changes\\')\" />\n\t\t</div>\n\t</div>\n\t<!-- <div class=\"clear\">&nbsp;</div> -->\n</div>\n<script type=\"text/javascript\">\n\tfunction setTarget(blank) {\n\t\tvar f=document.forms[0];\n\t\tif (blank) f.target=\"_blank\";\n\t\telse f.target=\"_self\";\n\t}\n\tfunction setAction(a) {\n\t\tvar f = document.getElementById(\\'treeline_edit\\');\n\t\t//alert(\"set post(\"+f+\") act(\"+a+\")\");\n\t\tif (f) {\n\t\t\tf.post_action.value=a;\n\t\t\t//alert(\"submitting\");\n\t\t\tf.submit();\n\n\t\t\tdocument.forms[0].target=\"_self\";\n\t\t\tf.post_action.value=\"\";\n\t\t\treturn true;\t\t\n\t\t}\n\t\treturn false;\n\t}\n\t\n</script>\n\n';\n//\t\tprint \"done toolbar<BR>\\n\";\n\t\treturn $html;\n\t}", "function get_toolbars()\n {\n }", "public function getEditToolbar() {\n\t \n\t\t$toolarray=array(\n\t\t\tarray(\n\t\t\t\t'image'=>'button_bold.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_bold_sample\", \"Bold text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_bold_tip\", \"Bold text\"),\n\t\t\t\t'key'\t=>\t'B'\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'image'=>'button_italic.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\",\n\t\t\t\t'sample'=> $this->pi_getLL(\"tb_italic_sample\", \"Italic text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_italic_tip\", \"Italic text\"),\n\t\t\t\t'key'\t=>\t'I'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'=>'button_link.png',\n\t\t\t\t'open'\t=>\t'[[',\n\t\t\t\t'close'\t=>\t']]',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_link_sample\", \"Link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_link_tip\", \"Internal link\"),\n\t\t\t\t'key'\t=>\t'L'\n\t\t\t),\n\t\t\t/*\n\t\t\tarray(\n\t\t\t\t'image'=>'button_extlink.png',\n\t\t\t\t'open'\t=>\t'[',\n\t\t\t\t'close'\t=>\t']',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_extlink_sample\", \"http://www.example.com link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_extlink_tip\", \"External link (remember http:// prefix)\"),\n\t\t\t\t'key'\t=>\t'X'\n\t\t\t),*/\n\t\t\tarray(\n\t\t\t\t'image'=>'button_headline.png',\n\t\t\t\t'open'\t=>\t\"\\\\n== \",\n\t\t\t\t'close'\t=>\t\" ==\\\\n\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_headline_sample\", \"Headline text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_headline_tip\", \"Level 2 headline\"),\n\t\t\t\t'key'\t=>\t'H'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_hr.png',\n\t\t\t\t'open'\t=>\t\"\\\\n----\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_hr_tip\", \"Horizontal line (use sparingly)\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sig.png',\n\t\t\t\t'open'\t=>\t\"\\\\n--~~~~\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sig_tip\", \"Signature\"),\n\t\t\t\t'key'\t=>\t'S'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_nowiki.png',\n\t\t\t\t'open'\t=>\t\"<nowiki>\",\n\t\t\t\t'close'\t=>\t'</nowiki>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_nowiki_sample\", \"This is not parsed\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_nowiki_tip\", \"Nowiki\"),\n\t\t\t\t'key'\t=>\t'N'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sub.png',\n\t\t\t\t'open'\t=>\t\"<sub>\",\n\t\t\t\t'close'\t=>\t'</sub>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sub_tip\", \"Sub\"),\n\t\t\t\t'key'\t=>\t'D'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sup.png',\n\t\t\t\t'open'\t=>\t\"<sup>\",\n\t\t\t\t'close'\t=>\t'</sup>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sup_tip\", \"Sup\"),\n\t\t\t\t'key'\t=>\t'U'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_strike.png',\n\t\t\t\t'open'\t=>\t\"<s>\",\n\t\t\t\t'close'\t=>\t'</s>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_strike_sample\", \"This text is strike through\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_strike_tip\", \"Strike Through\"),\n\t\t\t\t'key'\t=>\t''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_ref.png',\n\t\t\t\t'open'\t=>\t\"<ref>\",\n\t\t\t\t'close'\t=>\t'</ref>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_ref_sample\", \"This is a reference\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_ref_tip\", \"Add reference\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t);\n\t\t$toolbar =\"<script type='text/javascript'>\\n/*<![CDATA[*/\\n\";\n\t\n\t\t$toolbar.=\"document.writeln(\\\"<div id='toolbar'>\\\");\\n\";\n\t\t\n\t\tforeach($toolarray as $tool) {\n\t\t\t$image = substr(t3lib_div::getFileAbsFileName($this->conf['toolbarIconPath']), strlen(PATH_site)) . $tool['image'];\n\t\t\t$open = $tool['open'];\n\t\t\t$close = $tool['close'];\n\t\t\t$sample = $tool['sample'];\n\t\t\t$tip = $tool['tip'];\n\t\t\t$key = $tool[\"key\"]; // accesskey for the buttons\n\t\t\n\t\t\t$toolbar.=\"addButton('$image','$tip','$open','$close','$sample','$key');\\n\";\n\t\t}\n\t\n\t\t$toolbar.=\"addInfobox('\".$this->pi_getLL(\"tb_infobox\").\"','\".$this->pi_getLL(\"tb_infobox_alert\").\"');\\n\";\n\t\t$toolbar.=\"document.writeln(\\\"</div>\\\");\\n\";\n\t\n\t\t$toolbar.=\"/*]]>*/\\n</script>\";\n\t\t\n\t\t// Add Scripts\n\t\t$JS_Param = \"var drWikiEditor='\".$this->prefixId.\"[body]'; //Handler for Editor\\n\";\n\t\t$this->loadExtJS(\"res/wiki_script.js\", $JS_Param);\n\t\t\n\t\treturn $toolbar;\t\t\n\t}", "public function getConvertToolbarForHtmlAreaArray() {}", "function getToolbar() {\n //load the JToolBar library and create a toolbar\n jimport('joomla.html.toolbar');\n $bar = new JToolBar('toolbar');\n\n $bar->appendButton('Standard', 'archive', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_SAVE'), 'basket.draft', false);\n $bar->appendButton('Separator');\n if (!$this->item->free) {\n $bar->appendButton('Standard', 'edit', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_ESTIMATE'), 'basket.estimate', false);\n $bar->appendButton('Separator');\n }\n $bar->appendButton('Standard', 'publish', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_ORDER'), 'basket.order', false);\n\n //generate the html and return\n return $bar->render();\n }", "public function getToolbarItems();", "function my_toolbars( $toolbars )\n{\n/*\n echo '< pre >';\n print_r($toolbars);\n echo '< /pre >';\n die;\n */\n\n // Add a new toolbar called \"Very Simple\"\n // - this toolbar has only 1 row of buttons\n $toolbars['Very Simple' ] = array();\n $toolbars['Very Simple' ][1] = array('bold' , 'italic' , 'underline', 'link' );\n $toolbars['Chapter' ] = array();\n $toolbars['Chapter' ][1] = array('bold' , 'italic' , 'underline', 'bloc');\n $toolbars['Title' ] = array();\n $toolbars['Title' ][1] = array('bold');\n $toolbars['Code'][2] = array('code');\n\n // Edit the \"Full\" toolbar and remove 'code'\n // - delet from array code from http://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key\n if( ($key = array_search('code' , $toolbars['Full' ][2])) !== false )\n {\n unset( $toolbars['Full' ][2][$key] );\n }\n\n // remove the 'Basic' toolbar completely\n //unset( $toolbars['Basic' ] );\n\n // return $toolbars - IMPORTANT!\n return $toolbars;\n}", "public function context_handy_toolbar() {\n $rendered = \"\";\n $context = $this->page->context;\n\n $items = $this->page->navbar->get_items();\n $currentnode = end($items);\n\n // We are on the course home page.\n if (($context->contextlevel == CONTEXT_COURSE) &&\n !empty($currentnode) &&\n ($currentnode->type == navigation_node::TYPE_COURSE || $currentnode->type == navigation_node::TYPE_SECTION)) {\n $settingsnode = $this->page->settingsnav->find('courseadmin', navigation_node::TYPE_COURSE);\n\n $itemstoextractfrommenu = explode(',', get_config('theme_savoir', 'coursemenuhandytoolbar'));\n if ($itemstoextractfrommenu && $settingsnode) {\n $extracteditems = [];\n $this->extract_toolbaritems($settingsnode, '/' . $settingsnode->key, $itemstoextractfrommenu, $extracteditems);\n $context = new stdClass();\n $context->items = $extracteditems;\n $rendered = $this->render_from_template('theme_savoir/handy_toolbar', $context);\n }\n }\n\n return $rendered;\n }", "public function render()\n {\n $content = \"{\n xtype: 'toolbar',\n items: [\";\n \n $iterator = new ArrayIterator($this->getItems());\n while ($iterator->valid()) {\n $item = $iterator->current();\n \n $content .= $item->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n } \n \n $content .= \"]}\";\n \n return $content;\n }", "public function &getToolbar()\n {\n return $this->toolbar;\n }", "public function ext_makeToolBar() {}", "public function gen_Toolbar(){\r\n\t\t$toolbar ='<?xml version=\"1.0\"?><toolbar>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pullReportSort\" type=\"text\" text=\"Search By\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newuser\" type=\"button\" text=\"Add User\" img=\"/adduser.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"userapprove\" type=\"button\" text=\"Approve\" img=\"/userapprove.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"usersuspend\" type=\"button\" text=\"Suspend\" img=\"/usersuspend.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pedit\" type=\"button\" text=\"Edit Privileges\" img=\"/edit.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgateway\" type=\"button\" text=\"Add Gateway\" img=\"/assigngateway.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newsenderid\" type=\"button\" text=\"Add SenderID\" img=\"/senderid.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newpackage\" type=\"button\" text=\"Add Package\" img=\"/package.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newshortcode\" type=\"button\" text=\"Add shortcode\" img=\"/assignshortcode.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newcategory\" type=\"button\" text=\"Add Category\" img=\"/category.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newkey\" type=\"button\" text=\"Add key\" img=\"/keys.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheme\" type=\"button\" text=\"Add Scheme\" img=\"/scheme.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgroup\" type=\"button\" text=\"Add Group\" img=\"/usergroup.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newprefix\" type=\"button\" text=\"Add Prefix\" img=\"/prefix.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newoperator\" type=\"button\" text=\"Add Operator\" img=\"/operator.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcountry\" type=\"button\" text=\"Add Country\" img=\"/country.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newfeature\" type=\"button\" text=\"Add Feature\" img=\"/features.png\"/>';\r\n\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheduler\" type=\"button\" text=\"Add Schedule\" img=\"/scheduler.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newmsgtemplate\" type=\"button\" text=\"Add Template\" img=\"/template.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newaddressbook\" type=\"button\" text=\"Add Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcontact\" type=\"button\" text=\"Add Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"newtemplate\" type=\"button\" text=\"Add Message\" img=\"/save_msg.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"aedit\" type=\"buttonSelect\" text=\"Edit\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_edit\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_edit\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"adelete\" type=\"buttonSelect\" text=\"Delete\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_delete\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_delete\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"approve\" type=\"button\" text=\"Approve\" img=\"/approve.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"disapprove\" type=\"button\" text=\"Disapprove\" img=\"/disapprove.png\" />';\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"enable\" type=\"button\" text=\"Enable\" img=\"/enable.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disable\" type=\"button\" text=\"Disable\" img=\"/disable.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"stopcron\" type=\"button\" text=\"Stop Cron\" img=\"/stopcron.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"resumecron\" type=\"button\" text=\"Resume Cron\" img=\"/resumecron.png\" />';\r\n\r\n\t\t//$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"delete\" type=\"button\" text=\"Delete\" img=\"/delete.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"todayReport\" type=\"button\" text=\"Today Report\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"upload\" type=\"button\" text=\"Upload\" img=\"/upload.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"detail\" type=\"button\" text=\"Detail\" img=\"/detail.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"empty\" type=\"button\" text=\"Empty\" img=\"/empty.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"select\" type=\"button\" text=\"Select All\" img=\"/selectall.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disselect\" type=\"button\" text=\"Dis-select\" img=\"/disselect.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"excel\" type=\"button\" text=\"Excel\" img=\"/excel.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"excel_outbox\" type=\"button\" text=\"Download Outbox\" img=\"/excel.png\" />';\r\n\t\t\r\n\t\t$toolbar = $toolbar.'<item id=\"search\" type=\"button\" text=\"Search\" img=\"/search.png\" />';\r\n\t\t$toolbar = $toolbar.'</toolbar>';\r\n\r\n\t\treturn $toolbar;\r\n\t}", "public static function get_shop_toolbar_option() {\n\t\t\treturn astra_get_option( 'shop-toolbar-structure', array() );\n\t\t}", "function user_toolbars( $toolbars ){\n\t//echo \"<pre>\"; print_r($toolbars); echo \"</pre>\";\n\t/*\n\tHere's what gets output when you print_r($toolbars):\n\tArray\n\t(\n\t [Basic] => Array\n\t (\n\t [1] => Array\n\t (\n\t [0] => bold\n\t [1] => italic\n\t [2] => underline\n\t [3] => blockquote\n\t [4] => strikethrough\n\t [5] => bullist\n\t [6] => numlist\n\t [7] => alignleft\n\t [8] => aligncenter\n\t [9] => alignright\n\t [10] => undo\n\t [11] => redo\n\t [12] => link\n\t [13] => unlink\n\t [14] => fullscreen\n\t )\n\n\t )\n\n\t)\n\t*/\n\n\t// Removing the fullscreen button from the light WYSIWYG\n\tif( ($key = array_search('fullscreen' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('justifyleft' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('justifycenter' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('justifyright' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('blockquote' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('strikethrough' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('underline' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\t// if( ($key = array_search('bullist' , $toolbars['Basic' ][1])) !== false ){\n\t// unset( $toolbars['Basic' ][1][$key] );\n\t// }\n\t// if( ($key = array_search('numlist' , $toolbars['Basic' ][1])) !== false ){\n\t// unset( $toolbars['Basic' ][1][$key] );\n\t// }\n\tif( ($key = array_search('alignleft' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('aligncenter' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\tif( ($key = array_search('alignright' , $toolbars['Basic' ][1])) !== false ){\n\t unset( $toolbars['Basic' ][1][$key] );\n\t}\n\t// if( ($key = array_search('link' , $toolbars['Basic' ][1])) !== false ){\n\t// unset( $toolbars['Basic' ][1][$key] );\n\t// }\n\t// if( ($key = array_search('unlink' , $toolbars['Basic' ][1])) !== false ){\n\t// unset( $toolbars['Basic' ][1][$key] );\n\t// }\n\n\t//Add the Paste as PlainText to the light WYSIWYG\n\tif( isset($toolbars['Basic' ][1]) ){\n\t\t$toolbars['Basic'][1][] = 'pastetext';\n\t}\n\n\t// return $toolbars - IMPORTANT!\n\treturn $toolbars;\n}", "public function __get($name) {\n if (array_key_exists($name, $this->_positions)) {\n if (!isset($this->_toolbars[$name])) {\n $this->_toolbars[$name] = new PapayaUiToolbar();\n $this->_toolbars[$name]->papaya($this->papaya());\n }\n return $this->_toolbars[$name];\n }\n throw new UnexpectedValueException(\n 'UnexpectedValueException: Invalid toolbar position requested.'\n );\n }", "private function initToolbar()\n\t{\n\t\t$toolbar_btn = array();\n\t\t$toolbar_btn['save'] = array('href' => '#', 'desc' => $this->l('Save'));\n\t\treturn $toolbar_btn;\n\t}", "public function getToolbar($active) {\n $toolbar_array = array(\n 'event_list' => array(\n 'text' => 'Event list',\n 'hint' => 'List of all active events',\n 'link' => FRAMEWORK_URL.'/admin/event/list'.self::$usage_param,\n 'active' => ($active == 'event_list')\n ),\n 'event_edit' => array(\n 'text' => 'Event',\n 'hint' => 'Create a new event',\n 'link' => FRAMEWORK_URL.'/admin/event/edit'.self::$usage_param,\n 'active' => ($active == 'event_edit')\n ),\n 'registration' => array(\n 'text' => 'Registrations',\n 'hint' => 'List of all registrations for events',\n 'link' => FRAMEWORK_URL.'/admin/event/registration'.self::$usage_param,\n 'active' => ($active == 'registration')\n ),\n 'propose' => array(\n 'text' => 'Proposes',\n 'hint' => 'List of actual submitted proposes for events',\n 'link' => FRAMEWORK_URL.'/admin/event/propose'.self::$usage_param,\n 'active' => ($active == 'propose')\n ),\n 'contact_list' => array(\n 'text' => 'Contact list',\n 'hint' => 'List of all available contacts (Organizer, Locations, Participants)',\n 'link' => FRAMEWORK_URL.'/admin/event/contact/list'.self::$usage_param,\n 'active' => ($active == 'contact_list')\n ),\n 'contact_edit' => array(\n 'text' => 'Contact',\n 'hint' => 'Create a new contact',\n 'link' => FRAMEWORK_URL.'/admin/event/contact/select'.self::$usage_param,\n 'active' => ($active == 'contact_edit')\n ),\n 'group' => array(\n 'text' => 'Groups',\n 'hint' => 'List of all available event groups',\n 'link' => FRAMEWORK_URL.'/admin/event/group/list'.self::$usage_param,\n 'active' => ($active == 'group')\n ),\n\n 'about' => array(\n 'text' => 'About',\n 'hint' => 'Information about the Event extension',\n 'link' => FRAMEWORK_URL.'/admin/event/about'.self::$usage_param,\n 'active' => ($active == 'about')\n ),\n );\n return $toolbar_array;\n }", "protected function _renderTop($mode = self::RENDER_TEXT, $position = NULL)\n\t{\n\t\tob_start();\n\t\tif ($mode == self::RENDER_HTML) {\n\t\t\tif ($position === 1) {\n?>\n<?php\n\t\t\t} else {\n?>\n<?php\n\t\t\t}\n?>\n<?php\n\n\t\t} else\n\t\tif ($mode == self::RENDER_TEXT) {\n\t\t\tif ($position === 1) {\n\t\t\t}\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "function &getHTML()\n\t{\n\t\tinclude_once(\"./Services/PersonalDesktop/classes/class.ilBookmarkBlockGUI.php\");\n\t\t$bookmark_block_gui = new ilBookmarkBlockGUI(\"ilpersonaldesktopgui\", \"show\");\n\t\t\n\t\treturn $bookmark_block_gui->getHTML();\n\t}", "protected function addDisplayToolbar() {\r\n\t\t$doc = JFactory::getDocument();\r\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/icon-48-help.png\")}');\r\n\t\t$doc->addStyleDeclaration('.icon-32-config{background-image:url(\"components/com_jmap/images/icon-32-config.png\")}');\r\n\t\tJToolBarHelper::title( JText::_( 'HELP' ), 'jmap' );\r\n\t\tJToolBarHelper::custom('cpanel.display', 'config', 'config', 'CPANEL', false);\r\n\t}", "function getMenuPosition();", "public function getBottomToolbarBlock()\n {\n $blockName = self::TOOLBAR_BOTTOM;\n if ($block = $this->getLayout()->getBlock($blockName)) {\n return $block;\n }\n\n $block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());\n return $block;\n }", "function getHTML()\n\t{\n\t\tswitch ($this->cmd) {\n\t\t\tcase \"updateSiteImportTable\" :\n\t\t\t\treturn $this->_updateSiteImportTable();\n\t\t\t\tbreak;\n\t\t\tcase \"createWePageSettings\" :\n\t\t\t\treturn $this->_getCreateWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"saveWePageSettings\" :\n\t\t\t\treturn $this->_getSaveWePageSettingsHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"content\" :\n\t\t\t\treturn $this->_getContentHTML();\n\t\t\t\tbreak;\n\t\t\tcase \"buttons\" :\n\t\t\t\treturn $this->_getButtonsHTML();\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\treturn $this->_getFrameset();\n\t\t}\n\t}", "public function getUserbarTpl(){\n return $this->templates['userbar'];\n }", "public function getToolbar()\n\t{\n\t\t$user = JFactory::getUser();\n\n\t\t$firstGroup = new RToolbarButtonGroup;\n\t\t$secondGroup = new RToolbarButtonGroup;\n\t\t$thirdGroup = new RToolbarButtonGroup;\n\n\t\t$new = RToolbarBuilder::createNewButton('object.add');\n\t\t$firstGroup->addButton($new);\n\t\t$edit = RToolbarBuilder::createEditButton('object.edit');\n\t\t$secondGroup->addButton($edit);\n\t\t$delete = RToolbarBuilder::createDeleteButton('objects.delete');\n\t\t$thirdGroup->addButton($delete);\n\n\t\t$toolbar = new RToolbar;\n\t\t$toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup);\n\n\t\treturn $toolbar;\n\t}", "public function getOutput(){\n\t\t$aMenu = $this->mountBar();\n\t\t$aMenu->getOutput();\n\t}", "public function getMarkup();", "function setElementToolbar()\n\t{\n\t\t$task = JRequest::getVar('task', '', 'method', 'string');\n\t\tJToolBarHelper::title($task == 'add' ? JText::_('ELEMENT') . ': <small><small>[ '. JText::_('NEW') .' ]</small></small>' : JText::_('ELEMENT') . ': <small><small>[ '. JText::_('EDIT') .' ]</small></small>', 'fabrik-element.png');\n\t\tJToolBarHelper::save();\n\t\tJToolBarHelper::apply();\n\t\tJToolBarHelper::cancel();\n\t}", "public function toolbar($value) {\n return $this->setProperty('toolbar', $value);\n }", "public function renderToolbarControls()\n {\n $this->kernel->event->trigger('phifty.crud.toolbar_init',$this);\n foreach( $this->_toolbarItems as $controller ) {\n echo $controller->controlAction();\n }\n }", "public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }", "function getTopHTML() {\n\t\treturn $this->_topHTML;\n\t}", "public function toHtml()\n {\n\n return access()->content ? view('admin.widgets.quick')->render() : null;\n\n }", "function echoPosition($content, $conf)\t{\n\t\treturn 'Hello World!myfreind'.\n\t\t\t\t\tt3lib_div::view_array($conf);\n\t\t\t\t\t//t3lib_div::view_array($content);\n\t}", "function getUploadToolbar() {\n if ((\n $this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_UPLOAD) ||\n $this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_IMPORT)\n ) &&\n $this->isFolderSelected()) {\n $toolbar = new base_btnbuilder;\n $toolbar->images = &$this->images;\n $toolbar->addButton(\n 'Upload files',\n $this->getLink(\n array(\n 'cmd' => 'upload_files',\n 'file_id' => empty($this->params['file_id']) ? '' : $this->params['file_id']\n )\n ),\n 'places-computer',\n 'Upload files from your computer',\n isset($this->params['cmd']) && $this->params['cmd'] == 'upload_files'\n );\n if ($this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_IMPORT)) {\n $toolbar->addButton(\n 'Import folder',\n $this->getLink(array('cmd' => 'import_folder')),\n 'places-network-server',\n 'Import local folder on webserver',\n isset($this->params['cmd']) && $this->params['cmd'] == 'import_folder'\n );\n }\n if ($this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_UPLOAD)) {\n $toolbar->addButton(\n 'Get webfile',\n $this->getLink(array('cmd' => 'get_file')),\n 'items-publication',\n 'Get a file from the internet',\n isset($this->params['cmd']) && $this->params['cmd'] == 'get_file'\n );\n }\n $this->layout->addRight(sprintf('<toolbar>%s</toolbar>'.LF, $toolbar->getXML()));\n }\n }", "function generate_tooltip_frame($portion='start')\n{\n\tif($portion == 'start')\n\t{\n\t\t$tiphtml = \"<table border='0' cellspacing='0' cellpadding='0'>\n\t\t<tr><td colspan='3' style='padding-left:12px;padding-bottom:0px;'><img src='\".IMAGE_URL.\"layer_tip.png'></td></tr>\n\t\t\n\t\t<tr><td valign='bottom' style='padding-top:0px;'><img src='\".IMAGE_URL.\"layer_top_left_corner.png'></td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"top_border.png);background-repeat: repeat-x;background-position: center bottom;padding-top:0px;'><img src='\".IMAGE_URL.\"spacer.gif' height='12' width='1'></td>\n\t\t<td valign='bottom' style='padding-top:0px;'><img src='\".IMAGE_URL.\"layer_top_right_corner.png'></td></tr>\n\t\t\n\t\t<tr>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"right_border.png);background-repeat: repeat-y;background-position: right center;'></td>\n\t\t\n\t\t\n\t\t<td>\";\n\t}\n\t\n\telse if($portion == 'end')\n\t{\n\t\t$tiphtml = \"</td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"left_border.png);background-repeat: repeat-y;background-position: left center;'></td>\n\t\t</tr>\n\t\t\n\t\t<tr><td valign='top'><img src='\".IMAGE_URL.\"layer_bottom_left_corner.png'></td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"bottom_border.png);background-repeat: repeat-x;background-position: center top;'>&nbsp;</td>\n\t\t<td valign='top'><img src='\".IMAGE_URL.\"layer_bottom_right_corner.png'></td></tr>\n\t\t</table>\";\n\t}\n\t\n\treturn $tiphtml;\n}", "public function Toolbar($buttons, $width = '100%', $use_help = 0, $caption = '')\r\n\t\t{\r\n\t\t //buttons parsing\r\n\t\t foreach ($buttons as &$button)\r\n\t\t {\r\n\t\t $button['image'] = (empty($button['image'])) ? '' : IMAGES.$button['image'];\r\n\t\t }\r\n\t\t \r\n\t\t //jQuery toolbar\r\n jQuery::Toolbar('toolbar_container', $buttons);\r\n\r\n//\t\t\t//displays toolbar caption if necessary\r\n//\t\t\tif ($caption != '')\r\n//\t\t\t{\r\n//\t\t\t\techo \"<table cellspacing = '0' cellpadding = '0' class = 'toolbarCaption'><tr><td class = 'toolbarCaption'>$caption</td></tr></table>\";\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t\techo \"<table class='$this->toolbarTableCssClass' cellspacing = '0' cellpadding = '0' border='0' width='\".$width.\"'><tr><td>\";\r\n//\r\n//\t\t\techo \"<table cellspacing = '0' cellpadding = '0' border='0' ><tr><td width = 10>&nbsp&nbsp</td>\";\r\n//\t\t\t$i=0;\r\n//\t\t\tforeach ($buttons as $key=>$value)\r\n//\t\t\t{\r\n//\t\t\t\tif ($i > 0)\r\n//\t\t\t\t{\r\n//\t\t\t\t\t$this->ToolButtonSeparator();\r\n//\t\t\t\t}\r\n//\t\t\t\t$this->ToolButton($value[image], $value[text], $value[url], $value[attributes]);\r\n//\t\t\t\t$i++;\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t\t\r\n//\t\t\techo \"</tr></table>\";\r\n//\t\t\t\t\r\n//\t\t\techo \"</td></tr></table>\";\r\n//\t\t\techo \"<div class = '$this->emptyDivCssClass' style = 'height: 3px;'></div>\";\r\n\t\t}", "function write_toolbar($date, $type)\r\n\t{\r\n\t\tinclude (\"globals.php\");\r\n\t\t\t\t\r\n\t\tprint(\"\t\t<tr background=\\\"./common_files/sm_toolbar_bg_black.png\\\">\\n\");\r\n\r\n\t\t/*Zoom tool*/\r\n\t\tprint(\"\t\t\t<td align=left valign=middle height=30 >\\n\");\r\n\t\tprint(\"\t\t\t\t\t<a href='#' class=\\\"mail2\\\" onclick=\\\"zoomable=-1*zoomable;if (zoomable==1){writeText('<img src=common_files/zoom_small_grey.png width=25 border=0 title=&quot;Click to turn off zoom function. Drag UP and RIGHT to change zoom box.&quot;>');}else{writeText('<img src=common_files/zoom_small.png width=25 border=0 title=&quot;Click to turn on zoom function. Drag UP and RIGHT to change zoom box.&quot;>');}\\\"><b id=\\\"zoomtoggle\\\"><img src=common_files/zoom_small.png width=25 border=0 title='Click to turn ON zoom function. Drag UP and RIGHT to change zoom box.'></b></a>\\n\"); \r\n\t\tprint(\"\t\t\t</td>\t\\n\"); \r\n\t\t\r\n\t\tprint(\"\t\t\t<td align=center height=30>\\n\");\r\n\t\t/*dropdowns*/\r\n\t\tprint(\"\t\t\t\t<ul id=\\\"toolnav\\\">\\n\");\r\n\t\t\r\n\t\t/*Download*/\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Download\\\">Download</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub_small\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\t\r\n\t\t\t\t\t\t\t\t\t\t$instrument = substr($type,0,4);\r\n\t\t\t\t\t\t\t\t\t\t$filter = substr($type,5,5);\r\n\t\t\t\t\t\t\t\t\t\t$file = find_latest_file($date, $instrument, $filter, 'png', 'fd'); \t\t\t\r\n\r\n\t\tprint(\"\t\t \t<li><a href=\\\"${arm_data_path}data/$dirdate/pngs/$instrument/$file\\\">PNG</a></li>\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t$file = find_latest_file($date, $instrument, $filter, 'fts.gz', 'fd'); \t\t\t\r\n\t\t\r\n\t\tprint(\"\t\t\t\t\t\t\t<li><a href=\\\"${arm_data_path}data/$dirdate/fits/$instrument/$file\\\">FITS</a></li>\\n\");\r\n\t\tprint(\"\t \t\t</ul>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t</li>\\n\");\r\n\t\t\r\n\t\t\r\n\t\t/*main menu*/\r\n\t\tif (strtotime($date) > strtotime(\"20100804\")){\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Far side</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'2','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">SDO short</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'3','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">SDO long</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'4','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t</li>\\n\");\r\n\t\t\r\n\t\tprint(\"\t\t\t\t</ul>\\n\");\r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\r\n\t\t} elseif (strtotime($date) < strtotime(\"20090520\")){\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\r\n\t\t} else{\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Far side</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'2','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\r\n\t\t}\r\n\t\t\r\n\t\t/*Share this*/\r\n\t\t\tprint(\"\t \t<td align=right valign=middle height=30>\\n\");\r\n\t\tinclude (\"share_include.txt\"); \r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\t\tprint(\"\t\t\t</tr>\\n\");\r\n\t\t\r\n\t\t}", "public function getHtml();", "public static function print_editor_title_markup($robot_info, $ability_info, $print_options = array()){\n // Require the function file\n $temp_ability_title = '';\n require(MMRPG_CONFIG_ROOTDIR.'data/classes/ability_editor-title-markup.php');\n // Return the generated option markup\n return $temp_ability_title;\n }", "protected function getJSToolbarArray() {}", "public function testToolbar()\n {\n $form = $this->factory->create('ckeditor', null, array('toolbar' => array(\n array(\n 'name' => 'name',\n 'items' => array('Item1', 'Item2')\n ))));\n $view = $form->createView();\n $toolbar = $view->get('toolbar');\n \n $this->assertEquals($toolbar, array(\n array(\n 'name' => 'name',\n 'items' => array('Item1', 'Item2')\n )));\n }", "function top() {\n return '<div class=\"top\"><a href=\"#credits\">[Top]</a></div>';\n}", "public function getButtonPosition()\n {\n $position = $this->scopeConfig->getValue(\n self::CONFIG_POSITION,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n if (!$position) {\n return 'bottom-right';\n }\n return $position;\n }", "protected function addDisplayToolbar() {\n\t\t$doc = JFactory::getDocument();\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/jmap-48x48.png\")}');\n\t\tJToolBarHelper::title( JText::_('COM_JMAP_CPANEL_TOOLBAR' ), 'jmap' );\n\t\tJToolBarHelper::custom('cpanel.display', 'home', 'home', 'COM_JMAP_CPANEL', false);\n\t}", "public function render() {\n\t\t$this->addJavascriptToBackend();\n\t\t$this->addCssToBackend();\n\t\t$title = $GLOBALS['LANG']->getLL('toolbaritem', true);\n\n\t\t\t// toolbar item icon\n\t\t$menu[] = '<a href=\"#\" class=\"toolbar-item\"\">';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-role\" disabled=\"disabled\" value=\"' . tx_newspaper_Workflow::getRoleTitle(tx_newspaper_workflow::getRole()) . '\" />';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-counter\" disabled=\"disabled\" value=\"' . $this->docsAssignedToRole . '\" />';\n\t\t$menu[] = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], t3lib_extMgm::extRelPath($this->extkey) . '/mod_role/newspaper.png', 'width=\"23\" height=\"16\"').' alt=\"' . $title . '\" title=\"' . $title . '\" /></a>';\n\t\t$menu[] = '</a>';\n\n\t\t\t// toolbar item menu and initial content\n\t\t$menu[] = '<div class=\"toolbar-item-menu\" style=\"display: none;\">';\n\t\t$menu[] = $this->renderMenu();\n\t\t$menu[] = '</div>';\n\n\t\treturn implode(\"\\n\", $menu);\n\t}", "public function getTop();", "public function testToolbar()\n {\n $form = $this->factory->create('ckeditor', null, array(\n 'toolbar' => array(\n 'document',\n ),\n 'toolbar_groups' => array(\n 'document' => array(\n 'Source'\n )\n )\n ));\n $view = $form->createView();\n $toolbar = $view->get('toolbar');\n \n $this->assertEquals($toolbar, array(\n array(\n 'name' => 'document',\n 'items' => array(\n 'Source'\n )\n )\n ));\n }", "protected function addToolBar()\n {\n $title = JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLDS');\n\n if ($this->pagination->total)\n {\n $title .= \"<span style='font-size: 0.5em; vertical-align: middle;'>(\" . $this->pagination->total . \")</span>\";\n }\n }", "function bj_editbar() {\n\tob_start(); ?>\n\t\t\t\t\t\t\t<div id=\"editbar\">\r\n\t\t\t\t\t\t\t\t<div class=\"alignleft buttons\">\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button strong\" rel=\"<strong>$</strong>\"><span><?php _e('Strong'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button em\" rel=\"<em>$</em>\"><span><?php _e('Em'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button img\" rel=\"<img src='$' alt='' />\"><span><?php _e('Img'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button bq newline\" rel=\"<blockquote>$</blockquote>\"><span><?php _e('BQ'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button ol newline\" rel=\"<ol>\r\n\t<li>$</li>\r\n</ol>\"><span><?php _e('Ol'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button ul newline\" rel=\"<ul>\r\n\t<li>$</li>\r\n</ul>\"><span><?php _e('Ul'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"moresep hr\" rel=\"$\r\n\r\n\"><span><?php _e('More'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"alignright updown\">\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"more\" /><span><?php _e('More'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"less\" /><span><?php _e('Less'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"nonJSedit\"></div>\n<?php\n\t$text = run_actions('bj_editbar',ob_get_contents());\n\tob_end_clean();\n\techo $text;\n}", "public function content(){\n\t\treturn mvc_service_Front::getInstance()->getCurrentActionHtml();\n\t}", "function to_the_top()\r\n{\r\n return \"\\n \"\r\n . \"<div style=\\\"text-align: right;\\\">\\n\"\r\n . \"<a href=\\\"#top\\\">\"\r\n . \"<img src=\\\"\".base_url().\"images/go-up.png\\\" \"\r\n . \"border=\\\"0\\\" style=\\\"vertical-align: middle;\\\"> \" . T_('go_up')\r\n . \"</a>\\n\"\r\n . \"</div>\\n\\n\";\r\n}", "public function buildSubwindow()\n {\n return '<button type=\"menu\" ><![CDATA['.$this->content.']]></button>';\n }", "function get_contents(){\r\n\t\t$cmds=array('striptabs','beginnextbuffer');\r\n\t\tglobal $gcontents;\r\n\t\tunset($gcontents);\r\n\t\tif($a=func_get_args()){\r\n\t\t\tforeach($a as $v){\r\n\t\t\t\tif(in_array(strtolower($v),$cmds)){\r\n\t\t\t\t\t$v=strtolower($v);\r\n\t\t\t\t\t$$v=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$gcontents['out']=ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\tif($striptabs)$gcontents['out']=str_replace(\"\\t\",'',$gcontents['out']);\r\n\t\tif($beginnextbuffer){\r\n\t\t\tob_start();\r\n\t\t}else{\r\n\t\t\treturn $gcontents['out'];\r\n\t\t}\r\n\t}", "static public function str_get_html() {\n\t\treturn call_user_func_array ( '\\str_get_html' , func_get_args() );\n\t}", "static public function str_get_html() {\n\t\treturn call_user_func_array ( '\\str_get_html' , func_get_args() );\n\t}", "function setElementsToolbar()\n\t{\n\t\tJToolBarHelper::title(JText::_('ELEMENTS'), 'fabrik-element.png');\n\t\tJToolBarHelper::customX('addToTableView', 'publish.png', 'publish_f2.png', JText::_('ADD TO TABLE VIEW'));\n\t\tJToolBarHelper::customX('removeFromTableView', 'unpublish.png', 'unpublish_f2.png', JText::_('REMOVE FROM TABLE VIEW'));\n\t\tJToolBarHelper::publishList();\n\t\tJToolBarHelper::unpublishList();\n\t\tJToolBarHelper::customX('copySelectGroup', 'copy.png', 'copy_f2.png', 'Copy');\n\t\tJToolBarHelper::deleteList('', 'checkRemove');\n\t\tJToolBarHelper::editListX();\n\t\tJToolBarHelper::addNewX();\n\t}", "function generate_tooltip($caller_id, $layer_html, $tip_title)\n{\n\t$tiphtml = \"<div id='\".$caller_id.\"_box' style='display:none;position:absolute;'>\".generate_tooltip_frame()\n\t.\"<table style='background-color:#FFFFFF;'> \n\t\n\t\t<tr>\n\t\t<td style='font-size: 18px;'><b>\".$tip_title.\"</b></td>\n\t\t<td align='right' valign='top'><a href=\\\"javascript:hideTipDetails('\".$caller_id.\"');\\\"><img src='\".IMAGE_URL.\"delete_icon.png' border='0'></a></td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<td colspan='2'>\".$layer_html.\"</td>\n\t\t</tr>\n\t\t</table>\".generate_tooltip_frame('end').\"</div>\";\n\t\t\n\treturn $tiphtml;\n}", "public function getSettingsHtml();", "function editor_element($params)\n {\n $params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n $params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n $params['content'] \t = NULL; //remove to allow content elements\n\n return $params;\n }", "public function transparentToolbarProvider()\n {\n return [[true], [false]];\n }", "protected function addToolbar()\n\t{\n\t\t$app = Factory::getApplication();\n\t\t\n\t\t$this->option = $app->input->get('option', 'com_' . EcConst::getPrefix());\n\t\t$this->canDo = EcHelperAdmin::getActionsEc($this->option);\n\t\t\n\t\tJToolbarHelper::title(Text::_(JString::strtoupper($this->option)), 'stack article');\n\t\t\n\t\tif ($this->canDo->get('core.admin')) {\n\t\t\tJToolbarHelper::divider();\n\t\t\tJToolbarHelper::preferences($this->option);\n\t\t}\n\t}", "public abstract function getDatasetPopupHtml():string;", "abstract public function getHtml();", "function getContentAtLocAction(){\n\t\t$top = $_REQUEST['top'];\n\t\t$right = $_REQUEST['right'];\n\t\t$bottom = $_REQUEST['bottom'];\n\t\t$left = $_REQUEST['left'];\n\t\t\n\t\tif(($right - $left > 48) || ($bottom - $top > 48) ){\n\t\t\t$this->json['success'] = false;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$sql = \"SELECT id FROM content_history WHERE \n\t\t\t\t((`left` >= '$left' AND `left` <= '$right' ) OR (`right` <= '$left' AND `right` >= '$right' )) \n\t\t\t\tAND \n\t\t\t\t((`top` >= '$top' AND `top` <= '$bottom' ) OR (`bottom` <= '$top' AND `bottom` >= '$bottom' )) \n\t\t\t\tORDER BY `left` ASC\";\n\t\t\t\t\n\t\t$result = $this->db->exec($sql);\n\t\t\n\t\t$this->json['count'] = count($result);\n\t\t//$this->json['sql'] = $sql;\n\t\t\n\t\t\n\t\tif(count($result) > 0){\n\t\t\t$this->json['content'] = $result;\n\t\t}\n\t\t\n\t\t$this->json['success'] = true;\n\t}", "function editor_element($params)\n\t\t{\n\t\t\t$params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n\t\t\t$params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n\t\t\t$params['content'] \t = NULL; //remove to allow content elements\n\t\t\treturn $params;\n\t\t}", "public function getToolbar($active) {\n $toolbar_array = array(\n 'contact_list' => array(\n 'name' => 'contact_list',\n 'text' => $this->app['translator']->trans('Contact list'),\n 'hint' => $this->app['translator']->trans('List of all available contacts'),\n 'link' => FRAMEWORK_URL.'/admin/contact/list',\n 'active' => ($active == 'contact_list')\n ),\n 'contact_edit' => array(\n 'name' => 'contact_edit',\n 'text' => ($active === 'contact_edit') ? $this->app['translator']->trans('Edit contact') : $this->app['translator']->trans('Create contact'),\n 'hint' => $this->app['translator']->trans('Create or edit a contact record'),\n 'link' => FRAMEWORK_URL.'/admin/contact/select',\n 'active' => ($active == 'contact_edit')\n ),\n 'categories' => array(\n 'name' => 'categories',\n 'text' => $this->app['translator']->trans('Categories'),\n 'hint' => $this->app['translator']->trans('List of available categories'),\n 'link' => FRAMEWORK_URL.'/admin/contact/category/list',\n 'active' => ($active == 'categories')\n ),\n 'tags' => array(\n 'name' => 'tags',\n 'text' => $this->app['translator']->trans('Tags'),\n 'hint' => $this->app['translator']->trans('List of available tags'),\n 'link' => FRAMEWORK_URL.'/admin/contact/tag/list',\n 'active' => ($active == 'tags')\n ),\n 'extra_fields' => array(\n 'name' => 'extra_fields',\n 'text' => $this->app['translator']->trans('Extra fields'),\n 'hint' => $this->app['translator']->trans('List of available extra fields'),\n 'link' => FRAMEWORK_URL.'/admin/contact/extra/list',\n 'active' => ($active == 'extra_fields')\n ),\n 'about' => array(\n 'name' => 'about',\n 'text' => $this->app['translator']->trans('About'),\n 'hint' => $this->app['translator']->trans('Information about the Contact extension'),\n 'link' => FRAMEWORK_URL.'/admin/contact/about',\n 'active' => ($active == 'about')\n ),\n );\n return $toolbar_array;\n }", "protected function addToolbar()\n\t{\n\t\t$user\t= JFactory::getUser();\n\t\t$result\t= new JObject;\n\n\t\t$actions = array(\n\t\t\t'core.admin', 'core.manage'\n\t\t);\n\n\t\tforeach ($actions as $action) {\n\t\t\t$result->set($action, $user->authorise($action, 'com_toes'));\n\t\t}\n\t\t\n\t\t$canDo\t= $result;\n\t\t\n\t\tJToolBarHelper::title(JText::_('COM_TOES'), 'blue-transparant');\n\t\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_toes');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\t}", "function get_contents(){\r\n\t\t$cmds=array('striptabs','beginnextbuffer','trim');\r\n\t\tglobal $gcontents;\r\n\t\tunset($gcontents);\r\n\t\tif($a=func_get_args()){\r\n\t\t\tforeach($a as $v){\r\n\t\t\t\tif(in_array(strtolower($v),$cmds)){\r\n\t\t\t\t\t$v=strtolower($v);\r\n\t\t\t\t\t$$v=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$gcontents['out']=ob_get_contents();\r\n\t\tif($trim)$gcontents['out']=trim($gcontents['out']).\"\\n\";\r\n\t\tob_end_clean();\r\n\t\tif($striptabs)$gcontents['out']=str_replace(\"\\t\",'',$gcontents['out']);\r\n\t\tif($beginnextbuffer){\r\n\t\t\tob_start();\r\n\t\t}\r\n\t\treturn $gcontents['out'];\r\n\t}", "public function testDefaultToolbar()\n {\n $form = $this->factory->create('ckeditor');\n $view = $form->createView();\n $toolbar = $view->get('toolbar');\n\n $this->assertEquals($toolbar, array(\n array(\n 'name' => 'document',\n 'items' => array(\n 'Source',\n '-',\n 'Save',\n '-',\n 'Templates',\n )\n ),\n array(\n 'name' => 'clipboard',\n 'items' => array(\n 'Cut',\n 'Copy',\n 'Paste',\n 'PasteText',\n 'PasteFromWord',\n '-',\n 'Undo',\n 'Redo',\n )\n ),\n array(\n 'name' => 'editing',\n 'items' => array(\n 'Find',\n 'Replace',\n '-',\n 'SelectAll',\n )\n ),\n '/',\n array(\n 'name' => 'basicstyles',\n 'items' => array(\n 'Bold',\n 'Italic',\n 'Underline',\n 'Strike',\n 'Subscript',\n 'Superscript',\n '-',\n 'RemoveFormat',\n )\n ),\n array(\n 'name' => 'paragraph',\n 'items' => array(\n 'NumberedList',\n 'BulletedList',\n '-',\n 'Outdent',\n 'Indent',\n '-',\n 'JustifyLeft',\n 'JustifyCenter',\n 'JustifyRight',\n 'JustifyBlock',\n )\n ),\n array(\n 'name' => 'links',\n 'items' => array(\n 'Link',\n 'Unlink',\n 'Anchor',\n )\n ),\n '/',\n array(\n 'name' => 'insert',\n 'items' => array(\n 'Image',\n 'Flash',\n 'Table',\n 'HorizontalRule',\n )\n ),\n array(\n 'name' => 'styles',\n 'items' => array(\n 'Styles',\n 'Format',\n )\n ),\n array(\n 'name' => 'tools',\n 'items' => array(\n 'Maximize',\n 'ShowBlocks',\n )\n )\n ));\n }", "function getTagsPanel() {\n $result = '';\n if (isset($this->sessionParams['panel_state']['tags'])\n && $this->sessionParams['panel_state']['tags'] == 'open') {\n $resize = sprintf(\n ' minimize=\"%s\"',\n papaya_strings::escapeHTMLChars(\n $this->getLink(array('cmd' => 'close_panel', 'panel' => 'tags'))\n )\n );\n $tagsXML = $this->getTagTreeXML();\n } else {\n $resize = sprintf(\n ' maximize=\"%s\"',\n papaya_strings::escapeHTMLChars(\n $this->getLink(array('cmd' => 'open_panel', 'panel' => 'tags'))\n )\n );\n $tagsXML = '';\n }\n\n $result .= sprintf(\n '<listview title=\"%s\" %s>'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Tags')),\n $resize\n );\n $result .= '<items>'.LF;\n $result .= $tagsXML;\n $result .= '</items>'.LF;\n $result .= '</listview>'.LF;\n return $result;\n }", "public function getLoggedUserbarTpl(){\n return $this->templates['logged_userbar'];\n }", "function phorum_mod_bbcode_google_editor_tool_plugin()\n{\n $PHORUM = $GLOBALS['PHORUM'];\n if (empty($PHORUM[\"mod_bbcode_google\"][\"enable_editor_tool\"])) return;\n $lang = $PHORUM['DATA']['LANG']['bbcode_google'];\n\n editor_tools_register_tool(\n 'google', // Tool id\n $lang['ToolButton'], // Tool description\n './mods/bbcode_google/icon.gif', // Tool button icon\n 'bbcode_google_editor_tool()' // Javascript action on button click\n );\n\n # This was a test to see if the Editor Tools help button could\n # be extended. A real help file would have to be written for this,\n # if neccessary. For now, I'll just disable this feature.\n #editor_tools_register_help(\n # 'How to supply google links',\n # 'http://www.google.com/'\n #);\n}", "public function getPopupContent();", "public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Ensure tab title\r\n\t\t// Do shortcode\r\n\t\tforeach($data['tabs'] as $index=>$tab) {\r\n\t\t\t$ttl = trim(str_replace(\"\\n\", '', $tab['title']));\r\n\t\t\tif (empty($ttl)) {\r\n\t\t\t\t$tab['title'] = 'Tab ' . ($index + 1);\r\n\t\t\t}\r\n\t\t\t$tab['content'] = $this->_do_shortcode($tab['content']);\r\n\t\t\t$data['tabs'][$index] = $tab;\r\n\t\t}\r\n\r\n\t\tif (!$data['preset']) {\r\n\t\t\t$data['preset'] = 'default';\r\n\t\t}\r\n\r\n\t\t$data['wrapper_id'] = str_replace('utabs-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('utabs', $data, dirname(dirname(__FILE__)) . '/tpl/utabs.html');\r\n\r\n\t\t// upfront_add_element_style('upfront_tabs', array('css/utabs.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('upfront_tabs', array('js/utabs-front.js', dirname(__FILE__)));\r\n\r\n\t\treturn $markup;\r\n\t}", "public function getPanel()\n\t{\n\t\t$items = $this->items;\n\t\tob_start();\n\t\trequire_once __DIR__ . \"/Callback.phtml\";\n\t\treturn ob_get_clean();\n\t}", "public function myTooltip() {\n\t\t\n\t\t\n\t\t$this->_textoajuda = Zend_Registry::get('textoajuda');\n\t\t$this->_controller = Zend_Registry::get('pagina');\n\t\t$this->_action = Zend_Registry::get('acao');\n\t\t$tooltip = \"\"; \n\t\t$mysession = new Zend_Session_Namespace ( 'mysession' );\n\t\t$this->acl = $mysession->acl;\n\t\t$auth = Zend_Auth::getInstance();\n\t\tif ($auth->hasIdentity ()) {\n\t\t\t$this->role = $auth->getIdentity ()->username;\n\t\t} else {\n\t\t\t$this->role = 'guest';\n\t\t}\n\t\t$resource = 'ajudas';\n\t\tif (! $this->acl->has ( $resource )) \n\t\t\t$resource = null;\n\t\t\n\t\tif($this->role=='guest' && !$this->acl->hasRole('guest'))\n\t\t\t$this->acl->addRole('guest');\n\t\t\n\t\t\n\t\t\n\t\tif($this->acl->isAllowed($this->role,$resource,'editar') ||\n\t\t\t\t\t!$resource){ \n\t\t\t\t$tooltip= $this->getTooltip();\n\t\t\t\n\t\t}\n\t\treturn $tooltip;\n\t}", "public function getAfterElementHtml()\n {\n // here you can write your code.\n $customDiv = '<div style=\"width:600px;height:200px;margin:10px 0;border:2px solid #000\" id=\"customdiv\"><h1 style=\"margin-top: 12%;margin-left:40%;\">Custom Div</h1></div>';\n return $customDiv;\n }", "function to_html():string{\n return $this->name.$this->progress_bar_html();\n }", "public function getButton($position = null) {\n\n\t\t//make sure the API is active\n\t\tif(!$this->isActive()) return;\n\n\t\treturn $this->renderButton($this->getButtonCallbackURL(), $position);\n\t}", "function SetToolbarPadding($top,$bottom=0){\t\n\t\t$this->toolbarCSS.=\"padding:\".$top.\"px 0px \".$bottom.\"px 0px;\";\n\t}", "function tista_wp_admin_toolbar() {\r\n\t\t\treturn Tista_WP_Admin_Toolbar::instance();\r\n\t\t}", "public function testDefaultToolbar()\n {\n $form = $this->factory->create('ckeditor');\n $view = $form->createView();\n $toolbar = $view->get('toolbar');\n \n $this->assertEquals($toolbar, array(\n array(\n 'name' => 'document',\n 'items' => array('Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates')\n ),\n array(\n 'name' => 'clipboard',\n 'items' => array('Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo')\n ),\n array(\n 'name' => 'editing',\n 'items' => array('Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt')\n ),\n array(\n 'name' => 'forms',\n 'items' => array('Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField')\n ),\n '/',\n array(\n 'name' => 'basicstyles',\n 'items' => array('Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat')\n ),\n array(\n 'name' => 'paragraph',\n 'items' => array('NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl')\n ),\n array(\n 'name' => 'links',\n 'items' => array('Link','Unlink','Anchor')\n ),\n array(\n 'name' => 'insert',\n 'items' => array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak')\n ),\n '/',\n array(\n 'name' => 'styles',\n 'items' => array('Styles','Format','Font','FontSize')\n ),\n array(\n 'name' => 'colors',\n 'items' => array('TextColor','BGColor')\n ),\n array(\n 'name' => 'tools',\n 'items' => array('Maximize', 'ShowBlocks','-','About')\n )\n ));\n }", "function editor_element($params)\n {\n $heading = \"\";\n $template = $this->update_template(\"heading\", \" - <strong>{{heading}}</strong>\");\n if(!empty($params['args']['heading'])) $heading = \"- <strong>\".$params['args']['heading'].\"</strong>\";\n\n $params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n $params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n $params['innerHtml'].= \"<div class='avia-element-label' {$template}>\".$heading.\"</div>\";\n\n return $params;\n }", "public function injectToolbar($content)\n {\n // we don't want to show web debug panel on non-html response\n if (sfConfig::get('dm_web_debug_only_html_response', true) && !strpos($content, '</html>'))\n {\n return $content;\n }\n \n $debug = $this->asHtml();\n if (strpos($content, '__SF_WEB_DEBUG__'))\n {\n $content = str_replace('__SF_WEB_DEBUG__', $debug, $content);\n }\n else\n {\n $count = 0;\n $content = str_ireplace('</body>', $debug.'</body>', $content, $count);\n if (!$count)\n {\n $content .= $debug;\n }\n }\n\n return $content;\n }", "public function initToolbar()\n {\n }", "function displayMain(){\n $data='<div class=\"about\"><h2>About this tool</h2>\n<p>Graber Transcriptdb is an attempt to create an integrated transcript database of all the organisms and annotations found in UCSC,MGI,ENSEMBL,UNIPROT,and EBI databases. \n The database generates unique transcript_id and exon_id for all redundant transcripts and exons from various annotations for a given organism version.We store the start cordinates using the zero-base standard and the end cordinates using the one-base standard.\nBut we display all the cordinates using the one-base. \n</p>\n<h2>You can use the tool as followed</h2>\n <ul><list>You have genomic regions of interest or a gene and you would like to extract overlaping functional features</li>\n <list>You have a file containing genomic regions of interest or a list of genes or transcripts and you would like to extract overlaping functional features</li>\n </ul>\n <p> Database updates are ran monthly to synchronize both our data and external data sources.\n</p><hr/><h2>Good Practices:</h2>';\n$data.=getXmlUrl(\"Good Practices\");\n$data.='</div>';\n return $data;\n}", "static public function NavBarBottom() {\n\t\t$show_back = (strlen(self::$prev_page) > 0);\n\t\t$show_next = (strlen(self::$next_page) > 0);\n\n\t\techo '<p class=\"center\">';\n\t\tif ($show_back) {\n\t\t\techo '<a href=\"', self::$prev_page, '\">';\n\t\t\techo '<img alt=\"', (self::isGerman() ? 'Zurück' : 'Back'), '\" title=\"', (self::isGerman() ? 'Zurück' : 'Back'), '\" class=\"arrow_left {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_left.png\" width=\"30\" height=\"15\" />';\n\t\t\techo '</a>';\n\t\t}else {\n\t\t\techo '<img alt=\"dummy\" title=\"\" src=\"', self::getImageURL(), '/blank.gif\" width=\"30\" height=\"22\" />';\n\t\t}\n\t\techo '<a href=\"#top\">';\n\t\techo '<img alt=\"', (self::isGerman() ? 'nach oben' : 'top'), '\" title=\"', (self::isGerman() ? 'nach oben' : 'top'), '\" class=\"arrow_up {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_up.png\" width=\"15\" height=\"22\" />';\n\t\techo '</a>';\n\t\tif ($show_next) {\n\t\t\techo '<a href=\"', self::$next_page, '\">';\n\t\t\techo '<img alt=\"', (self::isGerman() ? 'Weiter' : 'Next'), '\" title=\"', (self::isGerman() ? 'Weiter' : 'Next'), '\" class=\"arrow_right {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_right.png\" width=\"30\" height=\"15\" />';\n\t\t\techo '</a>';\n\t\t}else {\n\t\t\techo '<img alt=\"dummy\" title=\"\" src=\"', self::getImageURL(), '/blank.gif\" width=\"30\" height=\"22\" />';\n\t\t}\n\t\techo '</p>';\n\t}", "public function injectToolbar($response)\n {\n if (function_exists('mb_stripos')) {\n $posrFunction = 'mb_strripos';\n $substrFunction = 'mb_substr';\n } else {\n $posrFunction = 'strripos';\n $substrFunction = 'substr';\n }\n\n $content = $response->getContent();\n\n if (false !== $pos = $posrFunction($content, '</body>')) {\n $toolbar = \"\\n\".str_replace(\"\\n\", '', $this->templating->render(\n 'FlintCMSAdminBundle:Panel:toolbar.html.twig',\n array('node' => $this->node)\n )).\"\\n\";\n $content = $substrFunction($content, 0, $pos).$toolbar.$substrFunction($content, $pos);\n $response->setContent($content);\n }\n }", "function construct_edit_toolbar($text = '', $ishtml = 0, $forumid = 0, $allowsmilie = 1, $parsesmilie = 1, $can_attach = false, $editor_type = 'fe', $force_editorid = '')\n{\n\t// standard stuff\n\tglobal $vbulletin, $vbphrase, $stylevar, $show;\n\t// templates generated by this function\n\tglobal $messagearea, $smiliebox, $disablesmiliesoption, $checked, $vBeditTemplate;\n\t// misc stuff built by this function\n\tglobal $istyles;\n\n\t// counter for editorid\n\tstatic $editorcount = 0;\n\n\t// determine what we can use\n\t// this was moved up here as I need the switch to determine if bbcode is enabled\n\t// to determine if a toolbar is usable\n\trequire_once(DIR . '/includes/class_bbcode.php');\n\t$show['font_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_FONT) ? true : false;\n\t$show['size_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_SIZE) ? true : false;\n\t$show['color_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_COLOR) ? true : false;\n\t$show['basic_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_BASIC) ? true : false;\n\t$show['align_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_ALIGN) ? true : false;\n\t$show['list_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_LIST) ? true : false;\n\t$show['code_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_CODE) ? true : false;\n\t$show['html_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_HTML) ? true : false;\n\t$show['php_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_PHP) ? true : false;\n\t$show['url_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_URL) ? true : false;\n\n\tif (empty($forumid))\n\t{\n\t\t$forumid = 'nonforum';\n\t}\n\tswitch($forumid)\n\t{\n\t\tcase 'privatemessage':\n\t\t\t$can_toolbar = $vbulletin->options['privallowbbcode'];\n\t\t\t$show['img_bbcode'] = $vbulletin->options['privallowbbimagecode'];\n\t\t\tbreak;\n\n\t\tcase 'usernote':\n\t\t\t$can_toolbar = $vbulletin->options['unallowvbcode'];\n\t\t\t$show['img_bbcode'] = $vbulletin->options['unallowimg'];\n\t\t\tbreak;\n\n\t\tcase 'calendar':\n\t\t\tglobal $calendarinfo;\n\t\t\t$can_toolbar = $calendarinfo['allowbbcode'];\n\t\t\t$show['img_bbcode'] = $calendarinfo['allowimgcode'];\n\t\t\tbreak;\n\n\t\tcase 'nonforum':\n\t\t\t$can_toolbar = $vbulletin->options['allowbbcode'];\n\t\t\t$show['img_bbcode'] = $vbulletin->options['allowbbimagecode'];\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\t$forum = fetch_foruminfo($forumid);\n\t\t\t$can_toolbar = $forum['allowbbcode'];\n\t\t\t$show['img_bbcode'] = $forum['allowimages'];\n\t\t\tbreak;\n\t}\n\n\t// set the editor mode\n\tif (isset($_REQUEST['wysiwyg']))\n\t{\n\t\t// 2 = wysiwyg; 1 = standard\n\t\t$vbulletin->userinfo['showvbcode'] = $_REQUEST['wysiwyg'] ? 2 : 1;\n\t}\n\t$toolbartype = $can_toolbar ? is_wysiwyg_compatible(-1, $editor_type) : 0;\n\n\t$show['wysiwyg_compatible'] = (is_wysiwyg_compatible(2, $editor_type) == 2);\n\t$show['editor_toolbar'] = ($toolbartype > 0);\n\n\tswitch ($editor_type)\n\t{\n\t\tcase 'qr':\n\t\t\tif ($force_editorid == '')\n\t\t\t{\n\t\t\t\t$editorid = 'vB_Editor_QR';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$editorid = $force_editorid;\n\t\t\t}\n\n\t\t\t$editor_height = 100;\n\n\t\t\t$editor_template_name = 'showthread_quickreply';\n\t\t\tbreak;\n\n\t\tcase 'qe':\n\t\t\tif ($force_editorid == '')\n\t\t\t{\n\t\t\t\t$editorid = 'vB_Editor_QE';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$editorid = $force_editorid;\n\t\t\t}\n\n\t\t\t$editor_height = 100;\n\n\t\t\t$editor_template_name = 'postbit_quickedit';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tif ($force_editorid == '')\n\t\t\t{\n\t\t\t\t$editorid = 'vB_Editor_' . str_pad(++$editorcount, 3, 0, STR_PAD_LEFT);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$editorid = $force_editorid;\n\t\t\t}\n\n\t\t\t// set the height of the editor based on the editor_height cookie if it exists\n\t\t\t$editor_height = $vbulletin->input->clean_gpc('c', 'editor_height', TYPE_UINT);\n\t\t\t$editor_height = ($editor_height > 100) ? $editor_height : 250;\n\n\t\t\t$editor_template_name = ($toolbartype ? 'editor_toolbar_on' : 'editor_toolbar_off');\n\t\t\tbreak;\n\t}\n\n\t// init the variables used by the templates built by this function\n\t$vBeditJs = array(\n\t\t'font_options_array' => '',\n\t\t'size_options_array' => '',\n\t\t'istyle_array' => '',\n\t\t'normalmode' => 'false'\n\t);\n\t$vBeditTemplate = array(\n\t\t'extrabuttons' => '',\n\t\t'clientscript' => '',\n\t\t'fontfeedback' => '',\n\t\t'sizefeedback' => '',\n\t\t'smiliepopup' => ''\n\t);\n\n\t($hook = vBulletinHook::fetch_hook('editor_toolbar_start')) ? eval($hook) : false;\n\n\t// show a post editing toolbar of some sort\n\tif ($show['editor_toolbar'])\n\t{\n\t\tif ($can_attach)\n\t\t{\n\t\t\t$show['attach'] = true;\n\t\t}\n\n\t\t$vBeditJs = construct_editor_js_arrays();\n\n\t\t// get extra buttons... experimental at the moment\n\t\t$vBeditTemplate['extrabuttons'] = construct_editor_extra_buttons($editorid);\n\n\t\tif ($toolbartype == 2)\n\t\t{\n\t\t\t// got to parse the message to be displayed from bbcode into HTML\n\t\t\tif ($text)\n\t\t\t{\n\t\t\t\trequire_once(DIR . '/includes/functions_wysiwyg.php');\n\t\t\t\t$newpost['message'] = parse_wysiwyg_html($text, $ishtml, $forumid, iif($allowsmilie AND $parsesmilie, 1, 0));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$newpost['message'] = '';\n\t\t\t}\n\n\t\t\t$newpost['message'] = htmlspecialchars_uni($newpost['message']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$newpost['message'] = $text;\n\t\t\t// set mode based on cookie set by javascript\n\t\t\t/*$vbulletin->input->clean_gpc('c', COOKIE_PREFIX . 'vbcodemode', TYPE_INT);\n\t\t\t$modechecked[$vbulletin->GPC[COOKIE_PREFIX . 'vbcodemode']] = 'checked=\"checked\"';*/\n\t\t}\n\n\t}\n\telse\n\t{\n\t\t// do not show a post editing toolbar\n\t\t$newpost['message'] = $text;\n\t}\n\n\t// disable smilies option and clickable smilie\n\t$show['smiliebox'] = false;\n\t$smiliebox = '';\n\t$disablesmiliesoption = '';\n\n\tif ($editor_type == 'qr')\n\t{\n\t\t// no smilies\n\t}\n\telse if ($allowsmilie AND $show['editor_toolbar'])\n\t{\n\t\t// deal with disable smilies option\n\t\tif (!isset($checked['disablesmilies']))\n\t\t{\n\t\t\t$vbulletin->input->clean_gpc('r', 'disablesmilies', TYPE_BOOL);\n\t\t\t$checked['disablesmilies'] = iif($vbulletin->GPC['disablesmilies'], 'checked=\"checked\"');\n\t\t}\n\t\teval('$disablesmiliesoption = \"' . fetch_template('newpost_disablesmiliesoption') . '\";');\n\n\t\tif ($toolbartype AND ($vbulletin->options['smtotal'] > 0 OR $vbulletin->options['wysiwyg_smtotal'] > 0))\n\t\t{\n\t\t\t// query smilies\n\t\t\t$smilies = $vbulletin->db->query_read(\"\n\t\t\t\tSELECT smilieid, smilietext, smiliepath, smilie.title,\n\t\t\t\t\timagecategory.title AS category\n\t\t\t\tFROM \" . TABLE_PREFIX . \"smilie AS smilie\n\t\t\t\tLEFT JOIN \" . TABLE_PREFIX . \"imagecategory AS imagecategory USING(imagecategoryid)\n\t\t\t\tORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder\n\t\t\t\");\n\n\t\t\t// get total number of smilies\n\t\t\t$totalsmilies = $vbulletin->db->num_rows($smilies);\n\n\t\t\tif ($totalsmilies > 0)\n\t\t\t{\n\t\t\t\tif ($vbulletin->options['wysiwyg_smtotal'] > 0)\n\t\t\t\t{\n\t\t\t\t\t$show['wysiwygsmilies'] = true;\n\n\t\t\t\t\t// smilie dropdown menu\n\t\t\t\t\t$vBeditJs['smilie_options_array'] = array();\n\t\t\t\t\t$i = 0;\n\t\t\t\t\twhile ($smilie = $vbulletin->db->fetch_array($smilies))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($i++ < $vbulletin->options['wysiwyg_smtotal'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$vBeditJs['smilie_options_array'][\"$smilie[category]\"][] = \"\\t\\t'$smilie[smilieid]' : new Array('\" . addslashes_js($smilie['smiliepath']) . \"', '\" . addslashes_js($smilie['smilietext']) . \"', '\" . addslashes_js($smilie['title']) . \"')\";\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$vBeditJs['smilie_options_array'][\"$smilie[category]\"][] = \"\\t\\t'more' : '\" . addslashes_js($vbphrase['show_all_smilies']) . \"'\\n\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tforeach (array_keys($vBeditJs['smilie_options_array']) AS $category)\n\t\t\t\t\t{\n\t\t\t\t\t\t$vBeditJs['smilie_options_array'][\"$category\"] = \"\\t'\" . addslashes_js($category) . \"' : {\\n\" . implode(\",\\n\", $vBeditJs['smilie_options_array'][\"$category\"]) . \"}\";\n\t\t\t\t\t}\n\t\t\t\t\t$vBeditJs['smilie_options_array'] = \"\\n\" . implode(\",\\n\", $vBeditJs['smilie_options_array']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$show['wysiwygsmilies'] = false;\n\t\t\t\t}\n\n\t\t\t\t// clickable smilie box\n\t\t\t\tif ($vbulletin->options['smtotal'])\n\t\t\t\t{\n\t\t\t\t\t$vbulletin->db->data_seek($smilies, 0);\n\t\t\t\t\t$i = 0;\n\t\t\t\t\t$bits = array();\n\t\t\t\t\twhile ($smilie = $vbulletin->db->fetch_array($smilies) AND $i++ < $vbulletin->options['smtotal'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$smiliehtml = \"<img src=\\\"$smilie[smiliepath]\\\" id=\\\"{$editorid}_smilie_$smilie[smilieid]\\\" alt=\\\"\" . htmlspecialchars_uni($smilie['smilietext']) . \"\\\" title=\\\"$smilie[title]\\\" border=\\\"0\\\" />\";\n\t\t\t\t\t\teval('$bits[] = \"' . fetch_template('editor_smilie') . '\";');\n\n\t\t\t\t\t\tif (sizeof($bits) == $vbulletin->options['smcolumns'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$smiliecells = implode('', $bits);\n\t\t\t\t\t\t\teval('$smiliebits .= \"' . fetch_template('editor_smiliebox_row') . '\";');\n\t\t\t\t\t\t\t$bits = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// fill in empty cells if required\n\t\t\t\t\t$remaining = sizeof($bits);\n\t\t\t\t\tif ($remaining > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$remainingcolumns = $vbulletin->options['smcolumns'] - $remaining;\n\t\t\t\t\t\teval('$bits[] = \"' . fetch_template('editor_smiliebox_straggler') . '\";');\n\t\t\t\t\t\t$smiliecells = implode('', $bits);\n\t\t\t\t\t\teval('$smiliebits .= \"' . fetch_template('editor_smiliebox_row') . '\";');\n\t\t\t\t\t}\n\t\t\t\t\t$show['moresmilieslink'] = iif ($totalsmilies > $vbulletin->options['smtotal'], true, false);\n\t\t\t\t\t$show['smiliebox'] = true;\n\t\t\t\t}\n\n\t\t\t\t$vbulletin->db->free_result($smilies);\n\t\t\t}\n\t\t}\n\t\teval('$smiliebox = \"' . fetch_template('editor_smiliebox') . '\";');\n\t}\n\n\t($hook = vBulletinHook::fetch_hook('editor_toolbar_end')) ? eval($hook) : false;\n\n\teval('$vBeditTemplate[\\'clientscript\\'] = \"' . fetch_template('editor_clientscript') . '\";');\n\n\t$editortype = ($toolbartype == 2 ? 1 : 0);\n\t$show['is_wysiwyg_editor'] = intval($editortype);\n\teval('$messagearea = \"' . fetch_template($editor_template_name) . '\";');\n\n\treturn $editorid;\n}", "function getPageJSON(){\r\n\t$html=getPage();\r\n\t$eid=0; // Assign logical number to each found class in linear order\r\n\tforeach($html->find('.clienteditor') as $e){ // TODO: change this to variable defined topic for edit regions\r\n\t\tif(isset($e->attr['title']))\r\n\t\t\t$title=$e->attr['title'];\r\n\t\telse\r\n\t\t\t$title='';\r\n\t\t// Type Checking (to see what sort of editor box we need)\r\n\t\tif(array_search(strtoupper($e->tag),array('H1','H2','H3','H4','H5','H6'))!==false){\r\n\t\t\t$type=TXT_HEADING_TAG;\r\n\t\t}elseif(array_search(strtoupper($e->tag),array('pre'))!==false){\r\n\t\t\t$type=TXT_FIXED_WIDTH;\r\n\t\t}else{\r\n\t\t\t$type=TXT_STANDARD;\r\n\t\t}\r\n\t $pageHTML[]=array('id'=> $eid, 'HTML'=>base64_encode($e->innertext),'title'=>$title,'tag'=>$e->tag,'type'=>$type);\r\n\t\t$eid++;\r\n\t}\t\r\n\techo json_encode($pageHTML);\r\n}", "function setCopyElementToolbar()\n\t{\n\t JToolBarHelper::title(JText::_('SELECT_GROUPS_TO_COPY_ELEMENTS_TO') , 'fabrik-element.png');\n\t JToolBarHelper::save('copy');\n\t\tJToolBarHelper::cancel();\n\t}" ]
[ "0.65845305", "0.65845305", "0.64955163", "0.6422428", "0.63536364", "0.61383647", "0.6106709", "0.59202605", "0.5895818", "0.58381754", "0.5827444", "0.57555646", "0.56374264", "0.56142807", "0.5558611", "0.55018055", "0.54461765", "0.5433783", "0.53984797", "0.53584814", "0.53478694", "0.5298093", "0.52761495", "0.5251568", "0.524582", "0.5228499", "0.51746887", "0.5158921", "0.5157821", "0.5133472", "0.5125704", "0.5100905", "0.50952524", "0.50844085", "0.50783247", "0.50734836", "0.50545114", "0.50364774", "0.50132704", "0.49929872", "0.4975945", "0.49618065", "0.49597424", "0.49462026", "0.49377424", "0.49347025", "0.492609", "0.49233687", "0.49214882", "0.49138236", "0.49034995", "0.49007967", "0.48984247", "0.48840207", "0.48685715", "0.48628405", "0.48555058", "0.48485887", "0.48473278", "0.48360506", "0.48352608", "0.4830817", "0.48249397", "0.48249397", "0.4812027", "0.48072192", "0.48016113", "0.47899243", "0.47783947", "0.4771749", "0.4768347", "0.47658378", "0.47656852", "0.47641966", "0.47611368", "0.47511432", "0.47504744", "0.47475347", "0.4743948", "0.4743215", "0.4736666", "0.47310516", "0.47276616", "0.47208706", "0.4718935", "0.47108403", "0.47074714", "0.4688244", "0.46872637", "0.46858943", "0.4684275", "0.4680606", "0.46786073", "0.4676741", "0.46677577", "0.46641296", "0.46627071", "0.4661714", "0.46589798", "0.46589676" ]
0.7448759
0
get returns toolbar item html based on name and type
function getTbItem($name, $type, $attributes, $data) { switch($type) { case SPAW_TBI_IMAGE: $tbi = new SPAW_TB_Image($name, $this->lang, $this->editor, $this->theme, $attributes); $buf = $tbi->get(); break; case SPAW_TBI_BUTTON: $tbi = new SPAW_TB_Button($name, $this->lang, $this->editor, $this->theme, $attributes); $buf = $tbi->get(); break; case SPAW_TBI_DROPDOWN: if (!empty($this->dropdown_data[$name])) { $d_data = $this->dropdown_data[$name]; } else { $d_data = $data; } $tbi = new SPAW_TB_Dropdown($name, $this->lang, $this->editor, $this->theme, $attributes, $d_data); $buf = $tbi->get(); break; default: $tbi = new SPAW_TB_Item($name, $this->lang, $this->editor, $this->theme, $attributes); $buf = $tbi->get(); break; } return $buf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getToolbarItems();", "public function render() {\n\t\t$this->addJavascriptToBackend();\n\t\t$this->addCssToBackend();\n\t\t$title = $GLOBALS['LANG']->getLL('toolbaritem', true);\n\n\t\t\t// toolbar item icon\n\t\t$menu[] = '<a href=\"#\" class=\"toolbar-item\"\">';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-role\" disabled=\"disabled\" value=\"' . tx_newspaper_Workflow::getRoleTitle(tx_newspaper_workflow::getRole()) . '\" />';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-counter\" disabled=\"disabled\" value=\"' . $this->docsAssignedToRole . '\" />';\n\t\t$menu[] = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], t3lib_extMgm::extRelPath($this->extkey) . '/mod_role/newspaper.png', 'width=\"23\" height=\"16\"').' alt=\"' . $title . '\" title=\"' . $title . '\" /></a>';\n\t\t$menu[] = '</a>';\n\n\t\t\t// toolbar item menu and initial content\n\t\t$menu[] = '<div class=\"toolbar-item-menu\" style=\"display: none;\">';\n\t\t$menu[] = $this->renderMenu();\n\t\t$menu[] = '</div>';\n\n\t\treturn implode(\"\\n\", $menu);\n\t}", "public function render()\n {\n $content = \"{\n xtype: 'toolbar',\n items: [\";\n \n $iterator = new ArrayIterator($this->getItems());\n while ($iterator->valid()) {\n $item = $iterator->current();\n \n $content .= $item->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n } \n \n $content .= \"]}\";\n \n return $content;\n }", "function get_toolbars()\n {\n }", "function getToolbar() {\n //load the JToolBar library and create a toolbar\n jimport('joomla.html.toolbar');\n $bar = new JToolBar('toolbar');\n\n $bar->appendButton('Standard', 'archive', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_SAVE'), 'basket.draft', false);\n $bar->appendButton('Separator');\n if (!$this->item->free) {\n $bar->appendButton('Standard', 'edit', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_ESTIMATE'), 'basket.estimate', false);\n $bar->appendButton('Separator');\n }\n $bar->appendButton('Standard', 'publish', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_ORDER'), 'basket.order', false);\n\n //generate the html and return\n return $bar->render();\n }", "public function getToolbarHtml()\n {\n return $this->getChildHtml('toolbar');\n }", "public function getToolbarHtml()\n {\n return $this->getChildHtml('toolbar');\n }", "public function getEditToolbar() {\n\t \n\t\t$toolarray=array(\n\t\t\tarray(\n\t\t\t\t'image'=>'button_bold.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_bold_sample\", \"Bold text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_bold_tip\", \"Bold text\"),\n\t\t\t\t'key'\t=>\t'B'\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'image'=>'button_italic.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\",\n\t\t\t\t'sample'=> $this->pi_getLL(\"tb_italic_sample\", \"Italic text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_italic_tip\", \"Italic text\"),\n\t\t\t\t'key'\t=>\t'I'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'=>'button_link.png',\n\t\t\t\t'open'\t=>\t'[[',\n\t\t\t\t'close'\t=>\t']]',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_link_sample\", \"Link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_link_tip\", \"Internal link\"),\n\t\t\t\t'key'\t=>\t'L'\n\t\t\t),\n\t\t\t/*\n\t\t\tarray(\n\t\t\t\t'image'=>'button_extlink.png',\n\t\t\t\t'open'\t=>\t'[',\n\t\t\t\t'close'\t=>\t']',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_extlink_sample\", \"http://www.example.com link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_extlink_tip\", \"External link (remember http:// prefix)\"),\n\t\t\t\t'key'\t=>\t'X'\n\t\t\t),*/\n\t\t\tarray(\n\t\t\t\t'image'=>'button_headline.png',\n\t\t\t\t'open'\t=>\t\"\\\\n== \",\n\t\t\t\t'close'\t=>\t\" ==\\\\n\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_headline_sample\", \"Headline text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_headline_tip\", \"Level 2 headline\"),\n\t\t\t\t'key'\t=>\t'H'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_hr.png',\n\t\t\t\t'open'\t=>\t\"\\\\n----\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_hr_tip\", \"Horizontal line (use sparingly)\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sig.png',\n\t\t\t\t'open'\t=>\t\"\\\\n--~~~~\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sig_tip\", \"Signature\"),\n\t\t\t\t'key'\t=>\t'S'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_nowiki.png',\n\t\t\t\t'open'\t=>\t\"<nowiki>\",\n\t\t\t\t'close'\t=>\t'</nowiki>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_nowiki_sample\", \"This is not parsed\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_nowiki_tip\", \"Nowiki\"),\n\t\t\t\t'key'\t=>\t'N'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sub.png',\n\t\t\t\t'open'\t=>\t\"<sub>\",\n\t\t\t\t'close'\t=>\t'</sub>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sub_tip\", \"Sub\"),\n\t\t\t\t'key'\t=>\t'D'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sup.png',\n\t\t\t\t'open'\t=>\t\"<sup>\",\n\t\t\t\t'close'\t=>\t'</sup>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sup_tip\", \"Sup\"),\n\t\t\t\t'key'\t=>\t'U'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_strike.png',\n\t\t\t\t'open'\t=>\t\"<s>\",\n\t\t\t\t'close'\t=>\t'</s>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_strike_sample\", \"This text is strike through\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_strike_tip\", \"Strike Through\"),\n\t\t\t\t'key'\t=>\t''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_ref.png',\n\t\t\t\t'open'\t=>\t\"<ref>\",\n\t\t\t\t'close'\t=>\t'</ref>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_ref_sample\", \"This is a reference\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_ref_tip\", \"Add reference\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t);\n\t\t$toolbar =\"<script type='text/javascript'>\\n/*<![CDATA[*/\\n\";\n\t\n\t\t$toolbar.=\"document.writeln(\\\"<div id='toolbar'>\\\");\\n\";\n\t\t\n\t\tforeach($toolarray as $tool) {\n\t\t\t$image = substr(t3lib_div::getFileAbsFileName($this->conf['toolbarIconPath']), strlen(PATH_site)) . $tool['image'];\n\t\t\t$open = $tool['open'];\n\t\t\t$close = $tool['close'];\n\t\t\t$sample = $tool['sample'];\n\t\t\t$tip = $tool['tip'];\n\t\t\t$key = $tool[\"key\"]; // accesskey for the buttons\n\t\t\n\t\t\t$toolbar.=\"addButton('$image','$tip','$open','$close','$sample','$key');\\n\";\n\t\t}\n\t\n\t\t$toolbar.=\"addInfobox('\".$this->pi_getLL(\"tb_infobox\").\"','\".$this->pi_getLL(\"tb_infobox_alert\").\"');\\n\";\n\t\t$toolbar.=\"document.writeln(\\\"</div>\\\");\\n\";\n\t\n\t\t$toolbar.=\"/*]]>*/\\n</script>\";\n\t\t\n\t\t// Add Scripts\n\t\t$JS_Param = \"var drWikiEditor='\".$this->prefixId.\"[body]'; //Handler for Editor\\n\";\n\t\t$this->loadExtJS(\"res/wiki_script.js\", $JS_Param);\n\t\t\n\t\treturn $toolbar;\t\t\n\t}", "function viewItemType() {\n//\t\tglobal $HTML;\n\t\tglobal $page;\n\n\t\t$_ = '';\n\t\t$_ .= '<div class=\"c init:form form:action:'.$page->url.'\" id=\"container:itemtype\">';\n\t\t\t$_ .= $this->getTypeObject()->viewItem();\n\t\t$_ .= '</div>';\n\n\t\treturn $_;\n\t}", "protected function renderToolbar() {}", "public function getToolbarHtml()\n {\n $cedToolbar = $this->getChildHtml('toolbar');\n return $cedToolbar;\n }", "public function context_handy_toolbar() {\n $rendered = \"\";\n $context = $this->page->context;\n\n $items = $this->page->navbar->get_items();\n $currentnode = end($items);\n\n // We are on the course home page.\n if (($context->contextlevel == CONTEXT_COURSE) &&\n !empty($currentnode) &&\n ($currentnode->type == navigation_node::TYPE_COURSE || $currentnode->type == navigation_node::TYPE_SECTION)) {\n $settingsnode = $this->page->settingsnav->find('courseadmin', navigation_node::TYPE_COURSE);\n\n $itemstoextractfrommenu = explode(',', get_config('theme_savoir', 'coursemenuhandytoolbar'));\n if ($itemstoextractfrommenu && $settingsnode) {\n $extracteditems = [];\n $this->extract_toolbaritems($settingsnode, '/' . $settingsnode->key, $itemstoextractfrommenu, $extracteditems);\n $context = new stdClass();\n $context->items = $extracteditems;\n $rendered = $this->render_from_template('theme_savoir/handy_toolbar', $context);\n }\n }\n\n return $rendered;\n }", "static function GetItemType() { return \"\"; }", "public function getUserbarTpl(){\n return $this->templates['userbar'];\n }", "public function gen_Toolbar(){\r\n\t\t$toolbar ='<?xml version=\"1.0\"?><toolbar>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pullReportSort\" type=\"text\" text=\"Search By\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newuser\" type=\"button\" text=\"Add User\" img=\"/adduser.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"userapprove\" type=\"button\" text=\"Approve\" img=\"/userapprove.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"usersuspend\" type=\"button\" text=\"Suspend\" img=\"/usersuspend.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pedit\" type=\"button\" text=\"Edit Privileges\" img=\"/edit.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgateway\" type=\"button\" text=\"Add Gateway\" img=\"/assigngateway.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newsenderid\" type=\"button\" text=\"Add SenderID\" img=\"/senderid.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newpackage\" type=\"button\" text=\"Add Package\" img=\"/package.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newshortcode\" type=\"button\" text=\"Add shortcode\" img=\"/assignshortcode.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newcategory\" type=\"button\" text=\"Add Category\" img=\"/category.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newkey\" type=\"button\" text=\"Add key\" img=\"/keys.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheme\" type=\"button\" text=\"Add Scheme\" img=\"/scheme.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgroup\" type=\"button\" text=\"Add Group\" img=\"/usergroup.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newprefix\" type=\"button\" text=\"Add Prefix\" img=\"/prefix.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newoperator\" type=\"button\" text=\"Add Operator\" img=\"/operator.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcountry\" type=\"button\" text=\"Add Country\" img=\"/country.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newfeature\" type=\"button\" text=\"Add Feature\" img=\"/features.png\"/>';\r\n\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheduler\" type=\"button\" text=\"Add Schedule\" img=\"/scheduler.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newmsgtemplate\" type=\"button\" text=\"Add Template\" img=\"/template.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newaddressbook\" type=\"button\" text=\"Add Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcontact\" type=\"button\" text=\"Add Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"newtemplate\" type=\"button\" text=\"Add Message\" img=\"/save_msg.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"aedit\" type=\"buttonSelect\" text=\"Edit\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_edit\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_edit\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"adelete\" type=\"buttonSelect\" text=\"Delete\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_delete\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_delete\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"approve\" type=\"button\" text=\"Approve\" img=\"/approve.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"disapprove\" type=\"button\" text=\"Disapprove\" img=\"/disapprove.png\" />';\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"enable\" type=\"button\" text=\"Enable\" img=\"/enable.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disable\" type=\"button\" text=\"Disable\" img=\"/disable.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"stopcron\" type=\"button\" text=\"Stop Cron\" img=\"/stopcron.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"resumecron\" type=\"button\" text=\"Resume Cron\" img=\"/resumecron.png\" />';\r\n\r\n\t\t//$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"delete\" type=\"button\" text=\"Delete\" img=\"/delete.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"todayReport\" type=\"button\" text=\"Today Report\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"upload\" type=\"button\" text=\"Upload\" img=\"/upload.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"detail\" type=\"button\" text=\"Detail\" img=\"/detail.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"empty\" type=\"button\" text=\"Empty\" img=\"/empty.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"select\" type=\"button\" text=\"Select All\" img=\"/selectall.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disselect\" type=\"button\" text=\"Dis-select\" img=\"/disselect.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"excel\" type=\"button\" text=\"Excel\" img=\"/excel.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"excel_outbox\" type=\"button\" text=\"Download Outbox\" img=\"/excel.png\" />';\r\n\t\t\r\n\t\t$toolbar = $toolbar.'<item id=\"search\" type=\"button\" text=\"Search\" img=\"/search.png\" />';\r\n\t\t$toolbar = $toolbar.'</toolbar>';\r\n\r\n\t\treturn $toolbar;\r\n\t}", "public function getToolbar($active) {\n $toolbar_array = array(\n 'event_list' => array(\n 'text' => 'Event list',\n 'hint' => 'List of all active events',\n 'link' => FRAMEWORK_URL.'/admin/event/list'.self::$usage_param,\n 'active' => ($active == 'event_list')\n ),\n 'event_edit' => array(\n 'text' => 'Event',\n 'hint' => 'Create a new event',\n 'link' => FRAMEWORK_URL.'/admin/event/edit'.self::$usage_param,\n 'active' => ($active == 'event_edit')\n ),\n 'registration' => array(\n 'text' => 'Registrations',\n 'hint' => 'List of all registrations for events',\n 'link' => FRAMEWORK_URL.'/admin/event/registration'.self::$usage_param,\n 'active' => ($active == 'registration')\n ),\n 'propose' => array(\n 'text' => 'Proposes',\n 'hint' => 'List of actual submitted proposes for events',\n 'link' => FRAMEWORK_URL.'/admin/event/propose'.self::$usage_param,\n 'active' => ($active == 'propose')\n ),\n 'contact_list' => array(\n 'text' => 'Contact list',\n 'hint' => 'List of all available contacts (Organizer, Locations, Participants)',\n 'link' => FRAMEWORK_URL.'/admin/event/contact/list'.self::$usage_param,\n 'active' => ($active == 'contact_list')\n ),\n 'contact_edit' => array(\n 'text' => 'Contact',\n 'hint' => 'Create a new contact',\n 'link' => FRAMEWORK_URL.'/admin/event/contact/select'.self::$usage_param,\n 'active' => ($active == 'contact_edit')\n ),\n 'group' => array(\n 'text' => 'Groups',\n 'hint' => 'List of all available event groups',\n 'link' => FRAMEWORK_URL.'/admin/event/group/list'.self::$usage_param,\n 'active' => ($active == 'group')\n ),\n\n 'about' => array(\n 'text' => 'About',\n 'hint' => 'Information about the Event extension',\n 'link' => FRAMEWORK_URL.'/admin/event/about'.self::$usage_param,\n 'active' => ($active == 'about')\n ),\n );\n return $toolbar_array;\n }", "public static function get_shop_toolbar_option() {\n\t\t\treturn astra_get_option( 'shop-toolbar-structure', array() );\n\t\t}", "public function ext_makeToolBar() {}", "function get($pos, $mode='design')\r\n\t{\r\n\t\t$buf = '';\r\n\t\tif (!empty($this->toolbars[$pos.'_'.$mode]))\r\n\t\t{\r\n\t\t\tif ($pos == 'top' || $pos == 'bottom')\r\n\t\t\t{\r\n\t\t\t\t// horizontal toolbar\r\n\t\t\t\t$tb_pos_start = '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">';\r\n\t\t\t\t$tb_pos_end = '</table>';\r\n\t\t\t\t$tb_item_sep = '';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// vertical toolbar\r\n\t\t\t\t$tb_pos_start = '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>';\r\n\t\t\t\t$tb_pos_end = '</tr></table>';\r\n\t\t\t\t$tb_item_sep = '<br>';\r\n\t\t\t}\r\n\t\t\t$buf = $tb_pos_start;\r\n\t\t\twhile (list(,$tb) = each($this->toolbars[$pos.'_'.$mode]))\r\n\t\t\t{\r\n\t\t\t\tif ($pos == 'top' || $pos == 'bottom')\r\n\t\t\t\t{\r\n\t\t\t\t\t// horizontal toolbar\r\n\t\t\t\t\t$tb_start = '<tr><td align=\"'.$tb['settings']['align'].'\" valign=\"'.$tb['settings']['valign'].'\" class=\"SPAW_'.$this->theme.'_toolbar_'.$pos.'\" nowrap=\"yes\">';\r\n\t\t\t\t\t$tb_end = '</td></tr>';\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// vertical toolbar\r\n\t\t\t\t\t$tb_start = '<td align=\"'.$tb['settings']['align'].'\" valign=\"'.$tb['settings']['valign'].'\" class=\"SPAW_'.$this->theme.'_toolbar_'.$pos.'\">';\r\n\t\t\t\t\t$tb_end = '</td>';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$buf .= $tb_start;\r\n\t\t\t\twhile (list(,$tbitem) = each($tb['data']))\r\n\t\t\t\t{\r\n\t\t\t\t\t$buf .= $this->getTbItem($tbitem['name'],$tbitem['type'],isset($tbitem['attributes'])?$tbitem['attributes']:'', isset($tbitem['data'])?$tbitem['data']:'') . $tb_item_sep;\r\n\t\t\t\t}\r\n\t\t\t\t$buf .= $tb_end;\r\n\t\t\t}\r\n\t\t\t$buf .= $tb_pos_end;\r\n\t\t}\r\n\t\treturn $buf;\r\n\t}", "public function getUI() {\n $ui = $this->ui;\n $ui['items'] = $ui['items'] ?? $ui['item'].'s';\n\n $ui['name'] = $ui['name'] ?? ucwords($ui['item']);\n $ui['names'] = $ui['names'] ?? Str::plural($ui['name']);\n\n if (isset($ui['parent'])) {\n $ui['parent-item'] = $ui['parent-item'] ?? $ui['parent'];\n $ui['parent-items'] = $ui['parent-items'] ?? Str::plural($ui['parent-item']);\n\n $ui['parent-name'] = $ui['parent-name'] ?? ucwords($ui['parent']);\n $ui['parent-names'] = $ui['parent-names'] ?? Str::plural($ui['parent-name']);\n }\n\n\n $ui['title'] = $ui['title'] ?? $ui['names'];\n $ui['url_index'] = $ui['url_index'] ?? config('settings.url').\"/admin/{$ui['items']}/\";\n return $ui;\n }", "function my_toolbars( $toolbars )\n{\n/*\n echo '< pre >';\n print_r($toolbars);\n echo '< /pre >';\n die;\n */\n\n // Add a new toolbar called \"Very Simple\"\n // - this toolbar has only 1 row of buttons\n $toolbars['Very Simple' ] = array();\n $toolbars['Very Simple' ][1] = array('bold' , 'italic' , 'underline', 'link' );\n $toolbars['Chapter' ] = array();\n $toolbars['Chapter' ][1] = array('bold' , 'italic' , 'underline', 'bloc');\n $toolbars['Title' ] = array();\n $toolbars['Title' ][1] = array('bold');\n $toolbars['Code'][2] = array('code');\n\n // Edit the \"Full\" toolbar and remove 'code'\n // - delet from array code from http://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key\n if( ($key = array_search('code' , $toolbars['Full' ][2])) !== false )\n {\n unset( $toolbars['Full' ][2][$key] );\n }\n\n // remove the 'Basic' toolbar completely\n //unset( $toolbars['Basic' ] );\n\n // return $toolbars - IMPORTANT!\n return $toolbars;\n}", "function editItemType() {\n\t\tglobal $page;\n\t\tglobal $HTML;\n\t\t$HTML->details(1);\n\n\t\t$_ = '';\n\t\t$_ .= '<div class=\"c init:form form:action:'.$page->url.'\" id=\"container:itemtype\">';\n\t\t\t$_ .= $this->getTypeObject()->editItem();\n\t\t$_ .= '</div>';\n\n\t\treturn $_;\n\t}", "public function getToolbar()\n\t{\n\t\t$user = JFactory::getUser();\n\n\t\t$firstGroup = new RToolbarButtonGroup;\n\t\t$secondGroup = new RToolbarButtonGroup;\n\t\t$thirdGroup = new RToolbarButtonGroup;\n\n\t\t$new = RToolbarBuilder::createNewButton('object.add');\n\t\t$firstGroup->addButton($new);\n\t\t$edit = RToolbarBuilder::createEditButton('object.edit');\n\t\t$secondGroup->addButton($edit);\n\t\t$delete = RToolbarBuilder::createDeleteButton('objects.delete');\n\t\t$thirdGroup->addButton($delete);\n\n\t\t$toolbar = new RToolbar;\n\t\t$toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup);\n\n\t\treturn $toolbar;\n\t}", "abstract public function getMenuView(): string;", "function getHtml()\r\n\t{\r\n\t\tglobal $spaw_dir;\r\n\t\tglobal $spaw_wysiwyg_instCount;\r\n\t\tglobal $spaw_active_toolbar;\r\n\r\n\r\n\t\t$n = $this->control_name;\r\n\t\t$orn = $this->original_name;\r\n\t\t// todo: make more customizable\r\n\r\n\t\t$buf = '';\r\n\t\tif (SPAW_Util::checkBrowser())\r\n\t\t{\r\n\t\t\tif ($spaw_wysiwyg_instCount == 1)\r\n\t\t\t{\r\n\t\t\t\t$buf.= $this->getCssScript();\r\n\t\t\t}\r\n\t\t\t// theme based css file and javascript\r\n\t\t\t$buf.= '<script language=\"JavaScript\" src=\"'.$spaw_dir.'lib/themes/'.$this->theme.'/js/toolbar.js.php\"></script>';\r\n\t\t\t$buf.= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$spaw_dir.'lib/themes/'.$this->theme.'/css/toolbar.css\">';\r\n\r\n\t\t\t$buf.= '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"'.$this->getWidth().'\" height=\"'.$this->getHeight().'\">';\r\n\t\t\t$buf.= '<tr>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_top_design\" class=\"SPAW_'.$this->theme.'_toolbar\" colspan=\"3\">';\r\n\t\t\t$buf.= $this->toolbars->get('top');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_top_html\" class=\"SPAW_'.$this->theme.'_toolbar\" colspan=\"3\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('top','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '</tr>';\r\n\r\n\t\t\t$buf.= '<tr>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_left_design\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" >';\r\n\t\t\t$buf.= $this->toolbars->get('left');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_left_html\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('left','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td align=\"left\" valign=\"top\" width=\"100%\" height=\"100%\">';\r\n\r\n\t\t\t//$buf.= '<input type=\"hidden\" id=\"'.$n.'\" name=\"'.$n.'\">';\r\n\t\t\t$buf.= '<textarea id=\"'.$n.'\" name=\"'.$orn.'\" style=\"width:'.$this->getWidth().'; height:'.$this->getHeight().'; display:none;\" class=\"SPAW_'.$this->theme.'_editarea\"></textarea>';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_editor_mode\" name=\"SPAW_'.$n.'_editor_mode\" value=\"design\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_lang\" value=\"'.$this->lang->lang.'\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_theme\" value=\"'.$this->theme.'\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_borders\" value=\"on\">';\r\n\r\n\t\t\t$buf.= '<iframe id=\"'.$n.'_rEdit\" style=\"width:100%; height:'.$this->getHeight().'; direction:'.$this->lang->getDir().';\" class=\"SPAW_'.$this->theme.'_editarea\" frameborder=\"no\" src=\"'.$spaw_dir.'empty.html\"></iframe><br>';\r\n\r\n\t\t\t$buf.= \"\\n<script language=\\\"javascript\\\">\\n<!--\\n\";\r\n\r\n\t\t\t$tmpstr = str_replace(\"\\r\\n\",\"\\n\",$this->getValue());\r\n\t\t\t$tmpstr = str_replace(\"\\r\",\"\\n\",$tmpstr);\r\n\t\t\t$content = explode(\"\\n\",$tmpstr);\r\n\t\t\t$plus = \"\";\r\n\t\t\tforeach ($content as $line)\r\n\t\t\t{\r\n\t\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value \".$plus.\"=\\\"\".str_replace('-->','@@END_COMMENT',str_replace('<!--','@@START_COMMENT',str_replace('\"','&quot;',str_replace(\"'\",\"\\'\",str_replace(\"\\\\\",\"\\\\\\\\\\\\\\\\\",$line))))).\"\\\\\\\\n\\\";',0);\\n\";\r\n\t\t\t\t$plus = \"+\";\r\n\t\t\t}\r\n\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/&quot;/g,\\'\\\"\\');',0);\".\"\\n\";\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/@@START_COMMENT/g,\\'<!--\\');',0);\".\"\\n\";\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/@@END_COMMENT/g,\\'-->\\');',0);\".\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"alert(document.all.'.$n.'.value);\",0);'.\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"'.$n.'_rEdit.document.body.innerHTML += document.all.'.$n.'.value;\",0);'.\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"SPAW_toggle_borders(\\''.$n.'\\',this[\\''.$n.'_rEdit\\'].document.body,null);\",0);'.\"\\n\";\r\n\r\n\t\t\t// editor init\r\n\t\t\t$buf.='setTimeout(\"SPAW_editorInit(\\''.$n.'\\',\\''.htmlspecialchars($this->getCssStyleSheet()).'\\',\\''.$this->lang->getDir().'\\');\",0);'.\"\\n\";\r\n\r\n\t\t\t$buf.= '//--></script>';\r\n\r\n\t\t\t$buf.= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_right_design\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\">';\r\n\t\t\t$buf.= $this->toolbars->get('right');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_right_html\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('right','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '</tr>';\r\n\t\t\t$buf.= '<tr><td class=\"SPAW_'.$this->theme.'_toolbar\"></td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_bottom_design\" class=\"SPAW_'.$this->theme.'_toolbar\" width=\"100%\">';\r\n\t\t\t$buf.= $this->toolbars->get('bottom');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_bottom_html\" class=\"SPAW_'.$this->theme.'_toolbar\" width=\"100%\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('bottom','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td class=\"SPAW_'.$this->theme.'_toolbar\"></td></tr>';\r\n\t\t\t$buf.= '</table>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// show simple text area\r\n\t\t\t$buf = '<textarea cols=\"20\" rows=\"5\" name=\"'.$n.'\" style=\"width:'.$this->getWidth().'; height:'.$this->getHeight().'\">'.htmlspecialchars($this->getValue()).'</textarea>';\r\n\t\t}\r\n\t\treturn $buf;\r\n\t}", "public function getItemName();", "public function getButtonToolbarRenderer()\n {\n if (! isset($this->buttonToolbarRenderer))\n {\n $type = Request::get(self::PARAM_TYPE);\n $url = $this->get_url(array(self::PARAM_TYPE => $type));\n \n $buttonToolbar = new ButtonToolBar($url);\n $commonActions = new ButtonGroup();\n $toolActions = new ButtonGroup();\n \n if ($this->is_allowed(WeblcmsRights::EDIT_RIGHT))\n {\n if ($this->get_submission_trackers_by_publication($this->get_publication_id()))\n {\n $commonActions->addButton(\n new Button(\n Translation::get('DownloadAllSubmissions'), \n Theme::getInstance()->getCommonImagePath('Action/Download'), \n $this->get_url(\n array(\n \\Chamilo\\Application\\Weblcms\\Tool\\Manager::PARAM_ACTION => self::ACTION_DOWNLOAD_SUBMISSIONS)), \n ToolbarItem::DISPLAY_ICON_AND_LABEL));\n }\n \n $toolActions->addButton(\n new Button(\n Translation::get('ScoresOverview'), \n Theme::getInstance()->getCommonImagePath('Action/Statistics'), \n $this->get_url(\n array(\n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_TOOL => \\Chamilo\\Application\\Weblcms\\Manager::ACTION_REPORTING, \n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_TEMPLATE_ID => \\Chamilo\\Application\\Weblcms\\Integration\\Chamilo\\Core\\Reporting\\Template\\CourseAssignmentSubmittersTemplate::class_name(), \n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_TOOL_ACTION => \\Chamilo\\Application\\Weblcms\\Tool\\Implementation\\Reporting\\Manager::ACTION_VIEW)), \n ToolbarItem::DISPLAY_ICON_AND_LABEL));\n \n $toolActions->addButton(\n new Button(\n Translation::get('SubmissionsOverview'), \n Theme::getInstance()->getCommonImagePath('Action/Statistics'), \n $this->get_url(\n array(\n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_TOOL => \\Chamilo\\Application\\Weblcms\\Manager::ACTION_REPORTING, \n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_TEMPLATE_ID => \\Chamilo\\Application\\Weblcms\\Integration\\Chamilo\\Core\\Reporting\\Template\\AssignmentSubmissionsTemplate::class_name(), \n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_TOOL_ACTION => \\Chamilo\\Application\\Weblcms\\Tool\\Implementation\\Reporting\\Manager::ACTION_VIEW)), \n ToolbarItem::DISPLAY_ICON_AND_LABEL));\n \n $course = $this->get_course();\n $ephorus_tool = DataManager::retrieve_course_tool_by_name(\n 'Ephorus');\n if ($ephorus_tool && $course->get_course_setting(\n \\Chamilo\\Application\\Weblcms\\Storage\\DataClass\\CourseSetting::COURSE_SETTING_TOOL_ACTIVE, \n $ephorus_tool->get_id()))\n {\n $toolActions->addButton(\n new Button(\n Translation::get('EphorusOverview'), \n Theme::getInstance()->getImagePath(\n \\Chamilo\\Application\\Weblcms\\Tool\\Manager::get_tool_type_namespace('Ephorus'), \n 'Logo/16'), \n $this->get_url(\n array(\n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_TOOL => 'Ephorus', \n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_PUBLICATION => $this->get_publication_id(), \n \\Chamilo\\Application\\Weblcms\\Manager::PARAM_TOOL_ACTION => \\Chamilo\\Application\\Weblcms\\Tool\\Implementation\\Ephorus\\Manager::ACTION_ASSIGNMENT_BROWSER)), \n ToolbarItem::DISPLAY_ICON_AND_LABEL));\n }\n }\n \n $commonActions->addButton(\n new Button(\n Translation::get('SubmissionSubmit'), \n Theme::getInstance()->getCommonImagePath('Action/Add'), \n $this->get_url($this->generate_add_submission_url()), \n ToolbarItem::DISPLAY_ICON_AND_LABEL));\n \n $commonActions->addButton(\n new Button(\n Translation::get('ShowAll', null, Utilities::COMMON_LIBRARIES), \n Theme::getInstance()->getCommonImagePath('Action/Browser'), \n $url, \n ToolbarItem::DISPLAY_ICON_AND_LABEL, \n false));\n \n $buttonToolbar->addButtonGroup($commonActions);\n $buttonToolbar->addButtonGroup($toolActions);\n \n $this->buttonToolbarRenderer = new ButtonToolBarRenderer($buttonToolbar);\n }\n \n return $this->buttonToolbarRenderer;\n }", "public function getConvertToolbarForHtmlAreaArray() {}", "private function initToolbar()\n\t{\n\t\t$toolbar_btn = array();\n\t\t$toolbar_btn['save'] = array('href' => '#', 'desc' => $this->l('Save'));\n\t\treturn $toolbar_btn;\n\t}", "abstract public function getWidget() : string;", "private function getHTMLItems()\n {\n $this->load->model('HtmlItems_Model', \"HtmlItems\");\n $this->HtmlItems->setControllerMethodName($this->_controllerName . '/' . $this->_currentMethod);\n return $this->HtmlItems->render();\n }", "public function &getToolbar()\n {\n return $this->toolbar;\n }", "function setElementToolbar()\n\t{\n\t\t$task = JRequest::getVar('task', '', 'method', 'string');\n\t\tJToolBarHelper::title($task == 'add' ? JText::_('ELEMENT') . ': <small><small>[ '. JText::_('NEW') .' ]</small></small>' : JText::_('ELEMENT') . ': <small><small>[ '. JText::_('EDIT') .' ]</small></small>', 'fabrik-element.png');\n\t\tJToolBarHelper::save();\n\t\tJToolBarHelper::apply();\n\t\tJToolBarHelper::cancel();\n\t}", "public function getName()\n {\n return \"menu\";\n }", "public function getMenuTitle(): string;", "public function getToolbar($active) {\n $toolbar_array = array(\n 'contact_list' => array(\n 'name' => 'contact_list',\n 'text' => $this->app['translator']->trans('Contact list'),\n 'hint' => $this->app['translator']->trans('List of all available contacts'),\n 'link' => FRAMEWORK_URL.'/admin/contact/list',\n 'active' => ($active == 'contact_list')\n ),\n 'contact_edit' => array(\n 'name' => 'contact_edit',\n 'text' => ($active === 'contact_edit') ? $this->app['translator']->trans('Edit contact') : $this->app['translator']->trans('Create contact'),\n 'hint' => $this->app['translator']->trans('Create or edit a contact record'),\n 'link' => FRAMEWORK_URL.'/admin/contact/select',\n 'active' => ($active == 'contact_edit')\n ),\n 'categories' => array(\n 'name' => 'categories',\n 'text' => $this->app['translator']->trans('Categories'),\n 'hint' => $this->app['translator']->trans('List of available categories'),\n 'link' => FRAMEWORK_URL.'/admin/contact/category/list',\n 'active' => ($active == 'categories')\n ),\n 'tags' => array(\n 'name' => 'tags',\n 'text' => $this->app['translator']->trans('Tags'),\n 'hint' => $this->app['translator']->trans('List of available tags'),\n 'link' => FRAMEWORK_URL.'/admin/contact/tag/list',\n 'active' => ($active == 'tags')\n ),\n 'extra_fields' => array(\n 'name' => 'extra_fields',\n 'text' => $this->app['translator']->trans('Extra fields'),\n 'hint' => $this->app['translator']->trans('List of available extra fields'),\n 'link' => FRAMEWORK_URL.'/admin/contact/extra/list',\n 'active' => ($active == 'extra_fields')\n ),\n 'about' => array(\n 'name' => 'about',\n 'text' => $this->app['translator']->trans('About'),\n 'hint' => $this->app['translator']->trans('Information about the Contact extension'),\n 'link' => FRAMEWORK_URL.'/admin/contact/about',\n 'active' => ($active == 'about')\n ),\n );\n return $toolbar_array;\n }", "function extras_menu_hook($hook, $type, $return, $params) {\n\tforeach ($return as $key => $item) {\n\t\tif ($item->getName() == 'bookmark') {\n\t\t\t$return[$key]->setText('<span class=\"elgg-icon au-sets-bookmark-icon\"></span>');\n\t\t}\n\t}\n\n\treturn $return;\n}", "private function get_content_object_type_html()\n {\n $content_object = $this->get_content_object();\n $type = $content_object->get_type();\n $namespace = ClassnameUtilities::getInstance()->getNamespaceFromClassname($type);\n $name = Translation::get('TypeName', array(), $namespace);\n $img = '<img src=\"' . $content_object->get_icon_path(Theme::ICON_MINI) . '\" title=\"' . htmlentities($name) .\n '\"/>';\n\n return $img . ' <b>' . $name . '</b>';\n }", "protected function addToolbar()\n\t{\n\t\t// Hide main menu.\n\t\tJFactory::getApplication()->input->set('hidemainmenu', 1);\n\n\t\t$helper = AssociationsHelper::getExtensionHelper($this->extensionName);\n\t\t$title = $helper->getTypeTitle($this->typeName);\n\n\t\t$languageKey = strtoupper($this->extensionName . '_' . $title . 'S');\n\n\t\tif ($this->typeName === 'category')\n\t\t{\n\t\t\t$languageKey = strtoupper($this->extensionName) . '_CATEGORIES';\n\t\t}\n\n\t\tJToolbarHelper::title(JText::sprintf('COM_ASSOCIATIONS_TITLE_EDIT', JText::_($this->extensionName), JText::_($languageKey)), 'contract assoc');\n\n\t\t$bar = JToolbar::getInstance('toolbar');\n\n\t\t$bar->appendButton(\n\t\t\t'Custom', '<button onclick=\"Joomla.submitbutton(\\'reference\\')\" '\n\t\t\t. 'class=\"btn btn-small btn-success\"><span class=\"icon-apply icon-white\" aria-hidden=\"true\"></span>'\n\t\t\t. JText::_('COM_ASSOCIATIONS_SAVE_REFERENCE') . '</button>', 'reference'\n\t\t);\n\n\t\t$bar->appendButton(\n\t\t\t'Custom', '<button onclick=\"Joomla.submitbutton(\\'target\\')\" '\n\t\t\t. 'class=\"btn btn-small btn-success\"><span class=\"icon-apply icon-white\" aria-hidden=\"true\"></span>'\n\t\t\t. JText::_('COM_ASSOCIATIONS_SAVE_TARGET') . '</button>', 'target'\n\t\t);\n\n\t\tif ($this->typeName === 'category' || $this->extensionName === 'com_menus' || $this->save2copy === true)\n\t\t{\n\t\t\tJToolBarHelper::custom('copy', 'copy.png', '', 'COM_ASSOCIATIONS_COPY_REFERENCE', false);\n\t\t}\n\n\t\tJToolbarHelper::cancel('association.cancel', 'JTOOLBAR_CLOSE');\n\t\tJToolbarHelper::help('JHELP_COMPONENTS_ASSOCIATIONS_EDIT');\n\n\t\tJHtmlSidebar::setAction('index.php?option=com_associations');\n\t}", "public function toolbar($value) {\n return $this->setProperty('toolbar', $value);\n }", "abstract protected function renderItems(): string;", "public function getMarkup();", "function show_what($item) {\n if ( $item->active ==1 ) {\n return sprintf('<span style=\"color: red;\">%s</span>','Remove');\n } else {\n return sprintf('<span style=\"color: green;\">%s</span>','Apply');\n }\n }", "function getMenuTitle();", "public function get_name()\n {\n return 'akash-menu';\n }", "function getUploadToolbar() {\n if ((\n $this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_UPLOAD) ||\n $this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_IMPORT)\n ) &&\n $this->isFolderSelected()) {\n $toolbar = new base_btnbuilder;\n $toolbar->images = &$this->images;\n $toolbar->addButton(\n 'Upload files',\n $this->getLink(\n array(\n 'cmd' => 'upload_files',\n 'file_id' => empty($this->params['file_id']) ? '' : $this->params['file_id']\n )\n ),\n 'places-computer',\n 'Upload files from your computer',\n isset($this->params['cmd']) && $this->params['cmd'] == 'upload_files'\n );\n if ($this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_IMPORT)) {\n $toolbar->addButton(\n 'Import folder',\n $this->getLink(array('cmd' => 'import_folder')),\n 'places-network-server',\n 'Import local folder on webserver',\n isset($this->params['cmd']) && $this->params['cmd'] == 'import_folder'\n );\n }\n if ($this->authUser->hasPerm(PapayaAdministrationPermissions::FILE_UPLOAD)) {\n $toolbar->addButton(\n 'Get webfile',\n $this->getLink(array('cmd' => 'get_file')),\n 'items-publication',\n 'Get a file from the internet',\n isset($this->params['cmd']) && $this->params['cmd'] == 'get_file'\n );\n }\n $this->layout->addRight(sprintf('<toolbar>%s</toolbar>'.LF, $toolbar->getXML()));\n }\n }", "public function getName()\n {\n return 'menu_element_type';\n }", "function getButtonText($strType = 'Add', $btnType = 'employee' ){\n echo $strType . ' ' . $btnType;\n}", "function _populate_node_toolbar()\n {\n if ($this->_topic->can_do('midgard:create'))\n {\n foreach (array_keys($this->_request_data['schemadb']) as $name)\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => \"create_event/{$name}/\",\n MIDCOM_TOOLBAR_LABEL => sprintf\n (\n $this->_l10n_midcom->get('create %s'),\n $this->_request_data['schemadb'][$name]->description\n ),\n MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/new-text.png',\n )\n );\n }\n }\n \n if ( $this->_topic->can_do('midgard:update')\n && $this->_topic->can_do('midcom:component_config'))\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => 'config/',\n MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'),\n MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'),\n MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_folder-properties.png',\n )\n );\n }\n if ( $this->_topic->can_do('midgard:create')\n && $this->_topic->can_do('midcom:component_config'))\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => 'locations/',\n MIDCOM_TOOLBAR_LABEL => 'Paikkatiedot',\n MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'),\n MIDCOM_TOOLBAR_ICON => 'fi.kilonkipinat.website/fam/map_magnify.png',\n )\n );\n }\n\n }", "public function renderToolbarControls()\n {\n $this->kernel->event->trigger('phifty.crud.toolbar_init',$this);\n foreach( $this->_toolbarItems as $controller ) {\n echo $controller->controlAction();\n }\n }", "function write_toolbar($date, $type)\r\n\t{\r\n\t\tinclude (\"globals.php\");\r\n\t\t\t\t\r\n\t\tprint(\"\t\t<tr background=\\\"./common_files/sm_toolbar_bg_black.png\\\">\\n\");\r\n\r\n\t\t/*Zoom tool*/\r\n\t\tprint(\"\t\t\t<td align=left valign=middle height=30 >\\n\");\r\n\t\tprint(\"\t\t\t\t\t<a href='#' class=\\\"mail2\\\" onclick=\\\"zoomable=-1*zoomable;if (zoomable==1){writeText('<img src=common_files/zoom_small_grey.png width=25 border=0 title=&quot;Click to turn off zoom function. Drag UP and RIGHT to change zoom box.&quot;>');}else{writeText('<img src=common_files/zoom_small.png width=25 border=0 title=&quot;Click to turn on zoom function. Drag UP and RIGHT to change zoom box.&quot;>');}\\\"><b id=\\\"zoomtoggle\\\"><img src=common_files/zoom_small.png width=25 border=0 title='Click to turn ON zoom function. Drag UP and RIGHT to change zoom box.'></b></a>\\n\"); \r\n\t\tprint(\"\t\t\t</td>\t\\n\"); \r\n\t\t\r\n\t\tprint(\"\t\t\t<td align=center height=30>\\n\");\r\n\t\t/*dropdowns*/\r\n\t\tprint(\"\t\t\t\t<ul id=\\\"toolnav\\\">\\n\");\r\n\t\t\r\n\t\t/*Download*/\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Download\\\">Download</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub_small\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\t\r\n\t\t\t\t\t\t\t\t\t\t$instrument = substr($type,0,4);\r\n\t\t\t\t\t\t\t\t\t\t$filter = substr($type,5,5);\r\n\t\t\t\t\t\t\t\t\t\t$file = find_latest_file($date, $instrument, $filter, 'png', 'fd'); \t\t\t\r\n\r\n\t\tprint(\"\t\t \t<li><a href=\\\"${arm_data_path}data/$dirdate/pngs/$instrument/$file\\\">PNG</a></li>\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t$file = find_latest_file($date, $instrument, $filter, 'fts.gz', 'fd'); \t\t\t\r\n\t\t\r\n\t\tprint(\"\t\t\t\t\t\t\t<li><a href=\\\"${arm_data_path}data/$dirdate/fits/$instrument/$file\\\">FITS</a></li>\\n\");\r\n\t\tprint(\"\t \t\t</ul>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t</li>\\n\");\r\n\t\t\r\n\t\t\r\n\t\t/*main menu*/\r\n\t\tif (strtotime($date) > strtotime(\"20100804\")){\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Far side</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'2','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">SDO short</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'3','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">SDO long</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'4','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t</li>\\n\");\r\n\t\t\r\n\t\tprint(\"\t\t\t\t</ul>\\n\");\r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\r\n\t\t} elseif (strtotime($date) < strtotime(\"20090520\")){\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\r\n\t\t} else{\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Far side</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'2','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\r\n\t\t}\r\n\t\t\r\n\t\t/*Share this*/\r\n\t\t\tprint(\"\t \t<td align=right valign=middle height=30>\\n\");\r\n\t\tinclude (\"share_include.txt\"); \r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\t\tprint(\"\t\t\t</tr>\\n\");\r\n\t\t\r\n\t\t}", "protected function addToolbar()\n\t{\n\t\t$canDo\t= JHelperContent::getActions('com_menus');\n\t\t$user = JFactory::getUser();\n\n\t\t// Get the toolbar object instance\n\t\t$bar = JToolBar::getInstance('toolbar');\n\n\t\tJToolbarHelper::title(JText::_('COM_MENUS_VIEW_ITEMS_TITLE'), 'list menumgr');\n\n\t\tif ($canDo->get('core.create'))\n\t\t{\n\t\t\tJToolbarHelper::addNew('item.add');\n\t\t}\n\n\t\tif ($canDo->get('core.edit'))\n\t\t{\n\t\t\tJToolbarHelper::editList('item.edit');\n\t\t}\n\n\t\tif ($canDo->get('core.edit.state'))\n\t\t{\n\t\t\tJToolbarHelper::publish('items.publish', 'JTOOLBAR_PUBLISH', true);\n\t\t\tJToolbarHelper::unpublish('items.unpublish', 'JTOOLBAR_UNPUBLISH', true);\n\t\t}\n\n\t\tif (JFactory::getUser()->authorise('core.admin'))\n\t\t{\n\t\t\tJToolbarHelper::checkin('items.checkin', 'JTOOLBAR_CHECKIN', true);\n\t\t}\n\n\t\tif ($this->state->get('filter.published') == -2 && $canDo->get('core.delete'))\n\t\t{\n\t\t\tJToolbarHelper::deleteList('', 'items.delete', 'JTOOLBAR_EMPTY_TRASH');\n\t\t}\n\t\telseif ($canDo->get('core.edit.state'))\n\t\t{\n\t\t\tJToolbarHelper::trash('items.trash');\n\t\t}\n\n\t\tif ($canDo->get('core.edit.state'))\n\t\t{\n\t\t\tJToolbarHelper::makeDefault('items.setDefault', 'COM_MENUS_TOOLBAR_SET_HOME');\n\t\t}\n\n\t\tif (JFactory::getUser()->authorise('core.admin'))\n\t\t{\n\t\t\tJToolbarHelper::custom('items.rebuild', 'refresh.png', 'refresh_f2.png', 'JToolbar_Rebuild', false);\n\t\t}\n\n\t\t// Add a batch button\n\t\tif ($user->authorise('core.create', 'com_menus') && $user->authorise('core.edit', 'com_menus') && $user->authorise('core.edit.state', 'com_menus'))\n\t\t{\n\t\t\tJHtml::_('bootstrap.modal', 'collapseModal');\n\t\t\t$title = JText::_('JTOOLBAR_BATCH');\n\n\t\t\t// Instantiate a new JLayoutFile instance and render the batch button\n\t\t\t$layout = new JLayoutFile('joomla.toolbar.batch');\n\n\t\t\t$dhtml = $layout->render(array('title' => $title));\n\t\t\t$bar->appendButton('Custom', $dhtml, 'batch');\n\t\t}\n\n\t\tJToolbarHelper::help('JHELP_MENUS_MENU_ITEM_MANAGER');\n\t}", "public function getContextMenuType() {}", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "public function getActionName();", "public function getActionName();", "function get_menu($param = NULL)\n\t{\n\t\tif (isset($param[\"icon\"]) and substr($param[\"icon\"], 0, 4) === \"http\")\n\t\t{\n\t\t\t$icon = $param[\"icon\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$icon_name = empty($param[\"icon\"]) ? \"cog\" : $param[\"icon\"];\n\t\t\t$icon = icons::get_std_icon_url($icon_name);\n\t\t}\n\n\n\t\t$is = \"\";\n\t\tforeach($this->menus as $parent => $menudata)\n\t\t{\n\t\t\t$is .= '<div id=\"'.$parent.'\" class=\"menu\" onmouseover=\"menuMouseover(event)\">'.\"\\n${menudata}</div>\\n\";\n\t\t};\n\t\t$this->vars(array(\n\t\t\t\"ss\" => $is,\n\t\t\t\"menu_id\" => $this->menu_id,\n\t\t\t\"menu_icon\" => $icon,\n\t\t\t\"alt\" => isset($param[\"alt\"]) ? $param[\"alt\"] : null\n\t\t));\n\n\t\tif (!empty($param[\"text\"]))\n\t\t{\n\t\t\t$this->vars(array(\n\t\t\t\t\"text\" => $param[\"text\"]\n\t\t\t));\n\t\t\t$this->vars(array(\n\t\t\t\t\"HAS_TEXT\" => $href_ct = $this->parse(\"HAS_TEXT\")\n\t\t\t));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->vars(array(\n\t\t\t\t\"HAS_ICON\" => $href_ct = $this->parse(\"HAS_ICON\")\n\t\t\t));\n\t\t}\n\n\t\tif (!empty($param[\"is_toolbar\"]))\n\t\t{\n\t\t\t$this->vars(array(\n\t\t\t\t\"IS_TOOLBAR\" => $this->parse(\"IS_TOOLBAR\")\n\t\t\t));\n\t\t}\n\t\t\n\t\tif (aw_template::bootstrap())\n\t\t{\n\t\t\t$this->vars(array(\n\t\t\t\t\"DROPDOWN\" => $this->__parse_dropdown($this->menu_id),\n\t\t\t));\n\t\t}\n\n\t\tif (is_array($param) && !empty($param[\"load_on_demand_url\"]))\n\t\t{\n\t\t\tstatic $lod_num;\n\t\t\t$lod_num++;\n\t\t\treturn \"<div id='lod_\".$this->menu_id.\"'><a href='javascript:void(0);' onClick='tb_lod\".$lod_num.\"()' class='nupp'>$href_ct</a></div>\n\t\t\t<script language=javascript>\n\t\t\tfunction tb_lod\".$lod_num.\"()\n\t\t\t{\n\t\t\t\tel = document.getElementById(\\\"lod_\".$this->menu_id.\"\\\");\n\t\t\t\tel.innerHTML=aw_get_url_contents(\\\"\".$param[\"load_on_demand_url\"].\"\\\");\n\t\t\t\tnhr=document.getElementById(\\\"href_\".$this->menu_id.\"\\\");\n\t\t\t\tif (document.createEvent) {evObj = document.createEvent(\\\"MouseEvents\\\");evObj.initEvent( \\\"click\\\", true, true );nhr.dispatchEvent(evObj);}\n\t\t\t\telse {\n\t\t\t\t\tnhr.fireEvent(\\\"onclick\\\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t</script>\n\t\t\t\";\n\t\t}\n\n\t\treturn $this->parse();\n\t}", "function getMenuItems()\n {\n }", "public function getItemTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('item_');\n\t}", "public function getMenu();", "public function getTypeText()\n\t{\n\t\treturn Menus::getMenuTypeName($this->owner->type);\n\t}", "function getMenu($type = 'list') {\n global $sess_id, $membership_id;\n\n $db = $this->getDb();\n $array = array();\n\n if (isset($sess_id)) {\n $items = generate_main_menu_list('members', $membership_id); \n } else {\n $items = generate_main_menu_list('main'); \n }\n\n if ($type == 'items') {\n return $items; \n }\n\n\n foreach ($items as $item) {\n $array[] = _render_link($item);\n }\n\n if ($type == 'list') {\n $menu = '';\n foreach ($array as $item) {\n $menu .= \"<li>$item</li>\\n\";\n } \n $menu =\"<ul>\\n$menu</li>\\n\";\n } else {\n $menu = $array;\n }\n\n return $menu;\n }", "public function __get($name) {\n if (array_key_exists($name, $this->_positions)) {\n if (!isset($this->_toolbars[$name])) {\n $this->_toolbars[$name] = new PapayaUiToolbar();\n $this->_toolbars[$name]->papaya($this->papaya());\n }\n return $this->_toolbars[$name];\n }\n throw new UnexpectedValueException(\n 'UnexpectedValueException: Invalid toolbar position requested.'\n );\n }", "public function drawPanelToolbar() {\n\t\t$html = '';\n\t\t$html .= '<div id=\"toolbar\">'.\"\\n\";\n\t\t$html .= '\t<div id=\"toolbar_container\">'.\"\\n\";\n\t\t$html .= '\t<div class=\"logo\"><a href=\"/treeline/\"><img src=\"/treeline/img/logo.gif\" alt=\"Treeline\" /></a></div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"options\">'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button\" name=\"treeline\" id=\"treeline\" value=\"Save changes\" />'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button cancel\" name=\"treeline\" id=\"treeline\" value=\"Discard changes\" />'.\"\\n\";\t\t\t\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"clear\"></div>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "public function getWidget();", "public function getSource()\n {\n return 'wx_menu';\n }", "function link_to_items_with_item_type($text = null, $props = array(),\n $action = 'browse', $itemTypeObj = null\n) {\n if (!$itemTypeObj) {\n $itemTypeObj = get_current_record('item_type');\n }\n $queryParams = array();\n $queryParams['type'] = $itemTypeObj->id;\n if ($text === null) {\n $text = $itemTypeObj->totalItems();\n }\n return link_to('items', $action, $text, $props, $queryParams);\n}", "function render_item($item) {\n\t\t\n\t\t$retval = \"\";\n\n\t\tif (!empty($item[\"#field_prefix\"])) {\n\t\t\t$retval .= $item[\"#field_prefix\"];\n\t\t}\n\n\t\t$type = $item[\"#type\"];\n\n\t\tif ($type == \"textfield\") {\n\t\t\t$retval .= $this->theme_textfield($item);\n\n\t\t} else if ($type == \"select\") {\n\t\t\t$retval .= $this->theme_select($item);\n\n\t\t} else if ($type == \"checkbox\") {\n\t\t\t$retval .= $this->theme_checkbox($item);\n\n\t\t} else if ($type == \"date\") {\n\t\t\t$retval .= $this->theme_date($item);\n\n\t\t} else if ($type == \"radios\") {\n\t\t\t$retval .= $this->theme_radios($item);\n\n\t\t} else if ($type == \"cc_exp\") {\n\t\t\t$retval .= $this->theme_cc_exp($item);\n\n\t\t} else if ($type == \"item\") {\n\t\t\t$retval .= $this->theme_item($item);\n\n\t\t} else {\n\t\t\t//\n\t\t\t// This only gets executed if I screwed up the outer\n\t\t\t// if statement. :-P\n\t\t\t//\n\t\t\t$retval .= \"No code for item type: \" . $type;\n\n\t\t}\n\n\t\treturn($retval);\n\n\t}", "function getItem() ;", "public static function getMenuItems()\n {\n // Will be handled in XML in future (or/and with the Joomla native menus)\n // -> give your opinion on j-cook.pro/forum\n\n $items = array();\n\n $items['admin.countries.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_COUNTRIES',\n 'view' => 'countries',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_countries'\n );\n\n $items['admin.regions.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_REGIONS',\n 'view' => 'regions',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_regions'\n );\n\n $items['admin.provinces.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_PROVINCES',\n 'view' => 'provinces',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_provinces'\n );\n\n $items['admin.subscriptionplans.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_SUBSCRIPTIONPLANS',\n 'view' => 'subscriptionplans',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_subscriptionplans'\n );\n\n $items['admin.categories.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CATEGORIES',\n 'view' => 'categories',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_categories'\n );\n\n $items['admin.typedocuments.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_TYPEDOCUMENTS',\n 'view' => 'typedocuments',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_typedocuments'\n );\n\n $items['admin.documents.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_DOCUMENTS',\n 'view' => 'documents',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_documents'\n );\n\n $items['admin.reservations.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_RESERVATIONS',\n 'view' => 'reservations',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_reservations'\n );\n\n $items['admin.cpanel.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CONTROL_PANEL',\n 'view' => 'cpanel',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_cpanel'\n );\n\n $items['site.cpanel.default'] = array(\n 'label' => 'PAPIERSDEFAMILLES_LAYOUT_CONTROL_PANEL',\n 'view' => 'cpanel',\n 'layout' => 'default',\n 'icon' => 'papiersdefamilles_cpanel'\n );\n\n return $items;\n }", "function _getMediaTypeMenu($name, $selectedType, $attrs)\r\n {\r\n global $_ARRAYLANG, $_CORELANG;\r\n\r\n $menu = \"<select name=\\\"\".$name.\"\\\" \".$attrs.\">\";\r\n foreach ($this->_arrMediaTypes as $type => $text) {\r\n if (!$this->_checkForModule($type)) {\r\n continue;\r\n }\r\n $text = $_ARRAYLANG[$text];\r\n if (empty($text)) {\r\n $text = $_CORELANG[$text];\r\n }\r\n $menu .= \"<option value=\\\"\".$type.\"\\\"\".($selectedType == $type ? \" selected=\\\"selected\\\"\" : \"\").\">\".$text.\"</option>\\n\";\r\n }\r\n $menu .= \"</select>\";\r\n return $menu;\r\n }", "public function getActionName(){ }", "public function get_name() {\n\t\treturn 'ih_elementor_list_item';\n\t}", "public function getAvailableTemplate()\r\n {\r\n $panels = $this->_panel->getCollection()\r\n ->addFieldToFilter('status', '1');\r\n $listPanel = array();\r\n foreach ($panels as $panel) {\r\n $listPanel[] = array('label' => $panel->getName(),\r\n 'value' => $panel->getId());\r\n }\r\n // echo 'test';\r\n // die();\r\n return $listPanel;\r\n }", "function i4web_toolbox($instance){\n \n $toolbox_info = $instance; \n?>\n <p><?php echo $toolbox_info['toolbox_lead_txt'];?></p>\n <ul class=\"sern-toolbox-list\">\n <li><kbd><?php echo $toolbox_info['toolbox_arr1'];?></kbd></li>\n <li><kbd><?php echo $toolbox_info['toolbox_arr2'];?></kbd></li>\n <li><kbd><?php echo $toolbox_info['toolbox_arr3'];?></kbd></li>\n <li><kbd><?php echo $toolbox_info['toolbox_arr4'];?></kbd></li> \n </ul>\n \n \n\t \n<?php }", "function components_list(){\n\n\t\t?><li data-type=\"test\" title=\"Sample Title\"></li><?php\n\t}", "function getItem ($name, $type) {\n\t\tif ($this->existsItemStrict ($name, $type)) {\n\t\t\t$fullName = $fullName = '/'.$type.$name;\n\t\t\tif (array_key_exists ($fullName, $this->allConfigItems)) {\n\t\t\t\treturn $this->allConfigItems[$fullName];\n\t\t\t} else {\n\t\t\t\treturn $this->allUserItems[$fullName];\n\t\t\t}\n\t\t} else {\n\t\t\treturn new Error ('CONFIGURATOR_ITEM_DOESNT_EXISTS', $name);\n\t\t}\n\t}", "function getMenuSubTitle();", "public static function laratablesCustomName()\n\t\t{\n return view('buttom_html', ['coa_name' => $this->coa_name])->render();\n\n\t\t//\treturn $coa->coa_name;\n\t\t}", "public function menuItems()\n {\n return array(\n array('label'=>Yii::t('app','Compras'), 'icon'=>'fa fa-shopping-cart', 'url'=>array('#'), 'items'=>array(\n \n // array('label'=>Yii::t('app','Home Información'), 'icon'=>'fa fa-star-half-o', 'url'=>array('/'.$this->id.'/info/')),\n // array('label'=>Yii::t('app','Beneficios'), 'icon'=>'fa fa-rocket', 'url'=>array('/'.$this->id.'/features/admin')),\n \n \tarray('label'=>Yii::t('app','Compras'), 'icon'=>'fa fa-shopping-cart', 'url'=>array('/'.$this->id.'/header/admin')),\n\n \tarray('label'=>Yii::t('app','Términos y condiciones'), 'icon'=>'fa fa-gavel', 'url'=>array('/'.$this->id.'/conditions/')),\n \tarray('label'=>Yii::t('app','Config'), 'icon'=>'fa fa-cog', 'url'=>array('/'.$this->id.'/config/')),\n \n \n )),\n array('label'=>Yii::t('app','Productos'), 'icon'=>'fa fa-barcode', 'url'=>array('#'), 'items'=>array(\n \n array('label'=>Yii::t('app','Categorías'), 'icon'=>'fa fa-list-ol', 'url'=>array('/'.$this->id.'/categories/admin')),\n array('label'=>Yii::t('app','Productos'), 'icon'=>'fa fa-barcode', 'url'=>array('/'.$this->id.'/items/admin')),\n \t// array('label'=>Yii::t('app','Facilitadores'), 'icon'=>'fa fa-graduation-cap', 'url'=>array('/'.$this->id.'/facilitador/admin')),\n \n )),\n );\n }", "public function toolbar(string $value): self\n {\n $new = clone $this;\n $new->toolbar = $value;\n\n return $new;\n }", "protected function addToolBar()\n {\n $title = JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLDS');\n\n if ($this->pagination->total)\n {\n $title .= \"<span style='font-size: 0.5em; vertical-align: middle;'>(\" . $this->pagination->total . \")</span>\";\n }\n }", "function ks_acf_toolbars($toolbars) {\n $wysiwyg_configs = ks_wysiwyg_configs();\n\n if ($wysiwyg_configs) {\n $toolbars = array();\n foreach ($wysiwyg_configs as $config) {\n $toolbars[$config['label']] = $config['toolbars'];\n }\n }\n \n\treturn $toolbars;\n}", "protected function addToolbar()\n\t{\n\t\tif (!$this->edit)\n\t\t{\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_CLUB_ADD_NEW'),'jl-clubs');\n\t\t\tJLToolBarHelper::save('club.save');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('club.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// for existing items the button is renamed `close` and the apply button is showed\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_CLUB_EDIT'). ': ' . $this->form->getValue('name'), 'jl-clubs');\n\t\t\tJLToolBarHelper::apply('club.apply');\n\t\t\tJLToolBarHelper::save('club.save');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('club.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\t\n\t\tJToolBarHelper::help('screen.joomleague',true);\n\t}", "function getFilesToolbar() {\n $this->fileToolBar = new base_btnbuilder;\n $this->fileToolBar->images = &$this->images;\n if (isset($this->currentFile) &&\n is_array($this->currentFile) &&\n count($this->currentFile) > 0 &&\n $this->currentFile['folder_id'] >= 0) {\n $this->fileToolBar->addButton(\n 'Properties',\n $this->getLink(\n array(\n 'cmd' => 'edit_file',\n 'file_id' => $this->params['file_id']\n )\n ),\n 'categories-properties',\n 'Show/Edit file properties',\n ($this->params['cmd'] == 'edit_file')\n );\n $this->fileToolBar->addButton(\n 'Tags',\n $this->getLink(\n array(\n 'cmd' => 'file_tags', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-tag',\n 'Edit file tags',\n ($this->params['cmd'] == 'file_tags')\n );\n $this->fileToolBar->addSeparator();\n if ($this->currentFile['current_version_id'] > 1) {\n $this->fileToolBar->addButton(\n 'Versions',\n $this->getLink(\n array(\n 'cmd' => 'file_versions', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-time',\n 'Show file versions',\n ($this->params['cmd'] == 'file_versions')\n );\n }\n if ($this->currentFile['DERIVED'] || $this->currentFile['DERIVATIONS'] > 0) {\n $this->fileToolBar->addButton(\n 'Derivations',\n $this->getLink(\n array(\n 'cmd' => 'file_derivations', 'file_id' => $this->params['file_id']\n )\n ),\n 'status-file-inherited',\n 'Show file derivations',\n ($this->params['cmd'] == 'file_derivations')\n );\n }\n $this->fileToolBar->addSeparator();\n $this->fileToolBar->addButton(\n 'Papaya tag',\n $this->getLink(\n array(\n 'cmd' => 'papaya_tag', 'file_id' => $this->params['file_id']\n )\n ),\n 'items-dialog',\n 'Create papaya tag',\n ($this->params['cmd'] == 'papaya_tag')\n );\n return sprintf('<toolbar>%s</toolbar>'.LF, $this->fileToolBar->getXML());\n }\n return '';\n }", "function tombolDetailPerStore(){\n\t\t//$title= Yii::t('app','Rincian Per-Toko');\n\t\t$title= Yii::t('app','');\n\t\t$url = Url::toRoute(['/dashboard/trafik-per-store']);\n\t\t$options1 = [\n\t\t\t\t\t'id'=>'detail-trafik',\n\t\t\t\t\t//'class'=>\"btn btn-danger btn-xs\",\n\t\t\t\t\t'title'=>'Tampilkan chart Per-Toko'\n\t\t];\n\t\t$icon1 = '<span class=\"fa-stack fa-md text-left\">\n\t\t\t\t <b class=\"fa fa-circle fa-stack-2x\" style=\"color:#ffffff\"></b>\n\t\t\t\t <b class=\"fa fa fa-search-plus fa-stack-1x\" style=\"color:#000000\"></b>\n\t\t\t\t</span>\n\t\t';\n\t\t$label1 = $icon1.' '.$title ;\n\t\t$content = Html::a($label1,$url,$options1);\n\t\treturn $content;\t\t\n\t}", "protected function addToolbar()\n\t{\t\t\n\t\t// Set toolbar items for the page\n\t\t$edit=JRequest::getVar('edit',true);\n\t\t$text=!$edit ? JText::_('COM_JOOMLEAGUE_GLOBAL_NEW') : JText::_('COM_JOOMLEAGUE_GLOBAL_EDIT');\n\t\tJLToolBarHelper::save('playground.save');\n\t\tif (!$edit)\n\t\t{\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PLAYGROUND_ADD_NEW'),'playground');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('playground.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// for existing items the button is renamed `close` and the apply button is showed\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PLAYGROUND_EDIT'),'playground');\n\t\t\tJLToolBarHelper::apply('playground.apply');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('playground.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\tJToolBarHelper::divider();\n\t\tJLToolBarHelper::onlinehelp();\t\n\t}", "public static function get($type)\n\t{\n\t\tif(!isset(self::$_items[$type]))\n\t\t\tself::loadItems();\n\t\treturn self::$_items[$type];\n\t}", "public function testToolbar()\n {\n $form = $this->factory->create('ckeditor', null, array(\n 'toolbar' => array(\n 'document',\n ),\n 'toolbar_groups' => array(\n 'document' => array(\n 'Source'\n )\n )\n ));\n $view = $form->createView();\n $toolbar = $view->get('toolbar');\n \n $this->assertEquals($toolbar, array(\n array(\n 'name' => 'document',\n 'items' => array(\n 'Source'\n )\n )\n ));\n }", "protected function getCurrentDashbaordItem() {\n\t\t\n\t\treturn \"home\";\n\t}", "public function testToolbar()\n {\n $form = $this->factory->create('ckeditor', null, array('toolbar' => array(\n array(\n 'name' => 'name',\n 'items' => array('Item1', 'Item2')\n ))));\n $view = $form->createView();\n $toolbar = $view->get('toolbar');\n \n $this->assertEquals($toolbar, array(\n array(\n 'name' => 'name',\n 'items' => array('Item1', 'Item2')\n )));\n }", "public function getPanel()\n\t{\n\t\t$items = $this->items;\n\t\tob_start();\n\t\trequire_once __DIR__ . \"/Callback.phtml\";\n\t\treturn ob_get_clean();\n\t}", "public static function Get( $item, $type )\n {\n if ( isset( $type[$item] ) )\n {\n return $type[$item];\n }\n else if ( isset( $type[$item] ) )\n {\n return $type[$item];\n }\n \n return \"\";\n }", "abstract public function getRenderName();", "public abstract function getDatasetPopupHtml():string;", "function print_icones_action($tpl,$varname='icones_action',$items=array(),$id='') {\n if (empty($id)) $id=$varname;\n\n $res=\"<div id=\\\"$id\\\"><ul class=\\\"menu_niveau2\\\" >\";\n foreach ($items as $item) {\n $res.= print_menu_item2($tpl,false,$item);\n }\n //print_r($res);\n if ($tpl && $varname)\n \t\t$tpl->assign($varname, $res.\"</ul></div>\");\n \telse return $res;\t\n\n}", "public function adminDetails()\n {\n //not much to display for the \"item\" so just display icon\n $txt = DataAccess::getInstance()->get_text(true, 59);\n $title = \"<img src=\\\"../\" . geoTemplate::getUrl('', $txt[500952]) . \"\\\" alt=\\\"\\\" />\";\n return array(\n 'type' => 'Verify Account',\n 'title' => $title\n );\n }", "public function getNamedItem($name) { }", "public function renderItem($item)\n {\n if (!empty($item['role']) && !Yii::$app->user->can($item['role'])) return '';\n\n\n // Render the item.\n $label = '';\n if (isset($item['icon'])) {\n $label .= '<i class=\"fa fa-' . $item['icon'] . '\"></i>';\n }\n if (isset($item['label'])) {\n $label .= $item['label'];\n }\n\n if (!empty($item['items'])) {\n return ButtonDropdown::widget([\n 'label' => $label,\n 'encodeLabel' => false,\n 'dropdown' => [\n 'items' => $item['items'],\n ],\n ]);\n } else {\n $url = empty($item['url']) ? ['#'] : $item['url'];\n $options = empty($item['options']) ? [] : $item['options'];\n return Html::tag('span', Html::a($label, $url, $options), ['class' => 'boxnavitem']);\n }\n }", "public function getHtmlTemplate() {}" ]
[ "0.6842441", "0.64071155", "0.63748395", "0.62949187", "0.6261753", "0.6137785", "0.6137785", "0.60876954", "0.60102373", "0.59703726", "0.59043634", "0.5857361", "0.5816831", "0.57304776", "0.5725111", "0.5723343", "0.57177114", "0.56702965", "0.56334144", "0.56228024", "0.5612948", "0.5598578", "0.5568739", "0.5563217", "0.55609983", "0.5560486", "0.5547135", "0.55405736", "0.55302674", "0.5522843", "0.5518355", "0.5512775", "0.5497927", "0.54923457", "0.5485937", "0.5483496", "0.54424375", "0.5435982", "0.54248303", "0.5420316", "0.54022527", "0.53933835", "0.539285", "0.5391732", "0.5368866", "0.53677374", "0.5366391", "0.53544384", "0.5346828", "0.53263444", "0.53189725", "0.528963", "0.5279787", "0.52624387", "0.5260782", "0.5260782", "0.5254302", "0.52456", "0.52304566", "0.5224255", "0.52167106", "0.5211738", "0.51785994", "0.515662", "0.51552844", "0.51528686", "0.51523584", "0.5152014", "0.51428676", "0.51355624", "0.51313245", "0.512507", "0.5121435", "0.5120718", "0.51134384", "0.51069593", "0.51025295", "0.5095112", "0.50899434", "0.5085414", "0.5081499", "0.5079451", "0.50742996", "0.50711834", "0.50683385", "0.5067696", "0.5065861", "0.5060919", "0.50568557", "0.5055016", "0.5054898", "0.504592", "0.50454515", "0.5044791", "0.5044342", "0.50429904", "0.5036064", "0.50330484", "0.5032585", "0.502579" ]
0.5852124
12
getTbItem output toolbar html for the specified position (top, left, right, bottom)
function show($pos) { echo $this->get($pos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get($pos, $mode='design')\r\n\t{\r\n\t\t$buf = '';\r\n\t\tif (!empty($this->toolbars[$pos.'_'.$mode]))\r\n\t\t{\r\n\t\t\tif ($pos == 'top' || $pos == 'bottom')\r\n\t\t\t{\r\n\t\t\t\t// horizontal toolbar\r\n\t\t\t\t$tb_pos_start = '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">';\r\n\t\t\t\t$tb_pos_end = '</table>';\r\n\t\t\t\t$tb_item_sep = '';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// vertical toolbar\r\n\t\t\t\t$tb_pos_start = '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>';\r\n\t\t\t\t$tb_pos_end = '</tr></table>';\r\n\t\t\t\t$tb_item_sep = '<br>';\r\n\t\t\t}\r\n\t\t\t$buf = $tb_pos_start;\r\n\t\t\twhile (list(,$tb) = each($this->toolbars[$pos.'_'.$mode]))\r\n\t\t\t{\r\n\t\t\t\tif ($pos == 'top' || $pos == 'bottom')\r\n\t\t\t\t{\r\n\t\t\t\t\t// horizontal toolbar\r\n\t\t\t\t\t$tb_start = '<tr><td align=\"'.$tb['settings']['align'].'\" valign=\"'.$tb['settings']['valign'].'\" class=\"SPAW_'.$this->theme.'_toolbar_'.$pos.'\" nowrap=\"yes\">';\r\n\t\t\t\t\t$tb_end = '</td></tr>';\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// vertical toolbar\r\n\t\t\t\t\t$tb_start = '<td align=\"'.$tb['settings']['align'].'\" valign=\"'.$tb['settings']['valign'].'\" class=\"SPAW_'.$this->theme.'_toolbar_'.$pos.'\">';\r\n\t\t\t\t\t$tb_end = '</td>';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$buf .= $tb_start;\r\n\t\t\t\twhile (list(,$tbitem) = each($tb['data']))\r\n\t\t\t\t{\r\n\t\t\t\t\t$buf .= $this->getTbItem($tbitem['name'],$tbitem['type'],isset($tbitem['attributes'])?$tbitem['attributes']:'', isset($tbitem['data'])?$tbitem['data']:'') . $tb_item_sep;\r\n\t\t\t\t}\r\n\t\t\t\t$buf .= $tb_end;\r\n\t\t\t}\r\n\t\t\t$buf .= $tb_pos_end;\r\n\t\t}\r\n\t\treturn $buf;\r\n\t}", "public function getEditToolbar() {\n\t \n\t\t$toolarray=array(\n\t\t\tarray(\n\t\t\t\t'image'=>'button_bold.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\\'\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_bold_sample\", \"Bold text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_bold_tip\", \"Bold text\"),\n\t\t\t\t'key'\t=>\t'B'\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'image'=>'button_italic.png',\n\t\t\t\t'open'\t=>\t\"\\'\\'\",\n\t\t\t\t'close'\t=>\t\"\\'\\'\",\n\t\t\t\t'sample'=> $this->pi_getLL(\"tb_italic_sample\", \"Italic text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_italic_tip\", \"Italic text\"),\n\t\t\t\t'key'\t=>\t'I'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'=>'button_link.png',\n\t\t\t\t'open'\t=>\t'[[',\n\t\t\t\t'close'\t=>\t']]',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_link_sample\", \"Link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_link_tip\", \"Internal link\"),\n\t\t\t\t'key'\t=>\t'L'\n\t\t\t),\n\t\t\t/*\n\t\t\tarray(\n\t\t\t\t'image'=>'button_extlink.png',\n\t\t\t\t'open'\t=>\t'[',\n\t\t\t\t'close'\t=>\t']',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_extlink_sample\", \"http://www.example.com link title\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_extlink_tip\", \"External link (remember http:// prefix)\"),\n\t\t\t\t'key'\t=>\t'X'\n\t\t\t),*/\n\t\t\tarray(\n\t\t\t\t'image'=>'button_headline.png',\n\t\t\t\t'open'\t=>\t\"\\\\n== \",\n\t\t\t\t'close'\t=>\t\" ==\\\\n\",\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_headline_sample\", \"Headline text\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_headline_tip\", \"Level 2 headline\"),\n\t\t\t\t'key'\t=>\t'H'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_hr.png',\n\t\t\t\t'open'\t=>\t\"\\\\n----\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_hr_tip\", \"Horizontal line (use sparingly)\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sig.png',\n\t\t\t\t'open'\t=>\t\"\\\\n--~~~~\\\\n\",\n\t\t\t\t'close'\t=>\t'',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sig_tip\", \"Signature\"),\n\t\t\t\t'key'\t=>\t'S'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_nowiki.png',\n\t\t\t\t'open'\t=>\t\"<nowiki>\",\n\t\t\t\t'close'\t=>\t'</nowiki>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_nowiki_sample\", \"This is not parsed\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_nowiki_tip\", \"Nowiki\"),\n\t\t\t\t'key'\t=>\t'N'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sub.png',\n\t\t\t\t'open'\t=>\t\"<sub>\",\n\t\t\t\t'close'\t=>\t'</sub>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sub_tip\", \"Sub\"),\n\t\t\t\t'key'\t=>\t'D'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_sup.png',\n\t\t\t\t'open'\t=>\t\"<sup>\",\n\t\t\t\t'close'\t=>\t'</sup>',\n\t\t\t\t'sample'=>\t'',\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_sup_tip\", \"Sup\"),\n\t\t\t\t'key'\t=>\t'U'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_strike.png',\n\t\t\t\t'open'\t=>\t\"<s>\",\n\t\t\t\t'close'\t=>\t'</s>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_strike_sample\", \"This text is strike through\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_strike_tip\", \"Strike Through\"),\n\t\t\t\t'key'\t=>\t''\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'image'\t=>'button_ref.png',\n\t\t\t\t'open'\t=>\t\"<ref>\",\n\t\t\t\t'close'\t=>\t'</ref>',\n\t\t\t\t'sample'=>\t$this->pi_getLL(\"tb_ref_sample\", \"This is a reference\"),\n\t\t\t\t'tip'\t=>\t$this->pi_getLL(\"tb_ref_tip\", \"Add reference\"),\n\t\t\t\t'key'\t=>\t'R'\n\t\t\t),\n\t\t);\n\t\t$toolbar =\"<script type='text/javascript'>\\n/*<![CDATA[*/\\n\";\n\t\n\t\t$toolbar.=\"document.writeln(\\\"<div id='toolbar'>\\\");\\n\";\n\t\t\n\t\tforeach($toolarray as $tool) {\n\t\t\t$image = substr(t3lib_div::getFileAbsFileName($this->conf['toolbarIconPath']), strlen(PATH_site)) . $tool['image'];\n\t\t\t$open = $tool['open'];\n\t\t\t$close = $tool['close'];\n\t\t\t$sample = $tool['sample'];\n\t\t\t$tip = $tool['tip'];\n\t\t\t$key = $tool[\"key\"]; // accesskey for the buttons\n\t\t\n\t\t\t$toolbar.=\"addButton('$image','$tip','$open','$close','$sample','$key');\\n\";\n\t\t}\n\t\n\t\t$toolbar.=\"addInfobox('\".$this->pi_getLL(\"tb_infobox\").\"','\".$this->pi_getLL(\"tb_infobox_alert\").\"');\\n\";\n\t\t$toolbar.=\"document.writeln(\\\"</div>\\\");\\n\";\n\t\n\t\t$toolbar.=\"/*]]>*/\\n</script>\";\n\t\t\n\t\t// Add Scripts\n\t\t$JS_Param = \"var drWikiEditor='\".$this->prefixId.\"[body]'; //Handler for Editor\\n\";\n\t\t$this->loadExtJS(\"res/wiki_script.js\", $JS_Param);\n\t\t\n\t\treturn $toolbar;\t\t\n\t}", "function getHtml()\r\n\t{\r\n\t\tglobal $spaw_dir;\r\n\t\tglobal $spaw_wysiwyg_instCount;\r\n\t\tglobal $spaw_active_toolbar;\r\n\r\n\r\n\t\t$n = $this->control_name;\r\n\t\t$orn = $this->original_name;\r\n\t\t// todo: make more customizable\r\n\r\n\t\t$buf = '';\r\n\t\tif (SPAW_Util::checkBrowser())\r\n\t\t{\r\n\t\t\tif ($spaw_wysiwyg_instCount == 1)\r\n\t\t\t{\r\n\t\t\t\t$buf.= $this->getCssScript();\r\n\t\t\t}\r\n\t\t\t// theme based css file and javascript\r\n\t\t\t$buf.= '<script language=\"JavaScript\" src=\"'.$spaw_dir.'lib/themes/'.$this->theme.'/js/toolbar.js.php\"></script>';\r\n\t\t\t$buf.= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$spaw_dir.'lib/themes/'.$this->theme.'/css/toolbar.css\">';\r\n\r\n\t\t\t$buf.= '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"'.$this->getWidth().'\" height=\"'.$this->getHeight().'\">';\r\n\t\t\t$buf.= '<tr>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_top_design\" class=\"SPAW_'.$this->theme.'_toolbar\" colspan=\"3\">';\r\n\t\t\t$buf.= $this->toolbars->get('top');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_top_html\" class=\"SPAW_'.$this->theme.'_toolbar\" colspan=\"3\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('top','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '</tr>';\r\n\r\n\t\t\t$buf.= '<tr>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_left_design\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" >';\r\n\t\t\t$buf.= $this->toolbars->get('left');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_left_html\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('left','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td align=\"left\" valign=\"top\" width=\"100%\" height=\"100%\">';\r\n\r\n\t\t\t//$buf.= '<input type=\"hidden\" id=\"'.$n.'\" name=\"'.$n.'\">';\r\n\t\t\t$buf.= '<textarea id=\"'.$n.'\" name=\"'.$orn.'\" style=\"width:'.$this->getWidth().'; height:'.$this->getHeight().'; display:none;\" class=\"SPAW_'.$this->theme.'_editarea\"></textarea>';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_editor_mode\" name=\"SPAW_'.$n.'_editor_mode\" value=\"design\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_lang\" value=\"'.$this->lang->lang.'\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_theme\" value=\"'.$this->theme.'\">';\r\n\t\t\t$buf.= '<input type=\"hidden\" id=\"SPAW_'.$n.'_borders\" value=\"on\">';\r\n\r\n\t\t\t$buf.= '<iframe id=\"'.$n.'_rEdit\" style=\"width:100%; height:'.$this->getHeight().'; direction:'.$this->lang->getDir().';\" class=\"SPAW_'.$this->theme.'_editarea\" frameborder=\"no\" src=\"'.$spaw_dir.'empty.html\"></iframe><br>';\r\n\r\n\t\t\t$buf.= \"\\n<script language=\\\"javascript\\\">\\n<!--\\n\";\r\n\r\n\t\t\t$tmpstr = str_replace(\"\\r\\n\",\"\\n\",$this->getValue());\r\n\t\t\t$tmpstr = str_replace(\"\\r\",\"\\n\",$tmpstr);\r\n\t\t\t$content = explode(\"\\n\",$tmpstr);\r\n\t\t\t$plus = \"\";\r\n\t\t\tforeach ($content as $line)\r\n\t\t\t{\r\n\t\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value \".$plus.\"=\\\"\".str_replace('-->','@@END_COMMENT',str_replace('<!--','@@START_COMMENT',str_replace('\"','&quot;',str_replace(\"'\",\"\\'\",str_replace(\"\\\\\",\"\\\\\\\\\\\\\\\\\",$line))))).\"\\\\\\\\n\\\";',0);\\n\";\r\n\t\t\t\t$plus = \"+\";\r\n\t\t\t}\r\n\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/&quot;/g,\\'\\\"\\');',0);\".\"\\n\";\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/@@START_COMMENT/g,\\'<!--\\');',0);\".\"\\n\";\r\n\t\t\t$buf.=\"setTimeout('document.getElementById(\\\"\".$n.\"\\\").value = document.getElementById(\\\"\".$n.\"\\\").value.replace(/@@END_COMMENT/g,\\'-->\\');',0);\".\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"alert(document.all.'.$n.'.value);\",0);'.\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"'.$n.'_rEdit.document.body.innerHTML += document.all.'.$n.'.value;\",0);'.\"\\n\";\r\n\r\n\t\t\t// $buf.='setTimeout(\"SPAW_toggle_borders(\\''.$n.'\\',this[\\''.$n.'_rEdit\\'].document.body,null);\",0);'.\"\\n\";\r\n\r\n\t\t\t// editor init\r\n\t\t\t$buf.='setTimeout(\"SPAW_editorInit(\\''.$n.'\\',\\''.htmlspecialchars($this->getCssStyleSheet()).'\\',\\''.$this->lang->getDir().'\\');\",0);'.\"\\n\";\r\n\r\n\t\t\t$buf.= '//--></script>';\r\n\r\n\t\t\t$buf.= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_right_design\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\">';\r\n\t\t\t$buf.= $this->toolbars->get('right');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '<td id=\"SPAW_'.$n.'_toolbar_right_html\" valign=\"top\" class=\"SPAW_'.$this->theme.'_toolbar\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('right','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf.= '</tr>';\r\n\t\t\t$buf.= '<tr><td class=\"SPAW_'.$this->theme.'_toolbar\"></td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_bottom_design\" class=\"SPAW_'.$this->theme.'_toolbar\" width=\"100%\">';\r\n\t\t\t$buf.= $this->toolbars->get('bottom');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td id=\"SPAW_'.$n.'_toolbar_bottom_html\" class=\"SPAW_'.$this->theme.'_toolbar\" width=\"100%\" style=\"display : none;\">';\r\n\t\t\t$buf.= $this->toolbars->get('bottom','html');\r\n\t\t\t$buf .= '</td>';\r\n\r\n\t\t\t$buf .= '<td class=\"SPAW_'.$this->theme.'_toolbar\"></td></tr>';\r\n\t\t\t$buf.= '</table>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// show simple text area\r\n\t\t\t$buf = '<textarea cols=\"20\" rows=\"5\" name=\"'.$n.'\" style=\"width:'.$this->getWidth().'; height:'.$this->getHeight().'\">'.htmlspecialchars($this->getValue()).'</textarea>';\r\n\t\t}\r\n\t\treturn $buf;\r\n\t}", "public function getToolbarHtml()\n {\n return $this->getChildHtml('toolbar');\n }", "public function getToolbarHtml()\n {\n return $this->getChildHtml('toolbar');\n }", "public function render()\n {\n $content = \"{\n xtype: 'toolbar',\n items: [\";\n \n $iterator = new ArrayIterator($this->getItems());\n while ($iterator->valid()) {\n $item = $iterator->current();\n \n $content .= $item->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n } \n \n $content .= \"]}\";\n \n return $content;\n }", "protected function renderToolbar() {}", "public function drawPanelToolbar() {\n\t\t$html = '';\n\t\t$html .= '<div id=\"toolbar\">'.\"\\n\";\n\t\t$html .= '\t<div id=\"toolbar_container\">'.\"\\n\";\n\t\t$html .= '\t<div class=\"logo\"><a href=\"/treeline/\"><img src=\"/treeline/img/logo.gif\" alt=\"Treeline\" /></a></div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"options\">'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button\" name=\"treeline\" id=\"treeline\" value=\"Save changes\" />'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button cancel\" name=\"treeline\" id=\"treeline\" value=\"Discard changes\" />'.\"\\n\";\t\t\t\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"clear\"></div>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "public function render() {\n\t\t$this->addJavascriptToBackend();\n\t\t$this->addCssToBackend();\n\t\t$title = $GLOBALS['LANG']->getLL('toolbaritem', true);\n\n\t\t\t// toolbar item icon\n\t\t$menu[] = '<a href=\"#\" class=\"toolbar-item\"\">';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-role\" disabled=\"disabled\" value=\"' . tx_newspaper_Workflow::getRoleTitle(tx_newspaper_workflow::getRole()) . '\" />';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-counter\" disabled=\"disabled\" value=\"' . $this->docsAssignedToRole . '\" />';\n\t\t$menu[] = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], t3lib_extMgm::extRelPath($this->extkey) . '/mod_role/newspaper.png', 'width=\"23\" height=\"16\"').' alt=\"' . $title . '\" title=\"' . $title . '\" /></a>';\n\t\t$menu[] = '</a>';\n\n\t\t\t// toolbar item menu and initial content\n\t\t$menu[] = '<div class=\"toolbar-item-menu\" style=\"display: none;\">';\n\t\t$menu[] = $this->renderMenu();\n\t\t$menu[] = '</div>';\n\n\t\treturn implode(\"\\n\", $menu);\n\t}", "public function drawToolbar($pagestyle='', $disableStyles, $toolmode=\"page\") {\n\t\t$template=2;\n\t\t$helptitle=\"Page edit toolbar\";\n\t\t\n\t\t\n\t\tif ($toolmode==\"panel\") {\n\t\t\t$template=6;\n\t\t\t$helptitle='Panel edit toolbar';\n\t\t}\n\t\telse if ($toolmode==\"landing\") {\n\t\t\t$template=67;\n\t\t}\n\t\t\n\t\t$html = '\n<div id=\"toolbar\">\n\t<div class=\"logo\"><a href=\"/treeline/\"><img src=\"/treeline/img/logo.gif\" alt=\"Treeline\" /></a></div>\n\t<a href=\"javascript:openhelp(\\''.Help::helpLinkByTitle($helptitle).'\\');\" style=\"float:right;margin:20px;\">'.$this->getLabel(\"tl_help_get_help\", true).'</a>\n\t<div id=\"toolbar_container\">\n\t\t<div class=\"options\" style=\"'.($disableStyles?\"visibility:hidden\":\"\").';width:200px;\">\n\t\t\t<p>'.ucfirst($this->getLabel(\"tl_toolb_change_style\", true)).'</p>\n\t\t\t'.($disableStyles?\"\":$this->drawStyleSwitcherMenu($pagestyle, $template)).'\n\t\t</div>\n\t\t<div class=\"options\" id=\"toolbar-quick-links\" style=\"\">\n\t\t\t<p>'.ucfirst($this->getLabel(\"tl_toolb_quick\", true)).'</p>\n\t\t\t<a class=\"tl_link\" href=\"javascript:alert(\\'Inline asset create\\n\\nThis function is not yet supported.\\');\">'.$this->getLabel(\"tl_toolb_create_ass\", true).'</a>\n\t\t\t'.($toolmode==\"page\"?'<a class=\"tl_link\" href=\"javascript:panelManager(\\''.$this->getGUID().'\\');\">'.$this->getLabel(\"tl_toolb_man_panels\", true).'</a>':\"\").'\n\t\t\t<a class=\"tl_link\" href=\"javascript:editorNotes(\\''.$this->getGUID().'\\');\">'.$this->getLabel(\"tl_toolb_editor_note\", true).'</a>\n\t\t</div>\n\t\t<div class=\"options\" style=\"float:right;\">\n\t\t\t<p>'.$this->getLabel(\"tl_toolb_manage_title\", true).'</p>\n\t\t\t<input type=\"button\" class=\"button cancel\" name=\"treeline\" value=\"'.$this->getLabel(\"tl_toolb_but_discard\", true).'\" id=\"btn_discard\" onclick=\"javascript:setTarget(0);setAction(\\'Discard changes\\')\" />\n\t\t\t<input type=\"button\" class=\"button cancel\" name=\"treeline\" value=\"'.ucfirst($this->getLabel(\"tl_generic_preview\", true)).'\" id=\"btn_preview\" onclick=\"javascript:setTarget(1);setAction(\\'Preview\\')\" />\n\t\t\t<input type=\"button\" class=\"button\" name=\"treeline\" value=\"'.ucfirst($this->getLabel(\"tl_generic_save_changes\", true)).'\" id=\"btn_save\" onclick=\"javascript:setTarget(0);setAction(\\'Save changes\\')\" />\n\t\t</div>\n\t</div>\n\t<!-- <div class=\"clear\">&nbsp;</div> -->\n</div>\n<script type=\"text/javascript\">\n\tfunction setTarget(blank) {\n\t\tvar f=document.forms[0];\n\t\tif (blank) f.target=\"_blank\";\n\t\telse f.target=\"_self\";\n\t}\n\tfunction setAction(a) {\n\t\tvar f = document.getElementById(\\'treeline_edit\\');\n\t\t//alert(\"set post(\"+f+\") act(\"+a+\")\");\n\t\tif (f) {\n\t\t\tf.post_action.value=a;\n\t\t\t//alert(\"submitting\");\n\t\t\tf.submit();\n\n\t\t\tdocument.forms[0].target=\"_self\";\n\t\t\tf.post_action.value=\"\";\n\t\t\treturn true;\t\t\n\t\t}\n\t\treturn false;\n\t}\n\t\n</script>\n\n';\n//\t\tprint \"done toolbar<BR>\\n\";\n\t\treturn $html;\n\t}", "public function getToolbarHtml()\n {\n $cedToolbar = $this->getChildHtml('toolbar');\n return $cedToolbar;\n }", "function getToolbar() {\n //load the JToolBar library and create a toolbar\n jimport('joomla.html.toolbar');\n $bar = new JToolBar('toolbar');\n\n $bar->appendButton('Standard', 'archive', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_SAVE'), 'basket.draft', false);\n $bar->appendButton('Separator');\n if (!$this->item->free) {\n $bar->appendButton('Standard', 'edit', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_ESTIMATE'), 'basket.estimate', false);\n $bar->appendButton('Separator');\n }\n $bar->appendButton('Standard', 'publish', JText::_('COM_EASYSDI_SHOP_BASKET_BTN_ORDER'), 'basket.order', false);\n\n //generate the html and return\n return $bar->render();\n }", "public function ext_makeToolBar() {}", "public function renderToolbarControls()\n {\n $this->kernel->event->trigger('phifty.crud.toolbar_init',$this);\n foreach( $this->_toolbarItems as $controller ) {\n echo $controller->controlAction();\n }\n }", "public function getUserbarTpl(){\n return $this->templates['userbar'];\n }", "public function gen_Toolbar(){\r\n\t\t$toolbar ='<?xml version=\"1.0\"?><toolbar>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pullReportSort\" type=\"text\" text=\"Search By\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newuser\" type=\"button\" text=\"Add User\" img=\"/adduser.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"userapprove\" type=\"button\" text=\"Approve\" img=\"/userapprove.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"usersuspend\" type=\"button\" text=\"Suspend\" img=\"/usersuspend.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"pedit\" type=\"button\" text=\"Edit Privileges\" img=\"/edit.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgateway\" type=\"button\" text=\"Add Gateway\" img=\"/assigngateway.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newsenderid\" type=\"button\" text=\"Add SenderID\" img=\"/senderid.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newpackage\" type=\"button\" text=\"Add Package\" img=\"/package.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newshortcode\" type=\"button\" text=\"Add shortcode\" img=\"/assignshortcode.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newcategory\" type=\"button\" text=\"Add Category\" img=\"/category.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newkey\" type=\"button\" text=\"Add key\" img=\"/keys.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheme\" type=\"button\" text=\"Add Scheme\" img=\"/scheme.png\"/>';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newgroup\" type=\"button\" text=\"Add Group\" img=\"/usergroup.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newprefix\" type=\"button\" text=\"Add Prefix\" img=\"/prefix.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newoperator\" type=\"button\" text=\"Add Operator\" img=\"/operator.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcountry\" type=\"button\" text=\"Add Country\" img=\"/country.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newfeature\" type=\"button\" text=\"Add Feature\" img=\"/features.png\"/>';\r\n\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"newscheduler\" type=\"button\" text=\"Add Schedule\" img=\"/scheduler.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newmsgtemplate\" type=\"button\" text=\"Add Template\" img=\"/template.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newaddressbook\" type=\"button\" text=\"Add Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"newcontact\" type=\"button\" text=\"Add Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"newtemplate\" type=\"button\" text=\"Add Message\" img=\"/save_msg.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"aedit\" type=\"buttonSelect\" text=\"Edit\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_edit\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_edit\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"adelete\" type=\"buttonSelect\" text=\"Delete\" img=\"/edit.png\">';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"address_delete\" text=\"Address Book\" img=\"/adressbook.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item type=\"button\"\tid=\"contact_delete\" text=\"Contact\" img=\"/contact.png\" />';\r\n\t\t$toolbar = $toolbar.'</item>';\r\n\t\t$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"approve\" type=\"button\" text=\"Approve\" img=\"/approve.png\"/>';\r\n\t\t$toolbar = $toolbar.'<item id=\"disapprove\" type=\"button\" text=\"Disapprove\" img=\"/disapprove.png\" />';\r\n\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"enable\" type=\"button\" text=\"Enable\" img=\"/enable.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disable\" type=\"button\" text=\"Disable\" img=\"/disable.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"stopcron\" type=\"button\" text=\"Stop Cron\" img=\"/stopcron.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"resumecron\" type=\"button\" text=\"Resume Cron\" img=\"/resumecron.png\" />';\r\n\r\n\t\t//$toolbar = $toolbar.'<item id=\"edit\" type=\"button\" text=\"Edit\" img=\"/edit.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"delete\" type=\"button\" text=\"Delete\" img=\"/delete.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"todayReport\" type=\"button\" text=\"Today Report\" img=\"/detail.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"upload\" type=\"button\" text=\"Upload\" img=\"/upload.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"detail\" type=\"button\" text=\"Detail\" img=\"/detail.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"empty\" type=\"button\" text=\"Empty\" img=\"/empty.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"select\" type=\"button\" text=\"Select All\" img=\"/selectall.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"disselect\" type=\"button\" text=\"Dis-select\" img=\"/disselect.png\" />';\r\n\t\t$toolbar = $toolbar.'<item id=\"excel\" type=\"button\" text=\"Excel\" img=\"/excel.png\" />';\r\n\r\n\t\t$toolbar = $toolbar.'<item id=\"excel_outbox\" type=\"button\" text=\"Download Outbox\" img=\"/excel.png\" />';\r\n\t\t\r\n\t\t$toolbar = $toolbar.'<item id=\"search\" type=\"button\" text=\"Search\" img=\"/search.png\" />';\r\n\t\t$toolbar = $toolbar.'</toolbar>';\r\n\r\n\t\treturn $toolbar;\r\n\t}", "public function getToolbarItems();", "public function getConvertToolbarForHtmlAreaArray() {}", "protected function addToolBar()\n {\n $title = JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLDS');\n\n if ($this->pagination->total)\n {\n $title .= \"<span style='font-size: 0.5em; vertical-align: middle;'>(\" . $this->pagination->total . \")</span>\";\n }\n }", "function to_the_top()\r\n{\r\n return \"\\n \"\r\n . \"<div style=\\\"text-align: right;\\\">\\n\"\r\n . \"<a href=\\\"#top\\\">\"\r\n . \"<img src=\\\"\".base_url().\"images/go-up.png\\\" \"\r\n . \"border=\\\"0\\\" style=\\\"vertical-align: middle;\\\"> \" . T_('go_up')\r\n . \"</a>\\n\"\r\n . \"</div>\\n\\n\";\r\n}", "public function context_handy_toolbar() {\n $rendered = \"\";\n $context = $this->page->context;\n\n $items = $this->page->navbar->get_items();\n $currentnode = end($items);\n\n // We are on the course home page.\n if (($context->contextlevel == CONTEXT_COURSE) &&\n !empty($currentnode) &&\n ($currentnode->type == navigation_node::TYPE_COURSE || $currentnode->type == navigation_node::TYPE_SECTION)) {\n $settingsnode = $this->page->settingsnav->find('courseadmin', navigation_node::TYPE_COURSE);\n\n $itemstoextractfrommenu = explode(',', get_config('theme_savoir', 'coursemenuhandytoolbar'));\n if ($itemstoextractfrommenu && $settingsnode) {\n $extracteditems = [];\n $this->extract_toolbaritems($settingsnode, '/' . $settingsnode->key, $itemstoextractfrommenu, $extracteditems);\n $context = new stdClass();\n $context->items = $extracteditems;\n $rendered = $this->render_from_template('theme_savoir/handy_toolbar', $context);\n }\n }\n\n return $rendered;\n }", "function setElementToolbar()\n\t{\n\t\t$task = JRequest::getVar('task', '', 'method', 'string');\n\t\tJToolBarHelper::title($task == 'add' ? JText::_('ELEMENT') . ': <small><small>[ '. JText::_('NEW') .' ]</small></small>' : JText::_('ELEMENT') . ': <small><small>[ '. JText::_('EDIT') .' ]</small></small>', 'fabrik-element.png');\n\t\tJToolBarHelper::save();\n\t\tJToolBarHelper::apply();\n\t\tJToolBarHelper::cancel();\n\t}", "function get_toolbars()\n {\n }", "function write_toolbar($date, $type)\r\n\t{\r\n\t\tinclude (\"globals.php\");\r\n\t\t\t\t\r\n\t\tprint(\"\t\t<tr background=\\\"./common_files/sm_toolbar_bg_black.png\\\">\\n\");\r\n\r\n\t\t/*Zoom tool*/\r\n\t\tprint(\"\t\t\t<td align=left valign=middle height=30 >\\n\");\r\n\t\tprint(\"\t\t\t\t\t<a href='#' class=\\\"mail2\\\" onclick=\\\"zoomable=-1*zoomable;if (zoomable==1){writeText('<img src=common_files/zoom_small_grey.png width=25 border=0 title=&quot;Click to turn off zoom function. Drag UP and RIGHT to change zoom box.&quot;>');}else{writeText('<img src=common_files/zoom_small.png width=25 border=0 title=&quot;Click to turn on zoom function. Drag UP and RIGHT to change zoom box.&quot;>');}\\\"><b id=\\\"zoomtoggle\\\"><img src=common_files/zoom_small.png width=25 border=0 title='Click to turn ON zoom function. Drag UP and RIGHT to change zoom box.'></b></a>\\n\"); \r\n\t\tprint(\"\t\t\t</td>\t\\n\"); \r\n\t\t\r\n\t\tprint(\"\t\t\t<td align=center height=30>\\n\");\r\n\t\t/*dropdowns*/\r\n\t\tprint(\"\t\t\t\t<ul id=\\\"toolnav\\\">\\n\");\r\n\t\t\r\n\t\t/*Download*/\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Download\\\">Download</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub_small\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\t\r\n\t\t\t\t\t\t\t\t\t\t$instrument = substr($type,0,4);\r\n\t\t\t\t\t\t\t\t\t\t$filter = substr($type,5,5);\r\n\t\t\t\t\t\t\t\t\t\t$file = find_latest_file($date, $instrument, $filter, 'png', 'fd'); \t\t\t\r\n\r\n\t\tprint(\"\t\t \t<li><a href=\\\"${arm_data_path}data/$dirdate/pngs/$instrument/$file\\\">PNG</a></li>\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t$file = find_latest_file($date, $instrument, $filter, 'fts.gz', 'fd'); \t\t\t\r\n\t\t\r\n\t\tprint(\"\t\t\t\t\t\t\t<li><a href=\\\"${arm_data_path}data/$dirdate/fits/$instrument/$file\\\">FITS</a></li>\\n\");\r\n\t\tprint(\"\t \t\t</ul>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t</li>\\n\");\r\n\t\t\r\n\t\t\r\n\t\t/*main menu*/\r\n\t\tif (strtotime($date) > strtotime(\"20100804\")){\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Far side</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'2','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">SDO short</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'3','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">SDO long</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'4','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t\t\t</li>\\n\");\r\n\t\t\r\n\t\tprint(\"\t\t\t\t</ul>\\n\");\r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\r\n\t\t} elseif (strtotime($date) < strtotime(\"20090520\")){\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\r\n\t\t} else{\r\n\t\tprint(\"\t\t\t\t\t<li><a href=\\\"#\\\" class=\\\"Menu\\\">Others</a>\\n\");\r\n\t\tprint(\"\t\t\t\t\t <div class=\\\"sub\\\">\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Main</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'1','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t <ul>\\n\");\r\n\t\tprint(\"\t\t\t <li><h2><a href=\\\"#\\\">Far side</a></h2></li>\\n\");\r\n\t\tprint(\"\t\t\t <div class=\\\"sm-table\\\">\\n\");\r\n\t\twrite_index_images($date,'2','div');\r\n\t\tprint(\"\t\t\t </div>\\n\");\r\n\t\tprint(\"\t\t\t </ul>\\n\");\r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\r\n\t\t}\r\n\t\t\r\n\t\t/*Share this*/\r\n\t\t\tprint(\"\t \t<td align=right valign=middle height=30>\\n\");\r\n\t\tinclude (\"share_include.txt\"); \r\n\t\tprint(\"\t\t\t</td> \\n\");\r\n\t\tprint(\"\t\t\t</tr>\\n\");\r\n\t\t\r\n\t\t}", "function generate_tooltip($caller_id, $layer_html, $tip_title)\n{\n\t$tiphtml = \"<div id='\".$caller_id.\"_box' style='display:none;position:absolute;'>\".generate_tooltip_frame()\n\t.\"<table style='background-color:#FFFFFF;'> \n\t\n\t\t<tr>\n\t\t<td style='font-size: 18px;'><b>\".$tip_title.\"</b></td>\n\t\t<td align='right' valign='top'><a href=\\\"javascript:hideTipDetails('\".$caller_id.\"');\\\"><img src='\".IMAGE_URL.\"delete_icon.png' border='0'></a></td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<td colspan='2'>\".$layer_html.\"</td>\n\t\t</tr>\n\t\t</table>\".generate_tooltip_frame('end').\"</div>\";\n\t\t\n\treturn $tiphtml;\n}", "protected function getPasteButton($blnActive, $url='#', $table='', $id='')\n\t{\n\t\tif (!$blnActive)\n\t\t{\n\t\t\treturn $this->generateImage('pasteinto_.gif', '', 'class=\"blink\"');\n\t\t}\n\n\t\t$strImage = $this->generateImage('pasteinto.gif', sprintf($GLOBALS['TL_LANG'][$table]['pasteinto'][1], $id), 'class=\"blink\"');\n\n\t\treturn '<a href=\"'.$url.'\" title=\"'.specialchars(sprintf($GLOBALS['TL_LANG'][$table]['pasteinto'][1], $id)).'\" onclick=\"Backend.getScrollOffset();\">'.$strImage.'</a> ';\n\t}", "protected function addToolbar()\n\t{\t\t\n\t\t// Set toolbar items for the page\n\t\t$edit=JRequest::getVar('edit',true);\n\t\t$text=!$edit ? JText::_('COM_JOOMLEAGUE_GLOBAL_NEW') : JText::_('COM_JOOMLEAGUE_GLOBAL_EDIT');\n\t\tJLToolBarHelper::save('playground.save');\n\t\tif (!$edit)\n\t\t{\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PLAYGROUND_ADD_NEW'),'playground');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('playground.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// for existing items the button is renamed `close` and the apply button is showed\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PLAYGROUND_EDIT'),'playground');\n\t\t\tJLToolBarHelper::apply('playground.apply');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('playground.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\tJToolBarHelper::divider();\n\t\tJLToolBarHelper::onlinehelp();\t\n\t}", "protected function addDisplayToolbar() {\r\n\t\t$doc = JFactory::getDocument();\r\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/icon-48-help.png\")}');\r\n\t\t$doc->addStyleDeclaration('.icon-32-config{background-image:url(\"components/com_jmap/images/icon-32-config.png\")}');\r\n\t\tJToolBarHelper::title( JText::_( 'HELP' ), 'jmap' );\r\n\t\tJToolBarHelper::custom('cpanel.display', 'config', 'config', 'CPANEL', false);\r\n\t}", "public function get_toolbar_positions() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_toolbar_positions();\n\n }", "public function buildSubwindow()\n {\n return '<button type=\"menu\" ><![CDATA['.$this->content.']]></button>';\n }", "public function getToolbarPosition()\n {\n return $this->toolbar['position'];\n }", "function construct_edit_toolbar($text = '', $ishtml = 0, $forumid = 0, $allowsmilie = 1, $parsesmilie = 1, $can_attach = false, $editor_type = 'fe', $force_editorid = '')\n{\n\t// standard stuff\n\tglobal $vbulletin, $vbphrase, $stylevar, $show;\n\t// templates generated by this function\n\tglobal $messagearea, $smiliebox, $disablesmiliesoption, $checked, $vBeditTemplate;\n\t// misc stuff built by this function\n\tglobal $istyles;\n\n\t// counter for editorid\n\tstatic $editorcount = 0;\n\n\t// determine what we can use\n\t// this was moved up here as I need the switch to determine if bbcode is enabled\n\t// to determine if a toolbar is usable\n\trequire_once(DIR . '/includes/class_bbcode.php');\n\t$show['font_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_FONT) ? true : false;\n\t$show['size_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_SIZE) ? true : false;\n\t$show['color_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_COLOR) ? true : false;\n\t$show['basic_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_BASIC) ? true : false;\n\t$show['align_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_ALIGN) ? true : false;\n\t$show['list_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_LIST) ? true : false;\n\t$show['code_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_CODE) ? true : false;\n\t$show['html_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_HTML) ? true : false;\n\t$show['php_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_PHP) ? true : false;\n\t$show['url_bbcode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_URL) ? true : false;\n\n\tif (empty($forumid))\n\t{\n\t\t$forumid = 'nonforum';\n\t}\n\tswitch($forumid)\n\t{\n\t\tcase 'privatemessage':\n\t\t\t$can_toolbar = $vbulletin->options['privallowbbcode'];\n\t\t\t$show['img_bbcode'] = $vbulletin->options['privallowbbimagecode'];\n\t\t\tbreak;\n\n\t\tcase 'usernote':\n\t\t\t$can_toolbar = $vbulletin->options['unallowvbcode'];\n\t\t\t$show['img_bbcode'] = $vbulletin->options['unallowimg'];\n\t\t\tbreak;\n\n\t\tcase 'calendar':\n\t\t\tglobal $calendarinfo;\n\t\t\t$can_toolbar = $calendarinfo['allowbbcode'];\n\t\t\t$show['img_bbcode'] = $calendarinfo['allowimgcode'];\n\t\t\tbreak;\n\n\t\tcase 'nonforum':\n\t\t\t$can_toolbar = $vbulletin->options['allowbbcode'];\n\t\t\t$show['img_bbcode'] = $vbulletin->options['allowbbimagecode'];\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\t$forum = fetch_foruminfo($forumid);\n\t\t\t$can_toolbar = $forum['allowbbcode'];\n\t\t\t$show['img_bbcode'] = $forum['allowimages'];\n\t\t\tbreak;\n\t}\n\n\t// set the editor mode\n\tif (isset($_REQUEST['wysiwyg']))\n\t{\n\t\t// 2 = wysiwyg; 1 = standard\n\t\t$vbulletin->userinfo['showvbcode'] = $_REQUEST['wysiwyg'] ? 2 : 1;\n\t}\n\t$toolbartype = $can_toolbar ? is_wysiwyg_compatible(-1, $editor_type) : 0;\n\n\t$show['wysiwyg_compatible'] = (is_wysiwyg_compatible(2, $editor_type) == 2);\n\t$show['editor_toolbar'] = ($toolbartype > 0);\n\n\tswitch ($editor_type)\n\t{\n\t\tcase 'qr':\n\t\t\tif ($force_editorid == '')\n\t\t\t{\n\t\t\t\t$editorid = 'vB_Editor_QR';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$editorid = $force_editorid;\n\t\t\t}\n\n\t\t\t$editor_height = 100;\n\n\t\t\t$editor_template_name = 'showthread_quickreply';\n\t\t\tbreak;\n\n\t\tcase 'qe':\n\t\t\tif ($force_editorid == '')\n\t\t\t{\n\t\t\t\t$editorid = 'vB_Editor_QE';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$editorid = $force_editorid;\n\t\t\t}\n\n\t\t\t$editor_height = 100;\n\n\t\t\t$editor_template_name = 'postbit_quickedit';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tif ($force_editorid == '')\n\t\t\t{\n\t\t\t\t$editorid = 'vB_Editor_' . str_pad(++$editorcount, 3, 0, STR_PAD_LEFT);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$editorid = $force_editorid;\n\t\t\t}\n\n\t\t\t// set the height of the editor based on the editor_height cookie if it exists\n\t\t\t$editor_height = $vbulletin->input->clean_gpc('c', 'editor_height', TYPE_UINT);\n\t\t\t$editor_height = ($editor_height > 100) ? $editor_height : 250;\n\n\t\t\t$editor_template_name = ($toolbartype ? 'editor_toolbar_on' : 'editor_toolbar_off');\n\t\t\tbreak;\n\t}\n\n\t// init the variables used by the templates built by this function\n\t$vBeditJs = array(\n\t\t'font_options_array' => '',\n\t\t'size_options_array' => '',\n\t\t'istyle_array' => '',\n\t\t'normalmode' => 'false'\n\t);\n\t$vBeditTemplate = array(\n\t\t'extrabuttons' => '',\n\t\t'clientscript' => '',\n\t\t'fontfeedback' => '',\n\t\t'sizefeedback' => '',\n\t\t'smiliepopup' => ''\n\t);\n\n\t($hook = vBulletinHook::fetch_hook('editor_toolbar_start')) ? eval($hook) : false;\n\n\t// show a post editing toolbar of some sort\n\tif ($show['editor_toolbar'])\n\t{\n\t\tif ($can_attach)\n\t\t{\n\t\t\t$show['attach'] = true;\n\t\t}\n\n\t\t$vBeditJs = construct_editor_js_arrays();\n\n\t\t// get extra buttons... experimental at the moment\n\t\t$vBeditTemplate['extrabuttons'] = construct_editor_extra_buttons($editorid);\n\n\t\tif ($toolbartype == 2)\n\t\t{\n\t\t\t// got to parse the message to be displayed from bbcode into HTML\n\t\t\tif ($text)\n\t\t\t{\n\t\t\t\trequire_once(DIR . '/includes/functions_wysiwyg.php');\n\t\t\t\t$newpost['message'] = parse_wysiwyg_html($text, $ishtml, $forumid, iif($allowsmilie AND $parsesmilie, 1, 0));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$newpost['message'] = '';\n\t\t\t}\n\n\t\t\t$newpost['message'] = htmlspecialchars_uni($newpost['message']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$newpost['message'] = $text;\n\t\t\t// set mode based on cookie set by javascript\n\t\t\t/*$vbulletin->input->clean_gpc('c', COOKIE_PREFIX . 'vbcodemode', TYPE_INT);\n\t\t\t$modechecked[$vbulletin->GPC[COOKIE_PREFIX . 'vbcodemode']] = 'checked=\"checked\"';*/\n\t\t}\n\n\t}\n\telse\n\t{\n\t\t// do not show a post editing toolbar\n\t\t$newpost['message'] = $text;\n\t}\n\n\t// disable smilies option and clickable smilie\n\t$show['smiliebox'] = false;\n\t$smiliebox = '';\n\t$disablesmiliesoption = '';\n\n\tif ($editor_type == 'qr')\n\t{\n\t\t// no smilies\n\t}\n\telse if ($allowsmilie AND $show['editor_toolbar'])\n\t{\n\t\t// deal with disable smilies option\n\t\tif (!isset($checked['disablesmilies']))\n\t\t{\n\t\t\t$vbulletin->input->clean_gpc('r', 'disablesmilies', TYPE_BOOL);\n\t\t\t$checked['disablesmilies'] = iif($vbulletin->GPC['disablesmilies'], 'checked=\"checked\"');\n\t\t}\n\t\teval('$disablesmiliesoption = \"' . fetch_template('newpost_disablesmiliesoption') . '\";');\n\n\t\tif ($toolbartype AND ($vbulletin->options['smtotal'] > 0 OR $vbulletin->options['wysiwyg_smtotal'] > 0))\n\t\t{\n\t\t\t// query smilies\n\t\t\t$smilies = $vbulletin->db->query_read(\"\n\t\t\t\tSELECT smilieid, smilietext, smiliepath, smilie.title,\n\t\t\t\t\timagecategory.title AS category\n\t\t\t\tFROM \" . TABLE_PREFIX . \"smilie AS smilie\n\t\t\t\tLEFT JOIN \" . TABLE_PREFIX . \"imagecategory AS imagecategory USING(imagecategoryid)\n\t\t\t\tORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder\n\t\t\t\");\n\n\t\t\t// get total number of smilies\n\t\t\t$totalsmilies = $vbulletin->db->num_rows($smilies);\n\n\t\t\tif ($totalsmilies > 0)\n\t\t\t{\n\t\t\t\tif ($vbulletin->options['wysiwyg_smtotal'] > 0)\n\t\t\t\t{\n\t\t\t\t\t$show['wysiwygsmilies'] = true;\n\n\t\t\t\t\t// smilie dropdown menu\n\t\t\t\t\t$vBeditJs['smilie_options_array'] = array();\n\t\t\t\t\t$i = 0;\n\t\t\t\t\twhile ($smilie = $vbulletin->db->fetch_array($smilies))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($i++ < $vbulletin->options['wysiwyg_smtotal'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$vBeditJs['smilie_options_array'][\"$smilie[category]\"][] = \"\\t\\t'$smilie[smilieid]' : new Array('\" . addslashes_js($smilie['smiliepath']) . \"', '\" . addslashes_js($smilie['smilietext']) . \"', '\" . addslashes_js($smilie['title']) . \"')\";\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$vBeditJs['smilie_options_array'][\"$smilie[category]\"][] = \"\\t\\t'more' : '\" . addslashes_js($vbphrase['show_all_smilies']) . \"'\\n\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tforeach (array_keys($vBeditJs['smilie_options_array']) AS $category)\n\t\t\t\t\t{\n\t\t\t\t\t\t$vBeditJs['smilie_options_array'][\"$category\"] = \"\\t'\" . addslashes_js($category) . \"' : {\\n\" . implode(\",\\n\", $vBeditJs['smilie_options_array'][\"$category\"]) . \"}\";\n\t\t\t\t\t}\n\t\t\t\t\t$vBeditJs['smilie_options_array'] = \"\\n\" . implode(\",\\n\", $vBeditJs['smilie_options_array']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$show['wysiwygsmilies'] = false;\n\t\t\t\t}\n\n\t\t\t\t// clickable smilie box\n\t\t\t\tif ($vbulletin->options['smtotal'])\n\t\t\t\t{\n\t\t\t\t\t$vbulletin->db->data_seek($smilies, 0);\n\t\t\t\t\t$i = 0;\n\t\t\t\t\t$bits = array();\n\t\t\t\t\twhile ($smilie = $vbulletin->db->fetch_array($smilies) AND $i++ < $vbulletin->options['smtotal'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$smiliehtml = \"<img src=\\\"$smilie[smiliepath]\\\" id=\\\"{$editorid}_smilie_$smilie[smilieid]\\\" alt=\\\"\" . htmlspecialchars_uni($smilie['smilietext']) . \"\\\" title=\\\"$smilie[title]\\\" border=\\\"0\\\" />\";\n\t\t\t\t\t\teval('$bits[] = \"' . fetch_template('editor_smilie') . '\";');\n\n\t\t\t\t\t\tif (sizeof($bits) == $vbulletin->options['smcolumns'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$smiliecells = implode('', $bits);\n\t\t\t\t\t\t\teval('$smiliebits .= \"' . fetch_template('editor_smiliebox_row') . '\";');\n\t\t\t\t\t\t\t$bits = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// fill in empty cells if required\n\t\t\t\t\t$remaining = sizeof($bits);\n\t\t\t\t\tif ($remaining > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$remainingcolumns = $vbulletin->options['smcolumns'] - $remaining;\n\t\t\t\t\t\teval('$bits[] = \"' . fetch_template('editor_smiliebox_straggler') . '\";');\n\t\t\t\t\t\t$smiliecells = implode('', $bits);\n\t\t\t\t\t\teval('$smiliebits .= \"' . fetch_template('editor_smiliebox_row') . '\";');\n\t\t\t\t\t}\n\t\t\t\t\t$show['moresmilieslink'] = iif ($totalsmilies > $vbulletin->options['smtotal'], true, false);\n\t\t\t\t\t$show['smiliebox'] = true;\n\t\t\t\t}\n\n\t\t\t\t$vbulletin->db->free_result($smilies);\n\t\t\t}\n\t\t}\n\t\teval('$smiliebox = \"' . fetch_template('editor_smiliebox') . '\";');\n\t}\n\n\t($hook = vBulletinHook::fetch_hook('editor_toolbar_end')) ? eval($hook) : false;\n\n\teval('$vBeditTemplate[\\'clientscript\\'] = \"' . fetch_template('editor_clientscript') . '\";');\n\n\t$editortype = ($toolbartype == 2 ? 1 : 0);\n\t$show['is_wysiwyg_editor'] = intval($editortype);\n\teval('$messagearea = \"' . fetch_template($editor_template_name) . '\";');\n\n\treturn $editorid;\n}", "function display($tpl = null) \r\n\t{\r\n\r\n\r\n\t\t// Set the document\r\n\t\t$this->setDocument();\r\n\t\t\r\n\t\t// Set the toolbar\r\n\t\t$this->addToolBar();\r\n\r\n\t\t$this->item = $tema;\r\n\t\t\r\n\r\n\t\t// Display the template\r\n\t\tparent::display($tpl);\r\n\t}", "function addVideoScrollableItem($ytid) {\n $ret = \"\";\n $ret = $ret . \"<div>\\n\";\n $ret = $ret . \" <a href=\\\"javascript:void(0)\\\" onClick=\\\"\\$('#bbplayer-video').tubeplayer('play', '$ytid')\\\">\\n\";\n $ret = $ret . \" <img src=\\\"http://img.youtube.com/vi/$ytid/default.jpg\\\" />\\n\";\n $ret = $ret . \" </a>\\n\";\n $ret = $ret . \"</div>\\n\";\n\n echo($ret);\n }", "function bj_editbar() {\n\tob_start(); ?>\n\t\t\t\t\t\t\t<div id=\"editbar\">\r\n\t\t\t\t\t\t\t\t<div class=\"alignleft buttons\">\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button strong\" rel=\"<strong>$</strong>\"><span><?php _e('Strong'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button em\" rel=\"<em>$</em>\"><span><?php _e('Em'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button img\" rel=\"<img src='$' alt='' />\"><span><?php _e('Img'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button bq newline\" rel=\"<blockquote>$</blockquote>\"><span><?php _e('BQ'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button ol newline\" rel=\"<ol>\r\n\t<li>$</li>\r\n</ol>\"><span><?php _e('Ol'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"button ul newline\" rel=\"<ul>\r\n\t<li>$</li>\r\n</ul>\"><span><?php _e('Ul'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"moresep hr\" rel=\"$\r\n\r\n\"><span><?php _e('More'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"alignright updown\">\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"more\" /><span><?php _e('More'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"less\" /><span><?php _e('Less'); ?></span></a>\r\n\t\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div id=\"nonJSedit\"></div>\n<?php\n\t$text = run_actions('bj_editbar',ob_get_contents());\n\tob_end_clean();\n\techo $text;\n}", "private function ToolButton($image, $text, $url, $attributes, $td_attributes = null)\r\n\t\t{\r\n\t\t\tglobal $current_controller;\r\n\t\t\techo \"<td class = '$this->toolButtonCellCssClass' $td_attributes>\";\r\n\t\t\tif ((!isset($url))&&(empty($url)))\r\n\t\t\t\techo \"<a onmouseover='this.style.cursor=\\\"pointer\\\"' $attributes class = '$this->toolButtonLinkCssClass' style = 'background-image: url(/./app/themes/\".$current_controller->theme.\"/images/\".$image.\");background-repeat: no-repeat; background-position:left top;'>$text</a>\";\r\n\t\t\telse echo $this->link($url, $text, \"$attributes class = '$this->toolButtonLinkCssClass' style = 'background-image: url(/./app/themes/\".$current_controller->theme.\"/images/\".$image.\");background-repeat: no-repeat; background-position:left top;'\");\r\n\t\t\techo \"</td>\";\r\n\t\t}", "function show_what($item) {\n if ( $item->active ==1 ) {\n return sprintf('<span style=\"color: red;\">%s</span>','Remove');\n } else {\n return sprintf('<span style=\"color: green;\">%s</span>','Apply');\n }\n }", "function my_toolbars( $toolbars )\n{\n/*\n echo '< pre >';\n print_r($toolbars);\n echo '< /pre >';\n die;\n */\n\n // Add a new toolbar called \"Very Simple\"\n // - this toolbar has only 1 row of buttons\n $toolbars['Very Simple' ] = array();\n $toolbars['Very Simple' ][1] = array('bold' , 'italic' , 'underline', 'link' );\n $toolbars['Chapter' ] = array();\n $toolbars['Chapter' ][1] = array('bold' , 'italic' , 'underline', 'bloc');\n $toolbars['Title' ] = array();\n $toolbars['Title' ][1] = array('bold');\n $toolbars['Code'][2] = array('code');\n\n // Edit the \"Full\" toolbar and remove 'code'\n // - delet from array code from http://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key\n if( ($key = array_search('code' , $toolbars['Full' ][2])) !== false )\n {\n unset( $toolbars['Full' ][2][$key] );\n }\n\n // remove the 'Basic' toolbar completely\n //unset( $toolbars['Basic' ] );\n\n // return $toolbars - IMPORTANT!\n return $toolbars;\n}", "function sf_update_tmtoolbar_blockquote()\n{\n\t$tbrow = array();\n\t$tbrow[0]='default';\n\t$tbrow[1]='user';\n\tforeach($tbrow as $tb)\n\t{\n\t\t$tbmeta = sf_get_sfmeta('tinymce_toolbar', $tb);\n\t\t$buttons = unserialize($tbmeta[0]['meta_value']);\n\t\t$newbuttons = array();\n\n\t\t$found = false;\n\t\t\n\t\t# double check not already there...\n\t\tforeach($buttons['tbar_buttons'] as $button)\n\t\t{\n\t\t\tif($button == 'blockquote') $found=true;\n\t\t}\n\t\t\n\t\tif(!$found)\n\t\t{\n\t\t\tforeach($buttons['tbar_buttons'] as $button)\n\t\t\t{\n\t\t\t\tif($button == 'outdent')\n\t\t\t\t{\n\t\t\t\t\t$newbuttons[]='blockquote';\n\t\t\t\t}\n\t\t\t\t$newbuttons[]=$button;\n\t\t\t}\n\t\t\t$buttons['tbar_buttons']=$newbuttons;\n\t\t\tsf_update_sfmeta('tinymce_toolbar', $tb, serialize($buttons), $tbmeta[0]['meta_id']);\n\t\t}\n\t}\n\treturn;\n}", "protected function addToolbar_Editeventsbb()\n\t{\t\n\t\t//set toolbar items for the page\n\t\tJToolbarHelper::title( JText::_( 'COM_SPORTSMANAGEMENT_ADMIN_MATCH_EEBB_TITLE' ),'events' );\n\t\tJToolbarHelper::apply( 'match.saveeventbb' );\n\t\tJToolbarHelper::divider();\n\t\tJToolbarHelper::back( 'back', 'index.php?option=com_joomleague&view=matches&task=match.display' );\n\t\t//JLToolBarHelper::onlinehelp();\t\n\t}", "public function getLoggedUserbarTpl(){\n return $this->templates['logged_userbar'];\n }", "function print_bouton ($tpl,$balise,$action,$onClick=\"\",$class=\"\",$type=\"\"){\n\n $html=get_bouton_action($action,$onClick,$class,$type);\n if ($tpl && $balise)\n\t $tpl->assignGlobal($balise,$html);\n\n return $html;\n}", "protected function filter_bar_content_template()\n {\n }", "public function getOutput(){\n\t\t$aMenu = $this->mountBar();\n\t\t$aMenu->getOutput();\n\t}", "function tombolDetailPerStore(){\n\t\t//$title= Yii::t('app','Rincian Per-Toko');\n\t\t$title= Yii::t('app','');\n\t\t$url = Url::toRoute(['/dashboard/trafik-per-store']);\n\t\t$options1 = [\n\t\t\t\t\t'id'=>'detail-trafik',\n\t\t\t\t\t//'class'=>\"btn btn-danger btn-xs\",\n\t\t\t\t\t'title'=>'Tampilkan chart Per-Toko'\n\t\t];\n\t\t$icon1 = '<span class=\"fa-stack fa-md text-left\">\n\t\t\t\t <b class=\"fa fa-circle fa-stack-2x\" style=\"color:#ffffff\"></b>\n\t\t\t\t <b class=\"fa fa fa-search-plus fa-stack-1x\" style=\"color:#000000\"></b>\n\t\t\t\t</span>\n\t\t';\n\t\t$label1 = $icon1.' '.$title ;\n\t\t$content = Html::a($label1,$url,$options1);\n\t\treturn $content;\t\t\n\t}", "private function ToolBarSeparator()\r\n\t\t{\r\n\t\t\techo \"<td align = 'left' width ='5'>\";\r\n\t\t\techo $this->img(\"$this->toolbarBackgroundImageName\", 7, 20);\r\n\t\t\techo \"</td>\";\r\n\t\t}", "function generate_tooltip_frame($portion='start')\n{\n\tif($portion == 'start')\n\t{\n\t\t$tiphtml = \"<table border='0' cellspacing='0' cellpadding='0'>\n\t\t<tr><td colspan='3' style='padding-left:12px;padding-bottom:0px;'><img src='\".IMAGE_URL.\"layer_tip.png'></td></tr>\n\t\t\n\t\t<tr><td valign='bottom' style='padding-top:0px;'><img src='\".IMAGE_URL.\"layer_top_left_corner.png'></td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"top_border.png);background-repeat: repeat-x;background-position: center bottom;padding-top:0px;'><img src='\".IMAGE_URL.\"spacer.gif' height='12' width='1'></td>\n\t\t<td valign='bottom' style='padding-top:0px;'><img src='\".IMAGE_URL.\"layer_top_right_corner.png'></td></tr>\n\t\t\n\t\t<tr>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"right_border.png);background-repeat: repeat-y;background-position: right center;'></td>\n\t\t\n\t\t\n\t\t<td>\";\n\t}\n\t\n\telse if($portion == 'end')\n\t{\n\t\t$tiphtml = \"</td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"left_border.png);background-repeat: repeat-y;background-position: left center;'></td>\n\t\t</tr>\n\t\t\n\t\t<tr><td valign='top'><img src='\".IMAGE_URL.\"layer_bottom_left_corner.png'></td>\n\t\t<td style='background-image: url(\".IMAGE_URL.\"bottom_border.png);background-repeat: repeat-x;background-position: center top;'>&nbsp;</td>\n\t\t<td valign='top'><img src='\".IMAGE_URL.\"layer_bottom_right_corner.png'></td></tr>\n\t\t</table>\";\n\t}\n\t\n\treturn $tiphtml;\n}", "function topbar($menuItem, $navItems)\n{\n\n // Contains the nav bar items\n $navItems = array(\n 'Group Target Setter' => '/blocks/group_targets/view2.php',\n 'Change Target Status' => '/blocks/group_targets/set2.php',\n 'Group Profile' => '/blocks/group_targets/group2.php',\n 'Unit Tracker' => '/blocks/group_targets/tracker2.php',\n// 'Import Feeds' => $siteUrl . '/jobshop/feeds/process_feeds.php',\n// 'View Applications' => $siteUrl . '/jobshop/processing/index.php',\n// 'Featured Jobs' => $siteUrl . '/jobshop/slider/index.php',\n );\n\n echo '<div class=\"noprint\">';\n echo '<div class=\"topbar\">';\n echo '<div class=\"topbar-inner\">';\n echo '<div class=\"container-fluid\">';\n echo '<a class=\"brand\" href=\"#\">Group Target Setter v2.0</a>';\n echo '<ul class=\"nav\">';\n //print_r($navItems);\n foreach ($navItems as $key => $item) {\n\n // echo $key . ' ' . $item;\n\n if ($menuItem != $key) {\n $active = '';\n } elseif ($menuItem == $key) {\n $active = ' class=\"active\"';\n }\n\n echo '<li ', $active, '><a href=\"', $item, '\">', $key, '</a></li>';\n }\n\n echo '</ul>';\n // echo '<p class=\"pull-right\">Logged in as <a href=\"#\">username</a></p>';';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n\n}", "function top() {\n return '<div class=\"top\"><a href=\"#credits\">[Top]</a></div>';\n}", "protected function addDisplayToolbar() {\n\t\t$doc = JFactory::getDocument();\n\t\t$doc->addStyleDeclaration('.icon-48-jmap{background-image:url(\"components/com_jmap/images/jmap-48x48.png\")}');\n\t\tJToolBarHelper::title( JText::_('COM_JMAP_CPANEL_TOOLBAR' ), 'jmap' );\n\t\tJToolBarHelper::custom('cpanel.display', 'home', 'home', 'COM_JMAP_CPANEL', false);\n\t}", "public function getMarkup();", "public function getToolbar($active) {\n $toolbar_array = array(\n 'event_list' => array(\n 'text' => 'Event list',\n 'hint' => 'List of all active events',\n 'link' => FRAMEWORK_URL.'/admin/event/list'.self::$usage_param,\n 'active' => ($active == 'event_list')\n ),\n 'event_edit' => array(\n 'text' => 'Event',\n 'hint' => 'Create a new event',\n 'link' => FRAMEWORK_URL.'/admin/event/edit'.self::$usage_param,\n 'active' => ($active == 'event_edit')\n ),\n 'registration' => array(\n 'text' => 'Registrations',\n 'hint' => 'List of all registrations for events',\n 'link' => FRAMEWORK_URL.'/admin/event/registration'.self::$usage_param,\n 'active' => ($active == 'registration')\n ),\n 'propose' => array(\n 'text' => 'Proposes',\n 'hint' => 'List of actual submitted proposes for events',\n 'link' => FRAMEWORK_URL.'/admin/event/propose'.self::$usage_param,\n 'active' => ($active == 'propose')\n ),\n 'contact_list' => array(\n 'text' => 'Contact list',\n 'hint' => 'List of all available contacts (Organizer, Locations, Participants)',\n 'link' => FRAMEWORK_URL.'/admin/event/contact/list'.self::$usage_param,\n 'active' => ($active == 'contact_list')\n ),\n 'contact_edit' => array(\n 'text' => 'Contact',\n 'hint' => 'Create a new contact',\n 'link' => FRAMEWORK_URL.'/admin/event/contact/select'.self::$usage_param,\n 'active' => ($active == 'contact_edit')\n ),\n 'group' => array(\n 'text' => 'Groups',\n 'hint' => 'List of all available event groups',\n 'link' => FRAMEWORK_URL.'/admin/event/group/list'.self::$usage_param,\n 'active' => ($active == 'group')\n ),\n\n 'about' => array(\n 'text' => 'About',\n 'hint' => 'Information about the Event extension',\n 'link' => FRAMEWORK_URL.'/admin/event/about'.self::$usage_param,\n 'active' => ($active == 'about')\n ),\n );\n return $toolbar_array;\n }", "function setCopyElementToolbar()\n\t{\n\t JToolBarHelper::title(JText::_('SELECT_GROUPS_TO_COPY_ELEMENTS_TO') , 'fabrik-element.png');\n\t JToolBarHelper::save('copy');\n\t\tJToolBarHelper::cancel();\n\t}", "protected function addToolbar()\n\t{\n\t\t$user\t= JFactory::getUser();\n\t\t$result\t= new JObject;\n\n\t\t$actions = array(\n\t\t\t'core.admin', 'core.manage'\n\t\t);\n\n\t\tforeach ($actions as $action) {\n\t\t\t$result->set($action, $user->authorise($action, 'com_toes'));\n\t\t}\n\t\t\n\t\t$canDo\t= $result;\n\t\t\n\t\tJToolBarHelper::title(JText::_('COM_TOES'), 'blue-transparant');\n\t\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_toes');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\t}", "private function initToolbar()\n\t{\n\t\t$toolbar_btn = array();\n\t\t$toolbar_btn['save'] = array('href' => '#', 'desc' => $this->l('Save'));\n\t\treturn $toolbar_btn;\n\t}", "public function getAfterElementHtml()\n {\n // here you can write your code.\n $customDiv = '<div style=\"width:600px;height:200px;margin:10px 0;border:2px solid #000\" id=\"customdiv\"><h1 style=\"margin-top: 12%;margin-left:40%;\">Custom Div</h1></div>';\n return $customDiv;\n }", "function wlfw_mobile_top_bttn() {\n\techo '<a class=\"ui-btn-right\" id=\"top\">top</a>';\n}", "public function renderQuickEdit() {}", "function buildTip(){\n\t\treturn $this->builder->insert($this->getParameters());\n\t}", "public function myTooltip() {\n\t\t\n\t\t\n\t\t$this->_textoajuda = Zend_Registry::get('textoajuda');\n\t\t$this->_controller = Zend_Registry::get('pagina');\n\t\t$this->_action = Zend_Registry::get('acao');\n\t\t$tooltip = \"\"; \n\t\t$mysession = new Zend_Session_Namespace ( 'mysession' );\n\t\t$this->acl = $mysession->acl;\n\t\t$auth = Zend_Auth::getInstance();\n\t\tif ($auth->hasIdentity ()) {\n\t\t\t$this->role = $auth->getIdentity ()->username;\n\t\t} else {\n\t\t\t$this->role = 'guest';\n\t\t}\n\t\t$resource = 'ajudas';\n\t\tif (! $this->acl->has ( $resource )) \n\t\t\t$resource = null;\n\t\t\n\t\tif($this->role=='guest' && !$this->acl->hasRole('guest'))\n\t\t\t$this->acl->addRole('guest');\n\t\t\n\t\t\n\t\t\n\t\tif($this->acl->isAllowed($this->role,$resource,'editar') ||\n\t\t\t\t\t!$resource){ \n\t\t\t\t$tooltip= $this->getTooltip();\n\t\t\t\n\t\t}\n\t\treturn $tooltip;\n\t}", "function getToolTipText() {\r\n return $this->_tooltiptext;\r\n }", "function getToolTipText() {\r\n return $this->_tooltiptext;\r\n }", "public static function drawAdminTile()\n {\n ?>\n <div class=\"col-md-4\">\n <div class=\"box box-default\">\n <div class=\"box-header with-border\">\n <h3 class=\"box-title\">Coin Payments</h3>\n </div>\n <div class=\"box-body\" style=\"overflow-x: scroll\">\n <b>Public key: </b><span\n style=\"font-size: 10pt\"><?= h(Configure::read('App.coinPayments.PUBLIC_KEY')) ?></span><br>\n <b>Merchant ID: </b><span\n style=\"font-size: 10pt\"><?= h(Configure::read('App.coinPayments.MERCHANT_ID')) ?></span><br>\n <b>IPN Url: </b><span\n style=\"font-size: 10pt\"><?= h(self::getIPNUrl()) ?></span><br>\n </div>\n </div>\n </div>\n <?php\n }", "function toolBox() { ?>\n\t\t<div class=\"panel panel-default\">\n\t\t\t<div class=\"panel-heading\">\n\t\t\t\t<h3 class=\"panel-title\"><?php $this->msg('toolbox'); ?></h3>\n\t\t\t</div>\n\t\t\t<div class=\"panel-body\">\n\t\t\t\t<ul class=\"nav nav-pills nav-stacked\"><?php\n\t\t\t\t\tforeach ( $this->getToolbox() as $key => $tbitem ) {\n\t\t\t\t\t\techo $this->makeListItem($key, $tbitem);\n\t\t\t\t\t};\n\t\t\t\t\twfRunHooks('MonoBookTemplateToolboxEnd', array(&$this));\n\t\t\t\t\twfRunHooks('SkinTemplateToolboxEnd', array(&$this, true )); ?>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div><?php\n\t}", "public function getBottomToolbarBlock()\n {\n $blockName = self::TOOLBAR_BOTTOM;\n if ($block = $this->getLayout()->getBlock($blockName)) {\n return $block;\n }\n\n $block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());\n return $block;\n }", "function &displayTarea( &$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1, $gpc = false ) {\n $text = &$this->stripSlashesGPC( $text );\n if ( $html != 1 ) {\n // html not allowed\n $text = htmlSpecialChars( $text, ENT_QUOTES );\n }\n $text = $this->codePreConv( $text, $xcode ); // Ryuji_edit(2003-11-18)\n $text = $this->makeClickable( $text );\n if ( $smiley != 0 ) {\n $text = &$this->smiley( $text );\n }\n if ( $xcode != 0 ) {\n $text = &$this->zariliaCodeDecode( $text, $image );\n }\n if ( $br != 0 ) {\n $text = &$this->nl2Br( $text );\n }\n $text = $this->codeConv( $text, $xcode, $image ); // Ryuji_edit(2003-11-18)\n return $text;\n }", "public static function print_editor_title_markup($robot_info, $ability_info, $print_options = array()){\n // Require the function file\n $temp_ability_title = '';\n require(MMRPG_CONFIG_ROOTDIR.'data/classes/ability_editor-title-markup.php');\n // Return the generated option markup\n return $temp_ability_title;\n }", "public function getHtmlTemplate() {}", "function editor_element($params)\n {\n $heading = \"\";\n $template = $this->update_template(\"heading\", \" - <strong>{{heading}}</strong>\");\n if(!empty($params['args']['heading'])) $heading = \"- <strong>\".$params['args']['heading'].\"</strong>\";\n\n $params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n $params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n $params['innerHtml'].= \"<div class='avia-element-label' {$template}>\".$heading.\"</div>\";\n\n return $params;\n }", "protected function addToolbar()\n\t{\n\t\t$app = Factory::getApplication();\n\t\t\n\t\t$this->option = $app->input->get('option', 'com_' . EcConst::getPrefix());\n\t\t$this->canDo = EcHelperAdmin::getActionsEc($this->option);\n\t\t\n\t\tJToolbarHelper::title(Text::_(JString::strtoupper($this->option)), 'stack article');\n\t\t\n\t\tif ($this->canDo->get('core.admin')) {\n\t\t\tJToolbarHelper::divider();\n\t\t\tJToolbarHelper::preferences($this->option);\n\t\t}\n\t}", "function createTooltip(string $text)\n{\n echo '<span class=\"tooltip\"><span class=\"icon\">?</span><span class=\"text\">' . $text . '</span></span>';\n}", "protected function addToolbar(){\n\t\tJRequest::setVar('hidemainmenu', true);\n\t\t$isNew\t\t= ($this->item->id == 0);\n\t\tJToolBarHelper::title($isNew ? JText::_('ADD_coment') : JText::_('EDIT_coment'), 'coment.png');\n\t\tJToolBarHelper::apply('coment.apply');\n\t\tJToolBarHelper::save('coment.save');\n\t\tJToolBarHelper::save2new('coment.save2new');\n\t\t// If an existing item, can save to a copy.\n\t\tif (empty($this->item->id)) {\n\t\t\tJToolBarHelper::cancel('coment.cancel');\n\t\t}\n\t\telse {\n\t\t\tJToolBarHelper::cancel('coment.cancel', 'JTOOLBAR_CLOSE');\n\t\t}\n\t}", "function editor_sub_element($params)\n {\n $template = $this->update_template(\"title\", \"{{title}}\");\n\t\t\t\t //$imgThumb = $this->update_template(\"src\", \"<img width='50px' src='{{src}}'>\");\n\t\t\t\t $imgThumb = $this->update_template(\"img_fakeArg\", \"{{img_fakeArg}}\");\n\t\t\t\t if(is_numeric($params['args']['src'])) {\n\t\t\t\t \t$thumb = isset($params['args']['src']) ? wp_get_attachment_image($params['args']['src']) : \"\";\n\t\t\t\t } else {\n\t\t\t\t \t$thumb = \"<img width='50px' src='\". $params['args']['imgsrc'] .\"'>\";\n\t\t\t\t }\n $params['innerHtml'] = \"\";\n //$params['innerHtml'] .= \"<div {$imgThumb}><img style='float:left; margin-right:5px;' width='90px' src='\".$params['args']['src'].\"'></div>\";\n $params['innerHtml'] .= \"<div {$imgThumb}>\".$thumb.\"</div>\";\n $params['innerHtml'] .= \"<div class='avia_title_container' {$template}>\".$params['args']['title'].\"</div>\";\n $params['innerHtml'] .= \"<div style='clear:both;'></div>\";\n\n return $params;\n }", "public function Render()\n {\n return \"<span class='\".$this->Icone.\"' title='\".$this->Title.\"' onclick=\".$this->OnClick.\" >&nbsp;&nbsp;</span>\";\n }", "protected function addToolbar()\r\n\t{\r\n\t\tJRequest::setVar('hidemainmenu', true);\r\n\t\r\n\t\t$user\t\t= JFactory::getUser();\r\n\t\t$isNew\t\t= ($this->item->room_id == 0);\r\n\t\r\n\t\tJToolBarHelper::title(JText::_('LNG_ROOM',true).\" : \".(!$isNew ? JText::_( \"LNG_EDIT',true): JText::_( \"LNG_ADD_NEW',true)), 'menu.png');\r\n\t\r\n\t\tJToolBarHelper::apply('room.apply');\r\n\t\tJToolBarHelper::save('room.save');\r\n\t\tJToolBarHelper::save2new('room.save2new');\r\n\t\tJToolBarHelper::custom('room.editrateprices', 'stats', 'stats', 'JTOOLBAR_EDIT_RATE_DETAILS',false);\r\n\t\tJToolBarHelper::cancel('room.cancel');\r\n\t\tJToolBarHelper::divider();\r\n\t\tJToolBarHelper::help('JHELP_ROOM_EDIT');\r\n\t}", "protected function addToolbar()\n\t{\n\t\trequire_once JPATH_COMPONENT.'/helpers/wbty_payments.php';\n\n\t\t$state\t= $this->get('State');\n\t\t$canDo\t= Wbty_paymentsHelper::getActions($state->get('filter.category_id'));\n\t\t\n\t\tJToolBarHelper::title(JText::_('COM_WBTY_PAYMENTS_TITLE_CONTROLPANEL'), 'controlpanel.png');\n\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_wbty_payments');\n\t\t}\n\n\t}", "function display($tpl = null)\r\n {\r\n JToolBarHelper::title( JText::_( 'Site Statistic Help' ), 'generic.png' );\r\n parent::display($tpl);\r\n }", "private function renderBottom() {\n\t\t$bottom = '';\n\t\tif ($this->type == 'RSS2') {\n\t\t\t$bottom .= $this->closeTag('channel');\n\t\t\t$bottom .= $this->closeTag('rss');\n\t\t} elseif ($this->type == 'RSS1') {\n\t\t\t$bottom .= $this->closeTag('rdf:RDF');\n\t\t} else if ($this->type == 'Atom') {\n\t\t\t$bottom .= $this->closeTag('feed');\n\t\t}\n\t\treturn $bottom;\n\t}", "public function getQTip() {}", "public function add_quick_view_button_with_text() {\n\t\t\t$options = $this->get_options();\n\t\t\tif ( in_array( $options['shop_page_quick_view_position'], array( 'none', 'top-right' ), true ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tglobal $product;\n\t\t\t$class[] = $options['shop_product_quick_view_icon'] ? apply_filters( 'woostify_pro_quick_view_button_icon', 'ti-eye' ) : '';\n\t\t\t$class[] = 'quick-view-with-text quick-view-on-' . $options['shop_page_quick_view_position'];\n\t\t\t$class = implode( ' ', $class );\n\t\t\t?>\n\n\t\t\t<span title=\"<?php esc_attr_e( 'Quick View', 'woostify-pro' ); ?>\" data-pid=\"<?php echo esc_attr( $product->get_id() ); ?>\" class=\"<?php echo esc_attr( $class ); ?> product-quick-view-btn\"><?php esc_html_e( 'Quick View', 'woostify-pro' ); ?></span>\n\t\t\t<?php\n\t\t}", "function display($tpl = NULL) {\n $items = $this->get('Items');\n\n $this->canDo = LajvITHelper::getEventActions();\n\n if (count($errors = $this->get('Errors'))) {\n JError::raiseError(500, implode('<br />', $errors));\n return FALSE;\n }\n\n $this->items = $items;\n\n $this->addToolBar();\n parent::display($tpl);\n $this->setDocument();\n }", "private function _makeToolbar( $params = null) {\r\n\r\n // Get the JComponent instance of JToolBar\r\n $bar = JToolBar::getInstance('toolbar');\r\n\r\n // add title\r\n $title = Sh404sefHelperGeneral::makeToolbarTitle( JText::_( 'COM_SH404SEF_ALIASES_MANAGER'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title');\r\n JFactory::getApplication()->JComponentTitle = $title;\r\n\r\n // add \"New url\" button\r\n $bar = JToolBar::getInstance('toolbar');\r\n $bar->addButtonPath( JPATH_COMPONENT . '/' . 'classes');\r\n\r\n // add edit button\r\n $params['class'] = 'modaltoolbar';\r\n $params['size'] =array('x' =>800, 'y' => 600);\r\n unset( $params['onClose']);\r\n $url = 'index.php?option=com_sh404sef&c=editalias&task=edit&tmpl=component&view=editurl&startOffset=2';\r\n $bar->appendButton( 'Shpopuptoolbarbutton', 'edit', $url, JText::_( 'Edit'), $msg='', $task='edit', $list = true, $hidemenu=true, $params);\r\n\r\n // add delete button\r\n $params['class'] = 'modaltoolbar';\r\n $params['size'] =array('x' =>500, 'y' => 300);\r\n unset( $params['onClose']);\r\n $url = 'index.php?option=com_sh404sef&c=editalias&task=confirmdelete&tmpl=component';\r\n $bar->appendButton( 'Shpopuptoolbarbutton', 'delete', $url, JText::_( 'Delete'), $msg=JText::_('VALIDDELETEITEMS', true), $task='delete', $list = true, $hidemenu=true, $params);\r\n\r\n // separator\r\n JToolBarHelper::divider();\r\n\r\n // add import button\r\n $params['class'] = 'modaltoolbar';\r\n $params['size'] =array('x' =>500, 'y' => 400);\r\n unset( $params['onClose']);\r\n $url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=import&opsubject=aliases';\r\n $bar->appendButton( 'Shpopuptoolbarbutton', 'import', $url, JText::_( 'COM_SH404SEF_IMPORT_BUTTON'), $msg='', $task='import', $list = false, $hidemenu=true, $params);\r\n\r\n // add import button\r\n $params['class'] = 'modaltoolbar';\r\n $params['size'] =array('x' =>500, 'y' => 300);\r\n unset( $params['onClose']);\r\n $url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=export&opsubject=aliases';\r\n $bar->appendButton( 'Shpopuptoolbarbutton', 'export', $url, JText::_( 'COM_SH404SEF_EXPORT_BUTTON'), $msg='', $task='export', $list = false, $hidemenu=true, $params);\r\n\r\n // separator\r\n JToolBarHelper::divider();\r\n \r\n // edit home page button\r\n $params['class'] = 'modalediturl';\r\n $params['size'] =array('x' =>800, 'y' => 600);\r\n $js= '\\\\function(){window.parent.shAlreadySqueezed = false;if(window.parent.shReloadModal) parent.window.location=\\''. $this->defaultRedirectUrl .'\\';window.parent.shReloadModal=true}';\r\n $params['onClose'] = $js;\r\n $bar->appendButton( 'Shpopupbutton', 'home', JText::_( 'COM_SH404SEF_HOME_PAGE_ICON'), \"index.php?option=com_sh404sef&c=editalias&task=edit&view=editurl&home=1&tmpl=component&startOffset=1\", $params);\r\n\r\n // separator\r\n JToolBarHelper::divider();\r\n\r\n }", "function setElementsToolbar()\n\t{\n\t\tJToolBarHelper::title(JText::_('ELEMENTS'), 'fabrik-element.png');\n\t\tJToolBarHelper::customX('addToTableView', 'publish.png', 'publish_f2.png', JText::_('ADD TO TABLE VIEW'));\n\t\tJToolBarHelper::customX('removeFromTableView', 'unpublish.png', 'unpublish_f2.png', JText::_('REMOVE FROM TABLE VIEW'));\n\t\tJToolBarHelper::publishList();\n\t\tJToolBarHelper::unpublishList();\n\t\tJToolBarHelper::customX('copySelectGroup', 'copy.png', 'copy_f2.png', 'Copy');\n\t\tJToolBarHelper::deleteList('', 'checkRemove');\n\t\tJToolBarHelper::editListX();\n\t\tJToolBarHelper::addNewX();\n\t}", "protected function addToolbar()\n\t{\n\t\tif (!$this->edit)\n\t\t{\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_CLUB_ADD_NEW'),'jl-clubs');\n\t\t\tJLToolBarHelper::save('club.save');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('club.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// for existing items the button is renamed `close` and the apply button is showed\n\t\t\tJToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_CLUB_EDIT'). ': ' . $this->form->getValue('name'), 'jl-clubs');\n\t\t\tJLToolBarHelper::apply('club.apply');\n\t\t\tJLToolBarHelper::save('club.save');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('club.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\t\n\t\tJToolBarHelper::help('screen.joomleague',true);\n\t}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function editor_element($params)\n {\n $params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n $params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n $params['content'] \t = NULL; //remove to allow content elements\n\n return $params;\n }", "function extra_tablenav( $which ) {\n\t\t\n\t\tif( $which == 'top' ) {\n\t\t\t\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"alignleft actions bdpp-style-list-act\">';\n\t\t\t\n\t\t\t// Action for third party filter\n\t\t\tob_start();\n\t\t\tdo_action( 'bdpp_style_list_filter' );\n\t\t\t$html .=ob_get_clean();\n\t\t\t\n\t\t\t$html .= '</div><!-- end .bdpp-style-list-act -->';\n\t\t\t\n\t\t\techo $html;\n\t\t}\n\t}", "function qodef_re_marker_info_template() {\n\n $html = '<script type=\"text/template\" class=\"qodef-info-window-template\">\n\t\t\t\t<div class=\"qodef-info-window\">\n\t\t\t\t\t<div class=\"qodef-info-window-inner\">\n\t\t\t\t\t\t<a href=\"<%= itemUrl %>\"></a>\n\t\t\t\t\t\t<% if ( featuredImage ) { %>\n\t\t\t\t\t\t\t<div class=\"qodef-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\t<div class=\"qodef-info-window-details\">\n\t\t\t\t\t\t\t<h5>\n\t\t\t\t\t\t\t\t<%= title %>\n\t\t\t\t\t\t\t</h5>\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</div>\n\t\t\t\t</div>\n\t\t\t</script>';\n\n print bridge_qode_get_module_part($html);\n\n }", "function STOMT($pagename,\n $widgetType = 'addTab',\n $position = 'right',\n $label = 'Quick Feedback',\n $colorText = '#ffffff',\n $colorBackground ='#000000',\n $colorHover = '#ccc') {\n\n\n // To keep it compatible with older PHP versions we make use of array() instead of []\n $config = array(\n 'targetId' => $pagename,\n 'position' => $position,\n 'label' => $label,\n 'colorText' => $colorText,\n 'colorBackground' => $colorBackground,\n 'colorHover' => $colorHover\n );\n\n echo \"<script>\n // Include the STOMT JavaScript SDK\n (function(w, d, n, r, t, s){\n w.Stomt = w.Stomt||[];\n t = d.createElement(n);\n s = d.getElementsByTagName(n)[0];\n t.async=1;\n t.src=r;\n s.parentNode.insertBefore(t,s);\n })(window, document, 'script', 'https://www.stomt.com/widget.js');\n \n Stomt.push(['\".$widgetType.\"', \".json_encode($config).\"]);\n </script>\";\n}", "function original_tweet_button_sc() {\n\t\treturn '<div sytle=\"margin:5px\"><script src=\"http://platform.twitter.com/widgets.js\" type=\"text/javascript\"></script><a href=\"http://twitter.com/share\" class=\"twitter-share-button\">Tweet</a></div>';\n}", "function blocs_BarreTypo($tr) {\r\n\treturn $tr.'<tr><td>'._T('couteauprive:blocs:nom').' (en projet)</td></tr>';\r\n}", "public function toolbar($value) {\n return $this->setProperty('toolbar', $value);\n }", "function ativaEtiquetas($item)\n\t{\n\t\tif(!$this->layer){return \"erro\";}\n\t\t$this->layer->setmetadata(\"IDENTIFICA\",\"\");\n\t\t$this->layer->setmetadata(\"TIP\",$item);\n\t\treturn(\"ok\");\n\t}", "function template_titlebar($params,&$smarty)\n {\n global $links;\n\n extract($params);\n\n $colspan = empty($colspan) ? 1 : $colspan;\n $title = empty($title) ? \"&nbsp;\" : $title;\n\n $buffer = \"<tr><td class=\\\"titlebar\\\" colspan=\\\"$colspan\\\">$title</td></tr>\\n\";\n\n if (is_array($links) and count($links) > 0) {\n $buffer .= '<tr><td class=\"subtitle\" colspan=\"'.$colspan.'\">';\n foreach ($links as $link) {\n $buffer .= '[&nbsp;';\n $buffer .= '<a href=\"'.$link['url'].'\">';\n if (!empty($link['img'])) {\n $buffer .= '<img src=\"'.$link['img'].'\" width=\"16\" height=\"16\" border=\"0\" alt=\"'.$link['txt'].'\" />&nbsp;';\n }\n $buffer .= $link['txt'];\n $buffer .= '</a>&nbsp;]';\n }\n $buffer .= '</td></tr>';\n $links = array();\n }\n\n return $buffer;\n }", "public abstract function getDatasetPopupHtml():string;", "function to_html():string{\n return $this->name.$this->progress_bar_html();\n }", "function BeforeShowView(&$xt, &$templatefile, &$values, &$pageObject)\n{\n\n\t\t$xt->assign(\"bg_edit\",\"style=\\\"background-color:\" . $values[\"Color\"].\";\\\"\");\n;\t\t\n}", "public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Ensure tab title\r\n\t\t// Do shortcode\r\n\t\tforeach($data['tabs'] as $index=>$tab) {\r\n\t\t\t$ttl = trim(str_replace(\"\\n\", '', $tab['title']));\r\n\t\t\tif (empty($ttl)) {\r\n\t\t\t\t$tab['title'] = 'Tab ' . ($index + 1);\r\n\t\t\t}\r\n\t\t\t$tab['content'] = $this->_do_shortcode($tab['content']);\r\n\t\t\t$data['tabs'][$index] = $tab;\r\n\t\t}\r\n\r\n\t\tif (!$data['preset']) {\r\n\t\t\t$data['preset'] = 'default';\r\n\t\t}\r\n\r\n\t\t$data['wrapper_id'] = str_replace('utabs-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('utabs', $data, dirname(dirname(__FILE__)) . '/tpl/utabs.html');\r\n\r\n\t\t// upfront_add_element_style('upfront_tabs', array('css/utabs.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('upfront_tabs', array('js/utabs-front.js', dirname(__FILE__)));\r\n\r\n\t\treturn $markup;\r\n\t}", "protected function addToolbar() {\n JFactory::getApplication()->input->set('hidemainmenu', true);\n\n $user = JFactory::getUser();\n $isNew = ($this->item->id == 0);\n if (isset($this->item->checked_out)) {\n $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));\n } else {\n $checkedOut = false;\n }\n\n JToolBarHelper::title(JText::_('COM_CHARTIIB_TITLE_HIERARCHY'), 'generic');\n\n JToolBarHelper::custom('hierarchy.enregistrer', 'save.png', 'save.png', 'JTOOLBAR_SAVE', false);\n \n if (empty($this->item->id)) {\n JToolBarHelper::cancel('hierarchy.cancel', 'JTOOLBAR_CANCEL');\n } else {\n JToolBarHelper::cancel('hierarchy.cancel', 'JTOOLBAR_CLOSE');\n }\n }", "function bp_forum_extras_bbcode_buttons() { \r\n\tglobal $bp;\r\n\r\n\t$tags = bp_forum_extras_filter_allowedtags();\r\n\t\r\n\techo \"<scr\".\"ipt type='text/javascript' defer='defer'>\r\n\t\tfunction BBcodeButtons_init() {\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_bold','B','[b]','[/b]','b','font-weight:bold;','bold'));\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_italic','I','[i]','[/i]','i','padding-right:7px;font-style:italic;','italics'));\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_under','U','[u]','[/u]','u','text-decoration:underline;','underline'));\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_strike','S','[s]','[/s]','s','text-decoration:line-through;','strike through'));\r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_link','URL','','[/url]','a','text-decoration:underline;','make a link')); \r\n\t\tBBcodeButtons.push(new BBcodeButton('ed_block','&#147;quote&#148;','[quote]','[/quote]','q','padding:0 1px 1px 1px;','quote'));\";\r\n\r\n\tif (isset($tags['img'])) {\r\n\t\techo \"BBcodeButtons.push(new BBcodeButton('ed_img','IMG','[img]','[/img]','m',-1));\";\r\n\t}\r\n\t\r\n\tif (bb_get_option( 'bp_sc_bbcode_buttons')) {\r\n\t\techo \"BBcodeButtons.push(new BBcodeButton('ed_ul','UL','[ul]','[/ul]','u','','unordered list')); BBcodeButtons.push(new BBcodeButton('ed_ol','OL','[ol]','[/ol]','o','','ordered list')); BBcodeButtons.push(new BBcodeButton('ed_li','LI','[li]','[/li]','l','','list item'));\";\t\r\n\t} else {\r\n\t\techo \"BBcodeButtons.push(new BBcodeButton('ed_ul','UL','[list]','[/list]','u','','unordered list')); BBcodeButtons.push(new BBcodeButton('ed_ol','OL','[list=1]','[/list]','o','','ordered list')); BBcodeButtons.push(new BBcodeButton('ed_li','LI','[*]','[/*]','l','','list item'));\";\t\r\n\t}\r\n\t\r\n\tif (isset($tags['center'])) {\r\n\t\techo \"BBcodeButtons.push(new BBcodeButton('ed_center','center','[center]','[/center]','c','','center'));\";\r\n\t}\t\r\n\r\n\techo \"BBcodeButtons.push(new BBcodeButton('ed_code','CODE','[code]','[/code]','p','line-height:160%;font-size:80%;letter-spacing:1px;font-family:anadale,serif;','unformatted / code')); BBcodeButtons.push(new BBcodeButton('ed_close','close','','','c',' ','auto-close any tags you left open')); }</scr\".\"ipt>\";\r\n\r\n}", "abstract public function textPopover(array $options = array());" ]
[ "0.66419727", "0.62184584", "0.6081764", "0.6010538", "0.6010538", "0.59614855", "0.59530634", "0.58817", "0.5866838", "0.58459294", "0.5840475", "0.58308464", "0.5825823", "0.5732892", "0.57314974", "0.5625061", "0.55560875", "0.5516693", "0.54597133", "0.5399503", "0.5392493", "0.5372526", "0.5350599", "0.534469", "0.53278416", "0.53271204", "0.5263913", "0.5260056", "0.52527434", "0.52501714", "0.5227054", "0.52238256", "0.52057636", "0.5197758", "0.5194255", "0.51912147", "0.51790696", "0.5170323", "0.51589966", "0.5144296", "0.51202905", "0.5094713", "0.50898474", "0.50895643", "0.50888747", "0.5080757", "0.50634193", "0.5048032", "0.5044912", "0.5036053", "0.50322855", "0.5031688", "0.5029555", "0.5024858", "0.5023887", "0.5017597", "0.50151867", "0.50138545", "0.5009945", "0.49985602", "0.49863106", "0.49863106", "0.49831095", "0.49772307", "0.49693725", "0.4964767", "0.49607912", "0.49373004", "0.49330533", "0.49288455", "0.49247256", "0.49243483", "0.49086264", "0.49066997", "0.49066234", "0.4903173", "0.48817307", "0.48746532", "0.48738673", "0.48724857", "0.48693782", "0.48654592", "0.48648697", "0.48646867", "0.4862145", "0.48607877", "0.4860346", "0.48588786", "0.48570475", "0.48543862", "0.48471123", "0.4847077", "0.48464388", "0.48340783", "0.48310882", "0.48283783", "0.48269227", "0.48260045", "0.48236609", "0.4820564", "0.48187017" ]
0.0
-1
prueba de query a.email, b.id, b.user_id, b.name, b.language, b.location, b.meta, b.courseware, b.gender, b.mailing_address, b.year_of_birth, b.level_of_education, b.goals, b.allow_certificate, b.country, b.city
public function queryUsuario($value) { $sql = 'select a.email, b.id, b.gender, b.mailing_address, b.year_of_birth, b.level_of_education, b.country from auth_user a, auth_userprofile b where a.email = ? and a.id = b.user_id;'; $sqlQuery = new SqlQuery($sql); $sqlQuery->set($value); $result = QueryExecutor::execute($sqlQuery); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_profile_details($user_id)\n {\n $sql = \"SELECT u.id as user_id, \n u.profile_code,\n u.bio_info,\n u.created_at as register_date,\n u.email,\n u.last_name,\n u.first_name,\n ub.middlename,\n u.fullname_last_edited,\n uc.address,\n rc.name as country,\n (case u.gender\n when 'N' then CONCAT('Others','',u.gender_custom)\n when 'F' then 'Female'\n when 'M' then 'Male'\n else ''\n end) 'gender',\n u.gender_num_times_edited,\n ub.birthday,\n u.birthyear,\n u.birthdate_num_times_edited,\n ub.politics as political_view,\n ub.religion,\n rb.name as bloodtype,\n uc.contact1,\n uc.contact2,\n uc.contact3,\n uc.webtitle1, \n uc.weblink1, \n uc.webtitle2, \n uc.weblink2,\n uc.webtitle3, \n uc.weblink3,\n coalesce(a.comments,0) + coalesce(b.discussion,0)as total_comments,\n coalesce(m.friends,0) as total_friends,\n coalesce(n.followers,0) as total_followers,\n coalesce(o.following,0) as total_following,\n coalesce(c.post,0) as total_post,\n coalesce(c.image,0) as total_images,\n coalesce(c.poll,0) as total_poll,\n coalesce(c.question,0) as total_question,\n coalesce(c.article,0) as total_article,\n (coalesce(d.yaycontent,0) + coalesce(e.yaycomment,0) + coalesce(f.yayreply,0) + coalesce(g.yayreplyl2,0) + coalesce(h.yayreplyl3,0) + coalesce(i.yaydiscussion,0) + coalesce(j.yaytopicreply,0) + coalesce(k.yaytopicreplyl2,0) + coalesce(l.yaytopicreplyl3,0)) as totalyayreceived,\n (coalesce(d.naycontent,0) + coalesce(e.naycomment,0) + coalesce(f.nayreply,0) + coalesce(g.nayreplyl2,0) + coalesce(h.nayreplyl3,0) + coalesce(i.naydiscussion,0) + coalesce(j.naytopicreply,0) + coalesce(k.naytopicreplyl2,0) + coalesce(l.naytopicreplyl3,0)) as totalnayreceived,\n us.credential_type,\n us.credential_refid,\n (case us.credential_type\n when 1 then ugen.general_info\n when 2 then CONCAT(ucol.course, ', ', ucol.schoolname)\n when 3 then CONCAT(uwork.position, ', ', uwork.companyname,', ',uwork.location)\n end) 'credential',\n\t (coalesce(ugen2.total,0) + coalesce(ucol2.total,0) + coalesce(uwork2.total,0)) as total_credentials\n FROM users u\n LEFT JOIN userbasicinfo ub ON u.id = ub.user_id\n LEFT JOIN usercontactinfo uc ON uc.user_id = u.id\n LEFT JOIN refcountry rc ON rc.id = uc.country \n LEFT JOIN refbloodtype rb ON rb.id = ub.bloodtype\n LEFT OUTER JOIN(SELECT po.user_id, \n count(*) comments\n FROM postopinion po\n WHERE po.deleted_at IS NULL AND po.mask= 0\n GROUP BY po.user_id) as a ON a.user_id = u.id\t\n LEFT OUTER JOIN(SELECT top_o.user_id,\n count(*) discussion\n FROM topicopinion top_o\n WHERE top_o.deleted_at IS NULL AND top_o.mask=0\n GROUP BY top_o.user_id) as b ON b.user_id = u.id \n LEFT OUTER JOIN (select pc.user_id,\n sum(Case when type = 'F' then 1 else 0 end) image,\n sum(Case when type = 'Q' then 1 else 0 end) question,\n sum(Case when type = 'A' then 1 else 0 end) article,\n sum(Case when type = 'P' then 1 else 0 end) poll,\n count(*) post\n FROM postcontent pc\n WHERE pc.deleted_at IS NULL and pc.mask=0\n GROUP BY pc.user_id) as c ON c.user_id = u.id \n LEFT OUTER JOIN (select pca.postcontent_id, pc.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycontent,\n sum(Case when approvalrate = 'N' then 1 else 0 end) naycontent\n FROM postcontentapprovalrate pca\n LEFT JOIN postcontent pc ON pc.id=pca.postcontent_id\n WHERE pc.deleted_at IS NULL AND pc.mask=0\n GROUP BY pc.user_id) as d ON d.user_id = u.id\n LEFT OUTER JOIN (select poa.postopinion_id, po.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycomment,\n sum(Case when approvalrate = 'N' then 1 else 0 end) naycomment\n FROM postopinionapprovalrate poa\n LEFT JOIN postopinion po ON po.id = poa.postopinion_id\n LEFT JOIN postcontent pc ON pc.id=po.postcontent_id\n WHERE pc.deleted_at IS NULL AND po.deleted_at IS NULL AND po.mask=0\n GROUP BY po.user_id) as e ON e.user_id = u.id\n LEFT OUTER JOIN (select pra.postreply_id, pra.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yayreply,\n sum(Case when approvalrate = 'N' then 1 else 0 end) nayreply\n FROM postreplyapprovalrate pra\n LEFT JOIN postreply pr ON pr.id = pra.postreply_id\n LEFT JOIN postopinion po ON po.id = pr.postopinion_id\n LEFT JOIN postcontent pc ON pc.id=po.postcontent_id\n WHERE pc.deleted_at IS NULL AND po.deleted_at IS NULL \n AND pr.deleted_at IS NULL AND pr.mask=0\n GROUP BY pr.user_id) as f ON f.user_id = u.id\n LEFT OUTER JOIN (select pral2.postreplyL2_id, pral2.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yayreplyl2,\n sum(Case when approvalrate = 'N' then 1 else 0 end) nayreplyl2\n FROM postreplyL2approvalrate pral2\n LEFT JOIN postreplyL2 pr2 ON pr2.id = pral2.postreplyL2_id\n LEFT JOIN postreply pr ON pr.id = pr2.postreply_id\n LEFT JOIN postopinion po ON po.id = pr.postopinion_id\n LEFT JOIN postcontent pc ON pc.id=po.postcontent_id\n WHERE pc.deleted_at IS NULL AND po.deleted_at IS NULL \n AND pr.deleted_at IS NULL AND pr2.deleted_at AND pr2.mask=0\n GROUP BY pr2.user_id) as g ON g.user_id = u.id\n LEFT OUTER JOIN (select pral3.postreplyL3_id, pral3.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yayreplyl3,\n sum(Case when approvalrate = 'N' then 1 else 0 end) nayreplyl3\n FROM postreplyL3approvalrate pral3\n LEFT JOIN postreplyL3 pr3 ON pr3.id = pral3.postreplyL3_id\n LEFT JOIN postreplyL2 pr2 ON pr2.id = pr3.postreplyL2_id\n LEFT JOIN postreply pr ON pr.id = pr2.postreply_id\n LEFT JOIN postopinion po ON po.id = pr.postopinion_id\n LEFT JOIN postcontent pc ON pc.id=po.postcontent_id\n WHERE pc.deleted_at IS NULL AND po.deleted_at IS NULL \n AND pr.deleted_at IS NULL AND pr2.deleted_at \n AND pr3.deleted_at IS NULL AND pr3.mask=0\n GROUP BY pr3.user_id) as h ON h.user_id = u.id\n LEFT OUTER JOIN (select toa.topicopinion_id, ton.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaydiscussion,\n sum(Case when approvalrate = 'N' then 1 else 0 end) naydiscussion\n FROM topicopinionapprovalrate toa\n LEFT JOIN topicopinion ton ON ton.id = toa.topicopinion_id\n LEFT JOIN topic t ON t.id=ton.topic_id\n WHERE t.deleted_at IS NULL AND ton.deleted_at IS NULL AND ton.mask=0\n GROUP BY ton.user_id) as i ON i.user_id = u.id\n LEFT OUTER JOIN (select tra.topicreply_id, tra.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaytopicreply,\n sum(Case when approvalrate = 'N' then 1 else 0 end) naytopicreply\n FROM topicreplyapprovalrate tra\n LEFT JOIN topicreply tr ON tr.id = tra.topicreply_id\n LEFT JOIN topicopinion ton ON ton.id = tr.topicopinion_id\n LEFT JOIN topic t ON t.id=ton.topic_id\n WHERE t.deleted_at IS NULL AND ton.deleted_at IS NULL \n AND tr.deleted_at IS NULL AND tr.mask=0\n GROUP BY tr.user_id) as j ON j.user_id = u.id\n LEFT OUTER JOIN (select tral2.topicreplyl2_id, tral2.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaytopicreplyl2,\n sum(Case when approvalrate = 'N' then 1 else 0 end) naytopicreplyl2\n FROM topicreplyl2approvalrate tral2\n LEFT JOIN topicreplyl2 tr2 ON tr2.id = tral2.topicreplyl2_id\n LEFT JOIN topicreply tr ON tr.id = tr2.topicreply_id\n LEFT JOIN topicopinion ton ON ton.id = tr.topicopinion_id\n LEFT JOIN topic t ON t.id=ton.topic_id\n WHERE t.deleted_at IS NULL AND ton.deleted_at IS NULL \n AND tr.deleted_at IS NULL AND tr2.deleted_at IS NULL AND tr2.mask=0\n GROUP BY tr2.user_id) as k ON k.user_id = u.id\n LEFT OUTER JOIN (select tral3.topicreplyl3_id, tral3.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaytopicreplyl3,\n sum(Case when approvalrate = 'N' then 1 else 0 end) naytopicreplyl3\n FROM topicreplyl3approvalrate tral3\n LEFT JOIN topicreplyl3 tr3 ON tr3.id = tral3.topicreplyl3_id\n LEFT JOIN topicreplyl2 tr2 ON tr2.id = tr3.topicreplyl2_id\n LEFT JOIN topicreply tr ON tr.id = tr2.topicreply_id\n LEFT JOIN topicopinion ton ON ton.id = tr.topicopinion_id\n LEFT JOIN topic t ON t.id=ton.topic_id\n WHERE t.deleted_at IS NULL AND ton.deleted_at IS NULL \n AND tr.deleted_at IS NULL AND tr2.deleted_at IS NULL \n AND tr3.deleted_at IS NULL AND tr3.mask=0\n GROUP BY tr3.user_id) as l ON l.user_id = u.id\n LEFT OUTER JOIN(SELECT uf.user_one_id, \n count(*) friends\n FROM userfriends uf\n WHERE uf.status=1\n GROUP BY uf.user_one_id) as m ON m.user_one_id = u.id\t\n LEFT OUTER JOIN(SELECT ua.user_two_id, \n count(*) followers\n FROM useracquiantances ua\n WHERE ua.status=1\n GROUP BY ua.user_two_id) as n ON n.user_two_id = u.id\n LEFT OUTER JOIN(SELECT ua2.user_one_id, \n count(*) following\n FROM useracquiantances ua2\n WHERE ua2.status=1\n GROUP BY ua2.user_one_id) as o ON o.user_one_id = u.id\n LEFT JOIN usersettings us on us.user_id = u.id\n LEFT JOIN usergeneralinfo ugen ON ugen.user_id = us.user_id AND ugen.id = us.credential_refid\n LEFT JOIN usereduccollege ucol ON ucol.user_id = us.user_id AND ucol.id = us.credential_refid\n LEFT JOIN userworkhistory uwork ON uwork.user_id = us.user_id AND uwork.id = us.credential_refid\n LEFT OUTER JOIN (SELECT usergeneralinfo.user_id,\n COUNT(*) total\n FROM usergeneralinfo\n GROUP BY usergeneralinfo.user_id) as ugen2 ON ugen2.user_id = u.id\n LEFT OUTER JOIN (SELECT usereduccollege.user_id,\n COUNT(*) total\n FROM usereduccollege\n GROUP BY usereduccollege.user_id) as ucol2 ON ucol2.user_id = u.id\n LEFT OUTER JOIN (SELECT userworkhistory.user_id,\n COUNT(*) total\n FROM userworkhistory\n GROUP BY userworkhistory.user_id) as uwork2 ON uwork2.user_id = u.id\n WHERE u.id = {$user_id}\";\n \n return DB::select(DB::raw($sql));\n }", "function user_viewed_company_query($user_id='', $viewing_type='', $company_id=\"\",$lebel=\"\")\n\t{\n\t\t$sql = \"SELECT MAX(UVC.viewing_date) AS viewing_date,\n\t\t\t\tUVC.id, UVC.user_id, UVC.company_id, UVC.viewing_type, \n\t\t\t\tIF(CU.users_profilepic IS NULL OR CU.users_profilepic = '', 'no_company_logo.png', CU.users_profilepic)AS users_profilepic,\n\t\t\t\tU.users_firstname, U.users_lastname, \n\t\t\t\tC.company_name, C.company_logo,\n\t\t\t\tfnStripTags(CU.users_bio) AS users_bio, CU.users_id AS company_user_id, CU.users_bio AS full_com_desc,\n\t\t\t\t IF(CU.users_phone IS NULL OR CU.users_phone = '', 'N/A', CU.users_phone) AS users_phone, \n\t\t\t\thia_cities.name AS city_name, hia_states.name AS state_name, hia_countries.name AS country_name\n\t\t\t\tFROM hia_user_view_company AS UVC\n\t\t\t\tJOIN hia_users AS U ON( UVC.user_id = U.users_id )\n\t\t\t\tJOIN hia_company AS C ON (UVC.company_id = C.company_id)\n\t\t\t\tJOIN hia_users AS CU ON( C.company_id = CU.users_companyid AND CU.users_type = '2' AND CU.users_status != '1')\n\t\t\t\tLEFT JOIN hia_cities ON (CU.users_city = hia_cities.id)\n\t\t\t\tLEFT JOIN hia_states ON (CU.users_state = hia_states.id)\n\t\t\t\tLEFT JOIN hia_countries ON (CU.users_country = hia_countries.id)\n\t\t\t\tWHERE U.users_type != '3'\n\t\t\t\tAND U.users_status != '1' \n\t\t\t\tAND UVC.company_id NOT IN (SELECT company_id FROM hia_user_following_company WHERE user_id = '$user_id' AND following_type = 'user') \";\n\n\t\tif ($viewing_type != \"\") {\n\t\t\t$sql.= \" AND UVC.viewing_type = '$viewing_type' \";\n\t\t}\n\t\t\t\t\n\t\tif ($user_id != \"\") {\n\t\t\t$sql.= \" AND UVC.user_id = '$user_id' \";\n\t\t}\n\t\t\t\t\n\t\t// if ($company_id != \"\") {\n\t\t// \t$sql.= \" AND UVC.company_id = '$company_id' \";\n\t\t// }\n\n\t\tif ($company_id != \"\") {\t\t\t\n\t\t\tif($lebel == 'next'){\n\t\t\t\t$sql.= \" AND CU.users_id > '$company_id' \";\t\t\t\t\n\t\t\t}\n\t\t\tif($lebel == 'prev'){\n\t\t\t\t$sql.= \" AND CU.users_id < '$company_id' \";\t\t\t\t \n\t\t\t}\n\t\t}\n\n\t\t// if($lebel == 'next'){\n\t\t// \t$sql.= \" GROUP BY UVC.company_id \";\t\n\t\t// }\n\t\tif($lebel == 'prev'){\n\t\t\t$sql.= \" GROUP BY UVC.company_id order by UVC.company_id DESC \";\t\n\t\t}else{\n\t\t\t$sql.= \" GROUP BY UVC.company_id \";\t\n\t\t}\n\t\t//echo $sql;exit;\n\n\t\tif ( ! $this->db->simple_query($sql))\n\t\t{\n\t\t\t$error = $this->db->error();\n\t\t\t//print_r($error);\n\t\t\t//exit();\n\t\t\treturn $error;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $this->db->query($sql);\n\t\t\t\n\t\t\treturn $query->result_array();\n\t\t}\n\t\t\n\t}", "public function getAllUserProfilesByAdvanceSearch($request,$gender) {\n extract($request);\n $sql = \"SELECT * FROM user_profile_tab,user_tab WHERE user_tab.user_id = user_profile_tab.user_id AND user_tab.user_gender != '$gender' \";\n\n if ($language != '') {\n $sql .= \"AND user_profile_tab.user_mother_tongue = '$language' \";\n }\n if ($religion != '') {\n $sql .= \"AND user_tab.user_caste = '$religion' \";\n }\n if ($filter_aged_from != '') {\n $sql .= \"AND DATEDIFF(CURRENT_DATE, user_profile_tab.user_dob) >= ('$filter_aged_from' * 365.25) \";\n }\n if ($filter_aged_to != '') {\n $sql .= \"AND DATEDIFF(CURRENT_DATE, user_profile_tab.user_dob) <= ('$filter_aged_to' * 365.25) \";\n }\n if ($maritalStatus != '') {\n $sql .= \"AND user_profile_tab.user_marital_status = '$maritalStatus'\";\n }\n\n if ($country != '') {\n $countryName = '';\n $countryId = '';\n $countries = explode(\"/\", $country);\n $countryName = $countries[0]; // piece1\n $countryId = $countries[1]; // piece2\n $sql .= \"AND user_profile_tab.user_country = '$countryName' \";\n }\n\n if ($state != '') {\n $stateName = '';\n $stateId = '';\n $states = explode(\"/\", $state);\n $stateName = $states[0]; // piece1\n $stateId = $states[1]; // piece2\n $sql .= \"AND user_profile_tab.user_state = '$stateName' \";\n }\n if ($city != '') {\n $sql .= \"AND user_profile_tab.user_city = '$city' \";\n }\n// if ($filter_member_id != '') {\n// $sql .= \"AND user_profile_tab.user_profile_key = '$filter_member_id' \";\n// }\n if ($working_field != '') {\n $sql .= \"AND user_profile_tab.user_working_field = '$working_field' \";\n }\n if ($occupation != '') {\n $sql .= \"AND user_profile_tab.user_occupation_type = '$occupation' \";\n }\n if ($education != '') {\n $sql .= \"AND user_profile_tab.user_education_field = '$education' \";\n }\n if ($max_height != '') {\n $sql .= \"AND user_profile_tab.user_height <= '$max_height' \";\n }\n if ($min_height != '') {\n $sql .= \"AND user_profile_tab.user_height >= '$min_height' \";\n }\n if ($from_weight != '') {\n $sql .= \"AND user_profile_tab.user_weight >= '$from_weight' \";\n }\n if ($to_weight != '') {\n $sql .= \"AND user_profile_tab.user_weight <= '$to_weight' \";\n }\n if ($from_salary != '') {\n $sql .= \"AND user_profile_tab.user_annual_income >= '$from_salary' \";\n }\n if ($to_salary != '') {\n $sql .= \"AND user_profile_tab.user_annual_income <= '$to_salary' \";\n }\n $sql .= \"AND user_tab.user_status='1' AND user_tab.user_doc_verified='1' ORDER BY user_tab.user_id DESC\";\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n return false;\n } else {\n return $result->result_array();\n }\n }", "public function getAllWithUsers()\n {\n $sql = \"SELECT \n a.id as 'adid',\n a.userid as 'userid',\n a.title as 'adtitle',\n u.name as 'username'\n from advertisements a \n left join users u ON a.userid = u.id;\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "function get_all_data_active($institution_id){\n\t\t$sql = \"SELECT a.*, b.priviledge_name as akses FROM endusers as a\n\t\t\t\tLEFT JOIN priviledge_list as b \n\t\t\t\tON (a.pvg_id = b.id)\n\t\t\t\tWHERE a.status = 'A' AND user_group_id ='1'\n\t\t\t\tORDER BY id DESC\";\n\t\t$query = $this->db->query($sql)->result();\n\t\treturn $query;\n\t}", "function getBiodata($email)\n\t{\n\t\t$where = array('kunct_email' => $email, 'kunct_stat' => 'ON');\n\t\t$this->db->where($where);\n\t\treturn $this->db->get('user')->result();\n\t}", "function find_all_user(){\n global $db;\n $results = array();\n $sql = \"SELECT u.id,u.clave,u.nivel_usuario,u.status,u.ultimo_login,u.name,u.IdDepartamento,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.nivel_usuario ORDER BY u.clave ASC\";\n $result = find_by_sql($sql);\n return $result;\n}", "function user_viewed_by_company_query($company_id='', $viewing_type='', $user_id=\"\", $current_user_id=\"\", $short_type='')\n\t{\n\t\t$sql = \"SELECT MAX(UVC.viewing_date) AS viewing_date, UVC.user_id AS next_user_id,\n\t\t\t\tUVC.id, UVC.user_id, UVC.company_id, UVC.viewing_type, \n\t\t\t\tU.users_firstname, U.users_lastname, IF(U.users_profilepic IS NULL OR U.users_profilepic = '', 'admin-no-image.png', U.users_profilepic)AS users_profilepic,\n\t\t\t\t SUBSTRING_INDEX(U.users_bio, ' ', 4) AS users_bio,\n\t\t\t\t IF(U.users_phone IS NULL OR U.users_phone = '', 'N/A', U.users_phone) AS users_phone, \n\t\t\t\thia_cities.name AS city_name, hia_states.name AS state_name, hia_countries.name AS country_name,\n\t\t\t\tUFC.id AS following_id\n\t\t\t\tFROM hia_user_view_company AS UVC\n\t\t\t\tJOIN hia_users AS U ON( UVC.user_id = U.users_id )\n\t\t\t\t\n\t\t\t\tLEFT JOIN hia_cities ON (U.users_city = hia_cities.id)\n\t\t\t\tLEFT JOIN hia_states ON (U.users_state = hia_states.id)\n\t\t\t\tLEFT JOIN hia_countries ON (U.users_country = hia_countries.id)\n\t\t\t\tLEFT JOIN hia_user_following_company AS UFC ON(U.users_id = UFC.user_id AND UFC.company_id = '$company_id' AND UFC.following_type = 'user' )\n\t\t\t\tWHERE U.users_type != '3'\n\t\t\t\tAND U.users_status != '1' \n\t\t\t\tAND UVC.user_id NOT IN (SELECT user_id FROM hia_user_following_company WHERE company_id = '$company_id' AND following_type = 'company') \";\n\n\t\tif ($viewing_type != \"\") {\n\t\t\t$sql.= \" AND UVC.viewing_type = '$viewing_type' \";\n\t\t}\n\t\t\t\t\n\t\tif ($user_id != \"\") {\n\t\t\t$sql.= \" AND UVC.user_id = '$user_id' \";\n\t\t}\n\t\t\t\t\n\t\tif ($company_id != \"\") {\n\t\t\t$sql.= \" AND UVC.company_id = '$company_id' \";\n\t\t}\n\n\t\tif ($current_user_id != \"\" && $short_type=='next') {\n\t\t\t$sql.= \" AND UVC.user_id > '$current_user_id' \";\n\t\t}\n\t\tif ($current_user_id != \"\" && $short_type=='prev') {\n\t\t\t$sql.= \" AND UVC.user_id < '$current_user_id' \";\n\t\t}\n\n\t\t$sql.= \" GROUP BY UVC.user_id \";\t\n\n\t\t//echo $sql;\n\t\tif ( $short_type=='prev') {\n\t\t\t$sql.= \" ORDER BY UVC.user_id DESC \";\n\t\t}\n\t\telse {\n\t\t\t$sql.= \" ORDER BY UVC.user_id ASC \";\n\t\t}\n\n\n\n\n\t\tif ( ! $this->db->simple_query($sql))\n\t\t{\n\t\t\t$error = $this->db->error();\n\t\t\t//print_r($error);\n\t\t\t//exit();\n\t\t\treturn $error;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $this->db->query($sql);\n\t\t\t\n\t\t\treturn $query->result_array();\n\t\t}\n\t\t\n\t}", "function company_following_user_query( $company_id=\"\", $following_type='', $user_id, $current_user_id=\"\", $short_type='' )\n\t{\n\t\t//echo $current_user_id.\"<br>\";\n\t\t$sql = \"SELECT UFC.id, UFC.user_id, UFC.company_id, UFC.following_date, UFC.following_type, UFC.user_id AS next_user_id,\n\t\t\t\tU.users_firstname, U.users_lastname, \n\t\t\t\tIF(U.users_profilepic IS NULL OR U.users_profilepic = '', 'no-image.png', U.users_profilepic)AS users_profilepic,\n\t\t\t\tfnStripTags(U.users_bio) AS users_bio, IF(U.users_phone IS NULL OR U.users_phone = '', 'N/A', U.users_phone) AS users_phone, U.users_current_employer,U.users_current_title,\n\t\t\t\thia_cities.name AS city_name, hia_states.name AS state_name, hia_countries.name AS country_name,\n\t\t\t\tUCV.company_id AS viewing_company_id, UCV.id AS viewing_id, UCV.viewing_date AS max_view_date\n\t\t\t\tFROM hia_user_following_company AS UFC\n\t\t\t\tJOIN hia_users AS U ON( UFC.user_id = U.users_id )\n\t\t\t\tLEFT JOIN hia_cities ON (U.users_city = hia_cities.id)\n\t\t\t\tLEFT JOIN hia_states ON (U.users_state = hia_states.id)\n\t\t\t\tLEFT JOIN hia_countries ON (U.users_country = hia_countries.id)\n\t\t\t\tLEFT JOIN \n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT id, user_id, company_id, viewing_type, MAX(viewing_date) AS viewing_date \n\t\t\t\t\t\tFROM hia_user_view_company WHERE company_id = '$company_id' AND viewing_type = 'company'\n\t\t\t\t\t\tGROUP BY user_id\n\t\t\t\t\t\t\n\t\t\t\t\t) UCV ON (U.users_id = UCV.user_id AND UCV.company_id = '$company_id' )\n\t\t\t\tWHERE U.users_type != '3'\n\t\t\t\tAND U.users_status != '1'\n\t\t\t\tAND U.company_type != '1' \";\n\n\t\tif ($following_type != \"\") {\n\t\t\t$sql.= \" AND UFC.following_type = '$following_type' \";\n\t\t}\n\t\t\t\t\n\t\tif ($user_id != \"\") {\n\t\t\t$sql.= \" AND UFC.user_id = '$user_id' \";\n\t\t}\n\t\t\t\t\n\t\tif ($company_id != \"\") {\n\t\t\t$sql.= \" AND UFC.company_id = '$company_id' \";\n\t\t}\n\t\tif ($current_user_id != \"\" && $short_type =='next') {\n\t\t\t$sql.= \" AND UFC.user_id > '$current_user_id' \";\n\t\t}\n\t\tif ($current_user_id != \"\" && $short_type =='prev') {\n\t\t\t$sql.= \" AND UFC.user_id < '$current_user_id' \";\n\t\t}\n\t\t\n\n\t\tif ( $short_type=='prev') {\n\t\t\t$sql.= \" ORDER BY UFC.user_id DESC \";\n\t\t}\n\t\telse {\n\t\t\t$sql.= \" ORDER BY UFC.user_id ASC \";\n\t\t}\n\t\t//echo $sql;exit;\n\n\t\tif ( ! $this->db->simple_query($sql))\n\t\t{\n\t\t\t$error = $this->db->error();\n\t\t\t//print_r($error);\n\t\t\t//exit();\n\t\t\treturn $error;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $this->db->query($sql);\n\t\t\t\n\t\t\treturn $query->result_array();\n\t\t}\n\t\t\n\t}", "public function get_user_businessdata($user_id,$field=null)\n {\n\t\t$this->db->select('advertisements.*,cities.name as city_name,areas.name as area_name');\n\t\tif($field=='id'){\n\t\t\t$this->db->where('advertisements.id',$user_id);\n\t\t}\n\t\telse{\n\t\t\t$this->db->where('advertisements.user_id',$user_id);\t\n\t\t}\n\t\t$this->db->from('advertisements');\n\t\t$this->db->join('cities','cities.id=advertisements.city_id','left');\n\t\t$this->db->join('areas','areas.id=advertisements.area_id','left');\n\t\t$query = $this->db->get();\t\t\t\n\t\t$result=$query->row_array(); \n\t\tif(!empty($result))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function get_person_who_not_fill_regional()\n {\n $all_submit = DB::table('users')\n ->join('profiles', 'users.id', '=', 'profiles.user_id')\n ->join('achievement_bests', 'users.id', '=', 'achievement_bests.user_id')\n ->join('me_and_fims', 'users.id', '=', 'me_and_fims.user_id')\n ->join('personalities', 'users.id', '=', 'personalities.user_id')\n ->where([['profiles.city', NULL],['users.final_submit', 1]])->get();\n\n\n // ->paginate(20);\n\n\n foreach ($all_submit as $key => $value) {\n $usersd = User::where('email', $value->email)->first();\n\n $validation = $this->user_validation($usersd['email']);\n\n if ($validation['null'] <4) {\n if ($usersd) {\n # code...\n $usersd->send_broadcast = 1; // regional\n $usersd->save();\n }\n }\n\n }\n\n dd(\"success-bro\");\n\n return response()->json([\n 'user_data' => $all_submit,\n 'code' => 200,\n ]);\n }", "function getResults(){\n\t\t//$nombre,$apellido,$ciudad,$provincia,$areas,$pais\n\t\t$db = $this->getDbo();\n\n\t\t$nombre = JFactory::getApplication()->input->getString('txtNombre');\n\t\t$apellido = JFactory::getApplication()->input->getString('txtApellido');\n\t\t$ciudad = JFactory::getApplication()->input->getString('txtCiudad');\n\t\t$provincia = JFactory::getApplication()->input->getString('txtProvincia');\n\t\t//$areas = JFactory::getApplication()->input->getString('txtProvincia');\n\t\t$pais = JFactory::getApplication()->input->getString('txtPais');\n\n\t\t$query = \"\n\t\t\tSELECT\n\t\t\t\tCONCAT(u.name, ' ', cp.zv_apellidopadre,' ', cp.zv_apellidomadre) AS name,\n\t\t\t\tu.name AS firstname,\n\t\t\t\tu.email AS email,\n\t\t\t\tcp.zv_apellidopadre AS apellidopadre,\n\t\t\t\tcp.zv_apellidomadre AS apellidomadre,\n\t\t\t\tCONCAT(cp.zv_apellidopadre,' ',cp.zv_apellidomadre) AS apellidos,\n\t\t\t\tcp.zv_telefono AS telefono,\n\t\t\t\tcp.zv_direccion AS direccion,\n\t\t\t\tcp.zv_direccionnumero AS numero,\n\t\t\t\tCONCAT(cp.zv_direccion,' ', cp.zv_direccionnumero) AS direccionCompleta,\n\t\t\t\tcp.zv_perfilacadmico AS perfil,\n\t\t\t\tIF(INSTR(cp.zv_autorizodivulgarmisdatosporalap,'instituc')>0,\n\t\t\t\t\tcp.zv_institucion ,-1)AS institucion\n\t\t\t\t,\n\t\t\t\tcp.zv_areainteres AS areas,\n\t\t\t\tcp.zv_direccionprovincia AS provincia,\n\t\t\t\tcp.user_id AS id\n\n\t\t\tFROM zv_zvcadastramento cp\n\t\t\tLEFT JOIN zv_users u ON cp.user_id = u.id\n\n\t\t\tWHERE\n\t\t\t\tcp.zv_socio = 1 AND\n\t\t\t\tu.name != 'administrator' AND\n\t\t\t\tIF(INSTR(cp.zv_autorizodivulgarmisdatosporalap,'nombre')>0,\n\t\t\t\t\tIF('' != '\".$nombre.\"',\n\t\t\t\t\t\tu.name like '%\".$nombre.\"%'\n\t\t\t\t\t,u.name like '%%')\n\t\t\t\t\tAND\n\t\t\t\t\tIF('' != '\".$apellido.\"',\n\t\t\t\t\t\tcp.zv_apellidomadre like '%\".$apellido.\"%'\n\t\t\t\t\t\t\t\tOR cp.zv_apellidopadre like '%\".$apellido.\"%'\n\t\t\t\t\t\t\t,cp.zv_apellidomadre like '%%'\n\t\t\t\t\t\t\t\tOR cp.zv_apellidopadre like '%%'\n\t\t\t\t\t\t\t)\n\n\t\t\t\t,'')\n\t\t\t\t\tAND\n\n\t\t\t\t\tIF('' != '\".$ciudad.\"',\n\t\t\t\t\t\tcp.zv_direccionciudad like '%\".$ciudad.\"%'\n\t\t\t\t\t,cp.zv_direccionciudad like '%%')\n\n\t\t\t\t\tAND\n\n\t\t\t\t\tIF('' != '\".$provincia.\"',\n\t\t\t\t\t\t\tcp.zv_direccionprovincia like '%\".$provincia.\"%'\n\t\t\t\t\t,cp.zv_direccionprovincia like '%%')\n\n\t\t\t\t\tAND\n\n\t\t\t\t\tIF('' != '\".$pais.\"',\n\t\t\t\t\t\t\tcp.zv_direccionpais like '%\".$pais.\"%'\n\t\t\t\t\t,cp.zv_direccionpais like '%%')\n\n\t\t\t\";\n\n\t\t/*\n\t\tforeach($areas as $area){\n\t\t\tforeach($fields as $field){\n\t\t\t\tif($field->fieldvalueid == $area){\n\t\t\t\t\t$query.=\n\t\t\t\t\t\t\"AND\n\t\t\t\t\t\t\tIF(INSTR(cp.zv_autorizodivulgarmisdatosporalap,'reas de inter') > 0,\n\t\t\t\t\t\t\t\tcp.zv_areainteres like'%\".$field->fieldtitle.\"%'\n\t\t\t\t\t\t\t,'')\";\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\n\t\t$query .= \" ORDER BY name\";\n\n\n\t\t$users = $this->_getList($query);\n\n\t\treturn $users;\n\t}", "function suggeted_company_for_user_query($user_id='', $view_status = '', $follow_status='', $next_company='',$lebel ='')\n\t{\n\t\t$sql = \"SELECT COM_MATCH.company_id, COM_MATCH.company_name, COM_MATCH.company_life_friendly, \n\t\t\t\tCOM_MATCH.company_logo, COM_MATCH.contact_person, COM_MATCH.about, COM_MATCH.address, COM_MATCH.phone, \n\t\t\t\tfnStripTags(CU.users_bio) AS users_bio, CU.users_id AS company_user_id, CU.users_bio AS full_com_desc,\n\t\t\t\tIF(CU.users_profilepic IS NULL OR CU.users_profilepic = '', 'no_company_logo.png', CU.users_profilepic)AS users_profilepic,\n\t\t\t\tIF(CU.users_phone IS NULL OR CU.users_phone = '', 'N/A', CU.users_phone) AS users_phone, \n\t\t\t\thia_cities.name AS city_name, hia_states.name AS state_name, hia_countries.name AS country_name,\n\t\t\t\tSUM(COM_MATCH.jobfit_status) AS jobfit_status, SUM( COM_MATCH.employeefit_status ) AS employeefit_status, SUM( COM_MATCH.location_status ) AS location_status,\n\t\t\t\tSUM( COM_MATCH.industry_status ) AS industry_status, SUM( COM_MATCH.area_status ) AS area_status,\n\t\t\t\tUCV.company_id AS viewing_company_id, UCV.id AS viewing_id, UCV.viewing_date AS max_view_date\n\t\t\t\tFROM(\n\t\t\t\t\tSELECT DISTINCT COM.*, 1 AS jobfit_status, 0 AS employeefit_status, 0 AS location_status, 0 AS industry_status, 0 AS area_status\n\t\t\t\t\tFROM hia_company AS COM\n\t\t\t\t\tJOIN hia_users AS USR ON (COM.company_id = USR.users_companyid AND USR.users_type = '2' AND USR.company_type != '1')\n\t\t\t\t\tJOIN hia_type_user_rel AS TUR ON (USR.users_id = TUR.type_rel_userid AND TUR.type_rel_category IN('job_fit') )\n\t\t\t\t\tJOIN hia_users AS USR1 ON ( USR1.users_id = '$user_id')\n\t\t\t\t\tJOIN hia_type_user_rel AS TUR1 ON (USR1.users_id = TUR1.type_rel_userid AND TUR1.type_rel_category IN('job_fit') AND TUR.type_id = TUR1.type_id)\n\t\t\t\t\t\n\t\t\t\t\tUNION\n\t\t\t\t\tSELECT DISTINCT COM.*, 0 AS jobfit_status, 1 AS employeefit_status, 0 AS location_status, 0 AS industry_status, 0 AS area_status\n\t\t\t\t\tFROM hia_company AS COM\n\t\t\t\t\tJOIN hia_users AS USR ON (COM.company_id = USR.users_companyid AND USR.users_type = '2' AND USR.company_type != '1')\n\t\t\t\t\tJOIN hia_type_user_rel AS TUR ON (USR.users_id = TUR.type_rel_userid AND TUR.type_rel_category IN('employer_fit') )\n\t\t\t\t\tJOIN hia_users AS USR1 ON ( USR1.users_id = '$user_id')\n\t\t\t\t\tJOIN hia_type_user_rel AS TUR1 ON (USR1.users_id = TUR1.type_rel_userid AND TUR1.type_rel_category IN('employer_fit') AND TUR.type_id = TUR1.type_id)\n\t\t\t\t\t \n\t\t\t\t\tUNION\n\t\t\t\t\tSELECT DISTINCT COM.*, 0 AS jobfit_status, 0 AS employeefit_status, 1 AS location_status, 0 AS industry_status, 0 AS area_status\n\t\t\t\t\tFROM hia_company AS COM\n\t\t\t\t\tJOIN hia_users AS USR ON (COM.company_id = USR.users_companyid AND USR.users_type = '2' AND USR.company_type != '1')\n\t\t\t\t\tJOIN hia_users AS USR1 ON ( USR1.users_id = '$user_id' AND USR.users_city = USR1.users_city )\n\t\t\t\t\t\n\t\t\t\t\tUNION\n\t\t\t\t\tSELECT DISTINCT COM.*, 0 AS jobfit_status, 0 AS employeefit_status, 0 AS location_status, 1 AS industry_status, 0 AS area_status\n\t\t\t\t\tFROM hia_company AS COM\n\t\t\t\t\tJOIN hia_users AS USR ON (COM.company_id = USR.users_companyid AND USR.users_type = '2' AND USR.company_type != '1')\n\t\t\t\t\tJOIN hia_industry_user_relation AS IUR ON (USR.users_id = IUR.users_id )\n\t\t\t\t\tJOIN hia_users AS USR1 ON ( USR1.users_id = '$user_id')\n\t\t\t\t\tJOIN hia_industry_user_relation AS IUR1 ON (USR1.users_id = IUR1.users_id AND IUR.industry_id = IUR1.industry_id)\n\t\t\t\t\t \n\t\t\t\t\tUNION\n\t\t\t\t\tSELECT DISTINCT COM.*, 0 AS jobfit_status, 0 AS employeefit_status, 0 AS location_status, 0 AS industry_status, 1 AS area_status\n\t\t\t\t\tFROM hia_company AS COM\n\t\t\t\t\tJOIN hia_users AS USR ON (COM.company_id = USR.users_companyid AND USR.users_type = '2' AND USR.company_type != '1')\n\t\t\t\t\tJOIN hia_assign_industry AS IUR ON (USR.users_id = IUR.userid )\n\t\t\t\t\tJOIN hia_users AS USR1 ON ( USR1.users_id = '$user_id')\n\t\t\t\t\tJOIN hia_assign_industry AS IUR1 ON (USR1.users_id = IUR1.userid AND IUR.area_id = IUR1.area_id)\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t) COM_MATCH\n\t\t\t\t\tJOIN hia_users AS CU ON( COM_MATCH.company_id = CU.users_companyid AND CU.users_type = '2' AND CU.users_status != '1' AND CU.company_type != '1')\n\t\t\t\t\tLEFT JOIN hia_cities ON (CU.users_city = hia_cities.id)\n\t\t\t\t\tLEFT JOIN hia_states ON (CU.users_state = hia_states.id)\n\t\t\t\t\tLEFT JOIN hia_countries ON (CU.users_country = hia_countries.id)\n\t\t\t\t\tLEFT JOIN \n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT id, user_id, company_id, viewing_type, MAX(viewing_date) AS viewing_date \n\t\t\t\t\t\tFROM hia_user_view_company WHERE user_id = '$user_id' AND viewing_type = 'user'\n\t\t\t\t\t\tGROUP BY company_id\n\t\t\t\t\t\t\n\t\t\t\t\t) UCV ON ( COM_MATCH.company_id = UCV.company_id )\n\t\t\t\tWHERE COM_MATCH.company_id NOT IN (SELECT company_id FROM hia_user_following_company WHERE user_id = '$user_id' AND following_type = 'user') \t\n\t\t\t\t\n\t\t\t\" ;\n\n\t\tif ($view_status == \"NO\") {\n\t\t\t$sql.= \" AND COM_MATCH.company_id NOT IN (SELECT company_id FROM hia_user_view_company WHERE user_id = '$user_id' AND viewing_type = 'user') \";\n\t\t}\n\t\tif ($next_company != \"\") {\n\t\t\t\n\t\t\tif($lebel == 'next'){\n\t\t\t\t$sql.= \" AND CU.users_id > '$next_company' \";\n\t\t\t}\n\t\t\tif($lebel == 'prev'){\n\t\t\t\t$sql.= \" AND CU.users_id < '$next_company' \";\n\t\t\t}\n\t\t}\n\n\t\t// if($lebel == 'next'){\n\t\t// \t$sql.=\" GROUP BY COM_MATCH.company_id \";\n\t\t// }\n\t\tif($lebel == 'prev'){\n\t\t\t$sql.=\" GROUP BY COM_MATCH.company_id order by COM_MATCH.company_id DESC \";\n\t\t}else{\n\t\t\t$sql.=\" GROUP BY COM_MATCH.company_id \";\n\t\t}\n\n\n\t\t//echo $sql;exit;\t\t\n\t\tif ( ! $this->db->simple_query($sql))\n\t\t{\n\t\t\t$error = $this->db->error();\n\t\t\t//print_r($error);\n\t\t\t//exit();\n\t\t\treturn $error;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $this->db->query($sql);\n\t\t\t\n\t\t\treturn $query->result_array();\n\t\t}\n\t\t\n\t}", "function GetBirthdays($location_id){\n\t//Building the query\n\t$stringBuilder = \"SELECT b.*, u.first_name, u.insertion, u.last_name, u.birthday, c.name, c.background_color, f.location, f.`type` \";\n\t$stringBuilder .= \"FROM birthday b \";\n\t$stringBuilder .= \"INNER JOIN `user` u ON u.user_id=b.user_id \";\n\t$stringBuilder .= \"LEFT JOIN category c ON c.category_id=b.category_id \";\n\t$stringBuilder .= \"LEFT JOIN `file` f ON f.file_id=u.file_id \";\t\n\t$stringBuilder .= \"WHERE u.location=? \";\n\t// Preparing query\n\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t$query->execute(array($location_id)); //Putting in the parameters\n\t$result = $query->fetchAll(); //Fetching it\n\treturn $result;\n}", "function queryRicercaAvanzata ($info_utente, $hobby){\r\n \r\n // condizione dell'info utente\r\n $cond_info_utente = '';\r\n $cond_hobby = '';\r\n \r\n foreach ($info_utente as $key => $value) {\r\n if($value != 'NULL'){\r\n $cond_info_utente .= $key . '=' . $value . ' AND ';\r\n } \r\n }\r\n \r\n //considero il caso cui siano stati inseriti hobby nella ricerca\r\n //in caso affermativo viene aggiunta la condizione per gli hobby\r\n if(!empty($hobby)){\r\n foreach ($hobby as $key => $value) {\r\n $cond_hobby .= 'tipo_hobby' . '=' . $value . ' OR '; \r\n } \r\n $condizione = (trim($cond_info_utente . '(' . $cond_hobby , 'OR ')) . ')'; \r\n }\r\n // nel caso gli hobby non siano stati inseriti ripulisco la condizione togliendo and finali e \r\n // considero solo come condizione le info utente\r\n else{\r\n $condizione = trim($cond_info_utente , 'AND ');\r\n }\r\n \r\n $sql = 'SELECT email_utente, nickname, utente_esperto, utente_seguito, utente_seguace, path_img_profilo, data_ora_richiesta, ' .\r\n 'richiesta_accettata, data_ora_risposta ' . \r\n 'FROM (utente NATURAL JOIN info_utente ) LEFT OUTER JOIN seguaci_seguiti ' . \r\n 'ON email_utente = utente_seguito AND utente_seguace =' . \r\n \"'\" . $_SESSION['email_utente'] . \"' \" .\r\n 'WHERE email_utente IN (' .\r\n 'SELECT email_utente ' .\r\n 'FROM info_utente NATURAL LEFT OUTER JOIN hobby ' .\r\n 'WHERE ' . $condizione . ')'; \r\n\r\n return $sql;\r\n}", "function find_all_user(){\n global $db;\n $results = array();\n $sql = \"SELECT u.id,u.name,u.username,u.user_level,u.status,u.last_login,email,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.user_level ORDER BY u.name ASC\";\n $result = find_by_sql($sql);\n return $result;\n }", "function peoples($array=''){\n\t$order='';$limit='LIMIT 0,50';$where='1';\n\t$uid=$_SESSION['ws-tags']['ws-user']['id'];\n\t// $from='users u';\n\t$from='(select *, TIMESTAMPDIFF(YEAR, date_birth, CURDATE()) AS age from users) u';\n\t//se comento el email para evitar robo de emails en el sitio, se debe evitar mostral email en cualquier vista o json\n\t$select=' DISTINCT\n\t\tu.id AS id,\n\t\tCONCAT(u.`name`,\" \",u.last_name) AS name_user,\n\t\tu.username AS username,\n\t\tu.description,\n\t\t--u.email as email,\n\t\tu.country as id_country,\n\t\tu.profile_image_url AS photo_friend,\n\t\tmd5(CONCAT(u.id,\"_\",u.email,\"_\",u.id)) AS code_friend,\n\t\tif(u.show_my_birthday<2,u.age,0) AS age,\n\t\tc.name AS country,\n\t\tu.friends_count,\n\t\tu.following_count,\n\t\tu.followers_count,\n\t\tul.id_user AS follower\n\t';\n\t$from.=\"\n\t\tLEFT JOIN (SELECT id, name FROM countries) c ON c.id=u.country\n\t\tLEFT JOIN (SELECT id_friend, id_user,is_friend FROM users_links) ul ON (ul.id_friend=u.id AND ul.id_user='$uid')\n\t\";\n\tif(isset($array['select'])){\t\t$select.=$array['select']; }\n\telseif(isset($array['newSelect'])){\t$select=$array['newSelect']; }\n\tif (isset($array['from'])){\t\t\t$from=$array['from']; }\n\telseif(isset($array['join'])){\t\t$from.=$array['join']; }\n\tif (isset($array['where'])){\t\t$where=$array['where']; }\n\tif (isset($array['limit'])){\t\t$limit=$array['limit']; }\n\tif (isset($array['order'])){\t\t$order=$array['order']; }\n\t$sql=\"SELECT $select FROM $from WHERE $where $order $limit\";\n\tif(isset($_GET['debug']) && isset($_GET['return'])) return '<pre>'.$sql.'</pre>';\n\telseif(isset($_GET['debug'])) echo '<div><pre>'.$sql.'</pre></div>';\n\t$users=CON::query($sql);\n\treturn $users;\n}", "public function getAll($id_user)\r\n\t{\r\n\r\n\t\t$sql = new Sql($this->dbAdapter);\r\n\t\t$select = $sql->select();\r\n\t\t$select->from('users');\r\n\t\t$select->columns(array('id', 'email'));\r\n\t\r\n\t\t$select->join(array('u_d' => 'users_details'),'users.id = u_d.id_user', array('id_user','name','surname', 'campus', 'phone', 'addres','image','pin','key_inventory'), 'Left');\r\n\r\n\t\t$select->join(array('a_u'=>'addresses_users'),'users.id = a_u.id_users', array('postalcode'), 'Left');\r\n\r\n\t\t$select->where(array('users.id' =>$id_user ));\r\n\r\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result=$execute->toArray(); \r\n\r\n\t\t//echo \"<pre>\";print_r($result);exit;\r\n\t\treturn $result;\r\n\r\n\t}", "public function index(Request $request)\n {\n\n // QUERY PARA NOMBRE\n\n if ($request->nombre_filtro && $request->nombre != \" \") {\n\n $query1= \"briefs.nombre LIKE '%$request->nombre%'\";\n\n }else{\n\n $query1= \"briefs.nombre LIKE '%$request->nombre%'\";\n\n }\n\n // QUERY PARA FECHA DE COMIENZO DE GESTION\n\n if ($request->fecha_comienzo && $request->fecha_comienzo != \" \") {\n\n $query2= \"AND briefs.fecha_comienzo LIKE '%$request->fecha_comienzo%'\";\n\n }else{\n\n $query2= \" \";\n\n }\n\n // QUERY PARA PM ASIGNADO\n\n if ($request->pm_asignado && $request->pm_asignado != \" \") {\n\n $query3= \"AND users.nombres LIKE '%$request->pm_asignado%'\";\n\n }else{\n\n $query3= \" \";\n\n }\n\n // QUERY PARA ESTADO\n\n if ($request->estado && $request->estado != \" \") {\n\n $query4= \"AND briefs.estado LIKE '%$request->estado%'\";\n\n }else{\n\n $query4= \" \";\n\n }\n\n // ORDENAMIENTOS\n\n if ($request->nombre_ord && $request->nombre_ord != \" \") {\n\n $columna= 'briefs.nombre';\n $ord= $request->nombre_ord;\n\n }elseif($request->fecha_ord && $request->fecha_ord != \" \"){\n\n $columna= 'briefs.fecha_comienzo';\n $ord= $request->fecha_ord;\n\n }else{\n\n $columna= 'briefs.nombre';\n $ord= 'ASC';\n\n }\n\n // LIMITE\n\n $offset= ((int)$request->pagina) * 10;\n\n $listBriefs= Brief::\n leftjoin('users','users.id','=','briefs.pm_asignado')\n ->selectRaw(\\DB::raw('\n briefs.id,\n briefs.nombre,\n DATE_FORMAT(briefs.fecha_comienzo, \"%d-%m-%Y\") as fecha_comienzo,\n users.nombres as nombres_pm,\n users.apellidos as apellidos_pm,\n briefs.estado\n '))\n ->whereRaw(\\DB::raw($query1 . \" \" . $query2 . \" \" . $query3 . \" \" . $query4 . \"AND briefs.eliminado = 0\"))\n ->orderBy($columna, $ord)\n ->offset($offset)\n ->limit(10)\n ->get();\n\n return response()->json($listBriefs);\n\n\n }", "public function getAllUsers(){\n $stmt = $this->databaseConnection->prepare(\"SELECT users.login, users.phone, users.invite, cities.city_name, invites.date_status_\n FROM users\n LEFT JOIN cities ON users.id_city = cities.id_city\n LEFT JOIN invites ON users.invite = invites.invite\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public static function getReportHome()\n {\n$data = User::findBySql(\"SELECT COUNT(ei.ei_id) as totalstudent, i.*,ei.ei_graduation_year FROM university u \".\n \"JOIN institution i on u.uni_id = i.uni_id \".\n \"JOIN education_information ei on i.inst_id = ei.inst_id \".\n \"WHERE ei.ei_graduation_year BETWEEN '2010' AND '2014' AND u.uni_status = '1' \".\n \"AND i.inst_status = '1' GROUP BY ei.inst_id,ei.ei_graduation_year\")\n ->asArray()\n ->all();\n\n return $data;\n }", "function get_moodle_users_sql(array $columns, $sort = 'lastname ASC');", "public function findBatiments($language) {\r\n $select = $this->_createSelectQuery();\r\n // batiment\r\n $select->field('id', $this->_tableName);\r\n $select->field('nom_' . $language, $this->_tableName, 'nom');\r\n $select->field('description_' . $language, $this->_tableName, 'description');\r\n $select->field('image', $this->_tableName);\r\n $select->field('niveau', $this->_tableName);\r\n $select->field('cout', $this->_tableName);\r\n $select->field('entretien', $this->_tableName);\r\n $select->field('duree_construction', $this->_tableName);\r\n $select->field('duree_recolte', $this->_tableName);\r\n $select->field('duree_hospitalisation', $this->_tableName);\r\n $select->field('cout_hospitalisation', $this->_tableName);\r\n $select->field('gain', $this->_tableName);\r\n $select->field('capacite', $this->_tableName);\r\n $select->field('visibilite', $this->_tableName);\r\n $select->field('id_prev', $this->_tableName);\r\n // Batiment Suivant\r\n $select->field('id', 'batiment_suivant', 'id_next');\r\n // type_batiment 1\r\n $select->field('id', 'type1_batiment', 'id_type1');\r\n $select->field('id_parent', 'type1_batiment', 'id_parent_type1');\r\n $select->field('nom_' . $language, 'type1_batiment', 'nom_type1');\r\n $select->field('is_unique', 'type1_batiment', 'is_unique_type1');\r\n // type_batiment 2\r\n $select->field('id', 'type2_batiment', 'id_type2');\r\n $select->field('id_parent', 'type2_batiment', 'id_parent_type2');\r\n $select->field('nom_' . $language, 'type2_batiment', 'nom_type2');\r\n $select->field('is_unique', 'type2_batiment', 'is_unique_type2');\r\n // From et jointures\r\n $select->from($this->_tableName);\r\n $select->innerJoin('type_batiment', array('batiment.id_type = type1_batiment.id'), 'type1_batiment');\r\n $select->leftJoin('type_batiment', array('type1_batiment.id_parent = type2_batiment.id'), 'type2_batiment');\r\n $select->leftJoin('batiment', array('batiment_suivant.id_prev = batiment.id'), 'batiment_suivant');\r\n // Ordre\r\n $select->order('batiment.niveau');\r\n\r\n return $this->_mapper->buildObjectsFromRows($this->_selectAll($select));\r\n }", "function salespeople_select_all()\n{\n $conn = db_connect();\n\n // Prepared statement for selecting all salespeople from the database\n $salespeople_select_stmt = pg_prepare($conn, \"salespeople_select_stmt\", \"SELECT salespeople.*, users.id AS user_id, users.enabled FROM salespeople JOIN users ON salespeople.email_address = users.email_address\");\n $result = pg_execute($conn, \"salespeople_select_stmt\", array());\n\n $rows = pg_fetch_all($result);\n\n // Check for a result after querying database and if one exists, save it as an array to return user data\n if ($rows) {\n return $rows;\n }\n\n return false;\n}", "function getCpBriefAnreden() {\n $sql=\"select distinct (cp_salutation) from contacts\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n return $rs;\n}", "function generate_query($gender) {\n global $person_array_data;\n return \"SELECT *\n FROM gegevens \n INNER JOIN get_answers ON gegevens.id = get_answers.person_id\n INNER JOIN get_importance ON gegevens.id = get_importance.person_id\n INNER JOIN get_desired ON gegevens.id = get_desired.person_id\n WHERE age >= ({$person_array_data['age']} / 2 + 6) \n AND age <= ({$person_array_data['age']} * 2 - 12) AND id <> {$person_array_data['id']} \n AND name <> '' AND gender = {$gender}\n GROUP BY gegevens.id\";\n }", "public function full_listing()\n {\n return $this->db\n ->from('users')\n ->select('id_user, name, last_name, type_of_access, email, name_country')\n ->join('countrys', 'countrys.id_country = users.country', 'left')\n ->get()\n ->result_array();\n }", "function users_by_hobby_id($hobby_id,$total=5,$exclude=array()){\r\n\r\n//get subscribers\r\n$users=$this->get_subscribers($hobby_id,$total,$exclude);\r\n\r\n//final arrary to be returned\r\n$return=array();\r\n\r\nif(!count($users))return $return;\r\n\r\n//form SQL query\r\n$sql=\"select id,first,last,country from userdata where \". SQL_valid_users(false). \" && \".SQL_not_in($this->get_uids($users),\"id\",false).\" order by RAND()\";\r\n\r\n$mysqli =new mysqli($GLOBALS['host'],$GLOBALS['db_user'],$GLOBALS['db_passwd'],$GLOBALS['selected_db']);\r\n\r\nif($result=$mysqli->query($sql))\r\n{\r\nif($result->num_rows>0)\r\n{\r\nwhile($row=$result->fetch_array())\r\n{\r\n$return[]=$row;\r\n}\r\n}\r\n}\r\n\r\nreturn $return;\r\n\r\n}", "function getEmpleados($columns){\n\t\t$sql = \"\n\t\tSELECT $columns\n\t\tFROM users \n\t\tWHERE ( user_type = 2 OR user_type = 1)\n\t\t/*AND\t\tuser_status = 0*/\n\t\tORDER BY user_last_name\";\n\t\treturn db_loadHashList( $sql );\n\t\t\n\t}", "function getSuggestPosting() {\n return getAll(\"SELECT a.*,c.name \n FROM posting a \n INNER JOIN member_posting b ON a.id = b.posting_id\n INNER JOIN member c ON c.id = b.member_id\n LIMIT 5\");\n}", "function select() {\n // TODO: clb.organization_name should only be selected if a primary relationship exists.\n return \"\n contact_a.id AS contact_id,\n contact_a.last_name,\n contact_a.first_name,\n contact_a.preferred_language,\n ca.street_address as contact_street_address,\n ca.postal_code as contact_postal_code,\n ca.city as contact_city,\n cc.name as contact_country,\n email,\n phone,\n clb.organization_name\n \";\n }", "public function search_criteria_list($post_data){\n $userId = $post_data['userId']; \n $date = date(\"Y-m-d H:i:s\");\n $keyword = $post_data['keyword'];\n $latitude = $post_data['latitude'];\n $longitude = $post_data['longitude'];\n $limit = $post_data['limit'];\n $offset = $post_data['offset'];\n // $filter = $post_data['filter']; //fav_teacher/all\n // $type = $post_data['type']; // upcoming/past\n \n\n if(!empty($keyword)){\n $keyword = \"AND (s.searchName LIKE '%$keyword%' OR s.idealMovingDate LIKE '%$keyword%' OR s.houseType LIKE '%$keyword%' OR s.priceRange LIKE '%$keyword%' OR s.bedroom LIKE '%$keyword%')\";\n }\n\n if(!empty($latitude) && !empty($longitude))\n {\n $distance_in_km = \"( 6371 * acos( cos( radians($latitude) ) * cos( radians( lc.latitude) ) \n * cos( radians( lc.longitude ) - radians($longitude) ) + \n sin( radians($latitude) ) * sin( radians( lc.latitude ) ) ) ) \n AS distance_in_km\";\n }\n\n if (!empty($latitude) && !empty($longitude)) {\n $sql = \"SELECT s.searchId,s.userId,s.searchName,s.idealMovingDate,s.area,u.userId,u.firstName,u.lastName,((SELECT COUNT(*) from tribe t1 WHERE t1.searchId = s.searchId AND t1.status ='accept' AND t1.deleteFlag != 1)+1) as participantCount,\n (SELECT COUNT(*) from shortlistedproperty sp WHERE sp.searchId = s.searchId AND sp.deleteFlag !=1) as properties\n FROM searchcriteria s \n left join tribe t on s.searchId = t.searchId AND t.fromuserId = $userId\n left join users u on s.userId = u.userId\n left join shortlistedproperty p on s.searchId = p.searchId \n where s.searchId in (SELECT t.searchId from tribe t where (t.touserId =$userId OR t.fromuserId =$userId) AND t.status = 'accept' AND t.deleteFlag != 1) OR s.userId =$userId $keyword\n GROUP BY s.searchId ORDER BY s.createdAt DESC LIMIT $offset, $limit\";\n }else{\n $sql = \"SELECT s.searchId,s.userId,s.searchName,s.idealMovingDate,s.area,u.userId,u.firstName,u.lastName,((SELECT COUNT(*) from tribe t1 WHERE t1.searchId = s.searchId AND t1.status ='accept' AND t1.deleteFlag != 1)+1) as participantCount,\n (SELECT COUNT(*) from shortlistedproperty sp WHERE sp.searchId = s.searchId AND sp.deleteFlag !=1) as properties\n FROM searchcriteria s \n left join tribe t on s.searchId = t.searchId AND t.fromuserId = $userId\n left join users u on s.userId = u.userId\n left join shortlistedproperty p on s.searchId = p.searchId \n where s.searchId in (SELECT t.searchId from tribe t where (t.touserId = $userId OR t.fromuserId =$userId) AND t.status = 'accept' AND t.deleteFlag != 1) OR s.userId =$userId $keyword\n GROUP BY s.searchId ORDER BY s.createdAt DESC LIMIT $offset, $limit\";\n }\n\n //echo $sql;exit();\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n return $record->result_array();\n } \n }", "public function getUsers(){\n $users = DB::table('users')\n ->select(['users.created_at','users.email','users.id','users.name','users.tele','villes.nomVille'])\n ->join('villes', 'villes.idVille', '=', 'users.ville_idVille')\n ->orderBy('id', 'asc')\n ->get();\n\n\n\n\n\n\n return Response()->json(['users'=>$users]);\n }", "public function filter_user() {\n// ----------------------------------------------\n// SELECT * FROM wp_groups_user_group rt\n// LEFT JOIN wp_user u ON rt.user_id = u.ID\n// LEFT JOIN wp_user u ON rt.user_id = u.ID\n// WHERE rt.group_id = 6\n// \n// \n// SELECT * FROM\n// (SELECT \n// rt.user_id,\n// rt.group_id AS location_id\n// FROM wp_groups_user_group rt\n// LEFT JOIN wp_users u ON rt.user_id = u.ID\n// LEFT JOIN wp_users u2 ON rt.user_id = u2.ID\n// WHERE rt.group_id = 6 ) AS rl\n// INNER JOIN\n// (SELECT \n// rt.user_id,\n// rt.group_id AS agency_id\n// FROM wp_groups_user_group rt\n// LEFT JOIN wp_users u ON rt.user_id = u.ID\n// LEFT JOIN wp_users u2 ON rt.user_id = u2.ID\n// WHERE rt.group_id = 3 ) AS ra\n// ON rl.user_id = ra.user_id\n// LEFT JOIN wp_users wu ON rl.user_id = wu.ID ORDER BY `ID` ASC\n }", "public function getall_details4($id){\n\t \t $query=\"SELECT ads.*,user.phone,user.address FROM ads INNER JOIN user ON ads.email=user.email WHERE no='$id' \";\n\t \t $result=$this->db->select( $query);\n\t \t return $result;\n\n\n\t }", "public static function getUsers(){\n $query = UserQuery::init()\n ->joinUserStatus()->selectName('status')->endUse();\n //->joinUserDetails()->selectUserId()->selectAddress()->selectZipCode()->selectLocal()->endUse()\n //->joinUserGuard()->selectUserId()->selectUsername()->selectSalt()->selectUserkey()->endUse()\n //->joinUserHasGroup()->selectUserId()->selectUserGroup()->endUse()\n //->joinUserLog()->selectId()->selectUserId()->selectUserEvent()->selectTimestamp()->endUse();\n \n return $query;\n }", "public function getInstagramUsersDetailsWithUsersInfo()\n {\n $selectedCols = ['instagram_users.*', 'users.username', 'plans.plan_name'];\n $result = DB::table($this->table)\n ->join('users', 'users.id', '=', 'instagram_users.by_user_id')\n ->join('plans', 'plans.plan_id', '=', 'instagram_users.plan_id')\n ->select($selectedCols)\n ->get();\n return $result;\n }", "public function load_all_data($cols = 'st.*,dept.department_name,course.course_name,inst.institute_name,bg.name as bloodgroupname,hos.hostel_name as hostel_name_full', $limit=TRUE) {\n $allotment_type_search = $this->input->get('allotment_type_search');\n $search_by_bhavan = $this->input->get('search_by_bhavan');\n $search_by_department = $this->input->get('search_by_department');\n $search_by_course = $this->input->get('search_by_course');\n $gender = $this->input->get('gender');\n $search_by_pwd = $this->input->get('search_by_pwd');\n $search_nationality_type = $this->input->get('search_nationality_type');\n $search_by_hostel = $this->input->get('search_by_hostel');\n $search_by_category = $this->input->get('search_by_category');\n $search_by_allotment = $this->input->get('search_by_allotment');\n $search_by_renewal = $this->input->get('search_by_renewal');\n $search_keyword = $this->input->get('search_keyword');\n $search_by_semester = $this->input->get('search_by_semester');\n $search_page_number = $this->input->get('page_no');\n $num_per_page = $this->input->get('num_per_page');\n\n $search_by_course_only = $this->input->get('search_by_course_only');//03122020\n $search_by_department_only = $this->input->get('search_by_department_only');//03122020\n // echo $search_by_course_only;die();\n\n $this->db->select($cols);\n $this->db->from(tablename('student').\" as st\");\n $this->db->join(tablename('institute').\" as inst\",\"inst.id = st.institute_id\");\n $this->db->join(tablename('department').\" as dept\",\"dept.id = st.department_id\");\n $this->db->join(tablename('course').\" as course\",\"course.id = st.course_id\");\n $this->db->join(tablename('bloodgroup').\" as bg\",\"bg.id = st.blood_group\");\n $this->db->join(tablename('hostel').\" as hos\",\"hos.id = st.hostel_name\", \"left\");\n\n if(empty($search_page_number)) {\n $search_page_number = 0;\n }\n\n if(empty($num_per_page)) {\n $num_per_page = 20;\n }\n\n if(!empty($allotment_type_search) && $allotment_type_search=='new_applied')\n {\n $this->db->where('is_approved',0);\n }\n\n if(!empty($allotment_type_search) && $allotment_type_search=='already_alloted')\n {\n $this->db->where('is_approved',1);\n }\n\n if(!empty($search_by_bhavan))\n {\n $this->db->where('st.institute_id',$search_by_bhavan);\n }\n\n if(!empty($search_by_department))\n {\n $this->db->where('st.department_id',$search_by_department);\n }\n\n if(!empty($search_by_course))\n {\n $this->db->where('st.course_id',$search_by_course);\n }\n\n if(!empty($gender))\n {\n $this->db->where('st.gender',$gender);\n }\n\n if(isset($search_by_pwd) && $search_by_pwd!='')\n {\n $this->db->where('st.pwd_status',$search_by_pwd);\n }\n\n if(!empty($search_nationality_type))\n {\n $this->db->where('st.nationality_type',$search_nationality_type);\n }\n\n if(!empty($search_by_hostel))\n {\n $this->db->where('st.hostel_name',$search_by_hostel);\n }\n\n if(!empty($search_by_category))\n {\n $this->db->where('st.caste_type',$search_by_category);\n }\n\n if($search_by_allotment!='') {\n if($search_by_allotment == 0){\n $this->db->where('st.is_approved',$search_by_allotment);\n $this->db->where('st.is_cancelled !=',1);\n } elseif($search_by_allotment == 1){\n $this->db->where('st.is_approved',$search_by_allotment);\n }else{\n $this->db->where('st.is_cancelled',1);\n $this->db->where('st.is_approved',0);\n }\n \n }\n\n if(!empty($search_by_renewal)) {\n $this->db->where('st.renewal_option', $search_by_renewal);\n }\n\n if(!empty($search_by_semester)) {\n $this->db->where('st.semester', $search_by_semester);\n }\n\n if(!empty($search_keyword)) {\n $this->db->like('st.full_name', $search_keyword);\n $this->db->or_like('st.student_id', $search_keyword);\n }\n //03122020\n if(!empty($search_by_course_only)){\n $query = $this->db->query(\"SELECT GROUP_CONCAT(id) as ids_arr FROM vb_course WHERE course_name LIKE '\".$search_by_course_only.\"'\");\n $result = $query->row_array();\n $this->db->where_in('st.course_id',array($query->result_array[0]['ids_arr']));\n }\n\n //03122020\n if(!empty($search_by_department_only)){\n $query = $this->db->query(\"SELECT GROUP_CONCAT(id) as ids_arr FROM vb_department WHERE department_name LIKE '\".$search_by_department_only.\"'\");\n $result = $query->row_array();\n $this->db->where_in('st.department_id',array($query->result_array[0]['ids_arr']));\n }\n\n $this->db->where('st.status', 1);\n $this->db->order_by(\"st.full_name\", \"asc\");\n\n $total_rows = $this->db->count_all_results('', FALSE);\n\n $num_pages = 1;\n if($num_per_page > 0){\n $num_pages = ceil($total_rows/$num_per_page);\n }\n\n if($limit == TRUE) {\n $this->db->limit($num_per_page, $search_page_number * $num_per_page);\n }\n\n $query = $this->db->get();\n $result = $query->result();\n\n if (!empty($result)) {\n return array($result, $num_pages);\n } else {\n return array($result, 0);\n }\n }", "public function get_user_request($filters)\n {\n $active_login_userid = $filters['active_login_userid'];\n $owner_profile_userid = $filters['owner_profile_userid'];\n \n $limit = 20;\n \n $sql = \"SELECT u.id as user_id,\n u.profile_code,\n u.first_name,\n u.last_name,\n ub.profilephoto,\n ub.coverphoto,\n coalesce(a.total,0) as followers,\n coalesce(b.total,0) as following,\n round((coalesce(c.yaycount,0) + coalesce(d.yaycount,0) + (coalesce(e.yaycount,0) / 10)) / 3) as avg_rating,\n us.credential_type,\n us.credential_refid,\n (case us.credential_type\n when 1 then ugen.general_info\n when 2 then \n (case WHEN ucol.course IS NULL THEN\n CONCAT(ucol.course, ', ', ucol.schoolname)\n ELSE ucol.schoolname\n end)\n when 3 then CONCAT(uwork.position, ', ', uwork.companyname,', ',uwork.location)\n end) 'credential',\n (case \n when uf2.status=1 then '1'\n when uf2.status=0 then '2'\n when uf3.status=0 then '3' \n else '4'\n end) 'friend_status',\n (case\n when ua.status=1 then \n case ua2.status\n when 1 then '6'\n else '1'\n end\n when ua.status=0 then '2'\n when ua2.status=1 then '3'\n when ua2.status=0 then '4' \n else '5'\n end) 'following_status', \n 'friends' as requesttype\n FROM userfriends uf\n JOIN users u ON u.id = uf.user_one_id\n LEFT JOIN userbasicinfo ub on u.id = ub.user_id\n LEFT JOIN usersettings us on u.id = us.user_id\n LEFT JOIN usergeneralinfo ugen ON ugen.user_id = us.user_id AND ugen.id = us.credential_refid\n LEFT JOIN usereduccollege ucol ON ucol.user_id = us.user_id AND ucol.id = us.credential_refid\n LEFT JOIN userworkhistory uwork ON uwork.user_id = us.user_id AND uwork.id = us.credential_refid\n LEFT OUTER JOIN (select useracquiantances.user_two_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_two_id) as a ON a.user_two_id = u.id\n LEFT OUTER JOIN (select useracquiantances.user_one_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_one_id) as b ON b.user_one_id = u.id\n LEFT OUTER JOIN (select postcontentapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postcontentapprovalrate\n LEFT JOIN postcontent ON postcontent.id = postcontentapprovalrate.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postcontentapprovalrate.mask = 0\n GROUP BY postcontentapprovalrate.user_id) as c ON c.user_id = u.id\n LEFT OUTER JOIN (select topicapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM topicapprovalrate\n LEFT JOIN topic ON topic.id = topicapprovalrate.string_id\n WHERE topic.deleted_at IS NULL AND topicapprovalrate.mask=0\n GROUP BY topicapprovalrate.user_id) as d ON d.user_id = u.id\n LEFT OUTER JOIN (select postopinionapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postopinionapprovalrate\n LEFT JOIN postopinion ON postopinion.id = postopinionapprovalrate.postopinion_id\n LEFT JOIN postcontent ON postcontent.id = postopinion.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postopinion.deleted_at IS NULL\n AND postopinionapprovalrate.mask=0\n GROUP BY postopinionapprovalrate.user_id) as e ON e.user_id = u.id\n LEFT JOIN useracquiantances ua on ua.user_one_id = uf.user_two_id \n AND ua.user_two_id = {$active_login_userid}\n LEFT JOIN useracquiantances ua2 on ua2.user_one_id = {$active_login_userid} \n AND ua2.user_two_id = uf.user_two_id\n LEFT JOIN userfriends uf2 on uf2.user_one_id = uf.user_two_id \n AND uf2.user_two_id = {$active_login_userid}\n LEFT JOIN userfriends uf3 ON uf3.user_one_id={$active_login_userid} \n AND uf3.user_two_id=uf.user_two_id\n WHERE (uf.user_two_id={$owner_profile_userid} AND uf.status=0)\n UNION\n SELECT u.id as user_id,\n u.profile_code,\n u.first_name,\n u.last_name,\n ub.profilephoto,\n ub.coverphoto,\n coalesce(a.total,0) as followers,\n coalesce(b.total,0) as following,\n round((coalesce(c.yaycount,0) + coalesce(d.yaycount,0) + (coalesce(e.yaycount,0) / 10)) / 3) as avg_rating,\n us.credential_type,\n us.credential_refid,\n (case us.credential_type\n when 1 then ugen.general_info\n when 2 then CONCAT(ucol.course, ', ', ucol.schoolname)\n when 3 then uhigh.schoolname\n when 4 then CONCAT(uwork.position, ', ', uwork.companyname,', ',uwork.location)\n end) 'credential',\n (case \n when uf2.status=1 then '1'\n when uf2.status=0 then '2'\n when uf3.status=0 then '3' \n else '4'\n end) 'friend_status',\n (case\n when ua.status=1 then \n case ua2.status\n when 1 then '6'\n else '1'\n end\n when ua.status=0 then '2'\n when ua2.status=1 then '3'\n when ua2.status=0 then '4' \n else '5'\n end) 'following_status',\n 'follow' as requesttype\n FROM useracquiantances uq\n JOIN users u ON u.id = uq.user_one_id\n LEFT JOIN userbasicinfo ub on u.id = ub.user_id\n LEFT JOIN usersettings us on u.id = us.user_id\n LEFT JOIN usergeneralinfo ugen ON ugen.user_id = us.user_id AND ugen.id = us.credential_refid\n LEFT JOIN usereduccollege ucol ON ucol.user_id = us.user_id AND ucol.id = us.credential_refid\n LEFT JOIN usereduchighschool uhigh ON uhigh.user_id = us.user_id AND uhigh.id = us.credential_refid\n LEFT JOIN userworkhistory uwork ON uwork.user_id = us.user_id AND uwork.id = us.credential_refid\n LEFT OUTER JOIN (select useracquiantances.user_two_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_two_id) as a ON a.user_two_id = u.id\n LEFT OUTER JOIN (select useracquiantances.user_one_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_one_id) as b ON b.user_one_id = u.id\n LEFT OUTER JOIN (select postcontentapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postcontentapprovalrate\n LEFT JOIN postcontent ON postcontent.id = postcontentapprovalrate.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postcontentapprovalrate.mask = 0\n GROUP BY postcontentapprovalrate.user_id) as c ON c.user_id = u.id\n LEFT OUTER JOIN (select topicapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM topicapprovalrate\n LEFT JOIN topic ON topic.id = topicapprovalrate.string_id\n WHERE topic.deleted_at IS NULL AND topicapprovalrate.mask=0\n GROUP BY topicapprovalrate.user_id) as d ON d.user_id = u.id\n LEFT OUTER JOIN (select postopinionapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postopinionapprovalrate\n LEFT JOIN postopinion ON postopinion.id = postopinionapprovalrate.postopinion_id\n LEFT JOIN postcontent ON postcontent.id = postopinion.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postopinion.deleted_at IS NULL\n AND postopinionapprovalrate.mask=0\n GROUP BY postopinionapprovalrate.user_id) as e ON e.user_id = u.id\n LEFT JOIN useracquiantances ua on ua.user_one_id = uq.user_two_id \n AND ua.user_two_id = {$active_login_userid}\n LEFT JOIN useracquiantances ua2 on ua2.user_one_id = {$active_login_userid} \n AND ua2.user_two_id = uq.user_two_id\n LEFT JOIN userfriends uf2 on uf2.user_one_id = uq.user_two_id \n AND uf2.user_two_id = {$active_login_userid}\n LEFT JOIN userfriends uf3 ON uf3.user_one_id={$active_login_userid} \n AND uf3.user_two_id=uq.user_two_id\n WHERE (uq.user_two_id={$owner_profile_userid} AND uq.status=0)\n ORDER BY first_name, last_name\n LIMIT {$limit}\";\n \n return collect($this->_helper->convert_sql_to_array( DB::select(DB::raw($sql)) )); \n }", "public function query()\n {\n $referrals = Referrals::join('users', function($join) {\n $join->on('users.id', '=', 'referrals.user_id');\n })->selectRaw('referrals.user_id, CONCAT(users.first_name, \" \", users.last_name) as full_name, referrals.friend_id, (select count(*) from referrals as r1 where user_id = referrals.user_id) as signup_count, (select count(*) from reservation as re1 join referrals as jr on jr.friend_id = re1.user_id where jr.user_id = referrals.user_id) as booking_count, (select count(*) from rooms as rm1 join referrals as jr on jr.friend_id = rm1.user_id where jr.user_id = referrals.user_id) as listing_count')->groupBy('referrals.user_id');\n return $this->applyScopes($referrals);\n }", "protected function query() {\n $query = Database::getConnection('default', $this->sourceConnection)\n ->select('og_uid', 'ogu')\n // we have a user 0 here for some stupid reason\n ->condition('uid', 0, '>')\n ->fields('ogu', array('nid', 'is_active', 'is_admin', 'uid'));\n return $query;\n }", "public function index()\n {\n $data = Input::all();\n\n\n $results = $data['results'] ?? false;\n $page = ($data['page'] ?? 1) - 1;\n $sortField = $data['sortField'] ?? false;\n $sortOrder = $data['sortOrder'] ?? false;\n $filterDate = json_decode($data['filterDate'] ?? '{}', true);\n $filterAddress = $data['filterAddress'] ?? false;\n Log::info($data);\n\n $filters = [json_decode($data['filters'] ?? '{}', true)][0];\n// Log::info('filter' ,$filters);\n\n $users = User::with(['profile','addresses']);\n\n// if($filterAddress){\n// $users->where('addressTxt','like', $filterAddress.'%' );\n// }\n\n// if(!empty($filterDate)){\n//// Log::info(gettype($filterDate));\n// $users->where([\n// ['create_at', '>=', $filterDate['start']],\n// ['create_at', '<=', $filterDate['end']]\n// ]);\n// }\n\n// if (!empty($filters)) {\n//// Log::info($filters);\n// foreach ($filters as $key => $values) {\n// if (!empty($values)) {\n// if ($key === 'status' || $key === 'gender') {\n// $users->whereIn($key , $values);\n// } else {\n// foreach ($values as $value) {\n// $users->where($key, 'like', '%' . $value . '%');\n// }\n// }\n// }\n// }\n// }\n\n// if ($sortField) {\n// $users->orderBy($sortField, $sortOrder);\n// }\n\n $res['totalCount'] = $users->count();\n\n $res['keys'] = $users->get()->map(function ($values){\n return $values->id;\n });\n\n $users->skip($page * $results)->take($results);\n\n $res['users'] = $users->get();\n\n return response($res);\n }", "public function get_all_registerd_details() {\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT users.user_id,users.user_confirmed,users.admin_confirmed, users.user_name, users.user_email, users.user_comp_name, users.user_number, users.client_cat_id, client_cat.client_cat_id, users.user_time, client_cat.client_cat_name FROM users LEFT JOIN client_cat ON client_cat.client_cat_id = users.client_cat_id\");\n\t\t\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t$query->execute();\n\t\t\t$result = $query->fetchAll();\n\t\t\treturn $result;\n\t\t}catch(PDOException $e){\n\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "static function sql_wp_list_table_user_profile_builder() {\n\t\tglobal $wpdb;\n\n\n\t\tif ( is_multisite() ) {\n\t\t\t$current_blog = get_current_blog_id();\n\t\t\t$sql = \"SELECT id, title, structure, css, date FROM {$wpdb->base_prefix}pp_user_profile_builder WHERE blog_id = 0 OR blog_id = $current_blog\";\n\t\t}\n\t\telse {\n\t\t\t$sql = \"SELECT id, title, structure, css, date FROM {$wpdb->base_prefix}pp_user_profile_builder\";\n\t\t}\n\n\t\treturn $wpdb->get_results( $sql, 'ARRAY_A' );\n\t}", "public function getEnseignants(){\n return DB::table('users')->join('course_user','course_user.user_id', '=', 'users.id')\n ->join('courses','course_user.course_id', '=', 'courses.id')\n ->select('users.id','users.user_name', 'users.user_contact',\n 'users.user_last_name', 'courses.course_name'\n )->get();\n\n \n }", "public function profile() {\n $user = auth('api')->user();\n $query = DB::table('users')\n ->join('positions', 'positions.id', '=', 'users.id_jafung')\n ->join('units', 'units.id', '=', 'users.id_unit')\n ->where('users.id', '=', $user->id )\n ->select('users.id', 'users.photo', 'users.nickname', 'users.fullname', 'users.jenis_peg',\n 'users.gol', 'users.tmt', 'users.gender', 'users.agama', 'users.tpt_lahir', 'users.tgl_lahir', 'users.photo',\n 'users.nip', 'users.nik', 'users.gol', 'users.email', 'positions.jabatan',\n 'positions.kategori AS katjab', 'users.id_unit', 'units.nama_unit AS unit', 'units.bagian')\n ->get();\n return $query;\n }", "public function getDetalles()\n {\n $sql = \"select z.id,z.nombre, z.identificacion, z.estado_excluido, y.descripcion, w.categoria , (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'aeo'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as 'aeo' ,\n (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'alim'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as alim,\n (SELECT a.monto FROM appexamenisw2.categorias a,\n appexamenisw2.beneficios e, appexamenisw2.estudiantes b, appexamenisw2.beneficio__estudiantes c\n where a.descripcion = 'pare'\n and b.id = c.estudiante_id\n and e.id = c.beneficio_id\n and a.id = e.categoria_id\n and b.id = z.id) as pare\n from appexamenisw2.estudiantes z, appexamenisw2.beneficios y, appexamenisw2.categorias w,\n appexamenisw2.beneficio__estudiantes v\n where z.id = v.estudiante_id\n and y.id = v.beneficio_id\n and w.id = y.categoria_id\n group by z.id,z.nombre, z.identificacion, z.id, z.estado_excluido, y.descripcion,w.categoria\n order by z.id;\";\n\n $arrayDetalles = DB::connection('mysql')->select($sql);\n $ab = array();\n $ab = $arrayDetalles;\n foreach($ab as $t){\n $t->aeo = Crypt::decrypt($t->aeo);\n $t->alim = Crypt::decrypt($t->alim);\n $t->pare = Crypt::decrypt($t->pare);\n //$t->categoria = Crypt::decrypt($t->categoria);\n //$t->monto = Crypt::decrypt($t->monto);\n //return $t->monto;\n }\n return json_encode($ab);\n }", "function peoples($array=''){\n\t$order='';$limit='LIMIT 0,50';$where='1';\n $uid=$_SESSION['ws-tags']['ws-user']['id'];\n $from= 'users u';\n $select= 'u.id AS id,\n \t\t\tCONCAT(u.`name`,\" \",u.last_name) AS name_user,\n \t\t\tu.username AS username,\n \t\t\tu.description,\n \t\t\tu.email as email,\n \t\t\tu.country as id_country,\n (SELECT name FROM countries WHERE id=u.country) AS country,\n \t\t\tu.followers_count,\n \t\t\tu.friends_count,\n u.following_count,\n \t\t\tu.profile_image_url AS photo_friend,\n \t\t\tmd5(CONCAT(u.id,\"_\",u.email,\"_\",u.id)) AS code_friend,\n \t\t\t(SELECT `id_user` AS `id_user` FROM users_links WHERE `id_friend`=u.id AND `id_user`='.$uid.') AS follower';\n if (isset($array['select'])){ $select.=$array['select']; }\n elseif(isset($array['newSelect'])){ $select=$array['newSelect']; }\n if (isset($array['from'])){ $from=$array['from']; }\n elseif(isset($array['join'])){ $from.=$array['join']; }\n if (isset($array['where'])){ $where=$array['where']; }\n if (isset($array['limit'])){ $limit=$array['limit']; }\n if (isset($array['order'])){ $order=$array['order']; }\n $sql= 'SELECT '.$select.' '.\n 'FROM '.$from.' '.\n 'WHERE '.$where.\n ' '.$order.' '.$limit;\n if (isset($_GET['debug']) && isset($_GET['return'])) return '<pre>'.$sql.'</pre>';\n elseif (isset($_GET['debug'])) echo '<div><pre>'.$sql.'</pre></div>';\n\t$users=$GLOBALS['cn']->query($sql);\n\treturn $users;\n}", "abstract public function findRelatedRecordsByEmail(): array;", "public function get_user_views($filters)\n {\n $active_login_userid = $filters['active_login_userid'];\n $owner_profile_userid = $filters['owner_profile_userid'];\n \n $limit = 20;\n \n $sql = \"SELECT upv.id,\n upv.viewer_userid,\n u.profile_code,\n u.first_name,\n u.last_name,\n ub.profilephoto,\n upv.date,\n ucol.course,\n u.education as schoolname,\n uwork.position as occupation,\n case \n when uf2.status=1 then '1'\n when uf2.status=0 then '2'\n when uf3.status=0 then '3' \n else '4'\n end 'friend_status',\n case\n when ua.status=1 then \n case ua2.status\n when 1 then '6'\n else '1'\n end\n when ua.status=0 then '2'\n when ua2.status=1 then '3'\n when ua2.status=0 then '4' \n else '5'\n end 'following_status' \n FROM userprofileview upv\n LEFT JOIN users u ON u.id = upv.viewer_userid\n LEFT JOIN userbasicinfo ub ON ub.user_id = upv.viewer_userid\n LEFT JOIN useracquiantances ua on ua.user_one_id = upv.viewer_userid \n AND ua.user_two_id = {$active_login_userid}\n LEFT JOIN useracquiantances ua2 on ua2.user_one_id = {$active_login_userid} \n AND ua2.user_two_id = upv.viewer_userid\n LEFT JOIN userfriends uf2 on uf2.user_one_id = upv.viewer_userid \n AND uf2.user_two_id = {$active_login_userid}\n LEFT JOIN userfriends uf3 ON uf3.user_one_id={$active_login_userid} \n AND uf3.user_two_id=upv.viewer_userid\n LEFT JOIN \n (SELECT uc1.user_id, uc1.yearstarted,uc1.schoolname,uc1.course, uc1.id\n FROM usereduccollege uc1\n INNER JOIN(\n SELECT user_id, max(yearstarted) as yearstarted, max(id) as id \n FROM usereduccollege \n GROUP BY user_id\n ORDER BY id DESC) uc2 ON uc1.user_id = uc2.user_id AND uc1.yearstarted = uc2.yearstarted AND uc1.id=uc2.id) ucol ON ucol.user_id = u.id\n LEFT JOIN\n (SELECT uw1.user_id, uw1.yearstarted,uw1.position, uw1.id\n FROM userworkhistory uw1\n INNER JOIN (\n SELECT user_id, max(yearstarted) as yearstarted, max(id) as id \n FROM userworkhistory \n GROUP BY user_id\n ORDER BY id DESC) uw2 ON uw1.user_id = uw2.user_id AND uw1.yearstarted = uw2.yearstarted AND uw1.id=uw2.id) uwork ON uwork.user_id = u.id\n WHERE upv.profile_userid={$owner_profile_userid}\n ORDER BY date DESC\n LIMIT {$limit}\";\n \n return collect($this->_helper->convert_sql_to_array( DB::select(DB::raw($sql)) )); \n }", "private function _get_users_data(){ \r\n $this->db->select('*'); \r\n $this->db->from('suggestions');\r\n\t\t$this->db->order_by('suggestion_id', 'desc');\t\r\n }", "public function index(Request $request)\n {\n $buscar = $request->buscar;\n $criterio = $request->criterio;\n \n if ($buscar=='')\n {\n $users = User::join('personas','users.id_persona','=','personas.id_persona')\n ->join('metodos_pago','personas.id_metodoPago','=','metodos_pago.id')\n ->join('city','personas.id_city','=','city.id')\n ->join('roles','users.id_rol','=','roles.id')\n ->select(\n 'users.id', \n 'personas.id_persona', \n 'personas.nombre as nombre_persona', \n 'personas.apellido_paterno', \n 'personas.apellido_materno', \n 'personas.email', \n 'personas.telefono', \n 'personas.balance', \n 'personas.fecha_nacimiento', \n 'metodos_pago.id', \n 'metodos_pago.nombre_metodo', \n 'city.id', \n 'city.nombre_ciudad', \n 'users.nombre', \n 'users.password', \n 'users.status', \n 'roles.id', \n 'roles.nombre_rol')->orderBy('users.id', 'desc')->paginate(3);\n }\n else\n {\n $users = User::join('personas','users.id_persona','=','personas.id_persona')\n ->join('metodos_pago','personas.id_metodoPago','=','metodos_pago.id')\n ->join('city','personas.id_city','=','city.id')\n ->join('roles','users.id_rol','=','roles.id')\n ->select(\n 'users.id', \n 'personas.id_persona', \n 'personas.nombre as nombre_persona', \n 'personas.apellido_paterno', \n 'personas.apellido_materno', \n 'personas.email', \n 'personas.telefono', \n 'personas.balance', \n 'personas.fecha_nacimiento', \n 'metodos_pago.id', \n 'metodos_pago.nombre_metodo', \n 'city.id', \n 'city.nombre_ciudad', \n 'users.nombre', \n 'users.password', \n 'users.status', \n 'roles.id', \n 'roles.nombre_rol') \n ->where('users.'.$criterio, 'like', '%'. $buscar . '%')\n ->orderBy('users.id', 'desc')->paginate(3);\n }\n return [\n 'pagination' => [\n 'total' => $users->total(),\n 'current_page' => $users->currentPage(),\n 'per_page' => $users->perPage(),\n 'last_page' => $users->lastPage(),\n 'from' => $users->firstItem(),\n 'to' => $users->lastItem(),\n \n ],\n 'users' => $users\n ];\n }", "function queryRicercaTuttiGliUtenti(){\r\n \r\n $sql = 'SELECT email_utente, nickname, utente_esperto, utente_seguito, utente_seguace, path_img_profilo, data_ora_richiesta, ' .\r\n 'richiesta_accettata, data_ora_risposta ' . \r\n 'FROM (utente NATURAL JOIN info_utente ) LEFT OUTER JOIN seguaci_seguiti ' . \r\n 'ON email_utente = utente_seguito AND utente_seguace =' . \r\n \"'\" . $_SESSION['email_utente'] . \"'\" ;\r\n \r\n return $sql;\r\n}", "function getPersonalInboxQueries($connection,$userId,$inboxMessageSearch){\n $query = \"SELECT fpd.*,fu.name AS user_name,fu.profile_pic AS user_profile,fpd.datetime as posted_time FROM forum_personal_discussion fpd LEFT JOIN forum_users fu on fu.user_id=fpd.user_id WHERE fpd.person_id='$userId' \";\n\n // echo $query;\n if ($inboxMessageSearch){\n $query .= \" AND ( fpd.discussion_title LIKE '%{$inboxMessageSearch}%' OR fpd.message LIKE '%{$inboxMessageSearch}%' OR fu.name LIKE '%{$inboxMessageSearch}%') \";\n }\n $query .= ' ORDER BY datetime DESC';\n $result = $connection->query($query);\n return $result;\n }", "public function getSql(){\n $group_by = ['user_id'];\n \n // By default we do not perform an additional join for latest bid data\n $get_latest_bid_join = '';\n // The select for latest bid is therefore the same as the avg_bid\n $get_latest_bid_select = 'avg_bid as bid';\n \n if ($this->includeCampaigns) $group_by[] = 'amz_campaign_id';\n if ($this->includeAdGroups) $group_by[] = 'amz_adgroup_id';\n if ($this->includeKeywords) {\n $group_by[] = 'amz_kw_id';\n // This join will get the latest bid data only when amz_kw_ids are included\n // in the aggregate function.\n $get_latest_bid_join = \"\n inner join\n (\n select P.amz_kw_id, P.bid from ppc_keyword_metrics as P\n inner join\n (\n select\n amz_kw_id,\n max(`date`) as latest_date\n from ppc_keyword_metrics\n group by amz_kw_id\n ) as latest_date_inner\n on latest_date_inner.amz_kw_id = P.amz_kw_id and latest_date_inner.latest_date = P.`date`\n ) as latest_bid\n on T.amz_kw_id = latest_bid.amz_kw_id\n \";\n \n $get_latest_bid_join = \"\n inner join\n (\n select P.amz_kw_id, P.bid from ppc_keywords as P\n ) as latest_bid\n on T.amz_kw_id = latest_bid.amz_kw_id\n \";\n \n // The select statement can now be done using the latest bid data\n $get_latest_bid_select = 'latest_bid.bid as bid';\n }\n \n if ($this->includeDate) $group_by[] = '`date`';\n\n $group_by = implode(', ', $group_by);\n\n // Construct the where clause\n $where = [\"user_id = $this->userId\"];\n\n if ($this->startDate != null) $where[] = \"`date` >= '$this->startDate'\";\n if ($this->endDate != null) $where[] = \"`date` <= '$this->endDate'\";\n\n // Filter on campaign ids\n if (count($this->campaignIds) > 0){\n $campaign_ids = implode(', ', $this->campaignIds);\n $where[] = \"amz_campaign_id in ($campaign_ids)\";\n }\n\n // Filter on ad group ids\n if (count($this->adGroupIds) > 0){\n $ad_group_ids = implode(', ', $this->adGroupIds);\n $where[] = \"amz_adgroup_id in ($ad_group_ids)\";\n }\n\n // Filter on keyword ids\n if (count($this->keywordIds) > 0){\n $keyword_ids = implode(', ', $this->keywordIds);\n $where[] = \"amz_kw_id in ($keyword_ids)\";\n }\n\n // Combine all filters into one\n $where = implode(' and ', $where);\n\n // Order by clause\n $orderBy = '';\n if ($this->orderBy) {\n $orderBy = \"order by `$this->orderBy`\";\n if ($this->orderByDesc)\n $orderBy .= \" desc\";\n else\n $orderBy .= \" asc\";\n }\n\n // Included data\n $joins = [];\n if ($this->includeCampaigns) {\n $joins[] = 'campaigns on campaigns.amz_campaign_id = T2.amz_campaign_id';\n }\n if ($this->includeAdGroups) {\n $joins[] = 'ad_groups on ad_groups.amz_adgroup_id = T2.amz_adgroup_id';\n }\n if ($this->includeKeywords) {\n $joins[] = 'ppc_keywords on ppc_keywords.amz_kw_id = T2.amz_kw_id';\n }\n $joins = implode(\"\\ninner join \", $joins);\n if (strlen($joins) > 0) $joins = \"\\ninner join \" . $joins;\n\n return \"\n select *,\n ifnull(cvr, 0) as cvr,\n ifnull(ctr, 0) as ctr,\n ifnull(avg_cpc, 0) as avg_cpc,\n ifnull(acos, 0) as acos,\n ifnull(cvr, 0) as roas,\n \n \n ifnull(concat('$', round(T2.bid, 2)), '-') as bid_formatted,\n ifnull(nullif(round(impressions, 0), 0), '-') as impressions_formatted,\n ifnull(nullif(round(clicks, 0), 0), '-') as clicks_formatted,\n ifnull(nullif(concat('$', round(ad_spend, 2)), '$0.00'), '-') as ad_spend_formatted,\n ifnull(nullif(round(units_sold, 0), 0), '-') as units_sold_formatted,\n ifnull(nullif(concat('$', round(sales, 2)), '$0.00'), '-') as sales_formatted,\n ifnull(nullif(concat(round(cvr * 100, 2), '%'), 0), '-') as cvr_formatted,\n ifnull(nullif(concat(round(ctr * 100, 2), '%'), 0), '-') as ctr_formatted,\n \n concat('$', round(ifnull(ad_spend / units_sold, 0), 2)) as cost_per_unit_sold,\n round(ifnull(clicks / units_sold, 0), 2) as clicks_per_unit_sold,\n\n ifnull(concat('$', round(avg_cpc, 2)), '-') as avg_cpc_formatted,\n ifnull(concat(round(acos * 100, 2), '%'), '-') as acos_formatted,\n ifnull(concat('$', round(roas, 2)), '-') as roas_formatted\n from\n (\n select T.*,\n units_sold/clicks as cvr,\n clicks/impressions as ctr,\n ad_spend/clicks as avg_cpc,\n ad_spend/sales as acos,\n sales/ad_spend as roas,\n $get_latest_bid_select\n from\n (\n select\n $group_by,\n avg(bid) as avg_bid,\n sum(impressions) as impressions,\n sum(clicks) as clicks,\n sum(ad_spend) as ad_spend,\n sum(units_sold) as units_sold,\n sum(sales) as sales\n from ppc_keyword_metrics\n WHERE $where\n group by $group_by\n ) as T\n $get_latest_bid_join\n ) as T2\n $joins\n $orderBy\n \";\n }", "public static function getAllComplete()\n {\n // e2.id as event_id,e2.title ,e2.title_en ,e2.description ,e2.`date`as dateevent,e2.city,e2.diary_id ,e2.type_id ,\n // p4.name as typemeet,\n // es.id as speaker_id ,p2.name as speaker,p2.photo as photospeaker,\n // em.id as moderator_id ,p3.name as moderator,p3.photo as photomoderator\n // FROM diary d\n // inner join events e2 on d.id = e2.diary_id \n // inner join events_speakers es on e2.id =es.event_id \n // inner join participants p2 on p2.id =es.participant_id \n // inner join events_moderators em on e2.id =em.event_id\n // inner join participants p3 on p3.id =em.participant_id\n // inner join parameters p4 on e2.type_id =p4.value and p4.`group` ='TYPE_MEET'\n // ORDER by d.id ,e2.id\";\n $sql = \"SELECT d.id,d.date,d.date_string ,d.date_string_en ,date_string_large,date_string_large_en,\n e2.id as event_id,e2.title ,e2.title_en ,e2.description ,e2.`date`as dateevent,e2.city,e2.diary_id ,e2.type_id ,\n p4.name as type\n FROM diary d\n inner join events e2 on d.id = e2.diary_id \n inner join parameters p4 on e2.type_id =p4.value and p4.`group` ='TYPE_MEET'\n ORDER by d.id ,e2.id\";\n return Yii::$app->db->createCommand($sql)->queryAll();\n }", "function pass_book_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"money_in_out a,transaction_type b,transaction_from c,users e \",\"a.id,a.trans_from,a.trans_for_id,a.amount,a.balance,a.created_datetime,e.name,e.user_name,c.name as from_name,b.name as t_type,a.trans_type\",\"a.trans_type=b.id and a.trans_from=c.id and a.created_by=e.id and \".$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public function get_user_friends($filters)\n {\n $active_login_userid = $filters['active_login_userid'];\n $owner_profile_userid = $filters['owner_profile_userid'];\n $filter = $filters['filter'];\n \n //Most Recent\n $active_filter = \" ORDER BY created_at DESC, u.first_name, u.last_name\";\n if($filter == 1) {\n //Alphabetical\n $active_filter = \" ORDER BY u.first_name, u.last_name\";\n } else if($filter == 2) {\n //By number of followers\n $active_filter = \" ORDER BY followers DESC, u.first_name, u.last_name\";\n } else if($filter == 3) {\n //By number of mutual friends\n $active_filter = \" ORDER BY mutual_friends DESC, u.first_name, u.last_name\";\n } else if($filter == 4) {\n //By number of similar interests\n $active_filter = \" ORDER BY similar_interest DESC, u.first_name, u.last_name\";\n }\n \n $limit = 20;\n \n $sql = \"SELECT u.id as user_id,\n u.profile_code,\n u.first_name,\n u.last_name,\n ub.profilephoto,\n ub.coverphoto,\n coalesce(a.total,0) as followers,\n coalesce(b.total,0) as following,\n round((coalesce(c.yaycount,0) + coalesce(d.yaycount,0) + (coalesce(e.yaycount,0) / 10)) / 3) as avg_rating,\n us.credential_type,\n us.credential_refid,\n (case us.credential_type\n when 1 then ugen.general_info\n when 2 then \n (case WHEN ucol.course IS NOT NULL THEN\n CONCAT(ucol.course, ', ', ucol.schoolname)\n ELSE ucol.schoolname\n end)\n when 3 then CONCAT(uwork.position, ', ', uwork.companyname,', ',uwork.location)\n end) 'credential',\n (case \n when uf2.status=1 then '1'\n when uf2.status=0 then '2'\n when uf3.status=0 then '3' \n else '4'\n end) 'friend_status',\n (case\n when ua.status=1 then \n case ua2.status\n when 1 then '6'\n else '1'\n end\n when ua.status=0 then '2'\n when ua2.status=1 then '3'\n when ua2.status=0 then '4' \n else '5'\n end) 'following_status',\n coalesce(mf.mutualfriends,0) as mutual_friends,\n coalesce(ms.mutualstrings,0) as similar_interest,\n uf.created_at\t \n FROM userfriends uf\n JOIN users u ON u.id = uf.user_two_id\n LEFT JOIN userbasicinfo ub on u.id = ub.user_id\n LEFT JOIN usersettings us on u.id = us.user_id\n LEFT JOIN usergeneralinfo ugen ON ugen.user_id = us.user_id AND ugen.id = us.credential_refid\n LEFT JOIN usereduccollege ucol ON ucol.user_id = us.user_id AND ucol.id = us.credential_refid\n LEFT JOIN userworkhistory uwork ON uwork.user_id = us.user_id AND uwork.id = us.credential_refid\n LEFT OUTER JOIN (select useracquiantances.user_two_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_two_id) as a ON a.user_two_id = u.id\n LEFT OUTER JOIN (select useracquiantances.user_one_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_one_id) as b ON b.user_one_id = u.id\n LEFT OUTER JOIN (select postcontentapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postcontentapprovalrate\n LEFT JOIN postcontent ON postcontent.id = postcontentapprovalrate.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postcontentapprovalrate.mask = 0\n GROUP BY postcontentapprovalrate.user_id) as c ON c.user_id = u.id\n LEFT OUTER JOIN (select topicapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM topicapprovalrate\n LEFT JOIN topic ON topic.id = topicapprovalrate.string_id\n WHERE topic.deleted_at IS NULL AND topicapprovalrate.mask=0\n GROUP BY topicapprovalrate.user_id) as d ON d.user_id = u.id\n LEFT OUTER JOIN (select postopinionapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postopinionapprovalrate\n LEFT JOIN postopinion ON postopinion.id = postopinionapprovalrate.postopinion_id\n LEFT JOIN postcontent ON postcontent.id = postopinion.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postopinion.deleted_at IS NULL\n AND postopinionapprovalrate.mask=0\n GROUP BY postopinionapprovalrate.user_id) as e ON e.user_id = u.id\n LEFT JOIN useracquiantances ua on ua.user_one_id = uf.user_two_id \n AND ua.user_two_id = {$active_login_userid}\n LEFT JOIN useracquiantances ua2 on ua2.user_one_id = {$active_login_userid} \n AND ua2.user_two_id = uf.user_two_id\n LEFT JOIN userfriends uf2 on uf2.user_one_id = uf.user_two_id \n AND uf2.user_two_id = {$active_login_userid}\n LEFT JOIN userfriends uf3 ON uf3.user_one_id={$active_login_userid} \n AND uf3.user_two_id=uf.user_two_id\n LEFT OUTER JOIN (select uf5.user_one_id,\n COUNT(*) mutualfriends\n FROM userfriends uf5\n WHERE uf5.status=1 AND\n uf5.user_two_id IN (SELECT uf6.user_two_id\n FROM userfriends uf6\n WHERE uf6.user_one_id={$active_login_userid} AND status=1)\n GROUP BY uf5.user_one_id) as mf ON mf.user_one_id = u.id\n LEFT OUTER JOIN (select tr.user_id,\n COUNT(*) mutualstrings\n FROM topictrack tr\n LEFT JOIN topic t ON t.id = tr.topic_id\n WHERE t.deleted_at IS NULL AND tr.mask=0 AND\n tr.topic_id IN (SELECT tr2.topic_id \n FROM topictrack tr2\n LEFT JOIN topic t2 ON tr2.topic_id = t2.id\n WHERE tr2.user_id={$active_login_userid} \n AND t.deleted_at IS NULL \n AND tr.mask=0)\n GROUP BY tr.user_id) as ms ON ms.user_id = u.id\n WHERE (uf.user_one_id={$owner_profile_userid} AND uf.status=1)\n {$active_filter}\n LIMIT {$limit}\";\n\n return collect($this->_helper->convert_sql_to_array( DB::select(DB::raw($sql)) )); \n }", "function selectAll() {\r\n $sql = \"SELECT u.Id, u.Identification, u.Name1, u.Name2, u.Surname1, u.Surname2, u.dateBirth, u.Password, u.Address, \r\n u.ContacAddress, u.ContacAddress1, u.Email, u.State, w.Description 'UserGroup',\r\n case when u.State = 1 then 'ACTIVO' else 'INACTIVO' end 'State' \r\n FROM user u, workgroup w\r\n where u.UserGroup = w.Id \";\r\n return ejecutarConsulta($sql);\r\n }", "public function query(Request $request) {\n /* $query = $model->newQuery();\n $query->where(['role' => 'USER']);\n $query->with(['profile'])->select('id', 'email', 'status', 'created_at', 'updated_at');\n $posts = User::with('profile')->select('users.*', 'user.profile.first_name');\n return $posts; */\n\n\n\n $where = ['published' => 1];\n\n if ($request->get('status') != '') {\n if ($request->input('status') == 'all') {\n unset($where['published']);\n } elseif($request->input('status')=='unpublished') {\n $where['published'] = 0;\n }\n }\n\n $users = Page::select('*')\n ->where($where);\n return $users;\n }", "function getAllPengajuanBMT(){\n// ->rightjoin('users','users.id','=','penyimpanan_bmt.id_user')\n// ->join('bmt','bmt.id','=','penyimpanan_bmt.id_bmt')->limit(25)->get();\n $id_rekening= $this->rekening->select('id')->where('tipe_rekening','detail')->get()->toArray();\n $data = BMT::whereIn('id_rekening',$id_rekening)->get();\n return $data;\n }", "function select() {\n return \"\n contact_a.id as contact_id ,\n contact_a.contact_type as contact_type,\n contact_a.sort_name as sort_name,\n contact_a.job_title as job_title,\n contact_a.organization_name as current_employer\n \";\n }", "public function getUsersProfiles($data = array()) {\r\n \r\n $results = $this->dbDriver->query('SELECT userid, email, groups, username, givenname, lastname, to_char(registrationdate, \\'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"\\') as registrationdate, country, organization, organizationcountry, flags, topics, activated, validatedby, to_char(validationdate, \\'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"\\') as validationdate FROM usermanagement.users' . (isset($data['groupid']) ? ' WHERE \\'' . pg_escape_string($data['groupid']) . '\\' = any(groups)' : (isset($data['keywords']) ? ' WHERE email LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR username LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR givenname LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR lastname LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR country LIKE \\'' . pg_escape_string($data['keywords']) .'\\' OR organization LIKE \\'' . pg_escape_string($data['keywords']) .'\\'' : '')) . (isset($data['limit']) ? ' LIMIT ' . pg_escape_string($data['limit']) : '') . (isset($data['offset']) ? ' OFFSET ' . pg_escape_string($data['offset']) : '') );\r\n $profiles = array();\r\n while ($profile = pg_fetch_assoc($results)) {\r\n $profile['groups'] = substr($profile['groups'], 1, -1);\r\n\r\n $profiles[] = array(\r\n 'userid' => $profile['userid'],\r\n 'email' => $profile['email'],\r\n 'picture' => $this->getPicture($profile['email']),\r\n 'groups' => $profile['groups'],\r\n 'username' => $profile['username'],\r\n 'givenname' => $profile['givenname'],\r\n 'lastname' => $profile['lastname'],\r\n 'registrationdate' => $profile['registrationdate'],\r\n 'country' => $profile['country'],\r\n 'organization' => $profile['organization'],\r\n 'organizationcountry' => $profile['organizationcountry'],\r\n 'flags' => $profile['flags'],\r\n 'topics' => $profile['topics'],\r\n 'activated' => (integer) $profile['activated'],\r\n 'validatedby' => $profile['validatedby'],\r\n 'validationdate' => $profile['validationdate']\r\n );\r\n }\r\n return $profiles;\r\n }", "public function findAllWithBioGoogleProfileUrl()\n {\n return ORM::factory('blog_contributor')\n ->where('bio', '!=', 'null')\n ->and_where('google_profile_url', '!=', 'null')\n ->find_all();\n }", "function users(){\n\t$listado= mysql_query(\"select us.name as name, us.email as email , co.name as pais\n\tfrom users us\n\tjoin country co on co.Code=us.countryCode\");\n\t\n\t$i = 1;\n\t\n\twhile ($reg = mysql_fetch_array($listado)) {\n\t\techo '<tr>';\n\t\techo '<td >' . $i . '</td>';\n\t\techo '<td >' . mb_convert_encoding($reg['name'], \"UTF-8\") . '</td>';\n\t\techo '<td >' . mb_convert_encoding($reg['email'], \"UTF-8\") . '</td>';\n\t\techo '<td >' . mb_convert_encoding($reg['pais'], \"UTF-8\") . '</td>';\n\t\techo '</tr>';\n\t\t$i++;\n\t}\n}", "function all_users($logged_user_id)\n\t{\n\t\t//\tSELECT id, first_name, (Select meta_value FROM standard_user_info where user_id =users.id AND meta_key = 'bio' ) FROM users\n\t\t$select = array('id', 'user_file', 'first_name', 'last_name', 'sex','vchDigitalWalletStatus');\n\t\t\n\t $this->db->select($select)->from('users')->where('id!=', $logged_user_id);\n\t $this->db->where('id!=', 1);\n\t $this->db->order_by('id', 'desc');\n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}", "function _buildQueryUsers()\n\t{\n\t\t// Get the WHERE and ORDER BY clauses for the query\n\t\t$where = $this->_pending\n\t\t\t? $this->_buildContentWherePending()\n\t\t\t: $this->_buildContentWhere();\n\t\tif ($where === false)\n\t\t{\n\t\t\treturn 'SELECT 1 FROM #__users WHERE 1=0';\n\t\t}\n\n\t\t$query = 'SELECT ua.id, ua.name'\n\t\t\t. ' FROM #__flexicontent_files AS a'\n\t\t\t. ' LEFT JOIN #__users AS ua ON ua.id = a.uploaded_by'\n\t\t\t. $where\n\t\t\t. ' GROUP BY ua.id'\n\t\t\t. ' ORDER BY ua.name'\n\t\t\t;\n\t\treturn $query;\n\t}", "function user_company_matching_criteria_query($company_id='', $user_id='')\n\t{\n\t\t$sql = \"SELECT DISTINCT TY.type_name, 'job_fit' AS matching_criteria\n\t\t\t\tFROM hia_type_user_rel AS TUR\n\t\t\t\tJOIN hia_type AS TY ON (TUR.type_id = TY.type_id AND TUR.type_rel_category = 'job_fit' AND TUR.type_rel_userid = '$user_id' )\n\t\t\t\tJOIN hia_type_user_rel AS CUR ON (TUR.type_id = CUR.type_id AND CUR.type_rel_userid IN (SELECT users_id FROM hia_users WHERE users_companyid = '$company_id' AND users_type = '2' AND users_status != '1' ) )\n\n\t\t\t\tUNION\n\t\t\t\tSELECT DISTINCT TY.type_name, 'employer_fit' AS matching_criteria\n\t\t\t\tFROM hia_type_user_rel AS TUR\n\t\t\t\tJOIN hia_type AS TY ON (TUR.type_id = TY.type_id AND TUR.type_rel_category = 'employer_fit' AND TUR.type_rel_userid = '$user_id' )\n\t\t\t\tJOIN hia_type_user_rel AS CUR ON (TUR.type_id = CUR.type_id AND CUR.type_rel_userid IN (SELECT users_id FROM hia_users WHERE users_companyid = '$company_id' AND users_type = '2' AND users_status != '1' ) ) \" ;\n\n\t\t//echo $sql;\t\t\n\t\tif ( ! $this->db->simple_query($sql))\n\t\t{\n\t\t\t$error = $this->db->error();\n\t\t\t//print_r($error);\n\t\t\t//exit();\n\t\t\treturn $error;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $this->db->query($sql);\n\t\t\t\n\t\t\treturn $query->result_array();\n\t\t}\n\t\t\n\t}", "function get_user_details($user_id, $cond = array()) {\n\n $ci = & get_instance();\n $lang_id = get_current_language();\n $user = array();\n $lang_case = \"`id`.`lang_id`= CASE WHEN (EXISTS (SELECT id FROM \" . INTERESTS_DATA . \" WHERE lang_id = '$lang_id') ) THEN $lang_id ELSE 1 END\";\n\n $ci->db->select(\"u.id as uid,u.plan_expire as u_plan_expire,u.plan_type as u_plan_type,u.plan_id as u_plan_id, u.*, pr.*, f.*, f.id as file_id, fam.id as fam_id,fam.plan_expire,fam.plan_type,fam.plan_id, fam.*\");\n $ci->db->from(USER . \" u\");\n $ci->db->join(PROFILE . \" pr\", \"pr.user_id = u.id\", 'left');\n $ci->db->join(FILES . \" f\", \"pr.profile_Image = f.id\", 'left');\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.user_id = u.id\", 'left');\n $ci->db->join(FAMILY . \" fam\", \"fu.family_id = fam.id\", 'left');\n $ci->db->where(\"u.id\", $user_id);\n $query = $ci->db->get();\n\n\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $user = $result[0];\n\n// Get data from for user interests\n $ci->db->select(\"i.*, id.content\");\n $ci->db->from(INTERESTS . \" i\");\n $ci->db->join(PROFILE_INTEREST . \" pi\", \"pi.interest_id = i.id\");\n $ci->db->join(INTERESTS_DATA . \" id\", \"id.interest_id = i.id\");\n $ci->db->where(\"pi.user_id\", $user_id);\n $ci->db->where($lang_case);\n//$ci->db->distinct();\n $query_int = $ci->db->get();\n if ($query_int->num_rows() > 0) {\n $details = $query_int->result_array();\n $user['interest'] = $details;\n } else {\n $user['interest'] = array();\n }\n\n // Get data from for user family children\n $ci->db->select(\"fc.*\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(FAMILY_CHILDREN . \" fc\", \"f.id = fc.family_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = fc.family_id\");\n $ci->db->where(\"fu.user_id\", $user_id);\n//$ci->db->distinct();\n $query_child = $ci->db->get();\n if ($query_child->num_rows() > 0) {\n $details = $query_child->result_array();\n $user['family_children'] = $details;\n } else {\n $user['family_children'] = array();\n }\n\n// Get data from for user family pets\n $ci->db->select(\"fp.*\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(FAMILY_PETS . \" fp\", \"f.id = fp.family_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = fp.family_id\");\n $ci->db->where(\"fu.user_id\", $user_id);\n//$ci->db->distinct();\n $query_pets = $ci->db->get();\n if ($query_pets->num_rows() > 0) {\n $details = $query_pets->result_array();\n $user['family_pets'] = $details;\n } else {\n $user['family_pets'] = array();\n }\n\n// Get data from for user family elders\n $ci->db->select(\"fe.*\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(FAMILY_ELDERS . \" fe\", \"f.id = fe.family_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = fe.family_id\");\n $ci->db->where(\"fu.user_id\", $user_id);\n//$ci->db->distinct();\n $query_elders = $ci->db->get();\n if ($query_elders->num_rows() > 0) {\n $details = $query_elders->result_array();\n $user['family_elders'] = $details;\n } else {\n $user['family_elders'] = array();\n }\n /**\n $family_users = array();\n $users = family_user();\n // pre($users);\n $ids = array_column($users, 'user_id');\n foreach ($ids as $user) {\n $userinfo = get_user_basic_info($user);\n $userinfo['is_user'] = 1;\n $userinfo['user_id'] = $user;\n $family_users[] = $userinfo;\n }\n\n $ci->db->where(\"family_id\", $_SESSION['userSession']['family_id']);\n $qqur = $ci->db->get(PARENT_ADMIN);\n $res_parent = $qqur->result_array();\n foreach ($res_parent as $parent) {\n if(in_array($parent['user_id'], array_column($family_users, 'user_id'))) {\n $family_users[$parent['user_id']]['role'] = $parent['role'];\n }\n if ($family_users[$parent['user_id']]) {\n $family_users[$parent['user_id']]['role'] = $parent['role'];\n }else{\n\n }\n }\n * */\n $ci->db->select(\"pa.*\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(PARENT_ADMIN . \" pa\", \"f.id = pa.family_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = pa.family_id\");\n $ci->db->where(\"fu.user_id\", $user_id);\n //$ci->db->distinct();\n $query_elders = $ci->db->get();\n if ($query_elders->num_rows() > 0) {\n $details = $query_elders->result_array();\n $user['family_admin'] = $details;\n } else {\n $user['family_admin'] = array();\n }\n\n// Get data from for user family home address\n $ci->db->select(\"ha.*, cd.content\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(HOME_ADDRESS . \" ha\", \"f.id = ha.family_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = ha.family_id\");\n $ci->db->join(COUNTRY . \" c\", \"ha.country = c.id\", 'left');\n $ci->db->join(COUNTRY_DATA . \" cd\", \"cd.country_id = ha.country\", 'left');\n $ci->db->where(\"fu.user_id\", $user_id);\n $query_add = $ci->db->get();\n if ($query_add->num_rows() > 0) {\n $details = $query_add->row_array();\n $user['home_address'] = $details;\n } else {\n $user['home_address'] = array();\n }\n\n// Get data from for user family emergency Contact\n $ci->db->select(\"ec.*, cd.content\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(EMERGENCY_CONTACT . \" ec\", \"f.id = ec.family_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = ec.family_id\");\n $ci->db->join(COUNTRY . \" c\", \"ec.country = c.id\", 'left');\n $ci->db->join(COUNTRY_DATA . \" cd\", \"cd.country_id = ec.country\", 'left');\n $ci->db->where(\"fu.user_id\", $user_id);\n $query_eme = $ci->db->get();\n if ($query_eme->num_rows() > 0) {\n $details = $query_eme->row_array();\n $user['emergency_contact'] = $details;\n } else {\n $user['emergency_contact'] = array();\n }\n\n// Get data from for user family doctor\n $ci->db->select(\"d.*, cd.content\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(DOCTOR . \" d\", \"f.id = d.family_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = d.family_id\");\n $ci->db->join(COUNTRY . \" c\", \"d.country = c.id\", 'left');\n $ci->db->join(COUNTRY_DATA . \" cd\", \"cd.country_id = d.country\", 'left');\n $ci->db->where(\"fu.user_id\", $user_id);\n $query_doc = $ci->db->get();\n if ($query_doc->num_rows() > 0) {\n $details = $query_doc->row_array();\n $user['doctor'] = $details;\n } else {\n $user['doctor'] = array();\n }\n\n// Get data from for user family Gallery\n $ci->db->select(\"fg.*\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(FAMILY_GALLERY . \" fg\", \"f.id = fg.family_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = fg.family_id\");\n $ci->db->where(\"fu.user_id\", $user_id);\n $query_gal = $ci->db->get();\n $user['family_gallery'] = ($query_gal->num_rows() > 0) ? $query_gal->result_array() : array();\n\n// Get data from for user family friends\n $ci->db->select(\"fr.*\");\n $ci->db->from(FAMILY . \" f\");\n $ci->db->join(FRIENDS . \" fr\", \"f.id = fr.from_id OR f.id = fr.to_id\");\n $ci->db->join(FAMILY_USERS . \" fu\", \"fu.family_id = fr.from_id OR fu.family_id = fr.to_id\");\n $ci->db->where(\"fu.user_id\", $user_id);\n $ci->db->distinct();\n $query_fr = $ci->db->get();\n $user['friends'] = ($query_fr->num_rows() > 0) ? $query_fr->result_array() : array();\n }\n return $user;\n}", "public function _buildQuery()\n {\n $app = \\Cobalt\\Container::get('app');\n\n $this->db->setQuery(\"SET SQL_BIG_SELECTS=1\")->execute();\n\n $user = $this->_user;\n $team = $this->_team;\n $id = $this->_id;\n $type = $this->_type;\n $view = $app->input->get('view');\n\n if (!$id) {\n\n $session = $app->getSession();\n\n //determine whether we are searching for a team or user\n if ($user) {\n $session->set('company_team_filter', null);\n }\n if ($team) {\n $session->set('company_user_filter', null);\n }\n\n //set user session data\n if ($type != null) {\n $session->set('company_type_filter',$type);\n } else {\n $sess_type = $session->get('company_type_filter');\n $type = $sess_type;\n }\n if ($user != null) {\n $session->set('company_user_filter',$user);\n } else {\n $sess_user = $session->get('company_user_filter');\n $user = $sess_user;\n }\n if ($team != null) {\n $session->set('company_team_filter',$team);\n } else {\n $sess_team = $session->get('company_team_filter');\n $team = $sess_team;\n }\n\n }\n\n //generate query for base companies\n $query = $this->db->getQuery(true);\n $export = $app->input->get('export');\n\n if ($export) {\n\n $select_string = 'c.name,c.description,c.address_1,c.address_2,c.address_city,';\n $select_string .= 'c.address_state,c.address_zip,c.address_country,c.website,c.created,c.modified';\n\n $query\n ->select($select_string)\n ->from(\"#__companies as c\")\n ->leftJoin(\"#__users AS u on u.id = c.owner_id\");\n } else {\n $query\n ->select('c.*')\n ->from(\"#__companies as c\")\n ->leftJoin(\"#__users AS u on u.id = c.owner_id\");\n }\n\n if (!$id) {\n\n //get current date\n $date = DateHelper::formatDBDate(date('Y-m-d 00:00:00'));\n\n //filter for type\n if ($type != null && $type != \"all\") {\n\n //filter for companies with tasks due today\n if ($type == 'today') {\n $query->leftJoin(\"#__events_cf as event_company_cf on event_company_cf.association_id = c.id AND event_company_cf.association_type='company'\");\n $query->join('INNER',\"#__events as event on event.id = event_company_cf.event_id\");\n $query->where(\"event.due_date='$date'\");\n $query->where(\"event.published>0\");\n }\n\n //filter for companies and deals//tasks due tomorrow\n if ($type == \"tomorrow\") {\n $tomorrow = DateHelper::formatDBDate(date('Y-m-d 00:00:00',time() + (1*24*60*60)));\n $query->leftJoin(\"#__events_cf as event_company_cf on event_company_cf.association_id = c.id AND event_company_cf.association_type='company'\");\n $query->join('INNER',\"#__events as event on event.id = event_company_cf.event_id\");\n $query->where(\"event.due_date='$tomorrow'\");\n $query->where(\"event.published>0\");\n }\n\n //filter for companies updated in the last 30 days\n if ($type == \"updated_thirty\") {\n $last_thirty_days = DateHelper::formatDBDate(date('Y-m-d 00:00:00',time() - (30*24*60*60)));\n $query->where(\"c.modified >'$last_thirty_days'\");\n }\n\n //filter for past companies// last contacted 30 days ago or longer\n if ($type == \"past\") {\n $last_thirty_days = DateHelper::formatDBDate(date('Y-m-d 00:00:00',time() - (30*24*60*60)));\n $query->where(\"c.modified <'$last_thirty_days'\");\n }\n\n //filter for recent companies\n if ($type == \"recent\") {\n $last_thirty_days = DateHelper::formatDBDate(date('Y-m-d 00:00:00',time() - (30*24*60*60)));\n $query->where(\"c.modified >'$last_thirty_days'\");\n }\n\n $query->group(\"c.id\");\n\n }\n\n /** company name filter **/\n $company_name = $this->getState('Company.'.$view.'_name');\n if ($company_name != null) {\n $query->where(\"( c.name LIKE '%\".$company_name.\"%' )\");\n }\n\n }\n\n //search for specific companies\n if ($id != null) {\n if ( is_array($id) ) {\n $query->where(\"c.id IN (\".implode(',', $id).\")\");\n } else {\n $query->where(\"c.id=$id\");\n }\n }\n\n //filter based on member access roles\n $user_id = UsersHelper::getUserId();\n $member_role = UsersHelper::getRole();\n $team_id = UsersHelper::getTeamId();\n\n //filter based on specified user\n if ($user && $user != 'all') {\n $query->where(\"c.owner_id = \".$user);\n }\n\n //filter based on team\n if ($team) {\n $team_members = UsersHelper::getTeamUsers($team, true);\n $query->where(\"c.owner_id IN (\".implode(',', $team_members).\")\");\n }\n\n //set user state requests\n $query\n ->order($this->getState('Company.filter_order').' '.$this->getState('Company.filter_order_Dir'))\n ->where(\"c.published=\".$this->published);\n\n return $query;\n }", "function make_query($logged_person){\n $table_name = \"LogInTable\"; \n $sql = \"SELECT * FROM $table_name WHERE \";\n \n //attributes \n $value = $logged_person->funcitional_query(\"account\",$logged_person->account);\n $sql .= $value.\" and \"; \n \n $value = $logged_person->funcitional_query(\"research_group\", $logged_person->research_group);\n $sql .= $value.\" and \"; \n\n $value = $logged_person->funcitional_query(\"password\", $logged_person->password);\n $sql .= $value.\" \"; \n \n return $sql; \n }", "public function filter_books50($data){\n $query=$this->db->query('SELECT * FROM `user_books` INNER JOIN `users` ON `users`.`username` = `user_books`.`user_username` WHERE `availability`=\"1\" AND `cond` = \"'.$data['cond'].'\" AND `lang` = \"'.$data['lang'].'\" AND `users`.`user_region` = \"'.$data['region'].'\" AND NOT `user_username`= \"'.$data['username'].'\" ORDER BY `date_added` DESC LIMIT 150;');\n return $query->result();\n }", "public function datos_persona_logueada(){\r\n $usuario_logueado = \\DB::table('personas')\r\n ->join('users', 'personas.id_persona', '=', 'users.id_persona')\r\n ->join('servidores_publicos', 'servidores_publicos.id_servidor_publico', '=', 'users.id_servidor_publico')\r\n ->join('cargos', 'cargos.id_cargo', '=', 'servidores_publicos.id_cargo')\r\n ->join('areas', 'areas.id_area', '=', 'cargos.id_area')\r\n ->select('users.id as id_usuario', 'personas.id_persona', 'personas.nombres', 'personas.paterno','personas.materno', 'personas.titulo', 'personas.nombre_foto',\r\n 'cargos.id_cargo', 'cargos.descripcion as descripcion_del_cargo', 'cargos.id_nivel_jerarquico', 'areas.id_area', 'areas.unidad', 'areas.id_direccion', 'areas.id_entidad',\r\n 'areas.sigla as sigla_del_area', 'areas.nombre as nombre_del_area', 'servidores_publicos.id_servidor_publico')\r\n ->where('users.id', Auth::user()->id)\r\n ->get();\r\n return $usuario_logueado;\r\n }", "public function basicInfoByEmail($email)\n {\n return $this->model->where ( 'email', '=', $email )\n ->select (\n [\n 'users.id', 'users.email', 'users.password',\n 'users.current_sign_in_at', 'users.current_sign_in_ip', 'users.sign_in_count',\n 'user_profiles.first_name', 'user_profiles.last_name'\n ] )\n ->join ( 'user_profiles', 'user_profiles.user_id', '=', 'users.id' )->first ();\n }", "function get_report_sql($columns) {\n global $CURMAN;\n\n $cluster_context_level = context_level_base::get_custom_context_level('cluster', 'block_curr_admin');;\n\n //special version of the select columns used in the non-curriculum case\n $noncurriculum_columns = str_replace('curriculum.id', 'NULL', $columns);\n\n //extra column needed for the curriculum-specific records\n $extra_curriculum_columns = \"user.lastname,\n COUNT(course_completion.id) AS numtotal,\n enrol.id AS enrolid,\n class.id AS classid,\n cluster.id AS clusterid,\n cluster_context.path AS path,\n curriculum.name AS curriculumname,\n curriculum.id AS curriculumid,\n user.id AS userid,\n curriculum_assignment.completed,\n enrol.completestatusid AS enrolstatus,\n course.name AS coursename,\n course.id AS courseid,\n enrol.completetime AS enrolcompletetime,\n curriculum_assignment.timecompleted AS curriculumcompletetime\";\n\n if (empty($CURMAN->config->legacy_show_inactive_users)) {\n $inactive = ' AND user.inactive = 0';\n } else {\n $inactive = '';\n }\n\n //extra column needed for the non-curriculum-specific records\n $extra_noncurriculum_columns = str_replace('curriculum.id', 'NULL', $extra_curriculum_columns);\n $extra_noncurriculum_columns = str_replace('curriculum.name', 'NULL', $extra_noncurriculum_columns);\n\n //starting point for both cases\n $core_tables = \"{$CURMAN->db->prefix_table(USRTABLE)} user\n JOIN {$CURMAN->db->prefix_table(CLSTUSERTABLE)} user_cluster\n ON user.id = user_cluster.userid\n JOIN {$CURMAN->db->prefix_table(CLSTTABLE)} cluster\n ON user_cluster.clusterid = cluster.id\n JOIN {$CURMAN->db->prefix_table('context')} cluster_context\n ON cluster.id = cluster_context.instanceid\n AND cluster_context.contextlevel = {$cluster_context_level}\";\n\n //course completion info used in both cases\n $completion_tables = \"LEFT JOIN {$CURMAN->db->prefix_table(CRSCOMPTABLE)} course_completion\n ON course.id = course_completion.courseid\n LEFT JOIN {$CURMAN->db->prefix_table(GRDTABLE)} class_graded\n ON class.id = class_graded.classid\n AND course_completion.id = class_graded.completionid\n AND enrol.userid = class_graded.userid\n AND class_graded.locked = 1\n AND class_graded.grade >= course_completion.completion_grade\";\n\n //filters for each of two cases, put inside the query for performance reasons\n //(use parent functionality because we are preventing filter application in the usual way)\n $curriculum_filter = parent::get_filter_condition('WHERE');\n $noncurriculum_filter = parent::get_filter_condition('AND');\n\n //grouping for each of the two cases\n $group_by = \"GROUP BY user.id, enrol.id, cluster.id, course.id, curriculum.id\";\n $noncurriculum_group_by = \"GROUP BY user.id, enrol.id, cluster.id, course.id\";\n\n //check permissions\n $contexts = get_contexts_by_capability_for_user('cluster', $this->access_capability, $this->userid);\n $permissions_filter = $contexts->sql_filter_for_context_level('clusterid', 'cluster');\n\n //the master query\n $sql = \"SELECT * FROM\n (\n SELECT {$columns},\n {$extra_curriculum_columns}\n FROM\n {$core_tables}\n\n JOIN {$CURMAN->db->prefix_table(CURASSTABLE)} curriculum_assignment\n ON user.id = curriculum_assignment.userid\n JOIN {$CURMAN->db->prefix_table(CURTABLE)} curriculum\n ON curriculum_assignment.curriculumid = curriculum.id\n JOIN {$CURMAN->db->prefix_table(CURCRSTABLE)} curriculum_course\n ON curriculum.id = curriculum_course.curriculumid\n JOIN {$CURMAN->db->prefix_table(CRSTABLE)} course\n ON curriculum_course.courseid = course.id\n LEFT JOIN ({$CURMAN->db->prefix_table(CLSTABLE)} class\n JOIN {$CURMAN->db->prefix_table(STUTABLE)} enrol\n ON class.id = enrol.classid)\n ON curriculum_assignment.userid = enrol.userid\n AND course.id = class.courseid\n\n {$completion_tables}\n\n {$curriculum_filter}\n {$inactive}\n\n {$group_by}\n\n UNION\n\n SELECT {$noncurriculum_columns},\n {$extra_noncurriculum_columns}\n FROM\n {$core_tables}\n\n JOIN {$CURMAN->db->prefix_table(STUTABLE)} enrol\n ON user.id = enrol.userid\n JOIN {$CURMAN->db->prefix_table(CLSTABLE)} class\n ON enrol.classid = class.id\n JOIN {$CURMAN->db->prefix_table(CRSTABLE)} course\n ON class.courseid = course.id\n LEFT JOIN ({$CURMAN->db->prefix_table(CURCRSTABLE)} curriculum_course\n JOIN {$CURMAN->db->prefix_table(CURASSTABLE)} curriculum_assignment\n ON curriculum_course.curriculumid = curriculum_assignment.curriculumid)\n ON course.id = curriculum_course.courseid\n AND enrol.userid = curriculum_assignment.userid\n\n {$completion_tables}\n\n WHERE curriculum_assignment.id IS NULL\n {$noncurriculum_filter}\n {$inactive}\n\n {$noncurriculum_group_by}\n ) main_data\n WHERE {$permissions_filter}\";\n\n return $sql;\n }", "public function query()\n {\n $default_currency = Currency::active()->defaultCurrency()->first();\n if (LOGIN_USER_TYPE=='company' && session()->get('currency') != null) { //if login user is company then get session currency\n $default_currency = Currency::whereCode(session()->get('currency'))->first();\n\n }\n $this->currency_symbol = $default_currency->symbol;\n $currency_rate = $default_currency->rate;\n\n\n $owe = DB::table('users')\n ->where(function($query) {\n if(LOGIN_USER_TYPE=='company') {\n //If login user is company then get that company drivers only\n $query->where('company_id',auth('company')->user()->id);\n }\n })\n ->join('trips', function($join) {\n $join->on('users.id', '=', 'trips.driver_id');\n })\n ->join('currency', function($join) {\n $join->on('trips.currency_code', '=', 'currency.code');\n })\n ->leftJoin('companies', function($join) {\n $join->on('users.company_id', '=', 'companies.id');\n })\n ->leftJoin('driver_owe_amounts', function($join) {\n $join->on('users.id', '=', 'driver_owe_amounts.user_id');\n })\n\n ->join('currency as owe_amounts_currency', function($join) {\n $join->on('driver_owe_amounts.currency_code', '=', 'owe_amounts_currency.code');\n })\n ->select('trips.id as trip_id','users.id As id', 'users.first_name', 'users.last_name', 'users.email', 'users.gender', 'trips.currency_code as currency_code',DB::raw(\"GROUP_CONCAT(DISTINCT trips.id) as trip_ids\"),'companies.name as driver_company_name','companies.id as company_id', DB::raw(' concat(\"'.$this->currency_symbol.'\",sum(ROUND((trips.owe_amount / currency.rate) * '.$currency_rate.',2))) as owe_amount '), DB::raw(' concat(\"'.$this->currency_symbol.'\", sum(ROUND((driver_owe_amounts.amount / owe_amounts_currency.rate) * '.$currency_rate.',2))) as remaining_owe_amount '), DB::raw('sum(ROUND((trips.applied_owe_amount / currency.rate) * '.$currency_rate.',2)) as applied_owe_amount '))\n\n\n\n ->whereNotNull('company_id');\n\n if($this->filter_type == 'applied') {\n $owe = $owe->where('applied_owe_amount','>','0');\n }\n else {\n $owe = $owe->where('owe_amount','>','0');\n }\n\n if(LOGIN_USER_TYPE=='company') {\n $owe = $owe->groupBy('id');\n }\n else {\n $owe = $owe->groupBy('company_id');\n }\n\n //for search filter\n $keyword = '%'.request()->search['value'].'%';\n if(isset(request()->search['value'])){\n $owe->havingRaw(' owe_amount like \"'.$keyword.'\" or trip_ids like \"'.$keyword.'\" or remaining_owe_amount like \"'.$keyword.'\" or remaining_owe_amount like \"'.$keyword.'\" or companies.name like \"'.$keyword.'\" or companies.id like \"'.$keyword.'\" ');\n }\n\n return $owe;\n }", "function getPredictorPersonalInformation($userId){\n\t $sql = \"SELECT u.id, ui.first_name, ui.last_name, ui.picture, ucs.cryptoScore \";\n\t\t\t$sql .=\" FROM user u, user_crypto_score ucs, user_info ui \";\n\t\t\t$sql .= \" WHERE u.id = ucs.userId AND u.id = ui.userId \";\n\t\t\t$sql.=\" AND u.id = \".$userId.\" \";\n\n \t$query = $this->query($sql, 'fetch');\n\n\t $array = array(\n\t\t\t'query'=> $query,\n\t\t\t'sql'=>$sql,\n\t\t);\n\t\treturn $array;\n\t}", "function local_powerprouserexport_get_user_data($lastrun = 0, $data = null) {\n global $DB;\n\n $params = array();\n $whereclause = '';\n\n if ($data) {\n $params['timestart'] = $data->timestart;\n $params['timeend'] = $data->timeend;\n $whereclause = \"u.timemodified BETWEEN :timestart and :timeend\";\n } else {\n $params['lastrun'] = $lastrun;\n $whereclause = \"u.timemodified > :lastrun\";\n }\n\n $sql = \"\n SELECT *\n FROM {user} AS u\n WHERE $whereclause\n \";\n\n/*\n print_object($params);\n echo \"<pre>$sql</pre>\";\n*/\n return $DB->get_recordset_sql($sql, $params);\n}", "function student_info_sql($userid,$verified,$specific_account = 1) {\n\t\t$sql = \"SELECT student_info.course as department,student_info.* FROM student_info,tutor_info WHERE student_info.verified = '{$verified}' AND tutor_info.user_id = '{$userid}' AND tutor_info.department = student_info.course AND tutor_info.semester = student_info.semester \";\n\t\tif($specific_account != 1){\n\t\t\t$sql .= \"AND student_info.user_id = '{$specific_account}' \";\n\t\t}\n\t\treturn $sql;\n\t}", "function select() {\n return \"\n contact_a.id AS contact_id,\n contact_a.contact_sub_type AS contact_sub_type,\n contact_a.sort_name AS sort_name,\n source,\n created_date,\n modified_date\n \";\n }", "function allusers($condition=\"\")\n\t{ \n\t // $sql = \"select gene_user_id,gene_generation,gene_name,gene_surname,gene_sex,gene_birthday,gene_deathday from tab_gene_user\";\n\t\t$sql = \"select * from tab_gene_user\";\n\t\tif($condition)\n\t\t{\n\t\t\t$sql .=\" \".\"WHERE\".\" \".\"LastModifiedTime > '$condition'\";\n\t\t\t\n\t\t}\n\t\t$res = $this->db->readValues($sql); \n\t\tif(count($res)> 0 )\n\t\t{\n return $res;\n\t\t}\n\t}", "function tutor_info_sql($userid,$verified,$specific_account = 1) {\n\t\t$sql = \"SELECT tutor_info.* FROM tutor_info,hod_info WHERE tutor_info.verified = '{$verified}' AND hod_info.user_id = '{$userid}' AND tutor_info.department = hod_info.department \";\n\t\tif($specific_account != 1){\n\t\t\t$sql .= \"AND tutor_info.user_id = '{$specific_account}' \";\n\t\t}\n\t\treturn $sql;\n\t}", "protected function getAllDetails()\n\t{\n\t\t $qbLogin = $this->getDefaultEntityManager()->createQueryBuilder();\n\t\t $qbLogin->select('m')\n ->from('MailingList\\Entity\\PhoenixMailingList', 'm')\n\t\t\t ->where('m.status=:st')\n\t\t\t ->andwhere('m.subscribe=:s')\n\t\t\t ->setParameter('s',1)\n\t\t\t ->setParameter('st',1);\n\t\t $result = $qbLogin->getQuery()->getResult();\t\n\t\treturn $result;\n\t}", "function mentor_list($limit='',$start=0,$condition='')\n{\n\tglobal $DB;\n\t$sql =\"SELECT u.id,u.firstname,u.lastname,u.email,u.city,u.picture,u.department FROM {user} u left join {user_info_data} ud on ud.userid=u.id \";\n\t$sql.=\"WHERE ud.data='mentor data' and ud.acceptterms=1 and u.deleted=0 $condition order by u.timemodified desc limit $start,$limit\";\n\t//echo $sql;die;\n\t$result = $DB->get_records_sql($sql);\n\tif(count($result)>0){\n\t\tforeach($result as $mentordata)\n\t\t{\n\t\t\t$user = new stdClass();\n\t\t\t$user->id = $mentordata->id;\n\t\t\t//$picture = get_userprofilepic($user);\n\t\t\t$userurl = getuser_profilelink($user->id);\n\t\t\t$usrimg = get_userprofilepic($user);\n\t\t\t$picture ='<div class=\"left picture\"><a href=\"'.$userurl.'\" >'.$usrimg.'</a></div>'; \n\t\t\t$mentordata->picture = $picture;\n\t\t}\n\t}\n\treturn $result;\n}", "function selectAll(){\r\n $query = \"SELECT B.branchName, S.*\r\n FROM branches AS B, userschedules AS S \r\n WHERE S.organizationId = $this->organizationId\r\n AND B.organizationId = S.organizationId\r\n AND B.branchId LIKE S.branchId\r\n AND S.locationCode LIKE '$locationCode' \r\n AND S.userName = '$this->userName'\r\n AND S.date BETWEEN '\".date('Y-m-d',strtotime($this->fromDate)).\"' AND '\".date('Y-m-d',strtotime($this->toDate)).\"'\r\n ORDER BY S.date, S.branchId, S.locationCode\";\r\n include(\"includes/dbConnection.php\");\t\t\t\r\n $executeQuery = $db->prepare($query);\r\n $executeQuery->execute() or exit(\"Error: SELECT query failed.\");\r\n $result = $executeQuery->fetchAll(PDO::FETCH_BOTH);\r\n return $result;\r\n }", "public function get_user_following($filters)\n {\n $active_login_userid = $filters['active_login_userid'];\n $owner_profile_userid = $filters['owner_profile_userid'];\n $filter = $filters['filter'];\n \n //Most Recent\n $active_filter = \" ORDER BY created_at DESC, u.first_name, u.last_name\";\n if($filter == 1) {\n //Alphabetical\n $active_filter = \" ORDER BY u.first_name, u.last_name\";\n } else if($filter == 2) {\n //By number of followers\n $active_filter = \" ORDER BY followers DESC, u.first_name, u.last_name\";\n } else if($filter == 3) {\n //By number of mutual friends\n $active_filter = \" ORDER BY mutual_friends DESC, u.first_name, u.last_name\";\n } else if($filter == 4) {\n //By number of similar interests\n $active_filter = \" ORDER BY similar_interest DESC, u.first_name, u.last_name\";\n }\n \n $limit = 20;\n \n $sql = \"SELECT u.id as user_id,\n u.profile_code,\n u.first_name,\n u.last_name,\n ub.profilephoto,\n ub.coverphoto,\n coalesce(a.total,0) as followers,\n coalesce(b.total,0) as following,\n round((coalesce(c.yaycount,0) + coalesce(d.yaycount,0) + (coalesce(e.yaycount,0) / 10)) / 3) as avg_rating,\n us.credential_type,\n us.credential_refid,\n (case us.credential_type\n when 1 then ugen.general_info\n when 2 then \n (case WHEN ucol.course IS NOT NULL THEN\n CONCAT(ucol.course, ', ', ucol.schoolname)\n ELSE ucol.schoolname\n end)\n when 3 then CONCAT(uwork.position, ', ', uwork.companyname,', ',uwork.location)\n end) 'credential',\n (case \n when uf2.status=1 then '1'\n when uf2.status=0 then '2'\n when uf3.status=0 then '3' \n else '4'\n end) 'friend_status',\n (case\n when ua.status=1 then \n case ua2.status\n when 1 then '6'\n else '1'\n end\n when ua.status=0 then '2'\n when ua2.status=1 then '3'\n when ua2.status=0 then '4' \n else '5'\n end) 'following_status',\n coalesce(mf.mutualfriends,0) as mutual_friends,\n coalesce(ms.mutualstrings,0) as similar_interest,\n uq.created_at\n FROM useracquiantances uq\n JOIN users u ON u.id = uq.user_two_id\n LEFT JOIN userbasicinfo ub on u.id = ub.user_id\n LEFT JOIN usersettings us on u.id = us.user_id\n LEFT JOIN usergeneralinfo ugen ON ugen.user_id = us.user_id AND ugen.id = us.credential_refid\n LEFT JOIN usereduccollege ucol ON ucol.user_id = us.user_id AND ucol.id = us.credential_refid\n LEFT JOIN userworkhistory uwork ON uwork.user_id = us.user_id AND uwork.id = us.credential_refid\n LEFT OUTER JOIN (select useracquiantances.user_two_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_two_id) as a ON a.user_two_id = u.id\n LEFT OUTER JOIN (select useracquiantances.user_one_id,\n COUNT(*) total\n FROM useracquiantances\n WHERE status=1\n GROUP BY useracquiantances.user_one_id) as b ON b.user_one_id = u.id\n LEFT OUTER JOIN (select postcontentapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postcontentapprovalrate\n LEFT JOIN postcontent ON postcontent.id = postcontentapprovalrate.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postcontentapprovalrate.mask = 0\n GROUP BY postcontentapprovalrate.user_id) as c ON c.user_id = u.id\n LEFT OUTER JOIN (select topicapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM topicapprovalrate\n LEFT JOIN topic ON topic.id = topicapprovalrate.string_id\n WHERE topic.deleted_at IS NULL AND topicapprovalrate.mask=0\n GROUP BY topicapprovalrate.user_id) as d ON d.user_id = u.id\n LEFT OUTER JOIN (select postopinionapprovalrate.user_id,\n sum(Case when approvalrate = 'Y' then 1 else 0 end) yaycount\n FROM postopinionapprovalrate\n LEFT JOIN postopinion ON postopinion.id = postopinionapprovalrate.postopinion_id\n LEFT JOIN postcontent ON postcontent.id = postopinion.postcontent_id\n WHERE postcontent.deleted_at IS NULL AND postopinion.deleted_at IS NULL\n AND postopinionapprovalrate.mask=0\n GROUP BY postopinionapprovalrate.user_id) as e ON e.user_id = u.id\n LEFT JOIN useracquiantances ua on ua.user_one_id = uq.user_two_id \n AND ua.user_two_id = {$active_login_userid}\n LEFT JOIN useracquiantances ua2 on ua2.user_one_id = {$active_login_userid} \n AND ua2.user_two_id = uq.user_two_id\n LEFT JOIN userfriends uf2 on uf2.user_one_id = uq.user_two_id \n AND uf2.user_two_id = {$active_login_userid}\n LEFT JOIN userfriends uf3 ON uf3.user_one_id={$active_login_userid} \n AND uf3.user_two_id=uq.user_two_id\n LEFT OUTER JOIN (select uf5.user_one_id,\n COUNT(*) mutualfriends\n FROM userfriends uf5\n WHERE uf5.status=1 AND\n uf5.user_two_id IN (SELECT uf6.user_two_id\n FROM userfriends uf6\n WHERE uf6.user_one_id={$active_login_userid} AND status=1)\n GROUP BY uf5.user_one_id) as mf ON mf.user_one_id = u.id\n LEFT OUTER JOIN (select tr.user_id,\n COUNT(*) mutualstrings\n FROM topictrack tr\n LEFT JOIN topic t ON t.id = tr.topic_id\n WHERE t.deleted_at IS NULL AND tr.mask=0 AND\n tr.topic_id IN (SELECT tr2.topic_id \n FROM topictrack tr2\n LEFT JOIN topic t2 ON tr2.topic_id = t2.id\n WHERE tr2.user_id={$active_login_userid} \n AND t.deleted_at IS NULL \n AND tr.mask=0)\n GROUP BY tr.user_id) as ms ON ms.user_id = u.id\n WHERE (uq.user_one_id={$owner_profile_userid} AND uq.status=1)\n {$active_filter}\n LIMIT {$limit}\";\n \n return collect($this->_helper->convert_sql_to_array( DB::select(DB::raw($sql)) )); \n }", "public function getSQL($data){\n\t\treturn array(\n \t\t'job_title' => (!empty($data['job_title']) ? $data['job_title'] : ''),\n \t\t'company_id' => (!empty($data['company_id']) ? $data['company_id'] : ''),\n \t\t'first_name' => (!empty($data['first_name']) ? $data['first_name'] : ''),\n \t\t'last_name' => (!empty($data['last_name']) ? $data['last_name'] : ''),\n \t\t'title' => (!empty($data['title']) ? $data['title'] : ''),\n \t\t'email' => (!empty($data['email']) ? $data['email'] : ''),\n \t\t'email2' => (!empty($data['email2']) ? $data['email2'] : ''),\n \t\t'url' => (!empty($data['url']) ? $data['url'] : ''),\n \t\t'phone_home' => (!empty($data['phone_home']) ? $data['phone_home'] : ''),\n \t\t'phone2' => (!empty($data['phone2']) ? $data['phone2'] : ''),\n \t\t'fax' => (!empty($data['fax']) ? $data['fax'] : ''),\n \t\t'mobile' => (!empty($data['mobile']) ? $data['mobile'] : ''),\n \t\t'address1' => (!empty($data['address1']) ? $data['address1'] : ''),\n \t\t'address2' => (!empty($data['address2']) ? $data['address2'] : ''),\n \t\t'city' => (!empty($data['city']) ? $data['city'] : ''),\n \t\t'state' => (!empty($data['state']) ? $data['state'] : ''),\n \t\t'zip' => (!empty($data['zip']) ? $data['zip'] : ''),\n \t\t'description' => (!empty($data['description']) ? $data['description'] : ''),\n \t\t'jabber' => (!empty($data['jabber']) ? $data['jabber'] : ''),\n \t\t'icq' => (!empty($data['icq']) ? $data['icq'] : ''),\n \t\t'msn' => (!empty($data['msn']) ? $data['msn'] : ''),\n \t\t'yahoo' => (!empty($data['yahoo']) ? $data['yahoo'] : ''),\n \t\t'aol' => (!empty($data['aol']) ? $data['aol'] : ''),\n \t\t'last_modified' => new \\Zend\\Db\\Sql\\Expression('NOW()')\n\t\t);\n\t}", "function suchPerson($muster) {\n //$pre = ($_SESSION[\"preon\"])?\"%\":\"\"; //wiederspricht sich mit der Zeile danach\n $pre = isset($muster[\"pre\"])?$_SESSION[\"pre\"]:\"\";\n $fuzzy=$muster[\"fuzzy\"];\n $andor = $muster[\"andor\"];\n $rechte=berechtigung(\"cp_\");\n\n $joinCustomer = \" left join customer K on C.cp_cv_id=K.id\";\n $joinVendor = \" left join vendor V on C.cp_cv_id=V.id\";\n if ($muster[\"cp_name\"]==\"~\") {\n $where=\"and upper(cp_name) ~ '^\\[^A-Z\\].*$'\";\n } else {\n $dbf = array(\"cp_name\", \"cp_givenname\", \"cp_gender\", \"cp_title\" ,\n \"cp_street\", \"cp_zipcode\", \"cp_city\", \"cp_country\", \"country\",\n \"cp_phone1\", \"cp_fax\", \"cp_homepage\", \"cp_email\",\n \"cp_notes\", \"cp_stichwort1\",\"cp_birthday\", \"cp_beziehung\",\n \"cp_abteilung\", \"cp_position\", \"cp_cv_id\", \"cp_owener\");\n $keys=array_keys($muster);\n $anzahl=count($keys);\n $where=\"\";\n if ( isset( $muster[\"customer_name\"] ) ) {\n $whereCustomer = \"K.name ilike '$pre\" . $muster[\"customer_name\"] . \"$fuzzy'\";\n $whereVendor = \"V.name ilike '$pre\" . $muster[\"customer_name\"] . \"$fuzzy'\";\n } else {\n $whereCustomer = '1=1';\n $whereVendor = '1=1';\n }\n\n $daten=false;\n $tbl0=false;\n\n $where = array();\n for ($i=0; $i<$anzahl; $i++) {\n if (in_array($keys[$i],$dbf) && $muster[$keys[$i]]) {\n $suchwort=trim($muster[$keys[$i]]);\n $suchwort=strtr($suchwort,\"*?\",\"%_\");\n if ($keys[$i]==\"cp_birthday\") {$d=explode(\"\\.\",$suchwort); $suchwort=$d[2].\"-\".$d[1].\"-\".$d[0]; };\n if ($keys[$i]==\"cp_phone1\") {\n //Telefonnummer in beliebigen Telefonfeld suchen.\n $tmp =\"(cp_phone1 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_phone2 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_mobile1 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_mobile2 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_satphone like '\".$pre.$suchwort.\"$fuzzy')\";\n $where[] = $tmp;\n } else {\n $where[].=$keys[$i].\" ilike '\".$pre.$suchwort.\"$fuzzy'\";\n }\n }\n }\n $where = implode (\" $andor \",$where);\n $x=0;\n }\n $felderContact=\"C.cp_id, C.cp_cv_id, C.cp_title, C.cp_name, C.cp_givenname, C.cp_fax, C.cp_email, C.cp_gender as cp_gender\";\n $felderContcatOrCustomerVendor=\"COALESCE (C.cp_country, country) as cp_country,COALESCE (C.cp_zipcode, zipcode) as cp_zipcode,\n COALESCE (C.cp_city, city) as cp_city, COALESCE (C.cp_street, street) as cp_street,\n COALESCE (NULLIF (C.cp_phone1, ''), NULLIF (C.cp_mobile1, ''), phone) as cp_phone1\";\n\n\n $rs0=array(); //leere arrays initialisieren, damit es keinen fehler bei der funktion array_merge gibt\n if ($muster[\"customer\"]){ //auf checkbox customer mit Titel Kunden prüfen\n $sql0=\"select $felderContact, $felderContcatOrCustomerVendor, K.name as name, K.language_id as language_id,\n 'C' as tbl from contacts C$joinCustomer where C.cp_cv_id=K.id and ($whereCustomer $andor $where) and $rechte order by cp_name\";\n $rs0=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs0) $rs0=array();\n }\n $rs1=array(); //s.o.\n if ($muster[\"vendor\"]){ //auf checkbox vendor mit Titel Lieferant prüfen\n $sql0=\"select $felderContact, $felderContcatOrCustomerVendor, V.name as name, V.language_id as language_id, 'V' as tbl\n from contacts C$joinVendor where C.cp_cv_id=V.id and ($whereVendor $andor $where) and $rechte order by cp_name\";\n $rs1=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs1) $rs1=array();\n }\n $rs2=array(); //s.o.\n if ( isset( $muster[\"deleted\"] ) ) { //auf checkbox deleted mit Titel \"gelöschte Ansprechpartner (Kunden und Lieferanten)\" prüfen\n // es gibt nicht nur gelöschte Personen, sonder auch Personen ohne Zuordnung zu Firmen, z.B. private Adressen\n $sql0=\"select $felderContact, C.cp_country, C.cp_zipcode, C.cp_city, C.cp_street, C.cp_phone1,\n '' as name,'P' as tbl from contacts C where $rechte and (\".$where.\") and C.cp_cv_id is null order by cp_name\";\n $rs2=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs2) $rs2=array();\n }\n return array_merge($rs0,$rs1,$rs2); //alle ergebnisse zusammenziehen und zurückgeben\n}", "function queryTagsUserPublicity($limit=50){\n\t$preferences=explode('|',usersPreferences());\n\tforeach ($preferences as $value){\n\t\t$like.=\" _datox_ LIKE '%\".replaceCharacters($value).\"%' OR \";\n\t}\n\treturn\n\t\t$GLOBALS['cn']->query(\"\n\t\t\tSELECT\n\t\t\t\t(SELECT screen_name FROM users u WHERE u.id=t.id_creator) AS nameUsr,\n\t\t\t\t(SELECT screen_name FROM users u WHERE u.id=t.id_user) AS nameUsr2,\n\t\t\t\t(SELECT md5(CONCAT(u.id,'_',u.email,'_',u.id)) FROM users u WHERE u.id=t.id_creator) AS code,\n\t\t\t\t(SELECT u.profile_image_url FROM users u WHERE u.id=t.id_creator) AS photoUser,\n\t\t\t\tt.id AS idTag,\n\t\t\t\tt.id_user AS idUser,\n\t\t\t\tt.id_creator AS idCreator,\n\t\t\t\tt.code_number AS code_number,\n\t\t\t\tt.color_code AS color_code,\n\t\t\t\tt.color_code2 AS color_code2,\n\t\t\t\tt.color_code3 AS color_code3,\n\t\t\t\tt.`text` AS texto,\n\t\t\t\tt.`text2` AS texto2,\n\t\t\t\tt.date AS fechaTag,\n\t\t\t\tt.background AS fondoTag,\n\t\t\t\ta.link AS enlace,\n\t\t\t\tmd5(a.id) AS id_publicidad,\n\t\t\t\tt.video_url AS video_url,\n\t\t\t\tunix_timestamp(t.date) AS date\n\t\t\tFROM users_publicity a INNER JOIN tags t ON a.id_tag=t.id\n\t\t\tWHERE (a.status='1' AND a.click_max>=a.click_current AND a.id_type_publicity='4') AND (\".str_replace(\"_datox_\",\"t.`text`\",rtrim($like,' OR ')).\" OR \".str_replace(\"_datox_\",\"t.`text2`\",rtrim($like,' OR ')).\" OR \".str_replace(\"_datox_\",\"t.code_number\",rtrim($like,' OR ')).\")\n\t\t\tORDER BY rand()\n\t\t\tLIMIT 0,\".$limit.\"\n\t\t\");\n}", "public function filterCandidate()\n {\n // $data = Input::all();\n // $query_string = \"select users.id as Candidateid,GROUP_CONCAT(universities.name SEPARATOR '; '),GROUP_CONCAT(options.name SEPARATOR '; '),GROUP_CONCAT(degree_subjects.name SEPARATOR '; '),GROUP_CONCAT(degrees.degree_year SEPARATOR '; '), users.first_name as Firstname, users.last_name as Lastname, users.email as Email, universities.name as University, GROUP_CONCAT(degree_types.name SEPARATOR '; ') from users \";\n //// $temp_left_join=\"left outer join user_degree on users.id=user_degree.user_id left outer join degrees on degrees.id=user_degree.degree_id left outer join degree_types on degree_types.id=degrees.degree_type_id left outer join universities on universities.id=degrees.university_id \";\n // $group_by_string = 'group by users.id;';\n // $where_array = array();\n // $work_string ='left outer join user_option on users.id=user_option.user_id left outer join options on options.id=user_option.option_id ';\n // if(isset($data['work_option']))\n // {\n // $string_work_option = implode(\",\",$data['work_option']);\n // \n // $where_work = 'user_option.option_id in ('.$string_work_option.') ';\n // $where_array[] = $where_work;\n // }\n // else{\n // // $work_string ='';\n // $where_work = '';\n // }\n // if(isset($data['desired_job_type']))\n // {\n // $string_jobtype_option = implode(\",\",$data['desired_job_type']);\n // $jobtype_string ='inner join user_desired_work_type on users.id=user_desired_work_type.user_id ';\n // $where_jobtype = 'user_desired_work_type.work_type_id in ('.$string_jobtype_option.') ';\n // $where_array[] = $where_jobtype;\n // }\n // else{\n // $jobtype_string ='';\n // $where_jobtype = '';\n // }\n // if(isset($data['job_location']))\n // {\n // $string_joblocation_option = implode(\",\",$data['job_location']);\n // $joblocation_string ='inner join user_desired_location on users.id=user_desired_location.user_id ';\n // $where_joblocation = 'user_desired_location.location_id in ('.$string_joblocation_option.') ';\n // $where_array[] = $where_joblocation;\n // }\n // else{\n // $joblocation_string ='';\n // $where_joblocation = '';\n // }\n // if(isset($data['job_location']))\n // {\n // $string_joblocation_option = implode(\",\",$data['job_location']);\n // $joblocation_string ='inner join user_desired_location on users.id=user_desired_location.user_id ';\n // $where_joblocation = 'user_desired_location.location_id in ('.$string_joblocation_option.') ';\n // $where_array[] = $where_joblocation;\n // }\n // else{\n // $joblocation_string ='';\n // $where_joblocation = '';\n // }\n // //echo $data['degree_type'];die();\n // $degree_string ='left outer join user_degree on users.id=user_degree.user_id left outer join degrees on degrees.id=user_degree.degree_id left outer join degree_types on degree_types.id=degrees.degree_type_id left outer join universities on universities.id=degrees.university_id left outer join degree_subjects on degree_subjects.id=degrees.degree_subject_id left outer join degree_results on degree_results.id=degrees.degree_result_id ';\n // if(isset($data['degree_type'][0]) && $data['degree_type'][0]>0)\n // {\n // \n // //$string_joblocation_option = implode(\",\",$data['job_location']);\n // \n // //$where_degree = 'user_desired_location.location_id in ('.$string_joblocation_option.') ';\n // $degree_type_string = 'degrees.degree_type_id=\"'.$data['degree_type'][0].'\" ';\n // \n // if(isset($data['degree_uni'][0]) && $data['degree_uni'][0]>0)\n // {\n // $where_array[] = 'degrees.university_id=\"'.$data['degree_uni'][0].'\" ';\n // }\n // if(isset($data['degree_subject'][0]) && $data['degree_subject'][0]>0)\n // {\n // $where_array[] = 'degrees.degree_subject_id=\"'.$data['degree_subject'][0].'\" ';\n // }\n // if(isset($data['degree_result'][0]) && $data['degree_result'][0]>0)\n // {\n // $where_array[] = 'degrees.degree_result_id=\"'.$data['degree_result'][0].'\" ';\n // }\n // if(isset($data['degree_graduation'][0]) && $data['degree_graduation'][0]>0)\n // {\n // $where_array[] = 'degrees.degree_year=\"'.$data['degree_graduation'][0].'\" ';\n // }\n // $where_array[] = $degree_type_string;\n // }\n // else{\n // //$degree_string ='';\n // }\n // if(isset($data['skills']))\n // {\n // $string_skill_option = implode(\",\",$data['skills']);\n // $skill_string ='inner join user_skill on users.id=user_skill.user_id ';\n // $where_skill = 'user_skill.skill_id in ('.$string_skill_option.') ';\n // $where_array[] = $where_skill;\n // }\n // else{\n // $skill_string ='';\n // $where_skill = '';\n // }\n // if(isset($data['english_level']) && $data['english_level']>0)\n // {\n // $where_array[] = 'users.english_level=\"'.$data['english_level'].'\" ';\n // }\n // if(isset($data['languages'][0]) && $data['languages'][0]>0)\n // {\n // $language_string ='inner join user_language on users.id=user_language.user_id inner join languages on languages.id=user_language.language_id ';\n // $language_type_string = 'languages.name_id=\"'.$data['languages'][0].'\" ';\n // \n // if(isset($data['languages_level'][0]) && $data['languages_level'][0]>0)\n // {\n // $where_array[] = 'languages.level_id=\"'.$data['languages_level'][0].'\" ';\n // }\n // \n // $where_array[] = $language_type_string;\n // }\n // else{\n // $language_string ='';\n // }\n // $workexp_string ='left outer join user_work on users.id=user_work.user_id left outer join works on works.id=user_work.work_id left outer join work_sectors on work_sectors.id=works.work_sector_id ';\n // if((isset($data['work_type'][0]) && $data['work_type'][0]>0)||(isset($data['work_length'][0]) && $data['work_length'][0]>0)||(isset($data['work_sector'][0]) && $data['work_sector'][0]>0))\n // {\n // \n // if(isset($data['work_type'][0]) && $data['work_type'][0]>0)\n // {\n // $where_array[] = 'works.work_type_id=\"'.$data['work_type'][0].'\" ';\n // }\n // if(isset($data['work_length'][0]) && $data['work_length'][0]>0)\n // {\n // $where_array[] = 'works.work_duration_id=\"'.$data['work_length'][0].'\" ';\n // }\n // if(isset($data['work_sector'][0]) && $data['work_sector'][0]>0)\n // {\n // $where_array[] = 'works.work_sector_id=\"'.$data['work_sector'][0].'\" ';\n // }\n // }\n // else{\n // // $workexp_string ='';\n // }\n // $where_array[]=\"options.category_id=1 and users.id >203\";\n // if(!empty($where_array))\n // {\n // $explode_array = 'where '.implode(' and ',$where_array);\n // }\n // else\n // {\n // $explode_array = '';\n // }\n // echo $query_string = $query_string.$work_string.$jobtype_string.$joblocation_string.$degree_string.$skill_string.$language_string.$workexp_string.$explode_array.$group_by_string;\n // die();\n $query_string=\"select users.id as Candidateid,users.created_at,GROUP_CONCAT(universities.name SEPARATOR '; '),GROUP_CONCAT(options.name SEPARATOR '; '), users.first_name as Firstname, users.last_name as Lastname, users.email as Email, universities.name as University, GROUP_CONCAT(degree_types.name SEPARATOR '; ') from users left outer join user_option on users.id=user_option.user_id left outer join options on options.id=user_option.option_id left outer join user_degree on users.id=user_degree.user_id left outer join degrees on degrees.id=user_degree.degree_id left outer join degree_types on degree_types.id=degrees.degree_type_id left outer join universities on universities.id=degrees.university_id left outer join degree_subjects on degree_subjects.id=degrees.degree_subject_id left outer join degree_results on degree_results.id=degrees.degree_result_id left outer join user_work on users.id=user_work.user_id left outer join works on works.id=user_work.work_id left outer join work_sectors on work_sectors.id=works.work_sector_id where users.id > '202' group by users.id\";\n $results = DB::select( DB::raw($query_string) );\n $this->getCSVLink($results);\n //$user_lists['result'] = $results;\n //$user_lists['user_data'] = $data;\n \n // return View::make('filter_csv.filteruserlisting', $user_lists );\n }", "function aaModelGetIEmail () {\t\r\n\r\n\tglobal $pdo_conn, $pdo_t;\r\n\r\n\t$sql = \"SELECT * FROM \".$pdo_t['t_iemail'].\" AS im \r\n\t\t\tLEFT JOIN \".$pdo_t['t_groups'].\" AS c ON im.Email_Group = c.Cat_ID\r\n\t\t\tLEFT JOIN \".$pdo_t['t_priorities'].\" AS p ON im.Priority = p.Level_ID\";\r\n\t\t\t\r\n\t$q = $pdo_conn->prepare($sql);\r\n\r\n\t$q->execute();\r\n\t\r\n\treturn $q;\t\r\n}", "public function get_exists_users($post_data){\n $userId = $post_data['userId'];\n $searchId = $post_data['searchId'];\n //print_r($post_data);exit();\n $invitees = array_key_exists(\"invitees\",$post_data);\n if($invitees){ \n $invitees = $post_data['invitees']; \n $emails = array();\n for($i=0;$i<sizeof($invitees);$i++){\n $emails[$i]['inviteEmail'] = strtolower($invitees[$i]['inviteEmail']);\n }\n // print_r($emails);exit();\n $str_email = implode(',', array_map(function($el){ return $el['inviteEmail']; }, $emails));\n $str = \"'\".$str_email.\"'\";\n $email = str_replace(\",\",\"','\",$str);\n\t\t\t//print_r($email);exit();\n $userId = $post_data['userId'];\n // echo $email;exit();\n\n /* $sql = \"SELECT userId,firstName,deviceToken,email FROM users \n WHERE email IN ($email)\";\n */\n $sql = \"SELECT u.userId,u.firstName,u.deviceToken,u.email,t.deleteFlag,t.status \n FROM users u \n LEFT JOIN tribe t ON t.inviteEmail = u.email \n WHERE u.email IN ($email) AND t.status != 'accept' AND t.searchId = $searchId AND t.fromuserId = $userId GROUP BY u.userId\"; \n\t\t\t//echo $sql;exit();\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n //print_r($record->result_array());exit();\n $users = $record->result_array();\n $ids = array();\n foreach ($users as $key) {\n $users_id = array('touserId' =>$key['userId']);\n $email = strtolower($key['email']);\n // print_r($users_id);exit();\n $this->db->where('fromuserId',$userId);\n $this->db->where('searchId',$searchId);\n $this->db->where('inviteEmail',$email);\n $this->db->update('tribe',$users_id);\n\n // $query = $this->db->get_where('tribe', array('touserId' => $key['userId']));\n // $row = $query->row();\n // $name = $row->name;\n // $firstName = array('firstName' =>$name);\n // $this->db->where('userId',$key['userId']);\n // $this->db->update('users',$firstName);\n\n }\n\n \n return $record->result_array();\n // print_r($record->result_array());exit();\n }\n }\n }", "public static function searchByName($q)\n {\n // //->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['name', 'notes']]])\n // ->query(['multi_match' => ['query' => $q, 'fields' => ['name', 'notes']]], ['term' => ['user_id' => UserUtil::getBrockerIds()]])\n // ->source(['user_id', 'name', 'notes'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n\n $searchResult = Deal::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['name', 'notes']]]\n ]\n ]\n ])\n ->source(['user_id'])\n ->from(0)\n ->size(10000)\n ->raw();\n\n\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $dealResult = array_map('intval', Arr::pluck($results, '_id'));\n\n //-----------\n\n // $searchResult = DealContact::rawSearch()\n // ->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['firstname', 'lastname', 'company', 'email', 'address1', 'address2', 'suburb', 'state', 'postcode', 'notes', 'phone']]])\n // ->source(['deal_id'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n // $results = [];\n // if($searchResult['hits']['total']['value'] == 0)\n // return [];\n // else\n // $results = $searchResult['hits']['hits'];\n\n $searchResult = DealContact::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['firstname', 'lastname', 'company', 'email', 'address1', 'address2', 'suburb', 'state', 'postcode', 'notes', 'phone']]]\n ]\n ]\n ])\n ->source(['deal_id', 'phone'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n\n $dealcontactResult = Arr::pluck($results, '_source.deal_id');\n\n //--------------\n\n // $searchResult = Reminder::rawSearch()\n // ->query(['query_string' => ['query' => '*'.$q.'*', 'fields' => ['details', 'tags']]])\n // ->source(['deal_id','details', 'tags'])\n // ->from(0)\n // ->size(1000)\n // ->raw();\n // $results = [];\n // if($searchResult['hits']['total']['value'] == 0)\n // return [];\n // else\n // $results = $searchResult['hits']['hits'];\n\n $searchResult = Reminder::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['details', 'tags']]]\n ]\n ]\n ])\n ->source(['deal_id','details', 'tags'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $reminderResult = Arr::pluck($results, '_source.deal_id');\n\n $searchResult = JournalEntry::rawSearch()\n ->query([\n 'bool' => [\n 'must' => [\n ['terms' => ['user_id' => UserUtil::getBrockerIds()]],\n ['multi_match' => ['query' => $q, 'fields' => ['notes', 'tags']]]\n ]\n ]\n ])\n ->source(['deal_id','notes', 'tags'])\n ->from(0)\n ->size(10000)\n ->raw();\n $results = [];\n if($searchResult['hits']['total']['value'] == 0){}\n else\n $results = $searchResult['hits']['hits'];\n\n $journalentryResult = Arr::pluck($results, '_source.deal_id');\n\n\n return array_values(Arr::sort(array_values(array_unique(Arr::collapse([$dealResult, $dealcontactResult, $reminderResult, $journalentryResult])))));\n }", "function GetUsers($NotAdmin){\n\t$stringBuilder = \"SELECT u.user_id, u.email, l.name \";\n\t$stringBuilder .= \"FROM `user` u \";\n\t$stringBuilder .= \"INNER JOIN location l ON l.location_id=u.location \";\n\tif($NotAdmin){\n\t\t$stringBuilder .= \"WHERE u.admin=0 \";\n\t}\n\t$stringBuilder .= \"ORDER BY l.name \";\n\t// Preparing query\n\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t$query->execute(); //Putting in the parameters\n\t$result = $query->fetchAll(); //Fetching it\n\treturn $result;\n}", "public function myFindAll($criteria = array()) {\n\n $parameters = array();\n $values = array('a,partial b.{id,nomprojet},partial c.{id,nomUser},partial d.{id,nom,description},f,partial h.{id}');\n $query = $this->createQueryBuilder('a')\n ->select($values)\n ->leftJoin('a.idProjet', 'b')\n ->leftJoin('a.demandeur', 'c')\n ->leftJoin('a.idStatus', 'd')\n ->leftJoin('a.picture', 'f')\n ->addSelect('g')\n //->addSelect('g')\n ->distinct('GroupConcat(g.nom) AS kak')\n ->leftJoin('a.idEnvironnement', 'g')\n ->leftJoin('a.comments', 'h')\n //->addSelect('e')\n ->addSelect('partial e.{id,nomUser}')\n ->distinct('GroupConcat(e.nomUser)')\n ->leftJoin('a.idusers', 'e');\n $query->add('orderBy', 'a.id DESC');\n return $query;\n //->getQuery();\n }", "public function search(Request $request)\n {\n $inputs = $request->all();\n\n\n /* echo '<pre>';\n print_r($inputs);\n exit();\n */\n\n $address = $inputs['address'];\n $spec = $inputs['speciality'];\n $name = $inputs['name'];\n $coord = array();\n if(isset($inputs['lat']) && isset($inputs['long'])&& !empty($inputs['lat']) && !empty($inputs['long'])){\n\n $users = DB::table('users')\n ->join('establishment', 'establishment.id', '=', 'users.establishment_id')\n ->join('specialities', 'specialities.id', '=', 'users.speciality_id')\n ->where('users.role', '=', '20')\n ->select('users.*', 'establishment.address', 'specialities.intituleProf', 'establishment.horaire',\n 'establishment.nameE', 'establishment.textLatlng', 'establishment.id as idEs',\n 'users.id as idUE', 'count(users.id) as total');\n\n\n // ->toSql();\n\n /* echo '<pre>';\n print_r($users);\n exit();*/\n // ->get();\n if (isset($inputs['name']) && !empty($inputs['name'])) {\n $users->where('users.name', 'like', '%' . $name . '%');\n }\n if (isset($inputs['speciality']) && $inputs['speciality'] != -1) {\n $users->where('users.speciality_id', '=', $spec);\n }\n // $req = $users;\n //$users = $users->get();\n $users = $users->paginate(5);\n $tot = $users->count();\n\n foreach($users as $k=>$user){\n list($lat, $long) = explode(\",\", $user->textLatlng);\n $distance2 = distance($lat, $long, $inputs['lat'], $inputs['long'], \"K\");\n if($distance2 > 5.00){\n unset($users[$k]);\n }\n }\n foreach($users as $user)\n {\n $rdvs = DB::table('rdv')->where('rdv.user_id', '=', $user->id)\n ->select('rdv.hour')->get();\n $user->rdvs = array();\n foreach($rdvs as $r){\n $user->rdvs[] = $r->hour;\n }\n\n list($latitude, $longitude)=explode(\",\", $user->textLatlng );\n $coord[]['lat'] = $latitude;\n $coord[]['long'] = $longitude;\n }\n $specialities = Speciality::all();\n\n $users->appends(array(\n 'address' => $inputs['address'],\n 'speciality' => $inputs['speciality'],\n 'name' => $inputs['name'],\n 'lat' => $inputs['lat'],\n 'long' => $inputs['long'],\n ));\n return view('search')\n ->with('users', $users)\n ->with('specialities', $specialities)\n ->with('tot', $tot);\n\n }\n else if(isset($inputs['address']) && empty($inputs['address']) && isset($inputs['speciality']) && $inputs['speciality'] == -1\n && isset($inputs['name']) && empty($inputs['name'])){\n $users = array();\n $tot =0;\n $specialities = Speciality::all();\n /* $specialities->appends(array(\n 'address' => $inputs['address'],\n 'speciality' => $inputs['speciality'],\n 'name' => $inputs['name'],\n 'lat' => $inputs['lat'],\n 'long' => $inputs['long'],\n ));**/\n return view('search')\n ->with('users', $users)\n ->with('specialities', $specialities)\n ->with('tot', $tot);\n }\n else {\n\n\n $users = DB::table('users')\n ->join('establishment', 'establishment.id', '=', 'users.establishment_id')\n ->join('specialities', 'specialities.id', '=', 'users.speciality_id')\n ->where('users.role', '=', '20')\n ->select('users.*', 'establishment.address', 'specialities.intituleProf', 'establishment.horaire',\n 'establishment.nameE', 'establishment.textLatlng', 'establishment.id as idEs',\n 'users.id as idUE');\n\n\n // ->where('users.speciality_id', '=', $spec)\n // ->where('users.name', 'LIKE', '%'+$name+'%')\n // ->where('establishment.address', 'like', '%'+$address+'%') // ->get();\n if (isset($inputs['address']) && !empty($inputs['address'])) {\n $users->where('establishment.address', 'like', '%' . $address . '%');\n }\n if (isset($inputs['name']) && !empty($inputs['name'])) {\n $users->where('users.name', 'like', '%' . $name . '%');\n }\n if (isset($inputs['speciality']) && $inputs['speciality'] != -1) {\n $users->where('users.speciality_id', '=', $spec);\n }\n $tot = $users->count();\n $req = $users;\n //$users = $users->get();\n $users = $users->paginate(5);\n foreach($users as $user)\n {\n $rdvs = DB::table('rdv')->where('rdv.user_id', '=', $user->id)\n ->select('rdv.hour')->get();\n $user->rdvs = array();\n foreach($rdvs as $r){\n $user->rdvs[] = strtotime($r->hour);\n }\n list($latitude, $longitude)=explode(\",\", $user->textLatlng );\n $coord[]['lat'] = $latitude;\n $coord[]['long'] = $longitude;\n }\n /* print_r($user);\n exit();*/\n $specialities = Speciality::all();\n $users->appends(array(\n 'address' => $inputs['address'],\n 'speciality' => $inputs['speciality'],\n 'name' => $inputs['name'],\n 'lat' => $inputs['lat'],\n 'long' => $inputs['long'],\n ));\n return view('search'\n //, ['users' => $users]\n )\n ->with('users', $users)\n ->with('specialities', $specialities)\n ->with('coord', $coord)->with('tot', $tot)\n ->with('req', $req)\n ->render();\n\n }\n\n\n\n /* echo '<pre>';\n print_r($users);\n print_r($spec);\n print_r($address);\n print_r($name);\n exit();*/\n /* echo '<pre>';\n print_r($tot);\n exit();\n */\n\n\n }", "public function get_user_info($userId,$searchId){\n $sql = \"SELECT u.firstName,s.searchName from users u,searchcriteria s where u.userId = s.userId AND u.userId =$userId AND s.searchId =$searchId AND s.deleteFlag !=1 AND u.deleteFlag !=1\";\n $result = $this->db->query($sql);\n return $result->result_array(); \n }", "function user_duration_query($course_id, $start = false, $end = false, $group = false) {\n $terms = array();\n if ($start !== false AND $end !== false) {\n $date_where = 'AND actions_daily.day BETWEEN ?s AND ?s';\n $terms = array($start . ' 00:00:00',\n $end . ' 23:59:59');\n } elseif ($start !== false) {\n $date_where = 'AND actions_daily.day > ?s';\n $terms[] = $start . ' 00:00:00';\n } elseif ($end !== false) {\n $date_where = 'AND actions_daily.day < ?s';\n $terms[] = $end . ' 23:59:59';\n } else {\n $date_where = '';\n }\n\n if ($group !== false) {\n $from = \"`group_members` AS groups\n LEFT JOIN user ON groups.user_id = user.id\";\n $and = \"AND groups.group_id = ?d\"; \n $terms[] = $group;\n } else {\n $from = \" (SELECT * FROM user UNION (SELECT 0 as id,\n '' as surname,\n 'Anonymous' as givenname,\n null as username,\n null as password,\n null as email,\n null as parent_email,\n null as status,\n null as phone,\n null as am,\n null as registered_at,\n null as expires_at,\n null as lang, \n null as description,\n null as has_icon,\n null as verified_mail,\n null as receive_mail,\n null as email_public,\n null as phone_public,\n null as am_public,\n null as whitelist,\n null as last_passreminder)) as user \";\n $and = ''; \n }\n \n return Database::get()->queryArray(\"SELECT SUM(actions_daily.duration) AS duration,\n user.surname AS surname,\n user.givenname AS givenname,\n user.id AS id,\n user.am AS am\n FROM $from\n LEFT JOIN actions_daily ON user.id = actions_daily.user_id\n WHERE (actions_daily.course_id = ?d)\n $and\n $date_where\n GROUP BY user.id\n ORDER BY surname, givenname\", $course_id, $terms);\n}", "public function getAllBoUsers()\n {\n $Query = \"select identifier, login from User WHERE type NOT IN ('contributor','client','chiefodigeo','superclient')\";\n if(($result = $this->getQuery($Query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "protected function getListQuery() {\n // Create a new query object.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select(\n $this->getState(\n 'list.select', 'a.*'\n )\n );\n $query->from('`#__breedable` AS a');\n\n \n\t\t// Join over the users for the checked out user\n\t\t$query->select(\"uc.name AS editor\");\n\t\t$query->join(\"LEFT\", \"#__users AS uc ON uc.id=a.checked_out\");\n\t\t// Join over the category 'breedable_type'\n\t\t$query->select('breedable_type.title AS breedable_type');\n\t\t$query->join('LEFT', '#__categories AS breedable_type ON breedable_type.id = a.breedable_type');\n\t\t// Join over the user field 'created_by'\n\t\t$query->select('created_by.name AS created_by');\n\t\t$query->join('LEFT', '#__users AS created_by ON created_by.id = a.created_by');\n\n \n\n // Filter by search in title\n $search = $this->getState('filter.search');\n if (!empty($search)) {\n if (stripos($search, 'id:') === 0) {\n $query->where('a.id = ' . (int) substr($search, 3));\n } else {\n $search = $db->Quote('%' . $db->escape($search, true) . '%');\n\t\t\t\t$query->where('( a.status LIKE '.$search.' OR a.id LIKE '.$search.' OR a.breedable_name LIKE '.$search.' OR a.mother_name LIKE '.$search.' OR a.father_name LIKE '.$search.' OR a.owner_name LIKE '.$search.' OR a.owner_key LIKE '.$search.' OR a.breedable_gender LIKE '.$search.' )');\n \n }\n }\n\n\t\t//Filtering owner_name\n\t\t$filter_owner_name = $this->state->get(\"filter.owner_name\");\n\t\tif ($filter_owner_name != '') {\n\t\t\t$query->where(\"a.owner_name = '\".$db->escape($filter_owner_name).\"'\");\n\t\t}\n\t\t//Filtering status\n\n\t\t//Filtering generation\n\n\t\t//Filtering breedable_gender\n\t\t$filter_breedable_gender = $this->state->get(\"filter.breedable_gender\");\n\t\tif ($filter_breedable_gender != '') {\n\t\t\t$query->where(\"a.breedable_gender = '\".$db->escape($filter_breedable_gender).\"'\");\n\t\t}\n\n\t\t//Filtering breedable_eyes\n\n\t\t//Filtering breedable_fevor\n\n\t\t//Filtering breedable_pregnant\n\n\n // Add the list ordering clause.\n $orderCol = $this->state->get('list.ordering');\n $orderDirn = $this->state->get('list.direction');\n if ($orderCol && $orderDirn) {\n $query->order($db->escape($orderCol . ' ' . $orderDirn));\n }\n\n return $query;\n }" ]
[ "0.58548295", "0.5645524", "0.5643967", "0.5491457", "0.54728675", "0.54316914", "0.5397917", "0.5392841", "0.5347162", "0.53358644", "0.5305046", "0.5294009", "0.52716327", "0.52673393", "0.5241931", "0.5238648", "0.5210773", "0.52065235", "0.52040774", "0.5203182", "0.5196451", "0.51885575", "0.5185652", "0.5185128", "0.51819295", "0.5179508", "0.5177845", "0.5160573", "0.5159891", "0.5132588", "0.512998", "0.51127434", "0.51018244", "0.51005733", "0.51004416", "0.5098018", "0.5093548", "0.50933784", "0.5091504", "0.5089255", "0.5088211", "0.50761384", "0.50716317", "0.50672674", "0.50607854", "0.50590336", "0.50462246", "0.5044561", "0.50433594", "0.50425804", "0.50415784", "0.50404745", "0.5023043", "0.5022916", "0.5017014", "0.50135946", "0.4996521", "0.49956915", "0.49887848", "0.4987288", "0.4973854", "0.49666113", "0.49631506", "0.4960322", "0.49575004", "0.49493864", "0.4949375", "0.49473375", "0.4946264", "0.49416277", "0.4941464", "0.4939891", "0.49374884", "0.49342626", "0.49253693", "0.492305", "0.49172977", "0.4917116", "0.49160454", "0.4914885", "0.4912418", "0.49114734", "0.49069116", "0.49041843", "0.49030426", "0.49013305", "0.48991147", "0.4897151", "0.48927286", "0.4892374", "0.489199", "0.4889801", "0.48891643", "0.48853812", "0.48807412", "0.48794463", "0.48775768", "0.48773706", "0.487661", "0.48763633" ]
0.5079846
41
View Add user page
public function add(){ $outData['script']= CONTROLLER_NAME."/add"; $this->assign('output',$outData); $this->display(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_user() {\n $this->load->view('add_user');\n }", "public function getAdduser()\n\t{\n\t\treturn view('adduser');\n\t}", "public function action_add()\r\n\t{\r\n\t\tif ( Request::current()->method() == Request::POST )\r\n\t\t{\r\n\t\t\treturn $this->_add();\r\n\t\t}\r\n\t\t\r\n\t\t$this->template->title = __('Add user');\r\n\t\t$this->breadcrumbs\r\n\t\t\t->add($this->template->title);\r\n\r\n\t\t// check if user have already enter something\r\n\t\t$data = Flash::get( 'post_data', array() );\r\n\r\n\t\t$user = new User( $data );\r\n\r\n\t\t$this->template->content = View::factory( 'user/edit', array(\r\n\t\t\t'action' => 'add',\r\n\t\t\t'user' => $user,\r\n\t\t\t'permissions' => Model_Permission::get_all()\r\n\t\t) );\r\n\t}", "public function user_add()\n\t{\n\t\t$data = array( 'isi' \t=> 'admin/user/v_user_add',\n\t\t\t\t\t\t'nav'\t=>\t'admin/nav',\n\t\t\t\t\t\t'title' => 'Tampil Dashboard Admin');\n\t\t$this->load->view('layout/wrapper',$data);\n\t}", "public function getAdd()\n {\n \treturn view(\"admin.user.add\");\n }", "public function add() {\n \t$data = ['menu_users' => true];\n \t$user = new User();\n \t$data['user'] = $user;\n \treturn view('manage.user', $data);\n }", "public function add(){\n Auth::checkUserLogin();\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Add', 'Users');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = '';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Users';\n\t\t// Set Page Sub Section\n\t\t$this->_view->pageSubSection = 'Add';\n\n $this->_view->error = array();\n\n // If Form has been submitted process it\n\t\tif(!empty($_POST)){\n //if user selected cancel\n if(!empty($_POST['cancel'])){\n\t\t\t Url::redirect('users/index');\n\t\t }\n\n // Create new user\n $createData = $this->_model->createData($_POST);\n if(isset($createData['error']) && $createData['error'] != null){\n foreach($createData['error'] as $key => $error){\n $this->_view->error[$key] = $error;\n }\n }else{\n $this->_view->flash[] = \"User added successfully.\";\n Session::set('backofficeFlash', array($this->_view->flash, 'success'));\n Url::redirect('users/index');\n }\n\t\t}\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('users/add', 'layout');\n\t}", "public function getAddUser()\n\t{\n\t\t$roles = (new RolesForCheckboxesRetriever())->execute();\n\t\t$pagination_size_options = (new PaginationSizeLookupRetriever())->execute();\n\t\treturn view('user.add-user', [ \n\t\t\t\t'roles' => $roles, \n\t\t\t\t'pagination_size_options' => $pagination_size_options\n\t\t]);\n\t}", "public function create()\n {\n return view('admin.pages.allusers.user_add');\n }", "public function addUser(){\n return view('admin.users.Add_user');\n }", "public function create()\n {\n return view(\"admin.addUser\");\n }", "public function addUser()\n {\n return view('users.add-user');\n }", "public function create()\n {\n return view(\"Admin/user_add\");\n }", "public function add(){\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Add', 'Users');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = '';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Users';\n\t\t// Set Page Sub Section\n\t\t$this->_view->pageSubSection = 'Users';\n\n\t\t// Set default variables\n\t\t$this->_view->error = array();\n\n\t\t$userTypes = explode(',', USERS);\n $userTypesStore = array_pop($userTypes);\n\t\t$this->_view->userTypes = $userTypes;\n\n // If Form has been submitted process it\n\t\tif(!empty($_POST)){\n //if user selected cancel\n if(!empty($_POST['cancel'])){\n Url::redirect('backoffice/users/index');\n }\n $_POST['salt'] = null;\n\n if(!isset($_FILES) || empty($_FILES['image']['name'])){\n $_POST['image'] = null;\n }else{\n $this->uploadFile($_FILES);\n }\n\n // Create new user\n $createData = $this->_model->createData($_POST);\n if(isset($createData['error']) && $createData['error'] != null){\n foreach($createData['error'] as $key => $error){\n $this->_view->error[$key] = $error;\n }\n }else {\n $this->_view->flash[] = \"User added successfully.\";\n Session::set('backofficeFlash', array($this->_view->flash, 'success'));\n Url::redirect('backoffice/users/');\n }\n\t\t}\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('users/add', 'layout', 'backoffice');\n\t}", "public function add_user(){\n\n $data['header'] = 'รายชื่อในระบบ';\n return view('admin.bitcoin.add_user', $data);\n }", "public function create()\n {\n return view('webcontrol.user.add');\n }", "public function add() {\n\t\tRouter::redirect('/users/profile');\t\n\t}", "public function add()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view(\"admin/useradd\");\n }", "public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }", "public function create()\n {\n return view('admin/user/add',['title'=>'用户添加页面']);\n }", "public function create()\n {\n return view('add_user');\n //\n }", "public function create()\n {\n return view('Admin.user.useradd');\n }", "public function create()\n {\n return view('admin.user.add',[\n 'title'=>'添加管理员页面',\n ]);\n }", "function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n \n $this->global['pageTitle'] = 'Garuda Informatics : Add New User';\n\n $this->loadViews($this->view.\"addNew\", $this->global, $data, NULL);\n }\n }", "public function addUserAction()\n\t{\n\t\t$user = new User();\n\n\t\t$form = $this->createForm(new UserType, $user);\n\t\t\n\t\t$request = $this->get('request');\n\n\t\tif ($request->getMethod() == 'POST') {\n\t\t\t$form->bind($request);\n\n // Checking the validity of the submission\n\t\t\tif ($form->isValid()) {\n\t\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t\t$em->persist($user);\n\t\t\t\t$em->flush();\n\n // Redirection to the homepage of Bundle\n\t\t\t\treturn $this->redirect($this->generateUrl('valentin_films_manager_index'));\n\t\t\t}\n\t\t}\n\t\treturn $this->render('ValentinFilmsManagerBundle:Manager:addUser.html.twig', array(\n\t\t\t'form' => $form->createView(),\n\t\t\t));\n\t\t\n\t}", "public function addUser()\n {\n $teams = $this->teamRepository->get();\n\n return $this->view('addUser', compact('teams'));\n }", "public function getNewuser(){\n\n $this->layout->content = View::make('admin.adduser');\n }", "function add() \n {\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n \n // Render the action with template\n $this->renderWithTemplate('users/add', 'AdminPageBaseTemplate');\n }", "public function create()\n {\n //添加用户页面\n return view('admin.user.add');\n }", "public function formAddUser()\n {\n ($user);\n return view('addUser');\n }", "public function actionAdd() {\n\t\treturn $this->txSave ( \"app\\models\\User\" );\n\t}", "public function admin_add(){\n $content = $this->load->view(\"users/users_form\",\"\",true);\n echo Modules::run(\"template/load_admin\", \"Add New User\", $content);\n }", "public function create()\n {\n MetaTag::setTags(['title' => 'Добавление пользователя']);\n\n return view('blog.admin.user.add');\n }", "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "public function create() {\n // TODO: Admin Policy\n return view('auth.user_add');\n }", "public function addUser(){}", "public function create()\n {\n \t $this->pass_data['page_heading'] = \"Add User\";\n return view('backend.user.create', $this->pass_data);\n }", "public function create()\r\n {\r\n \r\n return view('dashboard.users.add'); \r\n }", "public function create()\n {\n \treturn View::make(\"admin.UserAdd\");\n }", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function createAction()\n {\n echo (new View('userCreate'))->render();\n }", "function addNew()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $data['roles'] = $this->user_model->getUserRoles();\n\n $this->global['pageTitle'] = '添加人员';\n\n $this->loadViews(\"addNew\", $this->global, $data, NULL);\n }\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function create()\n {\n return view('admin.user.add');\n }", "public function addAction() {\n $form = new Admin_Form_CreateAdminUser();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n $adminMapper = new Application_Model_Table_AdminUsers();\n $userFound = $adminMapper->fetchByUsername($values['username']);\n if(!$userFound){\n $values['is_active'] = 1;\n $values['is_admin'] = 1;\n $adminUser = $adminMapper->createRow($values);\n $adminUser->hashPassword($values['new_password']);\n $adminUser->save();\n $this->_helper->FlashMessenger->addMessage('The user has been created' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-users', true);\n } else {\n $this->view->messages['error'] = \"This username already exists\";\n }\n }\n }\n $this->view->form = $form;\n }", "public function newUserAction()\n {\n $user = (new UserModel())->createUser();\n echo (new View('userCreated'))\n ->addData('user', $user)\n ->render();\n }", "public function addNewUser(){\n\n if(Auth::user()->userType==0){\n return view(\"worker\",[\"layout\"=>\"addNewUser\"]);\n }\n else{\n return redirect()->back();\n }\n\n }", "public function create()\n {\n return view('admin.user.user-add');\n }", "public function addUser(){\n\t}", "public function getCreate()\n {\n //添加用户\n return view('admin.houtai.user.add',['title'=>'添加用户']);\n }", "public function create()\n\t{\n\t\t//显示页面\n\t\treturn view('admin.users.create',['title'=>'管理员添加页面']);\n\t}", "public function create()\n {\n return view('user.useraddlist');\n }", "public function add() {\n $user = $this->Users->newEntity();\n if ($this->request->is('post')) {\n $user = $this->Users->patchEntity($user, $this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__('The user has been saved.'));\n \n return $this->redirect(['action' => 'login']);\n } else {\n $this->Flash->error(__('The user could not be saved. Please, try again.'));\n }\n }\n \n $this->set(compact('user'));\n $this->set('_serialize', ['user']);\n }", "function admin_add() {\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t$this->User->create();\n\n\t\t\t/**\n\t\t\t * Save new user.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * If the new user is saved, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been saved.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user is not saved, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has not been saved.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Select all profiles (Administrator or Member).\n\t\t * @var array\n\t\t */\n\t\t$profiles = $this->User->Profile->find('list');\n\n\t\t/**\n\t\t * Select all offers enabled.\n\t\t * @var array\n\t\t */\n\t\t$offers = $this->User->Offer->find('list');\n\n\t\t/**\n\t\t * Put all profiles in \"profiles\" and offers in \"offers\".\n\t\t * $profiles and $offers will be available in the view.\n\t\t */\n\t\t$this->set(compact('profiles', 'offers'));\n\n\t}", "public function create()\n {\n $data['id'] = $this->db->order_by('id', 'desc')->get($this->User->table)->row()->id + 1;\n \n $this->Helper->view('user/create', $data);\n }", "public function addUserAction()\n {\n $form = new Application_Form_UserEdit();\n $this->view->form = $form;\n\n if ($this->getRequest()->isPost())\n {\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n $username = $form->getValue('username');\n $password = $form->getValue('password');\n $role = $form->getValue('role');\n $first_name = $form->getValue('first_name');\n $last_name = $form->getValue('last_name');\n $email = $form->getValue('email'); \n $user = new Application_Model_DbTable_Users();\n $user->addUser($username, $password, $first_name,\n $last_name, $email, $role);\n $this->_helper->redirector('index', 'index');\n }\n else\n {\n $form->populate($formData);\n }\n }\n }", "public function create()\n {\n return view('backend.Users.add' );\n }", "public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}", "function add_user(){\n\t\t$session_data = $this->session->userdata();\n\t\tif( array_key_exists('role', $session_data ) && isset($session_data['role'])):\n\t\t$pagedata['mode'] = 'new';\n\t\t\t$this->load->view('dashboard/header');\n\t\t\t$this->load->view('dashboard/add-user', $pagedata );\n\t\t\t$this->load->view('dashboard/footer');\n\t\telse:\n\t\t\tredirect( base_url( 'Interact/login' ));\n\t\tendif;\n\t}", "public function create() {\n $this->title = \"Add New User\";\n $arr = array('controller' => $this->controller, 'action' => $this->action, 'title' => $this->title);\n return view('user.add', $arr);\n }", "function addnewuser() {\n \t\t\t$this->set('GetUserQ', $this->Users->GetUsers(0));\n \t\t\t$this->set('GetLevelsQ', $this->AccessLevels->index());\n \t\t}", "public function add()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n \n if($this->request->is('post'))\n {\n $this->Event->create();\n \n if($this->Event->save($this->request->data))\n {\n $this->redirect('announcements');\n }\n }\n \n $this->loadModel('User');\n $users = $this->User->find('all');\n\n $this->set('user', $users);\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "public function create()\n {\n //\n return view('admin/user/add');\n }", "public function create()\n {\n return view('customer.adduser');\n }", "public function create()\n {\n //\n return view('admin/user/create',['title'=>'用户添加页面']);\n }", "public function newUsersPage()\n\t{\n\t\t$data['country'] = $this->MainModel->selectAll('countries', 'name');\n\t\t$data['role'] = $this->MainModel->selectAll('roles', 'role');\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('pages/new-user', $data);\n\t\t$this->load->view('layout/footer');\n\t}", "public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}", "public function add()\n {\n $storedPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\n $data = [];\n $data['username'] = $_POST[\"username\"];\n $data['password'] = $storedPassword;\n $data['email'] = $_POST['email'];\n $data['profile_picture'] = $_FILES['profile']['tmp_name'];\n $data['mime'] = $_FILES['profile']['type'];\n $data['phone_num'] = $_POST['phone-number'];\n\n if ($this->model('User')->addNewUser($data) > 0) {\n $this->redirect(BASE_URL . \"/home/index/{$data['username']}\");\n }\n }", "public function user()\n\t{\n\t\t\n\t\treturn View::make('administrator/userNew');\n\t}", "public function create()\n {\n\n // Load the page for adding users\n return view('users.create');\n }", "function add() {\n RR_Session::start();\n $get = RR_Session::get('loggedin');\n if ($get == true) {\n // blijf op de pagina\n // en laad de admin view\n $this->validateUser(true, 'newuser');\n } else {\n // anders redirect trug naar de login pagina\n $this->validateUser(false);\n }\n }", "public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}", "public function create()\n {\n //加载添加模板\n return view(\"Admin.Users.add\");\n }", "public function add()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the level edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', false));\n\t}", "public function create()\n {\n //加载模板\n return view(\"Admin.Adminuser.add\");\n }", "public function addAction() {\r\n\t\tif ($this->request->isPost ()) {\r\n\t\t\t$user = new Users ();\r\n\t\t\t$user->firstname = $this->request->get ( \"first_name\" );\r\n\t\t\t$user->lastname = $this->request->get ( \"last_name\" );\r\n\t\t\t$user->bithday = $this->request->get ( \"date\" );\r\n\t\t\t$user->save ();\r\n\t\t}\r\n\t}", "public function addusers() {\r\n \tif (isset($_SESSION['userid'])) {\n \t\t$notusers=$this->model->getnotusersprojects($_GET['p']);\n \t\t$this->view->set('users',$notusers);\n \t\t$project=$this->model->getproject($_GET['p']);\n $this->view->set('project',$project[0]);\n \t\t$this->view->addusers();\r\n \t} else {\r\n \t\t$this->redirect('?v=index&a=show');\r\n \t}\r\n }", "public function admin_add() {\n if ($this->isAuthorized()) {\n if ($this->request->is('post')) {\n $this->User->create();\n if ($this->User->save($this->request->data)) {\n $this->Session->setFlash(__('The user has been created'));\n return $this->redirect(array(\n 'action' => 'index',\n ));\n } else {\n $this->Session->setFlash(__('The user could not be created. Please, try again.'));\n }\n }\n } else {\n $this->Session->setFlash(__('You do not have permission to do this'));\n return $this->redirect(array(\n 'action' => 'admin_dashboard',\n ));\n }\n }", "public function addUser()\n {\n $categoryList = $this->itemModel->getCategories();\n\n //Check that register button exists and was clicked\n if (isset($_POST[\"user_submit\"])) { \n\n //Insert new row in Account and setting the User's name in database using values inputted in the HTML form\n $username = $_POST['username']; \n\n $newly_registered_account_id = $this->accountModel->registerAccount($username,$_POST[\"password\"],$_POST[\"sfsu_id\"]);\n\n $this->userModel->setUser($newly_registered_account_id,$_POST[\"firstname\"], \n $_POST[\"lastname\"],$_POST[\"country\"],$_POST[\"state\"],\n $_POST[\"address\"],$_POST[\"city\"],$_POST[\"zipcode\"],$_POST[\"phoneNumber\"]);\n\n } else {\n echo '<script language=\"javascript\">';\n echo 'alert(\"accounts.php registerUser bad.\")';\n echo '</script>';\n }\n\n header('location: ' . URL . 'home/index');\n }", "public function add()\n\t{\n\t\tif (! $this->is_admin) {\n\t\t\t$this->redirect('admin/error/deny');\n\t\t}\n\n\t\t$authModel = M('auth');\n\t\t$userModel = M('user');\n\n\t\t$authArr = $authModel->field('user_id')->where(array('level' => 1))->select();\n\t\t$leaderUids = makeImplode($authArr, 'user_id');\n\n\t\t$userArr = $userModel\n\t\t\t->field('id, truename')\n\t\t\t->where(array('id' => array('IN', \"$leaderUids\")))\n\t\t\t->select();\n\n\t\t$leaderIdsList = makeIndex($userArr, 'id');\n\n\t\t$this->assign('leader_list', $userArr);\n\t\t$this->display();\n\t}", "public function create()\n {\n //加载添加模板\n return view('Admin.Adminuser.add');\n }", "public function create()\n {\n $breadcrumb = [\n [\n 'name' => config('consts.user.USER_NAME'),\n 'href' => config('consts.user.USER_PATH')\n ],\n [\n 'name' => '新規',\n 'href' => ''\n ]\n ];\n $leftNav = [\n ['name' => 'ユーザー', 'href' => config('consts.common.ROOT_PATH') . '/user'],\n ['name' => 'サンプル', 'href' => config('consts.common.ROOT_PATH'). '/sample'],\n ['name' => 'テスト', 'href' => '']\n ];\n $this->current_id = $_GET['id'];\n $data = DB::table('users')\n ->leftjoin('users_ex', 'users.id', '=', 'users_ex.user_id')\n ->where('users.id', $this->current_id)\n ->first();\n \n return view('user.create', [\n 'breadcrumb' => $breadcrumb,\n 'leftNav' => $leftNav,\n 'data' => $data\n ]);\n }", "public function create()\n {\n return view('admin.adminusers.add');\n }", "public function index() {\n return view( 'admin.addUsers' );\n }", "public function create()\n {\n $this->checkPermission();\n\n $this->title = trans('admin.add_user');\n $roles = Role::getAll()->pluck('name', 'id');\n\n $this->content = view('admin.users.create')->with(compact('roles'))->render();\n return $this->renderOutput();\n }", "public function add_user($user_type = 'business_basic') {\n\t\t\t $data['pageName'] = $this->pageName . ' : Add User';\n\n\t\t\t $page = \"add_view_basic\";\n\t\t\t $type = \"Business Basic\";\n\n\t\t\t\tif( $user_type == 'business_pro' ){\n\t\t\t\t\t$page = \"add_view_pro\";\n\t\t\t\t\t$type = \"Business Pro\";\n\t\t\t\t\t$data['plan_list'] = $this->Common_model->get_plan_list();\n\t\t\t\t\t}\n\t\t\t\t\telseif($user_type == 'end_user'){\n\t\t\t\t\t\t\t $page = \"add_view_end_user\";\n\t\t\t\t\t\t\t $type = \"End\";\n\t\t\t\t\t\t\t }\n\n\t\t\t $data['pageName'] = $this->pageName . ' : Add '.$type.' User';\n\t\t\t $data['countryList'] = $this->Common_model->get_countries(); // echo \"<pre>\"; print_r($data); exit;\n\t\t\t $this->load->view('admin/user/'.$page, $data); \n }", "public function create()\n { //加载表单\n return view('Admin.Adminuser.add');\n }", "public function create()\n {\n //Create User Page\n return view('admin.user.create');\n }", "public function userAdd(){\n\n\n return view('addnewuser');\n}", "public function create()\n {\n $data['page_title'] = \"Create Users\";\n $data['page_description'] = \"\";\n $data['breadcrumbs'] = [\n [\n 'action' => route('index-users'),\n 'title' => 'Users'\n ],\n [\n 'action' => '',\n 'title' => 'Create'\n ]\n ]; \n \n return view('modules.users.create', $data);\n }", "function create() \n {\n $api = new Module_UserManagement_API();\n\n $user_types = $api->getExerciseTypes();\n\n $form = new AddUserForm();\n if ($form->validate()) {\n $userid = $form->getSubmitValue('login');\n $password = $form->getSubmitValue('password');\n $coach = $form->getSubmitValue('coach');\n $athlete = $form->getSubmitValue('athlete');\n $usertype = $form->getSubmitValue('usertype');\n\n $success = $api->createUser($userid, $password, \n $coach, $athlete, $usertype);\n if ($success) {\n /* We have sucessfully logged in, now lets \n * display the next page */\n /*\n if (!isset($redirect_module) || !isset($redirect_action)) {\n $redirect_module = 'Sessions';\n }\n\n Core_Url::redirectToUrl($urlToRedirect);\n */\n }\n }\n\n $view = Core_View::factory('adduser');\n //$view->users = $users;\n $view->addForm($form);\n $view->subTemplate = 'genericForm.tpl';\n\n /* Coach radio buttons */\n $view->assign('coach_types', array('y' => 'Yes',\n 'n' => 'No'));\n $view->assign('coach_selected', 'n');\n\n /* Athlete radio buttons */\n $view->assign('athlete_types', array('y' => 'Yes',\n 'n' => 'No'));\n $view->assign('athlete_selected', 'n');\n\n /* Athlete radio buttons */\n $view->assign('usertype_types', array('user' => 'User',\n 'superuser' => 'SuperUser'));\n $view->assign('usertype_selected', 'user');\n\n echo $view->render();\n }", "public function create()\n {\n return view('backend.pages.user.create-user');\n }", "public function create()\n\t{\n\t\t$user = Auth::guard('admin')->user();\n\n\t\treturn view('admin.pages.users.create', ['user' => $user]);\n\t}", "public function create()\n {\n return view('admin.page.user.create');\n }", "public function create()\n\t{\n\t\treturn view('admin.createuser');\n\t}", "public function admin_add()\n {\n if ($this->request->is('post')) {\n $this->User->create();\n\n $this->request->data['Impi']['auth_scheme'] = 127;\n\n if ($this->User->saveAll($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n\n $this->set(compact('utilityFunctions', 'utilityFunctionsParameters'));\n }", "public function addUser(UserAddForm $form);", "public function addUser (request $request) {\n\t\t$userInfo = resolve('userInfo');\n\n\t\tif ($userInfo->usr_role != \"AD\") {\n\t\t\treturn redirect('error');\n\t\t}\n\n return view('addUser')\n\t\t\t\t ->with('user',$userInfo);\n }", "public function adduser()\n {\n if ($this->session->has_userdata('login') && $this->session->designation == 'admin') {\n $this->load->view('template/inc/header.php');\n $this->load->view('template/user/adduser.php');\n $this->load->view('template/inc/footer.php');\n } else {\n redirect('home');\n }\n\n }" ]
[ "0.8204279", "0.8107981", "0.802444", "0.8009763", "0.7987004", "0.7943107", "0.78831613", "0.78745085", "0.78732204", "0.786503", "0.78275937", "0.7818517", "0.7815404", "0.7771804", "0.7755497", "0.77300614", "0.77295995", "0.77020645", "0.7672297", "0.766827", "0.7653434", "0.7615096", "0.7611753", "0.7597585", "0.7578231", "0.75646096", "0.75614816", "0.7557109", "0.75454", "0.75416523", "0.754023", "0.7539294", "0.75273937", "0.751551", "0.74978507", "0.74977547", "0.7482449", "0.74745405", "0.7470064", "0.7469048", "0.7463331", "0.74545085", "0.7453815", "0.7452225", "0.7452225", "0.7452225", "0.7443078", "0.7435446", "0.7431345", "0.7415209", "0.7411552", "0.7409338", "0.74060595", "0.7399873", "0.7388633", "0.7381924", "0.73753995", "0.736784", "0.7358715", "0.7349176", "0.73379356", "0.73279357", "0.7311652", "0.72873104", "0.72849274", "0.7283003", "0.7257857", "0.72448754", "0.72433835", "0.7225905", "0.72120726", "0.7196497", "0.7192322", "0.7185628", "0.7183622", "0.717724", "0.71611524", "0.71598935", "0.7158034", "0.71451944", "0.7113289", "0.7093012", "0.7090644", "0.7083418", "0.7079142", "0.707868", "0.7072922", "0.70683306", "0.7061373", "0.7055157", "0.7054786", "0.7051484", "0.70364624", "0.70354253", "0.7023229", "0.70219916", "0.7018335", "0.7018275", "0.7016297", "0.7005146", "0.69970375" ]
0.0
-1
View edit user page
public function edit($id){ $outData['script']= CONTROLLER_NAME."/add"; $model = M('user'); $result = $model->field('id,username,email,realname')->where('id='.$id)->find(); $outData['info'] = $result; $this->assign("pageName",'编辑用户'); $this->assign('output',$outData); $this->display(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }", "public function edit() {\n $token = $this->require_authentication();\n $user = $token->getUser();\n require \"app/views/user/user_edit.phtml\";\n }", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n\n Helper::checkUrlIdAgainstLoginId($userId);\n\n View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => UserModel::load()->get($userId),\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t'link' => 'management/users'\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t// Prepare data for contents.\n\t\tnonce_generate();\n\t\t$data = array(\n\t\t\t'user' =>& $this->user\n\t\t);\n\t\t$this->title = 'Edit User: ' . $this->user['username'];\n\t\t$this->content = $this->View->getHtml('content-users-edit', $data, $this->title);\n\t}", "public function edit()\n {\n $userId = Helper::getIdFromUrl('user');\n \n $user = UserModel::load()->get($userId);\n\n return View::render('users/edit.view', [\n 'method' => 'POST',\n 'action' => '/user/' . $userId . '/update',\n 'user' => $user,\n 'roles' => RoleModel::load()->all(),\n ]);\n }", "public function edit() {\r\n \tif (isset($_SESSION['userid'])) {\n \t $user=$this->model->getuser($_SESSION['userid']);\n \t $this->view->set('user', $user[0]);\n \t $this->view->edit();\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "public function edituser(){\n\t\t$id = $this->uri->segment(3);\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/edit_londontec_users';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Edit Londontec users',\n\t\t\t'londontec_users' => $this->setting_model->Get_Single('londontec_users','user_id',$id)\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view(config('const.template.user.edit'), ['user' => User::find($this->guard()->id())]);\n }", "public function edit(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$user = $this->_map_posted_data();\n\t\t\t\t$user->set_user_id($_POST['id']);\n\t\t\t\t$this->userrepository->update($user);\n\t\t\t\theader(\"Location: index.php/admin/index/edit\");\n\t\t\t}else{\n\t\t\t\t$view_page = \"adminusersview/edit\";\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t$user = $this->userrepository->get_by_id($id);\n\t\t\t\tif(is_null($user)){\n\t\t\t\t\theader(\"Location: index.php/admin/index\");\n\t\t\t\t}\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t}\n\t\t}", "public function edit()\n\t{\n\t\treturn view('admin.users.edit')->with('user', $this->user);\n\t}", "public function editAction(): void {\n View::renderTemplate('Profile/edit.twig', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function actionEditUserProfile()\n {\n $userID = $_GET['userid'];\n $data = $this->model->getUserProfile($userID);\n $this->view = new ViewIndex(\"EditUserProfile\", $data);\n $this->view->render();\n //$this->view->generate('viewEditProfile.php', 'viewTemplate.php', $data);\n }", "public function edit()\n {\n $id = Auth::user()->id;\n $user = User::find($id);\n return view('user.edit', compact('user'));\n }", "public function edit()\n\t{\n\t\t$user = App::make('user.current');\n\t\treturn View::make('shared.user.edit-user', $user->toArray());\n\t}", "public function edit()\n {\n return view('user.edit', [\n 'user' => Auth::user()\n ]);\n }", "public function actionEditProfile()\n {\n $userID = $_GET['userid'];\n $data = $this->model->getUserProfile($userID);\n $this->view = new ViewIndex(\"EditProfile\", $data);\n $this->view->render();\n //$this->view->generate('viewEditProfile.php', 'viewTemplate.php', $data);\n }", "public function edit()\n {\n $user = User::where('id', Auth::user()->id)->get();\n return view('admin/edituser', compact('user', 'id')); \n }", "function edit()\n\t{\n\t\t// Find the logged-in client details\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Save the POSTed data\n\t\tif (!empty($this->data)) {\n\t\t\t$this->data['User']['id'] = $userId;\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('Profile has been updated', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Profile could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t} else {\n\t\t\t// Set the form data (display prefilled data) \n\t\t\t$this->data = $user;\n\t\t}\n\n\t\t// Set the view variable\n\t\t$this->set(compact('user'));\n\t}", "public function getPostEditUser()\n {\n // Render login page if not logged in.\n if (!$this->di->get(\"session\")->has(\"account\")) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n }\n\n $title = \"Edit\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n $user = new User();\n $username = $this->di->get(\"session\")->get(\"account\");\n $user->setDb($this->di->get(\"db\"));\n $user->find(\"username\", $username);\n\n $form = new EditUserForm($this->di, $user);\n\n $form->check();\n\n $data = [\n \"form\" => $form->getHTML(),\n ];\n\n $view->add(\"user/edit\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "public function edit()\n {\n return view('auth.user.edit')->with('user', auth()->user());\n }", "public function edit()\n {\n /*get the user form auth*/\n $user = auth()->user();\n /*return view with that user*/\n return view('user.edit', compact('user'));\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\n {\n $user = Auth::user();\n\n return view('users.edit', ['user' => $user]);\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n $user = Auth::user();\n\n return view('users.edit', compact('user'));\n }", "public function edituserAction(): object\n {\n // Sets webpage title\n $title = \"Edit user\";\n\n // Sets extended webpage title\n $titleExtended = \" | Eshop\";\n\n // Framework variables\n $response = $this->app->response;\n $session = $this->app->session;\n\n // Verifies if user is logged in\n if (!$session->get(\"loggedIn\")) {\n $response->redirect(\"eshop/login\");\n };\n\n\n // Connects to db\n $this->app->db->connect();\n\n // Retrieve content id\n $username = getGet(\"username\");\n\n // SQL statement\n $sql = \"SELECT * FROM users WHERE username = ?;\";\n\n // Fetches data from db and stores in $resultset\n $content = $this->app->db->executeFetch($sql, [$username]);\n\n // Data array\n $data = [\n \"title\" => $title,\n \"titleExtended\" => $titleExtended,\n \"username\" => $username,\n \"content\" => $content\n ];\n\n // Includes admin header\n $this->app->page->add(\"content/header_admin\");\n\n // Adds route and sends data array to view\n $this->app->page->add(\"content/edit_user\", $data);\n\n // Renders page\n return $this->app->page->render($data);\n }", "public function edit(){\n\n \treturn View::make('users.edit');\t\n }", "public function edit()\n {\n $user = User::where(\"email\",request(\"email\"))->get()->first();\n return view(\"admin.editUser\",compact(\"user\"));\n }", "public function edit()\n {\n $user = User::where('id', Auth::id())->firstOrFail();\n return view('profile.edit', compact('user'));\n }", "public function edit($id)\n { \n $user = User::find($id);\n return view('admin.page.user.edit',compact('user'));\n \n }", "public function edit($id) {\n \t$user = User::frontuser()->find($id);\n \tif(!empty($user)) {\n \t\t$data = ['menu_users' => true];\n \t\t$data['user'] = $user;\n \t\treturn view('manage.user', $data);\n \t}\n \telse {\n \t\treturn view('manage.errors.404');\n \t}\n }", "public function edit()\n {\n $user = User::where('id',auth()->id())->first();\n return view('super.profile.edit', [\n 'edit' => $user,\n ]);\n }", "public function edit()\n {\n $user = Auth::user();\n\n $data = [\n 'user' => $user,\n 'canEditSurname' => ($this->getGender($user->id_number) == 'F')\n ];\n\n return view('pages.user.edit', $data);\n }", "public function editprofile()\n\t\t{\n\t\t\tif(Auth::check()) {\n\t\t\t\t$userinfo = Auth::user();\n\t\t\t\treturn View::make('editprofile')->with('userinfo', $userinfo);\n\t\t\t} else {\n\t\t\t\tApp::abort(403);\n\t\t\t}\n\t\t}", "public function edit()\n {\n $id = Auth::user()->id;\n \t$data = User::where('id',$id)->first();\n return view('admin.update-profile',compact('data'));\n }", "public function edit()\n {\n $user = Auth::user();\n // dd($user);\n return view('user.update', compact('user'));\n }", "public function edit()\n {\n $user = Auth::user();\n return view('user.editprofile', compact('user'));\n }", "public function edit()\n {\n //$user =User::find($id);\n $user =\\Auth::user();\n return view('users.edit',[\n 'title' =>'プロフィール編集',\n 'user'=>$user,\n ]);\n }", "function get_user_to_edit($user_id)\n {\n }", "public function edit(User $user)\n {\n \n }", "public function profile_edit() {\n $this->template->content = View::instance('v_users_profile_edit');\n $this->template->title = \"Edit Profile\";\n\n // Render the view\n echo $this->template;\n\n }", "public function actionEdit()\r\n {\r\n $userId = User::checkLogged();\r\n\r\n $user = User::getUserById($userId);\r\n\r\n // new user info valiables\r\n $name = $user['name'];\r\n $password = $user['password'];\r\n\r\n $result = false;\r\n\r\n // form processing\r\n if (isset($_POST['submit'])) {\r\n $name = $_POST['name'];\r\n $password = $_POST['password'];\r\n\r\n $errors = false;\r\n\r\n // validate fields\r\n if (!User::checkName($name))\r\n $errors[] = 'Имя должно быть длиннее 3-х символов';\r\n\r\n if (!User::checkPassword($password))\r\n $errors[] = 'Пароль должен быть длиннее 5-ти символов';\r\n\r\n // save new data \r\n if ($errors == false)\r\n\r\n $result = User::edit($userId, $name, $password);\r\n }\r\n\r\n // attach specified view\r\n require_once(ROOT . '/app/views/cabinet/edit.php');\r\n return true;\r\n }", "public function edit()\n {\n $user = Auth::user();\n return view('editProfile', $user);\n }", "public function UserEdit($id){\n $users = User::findOrFail($id);\n return view('backend.user.UserEdit',compact('users'));\n }", "public function editAction()\n {\n // Check logged\n $userId = UserModel::checkLogged();\n \n //We get user data\n $user = UserModel::getUserById($userId);\n \n \n $name = $user['name'];\n \n \n $result = false;\n \n // Form processing\n if (isset($_POST['submit'])) {\n \n // Getting data from the form\n $name = $_POST['name'];\n $password = $_POST['password'];\n \n \n // Form error flag\n $errors = false;\n \n // If necessary, you can validate the values as needed\n if (!UserModel::checkName($name)) {\n $errors[] = 'The name must not be shorter than 2 characters';\n }\n \n if (!UserModel::checkPassword($password)) {\n $errors[] = 'Password must not be shorter than 6 characters';\n }\n \n if ($errors == false) {\n $result = UserModel::edit($userId, $name, $password);\n }\n }\n \n // Connect the view\n $this->view('header.tpl');\n $this->view('view.tpl', ['user' => $user,\n 'result' => $result]\n );\n $this->view('footer.tpl');\n \n return true;\n }", "public function edit($id){\r\n \t$view = self::checkLoginAdmin();\r\n \tif(isset($view))\r\n \t\treturn $view;\r\n \t\treturn view('admin.user.user', ['u'=>User::find($id),'user'=>Auth::user()]);\r\n }", "public function actionEdit() {\n\n\t\t$userId = User::checkLogged();\n\t\t$user = User::getUserById($userId);\n\t\t$first_name = $user['first_name'];\n\t\t$last_name = $user['last_name'];\n\t\t$result = false;\n\n\t\tif (isset($_POST['submit'])) {\n\t\t\t$first_name = $_POST['first_name'];\n\t\t\t$last_name = $_POST['last_name'];\n\n\t\t\t$errors = array();\n\n\t\t\tif ($error = Validator::checkName($first_name)) $errors['first_name'] = $error;\n\t\t\tif ($error = Validator::checkName($last_name)) $errors['last_name'] = $error;\n\n\t\t\tif (empty($errors)) {\n\t\t\t\t$result = User::edit($userId, $first_name, $last_name);\n\t\t\t}\n\t\t}\n\t\t$pageTitle = \"Edit Details\";\n\t\trequire_once(ROOT . '/views/account/edit.php');\n\n\t\treturn true;\n\t}", "public function edit($user_id)\n\t{\n\t\t//\n\t}", "public function edit($id)\n {\n\t\t$user = User::find($id);\n return view('pages.user.update',['user' => $user,'type' => 'update']);\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit(User $user)\n {\n //\n }", "public function edit($id)\n {\n //根据id获取数据\n $rs = User::find($id);\n\n //显示页面\n return view('admin.user.edit',[\n 'title'=>'用户的修改页面',\n 'rs'=>$rs\n ]);\n }", "public function edit($id)\n {\n $user = User::find($id);\n return view('pages.user.edit',compact('user'));\n }", "public function edit(User $user)\n {\n }", "public function editLoggedIn()\n {\n return view('users.edit')->with('user', Auth::user());\n }", "public function edit($id){\n $where=array(\n 'id'=>$id\n );\n $user=$this->Mdl_user->getRecord($where);\n $data=array(\n 'user'=>$user\n );\n $this->load->view('users/edit',$data);\n }", "public function editAction() {\n $uid = $this->getInput('uid');\n $userInfo = Admin_Service_User::getUser(intval($uid));\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $this->assign('userInfo', $userInfo);\n $this->assign('groups', $groups);\n $this->assign('status', $this->status);\n $this->assign(\"meunOn\", \"sys_user\");\n }" ]
[ "0.874087", "0.8706978", "0.8660232", "0.84527194", "0.83909786", "0.8339164", "0.83279574", "0.8293682", "0.8235497", "0.8163366", "0.8139508", "0.8114504", "0.81055087", "0.8094688", "0.80829364", "0.8064787", "0.80417734", "0.8011118", "0.8007757", "0.799678", "0.79835624", "0.79716986", "0.79485285", "0.79124594", "0.7908313", "0.78831506", "0.78831506", "0.78779066", "0.78753287", "0.78695023", "0.7869146", "0.78602386", "0.782097", "0.78194666", "0.781425", "0.7808069", "0.78066534", "0.7788239", "0.778462", "0.77839977", "0.7771797", "0.7769165", "0.7752353", "0.77521926", "0.7748984", "0.7745526", "0.7744627", "0.77423084", "0.77391535", "0.77335805", "0.77332604", "0.7732002", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77282727", "0.77257955", "0.772506", "0.77099156", "0.7709478", "0.7708346", "0.77073264" ]
0.0
-1
Create DATA URL from file
public function stringify($data, $prettyPrint = TRUE) { if (!$data instanceof Media) { throw new InvalidArgumentException( 'DataUrlMapper expects object of type Media, ' . (gettype($data)) . ' given' ); } return Filters::dataStream((string)$data, $data->getContentType()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function createUrl($file);", "public function getUrl( $file );", "abstract public function getUrl(File $file);", "function data_uri($contents, $mime)\n{\n// $contents = file_get_contents($file);\n $base64 = base64_encode($contents);\n return ('data:' . $mime . ';base64,' . $base64);\n}", "public function url($file, $type = NULL);", "static public function getDataUri($file = null)\n {\n // If this is not a file, do not continue\n if (is_file($file) == false) {\n return null;\n }\n\n // If this is not an image, do not continue\n if (preg_match('/\\.(jpg|jpeg|png|gif|webp)$/i', $file) == false) {\n return null;\n }\n\n // Check the file-length\n if (filesize($file) > ScriptMergeHelper::getParams()->get('data_uris_filesize', 2000)) {\n return null;\n }\n\n // Fetch the content\n $content = @file_get_contents($file);\n if (empty($content)) {\n return null;\n }\n\n $mimetype = null; \n if (preg_match('/\\.gif$/i', $file)) {\n $mimetype = 'image/gif';\n } else if (preg_match('/\\.png$/i', $file)) {\n $mimetype = 'image/png';\n } else if (preg_match('/\\.webp$/i', $file)) {\n $mimetype = 'image/webp';\n } else if (preg_match('/\\.(jpg|jpeg)$/i', $file)) {\n $mimetype = 'image/jpg';\n }\n\n if (!empty($content) && !empty($mimetype)) {\n return 'data:'.$mimetype.';base64,'.base64_encode($content);\n }\n\n return null;\n }", "public function getUrl($localFile);", "function fetchFileFromURL($url, $file, $local_path = './data/', $local_file)\n{\n $data = fetchFileDataFromURL($url . $file);\n if ($data) {\n $d = fopen($local_path . $local_file, \"wb\");\n $ret = fwrite($d, $data);\n fclose($d);\n\n return $ret;\n }\n\n return false;\n}", "function fn_get_url_data($val)\n{\n if (!preg_match('/:\\/\\//', $val)) {\n $val = 'http://' . $val;\n }\n\n $result = false;\n $_data = fn_get_contents($val);\n\n if (!empty($_data)) {\n $result = array(\n 'name' => fn_basename($val)\n );\n\n // Check if the file is dynamically generated\n if (strpos($result['name'], '&') !== false || strpos($result['name'], '?') !== false) {\n $result['name'] = 'url_uploaded_file_' . uniqid(TIME);\n }\n $result['path'] = fn_create_temp_file();\n $result['size'] = strlen($_data);\n\n $fd = fopen($result['path'], 'wb');\n fwrite($fd, $_data, $result['size']);\n fclose($fd);\n @chmod($result['path'], DEFAULT_FILE_PERMISSIONS);\n\n $result['type'] = fn_get_mime_content_type($result['path'], false, '');\n\n if (empty($result['type'])) {\n $result['type'] = fn_get_file_type($result['name']);\n }\n\n $cache = Registry::get('temp_fs_data');\n\n if (!isset($cache[$result['path']])) { // cache file to allow multiple usage\n $cache[$result['path']] = $result['path'];\n Registry::set('temp_fs_data', $cache);\n }\n }\n\n return $result;\n}", "function generateFTPLink(string $file_name, int $dataset): string\n{\n\t$handle = fopen(\"/var/access/$dataset/download_token.txt\", \"r\");\n\t$line = fgets($handle) ;\n\tif (true == $line) {\n\t\t$download_token = chop($line);\n\t}\n\tfclose($handle);\n\n\t$appconfig = parse_ini_file(\"/var/appconfig.ini\");\n\t$ftpd_endpoint = $appconfig[\"ftpd_endpoint\"] ?? \"localhost\";\n\t$ftp_link = \"ftp://d-$dataset:$download_token@$ftpd_endpoint:9021/$file_name\";\n\treturn $ftp_link;\n}", "function dataUri($path)\n {\n $data = $this->evaluate($this->resolve($path));\n\n return sprintf(\"data:%s;base64,%s\",\n $this->contentType($path), rawurlencode(base64_encode($data))\n );\n }", "function writeUrl() {\n\n }", "protected function makeUploadedFileByUrl() {\n $content = @file_get_contents($this->resource);\n $temp_name = basename($this->resource);\n $this->storage->put($temp_name, $content);\n return (new UploadedFile($this->storage->path($temp_name), $temp_name));\n }", "function _webform_csv_data_file($data) {\r\n $filedata = unserialize($data['value']['0']);\r\n return empty($filedata['filename']) ? array('', '') : array(webform_file_url($filedata['filepath']), (int)($filedata['filesize']/1024));\r\n}", "function getFile($fileQuery){\nglobal $user, $pass, $domain;\nreturn file_get_contents(\"https://$user:$pass@$domain:2083/\".$fileQuery.\"&ssl=1&lang=es&framename=mainright\",'r');\n}", "public function downloadUrlFile()\r\n\t{\r\n\t\t$url = $this->outputReferenceFile;\r\n\t\t$fileName = explode('.', basename($this->targetFile));\r\n\t\t$this->referenceFile = dirname($this->targetFile) . \"/\" . $fileName[0] . 'ProductionDownload.' . $fileName[1];\r\n\t\tfile_put_contents($this->referenceFile, file_get_contents($url));\t\t\r\n\t}", "function format_url($file_path)\n{\n $path_component = explode('/', $file_path);\n $path_component = array_map('rawurlencode', $path_component);\n\n return implode('/', $path_component);\n}", "function short($urlf){\r\n\t\r\n$url = file_get_contents(\"http://migre.me/api.txt?url=$urlf\");\r\necho $url;\r\n}", "public function getFileUrl(){\n $url = config('kontaktformular.fileDownloadUrl');\n //Prüfen ob $url auf / endet\n if(substr($url, -1) != '/'){\n $url .= '/';\n }\n return $url . $this->file_hash .'/' . $this->file_name .'/'. $this->id;\n }", "protected static function _get_uri_data( $resource, $origfile = null, $type = null ) {\r\n # for css, replace urls with data, important especially for relative path urls in css\r\n if( $type == 'text/css' && $origfile ) {\r\n $matches = array();\r\n $d = dirname( $origfile );\r\n if( preg_match_all( '/url\\s*\\([^\\)]+\\)/', $resource, $matches ) ) {\r\n foreach( $matches[0] as $m ) {\r\n $url = preg_replace('/url\\s*\\((\\'|\")([^\\'\"]*)(\\'|\").*/', \"\\\\2\", $m );\r\n $try = self::_normalize_resource( \"$d/$url\" );\r\n $data = file_exists( $try ) ? self::get_uri($try) : self::get_uri($url);\r\n $resource = str_replace( $m, \"url($data)\", $resource );\r\n\r\n }\r\n }\r\n }\r\n return base64_encode( $resource ); \r\n// return base64_encode(self::$_config['minify'] ? self::_min_src( $resource, $type ) : $resource);\r\n }", "static public function getUrlToFile($file) {\n $docRoot = realpath($_SERVER['DOCUMENT_ROOT']);\n $docRootLen = strlen($docRoot);\n if (strncmp($file, $docRoot, $docRootLen)) {\n throw new InvalidArgumentException(\"The file $file is not inside the document root {$_SERVER['DOCUMENT_ROOT']}.\");\n }\n\n $relativePath = substr($file, $docRootLen);\n if (strncmp($file, '/ssl', 4)) {\n return Page::getCurrentURL() . $relativePath;\n }\n return Page::getSecureURL() . substr($relativePath, 4);\n }", "public function add_file_from_url( $url ) {\r\n\t\t\t$url = ( substr( $url, 0, 4 ) !== 'http' ) ? 'http://' . str_replace( '//', '', $url ) : $url;\r\n\t\t\t\r\n\t\t\t$file = self::FILE_OBJECT_TEMPLATE;\r\n\t\t\t$file['path'] = $url;\r\n\t\t\t$file['origname'] = $url;\r\n\t\t\t$file['name'] = self::strip_to_valid_filename( substr( strrchr( $url, '/' ), 1 ) );\r\n\t\t\t$file['isurl'] = true;\r\n\t\t\t\r\n\t\t\t$this->process_file_add( $file, true );\r\n\t\t}", "function render_link($data, $values) {\n if (!empty($this->options['link_to_file']) && $data !== NULL && $data !== '') {\n return l($data, file_create_url($values->filepath), array('html' => TRUE));\n }\n return $data;\n }", "protected function getUrl($file){\n\t\n\t\t//if there is no file, return an empty string\n\t\tif(empty($file)) return $file;\n\t\n\t\t//test if the files is a url, as one migt send it that way\n\t\t$parts = parse_url($file);\n\t\t$is_url = is_array($parts) && isset($parts['scheme']);\n\t\n\t\t//if this is not a url, create one for it\n\t\tif(!$is_url)\n\t\t{\n\t\t\t//as we can't control what if the developers\n\t\t\t//will take care of the HTTP / HTTPS matching,\n\t\t\t$url = $this->createUrl($file);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url = $file;\n\t\t}\n\t\n\t\t//do it here. the problem is loading an insecure object over a secure page, so check for this situation\n\t\t\n\t\tif( (isset($_SERVER['HTTPS']) && !strcasecmp($_SERVER['HTTPS'],'on')) && //the page is a secure one\n\t\tSyC::startsWith($url,'http://') //the created url is an insecure one, adjust it\n\t\t)\n\t\t{\n\t\t\t$url = \"https://\".substr($url, 7);\n\t\t}\n\t\t\n\t\treturn $url;\n\t}", "function get_url_file(string $url): string\n{\n $ch = curl_init();\n curl_setopt($ch, \\CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, \\CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, \\CURLOPT_URL, $url);\n $data = curl_exec($ch);\n curl_close($ch);\n return $data;\n}", "function filetourl($file) {\r\n\t\t\treturn str_replace(ABSPATH , get_site_url().'/' ,$file);\r\n\t\t}", "protected function getDataUrl($mime, $content)\n {\n $base = base64_encode($content);\n\n return 'data:'.$mime.';base64,'.$base;\n }", "function resources_url($filename = NULL)\n {\n return 'https://resources.crud4.com/v1/' . $filename;\n //return site_url('resources/' . $param);\n }", "function CreateFileWithContent( $xURL, $xContent ) {\n\t//$content = str_replace(\"</timing_results>\",\"<count><data>\".$xCount.\".xml</data></count></timing_results>\",$content);\n\t//$content = $content . '<a href=\"http://www.w3schools.com/\">Visit W3Schools!</a> ';\n\t$file = fopen( $xURL , \"w\");\n\tfwrite($file, $xContent);\n\tfclose($file);\n}", "public function getFileUrl()\n {\n\n return get_bloginfo('url') . \"/\" . $this->getFileName();\n\n }", "protected function getUrl()\r\n\t{\r\n\t\t$xmlData = file_get_contents($this->url);\r\n\t\tif (file_put_contents($this->localFile, $xmlData)) {\r\n\t\t\t$this->log->write(Logger::SUCCESS,'Saved '.$this->localFile);\r\n\t\t}\r\n\t\t\r\n\t\t/* //CURL\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL,$this->url);\r\n\t\t$this->log->write(Logger::SUCCESS,'Downloaded '.$this->url);\r\n\t\t$fp = fopen($this->localFile, 'w');\r\n\t\tcurl_setopt($ch, CURLOPT_FILE, $fp);\r\n\t\tcurl_exec ($ch);\r\n\t\tcurl_close ($ch);\r\n\t\tfclose($fp);\r\n\t\t$this->log->write(Logger::SUCCESS,'Saved '.$this->localFile);\r\n\t\t*/\r\n\t}", "function file_url($file_path)\n {\n return env('STORAGE_BASE_URL') . env('ROOT_FOLDER') . DIRECTORY_SEPARATOR . $file_path;\n }", "function loadFileFromDB() {\n\t\t// If file contents are in bin_data column, fetch data and store in file.\n\t\tif (isset($this->data_array[\"bin_data\"]) && \n\t\t\ttrim($this->data_array[\"bin_data\"]) != \"\") {\n\n\t\t\t// Need to decode the string first.\n\t\t\t$theFileContent = base64_decode($this->data_array[\"bin_data\"]);\n\n\t\t\t$theDir = dirname($this->getFile());\n\t\t\tif (!file_exists($theDir)) {\n\t\t\t\t// Its parent directory does not exist yet. Create it.\n\t\t\t\tmkdir($theDir);\n\t\t\t}\n\n\t\t\t// Create the file for future use.\n\t\t\t$fp = fopen($this->getFile(), \"w+\");\n\t\t\tfwrite($fp, $theFileContent);\n\t\t\tfclose($fp);\n\t\t}\n\t}", "public function getFile();", "public function getFile();", "function file_display_url(File $file, $format = 'fullsize')\n{\n if (!$file->exists()) {\n return false;\n }\n return $file->getWebPath($format);\n}", "function getDATA($url) {\r\n // inisialisasi CURL\r\n $data = curl_init();\r\n $ip = $url;\r\n // $ip = $getRow['ipAddr'] . '' . $url;\r\n // setting CURL\r\n curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($data, CURLOPT_URL, $ip);\r\n\r\n // menjalankan CURL untuk membaca isi file\r\n $hasil = curl_exec($data);\r\n curl_close($data);\r\n return $hasil;\r\n}", "public static function getFile() {}", "public function downloadFile();", "public function getUrl(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }", "public function getUrl()\n {\n return $this->storage()->url(\n $this->getFilepath().DIRECTORY_SEPARATOR.$this->filename\n );\n }", "function fetch_into_file($url, $file)\n{\n $SSL_fopen = false;\n if(in_array('https', stream_get_wrappers())) {\n $SSL_fopen = true;\n }\n\n // Open URL for reading\n if($SSL_fopen) {\n $source = @fopen($url, \"r\");\n if (!$source) {\n return;\n }\n } else {\n $source = popen(\"curl -s '$url'\", 'r');\n }\n\n // Open temporary file for writing\n $dest = @fopen(\"$file~\", \"w\");\n if (!$dest) {\n echo \"failed to open '$file~' for writing\\n\";\n return;\n }\n\n // Read until $source provides data, and write\n // out the chunk to the output file if possible\n while (!feof($source)) {\n $chunk = fread($source, 4096);\n if (fwrite($dest, $chunk) < 0) {\n fclose($source);\n fclose($dest);\n unlink(\"$file~\");\n echo \"failed writing to '$file~'\\n\";\n return;\n }\n }\n fclose($source);\n fclose($dest);\n\n // If we don't have new data, delete file\n if (!@filesize(\"$file~\")) {\n echo \"'$file~' was empty, skipping\\n\";\n unlink(\"$file~\");\n return;\n }\n\n // Replace real file with temporary file\n return rename(\"$file~\", $file);\n}", "public function getFile ();", "private function getDataUrl(string $pName = \"\"): string\n {\n return $this->getBaseUrl() . \"data\" . ((strlen($pName) == 0) ? '' : \"/$pName\");\n }", "abstract public function get_url_read();", "protected function generateURLListFile() {\n\t\t$content = '';\n\t\t$allowedURLs = $this->indexer->getAllowedURLs();\n\t\t$recordSet = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,tx_mnogosearch_url',\n\t\t\t'tx_mnogosearch_urllog', '');\n\t\t$GLOBALS['TYPO3_DB']->sql_query('START TRANSACTION');\n\t\twhile (false !== ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($recordSet))) {\n\t\t\t$addUrl = false;\n\t\t\tforeach ($allowedURLs as $allowedURL) {\n\t\t\t\tif (substr($allowedURL, 0, 6) == 'htdb:/') {\n\t\t\t\t\t$addUrl = ($allowedURL == dirname($row['tx_mnogosearch_url']));\n\t\t\t\t}\n\t\t\t\telseif (substr($row['tx_mnogosearch_url'], 0, 6) != 'htdb:/') {\n\t\t\t\t\tif ($allowedURL{0} == '/') {\n\t\t\t\t\t\t// regexp\n\t\t\t\t\t\t$addUrl = preg_match($allowedURL, $row['tx_mnogosearch_url']);\n\t\t\t\t\t}\n\t\t\t\t\telseif (strpos($allowedURL, '*')) {\n\t\t\t\t\t\t// wildcard\n\t\t\t\t\t\t$regexp = str_replace('/', '\\/', str_replace('*', '.*', $allowedURL));\n\t\t\t\t\t\t$addUrl = preg_match('/' . $regexp . '/', $row['tx_mnogosearch_url']);\n\t\t\t\t\t}\n\t\t\t\t\telseif (strpos($row['tx_mnogosearch_url'], $allowedURL) === 0) {\n\t\t\t\t\t\t// normal string\n\t\t\t\t\t\t$addUrl = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($addUrl) {\n\t\t\t\t\t$content .= $row['tx_mnogosearch_url'] . chr(10);\n\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_mnogosearch_urllog', 'uid=' . $row['uid']);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($recordSet);\n\t\t$name = '';\n\t\tif ($content) {\n\t\t\t$name = tempnam(sys_get_temp_dir(), 'mnogo-');\n\t\t\tif (!@file_put_contents($name, $content)) {\n\t\t\t\t$GLOBALS['TYPO3_DB']->sql_query('ROLLBACK');\n\t\t\t\tthrow new Exception(sprintf('Unable to create URL list file \"%s\"', $name));\n\t\t\t}\n\t\t}\n\t\t$GLOBALS['TYPO3_DB']->sql_query('COMMIT');\n\n\t\treturn $name;\n\t}", "public function getFileUrl(string $file_path): string\n {\n return \"https://api.telegram.org/file/bot{$this->token}/{$file_path}\";\n }", "public function make(string $filename, string $data)\n {\n return File::make($this->path . $filename, $data);\n }", "function forReadFile($templet) {\n//$handle = fopen(\"http://www.example.com/\", \"rb\");\n$handle = fopen($templet, \"rb\");\n$contents = stream_get_contents($handle);\nfclose($handle);\n//echo $contents;\nreturn $contents ;\n\n}", "function _webform_table_data_file($data) {\r\n $output = '';\r\n $filedata = unserialize($data['value']['0']);\r\n if (!empty($filedata['filename'])) {\r\n $output = '<a href=\"'. webform_file_url($filedata['filepath']) .'\">'. webform_file_name($filedata['filepath']) .'</a>';\r\n $output .= ' ('. (int)($filedata['filesize']/1024) .' KB)';\r\n }\r\n elseif (!empty($filedata['error'])) {\r\n $output = $filedata['error'];\r\n }\r\n return $output;\r\n}", "function webform_file_url($filepath) {\r\n if (!empty($filepath)) {\r\n $info = pathinfo($filepath);\r\n $file_url = file_create_url($info['dirname'] .'/'. rawurlencode($info['basename']));\r\n }\r\n return isset($file_url) ? $file_url : '';\r\n}", "function SaveToFile($file) {\n\t\t\t$data = $this->GetData();\n\t\t\tif (!$data) {\n\t\t\t\t/* we have to store the data in a file but fetch it from the system,\n\t\t\t\t\tlets have curl store to the file directly to save memory usage */\n\t\t\t\t/* XXX */\n\t\t\t} else {\n\t\t\t\t/* have data, lets store it */\n\t\t\t\treturn file_put_contents($file, $data);\n\t\t\t}\n\t\t}", "public function dataPathToBinary(): static\n {\n return new static($this->uri->withPath(DataPath::fromUri($this->uri)->toBinary()->toString()));\n }", "public function actionGenerateAndDownloadDatasetCreationFile() {\n $fileColumns[] = DatasetController::AGRONOMICAL_OBJECT_URI;\n $fileColumns[] = DatasetController::DATE;\n $variables = Yii::$app->request->post('variables');\n foreach ($variables as $variableAlias) {\n $fileColumns[] = $variableAlias;\n }\n\n $file = fopen('./documents/DatasetFiles/datasetTemplate.csv', 'w');\n fputcsv($file, $fileColumns, $delimiter = \";\"); \n fclose($file);\n }", "function dsq_urlopen($url, $postdata=false, $file=false) {\n $response = array(\n 'data' => '',\n 'code' => 0\n );\n\n if($file) {\n extract($file, EXTR_PREFIX_ALL, 'file');\n }\n if(empty($file_name) || empty($file_field)) {\n $file_name = false;\n $file_field = false;\n }\n\n // Try curl, fsockopen, fopen + stream (PHP5 only), exec wget\n if(function_exists('curl_init')) {\n if (!function_exists('curl_setopt_array')) {\n function curl_setopt_array(&$ch, $curl_options)\n {\n foreach ($curl_options as $option => $value) {\n if (!curl_setopt($ch, $option, $value)) {\n return false;\n } \n }\n return true;\n }\n }\n _dsq_curl_urlopen($url, $postdata, $response, $file_name, $file_field);\n // } else if(ini_get('allow_url_fopen') && function_exists('stream_get_contents')) {\n // _dsq_fopen_urlopen($url, $postdata, $response, $file_name, $file_field);\n } else {\n // TODO: Find the failure condition for fsockopen() (sockets?)\n _dsq_fsockopen_urlopen($url, $postdata, $response, $file_name, $file_field);\n }\n\n // returns array with keys data and code (from headers)\n\n return $response;\n}", "private function getFileUrl() {\n return Storage::disk('public')->url('/uploads/' . $this->file_name);\n }", "abstract public function downloadFile(FileData $fileData);", "function fileData($file, $header = NULL) {\n\t\treturn src\\Libre::__fileData($file, $header);\n\t}", "function get_data($url) {\n\t\t//add URL to list\n\t\tfile_put_contents('urls-'.date(\"Y-m-d\").'-citeit.txt', $url.\"\\n\", FILE_APPEND);\n\t\t//end adding URL to list\n $ch = curl_init();\n $timeout = 5;\n curl_setopt($ch,CURLOPT_URL, $url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch,CURLOPT_CONNECTIONTIMEOUT, $timeout);\n $data = curl_exec($ch);\n curl_close($ch);\n return $data;\n}", "public function getFileUrl(): string\n {\n $version = $this->getVersion();\n Assert::that($version, 'Invalid version (expected format is X.Y.Z)')\n ->notEmpty()\n ->regex('/^\\d+\\.\\d+\\.[\\da-z\\-]+$/i');\n\n $versionParts = explode('.', $version);\n\n $devVersion = '';\n if (preg_match('/(\\d+)-([[:alnum:]]+)/', $versionParts[2], $matches)) {\n $devVersion = $matches[2];\n }\n\n $devVersionToAppend = '';\n if (!empty($devVersion) && $versionParts[0] === '3') { // Selenium 3 releases included dev version in their path\n $devVersionToAppend = '-' . $devVersion;\n }\n\n $fileUrl = self::$storageUrl . '/' . $versionParts[0] . '.' . $versionParts[1]\n . $devVersionToAppend\n . '/' . $this->getFileName();\n\n return $fileUrl;\n }", "function get_url($stored_file_name,$bean_id)\n\t{\n\t\tglobal $log, $site_URL, $upload_dir;\n\t\t$log->debug(\"Entering get_url(\".$stored_file_name.\",\".$bean_id.\") method ...\");\n\t\t//echo $site_URL.'/'.$upload_dir.$bean_id.$stored_file_name;\n\t\t//echo $_ENV['HOSTNAME'] .':' .$_SERVER[\"SERVER_PORT\"].'/'.$upload_dir.$bean_id.$stored_file_name;\n\t\t$log->debug(\"Exiting get_url method ...\");\n\t\treturn 'http://'.$_ENV['HOSTNAME'] .':' .$_SERVER[\"SERVER_PORT\"].'/'.$upload_dir.$bean_id.$stored_file_name;\n\t\t//return $site_URL.'/'.$upload_dir.$bean_id.$stored_file_name;\n\t}", "function http_put_file($url, $file = null, ?array $options = null, ?array &$info = null) {}", "public function dataFile()\n {\n return new DataFile(data_path().'/'.$this->getHashedId());\n }", "final function getFile();", "public function create_from_file($file);", "function GetFileUrl($url)\r\n{\r\n $parts = parse_url($url);\r\n return trim(preg_replace( '/[^\\w.]/', '_', substr(\"{$parts['host']}/{$parts['path']}\", 0, 50)), '_');\r\n}", "public function __construct($data, $file)\n {\n $this->data = $data;\n $this->file = $file;\n }", "public function getUrl()\n {\n if (!$this->filename) {\n return null;\n }\n\n return $this->base_url . '/' . $this->filename;\n }", "public static function file($file, $index = NO) {\n\t\tif(strpos($file, '://') === NO) {\n\t\t\t// Add the base URL to the filename\n\t\t\t$file = url::base($index).$file;\n\t\t}\n\n\t\treturn $file;\n\t}", "public function getRemoteFile($localFile);", "public function dataPathToAscii(): static\n {\n return new static($this->uri->withPath(DataPath::fromUri($this->uri)->toAscii()->toString()));\n }", "function generate_external_link($id, $ext)\n {\n global $data_sub;\n $data_sub1 = \"\";\n if($data_sub !== \"\")\n $data_sub1 = \"${data_sub}.\";\n \n $append_ext = \"\";\n if($ext == \"gif\" || $ext == \"webm\")\n $append_ext = \".$ext\";\n\n global $server_name;\n return format_public_uri($data_sub1.$server_name, true).\"/\".$id.$append_ext;\n }", "public function getFileBaseUrl()\n {\n return Mage::getBaseUrl('media').'family'.'/'.'file';\n }", "function readWebloc($file) {\n\t$str = trim(file_get_contents($file));\n\treturn parseTVDBURL($str);\t\n}", "public function testAddReplenishmentFileByURL()\n {\n }", "static public function URL( $filename ){\n\n return URL::to( '/assets/files/' . $filename );\n\n }", "public function getFileUrl($params)\n {\n $body = json_decode(json_encode($this->send('/getFile', $params)), false);\n if (isset($body->result, $body->result->file_path) && $body->ok) {\n return 'https://api.telegram.org/file/bot' . $this->botToken . '/' . $body->result->file_path;\n }\n return false;\n }", "function fetchFileDataFromURL($url)\n{\n $url_parsed = parse_url($url);\n $in = '';\n\n $host = $url_parsed['host'];\n $port = isset($url_parsed['port']) ? intval($url_parsed['port']) : 80;\n if ($port == 0) {\n $port = 80;\n }\n $path = $url_parsed['path'];\n if (isset($url_parsed['query']) && $url_parsed['query'] != '') {\n $path .= '?' . $url_parsed['query'];\n }\n\n $fp = fsockopen($host, $port, $errno, $errstr, 3);\n if ($fp) {\n $out = \"GET $path HTTP/1.1\\r\\nHost: $host\\r\\n\";\n $out .= \"Connection: close\\r\\n\\r\\n\";\n fwrite($fp, $out);\n $body = false;\n while (!feof($fp)) {\n $s = fgets($fp, 1024);\n if ($body) {\n $in .= $s;\n }\n if ($s == \"\\r\\n\") {\n $body = true;\n }\n }\n\n fclose($fp);\n }\n\n return $in;\n}", "function upload_from_file($sparql_endpoint, $triples_filename, $graph_key_name = 'context-uri', $graph_uri = '')\n{\n\t$url = $sparql_endpoint;\n\t\n\tif ($graph_uri == '')\n\t{\n\t}\n\telse\n\t{\n\t\t$url .= '?' . $graph_key_name . '=' . $graph_uri;\n\t}\n\t\n\t// text/x-nquads is US-ASCII WTF!?\n\t//$command = \"curl $url -H 'Content-Type: text/x-nquads' --data-binary '@$triples_filename'\";\n\n\t// text/rdf+n3 is compatible with NT and is UTF-8\n\t// see https://wiki.blazegraph.com/wiki/index.php/REST_API#RDF_data\n\t$command = \"curl $url -H 'Content-Type: text/rdf+n3' --data-binary '@$triples_filename'\";\n\n\techo $command . \"\\n\";\n\t\n\t$lastline = system($command, $retval);\n\t\n\t//echo \" Last line: $lastline\\n\";\n\t//echo \"Return value: $retval\\n\";\t\n\t\n\tif (preg_match('/data modified=\"0\"/', $lastline)) \n\t{\n\t\techo \"\\nError: no data added\\n\";\n\t\texit();\n\t}\n}", "abstract public function fopen();", "abstract public function fopen();", "public function getFile() {}", "public function getFile() {}", "function acf_get_url($filename = '')\n{\n}", "public static function downloadFileFromHttp($httpUrl, $prefix = 'package') {\n\t\t$extension = strrchr($httpUrl, '.');\n\t\t//$newFileName = self::getTemporaryFilename($prefix.'_', $extension);\n\t\t$newFileName = self::getTemporaryFilename($prefix.'_');\n\t\t$localFile = new File($newFileName); // the file to write.\n\t\t\n\t\t// get proxy\n\t\t$options = array();\n\t\tif (PROXY_SERVER_HTTP) {\n\t\t\t$options['http']['proxy'] = PROXY_SERVER_HTTP;\n\t\t\t$options['http']['request_fulluri'] = true;\n\t\t}\n\t\t\n\t\t// first look if php's built-in fopen() is available, and if so, use it.\n\t\tif (function_exists('fopen') && ini_get('allow_url_fopen')) {\n\t\t\t$remoteFile = new File($httpUrl, 'rb', $options); // the file to read.\n\t\t\t// get the content of the remote file and write it to a local file.\n\t\t\twhile (!$remoteFile->eof()) {\n\t\t\t\t$buffer = $remoteFile->gets(4096);\n\t\t\t\t$localFile->write($buffer);\n\t\t\t}\n\t\t}\n\t\t// if allow_url_fopen isn't active, we attempt to use our own http download functionality.\n\t\telse {\n\t\t\t$port = 80;\n\t\t\t$parsedUrl = parse_url($httpUrl);\n\t\t\t$host = $parsedUrl['host'];\n\t\t\t$path = $parsedUrl['path'];\n\t\t\t\n\t\t\trequire_once(WCF_DIR . 'lib/system/io/RemoteFile.class.php');\n\t\t\t$remoteFile = new RemoteFile($host, $port, 30, $options); // the file to read.\n\t\t\tif (!isset($remoteFile)) {\n\t\t\t\t$localFile->close();\n\t\t\t\tunlink($newFileName);\n\t\t\t\tthrow new SystemException(\"cannot connect to http host '\".$host.\"'\", 14000);\n\t\t\t}\n\t\t\t// build and send the http request.\n\t\t\t$request = \"GET \".$path.(!empty($parsedUrl['query']) ? '?'.$parsedUrl['query'] : '').\" HTTP/1.0\\r\\n\";\n\t\t\t$request .= \"User-Agent: HTTP.PHP (FileUtil.class.php; WoltLab Community Framework/\".WCF_VERSION.\"; \".WCF::getLanguage()->getLanguageCode().\")\\r\\n\";\n\t\t\t$request .= \"Accept: */*\\r\\n\";\n\t\t\t$request .= \"Accept-Language: \".WCF::getLanguage()->getLanguageCode().\"\\r\\n\";\n\t\t\t$request .= \"Host: \".$host.\"\\r\\n\";\n\t\t\t$request .= \"Connection: Close\\r\\n\\r\\n\";\n\t\t\t$remoteFile->puts($request);\n\t\t\t$waiting = true;\n\t\t\t$readResponse = array();\n\t\t\t// read http response.\n\t\t\twhile (!$remoteFile->eof()) {\n\t\t\t\t$readResponse[] = $remoteFile->gets();\n\t\t\t\t// look if we are done with transferring the requested file.\t\t\t\t\t \n\t\t\t\tif ($waiting) {\n\t\t\t\t\tif (rtrim($readResponse[count($readResponse) - 1]) == '') {\n\t\t\t\t\t\t$waiting = false;\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// look if the webserver sent an error http statuscode\n\t\t\t\t\t// This has still to be checked if really sufficient!\n\t\t\t\t\t$arrayHeader = array('201', '301', '302', '303', '307', '404');\n\t\t\t\t\tforeach ($arrayHeader as $code) {\n\t\t\t\t\t\t$error = strpos($readResponse[0], $code);\n\t\t\t\t\t}\n\t\t\t\t\tif ($error !== false) {\n\t\t\t\t\t\t$localFile->close();\n\t\t\t\t\t\tunlink($newFileName);\t\t\t\t\t\t\n\t\t\t\t\t\tthrow new SystemException(\"file \".$path.\" not found at host '\".$host.\"'\", 14001);\n\t\t\t\t\t}\n\t\t\t\t\t// write to the target system.\n\t\t\t\t\t$localFile->write($readResponse[count($readResponse) - 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$remoteFile->close();\n\t\t$localFile->close();\n\t\treturn $newFileName;\t\t\n\t}", "public function execute(array $data): Hyperlink\n {\n $url = new Url($data['url']);\n $path = new Path($data['path']);\n\n /**\n * @var $hyperlink Hyperlink\n */\n $hyperlink = (new Hyperlink($path))\n ->setUrl($url)\n ->setSize(new Size(mb_strlen((string)$url, '8bit')))\n ->setPermissions(new Permissions($data['permissions'] ?? $this->defaultPermissions))\n ->setLastModified(new DateTime());\n\n $this->repository->createFile($hyperlink);\n\n return $hyperlink;\n }", "public abstract function getURL();", "public function create($data) {\n\t\t// Create an ID\n\t\t$id = $this->idCreate();\n\t\t// Write the data file\n\t\tfile_put_contents( $this->init['path']['data'] . $id . $this->init['data']['ext'] );\n\t}", "protected function process_data_file(import_settings $settings, $field, $data_record, $value) {\r\n $list = $value->getElementsByTagName('a');\r\n $a = $list->item(0);\r\n $href = $a->getAttribute('href');\r\n $text = $this->get_innerhtml($a);\r\n\r\n $result = $this->process_data_default($settings, $field, $data_record, $text);\r\n\r\n $file_record = new object();\r\n $file_record->contextid = $this->get_context()->id;\r\n $file_record->component = 'mod_data';\r\n $file_record->filearea = 'content';\r\n $file_record->itemid = $result->id;\r\n $file_record->filepath = '/';\r\n $file_record->filename = $result->content;\r\n $fs = get_file_storage();\r\n $fs->create_file_from_pathname($file_record, dirname($settings->get_path()) . '/' . $href);\r\n\r\n return $result;\r\n }", "function get_file($recordvalues, $recordkey)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = realpath($this->path);\n $ret = \"\";\n $unirecid = $recordvalues[$this->primarykey];\n //dprint_r($recordvalues);\n\n\n if ( !isset($recordvalues[$recordkey]) )\n $recordvalues = $this->GetRecord($recordvalues);\n\n $value = $recordvalues[$recordkey];\n\n //echo \"$path/$databasename/$tablename/$unirecid/$recordkey/$value\";\n\n\n if ( file_exists(\"$path/$databasename/$tablename/$unirecid/$recordkey/$value\") )\n {\n $php_self = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : \"\";\n $dirname = dirname($php_self);\n if ( $dirname == \"/\" || $dirname == \"\\\\\" )\n $dirname = \"\";\n $protocol = \"http://\";\n if ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == \"on\" )\n $protocol = \"https://\";\n\n $siteurl = \"$protocol\" . $_SERVER['HTTP_HOST'] . $dirname;\n if ( substr($siteurl,strlen($siteurl) - 1,1) != \"/\" )\n {\n $siteurl = $siteurl . \"/\";\n }\n\n return \"$siteurl\" . $this->path . \"/$databasename/$tablename/$unirecid/$recordkey/$value\";\n }\n return false;\n }", "public function getFileAbsolutePath($file);", "function getFileFormat($url) {\n $tempName = tempnam('/tmp', 'php_files');\n $originalName = basename(parse_url($url, PHP_URL_PATH));\n\n $imgRawData = file_get_contents($url);\n file_put_contents($tempName, $imgRawData);\n\n $file = array(\n 'name' => $originalName,\n 'type' => mime_content_type($tempName),\n 'tmp_name' => $tempName,\n 'error' => 0,\n 'size' => strlen($imgRawData),\n ); \n\n return $file;\n}", "public function __construct($file, $data)\n {\n $this->file = $file;\n $this->data = $data;\n }", "function wp_remote_fopen($uri)\n {\n }", "function file($url) {\n\t\t$file = Array ();\n\t\t$socket = $this->fopen ( $url );\n\t\tif ($socket) {\n\t\t\t$file = Array ();\n\t\t\twhile ( ! feof ( $socket ) ) {\n\t\t\t\t$file [] = fgets ( $socket, 10000 );\n\t\t\t}\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn $file;\n\t}", "function dl($f3,$args) {\r\n\r\n $file_obj = new File();\r\n $file_id = $file_obj->find($args['client'],$args['project'],$args['version'],$args['quality']);\r\n\r\n $file = $file_obj->get($file_id);\r\n\r\n $file_obj->download($file);\r\n\r\n\r\n }", "public function getDataURL( $data = array() ) {\n $testObject =\n is_object( $data ) && get_class( $data ) === 'FortyeightDesign\\CWAQuicktestData'\n ? $data\n : new CWAQuicktestData( $data );\n\n return self::APP_BASE_URL . '#' . $testObject->toJSONBase64();\n }", "protected function makeCacheFile($file, $data)\n\t{\n\t\t// Do stuff\n\t}", "public static function _download_file($file_url){\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_POST, 0); \n\tcurl_setopt($ch,CURLOPT_URL,$file_url); \n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t$file_content = curl_exec($ch);\n\tcurl_close($ch);\n //return file content \n return $file_content;\n }", "public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }", "function urldl(){\n\n // folder to save downloaded files to. must end with slash\n $destination_folder = 'downloads/';\n\n $url = $_POST['url'];\n $newfname = $destination_folder . basename($url);\n\n $file = fopen ($url, \"rb\");\n if ($file) {\n $newf = fopen ($newfname, \"wb\");\n\n if ($newf)\n while(!feof($file)) {\n fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );\n }\n }\n\n if ($file) {\n fclose($file);\n }\n\n if ($newf) {\n fclose($newf);\n }\n\n}" ]
[ "0.6943681", "0.61701906", "0.6150632", "0.6111693", "0.6106916", "0.61022675", "0.5892638", "0.5734917", "0.57236993", "0.5587094", "0.5506081", "0.54920715", "0.54522574", "0.54442763", "0.53932375", "0.53854686", "0.5354729", "0.5348345", "0.52889764", "0.52680093", "0.5238204", "0.5235115", "0.522194", "0.52040464", "0.5189927", "0.518467", "0.5173831", "0.5173242", "0.51568896", "0.515554", "0.513943", "0.51247954", "0.51089835", "0.5108921", "0.5108921", "0.50917083", "0.507457", "0.50709754", "0.50688666", "0.505691", "0.5051611", "0.5049392", "0.5048625", "0.5033655", "0.5031391", "0.50205743", "0.5017317", "0.5014771", "0.50115806", "0.50044173", "0.4996724", "0.49909323", "0.4990576", "0.4971583", "0.49688795", "0.49640268", "0.49620962", "0.49586222", "0.49492702", "0.49470386", "0.49372628", "0.49368986", "0.49254036", "0.49253982", "0.4920547", "0.49165928", "0.49152383", "0.490947", "0.49075708", "0.4891936", "0.4891681", "0.48850998", "0.48750582", "0.4874684", "0.48744777", "0.48597056", "0.48567823", "0.4854962", "0.48512492", "0.48483226", "0.48483226", "0.48424202", "0.48419055", "0.48389548", "0.48342335", "0.48266065", "0.48074344", "0.47981527", "0.4792267", "0.47919458", "0.4781518", "0.47762036", "0.47750244", "0.47738296", "0.47717443", "0.47705585", "0.47698158", "0.4767886", "0.47647232", "0.47635856", "0.47631177" ]
0.0
-1
Convert client request data to array or traversable
public function parse($data) { $matches = Strings::match($data, "@^data:([\w/]+?);(\w+?),(.*)$@si"); if (!$matches) { throw new MappingException('Given data URL is invalid.'); } return new Media(base64_decode($matches[3]), $matches[1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function data2Array($data);", "public function toArray($request): array;", "public function getRequestData()\n {\n return json_decode($this->requestData);\n }", "public function _getData(): array\n {\n $result = [\n ];\n\n return parent::normalizeData($result);\n }", "public function getAsArray();", "public function toArray(): array\n {\n $content = $this->getContent();\n\n if (\\is_array($content)) {\n return $this instanceof Filterable\n ? (array) $this->filterResponse($content)\n : $content;\n }\n\n return [];\n }", "private function arrayify(): array\n {\n return $this->toArray();\n }", "public function getArray() : array {\n\t\treturn $this->input;\n\t}", "protected function asArray()\n\t{\n\t\treturn \\json_decode($this->response, true);\n\t}", "public function toArray($request)\n {\n return parent::toArray($request);\n }", "public function toArray($request)\n {\n return parent::toArray($request);\n }", "public function parseGetData(): array {\n $data = (array)$this->getRequest()->getQuery();\n $data = $this->sanitizeData($data);\n\n return $data;\n }", "public function getData(): iterable;", "public function toArray($request): array\n {\n return parent::toArray($request);\n }", "public function toArray($request): array\n {\n return parent::toArray($request);\n }", "public function toArray($request): array\n {\n return parent::toArray($request);\n }", "public function getAsArray(): array\n {\n return \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($this->values), true);\n }", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public function toArray(): array\n {\n $body = (string) $this->response->getBody();\n\n return json_decode($body, true) ?? [];\n }", "protected function castRequestData($request)\n {\n return [\n 'lat' => (float) $request['lat'],\n 'long' => (float) $request['lng'],\n 'time' => $request['time']\n ];\n }", "public function asArray()\r\n {\r\n return $this->data;\r\n }", "public function toArray($request)\n {\n return parent::toArray($request);\n // return [\n\n // // 'id' => $this->id,\n // // 'email' =>$this->client->email,\n // // 'name' => $this->client->name,\n // // 'address' => $this->client->address,\n // // 'data' =>$this->collection,\n // // 'services' => $this->client->servicerequest\n // ];\n }", "public function toArray() // untested\n {\n return $this->data;\n }", "static function getBodyData(): array {\n $data = json_decode(file_get_contents('php://input'), true);\n return !is_null($data)? $data:array();\n }", "public /*array*/ function toArray()\n\t{\n\t\treturn $this->_data;\n\t}", "public function convertItemArray() {}", "public function getRequestData();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function getArrayResp()\n {\n return json_decode(Yii::$app->request->post(), false);\n }", "public function get_data(): array;", "public function get_data(): array;", "public function decode($request): array;", "function transform_request_data($arr) {\n foreach ($arr as $key => $val) {\n if (is_array($val)) {\n $arr[$key] = implode(',', $val);\n }\n }\n return $arr;\n}", "private function getClientRequestData(object $request): array\n {\n $password = $request->password;\n if (blank($password)) {\n $data = $request->all();\n } else {\n $data = array_merge($request->all(), ['password' => bcrypt($password)]);\n }\n return $data;\n }", "public function toArray($request)\n {\n // return parent::toArray($request);\n return [\n // 'id' => $this->id,\n 'client_method' => $this->client_method,\n 'client_url' => $this->client_url,\n 'client_browser' => $this->client_browser,\n 'client_browser_version' => $this->client_browser_version,\n 'client_os' => $this->client_os,\n 'client_ip' => $this->client_ip,\n 'client_header' => $this->client_header,\n ];\n }", "public function process(RequestInterface $request): array;", "public function toArray()\n {\n $params = array();\n\n //prepare an array of scalar properties\n $this->prepareParams($this->_request, $params);\n\n return $params;\n }", "public function data() : array\n {\n return $this->data->toArray();\n }", "public function toArray() {\n\t\treturn $this->response;\n\t}", "function toArray(){\r\n\t\treturn $this->data;\r\n\t}", "private function __parse_intput() {\n $requests = JsonParser::decode($this->__raw_input);\n if (is_array($requests) === false or\n empty($requests[0])) {\n $requests = array($requests);\n }\n return ($requests);\n }", "public function exchangeDataArray($data){\n \tif($data){\n \t\t$data = $data->toArray();\n \t}\n \treturn $data;\n }", "public function asArray()\n {\n return $this->data;\n }", "public function testToArray(): void\n {\n $file = new FileObject();\n $url = new UrlObject();\n $formParameter = new FormParameterObject();\n\n $body = new RequestBodyObject([\n 'disabled' => false,\n 'file' => $file,\n 'form_parameter' => $formParameter,\n 'mode' => 'file',\n 'raw' => 'test-raw',\n 'url' => $url\n ]);\n\n self::assertEquals([\n 'disabled' => false,\n 'file' => $file,\n 'formdata' => $formParameter,\n 'mode' => 'file',\n 'raw' => 'test-raw',\n 'urlencoded' => $url\n ], $body->toArray());\n }", "public function getArray() {\n\t\treturn $this->data; \n\t}", "public function getArray() {\n\t\treturn $this->data; \n\t}", "protected function request_proxy_data($data): array\n {\n if (isset($this->params[\"rescued\"])) {\n return $data;\n }\n\n $data['$proxy'] = [\n \"client\" => isset($this->params[\"route\"][\"client\"])\n ? $this->params[\"route\"][\"client\"]\n : $this->params[\"client_id\"],\n \"host\" => $this->params[\"host\"],\n \"port\" => $this->params[\"port\"],\n ];\n if (is_array($this->params[\"proxy\"])) {\n $this->server->options[\"clear\"] = isset($this->params[\"proxy\"][\"clear\"])\n ? $this->params[\"proxy\"][\"clear\"]\n : false;\n $this->server->options[\"host\"] = isset($this->params[\"proxy\"][\"host\"])\n ? $this->params[\"proxy\"][\"host\"]\n : $this->params[\"host\"];\n $this->server->options[\"port\"] = isset($this->params[\"proxy\"][\"port\"])\n ? $this->params[\"proxy\"][\"port\"]\n : $this->params[\"port\"];\n }\n\n return $data;\n }", "private static function getRawInputs(): array\n {\n $inputParams = [];\n\n if (in_array(self::$__method, ['PUT', 'PATCH', 'DELETE'])) {\n\n $input = file_get_contents('php://input');\n\n if (self::$server->contentType()) {\n switch (self::$server->contentType()) {\n case 'application/x-www-form-urlencoded':\n parse_str($input, $inputParams);\n break;\n case 'application/json':\n $inputParams = json_decode($input);\n break;\n default :\n $inputParams = parse_raw_http_request($input);\n break;\n }\n }\n }\n\n return (array) $inputParams;\n }", "private function toArray($data)\n {\n \t\t$resultArray = json_decode(json_encode($data), true);\n\n \t\treturn $resultArray;\n \t}", "public function asArray(){\n return $this->data;\n }", "public function toArray(): array\n {\n return $this->data;\n }", "public function toArray(): array\n {\n return $this->data;\n }", "protected static function data_to_array($data)\n {\n return json_decode(json_encode($data), true);\n }", "public function normalizeData() : array;", "public function toArray() {\n\t\treturn $this->data;\n\t}", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function getIterator(): Traversable\n {\n return new ArrayIterator($this->_responses);\n }", "public function testToArray()\n {\n $request = new AuthenticationRequest(1, 'fake_key');\n\n $expected = array(\n 'AccountID' => 1,\n 'AuthenticationKey' => 'fake_key',\n );\n\n $this->assertEquals($expected, $request->toArray());\n }", "public function getQueryAsArray();", "protected function dataToArray()\n {\n if (is_array($this->data)) {\n return;\n }\n if ($this->data instanceof Iterator) {\n $this->data = iterator_to_array($this->data);\n\n return;\n }\n if ($this->data instanceof \\Traversable) {\n $items = [];\n foreach ($this->data as $key => $item) {\n $items[$key] = $item;\n }\n $this->data = $items;\n\n return;\n }\n $type = gettype($this->data);\n $typeOrClass = ($type === 'object') ? get_class($this->data) : $type;\n throw new Exception('' . $typeOrClass . ' is not an Traversable');\n }", "protected function processInput(array $request) : array\n {\n return $request;\n }", "public function asTraversable();", "function object_to_array($data) {\n\tif(is_array($data) || (is_object($data) && $data instanceof stdClass))\n\t\treturn array_map('object_to_array', (array) $data);\n\telse\n\t\treturn $data;\n}", "private function _data( $data=array() )\n {\n $output = array();\n\n if( is_array( $data ) )\n {\n $query = http_build_query( $data, '', '&' );\n parse_str( $query, $output );\n }\n return $output;\n }", "public function getData()\n {\n $data = json_decode(file_get_contents(static::INPUT_STREAM), true);\n\n if ($data) {\n return array_merge($this->data->getAll(), $data);\n }\n\n if ($this->isMethod(self::GET)) {\n return array_merge($this->data->getAll(), $_GET);\n }\n\n if ($this->isMethod(self::POST)) {\n return array_merge($this->data->getAll(), $_POST);\n }\n\n return [];\n }", "function force_array($data)\n{\n\tif( is_null($data) )\n\t\treturn [];\n\treturn is_array($data)?$data:array($data);\n}", "public function _getData(): array\n {\n $result = [\n 'traveler' => $this->getTraveler(),\n 'watcher' => $this->getWatcher(),\n 'distance' => $this->getDistance(),\n ];\n\n return parent::normalizeData($result);\n }", "public function toArray()\r\n {\r\n return $this->data;\r\n }", "public function toArray()\n {\n return $this->_data;\n }", "public function toArray()\n {\n return $this->_data;\n }", "protected abstract function getData(): array;", "abstract protected function toArray();", "public function toArray() {\r\n \treturn array(\"response\"=>$this->_response);\r\n }", "public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}", "public function asArray(): array\n {\n return json_decode($this->result, true);\n }", "public function getProcessedData(): object|array;", "public function toArray(): array\n {\n return $this->rawData;\n }", "private function soap_request($request)\n\t{\n\t\tksort($request);\n\t\tforeach($request as $k => $v) // For each root key of the array structure,\n\t\t{\n\t\t\tif(is_array($v)) // if the value is an array,\n\t\t\t{\n\t\t\t\t$r[$k] = $this->soap_request($v); // We recurse into that array;\n\t\t\t} \n\t\t\telseif(!is_bool($v)) // however, if it is a bool value, we leave it out.\n\t\t\t{\n\t\t\t\t$r[$k] = $v; // Otherwise, we keep it around.\n\t\t\t} \t\n\t\t}\n\t\treturn $r; // Then return it.\n\t}", "public function toArray($request)\n {\n $data = $this->collection->transform(function ($uses) {\n $tmp = [\n 'id' => $uses->id,\n 'user_id' => $uses->user_id,\n 'use_date' => $uses->use_date,\n 'application_id' => $uses->application_id,\n 'created_at' => $uses->created_at,\n 'updated_at' => $uses->updated_at,\n ];\n\n return $tmp;\n });\n\n if ($data->count() == 1) {\n // Fixing of sometime collections have one element\n return [$data->first()];\n } else {\n return $data;\n }\n\n }", "public function getData()\n\t{\n if ( is_string($this->_data) ) {\n return $this->_data; \n }\n\t\telse \n return $this->_internal_request->to_postdata();\n\t}", "public function toArray()\n {\n $_data = array();\n \n foreach ($this->_data as $key=>$val) {\n $_data[$key] = method_exists($val, 'toArray') ? $val->toArray() : $val;\n }\n \n return $_data;\n }", "public function getRequestData() : array\n {\n return $this->buildPushData();\n }", "static function convert(){\n\t\tif(is_object($x) && method_exists($x, '__toArray')){\n\t\t\treturn $x->__toArray();\n\t\t}\n\t\treturn (array)$x;\n\t}", "public function getJsonArray()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}", "private function getDataFromApi(): array\n {\n // Input parameters\n $params = [\n 'requests' => json_encode($this->prepareRequests()),\n 'responseType' => 'CSV'\n ];\n\n $result = $this->eapi->sendRequest('', $params);\n $decoded = json_decode($result, true);\n if(is_array($decoded)){\n return $decoded;\n } else {\n throw new \\Exception(\"Non-JSON object or empty response returned from API.\");\n }\n }", "public function convert($data) {\r\n\t\tif(is_array($data) || is_object($data)) {\r\n\t\t\t$result = array();\r\n\t\t\tforeach ($data as $key => $value) {\r\n\t\t\t\t$result[$key] = $this->__convert($value);\r\n\t\t\t}\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "public function getResponse(): array;" ]
[ "0.64819294", "0.63830215", "0.6057645", "0.59771353", "0.58957857", "0.5883464", "0.58632666", "0.5859249", "0.58590615", "0.5825441", "0.5825441", "0.58246523", "0.5822655", "0.58131915", "0.58131915", "0.58131915", "0.57781386", "0.5736341", "0.5736341", "0.5736341", "0.5736341", "0.5682734", "0.5670492", "0.56654686", "0.566085", "0.56579477", "0.5645385", "0.56373525", "0.5634452", "0.56338185", "0.56272894", "0.56272894", "0.56272894", "0.56272894", "0.56272894", "0.56272894", "0.5625253", "0.5619616", "0.5619616", "0.5616267", "0.5615649", "0.5610125", "0.5608813", "0.56064165", "0.55953556", "0.5586484", "0.5585792", "0.5578844", "0.55746895", "0.5573236", "0.5572852", "0.55614", "0.55577934", "0.55577934", "0.5555125", "0.5551189", "0.55507815", "0.5534045", "0.55330926", "0.55330926", "0.5526072", "0.55256057", "0.55148405", "0.5513232", "0.5513232", "0.5513232", "0.5513232", "0.5513232", "0.5513232", "0.5513232", "0.5512082", "0.55074376", "0.5505777", "0.5502504", "0.5499665", "0.5495556", "0.54903185", "0.54838055", "0.548114", "0.5479537", "0.54731137", "0.546918", "0.5466518", "0.5466518", "0.5448654", "0.5445757", "0.5443665", "0.54431266", "0.5442403", "0.54401577", "0.5438391", "0.5436489", "0.5429279", "0.54192275", "0.5417842", "0.54173315", "0.5416968", "0.5412981", "0.5407335", "0.5405667", "0.5404774" ]
0.0
-1
/ Retrieves the five most recent note postings for the indicated grou
function getStudyGroupNotes( $groupId, $userId, $sessionId ) { // Request the five most recent note postings for this group. $groupNotesXML = getStudyGroupNoteDAL( $groupId, 0, 0 ); $tags = array( 'UserId', 'SessionId', 'StudyGroupId' ); $values = array( $userId, $sessionId, $groupId ); return insertXMLTags( $tags, $values, $groupNotesXML ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getLastDiscussions(){\n $sql = \"select * from discussions ORDER BY `id` DESC LIMIT 5\";\n return App::$db->query($sql);\n }", "function scrivilistapost($mese, $anno, $mese1, $anno1) { //top 10 per numero post\n\tconnetti($db);\n\t$query = \"SELECT username, count(*) post FROM vb_post WHERE dateline >= unix_timestamp(DATE('\" . $anno . \"-\" . $mese . \"-01')) and dateline < unix_timestamp(DATE('\" . $anno1 . \"-\" . ($mese1) . \"-01')) and username<>'' and userid<>770 group by username order by post desc limit 10\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\t$arr=array();\n\tif ($n_righe > 0) {\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\t$arr[]=array('username' => $riga['username'], 'post' => $riga['post']);\n\t\t}\n\t\techo json_encode($arr);\n\t}\n}", "public function iN_PopularUsersFromLastWeekInExplorePageLanding() {\n\t\t$query = mysqli_query($this->db, \"SELECT DISTINCT\n\t\tP.post_owner_id,P.post_owner_id, U.iuid,U.i_username,U.i_user_fullname,U.user_verified_status, U.user_gender , count(P.post_owner_id) as cnt\n\t\tFROM i_posts P FORCE INDEX(ixForcePostOwner)\n\t\tINNER JOIN i_users U FORCE INDEX(ixForceUser)\n\t\tON P.post_owner_id = U.iuid AND U.uStatus IN('1','3')\n\t\tWHERE WEEK(FROM_UNIXTIME(P.post_created_time)) = WEEK(NOW()) - 1 GROUP BY P.post_owner_id ORDER BY cnt DESC LIMIT 3\n\t\t\") or die(mysqli_error($this->db));\n\n\t\twhile ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function get_popular_list()\n\t{\n\t\t$result = $this->db->from(\"blog\")\n\t\t\t\t\t\t->join(\"category\",\"category.category_id\",\"blog.category_id\")\n\t\t\t\t\t\t->where(array(\"blog.publish_status\"=> 1, \"blog.blog_status\" => 1))\n\t\t\t\t\t\t->orderby(\"blog.blog_views\", \"DESC\")\n\t\t\t\t\t\t->limit(5)\n\t\t\t\t\t\t->get();\t\n\t\treturn $result;\n\t}", "public function iN_PopularUsersFromLastWeekInExplorePage() {\n\t\t$query = mysqli_query($this->db, \"SELECT DISTINCT\n\t\tP.post_owner_id,P.post_owner_id, U.iuid,U.i_username,U.i_user_fullname,U.user_verified_status, U.user_gender , count(P.post_owner_id) as cnt\n\t\tFROM i_posts P FORCE INDEX(ixForcePostOwner)\n\t\tINNER JOIN i_users U FORCE INDEX(ixForceUser)\n\t\tON P.post_owner_id = U.iuid AND U.uStatus IN('1','3')\n\t\tWHERE U.user_verified_status = '1' AND WEEK(FROM_UNIXTIME(P.post_created_time)) = WEEK(NOW()) - 1 GROUP BY P.post_owner_id ORDER BY cnt DESC LIMIT 30\n\t\t\") or die(mysqli_error($this->db));\n\n\t\twhile ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function iN_PopularUsersFromLastWeek() {\n\t\t$query = mysqli_query($this->db, \"SELECT DISTINCT\n\t\t P.post_owner_id,P.post_owner_id, U.iuid,U.i_username,U.i_user_fullname,U.user_verified_status, U.user_gender , count(P.post_owner_id) as cnt\n\t\t FROM i_posts P FORCE INDEX(ixForcePostOwner)\n\t\t INNER JOIN i_users U FORCE INDEX(ixForceUser)\n\t\t ON P.post_owner_id = U.iuid AND U.uStatus IN('1','3')\n\t\t WHERE WEEK(FROM_UNIXTIME(P.post_created_time)) = WEEK(NOW()) - 1 GROUP BY P.post_owner_id ORDER BY cnt DESC LIMIT 5\n\t\t \") or die(mysqli_error($this->db));\n\t\t/*U.user_verified_status = '1' AND*/\n\t\twhile ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "function LatestPosts() {\n\t\treturn Post::get()\n\t\t\t->filter('AuthorID', (int)$this->urlParams['ID'])\n \t\t\t->limit(0,5)\n\t\t\t->sort(\"Created\", \"DESC\")\n\t\t\t->filterByCallback(function($post){\n\t\t\t\treturn $post->canView();\n\t\t\t});\n\t}", "function getRecentEntries($number = 5)\r\n{\r\n global $context, $smcFunc;\r\n \r\n if (!is_numeric($number) || empty($number))\r\n $number = 5;\r\n \r\n \r\n}", "function scrivitop5listapost() {\n\tconnetti($db);\n\t$query = \"SELECT username, count(*) post FROM vb_post WHERE username<>'' and userid<>770 group by username order by post desc limit 5\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\tif ($n_righe > 0) {\n\t\techo '<table id=\"elenco\">';\n\t\techo '<tr><th>Utente</th><th>Post scritti</th>';\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\techo '<tr><td>' . $riga['username'] . '</td><td>' . $riga['post'] . '</td></tr>';\n\t\t}\n\t\techo '</table>';\n\t}\n}", "public function getLatestComments($number = 7) {\n $query = $this->createQuery();\n $query->addOrderBy('{dateAdded} DESC');\n $query->setLimit($number);\n\n return $query->query();\n }", "public function getRecentReplies($id, $number=10 ){\n return Reply::where('user_id',$id)->orderBy('created_at','desc')\n ->whereHas('topic.category',function($q){\n $q->where('is_blocked','no');\n })->take($number)->get();\n }", "function openskydora_get_most_viewed_items($count, $weeks_ago=7, $exclude=NULL) {\n\n $records = openskydora_get_most_viewed($count+20, $weeks_ago, $exclude);\n $item_records = array(); // No collections\n \n // filter out collection citation model\n foreach ($records as $pid=>$data) {\n $data->obj = islandora_object_load($pid);\n if (in_array('islandora:collectionCModel',$data->obj->models)) {\n // dsm ('collection! '. $pid);\n } else {\n $item_records[$pid] = $data;\n }\n }\n return array_slice($item_records, 0, $count, TRUE);\n}", "public function getRecentPosts($number=3) {\n $sql = \"SELECT * FROM posts JOIN users ON posts.u_id = users.u_id ORDER BY p_created LIMIT \".$number;\n\n global $queriesModel;\n $statement = $queriesModel->pdoStatement($sql);\n\n $recentPosts = $statement->fetchAll();\n return $recentPosts;\n }", "public static function getPostPopularList()\n {\n $db = Db::getConnection();\n $PostPopularList = [];\n\n $result = $db->query('SELECT id_publ, name, text, author, date, number_of_comments \n FROM publication ORDER BY number_of_comments DESC LIMIT 5');\n\n $i = 0;\n while($row = $result->fetch()) {\n $PostPopularList[$i]['id_publ'] = $row['id_publ'];\n $PostPopularList[$i]['name'] = $row['name'];\n $PostPopularList[$i]['date'] = $row['date'];\n $PostPopularList[$i]['text'] = $row['text'];\n $PostPopularList[$i]['author'] = $row['author'];\n $PostPopularList[$i]['number_of_comments'] = $row['number_of_comments'];\n $i++;\n }\n\n return $PostPopularList;\n }", "function ld_get_latest_posts($limit=30, $poster=0, $page = 1 )\r\n{\r\n\tglobal $bbdb, $bb_last_countable_query;\r\n\r\n\t$page = (int) $page;\r\n\r\n\t$where = 'WHERE post_status = 0';\r\n\r\n\tif ($poster > 0)\r\n\t\t$where .= \" AND poster_id = $poster\";\r\n\r\n\tif ( 1 < $page )\r\n\t\t$limit = ($limit * ($page - 1)) . \", $limit\";\r\n\r\n\t$bb_last_countable_query = \"SELECT post_id,forum_id,topic_id,poster_id,post_title,post_time FROM $bbdb->posts $where ORDER BY post_time DESC LIMIT $limit\";\r\n\r\n\tif ( $ld_latest_posts = $bbdb->get_results($bb_last_countable_query) )\r\n\t\treturn $ld_latest_posts;\r\n\telse\r\n\t\treturn false;\r\n}", "function get_recent_collections($num = 10)\n{\n return get_records('Collection', array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function getLastPosts() {\n $repository = $this->entityManager->getRepository(\"DUT\\\\Models\\\\Post\");\n return $repository->findBy([], [\"idPost\" => \"DESC\"], 10);\n }", "function getFriendLastedPosting() {\n $sql = \"SELECT b.*,\n c.name \n FROM member_posting a\n INNER JOIN posting b \n ON b.id = a.posting_id\n INNER JOIN member c \n ON c.id = a.member_id\n WHERE a.member_id IN (\n SELECT friend_id FROM member_friend WHERE member_id = ?)\n ORDER BY b.last_update_time DESC LIMIT 10\";\n return getAll($sql, [getLogin()['mid']]);\n}", "private function getNewest($count = 5) {\n return Posts::where('status', 'public')->orderBy('id', 'desc')->take($count)->get();\n }", "function RecentPosts()\n{\n\tglobal $txt, $scripturl, $db_prefix, $user_info, $context, $ID_MEMBER, $modSettings, $sourcedir;\n\n\t// They're deleting something... just skip back to it.\n\tif (isset($_GET['delete']))\n\t{\n\t\t// Luckily, removeMessage() checks permissions for us.\n\t\trequire_once($sourcedir . '/RemoveTopic.php');\n\t\tremoveMessage((int) $_GET['delete']);\n\n\t\tredirectexit('action=recent');\n\t}\n\n\tloadTemplate('Recent');\n\t$context['page_title'] = $txt[214];\n\n\t// Find the 10 most recent messages they can *view*.\n\t$request = db_query(\"\n\t\tSELECT m.ID_MSG\n\t\tFROM {$db_prefix}messages AS m, {$db_prefix}boards AS b\n\t\tWHERE b.ID_BOARD = m.ID_BOARD\" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? \"\n\t\t\tAND b.ID_BOARD != $modSettings[recycle_board]\" : '') . \"\n\t\t\tAND $user_info[query_see_board]\n\t\tORDER BY m.ID_MSG DESC\n\t\tLIMIT 10\", __FILE__, __LINE__);\n\t$messages = array();\n\twhile ($row = mysql_fetch_assoc($request))\n\t\t$messages[] = $row['ID_MSG'];\n\tmysql_free_result($request);\n\n\tif (empty($messages))\n\t{\n\t\t$context['posts'] = array();\n\t\treturn;\n\t}\n\n\t// Get all the most recent posts.\n\t$request = db_query(\"\n\t\tSELECT\n\t\t\tm.ID_MSG, m.subject, m.smileysEnabled, m.posterTime, m.body, m.ID_TOPIC, t.ID_BOARD, b.ID_CAT,\n\t\t\tb.name AS bname, c.name AS cname, t.numReplies, m.ID_MEMBER, m2.ID_MEMBER AS ID_FIRST_MEMBER,\n\t\t\tIFNULL(mem2.realName, m2.posterName) AS firstPosterName, t.ID_FIRST_MSG,\n\t\t\tIFNULL(mem.realName, m.posterName) AS posterName, t.ID_LAST_MSG\n\t\tFROM {$db_prefix}messages AS m, {$db_prefix}messages AS m2, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}categories AS c\n\t\t\tLEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)\n\t\t\tLEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = m2.ID_MEMBER)\n\t\tWHERE m2.ID_MSG = t.ID_FIRST_MSG\n\t\t\tAND t.ID_TOPIC = m.ID_TOPIC\n\t\t\tAND b.ID_BOARD = t.ID_BOARD\n\t\t\tAND c.ID_CAT = b.ID_CAT\n\t\t\tAND m.ID_MSG IN (\" . implode(', ', $messages) . \")\n\t\tORDER BY m.ID_MSG DESC\n\t\tLIMIT 0, 10\", __FILE__, __LINE__);\n\t$counter = 1;\n\t$context['posts'] = array();\n\t$board_ids = array('own' => array(), 'any' => array());\n\twhile ($row = mysql_fetch_assoc($request))\n\t{\n\t\t// Censor everything.\n\t\tcensorText($row['body']);\n\t\tcensorText($row['subject']);\n\n\t\t// BBC-atize the message.\n\t\t$row['body'] = doUBBC($row['body'], $row['smileysEnabled']);\n\n\t\t// And build the array.\n\t\t$context['posts'][$row['ID_MSG']] = array(\n\t\t\t'id' => $row['ID_MSG'],\n\t\t\t'counter' => $counter++,\n\t\t\t'category' => array(\n\t\t\t\t'id' => $row['ID_CAT'],\n\t\t\t\t'name' => $row['cname'],\n\t\t\t\t'href' => $scripturl . '#' . $row['ID_CAT'],\n\t\t\t\t'link' => '<a href=\"' . $scripturl . '#' . $row['ID_CAT'] . '\">' . $row['cname'] . '</a>'\n\t\t\t),\n\t\t\t'board' => array(\n\t\t\t\t'id' => $row['ID_BOARD'],\n\t\t\t\t'name' => $row['bname'],\n\t\t\t\t'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',\n\t\t\t\t'link' => '<a href=\"' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0\">' . $row['bname'] . '</a>'\n\t\t\t),\n\t\t\t'topic' => $row['ID_TOPIC'],\n\t\t\t'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'],\n\t\t\t'link' => '<a href=\"' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '\">' . $row['subject'] . '</a>',\n\t\t\t'start' => $row['numReplies'],\n\t\t\t'subject' => $row['subject'],\n\t\t\t'time' => timeformat($row['posterTime']),\n\t\t\t'timestamp' => $row['posterTime'],\n\t\t\t'first_poster' => array(\n\t\t\t\t'id' => $row['ID_FIRST_MEMBER'],\n\t\t\t\t'name' => $row['firstPosterName'],\n\t\t\t\t'href' => empty($row['ID_FIRST_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'],\n\t\t\t\t'link' => empty($row['ID_FIRST_MEMBER']) ? $row['firstPosterName'] : '<a href=\"' . $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'] . '\">' . $row['firstPosterName'] . '</a>'\n\t\t\t),\n\t\t\t'poster' => array(\n\t\t\t\t'id' => $row['ID_MEMBER'],\n\t\t\t\t'name' => $row['posterName'],\n\t\t\t\t'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],\n\t\t\t\t'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href=\"' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '\">' . $row['posterName'] . '</a>'\n\t\t\t),\n\t\t\t'message' => $row['body'],\n\t\t\t'can_reply' => false,\n\t\t\t'can_mark_notify' => false,\n\t\t\t'can_delete' => false,\n\t\t\t'delete_possible' => $row['ID_FIRST_MSG'] != $row['ID_MSG'] || $row['ID_LAST_MSG'] == $row['ID_MSG']\n\t\t);\n\n\t\tif ($ID_MEMBER == $row['ID_FIRST_MEMBER'])\n\t\t\t$board_ids['own'][$row['ID_BOARD']][] = $row['ID_MSG'];\n\t\t$board_ids['any'][$row['ID_BOARD']][] = $row['ID_MSG'];\n\t}\n\tmysql_free_result($request);\n\n\t// There might be - and are - different permissions between any and own.\n\t$permissions = array(\n\t\t'own' => array(\n\t\t\t'post_reply_own' => 'can_reply',\n\t\t\t'remove_own' => 'can_delete',\n\t\t),\n\t\t'any' => array(\n\t\t\t'post_reply_any' => 'can_reply',\n\t\t\t'mark_any_notify' => 'can_mark_notify',\n\t\t\t'remove_any' => 'can_delete',\n\t\t)\n\t);\n\n\t// Now go through all the permissions, looking for boards they can do it on.\n\tforeach ($permissions as $type => $list)\n\t\tforeach ($list as $permission => $allowed)\n\t\t{\n\t\t\t// They can do it on these boards...\n\t\t\t$boards = boardsAllowedTo($permission);\n\n\t\t\t// If 0 is the only thing in the array, they can do it everywhere!\n\t\t\tif (!empty($boards) && $boards[0] == 0)\n\t\t\t\t$boards = array_keys($board_ids[$type]);\n\n\t\t\t// Go through the boards, and look for posts they can do this on.\n\t\t\tforeach ($boards as $board_id)\n\t\t\t{\n\t\t\t\t// Hmm, they have permission, but there are no topics from that board on this page.\n\t\t\t\tif (!isset($board_ids[$type][$board_id]))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Okay, looks like they can do it for these posts.\n\t\t\t\tforeach ($board_ids[$type][$board_id] as $counter)\n\t\t\t\t\t$context['posts'][$counter][$allowed] = true;\n\t\t\t}\n\t\t}\n\n\t// Some posts - the first posts - can't just be deleted.\n\tforeach ($context['posts'] as $counter => $dummy)\n\t\t$context['posts'][$counter]['can_delete'] &= $context['posts'][$counter]['delete_possible'];\n}", "function LoggedPosts($rcnt, $pgcnt,$startingRoar, $user_id)\n{\n\t//returns array of a Logged users default posts of the form ((r1user_name, r1post_tx, r1post_dt),...,(rnuser_name, rnpost_dt,rnpost_dt))\n\trequire_once(dirname(__FILE__).'/queryToNumArray.php');\n\t$loggedPosts = 'SELECT DISTINCT u.user_name,p.post_tx,h.post_dt FROM has h join users u on u.user_id = h.user_id join posts p on p.guid=h.posts_guid join following f on (f.following_id = h.user_id) WHERE f.user_id =\\'' . $user_id . '\\' ORDER BY h.post_dt desc LIMIT ' .($startingRoar).','.$rcnt;\n\t$qry = query($loggedPosts);\t\n\t$cnt = CountRowsNoLimit($loggedPosts);\n\t$return = array($qry, $cnt);\n\treturn $return;\n\t\n}", "public static function getPostLastList()\n {\n $db = Db::getConnection();\n $PostLastList = [];\n\n $result = $db->query('SELECT id_publ, name, text, author, date, number_of_comments \n FROM publication ORDER BY date DESC LIMIT 5');\n\n $i = 0;\n while($row = $result->fetch()) {\n $PostLastList[$i]['id_publ'] = $row['id_publ'];\n $PostLastList[$i]['name'] = $row['name'];\n $PostLastList[$i]['date'] = $row['date'];\n $PostLastList[$i]['text'] = $row['text'];\n $PostLastList[$i]['author'] = $row['author'];\n $PostLastList[$i]['number_of_comments'] = $row['number_of_comments'];\n $i++;\n }\n\n return $PostLastList;\n }", "function returnPopulars()\n{\n\n\t$strSQL = \"SELECT * FROM newsletter WHERE language_code = 'th' AND category_id = '4' ORDER BY nid desc LIMIT 3 \";\n\t$objQuery = mysql_query($strSQL) or die (mysql_error());\n\t$resultArray = array();\n\twhile($obResult = mysql_fetch_array($objQuery))\n\t{\n\t\tarray_push($resultArray,$obResult);\n\t}\n\t// mysql_close($objConnect);\n\treturn $resultArray;\n}", "function get_recent_items($num = 10)\n{\n return get_db()->getTable('Item')->findBy(array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public static function recent($max=10) \n {\n $sql = <<<END_SQL\n select users.user_id, users.first_name, users.last_name, posts.created, posts.text\n from posts\n inner join users on posts.user_id = users.user_id\n order by posts.created desc\n limit $max\nEND_SQL;\n $posts = DB::instance(DB_NAME)->select_rows($sql, \"object\");\n return $posts;\n }", "public function getLatestUnreadNotifications()\n {\n return $this->_notificationList->setPageSize(self::NOTIFICATIONS_NUMBER);\n }", "public static function Get_four_Notify()\n{\n $notfit= NotificationBackent::where('seen',0)->orderBy('created_at','desc')->take(7)->get();\n return $notfit;\n}", "public function forum_recent_posts(){\n self::$db = Database::get();\n\t\t$data = self::$db->select(\"\n SELECT sub.*\n FROM\n (SELECT\n fp.forum_post_id as forum_post_id, fp.forum_id as forum_id,\n fp.forum_user_id as forum_user_id, fp.forum_title as forum_title,\n fp.forum_content as forum_content, fp.forum_edit_date as forum_edit_date,\n fp.forum_timestamp as forum_timestamp, fpr.id as id,\n fpr.fpr_post_id as fpr_post_id, fpr.fpr_id as fpr_id,\n fpr.fpr_user_id as fpr_user_id, fpr.fpr_title as fpr_title,\n fpr.fpr_content as fpr_content, fpr.fpr_edit_date as fpr_edit_date,\n fpr.fpr_timestamp as fpr_timestamp,\n GREATEST(fp.forum_timestamp, COALESCE(fpr.fpr_timestamp, '00-00-00 00:00:00')) AS tstamp\n FROM \".PREFIX.\"forum_posts fp\n LEFT JOIN \".PREFIX.\"forum_posts_replys fpr\n ON fp.forum_post_id = fpr.fpr_post_id\n WHERE fp.allow = 'TRUE'\n ORDER BY fpr.fpr_timestamp DESC\n ) sub\n GROUP BY forum_post_id\n ORDER BY tstamp DESC\n LIMIT 10\n \");\n return $data;\n }", "public function getBillets(){\n $db = $this -> init();\n if(isset($_GET['page'])){\n $display = $db->query('Select * from posts order by id asc limit '.(($_GET['page']-1)*5).',5') or die(print_r($db->errorInfo()));\n }\n else{\n $display = $db->query('Select * from posts order by id asc limit 0,5');\n }\n return $display;\n }", "public function latest() {\n $posts = $this->paginate('Post', array('published' => true));\n if ($this->request->is('requested')) {\n return $posts;\n }\n }", "function manynewposts_thread() {\n global $thread, $templates, $db, $mybb, $settings;\n\n $query = $db->query(\"\n SELECT\n dateline, pid\n FROM \" . TABLE_PREFIX . \"posts\n WHERE\n tid='\".$db->escape_string($thread['tid']).\"'\n \");\n\n $lastpost = array();\n $lastpost_pid = array();\n\n while($result=$db->fetch_array($query))\n {\n $lastpost[] = $result['dateline'];\n $lastpost_pid[$result['dateline']] = $result['pid'];\n }\n\n $query = $db->query(\"\n SELECT\n tr.dateline AS `tr_dateline`,\n fr.dateline AS `fr_dateline`\n FROM \" . TABLE_PREFIX . \"posts p\n LEFT JOIN\n \" . TABLE_PREFIX . \"threadsread tr\n ON\n tr.tid = p.tid\n LEFT JOIN\n \" . TABLE_PREFIX . \"forumsread fr\n ON\n fr.fid = p.fid\n WHERE\n tr.uid='\".$db->escape_string($mybb->user['uid']).\"' and\n fr.uid='\".$db->escape_string($mybb->user['uid']).\"'\n \");\n\n $userlastview = array();\n $userlastview_forum = array();\n\n while($result=$db->fetch_array($query))\n {\n $userlastview[] = $result['tr_dateline'];\n $userlastview_forum[] = $result['fr_dateline'];\n }\n\n $userlastview = (count($userlastview) > 0) ? max($userlastview) : 0;\n $userlastview_forum = (count($userlastview_forum) > 0) ? max($userlastview_forum) : 0;\n\n $timelimit = $userlastview + ($settings['threadreadcut'] * 24 * 60 * 60);\n $newlastpost = array();\n\n if($userlastview && $timelimit > TIME_NOW) {\n foreach ($lastpost as $lastpost_number) {\n if($lastpost_number > $userlastview_forum && $lastpost_number > $userlastview) {\n $newlastpost[] = $lastpost_number;\n }\n }\n }\n\n $count = count($newlastpost);\n\n if($count == 0) return;\n\n $posts = $count == 1 ? 'post':'posts';\n\n $lastseenpost_pid = $lastpost_pid[min($newlastpost)];\n $manynewposts = \"\";\n\n if($mybb->user['uid']) {\n if($count > 0) {\n $manynewposts = $templates->get('manynewposts');\n $manynewposts = str_replace(\"{newposts_link}\", \"./showthread.php?tid=\".$thread['tid'].\"&pid=\".$lastseenpost_pid.\"#pid\".$lastseenpost_pid, $manynewposts);\n $manynewposts = str_replace(\"{newposts}\", $count, $manynewposts);\n $manynewposts = str_replace(\"{posts}\", $posts, $manynewposts);\n }\n }\n $thread['manynewposts'] = $manynewposts;\n}", "function scrivitop5listathread() {\n\tconnetti($db);\n\t$query = \"SELECT postusername, count(*) thread FROM `vb_thread` where postusername<>'' and postuserid<>770 group by postusername order by thread desc limit 5\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\tif ($n_righe > 0) {\n\t\techo '<table id=\"elenco\">';\n\t\techo '<tr><th>Utente</th><th>Thread aperti</th>';\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\techo '<tr><td>' . $riga['postusername'] . '</td><td>' . $riga['thread'] . '</td></tr>';\n\t\t}\n\t\techo '</table>';\n\t}\n}", "function get_most_recent_post_of_user($user_id)\n {\n }", "function retrieveTrendingPosts();", "public function getUserRecentListings($num, Notice $notice) {\n \n $query = $this->createQueryBuilder('n')\n ->select(\"n, l, u, ur, g, i\")\n ->join('n.gallery', 'g')\n ->leftJoin('g.images', 'i')\n ->join('n.user', 'u')\n ->join('u.user_regular', 'ur')\n ->join('n.location', 'l')\n ->where('n.draft = false and u.id = :user and n.id != :notice')\n ->setMaxResults($num)\n ->orderBy('n.created_at', \"DESC\")\n ->getQuery();\n $query->setParameter('notice', $notice->getId());\n $query->setParameter('user', $notice->getUser());\n \n return $query->getResult();\n \n }", "public function get_last_posts(){\n\t\t$this->db->order_by('posts.created_at', 'DESC');\n\t\t$this->db->where('validated', 1);\n\t\t$this->db->join('categories', 'categories.id = posts.category_id');\n\t\t$this->db->limit(3);\n\t\t$query = $this->db->get('posts');\n\t\treturn $query->result_array();\n\t}", "function sp_last_posts($numberOfPosts = 5 , $thumb = true){\n\tglobal $post;\n\t$orig_post = $post;\n\t\n\t$lastPosts = get_posts('numberposts='.$numberOfPosts);\n\tforeach($lastPosts as $post): setup_postdata($post);\n?>\n<li>\n\t<?php if ( $thumb && sp_post_image('sp-small') ) : ?>\n\t<div class=\"post-thumbnail\">\n <a href=\"<?php the_permalink(); ?>\" title=\"<?php printf( __( 'Permalink to %s', 'sptheme' ), the_title_attribute( 'echo=0' ) ); ?>\" rel=\"bookmark\">\n <img src=\"<?php echo sp_post_image('sp-small') ?>\" width=\"110\" height=\"83\" />\n </a>\n </div><!-- post-thumbnail /-->\n <?php endif; ?>\n \n\t<h3><a href=\"<?php the_permalink(); ?>\"><?php the_title();?></a></h3>\n\t<?php //sp_get_score(); ?> <div class=\"entry-meta\"><?php echo sp_posted_on(); ?></div>\n</li>\n<?php endforeach; \n\t$post = $orig_post;\n}", "function getLastPost()\n{\n\tglobal $db_prefix, $user_info, $scripturl, $modSettings;\n\n\t// Find it by the board - better to order by board than sort the entire messages table.\n\t$request = db_query(\"\n\t\tSELECT ml.posterTime, ml.subject, ml.ID_TOPIC, ml.posterName, ml.body, ml.smileysEnabled\n\t\tFROM {$db_prefix}boards AS b, {$db_prefix}messages AS ml\n\t\tWHERE ml.ID_MSG = b.ID_LAST_MSG\" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? \"\n\t\t\tAND b.ID_BOARD != $modSettings[recycle_board]\" : '') . \"\n\t\t\tAND $user_info[query_see_board]\n\t\tORDER BY b.lastUpdated DESC\n\t\tLIMIT 1\", __FILE__, __LINE__);\n\tif (mysql_num_rows($request) == 0)\n\t\treturn array();\n\t$row = mysql_fetch_assoc($request);\n\tmysql_free_result($request);\n\n\t// Censor the subject and post...\n\tcensorText($row['subject']);\n\tcensorText($row['body']);\n\n\t$row['body'] = strip_tags(strtr(doUBBC($row['body'], $row['smileysEnabled']), array('<br />' => '&#10;')));\n\tif (strlen($row['body']) > 128)\n\t\t$row['body'] = substr($row['body'], 0, 128) . '...';\n\n\t// Send the data.\n\treturn array(\n\t\t'topic' => $row['ID_TOPIC'],\n\t\t'subject' => $row['subject'],\n\t\t'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 24 ? strtr(substr(strtr($row['subject'], array('&lt;' => '<', '&gt;' => '>', '&quot;' => '\"')), 0, 24) . '...', array('<' => '&lt;', '>' => '&gt;', '\"' => '&quot;')) : $row['subject'],\n\t\t'preview' => $row['body'],\n\t\t'time' => timeformat($row['posterTime']),\n\t\t'timestamp' => $row['posterTime'],\n\t\t'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.new;topicseen#new',\n\t\t'link' => '<a href=\"' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.new;topicseen#new\">' . $row['subject'] . '</a>'\n\t);\n}", "function featuredItems()\n{\n \treturn query(\"SELECT titel, beschrijving, b.bodBedrag\n \t\t\t\tfrom tblVoorwerp v\n \t\t\t\tinner join (select voorwerpNummer, max(bodBedrag) as bodBedrag\n \t\t\t\tfrom tblBod\n \t\t\t\tgroup by voorwerpNummer) b on v.voorwerpNummer=b.voorwerpNummer\n where v.voorwerpNummer in (select top 5 v.voorwerpNummer\n \t\t\t\tfrom tblVoorwerp v\n \t\t\t\tinner join (select voorwerpNummer, max(bodBedrag) as bodBedrag\n \t\t\t\tfrom tblBod\n \t\t\t\tgroup by voorwerpNummer) b on v.voorwerpNummer=b.voorwerpNummer\n \t\t\t\torder by startPrijs/bodBedrag*100 desc)\");\n}", "function warquest_lastest_forum_post() {\r\n\t\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $player;\r\n\tglobal $config;\r\n\t\r\n\tglobal $page;\r\n\t\r\n\tif (warquest_db_query_pattern($player, PATTERN_FORUM_SORT)==0) {\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$query = 'select b.tid, b.fid, b.description, a.date, c.pid as pid1, c.name as name1, ';\r\n\t$query .= 'c.country as country1, d.pid as pid2, d.name as name2, d.country as country2 ';\r\n\t$query .= 'from comment as a left join topic as b on a.tid=b.tid ';\r\n\t$query .= 'left join player c on a.pid1=c.pid left join player d on b.pid=d.pid ';\r\n\t$query .= 'where a.deleted=0 and b.deleted=0 order by a.id desc limit 1';\n\t\t\t\r\n\t$result = warquest_db_query($query);\t\r\n\t$data = warquest_db_fetch_object($result);\r\n\t\r\n\tif (isset($data->tid)) {\r\n\t\t$page .= '<div class=\"subparagraph\">'.t('HOME_LASTEST_FORUM_ITEM').'</div>';\r\n\t\t$page .= '<div class=\"box\">';\r\n\t\r\n\t\t$page .= '<table>';\r\n\t\r\n\t\t$page .= '<tr>';\r\n\t\r\n\t\t$page .= '<td width=\"75\">';\r\n\t\t$page .= '<b></b>';\r\n\t\t$page .= '</td>';\r\n\t\t\r\n\t\t$page .= '<td width=\"215\">';\r\n\t\t$page .= '</td>';\r\n\r\n\t\t$page .= '<td width=\"210\">';\r\n\t\t$page .= '</td>';\r\n\t\t\r\n\t\t$page .= '</tr>';\r\n\t\t\t\t\t\t\r\n\t\t$query = 'select id from comment where deleted=0 and tid='.$data->tid;\t\r\n\t\t$result = warquest_db_query($query);\r\n\t\t$count = warquest_db_num_rows($result);\r\n\t\t\t\t\t\t\t\r\n\t\t$page .= '<tr>';\r\n\t\t\t\r\n\t\t$page .= '<td>';\r\n\t\t$page .= warquest_link('mid='.MENU_FORUMS.'&sid='.PAGE_COMMENT.'&fid='.$data->fid.'&tid='.$data->tid,\r\n\t\t\twarquest_image('other/forum.png','width=\"64\" height=\"64\"'), 'forum1');\r\n\t\t$page .= '</td>';\r\n\t\t\t\t\r\n\t\t$page .= '<td valign=\"top\">';\r\n\t\t$page .= '<span class=\"topic\">';\r\n\t\t$page .= warquest_link('mid='.MENU_FORUMS.'&sid='.PAGE_COMMENT.'&fid='.$data->fid.'&tid='.$data->tid, \r\n\t\t\twarquest_parse_smilies($data->description),'forum2');\r\n\t\t$page .= '</span>';\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= '<i>';\t\r\n\t\t$page .= t('TOPIC_CREATED_BY', player_format($data->pid2, $data->name2, $data->country2));\r\n\t\t$page .= '</i>';\r\n\t\t\t\r\n\t\t$page .= '</td>';\r\n\t\t\t\t\r\n\t\t$page .= '<td valign=\"top\">';\r\n\t\t$page .= health_format($count).' '.t('GENERAL_MESSAGES').' ';\r\n\t\t\t\r\n\t\t$page .= '<br/>';\r\n\t\t\t\r\n\t\tif (isset($data->date)) {\r\n\t\t\t$page .= '<br/><b>'.t('GENERAL_LAST_MESSAGE').'</b><br/>';\r\n\t\r\n\t\t\t$page .= warquest_ui_ago($data->date).' '.t('GENERAL_BY').' ';\r\n\t\t\t$page .= player_format($data->pid1, $data->name1, $data->country1);\r\n\t\t}\r\n\t\t$page .= '</td>';\r\n\t\t$page .= '</tr>';\r\n\t\t\t\t\r\n\t\t$page .= '</table>';\r\n\t\t\t\r\n\t\t$page .= '</div>';\r\n\t}\r\n}", "function latest_submissions($start = 0, $num = 10) {\n\t\tstatic $query;\n\t\tDB::prepare_query($query, \"SELECT * FROM `submission` WHERE `entity_path` LIKE ? ORDER BY `time` DESC LIMIT \".intval($start).\", \".intval($num));\n\t\t$query->execute(array($this->path().'%'));\n\t\treturn Submission::fetch_all($query);\n\t}", "function zanblog_get_most_comments($posts_num, $strim_width, $days) {\r\n global $wpdb;\r\n\r\n $sql = \"SELECT ID , post_title , comment_count\r\n FROM $wpdb->posts\r\n WHERE post_type = 'post' AND TO_DAYS(now()) - TO_DAYS(post_date) < $days\r\n AND ($wpdb->posts.`post_status` = 'publish' OR $wpdb->posts.`post_status` = 'inherit')\r\n ORDER BY comment_count DESC LIMIT 0 , $posts_num \";\r\n\r\n $posts = $wpdb->get_results($sql);\r\n\r\n foreach ($posts as $post){\r\n \t$output .= \"\\n<li class=\\\"list-group-item\\\"><a href= \\\"\" . get_permalink($post->ID) . \"\\\" rel=\\\"bookmark\\\" title=\\\"\" . $post->post_title . \"\\\" >\" . mb_strimwidth($post->post_title, 0, $strim_width) . \"</a><span class=\\\"badge visible-lg\\\">\" . $post->comment_count . \"</li>\";\r\n }\r\n\r\n return $output;\r\n}", "function show_lastcommented()\n\t{\n\t\tglobal $required_position, $userdata, $template, $db, $SID, $lang, $phpEx, $phpbb_root_path, $garage_config, $board_config;\n\t\n\t\tif ( $garage_config['lastcommented_on'] != TRUE )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$template_block = 'block_'.$required_position;\n\t\t$template_block_row = 'block_'.$required_position.'.row';\n\t\t$template->assign_block_vars($template_block, array(\n\t\t\t'BLOCK_TITLE' => $lang['Latest_Vehicle_Comments'],\n\t\t\t'COLUMN_1_TITLE' => $lang['Vehicle'],\n\t\t\t'COLUMN_2_TITLE' => $lang['Author'],\n\t\t\t'COLUMN_3_TITLE' => $lang['Posted_Date'])\n\t\t);\n\t\n\t // What's the count? Default to 10\n\t $limit = $garage_config['lastcommented_limit'] ? $garage_config['lastcommented_limit'] : 10;\n\t \t\t \t\t\n\t \t$sql = \"SELECT gb.garage_id AS id, CONCAT_WS(' ', g.made_year, makes.make, models.model) AS vehicle, \n\t gb.author_id AS member_id, gb.post_date AS POI, m.username \n\t FROM \" . GARAGE_GUESTBOOKS_TABLE . \" AS gb \n\t \tLEFT JOIN \" . GARAGE_TABLE . \" AS g ON gb.garage_id = g.id\n\t LEFT JOIN \" . GARAGE_MAKES_TABLE . \" AS makes ON g.make_id = makes.id \n\t LEFT JOIN \" . GARAGE_MODELS_TABLE . \" AS models ON g.model_id = models.id\n\t LEFT JOIN \" . USERS_TABLE . \" AS m ON gb.author_id = m.user_id\n\t\t\tWHERE makes.pending = 0 AND models.pending = 0\n\t ORDER BY POI DESC LIMIT $limit\";\n\t\n\t \tif(!$result = $db->sql_query($sql))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, \"Could not query vehicle information\", \"\", __LINE__, __FILE__, $sql);\n\t\t}\n\t \t\t \n\t \twhile ( $vehicle_data = $db->sql_fetchrow($result) )\n\t \t{\n\t\t\t$template->assign_block_vars($template_block_row, array(\n\t\t\t\t'U_COLUMN_1' => append_sid(\"garage.$phpEx?mode=view_vehicle&amp;CID=\".$vehicle_data['id'].\"\"),\n\t\t\t\t'U_COLUMN_2' => append_sid(\"profile.$phpEx?mode=viewprofile&amp;\".POST_USERS_URL.\"=\".$vehicle_data['member_id'].\"\"),\n\t\t\t\t'COLUMN_1_TITLE' => $vehicle_data['vehicle'],\n\t\t\t\t'COLUMN_2_TITLE' => $vehicle_data['username'],\n\t\t\t\t'COLUMN_3' => create_date('D M d, Y G:i', $vehicle_data['POI'], $board_config['board_timezone']))\n\t\t\t);\n\t \t}\n\t\n\t\t$required_position++;\n\t\treturn ;\n\t}", "function getPopularBlogs($limit = '') {\n $ci = & get_instance();\n if ($limit != '') {\n $ci->db->limit($limit);\n }\n $ci->db->order_by('views', 'DESC');\n $ci->db->where(array('status' => '1', 'views > ' => '0'));\n $query = $ci->db->get(ES_BLOGS);\n $result = array();\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n }\n return $result;\n}", "public function Top5FeedbackAuthors()\n {\n// $sth = $this->pdo->query('SELECT count(`author`) as feedback_count,`author`, `user_id` FROM feedback GROUP BY `author` ORDER by `author` DESC LIMIT 0,5');\n $sth = $this->pdo->query('SELECT count(`author`) as feedback_count,`author`, `user_id` FROM feedback GROUP BY `author` ORDER by `feedback_count` DESC LIMIT 0,5');\n $collection=[];\n\n while ($res = $sth->fetch(\\PDO::FETCH_ASSOC) ) {\n $feedback = (new Feedback())\n ->setUserId($res['user_id'])\n ->setUserName($res['author'])\n ->setFeedbackCount($res['feedback_count']);\n $collection[] = $feedback;\n }\n\n return $collection;\n }", "public function viewLastPost($user_id){\n $postReponse = array();\n\n $sth = $this->conn->prepare(\"SELECT post_id, clothing_id, post_title, post_description, user_id FROM post\n ORDER BY post_created_at DESC\");\n $sth->execute();\n\n if ($sth) {\n while ($postR = $sth->fetch()) {\n $sth2 = $this->conn->prepare(\"SELECT user_login\n FROM users\n WHERE user_id=:userid\");\n $sth2->bindValue(':userid', $postR['user_id'] , PDO::PARAM_INT);\n $sth2->execute();\n $sth2Res = $sth2->fetch();\n\n $dbH = new DbPostHandler();\n $clothes = $dbH->viewSpecifiqueClothes($postR['clothing_id']);\n\n $newPost = new Post($postR['post_id'], $sth2Res['user_login'],$postR['post_title'], $postR['post_description'], $clothes, $postR['user_id']);\n array_push($postReponse, $newPost);\n\n }\n return $postReponse;\n } else {\n return false;\n }\n }", "function apoc_get_group_reply_info() {\n\n\tglobal $bp;\n\t$slug = $bp->action_variables[1];\n\t\n\tglobal $wpdb;\n\t$topic = $wpdb->get_row( \n\t\t$wpdb->prepare( \n\t\t\t\"SELECT post_title AS title, post_name AS url\n\t\t\tFROM $wpdb->posts \n\t\t\tWHERE ID = ( \n\t\t\t\tSELECT post_parent\n\t\t\t\tFROM $wpdb->posts\n\t\t\t\tWHERE post_name = %s )\",\n\t\t\t$slug )\n\t\t);\n\t\t\n\treturn( $topic );\n}", "public function getPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "function get_recommended_posts($type)\n{\n global $db;\n $req = $db->query(\"SELECT * FROM articles WHERE type = '{$type}' ORDER BY timePost DESC LIMIT 3\");\n $results = [];\n while($rows = $req->fetchObject()) {\n $results[] = $rows;\n }\n return $results;\n}", "public function takePostWhenScroll($number){\r\n $db = $this->connectDB();\r\n $req = $db->prepare('SELECT id, title, text, DATE_FORMAT(date, \"le %d %b %Y à %H:%i\") AS datePost FROM oui.posts ORDER BY date DESC LIMIT :number, 1');\r\n $req->execute(array('number' => $number));\r\n\r\n return $req;\r\n }", "function getPosts( $categoria = 'none', $number = -1, $exclude = 'none', $status = 'publicado', $offset = 0 ) {\n\t$connection = connectDB();\n\t$fecha_actual = date(\"Y-m-d\");\n\t$tabla = 'noticias';\n\n\tif ( $offset != '0' ) {\n\t\t$number = $offset.','.$number;\n\t}\n\n\t$query = \"SELECT * FROM \" .$tabla;\n\t$query .= \" WHERE post_status='\";\n\t$query .= $status . \"'\";\n\tif ( $categoria != 'none' ) {\n\t\t$query .= \" AND post_categoria = '\".$categoria.\"'\";\n\t}\n\tif ( $exclude != 'none' ) {\n\t\t$query .= \" AND post_url!='\".$exclude.\"'\";\n\t}\n\tif ( $status == 'publicado' ) {\n\t\t$query .= \" AND post_fecha <= '\".$fecha_actual.\"'\";\t\n\t}\n\t$query .= \" ORDER by post_fecha desc \";\n\tif ( $number != -1 ) {\n\t\t$query .= \" LIMIT \".$number.\" \";\n\t}\n\t\n\t$result = mysqli_query($connection, $query);\n\t\n\tcloseDataBase( $connection );\n\n\tif ( $result->num_rows == 0 ) {\n\t\t$loop = '<div>Ninguna noticia ha sido cargada todavía</div>';\n\t} else {\n\n\t\twhile ($row = $result->fetch_array()) {\n\t\t\t\t$loop[] = $row;\n\t\t\t}\n\n\t}\n\t\n\treturn $loop;\n}", "public function getLatest($x = 0) {\n\t\t$db = new DatabaseQuery;\n\t\t$rs = $db->execute(\"SELECT *,\n\t\t\t\t\t\t\t\t\tUNIX_TIMESTAMP(p.ts) AS ts_unix\n\t\t\t\t\t\t\tFROM bb_posts p\n\t\t\t\t\t\t\tLEFT JOIN bb_threads t ON t.thread_id = p.thread_id\n\t\t\t\t\t\t\tWHERE p.live = 1\n\t\t\t\t\t\t\tAND p.user_id = $this->user_id\n\t\t\t\t\t\t\tORDER BY p.ts DESC\n\t\t\t\t\t\t\t\".($x != 0 ? \"LIMIT $x\" : ''));\n\n\t\tif ($rs->getNum()) {\n\t\t\t$content .= '<h1>Latest Forum Posts</h1>\n\t\t\t<a href=\"/en/users/all/forum/'.$this->user_id.'/\">View all</a>';\n\n\t\t\twhile ($row = $rs->getRow()) {\n\t\t\t\t$fp = new ForumPost;\n\t\t\t\t$fp->setData($row);\n\t\t\t\t$fp->setShowPath(true);\n\t\t\t\t$fp->setShowUser(false);\n\t\t\t\t$items[] = $fp->display();\n\t\t\t}\n\n\t\t\t$content .= HTMLHelper::wrapArrayInUl($items);\n\t\t}\n\n\t\treturn $content;\n\t}", "function scrivilistathread($mese, $anno, $mese1, $anno1) {\n\tconnetti($db);\n\t$query = \"SELECT postusername, count(*) thread FROM `vb_thread` WHERE dateline >= unix_timestamp(DATE('\".$anno.\"-\".$mese.\"-01')) and dateline < unix_timestamp(DATE('\" . $anno1 . \"-\" . ($mese1) . \"-01')) and postusername<>'' and postuserid<>770 group by postusername order by thread desc limit 10\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\t$arr=array();\n\tif ($n_righe > 0) {\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\t$arr[]=array('username' => $riga['postusername'], 'thread' => $riga['thread']);\n\t\t}\n\t\techo json_encode($arr);\n\t}\n}", "function get_not_top_5_best_polls($reviewer)\n{\n $reviewer = (int)$reviewer;\n $limit = mysql_result(mysql_query(\"SELECT Value FROM parameter WHERE Short_name = 'Reviews_to_give'\"), 0);\n $query = mysql_query(\"SELECT ID, Reviewee, Score FROM candidate_poll WHERE Reviewer=$reviewer ORDER BY Score DESC LIMIT 100 OFFSET $limit\");\n if (!$query || mysql_num_rows($query) <= 0) {\n echo mysql_error();\n return false;\n } else {\n while ($row = mysql_fetch_assoc($query)) {\n $polls[] = array(\n 'ID' => $row['ID'],\n 'Reviewee' => $row['Reviewee'],\n 'Score' => $row['Score']\n );\n }\n return $polls;\n }\n}", "public function get_latest_notifications($hos_id){\n\t\tglobal $con;\n\n\t\t$query=\"SELECT notification_id FROM referral_notifications \n\t\t\t\tWHERE receiver_hospital=\\\"$hos_id\\\" ORDER BY referral_id DESC LIMIT 5\";\n\t\t$result=array();\n\t\t$result=$this->select($con,$query);\n\n\t\treturn $result;\n\t}", "public function getLastPost()\n\t{\n\t\t$table = new Zend_Db_Table(array('name'=>PrecurioTableConstants::FORUM_POSTS, 'rowClass'=>'Post'));\n\t\t$select = $table->select(false);\n\t\t\n\t\t$select->setTable($table)->setIntegrityCheck(false);\t\t\t\n\t\t\t\n\t\t$select = $select->from(array('a' => PrecurioTableConstants::FORUM_POSTS))\n\t\t\t->join(array('b' => PrecurioTableConstants::USERS), 'a.user_id = b.user_id', array('first_name', 'last_name'))\t\n\t\t\t->join(array('d' => PrecurioTableConstants::FORUM_TOPICS), 'd.id = a.topic_id', array())\n\t\t\t->join(array('c' => PrecurioTableConstants::FORUMS), 'c.id = d.forum_id', array())\n\t\t\t\t\t\t\n\t\t\t->where(\"a.active = 1 AND c.id = {$this->getId()}\")\n\t\t\t->order(\"a.id DESC\");\n\t\t\n\t\n\t\treturn $table->fetchRow($select);\n\t}", "public function getLastPost() {\r\n $db = $this->dbConnect();\r\n $req = $db->query('SELECT id, title, content,adress_street, adress_city, DATE_FORMAT(date_creation, \\'%d/%m/%Y à %Hh%imin%ss\\') AS date_creation_fr FROM articles ORDER BY date_creation DESC LIMIT 0, 1');\r\n\r\n return $req->fetchAll();\r\n }", "function LatestSubmssionFunc($atts) {\n\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . 'submissions';\n\t$type = !empty($atts['type']) ? $atts['type'] : \"event\";\n\t$limit = !empty($atts['limit']) ? $atts['limit'] : 5;\n\t$getLatest = $wpdb->get_results(\" SELECT * FROM $table_name WHERE Approval = 1 AND type = '$type' ORDER BY id DESC LIMIT $limit\");\n\n\t$output = '<div class=\"container\">';\n\t$output .= '<div class=\"row\">';\n\tforeach ($getLatest as $key => $submssion) {\n\t\t$output .= '<div class=\"col col-lg-2\">';\n\t\t$output .= 'the output just print the ids right now';\n\t\t$output .= $submssion->id;\n\n\t\t$output .= '</div>';\n\t}\n\n\t$output .= '</div>';\n\t$output .= '</div>';\n\n\treturn $output;\n\n}", "public function get_last_ten_entries()\r\n\t{\r\n\t\t$query = $this->db->get(\"email_workflow\", 10);\r\n\r\n\t\treturn $query->result();\r\n\t}", "public function getSendMailings() {\n\t\t$sql = 'SELECT pageId, UNIX_TIMESTAMP(dateadded) as `dateadded` FROM mailqueue WHERE issend=2';\n\t\t$ids = $this -> _conn -> getFields($sql);\n\t\t$rows = $this -> _conn -> getRows($sql);\n\t\t$page = new Page();\n\t\t$result = $page -> getPagesByIds($ids, true);\n\t\tif($result) {\n\t\t\tforeach($result as $page) {\n\t\t\t\tforeach($rows as $row) {\n\t\t\t\t\tif($row -> pageId == $page -> pageId) {\n\t\t\t\t\t\t$page -> publicationdate = $row -> dateadded;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "private function getLastUsers() {\n $last_five_users = array();\n $result = db_select('users_field_data', 'u')\n ->fields('u', array('uid', 'name', 'mail', 'created'))\n ->condition('u.created', REQUEST_TIME - 3600, '>')\n ->orderBy('created', 'DESC')\n ->range(0, 15)\n ->execute();\n\n $count = 0;\n foreach ($result as $record) {\n $last_five_users[$count]['uid'] = $record->uid;\n $last_five_users[$count]['name'] = $record->name;\n $last_five_users[$count]['email'] = $record->mail;\n $last_five_users[$count]['created'] = $record->created;\n $count++;\n }\n\n return $last_five_users;\n }", "function newsItem_PageLimit_Populer_All_Publik( $tbl_news, $tanggalhariini, $dataPerPage ){\n\t\t$sql = mysql_query(\"\n\t\tSELECT * FROM $tbl_news WHERE \n\t\t\t\n\t\t\ttgltampil <= '$tanggalhariini' AND\n\t\t\tstatustampil='1' AND\n\t\t\tdilihat >= '5'\n\t\t\t\n\t\tORDER BY urutan DESC LIMIT $dataPerPage\");\n\t\treturn $sql;\n}", "public function getLatestMailing() {\n\t\t$sql = 'SELECT pageId, UNIX_TIMESTAMP(dateadded) as `dateadded` FROM mailqueue WHERE issend=2 ORDER BY dateadded DESC LIMIT 0,1';\n\t\t$row = $this -> _conn -> getRow($sql);\n\t\tif($row) {\n\t\t\t$page = new Page();\n\t\t\t$result = $page -> getPageById($row -> pageId);\n\t\t\t$result -> publicationdate = $row -> dateadded;\n\t\t\treturn $result;\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public function getNotifications($data, $limit){\n $page = $data['page'];\n $userLoggedIn = $this->user_obj->getUserName();\n $str = \"\";\n \n if($page == 1){\n // Start at the first post\n $start = 0;\n } else {\n // Starts where the last loaded posts were\n $start = ($page - 1) * $limit;\n }\n \n //Set viewed to yes for all notifications for that user.\n $set_viewed = $this->con->query(\"UPDATE notifications SET viewed='yes' WHERE user_to='$userLoggedIn'\");\n $data = $this->con->query(\"SELECT * FROM notifications WHERE user_to='$userLoggedIn' ORDER BY id DESC\");\n \n // If there are no notifications\n if($data->num_rows == 0){\n echo \"You don't have any notifications to load.\";\n\t\t\t return;\n }\n \n // The number of results checked\n $num_iterations = 0;\n \n // The number of results posted\n $count = 1;\n \n while($row = $data->fetch_array(MYSQLI_ASSOC)){\n // If the start position from last loads has not been reached yet\n if($num_iterations++ < $start)\n continue;\n \n // Once 5 notifications have been loaded, stop\n if($count > $limit){\n break;\n } else {\n $count++;\n }\n \n $user_from = $row['user_from'];\n\n \t\t\t$query = $this->con->query(\"SELECT * FROM users WHERE username='$user_from'\");\n \t\t\t$userData = $query->fetch_array(MYSQLI_ASSOC);\n \t\t\t\n \t\t\t// Calculate how long ago the notification was received\n \t\t\t$date_time_now = date(\"Y-m-d H:i:s\");\n $start_date = new DateTime($row['datetime']);\n $end_date = new DateTime($date_time_now);\n $interval = $start_date->diff($end_date);\n \n if($interval->y >= 1){\n if($interval->y == 1){\n $time_message = $interval->y.\" year ago\";\n } else {\n $time_message = $interval->y.\" years ago\";\n }\n } elseif($interval->m >= 1){\n if($interval->d == 0){\n $days = \" ago\";\n } else if($interval->d == 1){\n $days = $interval->d.\" day ago\";\n } else {\n $days = $interval->d.\" day ago\";\n }\n \n if($interval->m == 1){\n $time_message = $interval->m.\" month \".$days;\n } else {\n $time_message = $interval->m.\" months \".$days;\n }\n } else if($interval->d >= 1){\n if($interval->d == 1){\n $time_message = \"Yesterday\";\n } else{\n $time_message = $interval->d.\" days ago\"; \n }\n } else if($interval->h >= 1){\n if($interval->h == 1){\n $time_message = $interval->h.\" hour ago\";\n } else{\n $time_message = $interval->h.\" hours ago\";\n }\n } else if($interval->i >= 1){\n if($interval->i == 1){\n $time_message = $interval->i.\" minute ago\";\n } else {\n $time_message = $interval->i.\" minutes ago\";\n }\n } else {\n if($interval->s < 30){\n $time_message = \"Just now\";\n } else {\n $time_message = $interval->s.\" seconds ago\";\n }\n } \n \n // If this is yes, then this notification has been clicked on before.\n $opened = $row['opened'];\n \n // If the message is unopened, change background color slightly\n $style = ($opened == 'no') ? \"background-color: #DDEDFF;\" : \"\";\n \n $str .= \"<a href='\".$row['link'].\"'>\n <div class='resultDisplay resultDisplayNotification' style='\".$style.\"'>\n <div class='notificationsProfilePic'>\n <img src='\".$userData['profile_pic'].\"'>\n </div>\n <p class='timestamp_smaller' id='grey'>\".$time_message.\"</p>\".$row['message'].\" \n </div>\n </a>\";\n \n } // End of the while loop\n \n // If posts were loaded\n if($count > $limit){\n // Holds value of next page, it must stay hidden\n $str.=\"<input type='hidden' class='nextpageDropdownData' value='\".($page + 1).\n \"'><input type='hidden' class='noMoreDropdownData' value='false'>\";\n } else {\n // No more Notifications to load. Show 'Finished' message\n\t \t$str .= \"<input type='hidden' class='noMoreDropdownData' value='true'>\n\t \t<p style='text-align: center;'>No more notifications to load!</p>\";\n }\n \n echo $str;\n }", "function getRecentPosts($list=10)\n {\n //get raw db info\n $posts = $this->db->getRecentPostSummary($list);\n \n //augment with some formatting\n foreach($posts as $idx=>$post)\n {\n $age= $post['age'];\n $days=floor($age/(3600*24));\n $hours=floor($age/3600);\n $minutes=floor($age/60);\n $seconds= $age;\n \n if ($days>1)\n $age=sprintf(t('%d days ago'), $days);\n elseif ($hours>0)\n $age=($hours>1)? sprintf(t('%d hours ago'), $hours) : t('1 hour ago');\n elseif ($minutes>0)\n $age=($minutes>1)? sprintf(t('%d mins ago'), $minutes) : t('1 min ago');\n else\n $age=($seconds>1)? sprintf(t('%d secs ago'), $seconds) : t('1 sec ago');\n \n $url= $this->getPostURL($post['pid']);\n \n $posts[$idx]['agefmt'] = $age;\n $posts[$idx]['url'] = $this->getPostURL($post['pid']);\n \n }\n \n return $posts; \n }", "public function fetchRecentImages()\n {\n $posts = $this->_hc->get_rooms_history('517400','recent');\n $posts = array_reverse($posts);\n\n $images = array();\n foreach ($posts as $post) {\n $url = Image::parseImageUrl($post->message);\n if ($url !== null) {\n $images[] = array(\n 'url' => $url,\n 'date' => $post->date\n );\n }\n }\n\n return $images;\n }", "public function findPraiseTopTen(){\n $sql = \"SELECT p.`id`, u.`nickname`, p.`favorite`, p.`pic` FROM `photo` AS p, `user` AS u WHERE p.`uid` = u.`uid` ORDER BY p.`favorite` DESC, p.`created` LIMIT 0, 10\";\n $res = $this->connect()->query($sql);\n $list = $res->fetch_all($resulttype = MYSQLI_ASSOC);\n if($list) {\n return $list;\n }\n return FALSE;\n }", "public function return_most_recent() {\n\n // query database to return just the most recent work item\n $query_args = array(\n 'post_type' => 'invoice_item',\n 'meta_query' => array(\n array(\n 'key' => 'client_id',\n 'value' => $this->id\n ),\n 'ii_date' => array(\n 'key' => 'date',\n )\n ),\n 'orderby' => 'ii_date',\n 'order' => 'DSC',\n 'posts_per_page' => 1\n );\n $query = new WP_Query($query_args);\n\n // populate return array and return\n while ($query->have_posts()) {\n $query->the_post();\n $invoice_item = new InvoiceItem(get_the_id());\n update_post_meta($this->id, 'most_recent', strtotime($invoice_item->date));\n $return = array(\n 'id' => get_the_id(),\n 'permalink' => get_the_permalink(),\n 'value' => $invoice_item->value,\n 'title' => $invoice_item->ii_title,\n 'date' => $invoice_item->date,\n );\n return $return;\n }\n\n }", "public static function retrieveRecentNews() {\n return R::findAll( 'news' , ' ORDER BY date_added DESC LIMIT 10 ' );\n }", "public function lastMessage()\n\t{\n\t\t$data = $this->getDoctrine()->getRepository(Posting::class)->findBy(array(), ['id' => 'DESC'], 3);\n\t\t//$data = $posting->addOrderBy('id', 'desc')->take(3)->get();\n\t\treturn $this->render('page/main.html.twig', ['data' => $data]);\n\t}", "public function getLatestPost()\n {\n $recent = $this->getRecent(1);\n\n if (is_array($recent)) {\n $recent = array_pop($recent);\n }\n\n return $recent;\n }", "private function getTop($count = 5, $tag_id){\n return Posts::whereHas('tags', function($query) use ($tag_id){\n $query->where('tag_id', $tag_id);\n })->where('status', 'public')->take($count);\n }", "function get_recent_files($num = 10)\n{\n return get_records('File', array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}", "public function getPublishedPosts() {\r\n $sql = 'SELECT p.ID as ID, post_title, post_subtitle,\r\n username, name, word_count, b.status as bookmark_status,\r\n UNIX_TIMESTAMP(post_date) as post_date \r\n FROM posts p JOIN users u ON (post_author=u.id) \r\n LEFT JOIN bookmarks b ON (b.post_id=p.ID AND b.user_id=?)\r\n WHERE post_status = \"publish\" \r\n ORDER BY post_date DESC LIMIT 0, 10';\r\n $sth = $this->db->prepare($sql);\r\n $sth->execute(array($GLOBALS['user']['id']));\r\n\r\n $rows = array();\r\n while($row = $sth->fetch()) {\r\n $row['post_date_supertag'] = date('j<b\\r>M', $row['post_date']);\r\n $row['reading_time'] = ceil($row['word_count'] / WORDS_PER_MINUTE);\r\n\r\n $rows[] = $row;\r\n }\r\n\r\n return $rows;\r\n }", "function openskydora_get_most_viewed_authors($count=5, $weeks_ago=5) {\n // (could we narrow to articles?)\n $views = openskydora_get_most_viewed (10000, $weeks_ago);\n dsm ('processing '. count($views) . ' hits');\n dsm($views);\n $query = implode (array_map ('pid_query_clause', array_keys($views)), ' OR ');\n $solr_fields = array(\n 'PID',\n 'fgs_createdDate_dt',\n 'fgs_label_s',\n 'mods_extension_collectionKey_ms',\n 'RELS_EXT_isMemberOfCollection_uri_s',\n 'RELS_EXT_hasModel_uri_s',\n 'mods_name_personal_author_nameIdentifier_UPID_ms'\n );\n $params = array(\n 'fl'=>implode($solr_fields, ','),\n 'sort'=>'fgs_createdDate_dt desc',\n 'solrLimit'=>$count,\n );\n \n $query_results = openskydora_solr_search($query, $params);\n dsm(\"results\");\n dsm ($query_results);\n}", "function openskydora_get_most_viewed_collections($count=5, $weeks_ago=5) {\n // get all the views in the window\n $views = openskydora_get_most_viewed (10000, $weeks_ago);\n\n // Kludge to keep number of pids from blowing up Solr\n $views = array_slice($views, 0, 100);\n \n // search for all the unique PIDs that aren't collections\n $query = implode (array_map ('pid_query_clause', array_keys($views)), ' OR ');\n $query = '('.$query.') NOT RELS_EXT_hasModel_uri_t:\"*collectionCModel\"';\n $solr_fields = array(\n 'PID',\n 'fgs_createdDate_dt',\n 'fgs_label_s',\n 'mods_extension_collectionKey_ms',\n 'RELS_EXT_isMemberOfCollection_uri_s',\n 'RELS_EXT_hasModel_uri_s'\n );\n $params = array(\n 'fl'=>implode($solr_fields, ','),\n 'sort'=>'fgs_createdDate_dt desc',\n 'solrLimit'=>count($views),\n );\n\n $query_results = openskydora_solr_search($query, $params);\n\n // construct most_viewed array to return\n $most_viewed = array();\n foreach($query_results as $item) {\n $pid = $item['PID'];\n //dsm($pid . ' views: ' . $views[$pid]->views);\n $collection = $item['RELS_EXT_isMemberOfCollection_uri_s'];\n $label = $item['fgs_label_s'];\n $coll_views = isset($most_viewed[$collection]) ? $most_viewed[$collection] : 0;\n $coll_views += intval($views[$pid]->views);\n // dsm (\"- $collection coll_views: $coll_views\");\n /* $most_viewed[$collection] = array (\n 'views' =>$coll_views,\n 'label' => $label\n );\n */\n $most_viewed[$collection] = $coll_views;\n }\n\n arsort($most_viewed);\n /*\n usort($most_viewed, function ($a, $b) {\n return $a['views'] <=> $b['views'];\n });\n */\n return array_slice($most_viewed, 0, $count, TRUE);\n}", "public function fetchLatest($count = 5)\r\n {\r\n return $this->fetchAll(null,'text_id DESC', $count);\r\n }", "public function findLasts($nb = 5)\n {\n return $this\n ->findLastsQueryBuilder($nb)\n ->getQuery()\n ->getResult()\n ;\n }", "public function getLastNotifications(HRUser $user, HRGame $game) {\n return $this->_em->createQuery(\"\n SELECT n\n FROM EIPHRBundle:HRNotification n\n WHERE n.game = :game\n AND n.user = :user\n ORDER BY n.time DESC\n \")->setParameters(array(\n ':user' => $user->getId(),\n ':game' => $game->getId()\n ))\n ->setMaxResults(10)\n ->getResult();\n }", "function sp_popular_posts($pop_posts = 5 , $thumb = true){\n\tglobal $wpdb , $post;\n\t$orig_post = $post;\n\t\n\t$popularposts = \"SELECT ID,post_title,post_date,post_author,post_content,post_type FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY comment_count DESC LIMIT 0,\".$pop_posts;\n\t$posts = $wpdb->get_results($popularposts);\n\tif($posts){\n\t\tglobal $post;\n\t\tforeach($posts as $post){\n\t\tsetup_postdata($post);?>\n\t\t\t<li>\n <?php if ( $thumb && sp_post_image('sp-small') ) : ?>\t\n\t <div class=\"post-thumbnail\">\n\t\t\t\t\t<a href=\"<?php echo get_permalink( $post->ID ) ?>\" title=\"<?php printf( __( 'Permalink to %s', 'sptheme' ), the_title_attribute( 'echo=0' ) ); ?>\" rel=\"bookmark\">\n\t\t\t\t\t<img src=\"<?php echo sp_post_image('sp-small') ?>\" width=\"110\" height=\"83\" />\n </a>\n\t\t\t\t</div><!-- post-thumbnail /-->\n <?php endif; ?> \n \n\t\t\t\t<h3><a href=\"<?php echo get_permalink( $post->ID ) ?>\" title=\"<?php echo the_title(); ?>\"><?php echo the_title(); ?></a></h3>\n\t\t\t\t<?php //sp_get_score(); ?> <div class=\"entry-meta\"><?php echo sp_posted_on(); ?></div>\n \n\t\t\t</li>\n\t<?php \n\t\t}\n\t}\n\t$post = $orig_post;\n}", "function getLatestEntries()\n {\n global $_ARRAYLANG;\n\n $this->_objTpl->setTemplate($this->_strPageContent, true, true);\n\n //Show latest XX entries\n $arrEntries = $this->createEntryArray($this->_intLanguageId, 0, intval($this->_arrSettings['blog_block_messages']));\n if (count($arrEntries) > 0 && $this->_objTpl->blockExists('blogBlockEntries')) {\n $intRowClass = 1;\n\n foreach ($arrEntries as $intEntryId => $arrEntryValues) {\n $this->_objTpl->setVariable(array(\n 'TXT_BLOG_ENTRY_CATEGORIES' => $_ARRAYLANG['TXT_BLOG_HOME_CATEGORIES'],\n 'TXT_BLOG_ENTRY_TAGS' => $_ARRAYLANG['TXT_BLOG_HOME_KEYWORDS'],\n 'TXT_BLOG_ENTRY_VOTING' => $_ARRAYLANG['TXT_BLOG_HOME_VOTING'],\n 'TXT_BLOG_ENTRY_COMMENTS' => $_ARRAYLANG['TXT_BLOG_HOME_COMMENTS'],\n 'TXT_BLOG_ENTRY_LINK' => $_ARRAYLANG['TXT_BLOG_HOME_LINK']\n ));\n\n $this->_objTpl->setVariable(array(\n 'BLOG_ENTRY_ROWCLASS' => ($intRowClass % 2 == 0) ? 'row1' : 'row2',\n 'BLOG_ENTRY_ID' => $intEntryId,\n 'BLOG_ENTRY_DATE' => $arrEntryValues['time_created'],\n 'BLOG_ENTRY_AUTHOR_ID' => $arrEntryValues['user_id'],\n 'BLOG_ENTRY_AUTHOR_NAME' => $arrEntryValues['user_name'],\n 'BLOG_ENTRY_SUBJECT' => $arrEntryValues['subject'],\n 'BLOG_ENTRY_POSTED_BY' => $this->getPostedByString($arrEntryValues['user_name'], $arrEntryValues['time_created']),\n 'BLOG_ENTRY_POSTED_BY_ICON' => $this->getPostedByIcon($arrEntryValues['time_created']),\n 'BLOG_ENTRY_INTRODUCTION' => $this->getIntroductionText($arrEntryValues['translation'][$this->_intLanguageId]['content']),\n 'BLOG_ENTRY_CONTENT' => $arrEntryValues['translation'][$this->_intLanguageId]['content'],\n 'BLOG_ENTRY_CATEGORIES' => $this->getCategoryString($arrEntryValues['categories'][$this->_intLanguageId], true),\n 'BLOG_ENTRY_TAGS' => $this->getLinkedTags($arrEntryValues['translation'][$this->_intLanguageId]['tags']),\n 'BLOG_ENTRY_TAGS_ICON' => $this->getTagsIcon(),\n 'BLOG_ENTRY_COMMENTS' => $arrEntryValues['comments_active'].'&nbsp;'.$_ARRAYLANG['TXT_BLOG_HOME_COMMENTS'],\n 'BLOG_ENTRY_VOTING' => '&#216;&nbsp;'.$arrEntryValues['votes_avg'],\n 'BLOG_ENTRY_VOTING_STARS' => $this->getRatingBar($intEntryId),\n 'BLOG_ENTRY_LINK' => '<a href=\"index.php?section=Blog&amp;cmd=details&amp;id='.$intEntryId.'\" title=\"'.$arrEntryValues['subject'].'\">'.$_ARRAYLANG['TXT_BLOG_HOME_OPEN'].'</a>',\n 'BLOG_ENTRY_IMAGE' => ($arrEntryValues['translation'][$this->_intLanguageId]['image'] != '') ? '<img src=\"'.$arrEntryValues['translation'][$this->_intLanguageId]['image'].'\" title=\"'.$arrEntryValues['subject'].'\" alt=\"'.$arrEntryValues['subject'].'\" />' : ''\n ));\n\n $this->_objTpl->parse('blogBlockEntries');\n ++$intRowClass;\n }\n }\n\n //Show overview of categories\n $arrCategories = $this->createCategoryArray();\n\n if (count($arrCategories) > 0 && $this->_objTpl->blockExists('blogBlockCategories')) {\n //Collect active categories for the current language\n $arrCurrentLanguageCategories = array();\n foreach($arrCategories as $intCategoryId => $arrLanguageData) {\n if ($arrLanguageData[$this->_intLanguageId]['is_active']) {\n $arrCurrentLanguageCategories[$intCategoryId] = $arrLanguageData[$this->_intLanguageId]['name'];\n }\n }\n\n //Sort alphabetic\n asort($arrCurrentLanguageCategories);\n\n if (count($arrCurrentLanguageCategories)) {\n foreach($arrCurrentLanguageCategories as $intCategoryId => $strTranslation) {\n $this->_objTpl->setVariable(array(\n 'BLOG_CATEGORY_ID' => $intCategoryId,\n 'BLOG_CATEGORY_NAME' => $strTranslation,\n 'BLOG_CATEGORY_COUNT' => $this->countEntriesOfCategory($intCategoryId)\n ));\n $this->_objTpl->parse('blogBlockCategories');\n }\n }\n }\n\n //Also try to fill the other variables\n if ($this->searchKeywordInContent('BLOG_CALENDAR', $this->_strPageContent)) { $this->_objTpl->setVariable('BLOG_CALENDAR', $this->getHomeCalendar()); }\n if ($this->searchKeywordInContent('BLOG_TAG_CLOUD', $this->_strPageContent)) { $this->_objTpl->setVariable('BLOG_TAG_CLOUD', $this->getTagCloud()); }\n if ($this->searchKeywordInContent('BLOG_TAG_HITLIST', $this->_strPageContent)) { $this->_objTpl->setVariable('BLOG_TAG_HITLIST', $this->getHomeTagHitlist()); }\n if ($this->searchKeywordInContent('BLOG_CATEGORIES_SELECT', $this->_strPageContent)) { $this->_objTpl->setVariable('BLOG_CATEGORIES_SELECT', $this->getHomeCategoriesSelect()); }\n if ($this->searchKeywordInContent('BLOG_CATEGORIES_LIST', $this->_strPageContent)) { $this->_objTpl->setVariable('BLOG_CATEGORIES_LIST', $this->getHomeCategoriesList()); }\n\n return $this->_objTpl->get();\n }", "public function getPosts(){\n \t$posts = Post::latest()->paginate(3);\n \treturn new PostCollection($posts);\n }", "public function findLatest($number)\n {\n return $this->createPublishedSortedQueryBuilder()\n ->limit($number)\n ->getQuery()\n ->execute();\n }", "function openskydora_get_most_viewed($count, $weeks_ago=7, $exclude=NULL) {\n $query = db_select('islandora_usage_stats_object_access_log', 'log');\n $query->join('islandora_usage_stats_objects', 'objects', 'log.pid_id = objects.id');\n $query->addExpression('COUNT(log.pid_id)', 'views');\n $query->fields('objects', array('pid'))\n ->groupBy('log.pid_id')\n ->orderBy('views', 'DESC')\n ->range(0, $count);\n // XXX: This could potentially cause slow down on large data sets.\n if ($exclude) {\n $query->condition('pid', $exclude, 'NOT IN');\n }\n if ($weeks_ago) {\n $query->condition('log.time', strtotime(\"-$weeks_ago week\"), '>');\n }\n $results = $query->execute();\n $records = $results->fetchAllAssoc('pid');\n return $records;\n}", "private function get_newest_post() {\n\t\t// If set in the admin get the top story.\n\t\t$newest_post = get_option( 'current-top-story' );\n\t\t$title = '' !== $newest_post ? sanitize_text_field( wp_unslash( $newest_post ) ) : '';\n\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'post_type' => 'post',\n\t\t\t'post_status' => 'publish',\n\t\t\t's' => $title,\n\t\t);\n\n\t\t$post_array = wp_get_recent_posts( $args, OBJECT );\n\n\t\treturn $post_array[0];\n\t}", "function getPopular()\n\t{\n\t\t$interval = $this->input->post('interval');\n\t\tif($interval == '') {\n\t\t\t$interval = 1;\n\t\t}\n\n\t\t$limit = $this->input->post('limit');\n\t\tif($limit == '') {\n\t\t\t$limit = 30;\n\t\t}\n\n\t\t$response = $this->mapi->getPopular($interval,$limit);\n\n\t\theader('Content-Type: application/json');\n\t\techo json_encode($response);\n\t}", "function scrivitop5sezioni() {\n\tconnetti($db);\n\t$query=\"SELECT f.title tt ,sum(`views`) v FROM `vb_thread` t left join vb_forum f on t.forumid=f.forumid group by f.title order by v desc limit 5\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\tif ($n_righe > 0) {\n\t\techo '<table id=\"elenco\">';\n\t\techo '<tr><th>Sezione</th><th>Visite</th>';\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\techo '<tr><td>' . $riga['tt'] . '</td><td>' .$riga['v'] . '</td></tr>';\n\t\t}\n\t\techo '</table>';\n\t}\n}", "function scrividiscussioni($mese, $anno, $mese1, $anno1) {\n\tconnetti($db);\n\t$query=\"select title, postusername, replycount from vb_thread where dateline >= unix_timestamp(DATE('\".$anno.\"-\".$mese.\"-01')) and dateline < unix_timestamp(DATE('\" . $anno1 . \"-\" . ($mese1) . \"-01')) and postusername<>'' and postuserid<>770 order by replycount desc limit 10\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\t$arr=array();\n\tif ($n_righe > 0) {\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\t$arr[]=array('username' => $riga['postusername'], 'title' => trunc($riga['title'],50), 'reply' => $riga['replycount']);\n\t\t}\n\t\techo json_encode($arr);\n\t}\n}", "function sp_most_commented($comment_posts = 5 , $avatar_size = 60){\n$comments = get_comments('status=approve&number='.$comment_posts);\nforeach ($comments as $comment) { ?>\n\t<li>\n\t\t<div class=\"post-thumbnail\">\n\t\t\t<?php echo get_avatar( $comment, $avatar_size ); ?>\n\t\t</div>\n\t\t<a href=\"<?php echo get_permalink($comment->comment_post_ID ); ?>#comment-<?php echo $comment->comment_ID; ?>\">\n\t\t<?php echo strip_tags($comment->comment_author); ?>: <?php echo wp_html_excerpt( $comment->comment_content, 60 ); ?>... </a>\n\t</li>\n<?php } \n}", "public function get_news()\n\t{\n\t\t$this->db->where('blog_category_id = 5');\n\t \t$this->db->order_by('last_modified','ASC');\n\t\t$query = $this->db->get('post');\n\t\t\n\t\treturn $query;\n\t}", "public static function getAll() {\n return get_posts(array(\n 'post_type' => Admin::POST_TYPE_BADGES,\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'numberposts' => -1\n ));\n }", "function get_user_forum_posts($id, $limit = 5)\r\n\t{\r\n\t\t$this->db->select(\"forum_reply.id as reply_id, forum_reply.reply_date, forum_reply.topic_id, forum_topic.topic, forum_categories_descriptions_language.title\");\r\n\t\t$this->db->from(\"forum_reply\");\r\n\t\t$this->db->join(\"forum_topic\", \"forum_reply.topic_id = forum_topic.id\", \"\");\r\n\t\t$this->db->join(\"forum_categories_descriptions_language\", \"forum_topic.cat_id = forum_categories_descriptions_language.cat_id\", \"\");\r\n\t\t$this->db->where(\"forum_reply.user_id\", $id);\r\n\t\t$this->db->order_by(\"reply_date\", \"desc\");\r\n\t\t$this->db->limit($limit);\r\n\r\n\t\t$query = $this->db->get();\r\n\r\n\t\treturn $query->result();\r\n\t}", "function getRecents() {\n\t\t$link = getDbConnect();\n\t\t$preparedStatement = $link->prepare(\"SELECT * FROM urls ORDER BY id DESC LIMIT 30;\");\n\t\t$preparedStatement->execute(array());\n\t\treturn parseFullResults($preparedStatement->fetchAll());\n\t}", "private function getLastNodes() {\n $last_five_nodes = array();\n if (\\Drupal::moduleHandler()->moduleExists('node')) {\n $result = db_select('node_field_data', 'n')\n ->fields('n', array('title', 'type', 'nid', 'created', 'langcode'))\n ->condition('n.created', REQUEST_TIME - 3600, '>')\n ->orderBy('n.created', 'DESC')\n ->range(0, 15)\n ->execute();\n\n $count = 0;\n foreach ($result as $record) {\n $last_five_nodes[$count]['url'] = \\Drupal::service('path.alias_manager')\n ->getAliasByPath('/node/' . $record->nid, $record->langcode);\n $last_five_nodes[$count]['title'] = $record->title;\n $last_five_nodes[$count]['type'] = $record->type;\n $last_five_nodes[$count]['created'] = $record->created;\n $count++;\n }\n }\n\n return $last_five_nodes;\n }", "function moments_qodef_like_latest_posts() {\n\t\treturn moments_qodef_like()->add_like();\n\t}", "function get_last_post($topic_id) {\n return Database::get()->querySingle(\"SELECT post_time FROM forum_post\n WHERE topic_id = ?d\n ORDER BY post_time DESC LIMIT 1\", $topic_id)->post_time;\n}", "public function getFiveArtsByHits(){\n\t\t$sql=\"select a.articleid,a.title,a.description,a.pic,a.ptime,a.hits,a.author,c.categoryid,c.name from article a join category c on a.cid=c.categoryid order by a.hits desc limit 5\";\n\t\t\n\t\treturn $this->select($sql);\n\t}", "public function getEx9() {\n # Ref: https://laravel.com/docs/5.2/queries#ordering-grouping-limit-and-offset\n $books = \\App\\Book::orderBy('id', 'desc')->get()->take(5);\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `id` desc\n }", "function get_group_topics($params) {\n global $db;\n\n $gid = $params['group'] ? $params['group'] : $params;\n $limit = $params['limit'];\n $order = $params['order'] ? $params['order'] : \" last_post_time DESC \";\n\n if ($params['approved'])\n $approved_query = \" AND \" . tbl('group_topics') . \".approved='yes' \";\n if ($params['user'])\n $user_query = \" AND \" . tbl('group_topics') . \".userid='\" . $params['user'] . \"'\";\n\n\n //user fields\n $fields = array(\n 'email', 'username'\n );\n\n $fields = apply_filters($fields, 'group_topic_user_fields');\n\n foreach ($fields as $field)\n $uquery .= ',' . tbl('users.' . $field);\n\n if ($limit)\n $limit_query = \" LIMIT \" . $limit;\n else\n $limit_query = '';\n\n $order = ' ORDER BY ' . $order;\n $results = db_select(\"SELECT \" . tbl('group_topics') . \".*$uquery FROM \"\n . tbl('group_topics') . \" LEFT JOIN \" . tbl('users') . \" ON \" . tbl('users.userid')\n . \"=\" . tbl('group_topics.userid') . \" WHERE \" . tbl('group_topics')\n . \".group_id='$gid' $user_query $order $limit_query \");\n\n\n if ($db->num_rows > 0)\n return $results;\n else\n return false;\n }", "public function viewTopPost($user_id){\n $postReponse = array();\n\n $sth = $this->conn->prepare(\"SELECT post_id, post.clothing_id, post_title, post_description, post.user_id, post_created_at\n FROM post\n JOIN clothing ON clothing.clothing_id=post.clothing_id \n ORDER BY clothing_vote DESC\");\n $sth->execute();\n\n if ($sth) {\n while ($postR = $sth->fetch()) {\n $sth2 = $this->conn->prepare(\"SELECT user_login\n FROM users\n WHERE user_id=:userid\");\n $sth2->bindValue(':userid', $postR['user_id'] , PDO::PARAM_INT);\n $sth2->execute();\n $sth2Res = $sth2->fetch();\n\n $dbH = new DbPostHandler();\n $clothes = $dbH->viewSpecifiqueClothes($postR['clothing_id']);\n\n $newPost = new Post($postR['post_id'], $sth2Res['user_login'],$postR['post_title'], $postR['post_description'], $clothes, $postR['user_id']);\n array_push($postReponse, $newPost);\n\n }\n return $postReponse;\n } else {\n return false;\n }\n }" ]
[ "0.62769467", "0.6089584", "0.6052168", "0.60327053", "0.5960881", "0.59533364", "0.5912412", "0.5879507", "0.5784405", "0.5783184", "0.5778848", "0.5771238", "0.57567537", "0.57340366", "0.5717962", "0.5692854", "0.55937564", "0.5568941", "0.5544715", "0.5531405", "0.5507895", "0.54891497", "0.54740876", "0.5469344", "0.54616946", "0.5460474", "0.5450189", "0.5410502", "0.5408891", "0.5391305", "0.53782463", "0.5367526", "0.5361573", "0.5353728", "0.5352319", "0.53515", "0.5350723", "0.5327525", "0.5316441", "0.5314978", "0.5313492", "0.5308862", "0.53088564", "0.52836406", "0.5275497", "0.5270522", "0.5268923", "0.5268389", "0.52668715", "0.5259381", "0.52583206", "0.52345335", "0.5225107", "0.52199525", "0.5214951", "0.52146834", "0.52075756", "0.520322", "0.51808846", "0.5179881", "0.5173031", "0.5171663", "0.51702005", "0.51586735", "0.5156813", "0.51556665", "0.51482356", "0.51371247", "0.51351756", "0.5134702", "0.51315606", "0.51314765", "0.5131234", "0.5126805", "0.512488", "0.51225185", "0.5120782", "0.5120563", "0.5116527", "0.51104844", "0.5110477", "0.5104268", "0.5101511", "0.50985694", "0.5089588", "0.5085817", "0.50762", "0.50736195", "0.5067612", "0.50591207", "0.50590587", "0.50566113", "0.5050531", "0.5046849", "0.504289", "0.5038112", "0.5031748", "0.5025519", "0.5024562", "0.50221384" ]
0.53311354
37
Add header to the request
public function setHeader($name = NULL, $val = NULL) { if (empty ( $name )) return false; $this->request_headers [str_replace ( ' ', '-', ucwords ( str_replace ( '-', ' ', $name ) ) )] = $val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHeader()\n {\n }", "public function add_header() {\n }", "public function addHeader($header);", "function httpHeader($header) {\r\n\t\t$this->customHeaders[] = $header;\r\n\t}", "public function addRequestHeader($key, $value)\r\r\n {\r\r\n $this->requestHeaders[$key] = $value;\r\r\n }", "public function addHeader($name, $value);", "public function addHeader($name, $value);", "public function addHeader($header){\n\t\theader($header);\n\t}", "function add_header($key, $value) {\n $this->headers[$key] = $value;\n return $this;\n }", "protected function setCurlHeaderElement() {\n // set header for cur\n $this->header[] = 'Content-type: application/json';\n $this->header[] = 'Authorization: Bearer '.$this->accessToken;\n }", "public function header($header)\n {\n $this->headers[] = $header;\n }", "public function addRequestHeader($key, $value)\n {\n $this->headers[$key] = $value;\n }", "function addHeader( $header )\n\t\t{\n\t\t\tif( is_string( $header ))\n\t\t\t{\n\t\t\t\t$this->_requestHeaders[] = (string) $header;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidArgumentException(\"Argument 1 passed to \".get_class($this).\"::setRequestHeader() must be a string\");\n\t\t\t}\n\t\t}", "public function addHeaders($headers) {}", "public function add_header($key, $value)\n {\n }", "public static function addHeader($header)\n {\n self::$legacyHeaders[] = $header;\n }", "function setHeader($header)\t{\n\t\tif(isset($header))\t{\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $header);\n\t\t}\n\t\telse {\n\t\t\techo \"** Expecting header.\\n\";\n\t\t}\n\t}", "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "public function addHeader($header)\n\t{\n\t\theader($header);\n\t}", "public function addHeader($header) {\n\t\t$this->headers .= $header.\"\\n\";\n\n\t\treturn $this;\n\t}", "public static function addHeader($header)\n {\n header($header, false);\n }", "public function withAddedHeader($name, $value)\n {\n }", "public function withAddedHeader($name, $value)\n {\n }", "public function addToHeader(string $header, string $content): ResponseInterface;", "function addHeader( $headerName, $headerValue )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"addHeader( $headerName, $headerValue )\\n\";\r\n\t\t$this->requestHeaders[$headerName] = $headerValue;\r\n\t}", "public function addHeader($header, $value): Request\n {\n $this->outputHeaders[$header] = $value;\n\n return $this;\n }", "public static function addHeader($header)\n {\n self::$headers[] = $header;\n }", "public function add_header( $header )\n\t{\n\t\tif ( is_array( $header ) ) {\n\t\t\t$this->headers = array_merge( $this->headers, $header );\n\t\t}\n\t\telse {\n\t\t\tlist( $k, $v )= explode( ': ', $header );\n\t\t\t$this->headers[$k] = $v;\n\t\t}\n\t}", "public function buildAuthorizationHeader ()\n {\n $this->addHeader('Authorization', 'Basic ' . base64_encode($this->clientId . ':' . $this->clientSecret));\n $this->is_preauthorized_request = 1;\n }", "public function setHeader($header);", "public function addHeader($key, $value)\n {\n $this->headers[$key] = $value;\n }", "public function addHeader($key, $value) {\r\n $this->headers[$key] = $value;\r\n }", "public function buildAccessHeader ()\n {\n $this->is_preauthorized_request = 0;\n if ($this->IsAccessParams())\n $this->addHeader('Authorization', $this->token_type . ' ' . $this->access_token);\n\n }", "public function addHeader($name,$value){\n $_SERVER['HTTP_'.strtoupper(str_replace('-','_',$name))]=$value;\n return $this;\n }", "function modify_request($request) {\n\n $request->withAddedHeader('callback', $request->callback);\n $request->withAddedHeader('meta', $request->meta);\n\n return $request;\n}", "private function addCommonHeader()\r\n {\r\n $this->response->headers['Allow'] = 'OPTIONS,GET,HEAD,POST,PATCH';\r\n $this->response->headers['Access-Control-Allow-Methods']='OPTIONS,GET,HEAD,POST,PATCH';\r\n $this->response->headers['Access-Control-Allow-Origin']='*';\r\n $this->response->headers['Access-Control-Allow-Headers']= 'Origin, X-Requested-With, Content-Type, Accept, Entity-Length, Offset';\r\n $this->response->headers['Access-Control-Expose-Headers']= 'Location, Range, Content-Disposition, Offset';\r\n }", "public function addHeader(string $header) {\n\t\t$this->headers[] = $header;\n\n\t\treturn $this;\n\t}", "public function addHeader($header): CuxMailer{\n $this->_headers[] = $header;\n return $this;\n }", "public function setHeader($header = null, $value=null)\n{\n if($header && !is_null($value))\n {\n $header .= ': '. $value;\n }\n array_push($this->headers, $header);\n}", "private function setHeaderInformation()\n {\n $this->header = new \\stdClass();\n $request \t= \\Yii::$app->request;\n $requestHeaders = $request->getHeaders();\n foreach ($this->headerKey as $key => $value) {\n if ($requestHeaders->offsetExists($value)) {\n $this->header->$value = $requestHeaders->get($value);\n $this->header->status =200;\n } else {\n $this->header->status =500;\n yii::error('Header '.$value.\" is missing\", 'api_request');\n break;\n }\n }\n }", "public function withHeader($name, $value)\n {\n }", "public function addHeader($name, $value)\n {\n $this->getRequest()->addHeader($name, $value);\n }", "public function alter_header()\n\t{\n\t\theader(\"HTTP/1.0 $this->code $this->title\");\n\t}", "private static function setHeaders()\n {\n header('X-Powered-By: Intellivoid-API');\n header('X-Server-Version: 2.0');\n header('X-Organization: Intellivoid Technologies');\n header('X-Author: Zi Xing Narrakas');\n header('X-Request-ID: ' . self::$ReferenceCode);\n }", "public function headerCallback($arrAdd);", "public function addHeader($name, $value) {\n $this->customHeader[$name]= $value;\n }", "protected function set_headers()\n\t{\n\t\tif($this->headers_required) { \n\n\t\t\t$this->headers = [\n\t\t\t \n\t\t\t\t'Authorization: '. $_SESSION['token'] .'',\n\t\t\t];\n\n\t\t}\n\n\t}", "public function addHeaders(array $headers) {}", "public function setHeader($header) {\n $this->gz = (is_array($header) && in_array(\"Accept-Encoding: gzip\",$header));\n\n return curl_setopt($this->ch,CURLOPT_HTTPHEADER,$header);\n }", "public function addHeaders(Response $response = null);", "public function addHeader($key, $value, $type)\n {\n }", "public function withAddedHeader($header, $value)\n {\n $request = clone $this;\n $keep_headers = [];\n $found = false;\n foreach ($request->headers as $name => $headers) {\n if (strtolower($name) !== strtolower($header)) {\n $keep_headers[$name] = $headers;\n } else {\n $keep_headers[$name] = array_merge($request->headers[$name], is_array($value) ? $value : [(string)$value]);\n $found = true;\n }\n }\n if (!$found) {\n $keep_headers[$header] = is_array($value) ? $value : [(string)$value];\n }\n $request->headers = $keep_headers;\n\n return $request;\n }", "abstract public function SetHeaders();", "public function withAddedHeader($name, $value)\r\n {\r\n // TODO: Implement withAddedHeader() method.\r\n }", "public function withHeader(string $name, string $value): RequestInterface;", "public function setHeader($name, $value) {}", "public static function set_headers()\n {\n }", "public function setHeader($key,$val){ return $this->headers->set($key,$val); }", "public function addHeader()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/header.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/header.php\");\n }\n }", "function setHeader($headerName, $headerValue){ \n if(!isset($this->requestHeaders)){\n $this->requestHeaders = array($headerName => $headerValue);\n }else{\n if (array_key_exists ($headerName, $this->requestHeaders )){\n $this->requestHeaders[$headerName] = array_merge($this->requestHeaders[$headerName],$headerValue);\n }else{\n $this->requestHeaders[$headerName] = $headerValue;\n }\n \n }\n $headers = array();\n foreach($this->requestHeaders as $key => $values){\n array_push($headers, new SoapHeader(\"urn:QueryService2\", $key, new SoapVar($values, SOAP_ENC_OBJECT),false));\n } \n \n $this->soapHeaders = $headers;\n\t}", "public function withAddedHeader($name, $value)\n {\n // TODO: Implement withAddedHeader() method.\n }", "public function set_header($header, $value);", "public function configureHeaders ()\n {\n $config = $this->app->config('github');\n\n $headers = array(\n 'Accept: application/vnd.github.v3+json',\n sprintf('User-Agent: %s', $config['handle'])\n );\n\n $this->addHeaders($headers);\n }", "public function add_headers($header)\n\t{\n\t\tif (is_string($header)) \n\t\t\t$this->headers[] = $header;\n\n\t\treturn $this;\n\t}", "static public function addAdditionalHeader($new_header) {\n\t\tif (is_array($new_header)) {\n\t\t\tself::$additional_headers = array_merge(self::$additional_headers, $new_header);\n\t\t} else {\n self::$additional_headers[] = (string)trim($new_header);\n }\n\t}", "public function addHeader($name, $value)\n {\n // normalize header names in case of 'Content-type' into 'Content-Type'\n $name = str_replace(' ', '-', ucwords(str_replace('-', ' ', $name)));\n\n $this->headers[$name] = $value;\n }", "private function setHttpHeader($token = null){\n\t\t$ApiReqDetail['header']['Content-Type'] = HEADER_TYPE;\n\t\t$ApiReqDetail['header']['Accept'] = HEADER_TYPE;\n\t\treturn $ApiReqDetail;\n\t}", "public function andHeader(string $name, mixed $value): RequestInterface;", "protected function makeHeader()\n {\n }", "public function addHeader(string $key, $value)\n {\n $this->headers[$key] = $value;\n return $this;\n }", "public function setHeaders()\n {\n }", "private function setHeaders() {\n // Data required for the token request\n $data = array(\n 'client_id' => $this->client_id,\n 'sign' => $this->calcSign($this->client_id, $this->secret, $this->getTime()),\n 't' => $this->getTime(),\n 'sign_method' => 'HMAC-SHA256',\n 'Content-Type' => 'application/json'\n );\n // If we have an access token, include it in the request\n if($this->access_token !== '') {\n $data['access_token'] = $this->access_token;\n }\n // Create a $dataHeaders array and assign it with colon separated key value pairs\n $dataHeaders = array();\n foreach($data as $k => $d) {\n $dataHeaders[] = \"$k:$d\";\n }\n return $dataHeaders;\n }", "public function setHeaders(array $header) {}", "public function addHeader(EventInterface $event)\n {\n $request = $event->getRequest();\n $response = $event->getResponse();\n\n $user = $request->getUser();\n $imageIdentifier = $response->getModel()->getImageIdentifier();\n\n $response->headers->set(\n $this->header,\n [\n 'imbo;image;' . $user . ';' . $imageIdentifier,\n 'imbo;user;' . $user,\n ],\n );\n }", "private function compileHeader()\n\t\t{\n\t\t\t$query = @$this->getUrl(\"query\");\n\t\t\t$url = $this->getUrl(\"path\") . ($query == null ? null : \"?{$query}\");\n\t\t\t\n\t\t\t// Set data length\n\t\t\tif(($length = strlen($this->getBody())) > 0)\n\t\t\t\t$this->_headers->set(new HttpHeaderItem(\"Content-Length\", $length));\n\t\t\t\n\t\t\t// Sort and build header\n\t\t\t$headers = $this->convertHeadersToAssocArray($this->_headers);\n\t\t\tarsort($headers);\n\t\t\t\n\t\t\t$header = $this->getMethod() . \" {$url} \" . $this->getProtocolVersion() . self::HTTP_SEPERATOR;\n\t\t\t$header .= $this->mergeAssocArray(\": \", self::HTTP_SEPERATOR, $headers);\n\t\t\t\n\t\t\t// Return generated header\n\t\t\treturn $header . self::HTTP_DOUBLE_SEPERATOR;\n\t\t}", "public function addHeaders(array $headers, $append = null) {}", "function set_additional_headers()\n {\n $this->AdditionalHeaders = array (\n 'From' => $this->FromName . '< ' . $this->FromAddress . ' >' . $this->LF,\n 'Reply-To' => $this->ReplyTo . $this->LF,\n 'Return-Path' => $this->ReturnPath . $this->LF,\n 'X-Sender' => $this->SenderName . '< ' . $this->SenderAddress . ' >' . $this->LF,\n 'X-Mailer' => $this->XMailer . $this->LF,\n 'X-Priority' => $this->Priority . $this->LF,\n 'Content-Type' => $this->ContentType . '; ' . 'charset=' . $this->CharSet . $this->LF,\n 'MIME-Version' => $this->MimeVersion . $this->LF,\n ); \n }", "public function addHeader($name, $value)\n {\n $this->_headers[$name] = $value;\n }", "public function setHeader($name, $value);", "public function setHeader($name, $value);", "abstract public function header($name, $value);", "public function setHeaders() {\r\n\t\t$this->resource->setHeaders();\r\n\t}", "public function withHeader($header = null, $value=null)\n{\n $this->setHeader($header, $value);\n return $this;\n}", "public function addHeader($name,$required,$data) {\n\n $this->amfResponse->addHeader(array('name'=>$name,'required'=>$required==true,'data'=>$data));\n\n }", "public function ajax_header_add()\n {\n }", "protected function addAuthorization()\n {\n\n $username = $this->getUsername();\n $auth_type = $this->getAuthType();\n $this->addHeader([\n 'Authorization' => ( $auth_type == 'hash')\n ? 'WHM ' . $username . ':' . preg_replace(\"'(\\r|\\n|\\s|\\t)'\", '', $this->getPassword())\n :\n (\n ( $auth_type == 'password')\n ? 'Basic ' . base64_encode($username . ':' .$this->getPassword())\n : null\n )\n ]);\n\n return $this;\n }", "public function setHttpHeaders() {\n $this->_httpHeaders[] = \"Content-Type: application/json\";\n parent::setHttpHeaders();\n }", "public function populate_headers() {\n // If header is already defined, return it immediately\n if (!empty($this->headers)) {\n return;\n }\n\n // In Apache, you can simply call apache_request_headers()\n if (function_exists('apache_request_headers')) {\n $this->headers = apache_request_headers();\n } else {\n isset($_SERVER['CONTENT_TYPE']) && $this->headers['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $val) {\n if (sscanf($key, 'HTTP_%s', $header) === 1) {\n // take SOME_HEADER and turn it into Some-Header\n $header = str_replace('_', ' ', strtolower($header));\n $header = str_replace(' ', '-', ucwords($header));\n\n $this->headers[$header] = $val;\n $this->header_map[strtolower($header)] = $header;\n }\n }\n }\n\n }", "public static function appendCustomAuthParams($request)\r\n {\r\n // TODO: Add your custom authentication here\r\n\t\t// The following properties are available to use\r\n\t\t// Configuration::$contentType\r\n\t\t// Configuration::$appId\r\n\t\t// Configuration::$appKey\r\n\t\t// \r\n\t\t// ie. Add a header through:\r\n\t\t// $request.headers(array(\"key\" => \"value\"));\r\n }", "function header($string, $replace = true, $http_response_code = null)\n{\n HeaderStack::push(\n [\n 'header' => $string,\n 'replace' => $replace,\n 'status_code' => $http_response_code,\n ]\n );\n}", "public function getRequestHeader($http_method, $url, $extra_parameters = '') {}", "public static function getHeader(&$headers)\n {\n $headers['Authorization'] = 'Bearer '.self::getToken();\n }", "protected function header($header) {\r\n\t\theader($header);\r\n\t}", "protected function add_header($name, $value)\n\t{\n\t\tforeach ($this->_headers as $k=>$v) {\n\t\t\tif (strtolower($k) == strtolower($name)) {\n\t\t\t\t$this->_headers[$k] = $value;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$this->_headers[$name] = $value;\n\t}", "public function set_header($key, $value)\n {\n }", "function rest_send_allow_header($response, $server, $request)\n {\n }", "function _setHeaders(){\n header(\"HTTP/1.1 \" . $this->CodeHTTP . \" \" . $this->_getStatusMessage());\n header(\"Content-Type: $this->ContentType\");\n }", "public function addHeader(string $name, string $value)\n {\n $this->headers[$name] = $value;\n }", "public function header($string)\n\t{\n\t\t$this->headers[] = $string;\n\t}", "public function withHeader(string $header) {\n $this->header = $header;\n return $this;\n }", "public function addHeader(string $header, string $value)\n {\n $this->mailObj->addCustomHeader($header, $value);\n }" ]
[ "0.77968377", "0.77728605", "0.7669406", "0.72939134", "0.72216576", "0.71436906", "0.71436906", "0.70582294", "0.7056862", "0.70178545", "0.7007909", "0.69837666", "0.69442624", "0.6941404", "0.6925629", "0.683224", "0.6816298", "0.68114066", "0.67551017", "0.67342883", "0.6720953", "0.6712499", "0.6712499", "0.6702731", "0.6681523", "0.6643469", "0.663616", "0.66327494", "0.66046536", "0.6597153", "0.6582628", "0.65519595", "0.6539417", "0.65257317", "0.6520935", "0.6510326", "0.6508398", "0.64798564", "0.6470485", "0.64698213", "0.64615864", "0.6432331", "0.64023036", "0.6400101", "0.6389523", "0.6388749", "0.6383594", "0.6381638", "0.63463503", "0.6344648", "0.63443977", "0.63299227", "0.63241816", "0.63209313", "0.631259", "0.6284998", "0.6277386", "0.62641084", "0.62517697", "0.6248858", "0.6227378", "0.62220997", "0.6217872", "0.6216715", "0.6215964", "0.62009656", "0.6200925", "0.6198405", "0.61864275", "0.6185478", "0.61828285", "0.6179524", "0.6176121", "0.61691", "0.6163505", "0.6157224", "0.61493677", "0.6143423", "0.6132306", "0.6132306", "0.6120941", "0.6108068", "0.6106282", "0.6101919", "0.60984445", "0.60853547", "0.6060534", "0.60547477", "0.6041491", "0.60382944", "0.6026415", "0.60128015", "0.60058147", "0.5999632", "0.5997194", "0.599521", "0.5979192", "0.5977257", "0.5973499", "0.59661937", "0.59589106" ]
0.0
-1
Add headers to the request
public function setHeaders($headers = NULL, $over = FALSE) { if ($over) { $this->request_headers = $headers; return true; } if (empty ( $headers )) return false; foreach ($headers as $name => $val) { $this->setHeader($name, $val); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHeaders($headers) {}", "public function add_header() {\n }", "public function addHeader()\n {\n }", "public function addHeaders(array $headers) {}", "private function setHeaders() {\n // Data required for the token request\n $data = array(\n 'client_id' => $this->client_id,\n 'sign' => $this->calcSign($this->client_id, $this->secret, $this->getTime()),\n 't' => $this->getTime(),\n 'sign_method' => 'HMAC-SHA256',\n 'Content-Type' => 'application/json'\n );\n // If we have an access token, include it in the request\n if($this->access_token !== '') {\n $data['access_token'] = $this->access_token;\n }\n // Create a $dataHeaders array and assign it with colon separated key value pairs\n $dataHeaders = array();\n foreach($data as $k => $d) {\n $dataHeaders[] = \"$k:$d\";\n }\n return $dataHeaders;\n }", "public function setHeaders() {\r\n\t\t$this->resource->setHeaders();\r\n\t}", "public function configureHeaders ()\n {\n $config = $this->app->config('github');\n\n $headers = array(\n 'Accept: application/vnd.github.v3+json',\n sprintf('User-Agent: %s', $config['handle'])\n );\n\n $this->addHeaders($headers);\n }", "public function setHttpHeaders() {\n $this->_httpHeaders[] = \"Content-Type: application/json\";\n parent::setHttpHeaders();\n }", "public static function set_headers()\n {\n }", "protected function set_headers()\n\t{\n\t\tif($this->headers_required) { \n\n\t\t\t$this->headers = [\n\t\t\t \n\t\t\t\t'Authorization: '. $_SESSION['token'] .'',\n\t\t\t];\n\n\t\t}\n\n\t}", "public function setHeaders()\n {\n }", "protected function setCurlHeaderElement() {\n // set header for cur\n $this->header[] = 'Content-type: application/json';\n $this->header[] = 'Authorization: Bearer '.$this->accessToken;\n }", "public function addHeader($header);", "function httpHeader($header) {\r\n\t\t$this->customHeaders[] = $header;\r\n\t}", "abstract public function SetHeaders();", "private function addCommonHeader()\r\n {\r\n $this->response->headers['Allow'] = 'OPTIONS,GET,HEAD,POST,PATCH';\r\n $this->response->headers['Access-Control-Allow-Methods']='OPTIONS,GET,HEAD,POST,PATCH';\r\n $this->response->headers['Access-Control-Allow-Origin']='*';\r\n $this->response->headers['Access-Control-Allow-Headers']= 'Origin, X-Requested-With, Content-Type, Accept, Entity-Length, Offset';\r\n $this->response->headers['Access-Control-Expose-Headers']= 'Location, Range, Content-Disposition, Offset';\r\n }", "private static function setHeaders()\n {\n header('X-Powered-By: Intellivoid-API');\n header('X-Server-Version: 2.0');\n header('X-Organization: Intellivoid Technologies');\n header('X-Author: Zi Xing Narrakas');\n header('X-Request-ID: ' . self::$ReferenceCode);\n }", "function set_additional_headers()\n {\n $this->AdditionalHeaders = array (\n 'From' => $this->FromName . '< ' . $this->FromAddress . ' >' . $this->LF,\n 'Reply-To' => $this->ReplyTo . $this->LF,\n 'Return-Path' => $this->ReturnPath . $this->LF,\n 'X-Sender' => $this->SenderName . '< ' . $this->SenderAddress . ' >' . $this->LF,\n 'X-Mailer' => $this->XMailer . $this->LF,\n 'X-Priority' => $this->Priority . $this->LF,\n 'Content-Type' => $this->ContentType . '; ' . 'charset=' . $this->CharSet . $this->LF,\n 'MIME-Version' => $this->MimeVersion . $this->LF,\n ); \n }", "public function getRequestHeaders();", "public function setRequestHeaders($requestHeaders);", "public function addHeaders($headers)\n {\n $this->headers = array_merge($this->headers, $headers);\n }", "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "public function sendHttpHeaders() {}", "public function addHeaders(array $headers, $append = null) {}", "public function addRequestHeader($key, $value)\r\r\n {\r\r\n $this->requestHeaders[$key] = $value;\r\r\n }", "private function setHeaderInformation()\n {\n $this->header = new \\stdClass();\n $request \t= \\Yii::$app->request;\n $requestHeaders = $request->getHeaders();\n foreach ($this->headerKey as $key => $value) {\n if ($requestHeaders->offsetExists($value)) {\n $this->header->$value = $requestHeaders->get($value);\n $this->header->status =200;\n } else {\n $this->header->status =500;\n yii::error('Header '.$value.\" is missing\", 'api_request');\n break;\n }\n }\n }", "function add_header($key, $value) {\n $this->headers[$key] = $value;\n return $this;\n }", "public function populate_headers() {\n // If header is already defined, return it immediately\n if (!empty($this->headers)) {\n return;\n }\n\n // In Apache, you can simply call apache_request_headers()\n if (function_exists('apache_request_headers')) {\n $this->headers = apache_request_headers();\n } else {\n isset($_SERVER['CONTENT_TYPE']) && $this->headers['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $val) {\n if (sscanf($key, 'HTTP_%s', $header) === 1) {\n // take SOME_HEADER and turn it into Some-Header\n $header = str_replace('_', ' ', strtolower($header));\n $header = str_replace(' ', '-', ucwords($header));\n\n $this->headers[$header] = $val;\n $this->header_map[strtolower($header)] = $header;\n }\n }\n }\n\n }", "function _setHeaders(){\n header(\"HTTP/1.1 \" . $this->CodeHTTP . \" \" . $this->_getStatusMessage());\n header(\"Content-Type: $this->ContentType\");\n }", "public static function getRequestHeaders() {}", "public function addHeaders(Response $response = null);", "function setHeaders()\n {\n header('Content-type: application/json');\n\n // Calculate Expires Headers if set to > 0\n $expires = $this->grav['config']->get('system.pages.expires');\n if ($expires > 0) {\n $expires_date = gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT';\n header('Cache-Control: max-age=' . $expires);\n header('Expires: '. $expires_date);\n }\n }", "function headers()\n {\n foreach ($this->headers as $rule => $arg) {\n header($rule . ': ' . $arg);\n }\n }", "public function sendHeaders() {}", "private function headers()\n {\n $headers = '';\n foreach (config('cors.headers') as $header) {\n $headers = $headers . $header . ', ';\n }\n header('Access-Control-Allow-Headers: ' . $headers);\n }", "function modify_request($request) {\n\n $request->withAddedHeader('callback', $request->callback);\n $request->withAddedHeader('meta', $request->meta);\n\n return $request;\n}", "public function setHeaders() : void {\n $this->setCacheHeaders();\n }", "public function addHeader($name, $value);", "public function addHeader($name, $value);", "public function addRequestHeader($key, $value)\n {\n $this->headers[$key] = $value;\n }", "public function send_headers()\n {\n }", "public function addTempContentHttpHeaders() {}", "private function addHeaders($Resource, $headers) {\n $httpHeaders = array();\n foreach ($headers as $header => $value) {\n $httpHeaders[] = $header . ': ' . $value;\n }\n curl_setopt($Resource, CURLOPT_HTTPHEADER, $httpHeaders);\n }", "public function setHeaders(array $header) {}", "public static function getHeader(&$headers)\n {\n $headers['Authorization'] = 'Bearer '.self::getToken();\n }", "public function add_headers( $headers )\n\t{\n\t\tforeach ( $headers as $header ) {\n\t\t\t$this->add_header( $header );\n\t\t}\n\t}", "public function header($header)\n {\n $this->headers[] = $header;\n }", "public function setHeaders() {\n\t\tif($_SERVER['REQUEST_METHOD'] == \"OPTIONS\") {\n\t\t\t// if($_SERVER['HTTP_ORIGIN'] == \"https://cpbphotography.com\" || $_SERVER['HTTP_ORIGIN'] == \"http://cpbphotography.com\") {\n\t\t\tif($_SERVER['HTTP_ORIGIN'] == \"http://localhost:8080\") {\n\t\t\t\theader('Access-Control-Allow-Origin: *');\n\t\t\t\theader('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');\n\t\t\t\theader('Access-Control-Allow-Headers: Access-Control-Allow-Origin, Access-Control-Allow-Headers, Origin, X-Requested-With, Content-Type, X-Auth-Token, Authorization');\n\t\t\t\theader('Access-Control-Max-Age: 1728000');\n\t\t\t\theader(\"Content-Length: 0\");\n\t\t\t\theader('Access-Control-Allow-Credentials: true');\n\t\t\t\texit(0);\n\t\t\t} else {\n\t\t\t header(\"HTTP/1.1 403 Access Forbidden\");\n\t\t\t header(\"Content-Type: text/plain\");\n\t\t\t echo \"You cannot repeat this request\";\n\t\t\t}\n\n\t\t}\n\t\theader('Access-Control-Allow-Origin: *');\n\t\theader(\"Access-Control-Allow-Credentials: true\");\n\t\theader('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');\n\t\theader('Access-Control-Max-Age: 1000');\n\t\theader('Access-Control-Allow-Headers: Access-Control-Allow-Origin, Access-Control-Allow-Headers, Origin, X-Requested-With, Content-Type, X-Auth-Token, Authorization');\n\n\t\theader('Content-Type: application/json');\n\t}", "public function buildAuthorizationHeader ()\n {\n $this->addHeader('Authorization', 'Basic ' . base64_encode($this->clientId . ':' . $this->clientSecret));\n $this->is_preauthorized_request = 1;\n }", "private function _sendPrimaryHeaders() {\n\t\theader(\"Access-Control-Allow-Origin: \".Environment::$api->allowOrigin);\n\t\theader(\"Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS\");\n\t\theader(\"Access-Control-Allow-Headers: Origin, Content-Type, Authorization, X-Custom-Auth\");\t\n\t}", "public function appendHeaders($headers = [])\n {\n //Append headers\n $this->headers = collect($this->headers)->merge($headers)->all();\n //Return calling object\n return $this;\n }", "public function addHeader($header) {\n\t\t$this->headers .= $header.\"\\n\";\n\n\t\treturn $this;\n\t}", "public function add_header($key, $value)\n {\n }", "private function setCurlHeaders($nontoken_request = true)\n\t{\n\t\t// we'll always use a session id\n\t\t$this->curl_headers = array\n\t\t(\n\t\t\t\"Cookie: PHPSESSID=\" . $this->session_id\n\t\t);\n\t\t\n\t\t// for requests that don't involve grabbing a token, we need to provide some extra data\n\t\tif ($nontoken_request)\n\t\t{\n\t\t\t$this->curl_headers[] = \"Authorization: \" . $this->authorization;\n\t\t\t$this->curl_headers[] = \"Content-Type: multipart/form-data; charset=utf-8;\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->curl_headers[] = \"Content-Type: application/json; charset=utf-8\";\n\t\t}\n\t}", "private function _setHeaders(){\n\t\t// Specify domains from which requests are allowed\n\t\theader('Access-Control-Allow-Origin: *');\n\n\t\t// Specify which request methods are allowed\n\t\theader('Access-Control-Allow-Methods: GET, POST, OPTIONS');\n\n\t\t// Additional headers which may be sent along with the CORS request\n\t\t// The X-Requested-With header allows jQuery requests to go through\n\t\theader('Access-Control-Allow-Headers: X-Requested-With');\n\t}", "public function addToHeader(string $header, string $content): ResponseInterface;", "public function addHeader($header){\n\t\theader($header);\n\t}", "protected function sendHeaders()\n {\n $statusCode = $this->getStatusCode();\n $this->swoole_http_response->status($statusCode);\n if ($this->_headers) {\n $headers = $this->getHeaders();\n foreach ($headers as $name => $values) {\n // Swoole底层不允许设置相同$key的Http头\n $this->swoole_http_response->header($name, end($values));\n }\n }\n $this->sendCookies();\n }", "public function populateHeaders(): void\n\t{\n\t\t$contentType = $_SERVER['CONTENT_TYPE'] ?? getenv('CONTENT_TYPE');\n\t\tif (! empty($contentType))\n\t\t{\n\t\t\t$this->setHeader('Content-Type', $contentType);\n\t\t}\n\t\tunset($contentType);\n\n\t\tforeach ($_SERVER as $key => $val)\n\t\t{\n\t\t\tif (sscanf($key, 'HTTP_%s', $header) === 1)\n\t\t\t{\n\t\t\t\t// take SOME_HEADER and turn it into Some-Header\n\t\t\t\t$header = str_replace('_', ' ', strtolower($header));\n\t\t\t\t$header = str_replace(' ', '-', ucwords($header));\n\n\t\t\t\t$this->setHeader($header, $_SERVER[$key]);\n\n\t\t\t\t// Add us to the header map so we can find them case-insensitively\n\t\t\t\t$this->headerMap[strtolower($header)] = $header;\n\t\t\t}\n\t\t}\n\t}", "function http_auth_headers() {\n\t\tif($this->http_user || $this->http_pass):\n\t\t\t$this->http_headers_add('Authorization', \" Basic \".base64_encode($this->http_user . \":\" . $this->http_pass));\n\t\tendif;\n\t}", "function setHeader($header)\t{\n\t\tif(isset($header))\t{\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $header);\n\t\t}\n\t\telse {\n\t\t\techo \"** Expecting header.\\n\";\n\t\t}\n\t}", "protected function getHeaders(): array\n {\n return ['Content-Type' => 'application/json'];\n }", "public function setHttpHeaders() {\n $this->_httpHeaders[] = \"Content-Type: application/x-yaml\";\n parent::setHttpHeaders();\n }", "public function sendHeaders()\n {\n \tforeach ($this->headers as $directive => $value) {\n \t\t\\header($directive.': '.$value);\n \t}\n }", "public function add_headers($header)\n\t{\n\t\tif (is_string($header)) \n\t\t\t$this->headers[] = $header;\n\n\t\treturn $this;\n\t}", "public function addHeaders(array $headers) {\n $this->headers = array_merge($this->headers, $headers);\n }", "protected function setRequestHeaders() \n {\n $headers = [];\n\n foreach ($this->headerManager->get() as $key => $value) {\n $headers[] = $key . ': ' . $value;\n }\n\n $this->optionManager->set('HTTPHEADER', $headers);\n\n return $this;\n }", "public function addHeaders(array $headers) {\n foreach ($headers as $name => $value) {\n $this->headers[strtolower($name)] = $value;\n }\n return $this;\n }", "protected function addAuthorization()\n {\n\n $username = $this->getUsername();\n $auth_type = $this->getAuthType();\n $this->addHeader([\n 'Authorization' => ( $auth_type == 'hash')\n ? 'WHM ' . $username . ':' . preg_replace(\"'(\\r|\\n|\\s|\\t)'\", '', $this->getPassword())\n :\n (\n ( $auth_type == 'password')\n ? 'Basic ' . base64_encode($username . ':' .$this->getPassword())\n : null\n )\n ]);\n\n return $this;\n }", "protected function cleanHeaders()\n {\n //Clean up header\n $this->headers = ['Accept' => 'application/json'];\n }", "function http_build_request_headers()\n\t{\n\t\t$this->http_auth_headers();\n\t\t$this->http_headers_add('Connection', \"Close{$this->http_linebreak}\");\n\t\t$request = $this->http_headers_to_s($this->http_request_headers);\n\t\t$this->http_request_headers = array();\n\n\t\treturn $request;\n\t}", "public function buildAccessHeader ()\n {\n $this->is_preauthorized_request = 0;\n if ($this->IsAccessParams())\n $this->addHeader('Authorization', $this->token_type . ' ' . $this->access_token);\n\n }", "public function withAddedHeader($name, $value)\n {\n }", "public function withAddedHeader($name, $value)\n {\n }", "private function prepareHeaders ()\n {\n $this->addHeader('X-Mailer', $this->mailer);\n\n if (!empty($this->replyTo)) {\n $this->addHeader('Reply-To', $this->replyTo);\n }\n }", "public function before_request(&$url, &$headers, &$data, &$type, &$options)\n {\n $headers['Authorization'] = 'Basic '.base64_encode($this->token.':'.$this->key);\n }", "public static function headers()\n {\n return array('Content-Type: application/json');\n }", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "public function setRequestData()\n {\n $this->setHeaderInformation();\n }", "function setDefaultHeaders() {\r\n //CORS\r\n header(\"Access-Control-Allow-Origin: *\");\r\n //content type\r\n header(\"Content-Type: application/json-rpc\");\r\n }", "function addHeader( $header )\n\t\t{\n\t\t\tif( is_string( $header ))\n\t\t\t{\n\t\t\t\t$this->_requestHeaders[] = (string) $header;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidArgumentException(\"Argument 1 passed to \".get_class($this).\"::setRequestHeader() must be a string\");\n\t\t\t}\n\t\t}", "private function setHeaders(){\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n header('Content-type: application/json charset=utf8');\n }", "protected function _addCustomHeaders() {\n // FIXME ExternalDesc is not into the mail..\n //$this->addHeader(\"X-Clab-SmartRelay-External\", $this->_templateId);\n //$this->addHeader(\"X-Clab-SmartRelay-ExternalDesc\", $this->_templateCode);\n\n $this->addHeader(\"X-Clab-SmartRelay-DeliveryId\", sprintf(\"%u\", $this->_crc16($this->_templateCode)));\n $this->addHeader(\"X-Clab-SmartRelay-DeliveryLabel\", $this->_templateCode);\n // Mage::log(\"Template code is: \". $this->_templateCode, null, null, true);\n }", "protected function sendAuthHeaders()\n {\n $sessionId = GlobalRequest::getSessionIdFromCookie();\n $sessionHandleKey = GlobalRequest::getSessionHandleKeyFromCookie();\n\n $this->setHeader('xa-modifier-sid', !empty($sessionId) ? $sessionId : \"null\");\n $this->setHeader('xa-modifier-shk', !empty($sessionHandleKey) ? $sessionHandleKey : \"null\");\n }", "public static function SetHeaders()\n {\n header(\"Access-Control-Allow-Origin: *\");\n header(\"Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding\");\n header(\"Access-Control-Allow-Methods:PUT, GET, POST, DELETE, OPTIONS\");\n header(\"Content-Type: application/json; charset=UTF-8\"); \n }", "public function sendHeaders()\n{\n if(!empty($this->headers))\n {\n foreach($this->headers as $header)\n {\n if(is_array($header))\n {\n foreach($header as $k => $v)\n {\n $parsed = sprintf('%s: %s', $k, $v);\n header($parsed);\n self::$stored['headers'][] = $parsed;\n }\n }else{\n header($header);\n self::$stored['headers'][] = $header;\n } \n }\n }\n}", "public function add_extra_headers() {\n\t\t$gu_extra_headers = [\n\t\t\t'RequiresWP' => 'Requires WP',\n\t\t\t'ReleaseAsset' => 'Release Asset',\n\t\t\t'PrimaryBranch' => 'Primary Branch',\n\t\t];\n\n\t\t$uri_types = [\n\t\t\t'PluginURI' => ' Plugin URI',\n\t\t\t'ThemeURI' => ' Theme URI',\n\t\t];\n\n\t\tforeach ( self::$git_servers as $server ) {\n\t\t\tforeach ( $uri_types as $uri_key => $uri_value ) {\n\t\t\t\t$gu_extra_headers[ $server . $uri_key ] = $server . $uri_value;\n\t\t\t}\n\t\t\tforeach ( self::$extra_repo_headers as $header_key => $header_value ) {\n\t\t\t\t$gu_extra_headers[ $server . $header_key ] = $server . ' ' . $header_value;\n\t\t\t}\n\t\t}\n\n\t\tself::$extra_headers = array_unique( array_merge( self::$extra_headers, $gu_extra_headers ) );\n\t\tksort( self::$extra_headers );\n\n\t\treturn self::$extra_headers;\n\t}", "public static function addHeader($header)\n {\n self::$legacyHeaders[] = $header;\n }", "public function headerCallback($arrAdd);", "private function headerWithToken()\n {\n return [\n 'Accept:application/json',\n 'Content-Type:application/json',\n 'Authorization:Bearer ' . $this->token\n ];\n }", "protected function setHeaders($token_type = null) {\n switch ($token_type) {\n case \"basic\":\n $token = base64_encode(\"{$this->config[\"keys\"][\"id\"]}:{$this->config[\"keys\"][\"secret\"]}\");\n $this->api->curl_header = array(\n \"Authorization: Basic {$token}\",\n );\n break;\n\n case \"bearer\":\n $this->api->curl_header = array(\n \"Authorization: Bearer {$this->api->access_token}\",\n );\n break;\n }\n }", "protected function makeHeader()\n {\n }", "public function enableViaHeaders()\n {\n $this->typeResponseCode = true;\n\t}", "private function setHttpHeader($token = null){\n\t\t$ApiReqDetail['header']['Content-Type'] = HEADER_TYPE;\n\t\t$ApiReqDetail['header']['Accept'] = HEADER_TYPE;\n\t\treturn $ApiReqDetail;\n\t}", "public function addHeader($name,$value){\n $_SERVER['HTTP_'.strtoupper(str_replace('-','_',$name))]=$value;\n return $this;\n }", "function register_default_headers($headers)\n {\n }", "protected function setHeaders(): void\n {\n if (empty($this->headers) === false || empty($this->data) === true) {\n return;\n }\n\n $headers = array_keys(reset($this->data));\n\n array_walk($headers, fn(&$header) => $header = ucwords(str_replace(\"_\", \" \", $header)));\n\n $this->headers = $headers;\n }", "function setHeader($headerName, $headerValue){ \n if(!isset($this->requestHeaders)){\n $this->requestHeaders = array($headerName => $headerValue);\n }else{\n if (array_key_exists ($headerName, $this->requestHeaders )){\n $this->requestHeaders[$headerName] = array_merge($this->requestHeaders[$headerName],$headerValue);\n }else{\n $this->requestHeaders[$headerName] = $headerValue;\n }\n \n }\n $headers = array();\n foreach($this->requestHeaders as $key => $values){\n array_push($headers, new SoapHeader(\"urn:QueryService2\", $key, new SoapVar($values, SOAP_ENC_OBJECT),false));\n } \n \n $this->soapHeaders = $headers;\n\t}", "public function addHeader(string $header) {\n\t\t$this->headers[] = $header;\n\n\t\treturn $this;\n\t}" ]
[ "0.75079584", "0.73494935", "0.73341805", "0.7037959", "0.70255077", "0.7019756", "0.6989091", "0.6977965", "0.689785", "0.68932885", "0.6891222", "0.68827003", "0.6816856", "0.68117565", "0.6798317", "0.6774763", "0.6764614", "0.6724314", "0.6658594", "0.6654305", "0.66324884", "0.6623671", "0.6618672", "0.6614393", "0.6571724", "0.6568797", "0.6550553", "0.65466166", "0.65440243", "0.650546", "0.6472548", "0.64698637", "0.64261574", "0.6425551", "0.64197546", "0.6397411", "0.63930523", "0.6380119", "0.6380119", "0.63746756", "0.636414", "0.6356832", "0.6317908", "0.6295703", "0.6267196", "0.6251315", "0.62267005", "0.62182355", "0.62173134", "0.6210248", "0.619641", "0.61851025", "0.6185011", "0.6178387", "0.6172274", "0.6168046", "0.61418086", "0.61145633", "0.6109753", "0.6098426", "0.60873264", "0.6079184", "0.60741293", "0.6072554", "0.6069211", "0.6066678", "0.6062885", "0.606181", "0.60563195", "0.60538477", "0.6051357", "0.6049882", "0.6044641", "0.6044641", "0.60434294", "0.60363346", "0.6030714", "0.6030586", "0.6029651", "0.6029651", "0.6024121", "0.60174", "0.6014782", "0.6014633", "0.60019016", "0.6001667", "0.5996771", "0.5993821", "0.598872", "0.59866863", "0.5984234", "0.5973371", "0.5972802", "0.5972668", "0.59693897", "0.5956967", "0.59517676", "0.5950443", "0.5943501", "0.5943418", "0.59422255" ]
0.0
-1
Set the body of the request
public function setBody($content = NULL) { if ($content == NULL) return false; $this->request_body = $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBody($body) {}", "public function setBody($body);", "public function setBody($body);", "public function setBody($s) {$this->_body = $s;}", "public function setBody($data) {\n\t\t$this->body = $data;\n\t}", "public function setBody($body)\n {\n $this->_body = $body;\n $this->_formattedRequestParams = $this->_parseFormattedRequestParameters();\n }", "function set_body($body) {\n $this->body = $body;\n return $this;\n }", "function setBody(string $body);", "public function setBody($body ){\n $this->body = $body;\n }", "public function setBody($body) {\r\n $this->body = $body;\r\n }", "abstract public function setBody();", "public function setBody($body)\r\n {\r\n $this->_body = $body;\r\n }", "public function setBody($body)\n\t{\n\t\t$this->body = $body;\n\t}", "public function setBody($body)\n {\n $this->body = $body;\n }", "public function setBody($body)\n {\n $this->_body = $body;\n }", "public function set_body( $body )\n\t{\n\t\tif ( $this->method == 'GET' ) {\n\t\t\tthrow new \\Exception( _t( 'Trying to add a request body to a GET request.' ) );\n\t\t}\n\n\t\t$this->body = $body;\n\t}", "function setBody($body) {\n\t\treturn $this->setData('body', $body);\n\t}", "public function body($body) {\n $this->body = $body;\n return $this;\n }", "public function setBody($body) {\n if (is_array($body)) {\n $this->bodyParameters = $body;\n $this->body = null;\n } elseif (is_scalar($body) || $body === null) {\n $this->body = $body;\n } else {\n throw new HttpException('Could not set the body of this request: no array or scalar value provided');\n }\n }", "function setBody($body) {\n\t\t$this->setData('body', $body);\n\t}", "public function setBody($body) {\n $this->body = $body;\n return $this;\n }", "public function setBody($body)\r\n {\r\n $this->body = $body;\r\n\r\n return $this;\r\n }", "public function setBody($body)\r\n {\r\n $this->body = $body;\r\n\r\n return $this;\r\n }", "public function setBody(string $body)\n {\n $this->body = $body;\n }", "public function setBody($data): self\n\t{\n\t\t$this->body = $data;\n\n\t\treturn $this;\n\t}", "public function setBody($val)\n {\n $this->_propDict[\"body\"] = $val;\n return $this;\n }", "public function setBody(string $body) : self\n {\n $this->initialized['body'] = true;\n $this->body = $body;\n return $this;\n }", "public function setBody(string $body) : self\n {\n $this->initialized['body'] = true;\n $this->body = $body;\n return $this;\n }", "private function setBody()\n {\n if (!$this->annotations->exists(Body::NAME)) {\n return null;\n }\n\n /** @var Body $bodyAnnotation */\n $bodyAnnotation = $this->annotations->get(Body::NAME);\n\n $parameter = $this->methodModel->getParameter($bodyAnnotation->getVariableName());\n\n $this->methodBodyBuilder->setBodyIsObject($parameter->isObject());\n $this->methodBodyBuilder->setBodyIsOptional($parameter->isOptional());\n $this->methodBodyBuilder->setBodyDefaultValue(BodyManipulator::varToString($parameter->getDefaultValue()));\n $this->methodBodyBuilder->setBodyIsJsonSerializable($bodyAnnotation->isJsonSerializable());\n $this->methodBodyBuilder->setBodyIsArray($parameter->isArray());\n $this->methodBodyBuilder->setBody($bodyAnnotation->getVariable());\n }", "public function body($body)\n {\n $this->body = $body;\n\n return $this;\n }", "function Body( $body )\r\n\t\t{\r\n\t\t$this->body= $body;\r\n\t\t}", "public function setBody($data)\n {\n $this->body = (string) $data;\n\n return $this;\n }", "public function setBody($body)\n {\n $this->body = $body;\n\n return $this;\n }", "public function setBody($body)\n {\n $this->body = $body;\n\n return $this;\n }", "public function setBody($body)\n {\n $this->body = $body;\n\n return $this;\n }", "public function setBody($body)\n {\n $this->body = $body;\n\n return $this;\n }", "public function setBody($body)\n {\n $this->body = $body;\n\n return $this;\n }", "public function setBody($body)\n {\n $this->body = $body;\n\n return $this;\n }", "public function setBody($body, $contentType = null);", "public function setBody($data) : void\r\n {\r\n $this->body[] = $data;\r\n }", "public function setBody(string $body) : self\n {\n $this->body = $body;\n return $this;\n }", "public function setBody(string $body): self\n {\n $this->body = $body;\n\n return $this;\n }", "public function body($value)\n {\n $this->body = $value;\n\n return $this;\n }", "public function setBody(StreamInterface $body);", "public function body($body = null)\r\n {\r\n if (null !== $body) {\r\n // Require that the response be unlocked before changing it\r\n $this->requireUnlocked();\r\n\r\n $this->body = (string) $body;\r\n\r\n return $this;\r\n }\r\n\r\n return $this->body;\r\n }", "public function setBody($body, $needs_encoding = True) {\n\t\t$this->body = $body;\n $this->needs_encoding = $needs_encoding;\n\t\treturn $this;\n\t}", "public function __wakeup()\n {\n $this->response->setBody($this->body);\n }", "public function setBody($body)\r\n {\r\n $this->data['event'] = $body;\r\n \r\n if ($this->deleteNewLinesFlag) {\r\n $this->deleteNewLines();\r\n }\r\n }", "public function setBody($body) {\n $this->set('body', $body, 'news');\n }", "public function setBody($var)\n {\n GPBUtil::checkString($var, False);\n $this->body = $var;\n\n return $this;\n }", "abstract public function getRequestBody();", "public function with_body($body)\n\t{\n\t\t$this->bodies = (array)$body;\n\t\treturn $this;\n\t}", "public static function getRequestBody() {}", "public function body($body);", "public function testGetBody() {\n $request = $this->createRequest();\n\n static::setInput('hello world');\n $this->assertEquals('hello world', $request->getBody());\n $this->assertEquals('hello world', $request->body);\n }", "public function setBody($responseBody)\n {\n $this->response = $responseBody;\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function setRequestBody($value)\n {\n return $this->set('RequestBody', $value);\n }", "public function set_body_params($params)\n {\n }", "private function setPostParameters(): void\n {\n $params = filter_input_array(INPUT_POST);\n\n if (!isset($params)) {\n $this->body = (object)array();\n return;\n }\n\n $this->body = $params;\n }", "public function setRequestContent()\n {\n $this->requestContent = array(\n 'method' => $this->request->getMethod(),\n 'headers' => $this->request->headers->all(),\n 'content_type' => $this->request->headers->get('content-type'),\n 'content' => array(),\n );\n\n if (strstr($this->requestContent['content_type'], 'application/x-www-form-urlencoded')) {\n $this->requestContent['content'] += $this->request->request->all();\n } elseif (strstr($this->requestContent['content_type'], 'application/json')) {\n $this->requestContent['content'] += json_decode($this->getRequest()->getContent(), true);\n } else {\n $this->requestContent['content'] += $this->request->query->all();\n }\n }", "function set_body_with_expression(BaseExpression $expression)\n\t{\n\t\t$this->body = $expression;\n\t}", "public function setResponseBody($newBody)\n\t{\n\t\tif (is_array($this->_response))\n\t\t{\n\t\t\t$this->_response['body'] = $newBody;\n\t\t}\n\t}", "public function setBody($var)\n {\n GPBUtil::checkString($var, False);\n $this->Body = $var;\n\n return $this;\n }", "public function setBody($body)\n {\n $body = Helper::sanitizeInput($body);\n $this->mail->Body = $body;\n $this->mail->AltBody = $body;\n }", "public function setRawBody($rawBody)\n {\n $this->_rawBody = $rawBody;\n }", "public function withBody(mixed $body): RequestInterface;", "function _load_body(&$app, &$c) {\n\t\t$body = $c->param('app.view_http.request.body');\n\t\tif ($body != '')\n\t\t\t$this->_http->setBody($body);\n\t}", "protected static function set_body($ch, array &$options) {\n if ($options['json'] === true) {\n $encoded = json_encode($options['data']);\n $options['headers']['Content-Type'] = 'application/json';\n } else {\n $encoded = http_build_query($options['data']);\n $options['headers']['Content-Type'] = 'application/x-www-form-urlencoded';\n }\n curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded);\n }", "public function withBody(string $content = null)\n{\n $this->setBody($content);\n return $this;\n}", "public static function getRequestBodyStream() {}", "public final function body($body = null)\n {\n if (!is_null($body))\n {\n $this->write($body, true);\n\n return $this;\n }\n\n return $this->_body;\n }", "public function body($obj){\n $data = json_encode($obj);\n\n $errno = json_last_error();\n if($errno != JSON_ERROR_NONE){\n throw new Exception(\"Error encountered encoding JSON: \" . json_last_error_message());\n }\n\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $data);\n $this->headers[] = \"Content-Type: application/json\";\n return $this;\n }", "public function resetBody()\n {\n $this->body = null;\n\n return $this;\n }", "private function storeResponseBody($body)\n\t{\n\t\t$this->_responseBody = $body;\n\t}", "public function setBody($val)\n {\n if (!is_array($val)) {\n $val = array(\n 'Body' => $val\n );\n }\n if (!isset($val['Body'])) {\n throw new Exception('The array should have an element with Body as key');\n }\n $this->original_body = $val;\n return $this;\n }", "public function setBodyAttribute($value)\n {\n $this->attributes['body'] = resolve('purifier')->clean($value);\n }", "function setBody($content)\n\t{\n\t\t/*\n\t\t * Filter the Body\n\t\t * TODO: Check for XSS\n\t\t */\n\t\t$this->Body = JMailHelper::cleanText( $content );\n\t}", "protected function _prepareBody ( ) {\n\n $this->body = $this->data['body'];\n $this->to = $this->data['to'];\n $this->from = $this->data['from'];\n $this->subject = $this->data['subject'];\n }", "public function setBodyParams($values)\n {\n $this->_bodyParams = $values;\n }", "public function setHttpBody($httpBody)\n {\n $this->httpBody = $httpBody;\n }", "public function setBody($content, $name = null)\n {\n if ((null === $name) || !is_string($name)) {\n $this->_body = ['default' => (string) $content];\n } else {\n $this->_body[$name] = (string) $content;\n }\n\n return $this;\n }", "public function body() {\n $this->body->append( func_get_args() );\n return $this;\n }", "public function setBody($body, $html = true)\n {\n $this->body = $body;\n $this->html = $html;\n\n return $this;\n }", "public function setBody($body): CuxMailer{\n $this->_body = $body;\n $this->_mail->Body = $body;\n $this->_mail->AltBody = strip_tags(str_ireplace(array(\"<br>\", \"<br/>\", \"<br />\"), \"\\r\\n\", $body));\n return $this;\n }", "function setBody($locale, $body) {\n\t\t$this->localeData[$locale]['body'] = $body;\n\t}", "public function body($body = null)\n {\n if (!is_null($body)) {\n $this->write($body, true);\n }\n\n return $this->body;\n }", "public function getBody(){\n return $this->body;\n }", "public function __construct($body) {\n parent::__construct();\n $this->setBody($body);\n }", "public function setBodyId($id) {\n $this->bodyId = \"id=\\\"$id\\\"\";\n }", "public function setBodyId($id) {\r\n $this->bodyId = \"id=\\\"$id\\\"\";\r\n }", "private function sendBody(): void\n {\n echo $this->getBody()->getContents();\n }" ]
[ "0.7830462", "0.77219665", "0.77219665", "0.7701453", "0.76812726", "0.74854785", "0.746285", "0.7426456", "0.7397397", "0.73904854", "0.7322895", "0.73193663", "0.7290011", "0.7280289", "0.72525287", "0.7245517", "0.71940565", "0.7144568", "0.71223044", "0.70837826", "0.70075303", "0.69998336", "0.69998336", "0.6991589", "0.6898905", "0.68954134", "0.68910277", "0.68910277", "0.68594784", "0.68424773", "0.6827369", "0.6812861", "0.681154", "0.681154", "0.681154", "0.681154", "0.681154", "0.681154", "0.6781041", "0.6702102", "0.6633181", "0.6630973", "0.66043305", "0.6578416", "0.65647", "0.64975524", "0.6490338", "0.6488119", "0.64810455", "0.64614964", "0.6429975", "0.6394717", "0.63820887", "0.6358323", "0.6321036", "0.63082635", "0.6304388", "0.6304388", "0.6304388", "0.6303837", "0.6303837", "0.6303837", "0.6303837", "0.6303837", "0.6300958", "0.6300958", "0.62942666", "0.6294192", "0.6278113", "0.62710315", "0.626513", "0.6221734", "0.6170326", "0.6162894", "0.61571795", "0.615168", "0.61479175", "0.6144029", "0.6142267", "0.61395544", "0.60892206", "0.6057868", "0.6053587", "0.603173", "0.6029596", "0.6028978", "0.6027879", "0.5989265", "0.5938499", "0.5915322", "0.5909337", "0.5891682", "0.58914065", "0.5885313", "0.58789027", "0.586881", "0.58539873", "0.58496773", "0.5849655", "0.58389664" ]
0.72361684
16
Send HTTP Head command
public function head($uri = NULL, $vars = NULL) { if (! empty ( $uri )) $this->uri = $uri; if (! empty ( $vars ) && is_array ( $vars )) $vars = http_build_query ( $vars ); if (empty ( $this->query )) $this->query = $vars; else if (! empty ( $vars )) $this->query .= "&" . $vars; if (! empty ( $this->query )) $this->uri .= "?" . $this->query; $this->method = "HEAD"; $this->request_body = NULL; $this->send (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Head( $uri )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Head( $uri )\\n\";\r\n\t\t$this->responseHeaders = $this->responseBody = \"\";\r\n\t\t$uri = $this->makeUri( $uri );\r\n\t\tif( $this->sendCommand( \"HEAD $uri HTTP/$this->protocolVersion\" ) )\r\n\t\t\t$this->processReply();\r\n\t\treturn $this->reply;\r\n\t}", "function head($url, $args = array()) {\n\t\t$defaults = array('method' => 'HEAD');\n\t\t$r = array_merge( $defaults, $args );\n\t\treturn $this->request($url, $r);\n\t}", "public function head($version = null)\n {\n $socket = $this->createSocket();\n $this->processHeader($socket, self::METHOD_HEAD, $version);\n $socket->write('Connection: close' . stubHTTPConnection::END_OF_LINE . stubHTTPConnection::END_OF_LINE);\n return new stubHTTPResponse($socket);\n }", "public function head($url, $query = array(), $headers = array());", "function http_head($url = null, ?array $options = null, ?array &$info = null) {}", "public function head()\n {\n $this->method = 'HEAD';\n return $this;\n }", "function head($url, $timeout = 10)\n {\n $p = parse_url($url);\n if (!isset($p['scheme'])) {\n $p = parse_url(HTTP::absoluteURI($url));\n } elseif ($p['scheme'] != 'http') {\n return HTTP::raiseError('Unsupported protocol: '. $p['scheme']);\n }\n\n $port = isset($p['port']) ? $p['port'] : 80;\n\n if (!$fp = @fsockopen($p['host'], $port, $eno, $estr, $timeout)) {\n return HTTP::raiseError(\"Connection error: $estr ($eno)\");\n }\n\n $path = !empty($p['path']) ? $p['path'] : '/';\n $path .= !empty($p['query']) ? '?' . $p['query'] : '';\n\n fputs($fp, \"HEAD $path HTTP/1.0\\r\\n\");\n fputs($fp, 'Host: ' . $p['host'] . ':' . $port . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n\n $response = rtrim(fgets($fp, 4096));\n if (preg_match(\"|^HTTP/[^\\s]*\\s(.*?)\\s|\", $response, $status)) {\n $headers['response_code'] = $status[1];\n }\n $headers['response'] = $response;\n\n while ($line = fgets($fp, 4096)) {\n if (!trim($line)) {\n break;\n }\n if (($pos = strpos($line, ':')) !== false) {\n $header = substr($line, 0, $pos);\n $value = trim(substr($line, $pos + 1));\n\n $headers[$header] = $value;\n }\n }\n fclose($fp);\n return $headers;\n }", "public function head($uri, array $headers = []): ResponseInterface;", "public function isHead()\n {\n return $this->getMethod() === 'HEAD';\n }", "private function getHead()\n {\n if ($this->location === null) {\n throw new \\DomainException('Location can\\'t be null when call '.__METHOD__);\n }\n \n $handle = curl_init();\n $custom_headers = array();\n \n curl_setopt($handle, CURLOPT_URL, $this->location);\n curl_setopt($handle, CURLOPT_FOLLOWLOCATION, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_HEADER, true);\n curl_setopt($handle, CURLOPT_NOBODY, true);\n curl_setopt($handle, CURLOPT_FAILONERROR, true);\n curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, self::TIMEOUT);\n curl_setopt($handle, CURLOPT_BUFFERSIZE, 64000);\n curl_setopt($handle, CURLOPT_HEADERFUNCTION, function($ch, $header) use (&$custom_headers){\n $headers = array();\n $extract = explode(\"\\r\\n\", $header);\n foreach ($extract as $line) {\n if (preg_match('/^([a-z0-9_-]+): (.*)$/i', $line, $matches)) {\n list($null, $key, $value) = $matches;\n $headers[$key] = trim($value);\n }\n }\n\n $custom_headers = array_merge($custom_headers, $headers);\n\n return strlen($header);\n });\n \n if (curl_exec($handle) === false) {\n throw new Exception\\Curl('Error while request HEAD into '.$this->location.' : '.curl_error($handle), curl_errno($handle));\n }\n \n $http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n \n if ($http_code !== 200) {\n throw new Exception\\BadHeader('Error while request POST - excepted HTTP Code 200 - get HTTP Code '.$http_code);\n }\n \n $info = array_merge($custom_headers, curl_getinfo($handle));\n curl_close($handle);\n \n return $info;\n }", "public function headAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "public function getIsHead()\n {\n return $this->getMethod() === 'HEAD';\n }", "protected function head($path)\n {\n $defaults = stream_context_get_options(stream_context_get_default());\n $options = $this->context;\n\n if ($this->supportsHead) {\n $options['http']['method'] = 'HEAD';\n }\n\n stream_context_set_default($options);\n\n $headers = get_headers($this->buildUrl($path), 1);\n\n stream_context_set_default($defaults);\n\n if ($headers === false || strpos($headers[0], ' 200') === false) {\n return false;\n }\n\n return array_change_key_case($headers);\n }", "public function head()\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest();\n }", "public function __invoke()\n {\n $command = $this->client->getCommand('HeadObject', $this->params);\n $this->meta = $command->execute();\n\n if ($this->target->ftell() >= $this->meta['ContentLength']) {\n return false;\n }\n\n $this->meta['ContentMD5'] = (string) $command->getResponse()->getHeader('Content-MD5');\n\n // Use a ReadLimitEntityBody so that rewinding the stream after an error does not cause the file pointer\n // to enter an inconsistent state with the data being downloaded\n $this->params['SaveAs'] = new ReadLimitEntityBody(\n $this->target,\n $this->meta['ContentLength'],\n $this->target->ftell()\n );\n\n $result = $this->getRemaining();\n $this->checkIntegrity();\n\n return $result;\n }", "private function processHead()\r\n {\r\n\r\n if ($this->existsInRedis($this->uuid) === false) {\r\n throw new \\Exception(\"The UUID : $this->uuid doesn\\'t exist\");\r\n }\r\n\r\n\r\n $offset = $this->getInRedis($this->uuid, 'Offset');\r\n\r\n $this->response = new Response(null, 200, array(\r\n 'Offset' => $offset,\r\n ));\r\n }", "public function testCanMakeHttpHead()\n {\n # Set desired response\n $resp = $this->createMock('Psr\\Http\\Message\\ResponseInterface');\n $this->mockClient->addResponse($resp);\n $httpClient = $this->givenSdk()->getHttpClient();\n $response = $httpClient->head(\"/dummy_uri\");\n\n $this->assertSame($resp, $response);\n }", "public function head($id = null) {\n $action = $this->params('actiion');\n $job_id = $this->params('jobid');\n \n //$job_id > 30 is only for checking if the request is garbage and so save resources\n if($action == 'head' && strlen($job_id) >= 30){\n $crawlResultHelper = new CrawlResultHelper();\n return $crawlResultHelper->routeHEADRequest($id, $job_id, $this->response);\n }else{\n return $this->customJsonResponse(); \n }\n }", "public function isHead()\n {\n return ($this->getMethod() == 'HEAD') ? true : false;\n }", "public function run()\r\n\t\t\t {\r\n $ch = curl_init();\r\n curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt ($ch, CURLOPT_URL, $this->url);\r\n curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 20);\r\n curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11');\r\n curl_setopt($ch, CURLOPT_HEADER, true); // header will be at output\r\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD'); // HTTP request is 'HEAD'\r\n $this->headers = curl_exec ($ch);\r\n curl_close ($ch);\r\n\t\t\t }", "public function testHead(): void\n {\n $this->assertNull($this->_response);\n\n $this->head('/request_action/test_request_action');\n $this->assertNotEmpty($this->_response);\n $this->assertInstanceOf('Cake\\Http\\Response', $this->_response);\n $this->assertResponseSuccess();\n }", "public function testHeadMethodRoute(): void\n {\n $this->head('/head/request_action/test_request_action');\n $this->assertResponseSuccess();\n }", "public function isHead()\n {\n return $this->isMethod('HEAD');\n }", "public function isHead()\n {\n return $this->isMethod('HEAD');\n }", "public function send()\n {\n header(\n $_SERVER[\"SERVER_PROTOCOL\"].\" \". // HTTP 1.1\n $this->statusCode.\" \". // 200\n $this->statusText // OK\n );\n foreach ($this->headers as $key => $value) {\n header(\"$key: $value\");\n }\n }", "function head() {\n\t\theader(\"{$_SERVER['SERVER_PROTOCOL']} 200 OK\");\n \t\theader('Content-Type: application/json');\n \theader('Access-Control-Allow-Origin: *');\n\t}", "public function head($path = '*', $callback = null)\r\n {\r\n // Get the arguments in a very loose format\r\n extract(\r\n $this->parseLooseArgumentOrder(func_get_args()),\r\n EXTR_OVERWRITE\r\n );\r\n\r\n return $this->respond('HEAD', $path, $callback);\r\n }", "public function isHead() {\n\t\tif ('HEAD' == $this->getMethod())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function head($path, $parameters = [])\n {\n return $this->send('HEAD', $path, $parameters);\n }", "public function head($uri = null, $headers = null)\n {\n return $this->createRequest('HEAD', $uri, $headers);\n }", "public function isHead()\n {\n return $this->method === self::METHOD_HEAD;\n }", "public function head($url, array $params = []) \n {\n return $this->request('HEAD', $url, $params);\n }", "public function head($url, $headers = [], $options = [])\n {\n }", "public function sendHeader() : void\n {\n http_response_code($this->statusCode);\n\n foreach ($this->headers as $name => $value)\n {\n header(sprintf('%s: %s', $name, $value));\n }\n }", "public function isHead(): bool\n {\n return $this->getMethod() === self::METHOD_HEAD;\n }", "public static function head($url, $headers = [], $options = [])\n {\n }", "public function isHead() {\n return $this->method == self::METHOD_HEAD;\n }", "public function send() : void\n {\n \\http_response_code( $this->status );\n\n foreach ( $this->headers->all() as $name => $values ) {\n foreach ( $values as $index => $value ) {\n \\header( \"$name: $value\", $index === 0 );\n }\n }\n\n echo $this->content;\n }", "public function head($url, $params = '', array $config = [])\n\t{\n\t\treturn $this->request($url, $params, $config, Request::METHOD_HEAD);\n\t}", "public function isHead()\n\t{\n\t\treturn $this->httpMethod() == self::MethodHead;\n\t}", "public function ping(){\n http_response_code(200);\n ob_end_flush();\n }", "private function readHead() {\n\t\t$matches = array();\n\n\t\t// Read and parse status line\n\t\t$status = $this->readLine();\n\t\tif (!preg_match('!^(?:HTTP/(\\d\\.\\d)) (\\d{3})(?: (.+))?!', $status, $matches)) {\n\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Malformed status line: \" . $status);\n\t\t}\n\n\t\t// Debug status line\n\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t$this->client->log(\"< \" . trim($status));\n\t\t}\n\n\t\t$this->version = $matches[1];\n\t\t$this->code = intval($matches[2]);\n\t\t$this->message = $matches[3];\n\n\t\t// Read and parse headers\n\t\tdo {\n\t\t\t$line = $this->readLine();\n\n\t\t\t// Debug header line\n\t\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t\t$this->client->log(\"< \" . trim($line));\n\t\t\t}\n\n\t\t\tif (preg_match('!^([^\\x00-\\x1f\\x7f-\\xff()<>@,;:\\\\\\\\\"/\\[\\]?={}\\s]+):(.+)$!', $line, $matches)) {\n\t\t\t\t$name = strtolower($matches[1]);\n\t\t\t\t$value = trim($matches[2]);\n\n\t\t\t\t// Put multiple headers with the same name into an array\n\t\t\t\tif (isset($this->headers[$name])) {\n\t\t\t\t\tif (is_array($this->headers[$name])) {\n\t\t\t\t\t\t$this->headers[$name][] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->headers[$name] = array($this->headers[$name], $value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->headers[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ($line !== \"\");\n\t}", "public function _head($url = null, array $parameters = []);", "function status_header($header) {\n $text = get_status_header_desc($header);\n\n if (empty ($text)) {\n return;\n }\n $protocol = $_SERVER [\"SERVER_PROTOCOL\"];\n if ('HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol) {\n $protocol = 'HTTP/1.0';\n }\n\n $status_header = \"$protocol $header $text\";\n\n @header($status_header, true, $header);\n if (php_sapi_name() == 'cgi-fcgi') {\n @header(\"Status: $header $text\");\n }\n}", "public function head($options)\n {\n if (is_int($options) || is_string($options)) {\n $options = ['status' => $options];\n } elseif (!is_array($options)) {\n throw new Exception\\InvalidArgumentException(\n sprintf(\n \"Argument must be either string or array, %s passed\",\n gettype($options)\n )\n );\n }\n \n if ($options) {\n $validOptions = ['status' => null, 'location' => null, 'contentType' => null];\n \n $headers = array_diff_key($options, $validOptions);\n $options = array_intersect_key($options, $validOptions);\n \n if (isset($options['status'])) {\n $this->response()->setStatus($options['status']);\n }\n if (isset($options['location'])) {\n $this->response()->setLocation($this->urlFor($options['location']));\n }\n \n foreach ($options as $key => $value) {\n $this->response()->addHeader(\n str_replace(' ', '-', ucwords(strtolower(str_replace('-', ' ', $key)))),\n $value\n );\n }\n }\n \n $status = $this->response()->status();\n \n if (!\n (($status > 100 && $status < 199) ||\n in_array($status, [204, 205, 304]))\n ) {\n $this->response()->setCharset(false);\n if (isset($options['contentType'])) {\n $this->response->setContentType($options['contentType']);\n }\n $this->response()->setBody(' ');\n } else {\n $this->response()->removeHeader('Content-Type');\n $this->response()->setBody('');\n }\n }", "public function head($url, $params = [])\n {\n return $this->request($url, 'HEAD', $params);\n }", "public function head($url)\n {\n $this->requestType = Client::REQUEST_HEAD;\n $this->url = $url;\n return $this;\n }", "public function send()\n{\n if(!headers_sent())\n {\n $this->setCode($this->status);\n $this->sendHeaders();\n }\n}", "function display_head ($url, $callback)\n{\n\t$obj = new stdclass;\n\t$obj->url = $url;\n\t$obj->found = false;\n\n\t$status = 404;\n\t\n\tif (api_head($url))\n\t{\n\t\t$status = 200;\n\t\t$obj->found = true;\n\t}\n\t\t\n\tapi_output($obj, $callback, $status);\n}", "function rest_output_link_header() {\n\tif ( headers_sent() ) {\n\t\treturn;\n\t}\n\n\t$api_root = get_rest_url();\n\n\tif ( empty( $api_root ) ) {\n\t\treturn;\n\t}\n\n\theader( 'Link: <' . esc_url_raw( $api_root ) . '>; rel=\"https://api.w.org/\"', false );\n}", "public function testRequestGet()\n {\n $url = 'http://localhost:8080';\n $req = new HttpHeadRequest($url);\n \n $hopper = new Grasshopper();\n \n $hopper->addRequest($req);\n \n $result = $hopper->waitForAll();\n \n $res = $result[$url];\n \n if ($res instanceof SuccessEvent){\n $headers = $res->getResponse()->getHeadersParsed();\n echo print_r($headers,true) . PHP_EOL;\n \n $this->assertEquals(200, $res->getResponse()->getStatusCode());\n }\n else{\n $this->fail('GET request returned failure result');\n }\n }", "public function sendHeaders() {\n $status = $this->handler->getStatus();\n header( Status::getHeader( $status ), true, $status );\n $headers = $this->handler->headers();\n foreach( $headers as $key => $value ) {\n header( $key . ': ' . $value );\n }\n }", "function http_send_status($status) {}", "public function sendHttpHeaders()\n {\n if (!$this->options['send_http_headers'])\n {\n return;\n }\n\n // status\n $status = $this->options['http_protocol'].' '.$this->statusCode.' '.$this->statusText;\n header($status);\n\n if (substr(php_sapi_name(), 0, 3) == 'cgi')\n {\n // fastcgi servers cannot send this status information because it was sent by them already due to the HTT/1.0 line\n // so we can safely unset them. see ticket #3191\n unset($this->headers['Status']);\n }\n\n if ($this->options['logging'])\n {\n $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Send status \"%s\"', $status))));\n }\n\n // headers\n if (!$this->getHttpHeader('Content-Type'))\n {\n $this->setContentType($this->options['content_type']);\n }\n foreach ($this->headers as $name => $value)\n {\n header($name.': '.$value);\n\n if ($value != '' && $this->options['logging'])\n {\n $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Send header \"%s: %s\"', $name, $value))));\n }\n }\n\n // cookies\n foreach ($this->cookies as $cookie)\n {\n setrawcookie($cookie['name'], $cookie['value'], $cookie['expire'], $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httpOnly']);\n\n if ($this->options['logging'])\n {\n $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Send cookie \"%s\": \"%s\"', $cookie['name'], $cookie['value']))));\n }\n }\n // prevent resending the headers\n $this->options['send_http_headers'] = false;\n }", "function HeadBucket() {\n global $obsClient;\n global $bucketName;\n try {\n $resp = $obsClient->headBucket(array ('Bucket' => $bucketName));\n\t\t\t\treturn $resp ['HttpStatusCode'];\n } catch ( ObsException $e ) {\n\t\t\t\treturn $e->getStatusCode();\n }\n return \"400\";\n}", "protected function updateHead()\n\t{\n\t}", "public function send() {\n $this->sendHeaders();\n if(\n ( isset( $_SERVER[ 'REQUEST_METHOD' ] ) == true )\n &&\n ( $_SERVER[ 'REQUEST_METHOD' ] == 'HEAD' )\n ) {\n return 0;\n }\n else if(\n array_key_exists( 'Location', $this->handler->headers() ) == true\n ) {\n return 0;\n }\n $handle = fopen( 'php://output', 'wb' );\n if( $handle == false ) {\n throw new Exception( 'Unable to open output.' );\n }\n $sent = $this->put( $handle );\n fclose( $handle );\n return $sent;\n }", "public function testAddRouteShorthandMethodHead()\n {\n $this->collection->head('name', '/', 'action');\n\n $this->assertCount(1, $this->collection->all());\n\n $routes = $this->collection->all();\n\n $this->assertArrayHasKey('0', $routes);\n\n $this->assertContains('HEAD', $routes[0]->getMethods());\n }", "public function send() {\n /** @var HeaderCollection $headers */\n $headers = Yii::$app->response->headers;\n $headers->removeAll();\n foreach ($this->getHeaders() as $_header => $lines) {\n $headers->add($_header, $this->getHeaderLine($_header));\n }\n Yii::$app->response->version = $this->getProtocolVersion();\n Yii::$app->response->statusCode = $this->getStatusCode();\n Yii::$app->response->statusText = $this->getReasonPhrase();\n Yii::$app->response->content = $this->getBody();\n\n Yii::$app->response->send();\n }", "public function SendHttpPing()\n\t{\n\t\tfor ( $Z = 0; $Z < count($this->url); $Z++ )\n\t\t{\n\t\t\tarray_push( $this->result_ping , exec( 'httping -c ' . $this->try_count . ' ' . $this->url[$Z] ) );\n\t\t\tif ( self::PING_ERR == $this->result_ping[$Z] )\n\t\t\t{\n\t\t\t\t$this->result_ping[$Z]='';\n\t\t\t}\n\t\t}\n\n\t\t/* Data Setting */\n\t\t$this->CheckHttpResponse();\t\n\t}", "protected function send_headers() {\n header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0');\n header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');\n header('Pragma: no-cache');\n header('Accept-Ranges: none');\n }", "function output() {\n if (isset($this->status)) {\n $this->send_header(sprintf('HTTP/1.1 %d %s',\n $this->status, $this->reason),\n TRUE,\n $this->status);\n }\n\n foreach ($this->headers as $k => $v) {\n $this->send_header(\"$k: $v\");\n }\n\n echo $this->body;\n }", "public function PingHeaders();", "public function sendHeaders () {\r\n\t\tif (headers_sent()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\theader(sprintf('HTTP/1.1 %s', $this->status[0], $this->status[1]));\r\n\t\theader(sprintf('Content-Type:%s;charset=utf-8', $this->content_type));\r\n\r\n\t\t$this->Headers->send();\r\n\t\t$this->Cookies->send();\r\n\r\n\t\treturn true;\r\n\t}", "public function hdr($c = '200', $h = null) {\n\t\t$message = array_key_exists($c, $this->codes) ? $this->codes[$c] : 'Internal error';\n\t\t\n\t\tif ($this->sentHeaders) return true;\n\t\telse $this->sentHeaders = 1;\n\t\t\n\t\t$v = defined('SERVICE_VERSION') ? SERVICE_VERSION : PRESTO_VERSION;\n\t\theader(\"HTTP/1.0 {$c} {$message}\");\n\t\theader(VERSION_HEADER . ': ' . $v);\n\t\theader('Cache-Control: no-cache');\n\n\t\tif (in_array($c, array('201', '204'), true))\n\t\t\treturn false; // no body allowed\n\n\t\theader('Content-type: ' . $this->content_type());\n\n\t\tif (!empty($this->call->modified))\n\t\t\theader('Last-Modified: '.$this->call->modified);\n\n\t\t// include custom headers\n\t\tif ($h) foreach($h as $k => $v) header(\"$k: $v\");\n\n\t\treturn true;\n\t}", "public function sendHttpHeaders() {}", "function send_header($header, $replace = FALSE, $status = NULL) {\n if (isset($status)) {\n header($header, $replace, $status);\n }\n else {\n header($header, $replace);\n }\n }", "public function alter_header()\n\t{\n\t\theader(\"HTTP/1.0 $this->code $this->title\");\n\t}", "protected function bulk($head)\n {\n if ('$-1' === $head) {\n return;\n }\n\n list($read, $response, $size) = [0, '', substr((string) $head, 1)];\n\n if ($size > 0) {\n do {\n // Hitung dan baca bytes dari respon Redis server (baca per 1024 bytes)\n $block = (($remaining = $size - $read) < 1024) ? $remaining : 1024;\n $response .= fread($this->connection, $block);\n $read += $block;\n } while ($read < $size);\n }\n\n fread($this->connection, 2);\n return $response;\n }", "public function is_head_request($xss_clean = NULL)\n\t{\n\t\treturn ($this->server('REQUEST_METHOD', $xss_clean) === 'HEAD');\n\t}", "public function head($route, $handler, array $middlewares = [], array $aftermiddlewares = [], array $roles = null) {\n $this->add('HEAD', $route, $handler, $middlewares, $aftermiddlewares, $roles);\n }", "static function _heads(&$opt=array(), &$data=array()){\r\n $header = self::_defHeader($opt);\r\n if(!empty($opt['head'])){\r\n $uhead = is_array($opt['head']) ? $opt['head'] : implode(PHP_EOL, $opt['head']);\r\n $header = array_merge($header, $uhead);\r\n }\r\n if(isset($opt['cookie'])){ // cookie设置\r\n $header[] = \"Cookie: \".$opt['cookie'];\r\n }\r\n $tag = array(\r\n 'html'=>'text/html', // plain\r\n 'xml'=>'text/xml', \r\n 'json'=>'application/json',\r\n 'down'=>'application/octet-stream',\r\n );\r\n if(isset($opt['type']) && isset($tag[$opt['type']])){ // json\r\n $header[] = \"Content-Type: \".$tag[$opt['type']];\r\n if($opt['type']=='json'){\r\n if(is_array($data)) $data = json_encode($data);\r\n $header['json'] = \"Content-Length: \".strlen($data);\r\n }\r\n } //dump($header);\r\n return $header;\r\n }", "public function head(string $path, $middleware, ?string $name = null): void;", "function getHeader() {\n\tglobal $server, $html, $hostname, $userpwd;\n\t$chopts = array(\n\t\tCURLOPT_URL=>$hostname,\n\t CURLOPT_PORT=>80,\n\t CURLOPT_TIMEOUT=>5,\n\t CURLOPT_RETURNTRANSFER=>true,\n\t CURLOPT_HEADER=>true,\n\t CURLOPT_USERPWD=>\"$userpwd\",\n\t CURLOPT_FOLLOWLOCATION=>true);\n\n\t$ch = curl_init();\n\tcurl_setopt_array($ch, $chopts);\n\t$return = curl_exec($ch);\n\n\t// check for authentication failures using http codes *EXPERIMENTAL*\n\t/*\n\t$hCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\tif(isset($hCode)) {\n\t\tswitch($hCode) {\n\t\t\tcase \"401\": echo \"[-] authentication failure for: $hostname ($userpwd)\\n\"; exit(0);\n\t\t\tcase \"501\": echo \"[-] authentication failure for: $hostname ($userpwd)\\n\"; exit(0);\n\t\t\tdefault: break;\n\t\t}\n\t}\n\t*/\n\n\t// check for connection timeout using curl error codes\n\tif(curl_errno($ch)) {\n\t\tif(curl_errno($ch) == 28) {\n\t\t\tlogIT('e',\"[!] connection timed out to: $hostname, skipping...\");\n\t\t\techo \"[!] connection timed out to: $hostname, skipping...\\n\";\n\t\t\texit(0);\n\t\t}\n\t}\n\tcurl_close($ch);\n\n\t$headers = http_response_headers($return);\n\tforeach ($headers as $header) {\n\t\t$hdr_arr = http_response_header_lines($header);\n\t if(isset($hdr_arr['Location'])) {\n\t $str = $hdr_arr['Location'];\n\t $html = file_get_contents_curl(\"$str\", \"$userpwd\");\n\t } else {\n\t $html = file_get_contents_curl(\"$hostname\", \"$userpwd\");\n\t }\n\t if(isset($hdr_arr['Server'])) {\n\t\t\t$server = $hdr_arr['Server'];\n\t\t}\n\t}\n}", "public function send() {\n if ($this->headers_sent()) {\n throw new Status\\Exception\\HeadersAlreadySent('Cannot send status when headers have already been sent');\n }\n\n $this->header((string) $this);\n }", "public function outputStatus()\n {\n if ($this->responseStatus instanceof ResponseStatus) {\n header(sprintf('HTTP/1.1 %d %s', $this->responseStatus->httpStatusCode, $this->responseStatus->httpStatusMessage));\n }\n echo $this->body;\n }", "public function sendHeaders() {}", "function print_nocache_headers()\n {\n \theader(\"HTTP/1.0 200 OK\");\n\t\theader(\"HTTP/1.1 200 OK\");\n \theader(\"Cache-Control: no-cache, must-revalidate, max-age=0\");\n\t\theader(\"Expires: 0\");\n\t\theader(\"Pragma: no-cache\");\n\t}", "public function send()\n {\n http_response_code($this->statusCode);\n $this->sendContent();\n }", "public function send_headers()\n\t{\n\t\tif ( ! headers_sent())\n\t\t{\n\t\t\tif (isset($_SERVER['SERVER_PROTOCOL']))\n\t\t\t{\n\t\t\t\t// Use the default server protocol\n\t\t\t\t$protocol = $_SERVER['SERVER_PROTOCOL'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Default to using newer protocol\n\t\t\t\t$protocol = 'HTTP/1.1';\n\t\t\t}\n\n\t\t\t// HTTP status line\n\t\t\theader($protocol.' '.$this->status.' '.Request::$messages[$this->status]);\n\n\t\t\tforeach ($this->headers as $name => $value)\n\t\t\t{\n\t\t\t\tif (is_string($name))\n\t\t\t\t{\n\t\t\t\t\t// Combine the name and value to make a raw header\n\t\t\t\t\t$value = \"{$name}: {$value}\";\n\t\t\t\t}\n\n\t\t\t\t// Send the raw header\n\t\t\t\theader($value, TRUE);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "public function sendHeaders()\n {\n // Send the 404 header\n header('HTTP/1.1 404 File Not Found');\n }", "function status_header($code) {\n\t$desc = get_status_header_desc($code);\n\tif (empty($desc)) return false;\n\t$protocol = $_SERVER['SERVER_PROTOCOL'];\n\tif('HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol) $protocol = 'HTTP/1.0';\n\t$status_header = \"$protocol $code $desc\";\n\treturn @header($status_header, true, $code);\n}", "function get_remote_headers($url)\n{\n $parsed = parse_url($url);\n $host = $parsed[\"host\"];\n $fp = @fsockopen($host, 80, $errno, $errstr, 20);\n if(!$fp) return false;\n else {\n @fputs($fp, \"HEAD $url HTTP/1.1\\r\\n\");\n @fputs($fp, \"HOST: $host\\r\\n\");\n @fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n $headers = \"\";\n while(!@feof($fp))$headers .= @fgets ($fp, 128);\n }\n @fclose ($fp);\n $return = false;\n $arr_headers = explode(\"\\n\", $headers);\n foreach($arr_headers as $header) {\n // follow redirect\n $s = 'Location: ';\n if(substr(strtolower ($header), 0, strlen($s)) == strtolower($s)) {\n $url = trim(substr($header, strlen($s)));\n return get_remote_headers($url);\n }\n }\n return $arr_headers;\n}", "public function send() {\n\t\tif (isset($this->_headers['Location']) && $this->_status === 200) {\n\t\t\t$this->statusCode(302);\n\t\t}\n\n\t\t$codeMessage = $this->_statusCodes[$this->_status];\n\t\t$this->_setCookies();\n\t\t$this->_sendHeader(\"{$this->_protocol} {$this->_status} {$codeMessage}\");\n\t\t$this->_setContent();\n\t\t$this->_setContentLength();\n\t\t$this->_setContentType();\n\t\tforeach ($this->_headers as $header => $values) {\n\t\t\tforeach ((array)$values as $value) {\n\t\t\t\t$this->_sendHeader($header, $value);\n\t\t\t}\n\t\t}\n\t\tif ($this->_file) {\n\t\t\t$this->_sendFile($this->_file, $this->_fileRange);\n\t\t\t$this->_file = $this->_fileRange = null;\n\t\t} else {\n\t\t\t$this->_sendContent($this->_body);\n\t\t}\n\t}", "private function renderHead() {\n\t\t\n\t\t\t$this->outputLine('<head>');\n\t\t\t\n\t\t\tif ($this->_title != '') {\n\t\t\t\t$this->outputLine('\t<title>' . $this->_title . '</title>');\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('\t<base href=\"' . $this->_base . '\" />');\n\t\t\t\n\t\t\t$this->outputLine('\t<meta http-equiv=\"content-type\" content=\"' . $this->_contentType . '\" />');\n\t\t\t\n\t\t\t//Meta\n\t\t\tforeach ($this->_meta as $meta) {\n\t\t\t\t$this->outputLine('\t<meta name=\"' . $meta->name . '\" content=\"' . $meta->content . '\" />');\n\t\t\t}\n\t\t\t\n\t\t\t//CSS\n\t\t\tforeach ($this->_css as $css) {\n\t\t\t\t$this->outputLine(\"\t\" . $css);\n\t\t\t}\n\t\t\t\n\t\t\t//JS\n\t\t\tforeach ($this->_js as $js) {\n\t\t\t\t$this->outputLine(\"\t\" . $js);\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('</head>');\n\t\t\n\t\t}", "public function sendHeader( $header )\n\t{\n\t\t/* If we are running our test suite, we don't want to send browser headers */\n\t\tif( \\IPS\\ENFORCE_ACCESS === true AND mb_strtolower( php_sapi_name() ) == 'cli' )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\theader( $header );\n\t}", "public function send()\n {\n if (function_exists('http_response_code')) {\n http_response_code($this->code);\n } else {\n header(' ', true, $this->code);\n }\n\n foreach ($this->headers as $name => $value) {\n header($name . ': ' . $value);\n }\n\n if (!is_null($this->content)) {\n echo $this->content;\n }\n }", "public function sendAuthChallengeHeader()\n {\n\t\t\n\t\theader('Authorization: Digest');\n header('WWW-Authenticate: Digest realm=\"' . self::AUTH_REALM \n . '\",qop=\"auth\",nonce=\"' . uniqid() \n\t\t\t . '\",algorithm=\"MD5\"'\n . '\",opaque=\"' . md5(self::AUTH_REALM) . '\"');\n\t\theader('HTTP/1.1 200');\n }", "private function printHead()\n\t{\n\t\t$out = '<?xml version=\"1.0\" encoding=\"utf-8\"?>' . \"\\n\";\n\t\t$out .= $this->head . PHP_EOL;;\t\t\t\n\t\techo $out;\n\t}", "public function ping()\n {\n $request = Registry::get( 'request' );\n $backtrace = array();\n \n foreach( \\array_reverse( \\debug_backtrace( false ) ) as $k => $trace )\n {\n if( isset( $trace[ 'class' ] ) && isset( $trace[ 'function' ] ) )\n {\n $backtrace[] = ($k+1) . '. ' . $trace[ 'class' ] . '::' . $trace[ 'function' ] . '()';\n }\n }\n \n $request->getHeader( 'Force Load Headers' );\n $this->response->merge( array(\n 'meta' => $request->getHeaders(),\n 'body' => $request->toArray(),\n// 'debug' => array(\n// 'includes' => \\count( \\get_included_files() ),\n// 'classes' => \\count( \\get_declared_classes() ),\n// 'memory' => \\floor( \\memory_get_peak_usage() /1024 ) . 'kb',\n// 'trace' => $backtrace\n// )\n ) );\n }", "public function extObjHeader()\n {\n if (is_callable([$this->extObj, 'head'])) {\n $this->extObj->head();\n }\n }", "public function sendHeader()\n\t{\n\t\t# \"Set-Cookie\"\n\t\t$str = 'Set-Cookie: ' . $this->name . '=' . $this->id;\n\n\t\tif (is_string($this->comment))\n\t\t\t$str .= ';comment=' . $this->comment;\n\n\t\tif (is_string($this->domain))\n\t\t\t$str .= ';domain=.' . $this->domain;\n\n\t\tif (! is_null($this->maxage) && $this->maxage >= 0)\n\t\t\t$str .= ';max-age=' . $this->maxage;\n\n\t\tif (is_string($this->path))\n\t\t\t$str .= ';path=' . $this->path;\n\n\t\tif ($this->secure) $str .= ';secure';\n\n\t\t$str .= ';version=1';\n\n\t\t# we can make sure cache files get deleted more efficiently by not\n\t\t# sending \"expires\" info in the cookie\n\t\t# TODO: improve cache deletion efficiency\n\t\tif\n\t\t(\n\t\t\t$this->cookieExpirable\n\t\t\t&& ! is_null($this->expires)\n\t\t\t&& '' != $this->expires\n\t\t)\n\t\t{\n\t\t\t$strDT = gmdate\n\t\t\t(\n\t\t\t\t'D, d-M-Y H:i:s'\n\t\t\t\t, time() + ($this->expires * 60)\n\t\t\t) . ' GMT';\n\n\t\t\t$str .= ';expires=' . $strDT;\n\n\t\t\theader('Expires: ' . $strDT);\n\t\t}\n\n\t\theader($str);\n\n\t\t# \"Cache-Control\"\n\t\tswitch($this->cachectrl)\n\t\t{\n\t\tcase self::CACHECTRL_PROXY_REVALIDATE:\n\t\tcase self::CACHECTRL_MUST_REVALIDATE:\n\t\tcase self::CACHECTRL_PRIVATE:\n\t\tcase self::CACHECTRL_NOCACHE:\n\t\t\theader\n\t\t\t(\n\t\t\t\t'Cache-control: ' . self::$CacheCtrl[$this->cachectrl]\n\t\t\t);\n\t\t\tbreak;\n\t\tcase self::CACHECTRL_NONE:\n\t\tdefault:\n\t\t}\n\t}", "public function getHeadSHA1() {\n\t\t$headFile = \"{$this->dir}/HEAD\";\n\t\tif ( !is_readable( $headFile ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$head = file_get_contents( $headFile );\n\t\tif ( preg_match( \"/ref: (.*)/\", $head, $m ) ) {\n\t\t\t$head = rtrim( $m[1] );\n\t\t} else {\n\t\t\t$head = rtrim( $head );\n\t\t}\n\n\t\tif ( self::isSHA1( $head ) ) {\n\t\t\t// Detached head\n\t\t\treturn $head;\n\t\t}\n\n\t\t// Resolve ref\n\t\t$refFile = \"{$this->dir}/{$head}\";\n\t\tif ( !is_readable( $refFile ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn rtrim( file_get_contents( $refFile ) );\n\t}", "public function status_header() {\n return 'HTTP/1.1 ' . $this->status_code . ' ' . $this->status_meaning();\n }", "protected function httpStatusLine()\r\n {\r\n return sprintf('HTTP/%s %s', $this->protocol_version, $this->status);\r\n }", "public function renderHead()\n {\n if ($this->enabled) {\n return $this->getRenderer()->renderHead();\n }\n }", "function of_head() { do_action( 'of_head' ); }", "public function update() {\n\t\treturn $this->render(array('head' => true, 'status' => 501));\n\t}", "public function sendHeaders()\n {\n \tforeach ($this->headers as $directive => $value) {\n \t\t\\header($directive.': '.$value);\n \t}\n }", "public function send_headers()\n {\n }" ]
[ "0.7461538", "0.7296988", "0.70963156", "0.6997734", "0.6945581", "0.67486453", "0.6729904", "0.6685927", "0.65586793", "0.6470398", "0.6466655", "0.6453372", "0.642748", "0.6396482", "0.63562965", "0.6354607", "0.6329609", "0.6321134", "0.63198364", "0.63112676", "0.6295491", "0.627494", "0.6268861", "0.6268861", "0.6263418", "0.622675", "0.6225839", "0.6143747", "0.61318946", "0.6088957", "0.60870147", "0.6067", "0.602711", "0.6002139", "0.597349", "0.5958522", "0.593286", "0.5901315", "0.58833766", "0.58808774", "0.5831507", "0.58314204", "0.582776", "0.57917374", "0.5775292", "0.5758623", "0.57333225", "0.56666064", "0.5658558", "0.5624646", "0.56075287", "0.5592928", "0.5583015", "0.5574345", "0.5571131", "0.55700815", "0.55584514", "0.55102855", "0.5503175", "0.54929346", "0.5473567", "0.5465093", "0.5409982", "0.5405283", "0.54012704", "0.539841", "0.53927517", "0.53660566", "0.5355958", "0.5347619", "0.53447306", "0.53442585", "0.532851", "0.5328478", "0.5319487", "0.53010094", "0.5292054", "0.5282953", "0.5270691", "0.52644885", "0.52619785", "0.52597535", "0.524951", "0.524079", "0.52192974", "0.5216329", "0.52115524", "0.52084213", "0.520738", "0.5202979", "0.52028865", "0.5189565", "0.51831216", "0.51827043", "0.518154", "0.51800805", "0.5179478", "0.517487", "0.5162979", "0.51610607" ]
0.657626
8
Send HTTP Delete command
public function delete($uri = NULL, $vars = NULL) { if (! empty ( $uri )) $this->uri = $uri; if (! empty ( $vars ) && is_array ( $vars )) $vars = http_build_query ( $vars ); if (empty ( $this->query )) $this->query = $vars; else if (! empty ( $vars )) $this->query .= "&" . $vars; if (! empty ( $this->query )) $this->uri .= "?" . $this->query; $this->method = "DELETE"; $this->request_body = NULL; $this->send (); return $this->status_code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendDelete ()\n {\n curl_setopt($this->cURL, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\n return $this->handleQuery();\n }", "public function httpDelete()\n {\n return $this->method(\"DELETE\");\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "public function delete()\n\t{\n\t\t// Pass on the request to the driver\n\t\treturn $this->backend->delete('', array());\n\t}", "public function call_api_delete(){\n$ch = curl_init('http://localhost:8001/api/users/....');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLINFO_HEADER_OUT, true);\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\n// Submit the DELETE request\n$result = curl_exec($ch);\n\n//Close cURL session handle\ncurl_close($ch);\necho \"Deleted\"; \n }", "public function delete($path)\n\t{\n\t\t$this->Response->end('HTTP DELETE', 501); // 501 Not Implemented\n\t}", "function sendDeleteCmd($resource) {\n $url = $this->baseURL . $resource;\n\n $request = curl_init($url);\n curl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n curl_setopt($request, CURLOPT_FAILONERROR, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($request);\n return json_decode($result, true);\n }", "public function deleteAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "public function delete()\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest();\n }", "function doDELETE (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"DELETE method not supported\");\n }", "public function testSendDeletesOnly()\n {\n $expectedBody = $this->getExpectedBody([], ['test123']);\n $this->mockEndpoint();\n $this->mockCurl($expectedBody);\n\n $this->subject->addDelete('test123');\n $responses = $this->subject->send();\n\n $this->assertEquals(1, count($responses));\n\n $this->assertEquals(\n [\n 'status' => 200,\n 'body' => ''\n ],\n $responses[0]\n );\n }", "public function DELETE() {\n #\n }", "public function delete()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'DELETE';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData($this->getData());\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'DELETE::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'DELETE::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'DELETE::RESPONSE', $sOutput);\n\n if ($iHTTPCode !== 204) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 204');\n }\n return $sOutput;\n }", "function delete(Request &$request, Response &$response);", "public function deleteAction(){\n $id = $this->params('id');\n $client = new Client();\n $ServerPort =\"\";\n if($_SERVER['SERVER_PORT']){\n $ServerPort = ':'.$_SERVER['SERVER_PORT'];\n }\n $client->setUri('http://'.$_SERVER['SERVER_NAME'].$ServerPort.'/order-rest/'.$id);\n $client->setOptions(array(\n 'maxredirects' => 5,\n 'timeout' => 30\n ));\n $client->setMethod( Request::METHOD_DELETE );\n $response = $client->send();\n if ($response->isSuccess()) {\n $result = json_decode( $response->getContent() , true);\n }\n return $this->redirect()->toRoute('ordermanagement', array('action' => 'index') );\n }", "public function delete()\n {\n return $this->apiCall('delete', '');\n }", "public function delete()\n {\n return $this->apiCall('delete', '');\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {\n\n try {\n /**\n * Set up request method\n */\n $this->method = 'POST';\n\n\n /**\n * Process request and call for response\n */\n return $this->requestProcessor();\n\n } catch (\\Throwable $t){\n new ErrorTracer($t);\n }\n }", "public function sendDelete($id)\n {\n $ch = curl_init(\"http://localhost/rest/index.php/book/$id\");\n //a true, obtendremos una respuesta de la url, en otro caso, \n //true si es correcto, false si no lo es\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //establecemos el verbo http que queremos utilizar para la petición\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n //enviamos el array data\n $response = curl_exec($ch);\n // Se cierra el recurso CURL y se liberan los recursos del sistema\n curl_close($ch);\n if(!$response) {\n return false;\n }else{\n var_dump($response);\n }\n }", "public function delete(...$args)\n {\n return $this->curl('delete', ...$args);\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "function Delete( $uri )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Delete( $uri )\\n\";\r\n\t\tif( $this->sendCommand( \"DELETE $uri HTTP/$this->protocolVersion\" ) )\r\n\t\t\t$this->processReply();\r\n\t\treturn $this->reply;\r\n\t}", "public function delete($url, $query = array(), $headers = array());", "protected function deleted()\n {\n $this->response = $this->response->withStatus(204);\n $this->jsonBody($this->payload->getOutput());\n }", "protected function httpDelete() {\n $this->manageCollectionPermissionCheck();\n\n $collectionObj = Collection::getByID((int)$_REQUEST['collectionID']);\n $collectionObj->unapproveCollectionEvents(explode(',', $_REQUEST['events']));\n $this->setResponseCode(Response::HTTP_ACCEPTED);\n }", "public function actionDelete() {}", "public function actionDelete() {}", "function delete($url, $http_options = array()) {\n $http_options = $http_options + $this->http_options;\n $http_options[CURLOPT_CUSTOMREQUEST] = \"DELETE\";\n $this->handle = curl_init($url);\n\n if (!curl_setopt_array($this->handle, $http_options)) {\n throw new RestClientException(\"Error setting cURL request options.\");\n }\n\n $this->response_object = curl_exec($this->handle);\n $this->http_parse_message($this->response_object);\n\n curl_close($this->handle);\n return $this->response_object;\n }", "public function delete($id){\n\t\t$url = WEBSERVICE. \"robots/deleteById/\" . $id;\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"DELETE\");\n\t\t$response = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $response;\n\t}", "public function delete(string $uri, array $params = [], array $headers = []): ResponseInterface;", "public function delete()\n\t{\n\t\t$data = json_decode(file_get_contents(\"php://input\")); \t \n\t\techo $this->home->delete($data);\n\t\t\n\t}", "public function delete($id){\n\t\t$url = WEBSERVICE. \"status_robot/deleteById/\" . $id;\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"DELETE\");\n\t\t$response = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $response;\n\t}", "public function testDeleteUrlUsingDELETE()\n {\n }", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function delete( array $params );", "public function delete() : bool {\n\t\t$req = self::init_req( ( (object) self::$URLS )->post );\n\t\tif( is_null( $req ) ){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tself::$httpResponseText = curl_exec( $req );\n\t\t\tself::$httpCode = curl_getinfo( $req, CURLINFO_HTTP_CODE );\n\t\t\tcurl_close( $req );\n\t\t\treturn true;\n\t\t}\n\t}", "public function delete() {\r\n }", "public function cliente_delete(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t$respuesta = $this->Cliente_model->delete($cliente_id);\n\t\t\n\t\t$this->response($respuesta);\n\t}", "public function delete(){\n\t\tglobal $db;\n\t\t$response = array('success' => false);\n\t\t$response['success']=$db->delete($this->table, \"id = $this->id\");\n\t return $response;\n\t}", "public function testDelete_Error()\r\n\t{\r\n\t\t$this->http = new Client(['base_uri' => 'http://localhost/casecheckapp/public/index.php/']);\r\n\t\t\r\n\t\t$response = $this->http->delete('/api/v1/hospital/5', [ //Change ID here to a Hospital that isn't in the datastore'\r\n\t\t\t'http_errors' => false\r\n\t\t]);\r\n\t\r\n\t\t//Test invalid requests\r\n\t\t$this->assertEquals(405, $response->getStatusCode());\r\n\r\n\t\t//Stopping the connexion with Guzzle\r\n\t\t$this->http = null;\r\n\t\t\r\n\t}", "public function deleteWebhook(){\n return $this->make_http_request(__FUNCTION__);\n }", "public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}", "protected static function delete($index) {\n\t\t\t$curl = self::socket();\n\n\t\t\tcurl_setopt($curl, CURLOPT_URL, self::$baseUrl . $index);\t\t//Url setup\n\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');\t\t\t//DELETE request setup\n\t\t\treturn self::data_decode(curl_exec($curl)); \t\t //Launch and return decrypted data\n\t\t}", "public function delete()\n {\n \n }", "public function delete() {\n\n }", "public function delete(int $id): ResponseInterface;", "public function deleteAction(){\n $this->_helper->json(\"Esto no esta implementado\");\n }", "function delete() : bool {\n empty($_GET)? $req = $_POST : $req = $_GET;\n if ($req['id'] === NULL) {http_response_code(400); return false;}\n $comment = new Post();\n $comment->delete(\"id\",$req['id']);\n http_response_code(200);\n return true;\n}", "public function delete() {\n\n $input_data = $this->request->getJsonRawBody();\n $id = isset($input_data->id) ? $input_data->id : '';\n if (empty($id)):\n return $this->response->setJsonContent(['status' => false, 'message' => 'Id is null']);\n else:\n $kidphysical_delete = NidaraKidPhysicalInfo::findFirstByid($id);\n if ($kidphysical_delete):\n if ($kidphysical_delete->delete()):\n return $this->response->setJsonContent(['status' => true, 'Message' => 'Record has been deleted succefully ']);\n else:\n return $this->response->setJsonContent(['status' => false, 'Message' => 'Data could not be deleted']);\n endif;\n else:\n return $this->response->setJsonContent(['status' => false, 'Message' => 'ID doesn\\'t']);\n endif;\n endif;\n }", "public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n $userId=Yii::app()->user->id;\n $msgId = array();\n if(isset($_POST[\"check\"])){//批量删除\n $msgId = array_keys($_POST[\"check\"]);\n \n }else{\n $msgId = array($_GET['id']);\n }\n if($msgId){\n foreach($msgId as $value){\n $model = Msg::model()->findbyPk($value);\n if($userId==$model->msg_sendid){\n $model->msg_senddel = Msg::$del['del'];\n $model->update();\n }elseif($userId == $model->msg_revid){\n $model->msg_revdel = Msg::$del['del'];\n $model->update();\n }\n }\n }\n \n header('Location:'.$_SERVER['HTTP_REFERER']);\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "public function delete(): void;", "public function delete() \n {\n $model = $this->model;\n $input = Input::all(); \n \n $arrayIdDelete = $input[$model::getPrimaryKey()];\n \n $result = array();\n foreach ($arrayIdDelete as $id) {\n $singleResult = $this->deleteSingleObject($id);\n $result[] = $singleResult;\n }\n \n return $jsend = JSend\\JSendResponse::success($result);\n }", "public function delete()\r\n\t{\r\n\t}", "public function actionDelete()\n {\n $post = file_get_contents(\"php://input\");\n $data = Json::decode($post, true);\n $model = $this->findModel($data['ids']);\n $mensaje['mensaje'] = \"\";\n try {\n $model->delete();\n $mensaje['mensaje'] = \"Exitoso\";\n } catch(IntegrityException $e) {\n $mensaje['mensaje'] = \"Error\";\n }\n\n echo Json::encode($mensaje);\n exit;\n }", "public function delete()\n {\n \n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function _delete($url = null, array $parameters = []);", "public function delete_command(){\n\t\t$this->layout = 'ajax';\n\t\n\t\tif($this->request->is('post')){\n\t\t\t$command_id = $this->request->data['command_id'];\n\t\n\t\t\t$obj_command = $this->Command->findBy('IDCommand', $command_id);\n\t\t\tif($obj_command->saveField('Status', 0)){\n\t\t\t\techo json_encode(array('success'=>true,'msg'=>__('Eliminado con &eacute;xito.')));\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\techo json_encode(array('success'=>false,'msg'=>__('Error inesperado.')));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\n\t}", "public function doDelete($path);", "function deleteOrder () {\n\t//\terror_log ( 'addOrder\\n', 3, '/var/tmp/php.log' );\n\t$request = Slim::getInstance ()->request ();\n\t$orderId = json_decode ( $request->getBody () );\n\ttry {\n\t\t$db = new DbOperation();\n\t\t$db->deleteOrder ( $orderId->orderId );\n\t\techo '{\"deleteStatus\":\"YES\"}';\n\t} catch ( Exception $e ) {\n\t\t//\t\terror_log ( $e->getMessage (), 3, '/var/tmp/php.log' );\n\t\techo '{\"errorText\":\"Delete order fail with text as\", \"text\":}' . $e->getMessage () . $e . '}';\n\t}\n}", "function index_delete() {\n\t\t$id = $this->delete('id');\n\t\t$this->db->where('id', $id);\n\t\t$delete = $this->db->delete('driver_detail');\n\t\tif ($delete) {\n\t\t\t$this->response(array('status' => 'success'), 201);\n\t\t} else {\n\t\t\t$this->response(array('status' => 'fail', 502));\n\t\t}\n\t}", "public function deleteAction() {\n \n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n \n\n $del = $this->_model->deleteNote($this->id);\n\n if( $this->xhr ) {\n \n $this->_asJson(array('id' => $this->id,\n 'consumer_id' => $this->consumer_id,\n 'message' => 'Note Removed.',\n 'success' => $del));\n }else{\n \n $this->_helper->flashMessenger->addMessage(array('alert alert-success'=>\"Note Removed.\") ); \n $this->_redirect($this->indexAction . $this->consumer_id);\n \n }\n }", "public abstract function delete();", "public function delete ( $path, $params ) {\n \n \t$opts = array ( \n \t\t\tCURLOPT_CUSTOMREQUEST => \"DELETE\"\n );\n \n $exec = $this->execute ( $path, $opts, $params );\n \n return $exec;\n }", "public function delete()\n {\n $user = new Task();\n $attributes = $this->request->body();\n\n if( $user->setAttributes($attributes)->delete() ) {\n // return ['status' => 'success']; // for ajax\n header(\"Location: /task/index\");\n exit;\n }\n\n return ['status' => 'cannot delete'];\n }", "function DELETE($options) \n\t\t{\n\t\t\t$options[\"path\"] = urldecode($options[\"path\"]);\n\t\t \n\t\t //Parameter des Datastorages laden\n\t\t\t$path_explode = explode(\"/\",$options[\"path\"]);\n\t\t\t$ds_path = substr($options[\"path\"],strlen($path_explode[1])+2);\n\t\t\tif(substr($ds_path,-1)==\"/\")\n\t\t\t\t$ds_path=substr($ds_path,0,-1);\n\n\t\t //Parameter des Datastorages laden\n\t\t\t$ds = getDatastorageByName($path_explode[1],$this->config_appinfos);\n\t\t\tif($ds){\n\t\t\t\t//Datei/Ordner löschen\n\t\t\t\t$result = $ds->deleteFile($ds_path);\n\n\t\t\t\treturn \"204 No Content\";\n\t\t\t} else {\n\t\t\t\treturn \"404 Not found\";\n\t\t\t}\n\t\t return \"404 Not found\";\n\t\t}", "public function delete()\n\t{\n\t}", "public function delete()\n {\n //\n }", "public function delete()\n {\n\n }", "public function delete( $id ){\n\n }", "public function DELETE() {\n\t\t$this->scriptForceHint('DELETE');\n\t}", "abstract public function delete(Request $request);", "public function deleteAction() {\n return $this->getResponse()->setHttpResponseCode(403);\n }" ]
[ "0.8009198", "0.7753794", "0.7446787", "0.7446787", "0.74387246", "0.7275048", "0.71951824", "0.7187741", "0.7145095", "0.7139498", "0.7130761", "0.71209663", "0.7105295", "0.70149255", "0.69761986", "0.69761235", "0.6965969", "0.6965969", "0.69585145", "0.69583035", "0.69580466", "0.69580466", "0.6952009", "0.6951524", "0.6890766", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.6853602", "0.68371576", "0.67943275", "0.6787127", "0.67867875", "0.678546", "0.678546", "0.6739447", "0.67240834", "0.6704862", "0.66995883", "0.6651804", "0.6648447", "0.66391397", "0.6633169", "0.6587492", "0.65841985", "0.65788954", "0.6570337", "0.65628874", "0.65459824", "0.6510609", "0.6497682", "0.64906603", "0.6484573", "0.647148", "0.64571625", "0.6453246", "0.64522076", "0.6445484", "0.644524", "0.64312255", "0.64195013", "0.64187896", "0.6414864", "0.6410777", "0.6410777", "0.6410777", "0.6410777", "0.6410777", "0.6410777", "0.6410777", "0.6410777", "0.6410777", "0.6410777", "0.6399729", "0.6393771", "0.63857436", "0.6377285", "0.63684994", "0.6367936", "0.63608956", "0.6357131", "0.63561827", "0.6356179", "0.6351737", "0.63437724", "0.63428056", "0.6338562", "0.6335092", "0.63324183", "0.6332108" ]
0.0
-1
Send HTTP Trace command
public function trace($uri = NULL, $vars = NULL) { if (! empty ( $uri )) $this->uri = $uri; if (! empty ( $vars ) && is_array ( $vars )) $vars = http_build_query ( $vars ); if (empty ( $this->query )) $this->query = $vars; else if (! empty ( $vars )) $this->query .= "&" . $vars; if (! empty ( $this->query )) $this->uri .= "?" . $this->query; $this->method = "TRACE"; $this->request_body = NULL; foreach ( $this->request_headers as $k => $v ) { if (in_array ( $k, $this->entity_headers )) unset ( $this->request_headers [$k] ); } $this->send (); return $this->status_code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send(): void\n {\n $requiredParams = [\n 'v' => $this->client->getVersion(),\n 'tid' => $this->client->getTrackingId(),\n 'cid' => $this->client->getClientId(),\n 't' => $this->getHitType(),\n ];\n $paramValues = array_merge(\n $requiredParams,\n $this->parameters\n );\n \n $url = $this->getBaseUrl();\n\n $guzzle = new \\GuzzleHttp\\Client();\n $result = $guzzle->request('POST', $url, ['form_params' => $paramValues]);\n\n if ($this->client->isDebug()) {\n var_dump((string) $result->getBody());\n }\n }", "public function gr_traceroute_ajax_request()\n\t{\n\t\t$response = '';\n\t\tif (preg_match(\"/^win.*/i\", PHP_OS))\n\t\t{\n\t\t\texec('tracert ' . $this->traceroute_host, $out, $code);\n\t\t}\n\t\telse\n\t\t{\n\t\t\texec('traceroute -m15 ' . $this->traceroute_host . ' 2>&1', $out, $code);\n\t\t}\n\t\tif ($code && is_array($out))\n\t\t{\n\t\t\t$response = __('An error occurred while trying to traceroute: ', 'Gr_Integration') . join(\"\\n\", $out);\n\t\t}\n\t\tif ( !empty($out))\n\t\t{\n\t\t\tforeach ($out as $line)\n\t\t\t{\n\t\t\t\t$response .= $line . \"<br/>\";\n\t\t\t}\n\t\t}\n\t\t$response = json_encode(array('success' => $response));\n\t\theader(\"Content-Type: application/json\");\n\t\techo $response;\n\t\texit;\n\t}", "public function trace( $sURL )\n\t\t{\n\t\t\treturn $this->request( \"trace\", $sURL );\n\t\t}", "protected function _logTraffic() {\n if ('testing' !== APPLICATION_ENV) {\n $lastRequest = $this->_client->getLastRequest();\n $lastResponse = $this->_client->getLastResponse();\n $filename = date('Y-m-d') . '-gofilex.log';\n $logMessage = \"\\n\";\n $logMessage .= '[REQUEST]' . \"\\n\";\n $logMessage .= $lastRequest . \"\\n\\n\";\n $logMessage .= '[RESPONSE]' . \"\\n\";\n $logMessage .= $lastResponse . \"\\n\\n\";\n\n $logger = Garp_Log::factory($filename);\n $logger->log($logMessage, Garp_Log::INFO);\n }\n }", "public static function trace($url, $headers = [], $options = [])\n {\n }", "public function send()\n {\n header(\n $_SERVER[\"SERVER_PROTOCOL\"].\" \". // HTTP 1.1\n $this->statusCode.\" \". // 200\n $this->statusText // OK\n );\n foreach ($this->headers as $key => $value) {\n header(\"$key: $value\");\n }\n }", "public function doTraceroute() {\r\n \r\n if (!file_exists(self::$TRACEROUTE_PATH)) {\r\n $this->setError(self::$NQT_BOGUS_PATH);\r\n return false;\r\n }\r\n \r\n /* Ensure that we have a legitimate IP address to traceroute to */\r\n if (!$this->isValidHostAddr($this->getAddr())) {\r\n $this->debug('traceroute() has an invalid IP address.');\r\n return false;\r\n }\r\n \r\n $ip = $this->getAddr();\r\n $tr = escapeshellcmd(self::$TRACEROUTE_PATH . ' ' . $ip);\r\n return `$tr`;\r\n }", "private function handleDiagnosticsRequest()\n {\n $statusApiConfigurator = new Webinterpret_Connector_StatusApi_StatusApiConfigurator(Mage::app(), Mage::getConfig());\n\n $statusApi = $statusApiConfigurator->getExtendedStatusApi();\n\n $json = $statusApi->getJsonTestResults();\n header('Content-Type: application/json');\n header('Content-Length: '.strlen($json));\n echo $json;\n }", "public static function traza() {\n global $config;\n \n if ( ! isset($config['debug_file'])) return;\n\t $texto = date(\"Ymd-H:i:s \") . $_SERVER['REMOTE_ADDR'];\n\t foreach (func_get_args() as $arg) {\n\t\t $texto .= ' - ' . var_export($arg, true);\n\t }\n\t file_put_contents($config['debug_file'], $texto . \"\\n\", FILE_APPEND);\n }", "public function send()\n {\n // Stream post the data\n $this->evaluateResponse($this->httpPost($this->str_endpoint . '/event', $this->compile()));\n }", "public function line()\n {\n return $this->method() . ' ' . $this->requestTarget() . ' ' . $this->protocol();\n }", "public function send($log);", "function atkTrace($msg=\"\")\n{\n\tglobal $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_GET_VARS, $HTTP_COOKIE_VARS, $HTTP_POST_VARS;\n\n\t$log = \"\\n\".str_repeat(\"=\", 5).\"\\n\";\n\t$log.= \"Trace triggered: \".$msg.\"\\n\";\n\t$log.= date(\"r\").\"\\n\";\n\t$log.= $HTTP_SERVER_VARS[\"REMOTE_ADDR\"].\"\\n\";\n\t$log.= $HTTP_SERVER_VARS[\"SCRIPT_URL\"].\"\\n\";\n\t$log.= \"\\nSessioninfo: \".\"session_name(): \".session_name().\" session_id(): \".session_id().\" SID: \".SID.\" REQUEST: \".$_REQUEST[session_name()].\" COOKIE: \".$_COOKIE[session_name()].\"\\n\";\n\t$log.= \"\\n\\nHTTP_SERVER_VARS:\\n\";\n\t$log.= var_export($HTTP_SERVER_VARS, true);\n\t$log.= \"\\n\\nHTTP_SESSION_VARS:\\n\";\n\t$log.= var_export($HTTP_SESSION_VARS, true);\n\t$log.= \"\\n\\nHTTP_COOKIE_VARS:\\n\";\n\t$log.= var_export($HTTP_COOKIE_VARS, true);\n\t$log.= \"\\n\\nHTTP_POST_VARS:\\n\";\n\t$log.= var_export($HTTP_POST_VARS, true);\n\t$log.= \"\\n\\nHTTP_GET_VARS:\\n\";\n\t$log.= var_export($HTTP_GET_VARS, true);\n\n\t$log.= \"\\n\\nSession file info:\\n\";\n\t$log.= var_export(stat(session_save_path().\"/sess_\".session_id()), true);\n\n\t$tmpfile = tempnam(\"/tmp\",atkconfig(\"identifier\").\"_trace_\");\n\t$fp = fopen($tmpfile,\"a\");\n\tfwrite($fp, $log);\n\tfclose($fp);\n}", "public function send()\n {\n http_response_code( $this->getResultCode() );\n echo $this->getBody();\n }", "private function send(): void\n {\n $data = [\n 'code' => $this->status,\n 'message' => $this->message,\n 'datetime' => Carbon::now()\n ];\n\n $config = config(\"tebot.$this->channelConfig\");\n\n $data['title'] = $this->title . ' ' . $config['name'];\n\n if (!empty($this->detail)) $data['detail'] = json_encode($this->detail);\n\n Http::withHeaders(['x-api-key' => $config['key']])->post($config['url'] . '/api/message', $data);\n }", "public function testOrgApacheSlingTracerInternalLogTracer()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.tracer.internal.LogTracer';\n\n $crawler = $client->request('POST', $path);\n }", "public function sendRequest()\n {\n }", "public function sendRequest( ) {\n\n }", "public function send()\n\t{\n\t\tif(($this->xResponse))\n\t\t{\n\t\t\tforeach($this->aDebugMessages as $sMessage)\n\t\t\t{\n\t\t\t\t$this->xResponse->debug($sMessage);\n\t\t\t}\n\t\t\t$this->aDebugMessages = array();\n\t\t\t$this->xResponse->sendHeaders();\n\t\t\t$this->xResponse->printOutput();\n\t\t}\n\t}", "protected function _send(string $request)\n {\n $this->_addLog($request . self::EOL);\n $this->request = $request;\n }", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "public function send() : void\n {\n \\http_response_code( $this->status );\n\n foreach ( $this->headers->all() as $name => $values ) {\n foreach ( $values as $index => $value ) {\n \\header( \"$name: $value\", $index === 0 );\n }\n }\n\n echo $this->content;\n }", "public function send(Http\\IRequest $httpRequest, Http\\IResponse $httpResponse): void\n\t{\n\t\t$httpResponse->redirect($this->url, $this->httpCode);\n\t}", "final function getTrace();", "public function trace($message)\n {\n }", "public function execute_http()\n {\n }", "public function getTrace();", "public function send() {\n $tidy = new Tidy();\n $tidy->parseString($this->output, $this->tidyConfig);\n $tidy->cleanRepair();\n\n // Send the output string to the client\n echo $tidy;\n }", "public function send() {}", "public function send() {}", "public function send() {}", "public function send() {}", "public function send() {}", "public function send($request);", "public function send() {\n\n\t\t$current_time = time();\n\t\tif ( ! $this->should_send_tracking( $current_time ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$collector = $this->get_collector();\n\n\t\t$request = new WPSEO_Remote_Request( $this->endpoint );\n\t\t$request->set_body( $collector->get_as_json() );\n\t\t$request->send();\n\n\t\tupdate_option( $this->option_name, $current_time, 'yes' );\n\t}", "public function send()\n {\n http_response_code($this->statusCode);\n $this->sendContent();\n }", "function turk_debug($mt) {\n\t\techo \"<br /><br />\\n\\nRawData<br />\\n\".$mt->RawData.\"\\n\\n<br /><br />\";\n\t\techo \"<br /><br />\\n\\nSOAPData<br />\\n\".$mt->SOAPData.\"\\n\\n<br /><br />\";\n\n\t\techo $mt->Fault;\n\t\techo $mt->Error;\t\n\t}", "public function doRequest()\n {\n $this->post('/api_v1/webhook/log/1',\n json_decode('{\n \"transaction_time\": \"1603711958\",\n \"id\": \"e0c523cd-3dfd-4206-83b4-9c0dc32dd77e\",\n \"event\": \"in-store-txn\",\n \"value\": 13.98,\n \"status\": \"complete\",\n \"customer_id\": \"e0c523cd-3dfd-4206-83b4-9c0dc32dd77e\"\n }'),\n [\n \"Accept\" => \"application/json\"\n ]\n );\n\n $this->assertEquals(\n 200, $this->response->getStatusCode()\n );\n }", "function mytrace($s)\r\n{\r\n\t// see constants.php for TRACE_ENABLED flag\r\n\t\r\n\t// turn off trace?\r\n\tif (isset($_REQUEST[QS_DEBUG]))\r\n\t{\r\n\t\tif ($_REQUEST[QS_DEBUG]==\"0\") \r\n\t\t{\r\n\t\t\t$_SESSION[QS_DEBUG]=\"\";\r\n\t\t} \r\n\t}\r\n\t\r\n\t// Turn ON trace?\r\n\tif (isset($_REQUEST[QS_DEBUG]))\r\n\t{\r\n\t\tif ($_REQUEST[QS_DEBUG]==\"1\") \r\n\t\t{\r\n\t\t\t$_SESSION[QS_DEBUG]=\"1\";\r\n\t\t\t\r\n\t\t\tOutBR($s);\r\n\t\t\treturn;\r\n\t\t} \r\n\t}\r\n\t\r\n\tif (TRACE_ENABLED) \r\n\t{\r\n\t\t$_SESSION[QS_DEBUG]=\"1\";\r\n\t\t\r\n\t\tOutBR($s);\r\n\t\treturn;\r\n\t} \r\n\t\r\n\tif (isset($_SESSION[QS_DEBUG]))\r\n\t{\r\n\t\tif ($_SESSION[QS_DEBUG]==\"1\") \r\n\t\t{\r\n\t\t\t$_SESSION[QS_DEBUG]=\"1\";\r\n\t\t\t\r\n\t\t\tOutBR($s);\r\n\t\t\treturn;\r\n\t\t} \r\n\t}\r\n\t\r\n}", "public function sendRequest()\n {\n $url = \"http://66.45.237.70/api.php\";\n $number = $this->senderObject->getMobile();\n $text = $this->senderObject->getMessage();\n\n try {\n $this->errorException();\n\n } catch (XenonException $exception) {\n $exception->showException($this->senderObject);\n }\n $config = $this->senderObject->getConfig();\n\n $data = array(\n 'username' => $config['username'],\n 'password' => $config['password'],\n 'number' => $number,\n 'message' => $text\n );\n try {\n $ch = curl_init(); // Initialize cURL\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $smsResult = curl_exec($ch);\n $status = $this->generateReport($smsResult, $data);\n\n } catch (XenonException $exception) {\n $exception->showException();\n }\n }", "final public function getTraceAsString()\n {\n return 'trace';\n }", "function logAnalytics($tid,$cid,$t,$ec,$ea,$ev,$uip,$ua,$av) {\n $v=\"1\"; //version number 1\n $url = \"http://www.google-analytics.com/collect?\".\n \"v=\".urlencode($v).\n \"&tid=\".urlencode($tid).\n \"&cid=\".urlencode($cid).\n \"&t=\".urlencode($t).\n \"&ec=\".urlencode($ec).\n \"&ea=\".urlencode($ea).\n \"&el=\".urlencode($ev).\n \"&ev=\".urlencode(\"1\").\n \"&uip=\".urlencode($uip).\n \"&ua=\".urlencode($ua).\n \"&an=\".urlencode($_ENV['APP_NAME']).\n \"&av=\".urlencode($av);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_TIMEOUT, 60);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 0 );\n $response = curl_exec($ch);\n}", "function get_trace(){\n\t\tglobal $database_queries,$database_query_count,$is_connected_to_db,$global_link;\n\t\treturn(\"<div style='width:100%'></div>\".$this->get_shadow(\"<h1>Mysql Trace information</h1>Note: this information s for debug purposes only, and will not be shown in the final product.<br/>Query Count:\".\n\t\t\t'db used:'.$this->dbdatabase.'<br/>Connected to Database:'.(int)$is_connected_to_db.'<br/>Link:'.$global_link.'<br/> Query Count: '.\n\t\t\t$database_query_count.'<br/>'.$database_queries,$this->default_style,'center','80%'));\n\t}", "private function _writeRequestLog($method, $url, $headers, $body)\n {\n $logInfo = \"\\n$method: $url \\n\";\n echo $logInfo . $this->_writeHeadersAndBody($logInfo, $headers, $body);\n }", "function http_send_status($status) {}", "public function renderRequestLine()\n {\n return $this->method . ' ' . (string) $this->uri . ' HTTP/' . $this->version;\n }", "function send_to_server( $nEventLogIdn, $nDateTime, $userID ){\n\t\t//clients url will be here\n\t\t//$url = \"http://localhost/frm_att_data/toServer.php?\";\n\t\t//$url = \"http://202.161.188.108/school/schoobee/wh/app/web_api/attendance/recive_device_attendance.php?\";\n\t\t$url = \"http://202.161.188.108/school/schoobee/nababidhan/app/web_api/attendance/recive_device_attendance.php?\";\n\n $val = \"CHECKINOUT_ID=$nEventLogIdn&CARD_NO=$userID&CHECK_TIME=$nDateTime\";\n\n\t\t$server_url = $url.$val;\n\n\t\t//curl start\n\t\t$curl = curl_init();\n\t\tcurl_setopt_array($curl, array(\n\t\tCURLOPT_RETURNTRANSFER => 1,\n\t\tCURLOPT_URL => $server_url,\n\t\tCURLOPT_USERAGENT => ''\n\t\t));\n\t\t$output = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\treturn $output;\n\t}", "public function send()\n {\n if (function_exists('http_response_code')) {\n http_response_code($this->code);\n } else {\n header(' ', true, $this->code);\n }\n\n foreach ($this->headers as $name => $value) {\n header($name . ': ' . $value);\n }\n\n if (!is_null($this->content)) {\n echo $this->content;\n }\n }", "public function send(Http\\IRequest $httpRequest, Http\\IResponse $httpResponse)\n {\n $httpResponse->setContentType($this->contentType ? $this->contentType : 'text/plain', 'UTF-8');\n echo $this->mapper->stringify($this->data, $this->isPrettyPrint());\n }", "function trace($txt, $isArray=false){\n\t// this is helpful on a remote server if you don't\n\t//have access to the log files\n\t//\n\t$log = new cLOG(\"../tests/upload.txt\", false);\n\t//$log->clear();\n\tif($isArray){\n\t\t$log->printr($txt);\n\t}else{\n\t\t$log->write($txt);\n\t}\n\n\t//echo \"$txt<br>\";\n}", "function http_send_data($data) {}", "public function trace($project_id, $build_id)\n {\n return $this->get($this->getProjectPath($project_id, 'builds/'.$this->encodePath($build_id).'/trace'));\n }", "public function logTrace()\n {\n $output = new Output(Output::MODE_FILE, $this->getLogPath());\n $output->open();\n \\DebugHelper::dump()->showtrace($output);\n $output->close();\n }", "public function send_request($action, $parameters);", "protected function send() {}", "static function PrintTrace()\r\n {\r\n self::$yyTraceFILE = fopen('php://output', 'w');\r\n self::$yyTracePrompt = '<br>';\r\n }", "function output() {\n if (isset($this->status)) {\n $this->send_header(sprintf('HTTP/1.1 %d %s',\n $this->status, $this->reason),\n TRUE,\n $this->status);\n }\n\n foreach ($this->headers as $k => $v) {\n $this->send_header(\"$k: $v\");\n }\n\n echo $this->body;\n }", "function traceHelloPHP(){\n echo 'Hello PHP<br>';\n echo 'Hello World<br>';\n}", "public function traceRouteHost()\n {\n $datas = [];\n\n $hosts = config('traceroute_hosts');\n\n if(empty($hosts))\n $hosts = [ 'google.com' ];\n\n foreach ($hosts as $key => $host){\n exec('traceroute ' . $host . ' | awk \\'/a/ { print ($all) }\\'' , $output);\n\n array_push($datas, [\n 'traceroute_to' => $host,\n 'hosts' => []\n ]);\n\n foreach($output as $value){\n\n preg_match_all(\"'\\((.*?)\\)'\",$value,$ip);\n\n array_push($datas[$key]['hosts'], $this->ipDetails($ip[1][0]));\n\n }\n }\n\n echo json_encode($datas);\n }", "function sendHeader() {\n\n\t\t$this->console_text('###############################################################################');\n\t\t$this->console_text(' XASECO2 v' . XASECO2_VERSION . ' running on {1}:{2}', $this->server->ip, $this->server->port);\n\t\t$this->console_text(' Name : {1} - {2}', stripColors($this->server->name, false), $this->server->serverlogin);\n\t\tif ($this->server->isrelay)\n\t\t\t$this->console_text(' Relays : {1} - {2}', stripColors($this->server->relaymaster['NickName'], false), $this->server->relaymaster['Login']);\n\t\t$this->console_text(' Game : {1} - {2} - {3}', $this->server->game,\n\t\t $this->server->packmask, $this->server->gameinfo->getMode());\n\t\t$this->console_text(' Version: {1} / {2}', $this->server->version, $this->server->build);\n\t\t$this->console_text(' Author : Xymph');\n\t\t$this->console_text('###############################################################################');\n\n\t\t// format the text of the message\n\t\t$startup_msg = formatText($this->getChatMessage('STARTUP'),\n\t\t XASECO2_VERSION,\n\t\t $this->server->ip, $this->server->port);\n\t\t// show startup message\n\t\t$this->client->query('ChatSendServerMessage', $this->formatColors($startup_msg));\n\t}", "public function sendHttpHeaders() {}", "public function send(){\n \n\n\t\t$sent = FALSE;\n\t\t\n\t\t$baseurl = \"http://api.clickatell.com\";\n\n\t\t$this->text = urlencode($this->text);\n\n\t\t//ap\n\t\t$this->to = '266'.$this->to;\n\n\t\t// auth call\n\t\t$url = \"$baseurl/http/auth?user=$this->username&password=$this->password&api_id=$this->api_id\";\n\n\t\t// do auth call\n\t\t$ret = file($url);\n\n\t\t// explode our response. return string is on first line of the data returned\n\t\t$sess = explode(\":\", $ret[0]);\n\t\tif ($sess[0] === 'OK') {\n\n\t\t\t$sess_id = trim($sess[1]); // remove any whitespace\n\t\t\t$url = \"$baseurl/http/sendmsg?session_id=$sess_id&to=$this->to&text=$this->text\";\n\n\t\t\t// do sendmsg call\n\t\t\t$ret = file($url);\n\t\t\t$send = explode(':', $ret[0]);\n\n\t\t\tif ($send[0] === \"ID\")\n\t\t\t{\n\t\t\t\t$sent = TRUE;\n\t\t\t} else {\n\t\t\t\techo 'Authentication failure: ' . $ret[0] . \"\\n\";\n\t\t\t}\n\t\n\t\t\treturn $sent;\n\t\t}\n\t}", "private function sendResponseCode(): void\n {\n\n $http = sprintf(\n 'HTTP/%s %s %s',\n $this->versionProtocol,\n $this->responseCode,\n $this->httpCodeText[$this->responseCode]\n );\n\n header($http, true);\n http_response_code($this->responseCode);\n\n }", "public static function trace($str) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::trace($str);\t\t\n\t}", "function send($data);", "function send($data);", "function Trace($msg)\r\n{\r\n\tglobal $debug;\r\n\tif ($debug) echo $msg;\r\n}", "protected function httpStatusLine()\r\n {\r\n return sprintf('HTTP/%s %s', $this->protocol_version, $this->status);\r\n }", "public function getRequestLogEntry(Test $test, RequestDriverInterface $driver): string {\n $why = $test->getConfig()['why'] ?? '';\n\n return HttpLogging::request($why, $driver->getMethod(), (string) $driver->getUri(), $driver->getHeaders(), trim($driver->getBody()));\n }", "public function sendHeaders() {\n $status = $this->handler->getStatus();\n header( Status::getHeader( $status ), true, $status );\n $headers = $this->handler->headers();\n foreach( $headers as $key => $value ) {\n header( $key . ': ' . $value );\n }\n }", "public function testLogStandardActionUsingPOST()\n {\n\n }", "public function isTrace()\n\t{\n\t\treturn $this->httpMethod() == self::MethodTrace;\n\t}", "public function sendHeaders() {}", "public function sendHeaders()\n {\n \tforeach ($this->headers as $directive => $value) {\n \t\t\\header($directive.': '.$value);\n \t}\n }", "public function send() {\n /** @var HeaderCollection $headers */\n $headers = Yii::$app->response->headers;\n $headers->removeAll();\n foreach ($this->getHeaders() as $_header => $lines) {\n $headers->add($_header, $this->getHeaderLine($_header));\n }\n Yii::$app->response->version = $this->getProtocolVersion();\n Yii::$app->response->statusCode = $this->getStatusCode();\n Yii::$app->response->statusText = $this->getReasonPhrase();\n Yii::$app->response->content = $this->getBody();\n\n Yii::$app->response->send();\n }", "public function send_cmd($request) {\n\t\t// make or get the socket filehandle\n\t\tif (!$this->init_socket() ) {\n\t\t\ttrigger_error (\"oSRS Error - Unable to establish socket: (\". $this->_socketErrorNum .\") \". $this->_socketErrorMsg, E_USER_WARNING);\n\t\t\tdie();\n\t\t}\n\n\t\t// Authenticate user\n\t\t$auth = $this->authenticate();\n\t\t\n\t\tif (!$auth) {\n\t\t\tif ($this->_socket) $this->close_socket();\n\t\t\ttrigger_error (\"oSRS Error - Authentication Error: \". $auth['error'], E_USER_WARNING);\n\t\t\tdie();\n\t\t}\n\n\t\t$this->send_data($request);\n\t\t$data = $this->read_data();\n \n $num_matches = preg_match('/<item key=\"response_code\">401<\\/item>/', $data, $matches);\n\n if ($num_matches > 0)\n trigger_error(\"oSRS Error - Reseller username or osrs_key is incorrect, please check your config file.\");\n \n\t\treturn $data;\n\t}", "static function PrintTrace()\n {\n self::$yyTraceFILE = fopen('php://output', 'w');\n self::$yyTracePrompt = '';\n }", "public function send()\n {\n }", "public function testOrgApacheSlingEngineImplDebugRequestProgressTrackerLogFilter()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter';\n\n $crawler = $client->request('POST', $path);\n }", "public function send(Request $request, $traceNumber)\n\t{\n\t\tif (!is_numeric($traceNumber)) {\n\t\t\tthrow new OrbitalPHPException('Trace number must be numeric');\n\t\t}\n\n\t\t// Run onBeforeSend\n\t\tif ($this->_onBeforeSend) {\n\t\t\tcall_user_func($this->_onBeforeSend, $request);\n\t\t}\n\n\t\t// Send the request\n\t\t$content_length = strlen($request->getXml());\n\t\t$fp = stream_socket_client($this->_sockethost, $errno, $errstr, 30);\n\t\tif (!$fp) {\n\t\t\tthrow new OrbitalPHPException(\n\t\t\t\t'Could not connect to Orbital, stream_socket_client failed. '\n\t\t\t.\t\"Errno: $errno, Errstr: $errstr\"\n\t\t\t);\n\t\t}\n\n\t\tfputs($fp, \"POST /authorize HTTP/1.0\\r\\n\");\n\t\tfputs($fp, \"MIME-Version: 1.0\\r\\n\");\n\t\tfputs($fp, \"Content-type: application/PTI50\\r\\n\");\n\t\tfputs($fp, \"Content-length: $content_length\\r\\n\");\n\t\tfputs($fp, \"Content-transfer-encoding: text\\r\\n\");\n\t\tfputs($fp, \"Request-number: 1\\r\\n\");\n\t\tfputs($fp, \"Document-type: Request\\r\\n\");\n\t\tfputs($fp, \"Merchant-id: {$this->_merchantId}\\r\\n\");\n\t\tfputs($fp, \"Trace-number: $traceNumber\\r\\n\");\n\t\tfputs($fp, \"\\r\\n\");\n\t\tfputs($fp, $request->getXml());\n\n\t\t// Get the response\n\t\t$orbitalResponse = '';\n\t\twhile (!feof($fp)) {\n\t\t\t$orbitalResponse .= fgets($fp);\n\t\t}\n\n\t\t// Load response object\n\t\t$response = new Response($request->getType(), $orbitalResponse);\n\n\t\t// Run onAfterSend\n\t\tif ($this->_onAfterSend) {\n\t\t\tcall_user_func($this->_onAfterSend, $request, $response);\n\t\t}\n\n\t\t// Return the response object\n\t\treturn $response;\n\t}", "public function send_through_proxy($uri)\n {\n }", "public function send()\n {\n $this->jsonManager->domain = $this->uri;\n $this->jsonManager->port = $this->port;\n $this->jsonManager->online = $this->isOnline();\n $this->jsonManager->send();\n }", "public function sendCommand($cmd) {\n $this->log($cmd);\n $cmd .= \"\\r\\n\";\n fwrite($this->getConnection(), $cmd);\n }", "function websend_command($action, $cmd = '', $target_player = null) {\n // this is the mandatory structure of the data passed to Websend.\n // changing this here will break the system.\n\n $websend_array = array(\n 'action' => $action,\n 'targetPlayer' => $target_player,\n 'command' => $cmd,\n );\n\n $json = json_encode($websend_array) . CHR(10);\n print($json);\n}", "function http_send_stream($stream) {}", "public static function trace($s)\n {\n if($_SERVER['SERVER_NAME'] == 'localhost')\n {\n ///NEED TO UPDATE PERMISSIONS TO BE ABLE TO WRITE FILES :(\n // open file\n if(self::$LOG_PATH == '') self::$LOG_PATH = self::$DEFAULT_PATH;\n $filePath = $_SERVER['DOCUMENT_ROOT'].'/utils/loggers/'.self::$LOG_PATH;\n\n $contents = file_get_contents($filePath);\n $mode = (strlen($contents) > self::LOG_LIMIT) ? 'w' : 'a';\n $fd = fopen($filePath, $mode) or die('could not open or create phplog file!');\n\n // write string\n fwrite($fd, $s . \"\\r\\n\");\n// fwrite($fd, 'count: '.strlen($contents) . \"\\r\\n\");\n\n // close file\n fclose($fd);\n }\n }", "function sendRequest($fp, $requestString)\n{\n\tfwrite($fp, $requestString);\n}", "function getTraceId($span)\n{\n $traceId = $span->getContext()->getTraceId();\n $xrayTraceId = '1-' . substr($traceId, 0, 8) . '-' . substr($traceId, 8);\n echo 'Final trace ID: ' . json_encode(['traceId' => $xrayTraceId]);\n}", "public function send() {\r\n\t\t$this->resource->send();\r\n\t}" ]
[ "0.6137305", "0.57668316", "0.5636476", "0.5560851", "0.552449", "0.5448577", "0.5445526", "0.5422156", "0.53777486", "0.53771204", "0.5369932", "0.5302437", "0.53010446", "0.5284967", "0.5263454", "0.5203932", "0.5200767", "0.5186014", "0.51856947", "0.51807135", "0.5158325", "0.5158325", "0.5158325", "0.5158325", "0.5158325", "0.5158325", "0.5158325", "0.5158325", "0.5158325", "0.5158325", "0.5158325", "0.514855", "0.51274544", "0.5118398", "0.51025325", "0.5098824", "0.50512266", "0.5041067", "0.50287515", "0.5015907", "0.5015907", "0.5015907", "0.5015907", "0.5015907", "0.5006397", "0.49995166", "0.49798256", "0.49706224", "0.49593216", "0.49486676", "0.49348658", "0.4933179", "0.4910807", "0.48988727", "0.4888108", "0.48868284", "0.4874475", "0.4860157", "0.48539868", "0.48520327", "0.48519564", "0.4851768", "0.4849444", "0.48484948", "0.48450264", "0.48400727", "0.48379803", "0.48318636", "0.48202112", "0.48135895", "0.48110083", "0.48066723", "0.4798993", "0.4798046", "0.47950974", "0.47856358", "0.47856358", "0.478315", "0.4772969", "0.4769493", "0.47662103", "0.47564194", "0.4756105", "0.47544867", "0.47467816", "0.47446224", "0.4740661", "0.47383872", "0.47335106", "0.47158602", "0.4708903", "0.47086093", "0.47038805", "0.47013214", "0.46967664", "0.4692616", "0.46915334", "0.4689624", "0.46882075", "0.46867457" ]
0.60858446
1
Execute HTTP Get command
public function get($uri = NULL, $vars = NULL) { if (! empty ( $uri )) $this->uri = $uri; if (! empty ( $vars ) && is_array ( $vars )) $vars = http_build_query ( $vars ); if (empty ( $this->query )) $this->query = $vars; else if (! empty ( $vars )) $this->query .= "&" . $vars; if (! empty ( $this->query )) $this->uri .= "?" . $this->query; $this->method = "GET"; $this->request_body = NULL; $this->send (); return $this->status_code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function executeGet()\n {\n throw new Frapi_Error('NO_GET');\n }", "public function sendGet()\n\t{\n\t\t$ch = curl_init(\"http://localhost/rest/index.php/book\");\n\t\t//a true, obtendremos una respuesta de la url, en otro caso, \n\t\t//true si es correcto, false si no lo es\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t//establecemos el verbo http que queremos utilizar para la petición\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n\t\t//obtenemos la respuesta\n\t\t$response = curl_exec($ch);\n\t\t// Se cierra el recurso CURL y se liberan los recursos del sistema\n\t\tcurl_close($ch);\n\t\tif(!$response) {\n\t\t return false;\n\t\t}else{\n\t\t\tvar_dump($response);\n\t\t}\n\t}", "public static function get() {\n return self::call(\"GET\");\n }", "function httpGET($url = '/', $headers = '') {\n $this->ensureOpened(__FUNCTION__);\n ($headers = trim($headers)) === '' or $headers .= \"\\r\\n\";\n\n // Note: in HTTP/1.1 Connection defaults to Keep Alive which will keep\n // the connection hanging unless you send 'Connection: close'. Its output\n // also changes due to chunked transfer encoding.\n $headers = \"GET $url HTTP/1.0\\r\\n\".\n $headers.\"\\r\\n\";\n\n $this->write($headers);\n return $this->readAll();\n }", "function hsend_get(&$app, &$c) {\n\t\t$app->logger->debug(sprintf('%s::%s', __CLASS__, __FUNCTION__));\n\n\t\t$this->_http->setMethod(HTTP_REQUEST_METHOD_GET);\n\n\t\t$this->_http->setURL($c->param('app.view_http.request.uri'));\n\n\t\t$this->_set_basic_auth($app, $c);\n\n\t\t$this->_load_get_params($app, $c);\n\n\t\t$this->_load_headers($app, $c);\n\n\t\t$this->_http->sendRequest();\n\n\t\t$this->_handler_response($app, $c);\n\n\t\treturn $app->status->handled;\n\t}", "public function httpGet()\n {\n return $this->method(\"GET\");\n }", "public function sendGet ()\n {\n return $this->handleQuery();\n }", "function get (string $url, array $args = []): string {\n\t$append = '';\n\tif (count($args) > 0) {\n\t\t$append .= '/'.parseUrlGet($args);\n\t}\n\n\t$curlCall = curl_init($url.$append);\n\n\tcurl_setopt($curlCall, CURLOPT_RETURNTRANSFER, 1);\n\n\t$return = curl_exec($curlCall);\n\tcurl_close($curlCall);\n\n\treturn $return;\n}", "private function GET() {\n global $_GET;\n $getData = array();\n foreach($_GET as $key => $value) {\n $getData[$key] = $value;\n }\n $this -> response[\"response\"] = $getData;\n return;\n }", "public function doGet($path = '', array $query = array());", "function Get( $url )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Get( $url )\\n\";\r\n\t\t$this->responseHeaders = $this->responseBody = \"\";\r\n\t\t$uri = $this->makeUri( $url );\r\n\t\t\r\n\t\tif( $this->sendCommand( \"GET $uri HTTP/$this->protocolVersion\" ) )\r\n\t\t\t$this->processReply();\r\n\t\treturn $this->reply;\r\n\t}", "public function get($url, $query = array(), $headers = array());", "public function request_get($uri, array $options = array()) {\n $options['method'] = 'GET';\n return $this->request($uri, $options);\n }", "function get($url, $args = array()) {\n\t\t$defaults = array('method' => 'GET');\n\t\t$r = array_merge( $defaults, $args );\n\t\treturn $this->request($url, $r);\n\t}", "function sendGetCmd($resource) {\n $url = $this->baseURL . $resource;\n\n $request = curl_init($url);\n curl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($request);\n\n return json_decode($result, true);\n }", "public function testBasicGET()\n\t{\n\t\t$Request = new Request(\n\t\t\tnew URL('http://' . self::TESTHOST . '/hallo'),\n\t\t\tnull, // method. Default GET\n\t\t\tnull, // Payload\n\t\t\t$this->_getDefaultOptions());\n\n\t\t// Return the body as string\n\t\t$Result = $Request->getResponseAs(new StringValue());\n\n\t\t$this->assertEquals('hallo', (string)$Result);\n\t}", "public function get() {\n try {\n\n /**\n * Set up request method\n */\n $this->method = 'GET';\n /**\n * Process request and call for response\n */\n return $this->requestProcessor();\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "protected function doGet()\n {\n }", "public function execGET($url, $params = []){\n\t\t#Parse URL params\n\t\t$url = $this->parseURL($url, $params);\n\t\t#Initialize a CURL session. \n\t\t$ch = curl_init();\n\t\t#Set body (empty on GET)\n\t\t$curlBody = json_encode([]);\n\t\t#Set curl headers\n\t\t$curlHeaders = [\n\t\t\t'User-Agent: ' . $this->getRandAgent(), #Set the user agent with a random-selected real one\n\t\t];\n\t\t#Set CURL options\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $curlHeaders); #Set headers\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); #Retrieve output instead of displaying it\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30); #Set timeout to 30 seconds\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); #Disable SSL host verification\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); #Disable SSL peer verification\n\t\tcurl_setopt($ch, CURLOPT_URL, $url); #Set URL\n\t\t#Return raw CURL request output\n\t\treturn curl_exec($ch);\n\t}", "function curl_get($url, array $get = NULL, array $headers = NULL, array $options = array()) { \n $defaults = array( \n CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : ''). http_build_query($get), \n CURLOPT_HEADER => 0, \n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_RETURNTRANSFER => TRUE, \n CURLOPT_TIMEOUT => 4,\n $headers\n ); \n \n $ch = curl_init(); \n curl_setopt_array($ch, ($options + $defaults));\n \n if ( ! $result = curl_exec($ch)) { \n trigger_error(curl_error($ch)); \n } \n curl_close($ch); \n return $result; \n}", "public function get(...$args)\n {\n return $this->curl('get', ...$args);\n }", "function doGET (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"GET method not supported\");\n }", "function httpGet($url){\n $ch = curl_init();\n\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n// curl_setopt($ch,CURLOPT_HEADER, false);\n\n $output=curl_exec($ch);\n\n curl_close($ch);\n return $output;\n}", "public function get ($url, $headers = null, $options = null);", "function doGet($url)\n{\n $return = curlExecute($url);\n return $return;\n}", "public static function Get($url)\r\n {\r\n return self::doRequest('GET', $url);\r\n }", "private function GET($url,$params=false){\n return $this->Request($url,$params,HTTP_GET);\n }", "function curl_get($url, $get = false, $options = array()) { \n $defaults = array(\n CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : '') . (is_array($get) ? http_build_query($get) : ''),\n CURLOPT_HEADER => 0,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_TIMEOUT => 4,\n\t\tCURLOPT_FOLLOWLOCATION => true\n );\n \n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if( ! $result = curl_exec($ch)) {\n trigger_error(curl_error($ch));\n }\n curl_close($ch);\n return $result;\n}", "private function _get($path)\n {\n $this->_logIn();\n\n // @TODO we can access beyond page 1 by adding ?page=pX where X is the number\n // of the page requested\n $this->_curlUrl = self::GV_SERVER_URL . $path;\n \n // Send HTTP POST request.\n curl_setopt($this->_ch, CURLOPT_URL, $this->_curlUrl);\n curl_setopt($this->_ch, CURLOPT_POST, false);\n curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true);\n\n $this->_result = curl_exec($this->_ch);\n \n return $this->_result;\n }", "public function get()\n\t\t{\n\t\t\t$aArgument = func_get_args();\n\t\t\t$sURL = array_shift( $aArgument );\n\t\t\t$aData = (bool) count( $aArgument ) ? array_shift( $aArgument ) : Array();\n\t\t\t$mReferer = (bool) count( $aArgument ) ? array_shift( $aArgument ) : false;\n\n\t\t\treturn $this->request( \"get\", $sURL, $aData, $mReferer );\n\t\t}", "public function curlAction()\n {\n $curl = $this->getCurlService();\n $result = $curl->get('http://www.baidu.com');\n echo $result;\n exit;\n }", "private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }", "public function testRequestGet()\n {\n $url = 'http://localhost:8080';\n $req = new HttpHeadRequest($url);\n \n $hopper = new Grasshopper();\n \n $hopper->addRequest($req);\n \n $result = $hopper->waitForAll();\n \n $res = $result[$url];\n \n if ($res instanceof SuccessEvent){\n $headers = $res->getResponse()->getHeadersParsed();\n echo print_r($headers,true) . PHP_EOL;\n \n $this->assertEquals(200, $res->getResponse()->getStatusCode());\n }\n else{\n $this->fail('GET request returned failure result');\n }\n }", "public function work($cmd) {\n\n\t\techo \"Doing HTTP to \" . $cmd['url'] . \"\\n\";\n\n\t\t//Store return data here temporary:\n\t\t$return = [];\n\n\t\t$timeout = isset($cmd['timeout']) ? $cmd['timeout'] : (isset($this->config->httpTimeout) ? $this->config->httpTimeout : 10);\n\n\t\t$client = new Client([\n\t\t\t'timeout' => $timeout,\n\t\t]);\n\n\t\t$method = strtoupper(isset($cmd['method']) ? $cmd['method'] : 'GET');\n\n\t\t$params = array();\n\t\tif (isset($cmd['params'])) {\n\t\t\t$params['form_params'] = $cmd['params'];\n\t\t}\n\n\t\ttry {\n\n\t\t $url = $cmd['url'];\n\n //Replace placeholders with actual values:\n\t\t $url = $this->parseRequestParams($url);\n\n\t\t\t$response = $client->request($method, $url , $params);\n $body = $response->getBody();\n\n\t\t} catch (\\GuzzleHttp\\Exception\\RequestException $e) {\n\n\t\t\tif ($e->hasResponse()) {\n\t\t\t\t$return['response'] = $e->getResponse();\n\t\t\t}\n\n\t\t\t\\writelog(\"Error! \" . $e->getMessage());\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isset($response) && $response !== null) {\n $body = (string) $response->getBody();\n\n //Output the http request\n echo $body;\n $return = $body;\n\t\t}\n\n\t\t\\writelog(\"HTTP done\");\n\t\t\n\t\treturn $return;\n\n\t}", "function executeGet($input_form) {\n\t\treturn $this->executePost($input_form);\n\t}", "function get($name) {\r\n\t\treturn $this->_send(array('cmd'=>'get', 'name'=>$name));\r\n\t}", "function http_get($url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //curl_setopt($ch,CURLOPT_HEADER, false); \n $output = curl_exec($ch);\n curl_close($ch);\n return $output;\n}", "function get(Request &$request, Response &$response);", "function get($url, $options = array()) {\n\t\treturn $this->request($url, $options);\n\t}", "public function index_get() {\n $action = $this->get('action');\n switch ($action) {\n case \"retrieve_get\":\n $this->retrieve_get();\n break;\n default:\n $this->not_found();\n break;\n }\n }", "private function do_get_request($ch,$url,$params=array()){ \n if(is_array($params) && count($params)>0){\n $url.='?';\n foreach($params as $key=>$val){\n $url.='&'.$key.'='.urlencode($val);\n }\n }\n $ch=curl_init();\n $timeout=5;\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n $result=curl_exec($ch);\n return $result;\n }", "public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to be in a separate class? Anyway, this shoudl\n // be somehow refactored because it is hard to replace or overwrite it.\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($curl);\n // @todo: very important: check the curl errors here.\n\n return $this->parser->parse($response);\n }", "function make_get_call($mid_url) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_HEADER, false);\n \n $output = json_decode(curl_exec($curl));\n curl_close($curl);\n \n return $output;\n }", "function ultimate_remote_get($path){\r\n\r\n\tif(function_exists('curl_init')){\r\n\t\t// create curl resource\r\n\t\t$ch = curl_init();\r\n\r\n\t\t// set url\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $path);\r\n\r\n\t\t//return the transfer as a string\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\r\n\t\t// $output contains the output string\r\n\t\t$output = curl_exec($ch);\r\n\r\n\t\t// close curl resource to free up system resources\r\n\t\tcurl_close($ch);\r\n\r\n\t\tif($output !== \"\")\r\n\t\t\treturn $output;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}", "protected function getContents() {\n $opts = array(\n 'http' => array(\n 'method' => \"GET\",\n 'header' => $this->user_agent . \"\\r\\n\"\n )\n );\n $context = stream_context_create($opts);\n return file_get_contents($this->query, false, $context);\n }", "public function get()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'GET';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData('');\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'GET::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'GET::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'GET::RESPONSE', $sOutput);\n\n if ($iHTTPCode !== 200) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 200');\n }\n\n return $sOutput;\n }", "public function get($path, $action)\n {\n echo $this->run($path, $action, 'get');\n }", "public function execute_http()\n {\n }", "public function getGet ();", "public function get() {\n \n if (!isset($this->request->args[0])) {\n exit;\n }\n\n $url = $this->request->args[0];\n\n //add the $_GET vars to the request\n $query_string = http_build_query($this->request->get);\n $destination_url = $url . ($query_string ? '?'.$query_string : '');\n\n //exit if onBeforeGet doesn't pass\n if($this->onBeforeGet($destination_url) === false){\n return false;\n }\n \n //logs to file if enabled\n if($this->log_to_file){\n $logger = new \\sb\\Logger\\CommandLine();\n $log_name = preg_replace(\"~[^\\w+]~\", \"_\", get_called_class());\n $logger->{$log_name}(json_encode([\"ip\" => \\sb\\Gateway::$remote_addr, \"url\" => $destination_url, \"get\" => $query_string, \"post\" => $this->request->post])); \n }\n \n //proxy to site and return response\n $ch = curl_init();\n \n //set the url to grab the data from\n curl_setopt($ch, CURLOPT_URL, $destination_url);\n \n //set the function to pass the headers from the destination back to the client\n curl_setopt($ch, CURLOPT_HEADERFUNCTION, array($this, 'headerCallBack'));\n \n //set the agent to be used for request\n curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);\n \n //wait 10 seconds for timeout\n curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeout);\n \n //forward any post requests if they exist\n if(count($this->request->post)){\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $this->request->post);\n }\n \n //follow any redirects\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n \n //return the result\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n \n //ignore ssl errors if set to true\n if($this->ignore_ssl_errors){\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n }\n \n //set any additional curl_opts given\n foreach($this->curl_opts as $key=>$val){\n curl_setopt($ch, $key, $val);\n }\n \n //display the output\n return curl_exec($ch);\n }", "public static function curlGET($url,$dato){\n$query = http_build_query($dato);\n$url=$url.\"?\".$query;\n$ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n curl_close($ch);\n if(!$response)\n {\n return false;\n }\n else\n {\n return $response;\n }\n}", "public function get($key)\r\n\t{\r\n\t\tif($key === null)\r\n\t\tthrow new Exception(get_class($this) . \"::get key cannot be null\");\r\n\t\t$paths = $this->getPaths($key);\r\n\t\tforeach($paths as $path)\r\n\t\t{\r\n\t\t\t$contents = '';\r\n\t\t\t$ch = curl_init();\r\n\t\t\tcurl_setopt($ch, CURLOPT_VERBOSE, ($this->debug > 0 ? 1 : 0));\r\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, $this->requestTimeout);\r\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $path);\r\n\t\t\tcurl_setopt($ch, CURLOPT_FAILONERROR, true);\r\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\t\t\t$response = curl_exec($ch);\r\n\t\t\tif($response === false)\r\n\t\t\tcontinue; // Try next source\r\n\t\t\tcurl_close($ch);\r\n\t\t\treturn $response;\r\n\t\t}\r\n\t\tthrow new Exception(get_class($this) . \"::get unable to retrieve {$key}\");\r\n\t}", "public function get($url, $params);", "public function getme(){\n return $this->make_http_request(__FUNCTION__);\n }", "public function get()\n\t{\n\t\t$response = $this->builder->get( $this->buildParameters(), $this->buildUrlAdditions() );\n\n\t\treturn $response;\n\t}", "public function get ($string){\n\t\t$url = $this->target_server.$string;\n\t\t$result = file_get_contents($url);\n\t\treturn $result;\n\t}", "public function _get($url = null, $parameters = []);", "public function get($url);", "static function get($url, $body = null, $headers = array()) {\n $request = new NiceHTTP\\GetRequest($url, $body, $headers);\n return $request->send();\n }", "public function executeRequest() {\n if($this->method == \"get_range\") {\n \treturn $this->getRange();\n }\n else {\n \t$this->response->setStatusCode(405, \"Method Not Found\");\n\t\t\t\t\treturn $this->response;\n }\n }", "function get($url, $headers=array(), $userPW=0, $params=array())\n{\n $paramLength = count($params);\n // only set params if there are some else url is fine\n if ($paramLength > 0)\n {\n $url = $url.'?'.http_build_query($params,'','&');\n }\n echo $url . \"<br/>\";\n $ch = curl_init();\n // set the url\n curl_setopt($ch, CURLOPT_URL, $url);\n // set http method\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n if ($userPW <> 0)\n {\n curl_setopt($ch, CURLOPT_USERPWD, User_Creds::PingUser . \":\" . User_Creds::PingPass);\n }\n $headerLength = count($headers);\n if ($headerLength > 0)\n {\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n }\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n //get response\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n}", "public function execute()\n\t{\n\t\tob_start();\n\t\t$return = curl_exec($this->curlRessource);\n\t\t$datas = ob_get_contents();\n\t\tob_end_clean();\n\t\tcurl_close($this->curlRessource);\n\t\tif(!$return)\n\t\t\tthrow new Exception(\"Impossible d'acceder e l'url : <b>\".$this->url.\"</b>\");\n\t\treturn $datas;\n\t}", "public function get($request, $realm=\"\", $verb=\"GET\") {\n \n $this->info(\"get() starts...\");\n \n /* ready to go? */\n \n if(!$this->isReady()) {\n $this->error(\"get() - not ready.\");\n return false;\n }\n \n if(($this->getToken() === false)||($this->getSecret() === false)) {\n $this->error(\"get() - access token or secret not set yet.\");\n return false;\n }\n \n if(!is_object($request)) {\n $request = littlemdesign_web_http_URL::create($request);\n }\n \n $textURL = $request->toString(littlemdesign_web_http_URL::RFC_3986);\n \n /* add in basic OAuth parameters */\n \n $oauthParams = array(\n \"oauth_version\" => $this->version,\n \"oauth_nonce\" => self::nonce(),\n \"oauth_timestamp\" => self::timestamp(),\n \"oauth_consumer_key\" => $this->key,\n \"oauth_signature_method\" => \"HMAC-SHA1\",\n \"oauth_token\" => $this->getToken()\n );\n $request->mergeQuery($oauthParams);\n \n /* \n * generate a signed request, we sign with the access token\n * and the access secret.\n * \n */ \n \n $getObj = $this->generateSignedRequest($verb, $request, $this->getSecret(), $realm);\n if($getObj === false) {\n $this->error(\"get() - can not generate request token object.\");\n return false;\n }\n \n $this->info(\". fetching via: $textURL...\");\n \n /* get ready to do a cURL request */\n \n $curl = new littlemdesign_web_http_CURL($textURL);\n if(!$curl->isReady()) {\n $this->error(\"get() - no cURL: \".$curl->getError());\n return false;\n }\n \n /* format the headers */\n \n $auth = trim(substr($getObj->authorization, 14));\n $headers = array( \n \"Content-Type\" => \"text/plain\",\n \"Authorization\" => $auth,\n \"Expect\" => ''\n );\n \n /* GET our request... */\n \n $result = $curl->write(\n $verb, \n $textURL, \n \"\", \n $headers['Content-Type'], \n $headers); \n \n /* havest */\n \n if($result === false) {\n $this->error(\"get() - problem with cURL request: \".$curl->getError());\n return false;\n }\n \n /* \n * pass back everything we got, let the caller do what they will\n * with the results.\n * \n */\n \n return $result;\n }", "function http_get($url, ?array $options = null, ?array &$info = null) {}", "public function curl_get($url, array $get = NULL, array $options = array()){\n\n try{\n\n $defaults = array(\n CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : ''). http_build_query($get),\n CURLOPT_HEADER => 0,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_TIMEOUT => 4\n );\n\n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if(!$result = curl_exec($ch)){\n\n //\n // HOOOSTON...VE HAF PROBLEM!\n throw new Exception('CRNRSTN :: CURL [GET] ERROR experienced :: '.curl_error($ch));\n\n }\n\n curl_close($ch);\n\n return $result;\n\n } catch (Exception $e) {\n\n curl_close($ch);\n\n $this->catchException($e, LOG_ERR, __METHOD__, __NAMESPACE__);\n\n return false;\n\n }\n\n }", "protected static function get($index, $queryData=false) {\n\t\t\t$queryData = ($queryData ? $queryData : array());\n\t\t\t$curl = self::socket();\n\n\t\t\tcurl_setopt($curl, CURLOPT_HTTPGET, 1);\n\t\t\tcurl_setopt($curl, CURLOPT_URL, //Url setup\n self::$baseUrl . $index . ($queryData ? '?' . http_build_query($queryData) : ''));\n\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET'); //GET request setup\n\t\t\treturn self::data_decode(curl_exec($curl)); //Launch and store decrypted data\n\t\t}", "public static function _call_get($url){\n $curl = curl_init();\n // Set curl opt as array\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n // No more than 30 sec on a website\n CURLOPT_TIMEOUT=>10,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true,\n ));\n // Run curl\n $response = curl_exec($curl);\n //Check for errors \n if(curl_errno($curl)){\n $errorMessage = curl_error($curl);\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n // Log error message .\n $return = array('success'=>FALSE,'error'=>$errorMessage,'status'=>$statusCode);\n } else {\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n // Log success\n $return = array('success'=>TRUE,'response'=>$response,'status'=>$statusCode);\n }\n //close request\n curl_close($curl);\n //Return\n return $return;\n }", "protected function ping()\n {\n return parent::request('', Request::GET);\n }", "public function get()\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest();\n }", "public static function get($uri,$params=[],$options=[]) {\n return self::request('GET',$uri,$params,$options);\n }", "public function get(string $url, array $input = [], $headers = null);", "protected function sendViaGet(): self\n {\n $this->response = $this->callApi('GET', $this->getUrl(), $this->body());\n\n return $this->parseResponse();\n }", "public function testDemoteAutomatchUrlUsingGET()\n {\n }", "public function get($params = []);", "private function _REST_Handle()\r\n {\r\n // Check encruption requirement\r\n if($this->_get_array_value($_GET,\"AUTH\") == true)\r\n {\r\n $request_command[\"AUTH\"] = true;\r\n \r\n // restore the data from url code\r\n $url_data = $this->_get_array_value($_GET,\"data\");\r\n\r\n // Perform decryption, if clear text input, screw it\r\n $this->load->library('encrypt');\r\n $data_string_decrypt = json_decode($this->encrypt->decode($url_data), true);\r\n \r\n if($data_string_decrypt === NULL || $this->_fail_auth_check($data_string_decrypt))\r\n {\r\n $request_command[\"AUTH\"] = false;\r\n $request_command[\"status\"] = \"Error\";\r\n $request_command[\"status_information\"] = \"Error: Fail AUTH\";\r\n }\r\n }\r\n else\r\n {\r\n $request_command[\"AUTH\"] = false;\r\n $data_string = urldecode($_GET);\r\n $data_string_decrypt = json_decode($data_string, true);\r\n }\r\n \r\n // Obtain necessary data\r\n if($data_string_decrypt !== NULL)\r\n {\r\n $request_command[\"service\"] = $this->_get_array_value($data_string_decrypt,\"service\");\r\n $request_command[\"send_data\"] = $this->_get_array_value($data_string_decrypt,\"send_data\");\r\n }\r\n \r\n // Debug purpose\r\n //echo \"<br> get: \".json_encode($_GET).\"<br>\";\r\n //echo \"<br> result: \".json_encode($request_command).\"<br>\";\r\n return $request_command;\r\n }", "public function get($uri, $realm=\"\", $verb=\"GET\") {\n \n if(empty($uri)) {\n return false;\n }\n \n $uri = trim($uri, '/');\n $url = $this->apiURL.$uri;\n \n /* \n * do the actual get by way of a signed request to the \n * provider. Unfortunately, Withings doesn't pay \n * attention to headers, and you have to pass the \n * OAuth parameters directly in the URL.\n * \n */\n \n $request = littlemdesign_web_http_URL::create($url);\n\n /* add in basic OAuth parameters */\n \n $oauthParams = array(\n \"oauth_version\" => $this->getVersion(),\n \"oauth_nonce\" => self::nonce(),\n \"oauth_timestamp\" => self::timestamp(),\n \"oauth_consumer_key\" => $this->getKey(),\n \"oauth_signature_method\" => \"HMAC-SHA1\",\n \"oauth_token\" => $this->getToken()\n );\n $request->mergeQuery($oauthParams);\n \n /* \n * generate a signed request, we sign with the access token\n * and the access secret.\n * \n */ \n \n $getObj = $this->generateSignedRequest($verb, $request, $this->getSecret(), $realm);\n if($getObj === false) {\n $this->error(\"get() - can not generate request token object.\");\n return false;\n }\n \n /* now add the signature we created */\n \n $textURL = $request->toString(littlemdesign_web_http_URL::RFC_3986);\n \n $this->info(\". fetching via: $textURL...\");\n \n /* get ready to do a cURL request */\n \n $curl = new littlemdesign_web_http_CURL($textURL);\n if(!$curl->isReady()) {\n $this->error(\"get() - no cURL: \".$curl->getError());\n return false;\n }\n \n /* format the headers */\n \n $auth = trim(substr($getObj->authorization, 14));\n $headers = array( \n \"Content-Type\" => \"text/plain\",\n \"Authorization\" => $auth,\n \"Expect\" => ''\n );\n \n /* GET our request... */\n \n $result = $curl->write(\n $verb, \n $textURL, \n \"\", \n $headers['Content-Type'], \n $headers,\n littlemdesign_web_http_URL::RFC_3986); \n \n /* havest */\n \n if($result === false) {\n $this->error(\"get() - problem with cURL request: \".$curl->getError());\n return false;\n }\n \n /* \n * ok, we've got the low level resutls, pull out \n * the actual response from the provider, we expect \n * to get JSON or XML usually.\n * \n */\n \n $data = $result->data;\n \n /* pass it back */\n \n return $data;\n }", "private function get($url) {\n\t\t$url = $this->api_url . $url;\n\n\t\t// Open curl.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_USERPWD, $this->api_username . \":\" . $this->api_password);\n\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $output;\n\t}", "protected function requestGet($route) {\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n return $this->client->getResponse();\n }", "public function get($uri);", "function api_get($url, $identifier = null, $shared_secret = null)\n {\n $curl_auth = $identifier . \":\" . $shared_secret;\n $ch = curl_init($url);\n\n curl_setopt($ch, CURLOPT_HTTPGET, TRUE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $curl_auth);\n\n return $this->gather_response($ch);\n }", "function curlGet($url){\n $ch = curl_init();\n\n //setting curl options\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_URL, $url);\n /*\n Additional curl_setopt\n CURLOPT_USERAGENT \n CURLOPT_HTTPHEADER\n */\n $result = curl_exec($ch);\n \n //$httpResponse = curl_getinfo($ch,CURLINFO_HTTP_CODE);\n //echo $httpResponse;\n\n curl_close($ch);\n return $result;\n }", "protected function get($uri){\n // $method = 'GET';\n\n // $res = $client->request($method, $uri);\n // $res = $res->getBody()->getContents();\n // $res = json_decode($res);\n // return $res;\n // }\n try {\n $client = new Client();\n $res = $client->request('GET', $uri);\n return json_decode($res->getBody()->getContents());\n } catch (\\Exception $e) {\n //$e stock les erreures\n return abort(500);\n } \n\n /*$client = new Client(['http_errors' => false]);\n $res = $client->request('GET', $url);\n $statuscode = $res->getStatusCode();\n\n if (200 === $statuscode) {\n return json_decode($res->getBody()->getContents());\n }\n elseif (304 === $statuscode) {\n return json_decode($res->getBody()->getContents());\n }\n elseif (404 === $statuscode) {\n return abort(500);\n }\n else {\n return abort(500);\n }*/\n }", "function get( $url, $post = null, $auth = null, $progress = false, $timeout = 5, &$error = false, $options = array() ) {\n\n // Create CURL Object\n $CURL = curl_init();\n\n // By using array union we can pre-set/change options from function call\n $curl_opts = $options + array(\n CURLOPT_URL => $url,\n CURLOPT_TIMEOUT => $timeout,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_USERAGENT => 'Mozilla/5.0 (AIO Radio Station Player) AppleWebKit/537.36 (KHTML, like Gecko)',\n CURLOPT_FOLLOWLOCATION => ( ( ini_get( 'open_basedir' ) == false ) ? true : false ),\n CURLOPT_CONNECTTIMEOUT => ( ( $timeout < 6 && $timeout != 0 ) ? 5 : $timeout ),\n CURLOPT_REFERER => 'http' . ( ( $_SERVER[ 'SERVER_PORT' ] == 443 ) ? 's://' : '://' ) . $_SERVER[ 'HTTP_HOST' ] . strtok( $_SERVER[ 'REQUEST_URI' ], '?' ),\n CURLOPT_CAINFO => dirname( __FILE__ ) . '/bundle.crt'\n );\n\n\n // Post data to the URL (expects array)\n if ( isset( $post ) && is_array( $post ) ) {\n\n // Make every just simpler using custom array for options\n $curl_opts = $curl_opts + array(\n CURLOPT_POSTFIELDS => http_build_query( $post, '', '&' ),\n CURLOPT_POST => true,\n CURLOPT_FRESH_CONNECT => true,\n CURLOPT_FORBID_REUSE => true\n );\n\n }\n\n // Use HTTP Authorization\n if ( isset( $auth ) && !empty( $auth ) ) {\n\n $curl_opts = $curl_opts + array( CURLOPT_USERPWD => $auth );\n\n }\n\n // Call anonymous $progress_function function\n if ( $progress !== false && is_callable( $progress ) ) {\n\n $curl_opts = $curl_opts + array(\n CURLOPT_NOPROGRESS => false,\n CURLOPT_PROGRESSFUNCTION => $progress\n );\n\n }\n\n // Before executing CURL pass options array to the session\n curl_setopt_array( $CURL, $curl_opts );\n\n // Finally execute CURL\n $data = curl_exec( $CURL );\n\n // Parse ERROR\n if ( curl_error( $CURL ) ) {\n\n // This must be referenced in-memory variable\n $error = curl_error( $CURL );\n\n // Only works when writeLog function is available\n if ( function_exists( 'writeLog' ) )\n writeLog( 'errors', \"CURL Request \\\"{$url}\\\" failed! LOG: \" . curl_error( $CURL ), dirname( __FILE__ ) . '/./../tmp/logs/' );\n\n }\n\n // Close connection and return data\n curl_close( $CURL );\n return $data;\n\n }", "protected function use_http_get() {\n return false;\n }", "protected function _doGet($in_url, $in_additional_curl_options=array()) {\r\n return $this->__doRequest($in_url, 'GET', null, null, $in_additional_curl_options);\r\n }", "function curlGet($url) {\n\t\t$ch = curl_init();\t// Initialising cURL session\n\t\t// Setting cURL options\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t$results = curl_exec($ch);\t// Executing cURL session\n\t\tcurl_close($ch);\t// Closing cURL session\n\t\treturn $results;\t// Return the results\n\t}", "private function fetchResource() {\n\t\t$ch = curl_init();\n\t\tif ((php_sapi_name() != 'cli')) {\n\t\t\tcurl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (compatible; ' . TITLE . '/' . HOST . ')');\n\t\t}\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s\n\t\t$this->content = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\t$this->httpCode = $info['http_code'];\n\t\t$this->contentType = $info['content_type'];\n\t\t\n\t\tif (((int) $this->httpCode) >= 400) {\n\t\t\tthrow new Exception('STATUS CODE: ' . $this->httpCode);\n\t\t}\n\t}", "public function get($url) {\n $request = $this->getRequest($url, HttpRequest::METH_GET);\n try {\n // this could be parametrized using optional options interface\n $options = array(\n 'useragent' => \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; MS-RTC LM 8)\",\n 'connecttimeout' => 120, // timeout in seconds on connect \n 'timeout' => 120, // timeout in seconds on response \n 'redirect' => 5, // stop after 5 redirects\n 'compress' => true, // allow compression or not\n 'referer' => \"https://www.google.com/#output=search&sclient=psy-ab&q=jachty&fp=1\",\n );\n $request->setOptions($options);\n $request->send();\n } catch (Exception $e) {\n throw new Exception('Loading failed with exception', $request->getResponseCode(), $e);\n }\n $code = $request->getResponseCode();\n $body = $request->getResponseBody();\n\n // make sure we did not fail\n if ($code >= 500) {\n throw new Exception('Error response code recieved: ' . $body, $code);\n } elseif ($code >= 400) {\n throw new Exception('Permanent failure' . $body, $code);\n } elseif (trim($body) == '') {\n throw new Exception('Empty response', $code);\n }\n\n return $body;\n }", "public function get(string $uri, array $params = [], array $headers = [], $sink = null): ResponseInterface;", "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }", "public static function CurlGet($url, array $get = NULL, array $options = array()) {\n $defaults = array(\n CURLOPT_URL => $url . (strpos($url, '?') === FALSE ? '?' : '') . http_build_query($get),\n CURLOPT_HEADER => 0,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_TIMEOUT => 4\n );\n\n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if (!$result = curl_exec($ch)) {\n trigger_error(curl_error($ch));\n }\n curl_close($ch);\n return $result;\n }", "protected function _actionGet(KCommandContext $context)\n {\n if ( $context->request->getFormat() == 'html' ) {\n $context->response->setRedirect(JRoute::_('format=json&option=com_connect&view='.$this->view));\n return; \n }\n \n if ( $this->get ) \n { \n $url = ltrim($this->get, '/');\n $data = KConfig::unbox($this->api->get($url));\n $data = json_encode($data); \n } \n else \n {\n $data = (array) $this->api->getUser();\n }\n \n $this->getView()->data($data);\n \n return parent::_actionGet($context); \n }", "function sends_get()\n {\n $search = array();\n $response = FALSE; \n \n $cache = Cache::get_instance();\n $response = $cache::get('send' . serialize($this->_args));\n\n if (!$response) {\n $response['_count'] = $this->model->count_results($this->_args);\n\n if ($response['_count'] > 0)\n {\n $response['data'] = $this->model->fetch($this->_args, TRUE)->result();\n } \n\n $response['l'] = $this->db->last_query(); \n }\n\n $this->response($response);\n }", "public function get($key)\n {\n return $this->send(['command'=>'get', 'key'=>$key, 'seq'=>$this->getSequence()]);\n }", "private function callStatus() {\n try {\n $this->status = $this->client->request('GET', $this->url->full_url, [\n 'allow_redirects' => false\n ]);\n } catch (\\Exception $ex) {\n $this->status = $ex->getResponse();\n }\n }", "function qt_get($protocol,$host,$uri,$auth,$parms = array())\n{\n $url = \"$protocol://$host\";\n if ( strlen($uri) )\n $url .= $uri;\n\n if ( !empty($parms) )\n {\n $url .= '?';\n\n foreach($parms as $k => $v)\n $url .= $k . '=' . $v . '&';\n $url = rtrim($url,'&');\n }\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERAGENT, 'phpAPI');\n\n qt_curl_header('','',1);\n qt_curl_code('',1);\n curl_setopt($ch, CURLOPT_HEADERFUNCTION, \"qt_curl_header\");\n if ( strlen($auth) )\n curl_setopt($ch, CURLOPT_HTTPHEADER,array(\"Authorization: $auth\"));\n\n $out = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n qt_curl_code($httpCode);\n curl_close($ch);\n\n return $out;\n}", "function request($host_url, $id, $entity, $auth)\n {\n $url = \"$host_url/v1/checkouts/$id/payment?entityId=$entity\";\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Authorization:Bearer $auth\"));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $responseData = curl_exec($ch);\n if (curl_errno($ch)) {\n return curl_error($ch);\n }\n curl_close($ch);\n return $responseData;\n }", "public function doGet($request, $response) {\n throw new IllegalAccessException('GET is not supported');\n }", "public function call()\n\t{\n\t\tcall_user_func_array(array($this->client, 'request'), func_get_args());\n\n\t\treturn $this->client->getResponse();\n\t}", "public function doRequests();" ]
[ "0.72563386", "0.71358484", "0.6997599", "0.6935776", "0.6824523", "0.6818549", "0.67419994", "0.6656857", "0.66347086", "0.662011", "0.65927863", "0.65311676", "0.65162903", "0.6482472", "0.64604867", "0.6439043", "0.64382064", "0.6428101", "0.64267975", "0.6423339", "0.6404699", "0.6391806", "0.63585156", "0.6341225", "0.6320177", "0.63164836", "0.6316277", "0.62469906", "0.62248164", "0.6217921", "0.62147546", "0.6206886", "0.6204422", "0.6200876", "0.6188917", "0.6168073", "0.6151386", "0.61359507", "0.6127045", "0.61228496", "0.6120294", "0.61054516", "0.60749006", "0.6055087", "0.6033539", "0.6010823", "0.60095745", "0.5997574", "0.5985602", "0.5984727", "0.5981534", "0.5977258", "0.5960955", "0.5941273", "0.5932055", "0.5929809", "0.59023875", "0.58969927", "0.58945566", "0.5889768", "0.58776546", "0.5873646", "0.5867918", "0.5864675", "0.58596605", "0.5849248", "0.58488405", "0.58261883", "0.58251756", "0.5824921", "0.58201534", "0.58073497", "0.5802604", "0.57959855", "0.5782522", "0.5773847", "0.57734495", "0.57686085", "0.57571274", "0.57138115", "0.5709993", "0.5704812", "0.56983125", "0.5696327", "0.56912035", "0.5684238", "0.5676423", "0.5667092", "0.56647956", "0.5661229", "0.56592", "0.56584114", "0.5652569", "0.5645426", "0.56424975", "0.56321615", "0.5630464", "0.5621216", "0.5616619", "0.5613215" ]
0.56706613
87
Send HTTP Post command
public function post($uri = NULL, $content = NULL, $files = NULL) { if (! empty ( $uri )) $this->uri = $uri; if (is_array ( $content ) && empty ( $files )) { $content = http_build_query ( $content, "", "&" ); $this->setHeader ( 'Content-Type', 'application/x-www-form-urlencoded' ); } if (! empty ( $files ) && is_array ( $files )) { $boundary = uniqid ( '---------------------------' ); $this->setHeader ( 'Content-Type', 'multipart/form-data; boundary=' . $boundary ); if (! empty ( $this->content ) && is_array ( $this->content )) { foreach ( $this->content as $k => $v ) { $cont .= $boundary . self::CRLF . 'Content-Disposition: form-data; name="' . $k . '"' . self::CRLF . self::CRLF . $v . self::CRLF; } } foreach ( $files as $i => $file ) { $cont .= $boundary . self::CRLF . 'Content-Disposition: form-data; name="' . $file ['name'] . '"; filename="' . $file ['filename'] . '"' . self::CRLF; $cont .= "Content-Type: " . (empty ( $file ['content-type'] ) ? 'application/octet-stream' : $file ['content-type']) . self::CRLF . self::CRLF; $cont .= $file ['data'] . self::CRLF; } $content = $cont; } $this->request_body = $content; $this->method = "POST"; $this->send (); return $this->status_code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendPOST($cmd, array $postData = [])\n\t{\n\t\t?>\n\t\t<html>\n\t\t\t<head>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<form method=\"post\" action=\"<?php echo $_SERVER['SCRIPT_URL'];?>\" style=\"display: none; visibility: hidden;\">\n\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"<?php echo $cmd; ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ( $postData as $k => $v )\n\t\t\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"$k\\\" value=\\\"\" . htmlspecialchars($v) . \"\\\">\";\n\t\t\t\t\t?>\n\t\t\t\t</form>\n\t\t\t\t<script>\n\t\t\t\tdocument.forms[0].submit();\n\t\t\t\t</script>\n\t\t\t</body>\n\t\t</html>\n\t\t<?php\n\t\t\n\t\t// halting script here\n\t\tdie();\n\t}", "function httpPOST($url, array $data, $headers = '') {\n $this->ensureOpened(__FUNCTION__);\n $query = http_build_query($data, '', '&');\n ($headers = trim($headers) === '') or $headers .= \"\\r\\n\";\n\n $headers = \"POST $url HTTP/1.0\\r\\n\".\n $headers.\n \"Content-Type: application/x-www-form-urlencoded\\r\\n\".\n \"Content-Length: \".strlen($query).\"\\r\\n\".\n \"$query\\r\\n\";\n\n $this->write($headers);\n return $this->readAllAndClose();\n }", "public function post();", "public function post();", "public function post();", "function send_post()\n { \n $send = new send();\n\n $send->date_created = date('Y-m-d H:i:s');\n $send->createdbypk = $this->get_user()->user_id;\n $send->date_modified = date('Y-m-d H:i:s');\n $send->modifiedbypk = $this->get_user()->user_id;\n\n $this->response($this->_send_save($send, 'post'));\n }", "public function httpPost()\n {\n return $this->method(\"POST\");\n }", "public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }", "function sendPostCmd($resource, $data) {\n $url = $this->baseURL . $resource;\n\n $request = curl_init($url);\n curl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($request, CURLOPT_FAILONERROR, true);\n curl_setopt($request, CURLOPT_POSTFIELDS, $data);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data))\n );\n\n $result = curl_exec($request);\n return json_decode($result, true);\n }", "abstract public function post($data);", "public function postSend()\n {\n }", "public function post($t);", "public function httpPost($redirectTo = null) : string;", "private function postHop () {\n\t\t$this->result = curl_exec ( $this->ch );\n\t\tcurl_close ( $this->ch );\n\t}", "function http_post($url, $post_string) {\n\t\t\n\t\t// add any additional curl options here\n\t\t$options = array(CURLOPT_URL => $url,\n\t\tCURLOPT_POST => true,\n\t\tCURLOPT_POSTFIELDS => $post_string,\n\t\tCURLOPT_USERAGENT => $this->user_agent);\n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, $options);\n\t\t\n\t\t$response = curl_exec($ch);\n\t\t$this->last_response = $response;\n\t\t$info = curl_getinfo($ch);\n\t\t\n\t\tcurl_close($ch);\n\t\t\n\t\t// all good\n\t\tif ($info['http_code'] == 204)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function sendPost(){\n\t\t\t// record the post in the database\n\t\t\t\n\t\t}", "function doPost($url, $post = array() , $format = 'plain')\n{\n return curlExecute($url, 'post', $post, $format);\n}", "public function postAction() {\n\t\t$this->sendMessage();\n\t}", "private function POST() {\n global $_POST;\n $postData = array();\n foreach($_POST as $key => $value) {\n $postData[$key] = $value;\n }\n $this -> response[\"response\"] = $postData;\n return;\n }", "abstract public function post();", "protected function postRequest($data) {\n $ch = curl_init($this->post_url);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type:application/xml',\n 'Gepg-Com:default.sp.in',\n 'Gepg-Code:' . $this->sp_code,\n 'Content-Length:' . strlen($data))\n );\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n $resultCurlPost = curl_exec($ch);\n curl_close($ch);\n\t\t\n\t\t//to be separated\n\t\t$date_createdsc=date(\"Y-m-d H:i:s\");\n\t\t\tYii::$app->db->createCommand()\n ->insert('gepg_bill7', [\n 'response_message' =>$data,\n 'date_created' =>$date_createdsc, \n ])->execute();\n\t\t//end to be separate\t\t\n return $resultCurlPost;\n }", "function httpPOST($url, $data)\n{\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n return $response;\n}", "function ticketbud_http_post($request, $host, $path, $port = 80, $ip=null) {\n\tglobal $wp_version;\n\t\n\t$ticketbud_version = constant('TICKETBUD_VERSION');\n\n\t$http_request = \"POST $path HTTP/1.0\\r\\n\";\n\t$http_request .= \"Host: $host\\r\\n\";\n\t$http_request .= \"Content-Type: application/x-www-form-urlencoded; charset=\" . get_option('blog_charset') . \"\\r\\n\";\n\t$http_request .= \"Content-Length: \" . strlen($request) . \"\\r\\n\";\n\t$http_request .= \"User-Agent: WordPress/$wp_version | Ticketbud/$ticketbud_version\\r\\n\";\n\t$http_request .= \"\\r\\n\";\n\t$http_request .= $request;\n\t\n\t$http_host = $host;\n\t// use a specific IP if provided - needed by ticketbud_check_server_connectivity()\n\tif ( $ip && long2ip(ip2long($ip)) ) {\n\t\t$http_host = $ip;\n\t} else {\n\t\t$http_host = ticketbud_get_host($host);\n\t}\n\n\t$response = '';\n\tif( false != ( $fs = @fsockopen($http_host, $port, $errno, $errstr, 10) ) ) {\n\t\tfwrite($fs, $http_request);\n\n\t\twhile ( !feof($fs) )\n\t\t\t$response .= fgets($fs, 1160); // One TCP-IP packet\n\t\tfclose($fs);\n\t\t$response = explode(\"\\r\\n\\r\\n\", $response, 2);\n\t}\n\treturn $response;\n}", "function Post( $uri, $query_params=\"\" )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Post( $uri, $query_params )\\n\";\r\n\t\t$uri = $this->makeUri( $uri );\r\n\t\tif( is_array($query_params) ) {\r\n\t\t\t$postArray = array();\r\n\t\t\tforeach( $query_params as $k=>$v ) {\r\n\t\t\t\t$postArray[] = urlencode($k) . \"=\" . urlencode($v);\r\n\t\t\t}\r\n\t\t\t$this->requestBody = implode( \"&\", $postArray);\r\n\t\t}\r\n\t\t// set the content type for post parameters\r\n\t\t$this->addHeader( 'Content-Type', \"application/x-www-form-urlencoded\" );\r\n// done in sendCommand()\t\t$this->addHeader( 'Content-Length', strlen($this->requestBody) );\r\n\r\n\t\tif( $this->sendCommand( \"POST $uri HTTP/$this->protocolVersion\" ) )\r\n\t\t\t$this->processReply();\r\n\t\t$this->removeHeader('Content-Type');\r\n\t\t$this->removeHeader('Content-Length');\r\n\t\t$this->requestBody = \"\";\r\n\t\treturn $this->reply;\r\n\t}", "function hsend_post(&$app, &$c) {\n\t\t$app->logger->debug(sprintf('%s::%s', __CLASS__, __FUNCTION__));\n\n\t\t$this->_http->setMethod(HTTP_REQUEST_METHOD_POST);\n\n\t\t$this->_http->setURL($c->param('app.view_http.request.uri'));\n\n\t\t$this->_set_basic_auth($app, $c);\n\n\t\t$this->_load_post_params($app, $c);\n\n\t\t$this->_load_headers($app, $c);\n\n\t\t$this->_load_body($app, $c);\n\n\t\t$this->_load_files($app, $c);\n\n\t\t$this->_http->sendRequest();\n\n\t\t$this->_handler_response($app, $c);\n\n\t\treturn $app->status->handled;\n\t}", "public function post($post);", "function make_post_call($mid_url, $post_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }", "function post(Request &$request, Response &$response);", "public function post($data)\n {\n // Get parts of URL\n $this->url = parse_url($this->url);\n if (!$this->url) {\n return \"couldn't parse url\";\n }\n\n // Provide defaults for port and query string\n if (!isset($this->url['port'])) {\n $this->url['port'] = \"\";\n }\n\n if (!isset($this->url['query'])) {\n $this->url['query'] = \"\";\n }\n\n // Build POST string\n $encoded = \"\";\n foreach ($data as $k => $v) {\n $encoded .= ($encoded ? \"&\" : \"\");\n $encoded .= rawurlencode($k) . \"=\" . rawurlencode($v);\n }\n\n // Open socket on host\n $fp = fsockopen($this->url['host'], $this->url['port'] ? $this->url['port'] : 80);\n if (!$fp) {\n return \"failed to open socket to {$this->url['host']}\";\n }\n\n // Send HTTP 1.0 POST request to host\n fputs($fp, sprintf(\"POST %s%s%s HTTP/1.0\\n\", $this->url['path'], $this->url['query'] ? \"?\" : \"\", $this->url['query']));\n fputs($fp, \"Host: {$this->url['host']}\\n\");\n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\n\");\n fputs($fp, \"Content-length: \" . strlen($encoded) . \"\\n\");\n fputs($fp, \"Connection: close\\n\\n\");\n fputs($fp, \"$encoded\\n\");\n\n // Read the first line of data, only accept if 200 OK is sent\n $line = fgets($fp, 1024);\n if (!preg_match('/^HTTP\\/1\\.. 200/i', $line)) {\n return;\n }\n\n // Put everything, except the headers to $results\n $results = '';\n $inheader = true;\n\n while(!feof($fp)) {\n $line = fgets($fp, 1024);\n\n if ($inheader && ($line == \"\\n\" || $line == \"\\r\\n\")) {\n $inheader = FALSE;\n } elseif (!$inheader) {\n $results .= $line;\n }\n }\n fclose($fp);\n\n // Return with data received\n return $results;\n }", "private function _httpPost($fields)\n {\n $fields_string = http_build_query($fields);\n //open connection\n $ch = curl_init();\n\n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL,$this->_getFullUrl());\n curl_setopt($ch,CURLOPT_POST,count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return $result;\n }", "public function send(): void\n {\n $requiredParams = [\n 'v' => $this->client->getVersion(),\n 'tid' => $this->client->getTrackingId(),\n 'cid' => $this->client->getClientId(),\n 't' => $this->getHitType(),\n ];\n $paramValues = array_merge(\n $requiredParams,\n $this->parameters\n );\n \n $url = $this->getBaseUrl();\n\n $guzzle = new \\GuzzleHttp\\Client();\n $result = $guzzle->request('POST', $url, ['form_params' => $paramValues]);\n\n if ($this->client->isDebug()) {\n var_dump((string) $result->getBody());\n }\n }", "function post($key)\n{\n\treturn System::request()->post($key);\n}", "private function postRequest($data)\n {\n $queryString = http_build_query($data);\n\n $opts = [\n 'http' => [\n 'method' => 'POST',\n 'header' => 'Content-Type: application/x-www-form-urlencoded',\n 'content' => $queryString,\n ],\n ];\n\n $context = stream_context_create($opts);\n\n $url = $this->host . '/api/log/write/' . $this->token . '/';\n\n return file_get_contents($url,\n false,\n $context);\n }", "public function request_post($uri, array $options = array()) {\n $options['method'] = 'POST';\n return $this->request($uri, $options);\n }", "function Send($url, $POST){ //работа с CURL'ом\n\t$ch = curl_init();// Устанавливаем соединение\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $POST);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\n\t$result = curl_exec($ch);\n\n\tif($result === false) print $err = curl_error($ch);\n\n\treturn $result;\n}", "public function post($url, $body = array(), $query = array(), $headers = array());", "protected function _postCommand($command, $dataMap = null)\n {\n if (empty($dataMap)) {\n $dataMap = [];\n }\n \n $dataMap['cmd'] = $command;\n \n $reqClient = $this->_getRequestClient();\n \n $response = $reqClient->post($dataMap);\n return $response;\n }", "function wget_post($url, $data) {\n //if ($data == null) $data = array(\"\"=>\"\");\n $options = array(\n 'http' => array(\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n //'header'=> \"Content-Type: application/json\\r\\n\" .\n // \"Accept: application/json\\r\\n\",\n 'method' => 'POST',\n 'content' => http_build_query($data),\n ),\n );\n $context = stream_context_create($options);\n return file_get_contents($url, false, $context);\n}", "public function send()\n {\n // Stream post the data\n $this->evaluateResponse($this->httpPost($this->str_endpoint . '/event', $this->compile()));\n }", "function post (string $url, array $args = []): string {\n\t$curlCall = curl_init($url);\n\n\tcurl_setopt($curlCall, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($curlCall, CURLOPT_POST, true);\n\tcurl_setopt($curlCall, CURLOPT_POSTFIELDS, $args);\n\n\t$return = curl_exec($curlCall);\n\tcurl_close($curlCall);\n\n\treturn $return;\n}", "protected function makePostRequest($uri, $params) {\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL,$this->server_url . $uri);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS,\n http_build_query($params));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $output = curl_exec($curl);\n $this->response = $output;\n $this->response_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close ($curl);\n }", "function post($url, $args = array()) {\n\t\t$defaults = array('method' => 'POST');\n\t\t$r = array_merge( $defaults, $args );\n\t\treturn $this->request($url, $r);\n\t}", "public function usePost()\n {\n $this->setOption(CURLOPT_POST, true);\n }", "function qt_post($protocol,$host,$uri,$auth,$parms,$encoding)\n{\n $url = \"$protocol://$host\";\n if (strlen($uri))\n $url .= $uri;\n\n $post = '';\n if ( strtoupper($encoding) == 'URL' )\n {\n foreach($parms as $k => $v)\n $post .= $k . '=' . $v . '&';\n $post = rtrim($post,'&');\n }\n if ( strtoupper($encoding) == 'JSON' )\n {\n $post = json_encode($parms);\n }\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n curl_setopt($ch, CURLOPT_USERAGENT, 'phpAPI');\n\n qt_curl_header('','',1);\n qt_curl_code('',1);\n curl_setopt($ch, CURLOPT_HEADERFUNCTION, \"qt_curl_header\");\n if ( strlen($auth) )\n {\n curl_setopt($ch, CURLOPT_HTTPHEADER,array(\"Authorization: $auth\"));\n echo \"auth: $auth<br>\\n\";\n }\n\n $out = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n qt_curl_code($httpCode);\n curl_close($ch);\n \n return $out;\n}", "public function post(...$args)\n {\n return $this->curl('post', ...$args);\n }", "function ccweb_httpPost2($url, $data, &$outResponse) { \r\n $params = array('http' => array('method' => 'POST', 'content' => $data)); \r\n $context = stream_context_create($params);\r\n\r\n $fh = fopen($url, 'rb', false, $context);\r\n if (!$fh) {return FALSE;} \r\n \r\n $response = stream_get_contents($fh); \r\n if ($response === false) {return FALSE;} \r\n \r\n $outResponse = $response; \r\n return TRUE; \r\n}", "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "public function post($name);", "public function post($key=null,$value=null){\n return $this->methodsData(\"post\",$key,$value);\n }", "function post($url, $data = null, $options = array()) {\n\t\treturn $this->request($url, array_merge(array('method' => 'POST', 'body' => $data), $options));\n\t}", "function http_post($url, $params = array()) {\n $postData = '';\n //create name value pairs seperated by &\n foreach ($params as $k => $v) {\n $postData .= $k . '=' . $v . '&';\n }\n $postData = rtrim($postData, '&');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_POST, count($postData));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);\n $output = curl_exec($ch);\n\n curl_close($ch);\n return $output;\n}", "public function post(array $parameters);", "public function post(array $parameters);", "public function post(array $parameters);", "function write_post()\n {\n }", "public function postAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "public function execute()\n\t{\t\n\t\t$msgObj \t= &parent::getCurrentMessage();\n\t\t$http \t\t= $msgObj::getData('currentHttp');\n\t\t$arguments \t= $msgObj::getData('currentArguments');\n\t\t$settings\t= array();\n\t\t\n\t\t//if the first parameter is an array, they might be defining lots of things - parse!\n\t\tif(is_array($arguments[0])){\n\t\t\t// be sure that at least the location and host are set\n\t\t\tif(!isset($arguments[0]['host']) || !isset($arguments[0]['location']) ){\n\t\t\t\tthrow new Exception('Missing required arguments!');\n\t\t\t}\n\t\t\t$settings = $arguments[0];\n\t\t}else{\n\t\t\t// if we're just using the normal arguments - map them\n\t\t\t$settingKeys = array('location','host','requestData','outputFormat');\n\t\t\tforeach($arguments as $argumentIndex => $argument){\n\t\t\t\t$argumentKey = $settingKeys[$argumentIndex];\n\t\t\t\t$settings[$argumentKey]=($arguments[$argumentIndex]) ? $arguments[$argumentIndex] : null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Be sure we at least have the location\n\t\tif(!$settings['location'] || gettype($settings['location'])!='string'){\n\t\t\tthrow new Exception(get_class().' Invalid post location!');\n\t\t}\n\t\tif(!isset($settings['host']) || gettype($settings['host'])!='string'){\n\t\t\tthrow new Exception('Action Post: Invalid hostname!');\n\t\t}\n\t\t$this->postHost\t\t= $settings['host'];\n\n\t\t$this->postLocation\t= (strpos($settings['location'],'http://')===false) ? 'http://'.$this->postHost.$settings['location'] : $settings['location'];\n\t\t\n\t\t$this->postData\t\t= (isset($settings['requestData'])) ? $settings['requestData'] : '';\n\t\t\n\t\t$msgObj=&parent::getCurrentMessage();\n\t\t$msgObj::setData('postLocation',$this->postLocation);\n\t\t$msgObj::setData('postHost',$this->postHost);\n\t\t$msgObj::setData('outputFormat',(isset($settings['outputFormat'])) ? $settings['outputFormat'] : 'txt');\n\t\t\n\t\t$http = new HttpRequest($this->postLocation,HttpRequest::METH_POST);\n\t\tif(is_array($this->postData)){\n\t\t\t$http->setPostFields($this->postData);\n\t\t}elseif($this->postData instanceof SimpleXMLElement){\n\t\t\t// we're going to convert this to a literal XML string\n\t\t\t$this->postData = $this->postData->asXML();\n\t\t\t$http->setBody($this->postData);\n\t\t}else{\n\t\t\t$http->setBody($this->postData);\n\t\t}\n\t\t\n\t\tif(isset($settings['headers']) && count($settings['headers'])>0){\n\t\t\t$http->setHeaders($settings['headers']);\n\t\t}\n\t\t\n\t\tif($additionalHeaders=$msgObj::getData('httpHeaders')){\n\t\t\t$http->setHeaders($additionalHeaders['httpHeaders']);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\ttry {\n\t\t\t\t$httpReturn = $http->send();\n\t\t\t\t\n\t\t\t\t// Check for a redirect so we can follow...\n\t\t\t\t$responseCode = $http->getResponseCode();\n\t\t\t\tif($responseCode==301 && isset($arguments[0]['followRedirects']) && $arguments[0]['followRedirects']==true){\n\t\t\t\t\t$header \t\t\t\t\t= $httpReturn->getHeaders();\n\t\t\t\t\t$arguments[0]['location']\t= $header['Location'];\n\t\t\t\t\t$msgObj::setData('currentArguments',$arguments);\n\t\t\t\t\treturn ActionPost::execute();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}catch(Exception $e){\n\t\t\t\tthrow new Exception($e->getMessage());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tHelperSession::execute($httpReturn->getHeaders());\n\n\t\t\t$msgObj::setData('__lastRequest',$http->getRawRequestMessage());\n $msgObj::setData('__lastResponse',$http->getRawResponseMessage());\n\n\t\t\t$msgObj::setData('currentHttp',$httpReturn);\n\t\t\treturn $httpReturn;\n\t\t}catch(HttpException $e){\n\t\t\tthrow new Exception(get_class().' '.$e->getMessage());\n\t\t}\n\t}", "public static function post(array $data) {\n return self::call(\"POST\", $data);\n }", "public function post($url, $body){\n\t\t\n\t\t// do we even need this?\n\t\t// $headers = array('Content-Type: application/x-www-form-urlencoded')\n\t\t\n\t\treturn $this->doRequest('POST', $url, $body);\n }", "public function post( array $postFields );", "public function create_coin_post() {\n header(\"Content-Type: application/json; charset=UTF-8\");\n echo CryptoDB::newCoinPOST(); \n }", "function http_send_data($data) {}", "private function _post($path, $options)\n {\n // Login to the service if not already done.\n $this->_logIn();\n\n $options['_rnr_se'] = $this->_rnr_se;\n $this->_curlUrl = self::GV_SERVER_URL . $path;\n $this->_curlOptions = $options;\n // Send HTTP POST request.\n curl_setopt($this->_ch, CURLOPT_URL, $this->_curlUrl);\n curl_setopt($this->_ch, CURLOPT_POST, true);\n curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->_ch, CURLOPT_POSTFIELDS, $options);\n\n $this->_result = curl_exec($this->_ch);\n \n return $this->_result;\n }", "public function postAction()\n {\n \t$this->_object->title = $this->getRequest()->getParam('title');\n \t$this->_object->text = $this->getRequest()->getParam('text');\n \t$this->_object->answer = $this->getRequest()->getParam('answer');\n\t\t$this->_object->tag = $this->getRequest()->getParam('tags');\n\t\t$this->_objectMapper->save($this->_object);\n \t$this->getResponse()\n ->setHttpResponseCode(201);\n }", "function post();", "public static function sendPostRequest(String $resource, array $data)\n {\n static::init();\n $curl = new UKMCURL();\n $curl->json($data);\n $curl->requestType(\"POST\");\n $curl->user('userpwd:' . static::$api_key);\n\n return new Result($curl->request(static::_getUrl($resource)));\n }", "function zbase_remote_post_json($url, $data, $options = [])\n{\n\t$dataString = '';\n\tforeach ($data as $key => $value)\n\t{\n\t\t$dataString .= $key . '=' . $value . '&';\n\t}\n\trtrim($dataString, '&');\n\t$ch = curl_init($url);\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($ch, CURLOPT_POST, count($data));\n\tcurl_setopt($ch, CURLOPT_COOKIEJAR, zbase_storage_path() . 'cookie.txt');\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t'Content-Type: application/json',\n\t\t'Content-Length: ' . strlen($dataString))\n\t);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $result;\n}", "public function post(array $params);", "public function post_post()\n\t{\n\t\ttry {\n\t\t\t$results = Articles::regist( self::$_JSON );\n\t\t\t//\\Log::warning(print_r($results, true));\n\n\t\t\treturn $this->response($results, 200);\n\t\t} catch (\\MarcoPandaException $e) {\n\t\t\t$this->error($e);\n\t\t}\n\t}", "function doPOST (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"POST method not supported\");\n }", "function send_request($postdata = \"\") {\n\t\tif(!is_array($postdata) ) $postdata = array();\n\t\t\n\t\t$url = $this->_build_url();\n\t\t\n\t\tif(!isset($postdata['ip_address'])) $postdata['ip_address'] = $this->_get_client_ip();\n\t\tif(!isset($postdata['user_agent'])) $postdata['user_agent'] = $this->_get_client_user_agent();\n\t\t$postdata['api_key'] = $this->api_key;\n\n\t\t$ch = curl_init($url);\n\n\t\tcurl_setopt($ch, CURLOPT_POST ,1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, 'json='.$this->_json_encode($postdata));\n\t\tcurl_setopt($ch, CURLOPT_HEADER ,0); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT ,10);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\t\t\n\n\t\t$return_data = curl_exec($ch);\n\n\t\treturn $return_data;\n\t}", "public function post($url, $path)\n\t{\n\t\t$path = str_replace('--', '/', $path);\n\t\t$data['url'] = $url . $path;\n\t\t$this->render($data, NULL, 'post');\n\t}", "public function post($args = []){\n }", "function post() \n {\n \n }", "function _post()\r\n\t\t{\r\n\t\t}", "function send_request( $http_method, $url, $auth_header = null, $postData = null ) {\n\t$curl = curl_init( $url );\n\tcurl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $curl, CURLOPT_FAILONERROR, false );\n\tcurl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );\n\n\tswitch( $http_method ) {\n\t\tcase 'GET':\n\t\t\tif( $auth_header ) {\n\t\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( $auth_header ) );\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'POST':\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/atom+xml',\n\t\t\t\t$auth_header ) );\n\t\t\tcurl_setopt( $curl, CURLOPT_POST, 1 );\n\t\t\tcurl_setopt( $curl, CURLOPT_POSTFIELDS, $postData );\n\t\t\tbreak;\n\t\tcase 'PUT':\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/atom+xml',\n\t\t\t\t$auth_header ) );\n\t\t\tcurl_setopt( $curl, CURLOPT_CUSTOMREQUEST, $http_method );\n\t\t\tcurl_setopt( $curl, CURLOPT_POSTFIELDS, $postData );\n\t\t\tbreak;\n\t\tcase 'DELETE':\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( $auth_header ) );\n\t\t\tcurl_setopt( $curl, CURLOPT_CUSTOMREQUEST, $http_method );\n\t\t\tbreak;\n\t}\n\t$response = curl_exec( $curl );\n\tif( !$response ) {\n\t\t$response = curl_error( $curl );\n\t}\n\tcurl_close( $curl );\n\treturn $response;\n}", "public function post ($url, $data = null, $headers = null, $options = null);", "public function post()\n {\n //\n }", "function post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_init();\r\n \r\n\t\t curl_setopt($post, CURLOPT_URL, $url);\r\n\t\t curl_setopt($post, CURLOPT_POST, count($data));\r\n\t\t curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\r\n\t\t curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t $result = curl_exec($post);\r\n\t\t curl_close($post);\r\n\t}", "function testSimplePost() {\n \n $curlAdapter = new CurlAdapter();\n \n $post = array (\n 'SECURITY.SENDER' => '31HA07BC8142C5A171745D00AD63D182',\n 'USER.LOGIN' => '31ha07bc8142c5a171744e5aef11ffd3',\n 'USER.PWD' => '93167DE7',\n 'TRANSACTION.MODE' => 'CONNECTOR_TEST',\n 'TRANSACTION.CHANNEL' => '31HA07BC8142C5A171744F3D6D155865',\n 'PAYMENT.CODE' => 'CC.RG',\n 'FRONTEND.MODE' => 'WHITELABEL',\n 'FRONTEND.ENABLED' => 'TRUE',\n 'FRONTEND.LANGUAGE' => 'EN',\n 'FRONTEND.RESPONSE_URL' => 'http://dev.heidelpay.de',\n 'CONTACT.IP' => '127.0.0.1',\n 'REQUEST.VERSION' => '1.0'\n \n );\n \n $result = $curlAdapter->sendPost('https://test-heidelpay.hpcgw.net/ngw/post', $post);\n \n \n $this->assertTrue(is_array($result[0]), 'First result key should be an array.');\n $this->assertTrue(is_object($result[1]), 'Secound result key should be an object.');\n \n \n $this->assertFalse($result[1]->isError(), 'isError should return true');\n $this->assertTrue($result[1]->isSuccess(), 'isSuccess should return false');\n \n }", "protected static function post($index, $queryData) {\n\t\t\t$curl = self::socket();\n\n\t\t\tcurl_setopt($curl, CURLOPT_URL, self::$baseUrl . $index); //Url setup\n\t\t\tcurl_setopt($curl, CURLOPT_POST, 1); //Tell curl we want to POST\n\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST'); //POST request setup\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($queryData)); //Include the POST data\n\t\t\treturn self::data_decode(curl_exec($curl)); \t\t//Launch and return decrypted data\n\t\t}", "public function doPost(array $parsed_body);", "private function initPostRequest()\n {\n $this\n ->addCurlOption(CURLOPT_URL, $this->getUrl())\n ->addCurlOption(CURLOPT_CUSTOMREQUEST, HttpMethodResolver::HTTP_POST)\n ->addCurlOption(CURLOPT_POSTFIELDS, $this->getQuery())\n ;\n }", "public function click_notification_post()\n\t{ \n\t\tif($_SERVER['REQUEST_METHOD'] == \"POST\"){\n \t// Get data\n\t\t\tif(isset($_POST)){\n\t\t\t\t$permission=false;\n\t\t\t\t$token= isset($_POST['token']) ?($_POST['token']) : \"\";\n\t\t\t\t$permission=$this->matchAppToken($token);\n\t\t\t\tif($permission==true){\n\t\t\t\t\t$notification_id= isset($_POST['notification_id']) ?($_POST['notification_id']) : \"\";\n\t\t\t\t\tif($notification_id!=''){\n\t\t\t\t\t\t$response=$this->advance_notification_model->click_notification($notification_id);\t\n\t\t\t\t\t\tif($response){\n\t\t\t\t\t\t\t$json = array(\"status\" => 1, \"message\" => \"Ok\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Somthing went wrong. Please try again later\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Notification ID has been empty.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Token has been not matched\");\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request has been uncompleted\");\n\t\t\t}\n\t\t}else{\n\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request method not accepted\");\n\t\t}\n\t\t$this->response($json, REST_Controller::HTTP_OK);\n\t}", "private function doPost($url, $data) {\n $options = array(\n 'http' => array(\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n 'method' => 'POST',\n 'content' => http_build_query($data),\n ),\n );\n\n $context = stream_context_create($options);\n $result = file_get_contents($url, false, $context);\n\n Logger::info(\"Got result from GW: \". $result);\n }", "public function post()\n {\n $this->method = 'POST';\n return $this;\n }", "function submitOrder() {\n\techo \"Submitting Order </br>\";\n\t$data = createOrder();\n\t$response = postRequest('/api/order', $data);\n\tprintInfo($response);\n}", "protected function _execute(){\n\t\t\t$this->_getUrl();\n\n\t\t\t$c = curl_init($this->_url);\n\t\t\tob_start();\n\t\t\tif(!empty($this->_postFields)) {\n\t\t\t\tcurl_setopt($c, CURLOPT_POST, 1);\n\t\t\t\tcurl_setopt($c, CURLOPT_POSTFIELDS, json_encode($this->_postFields));\n\t\t\t}\n\n\t\t\tcurl_exec($c);\n\t\t\tcurl_close($c);\n\t\t\t$this->_result = trim(ob_get_contents());\n\t\t\tob_end_clean();\n\t\t}", "function post () {\n //OU SALVA NO\n header(\"location: /\");\n }", "public function testPostDataHttpServer(): void\n {\n $this->post('/request_action/post_pass', ['title' => 'value']);\n $data = json_decode('' . $this->_response->getBody());\n $this->assertSame('value', $data->title);\n $this->assertHeader('X-Middleware', 'true');\n }", "function send($data);", "function send($data);", "function post_request($url, $port, $dataid, $tStamp, $encodedSignature, $data, $referer = '')\n {\n //$data = http_build_query($data);\n\n // parse the given URL\n $url = parse_url($url);\n\n if ($url['scheme'] != 'http') {\n die('Error: Only HTTP request are supported !');\n }\n\n // extract host and path:\n $host = $url['host'];\n $path = $url['path'];\n\n // open a socket connection on port 80 - timeout: 50 sec\n $fp = fsockopen($host, $port, $errno, $errstr, 50);\n\n if ($fp) {\n\n // send the request headers:\n fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $host\\r\\n\");\n\n if ($referer != '')\n fputs($fp, \"Referer: $referer\\r\\n\");\n\n fputs($fp, \"x-cons-id: \" . $dataid . \"\\r\\n\");\n fputs($fp, \"x-timestamp: \" . $tStamp . \"\\r\\n\");\n fputs($fp, \"x-signature: \" . $encodedSignature . \"\\r\\n\");\n fputs($fp, \"Content-Type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \" . strlen($data) . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $data);\n\n $result = '';\n while (!feof($fp)) {\n // receive the results of the request, 128 char\n $result .= fgets($fp, 128);\n }\n } else {\n return array(\n 'status' => 'err',\n 'error' => \"$errstr ($errno)\"\n );\n }\n\n // close the socket connection:\n fclose($fp);\n\n // split the result header from the content\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n $header = isset($result[0]) ? $result[0] : '';\n $content = isset($result[1]) ? $result[1] : '';\n\n // return as structured array:\n return array(\n 'status' => 'ok',\n 'header' => $header,\n 'content' => $content\n );\n\n }", "public function testPost()\n {\n $user = factory('App\\User')->create();\n $user->room_id = 1;\n $user->save();\n $message = 'helloworld';\n\n $response = $this->actingAs($user)\n ->call('POST', 'post', [\n 'message' => 'title 999',\n '_token' => csrf_token(), // 手動加入 _token\n ]);\n\n $response->assertStatus(201);\n\n //vendor/bin/phpunit\n }", "public static function post($uri,$params=[],$options=[]) {\n return self::request('POST',$uri,$params,$options);\n }", "function PPHttpPost($methodName_, $nvpStr_) {\n\t\t\tglobal $gateway_environment;\n\t\t\t$environment = $gateway_environment;\n\n\t\t\t$API_UserName = pmpro_getOption(\"apiusername\");\n\t\t\t$API_Password = pmpro_getOption(\"apipassword\");\n\t\t\t$API_Signature = pmpro_getOption(\"apisignature\");\n\t\t\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\t\t\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t\t\t$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t\t}\n\n\t\t\t$version = urlencode('72.0');\n\n\t\t\t//NVPRequest for submitting to server\n\t\t\t$nvpreq = \"METHOD=\" . urlencode($methodName_) . \"&VERSION=\" . urlencode($version) . \"&PWD=\" . urlencode($API_Password) . \"&USER=\" . urlencode($API_UserName) . \"&SIGNATURE=\" . urlencode($API_Signature) . \"&BUTTONSOURCE=\" . urlencode(PAYPAL_BN_CODE) . $nvpStr_;\n\n\t\t\t//post to PayPal\n\t\t\t$response = wp_remote_post( $API_Endpoint, array(\n\t\t\t\t\t'timeout' => 60,\n\t\t\t\t\t'sslverify' => FALSE,\n\t\t\t\t\t'httpversion' => '1.1',\n\t\t\t\t\t'body' => $nvpreq\n\t\t\t )\n\t\t\t);\n\n\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t $error_message = $response->get_error_message();\n\t\t\t die( \"methodName_ failed: $error_message\" );\n\t\t\t} else {\n\t\t\t\t//extract the response details\n\t\t\t\t$httpParsedResponseAr = array();\n\t\t\t\tparse_str(wp_remote_retrieve_body($response), $httpParsedResponseAr);\n\n\t\t\t\t//check for valid response\n\t\t\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $httpParsedResponseAr;\n\t\t}", "function sendPost($api, $key, $user, $name, $description) {\r\n $data = http_build_query(array('key'=>$key,\r\n 'user'=>$user,\r\n 'name'=>$name,\r\n 'desc'=>$description,\r\n 'src'=>'sdk-php-1.0')); // management internal parameter\r\n $context = stream_context_create(array('http'=>array(\r\n 'method'=>'POST',\r\n 'header'=>\r\n 'Content-type: application/x-www-form-urlencoded'.\"\\r\\n\".\r\n 'Content-Length: '.strlen($data).\"\\r\\n\",\r\n 'content'=>$data)));\r\n \r\n $fd = fopen($api, 'r', false, $context);\r\n $response = stream_get_contents($fd);\r\n fclose($fd);\r\n return $response;\r\n}", "private function POST($url,$params=false){\n return $this->Request($url,$params,HTTP_POST);\n }", "public function post($version = null)\n {\n $socket = $this->createSocket();\n $this->processHeader($socket, self::METHOD_POST, $version);\n $socket->write(stubHTTPConnection::END_OF_LINE);\n $socket->write($this->body);\n return new stubHTTPResponse($socket);\n }", "public function postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model);", "function post_to_url($url, $data) {\n $fields = '';\n foreach ($data as $key => $value) {\n $fields .= $key . '=' . $value . '&';\n }\n rtrim($fields, '&');\n $post = curl_init();\n curl_setopt($post, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($post, CURLOPT_URL, $url);\n curl_setopt($post, CURLOPT_POST, count($data));\n curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\n $result = curl_exec($post); //result from mobile seva server \n return $result; //output from server displayed \n curl_close($post);\n}" ]
[ "0.69076115", "0.67077464", "0.6646405", "0.6646405", "0.6646405", "0.6452217", "0.64284045", "0.641106", "0.63828456", "0.6366302", "0.6346021", "0.6265957", "0.626526", "0.62314343", "0.6225185", "0.6209064", "0.61996037", "0.6190611", "0.61761147", "0.6169231", "0.61487806", "0.6099127", "0.6060192", "0.60215825", "0.60172606", "0.6011394", "0.6011358", "0.5987684", "0.5948558", "0.59425014", "0.5935942", "0.5933285", "0.59296334", "0.5907179", "0.5882688", "0.5876101", "0.5872766", "0.58710223", "0.5861809", "0.5844824", "0.58423465", "0.5829332", "0.58269244", "0.5823249", "0.5813725", "0.5812092", "0.5808685", "0.57986134", "0.5784241", "0.5783885", "0.5780738", "0.5780304", "0.5780304", "0.5780304", "0.5777003", "0.57768714", "0.577227", "0.5769863", "0.57693964", "0.5765964", "0.57639205", "0.5746768", "0.5746483", "0.5746443", "0.5745602", "0.5740461", "0.57384104", "0.5734489", "0.5733056", "0.57208", "0.5714665", "0.5700046", "0.56977063", "0.5688363", "0.56844", "0.5680889", "0.5676896", "0.5673869", "0.56716555", "0.56691784", "0.5666964", "0.5663605", "0.5655202", "0.56551135", "0.5648849", "0.564853", "0.56426364", "0.56402427", "0.56395763", "0.5638423", "0.56375086", "0.56375086", "0.56347644", "0.56301504", "0.5627892", "0.56256837", "0.5624886", "0.5607224", "0.56049186", "0.5594834", "0.5586255" ]
0.0
-1
Send HTTP Put command
public function put($content = NULL) { if (is_array ( $content )) { $content = http_build_query ( $content ); $this->setHeader ( 'Content-Type', 'application/x-www-form-urlencoded' ); } $this->request_body = $content . self::CRLF . self::CRLF; $this->method = "PUT"; $this->send (); return $this->status_code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function httpPut()\n {\n return $this->method(\"PUT\");\n }", "function send_put()\n { \n $send = new send($this->put('id'));\n\n $send->date_modified = date('Y-m-d H:i:s');\n $send->modifiedbypk = $this->get_user()->user_id;\n\n $this->response($this->_update_save($send, 'put'));\n }", "function put($url, $fields, $headers)\n{\n $ch = curl_init($url); //initialize and set url\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\"); //set as put request\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); //set fields, ensure they are properly encoded\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // set headers pass encoding here and tokens.\n $response = curl_exec($ch); // save the response\n curl_close ($ch);\n return $response;\n}", "function put($url, $data = \"\", $http_options = array()) {\n $http_options = $http_options + $this->http_options;\n $http_options[CURLOPT_CUSTOMREQUEST] = \"PUT\";\n $http_options[CURLOPT_POSTFIELDS] = $data;\n $this->handle = curl_init($url);\n\n if (!curl_setopt_array($this->handle, $http_options)) {\n throw new RestClientException(\"Error setting cURL request options.\");\n }\n\n $this->response_object = curl_exec($this->handle);\n $this->http_parse_message($this->response_object);\n\n curl_close($this->handle);\n return $this->response_object;\n }", "function sendPutCmd($resource, $data) {\n $url = $this->baseURL . $resource;\n\n $request = curl_init($url);\n curl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($request, CURLOPT_FAILONERROR, true);\n curl_setopt($request, CURLOPT_POSTFIELDS, $data);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data))\n );\n\n $result = curl_exec($request);\n return json_decode($result, true);\n }", "public function put($url, $body = array(), $query = array(), $headers = array());", "public function testUpdateMetadata1UsingPUT()\n {\n }", "protected function makePutRequest($uri, $params) {\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL,$this->server_url . $uri);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($curl, CURLOPT_POSTFIELDS,\n http_build_query($params));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $output = curl_exec($curl);\n $this->response = $output;\n $this->response_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close ($curl);\n }", "public function put()\n {\n #HTTP method in uppercase (ie: GET, POST, PUT, DELETE)\n $sMethod = 'PUT';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData($this->getData());\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_POSTFIELDS, $this->getData());\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"accept-language: \" . $this->getAcceptLanguage(),\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'PUT::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'PUT::DATA', $this->getData());\n Log::write('WebRequest', 'PUT::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'PUT::RESPONSE', $sOutput);\n\n $this->setData('');\n\n if ($iHTTPCode !== 204) {\n print_r($sOutput);\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 204');\n }\n return $sOutput;\n }", "public function testUpdateMetadata3UsingPUT()\n {\n }", "function doPUT (HttpRequest $request, HttpResponse $response) {\n throw new Exception(\"PUT method not supported\");\n }", "public function testUpdateMetadata2UsingPUT()\n {\n }", "public function put();", "public function put();", "abstract public function put($data);", "public function executePut()\n {\n throw new Frapi_Error('NO_PUT');\n }", "function make_put_call($mid_url, $put_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($put_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }", "function put($url, $data = null, $options = array()) {\n\t\treturn $this->request($url, array_merge(array('method' => 'PUT', 'body' => $data), $options));\n\t}", "function put(Request &$request, Response &$response);", "public function putAction()\n {\n Extra_ErrorREST::setInvalidHTTPMethod($this->getResponse());\n }", "public function put(...$args)\n {\n return $this->curl('put', ...$args);\n }", "public function _put($url = null, array $parameters = []);", "function put() \n {\n \n }", "function http_put_data($url, $data = null, ?array $options = null, ?array &$info = null) {}", "public function methodPut() {\n return $this->methodPost();\n }", "public function put()\n\t{\n\t\t$this->post();\n\n\t\t$response = $this->plugin->get( 'response' );\n\t\tif ( isset( $response->success ) && $response->success ) {\n\t\t\tJResponse::setHeader( 'status', 200, true );\n\t\t\t$response->code = 200;\n\t\t\t$this->plugin->setResponse( $response );\n\t\t}\n\t}", "public function put($content);", "public function doPut($path, array $parsed_body);", "function handlePut($isValid, $update)\n{\n $isSuccess = false;\n\n try {\n # extract the id portion of the URL\n $id = substr($_SERVER['PATH_INFO'], 1);\n # get the JSON format body and decode it\n $put = trim(file_get_contents(\"php://input\"));\n $data = json_decode($put, true);\n // var_dump($data);\n $isSuccess = $update($data, $id);\n } catch (Exception $e) {\n}\n\n $resp = new stdClass();\n $resp->success = $isSuccess;\n\n echo json_encode($resp);\n}", "static function put($url, $body = null, $headers = array()) {\n $request = new NiceHTTP\\PutRequest($url, $body, $headers);\n return $request->send();\n }", "public static function put($url, $data, $httpHeaders = array())\n {\n $ch = self::init($url, $httpHeaders);\n //set the request type\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n return self::processRequest($ch);\n }", "function PUT(&$options) \n\t\t{\n\t\t\t$options[\"path\"] = urldecode($options[\"path\"]);\n\t\t \n\t\t //Parameter des Datastorages laden\n\t\t\t$path_explode = explode(\"/\",$options[\"path\"]);\n\t\t\t$ds_path = substr($options[\"path\"],strlen($path_explode[1])+2);\n\t\t\tif(substr($ds_path,-1)==\"/\")\n\t\t\t\t$ds_path=substr($ds_path,0,-1);\n\t\t\t\n\t\t //Parameter des Datastorages laden\n\t\t\t$ds = getDatastorageByName($path_explode[1],$this->config_appinfos);\n\t\t\tif($ds){\n\t\t\t\t\t//Dateiupload durchführen\n\t\t\t\t\t$result = $ds->uploadFileStream($options[\"stream\"],$ds_path);\n\n\t\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\treturn \"403 Forbidden\";\n\t\t\t}\n\t\t\treturn \"403 Forbidden\";\n\t\t}", "public function put($path,$content) ;", "function rest_put_data($url, $data)\n{\n if (is_array($data)) {\n $data = json_encode($data);\n }\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "public function put($path, array $params = array())\n\t{\n\t\t// If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response.\n\t\t// If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate successful completion of the request.\n\t\t$this->Response->end('HTTP PUT', 501); // 501 Not Implemented\n\t}", "public function isPut();", "private function curl_put($url, $data)\n {\n $json_str = file_get_contents($this->cil_config_file);\n $json = json_decode($json_str);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc)));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($ch, CURLOPT_POSTFIELDS,$data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "public static function put($url, array $options = []) {\n $ch = curl_init();\n static::parse_query_params($url, $options);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n static::set_body($ch, $options);\n static::parse_options($ch, $options);\n return static::parse_response(curl_exec($ch), $options);\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "function Put( $uri, $filecontent )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Put( $uri, [filecontent not displayed )\\n\";\r\n\t\t$uri = $this->makeUri( $uri );\r\n\t\t$this->requestBody = $filecontent;\r\n\t\tif( $this->sendCommand( \"PUT $uri HTTP/$this->protocolVersion\" ) )\r\n\t\t\t$this->processReply();\r\n\t\treturn $this->reply;\r\n\t}", "public function update_put(){\n $response = $this->PersonM->update_person(\n $this->put('id'),\n $this->put('name'),\n $this->put('hp'),\n $this->put('email'),\n $this->put('message')\n );\n $this->response($response);\n }", "public function testUpdateCategoryUsingPUT()\n {\n }", "public function testUpdateBrandUsingPUT()\n {\n }", "function restPut($url, $content) {\n\t$ch = curl_init();\n\t// Uses the URL passed in that is specific to the API used\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// When posting to a Fuel API, content-type has to be explicitly set to application/json\n\t$headers = [\"Content-Type: application/json\", \"User-Agent: \" . getSDKVersion()];\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t// The content is the JSON payload that defines the request\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t//Need to set ReturnTransfer to True in order to store the result in a variable\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t//Need to set the request to be a PATCH\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\t// Disable VerifyPeer for SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$outputJSON = curl_exec($ch);\n\t$responseObject = new \\stdClass();\n\t$responseObject->body = $outputJSON;\n\t$responseObject->httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\treturn $responseObject;\n}", "public function put()\n {\n $this->method = 'PUT';\n return $this;\n }", "public function put($url, $headers = [], $data = [], $options = [])\n {\n }", "public function put($database, $url, $data);", "public function testPutValue() : void {\n\t\t$this->assertEquals('PUT', HttpMethod::Put->value);\n\t}", "public function putAction() {}", "public function put(string $url, array $input = [], $headers = null);", "public function addPutData($put_data) {}", "public function Put( $sUrl, $vRequestBody, $bJsonEncode = false );", "public function api_put($path, $data = array()) {\n\n $path = GoCardless_Client::$api_path . $path;\n\n return $this->request('put', $path, $data);\n\n }", "public function put($path, $content);", "public function put($path, $data = null);", "public static function put($url, $headers = [], $data = [], $options = [])\n {\n }", "public function put($data)\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n $this->api->update_item_content($this->item['id'], $data);\n }", "function act() {\n if ($_SERVER['REQUEST_METHOD'] == \"PUT\") {\n $xml = \"\";\n $fd = fopen(\"php://input\",\"r\");\n while ($line = fread($fd,2048)) {\n $xml .= $line;\n }\n fclose($fd);\n $src = $this->getParameterDefault(\"src\");\n $fd=fopen($src,\"w\");\n \n fwrite($fd,$xml);\n fclose($fd);\n // TODO: Error handling!\n $this->sitemap->setResponseCode(204);\n return array(\"message\" => \"Data saved\");\n }\n return array(\"message\" => \"Not a PUT request\");\n \n \n }", "public function putAction(){\n $this->_helper->json(\"Esto no esta implementado\");\n }", "public static function urlPUT($url, $data, $headers=null) {\n\n $isJsonForm = false;\n if ($headers == null){\n $headers = array(\"Content-type: application/json\");\n $isJsonForm = true;\n }\n else {\n $stringFromHeaders = implode(\" \",$headers);\n if (preg_match(\"/Content\\-type:/i\",$stringFromHeaders)){\n \n if (preg_match(\"/Content\\-type:\\ {0,4}application\\/json/i\",$stringFromHeaders)){\n $isJsonForm = true; \n array_push($headers,\"Content-type: application/json\");\n }\n\n }\n else{\n $isJsonForm = true; \n array_push($headers,\"Content-type: application/json\");\n }\n }\n\n if ($isJsonForm){\n $data = json_encode($data);\n $dataString = $data;\n }\n else{\n\n $dataString = '';\n $arrKeys = array_keys($data);\n foreach ($data as $key => $value){\n if (preg_match(\"/[a-zA-Z_]{2,100}/\",$key))\n $dataString .= $key . \"=\" . $value .\"&\";\n }\n $dataString .= \"\\n\";\n }\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n array_push($headers,'Content-Length: ' . strlen($dataString));\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n \n\n if($headers != null && in_array('Custom-SSL-Verification:false',$headers)){\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); \n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n }\n\n $contents = curl_exec($ch);\n\n\n if($errno = curl_errno($ch)) {\n $error_message = curl_strerror($errno);\n //echo \"cURL error ({$errno}):\\n {$error_message}\";\n $contents = \"cURL error ({$errno}):\\n {$error_message}\";\n }\n\n\n curl_close($ch);\n\n return utf8_encode($contents);\n }", "public function put($location, $body);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "function http_put_stream($url, $stream = null, ?array $options = null, ?array &$info = null) {}", "public function put(string $uri, array $options = []): ResponseInterface {\n return $this->request('PUT', $uri, $options);\n }", "public function put ( $path, $body = null, $params ) {\n \n \t$body = json_encode ( $body );\n \n $opts = array (\n\t\t\t CURLOPT_HTTPHEADER \t\t=> array ( 'Content-Type: application/json' ),\n\t\t\t CURLOPT_CUSTOMREQUEST \t=> \"PUT\",\n\t\t\t CURLOPT_POSTFIELDS \t\t=> $body\n );\n \n $exec = $this->execute ( $path, $opts, $params );\n\n return $exec;\n }", "public function isPut()\n {\n return $this->_getMethod() === \\Yana\\Http\\Requests\\MethodEnumeration::PUT;\n }", "protected function setPutData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "protected function _doPut($in_url, $in_content, $in_content_type, $in_additional_curl_options=array()) {\r\n return $this->__doRequest($in_url, 'PUT', $in_content, $in_content_type, $in_additional_curl_options);\r\n }", "public function putAction() {\n\t\t$this->_notImplemented();\n\t}", "public function method_PUT( &$headers, $member ) {\n throw new DAV_Status( DAV_Request::$PARANOID ? REST::HTTP_CONFLICT : REST::HTTP_FORBIDDEN );\n}", "public function index_put($id)\n {\n $input = $this->put();\n $this->write_db->update($_table, $input, array($_id=>$id));\n \n $this->response(['Item updated successfully.'], REST_Controller::HTTP_OK);\n }", "public function sendPut ($postArray, $flags = null)\n {\n $this->setPostFields($postArray, $flags);\n\n curl_setopt($this->cURL, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\n return $this->handleQuery();\n }", "public function put(string $uri, array $params = [], $body = null, array $headers = []): ResponseInterface;", "public function putAction()\n {\n \n }", "public function put( $url, array $headers=array(), $data=null ) {\n return $this->httpRequest( $url, 'PUT', $headers, $data );\n }", "public function isPut(): bool\n {\n return $this->getMethod() === self::METHOD_PUT;\n }", "public function isPut()\n\t{\n\t\treturn $this->httpMethod() == self::MethodPut;\n\t}", "protected function httpPut(string $path, array $params = [], array $requestHeaders = []): ResponseInterface\n {\n return $this->httpClient->request('PUT', $path, [\n 'body' => $this->createJsonBody($params),\n 'headers' => $requestHeaders,\n ]);\n }", "public function put($uri, $body = null, array $headers = []): ResponseInterface;", "public function setPutData($put_data = null) {}", "public function isPut()\n {\n return $this->getMethod() === 'PUT';\n }", "public function put($key=null,$value=null){\n return $this->methodsData(\"put\",$key,$value);\n }", "public function isPut(){\n\t\treturn (strtoupper($this->getHeader('REQUEST_METHOD'))=='PUT')? true : false;\n\t}", "private function put($url, $content = '', $type = 'application/xml', $header = '') {\n\t\t$url = $this->api_url . $url;\n\n\t\t// Set headers.\n\t\t$headers = array();\n\t\tif (!empty($type)) {\n\t\t\t$headers[] = 'Content-Type: ' . $type . '; charset=UTF-8';\n\t\t}\n\t\t$headers[] = 'Content-Length: ' . strlen($content);\n\t\tif (!empty($header)) {\n\t\t\t$headers[] = $header;\n\t\t}\n\n\t\t// PUT in PHP requires content to be in a file. Store in temp.\n\t\t$fp = fopen(\"php://temp\", \"r+\");\n\t\tfputs($fp, $content);\n\t\trewind($fp);\n\n\t\t// Open curl.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n\t\tif (count($headers) > 0) {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t\t}\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_USERPWD, $this->api_username . \":\" . $this->api_password);\n\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\tfclose($fp);\n\t\treturn $output;\n\t}", "public function requestPut(string $path, string $body): bool\n {\n return $this->request('put', $path, $body);\n }", "public function put() {\n\t\t$this->method('PUT');\n\t\treturn $this;\n\t}", "public function put(string $path, string $contents): Promise;", "public function makePutRequest($routeName, $routeParams = array(), $putParams = array())\n\t{\n\t\t$uri = Route::url($routeName, $routeParams);\n\n\t\ttry\n\t\t{\n\t\t\t$request = Request::factory($uri);\n\t\t\t$this->_response = $request\n\t\t\t\t->method(Http_Request::PUT)\n\t\t\t\t->post($putParams)\n\t\t\t\t->execute();\n\t\t}\n\t\tcatch (RedirectException $e)\n\t\t{\n\t\t\t$this->_redirect = json_decode($e->getMessage(), TRUE);\n\t\t}\n\t}", "public function isPut()\n {\n return $this->getMethod() === self::METHOD_PUT;\n }", "abstract public function put(Request $request);", "public function isPut() {\n return $this->method == 'PUT';\n }", "public function testCanMakeHttpPut()\n {\n # Set desired response\n $resp = $this->createMock('Psr\\Http\\Message\\ResponseInterface');\n $this->mockClient->addResponse($resp);\n $httpClient = $this->givenSdk()->getHttpClient();\n $response = $httpClient->put(\"/dummy_uri\");\n\n $this->assertSame($resp, $response);\n }", "protected function processPutRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'put'\n ]));\n }", "public function putAction()\n {\n try\n {\n $trackingReq = $this->_helper->TrackingRequest($this->_request->getRawBody());\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, 'Malformed APP Envelope');\n }\n\n try\n {\n $this->trackingService->changeFulfillmentStatus($trackingReq);\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->sendAlteredResponse(400, 'No ID passed in content');\n }\n catch (SE\\Infrastructure\\Tracking\\Exception $e)\n {\n $this->sendAlteredResponse(403, 'No Tracking Request Resource With This ID');\n }\n }", "public function isPut(): bool {}", "public static function isPut(){\n return self::isRequestMethod('PUT');\n }", "public function put($url, $endpoint = \"\", $header = array(), $query = array(), $sendJSON = false)\n {\n if ($sendJSON == true) {\n $payload = json_encode($query);\n } else {\n $payload = $query;\n }\n\n // Prepare new cURL resource\n $ch = curl_init($url . $endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLINFO_HEADER_OUT, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n //curl_setopt($ch, CURLOPT_PUT, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n\n if (array_key_exists('headers', $header)) {\n // Set HTTP Header for POST request \n curl_setopt($ch, CURLOPT_HTTPHEADER, $header['headers']);\n }\n\n // Submit the POST request\n $result = curl_exec($ch);\n\n //header('Content-Type: application/json');\n return json_encode(json_decode($result));\n\n // Close cURL session handle\n curl_close($ch);\n }", "public function isPut()\n {\n return $this->getRequestMethod() === 'PUT';\n }", "public function isPut()\n {\n return $this->isMethod('PUT');\n }", "public function isPut()\n {\n return $this->isMethod('PUT');\n }" ]
[ "0.729601", "0.70240295", "0.70146644", "0.6990768", "0.69862604", "0.69650465", "0.68424386", "0.6828463", "0.68081", "0.6769454", "0.67590564", "0.67426735", "0.67394656", "0.67394656", "0.6710768", "0.6691312", "0.66561306", "0.6648924", "0.66027457", "0.6594067", "0.65780795", "0.6571655", "0.65625143", "0.655796", "0.6520665", "0.6500445", "0.64856416", "0.64524543", "0.64472455", "0.64115393", "0.6409266", "0.640725", "0.64036584", "0.6403637", "0.6395005", "0.6382335", "0.63762325", "0.63668793", "0.6332731", "0.63232267", "0.62980413", "0.62934476", "0.62821203", "0.6273394", "0.6264691", "0.6258632", "0.6255111", "0.6251082", "0.623917", "0.62352735", "0.6234252", "0.622712", "0.62097776", "0.62087554", "0.6200793", "0.6196243", "0.61920875", "0.6184524", "0.61825615", "0.61469674", "0.61465", "0.6132252", "0.61309737", "0.60708654", "0.60694665", "0.6058714", "0.60499686", "0.60430145", "0.60356617", "0.60340154", "0.6029126", "0.60088164", "0.59999216", "0.5993776", "0.5983135", "0.59744966", "0.5972912", "0.5968556", "0.5968035", "0.59564084", "0.5947545", "0.59260356", "0.59242386", "0.59097785", "0.5906388", "0.5906336", "0.5904236", "0.5903886", "0.58973", "0.5896749", "0.58913136", "0.587785", "0.5869577", "0.58563536", "0.58544403", "0.5851339", "0.5849186", "0.58253", "0.5822245", "0.5822245" ]
0.65515375
24
Get a specific response header
public function getHeader($key) { return $this->response_headers [$key]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getresponseheader($header = false){\n $headers = $this->getLastResponseHeaders();\n foreach ($headers as $head){\n if ( is_integer(strpos ($head, $header) )){\n $hstart = strpos ($head, \": \");\n $head = trim(substr($head,$hstart+2,100));\n return $head;\n }\n }\n }", "function getHeader( $headername )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getHeaderName( $headername )\\n\";\r\n\t\treturn $this->responseHeaders[$headername];\r\n\t}", "function GetHeader() {\n return ($this->ses['response']['header']);\n }", "public function getHeaderValue();", "public function getHeader();", "public function getHeader();", "public function getHeader();", "#[Pure]\n public function getResponseHeader($name = null) {}", "public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }", "public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }", "public function get_header() {\n $this->do_header();\n return $this->c_header;\n }", "public function getHeader($name);", "function getResponseHeaders();", "public function header($name) {\n return isset($this->headers[$name])? $this->headers[ucfirst($name)] : null;\n }", "public function getHeader(string $name);", "public function getResponseHeaders();", "public function getHeader(string $header): string;", "public function getHeader()\n {\n return $this->httpHeader;\n }", "public function getResponseHeader($name = NULL, $default= NULL){\n\t\treturn $this->response->getHeader($name, $default);\n\t}", "function get_header()\n\t{\n\t\treturn $this->header;\n\t}", "public function getHeader($key) {\n if (isset($this->httpHeaders[$key])) {\n return $this->httpHeaders[$key];\n }\n return null;\n }", "function get_response_code($header) {\r\n\t$parts = explode(\"\\r\\n\", $header);\r\n\treturn $part[0];\r\n}", "public function getHeader()\r\n {\r\n return $this->headers;\r\n }", "public static function getHeader(ResponseInterface $response, $name)\n {\n $headers = $response->getHeader($name);\n return array_shift($headers);\n }", "public function get_header() {\n\t\tif (!isset($this->header)) {\n\t\t\t$this->get_array();\n\t\t}\n\t\treturn $this->header;\n\t}", "public function getHeader ()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeaderValue()\n {\n }", "public function getHeader()\n {\n return $this->content['header'];\n }", "public function getHeader($name)\r\n {\r\n $name = strtolower($name);\r\n if ($this->hasHeader($name)) {\r\n return $this->headers[$name];\r\n }\r\n return NUll;\r\n }", "public function get_header($key)\n {\n }", "public static function getHeader()\n {\n return self::$_header;\n }", "public function getHeader(): string\n {\n return $this->header;\n }", "public static function getHeader(ResponseInterface $response, $name)\n {\n $headers = $response->getHeader($name);\n\n return array_shift($headers);\n }", "public static function getHeader(ResponseInterface $response, $name)\n {\n $headers = $response->getHeader($name);\n\n return array_shift($headers);\n }", "public function getHttpHeader($name = null);", "public function getHeader(string $name): string;", "public function GetHeader()\n {\n return $this->HeaderName;\n }", "public function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "public function getHeader() {\n return $this->header;\n }", "public function getHeader($headerName);", "public function getResponseHeader($header)\n {\n if (!$this->response) {\n throw new FlowException('You have to call the request in order to obtain the response');\n }\n\n if (!$this->hasResponseHeader($header)) {\n return null;\n }\n\n return $this->response->getHeader($header)[0];\n }", "public function header($name)\n\t{\n\t\treturn isset($this->_headers[$name]) ? $this->_headers[$name] : null;\n\t}", "protected function getHeader($header)\n {\n $this->initialize();\n $header = str_replace('-','_',$header);\n return isset($this->parsed['headers'][$header]) ? $this->parsed['headers'][$header] : null;\n }", "public function getHeader() {\n }", "public function getHeader(){\n\t\treturn $this->header;\n\t}", "public function header()\n\t{\n\t\t$header = Request::current()->headers();\n\t\treturn $header;\n\t}", "public function header($key)\n {\n if (isset($this->headers[$key])) {\n return $this->headers[$key];\n }\n return null;\n }", "public function getHeader()\n {\n return $this->Header;\n }", "function getHeader($name){\n\t\t$name = strtoupper($name);\n\t\tforeach(array_keys($this->_Headers) as $_key){\n\t\t\tif(strtoupper($_key)== strtoupper($name)){\n\t\t\t\treturn $this->_Headers[$_key];\n\t\t\t}\n\t\t}\n\t}", "public function getHeader() {\n return $this->Header;\n }", "protected static function get_response_headers()\n {\n }", "public function getHeader($name)\n {\n if (isset($this->headers[$name])) {\n return $this->headers[$name];\n }\n }", "public function getHttpHeader($header)\n\t\t{\n\t\t\t//are we using PHP-flavored headers?\n\t\t\tif (strpos($header, '_') === false) {\n\t\t\t\t$header = str_replace('-', '_', $header);\n\t\t\t\t$header = strtoupper($header);\n\t\t\t}\n\n\t\t\t//test the alternate, too\n\t\t\t$altHeader = 'HTTP_' . $header;\n\n\t\t\t//Test both the regular and the HTTP_ prefix\n\t\t\tif (isset($this->httpHeaders[$header])) {\n\t\t\t\treturn $this->httpHeaders[$header];\n\t\t\t} elseif (isset($this->httpHeaders[$altHeader])) {\n\t\t\t\treturn $this->httpHeaders[$altHeader];\n\t\t\t}\n\t\t}", "function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "public function getHeader() {\r\n return $this->__header;\r\n }", "public function getHeader($name) {\r\n\t\t$name = $this->_normalizeHeader ( $name );\r\n\t\tforeach ( $this->headers as $header ) {\r\n\t\t\tif ($header ['name'] == $name) {\r\n\t\t\t\treturn $header ['value'];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getHeader($key);", "public function getHeader($name = null) {}", "abstract public function getHeaders();", "public function header()\n {\n return $this->headerRequested;\n }", "public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }", "public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }", "public function response_headers($header_name=null) {\n $headers = null;\n if(is_array($this->response_headers)) {\n $header_name = strtolower($header_name);\n if($header_name===null) {\n $headers = $this->response_headers;\n } else {\n $headers = key_exists($header_name, $this->response_headers)\n ? $this->response_headers[$header_name]\n : null;\n }\n }\n return $headers;\n }", "public function getHeader($name)\n {\n }", "public function getHeader($name)\n {\n }", "public function header() {\n return $this->header;\n }", "public function header($name)\n {\n return $this->connection->header($name);\n }", "public function getHeader($header)\n {\n foreach ($this->headers as $key => $value)\n {\n if (str_replace('-', '_', strtolower($key)) == str_replace('-', '_', strtolower($header)))\n {\n return $value;\n }\n }\n }", "public function getHeader($headerKey);", "public static function getHeader($name = null) {}", "public function getRequestHeader()\n {\n return $this->get(self::REQUEST_HEADER);\n }", "public function get_header(string $p_name) {\n $orig_name = $this->get_header_name($p_name);\n\n return $this->headers[$orig_name] ?? null;\n\n }", "static function header($name)\n\t{\n\t\t$key = 'HTTP_' . str_replace('-', '_', strtoupper($name));\n\t\tif (isset($_SERVER[$key])) {\n\t\t\treturn $_SERVER[$key];\n\t\t}\n\t\treturn null;\n\t}", "public abstract function getHeaders();", "private function header($name = '')\r\n {\r\n static $header = null;\r\n\r\n if (is_null($header)) {\r\n $header = [];\r\n $server = $_SERVER;\r\n\r\n foreach ($server as $key => $val) {\r\n if (0 === strpos($key, 'HTTP_')) {\r\n $key = str_replace('_', '-', strtolower(substr($key, 5)));\r\n $header[$key] = $val;\r\n }\r\n }\r\n\r\n if (isset($server['CONTENT_TYPE'])) {\r\n $header['content-type'] = $server['CONTENT_TYPE'];\r\n }\r\n\r\n if (isset($server['CONTENT_LENGTH'])) {\r\n $header['content-length'] = $server['CONTENT_LENGTH'];\r\n }\r\n\r\n $header = array_change_key_case($header);\r\n }\r\n\r\n if ('' === $name) {\r\n return $header;\r\n }\r\n\r\n $name = str_replace('_', '-', strtolower($name));\r\n\r\n return $header[$name] ?? null;\r\n }", "function curl_header(&$curl, $header) {\n return curl_headers($curl, [$header]);\n}", "public function getHeader($header)\n {\n // Try to get it from the $_SERVER array first\n $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header));\n if(!empty($_SERVER[$temp])) return $_SERVER[$temp];\n\n // This seems to be the only way to get the Authorization header on Apache\n if (function_exists('apache_request_headers'))\n {\n $headers = apache_request_headers();\n if(!empty($headers[$header])) return $headers[$header];\n }\n return null;\n }", "public function getHeaders ();", "public function __get($name)\n {\n $name = strtolower(preg_replace('/([A-Z])/', '-$1', $name));\n\n return isset($this->headers[$name]) ? $this->headers[$name] : NULL;\n }", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeader($header)\n {\n return isset($this->headers[$header]) ? $this->headers[$header] : null;\n }", "public function getHeader($name)\n {\n $name = strtolower($name);\n\n return array_key_exists($name, $this->headers) ? $this->headers[$name] : null;\n }", "public function getHeader($key){\n $key = FW_String::strtolower($key);\n \n if($this->getHeader($key)){\n return $this->header[$key];\n }\n \n return null;\n }", "public function getHeader($header)\n {\n if ($this->isHeaderSet($header))\n {\n return $this->headers[$header];\n }\n \n throw new HeaderAbsentException(\"The header '$header' is not present\");\n }", "function get_header($name = \\null, $args = array())\n {\n }", "public function getHeader($header) {\n\n $normalized = strtolower($header);\n\n if (isset($this->headers[$normalized])) {\n return $this->headers[$normalized]['value'];\n }\n\n return '';\n\n }" ]
[ "0.8388776", "0.76455176", "0.7625671", "0.74722457", "0.73992115", "0.73992115", "0.73992115", "0.73697984", "0.73149204", "0.73149204", "0.72932607", "0.7280175", "0.727872", "0.72682583", "0.7249458", "0.722869", "0.7149517", "0.71481514", "0.7122165", "0.708909", "0.7082213", "0.7078102", "0.7069946", "0.705578", "0.70153004", "0.700459", "0.69885516", "0.69885516", "0.69885516", "0.69885516", "0.69885516", "0.69875795", "0.6982462", "0.6982287", "0.6981999", "0.6980017", "0.6979651", "0.6979309", "0.6979309", "0.6971094", "0.69673806", "0.6933572", "0.69317997", "0.69266117", "0.6926362", "0.692444", "0.69196457", "0.69085515", "0.68991435", "0.6889022", "0.68781257", "0.6860307", "0.6860292", "0.6856837", "0.6852837", "0.6848799", "0.68295354", "0.68003297", "0.67946815", "0.67833656", "0.6771536", "0.6745849", "0.6738713", "0.67064786", "0.6694263", "0.668781", "0.668781", "0.667536", "0.6671159", "0.6671159", "0.6661718", "0.66562307", "0.66509444", "0.6643489", "0.6632084", "0.6631215", "0.6630405", "0.6625515", "0.6621734", "0.6619748", "0.6616886", "0.661575", "0.6613833", "0.65970284", "0.6595925", "0.6595925", "0.6595925", "0.6595925", "0.6595925", "0.6595925", "0.6595925", "0.6595925", "0.6595925", "0.6595925", "0.6590921", "0.6586979", "0.6580921", "0.6579594", "0.657827", "0.65680605" ]
0.74412364
4
Get the response body
public function getBody() { return $this->response_body; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBody()\n {\n return $this->response;\n }", "public function getBody(): string\n {\n return (string) $this->response->getBody();\n }", "public function getResponseBody(){\n\t\treturn $this->response->getBody();\n\t}", "public function body()\n {\n return (string)$this->response->getBody();\n }", "function getBody()\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getBody()\\n\";\r\n\t\treturn $this->responseBody;\r\n\t}", "public function getResponseBody()\n {\n return $this->responseBody; \n }", "public function getResponseBody()\r\n\t{\r\n\t\treturn $this->body;\r\n\t}", "public function getRawResponse()\n {\n return $this->response->getBody();\n }", "public function getResponseBody()\n\t{\n\t\treturn isset($this->_response['body']) ? $this->_response['body'] : '';\n\t}", "public function getResponseBody()\n {\n return $this->responseBody;\n }", "public function getResponseBody()\n {\n return $this->responseBody;\n }", "public function getResponseBody()\n {\n return $this->responseBody;\n }", "public function getResponseBody() {\n return $this->body;\n }", "public function getBody()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\treturn 'Trying to fetch response body for a pending request.';\n\t\t}\n\t\treturn $this->response_body;\n\t}", "public function getResponseBody()\n\t{\n\t\treturn $this->_responseBody;\n\t}", "public function getResponseBody()\n {\n return $this->httpResponse;\n }", "public function get_response_body()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\tthrow new \\Exception( _t( 'Unable to fetch response body for a pending request.' ) );\n\t\t}\n\n\t\treturn $this->response_body;\n\t}", "public function getRespBody()\n {\n $headerSize = curl_getinfo($this->res, CURLINFO_HEADER_SIZE);\n\n return substr($this->lastResponse, $headerSize);\n }", "public function getResponseBody()\n {\n if (!$this->response) {\n throw new FlowException('You have to call the request in order to obtain the body of the response');\n }\n\n return json_decode($this->response->getBody(), true);\n }", "public function getResponse()\n {\n return $this->header . \"\\r\\n\\r\\n\" . $this->body;\n }", "public function getBody()\n\t{\n\t\t// yet been initialised\n\t\tif (!$this->contentType) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\t'Response must be initialised first'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Return a decoded body if one is\n\t\t// available, else return the raw body\n\t\treturn ($this->decodedBody) ? $this->decodedBody : $this->rawBody;\n\t\t\n\t}", "public function getResponse()\n {\n return $this->getRawHeaders() . \"\\r\\n\\r\\n\" . $this->getBody();\n }", "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "public function getBody()\n {\n return $this->values[\"body\"];\n }", "public function getBodyContent()\n {\n // init vars\n $bodyContent = \"\";\n $contentLength = $this->getHeader(HttpProtocol::HEADER_CONTENT_LENGTH);\n // just if we got a body content\n if ($contentLength > 0)\n {\n // set bodystream resource ref to var\n $bodyStream = $this->getBody();\n $bodyContent = substr($bodyStream, 0, $contentLength);\n }\n return $bodyContent;\n }", "public function getRawResponse()\n {\n return $this->response;\n }", "protected function getBody()\n {\n return $this->getRequest()->getBody();\n }", "public function getResponseContent()\n {\n return $this->responseContent;\n }", "public function getRawResponse();", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function get_body()\n {\n return json_decode(file_get_contents('php://input'), TRUE);\n }", "public function getBody()\n {\n $body = json_decode($this->body, true);\n\n dd($body);\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody() {\n\t\treturn $this->body;\n }", "public function getBody() {\n\t\treturn $this->body;\n }", "public function getBody() {\n return $this->body;\n }", "public function getBody() {\n return $this->body;\n }", "public function getBody() {\n return $this->body;\n }", "public function getBody() {\n\t\treturn $this->body;\n\t}", "public function getBody()\n\t{\n\t\treturn $this->body;\n\t}", "public function getBody() {}", "final public function getBody()\n {\n return $this->body;\n }", "public function getHttpBody()\n {\n return $this->httpBody;\n }", "public function getBody()\n {\n return $this->rawBody;\n }", "public function getBody(): string\n {\n return $this->body;\n }", "public function getBody(): string\n {\n return $this->body;\n }", "public function getDecodedBody()\r\n\t{\r\n\t\treturn ResponseObjectBuilder::buildFromJSON($this->body);\r\n\t}", "public function body() {\n\t\treturn $this->getBody();\n\t}", "function\n\tgetBody ()\n\t{\n\t\treturn $this->_body;\n\t}", "function getHttpBody() {\n return $this->httpBody;\n }", "public function getBody() {\n\t\t$body = \"\";\n\t\t$chunk = \"\";\n\n\t\t// Read all body contents into a string\n\t\twhile (($chunk = $this->read())) {\n\t\t\t$body .= $chunk;\n\t\t}\n\n\t\treturn $body;\n\t}", "public function getResponseContent(): string\n {\n return $this->responseContent;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody(): string {\n\t\treturn $this->body;\n\t}", "public function getBody()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}", "public function getHttpBody(): string\n {\n return $this->httpBody;\n }", "public function getBody()\r\n {\r\n return $this->_body;\r\n }", "function getData() {\n return $this->body->getResponse();\n }", "public function getRawResponse() {\n\t}", "public function getBody()\r\n\t{\r\n\t\treturn $this->_body;\r\n\t}", "public function getBody() : string\n {\n return $this->body;\n }", "public function getBody() : string\n {\n return $this->body;\n }", "public function getBody() : string\n {\n return $this->body;\n }", "public function rawResponse() {\n\t\treturn $this->raw_response;\n\t}", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();" ]
[ "0.86687535", "0.83989507", "0.83690834", "0.8364568", "0.82295823", "0.8155569", "0.81516486", "0.8134262", "0.8128192", "0.810733", "0.810733", "0.810733", "0.80813795", "0.8072837", "0.8011681", "0.7898121", "0.788991", "0.7790717", "0.76418024", "0.7593062", "0.7526165", "0.751639", "0.7486121", "0.7486121", "0.7462612", "0.7452064", "0.74157244", "0.7409115", "0.7383074", "0.7381943", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7362803", "0.7355513", "0.7346369", "0.73180103", "0.73180103", "0.73180103", "0.73180103", "0.73163736", "0.73163736", "0.731531", "0.731531", "0.731531", "0.7304038", "0.7287861", "0.7281344", "0.72733194", "0.7272993", "0.72621536", "0.7237562", "0.7237562", "0.72368234", "0.72334397", "0.72300667", "0.72277135", "0.7200921", "0.72006726", "0.71966475", "0.71966475", "0.71966475", "0.71966475", "0.71953213", "0.71941364", "0.71899956", "0.7173386", "0.7170472", "0.71684897", "0.71668464", "0.7138739", "0.7138739", "0.7138739", "0.71349174", "0.71317226", "0.71317226", "0.71317226", "0.71317226", "0.71317226", "0.71317226", "0.71317226", "0.71317226" ]
0.8775525
0
Get the response headers, associative array
public function getHeaders() { return $this->response_headers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResponseHeaders();", "public function getResponseHeaders(): array\n {\n return $this->responseHeaders;\n }", "public function getResponseHeaders()\r\r\n {\r\r\n return $this->responseHeaders;\r\r\n }", "public function getResponseHeaders()\r\n\t{\r\n\t\treturn $this->headers;\r\n\t}", "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "function getResponseHeaders();", "public function getResponseHeaders() {\n return $this->responseHeaders;\n }", "function getHeaders()\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getHeaders()\\n\";\r\n\t\tif( $this->debug & DBGINDATA ) { \r\n\t\t\techo \"DBG.INDATA responseHeaders=\"; print_r( $this->responseHeaders );\r\n\t\t}\r\n\t\treturn $this->responseHeaders;\r\n\t}", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function GetHeaders()\n {\n return HttpResponse::extractHeaders($this->_rawHttpBatchResponse);\n }", "public function getHeaders ();", "public function getHeaders() {}", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function getHeaders(): array;", "public function headers() {\n\t\treturn $this->getAllHeaders();\n\t}", "public function getHeaders(): array\n\t{\n\t\treturn $this->headers();\n\t}", "public function getRequestHeaders()\n {\n return curl_getinfo($this->res, CURLINFO_HEADER_OUT);\n }", "public function getHeaders()\n {\n $headers[\"HTTP/1.1 $this->_status\"] = true;\n\n if ($this->_status == '200 OK') {\n $headers[\"Connection: close\"] = true;\n $headers[\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\"] = true;\n\n // Try to keep browser from caching any screen to ensure current data.\n if ($this->_preventCache && !isset($this->_headers[\"Expires: 0\"])) {\n $headers[\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\"] = true;\n $headers[\"Cache-Control: no-store, no-cache, must-revalidate\"] = true;\n $headers[\"Pragma: no-cache\"] = true;\n }\n }\n return array_merge($this->_headers, $headers);\n }", "public function getHeaders()\n {\n return $this->headerRequested->get();\n }", "public function getHeaders()\n {\n return $this->values[\"headers\"];\n }", "public function getResponseHeaders() {\n $requestHeaders = [];\n\n if ($this->headers instanceof \\ArrayAccess) {\n while ($this->headers->valid()) {\n $requestHeaders[$this->headers->key()] = $this->headers->current();\n $this->headers->next();\n }\n }\n\n return $requestHeaders;\n }", "public function headers()\r\n\t\t\t {\r\n return self::headersToArray(explode( \"\\r\\n\", $this->headers ));\r\n\t\t\t }", "private function get_headers() {\r\n\t\treturn array( 'User-Agent' => $this->user_agent );\r\n\t}", "public function getHeaders() {\n\t\treturn $this->getHeader();\n\t}", "public abstract function getHeaders();", "public function getHeaders(): array\n {\n return $this->headers;\n }", "public function getHeaders(): array\n {\n return $this->headers;\n }", "public function getHeaders(): array\n {\n return $this->headers;\n }", "public function getHeaders(): array\n {\n return $this->headers;\n }", "public function getHeaders(): array\n {\n return $this->headers;\n }", "public function getHeaders()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\treturn 'Trying to fetch response headers for a pending request.';\n\t\t}\n\t\treturn $this->response_headers;\n\t}", "protected static function get_response_headers()\n {\n }", "function getHeaders() {\n\t\treturn $this->getData('headers');\n\t}", "abstract public function getHeaders();", "public function getHeadersArray() { return $this->headers; }", "public function getHeaders()\n {\n return empty($this->headers) ? $this->parseHeaders($this->rawResponseHeaders) : $this->headers;\n }", "public function getHeaders(): array {\n\t\treturn $this->headers;\n\t}", "public function getHeaders()\n\t{\n\t\treturn $this->headers->toArray();\n\t}", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "public function getHeaders(): array\n {\n if ($this->headers === null) {\n foreach ($_SERVER as $name => $value) {\n if (strncmp($name, 'HTTP_', 5) === 0) {\n $name = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));\n $this->headers[$name] = $value;\n }\n }\n\n return $this->headers;\n }\n\n return $this->headers;\n }", "public function getHeaders()\n {\n $headers = $this->data['headers'];\n $this->data['headers'] = array();\n return $headers;\n }", "public function headers(): array\n\t{\n\t\t// If no headers are defined, but the user is\n\t\t// requesting it, then it's likely they want\n\t\t// it to be populated so do that...\n\t\tif (empty($this->headers))\n\t\t{\n\t\t\t$this->populateHeaders();\n\t\t}\n\n\t\treturn $this->headers;\n\t}", "public function getHeaders()\n\t{\n\t\treturn $this->headers->all();\n\t}", "public function headers()\n {\n return $this->headers;\n }", "public function headers() {\n return $this->headers;\n }", "public function getHttpHeaders()\n {\n $headers = array(\n 'Accept' => 'application/xml'\n );\n if ($this->userAgent) {\n $headers['User-Agent'] = $this->userAgent;\n }\n return $headers;\n }", "public static function getHeaders()\n {\n if (!isset(self::$_data[self::KEY_HEADERS]))\n {\n $_listHeaders = array();\n foreach ($_SERVER as $_key => $_value)\n {\n if (substr($_key, 0, 5) == \"HTTP_\")\n {\n $_key = str_replace('_', ' ', substr($_key, 5));\n $_key = str_replace(' ', '-', ucwords(strtolower($_key)));\n $_listHeaders[$_key] = $_value;\n }\n }\n self::$_data[self::KEY_HEADERS] = $_listHeaders;\n }\n return self::$_data[self::KEY_HEADERS];\n }", "public function getHeaders()\r\n {\r\n return $this->headers;\r\n }", "public function getHeaders()\r\n {\r\n return $this->headers;\r\n }", "public function get_headers(): array {\n if (empty($this->headers)) {\n $this->populate_headers();\n }\n\n return $this->headers;\n }", "public function headers()\n\t{\n\t\treturn $this->_headers;\n\t}", "public function get_response_headers()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\tthrow new \\Exception( _t( 'Unable to fetch response headers for a pending request.' ) );\n\t\t}\n\n\t\treturn $this->response_headers;\n\t}", "private function getHttpHeaders()\n {\n $ret = [];\n foreach ($this->httpConfig->getHeaders() as $k => $v) {\n $ret[] = \"$k: $v\";\n }\n return $ret;\n }", "public function getHeaders()\r\n\t{\r\n\t\treturn $this->headers;\r\n\t}", "public function getHeaders() {\r\n return $this->headers;\r\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->source['headers'];\n }", "public static function getHeaders(): array {\r\n return function_exists('getallheaders') ? getallheaders() : [];\r\n }", "public function getRequestHeaders()\n {\n return [];\n }", "public function getHeaders()\r\n {\r\n return $this->_headers;\r\n }", "public function getHeaders() \n {\n return $this->headers;\n }", "public function getHeaders()\n {\n }", "public function getHeaders()\n {\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return $this->headers;\n }" ]
[ "0.85183316", "0.8369308", "0.8282445", "0.8233101", "0.8182282", "0.8182282", "0.8182282", "0.8182282", "0.8182282", "0.8182282", "0.8155921", "0.81542", "0.80748355", "0.806683", "0.806683", "0.806683", "0.806683", "0.806683", "0.806683", "0.806683", "0.806683", "0.806683", "0.806683", "0.80278206", "0.7996101", "0.793946", "0.7912983", "0.7912983", "0.7912983", "0.7912983", "0.7912983", "0.7912983", "0.7912983", "0.7900944", "0.78995126", "0.78862274", "0.7879776", "0.7868913", "0.78584605", "0.7846471", "0.78259593", "0.7814574", "0.7795995", "0.77912635", "0.7782634", "0.7782634", "0.7782634", "0.7782634", "0.7782634", "0.778024", "0.77784216", "0.7761248", "0.77483845", "0.77360255", "0.7732488", "0.7704188", "0.76998055", "0.7688691", "0.7688691", "0.7684224", "0.76833", "0.76738185", "0.76528776", "0.7643721", "0.7637529", "0.7631858", "0.7618645", "0.7594685", "0.7594685", "0.759217", "0.7589691", "0.7575818", "0.75659364", "0.75638384", "0.75530106", "0.7546787", "0.7546787", "0.75338715", "0.7532694", "0.7529874", "0.75193816", "0.75148576", "0.75148416", "0.75148416", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017", "0.75122017" ]
0.8419528
1
Retrieve the HTTP raw request command
public function rawRequest() { return $this->raw_request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRawRequest() {\n\t}", "public function getRequestCommand(){\n\t\treturn $this->requestCommand;\n\t}", "public function getRawRequest()\n {\n return $this->request;\n }", "public function getRequest(){\n\t\treturn $this->rpcRequest;\n\t}", "public function getRequest(): string\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->get(self::_REQUEST);\n }", "public function get_request_content();", "public function getRawApiRequest()\n {\n return $this->rawApiRequest;\n }", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest() {}", "public function getRequest() {}", "public function getRequest()\n {\n return $this->riak->getLastRequest();\n }", "public function getRequest()\n {\n return $this->riak->getLastRequest();\n }", "public function & GetRequest ();", "public function getRequest()\n {\n return $this->req;\n }", "protected function obtainGetRequest() {\n $request = Request::createFromGlobals();\n return $request->query;\n }", "public function getRequest() {\n return $this->client->getLastRequest();\n }", "function getRequest() {\n\t\treturn $this->m_request;\n\t}", "private function get_command(){\n if (!isset($_POST['command'])) {\n die(\"No command received, no result\");\n }\n $this->command = $_POST['command'];\n }", "#[Pure]\n public function getRawRequestMessage() {}", "protected function getRequest()\n {\n return $this->req;\n }", "public function requestAsString()\n\t{\n\t\t$headers = '';\n\t\tforeach ($this->headers() as $name => $value)\n\t\t\t$headers .= $name . ': ' . $value . \"\\r\\n\";\n\n\t\treturn sprintf('%s %s %s', strtoupper($this->httpMethodString()), $this->uri(), $this->server('SERVER_PROTOCOL')).\"\\r\\n\".\n\t\t\t\t$headers.\"\\r\\n\".\n\t\t\t\t$this->content();\n\t}", "public function getRawResponse();", "public function getRawInput(): string {\n\n return file_get_contents('php://input');\n }", "public function getFullCommand(): string\n {\n return \"/{$this->request->command} {$this->name}\";\n }", "public function get_payload_request();", "public function rawContent() {\n\t\treturn $this->sw_request->rawContent();\n\t}", "protected function getRequest() {}", "function show_request()\n\t{\n\t\tprint_r($this->http_request);\n\t}", "public function getRawResponse() {\n\t}", "public function getRequest()\n {\n return $this->data->request;\n }", "public function getReq()\n\t{\n\t\treturn $this->_request;\n\t}", "public function getRawInput() {\n\t return file_get_contents('php://input');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "function getRequest();", "public function getRequest() {\n return $this->_request;\n }", "public function getRequest()\n {\n return $this->_request;\n }", "public function getRequest()\n {\n return $this->_request;\n }", "public function getRequest(){\r\n if($this->request == 'ping'){\r\n return $this->getPong();\r\n }\r\n elseif($this->request == 'system'){\r\n return $this->getSysInfo();\r\n }\r\n elseif($this->request == 'mediainfo'){\r\n if(is_numeric($this->requestIdValue)){\r\n $this->url = 'https://www.pond5.com/photo/'.$this->requestIdValue.'/';\r\n return $this->createResponse(); \r\n }else{\r\n return \"Id should be a number\";\r\n }\r\n\r\n }else{\r\n return \"Wrong request name you can use | ping | , | system | or | mediainfo/id=number |\";\r\n }\r\n }", "public function getRawInput()\n {\n return file_get_contents('php://input');\n }", "abstract public function getRawSignedRequest();", "public function getRequestData(){\n\t\treturn array( \n \t\t\t'cmd' => $this->getRequestCommand(), \n \t\t\t'params' => $this->getParams() \n\t\t); \n\t}", "public static function getRequestBody() {}", "protected function request()\n\t{\n\t\treturn Phpfox::getLib('request');\t\n\t}", "protected function _getRequestSerial()\n {\n return Ark()->webService()->getRequestSerial();\n }", "public function line()\n {\n return $this->method() . ' ' . $this->requestTarget() . ' ' . $this->protocol();\n }", "public function renderRequestLine()\n {\n return $this->method . ' ' . (string) $this->uri . ' HTTP/' . $this->version;\n }", "public function getRawBody(): string\n {\n if ($this->rawBody === null) {\n $this->rawBody = file_get_contents('php://input');\n }\n\n return $this->rawBody;\n }", "function getRequestInfo()\n\t{\n\t\treturn json_decode(file_get_contents('php://input'), true);\n\t}", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest() {\n return $this->request;\n }", "public function request()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "abstract public function getRawRequestUrl();", "public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to be in a separate class? Anyway, this shoudl\n // be somehow refactored because it is hard to replace or overwrite it.\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($curl);\n // @todo: very important: check the curl errors here.\n\n return $this->parser->parse($response);\n }", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "function getRequest() {\n\t\treturn $this->Request;\n\t}", "public function getRequest() {\n\t\treturn $this->request;\n\t}", "function getRequest() {\n return $this->request;\n }", "public function getRequest() {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getHttpBody(): string\n {\n return $this->httpBody;\n }", "public function getRequest() {\n return $this->Request;\n }", "protected function getRequest() {\n\t\treturn $this->request;\n\t}", "public function request()\r\n {\r\n return $this->request;\r\n }", "public function getRequest(){\n \n return $this->request;\n \n }" ]
[ "0.731819", "0.7272361", "0.6769898", "0.6680565", "0.6512535", "0.6485122", "0.6470837", "0.64541173", "0.6442384", "0.6442384", "0.6442384", "0.6442384", "0.6442384", "0.6442384", "0.6442384", "0.6442384", "0.6424746", "0.6424746", "0.64113426", "0.64113426", "0.6409369", "0.6394087", "0.6383942", "0.6367056", "0.63351905", "0.6299153", "0.6278897", "0.62696165", "0.62694", "0.6251639", "0.6245312", "0.62451345", "0.62357795", "0.6207464", "0.6152289", "0.6134072", "0.61330324", "0.61310226", "0.6130906", "0.6130898", "0.6092748", "0.6092748", "0.6092748", "0.6092748", "0.60899013", "0.6082144", "0.6079962", "0.6079962", "0.60621256", "0.6058205", "0.6049055", "0.6034547", "0.6033315", "0.6031987", "0.60220313", "0.6019768", "0.6015057", "0.6004118", "0.6001839", "0.60008746", "0.60008746", "0.5984702", "0.5980437", "0.5977457", "0.5977457", "0.5977457", "0.59758675", "0.5967723", "0.5952179", "0.5952179", "0.5950491", "0.5947352", "0.59326327", "0.5925113", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5918762", "0.5916737", "0.5905868", "0.5870201", "0.58641756", "0.58598137" ]
0.73031974
1
Retrieve the HTTP raw response command
public function rawResponse() { return $this->raw_response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRawResponse();", "public function getRawResponse() {\n\t}", "public final function getRawResponse() {\n return $this->_rawresponse;\n }", "public function getRawResponse()\n {\n return $this->response;\n }", "public function getRawResponse()\n {\n return $this->rawResponse;\n }", "public function getRawResponse()\n {\n return $this->response->getBody();\n }", "public function GetRawHttpResponse()\n {\n return $this->_rawHttpBatchResponse;\n }", "public function getResponse() : string\r\n {\r\n return $this->response;\r\n }", "public function getResponse(): string\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->header . \"\\r\\n\\r\\n\" . $this->body;\n }", "public function getResponse(): string\n {\n return $this->response;\n }", "public function getRawResponse ()\n {\n return $this->epcQuery->getResponse ();\n }", "public function getResponse()\n {\n return $this->getRawHeaders() . \"\\r\\n\\r\\n\" . $this->getBody();\n }", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse() {\n \n parse_str($this->response, $return);\n return $return;\n }", "public function getResponse()\n {\n return isset($this->response) ? $this->response : '';\n }", "public function getRespBody()\n {\n $headerSize = curl_getinfo($this->res, CURLINFO_HEADER_SIZE);\n\n return substr($this->lastResponse, $headerSize);\n }", "public function getResponse() {}", "public function getResponse() {}", "public function getResponse() {\n\t\treturn $this->data->getResponse();\n\t}", "public function getResponseContent(): string\n {\n return $this->responseContent;\n }", "protected final function getResponse()\n {\n $this->response = \n $this->communicator->getResponse($this->buildCommand());\n }", "public function getResponse()\n {\n return $this->result->getResponse();\n }", "public function getRawResponse(): ?string {\n return $this->rawResponse;\n }", "public function getRawResponse() : \\Aws\\Result { return $this->m_rawResponse; }", "public function getRawResponse() : \\Aws\\Result { return $this->m_rawResponse; }", "public function getResponse ()\n {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->getnetResponse;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n\t\t{\n\t\t\treturn $this->getHeader( \"response\" );\n\t\t}", "public function getLastRawResponse()\n\t{\n\t\treturn $this->rawResponse;\n\t}", "function getResponse() {\n\t\treturn $this->Response;\n\t}", "public function getRawResponse(): ?string\n {\n return $this->rawResponse;\n }", "private function getResponse() {\n $this->response['status_code'] = $this->status->getStatusCode();\n $this->response['reason_phrase'] = $this->status->getReasonPhrase();\n \n $this->readHeaders();\n }", "public function getResponse()\n\t{\n\t\treturn $this->response;\n\t}", "public function getResponse() {\n\t\treturn $this->response;\n\t}", "public function getResponse()\r\n {\r\n return $this->response;\r\n }", "protected function getResponse()\n {\n return $this->response;\n }", "function getResponse() {\n\t\treturn $this->m_response;\n\t}", "public function getResponse()\n\t{\n\t\treturn array($this->_code, join(\"\\n\", $this->_arguments));\n\t}", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "#[Pure]\n public function getRawResponseMessage() {}", "public function getResponse()\n {\n return $this->get('response');\n }", "public function getResponse()\n {\n return $this->get('response');\n }", "public function getResponse()\r\n\t{\r\n\t\treturn $this -> response;\r\n\t}", "public function getBody()\n {\n return $this->response;\n }", "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "public function getBody()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\treturn 'Trying to fetch response body for a pending request.';\n\t\t}\n\t\treturn $this->response_body;\n\t}", "public function read()\n {\n return $this->response;\n }", "public function getResponse() {\n return parent::getResponse();\n }", "public function & GetResponse ();", "protected function getResponse()\n {\n return $this->response;\n }", "public function rawContent() {\n\t\treturn $this->sw_request->rawContent();\n\t}", "protected function getResponse(): Response\n {\n return new Response(fopen('data://text/plain,', 'rb'), 200);\n }", "public function getResponse() {\n return $this->_response;\n }", "public function getResponse()\n\t{\n $this->send();\n if ( $this->hasError() ) {\n \treturn $this->getError();\n }\n return $this->response;\n\t}", "public function getResponseBody()\n {\n return $this->responseBody; \n }", "function getresp()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = \"\";\r\n\t\t$res = fread($this->_socket, 8000);\r\n\t\t preg_match_all('/^\\d{3}/m', $res, $response);\r\n\t\t/*do {\r\n \t\t$res = fgets($this->_socket, 512);\r\n \t\t$response .= $res;\r\n \t} while (substr($res, 3, 1) != \" \");\r\n \t*/\r\n\t\t\r\n \t//$this->debug(str_replace(\"\\r\\n\", \"\\n\", $response));\r\n \t$this->debug(str_replace(\"\\r\\n\", \"\\n\", $res));\r\n \treturn $response[0];\r\n }", "public function getResponse()\n {\n return $this->_response;\n }", "public function getResponse()\n {\n return $this->_response;\n }", "public function getResponse()\n {\n return $this->_response;\n }", "public function getResponse() {\n\t}", "public function getResponse(){\n \n return $this->response;\n \n }", "public function get_response()\n {\n return $this->response; \n }" ]
[ "0.7950697", "0.77623415", "0.74395007", "0.74382854", "0.7362586", "0.73286855", "0.7291753", "0.7151916", "0.7125033", "0.71203494", "0.70840853", "0.7046797", "0.7006738", "0.6948402", "0.6948402", "0.6948402", "0.6948402", "0.6948402", "0.6948402", "0.6948402", "0.6948402", "0.6948402", "0.6948402", "0.6948402", "0.6866517", "0.6848327", "0.68462574", "0.68097365", "0.68097365", "0.6784565", "0.6764729", "0.67337596", "0.6732238", "0.67259127", "0.6680974", "0.6680974", "0.6679058", "0.6675214", "0.6675214", "0.6675214", "0.66689926", "0.66630304", "0.6648301", "0.66343254", "0.66332996", "0.66292596", "0.6611864", "0.66074026", "0.6598727", "0.6598122", "0.6592544", "0.6589664", "0.65755343", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.6571688", "0.65681934", "0.65681934", "0.65681934", "0.65681934", "0.65607935", "0.6557777", "0.6557777", "0.6551822", "0.6539022", "0.6525119", "0.6525119", "0.6521706", "0.6520546", "0.6512859", "0.65110993", "0.65049756", "0.64970285", "0.649699", "0.6494269", "0.6487116", "0.6481313", "0.6478699", "0.6478358", "0.6478358", "0.6478358", "0.64745706", "0.646363", "0.64510506" ]
0.7579191
2
Get the request status
public function status() { $obj->number = $this->status_code; $obj->msg = $this->status_msg; return $obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatus() {\n return isset($this->data['request']['status']) ? $this->data['request']['status'] : null;\n }", "public function status() {\r\n\t\treturn self::request(self::HTTP_GET, 'status');\r\n\t}", "public function GetLastRequestStatus() { return self::$status; }", "public function getStatus()\n {\n return $this->_makeCall('status');\n }", "public function status()\n {\n return $this->UserAPI->request_status_check();\n }", "public static function getStatus() {\n\t\treturn http_response_code();\n\t}", "public function getServiceStatus($request);", "public function getStatus()\n {\n return $this->getParameter('status');\n }", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus(){\n return $this->getParameter('status');\n }", "public function get_status() {\n return $this->status;\n }", "public function getResponseStatus()\n\t\t{\n\t\t\treturn $this->getHeader( \"status\" );\n\t\t}", "public function get_filtered_status() {\n\n\t\tif ( ! isset( $_REQUEST['status'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\treturn false;\n\t\t}\n\n\t\treturn intval( $_REQUEST['status'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t}", "public function _getStatus() {\n\t\treturn $this->_status;\n\t}", "public function get_status() {\n return $this->_status;\n }", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "public function status() {\n\t\treturn $this->_status;\n\t}", "function get_status() {\n return $this->status;\n }", "public function getStatus()\r\n\t\t{\r\n\t\t\treturn $this->status;\r\n\t\t}", "public function apiStatus(): string\n {\n return $this->request('apiStatus', 'GET');\n }", "public function status()\n {\n return $this->_status;\n }", "public function getStatus() {\n return $this->_status;\n }", "public function status()\n {\n return $this->status;\n }", "public function getStatus()\r\n\t{\r\n\t\treturn $this->_status;\r\n\t}", "public function getStatus() {\n\t\treturn $this->status;\n\t}", "public function getStatus() {\n\t\treturn $this->status;\n\t}", "public function getStatus() \n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus() \n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n {\n return $this->_status;\n }", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status;\n\t}", "public function getStatus()\n\t{\n\t\treturn $this->status; \n\n\t}", "public function getStatus() {\n return $this->status;\n }", "public function getStatus()\n {\n $rtn = $this->data['status'];\n\n return $rtn;\n }", "public function status()\n {\n $response = $this->call(Request::METHOD_GET, '/api/v1/status');\n return $response->getApiData();\n }", "public function status()\n {\n return $this->response->getStatusCode();\n }", "public function getStatus()\n {\n \n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }", "public function getStatus()\n {\n return $this->status;\n }" ]
[ "0.80751723", "0.7991346", "0.76163906", "0.74860024", "0.7441684", "0.73519826", "0.7349747", "0.7328504", "0.72239643", "0.72239643", "0.72239643", "0.72239643", "0.72239643", "0.72239643", "0.72239643", "0.72239643", "0.72239643", "0.72239643", "0.720805", "0.72053176", "0.7203505", "0.7169588", "0.71564275", "0.7145465", "0.71119434", "0.71119434", "0.7104481", "0.71036464", "0.71001935", "0.7090376", "0.7078923", "0.7071532", "0.7070011", "0.70638025", "0.7060387", "0.7060387", "0.7055023", "0.7055023", "0.70526826", "0.70526826", "0.70526826", "0.70503277", "0.70503277", "0.70503277", "0.70503277", "0.7049534", "0.70414144", "0.7039722", "0.703871", "0.70371634", "0.70344967", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624", "0.7033624" ]
0.0
-1
Set wether the client should follow the server redirects or not
public function followRedirects($b, $n = NULL) { $this->follow_redirects = $b == true; if (! is_null ( $n ) && is_numeric ( $n )) $this->max_redirects = ( integer ) $n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function redirectsAreNotFollowedIfSwitchedOff() {\n\t\t$this->browser->setFollowRedirects(FALSE);\n\t\t$response = $this->browser->request('http://localhost/test/http/redirecting');\n\t\t$this->assertNotContains('arrived.', $response->getContent());\n\t\t$this->assertEquals(303, $response->getStatusCode());\n\t\t$this->assertEquals('http://localhost/index.php/test/http/redirecting/tohere', $response->getHeader('Location'));\n\t}", "public function disableRedirects() {\n\t\t$this->autoFollow = FALSE;\n\t}", "function caSetRedirect($ps_url) {\n\t\tglobal $g_response;\n\t\tif(!($g_response instanceof ResponseHTTP)) { return false; }\n\n\t\t$g_response->setRedirect($ps_url);\n\t\treturn true;\n\t}", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "protected function followRedirect()\n\t\t{\n\t\t\tif (!$this->followRedirect)\n\t\t\t\treturn false; /* disabled */\n\t\t\tif (!isset($this->responseHeaders['Location']) || !is_string($this->responseHeaders['Location'])) {\n\t\t\t\tSERIA_Base::debug('HTTP protocol violation: No location header with response code: '.$this->responseCode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$redirectPoint = $this->url;\n\t\t\t$location = $this->responseHeaders['Location'];\n\n\t\t\tif(strpos($location, '://')===false)\n\t\t\t{ // handling illegal redirects (Location: /path)\n\t\t\t\t$pi = parse_url($this->url);\n\t\t\t\t$location = $pi['scheme'].'://'.$pi['host'].$location;\n\t\t\t}\n\n\t\t\tif ($this->responseCode == 301 || $this->responseCode == 307) {\n\t\t\t\t/*\n\t\t\t\t * Check whether this is a post request:\n\t\t\t\t */\n\t\t\t\tif (isset($this->currentRequest['postFields']) && $this->currentRequest['postFields'])\n\t\t\t\t\t$post = $this->currentRequest['postFields'];\n\t\t\t\telse {\n\t\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t\t$post = true;\n\t\t\t\t\telse\n\t\t\t\t\t\t$post = false;\n\t\t\t\t}\n\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t$postFiles = $this->currentRequest['postFiles'];\n\t\t\t\telse\n\t\t\t\t\t$postFiles = array();\n\t\t\t} else {\n\t\t\t\t$post = false;\n\t\t\t\t$postFiles = array();\n\t\t\t}\n\t\t\t$connectToHost = false;\n\t\t\t$port = false;\n\t\t\t$from = parse_url($redirectPoint);\n\t\t\t$to = parse_url($location);\n\t\t\tif ($from['scheme'] == $to['scheme'] && $from['host'] == $to['host'] && $from['port'] == $to['port']) {\n\t\t\t\tif (isset($this->currentRequest['connectToHost']))\n\t\t\t\t\t$connectToHost = $this->currentRequest['connectToHost'];\n\t\t\t\t$port = $this->currentRequest['port'];\n\t\t\t}\n\t\t\t$this->navigateTo($location, $post, $connectToHost, $port);\n\t\t\tforeach ($postFiles as $name => $file)\n\t\t\t\t$this->postFile($name, $file);\n\t\t\tif ($this->responseCode == 301)\n\t\t\t\t$this->movedPermanently[$redirectPoint] = $location;\n\t\t\treturn true;\n\t\t}", "public static function isRedirect() {\n\t return in_array(self::getStatus(),[301,302,303,307,308]);\n\t}", "public function isRedirect()\n {\n return false;\n }", "public function enableRedirect() {\n $this->with_redirect = true;\n }", "public function isRedirect(): bool\n {\n $statusCode = $this->getStatusCode();\n\n return $statusCode >= 300 && $statusCode < 400;\n }", "public function isRedirection();", "public function hasRedirectHTTPStatus() { return ($this->status == 301 || $this->status == 302 || $this->status == 303); }", "public function mustRedirect();", "static function inSecure(){\n\t\tif(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != \"off\"){\n\t\t $redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\t\t header('HTTP/1.1 301 Moved Permanently');\n\t\t header('Location: ' . $redirect);\n\t\t exit();\n\t\t}\n\t}", "function force_ssl(){\n\tif(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == \"off\"){\n\t $redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\t header('HTTP/1.1 301 Moved Permanently');\n\t header('Location: ' . $redirect);\n\t exit();\n\t}\n}", "public static function setRedirectUponAuthentication(){\n\n /**\n * Make sure we redirect to the requested page\n */\n if(isset($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]) && !empty($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY])){\n CoreHeaders::setRedirect($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]);\n unset($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]);\n }else{\n CoreHeaders::setRedirect('/');\n }\n\n }", "public function sendRedirect() {}", "public function sslRedirect()\n {\n if (!$this->isSecure()) {\n $redirect = 'https://' . $this->server['HTTP_HOST'] . $this->server['REQUEST_URI'];\n\n header('HTTP/1.1 301 Moved Permanently');\n header('Location: ' . $redirect);\n exit();\n }\n }", "public function enableRedirects($limit = 20) {\n\t\t$this->autoFollow = TRUE;\n\t\t$this->maxRedirects = $limit;\n\t}", "protected function sslRedirection()\n {\n return;\n }", "public function isRedirected()\n {\n return isset($this->server['REDIRECT_STATUS']) && $this->server['REDIRECT_STATUS'] == 200;\n }", "protected function checkRedirect() {}", "public function is_redirect()\n {\n }", "public function getIsRedirect()\n {\n return substr($this->_status, 0, 1) == '3';\n }", "protected function _initForceSSL() {\n\t\tif($_SERVER['SERVER_PORT'] != '443') {\n\t\t\theader('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t\t\texit();\n\t\t}\n\t}", "static function Secure(){\n\t\tif(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == \"off\"){\n\t\t $redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\t\t header('HTTP/1.1 301 Moved Permanently');\n\t\t header('Location: ' . $redirect);\n\t\t exit();\n\t\t}\n\t}", "function isHTTPRedirect($response){\n\t$statusCode = getStatusCode($response);\n\t$redirectCodes = array(\"300\", \"301\", \"302\", \"303\", \"307\");\n\n\tif($statusCode !== false && in_array($statusCode, $redirectCodes)){\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function isRedirect()\n {\n return $this->_isRedirect;\n }", "public function testRedirectPermanent(): void\n {\n $this->post('/tests_apps/redirect_to_permanent');\n $this->assertResponseSuccess();\n $this->assertResponseCode(301);\n }", "public function isRedirect()\r\n\t{\r\n\t\treturn $this->_isRedirect;\r\n\t}", "public function isRedirect()\n {\n return $this->getStatus() === static::SAGEPAY_STATUS_3DAUTH;\n }", "public function isRedirect(): bool\n {\n return $this->code >= 300 && $this->code < 400;\n }", "public function isTransparentRedirect()\n {\n return true;\n }", "protected function isValidRedirectStatus()\n {\n return (in_array($this->status, array(301, 302, 307)));\n }", "protected function shouldRedirect(): bool\n\t{\n\t\tif($this->session === null || $this->viewFactory === null || in_array($this->request->getMethod(), ['GET', 'HEAD']))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ($this->input === null || $this->input->shouldRedirect()) && $this->respondWithJson() === false && $this->respondWithXml() === false;\n\t}", "public function isRedirection(): bool\n {\n return $this->code >= CODE_BAD_REQUEST &&\n $this->code < CODE_INTERNAL_SERVER_ERROR;\n }", "public function testBug20561()\n {\n if ($this->isRedirectSupportDisabled()) {\n $this->markTestSkipped('Redirect support in cURL is disabled by safe_mode or open_basedir setting');\n\n } else {\n $this->request->setUrl($this->baseUrl . 'redirects.php?special=youtube')\n ->setConfig(array(\n 'follow_redirects' => true,\n 'ssl_verify_peer' => false\n ))\n ->setCookieJar(true);\n\n $this->request->send();\n $this->assertGreaterThan(0, count($this->request->getCookieJar()->getAll()));\n }\n }", "public function isRedirection() {\n return (3 === $this->getStatusClass());\n }", "function redirect($location = ''){\n $this->_redirect = true;\n $this->_redirect_location = $location;\n $this->_HTML = false;\n $this->_JSON = false;\n }", "public function redirection_do_nothing() {\n\t\t$this->can_log = false;\n\t\treturn true;\n\t}", "public function configure()\n {\n if ($_SERVER['SERVER_NAME'] == 'mazemod.org')\n {\n header('Location: http://www.mazemod.org');\n exit;\n }\n }", "public function isRedirect();", "public function redirectToSelf() {\n\n\t\t$protocol = (! empty ( $_SERVER ['HTTPS'] ) && $_SERVER ['HTTPS'] !== 'off' || $_SERVER ['SERVER_PORT'] == 443) ? 'https://' : 'http://';\n\t\theader ( 'Location: ' . $protocol . $_SERVER [\"HTTP_HOST\"] . $_SERVER [\"REQUEST_URI\"] );\n\t\texit ( \"Redirection: This should never be displayed\" );\n\t\n\t}", "public function isRedirect()\n {\n $codes = [\n static::STATUS_MOVED_PERMANENTLY,\n static::STATUS_FOUND,\n static::STATUS_SEE_OTHER,\n static::STATUS_TEMPORARY_REDIRECT,\n ];\n\n return (\n in_array($this->code, $codes) &&\n $this->getHeaderLine('Location')\n );\n }", "public function setNotFollow()\n {\n curl_setopt($this->ch, CURLOPT_AUTOREFERER, false);\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, false);\n\n return $this;\n }", "public function isRedirect()\n {\n return isset($this->data['Status']) && '3DAUTH' === $this->data['Status'];\n }", "public function setRedirectDocument($value) { $this->_redirectDocument = $value; }", "public function handle_redirection()\n {\n }", "public function isRedirect(): bool\n {\n return !empty($this->getRedirect());\n }", "public function setRedirect($url, $code = 302);", "public function redirect()\n {\n add_settings_field(\n 'redirect',\n apply_filters($this->plugin_name . 'label-redirect', esc_html__('Redirect', $this->plugin_name)),\n [$this->builder, 'checkbox'],\n $this->plugin_name,\n $this->plugin_name . '-general',\n [\n 'description' => 'Redirect requests for ' . get_site_url() . '/security.txt to ' . get_site_url() . '/.well-known/security.txt.',\n 'id' => 'redirect',\n 'class' => 'hide-when-disabled',\n 'value' => isset($this->options['redirect']) ? $this->options['redirect'] : false,\n ]\n );\n }", "public function setUrlGeneratorPolicy()\n {\n $policy = $this->app['config']->get('cms.linkPolicy', 'detect');\n\n switch (strtolower($policy)) {\n case 'force':\n $appUrl = $this->app['config']->get('app.url');\n $schema = \\Str::startsWith($appUrl, 'http://') ? 'http' : 'https';\n $this->app['url']->forceRootUrl($appUrl);\n $this->app['url']->forceScheme($schema);\n break;\n\n case 'insecure':\n $this->app['url']->forceScheme('http');\n break;\n\n case 'secure':\n $this->app['url']->forceScheme('https');\n break;\n }\n }", "private function ngrokSet(): bool\n {\n return env('MOLLIE_NGROK_REDIRECT', false) == true;\n }", "function forceSSL() {\r\tif(empty($_SERVER[\"HTTPS\"]) || $_SERVER[\"HTTPS\"] !== \"on\") {\r\t\theader(\"Location: https://\" . $_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]);\r\t\texit();\r\t}\r}", "protected function processRedirect() {}", "public function redirectsAreFollowed() {\n\t\t$response = $this->browser->request('http://localhost/test/http/redirecting');\n\t\t$this->assertEquals('arrived.', $response->getContent());\n\t}", "public function testPermRedirects()\n {\n $this->get('/php')->assertStatus(301);\n }", "public function testIfClientDoesNotLooseAuthenticationOnRedirect()\n {\n $user = 'username123';\n $password = 'password456';\n $encoded = Client::encodeAuthHeader($user, $password, Client::AUTH_BASIC);\n\n // set up two responses that simulate a redirection\n $testAdapter = new Test();\n $testAdapter->setResponse(\n 'HTTP/1.1 303 See Other' . \"\\r\\n\"\n . 'Location: http://www.example.org/part2' . \"\\r\\n\\r\\n\"\n . 'The URL of this page has changed.'\n );\n $testAdapter->addResponse(\n 'HTTP/1.1 200 OK' . \"\\r\\n\\r\\n\"\n . 'Welcome to this Website.'\n );\n\n // create client with HTTP basic authentication\n $client = new Client('http://www.example.org/part1', [\n 'adapter' => $testAdapter,\n 'maxredirects' => 1,\n ]);\n $client->setAuth($user, $password, Client::AUTH_BASIC);\n\n // do request\n $client->setMethod('GET')->send();\n\n // the last request should contain the Authorization header\n $this->assertStringContainsString($encoded, $client->getLastRawRequest());\n }", "public function isTargetRedirect()\n {\n if (('/' === substr($this->target, 0, 1)) ||\n ('http' === substr($this->target, 0, 4))) {\n return true;\n }\n return false;\n }", "function httpsRedirect()\n {\n if($_SERVER['HTTPS'] != \"on\")\n {\n $redirect = \"https://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n header(\"Location: $redirect\");\n }\n }", "public final function hasRedirects()\n {\n return isset($this->_header[self::HDR_LOCATION]);\n }", "function redirect_canonical($requested_url = \\null, $do_redirect = \\true)\n {\n }", "public function doRedirect() {\n if(is_null($this->redirect)) {\n return;\n }\n\n if(is_string($this->redirect)) {\n $this->setHeader(\"Location: \" . $this->redirect);\n }\n\n if(is_array($this->redirect)) {\n $url = '/?' . http_build_query($this->redirect);\n $this->setHeader(\"Location: \" . $url);\n }\n return;\n }", "public function testRedirectHttpServer(): void\n {\n $this->post('/tests_apps/redirect_to');\n $this->assertResponseCode(302);\n $this->assertHeader('X-Middleware', 'true');\n }", "abstract protected function redirect();", "function lms_load_request\t( $user, $redirect ) {\n\t\tif ( $redirect === true ):\n\t\t\theader ( 'Location: ' . $redirect . '' );\n\t\telse:\n\t\t\theader ( 'Location: ' .DOMAIN . $user . '' );\n\t\tendif;\n\t}", "public function redirectToExternalUrl() {}", "function redirect_https()\n {\n // redirect to https except bots\n // and only redirect to https if \n // - base_url is set to https and currently on http\n if(ENVIRONMENT === 'production')\n {\n $CrawlerDetect = new CrawlerDetect;\n // if it's not a bot/crawler\n if(!$CrawlerDetect->isCrawler()) \n {\n // check if request is http\n if (! (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ) \n {\n // currently on http connection\n // redirect only if base_url has https\n $is_https = explode(':', $this->config->item('base_url'))[0];\n if($is_https === 'https')\n {\n // simple redirect if non-sub-domain\n $redirect = \"https://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\n redirect($redirect);\n }\n }\n }\n }\n }", "public function fixHomeRedirect(){\n\n \t$check = $this->modx->getObject('modContextSetting',[\n 'key'=>'base_url',\n 'value:LIKE'=>'%'.$_GET[$this->modx->getOption('request_param_alias')].'%'\n ]);\n \n if($check){ //if new route is valid\n\n $siteStart = $this->modx->getObject('modContextSetting',[\n 'key' => 'site_start',\n 'context_key' => $check->get('context_key')\n ]);\n \n \n if($this->modx->getObject('modResource',$siteStart->get('value'))->get('published') == 1) \n $this->modx->sendRedirect($this->modx->makeUrl($siteStart->get('value')),['responseCode' => 'HTTP/1.1 301 Moved Permanently']);\n }\n }", "public function setRedirect($redirect) {\n\t\t$this->redirect = $redirect;\n\t}", "protected function setProxyAuthScheme() {}", "public function setRedirectUrl($url);", "public function test_circular_redirect_auth() {\n $this->resetAfterTest(true);\n $user = $this->getDataGenerator()->create_user();\n $this->setUser($user);\n\n // Spoof the referrer for the redirect check.\n $_SERVER['HTTP_REFERER'] = '/admin/tool/mfa/auth.php';\n $baseurl = new \\moodle_url('/my/naughty/page.php');\n\n // After a single check, we should redirect.\n $this->assertEquals(\\tool_mfa\\manager::REDIRECT,\n \\tool_mfa\\manager::should_require_mfa($baseurl, false));\n\n // Now hammer it up to the threshold to emulate a repeated force browse from auth.php\n for ($i = 0; $i < \\tool_mfa\\manager::REDIR_LOOP_THRESHOLD; $i++) {\n \\tool_mfa\\manager::should_require_mfa($baseurl, false);\n }\n\n // Now finally confirm that a 6th access attempt (after loop safety trigger) still redirects.\n $this->assertEquals(\\tool_mfa\\manager::REDIRECT,\n \\tool_mfa\\manager::should_require_mfa($baseurl, false));\n }", "private function setCacheHeadersForWpRedirect() : void {\n add_filter(\n 'wp_redirect_status',\n function ($status, $location) {\n if ($status === 302) {\n $this->disableCache();\n }\n\n return $status;\n },\n 10,\n 2\n );\n }", "public function handle_redirects() {\n global $CFG, $SESSION;\n require_once(__DIR__.'/../../signuplib.php');\n\n if(isset($SESSION->cancel) and $SESSION->cancel == 1) {\n $SESSION->cancel = 0;\n redirect($CFG->wwwroot);\n } elseif($this->page_number != convert_progressstring_to_progressnum($this->applicantprogress)) {\n force_signup_flow($this->page_number);\n }\n return true;\n }", "function redirect() {\n //header('Location: ' . $this->url_origin($_SERVER, false)); \n exit(0);\n}", "function ensureHTTPS()\r\n {\r\n if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== '' && $_SERVER['HTTPS'] !== 'off')\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n // Get current page url and query string\r\n $host = strlen($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];\r\n $uri = $_SERVER['REQUEST_URI'];\r\n\r\n // Redirect to the secure url \r\n redirectToURL(\"https://${host}${uri}\");\r\n }\r\n }", "public function setRedirect($redirect){\n $this->redirect = $redirect;\n }", "function setRedirectUri($uri, $code = Codes::HTTP_FOUND);", "public function isRedirect()\r\n {\r\n return $this->isSuccessful();\r\n }", "public function testHttpResponseRedirectRemoteUrl301(UnitTester $I)\n {\n $response = $this->getResponseObject();\n $response->resetHeaders();\n $response->redirect('http://google.com', true, 301);\n\n $expected = Headers::__set_state(\n [\n 'headers' => [\n 'Status' => '301 Moved Permanently',\n 'Location' => 'http://google.com',\n 'HTTP/1.1 301 Moved Permanently' => null,\n ],\n ]\n );\n $actual = $response->getHeaders();\n $I->assertEquals($expected, $actual);\n }", "function redirected(){ return strlen((string)$this->getLocation())>0; }", "static function Redirect($url,$permanently=false){\n\t\tif ($permanently === true) {\n\t\t\theader('HTTP/1.1 301 Moved Permanently'); // The Redirect will be cached by the browser\n\t\t}\n\t header('Location: ' . $url);\n\t exit();\n\t}", "private function _redirect ()\r\n {\r\n global $CALE_VIRTUALA_SERVER;\r\n \r\n setcookie(self::$_cookieCount, \"\", time() - 3600, \"/\");\r\n header(\"Location: \" . $CALE_VIRTUALA_SERVER);\r\n die();\r\n }", "public function testRedirect(): void\n {\n $this->post('/tests_apps/redirect_to');\n $this->assertResponseSuccess();\n $this->assertResponseCode(302);\n }", "private function handleRedirects($EcommResponse) {\n\t\t$nextopiasearch_options = Mage::getStoreConfig('nsearch_options');\n\t\t$REDIRECT_ON_ONE_MATCH = true;\n\t\tif (!empty($nextopiasearch_options['settings']['redirect_on_one_match'])) {\n\t\t\t$REDIRECT_ON_ONE_MATCH = $nextopiasearch_options['settings']['redirect_on_one_match'];\n\t\t}\n\t\t\n\t\t$merchandizing = $EcommResponse->getMerchandizing();\n\t\t$redirect_url = '';\n\t\tif (strpos($merchandizing, \"link:\") === 0) {\n\t\t\t$redirect_url = str_replace(\"link:\", \"\", $merchandizing);\n\t\t} else if ($REDIRECT_ON_ONE_MATCH && $EcommResponse->getResultsCount() === 1) {\n\t\t\t$redirect_url = $EcommResponse->getFirstProductUrl();\n\t\t}\n\t\t\n\t\tif (!empty($redirect_url)) {\n\t\t\theader(\"Location: $redirect_url\");\n\t\t\texit();\n\t\t}\t\n\t}", "public function hasRedirect()\n {\n return !empty($this->redirectUrl);\n }", "public function setWebsiteRedirect(){\n\t\t\n\t\t// Set the state and tell plugins.\n\t\t$this->setState('REDIRECTING');\n\t\t$this->notifyObservers();\n\t\t\n\t\t//Show success message on redirected to page\n\t\t$_SESSION['ERROR_TYPE'] = \"success\";\n\t\t$_SESSION['ERROR_MESSAGE'] = \"Website Data Saved Successfully\";\n\t\t\n\t\t//Go Redirect\n\t\t$this->setRedirect(\"index.php?system=GeneralSettings&page=edit\");\t\n\t}", "public static function secure() {\r\n\t\tif (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS'])==='on') return;\r\n\t\theader(\"Location: https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}\");\r\n }", "public function initializeRedirectUrlHandlers() {}", "function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}", "public function setRedirectCookie() {\n $cookie_name = \"redirectURL\";\n //sets a cookie to the value of current URL\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $cookie_value = $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $cookie_value = $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n\n setcookie($cookie_name, $cookie_value, time() + (86400 * 30), \"/\"); // expires in 30 days\n }", "public function __https()\n{\n\tif(strpos($_SERVER['HTTP_HOST'],'www') === false or !isset($_SERVER['HTTPS']))\n\t{\n\t\theader('Location: '._https);\n\t\texit(0);\n\t}\n}", "public function testHttp()\n {\n $request = Request::create('http://example.com/test');\n $response = $this->app->handle($request);\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue($response->isRedirect('https://example.com/test'));\n }", "public function setRedirectParams($value) { $this->_redirectParams = $value; }", "public function redirect();", "public function redirect();", "public function redirect();" ]
[ "0.7002679", "0.6954025", "0.654534", "0.6452268", "0.6452268", "0.6452268", "0.6452268", "0.64129025", "0.63723654", "0.63391715", "0.63081783", "0.6232422", "0.62266", "0.6199309", "0.6197309", "0.618166", "0.6134949", "0.6103013", "0.60705566", "0.6067812", "0.60384303", "0.6023751", "0.6011364", "0.600986", "0.6006393", "0.598405", "0.5969497", "0.59565276", "0.595475", "0.5930969", "0.5912178", "0.5897323", "0.589611", "0.5873293", "0.5873133", "0.5837088", "0.58193743", "0.58193463", "0.5815593", "0.57702595", "0.57649434", "0.5757395", "0.5755608", "0.57514447", "0.57511663", "0.5723526", "0.57188994", "0.5717886", "0.5700801", "0.5687981", "0.56824917", "0.5652569", "0.56388426", "0.5616586", "0.5589698", "0.5585236", "0.5585007", "0.55734897", "0.5566404", "0.55609643", "0.55403614", "0.5525408", "0.5498051", "0.5492278", "0.54908663", "0.54830796", "0.54801345", "0.5447662", "0.54321486", "0.5405374", "0.5402405", "0.53984314", "0.5378626", "0.53767425", "0.5374053", "0.53668725", "0.5364601", "0.53604966", "0.5359009", "0.5358503", "0.5349953", "0.5336101", "0.53270257", "0.53231764", "0.5322528", "0.5320224", "0.5298891", "0.5294487", "0.52934927", "0.5292126", "0.5285165", "0.5277457", "0.5264904", "0.526299", "0.52618474", "0.5254417", "0.5253917", "0.5249137", "0.5249137", "0.5249137" ]
0.5780647
39
Set the maximum number of redirects allowed
public function maxRedirects($n) { $this->max_redirects = $n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enableRedirects($limit = 20) {\n\t\t$this->autoFollow = TRUE;\n\t\t$this->maxRedirects = $limit;\n\t}", "public function getRedirectLimit()\n {\n return $this->redirectLimit;\n }", "public function setRedirectLimit($limit)\n {\n if (!is_int($limit)) {\n throw new InvalidArgumentException('redirectLimit must be an integer.');\n }\n\n if ($limit < 1) {\n throw new InvalidArgumentException('redirectLimit must be greater than or equal to one.');\n }\n\n $this->redirectLimit = $limit;\n\n return $this;\n }", "private function migrateLinksPerIndex() {\n\t\tif ( ! empty( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_max_posts'] ) ) {\n\t\t\t$value = intval( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_max_posts'] );\n\t\t\tif ( ! $value ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$value = $value > 50000 ? 50000 : $value;\n\t\t\taioseo()->options->sitemap->general->linksPerIndex = $value;\n\t\t}\n\t}", "public function followRedirects($b, $n = NULL) {\n\t\t$this->follow_redirects = $b == true;\n\t\tif (! is_null ( $n ) && is_numeric ( $n ))\n\t\t\t$this->max_redirects = ( integer ) $n;\n\t}", "private function autoRedirectToLastPage()\n {\n if($this->urlQueryStringName === NULL)\n {\n self::$registry->error->reportError('The Url Query String for Pagination is not defined yet, You can do it by using initURLQueryStringName() method.', __LINE__, __METHOD__, true);\n return 0;\n }\n \n if($this->currentPageNumber() > $this->totalPages)\n {\n $pageQueryStringNamePosition = array_search($this->urlQueryStringName, $this->URLQueryString);\n $this->URLQueryString[++$pageQueryStringNamePosition] = $this->totalPages;\n $finalQueryString = implode('/', $this->URLQueryString);\n self::$registry->request->go(null, null, $finalQueryString);\n }\n return;\n }", "public function setMaxConnections($cons)\n {\n if (function_exists('curl_multi_setopt')) {\n $this->_multi->setopt(CURLMOPT_MAXCONNECTS, $cons);\n }\n $this->_threshold = $cons;\n return $this;\n }", "public function setMaxSteps( $stepCount )\n {\n $this->maxStepCount = $stepCount;\n }", "public function setMaxTries($tries)\n {\n $this->maxTries = $tries;\n }", "function wp_sitemaps_get_max_urls($object_type)\n {\n }", "public function setMaxLength(int $max):void {\r\n\t\t$this->maxLength = $max;\r\n\t}", "public function setLimit($x) { $this->limit = $x; }", "public function set_limit($limit);", "function curl_exec_follow(/*resource*/ $ch, /*int*/ &$maxredirect = null) {\n\t$mr = $maxredirect === null ? 5 : intval($maxredirect);\n\tif (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) {\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, $mr > 0);\n\t\tcurl_setopt($ch, CURLOPT_MAXREDIRS, $mr);\n\t} else {\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n\t\tif ($mr > 0) {\n\t\t\t$newurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n\n\t\t\t$rch = curl_copy_handle($ch);\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Owncloud Bookmark Crawl\");\n\t\t\tcurl_setopt($rch, CURLOPT_HEADER, true);\n\t\t\tcurl_setopt($rch, CURLOPT_NOBODY, true);\n\t\t\tcurl_setopt($rch, CURLOPT_FORBID_REUSE, false);\n\t\t\tcurl_setopt($rch, CURLOPT_RETURNTRANSFER, true);\n\t\t\tdo {\n\t\t\t\tcurl_setopt($rch, CURLOPT_URL, $newurl);\n\t\t\t\t$header = curl_exec($rch);\n\t\t\t\tif (curl_errno($rch)) {\n\t\t\t\t\t$code = 0;\n\t\t\t\t} else {\n\t\t\t\t\t$code = curl_getinfo($rch, CURLINFO_HTTP_CODE);\n\t\t\t\t\tif ($code == 301 || $code == 302) {\n\t\t\t\t\t\tpreg_match('/Location:(.*?)\\n/', $header, $matches);\n\t\t\t\t\t\t$newurl = trim(array_pop($matches));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$code = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($code && --$mr);\n\t\t\tcurl_close($rch);\n\t\t\tif (!$mr) {\n\t\t\t\tif ($maxredirect === null) {\n\t\t\t\t\tOCP\\Util::writeLog(\n\t\t\t\t\t\t'bookmark',\n\t\t\t\t\t\t'Too many redirects. When following redirects, libcurl hit the maximum amount on bookmark',\n\t\t\t\t\t\tOCP\\Util::ERROR);\n\t\t\t\t} else {\n\t\t\t\t\t$maxredirect = 0;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $newurl);\n\t\t}\n\t}\n\treturn curl_exec($ch);\n}", "public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}", "public function SetMaxCount ($maxCount);", "public function set_limit($new_limit){\r\n $this->limit = $new_limit;\r\n }", "public function withMaxNumberOfPages(int $number): Crawler;", "public function setLimit(int $limit): void\n {\n $this->limit = $limit;\n }", "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "public function setLimit(int $limit): void\n {\n $this->_limit = $limit;\n }", "public function set_max_checked_feeds($max = 10)\n {\n }", "public function setMax( int $max ): void {\n\t\t\t$this->maximum = $max;\n\t\t}", "function setMaxPages(){ \n\t\t \n\t\t if($this->pages == \"\") \n\t\t {\n\t\t global $wp_query;\n\t\t $this->pages = $wp_query->max_num_pages;\n\t\t if(!$this->pages)\n\t\t {\n\t\t $this->pages = 1;\n\t\t }\n\t\t } \n\t\t\t return $this;\n\t}", "public function setLimit(int $limit): self;", "public function setMaxcount($count)\n {\n $this->maxCount = $count;\n }", "public function limit($limit)\n\t{\n\t\t$this->limit = (int) $limit;\n\t}", "private function setLimit($limit)\n {\n $this->limit = (int)$limit;\n }", "function Set_max_size($ServerName, $max_size){\n\t\tself::Run_flushctl_command($ServerName, \" set max_size \".$max_size);\n\t}", "public function disableRedirects() {\n\t\t$this->autoFollow = FALSE;\n\t}", "public function setMaxOpenHandles($maxOpenHandles) {}", "public function setLimit($limit)\r\n {\r\n $this->limit = intval($limit);\r\n }", "public function setLimit($limit) {\n $this->limit = (int)$limit;\n }", "public function limit($num)\n {\n return $this->set_option('limit', $num);\n }", "public static function getMaxRequests()\n\t{\n\t\treturn MHTTPD::$config['Server']['keep_alive_max_requests'];\n\t}", "function limitToSize($size) {\r\n $this->sizeLimit = $size;\r\n }", "public function setLimit($limit) {\n\t\t$this->limit = $limit;\n\t}", "function memory_limit_for_max_param($max_param)\n{\n $max = get_param_integer($max_param, null); // If making a large request and are an admin, raise PHP memory limit\n if (($max !== null) && ($max > 80) && (function_exists('has_privilege'))) {\n if (has_privilege(get_member(), 'remove_page_split')) {\n $shl = @ini_get('suhosin.memory_limit');\n if (($shl === false) || ($shl == '') || ($shl == '0')) {\n safe_ini_set('memory_limit', '128M');\n }\n }\n }\n}", "public function limit($max)\n {\n $this->limit = intval($max);\n return $this;\n }", "public function setPageLimit($number = null);", "public function setLimit($limit)\n {\n $this->limit = $limit;\n }", "public function init($timeout, $maxRedirects = CURLOPT_MAXREDIRS)\n {\n $this->timeout = $timeout;\n $this->maxRedirects = $maxRedirects;\n }", "public function maxTries() {\n\t\treturn 1;\n\t}", "public function setMaximumSessions($maximumSessions)\n {\n $this->maximumSessions = (int) $maximumSessions;\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setMaximumNumberOfTokens($maximum)\n {\n return $this->setOption('maximumnumberoftokens', $maximum);\n }", "public function setLimit(?int $limit): void\n {\n $this->limit['value'] = $limit;\n }", "public function initializeRedirectUrlHandlers() {}", "public function setNumCopies($numCopies) {}", "protected function limit()\n {\n if (count($this->clients) > $this->limit)\n {\n $this->log->info(\"Limit connection exceeded!\");\n\n $this->conn->send('Limit connection exceeded!');\n\n $this->conn->close();\n }\n }", "public static function curl_exec_follow($ch, &$maxredirect = null) {\n // us as a bot and don't let us do our job\n $user_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)\".\n \" Gecko/20041107 Firefox/1.0\";\n curl_setopt($ch, CURLOPT_USERAGENT, $user_agent );\n\n $mr = $maxredirect === null ? 5 : intval($maxredirect);\n\n if (filter_var(ini_get('open_basedir'), FILTER_VALIDATE_BOOLEAN) === false\n && filter_var(ini_get('safe_mode'), FILTER_VALIDATE_BOOLEAN) === false\n ) {\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $mr > 0);\n curl_setopt($ch, CURLOPT_MAXREDIRS, $mr);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n } else {\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n\n if ($mr > 0)\n {\n $original_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n $newurl = $original_url;\n\n $rch = curl_copy_handle($ch);\n\n curl_setopt($rch, CURLOPT_HEADER, true);\n curl_setopt($rch, CURLOPT_NOBODY, true);\n curl_setopt($rch, CURLOPT_FORBID_REUSE, false);\n do\n {\n curl_setopt($rch, CURLOPT_URL, $newurl);\n $header = curl_exec($rch);\n if (curl_errno($rch)) {\n $code = 0;\n } else {\n $code = curl_getinfo($rch, CURLINFO_HTTP_CODE);\n if ($code == 301 || $code == 302) {\n preg_match('/Location:(.*?)\\n/i', $header, $matches);\n $newurl = trim(array_pop($matches));\n\n // if no scheme is present then the new url is a\n // relative path and thus needs some extra care\n if(!preg_match(\"/^https?:/i\", $newurl)){\n $newurl = $original_url . $newurl;\n }\n } else {\n $code = 0;\n }\n }\n } while ($code && --$mr);\n\n curl_close($rch);\n\n if (!$mr)\n {\n if ($maxredirect === null)\n trigger_error('Too many redirects.', E_USER_WARNING);\n else\n $maxredirect = 0;\n\n return false;\n }\n curl_setopt($ch, CURLOPT_URL, $newurl);\n }\n }\n return curl_exec($ch);\n }", "public function setRedirectTinyUrlVisitCount(int $id, int $count): void\n {\n if(!filled($count)) {\n $udatedCount = 1; //first time visit to tinyUrl\n } \n else {\n $udatedCount = $count + 1;\n }\n self::where('id', $id)->update(array('url_visit' => $udatedCount));\n }", "public function limit(?int $limit): self;", "public function setMaxCount($s)\n {\n if (is_int($s) && $s >= 1 && $s <= 100) {\n $this->options['MaxCount'] = $s;\n } else {\n return false;\n }\n }", "private function setMaximumRecords($maximum){\n\t\t$this->maximumRecords = $maximum;\n\t}", "public function setPasswordLenghtMax($num) {\n if((is_numeric($num)) && (($this->password_lenghtMin==null) || ($this->password_lenghtMin<$num))) {\n $this->password_lenghtMax = $num;\n return $this->password_lenghtMax;\n }\n return false;\n }", "public function setLimit($limit)\n {\n if(Checker::isInt($limit, true, true, self::ERROR_INFO(__FUNCTION__)))\n {\n $this->limit = $limit;\n return true;\n }\n else return false;\n }", "public static function setGlobalMaxLength(int $maxLength):void {\r\n\t\tself::$globalMaxLength = $maxLength;\r\n\t}", "public function maxTries();", "public function getOverfillLimit()\n {\n return 20;\n }", "public function maxDownloads(?int $maxDownloads): self\n {\n $new = clone $this;\n $new->maxDownloads = $maxDownloads;\n\n return $new;\n }", "public function setMaxArguments($maxArguments)\n {\n $this->requireNotReady();\n\n $this->maxArgs = $maxArguments;\n\n return $this;\n }", "public function setRedirectParams($value) { $this->_redirectParams = $value; }", "public function setMaxLength($maxLength) {}", "private function setNumberOfPages(): void\n {\n $this->number_of_pages = (int)ceil($this->number_of_records / $this->per_page);\n }", "public function setMaxPagesToList($maxPagesToList)\n {\n $this->maxPagesToList = (int) $maxPagesToList;\n return $this;\n }", "public function setMaximumValue(int $maximumValue): void;", "function my_limit_archives( $args ) {\n $args['limit'] = 12;\n return $args;\n}", "public function test_circular_redirect_auth() {\n $this->resetAfterTest(true);\n $user = $this->getDataGenerator()->create_user();\n $this->setUser($user);\n\n // Spoof the referrer for the redirect check.\n $_SERVER['HTTP_REFERER'] = '/admin/tool/mfa/auth.php';\n $baseurl = new \\moodle_url('/my/naughty/page.php');\n\n // After a single check, we should redirect.\n $this->assertEquals(\\tool_mfa\\manager::REDIRECT,\n \\tool_mfa\\manager::should_require_mfa($baseurl, false));\n\n // Now hammer it up to the threshold to emulate a repeated force browse from auth.php\n for ($i = 0; $i < \\tool_mfa\\manager::REDIR_LOOP_THRESHOLD; $i++) {\n \\tool_mfa\\manager::should_require_mfa($baseurl, false);\n }\n\n // Now finally confirm that a 6th access attempt (after loop safety trigger) still redirects.\n $this->assertEquals(\\tool_mfa\\manager::REDIRECT,\n \\tool_mfa\\manager::should_require_mfa($baseurl, false));\n }", "function bump_request_timeout() {\n\t\treturn 60;\n\t}", "public function unsetLimit() {}", "public function setMaxJobs($maxJobs)\n\t{\n\t\t$this->maxJobs = $maxJobs;\n\t}", "public function redirectcount() {\n return $this->info['redirect_count'];\n }" ]
[ "0.70849794", "0.6958898", "0.6317599", "0.62477607", "0.60702306", "0.5721445", "0.57055944", "0.5700763", "0.5634027", "0.56243676", "0.55495536", "0.5543812", "0.55404437", "0.5523527", "0.5514875", "0.5504248", "0.548563", "0.54801774", "0.5478438", "0.544919", "0.544919", "0.5444532", "0.54412246", "0.54324335", "0.539472", "0.53859675", "0.538161", "0.5356358", "0.53500783", "0.532686", "0.53246593", "0.53173685", "0.53171295", "0.5299696", "0.5269249", "0.52546847", "0.52539563", "0.5241107", "0.52181494", "0.52153593", "0.52114147", "0.52036273", "0.52014506", "0.5199839", "0.5197065", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.5188593", "0.51769257", "0.5171004", "0.5168654", "0.51468253", "0.5137759", "0.5130285", "0.5111995", "0.51047945", "0.5093012", "0.5070593", "0.5070519", "0.5067922", "0.5046547", "0.5042698", "0.50365734", "0.5028385", "0.50240946", "0.50232685", "0.502155", "0.50205857", "0.5012779", "0.49965236", "0.49949044", "0.499428", "0.49935347", "0.49800178", "0.4979109", "0.49697268" ]
0.8102085
0
Set credentials for BASIC authentication
public function basicAuth($usr, $pass) { $this->auth_type = "basic"; $this->auth_login = true; $this->auth_user = $usr; $this->auth_pass = $pass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCredentials( $username, $password )\r\n\t{\r\n\t\t$hdrvalue = base64_encode( \"$username:$password\" );\r\n\t\t$this->addHeader( \"Authorization\", \"Basic $hdrvalue\" );\r\n\t}", "public function setBasicAuth()\n {\n $auth = $this->auth;\n\n if (null !== $auth['user']) {\n $this->mink->getSession()->setBasicAuth(\n $auth['user'],\n $auth['password']\n );\n }\n }", "public function setAuth($username, $password);", "function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }", "function set_auth_basic($username, $password)\n {\n \\Mutex::lock($this->mutex);\n $this->auth_basic_user = $username;\n $this->auth_basic_pass = $password;\n \\Mutex::unlock($this->mutex);\n }", "public function setCredentials($v)\n { return $this->set('credentials', $v); }", "public function prepareBasicAuth()\n {\n $authString = base64_encode( $this->options['username'] . ':' . $this->options['password'] );\n\n $this->options['headers']['Authorization'] = \"Basic {$authString}\";\n }", "public function setAuthorizeInfo($username, $password)\n {\n if ($username != null) { //The password might be blank\n curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($this->ch, CURLOPT_USERPWD, \"{$username}:{$password}\");\n }\n }", "public function setCredentials($username, $password) {\n assert('is_string($username) && is_string($password); // username & password need to be strings');\n $this->credentials = \"{$username}:{$password}\";\n }", "public function setAuth($username, $password)\n {\n $this->username = $username;\n $this->auth = 'Basic '.base64_encode($username.':'.$password);\n }", "abstract public function credentials();", "public function setAccessControlAllowCredentials(): void\n {\n $this->allowCredentials = \"true\";\n }", "function _set_basic_auth(&$app, &$c) {\n\t\t$u = $c->param('app.view_http.request.auth.username');\n\t\t$p = $c->param('app.view_http.request.auth.password');\n\t\tif ($u && $p)\n\t\t\t$this->_http->setBasicAuth($u, $p);\n\t}", "private function setCredentials()\n\t{\n\t\t$this->credentials['app_token'] = $this->settings_repo->getSiteSetting('facebook', 'app_token');\n\t\t$this->credentials['page_id'] = $this->settings_repo->getSiteSetting('facebook', 'page_id');\n\t}", "public function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }", "public function setCredentials($b64_user=\"\")\n\t{\t\n\t\t// It is possible to retrieve information form any user specified in here.\n\t\t// If no user is specified, the system will take the current one.\n\t\tif (empty($b64_user))\n\t\t{\n\t\t\tif (isset($_SESSION[\"USER\"]))\n\t\t\t{\n\t\t\t\t$this->curlObj->set_credentials($_SESSION[\"USER\"]);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->curlObj->set_credentials($b64_user);\n\t\t}\n\t}", "public function setAuthentication($credential);", "public function setSandboxUserCredentials()\n {\n $userCredentials = $this->getClass('UserCredentials');\n\n $userCredentials->setUsername( 'Siteowner' );\n $userCredentials->setPassword( 'apitest1234' );\n $userCredentials->setSiteIDs( array(-99) );\n\n $this->userCredentials = $userCredentials;\n }", "function set_object_credentials($credentials) {\n\t\t$this->host = \t$credentials['host'];\n\t\t$this->port = \t$credentials['port'];\n\t\t$this->dbName = $credentials['dbname'];\n\t\t$this->user = \t$credentials['user'];\n\t\t$this->passwd = $credentials['password'];\n\t}", "public function setCredentials(array $credentials);", "public function setAuthentication ($username, $password)\n {\n if (StringUtilities::isNullOrEmpty($username) || StringUtilities::isNullOrEmpty($password))\n {\n throw new \\InvalidArgumentException(\"Both the username and password must be non-empty strings.\");\n }\n\n curl_setopt_array($this->cURL, [\n CURLOPT_HTTPAUTH => CURLAUTH_BASIC,\n CURLOPT_USERPWD => $username . \":\" . $password\n ]);\n }", "public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}", "public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }", "function http_auth_headers() {\n\t\tif($this->http_user || $this->http_pass):\n\t\t\t$this->http_headers_add('Authorization', \" Basic \".base64_encode($this->http_user . \":\" . $this->http_pass));\n\t\tendif;\n\t}", "public function setAuth($user, $password) {\n\t\t$this->basicAuthUser = $user;\n\t\t$this->basicAuthPassword = $password;\n\t}", "abstract public function getCredentials();", "public function setAuthenticateHeader()\n {\n $response = \\Yii::$app->response;\n $response->getHeaders()->set('WWW-Authenticate', \"Basic realm=\\\"{$this->realm}\\\"\");\n }", "public function setAuth($username, $password = null)\n {\n if ($username) {\n $this->optionManager->set(['HTTPAUTH' => CURLAUTH_BASIC, 'USERPWD', (string) $username . ':' . (string) $password]); \n }\n \n return $this;\n }", "public function init_credentials()\n\t{\n\t\tif($this->get_session('admin') != null)\n\t\t{\n\t\t\t$this->credentials['admin'] \t\t\t= $this->get_session('admin');\n\t\t\t$this->credentials['grupo_admin'] \t\t= $this->get_session('admin_grupo');\n\t\t\t$this->credentials['permissoes_admin'] \t= $this->get_session('admin_permissoes');\n\t\t\t\n\t\t\t$this->credentials['workspace_id'] \t\t= $this->get_session('workspace_id');\n\t\t\t$this->credentials['workspace_nome']\t= $this->get_session('workspace_nome');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->credentials = null;\n\t\t}\n\t}", "public function setApiCredentials($credentials) {\n\t\t$secure = (isset($credentials['secure'])) ? $credentials['secure'] : true;\n\t\t$this->api_url = $secure ? 'https://' : 'http://';\n\t\t$this->api_url .= $credentials['api_domain'] . '/@api/deki/';\n\n\t\t$this->api_username = (!empty($credentials['api_username'])) ? $credentials['api_username'] : '';\n\t\t$this->api_password = (!empty($credentials['api_password'])) ? $credentials['api_password'] : '';\n\t}", "public function setCredential($credential);", "public function authenticateCredential()\n {\n $sessionToken = $this->login();\n $this->credential->setSessionToken($sessionToken);\n }", "function change_db_credentials()\n\t{\n\t\tif ( !isset($_POST['credentials']) ) return;\n\t\t$credentials = file_get_contents('../credentials.php');\n\t\t$permittedVariables = array('DB_NAME','DB_USER','DB_PASSWORD');\n\t\tforeach ($_POST['credentials'] as $credName => $credVal)\n\t\t{\n\t\t\tif ( in_array($credName, $permittedVariables) )\n\t\t\t{\n\t\t\t\t//Sanitize the value before adding it.\n\t\t\t\t$credVal = str_replace(\"'\", '', $credVal);\n\t\t\t\t$credVal = str_replace(\"\\\"\", '', $credVal);\n\t\t\t\t$credentials = replace_credential($credentials, $credName, $credVal);\n\t\t\t}\n\t\t}\n\t\tfile_put_contents('../credentials.php', $credentials);\n\t}", "public function setCredentialsObject ($credentials) {\n $this->credentials = $credentials;\n }", "public static function setServiceCredentials()\n {\n // Get all bound services\n $allBoundServices = collect(json_decode(getenv('VCAP_SERVICES'), true));\n\n collect(self::$services)->each(function ($service) use ($allBoundServices) {\n\n // Determine whether we have the specific service key\n // among all bound services.\n if ($allBoundServices->has($service['service_key'])) {\n\n // Collect from bound services under this service key\n $services = collect($allBoundServices->get($service['service_key']));\n\n // Get the specific bound service\n $boundService = collect($services->where('name', $service['service_name'])->first());\n\n // Save each credentials in .env file\n collect($service['env_mapping'])->each(function ($envKey, $credentialKey) use ($boundService) {\n self::saveValueToEnv(\n $envKey,\n collect($boundService->get('credentials'))->get($credentialKey)\n );\n });\n }\n });\n }", "public function setBasicAuth(string $username, string $password): self\n {\n $this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n $this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);\n return $this;\n }", "public function setPandaAuth($value);", "public function setAuthenticationParams() {\n }", "public function __construct() {\n parent::__construct(\n self::USER_PHP_USERNAME, self::USER_PHP_CREDENTIALS_FILENAME);\n }", "public function setAuth(array $auth)\n {\n if (!empty($auth)) {\n if (array_key_exists('user', $auth) && array_key_exists('pass', $auth)) {\n $this->auth = $auth['user'].':'.$auth['pass'];\n curl_setopt($this->handler, CURLOPT_USERPWD, $this->auth);\n } else {\n $message = 'Cant assign the user and password for basic auth';\n throw new \\Exception($message);\n }\n }\n\n }", "public function setAuthenticated();", "public function _setRawCredentials()\n\t{\n\t\t/* Check if an API Key or Access Token has been passed as a parameter in the query string. Because of the\n\t\t\tobvious security issues with this, we do not recommend it, but sometimes it is the only choice */\n\t\tif ( isset( \\IPS\\Request::i()->key ) )\n\t\t{\n\t\t\t$this->rawApiKey = \\IPS\\Request::i()->key;\n\t\t\treturn;\n\t\t}\n\t\tif ( isset( \\IPS\\Request::i()->access_token ) and ( !\\IPS\\OAUTH_REQUIRES_HTTPS or \\IPS\\Request::i()->isSecure() ) )\n\t\t{\n\t\t\t$this->rawAccessToken = \\IPS\\Request::i()->access_token;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* Look for an API key in an automatically decoded HTTP Basic header */\n\t\tif ( isset( $_SERVER['PHP_AUTH_USER'] ) )\n\t\t{\n\t\t\t$this->rawApiKey = $_SERVER['PHP_AUTH_USER'];\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* If we're still here, try to find an Authorization header - start with $_SERVER... */\n\t\t$authorizationHeader = NULL;\n\t\tforeach ( $_SERVER as $k => $v )\n\t\t{\n\t\t\tif ( mb_substr( $k, -18 ) == 'HTTP_AUTHORIZATION' )\n\t\t\t{\n\t\t\t\t$authorizationHeader = $v;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* ...if we didn't find anything there, try apache_request_headers() */\n\t\tif ( !$authorizationHeader and \\function_exists('apache_request_headers') )\n\t\t{\n\t\t\t$headers = @apache_request_headers();\n\t\t\tif ( isset( $headers['Authorization'] ) )\n\t\t\t{\n\t\t\t\t$authorizationHeader = $headers['Authorization'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* If we managed to get one, set if it's an API Key or an Access Token */\n\t\tif ( $authorizationHeader )\n\t\t{\n\t\t\tif ( mb_substr( $authorizationHeader, 0, 7 ) === 'Bearer ' and ( !\\IPS\\OAUTH_REQUIRES_HTTPS or \\IPS\\Request::i()->isSecure() ) )\n\t\t\t{\n\t\t\t\t$this->rawAccessToken = mb_substr( $authorizationHeader, 7 );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$exploded = explode( ':', base64_decode( mb_substr( $authorizationHeader, 6 ) ) );\n\t\t\t\tif ( isset( $exploded[0] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->rawApiKey = $exploded[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function setCredentials($memcached, $credentials): void\n {\n [$username, $password] = $credentials;\n \n $memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);\n \n $memcached->setSaslAuthData($username, $password);\n }", "protected function setBasicAuthHeader(): void\n {\n $this->setRequestHeader(\n 'Authorization',\n 'Basic ' . base64_encode($this->appId . ':' . $this->appPassword)\n );\n }", "public function setCredentials($login, $password)\n {\n $this->_login = $login;\n $this->_password = $password;\n }", "private function setAuth($username, $password)\r\n {\r\n if (strlen($username) > 255 || strlen($password) > 255) {\r\n throw new InvalidArgumentException('Both username and password MUST NOT exceed a length of 255 bytes each');\r\n }\r\n $this->auth = pack('C2', 0x01, strlen($username)) . $username . pack('C', strlen($password)) . $password;\r\n }", "private function auth()\n {\n if (!$this->username)\n {\n throw new PhpOpenSIPsException(\"Missing username\");\n }\n \n if (!$this->password)\n {\n throw new PhpOpenSIPsException(\"Missing password\");\n }\n \n // realm\n $result = array();\n if (!preg_match('/^Proxy-Authenticate: .* realm=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpOpenSIPsException(\"Can't find realm in proxy-auth\");\n }\n \n $realm = $result[1];\n \n // nonce\n $result = array();\n if (!preg_match('/^Proxy-Authenticate: .* nonce=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpOpenSIPsException(\"Can't find nonce in proxy-auth\");\n }\n \n $nonce = $result[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n $res = md5($ha1.':'.$nonce.':'.$ha2);\n \n $this->auth = 'Proxy-Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n }", "public function __construct($credentials = array()) {\n $this->_credentials = $credentials;\n }", "private function getCredentials()\n {\n $basic = base64_encode(Settings::$username . ':' . Settings::$password);\n// $basic = base64_encode($this->user_id . ':' . $this->password);\n return $basic;\n }", "public function setCredentials($data)\n {\n $this->credentials = new Credentials($data);\n return $this;\n }", "protected function setCredentials($memcached, $credentials)\n {\n [$username, $password] = $credentials;\n\n $memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);\n\n $memcached->setSaslAuthData($username, $password);\n }", "public function setApiCredentials($credentials)\n {\n // Setting Default PayPal Mode If not set\n $this->setApiEnvironment($credentials);\n\n // Set API configuration for the PayPal provider\n $this->setApiProviderConfiguration($credentials);\n\n // Set default currency.\n $this->setCurrency($credentials['currency']);\n\n // Set default billing type\n $this->setBillingType($credentials['billing_type']);\n\n // Set Http Client configuration.\n $this->setHttpClientConfiguration();\n }", "public function setIdentifiers($username, $password);", "public function iSetBasicAuthenticationWithAnd($user, $password): void\n {\n $this->getSession()->setBasicAuth($user, $password);\n }", "public static function setAuth(&$ch, $auth)\n {\n curl_setopt($ch, CURLOPT_USERPWD, $auth);\n }", "private function credentials()\n {\n header('Access-Control-Allow-Credentials: ' . config('cors.credentials'));\n }", "function setAuth($user, $pass) {\n\t\t$this->authUser = $user;\n\t\t$this->authPass = $pass;\n\t}", "public function setHttpAuth(string $userName, string $password)\n {\n $this->httpAuth = array(\n 'username' => $userName,\n 'password' => $password,\n );\n }", "public function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n $this->token = '';\n $this->accessToken = '';\n return $this;\n }", "private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }", "public function setUp(): void\n {\n parent::setUp();\n\n $this->credentials = [\n 'email' => '[email protected]',\n 'password' => 'admin1234',\n ];\n }", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function test_authourization_fun( $vars ){\r\n\r\n if (isset($_GET['user']) && $_GET['user']){\r\n $_SERVER[\"PHP_AUTH_USER\"] = $_GET['user'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_USER\"] = 'NOUSER';\r\n }\r\n if (isset($_GET['pw']) && $_GET['pw']){\r\n $_SERVER[\"PHP_AUTH_PW\"] = $_GET['pw'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_PW\"] = 'ERRORPASSWORD';\r\n }\r\n}", "public function setPasswordCredentials($val)\n {\n $this->_propDict[\"passwordCredentials\"] = $val;\n return $this;\n }", "public function withCredentials($value) {\n return $this->setProperty('withCredentials', $value);\n }", "public function getCredential();", "protected function loadApplicationCredentials() {\n\t\t$appCredentials = AppConfigLoader::getInstance()->getConfig(ConfigLoader::CREDENTIALS,self::APP_CREDENTIALS_REQUIRED);\n\t\tif($this->isValidCredentialsConfig($appCredentials,self::APP_CREDENTIALS_REQUIRED)) {\n\t\t\t$this->assignCredentials($appCredentials);\n\t\t}\n\t}", "public function authenticate($username, $password)\n {\n curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($this->ch, CURLOPT_USERPWD, \"{$username}:{$password}\");\n return $this;\n }", "private function promptBasic() {\n $this->debugPrint('Prompting user (BASIC)...');\n\n\n header(\"WWW-Authenticate: Basic realm=\\\"{$this->realm}\\\"\");\n header('HTTP/1.0 401 Unauthorized');\n\n /* This is sent if the user cancels */\n if ($this->redirect_on_failure) {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_failure_url}?error=1\" />\n <body><h2>{$this->fail_text}</h2></body>\n </html>\nEOF;\n } else {\n echo \"<html><body><h2>{$this->fail_text}</h2></body></html>\";\n }\n exit();\n }", "public function credentials(string $user = '', string $password = '') : Pgdump\n {\n $this->user = $user;\n $this->password = $password;\n return $this;\n }", "public function setPassword(){\n\t}", "function assignHQFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.hqusers';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('hq_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "function authenticate() {}", "public function getS3Credentials()\n {\n foreach (\n [\n 'aws_access_key_id',\n 'aws_secret_access_key',\n 'aws_s3_bucket','aws_s3_region'\n ] as $var\n ) {\n if (isset($_POST[$var])) {\n putenv(strtoupper($var) . '=' . $_POST[$var]);\n }\n }\n }", "function wp_populate_basic_auth_from_authorization_header()\n {\n }", "private function login()\n {\n if (!isset($_SERVER['PHP_AUTH_USER']) || !$this->isAdmin()) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n exit;\n }\n }", "protected function loadModuleCredentials() {\n\t\t$moduleCredentials = ModuleConfigLoader::getInstance()->getConfig(ConfigLoader::CREDENTIALS,self::MODULE_CREDENTIALS_REQUIRED);\n\t\tif(is_array($moduleCredentials)) {\n\t\t\t$this->assignCredentials($moduleCredentials);\n\t\t}\t\t\n\t}", "public function eraseCredentials(): void\n {\n $this->password = '';\n }", "public function setCredentialsForSpecialUser(string $when, array $credentials)\n {\n $this->userData[$when] = $credentials;\n }", "private function auth()\n {\n if (!$this->username)\n {\n throw new PhpSIPException(\"Missing username\");\n }\n \n if (!$this->password)\n {\n throw new PhpSIPException(\"Missing password\");\n }\n \n // realm\n $result = [];\n if (!preg_match('/^Proxy-Authenticate: .* realm=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpSIPException(\"Can't find realm in proxy-auth\");\n }\n \n $realm = $result[1];\n \n // nonce\n $result = [];\n if (!preg_match('/^Proxy-Authenticate: .* nonce=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpSIPException(\"Can't find nonce in proxy-auth\");\n }\n \n $nonce = $result[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n $res = md5($ha1.':'.$nonce.':'.$ha2);\n \n $this->auth = 'Proxy-Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n }", "public function useBasicAuthorization($username, $password)\n\t{\n\t\t$this->options[self::OPTION_DEFAULT_HEADERS] = array_merge(\n\t\t\t$this->options[self::OPTION_DEFAULT_HEADERS],\n\t\t\t['Authorization' => 'Basic '.base64_encode(\"{$username}:{$password}\")]\n\t\t);\n\n\t\treturn $this;\n\t}", "function setDrupalDetails($username, $passwd=NULL, $db_src_path, $db_dst_path) {\n\n $this->admin_username = $username;\n $this->admin_passwd = $passwd ? : getenv('BEHAT_DRUPAL_ADMIN_PASSWD');\n $this->db_src_path = $db_src_path;\n $this->db_dst_path = $db_dst_path;\n }", "public function setAuthenticationDetails($username, $password, $hostname = null)\n {\n $this->username = $username;\n $this->password = $password;\n\n if (!empty($hostname)) {\n $this->hostName = $hostname;\n }\n\n return $this;\n }", "public function iAmAuthenticatingAs($username, $password)\n {\n $this->removeHeader('Authorization');\n $this->authorization = base64_encode($username . ':' . $password);\n $this->addHeader('Authorization', 'Basic ' . $this->authorization);\n }", "public function getCredentials()\n { return $this->get('credentials'); }", "private function prepareAuth()\n {\n $this->client->setHeaders(\n [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->zendeskHelper->getToken()\n ]\n );\n }", "public function eraseCredentials()\r\n {}", "abstract public function init($credentials = false);", "function credentials() {\n\t\t return array(PHPLM_DBHOST, PHPLM_DBUSER, PHPLM_DBPASS);\n\t\t}", "public function testParseCorrectCredentials()\n {\n\n // prepare the mock request instance\n $mockRequest = $this->getMock('AppserverIo\\Psr\\HttpMessage\\RequestInterface');\n $mockRequest->expects($this->once())\n ->method('getMethod')\n ->willReturn(Protocol::METHOD_POST);\n $mockRequest->expects($this->once())\n ->method('getHeader')\n ->with(Protocol::HEADER_AUTHORIZATION)\n ->willReturn($this->getValidAuthString());\n\n // prepare the mock response instance\n $mockResponse = $this->getMock('AppserverIo\\Psr\\HttpMessage\\ResponseInterface');\n\n $this->testClass->init($mockRequest, $mockResponse);\n $this->assertEquals('appserver', $this->testClass->getUsername());\n $this->assertEquals('appserver.i0', $this->testClass->getPassword());\n }", "public function eraseCredentials() {}", "public function eraseCredentials()\n {\n $this->plainPasword = null;\n }", "public function eraseCredentials()\n {}", "public function getServerCredentials()\n {\n if ($connections = $this->command->option('on')) {\n $this->connections->setActiveConnections($connections);\n }\n\n // Check for configured connections\n $availableConnections = $this->connections->getAvailableConnections();\n $activeConnections = $this->connections->getActiveConnections();\n\n // If we didn't set any connection, ask for them\n if (!$activeConnections->count() && empty($availableConnections)) {\n $connectionName = $this->ask('askWith', 'No connections have been set, please create one', 'production');\n $this->getConnectionCredentials($connectionName);\n\n return;\n } elseif (!$activeConnections->count()) {\n $available = array_keys($availableConnections);\n $connection = $this->ask('askWith', 'No default connection, pick one', head($available), $available);\n $this->connections->setActiveConnections($connection);\n }\n\n // Else loop through the connections and fill in credentials\n foreach ($activeConnections as $connection) {\n $connectionName = $connection->getConnectionKey()->name;\n\n $servers = Arr::get($availableConnections, $connectionName.'.servers');\n $servers = array_keys($servers);\n foreach ($servers as $server) {\n $this->getConnectionCredentials($connectionName, $server);\n }\n }\n }", "public function __construct($realm='lepton', $type=HttpAuthentication::AUTH_BASIC) {\n $this->type = $type;\n $this->realm = $realm;\n $this->username = $_SERVER['PHP_AUTH_USER'];\n $this->password = $_SERVER['PHP_AUTH_PW'];\n }", "public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }", "public function credentials_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $credentials = [\n 'client_id' => 'client-id',\n 'client_secret' => 'client-secret'\n ];\n\n // Act\n $returned = $service->setCredentials($credentials)->getCredentials();\n\n // Assert\n $this->assertEquals($credentials, $returned);\n }", "public function getCredentials()\n {\n $credentials = parent::getCredentials();\n\n unset($credentials['password']);\n\n return $credentials;\n }", "public function authentication() {\n return $this->username() . ':' . $this->password();\n }", "public function setUsername($username)\n {\n $this->basicAuth[\"username\"] = $username;\n return $this;\n }" ]
[ "0.72711897", "0.7198962", "0.6907388", "0.6809925", "0.67533785", "0.67444545", "0.66875315", "0.6669436", "0.6646401", "0.6615387", "0.6575222", "0.6570403", "0.6557372", "0.6486739", "0.64802563", "0.64278656", "0.63766", "0.6344832", "0.63150865", "0.63139427", "0.6279276", "0.62775666", "0.62396824", "0.6193171", "0.61906594", "0.61505276", "0.6115229", "0.6104066", "0.60635257", "0.60206455", "0.60039264", "0.6001039", "0.59840226", "0.5982181", "0.59624505", "0.59502596", "0.5939805", "0.5917017", "0.58990026", "0.58887553", "0.58221686", "0.5820012", "0.58110166", "0.58103424", "0.5790661", "0.5749104", "0.57332975", "0.5713952", "0.568139", "0.5658172", "0.56436706", "0.5641648", "0.56343573", "0.5632623", "0.5616367", "0.5615195", "0.5592986", "0.5583724", "0.5564199", "0.5539034", "0.5533527", "0.5532694", "0.55098194", "0.55090934", "0.5505323", "0.5491478", "0.54779476", "0.5462372", "0.54540867", "0.54429287", "0.5432094", "0.54268366", "0.5420369", "0.5405799", "0.54038614", "0.53987986", "0.5398762", "0.53954816", "0.5375595", "0.53700644", "0.5354814", "0.5347734", "0.53468645", "0.53461325", "0.5344623", "0.53419065", "0.53259665", "0.5315604", "0.53058344", "0.530447", "0.53040683", "0.52906173", "0.5288451", "0.52839386", "0.52799904", "0.5278094", "0.5271696", "0.52692497", "0.5267612", "0.5263154" ]
0.5753595
45
Set credentials for DIGEST authentication
public function digestAuth($usr, $pass = NULL) { $this->auth_type = "digest"; $this->auth_login = true; $this->auth_user = $usr; $this->auth_pass = $pass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authenticateCredential()\n {\n $sessionToken = $this->login();\n $this->credential->setSessionToken($sessionToken);\n }", "public function setAuthentication($credential);", "public function setAuth($username, $password);", "public function setCredentials($v)\n { return $this->set('credentials', $v); }", "function setCredentials( $username, $password )\r\n\t{\r\n\t\t$hdrvalue = base64_encode( \"$username:$password\" );\r\n\t\t$this->addHeader( \"Authorization\", \"Basic $hdrvalue\" );\r\n\t}", "function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }", "abstract public function credentials();", "public function setBasicAuth()\n {\n $auth = $this->auth;\n\n if (null !== $auth['user']) {\n $this->mink->getSession()->setBasicAuth(\n $auth['user'],\n $auth['password']\n );\n }\n }", "public function setCredentials($b64_user=\"\")\n\t{\t\n\t\t// It is possible to retrieve information form any user specified in here.\n\t\t// If no user is specified, the system will take the current one.\n\t\tif (empty($b64_user))\n\t\t{\n\t\t\tif (isset($_SESSION[\"USER\"]))\n\t\t\t{\n\t\t\t\t$this->curlObj->set_credentials($_SESSION[\"USER\"]);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->curlObj->set_credentials($b64_user);\n\t\t}\n\t}", "public function init_credentials()\n\t{\n\t\tif($this->get_session('admin') != null)\n\t\t{\n\t\t\t$this->credentials['admin'] \t\t\t= $this->get_session('admin');\n\t\t\t$this->credentials['grupo_admin'] \t\t= $this->get_session('admin_grupo');\n\t\t\t$this->credentials['permissoes_admin'] \t= $this->get_session('admin_permissoes');\n\t\t\t\n\t\t\t$this->credentials['workspace_id'] \t\t= $this->get_session('workspace_id');\n\t\t\t$this->credentials['workspace_nome']\t= $this->get_session('workspace_nome');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->credentials = null;\n\t\t}\n\t}", "public function setCredentials($username, $password) {\n assert('is_string($username) && is_string($password); // username & password need to be strings');\n $this->credentials = \"{$username}:{$password}\";\n }", "public function setCredential($credential);", "public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }", "private function authenticate()\n {\n $this->_validator->setCredentials($this->_user, $this->_pass);\n if ($this->_validator->authenticate()) {\n $this->_accepted = true;\n }\n }", "function set_object_credentials($credentials) {\n\t\t$this->host = \t$credentials['host'];\n\t\t$this->port = \t$credentials['port'];\n\t\t$this->dbName = $credentials['dbname'];\n\t\t$this->user = \t$credentials['user'];\n\t\t$this->passwd = $credentials['password'];\n\t}", "public function setApiCredentials($credentials) {\n\t\t$secure = (isset($credentials['secure'])) ? $credentials['secure'] : true;\n\t\t$this->api_url = $secure ? 'https://' : 'http://';\n\t\t$this->api_url .= $credentials['api_domain'] . '/@api/deki/';\n\n\t\t$this->api_username = (!empty($credentials['api_username'])) ? $credentials['api_username'] : '';\n\t\t$this->api_password = (!empty($credentials['api_password'])) ? $credentials['api_password'] : '';\n\t}", "public function setAuth($username, $password)\n {\n $this->username = $username;\n $this->auth = 'Basic '.base64_encode($username.':'.$password);\n }", "public function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }", "public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}", "public function setAuthorizeInfo($username, $password)\n {\n if ($username != null) { //The password might be blank\n curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($this->ch, CURLOPT_USERPWD, \"{$username}:{$password}\");\n }\n }", "public function setAuthenticationParams() {\n }", "public function setCredentials($data)\n {\n $this->credentials = new Credentials($data);\n return $this;\n }", "public function setCredentials(array $credentials);", "private function setCredentials()\n\t{\n\t\t$this->credentials['app_token'] = $this->settings_repo->getSiteSetting('facebook', 'app_token');\n\t\t$this->credentials['page_id'] = $this->settings_repo->getSiteSetting('facebook', 'page_id');\n\t}", "public function setPasswordCredentials($val)\n {\n $this->_propDict[\"passwordCredentials\"] = $val;\n return $this;\n }", "public function setAuth($username, $password = null)\n {\n if ($username) {\n $this->optionManager->set(['HTTPAUTH' => CURLAUTH_BASIC, 'USERPWD', (string) $username . ':' . (string) $password]); \n }\n \n return $this;\n }", "public function setAuth($user, $password) {\n\t\t$this->basicAuthUser = $user;\n\t\t$this->basicAuthPassword = $password;\n\t}", "abstract public function getCredentials();", "function set_auth_basic($username, $password)\n {\n \\Mutex::lock($this->mutex);\n $this->auth_basic_user = $username;\n $this->auth_basic_pass = $password;\n \\Mutex::unlock($this->mutex);\n }", "private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }", "public static function setAuth(&$ch, $auth)\n {\n curl_setopt($ch, CURLOPT_USERPWD, $auth);\n }", "public function testParseCorrectCredentials()\n {\n\n // prepare the mock request instance\n $mockRequest = $this->getMock('AppserverIo\\Psr\\HttpMessage\\RequestInterface');\n $mockRequest->expects($this->once())\n ->method('getMethod')\n ->willReturn(Protocol::METHOD_POST);\n $mockRequest->expects($this->once())\n ->method('getHeader')\n ->with(Protocol::HEADER_AUTHORIZATION)\n ->willReturn($this->getValidAuthString());\n\n // prepare the mock response instance\n $mockResponse = $this->getMock('AppserverIo\\Psr\\HttpMessage\\ResponseInterface');\n\n $this->testClass->init($mockRequest, $mockResponse);\n $this->assertEquals('appserver', $this->testClass->getUsername());\n $this->assertEquals('appserver.i0', $this->testClass->getPassword());\n }", "private function getAndSetAuthInfo() {\n #Authentication\n #$this->userIdentifier will be empty if the unser doesn't provide a credential\n #If in the future we implement API keys, then I suggest we only look for\n #the DN if the API key isn't presented.\n #Failure to authenticate is handled elsewhere\n if(is_null($this->userIdentifier)){\n $this->userIdentifier = Get_User_Principle_PI();\n $this->userIdentifierType = 'X509';\n }\n }", "public function getCredential();", "function authenticate() {}", "private function auth()\n {\n if (!$this->username)\n {\n throw new PhpSIPException(\"Missing username\");\n }\n \n if (!$this->password)\n {\n throw new PhpSIPException(\"Missing password\");\n }\n \n // realm\n $result = [];\n if (!preg_match('/^Proxy-Authenticate: .* realm=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpSIPException(\"Can't find realm in proxy-auth\");\n }\n \n $realm = $result[1];\n \n // nonce\n $result = [];\n if (!preg_match('/^Proxy-Authenticate: .* nonce=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpSIPException(\"Can't find nonce in proxy-auth\");\n }\n \n $nonce = $result[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n $res = md5($ha1.':'.$nonce.':'.$ha2);\n \n $this->auth = 'Proxy-Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n }", "private function auth()\n {\n if (!$this->username)\n {\n throw new PhpOpenSIPsException(\"Missing username\");\n }\n \n if (!$this->password)\n {\n throw new PhpOpenSIPsException(\"Missing password\");\n }\n \n // realm\n $result = array();\n if (!preg_match('/^Proxy-Authenticate: .* realm=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpOpenSIPsException(\"Can't find realm in proxy-auth\");\n }\n \n $realm = $result[1];\n \n // nonce\n $result = array();\n if (!preg_match('/^Proxy-Authenticate: .* nonce=\"(.*)\"/imU',$this->response, $result))\n {\n throw new PhpOpenSIPsException(\"Can't find nonce in proxy-auth\");\n }\n \n $nonce = $result[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n $res = md5($ha1.':'.$nonce.':'.$ha2);\n \n $this->auth = 'Proxy-Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n }", "function setAuth($user, $pass) {\n\t\t$this->authUser = $user;\n\t\t$this->authPass = $pass;\n\t}", "public function setCredentialsObject ($credentials) {\n $this->credentials = $credentials;\n }", "public function setAuthenticated();", "public function setSandboxUserCredentials()\n {\n $userCredentials = $this->getClass('UserCredentials');\n\n $userCredentials->setUsername( 'Siteowner' );\n $userCredentials->setPassword( 'apitest1234' );\n $userCredentials->setSiteIDs( array(-99) );\n\n $this->userCredentials = $userCredentials;\n }", "public function setAuthentication ($username, $password)\n {\n if (StringUtilities::isNullOrEmpty($username) || StringUtilities::isNullOrEmpty($password))\n {\n throw new \\InvalidArgumentException(\"Both the username and password must be non-empty strings.\");\n }\n\n curl_setopt_array($this->cURL, [\n CURLOPT_HTTPAUTH => CURLAUTH_BASIC,\n CURLOPT_USERPWD => $username . \":\" . $password\n ]);\n }", "public function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n $this->token = '';\n $this->accessToken = '';\n return $this;\n }", "public function setCredentials($login, $password)\n {\n $this->_login = $login;\n $this->_password = $password;\n }", "private function authenticate()\n {\n $this->client->authenticate($this->token, null, Client::AUTH_HTTP_TOKEN);\n }", "public function __construct($credentials = array()) {\n $this->_credentials = $credentials;\n }", "private function setAuth($username, $password)\r\n {\r\n if (strlen($username) > 255 || strlen($password) > 255) {\r\n throw new InvalidArgumentException('Both username and password MUST NOT exceed a length of 255 bytes each');\r\n }\r\n $this->auth = pack('C2', 0x01, strlen($username)) . $username . pack('C', strlen($password)) . $password;\r\n }", "private function _addCredentials()\n {\n $this->dom->addChild('Credentials')->addChild('AccountName', $this->_config['account']);\n // Authenticated -> Verify\n if (self::AUTHSTEP_PENDING == $this->authStep) {\n $this->dom->Credentials->addChild('UserName', $this->_config['username']);\n $this->dom->Credentials->addChild('Password', $this->_config['password']);\n if (empty($this->key) || empty($this->keyType)) {\n throw new Exception(\"Cannot generate credentials for Authenticated Request, missing key or keyType\");\n }\n if ($this->keyType == self::KEYTYPE_NODE) {\n $this->dom->Credentials->addChild('Key', $this->key);\n } elseif ($this->keyType == self::KEYTYPE_ATTRIBUTE) {\n $this->dom->Credentials->addAttribute('Key', $this->key);\n } else {\n throw new Exception(\"Cannot generate credentials for Authenticated Request, invalid keyType: \" . $this->keyType);\n }\n // Verified.\n } elseif (self::AUTHSTEP_ACTIVE == $this->authStep) {\n if (empty($this->activeKey)) {\n throw new Exception(\"Cannot generate credentials for Active Request, missing key\");\n }\n $this->dom->Credentials->addChild('Key', $this->activeKey);\n // Not Authenticated.\n } else {\n $this->dom->Credentials->addChild('UserName', $this->_config['username']);\n $this->dom->Credentials->addChild('Password', $this->_config['password']);\n }\n }", "public function setPassword(){\n\t}", "public function credentials(string $user = '', string $password = '') : Pgdump\n {\n $this->user = $user;\n $this->password = $password;\n return $this;\n }", "public function authenticate() {}", "public function authenticationWithValidNumericCharClassPassword() {}", "public function authenticationWithValidNumericCharClassPassword() {}", "public function authenticationWithValidNumericCharClassPassword() {}", "protected function setupCredential()\n {\n if (null === $this->credential) {\n throw new Exception\\RuntimeException(\n 'A credential value was not provided prior to authentication with CredentialRepository'\n . ' authentication adapter'\n );\n }\n\n $this->authenticationResultInfo = [\n 'code' => AuthenticationResult::FAILURE,\n 'identity' => $this->identity,\n 'messages' => []\n ];\n }", "public function setAuth(array $auth)\n {\n if (!empty($auth)) {\n if (array_key_exists('user', $auth) && array_key_exists('pass', $auth)) {\n $this->auth = $auth['user'].':'.$auth['pass'];\n curl_setopt($this->handler, CURLOPT_USERPWD, $this->auth);\n } else {\n $message = 'Cant assign the user and password for basic auth';\n throw new \\Exception($message);\n }\n }\n\n }", "protected function setCredentials($memcached, $credentials): void\n {\n [$username, $password] = $credentials;\n \n $memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);\n \n $memcached->setSaslAuthData($username, $password);\n }", "public function setIdentifiers($username, $password);", "public function prepareBasicAuth()\n {\n $authString = base64_encode( $this->options['username'] . ':' . $this->options['password'] );\n\n $this->options['headers']['Authorization'] = \"Basic {$authString}\";\n }", "public function authenticate($username, $password)\n {\n curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($this->ch, CURLOPT_USERPWD, \"{$username}:{$password}\");\n return $this;\n }", "function setPass($pwd) \n {\n\t\t\t$this->pass = $pwd;\n\t\t}", "public static function setServiceCredentials()\n {\n // Get all bound services\n $allBoundServices = collect(json_decode(getenv('VCAP_SERVICES'), true));\n\n collect(self::$services)->each(function ($service) use ($allBoundServices) {\n\n // Determine whether we have the specific service key\n // among all bound services.\n if ($allBoundServices->has($service['service_key'])) {\n\n // Collect from bound services under this service key\n $services = collect($allBoundServices->get($service['service_key']));\n\n // Get the specific bound service\n $boundService = collect($services->where('name', $service['service_name'])->first());\n\n // Save each credentials in .env file\n collect($service['env_mapping'])->each(function ($envKey, $credentialKey) use ($boundService) {\n self::saveValueToEnv(\n $envKey,\n collect($boundService->get('credentials'))->get($credentialKey)\n );\n });\n }\n });\n }", "public function setHttpAuth(string $userName, string $password)\n {\n $this->httpAuth = array(\n 'username' => $userName,\n 'password' => $password,\n );\n }", "protected function sendAuthRequest() : void\n {\n $message = \"PASSWORD \" . $this->id . \" \" . $this->password;\n $this->sendRequest($message);\n }", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function authenticationWithValidAlphaCharClassPassword() {}", "public function setPandaAuth($value);", "public function basicAuth($usr, $pass) {\n\t\t$this->auth_type = \"basic\";\n\t\t$this->auth_login = true;\n\t\t$this->auth_user = $usr;\n\t\t$this->auth_pass = $pass;\n\t}", "public function setCred($initiatorPassword) {\n\t\t// Set public key certificate based on environment\n\t\tif($this->environment == 'sandbox') {\n\t\t\t$pubkey = File::get(__DIR__.'/cert/sandbox.cer');\n\t\t} else {\n\t\t\t$pubkey = File::get(__DIR__.'/cert/production.cer');\n\t\t}\n\t\t\n\t\topenssl_public_encrypt($initiatorPassword, $output, $pubkey, OPENSSL_PKCS1_PADDING);\n $this->cred = base64_encode($output);\n\n return $this->cred;\n\t}", "private function loginToWigle() {\n\t\t$this->sendCurlRequest(self::WIGLE_LOGIN_URL,array(\"credential_0\"=>$this->user,\"credential_1\"=>$this->password));\n }", "public function setBasicAuth(string $username, string $password): self\n {\n $this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n $this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);\n return $this;\n }", "public function setAccessControlAllowCredentials(): void\n {\n $this->allowCredentials = \"true\";\n }", "private function getCredentials()\n {\n $basic = base64_encode(Settings::$username . ':' . Settings::$password);\n// $basic = base64_encode($this->user_id . ':' . $this->password);\n return $basic;\n }", "public function authenticate();", "public function authenticate();", "public function authenticate();", "function _set_basic_auth(&$app, &$c) {\n\t\t$u = $c->param('app.view_http.request.auth.username');\n\t\t$p = $c->param('app.view_http.request.auth.password');\n\t\tif ($u && $p)\n\t\t\t$this->_http->setBasicAuth($u, $p);\n\t}", "public function authenticate(ICredential $credential);", "function asignar_consulta($log,$pass){\n $this->login = $log;\n $this->password = $pass;\n }", "public static function authenticate(): void\n {\n try {\n $headers = [\n 'User-Agent' => 'albawebstudio-petfinderapi/1.0',\n 'Accept' => 'application/json',\n ];\n $data = [\n 'grant_type' => 'client_credentials',\n 'client_id' => self::$key,\n 'client_secret' => self::$secret,\n ];\n\n $config = [\n 'base_uri' => self::getEndpointUrl(),\n ];\n\n $client = new Client($config);\n\n $response = $client->request(self::POST, \"oauth2/token\", [\n 'headers' => $headers,\n 'json' => $data,\n ]);\n\n self::$accessToken = json_decode($response->getBody()->getContents(), true)['access_token'];\n Cache::add('petfinder_access_token', self::$accessToken, Carbon::now()->addHour());\n\n } catch (ClientException | GuzzleException $exception) {\n $logger = new Log();\n $logger->error($exception->getMessage());\n }\n }", "private function get_auth_cookie() {\r\n $postfields = http_build_query([\r\n 'username' => $this->username,\r\n 'password' => $this->password,\r\n 'csrfmiddlewaretoken' => $this->csrf_token\r\n ]);\r\n curl_setopt_array($this->curl_handle, [\r\n CURLOPT_URL => $this->auth_url,\r\n CURLOPT_COOKIEJAR => self::COOKIE_FILE,\r\n CURLOPT_COOKIEFILE => self::COOKIE_FILE,\r\n CURLOPT_POST\t => false,\r\n CURLOPT_POSTFIELDS => $postfields,\r\n CURLOPT_FAILONERROR => true,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_REFERER => $this->auth_url,\r\n CURLOPT_AUTOREFERER => true,\r\n CURLOPT_HTTPHEADER => ['User-Agent: '.self::USER_AGENT],\r\n //CURLOPT_VERBOSE => true,\r\n CURLOPT_RETURNTRANSFER => true\r\n ]);\r\n\r\n curl_exec($this->curl_handle);\r\n }", "abstract public function init($credentials = false);", "public function setPassword($value);", "public function authenticate() {\n }", "public function __construct() {\n parent::__construct(\n self::USER_PHP_USERNAME, self::USER_PHP_CREDENTIALS_FILENAME);\n }", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "protected function setCredentials($memcached, $credentials)\n {\n [$username, $password] = $credentials;\n\n $memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);\n\n $memcached->setSaslAuthData($username, $password);\n }", "private function authenticate()\n {\n self::assertValidAuthType();\n\n $this->client\n ->getEmitter()\n ->attach(new $this->authenticators[$this->authType]($this));\n }", "private function credentialByRequest()\n {\n $isSandboxed = $this->isSandboxed();\n\n $clientIdKey = $isSandboxed ? Storable::OPTION_CLIENT_ID_SANDBOX : Storable::OPTION_CLIENT_ID;\n $clientSecretKey = $isSandboxed ? Storable::OPTION_SECRET_ID_SANDBOX : Storable::OPTION_SECRET_ID;\n\n $clientIdKey = Storable::OPTION_PREFIX . $clientIdKey;\n $clientSecretKey = Storable::OPTION_PREFIX . $clientSecretKey;\n\n $clientId = (string)filter_input(INPUT_POST, $clientIdKey, FILTER_SANITIZE_STRING);\n $clientSecret = (string)filter_input(INPUT_POST, $clientSecretKey, FILTER_SANITIZE_STRING);\n\n return new Credential($clientId, $clientSecret);\n }", "public function authenticate()\n {\n \t$reports = $this->getEntityManager()->getRepository('Application\\Entity\\Report');\n \t$report = $reports->findOneBy(array(\n \t\t'password' => md5($this->password),\n \t\t'campaign' => $this->id,\n \t));\n \t\n \tif($report){\n \t\treturn new Result(Result::SUCCESS, 53);\n \t} else {\n \t\treturn new Result(Result::FAILURE_CREDENTIAL_INVALID, 53);\n \t}\n }", "protected function _authByUserPassword($userPassword = '') {}", "function initSmtpAuth(){\n $this->SMTPAuth = true;\n $this->Username = DOMAIN_USER;\n $this->Password = DOMAIN_PASS;\n }", "private function __setAuthUser()\n {\n $authUser = $this->request->session()->read('Auth');\n\n $accountType = 'FREE';\n if (!empty($authUser)) {\n $accountType = $authUser['User']['account_type'];\n }\n\n $this->set(compact('authUser', 'accountType'));\n }", "private function setLoginOption() {\r\n\t\t$this->options = array(\r\n\t\t\t'http' => array(\r\n\t\t\t\t'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n\t\t\t\t'method' => 'POST',\r\n\t\t\t\t'content' => http_build_query($this->data)\r\n\t\t\t),\r\n\t\t);\r\n\t}", "public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }", "function change_db_credentials()\n\t{\n\t\tif ( !isset($_POST['credentials']) ) return;\n\t\t$credentials = file_get_contents('../credentials.php');\n\t\t$permittedVariables = array('DB_NAME','DB_USER','DB_PASSWORD');\n\t\tforeach ($_POST['credentials'] as $credName => $credVal)\n\t\t{\n\t\t\tif ( in_array($credName, $permittedVariables) )\n\t\t\t{\n\t\t\t\t//Sanitize the value before adding it.\n\t\t\t\t$credVal = str_replace(\"'\", '', $credVal);\n\t\t\t\t$credVal = str_replace(\"\\\"\", '', $credVal);\n\t\t\t\t$credentials = replace_credential($credentials, $credName, $credVal);\n\t\t\t}\n\t\t}\n\t\tfile_put_contents('../credentials.php', $credentials);\n\t}", "public function setPassword() {\n\t\ttry {\n\t\t\t$data = json_decode(file_get_contents('php://input'), true);\n\t\t\t\n\t\t\tif (!isset($data['password'])) {\n\t\t\t\t$this->respondError('Missing input', 400);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$user = $this->getUserFromAccessToken($_GET['access_token']);\n\t\t\tif ($user == null) {\n\t\t\t\tthrow new Exception(\"Invalid access token.\");\n\t\t\t}\n\t\t\t\n\t\t\t$user->setPassword($data['password']);\n\t\t\t$this->dm->persist($user);\n\t\t\t$this->dm->flush();\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$this->respondError($e->getMessage() . \" in \" . $e->getFile() . \" on line \" . $e->getLine() . \"\\n\" . $e->getTraceAsString());\n\t\t}\n\t}", "function test_authourization_fun( $vars ){\r\n\r\n if (isset($_GET['user']) && $_GET['user']){\r\n $_SERVER[\"PHP_AUTH_USER\"] = $_GET['user'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_USER\"] = 'NOUSER';\r\n }\r\n if (isset($_GET['pw']) && $_GET['pw']){\r\n $_SERVER[\"PHP_AUTH_PW\"] = $_GET['pw'];\r\n }else{\r\n $_SERVER[\"PHP_AUTH_PW\"] = 'ERRORPASSWORD';\r\n }\r\n}", "function setAPIPassword($password)\n {\n $this->_password = $password;\n }" ]
[ "0.66356593", "0.6340862", "0.6337779", "0.63289064", "0.6269046", "0.6181508", "0.61452657", "0.6106876", "0.61060655", "0.6073771", "0.6039731", "0.60038793", "0.59895945", "0.591274", "0.59061074", "0.58854043", "0.5884073", "0.58337957", "0.58134234", "0.5811428", "0.57933336", "0.57583904", "0.57503116", "0.5750149", "0.574788", "0.57291704", "0.57125294", "0.571172", "0.56968087", "0.5653099", "0.5649564", "0.56152856", "0.5593443", "0.5592262", "0.554625", "0.5532063", "0.55255467", "0.5523163", "0.5522816", "0.55016124", "0.55008745", "0.54989314", "0.5497554", "0.5496508", "0.54779845", "0.54387254", "0.54335475", "0.5426759", "0.5423599", "0.54025906", "0.5394888", "0.5389139", "0.5389139", "0.5389139", "0.5388665", "0.5352254", "0.53464454", "0.5341567", "0.5325346", "0.5323212", "0.5313178", "0.53126603", "0.53027004", "0.52940047", "0.52849823", "0.52849823", "0.52849823", "0.52834725", "0.5278676", "0.52745277", "0.5272568", "0.52594167", "0.52549976", "0.52461874", "0.52451324", "0.52451324", "0.52451324", "0.5222218", "0.52103627", "0.52053106", "0.5199365", "0.5183238", "0.51825035", "0.51822615", "0.51734596", "0.517287", "0.5163313", "0.5160723", "0.51559967", "0.5153466", "0.5140676", "0.513584", "0.513484", "0.5124069", "0.51189476", "0.5117006", "0.5115584", "0.5106064", "0.5102645", "0.5097657" ]
0.58113194
20
Close the socket connection
public function disconnect() { @fclose ( $this->socket ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function close() {\r\n\t\tfclose($this->socket);\r\n\t}", "private function close()\n {\n socket_close($this->socket);\n }", "function close(){\n $this->disconnect();\n stream_socket_shutdown($this->socket, STREAM_SHUT_WR);\n }", "public function close(): void\n\t{\n\t\tif ($this->socket) {\n\t\t\t$this->socket->close();\n\t\t\t$this->socket = null;\n\t\t}\n\t}", "private function close_socket() {\n\t\tfclose($this->_socket);\n\t\tif ($this->_CBC) $this->_CBC->_openSRS_crypt();\t\t\t/* destructor */\n\t\t$this->_CBC\t\t\t\t= false;\n\t\t$this->_authenticated\t= false;\n\t\t$this->_socket\t\t\t= false;\n\t}", "protected function _disconnect() {\n\t\t@fclose($this->socket);\n\t\t$this->socket = NULL;\n\t}", "function close() {\n if ($this->ipcsock != NULL) { socket_close($this->ipcsock); }\n $this->ipcsock=NULL;\n }", "public function close()\n {\n return fclose($this->socket);\n }", "private function close() {\n\t\t$this->socketManager->removeSocketNotifier($this->notifier);\n\t\t$this->notifier = null;\n\t\tfclose($this->stream);\n\t}", "public function __destruct()\r\n\t{\r\n\t\tif (is_resource($this->socket))\r\n\t\t{\r\n\t\t\tfclose($this->socket);\r\n\t\t}\r\n\t}", "public function __destruct()\n {\n if (is_resource($this->socket))\n {\n socket_shutdown($this->socket);\n socket_close($this->socket);\n }\n }", "public function __destroy()\n {\n socket_close($this->socket);\n }", "public function close() {\n\t\t$this->send('__internal__', 'close'); //server side closing can be an issue, let the client do it\n\t}", "function shutdown() {\n\tsocket_close( $socket );\n}", "public function disconnect() : void\r\n {\r\n fclose($this->connection);\r\n }", "public function close()\r\n {\r\n $this->channel->close();\r\n $this->connect->close();\r\n }", "private function close() {\n\t\t// Close socket connection if keep alive isn't supported\n\t\tif (!$this->canKeepAlive()) {\n\t\t\t$this->client->close();\n\t\t} else {\n\t\t\t// Read away socket data to prepare for next request\n\t\t\tif (!$this->isEmptyBody) {\n\t\t\t\twhile ($this->readChunk() !== \"\") {\n\t\t\t\t\t// Empty body\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function closeConnection()\n {\n fclose($this->client);\n }", "public function close()\n {\n $this->connection->quit();\n unset($this->connection);\n $this->connection = null;\n }", "public function __destruct() {\n\t\t\tsocket_close($this->socket);\n\t\t}", "public static function closeSocket($socket)\n\t{\n\t\t$pname = stream_socket_get_name($socket, false);\n\t\tif (MHTTPD::$debug) {cecho(\"Closing socket: {$socket} ({$pname})\\n\");}\n\t\t@stream_socket_shutdown($socket, STREAM_SHUT_WR);\n\t\tusleep(500);\n\t\t@stream_socket_shutdown($socket, STREAM_SHUT_RD);\n\t\t@fclose($socket);\n\t}", "abstract function disconnect($socket);", "private function closeSocketResource($resource) {\n if (empty($resource)) {\n return;\n }\n\n socket_shutdown($resource);\n socket_close($resource);\n }", "function Disconnect() \r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Disconnect()\\n\";\r\n\t\tif( $this->socket )\r\n\t\t\tfclose( $this->socket );\r\n\t}", "function Close() \r\n{ \r\n//** no open cobnnection is available. Set error appropriately. \r\n\r\nif(!$this->isOpen()) \r\n$this->LastError = \"No connection available to close\"; \r\n\r\n//** an open connection is available to close. Close underlying socket. \r\n\r\nelse \r\n{ \r\nfclose($this->Socket); //** clsoe the connection. \r\n$this->Socket = TcpClientNoConnection; //** no connection now. \r\n} \r\nreturn !$this->isOpen(); //** return the close operation success. \r\n}", "public function disconnect() {\n if ($this->isConnected()) {\n fclose($this->handle);\n\n $this->handle = null;\n }\n }", "public function close()\n {\n curl_close($this->curl);\n $this->curl = null;\n $this->connected_to = array(null, null);\n }", "public function close()\n {\n $this->setError('');\n $this->server_caps = null;\n $this->helo_rply = null;\n if (is_resource($this->smtp_conn)) {\n // close the connection and cleanup\n fclose($this->smtp_conn);\n $this->smtp_conn = null; //Makes for cleaner serialization\n $this->edebug('Connection: closed', self::DEBUG_CONNECTION);\n }\n }", "function close_data_connection($sock_data)\r\n {\r\n \t$this->debug(\"Disconnected from remote host\\n\");\r\n \treturn fclose($sock_data);\r\n }", "private function close() {\r\n if (is_resource($this->socket)) {\r\n fclose($this->socket);\r\n return true;\r\n }\r\n return false;\r\n }", "function close() {\n\t\t$this->disconnect();\n\t}", "public function disconnect()\n {\n $this->client->close();\n }", "public function __destruct() {\n $this->closeSocketResource($this->listeningSocket);\n $this->closeSocketResource($this->communicationSocket);\n }", "public function closeConnection()\n {\n if ($this->connection) {\n $this->info(\"[closeConnection] - Close connection.\");\n @fclose($this->connection);\n }\n $this->connection = null;\n $this->status = false;\n }", "function close($delete = false) {\n\t\tif ($this->socket) {\n\t\t\tstream_socket_shutdown ( $this->socket, STREAM_SHUT_WR );\n\t\t}\n\t\tif ($delete)\n\t\t\t@unlink ( $this->nom_socket );\n\t\treturn true;\n\t}", "function close()\n {\n $res = $this->_close();\n $this->_connected = false;\n return $res;\n }", "protected function closeRemote()\n {\n if ($this->getRemote()) {\n Logs::writeLog(Logs::WARN, \"Closing connection\");\n $this->write($this->getRemote(), Functions::getClosing());\n fclose($this->getRemote());\n }\n $this->setRemote( null);\n }", "protected function disconnect()\r\n {\r\n $this->log( \"Closing connection and shutting down.\" );\r\n \r\n fclose( $this->_conn );\r\n exit;\r\n }", "private function closeConnection(){\n\t\t\t$this->connessione->close();\n\t\t}", "public function close()\n {\n unset($this->conn);\n }", "private function close_connection(){\n\t\t$this -> conn -> close();\n\t}", "public function close()\n {\n $this->transport->close();\n }", "function _close()\n\t{\n\t\tif (!$this->connection)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->_send_command('QUIT');\n\t}", "public function closeConnection()\n {\n }", "public function close() {\n $this->channel()->close();\n }", "protected function close()\n {\n if (!$this->_channel) return;\n $this->_channel->close();\n $this->_connection->close();\n }", "public function closeConnection() {\n\t\t$this->curl->close();\n\t}", "public function close()\n {\n if (fclose($this->stream)) {\n $this->stream = null;\n }\n }", "public function disconnect() \n\t{\n\t\tunset($this->connection);\n\t}", "public function closeConnection ()\n {\n $this->_connection = null;\n }", "public function closeConnection() {\n\t\t$this->conn = null;\n\t\tunset($this->conn);\n\t}", "public function closeConnection() {\n\t\t$this->conn = null;\n\t\tunset($this->conn);\n\t}", "public function close()\n {\n if ($this->closed)\n {\n return;\n }\n \n $this->closed = true;\n $this->writable = false;\n $this->data = '';\n \n if($this->handle)\n {\n $this->loop->removeCurlHandle($this->handle);\n $this->handle = null;\n }\n \n $this->emit('close');\n $this->removeAllListeners();\n }", "public function close()\n {\n $this->_client->endSession($this->_session);\n }", "public function __destruct()\r\n {\r\n if ( $this->state != self::STATE_NOT_CONNECTED )\r\n {\r\n $this->connection->sendData( 'QUIT' );\r\n $this->connection->getLine(); // discard\r\n $this->connection->close();\r\n }\r\n }", "private function mpowerDisconnect()\n {\n if (!fclose($this->_socket)) {\n //Would like to know why this failed but how will php tell me?\n throw new \\Exception(\n sprintf(\n \"[MPServer::mpowerDisconnect]Failed to disconnect from %s:%s.\" .\n \" Unfortunately the reason is unknown\",\n $this->_server, $this->_port\n )\n );\n }\n }", "function smtp_disconnect() \n {\t\n \tif ($this->_connection_state) {\n \t\t$this->_connection_state = false; \n $this->smtp_command(\"QUIT\");\n \t} \n $this->disconnect(); \n $this->_socket = socket_create($this->_domain ,$this->_type ,$this->_protocol); \n $this->_sock_buff = \"\";\n\t}", "function conn_close() \n {\n\t\t\tmysql_close($this->conn);\n\t\t\tunset($this->conn);\n\t\t\t$this->connectionStatus = false;\n\t\t}", "public function disconnect()\n\t{\n\t\t$this->_connection = null;\n\t}", "public function close()\n {\n $this->connection = null;\n }", "public function closeConnection() {\n if ($this->conn) {\n $this->log('Closing Connection');\n fclose(self::getInstance()->getConnection());\n $this->conn = null;\n exit();\n }\n }", "function disconnect ()\n {\n if ( $this->socket )\n {\n $this->writeFrame(new StompFrame('DISCONNECT'));\n }\n socket_shutdown($this->socket, 1);\n usleep(500);\n socket_shutdown($this->socket, 2);\n socket_close($this->socket);\n $this->socket = NULL;\n }", "public function __destructor(){\n $this->connect->close();\n }", "public function Disconnect () {\n $this->sendString('QUIT');\n\n fclose($this->pop_conn);\n }", "public function conn_close(){\n $this->conn = null;\n }", "public function closeConnection(){\r\n $this->_connections[$this->_activeConnection] = null;\r\n\t\tunset($this->_connections[$this->_activeConnection]);\r\n }", "public function closeConnection()\n\t{\n\t\t$this->_instance = null;\n\t}", "function close() {\r\n\t\t\tif ( $this->_conn != null ) {\r\n\t\t\t\t$this->_conn = null;\r\n\t\t\t\t@OCILogoff( $this->_conn );\r\n\t\t\t}\r\n\t\t}", "public function Close() {\n\t $this->error = null; // so there is no confusion\n\t $this->helo_rply = null;\n\t if(!empty($this->smtp_conn)) {\n\t // close the connection and cleanup\n\t fclose($this->smtp_conn);\n\t $this->smtp_conn = 0;\n\t }\n\t}", "public function closeConnection()\n {\n $this->conn = null;\n unset($this->conn);\n }", "public function close() {\n $this->stream->close();\n }", "abstract protected function closeConnection();", "protected function _close()\n\t{\n\t\t$this->connID->close();\n\t}", "function closedb(){\r\n\t\tif($this->socket)\r\n\t\t\t\r\n\t\t\tmysqli_close($this->socket);\r\n\t\t\t$this->connected = false;\r\n\t}", "public function disconnect(){\n\t\t$this->Connection = null;\n\t}", "private function close()\n\t{\n\t\tif ($this->memcache_connected)\n\t\t{\n\t\t\t$this->connection->close();\n\t\t\t$this->memcache_connected = false;\n\t\t}\n\t}", "public function __destruct()\n {\n if ($this->isConnected) {\n $this->close();\n }\n }", "public function closeConnection()\n \t{\n \t\t$this->connection = null;\n \t}", "public function closeConnection(): bool;", "private function close()\n {\n if ($this->stream) {\n $this->stream->close();\n }\n }", "public function disconnect() {\r\n\t\t//print_r( 'PhpseclibClient::disconnect()');\r\n\t\tif ($this->connected()) {\r\n\t\t\t$this->_disconnect();\r\n\t\t}\r\n\t}", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function closeConnection(){\n\t\tif($this->mConn != null){\n\t\t\t$this->mConn->close();\n\t\t\t$this->mConn = null;\n\t\t}\n\t}", "public function disconnect()\r\n {\r\n if ($this->connection->connect_error && $this->connection != null) {\r\n $this->connection->close();\r\n }\r\n $this->connection = null;\r\n }", "public function Close(){\n\n\t\t\tif($this->connected===true){\n\n\t\t\t\tswitch(strtoupper($this->_mode)){\n\t\t\t\t\tcase '-PDO':\n\t\t\t\t\t\tunset($this->connexion);\n\t\t\t\t\t\t$this->connected = false;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase '-MYSQL':\n\t\t\t\t\t\tmysql_close($this->connexion);\n\t\t\t\t\t\t$this->connected = false;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase '-MYSQLI':\n\t\t\t\t\t\t$this->connexion->close();\n\t\t\t\t\t\t$this->connected = false;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\n\t\t}", "public function disconnect()\n\t{\n\t\tself::$connected_client[self::$connection_params]->disconnect();\n\t\tself::$connected_client[self::$connection_params] = null;\n\t}", "public function shutdown()\n\t{\n\t\tif ( is_resource( $this->_stream ) )\n\t\t{\n\t\t\tfclose( $this->_stream );\n\t\t}\n\t}", "public function end(): void\n {\n if ($this->socket !== null) {\n // It seems like the server is closing this connection before responding, possibly?\n $ok = $this->writeCommand('END', '');\n\n if ($ok === 'OK') {\n $this->disconnect();\n }\n\n throw new FaktoryException('Unable to end connection');\n }\n }", "public function close()\n {\n if ($this->debug) {\n $this->debug_message('Closing TheTvdbApi connections.');\n }\n\n $this->request->close();\n }", "function socket_close($socket)\n{\n global $socketSpy;\n\n $socketSpy->socketCloseWasCalled($socket);\n}", "private function close_connection() {\n\t\t$this->conn->close();\n\t}", "public function disconnect()\n\t{\n\t\t$this->disconnectInternal();\n\t}", "public function closeConnection() {\n if (isset($this->connection)) {\n $this->connection->close();\n }\n }" ]
[ "0.85838604", "0.83940923", "0.83538824", "0.8192945", "0.78796244", "0.7734852", "0.76023644", "0.7538474", "0.7515936", "0.73868537", "0.7337231", "0.7300188", "0.7292262", "0.723318", "0.7176649", "0.7168965", "0.7161359", "0.71482223", "0.7094895", "0.7089002", "0.70423096", "0.7024737", "0.6976995", "0.69521904", "0.6909915", "0.68964076", "0.6895936", "0.68912596", "0.68863654", "0.6824497", "0.6809928", "0.6782231", "0.6751357", "0.6728235", "0.67184085", "0.6709709", "0.67060673", "0.66400355", "0.6623828", "0.66088367", "0.6582159", "0.65187746", "0.65168005", "0.65147305", "0.6502721", "0.6462906", "0.64425945", "0.6425942", "0.6418305", "0.64171034", "0.64170766", "0.64170766", "0.64053655", "0.6393977", "0.63923466", "0.6386034", "0.63849884", "0.6378366", "0.6373537", "0.63731134", "0.6367431", "0.63463205", "0.6328021", "0.6321674", "0.63143045", "0.63098997", "0.6301371", "0.6290066", "0.6284365", "0.6282675", "0.6273083", "0.62721235", "0.6271912", "0.6270766", "0.6265808", "0.6260609", "0.625797", "0.6254787", "0.6251748", "0.6244051", "0.6241025", "0.6205252", "0.6205252", "0.6205252", "0.6205252", "0.6205252", "0.6205252", "0.6205252", "0.6205252", "0.6203192", "0.6193028", "0.6192433", "0.61895263", "0.61865413", "0.6186464", "0.6185887", "0.6181197", "0.6166619", "0.61654055", "0.61647314" ]
0.799906
4
Delete all cookies from specified host
public function eraseCookies($host = NULL) { if (empty ( $host )) $host = $this->host; unset ( $this->cookies [$host] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n\t{\n\t\t$this->connection()->delete('cookies');\n\t}", "public function deleteAllCookies($path = NULL){\n\n return self::$oCRNRSTN_ENV->oCOOKIE_MGR->deleteAllCookies($path);\n\n }", "public function clearCookies() {\n return $this->command('clear_cookies');\n }", "function clearCookies(){\n\t\t$this->_HTTPCookies = array();\n\t}", "private function deleteFacebookCookies()\n\t{\n\t\tinclude 'config.php';\n\n\t\t$apiKey = $facebookSettings['appId'];\n\n\t\t$cookies = array('user', 'session_key', 'expires', 'ss');\n\t\tforeach ($cookies as $name) \n\t\t{\n\t\t\tsetcookie($apiKey . '_' . $name, false, time() - 3600);\n\t\t\tunset($_COOKIE[$apiKey . '_' . $name]);\n\t\t}\n\n\t\tsetcookie($apiKey, false, time() - 3600);\n\t\tunset($_COOKIE[$apiKey]); \n\t}", "public function iDestroyMyCookies() {\n $this->getSession()->reset();\n }", "function payswarm_clear_authority_host_cookie() {\n if(!headers_sent()) {\n global $_SERVER;\n $past = time() - 3600;\n setcookie('payswarm-authority-host', '', $past, '/');\n }\n}", "public function clearCookies()\n {\n $this->cookie_data = array();\n }", "public function clear()\n {\n $cookieScopePrefix = $this->cookieScopePrefix;\n $cookieScopePrefixLength = strlen($cookieScopePrefix);\n foreach ($this->cookies as $key => $value) {\n if (substr($key, 0, $cookieScopePrefixLength) === $cookieScopePrefix) {\n $this->removeObjectForKey($key);\n }\n }\n }", "public function clearCookies() {\n\t\t\t$this->_cookies = [];\n\t\t}", "function removeCookies() \r\n\t{\r\n\t\tif( $this->debug & DBGTRACE )\techo \"removeCookies() \\n\";\r\n\t\tunset( $this->requestHeaders[\"Cookie\"] );\r\n\t}", "public function cleanup() {\n foreach ($this->_cookies as $cookiefile) {\n unlink($cookiefile);\n }\n }", "public function clear_cookie()\n {\n }", "static function clearDuplicateCookies()\n {\n // If headers have already been sent, there's nothing we can do\n if (headers_sent()) {\n return;\n }\n\n $cookies = array();\n foreach (headers_list() as $header) {\n // Identify cookie headers\n if (strpos($header, 'Set-Cookie:') === 0) {\n $cookies[] = $header;\n }\n }\n // Removes all cookie headers, including duplicates\n header_remove('Set-Cookie');\n\n // Restore one copy of each cookie\n foreach(array_unique($cookies) as $cookie) {\n header($cookie, false);\n }\n }", "public function delete($key){\n $domain = ltrim($_SERVER['SERVER_NAME'], \"www.\");\n unset($_COOKIE[$key]);\n setcookie($key, \"\", -1, '/', $domain, $this->secured, $this->httpOnly);\n }", "public function delete()\n {\n if (isset($_COOKIE[$this->name])) {\n unset($_COOKIE[$this->name]);\n setcookie($this->name, '', time() - 3600);\n }\n }", "public static function deleteCookie(){\n func::runSession();\n setcookie('username', '', time() - 1, '/');\n setcookie('userid', '', time() - 1, '/');\n setcookie('token', '', time() - 1, '/');\n setcookie('serial', '', time() - 1, '/');\n session_destroy();\n }", "function _killFacebookCookies()\n\t{\n\t\t$apiKey = $this->getConfig()->getApiKey();\n\t\t// get name of the cookie\n\t\t$cookie = $this->getConfig()->getCookieName();\n\n\t\t$cookies = array('user', 'session_key', 'expires', 'ss');\n\t\tforeach ($cookies as $name) \n\t\t{\n\t\t\tsetcookie($apiKey . '_' . $name, false, time() - 3600);\n\t\t\tunset($_COOKIE[$apiKey . '_' . $name]);\n\t\t}\n\n\t\tsetcookie($apiKey, false, time() - 3600);\n\t\tunset($_COOKIE[$apiKey]); \n\t}", "function payswarm_clear_session_cookie() {\n if(!headers_sent()) {\n global $_SERVER;\n $past = time() - 3600;\n setcookie('payswarm-session', '', $past, '/');\n\n // clear authority host URL cookie as well\n payswarm_clear_authority_host_cookie();\n }\n}", "public function clearcookies() {\nif (isset($_COOKIE[\"islog_email\"]) && isset($_COOKIE[\"islog_pass\"]) && isset($_COOKIE[\"islog_id\"])) \n{\n//Destroy sessions\nunset($_SESSION['userSession']);\n //Destroy Cookies\nsetcookie(\"islog_email\", \"\", time()-86400 * 90);\nsetcookie(\"islog_pass\", \"\", time()-86400 * 90);\nsetcookie(\"islog_id\", \"\", time()-86400 * 90);\nheader(\"Location: logout.php\");\nexit;\nreturn;\n }\n}", "public static function destroyOtherBigCookies()\n {\n // size:783\n self::deleteCookie('CookieInformationConsent');\n // size:656\n self::deleteCookie('6c728b4e6162d41c424383edf7c912c1');\n // size:382 this seems to be crearted from gtm.\n self::deleteCookie('_pprv');\n }", "public static function unsetAllSessionOnSite() {\n session_unset();\n session_destroy();\n }", "function destroyCookies(){\r\n session_destroy(); //Destruim la sessio\r\n setcookie('apostesPagades', '', 1, \"/Betnat/php\"); //Destruim les cookies de les pagines on s'usen aquestes\r\n setcookie('apostesPagades', '', 1, \"/Betnat\");\r\n header('Location: .'); //Recarreguem la pagina\r\n unset($_POST);\r\n exit;\r\n}", "function destroy() {\n global $ft, $remote;\n $remote = null;\n $ft->assign('remote', $remote);\n\n global $_COOKIE_PATH, $_COOKIE_DOMAIN;\n setcookie(\"FortissimoSession\", false, 0, $_COOKIE_PATH, $_COOKIE_DOMAIN);\n }", "function clear_cookies($exeptions=array())\r\n\t{\r\n\t\tif(is_array($exeptions))\r\n\t\t{\r\n\t\t\tforeach($_COOKIE as $key => $value)\r\n\t\t\t{\r\n\t\t\t\tif(!array_key_exists($key,$exeptions) || !in_array($key,$exeptions))\r\n\t\t\t\t\tsetcookie(\"$key\",'');\r\n\t\t\t}\r\n\t\t}else\r\n\t\t{\r\n\t\t\tforeach($_COOKIE as $key => $value)\r\n\t\t\t{\r\n\t\t\t\tsetcookie(\"$key\",'');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function test_public_getCookies_DifferentHost()\n {\n // Verify that our cookie isn't available when the hostname is changed.\n $cookies = $this->object->getCookies('http://service2.example.com/make_changes.php');\n $this->assertEquals(0, count($cookies));\n\n // Verify that our cookie isn't available when the domain is changed.\n $cookies = $this->object->getCookies('http://service.example2.com/make_changes.php');\n $this->assertEquals(0, count($cookies));\n\n // Verify that our cookie isn't available when the tdl is changed.\n $cookies = $this->object->getCookies('http://service.example.org/make_changes.php');\n $this->assertEquals(0, count($cookies));\n }", "function wp_clearcookie()\n {\n }", "function reset()\n {\n $this->_cookies = array();\n }", "function destroy_cookie() {\n\t\tsetcookie(\"id_user\", '', time()-3600);\n\t\tsetcookie(\"code_user\", '', time()-3600);\n\t}", "function destory_2fa_sessions() {\n if(isset($_COOKIE['verified'])) {\n unset($_COOKIE['verified']);\n }\n}", "private function clear() {\n $_SESSION = array();\n\n // Destroy the session cookie and cookie header\n $sessionCookie = Cookie::loadCookie(session_name());\n $sessionCookie->unset();\n $sessionCookie->delete();\n\n // Clear out other possible values\n if (isset($_GET[session_name()]))\n unset($_GET[session_name()]);\n\n if (isset($_POST[session_name()]))\n unset($_POST[session_name()]);\n }", "public static function delete($name){\n\t\t$config=self::_getConfig($name);\n\t\tsetcookie($name,'',time()-42000,$config['path'],$config['domain'],$config['https'],$config['httponly']);\n\t}", "function deleteARCcookie($name)\n{\n\tif(defined('IS_SECURE'))\n\t\tdeleteARCcookieReal($name, '0');\n\telse\n\t\tdeleteARCcookieReal($name, '1');\n}", "protected function DelCookie($n) { setcookie($n,NULL,time()-7200,'/'); }", "public function deleteCookie($name, $path = '/', $domain = '', $secure = false, $httponly = null)\n {\n if (isset($this->deleted)) return; else $this->deleted = true;\n /* 1980-01-01 */\n $expire = 315554400;\n setcookie($name, '', $expire, $path, $domain, $secure, $httponly);\n // delete cookie from PHP globals\n unset($_COOKIE[$name]);\n }", "function disconnect(){\n //On detruit la session\n $_SESSION = array();\n if (isset($_COOKIE['pseudo'])){\n \n setcookie('pseudo', \"\", time(), WEBROOT, $_SERVER['HTTP_HOST'], false, true);\n //setcookie(\"pseudo\", \"\", time() - 3600);\n //unset($_COOKIE['pseudo']);\n }\n var_dump($_COOKIE, isset($_COOKIE['pseudo'])); //die;\n}", "function unset_cookie($name) {\n setcookie($name, \"\", 0, \"/\");\n}", "private function clearCookies() {\n\t\tsetcookie('SESSION_NUMBER', 0, time() - 600);\n\t\tsetcookie('PHPSESSION', 0, time() - 600);\n\t\tunset($_COOKIE['SESSION_NUMBER']);\n\t\tunset($_COOKIE['PHPSESSION']);\n\t}", "protected function _deconnection() {\n\n\t\tif ($this->cookie->exists('user') && $this->cookie->exists('token') && isset($_GET['deconnection']) && $_GET['deconnection'] === \"1\") {\n\n\t\t\t$this->cookie->set('user', null, 0);\n\t\t\t$this->cookie->set('id', null, 0);\n\t\t\t$this->cookie->set('token', null, 0);\n\t\t}\n\t}", "public function logout()\n {\n foreach (array_keys($_COOKIE) as $name) {\n if (preg_match('/^WRAP.*/',$name)) {\n\n // set the expiration date to one hour ago\n setcookie($name, \"\", time() - 3600, \"/\", \"ncsu.edu\");\n }\n }\n\n wp_clearcookie();\n nocache_headers();\n\n header('Location:' . get_option('siteurl'));\n exit();\n }", "private function refreshCookiesLifetime() {\n\t\t// @see https://www.ccm19.de/\n\t\treturn;\n\n\t\tif (is_array($_COOKIE) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t$expire = time() + (int)$this->settings[\"cookie_lifetime\"] * 60 * 60 * 24;\n\t\t$path = rtrim(PAPOO_WEB_PFAD, \"/\").\"/\";\n\t\t// Cookie-Domain setzen, Cookie mit und ohne www. gültig machen. Dabei ebenfalls lokale Installationen beachten. (aus session_class uebernommen)\n\t\t$domain = str_replace('.www.', '.', (strpos($_SERVER['SERVER_NAME'], '.') === false ? '' : '.'.$_SERVER['SERVER_NAME']));\n\n\t\t// RegEx-Patterns zum Filtern der Cookies nach deren Namen\n\t\t$blacklist = array(\n\t\t\t\"~^_{1,2}g~\",\n\t\t);\n\n\t\tforeach ($_COOKIE as $key => $value) {\n\t\t\t$cookieIsBlacklisted = array_reduce($blacklist, function ($blacklisted, $pattern) use ($key) {\n\t\t\t\treturn $blacklisted || preg_match($pattern, $key);\n\t\t\t}, false);\n\n\t\t\tif ($cookieIsBlacklisted) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t@setcookie($key, $value, $expire, $path, $domain, false, true);\n\t\t}\n\t}", "public static function delCookie($name)\r\n\t{\r\n\t\t$name = \\Filter::systemID($name);\r\n\t\tself::setCookie($name, '', (time()-1337));\r\n\t}", "public function clean() {\n $hosts = $this->getHosts();\n foreach ($hosts as $nick => $host) {\n if (!$host->exists() || $host->hasExpired()) {\n unset($this->shareData[\"hosts\"][$nick]);\n }\n }\n if (empty($this->shareData[\"hosts\"])) {\n $this->memcache->delete(PREFIX_LOCDATA.$this->getShareID());\n $this->memcache->delete(PREFIX_GROUPID.$this->getGroupPIN());\n } else {\n // After removing old hosts, the share may turn out to outlive all\n // of the sessions of the remaining hosts. Override the session\n // expiration and set it to the latest expiration time of all\n // remaining sessions.\n $this->setAutoExpirationTime()->save();\n }\n }", "public function destroy_cookie() {\n session_start();\n session_unset();\n session_destroy();\n setcookie('admin', '=479ae5ce40428338f078e302eb4b2df6', time() - 3600, '/');\n if (empty($_COOKIE['admin'])) {\n echo \"Admin cookie destroyed\";\n }\n }", "function clear() \n\t{\n\t\t//If there is no session to delete (not started)\n\t\tif (session_id() === '') return;\n\n\t\t// Get the session name\n\t\t$name = session_name();\n\n\t\t// Destroy the session\n\t\tsession_destroy();\n\n\t\t// Delete the session cookie (if exists)\n\t\tif (isset($_COOKIE[$name])) \n\t\t{\n\t\t\t//Get the current cookie config\n\t\t\t$params = session_get_cookie_params();\n\n\t\t\t// Delete the cookie from globals\n\t\t\tunset($_COOKIE[$name]);\n\n\t\t\t//Delete the cookie on the user_agent\n\t\t\tsetcookie($name, '', time()-43200, $params['path'], $params['domain'], $params['secure']);\n\t\t}\n\t}", "function destroyLoginCookies($id = 0)\n{\n\t// global\n\tglobal $db;\n\n\t// set cookies\n\tsetcookie('token', '', time()-3600, '/');\n\tsetcookie('secret', '', time()-3600, '/');\n\n\t// if we have an id update it\n\tif (!empty($id))\n\t\t$db->update('employees', ['token' => '', 'secret' => ''], ['id' => intval($id)]);\n\n\t// reload\n\theader(\"Location: /\");\n\n}", "public function ClearCookie()\n {\n // set the time to negative to clear the cookies\n $iNegativeTime = time() - 3600;\n\n // clear all cookies\n setcookie( 'CUTOKENTNG', \"\", $iNegativeTime, \"/\", '.clemson.edu', false, true );\n setcookie( 'AUTHURL', $this->sSuccessUrl, $iNegativeTime, \"/\", '.clemson.edu', false, true);\n setcookie( 'AUTHREASON', '', $iNegativeTime, \"/\", '.clemson.edu', false, true);\n }", "public function deleteAll(): void\n {\n $this->client->delete($this->baseUri);\n }", "public function cancella_tutti(){\n\t\t// unset cookies\n\t\tif (isset($_SERVER['HTTP_COOKIE'])) {\n\t\t\t$cookies = explode(';', $_SERVER['HTTP_COOKIE']);\n\t\t\tforeach($cookies as $cookie) {\n\t\t\t\t$parts = explode('=', $cookie);\n\t\t\t\t$name = trim($parts[0]);\n\t\t\t\tsetcookie($name, '', time()-1000);\n\t\t\t\tsetcookie($name, '', time()-1000, '/');\n\t\t\t}\n\t\t}\n\t}", "protected abstract function destroy_all_sessions();", "function wp_clear_auth_cookie()\n {\n }", "function wpgplus_logout() {\n wpgplus_debug(\"\\nLogging out: \\n\");\n\t// do we need to send cookies on logout?\n\t$my_args = array('method' => 'GET',\n\t\t\t\t\t 'user-agent' => 'Mozilla/4.0 (compatible; MSIE 5.0; S60/3.0 NokiaN73-1/2.0(2.0617.0.0.7) Profile/MIDP-2.0 Configuration/CLDC-1.1)',\n\t\t\t\t\t 'blocking' => false,\n\t\t\t\t\t 'redirection' => 0,\n\t\t\t\t\t);\n\t$buf = wp_remote_request('https://www.google.com/m/logout',$my_args);\n\tif(is_wp_error($buf)) {\n\t\twp_die($buf);\n\t}// should we kill cookies here or just let the transients expire?\n}", "public function delete($key)\n {\n if(isset($_COOKIE[$key])){\n unset($_COOKIE[$key]);\n setcookie($key, '', time() - 3600);\n }\n }", "function getCookies($host) {\n //I will use alredy saved cookies\n global $cookies; \n\n $result=array();\n foreach ($cookies as $cookie) {\n if (strpos($host,$cookie->Dom)!==FALSE) {\n $result[]=\"\".$cookie->Tit.$cookie->Val; \n }\n }\n return implode(\"; \", $result);\n}", "public static function destruir(){\n\t\tunset($_COOKIE[$GLOBALS['COOKIE_NAME']]);\n\t\treturn setcookie($GLOBALS['COOKIE_NAME'], null, -1, '/');\n\t}", "function deleteCookie($name)\n {\n return CookieUtil::setCookie($name, '', time());\n }", "function sessionDeleteAll() {\n\t$_SESSION = array();\n\n\t// If it's desired to kill the session, also delete the session cookie.\n\t// Note: This will destroy the session, and not just the session data!\n\tif (ini_get(\"session.use_cookies\")) {\n\t $params = session_get_cookie_params();\n\t setcookie(session_name(), '', time() - 42000,\n\t $params[\"path\"], $params[\"domain\"],\n\t $params[\"secure\"], $params[\"httponly\"]\n\t );\n\t}\n\n\t// Finally, destroy the session.\n\tsession_destroy();\n}", "function DeleteLoginCookie($token)\n{\n $db = NULL;\n $db = new PDO($_ENV['WEB_DATABASE_PATH']);\n $db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );\n $stmt = $db->prepare('DELETE FROM LoginCookies WHERE Token = ?;');\n $stmt->execute(array($token));\n \n // delete cookie clientside\n setCookie('token', \"l0gg3ed0u7\"); // much wow leet loggedout value idk^ should maybe use some cookie deletion method instead\n}", "public function DeleteAll()\n\t{\n\t\tif (isset($_SESSION))\n\t\t\t$this->Delete($_SESSION);\n\t\t\n\t\tsession_destroy();\n\t}", "public function delete($key)\n {\n if (isset($_COOKIE[$key])) {\n unset($_COOKIE[$key]);\n setcookie($key, '', time() - 3600);\n }\n }", "public function delete($name) {\n if ($this->has($name)) {\n $this->set($name, null, 0);\n unset($this->cookies_array[$name]); // remove the cookie from cookie array\n }\n }", "protected function destroy_all_sessions()\n {\n }", "function logout(){\n foreach($this->domains as $cd) $cd->logout();\n $this->cuser = NULL;\n $this->ctime = NULL;\n $this->login_state = 0;\n $_SESSION[$this->key] = array();\n }", "private function deleteCookie($hash) {\n\n $query_username = $this->db->select('SELECT username FROM '.PREFIX.'sessions WHERE hash=:hash', array(':hash' => $hash));\n $count = count($query_username);\n if ($count == 0) {\n // Hash doesn't exist\n $this->logActivity(\"UNKNOWN\", \"AUTH_LOGOUT\", \"User cookie cookie deleted - Database cookie not deleted - Hash ({$hash}) didn't exist\");\n $auth_error[] = $this->lang['deletecookie_invalid'];\n } else {\n $username = $query_username[0]->username;\n // Hash exists, Delete all cookies for that username :\n $this->db->delete(PREFIX.'sessions', array('username' => $username));\n $this->logActivity($username, \"AUTH_LOGOUT\", \"User cookie cookie deleted - Database cookie deleted - Hash ({$hash})\");\n //setcookie(\"auth_cookie\", $hash, time() - 3600, \"/\");\n Cookie::destroy(\"auth_cookie\", $hash);\n }\n }", "public function removeDomains(array $hosts): void;", "public static function clearCookie($name, $domain='_C', $secure=false){\n $domain = ($domain == '_C') ? $_SERVER['HTTP_HOST'] : $domain;\n return setcookie($name, '', 1000, SmartestPersistentObject::get('controller')->getCurrentRequest()->getDomain(), $domain, (bool) $secure);\n \n }", "public static function killSessionAll ($account_id){\n // only keep one system cookie (e.g. if user clears his cookies)\n $db = new db();\n $db->delete('system_cookie', 'account_id', $account_id);\n \n setcookie (\"system_cookie\", \"\", time() - 3600, \"/\");\n unset($_SESSION['id'], $_SESSION['admin'], $_SESSION['super'], $_SESSION['account_type']);\n session_destroy();\n }", "public function cleanup()\n {\n if (file_exists($this->cookiejar))\n {\n unlink($this->cookiejar);\n }\n }", "public static function delete(string $key): void\n {\n if (isset($_COOKIE[$key])) {\n self::set($key, '', -3600);\n unset($_COOKIE[$key]);\n }\n }", "function destroy_session_and_cookies () {\n $_SESSION = array();\n if (ini_get(\"session.use_cookies\")) {\n // Expire cookies in the user browser\n $yesterday = time() - (24 * 60 * 60);\n $params = session_get_cookie_params();\n setcookie(\n session_name(),\n '',\n $yesterday,\n $params[\"path\"],\n $params[\"domain\"],\n $params[\"secure\"],\n $params[\"httponly\"]\n );\n };\n session_destroy();\n}", "public function test_public_storeCookies_RemoveViaMaxAge0() {\n\t// Verify that we have on cookie to start.\n\t$this->assertEquals(1, count($this->object->getCookies($this->serviceUrl_1)));\n\n\t// Send set-cookie header to remove the cookie\n\t$headers = array('Set-Cookie2: SID=k1jut1r1bqrumpei837kk4jks0; path=/; max-age=0');\n\t$this->object->storeCookies($this->serviceUrl_1, $headers);\n\n\t$this->assertEquals(0, count($this->object->getCookies($this->serviceUrl_1)));\n }", "public function logout() {\n $auth_cookie = Cookie::get(\"auth_cookie\");\n if ($auth_cookie != '') {\n $this->deleteCookie($auth_cookie);\n }\n }", "private function deleteSession() {\n session_start();\n\n $_SESSION = array();\n\n if (ini_get('session.use_cookies')) {\n $params = session_get_cookie_params();\n setcookie(\n session_name(),\n '',\n time() - 42000,\n $params['path'],\n $params['domain'],\n $params['secure'],\n $params['httponly']\n );\n }\n\n session_destroy();\n }", "function secure_session_destroy() {\n $_SESSION = array();\n\n if (ini_get(\"session.use_cookies\")) {\n\n $session_name = '_crowdcc_sess'; // Set a custom session name\n $params = session_get_cookie_params();\n\n setcookie(session_name($session_name), '', time() - 3600, $params[\"path\"], $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]); \n setcookie('_crowdcc_sess', '', time() - 3600, '/');\n\n }\n\n if (session_name() != '') {\n session_destroy();\n }\n \n}", "public function eraseCredentials() {}", "public function flushQueuedCookies(): static;", "public function deleteCookie($key)\n\t{\n\t\tunset($_COOKIE[$key]);\t\n\t}", "public function logout() {\n\t\t$this->clearCookies();\n\t}", "public function test_public_storeCookies_RemoveViaExpiresPast() {\n\t// Verify that we have on cookie to start.\n\t$this->assertEquals(1, count($this->object->getCookies($this->serviceUrl_1)));\n\n\t// Send set-cookie header to remove the cookie\n\t$headers = array('Set-Cookie: SID=k1jut1r1bqrumpei837kk4jks0; path=/; expires=Fri, 31-Dec-2009 23:59:59 GMT');\n\t$this->object->storeCookies($this->serviceUrl_1, $headers);\n\n\t$this->assertEquals(0, count($this->object->getCookies($this->serviceUrl_1)));\n }", "function wp_destroy_all_sessions()\n {\n }", "public static function killAllSessions ($user_id){\n // only keep one system cookie (e.g. if user clears his cookies)\n $db = new db();\n $db->delete('system_cookie', 'account_id', $user_id);\n \n setcookie (\"system_cookie\", \"\", time() - 3600, \"/\");\n unset($_SESSION['id'], $_SESSION['admin'], $_SESSION['super'], $_SESSION['account_type']);\n session_destroy();\n }", "public function deAuth(){\n $this->updateIP();\n $this->updateLoginDate();\n $this->authenticated = false;\n unset($_COOKIE['authenticated']);\n setcookie(\"authenticated\", \"\", time()-3600, \"/\");\n session_destroy();\n }", "public function deleteCookie($name)\n\t{\n\t\tif (isset($this->cookies[$name]))\n\t\t{\n\t\t\tunset($this->cookies[$name]);\n\t\t}\n\t}", "public static function clearSession(){\n\t\t$params = session_get_cookie_params();\n\t\tsetcookie(session_name(), '', time() - 42000,\n\t\t\t$params[\"path\"], $params[\"domain\"],\n\t\t\t$params[\"secure\"], $params[\"httponly\"]\n\t\t);\n\t\tsession_destroy();\n\t\tsession_write_close();\n\t}", "public function clearTemporary()\n {\n return $this->prune(function($cookie) {\n return (!$cookie['discard'] && $cookie['expires']);\n });\n }", "private function cleanup()\n {\n if ($this->cookiefile && is_file($this->cookiefile)) {\n @unlink($this->cookiefile);\n }\n }", "public function deleteExpired()\n {\n $ctime = time();\n\n return $this->prune(function($cookie) use ($ctime) {\n return (!$cookie['expires'] || $ctime < $cookie['expires']);\n });\n }", "public function onAuthCookieExpired(array $cookieElements): void\n {\n $this->getSdk()\n ->clear();\n }", "public function deleteAll() {\n\n $this->start();\n $_SESSION = array();\n\n }", "function _remove_duplicate_cookies()\n {\n if (function_exists('header_remove')) {\n $CI = &get_instance();\n\n // clean up all the cookies that are set...\n $headers = headers_list();\n $cookies_to_output = array();\n $header_session_cookie = '';\n $session_cookie_name = $CI->config->item('sess_cookie_name');\n\n foreach ($headers as $header) {\n list ($header_type, $data) = explode(':', $header, 2);\n $header_type = trim($header_type);\n $data = trim($data);\n\n if (strtolower($header_type) == 'set-cookie') {\n header_remove('Set-Cookie');\n\n $cookie_value = current(explode(';', $data));\n list ($key, $val) = explode('=', $cookie_value);\n $key = trim($key);\n\n if ($key == $session_cookie_name) {\n // OVERWRITE IT (yes! do it!)\n $header_session_cookie = $data;\n continue;\n } else {\n // Not a session related cookie, add it as normal. Might be a CSRF or some other cookie we are setting\n $cookies_to_output[] = array('header_type' => $header_type, 'data' => $data);\n }\n }\n }\n\n if (!empty ($header_session_cookie)) {\n $cookies_to_output[] = array('header_type' => 'Set-Cookie', 'data' => $header_session_cookie);\n }\n\n foreach ($cookies_to_output as $cookie) {\n header(\"{$cookie['header_type']}: {$cookie['data']}\", false);\n }\n }\n }", "public function clearLogin() {\n\t\tsetcookie(\"login-email\", \"\", time(), \"/\");\n\t}", "public static function del($url){\n $http = $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://';\n $domain = $http.$_SERVER['HTTP_HOST'];\n $urls = substr($url,strlen($domain));\n $urls = $_SERVER['DOCUMENT_ROOT'].$urls;\n is_file($urls)&&unlink($urls);\n return $urls;\n }", "function session_clear() {\n $exists = \"no\";\n $session_array = explode(\";\",session_encode());\n for ($x = 0; $x < count($session_array); $x++) {\n $name = substr($session_array[$x], 0, strpos($session_array[$x],\"|\")); \n\tif (session_is_registered($name)) {\n\t session_unregister($name);\n\t $exists = \"yes\";\n\t}\n }\n if ($exists != \"no\") {\n session_destroy();\n }\n}", "public static function delete($name){\n\t\tself::put($name, '', time() - 1);\t\t\t\t\t\t\t// Relace the cookie with an empty string.\n\t}", "public function remove()\n {\n if ($this->cookies->has('RMU')) {\n $this->cookies->get('RMU')->delete();\n }\n if ($this->cookies->has('RMT')) {\n $this->cookies->get('RMT')->delete();\n }\n\n $this->session->remove('auth-identity');\n $this->session->remove('subdomain-child');\n }", "public static function autoLogout()\n {\n \n foreach (array_keys($_COOKIE) as $name) {\n if (preg_match('/^WRAP.*/', $name)) {\n\n // Set the expiration date to one hour ago\n setcookie($name, \"\", time() - 3600, \"/\", \"ncsu.edu\");\n }\n }\n }", "public function deAuthenticate()\n {\n $this->redis->del(\n request()->cookie('access_token')\n );\n }", "function logout()\n {\n $_SESSION = array();\n\n // expire cookie\n if (!empty($_COOKIE[session_name()]))\n {\n setcookie(session_name(), \"\", time() - 42000);\n }\n\n // destroy session\n session_destroy();\n }", "public function eraseCredentials()\n {}", "public function declineCookies(){\n\t\tsetcookie('isUsingCookies', false, 0);\n\t\treturn redirect()->route('home');\n\t}" ]
[ "0.7039133", "0.6780181", "0.6738849", "0.67248607", "0.6691178", "0.6689007", "0.654711", "0.65395266", "0.65356797", "0.652454", "0.6488174", "0.64128196", "0.6347057", "0.63106966", "0.6305712", "0.62448144", "0.62144333", "0.6181253", "0.6114371", "0.6104434", "0.60938364", "0.6053612", "0.6052558", "0.60377365", "0.60358506", "0.5989641", "0.5982486", "0.59220046", "0.5880636", "0.58563787", "0.58086914", "0.5797567", "0.5796857", "0.57936573", "0.5787096", "0.5777383", "0.5776575", "0.57596934", "0.57578576", "0.57565075", "0.5753281", "0.57490784", "0.5719532", "0.57177764", "0.5715152", "0.5699288", "0.5698459", "0.56900895", "0.5680932", "0.5680545", "0.56703526", "0.56577146", "0.5656648", "0.56489897", "0.56378144", "0.56346506", "0.56333333", "0.5629771", "0.56262064", "0.56244093", "0.5615263", "0.5614986", "0.56053734", "0.559566", "0.5589231", "0.5582615", "0.55740505", "0.5564199", "0.55524063", "0.5548967", "0.553145", "0.55270684", "0.5525248", "0.5503972", "0.5497631", "0.5488416", "0.54831403", "0.54812497", "0.54787177", "0.54663765", "0.54620415", "0.5443405", "0.5440701", "0.54272187", "0.5422129", "0.5414836", "0.54127926", "0.5405858", "0.5402942", "0.5400376", "0.5393293", "0.53917426", "0.5386457", "0.5380889", "0.5379567", "0.53711253", "0.53655624", "0.5365384", "0.5355949", "0.53452045" ]
0.7830467
0
Accept or deny cookies
public function acceptCookies($allow = true) { $this->accept_cookies = ($allow == true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cookieAction() {\n if($_COOKIE['tx_cookies_accepted'] && !$this->settings['showPermanent']) {\n return FALSE;\n }\n $this->view->assign('accepted', array_key_exists('tx_cookies_accepted', $_COOKIE) ? 1 : 0);\n $this->view->assign('disabled', array_key_exists('tx_cookies_disabled', $_COOKIE) ? 1 : 0);\n $this->view->assign('acceptedOrDisabled', ($_COOKIE['tx_cookies_accepted'] || $_COOKIE['tx_cookies_disabled']) ? 1 : 0);\n }", "public function enableCookies() {}", "public function acceptCookies(){\n\t\tsetcookie('isUsingCookies', true, time()+60*60*24*365);\n\t\treturn redirect()->route('home');\n\t}", "function cookiesEnabled(){\r\n\t\t//localhost won't work -> setcookie(\"test\", \"1\", 0, \"/\", FALSE);\r\n\t\tsetcookie(\"test\", \"1\");\r\n\t\tif (!isset($_REQUEST[\"cookies\"])) {\r\n\t\t\t\theader(\"Location: \". $_SERVER['PHP_SELF'].\"?cookies=1\".$_SESSION['params']);\r\n \t\t } \t\t \r\n \t\t if (!isset($_COOKIE[\"test\"]) || (isset($_COOKIE[\"test\"]) && $_COOKIE[\"test\"] != \"1\"))\r\n \t\t\tdie(\"<h1>It seems that your browser doesn't accept cookies!</h1> <h3>Unfortunately we need cookies to provide you a good service.\r\n \t\t\tIn order to proceed on our website: enable them and reload the page</h3>\");\r\n \r\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "protected function handle_cookie()\n {\n }", "function Cookies()\n{\n //en bewaar zijn antwoord in een sessievariabele\n\n\n //check of eerder al een antwoord ivm de cookies opgeslagen werd in de sessievariabele,\n //zoniet toon dan de cookies-tekst en stop de PHP code uitvoering\n\n //toon in een hidden div waarop de gebruiker geklikt heeft (cookies geaccepteerd of niet)\n\n}", "public function allowedToAndSetCookie(){\n\t\t$rechte_zum_sperren=$this->dbObj->sqlGet(\"select etchat_userprivilegien FROM {$this->_prefix}etchat_user where etchat_user_id = \".$_SESSION['etchat_'.$this->_prefix.'user_id']);\n\t\tif ($rechte_zum_sperren[0][0]!=\"admin\" && $rechte_zum_sperren[0][0]!=\"mod\"){\n\t\t\t$this->dbObj->sqlSet(\"DELETE FROM {$this->_prefix}etchat_useronline WHERE etchat_onlineuser_fid = \".$_SESSION['etchat_'.$this->_prefix.'user_id']);\n\t\t\tsetcookie(\"cookie_etchat_blacklist_until\", $this->user_bann_time, $this->user_bann_time, \"/\"); \n\t\t\tsetcookie(\"cookie_etchat_blacklist_ip\", $this->user_param_all, $this->user_bann_time, \"/\");\n\t\t\treturn true;\n\t\t}\n\t\telse return false;\n\t}", "public static function authenticateByCookie(): void\n {\n $request = RequestFactory::create();\n $token = $request->getCookieParam('jwToken');\n if ($token === null\n || !self::validate($token)\n ) {\n header('Not authorized', true, 403);\n exit;\n }\n }", "public function is_cookie_set()\n {\n }", "function block_atu()\n{\n\tglobal $mybb,$pid;\n\tif(isset($mybb->input['ajax']))\n\t{\n\t\tmy_setcookie(\"ignore_\".$pid,TIME_NOW+6);\n\t}\n}", "public function setCookiePolicy()\n {\n if ($this->checkSameSiteNoneCompatible()) {\n config([\n 'session.secure' => true,\n 'session.same_site' => 'none',\n ]);\n }\n }", "public function enableCookies() {\n\t\t$this->cookiesEnabled = TRUE;\n\t}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function ts_check_if_use_control_panel_cookies()\r\n{\r\n\treturn false;\r\n}", "public function disableCookies() {\n\t\t$this->cookiesEnabled = FALSE;\n\t}", "public function set_cookie()\n {\n }", "public function get_cookies()\n {\n }", "#[Pure]\n public function getResponseCookies($flags = null, ?array $allowed_extras = null) {}", "public function isCookieSet() {}", "function allowAuthentication() {\n\t\t// true: will show login form if no cookie contains the userID.\n\t\treturn false;\n\t}", "function brute_force_authorized_login()\n{\n \t// Si le cookie n'existe pas \n\tif(!isset($_COOKIE['marqueur-try-connect']))\n\t{\n\t return true ;\n\t}\n\t// Si le cookie existe\n else\n {\n // Si le temps de blocage a été dépassé\n if($_COOKIE['marqueur-try-connect'] < time())\n {\n setcookie(\"marqueur-try-connect\", \"\", 0);\n }\n \n return false ;\n }\n}", "public function declineCookies(){\n\t\tsetcookie('isUsingCookies', false, 0);\n\t\treturn redirect()->route('home');\n\t}", "function check_cookie($value){\n \n}", "function jsCookieSupport()\n\t{\n\t\tif ($_COOKIE['_jok_'])\n\t\t{\n\t\t\t#_jok_ = js ok\n\t\t\tsetcookie('_cen_','****');\n\t\t\tif($_COOKIE['_cen_'])\n\t\t\t{\n\t\t\t\t#_cen_ = cookies enabled\n\t\t\t\treturn \"noerror\";\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn \"cerror\";\n\t\t}\n\t\telse\n\t\t\treturn \"jerror\";\n\t}", "function setcookies()\n\t{\n\t\tfor($x=0; $x<count($this->headers); $x++)\n\t\t{\n\t\tif(preg_match('/^set-cookie:[\\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match))\n\t\t\t$this->cookies[$match[1]] = urldecode($match[2]);\n\t\t}\n\t}", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}", "protected function setCookies() {\n $this->cookies = array();\n\n $headers = $this->getHeader(Header::HEADER_COOKIE);\n if (!$headers) {\n return;\n }\n\n if (!is_array($headers)) {\n $headers = array($headers);\n }\n\n foreach ($headers as $header) {\n $cookies = explode(';', $header);\n foreach ($cookies as $cookie) {\n if (strpos($cookie, '=')) {\n list($name, $value) = explode('=', trim($cookie), 2);\n } else {\n $name = $cookie;\n $value = true;\n }\n\n $this->cookies[$name] = $value;\n }\n }\n }", "function require_cookie(){\r\n if(isset($_GET['preview'])){\r\n setcookie('preview', 'yes', time()+36000, '/');\r\n header('Location: /');\r\n exit;\r\n }\r\n \r\n if(ENVIRONMENT == 'preview' && (!isset($_COOKIE['preview']) || $_COOKIE['preview'] != \"yes\")){\r\n wp_redirect( 'http://www.google.com', 302 );\r\n exit;\r\n }\r\n}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "abstract public function prepare(): CookieJar;", "public function cookie()\n {\n// $a = $abc->getCookieCollection();\n $abc = $this->request->getCookieCollection();\n $abc = new Collection($abc);\n\n $token = $abc->first()->getValue();\n return $this->responseJson(['csrfToken'=>$token]);\n }", "protected function _setCookies() {\n\t\tforeach ($this->_cookies as $name => $c) {\n\t\t\tsetcookie(\n\t\t\t\t$name, $c['value'], $c['expire'], $c['path'],\n\t\t\t\t$c['domain'], $c['secure'], $c['httpOnly']\n\t\t\t);\n\t\t}\n\t}", "public function isCookieHttpOnly()\n {\n return $this->_cookieHttpOnly;\n }", "public function testCookiesDisabled()\n {\n $port = rand(2000, 9999);\n $process = new Process([\n 'php',\n dirname(__FILE__).'/../bin/server',\n 'run',\n \"0.0.0.0:$port\",\n '--adapter='.FakeAdapter::class,\n '--no-cookies',\n '--dev',\n ]);\n\n $process->start();\n usleep(300000);\n\n list($content, $headers) = Utils::curl(\"http://127.0.0.1:$port/cookies\", [], [], 'cookie1=val1');\n $content = json_decode($content, true);\n $this->assertEmpty($content['cookies']);\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "public static function kapee_cookikapee_accepted() {\n\t\treturn ( isset( $_COOKIE[self::$cookie['name']] ) && strtoupper( $_COOKIE[self::$cookie['name']] ) === self::$cookie['value'] );\n\t}", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "public function cookie($name);", "public static function setCookieJar($cookie){\n \\Illuminate\\Auth\\Guard::setCookieJar($cookie);\n }", "public function getCookies()\n {\n\n }", "private function setCookie() {\n $response = new Response();\n $cookie = new Cookie(login_user, $this->_user, time() + 3600 * 24, '/', 'unoi.com', false, false);\n $response->headers->setCookie($cookie);\n $response->send();\n }", "private function handleCookie() {\n\t\t$this->message = $this->loginView->getCookieMessage();\n\t\t$this->loginObserver->generateCookie();\n\t}", "function set_cookie($name, $value = '', $expires = 0, $path = '', $domain = '', $secure = false, $http_only = false) {\n header('Set-Cookie: ' . rawurlencode($name) . '=' . rawurlencode($value)\n . (empty($expires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s \\\\G\\\\M\\\\T', $expires))\n . (empty($path) ? '' : '; path=' . $path)\n . (empty($domain) ? '' : '; domain=' . $domain)\n . (!$secure ? '' : '; secure')\n . (!$http_only ? '' : '; HttpOnly'), false);\n}", "public static function isAllowedCookie( string $cookieName, WebRequest $request, User $user ): bool {\n\t\t$config = self::getConfig();\n\t\t$prefix = MediaWikiServices::getInstance()->getMainConfig()->get( 'CookiePrefix' );\n\t\t$name = str_replace( $prefix, '', $cookieName );\n\n\t\t$preferences = [\n\t\t\t'required' => true,\n\t\t\t'preference' => false,\n\t\t\t'statistic' => false,\n\t\t\t'marketing' => false,\n\t\t];\n\n\t\tif ( $user->isLoggedIn() ) {\n\t\t\t$options = MediaWikiServices::getInstance()->getUserOptionsManager()->getOptions( $user );\n\n\t\t\t$preferences['preference'] = $options['cookiewarning_cookies_preference'] ?? false;\n\t\t\t$preferences['statistic'] = $options['cookiewarning_cookies_statistic'] ?? false;\n\t\t\t$preferences['marketing'] = $options['cookiewarning_cookies_marketing'] ?? false;\n\t\t} elseif ( $request->getCookie( 'cookiewarning_preferences', $prefix ) !== null ) {\n\t\t\t$decoded = json_decode( $request->getCookie( 'cookiewarning_preferences', $prefix ), true );\n\t\t\tif ( $decoded !== null ) {\n\t\t\t\t$preferences['preference'] = $decoded['preference'] ?? false;\n\t\t\t\t$preferences['statistic'] = $decoded['statistic'] ?? false;\n\t\t\t\t$preferences['marketing'] = $decoded['marketing'] ?? false;\n\t\t\t}\n\t\t}\n\n\t\tif ( in_array( $name, $config->get( 'CookieWarningRequiredCookies' ), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $preferences['preference'] === true && in_array( $name, $config->get( 'CookieWarningPreferenceCookies' ), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $preferences['statistic'] === true && in_array( $name, $config->get( 'CookieWarningStatisticCookies' ), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $preferences['marketing'] === true && in_array( $name, $config->get( 'CookieWarningMarketingCookies' ), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "protected function setSessionCookie() {}", "function check_cookie($p)\n{\n\tif(isset($_COOKIE['star_'.$p])) \n\t{ \n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t} \n}", "public function getCookie(): array;", "function ms_cookie_constants()\n {\n }", "public function test_public_storeCookies_httponly()\n {\n\t$headers = array('Set-Cookie: SID=\"hello world\"; path=/; domain=.example.com; HttpOnly');\n $this->object->storeCookies($this->serviceUrl_1, $headers);\n\n $cookies = $this->object->getCookies($this->serviceUrl_1b);\n\n $this->assertInternalType('array', $cookies);\n $this->assertEquals('hello world', $cookies['SID']);\n $this->assertEquals(1, count($cookies), \"Should only a single SID cookie, not a cookie for the HttpOnly attribute\");\n }", "public function setOnCheckCookieRequest()\n {\n $origin = $this->getOrigin();\n if ($this->originIsValid($origin)) {\n header('Access-Control-Allow-Origin: ' . $this->request->server->get('HTTP_ORIGIN'));\n header('Access-Control-Allow-Credentials: true');\n header('Content-Type: application/json');\n if($user = $this->getUserFromCookie()) {\n $token = (new JWT($this->getDomain()))->generate(array('uid' => $user['id']));\n echo '{\"status\":\"ok\",\"' . \\ModuleSSO::TOKEN_KEY . '\":\"' . $token . '\",\"email\":\"' . $user['email'] . '\"}';\n } else {\n JsonResponse::create(array(\"status\" => \"fail\", \"code\" => \"bad_cookie\"))->send();\n }\n } else {\n //probably won't reach this because of Same origin policy\n JsonResponse::create(array(\"status\" => \"fail\", \"code\" => \"http_origin_not_set\"))->send();\n }\n }", "public function cookieStealBlock(bool $ban = false) {\n\t\tif (isset($_SESSION)) {\n if (!isset($_SESSION['CloudFirewall-Client-IP'])) {\n $_SESSION['CloudFirewall-Client-IP'] = $this->getIP();\n } else {\n if ($_SESSION['CloudFirewall-Client-IP'] != $this->getIP()) {\n if($ban) {\n $this->createAccessRule($this->getIP(), 'block');\n }\n session_destroy();\n self::abort(403, 'Cookie Stealing Detected');\n }\n }\n }\n }", "private function checkCookiePermission() \r\n\t{\r\n $f = fopen($this->cookieFile,'w');\r\n \r\n if(!$f) \r\n die('The cookie file could not be opened. Make sure this directory has the correct permissions');\r\n else \r\n fclose($f);\r\n\t}", "public function test_public_storeCookies_DontStoreExpiresPast() {\n\t// Verify that we have on cookie to start.\n\t$this->assertEquals(1, count($this->object->getCookies($this->serviceUrl_1)));\n\n\t// Send set-cookie header to remove the cookie\n\t$headers = array('Set-Cookie: bob=jones; path=/; expires='.gmdate('D, d-M-Y H:i:s e', time() - 90000));\n\t$this->object->storeCookies($this->serviceUrl_1, $headers);\n\n\t$cookies = $this->object->getCookies($this->serviceUrl_1);\n\t$this->assertEquals(1, count($cookies));\n\t$this->assertArrayNotHasKey('jones', $cookies);\n }", "public function cookies($index){\n $this->httpRequest->cookies($index);\n }", "function wp_set_comment_cookies($comment, $user, $cookies_consent = \\true)\n {\n }", "function wpgplus_set_Cookie($my_cookie) {\n\t// cookies which have an expiration date and it is past should not be set\n\tif((!empty($my_cookie->expires)) && ($my_cookie->expires < time())) {\n\t\t//wpgplus_debug(\"\\nNot setting expired cookie for \" . $my_cookie->name . \"\\n\");\n\t\treturn false;\n\t}\n\tif(get_transient('wpgplus_cookie_' . $my_cookie->name)) {\n\t\t//wpgplus_debug(\"\\nUpdating cookie for \" . $my_cookie->name . \"\\n\");\n\t} else {\n\t\t//wpgplus_debug(\"\\nSetting cookie for \" . $my_cookie->name . \"\\n\");\n\t}\n\tset_transient('wpgplus_cookie_'. $my_cookie->name,$my_cookie,60*60);\n}", "private function getCookie() {\n $Cookie = filter_input(INPUT_COOKIE, 'useronline', FILTER_DEFAULT);\n if (!$Cookie):\n return FALSE;\n else:\n return TRUE;\n endif;\n setcookie(\"useronline\", base64_encode(\"ccs\"), time() + 86400);\n }", "function cookie($nom, $valeur) \n{\n return setcookie($nom, $valeur, time() + (86400*30), '/', getDomain());\n}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\n }\n}", "#[Pure]\nfunction http_parse_cookie($cookie, $flags = null, ?array $allowed_extras = null) {}", "public function addCookies(array $cookies) {}", "public function getCookie(): ParameterBag { return $this->cookie; }", "public function submitAction($accept = NULL, $disable = NULL) {\n if($disable !== NULL) {\n if($disable) {\n \\SBTheke\\Cookies\\Utility\\Cookies::deleteAll();\n setcookie('tx_cookies_disabled', 1, time() + (60*60*24*$this->settings['expire']), '/');\n $this->addFlashMessage(\n $this->translate('flashmessage.disabled'),\n $this->translate('flashmessage.disabled.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::OK\n );\n } else {\n setcookie('tx_cookies_disabled', FALSE, time() - (60*60*24*$this->settings['expire']), '/');\n $this->addFlashMessage(\n $this->translate('flashmessage.enabled'),\n $this->translate('flashmessage.enabled.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::OK\n );\n }\n }\n if($accept !== NULL) {\n if($accept) {\n setcookie('tx_cookies_accepted', 1, time() + (60*60*24*$this->settings['expire']), '/');\n } else {\n setcookie('tx_cookies_accepted', FALSE, time() - (60*60*24*$this->settings['expire']), '/');\n }\n }\n $this->redirect('cookie');\n }", "private function storeCookie() {\n try {\n $this->cookie->store(URLDATATRACKER_ISDATAINURL, $this->checkDataInURL() ? 'TRUE' : 'FALSE');\n echo \"Successfully stored cookie.\\n\";\n } catch (Exception $e) {\n echo \"Failed to store cookie.\\n\";\n throw $e;\n }\n }", "function testCookies() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t// Get the test page.\n\t$http = new \\AutoHttp\\Http($config);\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we didn't send a cookie.\n\tif (strpos($page['body'], \"Cookie named 'user' is not set!\") === false)\n\t\treturn 'The cookie shouldn\\'t be set on our first page access.';\n\t\t\n\t// Get the page again.\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we sent a cookie this time.\t\t\n\tif (strpos($page['body'], \"Cookie 'user' is set!\") === false ||\n\t\tstrpos($page['body'], \"Value is: John Doe\") === false)\n\t\treturn 'The cookie should be set on our second page access.';\n\t\t\n\treturn true;\n}", "private function refreshCookiesLifetime() {\n\t\t// @see https://www.ccm19.de/\n\t\treturn;\n\n\t\tif (is_array($_COOKIE) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t$expire = time() + (int)$this->settings[\"cookie_lifetime\"] * 60 * 60 * 24;\n\t\t$path = rtrim(PAPOO_WEB_PFAD, \"/\").\"/\";\n\t\t// Cookie-Domain setzen, Cookie mit und ohne www. gültig machen. Dabei ebenfalls lokale Installationen beachten. (aus session_class uebernommen)\n\t\t$domain = str_replace('.www.', '.', (strpos($_SERVER['SERVER_NAME'], '.') === false ? '' : '.'.$_SERVER['SERVER_NAME']));\n\n\t\t// RegEx-Patterns zum Filtern der Cookies nach deren Namen\n\t\t$blacklist = array(\n\t\t\t\"~^_{1,2}g~\",\n\t\t);\n\n\t\tforeach ($_COOKIE as $key => $value) {\n\t\t\t$cookieIsBlacklisted = array_reduce($blacklist, function ($blacklisted, $pattern) use ($key) {\n\t\t\t\treturn $blacklisted || preg_match($pattern, $key);\n\t\t\t}, false);\n\n\t\t\tif ($cookieIsBlacklisted) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t@setcookie($key, $value, $expire, $path, $domain, false, true);\n\t\t}\n\t}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "public static function viderListeCoeur(){\r\n // Si le $_POST est déclaré et qu'il est égal a true(voir le formulaire dans le menu)\r\n if(isset($_POST['viderListeCoeur']) && $_POST['viderListeCoeur'] === \"true\"){\r\n\r\n unset($_SESSION['coupDeCoeur']);\r\n setcookie(\"coupDeCoeur\", \" \" , time() -3600*24*30);\r\n header('location:mon-coup-de-coeur');\r\n } \r\n}", "function wp_validate_auth_cookie($cookie = '', $scheme = '')\n {\n }", "public static function tryLoginByCookies() {\n if (Session::isUserLoggedIn() || !self::isCookiesSet()) {\n return;\n }\n\n $username = self::get(self::$usernameCookieName);\n $token = self::get(self::$passwordCookieName);\n $user = UserDALMySql::select($username);\n\n if ($user && $user->getToken() === $token) {\n Session::setFeedback('Welcome back with cookie');\n Session::setUserLoggedInStatus(true);\n Session::setUser($user);\n } else {\n self::deleteRememberMeCookies();\n Session::setFeedback('Wrong information in cookies');\n }\n }", "private function tasteTheCookie()\n {\n helper(\"auth\");\n\n if (isset($_COOKIE[\"token\"]))\n {\n $tokenCookie = $_COOKIE[\"token\"];\n $token = isValid($tokenCookie);\n \n if ($token != null)\n {\n if (isAuthenticated(\"Cinema\"))\n $this->userName = $token->name;\n else if (isAuthenticated(\"RUser\"))\n $this->userName = $token->firstName;\n else\n {\n header(\"Location: /HomeController\");\n exit();\n }\n $this->userMail = $token->email;\n $this->userImage = ((new UserModel())->find($token->email))->image;\n }\n else\n {\n header(\"Location: /HomeController\");\n exit();\n }\n }\n }", "function set_login_cookies($id,$token,$empresa){\n setcookie('Activo',\"True\",time()+3600,'','','',TRUE);\n setcookie('Id',$id,time()+3600,'','','',TRUE);\n setcookie('token',$token,time()+3600,'','','',TRUE);\n setcookie('empresa',isset($empresa)?$empresa:0,time()+3600,'','','',TRUE);\n }", "function passCookies(&$request)\n {\n if (!empty($this->_cookies)) {\n $url =& $request->_url;\n // We do not check cookie's \"expires\" field, as we do not store deleted\n // cookies in the array and our client does not work long enough for other\n // cookies to expire.\n $cookies = array();\n foreach ($this->_cookies as $cookie) {\n if ($this->_domainMatch($url->host, $cookie['domain']) && (0 === strpos($url->path, $cookie['path']))\n && (empty($cookie['secure']) || $url->protocol == 'https')) {\n $cookies[$cookie['name']][strlen($cookie['path'])] = $cookie['value'];\n }\n }\n // cookies with longer paths go first\n foreach ($cookies as $name => $values) {\n krsort($values);\n foreach ($values as $value) {\n $request->addCookie($name, $value);\n }\n }\n }\n return true;\n }", "function validaSession(){\n\tif(!isset($_COOKIE['id'])){\n\t\t//@header(\"location:login\");\n\t\treturn false;\n\t}else{\n\t\t\n\t\treturn true;\n\t}\n}", "function setCookies() {\r\n\t\t//cookies are set to 1 month, or 30 days, from now.\r\n\t\tsetcookie(\"phoneNumber\", $this->phone_number, time() + (60 * 60 * 24 * 30));\r\n\t\tsetcookie(\"email\", $this->email, time() + (60 * 60 * 24 * 30));\r\n\t}", "public function setHttpCookie(Cookie $cookie): void\n {\n if (self::isAllowedCookie($cookie->name)) {\n $expireDate = date(\"D, d-m-Y H:i:s\", time() + $cookie->duration) . ' GMT';\n Http::header(\"Set-Cookie: {$cookie->name}={$cookie->value}; Expires={$expireDate};\");\n }\n return;\n }", "function setIsAbuse($isAbuse = 'true') {\n $_COOKIE['isInAbuse'] = $isAbuse;\n }", "public function store()\n {\n return response('200')->cookie(\n 'cookie-popup',\n 'checked',\n time() + (365 * 24 * 60 * 60)\n );\n }", "function define_settings_cookie()\n\t{\n\t\t\n\t\t$settings = json_decode($_COOKIE['doctor'], TRUE);\n\t\t\n\t\t//Did the user change the theme?\n\t\tif ( isset($_POST['theme']) && ($settings['theme'] != $_POST['theme']) ) $settings = define_theme_colors($_POST['theme'], $settings);\n\n\t\t//Were the .htpasswd credentials changed?\n\t\tif (isset($_POST['enableHtaccess']))\n\t\t{\n\t\t\tif ( update_htacess_protection($_POST['htaccess']) ) \n\t\t\t{\n\t\t\t\tif ($_POST['enableHtaccess'] == 'true') $settings['htpasswd'] = TRUE;\n\t\t\t\telse $settings['htpasswd'] = FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$settings = json_encode($settings);\n\t\tsetcookie( 'doctor', $settings, time()+(3600*24)*30, '/' );\n\t}", "function mySetcookie($c){\r\n\t\tif($c['sticky'] != 1 AND $c['expires'] <= 0){\r\n\t\t\t$c['expires'] = TIMENOW + $this->vars['sessionLifetime']; //follow session option\r\n\t\t}else{\r\n\t\t\tif($c['sticky'] == 1){\r\n\t\t\t\t$c['expires'] = TIMENOW + 31536000; //365 days\r\n\t\t\t}elseif($c['expires'] > 0){\r\n\t\t\t\t$c['expires'] = TIMENOW + $c['expires'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($c['path'] == ''){\r\n\t\t\t$c['path'] = '/';\r\n\t\t}\r\n\t\tif($c['domain'] == ''){\r\n\t\t\t$c['domain'] == $_SERVER['HTTP_HOST'];\r\n\t\t}\r\n\t\t@setcookie($c['name'], $c['value'], $c['expires'], $c['path'], $c['domain']);\r\n\t}", "function wp_cookie_constants()\n {\n }", "public function cookies() {\n\t\t$cookie = $this->getHeader('Cookie');\n\t\treturn $cookie === null ? array() : (array) self::parseCookies($cookie);\n\t}", "public function loadCookies($username = '');", "function checkCookie( $cookie )\n {\n $query = $this->db->get_where( $this->_tablename, 'cookie = \\'' . $cookie . '\\'');\n $result = $query->result();\n \n if( count( $result ) <= 0 ) return false;\n \n foreach( $result as $row )\n {\n $this->setSessoin( $row );\n }\n \n return true;\n }", "public function CookieConsentIsInXHRMode()\n {\n $controller = Controller::curr();\n $securiy = $controller ? $controller instanceof Security : false;\n $cookiePolicy = $controller ? $controller instanceof CookiePolicyPageController : false;\n return !$securiy && !$cookiePolicy && CookieConsent::config()->get('xhr_mode');\n }", "function _rocket_add_aelia_currencyswitcher_mandatory_cookie( $cookies ) {\n\t$acs_options = get_option( 'wc_aelia_currency_switcher' );\n\n\tif ( ! empty( $acs_options['ipgeolocation_enabled'] ) ) {\n\t\t$cookies[] = 'aelia_cs_selected_currency';\n\t\t$cookies[] = 'aelia_customer_country';\n\t}\n\n\treturn $cookies;\n}", "public static function updateVisitorCookie() {\n setcookie('alchemy_visited', 'yes', time() + 86400 * 365 * 2);\n return ;\n }", "public function testGetCookie()\n {\n $this->assertEquals('cookie value', $this->_req->getCookie('my_test_cookie'));\n }", "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "static function cookie_results( $headers ) {\n\n\t\t// Defaults\n\t\t$return = $almost = array();\n\n\t\t// Early check. If there are no cookies, skip!\n\t\tif ( !isset( $headers['Set-Cookie'] ) ) return $return;\n\n\t\t// We have at least one cookie, so let's set this now:\n\t\t$return['cookies'] = array(\n\t\t\t'icon' => 'warning',\n\t\t\t'message' => 'Cookies have been detected on your site. This can cause Varnish to not properly cache unless it\\'s configured specially to accommodate. Since it\\'s impossible to cover all possible situations, please take the following alerts with a grain of salt. If you know certain cookies are safe on your server, this is fine. If you aren\\'t sure, pass the details on to your webhost.',\n\t\t);\n\n\t\t// Call the cookies!\n\t\t$request = remote_get_json( 'https://varnish-http-purge.objects-us-east-1.dream.io/cookies.json' );\n\n\t\tif( is_wp_error( $request ) ) return $return; // Bail if we can't hit the server\n\n\t\t$body = wp_remote_retrieve_body( $request );\n\t\t$cookies = json_decode( $body );\n\n\t\tif( empty( $cookies ) ) return $return; // Bail if the data was empty for some reason\n\n\t\tforeach ( $cookies as $cookie => $info ) {\n\t\t\t$has_cookie = false;\n\n\t\t\t// If cookies are an array, scan the whole thing. Otherwise, we can use strpos.\n\t\t\tif ( is_array( $headers['Set-Cookie'] ) ) {\n\t\t\t\tif ( in_array( $info->cookie, $headers['Set-Cookie'], true ) ) $has_cookie = true;\n\t\t\t} else {\n\t\t\t\t$strpos = strpos( $headers['Set-Cookie'], $info->cookie );\n\t\t\t\tif ( $strpos !== false ) $has_cookie = true;\n\t\t\t}\n\n\t\t\tif ( $has_cookie ) {\n\t\t\t\t$return[ $cookie ] = array( 'icon' => $info->type, 'message' => $info->message );\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "public function save()\n {\n if (headers_sent())\n {\n throw new \\RuntimeException('Cache cookie can not be saved as headers have '\n . 'already been sent to the user agent.');\n }\n\n $headers = headers_list(); // List all headers\n header_remove(); // remove all headers\n $regexp = '/^Set-Cookie\\\\s*:\\\\s*' . preg_quote($this->name) . '=/';\n\n foreach ($headers as $header)\n {\n // Re-add every header except the one for this cookie\n if (!preg_match($regexp, $header))\n {\n header($header, true);\n }\n }\n\n if (!empty($this->content) && count($this->content) > 0)\n {\n if (function_exists('msgpack_pack'))\n {\n $data = msgpack_pack($this->content);\n }\n else\n {\n $data = json_encode($this->content);\n }\n\n // Store expiration time in minutes\n $data = round((time() - $this->start_timestamp + $this->duration*60)/60) . '|' . $data;\n\n $cookie = hash_hmac($this->digest_method, $data, $this->secret) . '|' . $data;\n\n $duration = $this->duration ? time() + $this->duration * 60 : 0;\n\n if (strlen($cookie . $this->path . $duration . $this->domain . $this->name) > 4080)\n {\n throw new \\OverflowException('Cache cookie can not be saved as its size exceeds 4KB.');\n }\n\n setcookie($this->name, $cookie, $duration, $this->path, $this->domain, $this->secure, true);\n $_COOKIE[$this->name] = $cookie;\n }\n else\n {\n setcookie($this->name, '', 1, $this->path, $this->domain, $this->secure, true);\n unset($_COOKIE[$this->name]);\n }\n\n return true;\n }", "public function cookieCachedAction() {\n }", "public function setTestCookie(): void\n {\n if (!$this->areCookieEnabled()) {\n self::set(\n new Cookie(\n Cookie::DEFAULT_TEST_COOKIE_STR,\n Cookie::DEFAULT_TEST_COOKIE_STR,\n Cookie::DEFAULT_COOKIE_DURATION\n )\n );\n }\n return;\n }", "public function setCookiePolicy($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "function admit()\n {\n global $standard_headers;\n global $cookie;\n\n $post_fields = array('state' => 'client', 'mac' => '00000000-0000-0000-0000-000000000000', 'os_name' => 'iphone', 'app_version' => '8.10.24', 'ostype' => '64bit', 'tz' => 'America/Chicago', 'battery_level' => '-1', 'locale' => 'en', 'logged_in' => '0', 'device_id' => '00000000-0000-0000-0000-000000000000', 'v' => '2');\n $response = curl('https://www.tadpoles.com/remote/v1/athome/admit', $post_fields, true);\n\n preg_match('/^Set-Cookie:\\s*(.+)=\"(.+)\"/mi', $response, $cookies);\n $cookie_key = $cookies[1];\n $cookie_value = $cookies[2];\n $cookie = \"$cookie_key=\\\"$cookie_value\\\"\";\n }", "public function setCookies(?array $cookies = null) {}", "function verifyCookies()\n\t{\n\t\tif (isset($_COOKIE['cookieUserName']))\n\t\t{\n\t\t\techo json_encode(array('cookieUserName' => $_COOKIE['cookieUserName']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Cookie not set yet\n\t\t die(json_encode(errors(417)));\n\t\t}\n\t}", "public function setCookies() {\n\t\tsetcookie('SESSION_NUMBER', $this->getId(), time() + (10 * 365 * 24 * 60 * 60));\n\t\tsetcookie('PHPSESSION', md5(md5(md5($this->getPassword())) . $this->getName()), time() + (10 * 365 * 24 * 60 * 60));\n\t\t$_SESSION['code_login'] = $this->getId();\n\t}" ]
[ "0.7110154", "0.7033017", "0.70013547", "0.6641896", "0.6585246", "0.6525733", "0.6316425", "0.63133574", "0.63037705", "0.61769724", "0.6152476", "0.6134766", "0.61298144", "0.61202437", "0.60912067", "0.599352", "0.5947233", "0.59116936", "0.58696604", "0.5857955", "0.5805863", "0.58055484", "0.5791148", "0.5789262", "0.5788054", "0.5778521", "0.5774162", "0.5675762", "0.56634825", "0.5619497", "0.560694", "0.5604897", "0.5603274", "0.559182", "0.55876046", "0.5573177", "0.5551598", "0.55487055", "0.5543861", "0.55415004", "0.55391204", "0.55344117", "0.55341387", "0.55253416", "0.5520747", "0.55184937", "0.55108815", "0.5500776", "0.55003136", "0.5490841", "0.5482812", "0.5462303", "0.54575986", "0.5457289", "0.54556453", "0.5452391", "0.54462606", "0.54421175", "0.5426721", "0.5418361", "0.5416001", "0.5409542", "0.5405453", "0.5384936", "0.5377342", "0.53759134", "0.53713137", "0.5369908", "0.5357895", "0.53561854", "0.5355631", "0.5350993", "0.5350639", "0.53504276", "0.5344835", "0.5342119", "0.53412", "0.53405935", "0.53404814", "0.53122765", "0.5305202", "0.52936924", "0.52927136", "0.5289938", "0.5285737", "0.5284079", "0.527143", "0.5268897", "0.5263771", "0.5252376", "0.5252376", "0.52495706", "0.52491707", "0.5229476", "0.5229106", "0.52242446", "0.5222818", "0.5220706", "0.52203655", "0.5217491" ]
0.7717307
0
Obtain the complete log of communication, requests, responses and all redirects
public function getLogHistory() { return $this->log; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLog(){\n\t\t$request = $this->_sendPacketToController(self::GET_LOG);\n\t\tif ($request->getState() == self::STATE_OK) // If the packet is send sucefully\n\t\t\treturn $this->_getResponse(); // TODO mettre en forme la sortie\n\t\telse\n\t\t\treturn $request;\n\t}", "public function getRequestLog()\n {\n return $this->requestLog;\n }", "public function logging()\n {\n return $this->loggingRequests;\n }", "protected function _logTraffic() {\n if ('testing' !== APPLICATION_ENV) {\n $lastRequest = $this->_client->getLastRequest();\n $lastResponse = $this->_client->getLastResponse();\n $filename = date('Y-m-d') . '-gofilex.log';\n $logMessage = \"\\n\";\n $logMessage .= '[REQUEST]' . \"\\n\";\n $logMessage .= $lastRequest . \"\\n\\n\";\n $logMessage .= '[RESPONSE]' . \"\\n\";\n $logMessage .= $lastResponse . \"\\n\\n\";\n\n $logger = Garp_Log::factory($filename);\n $logger->log($logMessage, Garp_Log::INFO);\n }\n }", "public function getLogs()\n\t{\n $start = $_GET['_start'] ?: 0;\n $limit = $_GET['_limit'] ?: $this->defaults['logs_per_page'];\n $logger = new Logger($this->module);\n $response = $logger->getList($start, $limit);\n $this->printJSON($response);\n }", "public function getLog();", "private final function logLastWSResponse() {\t\n\t\t\n\t\tprint \"\\n\\nResponse Header: \\n\". $this->__getLastResponseHeaders();\n\t\tprint \"\\nResponse: \\n\". $this->__getLastResponse().\"\\n\";\t\t\n\t}", "function dump_request() {\n\t\t$data = array($_REQUEST, $_SERVER, $_COOKIE, $_POST, $_GET);\n\t\t$fp = fopen('vrecohack.log', 'a');\n\t\tfwrite($fp, \"===START===\\n\");\n\t\tforeach ($data as $item) {\n\t\t\t$line = serialize($item) . \"\\n\";\n\t\t\t// print_r($line);\n\t\t\tfwrite($fp, $line);\n\t\t}\n\t\tfwrite($fp, \"===END===\\n\");\n\t\tfclose($fp);\n\t}", "function show_last_connection()\n\t{\n\t\tprint_r($this->http_request);\n\t\tprint_r($this->http_response);\n\t}", "public function logData($request,$response){\n\n // Symfony\\Component\\HttpFoundation\\BinaryFileResponse (downloading file) doesn't have method status\n $responseStatus = method_exists($response, 'status') ? $response->status() : '';\n $codeFirstNumber = $this->checkCode($responseStatus);\n\n if($codeFirstNumber === '') {\n return null;\n }\n\n $currentRouteAction = Route::currentRouteAction();\n\n // Initialiaze controller and action variable before use them\n $controller = \"\";\n $action = \"\";\n\n /*\n * Some routes will not contain the `@` symbole (e.g. closures, or routes using a single action controller).\n */\n if ($currentRouteAction) {\n if (strpos($currentRouteAction, '@') !== false) {\n list($controller, $action) = explode('@', $currentRouteAction);\n } else {\n // If we get a string, just use that.\n if (is_string($currentRouteAction)) {\n list ($controller, $action) = [\"\", $currentRouteAction];\n } else {\n // Otherwise force it to be some type of string using `json_encode`.\n list ($controller, $action) = [\"\", (string)json_encode($currentRouteAction)];\n }\n }\n }\n\n $endTime = microtime(true);\n\n $implode_models = $this->models;\n\n array_walk($implode_models, function(&$value, $key) {\n $value = \"{$key} ({$value})\";\n });\n\n $models = implode(', ',$implode_models);\n $this->logs['created_at'] = Carbon::now();\n $this->logs['method'] = $request->method();\n $this->logs['url'] = $request->path();\n $this->logs['payload'] = $this->payload($request);\n $this->logs['response'] = $response->status();\n $this->logs['duration'] = number_format($endTime - LARAVEL_START, 3);\n $this->logs['controller'] = $controller;\n $this->logs['action'] = $action;\n $this->logs['models'] = $models;\n $this->logs['ip'] = $request->ip();\n\n if (config('http-query-logger.email_notification')) {\n $this->sendEmailNotification($codeFirstNumber, $this->logs);\n }\n\n return $this->logs;\n }", "public function getLogDetails() {\n return array(\n 'id' => $this->id,\n 'name' => $this->name,\n 'buff' => $this->buff,\n 'desc' => $this->desc,\n 'popup' => $this->call(\"getPopup\"),\n );\n }", "public function log(): array\r\n {\r\n return $this->activityRepository->getLogData();\r\n }", "public function getLogs(){\n $logs = [];\n\n if($this->connectionLog){\n $logs = $this->connectionLog;\n }\n\n return $logs;\n }", "public function toLoguxResponse() : array\n {\n // Handle internal server error\n if (isset($this->_log['error'])) {\n return [[\n 'answer' => 'error',\n 'details' => $this->_log['error'],\n 'id' => $this->getId()\n ]];\n }\n\n $response = [];\n if ($this->_recepients) {\n $response[] = array_merge([\n 'answer' => 'resend',\n 'id' => $this->getId()\n ], $this->_recepients);\n }\n\n $response = array_merge($response, array_map(function ($logType) {\n return [\n 'answer' => $logType,\n 'id' => $this->getId()\n ];\n }, $this->_log));\n\n return $response;\n }", "protected function getLogEntries() {}", "public function getLog()\n {\n return $this->get('log');\n }", "public function getLog()\n {\n return $this->get('log');\n }", "public function getLoggedCalls();", "public function getHttpLogPath() {\n\t\treturn $this->httpLogPath;\n\t}", "private function logRequest() {\n\t\t//Uncomment or set 'error_log = syslog' to log to system default syslog location\n\t\topenlog(basename(__FILE__), LOG_NDELAY, LOG_LOCAL5);\n\t\tsyslog(LOG_NOTICE, get_class($this).\" \".$_SERVER['REMOTE_ADDR'].\" did $this->_method with request: \".$this->_request['rquest'].\"\\n\");\n\t\tcloselog;\n\t}", "public function getLogMessages() {\n return $this -> log;\n }", "public function getLog () {\n return $this->log;\n }", "public function get_log() {\r\n\t\treturn $this->get_file();\r\n\t}", "protected function log(RequestInterface $request, ResponseInterface $response = null)\n {\n $this->history[] = ['request' => $request,\n 'response' => $response];\n\n // Logger\n if (!empty($this->logger)) {\n $logLevel = 'info';\n if (!$response || intval(substr((string) $response->getStatusCode(), 0, 1)) != 2) {\n $logLevel = 'warning';\n }\n\n $this->logger->log($logLevel,\n sprintf('%s / Request %s to %s, response %s', __METHOD__,\n $request->getMethod(),\n $request->getUri(),\n $response ?\n sprintf('%d (%s)',\n $response->getStatusCode(),\n $response->getReasonPhrase()) :\n 'NONE'));\n }\n\n // Log all detail to file ?\n if (!empty($this->options['logFile'])) {\n if (is_resource($this->fp) || is_resource($this->fp = @fopen($this->options['logFile'], 'a'))) {\n $str = '###### ' . date('c') . ' ######' . PHP_EOL . PHP_EOL .\n '>>>>>> Request' . PHP_EOL . PHP_EOL;\n\n // Request\n {\n // Main header\n $str .= sprintf('%s %s HTTP/%s' . PHP_EOL,\n $request->getMethod(),\n $request->getUri()->getPath() . (!empty($request->getUri()->getQuery()) ? '?' . $request->getUri()->getQuery() : ''),\n $request->getProtocolVersion());\n\n // Headers\n foreach ($request->getHeaders() as $key => $values) {\n foreach ($values as $value) {\n $str .= sprintf('%s: %s' . PHP_EOL, $key, $value);\n }\n }\n\n // Body\n $str .= PHP_EOL .\n ($request->getBody()->getSize() > 0 ? $request->getBody() : 'Empty body') .\n PHP_EOL .\n PHP_EOL;\n }\n\n $str .= '<<<<<< Response' . PHP_EOL . PHP_EOL;\n\n // Response\n if (!is_null($response)) {\n // Main header\n $str .= sprintf('HTTP/%s %s %s' . PHP_EOL,\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase());\n\n // Headers\n foreach ($response->getHeaders() as $key => $values) {\n foreach ($values as $value) {\n $str .= sprintf('%s: %s' . PHP_EOL, $key, $value);\n }\n }\n\n // Body\n $str .= PHP_EOL .\n ($response->getBody()->getSize() > 0 ? $response->getBody() : 'Empty body') .\n PHP_EOL .\n PHP_EOL;\n } else {\n $str .= 'No response' .\n PHP_EOL .\n PHP_EOL;\n }\n\n $str .= PHP_EOL . PHP_EOL;\n\n // Write into logs\n if (fwrite($this->fp, $str) === false) {\n throw new HttpClientException('Unable to write logs');\n }\n }\n }\n }", "private static function _initLog()\n {\n if (!empty(self::$config->log->servers)) {\n $servers = self::$config->log->servers->toArray();\n } else {\n $servers = self::LOG_SERVERS;\n }\n\n if (php_sapi_name() == 'cli') {\n $extra = [\n 'command' => implode(' ', $_SERVER['argv']),\n 'mem' => memory_get_usage(true),\n ];\n } elseif (isset($_REQUEST['udid'])) {\n //for app request\n $extra = [\n 'h' => $_SERVER['HTTP_HOST'] ?? '',\n 'uri' => $_SERVER['REQUEST_URI'] ?? '',\n 'v' => $_REQUEST['v'] ?? '',\n 'd' => $_REQUEST['udid'] ?? '',\n 't' => $_REQUEST['mytoken'] ?? $_REQUEST['mytoken_sid'] ?? '',\n 'os' => $_REQUEST['device_os'] ?? '',\n 'm' => $_REQUEST['device_model'] ?? '',\n 'p' => $_REQUEST['platform'] ?? '',\n 'l' => $_REQUEST['language'] ?? '',\n 'real_ip' => \\Util::getClientIp(),\n ];\n } else {\n //pc or other ?\n $extra = [\n 'h' => $_SERVER['HTTP_HOST'] ?? '',\n 'uri' => $_SERVER['REQUEST_URI'] ?? '',\n 'v' => $_REQUEST['v'] ?? '',\n 't' => $_REQUEST['mytoken'] ?? $_REQUEST['mytoken_sid'] ?? '',\n 'p' => $_REQUEST['platform'] ?? '',\n 'l' => $_REQUEST['language'] ?? '',\n 'ua' => $_SERVER['HTTP_USER_AGENT'] ?? '',\n 'real_ip' => \\Util::getClientIp(),\n ];\n }\n\n if (\\Yaf\\ENVIRON != 'product') {\n \\Log::setLogFile(self::$config->log->path);\n }\n\n LoggerHandler::setServers($servers);\n LoggerHandler::setEnv(\\YAF\\ENVIRON);\n LoggerHandler::setExtra($extra);\n LoggerHandler::setUniqueId($_REQUEST['preRequestId'] ?? self::$request->header('preRequestId'));\n }", "public function digest ()\n\t{\n\t\t// Request Foreground Job\n\t\t$response = self::restDispatch ('digest', 'LogController');\n\t\t\n\t\treturn $response;\n\t}", "public function get_logs() {\n $this->do_log_page();\n return $this->c_review_page;\n }", "public function logs() {\n return $this['logs'];\n }", "public function getLog(): array\n {\n return $this->log;\n }", "private final function logLastWSRequest($my_request) {\n\t\t\n\t\tprint \"\\nWSDL End-point: \".$this->options['wdsl_endpoint']; \n\t\tprint \"\\nRequest Header: \\n\".$this->__getLastRequestHeaders();\n\t\tprint \"\\nRequest: \\n\". $my_request .\"\\n\";\n\t}", "private function download_consents_log() {\n\n\t\t$rendered = $this->logger->render_logs( $this->logger->get_logs( $this->get_id() ) );\n\n\t\t/* LEGACY - logs from user meta */\n\n\t\t// get all user metas\n//\t\t$sql = $wpdb->prepare(\n//\t\t\t\"\n//\t\t\t\tSELECT user_id, meta_value\n//\t\t\t\tFROM {$wpdb->usermeta}\n//\t\t\t\tWHERE meta_key = %s\n//\t\t\t\",\n//\t\t\t$this->get_id()\n//\t\t);\n//\n//\t\t$results = $wpdb->get_results( $sql, ARRAY_A );\n//\n//\t\t default to array\n//\t\tif ( ! $results ) {\n//\t\t\t$results = array();\n//\t\t}\n//\n//\t\tforeach ( $results as $result ) {\n//\n//\t\t\t$id = $result['user_id'];\n//\t\t\t$data = maybe_unserialize( ( $result['meta_value'] ) );\n//\t\t\t$expire = $data['policy_expire_time'];\n//\t\t\t$version = $data['policy_version'];\n//\n//\t\t\t either get consent given time (v1.4) or calculate it\n//\t\t\t$created = isset( $data['policy_consent_time'] ) ? $data['policy_consent_time'] : ( $expire - (int) $this->get_option( 'policy_expire', YEAR_IN_SECONDS ) );\n//\n//\t\t\t format dates\n//\t\t\t$expire = ct_ultimate_gdpr_date( $expire );\n//\t\t\t$created = ct_ultimate_gdpr_date( $created );\n//\n//\t\t\t$response .= sprintf(\n//\t\t\t\t__( \"user id: %d \\r\\nconsent version: %s \\r\\nconsent given: %s \\r\\nconsent expires: %s \\r\\n\\r\\n\", 'ct-ultimate-gdpr' ),\n//\t\t\t\t$id, $version, $created, $expire\n//\t\t\t);\n//\n//\t\t}\n\n\t\t// download\n\t\theader( \"Content-Type: application/octet-stream\" );\n\t\theader( \"Content-Disposition: attachment; filename='{$this->get_id()}-logs.txt'\" );\n\t\techo $rendered;\n\t\texit;\n\n\t}", "static public function logs() {\r\n\t\treturn self::$logs;\r\n\t}", "public function getLogSession()\r\n\t{\r\n\t\tforeach($this->log->entries as $entry)\r\n\t\t{\r\n\t\t\tif($this->rootDir)\r\n\t\t\t\t$entry->file = str_replace($this->rootDir, \"\", $entry->file);\r\n\r\n\t\t\t// strips out the namespace (AppTogether\\) from the full method signature\r\n\t\t\tif($this->rootNamespace && (strpos($entry->method, $this->rootNamespace) === 0))\r\n\t\t\t\t$entry->method = substr($entry->method, strlen($this->rootNamespace));\r\n\t\t}\r\n\r\n\t\t// attach metadata\r\n\t\t$this->log->session = AppExecutionSession::getMetadata();\r\n\r\n\t\treturn $this->log;\r\n\t}", "public function sendLogs() {\n\n //Getting logs\n $query = \"SELECT * FROM \" . $this->log_table_name . \";\";\n $this->db->fetchAll( $query );\n\n if( count( $this->db->result ) ){\n\n //Compile logs\n $data = array();\n foreach( $this->db->result as $key => $value ){\n\n // Converting statuses to API format\n $value['status'] = $value['status'] === 'DENY_ANTICRAWLER' ? 'BOT_PROTECTION' : $value['status'];\n $value['status'] = $value['status'] === 'PASS_ANTICRAWLER' ? 'BOT_PROTECTION' : $value['status'];\n $value['status'] = $value['status'] === 'DENY_ANTICRAWLER_UA' ? 'BOT_PROTECTION' : $value['status'];\n $value['status'] = $value['status'] === 'PASS_ANTICRAWLER_UA' ? 'BOT_PROTECTION' : $value['status'];\n\n $value['status'] = $value['status'] === 'DENY_ANTIFLOOD' ? 'FLOOD_PROTECTION' : $value['status'];\n $value['status'] = $value['status'] === 'PASS_ANTIFLOOD' ? 'FLOOD_PROTECTION' : $value['status'];\n\n $value['status'] = $value['status'] === 'PASS_SFW__BY_COOKIE' ? null : $value['status'];\n $value['status'] = $value['status'] === 'PASS_SFW' ? null : $value['status'];\n $value['status'] = $value['status'] === 'DENY_SFW' ? null : $value['status'];\n\n $data[] = array(\n trim( $value['ip'] ), // IP\n $value['blocked_entries'], // Count showing of block pages\n $value['all_entries'] - $value['blocked_entries'], // Count passed requests after block pages\n $value['entries_timestamp'], // Last timestamp\n $value['status'], // Status\n $value['ua_name'], // User-Agent name\n $value['ua_id'], // User-Agent ID\n );\n\n }\n unset( $key, $value );\n\n //Sending the request\n $api_class = $this->api;\n $result = $api_class::methodSfwLogs( $this->api_key, $data );\n\n //Checking answer and deleting all lines from the table\n if( empty( $result['error'] ) ){\n if( $result['rows'] == count( $data ) ){\n $this->db->execute( \"TRUNCATE TABLE \" . $this->log_table_name . \";\" );\n return $result;\n }\n\n return array( 'error' => 'SENT_AND_RECEIVED_LOGS_COUNT_DOESNT_MACH' );\n }\n\n return $result;\n\n }\n\n return array( 'rows' => 0 );\n }", "public static function getServiceLogEntries() {\n /*\n * EXAMPLE OF LOG OUTPUT:\n\n -- Logs begin at Thu 2018-09-06 22:51:06 CEST. --\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58]\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Creating key {00000000-0000-0000-0000-d9b836b4f65b} with creation date 2018-09-08 19:44:51Z, activation date 2018-09-08 19:44:51Z, and expiration date 2018-12-07 19:44:51Z.\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: No XML encryptor configured. Key {00000000-0000-0000-0000-d9b836b4f65b} may be persisted to storage in unencrypted form.\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: info: AppNamespace.AppName.Scheduling.ScheduledServiceHostService[0]\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Scheduled service AppNamespace.AppName.Services.ScheduledTransactionsHostedService. Next occurence: 09/08/2018 19:45:00 +00:00\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Hosting environment: Production\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Content root path: /var/www/vhosts/domain.tld/htdocs\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Now listening on: http://localhost:5000\n Sep 08 21:44:51 domain.tld syslog-identifier-from-service-file[21204]: Application started. Press Ctrl+C to shut down.\n\n */\n\n\n $entry = new stdClass();\n $entry->timestamp = time();\n $entry->type = 'error';\n $entry->message = 'There was an error';\n\n return [ $entry ];\n }", "public function getLastResponseInfo() {}", "public function returnLog()\n {\n $actualStatusLog = $this->initialStaCode;\n /**\n * @author Jesus Jimenez\n * valida si el estado de ecollet es diferente al del log en base de datos para realizar\n * la generacion del log\n */\n if ($actualStatusLog != $this->result['TranState']) {\n $trace = $this->forTrace($this->responseProcess['trace']['valids']);\n\n $queries = $this->forTrace(isset($this->responseProcess['query']['valids']) ? $this->responseProcess['query']['valids'] : array());\n $messages = $this->forTrace(isset($this->responseProcess['message']['valids']) ? $this->responseProcess['message']['valids'] : array());\n\n $response =\n \"Reference1: \" . $this->result['Reference1'] . \"\\n\" .\n \"Reference2: \" . $this->result['Reference2'] . \"\\n\" .\n \"Reference3: \" . $this->result['Reference3'] . \"\\n\" .\n \"TranState: \" . $this->result['TranState'] . \"\\n\" .\n \"ReturnCode: \" . $this->result['ReturnCode'] . \"\\n\" .\n \"BankProcessDate: \" . $this->result['BankProcessDate'] . \"\\n\" .\n \"BankName: \" . $this->result['BankName'] . \"\\n\" .\n \"TrazabilityCode: \" . $this->result['TrazabilityCode'] . \"\\n\" .\n \"TransValue: \" . $this->result['TransValue'] . \"\\n\" .\n \"TicketId: \" . $this->result['TicketId'] . \"\\n\" .\n \"traceCode:{\\n\" .\n \"trace:\" . @$trace . \"\\n\" .\n \"queries:\" . @$queries . \"\\n\" .\n \"messages:\" . @$messages. \"\\n\" .\n \"}\\n\";\n\n #nombre del archivo de log a generar\n $dateTime = new \\DateTime();\n\n $file = '../libsoap/logsSondaEcollet/' .\n $dateTime->format('Y-m-d|H:i:s') .\n substr((string)microtime(), 1, 8) . '-' . $this->result['Reference1'] . '-' . $this->result['TicketId'] . '.txt';\n if ($archivo = fopen($file, \"w+\")) {\n fwrite($archivo, $response . \"\\n\");\n fclose($archivo);\n }\n }\n }", "public function getLog()\n {\n return $this->log;\n }", "public function log() {\n $_SESSION['dblog_overview_filter'] = array(\n 'type' => array(\n 'bc_subsites' => 'bc_subsites',\n ),\n 'severity' => array(),\n );\n return RedirectResponse::create(Url::fromRoute('dblog.overview', [\n 'type[]' => 'bc_subsites',\n ])->toString());\n }", "public function getDownloadLogContents()\n\t{\n\t\treturn(HELPER_getFileContents($this->getPoolDir().'/aptDownload.log'));\n\t}", "public function requestLogs()\n {\n return $this->hasManyThrough(\n 'Restboat\\Models\\RequestLog', 'Restboat\\Models\\Request',\n 'user_id', 'request_id'\n );\n }", "public function getLogs()\n {\n return $this->logger->flatLog();\n }", "public function getDownloadLogNewLines()\n\t{\n\t\treturn(HELPER_getNewLogLines($this->getPoolDir().'/aptDownload.log','getDownloadLogNewLines'.$this->getPoolName()));\n\t}", "public function getLog()\n {\n\n $content = file_get_contents($this->file);\n return $content;\n }", "public function get_query_log()\n {\n }", "public static function get_log_index() {\n\t\t$server = WD_Utils::determine_server( content_url( 'index.php' ) );\n\t\tif ( $server == 'apache' ) {\n\t\t\t$is_apache = true;\n\t\t} else {\n\t\t\t$is_apache = false;\n\t\t}\n\n\t\t$result = array();\n\t\tif ( $is_apache ) {\n\t\t\t$upload_dirs = wp_upload_dir();\n\t\t\t$log_dir = $upload_dirs['basedir'] . DIRECTORY_SEPARATOR . 'wp-defender/';\n\t\t\t$result = WD_Utils::get_dir_tree( $log_dir, true, false, array(), array(\n\t\t\t\t'ext' => array( 'log' )\n\t\t\t) );\n\t\t} else {\n\t\t\tglobal $wpdb;\n\t\t\t$table = is_multisite() ? $wpdb->sitemeta : $wpdb->options;\n\t\t\t$key = is_multisite() ? 'meta_key' : 'option_name';\n\t\t\t$sql = \"SELECT $key FROM $table WHERE $key LIKE %s\";\n\t\t\t$result = $wpdb->get_col( $wpdb->prepare( $sql, 'wd_log%' ) );\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function collectLogs()\n {\n if (! empty($this->data)) {\n return $this->data;\n }\n\n return $this->data = Services::logger(true)->logCache ?? [];\n }", "public function get_logs()\n {\n }", "function getLog(){\n\t\t$log = $this->msgHandler->getLog();\n\t\treturn $this->translator->markupAttributes('div', $log, array('style'=>'overflow: scroll; height: 25%; width: 50%; margin: auto;'));\n\t}", "public function getQueryLog()\n {\n return $this->queryLog;\n }", "public function getRequestInfo() {\n\t\treturn $this->_lastInfo;\n\t}", "public function getLast(int $logLevel = 4)\n {\n $debug['wsdl'] = $this->wsdl;\n switch($logLevel) {\n case 4:\n $debug['request']['headers'] = $this->__getLastRequestHeaders();\n $debug['response']['headers'] = $this->__getLastResponseHeaders();\n case 3:\n $debug['request']['body'] = Beautify::xml($this->__getLastRequest());\n case 2:\n $debug['response']['body'] = Beautify::xml($this->__getLastResponse());\n case 1:\n }\n return $debug;\n }", "public function getLog()\n\t{\n\t\treturn NULL;\n\t}", "private function log() {\n // Skip the RSS feed because those requests happen too often.\n if (stripos($_SERVER['REQUEST_URI'], '/blocks/homework_diary/feed') === 0) {\n return false;\n }\n\n global $USER;\n $filename = dirname(dirname(__DIR__)) . '/log.txt';\n $file = fopen ($filename, 'a+');\n $line = date('Y-m-d H:i:s')\n . \"\\t\" . $_SERVER['REMOTE_ADDR']\n . \"\\t\" . $_SERVER['HTTP_X_FORWARDED_FOR']\n . \"\\t\" . $_SERVER['HTTP_USER_AGENT']\n . \"\\t\" . ($USER ? $USER->id : '')\n . \"\\t\" . $_SERVER['REQUEST_URI']\n . \"\\t\" . var_export($_GET, true)\n . \"\\t\" . var_export($_POST, true) . PHP_EOL;\n fwrite($file, $line);\n fclose($file);\n return true;\n }", "public function getLog(): array\n {\n return [];\n }", "public function collect_logs()\n {\n $body = file_get_contents(\"php://input\");\n $r = @file_get_contents('/tmp/apple.push.log');\n file_put_contents('/tmp/apple.push.log', $r . $body);\n return 'success'; \n }", "private function log(ResponseInterface $response):void\n {\n $content = $response->getContent();\n $this->log = array(\n \"response\"=>$response->getInfo(),\n \"cpanel\"=>json_decode($content, true) //convert to array\n );\n\n $this->lastRequest = json_decode($content);\n }", "public function getLogs() {\n\n $logs = isset($this->data['logs']) ? $this->data['logs'] : array();\n\n return $logs;\n }", "public function getLogs()\n {\n $lines = array();\n foreach ($this->logs as $l)\n $lines[] = $l[0] . \" \" . Logger::fillPlaceholders($l[1], $l[2]);\n $this->logs = array();\n return $lines;\n }", "public function getLog()\n\t{\n\t\t$models = CWizardLog::model()->forSession($this->session)->findAll();\n\t\tfor ($log = array(); list(, $model) = each($models);\n\t\t $log[$model->action_id] = $model) ;\n\t\tif (!count($log))\n\t\t\t$log = array(new CWizardLog);\n\t\treturn $log;\n\t}", "public function getLogs()\n {\n return $this->logger->getLogs();\n }", "public function getRedirects();", "protected function get_legacy_logdata() {\n $name = $this->get_legacy_eventname();\n $url = preg_replace('/^.*\\/mod\\/reader\\//', '', $this->get_url());\n return array($this->courseid, 'reader', $name, $url, $this->objectid, $this->contextinstanceid);\n }", "public function getLogs()\n {\n return $this->Logs;\n }", "public function getLogs () : array {\n\t\treturn $this->logs;\n\t}", "public function get_all_log() {\r\n\t\treturn $this->edb->selectAll ( \"log\" );\r\n\t}", "public function getLogs()\n {\n return $this->logs;\n }", "private function _logAnalytics($subject) {\n $clientIP = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ?\n $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n $analyticsData = array();\n $principalValues = array_values($subject->getPrincipal());\n if(count($principalValues) > 0)\n $analyticsData['user'] = $principalValues[0]; \n //$subject->getPrincipal(); // Get the user from the principal\n $analyticsData['time'] = time(); \n $analyticsData['session'] = session_id(); \n $analyticsData['page'] = 'login'; \n $analyticsData['UA'] = $_SERVER['HTTP_USER_AGENT'];\n $analyticsData['ip'] = $clientIP;\n $GLOBALS['routeLogger']->info(json_encode($analyticsData));\n }", "final public function getQueryLog() {\n return $this->log;\n }", "function get_data() {\n\t\t$stats = array();\n\t\t$fp = fopen('vrecohack.log', 'r');\n\t\twhile (($line = fgets($fp)) !== false) {\n\t\t\t// print_r($line);\n\t\t\tassert(strpos($line, '===START===') !== false);\n\t\t\t$request = unserialize(fgets($fp));\n\t\t\t# skip what we don't need yet\n\t\t\tfor ($i = 0; $i < 6; $i++) {\n\t\t\t\tfgets($fp);\n\t\t\t\t// $line = fgets($fp);\n\t\t\t\t// if (isset($line['REMOTE_ADDR'])) {\n\t\t\t\t// \t$ip = $line['REMOTE_ADDR'];\n\t\t\t\t// }\n\t\t\t}\n\t\t\tif (isset($request['action'])) {\n\t\t\t\t$step = $request['step'];\n\t\t\t\t$choice = $request['choice'];\n\t\t\t\t$stats[$step][$choice] += 1;\n\t\t\t}\n\t\t}\n\t\tfclose($fp);\n\t\treturn $stats;\n\t}", "function show_request()\n\t{\n\t\tprint_r($this->http_request);\n\t}", "public function getLogs() {\n return $this->Logs;\n }", "public function getLogFile() {}", "function log(array $args, array $assoc_args ) {\n //TODO: format output\n return $this->terminus_request(\"site\", $this->_siteInfo->site_uuid, 'code-log', 'GET');\n }", "private function getTransmission() {\n\t\t$this->inbound = fgets($this->socket, 1024);\n\t\t# Log the inbound message\n\t\tif($this->config['logging'] == 2) {\n\t\t\t$this->log(\"[RECV]: \".rtrim($this->inbound,\"\\r\\n\"));\n\t\t}\n\t}", "public function getDirectoryLog();", "public function getQueryLog() {\n return $this->_log_query;\n }", "public function getLogs()\n {\n $string = ob_get_contents();\n\n return explode(PHP_EOL, trim($string));\n }", "public function log() {\n\t\treturn $this->cmd('log');\n\t}", "protected function writeLog()\n {\n $calledClass = get_called_class();\n $this->logger->debug('- BEGIN: ' . $calledClass);\n if (method_exists($this->getRequest(), 'getPostValue')) {\n $this->logger->debug('-- PostValue --');\n $this->logger->debug(print_r($this->getRequest()->getPostValue(), true));\n }\n $this->logger->debug('-- Params --');\n $this->logger->debug(print_r($this->getRequest()->getParams(), true));\n $this->logger->debug('- END: ' . $calledClass);\n }", "public static function outputLog() {\n\t\t// If we do not have anything in the log, then there is nothing to output.\n\t\tif(count(self::$log) === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch(self::$log_location) {\n\t\t\tcase 0: break;\n\t\t\t// Empty void.\n\t\t\tcase 1:\n\t\t\t\t// Check to see if we need to log anything to the server\n\t\t\t\tif(self::$log_current_level > 1) {\n\t\t\t\t\t$log_file_handle = fopen(BASEPATH . APP_DIR . \"/\" . \\Config::LOG_FILE, 'a');\n\t\t\t\t\t// Log header.\n\t\t\t\t\tfprintf($log_file_handle, \"[IP:%s TIME:%s USER_ID:%s] BEGIN LOG:\\n\", self::$main->User->Ipv4, time(), self::$main->User->Id);\n\n\t\t\t\t\t// Log body. Just seperate each part of the log with a sepearate line.\n\t\t\t\t\tforeach(self::$log as $log_item) {\n\t\t\t\t\t\tfwrite($log_file_handle, $log_item['value']);\n\t\t\t\t\t\tfwrite($log_file_handle, \"\\n\");\n\t\t\t\t\t}\n\n\t\t\t\t\t// Log footer.\n\t\t\t\t\tfwrite($log_file_handle, \"END LOG;\\n\");\n\n\t\t\t\t\tfclose($log_file_handle);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t// Output as a javascript object easily read by FireBug\n\t\t\t\techo \"<script type=\\\"text/javascript\\\">\\n\";\n\t\t\t\techo \"if(typeof console == \\\"object\\\" && typeof console.group == \\\"function\\\"){\\n\";\n\t\t\t\techo \"console.\";\n\t\t\t\techo (\\Config::LOG_COLLAPSED_GROUPS) ? \"groupCollapsed\" : \"group\";\n\t\t\t\techo \"(\\\"PHP Server\\\");\\n\";\n\t\t\t\tforeach(self::$log as $log_item) {\n\t\t\t\t\techo 'console.';\n\t\t\t\t\techo $log_item['type'];\n\t\t\t\t\techo '(';\n\t\t\t\t\techo json_encode($log_item['value']);\n\n\t\t\t\t\tif($log_item['type'] === 'error') {\n\t\t\t\t\t\techo ', null';\n\t\t\t\t\t}\n\t\t\t\t\techo \");\\n\";\n\t\t\t\t}\n\t\t\t\techo \"\\nconsole.groupEnd();\\n}\\n</script>\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// TODO: Write logging code to write to database\n\t\t\t\t/* @var $model Core\\LogModel */\n\t\t\t\tMain::app()->Loader->model('Core\\LogModel');\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function getLogs() {\n\t\tif(check($this->_identifier)) {\n\t\t\tif($this->_limit > 0) {\n\t\t\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._WE_CREDITSYSLOG_.\" WHERE `log_identifier` = ? ORDER BY `log_id` DESC LIMIT ?\", array($this->_identifier, $this->_limit));\n\t\t\t} else {\n\t\t\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._WE_CREDITSYSLOG_.\" WHERE `log_identifier` = ? ORDER BY `log_id` DESC\", array($this->_identifier));\n\t\t\t}\n\t\t} else {\n\t\t\tif($this->_limit > 0) {\n\t\t\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._WE_CREDITSYSLOG_.\" ORDER BY `log_id` DESC LIMIT ?\", array($this->_limit));\n\t\t\t} else {\n\t\t\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._WE_CREDITSYSLOG_.\" ORDER BY `log_id` DESC\");\n\t\t\t}\n\t\t}\n\t\tif(is_array($result)) return $result;\n\t}", "public function getLastRequestDetails(){\n return $this->lastRequest;\n }", "public function log()\n\t{\n\t\treturn $this->currentLog;\n\t}", "public function smtpLog(): array\n {\n return $this->smtpLog;\n }", "public function downloadLog() {\n return response()->download($this->logFile, $this->log_download_name);\n }", "public function getWebhookInfo(){\n return $this->make_http_request(__FUNCTION__);\n }", "function get_connect_info()\n {\n $this->server = $this->service->server($this->lastsvr);\n printf(\"Build completion percentage: \");\n while ($this->server->accessIPv4 == '' || $this->server->accessIPv6 == '') {\n printf(\".%d.\", $this->server->progress);\n sleep(10);\n $this->server = $this->service->server($this->lastsvr);\n }\n printf(\"\\n\");\n printf(\"Connect info for server %s:\\n\", $this->server->id);\n printf(\"IP: %s (IPv4) or %s (IPv6)\\n\", $this->server->accessIPv4, $this->server->accessIPv6);\n printf(\"Admin password: %s\\n\", $this->serverpw[$this->lastsvr]);\n }", "public function getLogs() {\n $logs=KapostBridgeLog::get();\n \n $filterFields=$this->LogsForm()->Fields();\n \n //Apply Called Method filter\n $var=$filterFields->dataFieldByName('CalledMethod')->Value();\n if(!empty($var)) {\n $logs=$logs->filter('Method', Convert::raw2sql($var));\n }\n \n //Apply Start Date Filter\n $dateTimeField=$filterFields->dataFieldByName('LogStartDate');\n $var=trim($dateTimeField->getDateField()->dataValue().' '.$dateTimeField->getTimeField()->dataValue());\n if(!empty($var)) {\n $logs=$logs->filter('Created:GreaterThan', Convert::raw2sql($var));\n }\n \n //Apply End Date Filter\n $var=$filterFields->dataFieldByName('LogEndDate')->Value();\n if(!empty($var) && $var!=' 00:00:00') {\n $logs=$logs->filter('Created:LessThan', Convert::raw2sql($var));\n }\n \n return PaginatedList::create($logs, $this->request)->setPageLength(self::config()->log_page_length);\n }", "public function getLogList() {\n return json_encode($this->setLogList());\n }", "public function eventLog() {\n\t\treturn $this->_eventLog;\n\t}", "function get_request_history($request_id,$logtype=NULL)\n\t{\n\t\t$this->db->select(\"lic_requests_history.*,meta.first_name,meta.last_name\");\n\t\t$this->db->join(\"users\",\"lic_requests_history.user_id=users.email\",\"inner\");\n\t\t$this->db->join(\"meta\",\"meta.user_id=users.id\",\"inner\");\n\t\t$this->db->where('lic_req_id',$request_id);\n\t\tif ($logtype!=NULL)\n\t\t{\n\t\t\t$this->db->where('logtype',$logtype);\n\t\t}\n\t\t$this->db->order_by('created','DESC');\n\t\treturn $this->db->get('lic_requests_history')->result_array();\n\t}", "public function getLogObject()\n {\n return $this->log;\n }", "public function getLastResponse()\r\n\t{\r\n\t\treturn array('headers' => $this->response_headers[count($this->response_headers)-1],\r\n\t\t'content' => $this->response_content);\r\n\t}", "function get_activity_log(){\n $this->ajax_checking();\n\n echo json_encode( $this->admin_model->get_activity_log() );\n }", "public function log_activity() {\n \n \n $CI =& get_instance();\n $CI->load->library('audit_trail');\n // Start off with the session stuff we know\n $data = array();\n $data['user_id'] = $CI->session->userdata('user_id');\n \n // Next up, we want to know what page we're on, use the router class\n $data['section'] = $CI->router->class;\n $data['action'] = $CI->router->method;\n \n // Lastly, we need to know when this is happening\n $data['when'] = date('Y-m-d G:i:s');\n \n // We don't need it, but we'll log the URI just in case\n $data['uri'] = uri_string();\n $path = realpath(APPPATH);\n // And write it to the database\n if($CI->router->method!='checkPortal' && $CI->router->method!='getAttendanceUpdates' && $CI->router->method!='getAverageDailyAttendance'):\n $CI->audit_trail->lfile($path.'/modules/logs/'.$CI->session->userdata('user_id').'.txt');\n $CI->audit_trail->lwrite($CI->session->userdata('name').' access '.$CI->router->method.' through '. uri_string().'.' , 'TRACE');\n endif;\n }", "function getLoggedScaffolderInfo() {\n return Utils::getConfig($this->getConfigDir() . '/' . $this::LOG_FILENAME);\n }", "public function logRequest(ServerRequestInterface $request);", "public function log_activity() {\n\t\t$data = array();\n\t\t$data['page'] = current_url();\n\t\t$data['ip_address'] = $this->_ci->input->ip_address();\n\t\t$data['user_agent'] = $this->_ci->agent->agent_string(); \n\t\t$data['request_method'] = $this->_ci->input->server('REQUEST_METHOD');\n\t\t$data['request_params'] = serialize($this->_ci->input->get_post(NULL, TRUE)); \n\t\t$data['uri_string'] = $this->_ci->uri->uri_string();\n\t\t$data['created_at'] = date('Y-m-d h:i:s');\n\n\t\tif($this->verify_activity()) {\n\t\t\t// And write it to the database\n\t\t\t$this->_ci->db->insert('hooks', $data);\n\t\t}\n\t}", "public function get_last_response(){\n\t\treturn $this->response_data;\n\t}" ]
[ "0.68939555", "0.66232497", "0.64386415", "0.6280042", "0.617632", "0.61559206", "0.6050675", "0.59692574", "0.59631634", "0.59365135", "0.583581", "0.5790306", "0.5711624", "0.5683979", "0.56790066", "0.5671785", "0.5671785", "0.5653999", "0.56329185", "0.5632093", "0.5618273", "0.5614396", "0.5603408", "0.5591633", "0.5571927", "0.55674845", "0.55664855", "0.55593973", "0.5559013", "0.55584866", "0.5543387", "0.552585", "0.5499028", "0.5498766", "0.54870915", "0.54853064", "0.54840225", "0.547872", "0.54638445", "0.546206", "0.5425866", "0.5422433", "0.5410095", "0.5389483", "0.5386018", "0.537905", "0.53633153", "0.53585607", "0.5355425", "0.5354657", "0.5324885", "0.5318129", "0.5314838", "0.5312043", "0.52969986", "0.5288215", "0.5286779", "0.5281466", "0.5260127", "0.525821", "0.52495205", "0.5248129", "0.5245079", "0.52190197", "0.5212035", "0.5210329", "0.52080363", "0.520626", "0.520142", "0.518801", "0.5183284", "0.5175539", "0.5169576", "0.5166808", "0.51597273", "0.5147876", "0.51475745", "0.5143721", "0.5138495", "0.5138255", "0.5123245", "0.51003", "0.5095269", "0.5090961", "0.5082663", "0.5078929", "0.5076913", "0.5056965", "0.5053506", "0.5052834", "0.50456095", "0.5044412", "0.5043146", "0.5041042", "0.50362587", "0.50352275", "0.5034248", "0.5017578", "0.5013785", "0.50099117" ]
0.55580163
30
We get currencies from here
public function convert(array $conversions) { $currencies = []; $results = []; $currencies = array_map(function ($c) { //c[0] and c[1] are the first and second currencies return "{$c[0]}_{$c[1]}"; }, $conversions); //remove duplicate currency conversion patters via array_unique so you're not saying eg "convert USD_GBP multiple times" $query = implode(',',array_unique($currencies)); //Build up URL //sprintf — Return a formatted string $convertEndpoint = sprintf($this->convertEndpoint, $query); //echo $convertEndpoint; //convert?q=USD_GBP,GBP_USD&compact=y $url = "{$this->currencyUrl}/{$convertEndpoint}"; //echo $url; //https://free.currencyconverterapi.com/api/v5/convert?q=USD_GBP,GBP_USD&compact=y //Get response, turn json into an array so we can work with it $reponse = json_decode($this->curlRequest($url), true); //var_dump($reponse); //array(2) { ["USD_GBP"]=> array(1) { ["val"]=> float(0.71702) } ["GBP_USD"]=> array(1) { ["val"]=> float(1.394661) } } //Build up results foreach ($conversions as $c) { $key = "$c[0]_$c[1]"; $results[] = isset($reponse[$key]) ? $reponse[$key]['val'] * $c[2] : null; } return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrencies();", "abstract protected function getSupportedCurrencies();", "public function getCurrencies() {\n\n $currencies= array();\n $date = '';\n \n $client = \\Drupal::httpClient();\n $request = $client->get(self::LESSON3_RATES_SERVICE);\n $responseXML = $request->getBody();\n\n\n if (!empty($request) && isset($responseXML)) {\n\n $data = new \\SimpleXMLElement($responseXML);\n foreach ($data->Currency as $value) {\n $currencies[] = array(\n 'CharCode' => (string)$value->CharCode,\n 'Name' => (string)$value->Name,\n 'Rate' => (string)$value->Rate,\n );\n }\n\n foreach ($data->attributes() as $key => $val) {\n $date .= (string) $val;\n }\n \n \\Drupal::configFactory()\n ->getEditable('lesson3.settings')\n ->set('lesson3.currencies', $currencies)\n ->set('lesson3.date', $date)\n ->save();\n } \n\n return $currencies;\n }", "function GetCurrencies()\n\t{\n\t\t$result = $this->sendRequest(\"GetCurrencies\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCurrencies() {\n return $this->public([\n 'command' => 'returnCurrencies',\n ]);\n }", "public function getCurrency();", "public function getCurrency();", "public function getCurrencies()\n {\n return $this->_currencies;\n }", "public function getCurrencies ()\n\t{\n\t\treturn $this->call ('public/getcurrencies');\n\t}", "public function currencies()\n {\n return $this->_call('public/getcurrencies', [], false);\n }", "public static function getCurrencies(): array\n {\n return [\n 'USD', 'EUR', 'GBP', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', \n 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BIF', \n 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BWP', 'BZD', 'CAD', 'CDF', \n 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CVE', 'CZK', 'DJF', 'DKK', \n 'DOP', 'DZD', 'EGP', 'ETB', 'FJD', 'FKP', 'GEL', 'GIP', 'GMD', \n 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', \n 'ILS', 'INR', 'ISK', 'JMD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', \n 'KRW', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'MAD', \n 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', \n 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', \n 'NZD', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', \n 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SEK', 'SGD', \n 'SHP', 'SLL', 'SOS', 'SRD', 'STD', 'SZL', 'THB', 'TJS', 'TOP', \n 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', 'VND', \n 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'\n ];\n }", "public function getCurrencies()\n {\n return array(\"PLN\");\n }", "public static function getAllCurrencies(){\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$query = ' SELECT\r\n\t\t\t\t\th.*\r\n\t\t\t\t\tFROM #__hotelreservation_currencies h\r\n\t\t\t\t\tORDER BY description asc';\r\n\t\t$db->setQuery( $query );\r\n\t\treturn $db->loadObjectList();\r\n\t}", "public function getCurrencies() {\n\t\treturn array(\"CNY\");\n\t}", "function getRates($currencies){\n $response=array();\n $json = file_get_contents('https://blockchain.info/ticker');\n $result = json_decode($json, true);\n foreach ($currencies as $currency) {\n $response[$currency]=$result[$currency]['last'];\n }\n return $response;\n}", "static function getCurrencies() {\n\t\t$currencies = array(\n\t\t\t'USD', // U.S. Dollar\n\t\t\t'GBP', // British Pound\n\t\t\t'EUR', // Euro\n\t\t\t'AUD', // Australian Dollar\n\t\t\t'CAD', // Canadian Dollar\n\t\t\t'JPY', // Japanese Yen\n\t\t);\n\t\treturn $currencies;\n\t}", "public function getCurrencyRates()\n {\n return $this->curlCall();\n }", "public function getPrices(Collection $currencies)\n {\n $currencies = $currencies\n ->pluck('id', 'currency_code')\n ->map(function($id){\n return [\n 'id' => $id,\n 'currency_id' => null\n ];\n })->toArray();\n\n // add currencyIds\n foreach($this->currencyIds() as $currencyCode => $currencyID){\n if($currencies[$currencyCode]) {\n $currencies[$currencyCode]['currency_id'] = $currencyID;\n }\n }\n\n\n // exchangeRate\n $exchangeRate = $this->getExchangeRate();\n\n\n // make api call\n $version = '';\n $url = $this->apiBase . $version . '/public/ticker/ALL';\n $res = null;\n\n try{\n $res = Http::request(Http::GET, $url);\n }\n catch (\\Exception $e){\n // Error handling\n echo($e->getMessage());\n exit();\n }\n\n\n // data from API\n $data = [];\n $dataOriginal = json_decode($res->content, true);\n $data = $dataOriginal['data'];\n\n\n // Finalize data. [id, currency_id, price]\n $currencies = array_map(function($currency) use($data, $exchangeRate){\n $dataAvailable = true;\n if(is_array($currency['currency_id'])){\n foreach($currency['currency_id'] as $i){\n if(!isset($data[$i])){\n $dataAvailable = false;\n }\n }\n } else {\n $dataAvailable = isset($data[$currency['currency_id']]);\n }\n\n\n if($dataAvailable){\n if(is_array($currency['currency_id'])){ // 2 step\n $level1 = doubleval($data[$currency['currency_id'][0]]['closing_price']) / $exchangeRate;\n $level2 = doubleval($data[$currency['currency_id'][1]]['closing_price']) / $exchangeRate;\n $currency['price'] = $level1 * $level2;\n }\n else { // 1 step: string\n $currency['price'] = doubleval($data[$currency['currency_id']]['closing_price']) / $exchangeRate;\n }\n\n }\n else {\n $currency['price'] = null;\n }\n\n return $currency;\n\n }, $currencies);\n\n\n return $currencies;\n\n\n }", "function pms_get_currencies() {\r\n\r\n $currencies = array(\r\n 'USD' => __( 'US Dollar', 'paid-member-subscriptions' ),\r\n 'EUR' => __( 'Euro', 'paid-member-subscriptions' ),\r\n 'GBP' => __( 'Pound Sterling', 'paid-member-subscriptions' ),\r\n 'CAD' => __( 'Canadian Dollar', 'paid-member-subscriptions' ),\r\n 'AUD' => __( 'Australian Dollar', 'paid-member-subscriptions' ),\r\n 'BRL' => __( 'Brazilian Real', 'paid-member-subscriptions' ),\r\n 'CZK' => __( 'Czech Koruna', 'paid-member-subscriptions' ),\r\n 'DKK' => __( 'Danish Krone', 'paid-member-subscriptions' ),\r\n 'HKD' => __( 'Hong Kong Dollar', 'paid-member-subscriptions' ),\r\n 'HUF' => __( 'Hungarian Forint', 'paid-member-subscriptions' ),\r\n 'ILS' => __( 'Israeli New Sheqel', 'paid-member-subscriptions' ),\r\n 'JPY' => __( 'Japanese Yen', 'paid-member-subscriptions' ),\r\n 'MYR' => __( 'Malaysian Ringgit', 'paid-member-subscriptions' ),\r\n 'MXN' => __( 'Mexican Peso', 'paid-member-subscriptions' ),\r\n 'NOK' => __( 'Norwegian Krone', 'paid-member-subscriptions' ),\r\n 'NZD' => __( 'New Zealand Dollar', 'paid-member-subscriptions' ),\r\n 'PHP' => __( 'Philippine Peso', 'paid-member-subscriptions' ),\r\n 'PLN' => __( 'Polish Zloty', 'paid-member-subscriptions' ),\r\n 'RUB' => __( 'Russian Ruble', 'paid-member-subscriptions' ),\r\n 'SGD' => __( 'Singapore Dollar', 'paid-member-subscriptions' ),\r\n 'SEK' => __( 'Swedish Krona', 'paid-member-subscriptions' ),\r\n 'CHF' => __( 'Swiss Franc', 'paid-member-subscriptions' ),\r\n 'TWD' => __( 'Taiwan New Dollar', 'paid-member-subscriptions' ),\r\n 'THB' => __( 'Thai Baht', 'paid-member-subscriptions' ),\r\n 'TRY' => __( 'Turkish Lira', 'paid-member-subscriptions' )\r\n );\r\n\r\n return apply_filters( 'pms_currencies', $currencies );\r\n\r\n }", "public function getCurrencyAndSymbol()\n {\n if($this->custom_checkbox1 == 'y'){\n return array('currency' => 'USD', 'symbol' => '$');\n }\n else if($this->location_1){\n return DBQuery::execute(function(){\n $main = DBConnection::getInstance()->getMain();\n $sql = $main->prepare(\"SELECT currency, symbol FROM Location_1 \"\n . \"WHERE id=:id\");\n $sql->bindParam(':id', $this->location_1);\n $sql->execute();\n return $sql->fetch(\\PDO::FETCH_BOTH);\n });\n }\n else{\n return array('currency' => 'USD', 'symbol' => '$');\n } \n }", "function get_currency($bank_name) {\n $currency_link = 'http://resources.finance.ua/ua/public/currency-cash.json';\n $currency_json = file_get_contents($currency_link);\n $file_content = json_decode($currency_json);\n $banks = $file_content -> organizations;\n\n foreach ($banks as $value) {\n $bank = $value->title;\n if ($bank == $bank_name) {\n $eur_usd_rub = $value->currencies;\n $USD = $eur_usd_rub->USD;\n $EUR = $eur_usd_rub->EUR;\n $RUB = $eur_usd_rub->RUB;\n\n $result = array('eur' => $EUR->ask, 'usd' => $USD->ask, 'rub'=>$RUB->ask,);\n\n return $result;\n }\n }\n}", "public function getAllCurrenciesToParse() {\n $currencies = $this->database->queryToSelect(\n \"SELECT cryptocurrency_info.id AS info_id, cryptocurrency_info.value_to_usd, cryptocurrency_info.value_to_btc, cryptocurrency_info.currency_symbol, all_cryptocurrency.id AS currency_id, all_cryptocurrency.name AS currency_name, all_cryptocurrency.code AS currency_code, burse.id AS burse_id, burse.name AS burse_name, burse.code AS burse_code\n FROM cryptocurrency_info\n LEFT JOIN all_cryptocurrency ON cryptocurrency_info.currency_id = all_cryptocurrency.id\n LEFT JOIN burse ON cryptocurrency_info.burse_id = burse.id\"\n );\n $currencies_to_parse = [];\n foreach ($currencies as $currency) {\n $currencies_to_parse[$currency['burse_code']][$currency['currency_symbol']] = $currency;\n }\n return $currencies_to_parse;\n }", "public function getCurrencies(): array\n {\n $out = $this->request('getCurrencies');\n return $out['result'];\n }", "public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }", "public function getSourceCurrency();", "function GetOurCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetOurCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}", "function getCurrencyRates() {\n\t// If you change these, make sure to also update any JS validation scripts\n\t// For now I'm not rounding numbers under 1 because I don't think that's a big issue and could cause issues with the max check.\n\t$currencyRates = array(\n\t\t'AED' => '4',\n\t\t'ARS' => '4',\n\t\t'AUD' => '1',\n\t\t'BBD' => '2',\n\t\t'BDT' => '76',\n\t\t'BGN' => '1',\n\t\t'BHD' => '0.4',\n\t\t'BMD' => '1',\n\t\t'BND' => '1',\n\t\t'BOB' => '7',\n\t\t'BRL' => '2',\n\t\t'BSD' => '1',\n\t\t'BZD' => '2',\n\t\t'CAD' => '1',\n\t\t'CHF' => '0.9',\n\t\t'CLP' => '494',\n\t\t'CNY' => '6',\n\t\t'COP' => '1910',\n\t\t'CRC' => '512',\n\t\t'CZK' => '18',\n\t\t'DKK' => '5',\n\t\t'DOP' => '38',\n\t\t'DZD' => '73',\n\t\t'EEK' => '11',\n\t\t'EGP' => '6',\n\t\t'EUR' => '0.7',\n\t\t'GBP' => '0.6',\n\t\t'GTQ' => '8',\n\t\t'HKD' => '8',\n\t\t'HNL' => '19',\n\t\t'HRK' => '5',\n\t\t'HUF' => '219',\n\t\t'IDR' => '8960',\n\t\t'ILS' => '4',\n\t\t'INR' => '49',\n\t\t'JMD' => '85',\n\t\t'JOD' => '0.7',\n\t\t'JPY' => '78',\n\t\t'KES' => '97',\n\t\t'KRW' => '1127',\n\t\t'KYD' => '0.8',\n\t\t'KZT' => '147',\n\t\t'LBP' => '1500',\n\t\t'LKR' => '110',\n\t\t'LTL' => '2',\n\t\t'LVL' => '0.5',\n\t\t'MAD' => '8',\n\t\t'MKD' => '45',\n\t\t'MUR' => '29',\n\t\t'MVR' => '15',\n\t\t'MXN' => '13',\n\t\t'MYR' => '3',\n\t\t'NOK' => '5',\n\t\t'NZD' => '1',\n\t\t'OMR' => '0.3',\n\t\t'PAB' => '1',\n\t\t'PEN' => '3',\n\t\t'PHP' => '43',\n\t\t'PKR' => '86',\n\t\t'PLN' => '3',\n\t\t'PYG' => '4190',\n\t\t'QAR' => '4',\n\t\t'RON' => '3',\n\t\t'RUB' => '30',\n\t\t'SAR' => '4',\n\t\t'SEK' => '6',\n\t\t'SGD' => '1',\n\t\t'SVC' => '9',\n\t\t'THB' => '30',\n\t\t'TJS' => '5',\n\t\t'TND' => '1',\n\t\t'TRY' => '2',\n\t\t'TTD' => '6',\n\t\t'TWD' => '30',\n\t\t'UAH' => '8',\n\t\t'USD' => '1',\n\t\t'UYU' => '19',\n\t\t'UZS' => '1760',\n\t\t'VND' => '21000',\n\t\t'XAF' => '470',\n\t\t'XCD' => '3',\n\t\t'XOF' => '476',\n\t\t'ZAR' => '8',\n\t);\n\t\n\treturn $currencyRates;\n}", "function get_carton_currencies() {\n\treturn array_unique(\n\t\tapply_filters( 'carton_currencies',\n\t\t\tarray(\n\t\t\t\t'RUB' => __( 'Russian Rubles (RUB, new currency code 643, since 2001)', 'carton' ),\n\t\t\t\t'RUR' => __( 'Russian Rubles (RUR, old currency code 810, before 2001)', 'carton' ),\n\t\t\t\t'AUD' => __( 'Australian Dollars', 'carton' ),\n\t\t\t\t'BRL' => __( 'Brazilian Real', 'carton' ),\n\t\t\t\t'CAD' => __( 'Canadian Dollars', 'carton' ),\n\t\t\t\t'RMB' => __( 'Chinese Yuan', 'carton' ),\n\t\t\t\t'CZK' => __( 'Czech Koruna', 'carton' ),\n\t\t\t\t'DKK' => __( 'Danish Krone', 'carton' ),\n\t\t\t\t'EUR' => __( 'Euros', 'carton' ),\n\t\t\t\t'HKD' => __( 'Hong Kong Dollar', 'carton' ),\n\t\t\t\t'HUF' => __( 'Hungarian Forint', 'carton' ),\n\t\t\t\t'IDR' => __( 'Indonesia Rupiah', 'carton' ),\n\t\t\t\t'INR' => __( 'Indian Rupee', 'carton' ),\n\t\t\t\t'ILS' => __( 'Israeli Shekel', 'carton' ),\n\t\t\t\t'JPY' => __( 'Japanese Yen', 'carton' ),\n\t\t\t\t'KRW' => __( 'South Korean Won', 'carton' ),\n\t\t\t\t'MYR' => __( 'Malaysian Ringgits', 'carton' ),\n\t\t\t\t'MXN' => __( 'Mexican Peso', 'carton' ),\n\t\t\t\t'NOK' => __( 'Norwegian Krone', 'carton' ),\n\t\t\t\t'NZD' => __( 'New Zealand Dollar', 'carton' ),\n\t\t\t\t'PHP' => __( 'Philippine Pesos', 'carton' ),\n\t\t\t\t'PLN' => __( 'Polish Zloty', 'carton' ),\n\t\t\t\t'GBP' => __( 'Pounds Sterling', 'carton' ),\n\t\t\t\t'RON' => __( 'Romanian Leu', 'carton' ),\n\t\t\t\t'SGD' => __( 'Singapore Dollar', 'carton' ),\n\t\t\t\t'ZAR' => __( 'South African rand', 'carton' ),\n\t\t\t\t'SEK' => __( 'Swedish Krona', 'carton' ),\n\t\t\t\t'CHF' => __( 'Swiss Franc', 'carton' ),\n\t\t\t\t'TWD' => __( 'Taiwan New Dollars', 'carton' ),\n\t\t\t\t'THB' => __( 'Thai Baht', 'carton' ),\n\t\t\t\t'TRY' => __( 'Turkish Lira', 'carton' ),\n\t\t\t\t'USD' => __( 'US Dollars', 'carton' ),\n\t\t\t)\n\t\t)\n\t);\n}", "public function getCurrency(): string;", "public function getCurrency(): string;", "function erp_get_currencies() {\n return apply_filters( 'erp_currencies', [\n 'AFN' => __( 'Afghan Afghani', 'erp' ),\n 'ALL' => __( 'Albanian Lek', 'erp' ),\n 'DZD' => __( 'Algerian Dinar', 'erp' ),\n 'ADP' => __( 'Andorran Peseta', 'erp' ),\n 'AOA' => __( 'Angolan Kwanza', 'erp' ),\n 'ARA' => __( 'Argentine Austral', 'erp' ),\n 'ARS' => __( 'Argentine Peso', 'erp' ),\n 'AMD' => __( 'Armenian Dram', 'erp' ),\n 'AWG' => __( 'Aruban Florin', 'erp' ),\n 'AUD' => __( 'Australian Dollar', 'erp' ),\n 'ATS' => __( 'Austrian Schilling', 'erp' ),\n 'AZN' => __( 'Azerbaijani Manat', 'erp' ),\n 'BSD' => __( 'Bahamian Dollar', 'erp' ),\n 'BHD' => __( 'Bahraini Dinar', 'erp' ),\n 'BDT' => __( 'Bangladeshi Taka', 'erp' ),\n 'BBD' => __( 'Barbadian Dollar', 'erp' ),\n 'BYR' => __( 'Belarusian Ruble', 'erp' ),\n 'BEF' => __( 'Belgian Franc', 'erp' ),\n 'BZD' => __( 'Belize Dollar', 'erp' ),\n 'BMD' => __( 'Bermudan Dollar', 'erp' ),\n 'BTN' => __( 'Bhutanese Ngultrum', 'erp' ),\n 'BOB' => __( 'Bolivian Boliviano', 'erp' ),\n 'BOV' => __( 'Bolivian Mvdol', 'erp' ),\n 'BOP' => __( 'Bolivian Peso', 'erp' ),\n 'BAM' => __( 'Bosnia-Herzegovina Convertible Mark', 'erp' ),\n 'BWP' => __( 'Botswanan Pula', 'erp' ),\n 'BRL' => __( 'Brazilian Real', 'erp' ),\n 'GBP' => __( 'British Pound Sterling', 'erp' ),\n 'BND' => __( 'Brunei Dollar', 'erp' ),\n 'BGN' => __( 'Bulgarian Lev', 'erp' ),\n 'BUK' => __( 'Burmese Kyat', 'erp' ),\n 'BIF' => __( 'Burundian Franc', 'erp' ),\n 'KHR' => __( 'Cambodian Riel', 'erp' ),\n 'CAD' => __( 'Canadian Dollar', 'erp' ),\n 'CVE' => __( 'Cape Verdean Escudo', 'erp' ),\n 'KYD' => __( 'Cayman Islands Dollar', 'erp' ),\n 'XOF' => __( 'CFA Franc BCEAO', 'erp' ),\n 'XAF' => __( 'CFA Franc BEAC', 'erp' ),\n 'XPF' => __( 'CFP Franc', 'erp' ),\n 'CLP' => __( 'Chilean Peso', 'erp' ),\n 'CNY' => __( 'Chinese Yuan', 'erp' ),\n 'COP' => __( 'Colombian Peso', 'erp' ),\n 'KMF' => __( 'Comorian Franc', 'erp' ),\n 'CDF' => __( 'Congolese Franc', 'erp' ),\n 'CRC' => __( 'Costa Rican Colón', 'erp' ),\n 'HRK' => __( 'Croatian Kuna', 'erp' ),\n 'CUP' => __( 'Cuban Peso', 'erp' ),\n 'CYP' => __( 'Cypriot Pound', 'erp' ),\n 'CZK' => __( 'Czech Republic Koruna', 'erp' ),\n 'DKK' => __( 'Danish Krone', 'erp' ),\n 'DJF' => __( 'Djiboutian Franc', 'erp' ),\n 'DOP' => __( 'Dominican Peso', 'erp' ),\n 'NLG' => __( 'Dutch Guilder', 'erp' ),\n 'XCD' => __( 'East Caribbean Dollar', 'erp' ),\n 'ECS' => __( 'Ecuadorian Sucre', 'erp' ),\n 'EGP' => __( 'Egyptian Pound', 'erp' ),\n 'GQE' => __( 'Equatorial Guinean Ekwele', 'erp' ),\n 'ERN' => __( 'Eritrean Nakfa', 'erp' ),\n 'EEK' => __( 'Estonian Kroon', 'erp' ),\n 'ETB' => __( 'Ethiopian Birr', 'erp' ),\n 'EUR' => __( 'Euro', 'erp' ),\n 'FKP' => __( 'Falkland Islands Pound', 'erp' ),\n 'FJD' => __( 'Fijian Dollar', 'erp' ),\n 'FIM' => __( 'Finnish Markka', 'erp' ),\n 'FRF' => __( 'French Franc', 'erp' ),\n 'GMD' => __( 'Gambian Dalasi', 'erp' ),\n 'GEL' => __( 'Georgian Lari', 'erp' ),\n 'DEM' => __( 'German Mark', 'erp' ),\n 'GHS' => __( 'Ghanaian Cedi', 'erp' ),\n 'GIP' => __( 'Gibraltar Pound', 'erp' ),\n 'GRD' => __( 'Greek Drachma', 'erp' ),\n 'GTQ' => __( 'Guatemalan Quetzal', 'erp' ),\n 'GWP' => __( 'Guinea-Bissau Peso', 'erp' ),\n 'GNF' => __( 'Guinean Franc', 'erp' ),\n 'GYD' => __( 'Guyanaese Dollar', 'erp' ),\n 'HTG' => __( 'Haitian Gourde', 'erp' ),\n 'HNL' => __( 'Honduran Lempira', 'erp' ),\n 'HKD' => __( 'Hong Kong Dollar', 'erp' ),\n 'HUF' => __( 'Hungarian Forint', 'erp' ),\n 'ISK' => __( 'Icelandic Króna', 'erp' ),\n 'INR' => __( 'Indian Rupee', 'erp' ),\n 'IDR' => __( 'Indonesian Rupiah', 'erp' ),\n 'IRR' => __( 'Iranian Rial', 'erp' ),\n 'IQD' => __( 'Iraqi Dinar', 'erp' ),\n 'IEP' => __( 'Irish Pound', 'erp' ),\n 'ILS' => __( 'Israeli New Sheqel', 'erp' ),\n 'ITL' => __( 'Italian Lira', 'erp' ),\n 'JMD' => __( 'Jamaican Dollar', 'erp' ),\n 'JPY' => __( 'Japanese Yen', 'erp' ),\n 'JOD' => __( 'Jordanian Dinar', 'erp' ),\n 'KZT' => __( 'Kazakhstani Tenge', 'erp' ),\n 'KES' => __( 'Kenyan Shilling', 'erp' ),\n 'KWD' => __( 'Kuwaiti Dinar', 'erp' ),\n 'KGS' => __( 'Kyrgystani Som', 'erp' ),\n 'LAK' => __( 'Laotian Kip', 'erp' ),\n 'LVL' => __( 'Latvian Lats', 'erp' ),\n 'LBP' => __( 'Lebanese Pound', 'erp' ),\n 'LSL' => __( 'Lesotho Loti', 'erp' ),\n 'LRD' => __( 'Liberian Dollar', 'erp' ),\n 'LYD' => __( 'Libyan Dinar', 'erp' ),\n 'LTL' => __( 'Lithuanian Litas', 'erp' ),\n 'LTT' => __( 'Lithuanian Talonas', 'erp' ),\n 'LUF' => __( 'Luxembourgian Franc', 'erp' ),\n 'MOP' => __( 'Macanese Pataca', 'erp' ),\n 'MKD' => __( 'Macedonian Denar', 'erp' ),\n 'MGA' => __( 'Malagasy Ariary', 'erp' ),\n 'MWK' => __( 'Malawian Kwacha', 'erp' ),\n 'MYR' => __( 'Malaysian Ringgit', 'erp' ),\n 'MVR' => __( 'Maldivian Rufiyaa', 'erp' ),\n 'MLF' => __( 'Malian Franc', 'erp' ),\n 'MTL' => __( 'Maltese Lira', 'erp' ),\n 'MRO' => __( 'Mauritanian Ouguiya', 'erp' ),\n 'MUR' => __( 'Mauritian Rupee', 'erp' ),\n 'MXN' => __( 'Mexican Peso', 'erp' ),\n 'MDL' => __( 'Moldovan Leu', 'erp' ),\n 'MCF' => __( 'Monegasque Franc', 'erp' ),\n 'MNT' => __( 'Mongolian Tugrik', 'erp' ),\n 'MAD' => __( 'Moroccan Dirham', 'erp' ),\n 'MZN' => __( 'Mozambican Metical', 'erp' ),\n 'MMK' => __( 'Myanmar Kyat', 'erp' ),\n 'NAD' => __( 'Namibian Dollar', 'erp' ),\n 'NPR' => __( 'Nepalese Rupee', 'erp' ),\n 'ANG' => __( 'Netherlands Antillean Guilder', 'erp' ),\n 'TWD' => __( 'New Taiwan Dollar', 'erp' ),\n 'NZD' => __( 'New Zealand Dollar', 'erp' ),\n 'NIO' => __( 'Nicaraguan Córdoba', 'erp' ),\n 'NGN' => __( 'Nigerian Naira', 'erp' ),\n 'KPW' => __( 'North Korean Won', 'erp' ),\n 'NOK' => __( 'Norwegian Krone', 'erp' ),\n 'OMR' => __( 'Omani Rial', 'erp' ),\n 'PKR' => __( 'Pakistani Rupee', 'erp' ),\n 'PAB' => __( 'Panamanian Balboa', 'erp' ),\n 'PGK' => __( 'Papua New Guinean Kina', 'erp' ),\n 'PYG' => __( 'Paraguayan Guarani', 'erp' ),\n 'PEI' => __( 'Peruvian Inti', 'erp' ),\n 'PHP' => __( 'Philippine Peso', 'erp' ),\n 'PLN' => __( 'Polish Zloty', 'erp' ),\n 'PTE' => __( 'Portuguese Escudo', 'erp' ),\n 'QAR' => __( 'Qatari Rial', 'erp' ),\n 'RHD' => __( 'Rhodesian Dollar', 'erp' ),\n 'RON' => __( 'Romanian Leu', 'erp' ),\n 'RUB' => __( 'Russian Ruble', 'erp' ),\n 'RWF' => __( 'Rwandan Franc', 'erp' ),\n 'SVC' => __( 'Salvadoran Colón', 'erp' ),\n 'WST' => __( 'Samoan Tala', 'erp' ),\n 'STD' => __( 'São Tomé & Príncipe Dobra', 'erp' ),\n 'SAR' => __( 'Saudi Riyal', 'erp' ),\n 'RSD' => __( 'Serbian Dinar', 'erp' ),\n 'SCR' => __( 'Seychellois Rupee', 'erp' ),\n 'SLL' => __( 'Sierra Leonean Leone', 'erp' ),\n 'SGD' => __( 'Singapore Dollar', 'erp' ),\n 'SKK' => __( 'Slovak Koruna', 'erp' ),\n 'SIT' => __( 'Slovenian Tolar', 'erp' ),\n 'SBD' => __( 'Solomon Islands Dollar', 'erp' ),\n 'SOS' => __( 'Somali Shilling', 'erp' ),\n 'ZAR' => __( 'South African Rand', 'erp' ),\n 'KRW' => __( 'South Korean Won', 'erp' ),\n 'SSP' => __( 'South Sudanese Pound', 'erp' ),\n 'ESP' => __( 'Spanish Peseta', 'erp' ),\n 'LKR' => __( 'Sri Lankan Rupee', 'erp' ),\n 'SHP' => __( 'St. Helena Pound', 'erp' ),\n 'SDG' => __( 'Sudanese Pound', 'erp' ),\n 'SRD' => __( 'Surinamese Dollar', 'erp' ),\n 'SZL' => __( 'Swazi Lilangeni', 'erp' ),\n 'SEK' => __( 'Swedish Krona', 'erp' ),\n 'CHF' => __( 'Swiss Franc', 'erp' ),\n 'SYP' => __( 'Syrian Pound', 'erp' ),\n 'TJS' => __( 'Tajikistani Somoni', 'erp' ),\n 'TZS' => __( 'Tanzanian Shilling', 'erp' ),\n 'THB' => __( 'Thai Baht', 'erp' ),\n 'TPE' => __( 'Timorese Escudo', 'erp' ),\n 'TOP' => __( 'Tongan Paʻanga', 'erp' ),\n 'TTD' => __( 'Trinidad & Tobago Dollar', 'erp' ),\n 'TND' => __( 'Tunisian Dinar', 'erp' ),\n 'TRY' => __( 'Turkish Lira', 'erp' ),\n 'TMT' => __( 'Turkmenistani Manat', 'erp' ),\n 'UGX' => __( 'Ugandan Shilling', 'erp' ),\n 'UAH' => __( 'Ukrainian Hryvnia', 'erp' ),\n 'AED' => __( 'United Arab Emirates Dirham', 'erp' ),\n 'UYU' => __( 'Uruguayan Peso', 'erp' ),\n 'USD' => __( 'US Dollar', 'erp' ),\n 'UZS' => __( 'Uzbekistan Som', 'erp' ),\n 'VUV' => __( 'Vanuatu Vatu', 'erp' ),\n 'VEF' => __( 'Venezuelan Bolívar', 'erp' ),\n 'VND' => __( 'Vietnamese Dong', 'erp' ),\n 'YER' => __( 'Yemeni Rial', 'erp' ),\n 'ZMW' => __( 'Zambian Kwacha', 'erp' ),\n 'ZWL' => __( 'Zimbabwean Dollar', 'erp' ),\n ] );\n}", "public function getCurrencies() {\n\t\t\t$currencies = CurrencyDenomination::all();\n\t\t\treturn response($currencies);\n\t\t}", "public static function get_supported_currencies() {\r\n\r\n\t\treturn array(\r\n\t\t\t'AED' => array( 'United Arab Emirates Dirham', '62F, 2E ,625' ),\r\n\t\t\t'AFN' => array( 'Afghan Afghani', '60b' ),\r\n\t\t\t'ALL' => array( 'Albanian Lek', '4c, 65, 6b' ),\r\n\t\t\t'AMD' => array( 'Armenian Dram', '58F' ),\r\n\t\t\t'ANG' => array( 'Netherlands Antillean Gulden', '192' ),\r\n\t\t\t'AOA' => array( 'Angolan Kwanza', '4B, 7A' ),\r\n\t\t\t'ARS' => array( 'Argentine Peso', '24' ),\r\n\t\t\t'AUD' => array( 'Australian Dollar', '24' ),\r\n\t\t\t'AWG' => array( 'Aruban Florin', '192' ),\r\n\t\t\t'AZN' => array( 'Azerbaijani Manat', '43c, 430, 43d' ),\r\n\t\t\t'BAM' => array( 'Bosnia & Herzegovina Convertible Mark', '4b, 4d' ),\r\n\t\t\t'BBD' => array( 'Barbadian Dollar', '24' ),\r\n\t\t\t'BDT' => array( 'Bangladeshi Taka', '09F3' ),\r\n\t\t\t'BGN' => array( 'Bulgarian Lev', '43b, 432' ),\r\n\t\t\t'BIF' => array( 'Burundian Franc', '46, 42, 75' ),\r\n\t\t\t'BMD' => array( 'Bermudian Dollar', '24' ),\r\n\t\t\t'BND' => array( 'Brunei Dollar', '24' ),\r\n\t\t\t'BOB' => array( 'Bolivian Boliviano', '24, 62' ),\r\n\t\t\t'BRL' => array( 'Brazilian Real', '52, 24' ),\r\n\t\t\t'BSD' => array( 'Bahamian Dollar', '24' ),\r\n\t\t\t'BWP' => array( 'Botswana Pula', '50' ),\r\n\t\t\t'BZD' => array( 'Belize Dollar', '42, 5a, 24' ),\r\n\t\t\t'CAD' => array( 'Canadian Dollar', '24' ),\r\n\t\t\t'CDF' => array( 'Congolese Franc', '46, 43' ),\r\n\t\t\t'CHF' => array( 'Swiss Franc', '43, 48, 46' ),\r\n\t\t\t'CLP' => array( 'Chilean Peso', '24' ),\r\n\t\t\t'CNY' => array( 'Chinese Renminbi Yuan', 'a5' ),\r\n\t\t\t'COP' => array( 'Colombian Peso', '24' ),\r\n\t\t\t'CRC' => array( 'Costa Rican Colón', '20a1' ),\r\n\t\t\t'CVE' => array( 'Cape Verdean Escudo', '24' ),\r\n\t\t\t'CZK' => array( 'Czech Koruna', '4b, 10d' ),\r\n\t\t\t'DJF' => array( 'Djiboutian Franc', '46, 64, 6A' ),\r\n\t\t\t'DKK' => array( 'Danish Krone', '6b, 72' ),\r\n\t\t\t'DOP' => array( 'Dominican Peso', '52, 44, 24' ),\r\n\t\t\t'DZD' => array( 'Algerian Dinar', '62F, 62C' ),\r\n\t\t\t'EEK' => array( 'Estonian Kroon', '6b, 72' ),\r\n\t\t\t'EGP' => array( 'Egyptian Pound', 'a3' ),\r\n\t\t\t'ETB' => array( 'Ethiopian Birr', '1265, 122D' ),\r\n\t\t\t'EUR' => array( 'Euro', '20ac' ),\r\n\t\t\t'FJD' => array( 'Fijian Dollar', '24' ),\r\n\t\t\t'FKP' => array( 'Falkland Islands Pound', 'a3' ),\r\n\t\t\t'GBP' => array( 'British Pound', 'a3' ),\r\n\t\t\t'GEL' => array( 'Georgian Lari', '10DA' ),\r\n\t\t\t'GIP' => array( 'Gibraltar Pound', 'a3' ),\r\n\t\t\t'GMD' => array( 'Gambian Dalasi', '44' ),\r\n\t\t\t'GNF' => array( 'Guinean Franc', '46, 47' ),\r\n\t\t\t'GTQ' => array( 'Guatemalan Quetzal', '51' ),\r\n\t\t\t'GYD' => array( 'Guyanese Dollar', '24' ),\r\n\t\t\t'HKD' => array( 'Hong Kong Dollar', '24' ),\r\n\t\t\t'HNL' => array( 'Honduran Lempira', '4c' ),\r\n\t\t\t'HRK' => array( 'Croatian Kuna', '6b, 6e' ),\r\n\t\t\t'HTG' => array( 'Haitian Gourde', '47' ),\r\n\t\t\t'HUF' => array( 'Hungarian Forint', '46, 74' ),\r\n\t\t\t'IDR' => array( 'Indonesian Rupiah', '52, 70' ),\r\n\t\t\t'ILS' => array( 'Israeli New Sheqel', '20aa' ),\r\n\t\t\t'INR' => array( 'Indian Rupee', '20B9' ),\r\n\t\t\t'ISK' => array( 'Icelandic Króna', '6b, 72' ),\r\n\t\t\t'JMD' => array( 'Jamaican Dollar', '4a, 24' ),\r\n\t\t\t'JPY' => array( 'Japanese Yen', 'a5' ),\r\n\t\t\t'KES' => array( 'Kenyan Shilling', '4B, 53, 68' ),\r\n\t\t\t'KGS' => array( 'Kyrgyzstani Som', '43b, 432' ),\r\n\t\t\t'KHR' => array( 'Cambodian Riel', '17db' ),\r\n\t\t\t'KMF' => array( 'Comorian Franc', '43, 46' ),\r\n\t\t\t'KRW' => array( 'South Korean Won', '20a9' ),\r\n\t\t\t'KYD' => array( 'Cayman Islands Dollar', '24' ),\r\n\t\t\t'KZT' => array( 'Kazakhstani Tenge', '43b, 432' ),\r\n\t\t\t'LAK' => array( 'Lao Kip', '20ad' ),\r\n\t\t\t'LBP' => array( 'Lebanese Pound', 'a3' ),\r\n\t\t\t'LKR' => array( 'Sri Lankan Rupee', '20a8' ),\r\n\t\t\t'LRD' => array( 'Liberian Dollar', '24' ),\r\n\t\t\t'LSL' => array( 'Lesotho Loti', '4C' ),\r\n\t\t\t'LTL' => array( 'Lithuanian Litas', '4c, 74' ),\r\n\t\t\t'LVL' => array( 'Latvian Lats', '4c, 73' ),\r\n\t\t\t'MAD' => array( 'Moroccan Dirham', '62F, 2E, 645, 2E' ),\r\n\t\t\t'MDL' => array( 'Moldovan Leu', '6C, 65, 69' ),\r\n\t\t\t'MGA' => array( 'Malagasy Ariary', '41, 72' ),\r\n\t\t\t'MKD' => array( 'Macedonian Denar', '434, 435, 43d' ),\r\n\t\t\t'MNT' => array( 'Mongolian Tögrög', '20ae' ),\r\n\t\t\t'MOP' => array( 'Macanese Pataca', '4D, 4F, 50, 24' ),\r\n\t\t\t'MRO' => array( 'Mauritanian Ouguiya', '55, 4D' ),\r\n\t\t\t'MUR' => array( 'Mauritian Rupee', '20a8' ),\r\n\t\t\t'MVR' => array( 'Maldivian Rufiyaa', '52, 66' ),\r\n\t\t\t'MWK' => array( 'Malawian Kwacha', '4D, 4B' ),\r\n\t\t\t'MXN' => array( 'Mexican Peso', '24' ),\r\n\t\t\t'MYR' => array( 'Malaysian Ringgit', '52, 4d' ),\r\n\t\t\t'MZN' => array( 'Mozambican Metical', '4d, 54' ),\r\n\t\t\t'NAD' => array( 'Namibian Dollar', '24' ),\r\n\t\t\t'NGN' => array( 'Nigerian Naira', '20a6' ),\r\n\t\t\t'NIO' => array( 'Nicaraguan Córdoba', '43, 24' ),\r\n\t\t\t'NOK' => array( 'Norwegian Krone', '6b, 72' ),\r\n\t\t\t'NPR' => array( 'Nepalese Rupee', '20a8' ),\r\n\t\t\t'NZD' => array( 'New Zealand Dollar', '24' ),\r\n\t\t\t'PAB' => array( 'Panamanian Balboa', '42, 2f, 2e' ),\r\n\t\t\t'PEN' => array( 'Peruvian Nuevo Sol', '53, 2f, 2e' ),\r\n\t\t\t'PGK' => array( 'Papua New Guinean Kina', '4B' ),\r\n\t\t\t'PHP' => array( 'Philippine Peso', '20b1' ),\r\n\t\t\t'PKR' => array( 'Pakistani Rupee', '20a8' ),\r\n\t\t\t'PLN' => array( 'Polish Złoty', '7a, 142' ),\r\n\t\t\t'PYG' => array( 'Paraguayan Guaraní', '47, 73' ),\r\n\t\t\t'QAR' => array( 'Qatari Riyal', 'fdfc' ),\r\n\t\t\t'RON' => array( 'Romanian Leu', '6c, 65, 69' ),\r\n\t\t\t'RSD' => array( 'Serbian Dinar', '414, 438, 43d, 2e' ),\r\n\t\t\t'RUB' => array( 'Russian Ruble', '440, 443, 431' ),\r\n\t\t\t'RWF' => array( 'Rwandan Franc', '52, 20A3' ),\r\n\t\t\t'SAR' => array( 'Saudi Riyal', 'fdfc' ),\r\n\t\t\t'SBD' => array( 'Solomon Islands Dollar', '24' ),\r\n\t\t\t'SCR' => array( 'Seychellois Rupee', '20a8' ),\r\n\t\t\t'SEK' => array( 'Swedish Krona', '6b, 72' ),\r\n\t\t\t'SGD' => array( 'Singapore Dollar', '24' ),\r\n\t\t\t'SHP' => array( 'Saint Helenian Pound', 'a3' ),\r\n\t\t\t'SLL' => array( 'Sierra Leonean Leone', '4C, 65' ),\r\n\t\t\t'SOS' => array( 'Somali Shilling', '53' ),\r\n\t\t\t'SRD' => array( 'Surinamese Dollar', '24' ),\r\n\t\t\t'STD' => array( 'São Tomé and Príncipe Dobra', '44, 62' ),\r\n\t\t\t'SVC' => array( 'Salvadoran Colón', '24' ),\r\n\t\t\t'SZL' => array( 'Swazi Lilangeni', '45' ),\r\n\t\t\t'THB' => array( 'Thai Baht', 'e3f' ),\r\n\t\t\t'TJS' => array( 'Tajikistani Somoni', '73, 6F, 6D, 6F, 6E, 69' ),\r\n\t\t\t'TOP' => array( 'Tongan Paʻanga', '54, 24' ),\r\n\t\t\t'TRY' => array( 'Turkish Lira', '20BA' ),\r\n\t\t\t'TTD' => array( 'Trinidad and Tobago Dollar', '54, 54, 24' ),\r\n\t\t\t'TWD' => array( 'New Taiwan Dollar', '4e, 54, 24' ),\r\n\t\t\t'TZS' => array( 'Tanzanian Shilling', '78, 2F, 79' ),\r\n\t\t\t'UAH' => array( 'Ukrainian Hryvnia', '20b4' ),\r\n\t\t\t'UGX' => array( 'Ugandan Shilling', '55, 53, 68' ),\r\n\t\t\t'USD' => array( 'United States Dollar', '24' ),\r\n\t\t\t'UYU' => array( 'Uruguayan Peso', '24, 55' ),\r\n\t\t\t'UZS' => array( 'Uzbekistani Som', '43b, 432' ),\r\n\t\t\t'VND' => array( 'Vietnamese Đồng', '20ab' ),\r\n\t\t\t'VUV' => array( 'Vanuatu Vatu', '56, 54' ),\r\n\t\t\t'WST' => array( 'Samoan Tala', '24' ),\r\n\t\t\t'XAF' => array( 'Central African Cfa Franc', '46, 43, 46, 41' ),\r\n\t\t\t'XCD' => array( 'East Caribbean Dollar', '24' ),\r\n\t\t\t'XOF' => array( 'West African Cfa Franc', '43, 46, 41' ),\r\n\t\t\t'XPF' => array( 'Cfp Franc', '46' ),\r\n\t\t\t'YER' => array( 'Yemeni Rial', 'fdfc' ),\r\n\t\t\t'ZAR' => array( 'South African Rand', '52' ),\r\n\t\t\t'ZMW' => array( 'Zambian Kwacha', '4B' ),\r\n\t\t);\r\n\t}", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getListCurrency()\n\t{\n\t\t$params = [\n\t\t\t'verify' => false,\n\t\t\t'query' => [\n\t\t\t\t'output' => Config::get( 'response.format' )\n\t\t\t]\n\t\t];\n\n\t\t$baseUrl = sprintf( Config::get( 'endpoints.base_url' ), Config::get( 'settings.api' ) ) . Config::get( 'endpoints.general_list_currency' );\n\n\t\ttry {\n\t\t\t$response = parent::send( 'GET', $baseUrl, $params );\n\t\t} catch (TiketException $e) {\n\t\t\tthrow parent::convertException( $e );\n\t\t}\n\n\t\treturn $response;\n\t}", "public static function getUSDCurrencyExchangeRates()\n { \n $ch = curl_init(_URL_YAHOOAPI);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n $html = curl_exec($ch);\n curl_close($ch);\n \n return json_decode($html);\n }", "public function getAllCurrencies()\n {\n $currencies = $this->repository->supplemental['codeMappings'];\n $datas = array();\n foreach (array_keys($currencies) as $currency_code) {\n if ($currency_code === 'XTS' || strlen($currency_code) !== 3) {\n continue;\n }\n $currency = $this->getCurrency($currency_code);\n $datas[] = array(\n 'name' => ucfirst($currency['name']).' ('.$currency_code.')',\n 'code' => $currency_code,\n 'iso_code' => $currency['iso_code']\n );\n }\n\n //sort array naturally\n uasort($datas, function ($x, $y) {\n return strnatcmp($x[\"name\"], $y[\"name\"]);\n });\n\n return $datas;\n }", "public function getCurrency(){\n return $this->currency;\n }", "public function getCurrency(): Currency;", "public function getBtncurrencyInGrivnas(){\n $data = json_decode(file_get_contents($this->url));\n $bitcoin = 0;\n foreach( $data as $obj ){\n if( $obj->code=='USD' )$bitcoin=$obj->rate;\n }\n\n\n $xml = simplexml_load_file(\"https://api.privatbank.ua/p24api/pubinfo?exchange&coursid=5\");\n $m = $xml->xpath('//exchangerate[@ccy=\"USD\"]');\n $exrate = (string)$m[0]['buy'];\n\n $uah = $bitcoin * $exrate;\n\n return '1 BTC = ' . $uah . ' UAH.';\n }", "function getExchangeRate($currency);", "public static function getCurrencies()\n {\n $currencies = [];\n\n foreach (static::$currencies as $currency)\n {\n $currencies[$currency] = $currency;\n }\n\n return $currencies;\n }", "public function returnCurrencies(): array\n {\n $currencies = [];\n foreach ($this->request('returnCurrencies') as $key => $response) {\n /* @var $currency Currency */\n $currencies[$key] = $this->factory(Currency::class, $response);\n }\n\n return $currencies;\n }", "public function getGlobalCurrencyCode();", "public function getCurrencyPerCountry()\n {\n return [\n self::SWEDEN => 'SEK',\n self::NORWAY => 'NOK',\n self::FINLAND => 'EUR',\n self::DENMARK => 'DKK',\n self::GERMANY => 'EUR'\n ];\n }", "public function getSupportedCurrencies()\n {\n return response()->json(Currency::all());\n }", "function calculateCurrency($prijs, $country)\r\n {\r\n }", "public function listCurrenciesWithExchangeRate()\n {\n $service_response = $this->exchange_service\n ->getCurrenciesWithExchangeRate(\n auth()->user(),\n );\n return $service_response->success\n ? Responser::send(200, $service_response->data, $service_response->message)\n : Responser::sendError(400, $service_response->message, $service_response->message);\n }", "private function getCurrencySymbols()\n {\n $currencySymbols = [\n [\n 'website_id' => $this->allWebsitesOptionId,\n 'symbol' => $this->getCurrencySymbolByCode($this->getBaseCurrencyCode()),\n ]\n ];\n $websites = $this->storeManager->getWebsites();\n foreach ($websites as $website) {\n $currencySymbols[] = [\n 'website_id' => (int)$website->getId(),\n 'symbol' => $this->getCurrencySymbolByCode($website->getBaseCurrencyCode()),\n ];\n }\n return $currencySymbols;\n }", "public function getOrderCurrencyCode();", "function erp_get_currency_list_with_symbol() {\n $currencies = erp_get_currencies();\n $currency_symbols = erp_get_currency_symbol();\n $currency_list = [];\n\n foreach ( $currencies as $iso => $currency ) {\n $symbol = isset( $currency_symbols[ $iso ] ) ? $currency_symbols[ $iso ] : $iso;\n\n $currency_list[ $iso ] = sprintf( '%1$s (%2$s)', $currency, $symbol );\n }\n\n return $currency_list;\n}", "public function getTargetCurrency();", "private function _update_currency_conversion_rate(){\n\t\t\t$query = \"SELECT `serial_num`, `\".$this->table_fields['currency_iso_code'].\"` as 'currency_iso_code' FROM `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` where `record_status`='1' AND `modification_date` < \".(date(\"U\") - (3600*24));\n\t\t\t$query_settings = array(\n\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n \n //get exchange rate\n $all_country_list = execute_sql_query($query_settings);\n\t\t\t$return = array();\n \n\t\t\tif( is_array( $all_country_list ) && ! empty( $all_country_list ) ){\n\t\t\t\t$query_settings['query_type'] = 'UPDATE';\n \n $first = true;\n foreach( $all_country_list as $val ){\n\t\t\t\t\tif( $val['currency_iso_code'] ){\n $json = file_get_contents('http://rate-exchange.appspot.com/currency?from=USD&to='.strtoupper($val['currency_iso_code']) );\n if($json)$cur = json_decode($json, true);\n if( isset( $cur['rate'] ) && $cur['rate'] ){\n $return[] = $cur;\n \n $query_settings['query'] = \"UPDATE `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` SET `\".$this->table_fields['conversion_rate'].\"`= '\".$cur['rate'].\"' WHERE `serial_num`='\".$val['serial_num'].\"' \";\n \n execute_sql_query($query_settings);\n \n if( $first ){\n $query_settings['tables'] = array();\n $query_settings['set_memcache'] = 0;\n $first = false;\n }\n }\n }\n\t\t\t\t}\n \n $this->class_settings[ 'do_not_check_cache' ] = 1;\n $this->_get_country_list();\n }\n \n return $return;\n }", "public function getCurrency()\n {\n try {\n $currencyCode = $this->store->getCurrentCurrencyCode();\n $currencyObj = $this->locale->currency($currencyCode);\n $currency = array(\n 'isoCode' => $currencyCode,\n 'isoCodeNum' => null,\n 'name' => $currencyObj->getName(),\n 'sign' => $currencyObj->getSymbol()\n );\n } catch (Exception $exception) {\n $this->exceptionHandler->logException($exception);\n\n $currency = array(\n 'isoCode' => null,\n 'isoCodeNum' => null,\n 'name' => null,\n 'sign' => null\n );\n }\n\n return $currency;\n }", "public function getCurrenciesAction()\n {\n $repository = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Currency');\n\n $builder = $repository->createQueryBuilder('c');\n $builder->select(\n [\n 'c.id as id',\n 'c.name as name',\n 'c.currency as currency',\n 'c.symbol as symbol',\n 'c.factor as factor',\n 'c.default as default'\n ]\n );\n\n $query = $builder->getQuery();\n\n $total = Shopware()->Models()->getQueryCount($query);\n\n $data = $query->getArrayResult();\n\n $this->View()->assign(\n [\n 'success' => true,\n 'data' => $data,\n 'total' => $total\n ]\n );\n }", "public static function getInfoForCurrencies(): array\n {\n if (null !== self::$currencies) {\n self::$currencies;\n }\n\n try {\n $data = YamlService::getFromFile(__DIR__ . '/Resources/config/currencies.yml');\n // Select lang in config of currencies...\n $data['currencies'] = self::defineCurrencyLang($data['currencies']);\n self::$currencies = $data['currencies'];\n\n return self::$currencies;\n } catch (FileNotFoundException $exception) {\n // @todo we need some error handling but the application don't need to crash!\n }\n\n return [];\n }", "function GetBaseCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetBaseCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCurrency()\n {\n return $this->getData(self::CURRENCY);\n }", "public function getCurrencies()\n {\n return $this->hasMany(Currency::className(), ['ap_gl_acc_id' => 'account_id']);\n }", "public function getStoreCurrencyCode();", "public function getBaseCurrencyCode();", "function GetDB_CurrencyList($order_asc = false) {\n $query = \"SELECT * FROM conversion_rates \".(($order_asc) ? \"ORDER BY currency ASC\" : \"\").\";\";\n $result = $GLOBALS['conn']->query($query);\n $rows = [];\n while($row = mysqli_fetch_array($result)) {\n $rows[] = $row;\n }\n return $rows;\n }", "private function jeeb_available_coins_list()\n {\n $currencies = [\n \"BTC\" => \"BTC (Bitcoin)\",\n \"ETH\" => \"ETH (Ethereum)\",\n \"DOGE\" => \"DOGE (Dogecoin)\",\n \"LTC\" => \"LTC (Litecoin)\",\n \"USDT\" => \"USDT (TetherUS)\",\n \"BNB\" => \"BNB (BNB)\",\n \"USDC\" => \"USDC (USD Coin)\",\n \"ZRX\" => \"ZRX (0x)\",\n \"LINK\" => \"LINK (ChainLink)\",\n \"PAX\" => \"PAX (Paxos Standard)\",\n \"DAI\" => \"DAI (Dai)\",\n \"TBTC\" => \"TBTC (Bitcoin Testnet)\",\n \"TETH\" => \"TETH (Ethereum Testnet)\",\n ];\n\n return $currencies;\n }", "public static function getCurrencies(): array\n {\n return Config::get('bazar.currencies.available', []);\n }", "public function getCurrency()\n {\n return \"/V1/directory/currency\";\n }", "function &getAll()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n \r\n $return_array = array();\r\n $currency_array = array();\r\n \r\n $db->array_query( $currency_array, \"SELECT ID FROM eZTrade_AlternativeCurrency ORDER BY Created\" );\r\n \r\n for ( $i=0; $i < count($currency_array); $i++ )\r\n {\r\n $return_array[$i] = new eZProductCurrency( $currency_array[$i][$db->fieldName( \"ID\" )], 0 );\r\n }\r\n \r\n return $return_array;\r\n }", "private function jeeb_available_currencies_list()\n {\n $currencies = [\n \"IRT\" => \"IRT (Toman)\",\n \"IRR\" => \"IRR (Rial)\",\n \"BTC\" => \"BTC (Bitcoin)\",\n \"USD\" => \"USD (US Dollar)\",\n \"USDT\" => \"USDT (TetherUS)\",\n \"EUR\" => \"EUR (Euro)\",\n \"GBP\" => \"GBP (Pound)\",\n \"CAD\" => \"CAD (CA Dollar)\",\n \"AUD\" => \"AUD (AU Dollar)\",\n \"JPY\" => \"JPY (Yen)\",\n \"CNY\" => \"CNY (Yuan)\",\n \"AED\" => \"AED (Dirham)\",\n \"TRY\" => \"TRY (Lira)\",\n ];\n\n return $currencies;\n }", "public function currencies(): CurrenciesResponse\n {\n $payload = Payload::list('currencies');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return CurrenciesResponse::from(attributes: (array) $result->json('data'));\n }", "public function getConfigBaseCurrencies()\n {\n $defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);\n return $defaultCurrencies;\n }", "public function getAllowedCurrencies() {\r\n\t\treturn $this->_storeManager->getStore()->getAllowedCurrencies();\r\n\t}", "public function getUseExchangeRates();", "public static function get_currency_per_country()\n {\n $cachekey = \"EcommerceCurrencyCountryMatrix\";\n $cache = SS_Cache::factory('CountryPrice_EcommerceCurrency');\n if (! ($serializedArray = $cache->load($cachekey))) {\n $countries = CountryPrice_EcommerceCountry::get_real_countries_list();\n $unserializedArray = array();\n $defaultCurrencyCode = EcommerceCurrency::default_currency_code();\n foreach ($countries as $countryObject) {\n $currencyCode = $defaultCurrencyCode;\n $currency = $countryObject->EcommerceCurrency();\n if ($currency && $currency->exists()) {\n $currencyCode = $currency->Code;\n }\n $countryObject = CountryPrice_EcommerceCountry::get_real_country($countryObject);\n $unserializedArray[$countryObject->Code] = $currencyCode;\n }\n $cache->save(serialize($unserializedArray), $cachekey);\n return $unserializedArray;\n }\n return unserialize($serializedArray);\n }", "private function getListCurrency(): array\n {\n $dom = new DOMDocument();\n $data = date('d/m/Y');\n $url = 'http://www.cbr.ru/scripts/XML_daily_eng.asp?date_req=' . $data;\n $arr = [];\n if ($dom->load($url)) {\n foreach ($dom->getElementsByTagName('Valute') as $el) {\n $arr[] = [\n 'id' => $el->attributes[0]->nodeValue,\n 'numCode' => $el->childNodes[0]->nodeValue,\n 'charCode' => $el->childNodes[1]->nodeValue,\n 'name' => $el->childNodes[3]->nodeValue\n ];\n }\n }\n return $arr;\n }", "public function getCurrencies0()\n {\n return $this->hasMany(Currency::className(), ['ap_disc_gl_acc_id' => 'account_id']);\n }", "public function getSupportedCurrencies()\n\t{\n\t\treturn array('RUB');\n\t}", "public function getCurrencies1()\n {\n return $this->hasMany(Currency::className(), ['ap_dp_gl_acc_id' => 'account_id']);\n }", "public function generate_currencies()\n {\n $this->load->model('Currency_model');\n $json = file_get_contents('https://free.currencyconverterapi.com/api/v6/currencies');\n $currencies = json_decode($json);\n foreach ($currencies->results as $currency) {\n echo json_encode($currency);\n $this->Currency_model->id_currency = $currency->id;\n $this->Currency_model->name = $currency->currencyName;\n if (property_exists($currency, \"currencySymbol\")) {\n $this->Currency_model->symbol = $currency->currencySymbol;\n } else {\n $this->Currency_model->symbol = null;\n }\n $this->Currency_model->insert();\n }\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public static function get_currencies($code = NULL)\n {\n $currencies = [\n 'AED' => [\n 'label' => 'United Arab Emirates Dirham',\n 'format' => 'after',\n 'locale' => 'ar_AE',\n 'symbol' => '&#x62f;&#x2e;&#x625;',\n 'decimal' => 2\n ],\n 'AFN' => [\n 'label' => 'Afghan Afghani',\n 'format' => 'after',\n 'locale' => 'fa_AF',\n 'symbol' => '&#1547;',\n 'decimal' => 2\n ],\n 'ALL' => [\n 'label' => 'Albanian Lek',\n 'format' => 'before',\n 'locale' => 'sq_AL',\n 'symbol' => 'Lek',\n 'decimal' => 2\n ],\n 'AMD' => [\n 'label' => 'Armenian Dram',\n 'format' => 'before',\n 'locale' => 'hy_AM',\n 'symbol' => '&#1423;',\n 'decimal' => 2\n ],\n 'ANG' => [\n 'label' => 'Netherlands Antillean Gulden',\n 'format' => 'before',\n 'locale' => 'nl_SX',\n 'symbol' => '&#402;',\n 'decimal' => 2\n ],\n 'AOA' => [\n 'label' => 'Angolan Kwanza',\n 'format' => 'before',\n 'locale' => 'pt_AO',\n 'symbol' => 'Kz;',\n 'decimal' => 2\n ],\n 'ARS' => [\n 'label' => 'Argentine Peso',\n 'format' => 'before',\n 'locale' => 'es_AR',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'AUD' => [\n 'label' => 'Australian Dollar',\n 'format' => 'before',\n 'locale' => 'en_AU',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'AWG' => [\n 'label' => 'Aruban Florin',\n 'format' => 'before',\n 'locale' => 'nl_AW',\n 'symbol' => '&#402;',\n 'decimal' => 2\n ],\n 'AZN' => [\n 'label' => 'Azerbaijani Manat',\n 'format' => 'before',\n 'locale' => 'az_Latn_AZ',\n 'symbol' => '&#8380;',\n 'decimal' => 2\n ],\n 'BAM' => [\n 'label' => 'Bosnia & Herzegovina Convertible Mark',\n 'format' => 'before',\n 'locale' => 'hr_BA',\n 'symbol' => 'KM',\n 'decimal' => 2\n ],\n 'BBD' => [\n 'label' => 'Barbadian Dollar',\n 'format' => 'before',\n 'locale' => 'en_BB',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'BDT' => [\n 'label' => 'Bangladeshi Taka',\n 'format' => 'before',\n 'locale' => 'bn_BD',\n 'symbol' => '&#2547;',\n 'decimal' => 2\n ],\n 'BGN' => [\n 'label' => 'Bulgarian Lev',\n 'format' => 'after',\n 'locale' => 'bg_BG',\n 'symbol' => 'лв',\n 'decimal' => 2\n ],\n 'BIF' => [\n 'label' => 'Burundian Franc',\n 'format' => 'before',\n 'locale' => 'rn_BI',\n 'symbol' => 'FBu',\n 'decimal' => 0\n ],\n 'BMD' => [\n 'label' => 'Bermudian Dollar',\n 'format' => 'before',\n 'locale' => 'en_BM',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'BND' => [\n 'label' => 'Brunei Dollar',\n 'format' => 'before',\n 'locale' => 'ms_Latn_BN',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'BOB' => [\n 'label' => 'Bolivian Boliviano',\n 'format' => 'before',\n 'locale' => 'es_BO',\n 'symbol' => 'Bs.',\n 'decimal' => 2\n ],\n 'BRL' => [\n 'label' => 'Brazilian Real',\n 'format' => 'before',\n 'locale' => 'pt_BR',\n 'symbol' => 'R$',\n 'decimal' => 2\n ],\n 'BSD' => [\n 'label' => 'Bahamian Dollar',\n 'format' => 'before',\n 'locale' => 'en_BS',\n 'symbol' => 'B$',\n 'decimal' => 2\n ],\n 'BWP' => [\n 'label' => 'Botswana Pula',\n 'format' => 'before',\n 'locale' => 'en_BW',\n 'symbol' => 'P',\n 'decimal' => 2\n ],\n 'BZD' => [\n 'label' => 'Belize Dollar',\n 'format' => 'before',\n 'locale' => 'en_BZ',\n 'symbol' => 'BZ$',\n 'decimal' => 2\n ],\n 'CAD' => [\n 'label' => 'Canadian Dollar',\n 'format' => 'before',\n 'locale' => 'en_CA',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'CDF' => [\n 'label' => 'Congolese Franc',\n 'format' => 'before',\n 'locale' => 'fr_CD',\n 'symbol' => 'FC',\n 'decimal' => 2\n ],\n 'CHF' => [\n 'label' => 'Swiss Franc',\n 'format' => 'before',\n 'locale' => 'fr_CH',\n 'symbol' => 'Fr',\n 'decimal' => 2\n ],\n 'CLP' => [\n 'label' => 'Chilean Peso',\n 'format' => 'before',\n 'locale' => 'es_CL',\n 'symbol' => '$',\n 'decimal' => 0\n ],\n 'CNY' => [\n 'label' => 'Chinese Renminbi Yuan',\n 'format' => 'before',\n 'locale' => 'zh_Hans_CN',\n 'symbol' => '&#165;',\n 'decimal' => 2\n ],\n 'COP' => [\n 'label' => 'Colombian Peso',\n 'format' => 'before',\n 'locale' => 'es_CO',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'CRC' => [\n 'label' => 'Costa Rican Colón',\n 'format' => 'before',\n 'locale' => 'es_CR',\n 'symbol' => '&#8353;',\n 'decimal' => 2\n ],\n 'CVE' => [\n 'label' => 'Cape Verdean Escudo',\n 'format' => 'before',\n 'locale' => 'pt_CV',\n 'symbol' => 'Esc',\n 'decimal' => 0\n ],\n 'CZK' => [\n 'label' => 'Czech Koruna',\n 'format' => 'after',\n 'locale' => 'cs_CZ',\n 'symbol' => 'Kč',\n 'decimal' => 2\n ],\n 'DJF' => [\n 'label' => 'Djiboutian Franc',\n 'format' => 'before',\n 'locale' => 'fr_DJ',\n 'symbol' => 'Fdj',\n 'decimal' => 0\n ],\n 'DKK' => [\n 'label' => 'Danish Krone',\n 'format' => 'before',\n 'locale' => 'da_DK',\n 'symbol' => 'kr',\n 'decimal' => 2\n ],\n 'DOP' => [\n 'label' => 'Dominican Peso',\n 'format' => 'before',\n 'locale' => 'es_DO',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'DZD' => [\n 'label' => 'Algerian Dinar',\n 'format' => 'before',\n 'locale' => 'fr_DZ',\n 'symbol' => '&#1583;.&#1580;',\n 'decimal' => 2\n ],\n 'EGP' => [\n 'label' => 'Egyptian Pound',\n 'format' => 'before',\n 'locale' => 'ar_EG',\n 'symbol' => 'E&pound;',\n 'decimal' => 2\n ],\n 'ETB' => [\n 'label' => 'Ethiopian Birr',\n 'format' => 'before',\n 'locale' => 'so_ET',\n 'symbol' => 'Br',\n 'decimal' => 2\n ],\n 'EUR' => [\n 'label' => 'Euro',\n 'format' => 'before',\n 'locale' => '',\n 'symbol' => '&euro;',\n 'decimal' => 2\n ],\n 'FJD' => [\n 'label' => 'Fijian Dollar',\n 'format' => 'before',\n 'locale' => 'en_FJ',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'FKP' => [\n 'label' => 'Falkland Islands Pound',\n 'format' => 'before',\n 'locale' => 'en_FK',\n 'symbol' => '&pound;',\n 'decimal' => 2\n ],\n 'GBP' => [\n 'label' => 'British Pound',\n 'format' => 'before',\n 'locale' => 'en_UK',\n 'symbol' => '&pound;',\n 'decimal' => 2\n ],\n 'GEL' => [\n 'label' => 'Georgian Lari',\n 'format' => 'before',\n 'locale' => 'ka_GE',\n 'symbol' => '&#4314;',\n 'decimal' => 2\n ],\n 'GIP' => [\n 'label' => 'Gibraltar Pound',\n 'format' => 'before',\n 'locale' => 'en_GI',\n 'symbol' => '&pound;',\n 'decimal' => 2\n ],\n 'GMD' => [\n 'label' => 'Gambian Dalasi',\n 'format' => 'before',\n 'locale' => 'en_GM',\n 'symbol' => 'D',\n 'decimal' => 2\n ],\n 'GNF' => [\n 'label' => 'Guinean Franc',\n 'format' => 'before',\n 'locale' => 'fr_GN',\n 'symbol' => 'FG',\n 'decimal' => 0\n ],\n 'GTQ' => [\n 'label' => 'Guatemalan Quetzal',\n 'format' => 'before',\n 'locale' => 'es_GT',\n 'symbol' => 'Q',\n 'decimal' => 2\n ],\n 'GYD' => [\n 'label' => 'Guyanese Dollar',\n 'format' => 'before',\n 'locale' => 'en_GY',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'HKD' => [\n 'label' => 'Hong Kong Dollar',\n 'format' => 'before',\n 'locale' => 'en_HK',\n 'symbol' => 'HK$',\n 'decimal' => 2\n ],\n 'HNL' => [\n 'label' => 'Honduran Lempira',\n 'format' => 'before',\n 'locale' => 'es_HN',\n 'symbol' => 'L',\n 'decimal' => 2\n ],\n 'HRK' => [\n 'label' => 'Croatian Kuna',\n 'format' => 'before',\n 'locale' => 'hr_HR',\n 'symbol' => 'kn',\n 'decimal' => 2\n ],\n 'HTG' => [\n 'label' => 'Haitian Gourde',\n 'format' => 'before',\n 'locale' => 'fr_HT',\n 'symbol' => 'G',\n 'decimal' => 2\n ],\n 'HUF' => [\n 'label' => 'Hungarian Forint',\n 'format' => 'before',\n 'locale' => 'hu_HU',\n 'symbol' => 'Ft',\n 'decimal' => 0\n ],\n 'IDR' => [\n 'label' => 'Indonesian Rupiah',\n 'format' => 'before',\n 'locale' => 'id_ID',\n 'symbol' => 'Rp',\n 'decimal' => 2\n ],\n 'ILS' => [\n 'label' => 'Israeli New Sheqel',\n 'format' => 'before',\n 'locale' => 'he_IL',\n 'symbol' => '&#8362;',\n 'decimal' => 2\n ],\n 'INR' => [\n 'label' => 'Indian Rupee',\n 'format' => 'before',\n 'locale' => 'en_IN',\n 'symbol' => '&#8377;',\n 'decimal' => 2\n ],\n 'ISK' => [\n 'label' => 'Icelandic Króna',\n 'format' => 'before',\n 'locale' => 'is_IS',\n 'symbol' => 'kr',\n 'decimal' => 0\n ],\n 'JMD' => [\n 'label' => 'Jamaican Dollar',\n 'format' => 'before',\n 'locale' => 'en_JM',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'JPY' => [\n 'label' => 'Japanese Yen',\n 'format' => 'before',\n 'locale' => 'ja_JP',\n 'symbol' => '&yen;',\n 'decimal' => 0\n ],\n 'KES' => [\n 'label' => 'Kenyan Shilling',\n 'format' => 'before',\n 'locale' => 'en_KE',\n 'symbol' => 'KSh',\n 'decimal' => 2\n ],\n 'KGS' => [\n 'label' => 'Kyrgyzstani Som',\n 'format' => 'before',\n 'locale' => 'ru_KG',\n 'symbol' => '&#1083;&#1074;',\n 'decimal' => 2\n ],\n 'KHR' => [\n 'label' => 'Cambodian Riel',\n 'format' => 'before',\n 'locale' => 'km_KH',\n 'symbol' => '&#6107;',\n 'decimal' => 2\n ],\n 'KMF' => [\n 'label' => 'Comorian Franc',\n 'format' => 'before',\n 'locale' => 'fr_KM',\n 'symbol' => 'CF',\n 'decimal' => 0\n ],\n 'KRW' => [\n 'label' => 'South Korean Won',\n 'format' => 'before',\n 'locale' => 'ko_KR',\n 'symbol' => '&#8361;',\n 'decimal' => 0\n ],\n 'KYD' => [\n 'label' => 'Cayman Islands Dollar',\n 'format' => 'before',\n 'locale' => 'en_KY',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'KZT' => [\n 'label' => 'Kazakhstani Tenge',\n 'format' => 'before',\n 'locale' => 'ru_KZ',\n 'symbol' => '&#8376;',\n 'decimal' => 2\n ],\n 'LAK' => [\n 'label' => 'Lao Kipa',\n 'format' => 'before',\n 'locale' => 'lo_LA',\n 'symbol' => '&#8365;',\n 'decimal' => 2\n ],\n 'LBP' => [\n 'label' => 'Lebanese Pound',\n 'format' => 'after',\n 'locale' => 'ar_LB',\n 'symbol' => '&#1604;.&#1604;',\n 'decimal' => 2\n ],\n 'LKR' => [\n 'label' => 'Sri Lankan Rupee',\n 'format' => 'before',\n 'locale' => 'si_LK',\n 'symbol' => '&#588;s',\n 'decimal' => 2\n ],\n 'LRD' => [\n 'label' => 'Liberian Dollar',\n 'format' => 'before',\n 'locale' => 'en_LR',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'LSL' => [\n 'label' => 'Lesotho Loti',\n 'format' => 'before',\n 'locale' => '',\n 'symbol' => 'L',\n 'decimal' => 2\n ],\n 'MAD' => [\n 'label' => 'Moroccan Dirham',\n 'format' => 'before',\n 'locale' => 'ar_MA',\n 'symbol' => '&#1583;.&#1605;.',\n 'decimal' => 2\n ],\n 'MDL' => [\n 'label' => 'Moldovan Leu',\n 'format' => 'before',\n 'locale' => 'ro_MD',\n 'symbol' => 'L',\n 'decimal' => 2\n ],\n 'MGA' => [\n 'label' => 'Malagasy Ariary',\n 'format' => 'before',\n 'locale' => 'en_MG',\n 'symbol' => 'Ar',\n 'decimal' => 0\n ],\n 'MKD' => [\n 'label' => 'Macedonian Denar',\n 'format' => 'before',\n 'locale' => 'mk_MK',\n 'symbol' => '&#1076;&#1077;&#1085;',\n 'decimal' => 2\n ],\n 'MNT' => [\n 'label' => 'Mongolian Tögrög',\n 'format' => 'before',\n 'locale' => 'mn_Cyrl_MN',\n 'symbol' => '&#8366;',\n 'decimal' => 2\n ],\n 'MOP' => [\n 'label' => 'Macanese Pataca',\n 'format' => 'before',\n 'locale' => 'pt_MO',\n 'symbol' => 'MOP$',\n 'decimal' => 2\n ],\n 'MRO' => [\n 'label' => 'Mauritanian Ouguiya',\n 'format' => 'before',\n 'locale' => 'ar_MR',\n 'symbol' => 'UM',\n 'decimal' => 0\n ],\n 'MUR' => [\n 'label' => 'Mauritian Rupee',\n 'format' => 'before',\n 'locale' => 'en_MU',\n 'symbol' => '&#588;s',\n 'decimal' => 2\n ],\n 'MVR' => [\n 'label' => 'Maldivian Rufiyaa',\n 'format' => 'before',\n 'locale' => '',\n 'symbol' => 'Rf',\n 'decimal' => 2\n ],\n 'MWK' => [\n 'label' => 'Malawian Kwacha',\n 'format' => 'before',\n 'locale' => 'en_MW',\n 'symbol' => 'MK',\n 'decimal' => 2\n ],\n 'MXN' => [\n 'label' => 'Mexican Peso',\n 'format' => 'before',\n 'locale' => 'es_MX',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'MYR' => [\n 'label' => 'Malaysian Ringgit',\n 'format' => 'before',\n 'locale' => 'ta_MY',\n 'symbol' => 'RM',\n 'decimal' => 2\n ],\n 'MZN' => [\n 'label' => 'Mozambican Metical',\n 'format' => 'before',\n 'locale' => 'mgh_MZ',\n 'symbol' => 'MT',\n 'decimal' => 2\n ],\n 'NAD' => [\n 'label' => 'Namibian Dollar',\n 'format' => 'before',\n 'locale' => 'naq_NA',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'NGN' => [\n 'label' => 'Nigerian Naira',\n 'format' => 'before',\n 'locale' => 'en_NG',\n 'symbol' => '&#8358;',\n 'decimal' => 2\n ],\n 'NIO' => [\n 'label' => 'Nicaraguan Córdoba',\n 'format' => 'before',\n 'locale' => 'es_NI',\n 'symbol' => 'C$',\n 'decimal' => 2\n ],\n 'NOK' => [\n 'label' => 'Norwegian Krone',\n 'format' => 'before',\n 'locale' => 'se_NO',\n 'symbol' => 'kr',\n 'decimal' => 2\n ],\n 'NPR' => [\n 'label' => 'Nepalese Rupee',\n 'format' => 'before',\n 'locale' => 'ne_NP',\n 'symbol' => 'N&#588;s',\n 'decimal' => 2\n ],\n 'NZD' => [\n 'label' => 'New Zealand Dollar',\n 'format' => 'before',\n 'locale' => 'en_NZ',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'PAB' => [\n 'label' => 'Panamanian Balboa',\n 'format' => 'before',\n 'locale' => 'es_PA',\n 'symbol' => 'B/.',\n 'decimal' => 2\n ],\n 'PEN' => [\n 'label' => 'Peruvian Nuevo Sol',\n 'format' => 'before',\n 'locale' => 'es_PE',\n 'symbol' => 'S/.',\n 'decimal' => 2\n ],\n 'PGK' => [\n 'label' => 'Papua New Guinean Kina',\n 'format' => 'before',\n 'locale' => 'en_PG',\n 'symbol' => 'K',\n 'decimal' => 2\n ],\n 'PHP' => [\n 'label' => 'Philippine Peso',\n 'format' => 'before',\n 'locale' => 'en_PH',\n 'symbol' => '&#8369;',\n 'decimal' => 2\n ],\n 'PKR' => [\n 'label' => 'Pakistani Rupee',\n 'format' => 'before',\n 'locale' => 'en_PK',\n 'symbol' => '&#588;s',\n 'decimal' => 2\n ],\n 'PLN' => [\n 'label' => 'Polish Złoty',\n 'format' => 'after',\n 'locale' => 'pl_PL',\n 'symbol' => 'z&#322;',\n 'decimal' => 2\n ],\n 'PYG' => [\n 'label' => 'Paraguayan Guaraní',\n 'format' => 'before',\n 'locale' => 'es_PY',\n 'symbol' => '&#8370;',\n 'decimal' => 0\n ],\n 'QAR' => [\n 'label' => 'Qatari Riyal',\n 'format' => 'after',\n 'locale' => 'ar_QA',\n 'symbol' => '&#1585;.&#1602;',\n 'decimal' => 2\n ],\n 'RON' => [\n 'label' => 'Romanian Leu',\n 'format' => 'before',\n 'locale' => 'ro_RO',\n 'symbol' => 'L',\n 'decimal' => 2\n ],\n 'RSD' => [\n 'label' => 'Serbian Dinar',\n 'format' => 'before',\n 'locale' => 'sr_Latn_RS',\n 'symbol' => '&#1044;&#1080;&#1085;.',\n 'decimal' => 2\n ],\n 'RUB' => [\n 'label' => 'Russian Ruble',\n 'format' => 'before',\n 'locale' => 'ru_RU',\n 'symbol' => '&#8381;',\n 'decimal' => 2\n ],\n 'RWF' => [\n 'label' => 'Rwandan Franc',\n 'format' => 'before',\n 'locale' => 'en_RW',\n 'symbol' => 'RF',\n 'decimal' => 0\n ],\n 'SAR' => [\n 'label' => 'Saudi Riyal',\n 'format' => 'after',\n 'locale' => 'ar_SA',\n 'symbol' => '&#1585;.&#1587;',\n 'decimal' => 2\n ],\n 'SBD' => [\n 'label' => 'Solomon Islands Dollar',\n 'format' => 'before',\n 'locale' => 'en_SB',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'SCR' => [\n 'label' => 'Seychellois Rupee',\n 'format' => 'before',\n 'locale' => 'fr_SC',\n 'symbol' => '&#588;s',\n 'decimal' => 2\n ],\n 'SEK' => [\n 'label' => 'Swedish Krona',\n 'format' => 'after',\n 'locale' => 'sv_SE',\n 'symbol' => 'kr',\n 'decimal' => 2\n ],\n 'SGD' => [\n 'label' => 'Singapore Dollar',\n 'format' => 'before',\n 'locale' => 'en_SG',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'SHP' => [\n 'label' => 'Saint Helenian Pound',\n 'format' => 'before',\n 'locale' => 'en_SH',\n 'symbol' => '&pound;',\n 'decimal' => 2\n ],\n 'SLL' => [\n 'label' => 'Sierra Leonean Leone',\n 'format' => 'before',\n 'locale' => 'en_SL',\n 'symbol' => 'Le',\n 'decimal' => 2\n ],\n 'SOS' => [\n 'label' => 'Somali Shilling',\n 'format' => 'before',\n 'locale' => 'so_SO',\n 'symbol' => 'So. Sh.',\n 'decimal' => 2\n ],\n 'SRD' => [\n 'label' => 'Surinamese Dollar',\n 'format' => 'before',\n 'locale' => 'nl_SR',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'STD' => [\n 'label' => 'São Tomé and Príncipe Dobra',\n 'format' => 'before',\n 'locale' => 'pt_ST',\n 'symbol' => 'Db',\n 'decimal' => 2\n ],\n 'SZL' => [\n 'label' => 'Swazi Lilangeni',\n 'format' => 'before',\n 'locale' => 'en_SZ',\n 'symbol' => 'L',\n 'decimal' => 2\n ],\n 'THB' => [\n 'label' => 'Thai Baht',\n 'format' => 'before',\n 'locale' => 'th_TH',\n 'symbol' => '&#3647;',\n 'decimal' => 2\n ],\n 'TJS' => [\n 'label' => 'Tajikistani Somoni',\n 'format' => 'before',\n 'locale' => 'tg_Cyrl_TJ',\n 'symbol' => 'SM',\n 'decimal' => 2\n ],\n 'TOP' => [\n 'label' => 'Tongan Paʻanga',\n 'format' => 'before',\n 'locale' => 'en_TO',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'TRY' => [\n 'label' => 'Turkish Lira',\n 'format' => 'before',\n 'locale' => 'tr_TR',\n 'symbol' => '&#8378;',\n 'decimal' => 2\n ],\n 'TTD' => [\n 'label' => 'Trinidad and Tobago Dollar',\n 'format' => 'before',\n 'locale' => 'en_TT',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'TWD' => [\n 'label' => 'New Taiwan Dollar',\n 'format' => 'before',\n 'locale' => 'zh_Hant_TW',\n 'symbol' => 'NT$',\n 'decimal' => 0\n ],\n 'TZS' => [\n 'label' => 'Tanzanian Shilling',\n 'format' => 'before',\n 'locale' => 'en_TZ',\n 'symbol' => 'TSh',\n 'decimal' => 2\n ],\n 'UAH' => [\n 'label' => 'Ukrainian Hryvnia',\n 'format' => 'before',\n 'locale' => 'uk_UA',\n 'symbol' => '&#8372;',\n 'decimal' => 2\n ],\n 'UGX' => [\n 'label' => 'Ugandan Shilling',\n 'format' => 'before',\n 'locale' => 'en_UG',\n 'symbol' => 'USh',\n 'decimal' => 0\n ],\n 'USD' => [\n 'label' => 'United States Dollar',\n 'format' => 'before',\n 'locale' => 'en_US',\n 'symbol' => '$',\n 'decimal' => 2\n ],\n 'UYU' => [\n 'label' => 'Uruguayan Peso',\n 'format' => 'before',\n 'locale' => 'es_UY',\n 'symbol' => '$U',\n 'decimal' => 2\n ],\n 'UZS' => [\n 'label' => 'Uzbekistani Som',\n 'format' => 'before',\n 'locale' => 'uz_Latn_UZ',\n 'symbol' => '&#1083;&#1074;',\n 'decimal' => 2\n ],\n 'VEF' => [\n 'label' => 'Venezuelan Bolívar',\n 'format' => 'before',\n 'locale' => 'es_VE',\n 'symbol' => 'Bs',\n 'decimal' => 2\n ],\n 'VND' => [\n 'label' => 'Vietnamese Đồng',\n 'format' => 'after',\n 'locale' => 'vi_VN',\n 'symbol' => '&#8363;',\n 'decimal' => 0\n ],\n 'VUV' => [\n 'label' => 'Vanuatu Vatu',\n 'format' => 'after',\n 'locale' => 'en_VU',\n 'symbol' => 'VT',\n 'decimal' => 0\n ],\n 'WST' => [\n 'label' => 'Samoan Tala',\n 'format' => 'before',\n 'locale' => 'en_WS',\n 'symbol' => 'WS$',\n 'decimal' => 2\n ],\n 'XAF' => [\n 'label' => 'Central African Cfa Franc',\n 'format' => 'before',\n 'locale' => 'fr_CF',\n 'symbol' => 'CFA',\n 'decimal' => 0\n ],\n 'XCD' => [\n 'label' => 'East Caribbean Dollar',\n 'format' => 'before',\n 'locale' => 'en_AI',\n 'symbol' => 'EC$',\n 'decimal' => 2\n ],\n 'XOF' => [\n 'label' => 'West African Cfa Franc',\n 'format' => 'before',\n 'locale' => 'fr_BF',\n 'symbol' => 'CFA',\n 'decimal' => 0\n ],\n 'XPF' => [\n 'label' => 'Cfp Franc',\n 'format' => 'before',\n 'locale' => 'fr_PF',\n 'symbol' => 'F',\n 'decimal' => 0\n ],\n 'YER' => [\n 'label' => 'Yemeni Rial',\n 'format' => 'after',\n 'locale' => 'ar_YE',\n 'symbol' => '&#65020;',\n 'decimal' => 2\n ],\n 'ZAR' => [\n 'label' => 'South African Rand',\n 'format' => 'before',\n 'locale' => 'en_LS',\n 'symbol' => 'R',\n 'decimal' => 2\n ],\n 'ZMW' => [\n 'label' => 'Zambian Kwacha',\n 'format' => 'before',\n 'locale' => 'en_ZM',\n 'symbol' => 'ZMW',\n 'decimal' => 2\n ],\n ];\n if (NULL === $code) {\n return $currencies;\n }\n\n return isset($currencies[ $code ]) ? $currencies[ $code ] : FALSE;\n }", "public static function getCurrencyValues($data)\n {\n $text = '';\n if (!empty($data)) {\n $result = [];\n foreach ($data as $currencyId => $value) {\n if (floatval($value)) {\n $result[] = Yii::$app->formatter->asMoneyWithSymbol($value, $currencyId);\n }\n }\n $text = implode('<br />', $result);\n }\n return $text;\n }", "private function getStoreCurrencies($storeId)\n\t{\n\t\t$this->storeManager->setCurrentStore($storeId);\n\t\t$allCurrencies = $this->storeManager->getStore()->getAvailableCurrencyCodes(true);\n\n\t\t$return = [\n\t\t\t'base_currency' => $this->storeManager->getStore()->getBaseCurrencyCode(),\n\t\t\t'rates' => []\n\t\t];\n\n\t\tforeach($allCurrencies as $currency)\n\t\t\t$return['rates'][$currency] = $this->storeManager->getStore()->getBaseCurrency()->getRate($currency);\n\n\t\treturn $return;\n\t}", "function formatcurrency($floatcurr, $curr = \"USD\")\n{\n $currencies['ARS'] = array(2,',','.'); // Argentine Peso\n $currencies['AMD'] = array(2,'.',','); // Armenian Dram\n $currencies['AWG'] = array(2,'.',','); // Aruban Guilder\n $currencies['AUD'] = array(2,'.',' '); // Australian Dollar\n $currencies['BSD'] = array(2,'.',','); // Bahamian Dollar\n $currencies['BHD'] = array(3,'.',','); // Bahraini Dinar\n $currencies['BDT'] = array(2,'.',','); // Bangladesh, Taka\n $currencies['BZD'] = array(2,'.',','); // Belize Dollar\n $currencies['BMD'] = array(2,'.',','); // Bermudian Dollar\n $currencies['BOB'] = array(2,'.',','); // Bolivia, Boliviano\n $currencies['BAM'] = array(2,'.',','); // Bosnia and Herzegovina, Convertible Marks\n $currencies['BWP'] = array(2,'.',','); // Botswana, Pula\n $currencies['BRL'] = array(2,',','.'); // Brazilian Real\n $currencies['BND'] = array(2,'.',','); // Brunei Dollar\n $currencies['CAD'] = array(2,'.',','); // Canadian Dollar\n $currencies['KYD'] = array(2,'.',','); // Cayman Islands Dollar\n $currencies['CLP'] = array(0,'','.'); // Chilean Peso\n $currencies['CNY'] = array(2,'.',','); // China Yuan Renminbi\n $currencies['COP'] = array(2,',','.'); // Colombian Peso\n $currencies['CRC'] = array(2,',','.'); // Costa Rican Colon\n $currencies['HRK'] = array(2,',','.'); // Croatian Kuna\n $currencies['CUC'] = array(2,'.',','); // Cuban Convertible Peso\n $currencies['CUP'] = array(2,'.',','); // Cuban Peso\n $currencies['CYP'] = array(2,'.',','); // Cyprus Pound\n $currencies['CZK'] = array(2,'.',','); // Czech Koruna\n $currencies['DKK'] = array(2,',','.'); // Danish Krone\n $currencies['DOP'] = array(2,'.',','); // Dominican Peso\n $currencies['XCD'] = array(2,'.',','); // East Caribbean Dollar\n $currencies['EGP'] = array(2,'.',','); // Egyptian Pound\n $currencies['SVC'] = array(2,'.',','); // El Salvador Colon\n $currencies['ATS'] = array(2,',','.'); // Euro\n $currencies['BEF'] = array(2,',','.'); // Euro\n $currencies['DEM'] = array(2,',','.'); // Euro\n $currencies['EEK'] = array(2,',','.'); // Euro\n $currencies['ESP'] = array(2,',','.'); // Euro\n $currencies['EUR'] = array(2,',','.'); // Euro\n $currencies['FIM'] = array(2,',','.'); // Euro\n $currencies['FRF'] = array(2,',','.'); // Euro\n $currencies['GRD'] = array(2,',','.'); // Euro\n $currencies['IEP'] = array(2,',','.'); // Euro\n $currencies['ITL'] = array(2,',','.'); // Euro\n $currencies['LUF'] = array(2,',','.'); // Euro\n $currencies['NLG'] = array(2,',','.'); // Euro\n $currencies['PTE'] = array(2,',','.'); // Euro\n $currencies['GHC'] = array(2,'.',','); // Ghana, Cedi\n $currencies['GIP'] = array(2,'.',','); // Gibraltar Pound\n $currencies['GTQ'] = array(2,'.',','); // Guatemala, Quetzal\n $currencies['HNL'] = array(2,'.',','); // Honduras, Lempira\n $currencies['HKD'] = array(2,'.',','); // Hong Kong Dollar\n $currencies['HUF'] = array(0,'','.'); // Hungary, Forint\n $currencies['ISK'] = array(0,'','.'); // Iceland Krona\n $currencies['INR'] = array(2,'.',','); // Indian Rupee\n $currencies['IDR'] = array(2,',','.'); // Indonesia, Rupiah\n $currencies['IRR'] = array(2,'.',','); // Iranian Rial\n $currencies['JMD'] = array(2,'.',','); // Jamaican Dollar\n $currencies['JPY'] = array(0,'',','); // Japan, Yen\n $currencies['JOD'] = array(3,'.',','); // Jordanian Dinar\n $currencies['KES'] = array(2,'.',','); // Kenyan Shilling\n $currencies['KWD'] = array(3,'.',','); // Kuwaiti Dinar\n $currencies['LVL'] = array(2,'.',','); // Latvian Lats\n $currencies['LBP'] = array(0,'',' '); // Lebanese Pound\n $currencies['LTL'] = array(2,',',' '); // Lithuanian Litas\n $currencies['MKD'] = array(2,'.',','); // Macedonia, Denar\n $currencies['MYR'] = array(2,'.',','); // Malaysian Ringgit\n $currencies['MTL'] = array(2,'.',','); // Maltese Lira\n $currencies['MUR'] = array(0,'',','); // Mauritius Rupee\n $currencies['MXN'] = array(2,'.',','); // Mexican Peso\n $currencies['MZM'] = array(2,',','.'); // Mozambique Metical\n $currencies['NPR'] = array(2,'.',','); // Nepalese Rupee\n $currencies['ANG'] = array(2,'.',','); // Netherlands Antillian Guilder\n $currencies['ILS'] = array(2,'.',','); // New Israeli Shekel\n $currencies['TRY'] = array(2,'.',','); // New Turkish Lira\n $currencies['NZD'] = array(2,'.',','); // New Zealand Dollar\n $currencies['NOK'] = array(2,',','.'); // Norwegian Krone\n $currencies['PKR'] = array(2,'.',','); // Pakistan Rupee\n $currencies['PEN'] = array(2,'.',','); // Peru, Nuevo Sol\n $currencies['UYU'] = array(2,',','.'); // Peso Uruguayo\n $currencies['PHP'] = array(2,'.',','); // Philippine Peso\n $currencies['PLN'] = array(2,'.',' '); // Poland, Zloty\n $currencies['GBP'] = array(2,'.',','); // Pound Sterling\n $currencies['OMR'] = array(3,'.',','); // Rial Omani\n $currencies['RON'] = array(2,',','.'); // Romania, New Leu\n $currencies['ROL'] = array(2,',','.'); // Romania, Old Leu\n $currencies['RUB'] = array(2,',','.'); // Russian Ruble\n $currencies['SAR'] = array(2,'.',','); // Saudi Riyal\n $currencies['SGD'] = array(2,'.',','); // Singapore Dollar\n $currencies['SKK'] = array(2,',',' '); // Slovak Koruna\n $currencies['SIT'] = array(2,',','.'); // Slovenia, Tolar\n $currencies['ZAR'] = array(2,'.',' '); // South Africa, Rand\n $currencies['KRW'] = array(0,'',','); // South Korea, Won\n $currencies['SZL'] = array(2,'.',', '); // Swaziland, Lilangeni\n $currencies['SEK'] = array(2,',','.'); // Swedish Krona\n $currencies['CHF'] = array(2,'.','\\''); // Swiss Franc \n $currencies['TZS'] = array(2,'.',','); // Tanzanian Shilling\n $currencies['THB'] = array(2,'.',','); // Thailand, Baht\n $currencies['TOP'] = array(2,'.',','); // Tonga, Paanga\n $currencies['AED'] = array(2,'.',','); // UAE Dirham\n $currencies['UAH'] = array(2,',',' '); // Ukraine, Hryvnia\n $currencies['USD'] = array(2,'.',','); // US Dollar\n $currencies['VUV'] = array(0,'',','); // Vanuatu, Vatu\n $currencies['VEF'] = array(2,',','.'); // Venezuela Bolivares Fuertes\n $currencies['VEB'] = array(2,',','.'); // Venezuela, Bolivar\n $currencies['VND'] = array(0,'','.'); // Viet Nam, Dong\n $currencies['ZWD'] = array(2,'.',' '); // Zimbabwe Dollar\n\n function formatinr($input){\n //CUSTOM FUNCTION TO GENERATE ##,##,###.##\n $dec = \"\";\n $pos = strpos($input, \".\");\n if ($pos === false){\n //no decimals \n } else {\n //decimals\n $dec = substr(round(substr($input,$pos),2),1);\n $input = substr($input,0,$pos);\n }\n $num = substr($input,-3); //get the last 3 digits\n $input = substr($input,0, -3); //omit the last 3 digits already stored in $num\n while(strlen($input) > 0) //loop the process - further get digits 2 by 2\n {\n $num = substr($input,-2).\",\".$num;\n $input = substr($input,0,-2);\n }\n return $num . $dec;\n }\n\n\n if ($curr == \"INR\"){ \n return formatinr($floatcurr);\n } else {\n return number_format($floatcurr,$currencies[$curr][0],$currencies[$curr][1],$currencies[$curr][2]);\n }\n \n\n}", "function getCryptoLivePrice(){\n \n //$url = \"https://api.coinmarketcap.com/v1/ticker/ethereum/\";\n $url = \"https://api.coinmarketcap.com/v2/ticker/?limit=10&structure=array\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 60);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n $data = curl_exec($ch);\n $transaction = json_decode($data, TRUE);\n curl_close($ch);\n \n //BTC\n $btcUsdPrice = 0;\n $cryptoSymbol_1 = isset($transaction['data'][0]['symbol'])?$transaction['data'][0]['symbol']:'';\n \n if($cryptoSymbol_1==\"BTC\"){\n $btcUsdPrice = isset($transaction['data'][0]['quotes']['USD']['price'])?$transaction['data'][0]['quotes']['USD']['price']:0;\n }\n //ETH\n $ethUsdPrice = 0;\n $cryptoSymbol_2 = isset($transaction['data'][1]['symbol'])?$transaction['data'][1]['symbol']:'';\n if($cryptoSymbol_2==\"ETH\"){\n $ethUsdPrice = isset($transaction['data'][1]['quotes']['USD']['price'])?$transaction['data'][1]['quotes']['USD']['price']:0;\n }\n //LTC\n $ltcUsdPrice = 0;\n $cryptoSymbol_3 = isset($transaction['data'][5]['symbol'])?$transaction['data'][5]['symbol']:'';\n if($cryptoSymbol_3==\"LTC\"){\n $ltcUsdPrice = isset($transaction['data'][5]['quotes']['USD']['price'])?$transaction['data'][5]['quotes']['USD']['price']:0;\n } \n \n return ['eth_price_usd'=>$ethUsdPrice,'btc_price_usd'=>$btcUsdPrice,'ltc_price_usd'=>$ltcUsdPrice];\n}", "public function getCurrenciesAccepted()\n {\n return $this->currenciesAccepted;\n }", "public function getCurrencies2()\n {\n return $this->hasMany(Currency::className(), ['ar_gl_acc_id' => 'account_id']);\n }", "public function CurrencyCode()\n {\n return [\n 'AUD' => ' Australia Dollar',\n 'BND' => 'Bruneian Dollar',\n 'CAD' => 'Canadian Dollar',\n 'CHF' => 'Francs',\n 'CNY' => 'China Yuan',\n 'DKK' => 'Danish Krone',\n 'EUR' => 'Euro',\n 'GBP' => 'Great Britain Poundsterling',\n 'HKD' => 'Hongkong Dollar',\n 'JPY' => 'Japan Yen',\n 'KRW' => 'Korea Won',\n 'NOK' => 'Norwegian Krone',\n 'NZD' => 'New Zealand Dollar',\n 'PHP' => 'Phillipine Peso',\n 'SAR' => 'Saudi Riyal',\n 'SEK' => 'Swedish Krona',\n 'SGD' => 'Singapore Dollar',\n 'THB' => 'Thailand Baht',\n 'TWD' => 'Taiwan Dollar',\n 'USD' => 'US Dollar',\n ];\n }", "function get_ffd_currencies() {\r\n\tstatic $currencies;\r\n\r\n\tif ( ! isset( $currencies ) ) {\r\n\t\t$currencies = array_unique(\r\n\t\t\tapply_filters(\r\n\t\t\t\t'ffd_currencies',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'AED' => __( 'United Arab Emirates dirham', 'ffd-integration' ),\r\n\t\t\t\t\t'AFN' => __( 'Afghan afghani', 'ffd-integration' ),\r\n\t\t\t\t\t'ALL' => __( 'Albanian lek', 'ffd-integration' ),\r\n\t\t\t\t\t'AMD' => __( 'Armenian dram', 'ffd-integration' ),\r\n\t\t\t\t\t'ANG' => __( 'Netherlands Antillean guilder', 'ffd-integration' ),\r\n\t\t\t\t\t'AOA' => __( 'Angolan kwanza', 'ffd-integration' ),\r\n\t\t\t\t\t'ARS' => __( 'Argentine peso', 'ffd-integration' ),\r\n\t\t\t\t\t'AUD' => __( 'Australian dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'AWG' => __( 'Aruban florin', 'ffd-integration' ),\r\n\t\t\t\t\t'AZN' => __( 'Azerbaijani manat', 'ffd-integration' ),\r\n\t\t\t\t\t'BAM' => __( 'Bosnia and Herzegovina convertible mark', 'ffd-integration' ),\r\n\t\t\t\t\t'BBD' => __( 'Barbadian dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'BDT' => __( 'Bangladeshi taka', 'ffd-integration' ),\r\n\t\t\t\t\t'BGN' => __( 'Bulgarian lev', 'ffd-integration' ),\r\n\t\t\t\t\t'BHD' => __( 'Bahraini dinar', 'ffd-integration' ),\r\n\t\t\t\t\t'BIF' => __( 'Burundian franc', 'ffd-integration' ),\r\n\t\t\t\t\t'BMD' => __( 'Bermudian dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'BND' => __( 'Brunei dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'BOB' => __( 'Bolivian boliviano', 'ffd-integration' ),\r\n\t\t\t\t\t'BRL' => __( 'Brazilian real', 'ffd-integration' ),\r\n\t\t\t\t\t'BSD' => __( 'Bahamian dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'BTC' => __( 'Bitcoin', 'ffd-integration' ),\r\n\t\t\t\t\t'BTN' => __( 'Bhutanese ngultrum', 'ffd-integration' ),\r\n\t\t\t\t\t'BWP' => __( 'Botswana pula', 'ffd-integration' ),\r\n\t\t\t\t\t'BYR' => __( 'Belarusian ruble (old)', 'ffd-integration' ),\r\n\t\t\t\t\t'BYN' => __( 'Belarusian ruble', 'ffd-integration' ),\r\n\t\t\t\t\t'BZD' => __( 'Belize dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'CAD' => __( 'Canadian dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'CDF' => __( 'Congolese franc', 'ffd-integration' ),\r\n\t\t\t\t\t'CHF' => __( 'Swiss franc', 'ffd-integration' ),\r\n\t\t\t\t\t'CLP' => __( 'Chilean peso', 'ffd-integration' ),\r\n\t\t\t\t\t'CNY' => __( 'Chinese yuan', 'ffd-integration' ),\r\n\t\t\t\t\t'COP' => __( 'Colombian peso', 'ffd-integration' ),\r\n\t\t\t\t\t'CRC' => __( 'Costa Rican col&oacute;n', 'ffd-integration' ),\r\n\t\t\t\t\t'CUC' => __( 'Cuban convertible peso', 'ffd-integration' ),\r\n\t\t\t\t\t'CUP' => __( 'Cuban peso', 'ffd-integration' ),\r\n\t\t\t\t\t'CVE' => __( 'Cape Verdean escudo', 'ffd-integration' ),\r\n\t\t\t\t\t'CZK' => __( 'Czech koruna', 'ffd-integration' ),\r\n\t\t\t\t\t'DJF' => __( 'Djiboutian franc', 'ffd-integration' ),\r\n\t\t\t\t\t'DKK' => __( 'Danish krone', 'ffd-integration' ),\r\n\t\t\t\t\t'DOP' => __( 'Dominican peso', 'ffd-integration' ),\r\n\t\t\t\t\t'DZD' => __( 'Algerian dinar', 'ffd-integration' ),\r\n\t\t\t\t\t'EGP' => __( 'Egyptian pound', 'ffd-integration' ),\r\n\t\t\t\t\t'ERN' => __( 'Eritrean nakfa', 'ffd-integration' ),\r\n\t\t\t\t\t'ETB' => __( 'Ethiopian birr', 'ffd-integration' ),\r\n\t\t\t\t\t'EUR' => __( 'Euro', 'ffd-integration' ),\r\n\t\t\t\t\t'FJD' => __( 'Fijian dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'FKP' => __( 'Falkland Islands pound', 'ffd-integration' ),\r\n\t\t\t\t\t'GBP' => __( 'Pound sterling', 'ffd-integration' ),\r\n\t\t\t\t\t'GEL' => __( 'Georgian lari', 'ffd-integration' ),\r\n\t\t\t\t\t'GGP' => __( 'Guernsey pound', 'ffd-integration' ),\r\n\t\t\t\t\t'GHS' => __( 'Ghana cedi', 'ffd-integration' ),\r\n\t\t\t\t\t'GIP' => __( 'Gibraltar pound', 'ffd-integration' ),\r\n\t\t\t\t\t'GMD' => __( 'Gambian dalasi', 'ffd-integration' ),\r\n\t\t\t\t\t'GNF' => __( 'Guinean franc', 'ffd-integration' ),\r\n\t\t\t\t\t'GTQ' => __( 'Guatemalan quetzal', 'ffd-integration' ),\r\n\t\t\t\t\t'GYD' => __( 'Guyanese dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'HKD' => __( 'Hong Kong dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'HNL' => __( 'Honduran lempira', 'ffd-integration' ),\r\n\t\t\t\t\t'HRK' => __( 'Croatian kuna', 'ffd-integration' ),\r\n\t\t\t\t\t'HTG' => __( 'Haitian gourde', 'ffd-integration' ),\r\n\t\t\t\t\t'HUF' => __( 'Hungarian forint', 'ffd-integration' ),\r\n\t\t\t\t\t'IDR' => __( 'Indonesian rupiah', 'ffd-integration' ),\r\n\t\t\t\t\t'ILS' => __( 'Israeli new shekel', 'ffd-integration' ),\r\n\t\t\t\t\t'IMP' => __( 'Manx pound', 'ffd-integration' ),\r\n\t\t\t\t\t'INR' => __( 'Indian rupee', 'ffd-integration' ),\r\n\t\t\t\t\t'IQD' => __( 'Iraqi dinar', 'ffd-integration' ),\r\n\t\t\t\t\t'IRR' => __( 'Iranian rial', 'ffd-integration' ),\r\n\t\t\t\t\t'IRT' => __( 'Iranian toman', 'ffd-integration' ),\r\n\t\t\t\t\t'ISK' => __( 'Icelandic kr&oacute;na', 'ffd-integration' ),\r\n\t\t\t\t\t'JEP' => __( 'Jersey pound', 'ffd-integration' ),\r\n\t\t\t\t\t'JMD' => __( 'Jamaican dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'JOD' => __( 'Jordanian dinar', 'ffd-integration' ),\r\n\t\t\t\t\t'JPY' => __( 'Japanese yen', 'ffd-integration' ),\r\n\t\t\t\t\t'KES' => __( 'Kenyan shilling', 'ffd-integration' ),\r\n\t\t\t\t\t'KGS' => __( 'Kyrgyzstani som', 'ffd-integration' ),\r\n\t\t\t\t\t'KHR' => __( 'Cambodian riel', 'ffd-integration' ),\r\n\t\t\t\t\t'KMF' => __( 'Comorian franc', 'ffd-integration' ),\r\n\t\t\t\t\t'KPW' => __( 'North Korean won', 'ffd-integration' ),\r\n\t\t\t\t\t'KRW' => __( 'South Korean won', 'ffd-integration' ),\r\n\t\t\t\t\t'KWD' => __( 'Kuwaiti dinar', 'ffd-integration' ),\r\n\t\t\t\t\t'KYD' => __( 'Cayman Islands dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'KZT' => __( 'Kazakhstani tenge', 'ffd-integration' ),\r\n\t\t\t\t\t'LAK' => __( 'Lao kip', 'ffd-integration' ),\r\n\t\t\t\t\t'LBP' => __( 'Lebanese pound', 'ffd-integration' ),\r\n\t\t\t\t\t'LKR' => __( 'Sri Lankan rupee', 'ffd-integration' ),\r\n\t\t\t\t\t'LRD' => __( 'Liberian dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'LSL' => __( 'Lesotho loti', 'ffd-integration' ),\r\n\t\t\t\t\t'LYD' => __( 'Libyan dinar', 'ffd-integration' ),\r\n\t\t\t\t\t'MAD' => __( 'Moroccan dirham', 'ffd-integration' ),\r\n\t\t\t\t\t'MDL' => __( 'Moldovan leu', 'ffd-integration' ),\r\n\t\t\t\t\t'MGA' => __( 'Malagasy ariary', 'ffd-integration' ),\r\n\t\t\t\t\t'MKD' => __( 'Macedonian denar', 'ffd-integration' ),\r\n\t\t\t\t\t'MMK' => __( 'Burmese kyat', 'ffd-integration' ),\r\n\t\t\t\t\t'MNT' => __( 'Mongolian t&ouml;gr&ouml;g', 'ffd-integration' ),\r\n\t\t\t\t\t'MOP' => __( 'Macanese pataca', 'ffd-integration' ),\r\n\t\t\t\t\t'MRO' => __( 'Mauritanian ouguiya', 'ffd-integration' ),\r\n\t\t\t\t\t'MUR' => __( 'Mauritian rupee', 'ffd-integration' ),\r\n\t\t\t\t\t'MVR' => __( 'Maldivian rufiyaa', 'ffd-integration' ),\r\n\t\t\t\t\t'MWK' => __( 'Malawian kwacha', 'ffd-integration' ),\r\n\t\t\t\t\t'MXN' => __( 'Mexican peso', 'ffd-integration' ),\r\n\t\t\t\t\t'MYR' => __( 'Malaysian ringgit', 'ffd-integration' ),\r\n\t\t\t\t\t'MZN' => __( 'Mozambican metical', 'ffd-integration' ),\r\n\t\t\t\t\t'NAD' => __( 'Namibian dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'NGN' => __( 'Nigerian naira', 'ffd-integration' ),\r\n\t\t\t\t\t'NIO' => __( 'Nicaraguan c&oacute;rdoba', 'ffd-integration' ),\r\n\t\t\t\t\t'NOK' => __( 'Norwegian krone', 'ffd-integration' ),\r\n\t\t\t\t\t'NPR' => __( 'Nepalese rupee', 'ffd-integration' ),\r\n\t\t\t\t\t'NZD' => __( 'New Zealand dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'OMR' => __( 'Omani rial', 'ffd-integration' ),\r\n\t\t\t\t\t'PAB' => __( 'Panamanian balboa', 'ffd-integration' ),\r\n\t\t\t\t\t'PEN' => __( 'Peruvian nuevo sol', 'ffd-integration' ),\r\n\t\t\t\t\t'PGK' => __( 'Papua New Guinean kina', 'ffd-integration' ),\r\n\t\t\t\t\t'PHP' => __( 'Philippine peso', 'ffd-integration' ),\r\n\t\t\t\t\t'PKR' => __( 'Pakistani rupee', 'ffd-integration' ),\r\n\t\t\t\t\t'PLN' => __( 'Polish z&#x142;oty', 'ffd-integration' ),\r\n\t\t\t\t\t'PRB' => __( 'Transnistrian ruble', 'ffd-integration' ),\r\n\t\t\t\t\t'PYG' => __( 'Paraguayan guaran&iacute;', 'ffd-integration' ),\r\n\t\t\t\t\t'QAR' => __( 'Qatari riyal', 'ffd-integration' ),\r\n\t\t\t\t\t'RON' => __( 'Romanian leu', 'ffd-integration' ),\r\n\t\t\t\t\t'RSD' => __( 'Serbian dinar', 'ffd-integration' ),\r\n\t\t\t\t\t'RUB' => __( 'Russian ruble', 'ffd-integration' ),\r\n\t\t\t\t\t'RWF' => __( 'Rwandan franc', 'ffd-integration' ),\r\n\t\t\t\t\t'SAR' => __( 'Saudi riyal', 'ffd-integration' ),\r\n\t\t\t\t\t'SBD' => __( 'Solomon Islands dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'SCR' => __( 'Seychellois rupee', 'ffd-integration' ),\r\n\t\t\t\t\t'SDG' => __( 'Sudanese pound', 'ffd-integration' ),\r\n\t\t\t\t\t'SEK' => __( 'Swedish krona', 'ffd-integration' ),\r\n\t\t\t\t\t'SGD' => __( 'Singapore dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'SHP' => __( 'Saint Helena pound', 'ffd-integration' ),\r\n\t\t\t\t\t'SLL' => __( 'Sierra Leonean leone', 'ffd-integration' ),\r\n\t\t\t\t\t'SOS' => __( 'Somali shilling', 'ffd-integration' ),\r\n\t\t\t\t\t'SRD' => __( 'Surinamese dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'SSP' => __( 'South Sudanese pound', 'ffd-integration' ),\r\n\t\t\t\t\t'STD' => __( 'S&atilde;o Tom&eacute; and Pr&iacute;ncipe dobra', 'ffd-integration' ),\r\n\t\t\t\t\t'SYP' => __( 'Syrian pound', 'ffd-integration' ),\r\n\t\t\t\t\t'SZL' => __( 'Swazi lilangeni', 'ffd-integration' ),\r\n\t\t\t\t\t'THB' => __( 'Thai baht', 'ffd-integration' ),\r\n\t\t\t\t\t'TJS' => __( 'Tajikistani somoni', 'ffd-integration' ),\r\n\t\t\t\t\t'TMT' => __( 'Turkmenistan manat', 'ffd-integration' ),\r\n\t\t\t\t\t'TND' => __( 'Tunisian dinar', 'ffd-integration' ),\r\n\t\t\t\t\t'TOP' => __( 'Tongan pa&#x2bb;anga', 'ffd-integration' ),\r\n\t\t\t\t\t'TRY' => __( 'Turkish lira', 'ffd-integration' ),\r\n\t\t\t\t\t'TTD' => __( 'Trinidad and Tobago dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'TWD' => __( 'New Taiwan dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'TZS' => __( 'Tanzanian shilling', 'ffd-integration' ),\r\n\t\t\t\t\t'UAH' => __( 'Ukrainian hryvnia', 'ffd-integration' ),\r\n\t\t\t\t\t'UGX' => __( 'Ugandan shilling', 'ffd-integration' ),\r\n\t\t\t\t\t'USD' => __( 'United States (US) dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'UYU' => __( 'Uruguayan peso', 'ffd-integration' ),\r\n\t\t\t\t\t'UZS' => __( 'Uzbekistani som', 'ffd-integration' ),\r\n\t\t\t\t\t'VEF' => __( 'Venezuelan bol&iacute;var', 'ffd-integration' ),\r\n\t\t\t\t\t'VND' => __( 'Vietnamese &#x111;&#x1ed3;ng', 'ffd-integration' ),\r\n\t\t\t\t\t'VUV' => __( 'Vanuatu vatu', 'ffd-integration' ),\r\n\t\t\t\t\t'WST' => __( 'Samoan t&#x101;l&#x101;', 'ffd-integration' ),\r\n\t\t\t\t\t'XAF' => __( 'Central African CFA franc', 'ffd-integration' ),\r\n\t\t\t\t\t'XCD' => __( 'East Caribbean dollar', 'ffd-integration' ),\r\n\t\t\t\t\t'XOF' => __( 'West African CFA franc', 'ffd-integration' ),\r\n\t\t\t\t\t'XPF' => __( 'CFP franc', 'ffd-integration' ),\r\n\t\t\t\t\t'YER' => __( 'Yemeni rial', 'ffd-integration' ),\r\n\t\t\t\t\t'ZAR' => __( 'South African rand', 'ffd-integration' ),\r\n\t\t\t\t\t'ZMW' => __( 'Zambian kwacha', 'ffd-integration' ),\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n\r\n\treturn $currencies;\r\n}", "public function getRates()\n {\n # Convert the rates to a key / value array:\n return json_decode( json_encode($this->rates), true );\n }", "public function getFromCurrency()\n {\n return $this->fromCurrency;\n }", "public function get_currency() {\n\t\t$data['currency'] = $this->session->data['currency'];\n\t\t/* added by it-lab end */\n\n\t\t$this->response->setOutput(json_encode($data));\n\t}", "public function getBaseCurrency()\n {\n return $this->base_currency;\n }" ]
[ "0.83623034", "0.7784647", "0.76352495", "0.7597692", "0.73817664", "0.73784786", "0.73784786", "0.73538476", "0.7341506", "0.734139", "0.72807246", "0.7268521", "0.72109413", "0.7207659", "0.7191892", "0.7125536", "0.7036746", "0.6969156", "0.69619566", "0.6957606", "0.69558203", "0.6948045", "0.6930527", "0.6912402", "0.69074214", "0.6892553", "0.6880776", "0.68575114", "0.68562436", "0.6835309", "0.6835309", "0.68347776", "0.68111336", "0.67528796", "0.6738314", "0.6738314", "0.6738314", "0.6735945", "0.673527", "0.67138624", "0.67075175", "0.6698689", "0.66962785", "0.66898316", "0.6681509", "0.66496897", "0.66052836", "0.65746886", "0.65724754", "0.65536124", "0.65364635", "0.6523096", "0.65230876", "0.652181", "0.6494048", "0.64815956", "0.6481533", "0.64709795", "0.6458176", "0.64578736", "0.644616", "0.6433996", "0.6413854", "0.6411729", "0.6403729", "0.63984466", "0.6393777", "0.6375058", "0.6368457", "0.6359625", "0.6358081", "0.633395", "0.63160735", "0.63129175", "0.63025296", "0.6282792", "0.62609106", "0.6249403", "0.6248962", "0.6243991", "0.62332016", "0.62332016", "0.62332016", "0.62332016", "0.62332016", "0.62332016", "0.62332016", "0.62332016", "0.6230613", "0.6210247", "0.6207025", "0.6196716", "0.61924183", "0.61919725", "0.6190667", "0.6175361", "0.6174821", "0.61679375", "0.6166527", "0.6159788", "0.6157422" ]
0.0
-1
This doesn't belong in the Interface since it isn't directly related to currency conversion
protected function curlRequest($url) { //curl_init — Initialize a cURL session (Client URL Library) $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, $url); return curl_exec($curl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrency();", "public function getCurrency();", "public function getCurrency(): string;", "public function getCurrency(): string;", "public function getCurrency(): Currency;", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrency(){\n return $this->currency;\n }", "public function getTargetCurrency();", "public function getSourceCurrency();", "public function getBaseCurrencyCode();", "public function toMoney();", "public function convertCurrency($transaction) {\n if (is_array($transaction)) {\nreturn $this->convertCurrencyByArray($transaction);\n} else {\nreturn $this->convertCurrencyByAmount($transaction);\n}\n}", "public function getOrderCurrencyCode();", "function __formatCurrency($value)\n {\n if ($this->__init['definitions']['currency_type'] === 'dolar') {\n if (preg_match('/(([0-9]+)\\.([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode('.', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else if ($this->__init['definitions']['currency_type'] === 'real') {\n if (preg_match('/(([0-9]+)\\,([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode(',', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else return $value;\n }", "public function testCurrencyCode(): void\n {\n $cur = StringHelper::getCurrencyCode();\n StringHelper::setCurrencyCode('€');\n $fmt1 = '#,##0.000\\ [$]';\n $rslt = NumberFormat::toFormattedString(12345.679, $fmt1);\n self::assertEquals($rslt, '12,345.679 €');\n $fmt2 = '$ #,##0.000';\n $rslt = NumberFormat::toFormattedString(12345.679, $fmt2);\n self::assertEquals($rslt, '$ 12,345.679');\n StringHelper::setCurrencyCode($cur);\n }", "public function testConvertMethodWrongAmount()\n {\n \t$currencyExchangeRateMock = $this->getMockBuilder(\"App\\Models\\CurrencyExchangeRateService\")->getMock();\n\t\t$currencyExchangeRateMock->expects($this->any())\n \t\t->method(\"getExchangeRate\")\n \t\t->will($this->returnValue(1.0));\n\n\t\t$currencyConverter = new DefaultCurrencyConverter($currencyExchangeRateMock);\n\n\t\t$this->assertFalse($currencyConverter->convert('€','any'));\n\n }", "abstract protected function getSupportedCurrencies();", "public function convert($amount, Currency $currency);", "function getExchangeRate($currency);", "function calculateCurrency($prijs, $country)\r\n {\r\n }", "public function getToCurrency()\n {\n return $this->toCurrency;\n }", "function formatcurrency($floatcurr, $curr = \"USD\")\n{\n $currencies['ARS'] = array(2,',','.'); // Argentine Peso\n $currencies['AMD'] = array(2,'.',','); // Armenian Dram\n $currencies['AWG'] = array(2,'.',','); // Aruban Guilder\n $currencies['AUD'] = array(2,'.',' '); // Australian Dollar\n $currencies['BSD'] = array(2,'.',','); // Bahamian Dollar\n $currencies['BHD'] = array(3,'.',','); // Bahraini Dinar\n $currencies['BDT'] = array(2,'.',','); // Bangladesh, Taka\n $currencies['BZD'] = array(2,'.',','); // Belize Dollar\n $currencies['BMD'] = array(2,'.',','); // Bermudian Dollar\n $currencies['BOB'] = array(2,'.',','); // Bolivia, Boliviano\n $currencies['BAM'] = array(2,'.',','); // Bosnia and Herzegovina, Convertible Marks\n $currencies['BWP'] = array(2,'.',','); // Botswana, Pula\n $currencies['BRL'] = array(2,',','.'); // Brazilian Real\n $currencies['BND'] = array(2,'.',','); // Brunei Dollar\n $currencies['CAD'] = array(2,'.',','); // Canadian Dollar\n $currencies['KYD'] = array(2,'.',','); // Cayman Islands Dollar\n $currencies['CLP'] = array(0,'','.'); // Chilean Peso\n $currencies['CNY'] = array(2,'.',','); // China Yuan Renminbi\n $currencies['COP'] = array(2,',','.'); // Colombian Peso\n $currencies['CRC'] = array(2,',','.'); // Costa Rican Colon\n $currencies['HRK'] = array(2,',','.'); // Croatian Kuna\n $currencies['CUC'] = array(2,'.',','); // Cuban Convertible Peso\n $currencies['CUP'] = array(2,'.',','); // Cuban Peso\n $currencies['CYP'] = array(2,'.',','); // Cyprus Pound\n $currencies['CZK'] = array(2,'.',','); // Czech Koruna\n $currencies['DKK'] = array(2,',','.'); // Danish Krone\n $currencies['DOP'] = array(2,'.',','); // Dominican Peso\n $currencies['XCD'] = array(2,'.',','); // East Caribbean Dollar\n $currencies['EGP'] = array(2,'.',','); // Egyptian Pound\n $currencies['SVC'] = array(2,'.',','); // El Salvador Colon\n $currencies['ATS'] = array(2,',','.'); // Euro\n $currencies['BEF'] = array(2,',','.'); // Euro\n $currencies['DEM'] = array(2,',','.'); // Euro\n $currencies['EEK'] = array(2,',','.'); // Euro\n $currencies['ESP'] = array(2,',','.'); // Euro\n $currencies['EUR'] = array(2,',','.'); // Euro\n $currencies['FIM'] = array(2,',','.'); // Euro\n $currencies['FRF'] = array(2,',','.'); // Euro\n $currencies['GRD'] = array(2,',','.'); // Euro\n $currencies['IEP'] = array(2,',','.'); // Euro\n $currencies['ITL'] = array(2,',','.'); // Euro\n $currencies['LUF'] = array(2,',','.'); // Euro\n $currencies['NLG'] = array(2,',','.'); // Euro\n $currencies['PTE'] = array(2,',','.'); // Euro\n $currencies['GHC'] = array(2,'.',','); // Ghana, Cedi\n $currencies['GIP'] = array(2,'.',','); // Gibraltar Pound\n $currencies['GTQ'] = array(2,'.',','); // Guatemala, Quetzal\n $currencies['HNL'] = array(2,'.',','); // Honduras, Lempira\n $currencies['HKD'] = array(2,'.',','); // Hong Kong Dollar\n $currencies['HUF'] = array(0,'','.'); // Hungary, Forint\n $currencies['ISK'] = array(0,'','.'); // Iceland Krona\n $currencies['INR'] = array(2,'.',','); // Indian Rupee\n $currencies['IDR'] = array(2,',','.'); // Indonesia, Rupiah\n $currencies['IRR'] = array(2,'.',','); // Iranian Rial\n $currencies['JMD'] = array(2,'.',','); // Jamaican Dollar\n $currencies['JPY'] = array(0,'',','); // Japan, Yen\n $currencies['JOD'] = array(3,'.',','); // Jordanian Dinar\n $currencies['KES'] = array(2,'.',','); // Kenyan Shilling\n $currencies['KWD'] = array(3,'.',','); // Kuwaiti Dinar\n $currencies['LVL'] = array(2,'.',','); // Latvian Lats\n $currencies['LBP'] = array(0,'',' '); // Lebanese Pound\n $currencies['LTL'] = array(2,',',' '); // Lithuanian Litas\n $currencies['MKD'] = array(2,'.',','); // Macedonia, Denar\n $currencies['MYR'] = array(2,'.',','); // Malaysian Ringgit\n $currencies['MTL'] = array(2,'.',','); // Maltese Lira\n $currencies['MUR'] = array(0,'',','); // Mauritius Rupee\n $currencies['MXN'] = array(2,'.',','); // Mexican Peso\n $currencies['MZM'] = array(2,',','.'); // Mozambique Metical\n $currencies['NPR'] = array(2,'.',','); // Nepalese Rupee\n $currencies['ANG'] = array(2,'.',','); // Netherlands Antillian Guilder\n $currencies['ILS'] = array(2,'.',','); // New Israeli Shekel\n $currencies['TRY'] = array(2,'.',','); // New Turkish Lira\n $currencies['NZD'] = array(2,'.',','); // New Zealand Dollar\n $currencies['NOK'] = array(2,',','.'); // Norwegian Krone\n $currencies['PKR'] = array(2,'.',','); // Pakistan Rupee\n $currencies['PEN'] = array(2,'.',','); // Peru, Nuevo Sol\n $currencies['UYU'] = array(2,',','.'); // Peso Uruguayo\n $currencies['PHP'] = array(2,'.',','); // Philippine Peso\n $currencies['PLN'] = array(2,'.',' '); // Poland, Zloty\n $currencies['GBP'] = array(2,'.',','); // Pound Sterling\n $currencies['OMR'] = array(3,'.',','); // Rial Omani\n $currencies['RON'] = array(2,',','.'); // Romania, New Leu\n $currencies['ROL'] = array(2,',','.'); // Romania, Old Leu\n $currencies['RUB'] = array(2,',','.'); // Russian Ruble\n $currencies['SAR'] = array(2,'.',','); // Saudi Riyal\n $currencies['SGD'] = array(2,'.',','); // Singapore Dollar\n $currencies['SKK'] = array(2,',',' '); // Slovak Koruna\n $currencies['SIT'] = array(2,',','.'); // Slovenia, Tolar\n $currencies['ZAR'] = array(2,'.',' '); // South Africa, Rand\n $currencies['KRW'] = array(0,'',','); // South Korea, Won\n $currencies['SZL'] = array(2,'.',', '); // Swaziland, Lilangeni\n $currencies['SEK'] = array(2,',','.'); // Swedish Krona\n $currencies['CHF'] = array(2,'.','\\''); // Swiss Franc \n $currencies['TZS'] = array(2,'.',','); // Tanzanian Shilling\n $currencies['THB'] = array(2,'.',','); // Thailand, Baht\n $currencies['TOP'] = array(2,'.',','); // Tonga, Paanga\n $currencies['AED'] = array(2,'.',','); // UAE Dirham\n $currencies['UAH'] = array(2,',',' '); // Ukraine, Hryvnia\n $currencies['USD'] = array(2,'.',','); // US Dollar\n $currencies['VUV'] = array(0,'',','); // Vanuatu, Vatu\n $currencies['VEF'] = array(2,',','.'); // Venezuela Bolivares Fuertes\n $currencies['VEB'] = array(2,',','.'); // Venezuela, Bolivar\n $currencies['VND'] = array(0,'','.'); // Viet Nam, Dong\n $currencies['ZWD'] = array(2,'.',' '); // Zimbabwe Dollar\n\n function formatinr($input){\n //CUSTOM FUNCTION TO GENERATE ##,##,###.##\n $dec = \"\";\n $pos = strpos($input, \".\");\n if ($pos === false){\n //no decimals \n } else {\n //decimals\n $dec = substr(round(substr($input,$pos),2),1);\n $input = substr($input,0,$pos);\n }\n $num = substr($input,-3); //get the last 3 digits\n $input = substr($input,0, -3); //omit the last 3 digits already stored in $num\n while(strlen($input) > 0) //loop the process - further get digits 2 by 2\n {\n $num = substr($input,-2).\",\".$num;\n $input = substr($input,0,-2);\n }\n return $num . $dec;\n }\n\n\n if ($curr == \"INR\"){ \n return formatinr($floatcurr);\n } else {\n return number_format($floatcurr,$currencies[$curr][0],$currencies[$curr][1],$currencies[$curr][2]);\n }\n \n\n}", "function setCurrencyCode(){\n switch($this->Currency){\n case \"USD\": $this->CurrencyCode = 840;\n break;\n case \"EUR\": $this->CurrencyCode = 978;\n break;\n case \"AUD\": $this->CurrencyCode = 036;\n break;\n case \"CAD\": $this->CurrencyCode = 124;\n break;\n case \"GBP\": $this->CurrencyCode = 826;\n break;\n case \"JPY\": $this->CurrencyCode = 392;\n break;\n }// end switch\n }", "public function getStoreCurrencyCode();", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "function ConvertCurrency($input_value, $input_currency_code, $target_currency_code) {\n // Convert input to base, then to target currency\n $rate_in = GetConversionRate($input_currency_code);\n $rate_out = GetConversionRate($target_currency_code);\n\n $output = ($input_value/$rate_in) * $rate_out;\n return number_format($output, 2, '.', '');\n }", "private function __getCurrency()\n\t{\n\t\tif($this->currency == null)\n\t\t$this->currency = 1;\n\t\treturn $this->currency;\n\t}", "function to_price($amount = 0.00, $symbol = \"$\", $currency_code = \"USD\"){\n $amount = floatval($amount);\n return sprintf(\"%s%.2f %s\", $symbol, $amount, $currency_code);\n}", "public function getCurrencies();", "abstract public function getExchangeRate($fromCurrency, $toCurrency);", "private function convertCurrencyByAmount($transaction) {\nlist($currency, $amount)=explode(\" \", $transaction);\n\n$stmt=$this->mysqli->prepare(\"SELECT currencyType, currencyRate FROM currencyrates WHERE currencyType=?\");\n$stmt->bind_param(\"s\", $currency);\n$stmt->execute();\n$res=$stmt->get_result();\n$row=$res->fetch_assoc();\n$stmt->close();\n\nreturn $this->basecurrency . ' ' . number_format((float)$row['currencyRate'] * (float)$amount, 2);\n}", "public function getGlobalCurrencyCode();", "public function getFromCurrency()\n {\n return $this->fromCurrency;\n }", "function bamiiConvertCurrency($amount, $from, $to){\n $conv_id = \"{$from}_{$to}\";\n $string = file_get_contents(\"https://free.currencyconverterapi.com/api/v5/convert?q=$conv_id&compact=y\");\n $json_a = json_decode($string, true);\n\n return $amount * $json_a[strtoupper($conv_id)]['val'];\n}", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "private function _update_currency_conversion_rate(){\n\t\t\t$query = \"SELECT `serial_num`, `\".$this->table_fields['currency_iso_code'].\"` as 'currency_iso_code' FROM `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` where `record_status`='1' AND `modification_date` < \".(date(\"U\") - (3600*24));\n\t\t\t$query_settings = array(\n\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n \n //get exchange rate\n $all_country_list = execute_sql_query($query_settings);\n\t\t\t$return = array();\n \n\t\t\tif( is_array( $all_country_list ) && ! empty( $all_country_list ) ){\n\t\t\t\t$query_settings['query_type'] = 'UPDATE';\n \n $first = true;\n foreach( $all_country_list as $val ){\n\t\t\t\t\tif( $val['currency_iso_code'] ){\n $json = file_get_contents('http://rate-exchange.appspot.com/currency?from=USD&to='.strtoupper($val['currency_iso_code']) );\n if($json)$cur = json_decode($json, true);\n if( isset( $cur['rate'] ) && $cur['rate'] ){\n $return[] = $cur;\n \n $query_settings['query'] = \"UPDATE `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` SET `\".$this->table_fields['conversion_rate'].\"`= '\".$cur['rate'].\"' WHERE `serial_num`='\".$val['serial_num'].\"' \";\n \n execute_sql_query($query_settings);\n \n if( $first ){\n $query_settings['tables'] = array();\n $query_settings['set_memcache'] = 0;\n $first = false;\n }\n }\n }\n\t\t\t\t}\n \n $this->class_settings[ 'do_not_check_cache' ] = 1;\n $this->_get_country_list();\n }\n \n return $return;\n }", "protected function get_currency() {\n\t\treturn $this->currency;\n\t}", "public function getCurrency()\n {\n return $this->MoneyCurrency;\n }", "public function toCurrency()\n {\n return $this->amount * config('foria.tokens.value');\n }", "public function testParseCurrency()\n {\n $gbp = $this->moneyParser->parse('£8.05');\n $this->assertEquals(805, $gbp->amount());\n $this->assertEquals('£8.05', $gbp->formatted());\n\n $eur = $this->moneyParser->parse('€5');\n $this->assertEquals(500, $eur->amount());\n $this->assertEquals('€5.00', $eur->formatted());\n\n $usd = $this->moneyParser->parse('$0.01');\n $this->assertEquals(1, $usd->amount());\n $this->assertEquals('US$0.01', $usd->formatted());\n }", "public function formatCurrency($amount);", "public function getBaseCurrency()\n {\n return $this->base_currency;\n }", "function currency( $c_f_x )\t\r\n {\r\n \t$c_f_x = round($c_f_x, 2);\t//THIS WILL ROUND THE ACCEPTED PARAMETER TO THE \r\n \t\t\t\t\t\t\t //PRECISION OF 2\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n \t$temp_c_f_variable = strstr(round($c_f_x,2), \".\");\t//THIS WILL ASSIGN THE \".\" AND WHAT EVER \r\n \t\t\t\t\t\t\t\t//ELSE COMES AFTER IT. REMEMBER DUE TO \r\n \t\t\t\t\t\t\t\t//ROUNDING THERE ARE ONLY THREE THINGS\r\n \t\t\t\t\t\t\t\t//THIS VARIABLE CAN CONTAIN, A PERIOD \r\n \t\t\t\t\t\t\t\t//WITH ONE NUMBER, A PERIOD WITH TWO NUMBERS,\r\n \t\t\t\t\t\t\t\t//OR NOTHING AT ALL\r\n \t\t\t\t\t\t\t\t//EXAMPLE : \".1\",\".12\",\"\"\r\n\t\t\t\t\t\t\t\t\t\r\n \tif (strlen($temp_c_f_variable) == 2)\t//THIS IF STATEMENT WILL CHECK TO SEE IF \r\n \t\t\t\t\t\t//LENGTH OF THE VARIABLE IS EQUAL TO 2. IF\r\n \t\t\t\t\t\t//IT IS, THEN WE KNOW THAT IT LOOKS LIKE \r\n \t\t\t\t\t\t//THIS \".1\" SO YOU WOULD ADD A ZERO TO GIVE IT \r\n \t\t\t\t\t\t// A NICE LOOKING FORMAT \r\n \t{\r\n \t\t$c_f_x = $c_f_x . \"0\";\r\n \t}\r\n\t\t\r\n \tif (strlen($temp_c_f_variable) == 0)\t//THIS IF STATEMENT WILL CHECK TO SEE IF \r\n \t\t\t\t\t\t//LENGTH OF THE VARIABLE IS EQUAL TO 2. IF\r\n \t\t\t\t\t\t//IT IS, THEN WE KNOW THAT IT LOOKS LIKE \r\n \t\t\t\t\t\t//THIS \"\" SO YOU WOULD ADD TWO ZERO'S TO GIVE IT \r\n \t\t\t\t\t\t// A NICE LOOKING FORMAT\r\n \t{\r\n \t\t$c_f_x = $c_f_x . \".00\";\r\n \t}\r\n\t\t\r\n\t\t$c_f_x = \"$\" . $c_f_x;\t//THIS WILL ADD THE \"$\" TO THE FRONT \r\n\r\n \treturn $c_f_x;\t//THIS WILL RETURN THE VARIABLE IN A NICE FORMAT\r\n \t\t\t\t\t//BUT REMEMBER THIS NEW VARIABLE WILL BE A STRING \r\n \t\t\t\t\t//THEREFORE CAN BE USED IN ANY FURTHER CALCULATIONS\r\n \t\t\r\n }", "function pms_get_currency_symbol( $currency_code ) {\r\n\r\n $currencies = apply_filters('pms_currency_symbols',\r\n array(\r\n 'AED' => '&#1583;.&#1573;', // ?\r\n 'AFN' => '&#65;&#102;',\r\n 'ALL' => '&#76;&#101;&#107;',\r\n 'AMD' => '',\r\n 'ANG' => '&#402;',\r\n 'AOA' => '&#75;&#122;', // ?\r\n 'ARS' => '&#36;',\r\n 'AUD' => '&#36;',\r\n 'AWG' => '&#402;',\r\n 'AZN' => '&#1084;&#1072;&#1085;',\r\n 'BAM' => '&#75;&#77;',\r\n 'BBD' => '&#36;',\r\n 'BDT' => '&#2547;', // ?\r\n 'BGN' => '&#1083;&#1074;',\r\n 'BHD' => '.&#1583;.&#1576;', // ?\r\n 'BIF' => '&#70;&#66;&#117;', // ?\r\n 'BMD' => '&#36;',\r\n 'BND' => '&#36;',\r\n 'BOB' => '&#36;&#98;',\r\n 'BRL' => '&#82;&#36;',\r\n 'BSD' => '&#36;',\r\n 'BTN' => '&#78;&#117;&#46;', // ?\r\n 'BWP' => '&#80;',\r\n 'BYR' => '&#112;&#46;',\r\n 'BZD' => '&#66;&#90;&#36;',\r\n 'CAD' => '&#36;',\r\n 'CDF' => '&#70;&#67;',\r\n 'CHF' => '&#67;&#72;&#70;',\r\n 'CLF' => '', // ?\r\n 'CLP' => '&#36;',\r\n 'CNY' => '&#165;',\r\n 'COP' => '&#36;',\r\n 'CRC' => '&#8353;',\r\n 'CUP' => '&#8396;',\r\n 'CVE' => '&#36;', // ?\r\n 'CZK' => '&#75;&#269;',\r\n 'DJF' => '&#70;&#100;&#106;', // ?\r\n 'DKK' => '&#107;&#114;',\r\n 'DOP' => '&#82;&#68;&#36;',\r\n 'DZD' => '&#1583;&#1580;', // ?\r\n 'EGP' => '&#163;',\r\n 'ETB' => '&#66;&#114;',\r\n 'EUR' => '&#8364;',\r\n 'FJD' => '&#36;',\r\n 'FKP' => '&#163;',\r\n 'GBP' => '&#163;',\r\n 'GEL' => '&#4314;', // ?\r\n 'GHS' => '&#162;',\r\n 'GIP' => '&#163;',\r\n 'GMD' => '&#68;', // ?\r\n 'GNF' => '&#70;&#71;', // ?\r\n 'GTQ' => '&#81;',\r\n 'GYD' => '&#36;',\r\n 'HKD' => '&#36;',\r\n 'HNL' => '&#76;',\r\n 'HRK' => '&#107;&#110;',\r\n 'HTG' => '&#71;', // ?\r\n 'HUF' => '&#70;&#116;',\r\n 'IDR' => '&#82;&#112;',\r\n 'ILS' => '&#8362;',\r\n 'INR' => '&#8377;',\r\n 'IQD' => '&#1593;.&#1583;', // ?\r\n 'IRR' => '&#65020;',\r\n 'ISK' => '&#107;&#114;',\r\n 'JEP' => '&#163;',\r\n 'JMD' => '&#74;&#36;',\r\n 'JOD' => '&#74;&#68;', // ?\r\n 'JPY' => '&#165;',\r\n 'KES' => '&#75;&#83;&#104;', // ?\r\n 'KGS' => '&#1083;&#1074;',\r\n 'KHR' => '&#6107;',\r\n 'KMF' => '&#67;&#70;', // ?\r\n 'KPW' => '&#8361;',\r\n 'KRW' => '&#8361;',\r\n 'KWD' => '&#1583;.&#1603;', // ?\r\n 'KYD' => '&#36;',\r\n 'KZT' => '&#1083;&#1074;',\r\n 'LAK' => '&#8365;',\r\n 'LBP' => '&#163;',\r\n 'LKR' => '&#8360;',\r\n 'LRD' => '&#36;',\r\n 'LSL' => '&#76;', // ?\r\n 'LTL' => '&#76;&#116;',\r\n 'LVL' => '&#76;&#115;',\r\n 'LYD' => '&#1604;.&#1583;', // ?\r\n 'MAD' => '&#1583;.&#1605;.', //?\r\n 'MDL' => '&#76;',\r\n 'MGA' => '&#65;&#114;', // ?\r\n 'MKD' => '&#1076;&#1077;&#1085;',\r\n 'MMK' => '&#75;',\r\n 'MNT' => '&#8366;',\r\n 'MOP' => '&#77;&#79;&#80;&#36;', // ?\r\n 'MRO' => '&#85;&#77;', // ?\r\n 'MUR' => '&#8360;', // ?\r\n 'MVR' => '.&#1923;', // ?\r\n 'MWK' => '&#77;&#75;',\r\n 'MXN' => '&#36;',\r\n 'MYR' => '&#82;&#77;',\r\n 'MZN' => '&#77;&#84;',\r\n 'NAD' => '&#36;',\r\n 'NGN' => '&#8358;',\r\n 'NIO' => '&#67;&#36;',\r\n 'NOK' => '&#107;&#114;',\r\n 'NPR' => '&#8360;',\r\n 'NZD' => '&#36;',\r\n 'OMR' => '&#65020;',\r\n 'PAB' => '&#66;&#47;&#46;',\r\n 'PEN' => '&#83;&#47;&#46;',\r\n 'PGK' => '&#75;', // ?\r\n 'PHP' => '&#8369;',\r\n 'PKR' => '&#8360;',\r\n 'PLN' => '&#122;&#322;',\r\n 'PYG' => '&#71;&#115;',\r\n 'QAR' => '&#65020;',\r\n 'RON' => '&#108;&#101;&#105;',\r\n 'RSD' => '&#1044;&#1080;&#1085;&#46;',\r\n 'RUB' => '&#1088;&#1091;&#1073;',\r\n 'RWF' => '&#1585;.&#1587;',\r\n 'SAR' => '&#65020;',\r\n 'SBD' => '&#36;',\r\n 'SCR' => '&#8360;',\r\n 'SDG' => '&#163;', // ?\r\n 'SEK' => '&#107;&#114;',\r\n 'SGD' => '&#36;',\r\n 'SHP' => '&#163;',\r\n 'SLL' => '&#76;&#101;', // ?\r\n 'SOS' => '&#83;',\r\n 'SRD' => '&#36;',\r\n 'STD' => '&#68;&#98;', // ?\r\n 'SVC' => '&#36;',\r\n 'SYP' => '&#163;',\r\n 'SZL' => '&#76;', // ?\r\n 'THB' => '&#3647;',\r\n 'TJS' => '&#84;&#74;&#83;', // ? TJS (guess)\r\n 'TMT' => '&#109;',\r\n 'TND' => '&#1583;.&#1578;',\r\n 'TOP' => '&#84;&#36;',\r\n 'TRY' => '&#8356;', // New Turkey Lira (old symbol used)\r\n 'TTD' => '&#36;',\r\n 'TWD' => '&#78;&#84;&#36;',\r\n 'TZS' => '',\r\n 'UAH' => '&#8372;',\r\n 'UGX' => '&#85;&#83;&#104;',\r\n 'USD' => '&#36;',\r\n 'UYU' => '&#36;&#85;',\r\n 'UZS' => '&#1083;&#1074;',\r\n 'VEF' => '&#66;&#115;',\r\n 'VND' => '&#8363;',\r\n 'VUV' => '&#86;&#84;',\r\n 'WST' => '&#87;&#83;&#36;',\r\n 'XAF' => '&#70;&#67;&#70;&#65;',\r\n 'XCD' => '&#36;',\r\n 'XDR' => '',\r\n 'XOF' => '',\r\n 'XPF' => '&#70;',\r\n 'YER' => '&#65020;',\r\n 'ZAR' => '&#82;',\r\n 'ZMK' => '&#90;&#75;', // ?\r\n 'ZWL' => '&#90;&#36;',\r\n )\r\n );\r\n\r\n $currency_symbol = ( isset( $currencies[$currency_code] ) ? $currencies[$currency_code] : $currency_code );\r\n\r\n return $currency_symbol;\r\n\r\n }", "public function getBaseCurrency()\n {\n return $this->baseCurrency;\n }", "function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}", "function toMoney($val,$symbol='$',$r=2){\n\n\n $n = $val;\n $c = is_float($n) ? 1 : number_format($n,$r);\n $d = '.';\n $t = ',';\n $sign = ($n < 0) ? '-' : '';\n $i = $n=number_format(abs($n),$r);\n $j = (($j = strlen($i)) > 3) ? $j % 3 : 0;\n\n return $symbol.$sign .($j ? substr($i,0, $j) + $t : '').preg_replace('/(\\d{3})(?=\\d)/',\"$1\" + $t,substr($i,$j)) ;\n\n}", "public function offlineConvertTo(Currency|string $currency, string $rate): Money;", "public function testConvertMethod()\n {\n \t$exchangeRates = ['€'=>1.0, '£'=>0.90, '$'=>1.10, 'other'=>0.0];\n\n \tforeach($exchangeRates as $currencySymbol => $exRate) {\n \t\t// Uses a Mock which returns the exchangeRates\n \t\t$currencyExchangeRateMock = $this->getMockBuilder(\"App\\Models\\CurrencyExchangeRateService\")->getMock();\n \t\t$currencyExchangeRateMock->expects($this->any())\n \t\t->method(\"getExchangeRate\")\n \t\t->will($this->returnValue($exRate));\n\n \t\t$currencyConverter = new DefaultCurrencyConverter($currencyExchangeRateMock);\n\n \t\t$this->assertEquals($exRate, $currencyConverter->convert($currencySymbol,1));\n \t}\n }", "function convertAmount($amount, $sourceCurrency, $destCurrency, $dateOfConversion) {\n\t$rateOfConversion = getExchangeRate($sourceCurrency, $destCurrency, $dateOfConversion);\n\treturn $amount * $rateOfConversion;\n}", "public function getCurrency() {\n\t\treturn $this->currency;\n\t}", "private function convertToCurrencyCode($price, $currency){\n\t\t\t\t\t\n\t\t// exchange rates are supplied in EUR so first convert it to GBP\n\t\t$GBPrate = $this->currencyRates['GBP'];\n\t\t\n\t\t$GBPrate = (float)$GBPrate * 100;\n\t\t\n\t\tif(!is_numeric($GBPrate)){\n\t\t\t$this->error = \"ERROR - there was an error converting the data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// get the amount of euros for £1 sterling\n\t\tif($currency == \"EUR\"){\n\t\t\treturn round(((1 / $GBPrate) * $price) * 100, 2); \n\t\t}\n\t\t\n\t\t// convert the sterling to euro\n\t\t$Euros = 1 / $GBPrate;\n\t\t\n\t\t// multiply the $price var with the euro value\n\t\t$Euros = $Euros * $price;\n\t\t\n\t\t// find the exchange rate for the currency required\n\t\t$currencyRate = $this->currencyRates[$currency];\n\t\t\n\t\t// output the calculation \n\t\treturn round(($Euros * $currencyRate) * 100, 2); \n\t\t\n\t}", "static function toCurrency($amount)\r\n {\r\n return \"$\" . number_format((double) $amount, 2);\r\n }", "public function getFormatedBaseCredit(){\n return $this->formatBasePrice($this->getBaseCredit());\n// $baseCurrency = $this->_storeManager->getStore()->getBaseCurrency();\n// return $baseCurrency->formatPrecision($this->getBaseCredit(),2,[],false);\n }", "function getISOCurrency($curr) {\n $out = \"\";\n if(ctype_digit($curr) || is_int($curr)) {\n $numCurr = $curr + 0;\n if($numCurr < 10) {\n $out = \"00\" . $numCurr;\n } else if ($numCurr < 100) {\n $out = \"0\" . $numCurr;\n } else {\n //Assume 3 digits (if greater let MAPs handle error)\n $out = \"\" . $numCurr;\n }\n } else {\n // Convert char to digit (if no convertion exists let MAPs handle error)\n\n $curCode = Array();\n $curCode[\"ADP\"]=\"020\";\n $curCode[\"AED\"]=\"784\";\n $curCode[\"AFA\"]=\"004\";\n $curCode[\"ALL\"]=\"008\";\n $curCode[\"AMD\"]=\"051\";\n $curCode[\"ANG\"]=\"532\";\n $curCode[\"AON\"]=\"024\";\n $curCode[\"ARS\"]=\"032\";\n $curCode[\"ATS\"]=\"040\";\n $curCode[\"AUD\"]=\"036\";\n $curCode[\"AWG\"]=\"533\";\n $curCode[\"AZM\"]=\"031\";\n $curCode[\"BAM\"]=\"977\";\n $curCode[\"BBD\"]=\"052\";\n $curCode[\"BDT\"]=\"050\";\n $curCode[\"BEF\"]=\"056\";\n $curCode[\"BGL\"]=\"100\";\n $curCode[\"BHD\"]=\"048\";\n $curCode[\"BIF\"]=\"108\";\n $curCode[\"BMD\"]=\"060\";\n $curCode[\"BND\"]=\"096\";\n $curCode[\"BOB\"]=\"068\";\n $curCode[\"BRL\"]=\"986\";\n $curCode[\"BSD\"]=\"044\";\n $curCode[\"BTN\"]=\"064\";\n $curCode[\"BWP\"]=\"072\";\n $curCode[\"BYR\"]=\"974\";\n $curCode[\"BZD\"]=\"084\";\n $curCode[\"CAD\"]=\"124\";\n $curCode[\"CDF\"]=\"976\";\n $curCode[\"CHF\"]=\"756\";\n $curCode[\"CLP\"]=\"152\";\n $curCode[\"CNY\"]=\"156\";\n $curCode[\"COP\"]=\"170\";\n $curCode[\"CRC\"]=\"188\";\n $curCode[\"CUP\"]=\"192\";\n $curCode[\"CVE\"]=\"132\";\n $curCode[\"CYP\"]=\"196\";\n $curCode[\"CZK\"]=\"203\";\n $curCode[\"DEM\"]=\"276\";\n $curCode[\"DJF\"]=\"262\";\n $curCode[\"DKK\"]=\"208\";\n $curCode[\"DOP\"]=\"214\";\n $curCode[\"DZD\"]=\"012\";\n $curCode[\"EEK\"]=\"233\";\n $curCode[\"EGP\"]=\"818\";\n $curCode[\"ERN\"]=\"232\";\n $curCode[\"ETB\"]=\"230\";\n $curCode[\"EUR\"]=\"978\";\n $curCode[\"FIM\"]=\"246\";\n $curCode[\"FJD\"]=\"242\";\n $curCode[\"FKP\"]=\"238\";\n $curCode[\"FRF\"]=\"250\";\n $curCode[\"GBP\"]=\"826\";\n $curCode[\"GEL\"]=\"981\";\n $curCode[\"GHC\"]=\"288\";\n $curCode[\"GIP\"]=\"292\";\n $curCode[\"GMD\"]=\"270\";\n $curCode[\"GNF\"]=\"324\";\n $curCode[\"GTQ\"]=\"320\";\n $curCode[\"GWP\"]=\"624\";\n $curCode[\"GYD\"]=\"328\";\n $curCode[\"HKD\"]=\"344\";\n $curCode[\"HNL\"]=\"340\";\n $curCode[\"HRK\"]=\"191\";\n $curCode[\"HTG\"]=\"332\";\n $curCode[\"HUF\"]=\"348\";\n $curCode[\"IDR\"]=\"360\";\n $curCode[\"IEP\"]=\"372\";\n $curCode[\"ILS\"]=\"376\";\n $curCode[\"INR\"]=\"356\";\n $curCode[\"IQD\"]=\"368\";\n $curCode[\"IRR\"]=\"364\";\n $curCode[\"ISK\"]=\"352\";\n $curCode[\"ITL\"]=\"380\";\n $curCode[\"JMD\"]=\"388\";\n $curCode[\"JOD\"]=\"400\";\n $curCode[\"JPY\"]=\"392\";\n $curCode[\"KES\"]=\"404\";\n $curCode[\"KGS\"]=\"417\";\n $curCode[\"KHR\"]=\"116\";\n $curCode[\"KMF\"]=\"174\";\n $curCode[\"KPW\"]=\"408\";\n $curCode[\"KRW\"]=\"410\";\n $curCode[\"KWD\"]=\"414\";\n $curCode[\"KYD\"]=\"136\";\n $curCode[\"KZT\"]=\"398\";\n $curCode[\"LAK\"]=\"418\";\n $curCode[\"LBP\"]=\"422\";\n $curCode[\"LKR\"]=\"144\";\n $curCode[\"LRD\"]=\"430\";\n $curCode[\"LSL\"]=\"426\";\n $curCode[\"LTL\"]=\"440\";\n $curCode[\"LUF\"]=\"442\";\n $curCode[\"LVL\"]=\"428\";\n $curCode[\"LYD\"]=\"434\";\n $curCode[\"MAD\"]=\"504\";\n $curCode[\"MDL\"]=\"498\";\n $curCode[\"MGF\"]=\"450\";\n $curCode[\"MKD\"]=\"807\";\n $curCode[\"MMK\"]=\"104\";\n $curCode[\"MNT\"]=\"496\";\n $curCode[\"MOP\"]=\"446\";\n $curCode[\"MRO\"]=\"478\";\n $curCode[\"MTL\"]=\"470\";\n $curCode[\"MUR\"]=\"480\";\n $curCode[\"MVR\"]=\"462\";\n $curCode[\"MWK\"]=\"454\";\n $curCode[\"MXN\"]=\"484\";\n $curCode[\"MYR\"]=\"458\";\n $curCode[\"MZM\"]=\"508\";\n $curCode[\"NAD\"]=\"516\";\n $curCode[\"NGN\"]=\"566\";\n $curCode[\"NIO\"]=\"558\";\n $curCode[\"NLG\"]=\"528\";\n $curCode[\"NOK\"]=\"578\";\n $curCode[\"NPR\"]=\"524\";\n $curCode[\"NZD\"]=\"554\";\n $curCode[\"OMR\"]=\"512\";\n $curCode[\"PAB\"]=\"590\";\n $curCode[\"PEN\"]=\"604\";\n $curCode[\"PGK\"]=\"598\";\n $curCode[\"PHP\"]=\"608\";\n $curCode[\"PKR\"]=\"586\";\n $curCode[\"PLN\"]=\"985\";\n $curCode[\"PTE\"]=\"620\";\n $curCode[\"PYG\"]=\"600\";\n $curCode[\"QAR\"]=\"634\";\n $curCode[\"ROL\"]=\"642\";\n $curCode[\"RUB\"]=\"643\";\n $curCode[\"RUR\"]=\"810\";\n $curCode[\"RWF\"]=\"646\";\n $curCode[\"SAR\"]=\"682\";\n $curCode[\"SBD\"]=\"090\";\n $curCode[\"SCR\"]=\"690\";\n $curCode[\"SDD\"]=\"736\";\n $curCode[\"SEK\"]=\"752\";\n $curCode[\"SGD\"]=\"702\";\n $curCode[\"SHP\"]=\"654\";\n $curCode[\"SIT\"]=\"705\";\n $curCode[\"SKK\"]=\"703\";\n $curCode[\"SLL\"]=\"694\";\n $curCode[\"SOS\"]=\"706\";\n $curCode[\"SRG\"]=\"740\";\n $curCode[\"STD\"]=\"678\";\n $curCode[\"SVC\"]=\"222\";\n $curCode[\"SYP\"]=\"760\";\n $curCode[\"SZL\"]=\"748\";\n $curCode[\"THB\"]=\"764\";\n $curCode[\"TJS\"]=\"972\";\n $curCode[\"TMM\"]=\"795\";\n $curCode[\"TND\"]=\"788\";\n $curCode[\"TOP\"]=\"776\";\n $curCode[\"TPE\"]=\"626\";\n $curCode[\"TRL\"]=\"792\";\n $curCode[\"TTD\"]=\"780\";\n $curCode[\"TWD\"]=\"901\";\n $curCode[\"TZS\"]=\"834\";\n $curCode[\"UAH\"]=\"980\";\n $curCode[\"UGX\"]=\"800\";\n $curCode[\"USD\"]=\"840\";\n $curCode[\"UYU\"]=\"858\";\n $curCode[\"UZS\"]=\"860\";\n $curCode[\"VEB\"]=\"862\";\n $curCode[\"VND\"]=\"704\";\n $curCode[\"VUV\"]=\"548\";\n $curCode[\"WST\"]=\"882\";\n $curCode[\"XAF\"]=\"950\";\n $curCode[\"XCD\"]=\"951\";\n $curCode[\"XOF\"]=\"952\";\n $curCode[\"XPF\"]=\"953\";\n $curCode[\"YER\"]=\"886\";\n $curCode[\"YUM\"]=\"891\";\n $curCode[\"ZAR\"]=\"710\";\n $curCode[\"ZMK\"]=\"894\";\n $curCode[\"ZWD\"]=\"716\";\n\n $out = $curCode[$curr];\n }\n\n return $out;\n }", "function is_currency( $v,$round=0 )\r\n{\r\n$v = preg_replace(\"/[^0-9.]+/\",\"\",$v);\r\nreturn round($v,$round);\r\n}", "function presentPrice($price)\n{\n // $currencies = new ISOCurrencies();\n // $numberFormatter = new \\NumberFormatter('en_US', \\NumberFormatter::CURRENCY);\n // $moneyFormatter = new IntlMoneyFormatter($numberFormatter, $currencies);\n // return $moneyFormatter->format($money);\n $fmt = new NumberFormatter('vi-VN', NumberFormatter::CURRENCY);\n return $fmt->formatCurrency($price, \"VND\");\n\n #en-US USD\n #vi-VN VND\n}", "function GetOurCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetOurCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function getWithCurrency($amount, $decimals = 2)\n{\n return FormatNumber($amount, $decimals) . \\Config::get('website.currency');\n}", "function convertCurToIUSD($url, $amount, $api_key, $currencySymbol) {\n error_log(\"Entered into Convert CAmount\");\n error_log($url.'?api_key='.$api_key.'&currency='.$currencySymbol.'&amount='. $amount);\n $ch = curl_init($url.'?api_key='.$api_key.'&currency='.$currencySymbol.'&amount='. $amount);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json')\n );\n\n $result = curl_exec($ch);\n $data = json_decode( $result , true);\n error_log('Response =>'. var_export($data, TRUE));\n // Return the equivalent value acquired from Agate server.\n return (float) $data[\"result\"];\n\n }", "public function currencyPrice()\n {\n \t$this->currencyPrice = CurrencyPrice::getCurrencyPrices($this->sellPrices->CurrencyNo)->BuyPrice;\n \treturn $this->currencyPrice > 0 ? $this->currencyPrice : 1 ;\n }", "private function convertBase()\n {\n // check that defined base currency exists\n if (!isset($this->data['rates'][$this->base])) {\n return false;\n }\n\n // convert currencies\n if ($this->base !== $this->data['base']) {\n $rates = array();\n $base_rate = $this->data['rates'][$this->base];\n foreach($this->data['rates'] as $key => $val) {\n if ($key !== $this->base) {\n // round to 6 decimal places\n $rates[$key] = (float) round($val * (1/$base_rate), 6);\n } else {\n if ($this->source === 'ecb') {\n $rates['EUR'] = (float) round(1/$base_rate, 6);\n } else {\n $rates['USD'] = (float) round(1/$base_rate, 6);\n }\n $rates[$this->base] = (float) 1.00;\n }\n }\n $this->data['base'] = $this->base;\n $this->data['rates'] = $rates;\n }\n return true;\n }", "function formatRawAmount($amount, $curr) {\n $dblAmount = $amount + 0.0;\n\n // Build Currency format table\n $curFormat = Array();\n $curFormat[\"020\"]=0;\n $curFormat[\"784\"]=2;\n $curFormat[\"044\"]=2;\n $curFormat[\"004\"]=2;\n $curFormat[\"008\"]=2;\n $curFormat[\"051\"]=2;\n $curFormat[\"532\"]=2;\n $curFormat[\"024\"]=2;\n $curFormat[\"032\"]=2;\n $curFormat[\"040\"]=2;\n $curFormat[\"036\"]=2;\n $curFormat[\"533\"]=2;\n $curFormat[\"031\"]=2;\n $curFormat[\"977\"]=2;\n $curFormat[\"052\"]=2;\n $curFormat[\"050\"]=2;\n $curFormat[\"056\"]=0;\n $curFormat[\"100\"]=2;\n $curFormat[\"048\"]=3;\n $curFormat[\"108\"]=0;\n $curFormat[\"060\"]=2;\n $curFormat[\"096\"]=2;\n $curFormat[\"068\"]=2;\n $curFormat[\"986\"]=2;\n $curFormat[\"064\"]=2;\n $curFormat[\"072\"]=2;\n $curFormat[\"974\"]=0;\n $curFormat[\"084\"]=2;\n $curFormat[\"124\"]=2;\n $curFormat[\"976\"]=2;\n $curFormat[\"756\"]=2;\n $curFormat[\"152\"]=0;\n $curFormat[\"156\"]=2;\n $curFormat[\"170\"]=2;\n $curFormat[\"188\"]=2;\n $curFormat[\"192\"]=2;\n $curFormat[\"132\"]=2;\n $curFormat[\"196\"]=2;\n $curFormat[\"203\"]=2;\n $curFormat[\"276\"]=2;\n $curFormat[\"262\"]=0;\n $curFormat[\"208\"]=2;\n $curFormat[\"214\"]=2;\n $curFormat[\"012\"]=2;\n $curFormat[\"233\"]=2;\n $curFormat[\"818\"]=2;\n $curFormat[\"232\"]=2;\n $curFormat[\"230\"]=2;\n $curFormat[\"978\"]=2;\n $curFormat[\"246\"]=2;\n $curFormat[\"242\"]=2;\n $curFormat[\"238\"]=2;\n $curFormat[\"250\"]=2;\n $curFormat[\"826\"]=2;\n $curFormat[\"981\"]=2;\n $curFormat[\"288\"]=2;\n $curFormat[\"292\"]=2;\n $curFormat[\"270\"]=2;\n $curFormat[\"324\"]=0;\n $curFormat[\"320\"]=2;\n $curFormat[\"624\"]=2;\n $curFormat[\"328\"]=2;\n $curFormat[\"344\"]=2;\n $curFormat[\"340\"]=2;\n $curFormat[\"191\"]=2;\n $curFormat[\"332\"]=2;\n $curFormat[\"348\"]=2;\n $curFormat[\"360\"]=2;\n $curFormat[\"372\"]=2;\n $curFormat[\"376\"]=2;\n $curFormat[\"356\"]=2;\n $curFormat[\"368\"]=3;\n $curFormat[\"364\"]=2;\n $curFormat[\"352\"]=2;\n $curFormat[\"380\"]=0;\n $curFormat[\"388\"]=2;\n $curFormat[\"400\"]=3;\n $curFormat[\"392\"]=0;\n $curFormat[\"404\"]=2;\n $curFormat[\"417\"]=2;\n $curFormat[\"116\"]=2;\n $curFormat[\"174\"]=0;\n $curFormat[\"408\"]=2;\n $curFormat[\"410\"]=0;\n $curFormat[\"414\"]=3;\n $curFormat[\"136\"]=2;\n $curFormat[\"398\"]=2;\n $curFormat[\"418\"]=2;\n $curFormat[\"422\"]=2;\n $curFormat[\"144\"]=2;\n $curFormat[\"430\"]=2;\n $curFormat[\"426\"]=2;\n $curFormat[\"440\"]=2;\n $curFormat[\"442\"]=0;\n $curFormat[\"428\"]=2;\n $curFormat[\"434\"]=3;\n $curFormat[\"504\"]=2;\n $curFormat[\"498\"]=2;\n $curFormat[\"450\"]=0;\n $curFormat[\"807\"]=2;\n $curFormat[\"104\"]=2;\n $curFormat[\"496\"]=2;\n $curFormat[\"446\"]=2;\n $curFormat[\"478\"]=2;\n $curFormat[\"470\"]=2;\n $curFormat[\"480\"]=2;\n $curFormat[\"462\"]=2;\n $curFormat[\"454\"]=2;\n $curFormat[\"484\"]=2;\n $curFormat[\"458\"]=2;\n $curFormat[\"508\"]=2;\n $curFormat[\"516\"]=2;\n $curFormat[\"566\"]=2;\n $curFormat[\"558\"]=2;\n $curFormat[\"528\"]=2;\n $curFormat[\"578\"]=2;\n $curFormat[\"524\"]=2;\n $curFormat[\"554\"]=2;\n $curFormat[\"512\"]=3;\n $curFormat[\"590\"]=2;\n $curFormat[\"604\"]=2;\n $curFormat[\"598\"]=2;\n $curFormat[\"608\"]=2;\n $curFormat[\"586\"]=2;\n $curFormat[\"985\"]=2;\n $curFormat[\"620\"]=0;\n $curFormat[\"600\"]=0;\n $curFormat[\"634\"]=2;\n $curFormat[\"642\"]=2;\n $curFormat[\"643\"]=2;\n $curFormat[\"810\"]=2;\n $curFormat[\"646\"]=0;\n $curFormat[\"682\"]=2;\n $curFormat[\"090\"]=2;\n $curFormat[\"690\"]=2;\n $curFormat[\"736\"]=2;\n $curFormat[\"752\"]=2;\n $curFormat[\"702\"]=2;\n $curFormat[\"654\"]=2;\n $curFormat[\"705\"]=2;\n $curFormat[\"703\"]=2;\n $curFormat[\"694\"]=2;\n $curFormat[\"706\"]=2;\n $curFormat[\"740\"]=2;\n $curFormat[\"678\"]=2;\n $curFormat[\"222\"]=2;\n $curFormat[\"760\"]=2;\n $curFormat[\"748\"]=2;\n $curFormat[\"764\"]=2;\n $curFormat[\"972\"]=2;\n $curFormat[\"795\"]=2;\n $curFormat[\"788\"]=3;\n $curFormat[\"776\"]=2;\n $curFormat[\"626\"]=0;\n $curFormat[\"792\"]=0;\n $curFormat[\"780\"]=2;\n $curFormat[\"901\"]=2;\n $curFormat[\"834\"]=2;\n $curFormat[\"980\"]=2;\n $curFormat[\"800\"]=2;\n $curFormat[\"840\"]=2;\n $curFormat[\"858\"]=2;\n $curFormat[\"860\"]=2;\n $curFormat[\"862\"]=2;\n $curFormat[\"704\"]=2;\n $curFormat[\"548\"]=0;\n $curFormat[\"882\"]=2;\n $curFormat[\"950\"]=0;\n $curFormat[\"951\"]=2;\n $curFormat[\"952\"]=0;\n $curFormat[\"953\"]=0;\n $curFormat[\"886\"]=2;\n $curFormat[\"891\"]=2;\n $curFormat[\"710\"]=2;\n $curFormat[\"894\"]=2;\n $curFormat[\"716\"]=2;\n\n $digCurr = $this->getISOCurrency(\"\" . $curr);\n $exponent = $curFormat[$digCurr];\n\n\n\n $strAmount = \"\" . Round($dblAmount, $exponent);\n $strRetVal = \"\" . $strAmount;\n\n // decimal position\n $curpos = strpos($strRetVal, \".\");\n\n // Pad with zeros\n if($curpos == true) {\n $padCount = $exponent - (strlen($strRetVal) - $curpos - 1);\n for($i=0;$i<$padCount;$i++) {\n $strRetVal .= \"0\";\n }\n }\n else {\n $padCount = $exponent;\n for($i=0;$i<$padCount;$i++) {\n $strRetVal .= \"0\";\n }\n }\n\n if($curpos !== false) {\n $strRetVal = substr($strRetVal, 0, $curpos) . substr($strRetVal, $curpos+1);\n }\n return $strRetVal;\n }", "public function getBaseToOrderRate();", "function eZProductCurrency( $id=-1 )\r\n {\r\n if ( $id != -1 )\r\n {\r\n $this->ID = $id;\r\n $this->get( $this->ID );\r\n }\r\n }", "public function toMoney()\n {\n return $this->rate;\n }", "function format_currency($value, $symbol=true)\r\n{\r\n\r\n\tif(!is_numeric($value))\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$CI = &get_instance();\r\n\t\r\n\tif($value < 0 )\r\n\t{\r\n\t\t$neg = '- ';\r\n\t} else {\r\n\t\t$neg = '';\r\n\t}\r\n\t\r\n\tif($symbol)\r\n\t{\r\n\t\t$formatted\t= number_format(abs($value), 2,'.', ',');\r\n\t\t\r\n\t\t\t$formatted\t= $neg.'$'.$formatted;\r\n\t}\r\n\telse\r\n\t{\r\n\t\r\n\t\t//traditional number formatting\r\n\t\t$formatted\t= number_format(abs($value), 2, '.', ',');\r\n\t}\r\n\t\r\n\treturn $formatted;\r\n}", "public function getCurrency()\n {\n return \"/V1/directory/currency\";\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "function convert_price_default_currency($price,$rate=1)\n{\n\treturn sprintf('%0.2f',($price/$rate));\n}", "public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }", "public static function currency() {\n\t\treturn self::$currency;\n\t}", "public function getOriginalCurrency()\n {\n return $this->originalCurrency;\n }", "public function getCurrency()\n {\n return $this->getData(self::CURRENCY);\n }", "public static function usesCurrency()\n {\n return static::$currency;\n }", "public function test_convert_called_callApiAndReturnConversion()\n {\n $rate = 1.324;\n $amount = 100;\n $from_currency_name = 'EUR';\n $to_currency_name = 'USD';\n $this->currencyXchangeApi_double->getRate($from_currency_name, $to_currency_name)->willReturn($rate);\n $sut = new CurrencyConversionService($this->currencyXchangeApi_double->reveal());\n $actual = $sut->convert(new Money($amount, new Currency($from_currency_name)), new Currency($to_currency_name));\n $expected = new Money(132, new Currency($to_currency_name));\n self::assertEquals($expected, $actual);\n }", "function fetch_currency_with_symbol($amount,$currency = '')\r\n{\r\n\t$amt_display = '';\r\n\tif($amount==''){ $amount =0; }\r\n\t$decimals=get_option('tmpl_price_num_decimals');\r\n\t$decimals=($decimals!='')?$decimals:2;\r\n\tif($amount >=0 )\r\n\t{\r\n\t\tif(@$amount !='')\r\n\t\t\t$amount = $amount;\r\n\t\t\t$currency = get_option('currency_symbol');\r\n\t\t\t$position = get_option('currency_pos');\r\n\t\tif($position == '1')\r\n\t\t{\r\n\t\t\t$amt_display = $currency.$amount;\r\n\t\t}\r\n\t\telse if($position == '2')\r\n\t\t{\r\n\t\t\t$amt_display = $currency.' '.$amount;\r\n\t\t}\r\n\t\telse if($position == '3')\r\n\t\t{\r\n\t\t\t$amt_display = $amount.$currency;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$amt_display = $amount.' '.$currency;\r\n\t\t}\r\n\t\treturn apply_filters('tmpl_price_format',$amt_display,$amount,$currency);\r\n\t}\r\n}", "function pms_get_currencies() {\r\n\r\n $currencies = array(\r\n 'USD' => __( 'US Dollar', 'paid-member-subscriptions' ),\r\n 'EUR' => __( 'Euro', 'paid-member-subscriptions' ),\r\n 'GBP' => __( 'Pound Sterling', 'paid-member-subscriptions' ),\r\n 'CAD' => __( 'Canadian Dollar', 'paid-member-subscriptions' ),\r\n 'AUD' => __( 'Australian Dollar', 'paid-member-subscriptions' ),\r\n 'BRL' => __( 'Brazilian Real', 'paid-member-subscriptions' ),\r\n 'CZK' => __( 'Czech Koruna', 'paid-member-subscriptions' ),\r\n 'DKK' => __( 'Danish Krone', 'paid-member-subscriptions' ),\r\n 'HKD' => __( 'Hong Kong Dollar', 'paid-member-subscriptions' ),\r\n 'HUF' => __( 'Hungarian Forint', 'paid-member-subscriptions' ),\r\n 'ILS' => __( 'Israeli New Sheqel', 'paid-member-subscriptions' ),\r\n 'JPY' => __( 'Japanese Yen', 'paid-member-subscriptions' ),\r\n 'MYR' => __( 'Malaysian Ringgit', 'paid-member-subscriptions' ),\r\n 'MXN' => __( 'Mexican Peso', 'paid-member-subscriptions' ),\r\n 'NOK' => __( 'Norwegian Krone', 'paid-member-subscriptions' ),\r\n 'NZD' => __( 'New Zealand Dollar', 'paid-member-subscriptions' ),\r\n 'PHP' => __( 'Philippine Peso', 'paid-member-subscriptions' ),\r\n 'PLN' => __( 'Polish Zloty', 'paid-member-subscriptions' ),\r\n 'RUB' => __( 'Russian Ruble', 'paid-member-subscriptions' ),\r\n 'SGD' => __( 'Singapore Dollar', 'paid-member-subscriptions' ),\r\n 'SEK' => __( 'Swedish Krona', 'paid-member-subscriptions' ),\r\n 'CHF' => __( 'Swiss Franc', 'paid-member-subscriptions' ),\r\n 'TWD' => __( 'Taiwan New Dollar', 'paid-member-subscriptions' ),\r\n 'THB' => __( 'Thai Baht', 'paid-member-subscriptions' ),\r\n 'TRY' => __( 'Turkish Lira', 'paid-member-subscriptions' )\r\n );\r\n\r\n return apply_filters( 'pms_currencies', $currencies );\r\n\r\n }", "public function preferredCurrencyCode()\n {\n return CulqiCashier::usesCurrency();\n }", "public function getFormattedAmount(): string;", "function currency_symbol() {\n\t\treturn DEFAULT_CURRENCY;\n\t}", "public function getCredit(){\n return $this->priceCurrency->convert($this->getBaseCredit());\n }", "public function testItWillConvertAFloatToMoneyFormattedStringUsingDutchLocale()\n {\n }", "function getIsoCurrCode($magento_currency_code) {\r\n\tswitch($magento_currency_code){\r\n\tcase 'HKD':\r\n\t\t$cur = '344';\r\n\t\tbreak;\r\n\tcase 'USD':\r\n\t\t$cur = '840';\r\n\t\tbreak;\r\n\tcase 'SGD':\r\n\t\t$cur = '702';\r\n\t\tbreak;\r\n\tcase 'CNY':\r\n\t\t$cur = '156';\r\n\t\tbreak;\r\n\tcase 'JPY':\r\n\t\t$cur = '392';\r\n\t\tbreak;\t\t\r\n\tcase 'TWD':\r\n\t\t$cur = '901';\r\n\t\tbreak;\r\n\tcase 'AUD':\r\n\t\t$cur = '036';\r\n\t\tbreak;\r\n\tcase 'EUR':\r\n\t\t$cur = '978';\r\n\t\tbreak;\r\n\tcase 'GBP':\r\n\t\t$cur = '826';\r\n\t\tbreak;\r\n\tcase 'CAD':\r\n\t\t$cur = '124';\r\n\t\tbreak;\r\n\tcase 'MOP':\r\n\t\t$cur = '446';\r\n\t\tbreak;\r\n\tcase 'PHP':\r\n\t\t$cur = '608';\r\n\t\tbreak;\r\n\tcase 'THB':\r\n\t\t$cur = '764';\r\n\t\tbreak;\r\n\tcase 'MYR':\r\n\t\t$cur = '458';\r\n\t\tbreak;\r\n\tcase 'IDR':\r\n\t\t$cur = '360';\r\n\t\tbreak;\r\n\tcase 'KRW':\r\n\t\t$cur = '410';\r\n\t\tbreak;\r\n\tcase 'SAR':\r\n\t\t$cur = '682';\r\n\t\tbreak;\r\n\tcase 'NZD':\r\n\t\t$cur = '554';\r\n\t\tbreak;\r\n\tcase 'AED':\r\n\t\t$cur = '784';\r\n\t\tbreak;\r\n\tcase 'BND':\r\n\t\t$cur = '096';\r\n\t\tbreak;\r\n\tcase 'VND':\r\n\t\t$cur = '704';\r\n\t\tbreak;\r\n\tcase 'INR':\r\n\t\t$cur = '356';\r\n\t\tbreak;\r\n\tdefault:\r\n\t\t$cur = '344';\r\n\t}\t\r\n\treturn $cur;\r\n}", "function erp_get_currencies() {\n return apply_filters( 'erp_currencies', [\n 'AFN' => __( 'Afghan Afghani', 'erp' ),\n 'ALL' => __( 'Albanian Lek', 'erp' ),\n 'DZD' => __( 'Algerian Dinar', 'erp' ),\n 'ADP' => __( 'Andorran Peseta', 'erp' ),\n 'AOA' => __( 'Angolan Kwanza', 'erp' ),\n 'ARA' => __( 'Argentine Austral', 'erp' ),\n 'ARS' => __( 'Argentine Peso', 'erp' ),\n 'AMD' => __( 'Armenian Dram', 'erp' ),\n 'AWG' => __( 'Aruban Florin', 'erp' ),\n 'AUD' => __( 'Australian Dollar', 'erp' ),\n 'ATS' => __( 'Austrian Schilling', 'erp' ),\n 'AZN' => __( 'Azerbaijani Manat', 'erp' ),\n 'BSD' => __( 'Bahamian Dollar', 'erp' ),\n 'BHD' => __( 'Bahraini Dinar', 'erp' ),\n 'BDT' => __( 'Bangladeshi Taka', 'erp' ),\n 'BBD' => __( 'Barbadian Dollar', 'erp' ),\n 'BYR' => __( 'Belarusian Ruble', 'erp' ),\n 'BEF' => __( 'Belgian Franc', 'erp' ),\n 'BZD' => __( 'Belize Dollar', 'erp' ),\n 'BMD' => __( 'Bermudan Dollar', 'erp' ),\n 'BTN' => __( 'Bhutanese Ngultrum', 'erp' ),\n 'BOB' => __( 'Bolivian Boliviano', 'erp' ),\n 'BOV' => __( 'Bolivian Mvdol', 'erp' ),\n 'BOP' => __( 'Bolivian Peso', 'erp' ),\n 'BAM' => __( 'Bosnia-Herzegovina Convertible Mark', 'erp' ),\n 'BWP' => __( 'Botswanan Pula', 'erp' ),\n 'BRL' => __( 'Brazilian Real', 'erp' ),\n 'GBP' => __( 'British Pound Sterling', 'erp' ),\n 'BND' => __( 'Brunei Dollar', 'erp' ),\n 'BGN' => __( 'Bulgarian Lev', 'erp' ),\n 'BUK' => __( 'Burmese Kyat', 'erp' ),\n 'BIF' => __( 'Burundian Franc', 'erp' ),\n 'KHR' => __( 'Cambodian Riel', 'erp' ),\n 'CAD' => __( 'Canadian Dollar', 'erp' ),\n 'CVE' => __( 'Cape Verdean Escudo', 'erp' ),\n 'KYD' => __( 'Cayman Islands Dollar', 'erp' ),\n 'XOF' => __( 'CFA Franc BCEAO', 'erp' ),\n 'XAF' => __( 'CFA Franc BEAC', 'erp' ),\n 'XPF' => __( 'CFP Franc', 'erp' ),\n 'CLP' => __( 'Chilean Peso', 'erp' ),\n 'CNY' => __( 'Chinese Yuan', 'erp' ),\n 'COP' => __( 'Colombian Peso', 'erp' ),\n 'KMF' => __( 'Comorian Franc', 'erp' ),\n 'CDF' => __( 'Congolese Franc', 'erp' ),\n 'CRC' => __( 'Costa Rican Colón', 'erp' ),\n 'HRK' => __( 'Croatian Kuna', 'erp' ),\n 'CUP' => __( 'Cuban Peso', 'erp' ),\n 'CYP' => __( 'Cypriot Pound', 'erp' ),\n 'CZK' => __( 'Czech Republic Koruna', 'erp' ),\n 'DKK' => __( 'Danish Krone', 'erp' ),\n 'DJF' => __( 'Djiboutian Franc', 'erp' ),\n 'DOP' => __( 'Dominican Peso', 'erp' ),\n 'NLG' => __( 'Dutch Guilder', 'erp' ),\n 'XCD' => __( 'East Caribbean Dollar', 'erp' ),\n 'ECS' => __( 'Ecuadorian Sucre', 'erp' ),\n 'EGP' => __( 'Egyptian Pound', 'erp' ),\n 'GQE' => __( 'Equatorial Guinean Ekwele', 'erp' ),\n 'ERN' => __( 'Eritrean Nakfa', 'erp' ),\n 'EEK' => __( 'Estonian Kroon', 'erp' ),\n 'ETB' => __( 'Ethiopian Birr', 'erp' ),\n 'EUR' => __( 'Euro', 'erp' ),\n 'FKP' => __( 'Falkland Islands Pound', 'erp' ),\n 'FJD' => __( 'Fijian Dollar', 'erp' ),\n 'FIM' => __( 'Finnish Markka', 'erp' ),\n 'FRF' => __( 'French Franc', 'erp' ),\n 'GMD' => __( 'Gambian Dalasi', 'erp' ),\n 'GEL' => __( 'Georgian Lari', 'erp' ),\n 'DEM' => __( 'German Mark', 'erp' ),\n 'GHS' => __( 'Ghanaian Cedi', 'erp' ),\n 'GIP' => __( 'Gibraltar Pound', 'erp' ),\n 'GRD' => __( 'Greek Drachma', 'erp' ),\n 'GTQ' => __( 'Guatemalan Quetzal', 'erp' ),\n 'GWP' => __( 'Guinea-Bissau Peso', 'erp' ),\n 'GNF' => __( 'Guinean Franc', 'erp' ),\n 'GYD' => __( 'Guyanaese Dollar', 'erp' ),\n 'HTG' => __( 'Haitian Gourde', 'erp' ),\n 'HNL' => __( 'Honduran Lempira', 'erp' ),\n 'HKD' => __( 'Hong Kong Dollar', 'erp' ),\n 'HUF' => __( 'Hungarian Forint', 'erp' ),\n 'ISK' => __( 'Icelandic Króna', 'erp' ),\n 'INR' => __( 'Indian Rupee', 'erp' ),\n 'IDR' => __( 'Indonesian Rupiah', 'erp' ),\n 'IRR' => __( 'Iranian Rial', 'erp' ),\n 'IQD' => __( 'Iraqi Dinar', 'erp' ),\n 'IEP' => __( 'Irish Pound', 'erp' ),\n 'ILS' => __( 'Israeli New Sheqel', 'erp' ),\n 'ITL' => __( 'Italian Lira', 'erp' ),\n 'JMD' => __( 'Jamaican Dollar', 'erp' ),\n 'JPY' => __( 'Japanese Yen', 'erp' ),\n 'JOD' => __( 'Jordanian Dinar', 'erp' ),\n 'KZT' => __( 'Kazakhstani Tenge', 'erp' ),\n 'KES' => __( 'Kenyan Shilling', 'erp' ),\n 'KWD' => __( 'Kuwaiti Dinar', 'erp' ),\n 'KGS' => __( 'Kyrgystani Som', 'erp' ),\n 'LAK' => __( 'Laotian Kip', 'erp' ),\n 'LVL' => __( 'Latvian Lats', 'erp' ),\n 'LBP' => __( 'Lebanese Pound', 'erp' ),\n 'LSL' => __( 'Lesotho Loti', 'erp' ),\n 'LRD' => __( 'Liberian Dollar', 'erp' ),\n 'LYD' => __( 'Libyan Dinar', 'erp' ),\n 'LTL' => __( 'Lithuanian Litas', 'erp' ),\n 'LTT' => __( 'Lithuanian Talonas', 'erp' ),\n 'LUF' => __( 'Luxembourgian Franc', 'erp' ),\n 'MOP' => __( 'Macanese Pataca', 'erp' ),\n 'MKD' => __( 'Macedonian Denar', 'erp' ),\n 'MGA' => __( 'Malagasy Ariary', 'erp' ),\n 'MWK' => __( 'Malawian Kwacha', 'erp' ),\n 'MYR' => __( 'Malaysian Ringgit', 'erp' ),\n 'MVR' => __( 'Maldivian Rufiyaa', 'erp' ),\n 'MLF' => __( 'Malian Franc', 'erp' ),\n 'MTL' => __( 'Maltese Lira', 'erp' ),\n 'MRO' => __( 'Mauritanian Ouguiya', 'erp' ),\n 'MUR' => __( 'Mauritian Rupee', 'erp' ),\n 'MXN' => __( 'Mexican Peso', 'erp' ),\n 'MDL' => __( 'Moldovan Leu', 'erp' ),\n 'MCF' => __( 'Monegasque Franc', 'erp' ),\n 'MNT' => __( 'Mongolian Tugrik', 'erp' ),\n 'MAD' => __( 'Moroccan Dirham', 'erp' ),\n 'MZN' => __( 'Mozambican Metical', 'erp' ),\n 'MMK' => __( 'Myanmar Kyat', 'erp' ),\n 'NAD' => __( 'Namibian Dollar', 'erp' ),\n 'NPR' => __( 'Nepalese Rupee', 'erp' ),\n 'ANG' => __( 'Netherlands Antillean Guilder', 'erp' ),\n 'TWD' => __( 'New Taiwan Dollar', 'erp' ),\n 'NZD' => __( 'New Zealand Dollar', 'erp' ),\n 'NIO' => __( 'Nicaraguan Córdoba', 'erp' ),\n 'NGN' => __( 'Nigerian Naira', 'erp' ),\n 'KPW' => __( 'North Korean Won', 'erp' ),\n 'NOK' => __( 'Norwegian Krone', 'erp' ),\n 'OMR' => __( 'Omani Rial', 'erp' ),\n 'PKR' => __( 'Pakistani Rupee', 'erp' ),\n 'PAB' => __( 'Panamanian Balboa', 'erp' ),\n 'PGK' => __( 'Papua New Guinean Kina', 'erp' ),\n 'PYG' => __( 'Paraguayan Guarani', 'erp' ),\n 'PEI' => __( 'Peruvian Inti', 'erp' ),\n 'PHP' => __( 'Philippine Peso', 'erp' ),\n 'PLN' => __( 'Polish Zloty', 'erp' ),\n 'PTE' => __( 'Portuguese Escudo', 'erp' ),\n 'QAR' => __( 'Qatari Rial', 'erp' ),\n 'RHD' => __( 'Rhodesian Dollar', 'erp' ),\n 'RON' => __( 'Romanian Leu', 'erp' ),\n 'RUB' => __( 'Russian Ruble', 'erp' ),\n 'RWF' => __( 'Rwandan Franc', 'erp' ),\n 'SVC' => __( 'Salvadoran Colón', 'erp' ),\n 'WST' => __( 'Samoan Tala', 'erp' ),\n 'STD' => __( 'São Tomé & Príncipe Dobra', 'erp' ),\n 'SAR' => __( 'Saudi Riyal', 'erp' ),\n 'RSD' => __( 'Serbian Dinar', 'erp' ),\n 'SCR' => __( 'Seychellois Rupee', 'erp' ),\n 'SLL' => __( 'Sierra Leonean Leone', 'erp' ),\n 'SGD' => __( 'Singapore Dollar', 'erp' ),\n 'SKK' => __( 'Slovak Koruna', 'erp' ),\n 'SIT' => __( 'Slovenian Tolar', 'erp' ),\n 'SBD' => __( 'Solomon Islands Dollar', 'erp' ),\n 'SOS' => __( 'Somali Shilling', 'erp' ),\n 'ZAR' => __( 'South African Rand', 'erp' ),\n 'KRW' => __( 'South Korean Won', 'erp' ),\n 'SSP' => __( 'South Sudanese Pound', 'erp' ),\n 'ESP' => __( 'Spanish Peseta', 'erp' ),\n 'LKR' => __( 'Sri Lankan Rupee', 'erp' ),\n 'SHP' => __( 'St. Helena Pound', 'erp' ),\n 'SDG' => __( 'Sudanese Pound', 'erp' ),\n 'SRD' => __( 'Surinamese Dollar', 'erp' ),\n 'SZL' => __( 'Swazi Lilangeni', 'erp' ),\n 'SEK' => __( 'Swedish Krona', 'erp' ),\n 'CHF' => __( 'Swiss Franc', 'erp' ),\n 'SYP' => __( 'Syrian Pound', 'erp' ),\n 'TJS' => __( 'Tajikistani Somoni', 'erp' ),\n 'TZS' => __( 'Tanzanian Shilling', 'erp' ),\n 'THB' => __( 'Thai Baht', 'erp' ),\n 'TPE' => __( 'Timorese Escudo', 'erp' ),\n 'TOP' => __( 'Tongan Paʻanga', 'erp' ),\n 'TTD' => __( 'Trinidad & Tobago Dollar', 'erp' ),\n 'TND' => __( 'Tunisian Dinar', 'erp' ),\n 'TRY' => __( 'Turkish Lira', 'erp' ),\n 'TMT' => __( 'Turkmenistani Manat', 'erp' ),\n 'UGX' => __( 'Ugandan Shilling', 'erp' ),\n 'UAH' => __( 'Ukrainian Hryvnia', 'erp' ),\n 'AED' => __( 'United Arab Emirates Dirham', 'erp' ),\n 'UYU' => __( 'Uruguayan Peso', 'erp' ),\n 'USD' => __( 'US Dollar', 'erp' ),\n 'UZS' => __( 'Uzbekistan Som', 'erp' ),\n 'VUV' => __( 'Vanuatu Vatu', 'erp' ),\n 'VEF' => __( 'Venezuelan Bolívar', 'erp' ),\n 'VND' => __( 'Vietnamese Dong', 'erp' ),\n 'YER' => __( 'Yemeni Rial', 'erp' ),\n 'ZMW' => __( 'Zambian Kwacha', 'erp' ),\n 'ZWL' => __( 'Zimbabwean Dollar', 'erp' ),\n ] );\n}", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "function paysto_rub_currency_symbol($currency_symbol, $currency)\n{\n if ($currency == \"RUB\") {\n $currency_symbol = 'р.';\n }\n\n if ($currency == \"USD\") {\n $currency_symbol = '$';\n }\n\n return $currency_symbol;\n}" ]
[ "0.734371", "0.734371", "0.73244655", "0.73244655", "0.7263899", "0.7114252", "0.7114252", "0.7114252", "0.6978204", "0.6934234", "0.6910599", "0.6843412", "0.682999", "0.6708336", "0.66916305", "0.66807246", "0.66793644", "0.66021127", "0.65604734", "0.6492372", "0.64783424", "0.6448833", "0.6436905", "0.64145035", "0.6412883", "0.64038455", "0.6402465", "0.6402465", "0.6373478", "0.6364035", "0.63272274", "0.6321578", "0.63166255", "0.6315408", "0.62929463", "0.6292467", "0.62905115", "0.62889946", "0.62889946", "0.62889946", "0.62889946", "0.62889946", "0.62889946", "0.62889946", "0.62889946", "0.62560904", "0.6254139", "0.6249446", "0.6249371", "0.6228858", "0.62209547", "0.6211281", "0.6210301", "0.6167504", "0.6162784", "0.61437815", "0.61374426", "0.6136968", "0.61195624", "0.6103113", "0.6095027", "0.6088152", "0.60794055", "0.6078233", "0.60713255", "0.60474735", "0.6045657", "0.6037657", "0.60210973", "0.60181993", "0.60114396", "0.6010638", "0.60080385", "0.6004613", "0.5992165", "0.5991683", "0.59887034", "0.59721744", "0.59718555", "0.59718555", "0.59718555", "0.59718555", "0.59718555", "0.5968135", "0.5967102", "0.59644127", "0.59603703", "0.59576535", "0.5955118", "0.59415287", "0.59415036", "0.5936407", "0.59354544", "0.5927483", "0.59199667", "0.5916451", "0.591401", "0.59121317", "0.5905973", "0.5904332", "0.5899879" ]
0.0
-1
Run the database seeds.
public function run() { Model::unguard(); Plan::create([ 'name' => 'Gratuito', 'quantity_oportunities' => 1, 'price' => 0.0]); Plan::create([ 'name' => 'Básico', 'quantity_oportunities' => 10, 'price' => 99.0]); Plan::create([ 'name' => 'Premium', 'quantity_oportunities' => 50, 'price' => 149.0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::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 < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::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 < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::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 < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Set the row id.
public function setId($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _set_row_id($id) {\r\n $this->row_id = $id;\r\n }", "public function setRowId($val) {\n if ($val === null || is_integer($val)) {\n $this->_row_id = $val;\n } else {\n require_once 'Scenario/Exception.php';\n throw new Scenario_Exception('Row ID must be an integer or null.');\n }\n }", "function SetId($value) { $this->id=$value; }", "public function setRowId($val) {\n if ($val === null) {\n $this->_row_id = null;\n } else if (is_int($val)) {\n $this->_row_id = intval($val);\n } else {\n /**\n * @see Scenario_Exception\n */\n require_once 'Scenario/Exception.php';\n throw new Scenario_Exception('$val must be null or an integer value.');\n }\n }", "public function setRowId($value)\n {\n return $this->set('RowId', $value);\n }", "public function setRowId($value)\n {\n return $this->set('RowId', $value);\n }", "public function setRowId($value)\n {\n return $this->set('RowId', $value);\n }", "function setId($value) {\n\t\treturn $this->setColumnValue('id', $value, Model::COLUMN_TYPE_INTEGER);\n\t}", "public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "function setId($id) {\n\t\t$this->setData('id', $id);\n\t}", "function set_id($id) {\n\t\t$this->id = $id;\n\t}", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "public function set_id( $id ) {\n\t\t\t$this->id = $id;\n\t\t}", "public function setRow(int $row): void\n {\n $this->row = $row;\n }", "private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}", "public function setId($id)\n {\n $this->_id = (int)$id;\n }", "public function setId($id)\r\n {\r\n $this->_id = (int) $id;\r\n }", "private function set_id(int $id)\n {\n $this->_id = $id;\n }", "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setId($id)\n {\n $id = (int) $id;\n \n if ($id > 0)\n {\n $this->_id = $id;\n }\n }", "public function set_id($id){\n $this->id = $id;\n }", "function set_id($id)\n {\n $this->id = $id;\n }", "public function setId($id) {\n\t\t$this->id = (integer)$id;\n\t}", "public function set_id($setid){\n $this->id = $setid;\n }", "public function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setID($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->_id = $id;\n }", "public function setId ($v)\n {\n // Since the native PHP type for this column is integer,\n // we will cast the input value to an int (if it is not).\n if ( $v !== null && !is_int ($v) && is_numeric ($v) )\n {\n $v = (int) $v;\n }\n if ( $this->id !== $v || $v === 0 )\n {\n $this->id = $v;\n }\n }", "public function setId($id)\n\t{\n\t\t$this->id = (int) $id;\n\t}", "public function setID($id) {\n $this->id = $id; \n }", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "function setId($id) {\r\n\t\t// Set id and wipe data\r\n\t\t$this->_id = $id;\r\n\t}", "public function setid($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id)\r\n\t\t{\r\n\t\t\t$this->_id = $id;\r\n\t\t}", "public function setId($id)\n {\n $this->_id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "public function SetId ($id);", "public function setId($id)\n {\n $id = (int) $id;\n $this->_id = $id;\n }", "private function setId($id)\n {\n $this->id = $id;\n }", "public function setID($id){\n $this->id=$id;\n }", "public function setId($id)\n\t\t{\n\t\t\t$id = (int)$id;\n\t\t\t$this->_id = $id;\n\t\t}", "public function setID($id) {\n\t\t$this->id = $id;\n\t}", "function setId($id) {\n\t\treturn $this->setData('id', $id);\n\t}", "public function setId($id){\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "function setId($id)\n\t{\n\t\t// Set id\n\t\t$this->_id\t = $id;\n\t}", "function setId($id){\n\t\t$this->id = $id;\n\t}", "public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}", "public function setId($id){\n\t\t$this->id = $id;\n\t}", "public function setId($x) { $this->id = $x; }", "public function setId($id) { $this->id = $id; }", "function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\r\n {\r\n $this->data['itemid'] = (int) $id;\r\n }", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setID($_id) \n\t{\n\t\t$this->_id = $_id;\n\t}", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setID($id);", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setID($id)\n {\n $this->id = $id;\n }", "public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}", "public function setId( $id )\n {\n $this->id = $id;\n }", "protected function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id)\r\n\t{\r\n\t\t$this->id = $id;\r\n\t}", "public function setID(int $id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setID($id){\n $this->ID = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id)\n {\n $id = (int) $id;\n if ($id > 0) {\n $this->id = $id;\n }\n }", "public function setTableId($id) {\r\n $this->tableId = \"id=\\\"$id\\\"\";\r\n }", "public function setId($id) \n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id) {\n\t\t$this->setData(static::$_primaryKey, $id);\n\t}", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }" ]
[ "0.8491018", "0.7309407", "0.708107", "0.7065019", "0.68294895", "0.68294895", "0.6828085", "0.6723369", "0.67058754", "0.6705565", "0.6705443", "0.6705065", "0.66928566", "0.6685565", "0.6670974", "0.6669627", "0.66670966", "0.6665904", "0.6658738", "0.66505563", "0.6639112", "0.6638977", "0.6615772", "0.6614846", "0.66095716", "0.65874326", "0.65751505", "0.6574651", "0.6548599", "0.65427214", "0.6539697", "0.65396845", "0.65215033", "0.65202016", "0.65002245", "0.65002245", "0.64939916", "0.64897484", "0.64895105", "0.6485503", "0.64817226", "0.64817226", "0.6479297", "0.6477728", "0.64643043", "0.64632946", "0.6462441", "0.64615744", "0.64584184", "0.64579403", "0.64536643", "0.6453624", "0.6453624", "0.6453624", "0.6453624", "0.6451208", "0.64499795", "0.6439193", "0.64378446", "0.64369166", "0.6431078", "0.64309865", "0.64309794", "0.64298105", "0.64298105", "0.64298105", "0.64298105", "0.64298105", "0.6419614", "0.6417162", "0.6417162", "0.6406282", "0.64016134", "0.6401037", "0.63975686", "0.6396963", "0.6394379", "0.63833314", "0.6380817", "0.6378793", "0.6372159", "0.63701695", "0.6358996", "0.63566643", "0.63562983", "0.63534564", "0.6342204", "0.63402987", "0.6336847", "0.6336747", "0.6336747", "0.6336747", "0.6336747", "0.6328057", "0.6328057", "0.6328057", "0.6328057", "0.6328057", "0.6328057", "0.6328057", "0.6328057" ]
0.0
-1
Get the row id.
public function getId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRowID() {\n return $this->_row_id;\n }", "public function getRowId() {\n return $this->_row_id;\n }", "public function getPrimaryKey()\n\t{\n\t\treturn $this->_rowKey;\n\t}", "function getDataRowId()\n {\n return $this->idPrepend . $this->current_row_hash['id'];\n }", "public function getRowId()\n\t{\n\t\treturn 'entity_id';\n\t}", "public function getRowId()\n {\n $rowId = $this->item;\n\n $ignoredProperties = ['quantity'];\n\n foreach ($ignoredProperties as $property) {\n if (array_key_exists($property, $rowId)) {\n unset($rowId[$property]);\n }\n }\n\n return md5(serialize($rowId));\n }", "public function getId() {\r\n\t\t\treturn $this->columns[ $this->index ];\r\n\t\t}", "public static function getLastRowId()\n {\n return self::$id;\n }", "protected function _getId()\r\n\t{\r\n\t\t$select\t\t= $this->_db->select()->from('Cron_Jobs', array('id'))->where('name = ?', $this->_name);\r\n\t\tlist($id)\t= $this->_db->fetchCol($select);\r\n\t\t\r\n\t\treturn $id;\r\n\t}", "private function _getRowId($row)\n\t{\n\t\t$id = null;\n\t\tif(isset($row[$this->getRowId()])) {\n\t\t\t$id = $row[$this->getRowId()];\n\t\t\t$this->_setSegmentMinMax($id);\n\t\t}\n\t\treturn $id;\n\t}", "public function getRecordId()\n {\n return $this->get(self::_RECORD_ID);\n }", "public function getId()\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}", "public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getId()\n\t{\n\t\t$column = self::COL_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getRecordId()\n {\n return isset($this->fields['id']) ?\n $this->fields['id'] : '';\n }", "public function getId()\n {\n // TODO: Implement getId() method.\n return $this->getPrimaryKey();\n }", "public function getId()\n {\n return $this->{self::getPrimaryKey()};\n }", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "abstract public function getRowId($rowEntity);", "public function get_id()\n {\n $pkey = static::tinydb_get_table_info()->primary_key;\n if (is_array($pkey)) {\n $val = array();\n foreach ($pkey as $field) {\n $val[$field] = \\TinyDb\\Internal\\SqlDataAdapters::decode(static::tinydb_get_table_info()->field_info($field)->type,\n $this->tinydb_rowdata[$field]);\n }\n } else {\n $val = \\TinyDb\\Internal\\SqlDataAdapters::decode(static::tinydb_get_table_info()->field_info($pkey)->type,\n $this->tinydb_rowdata[$pkey]);\n }\n\n\n return $val;\n }", "public function get_id() {\n\t\t\treturn $this->id;\n\t\t}", "public function get_id() {\n\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\n\t\treturn $this->id;\n\t}", "public function get_id () {\r\n\t\treturn $this->id;\r\n\t}", "public function getId() {\n\t\treturn $this->getData(static::$_primaryKey);\n\t}", "public function getRow(): int\n {\n return $this->row;\n }", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "public function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "public function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "public function getId()\n {\n return $this->getPrimaryKey();\n }", "public function getId()\n {\n return $this->getPrimaryKey();\n }", "public function getId()\n {\n return $this->getPrimaryKey();\n }", "public function getId()\n {\n return $this->getPrimaryKey();\n }", "public function getPrimaryKey()\n {\n return $this->getid();\n }", "public function getID() {\n return array_key_exists($this->_key_field, $this->_data) ? $this->_data[$this->_key_field] : null;\n }", "function getID() {\n\t\treturn $this->iId;\n\t}", "function getID() {\n\t\treturn $this->iId;\n\t}", "public function id()\n\t{\n\t\treturn $this->get($this->meta()->primary_key);\n\t}", "public function getId() : int\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "public function id()\n {\n return $this->read($this->metadata['pk']->name);\n }", "public function get_id() {\n\t\treturn $this->_id;\n\t}", "public function get_id()\n\t{\n\t\treturn $this->_id;\n\t}", "public function calculateRowId($row)\n {\n return $row['pid'];\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getPrimaryKey()\n {\n return $this->getId();\n }", "public function getId()\n\t{\n\t\treturn (int)$this->id;\n\t}", "public function getId()\n\t{\n\t\treturn (int)$this->id;\n\t}", "public function getRowNumber()\n {\n $this->sql_query->count($this->tableName);\n $result = $this->sql_query->getSingleResult();\n return $result[0];\n }", "public function getID()\n {\n return $this->getKey();\n }", "private function selectID()\n {\n $result = $this->sdb->query('select nextval(\\'id_seq\\') as id',array());\n $row = $this->sdb->fetchrow($result);\n return $row['id'];\n }", "public function getPrimaryKey()\n {\n return $this->getPothnbr();\n }", "public function getPrimaryKey() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[0])) return (int) $this->_result[0];\n\t\t\telse parent::throwGetColException('PollTemplatesModel::getPrimaryKey', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('PollTemplatesModel::getPrimaryKey', __LINE__, __FILE__);\n\t}", "public function get_id()\n {\n return $this->id;\n }", "public function get_id()\n {\n return $this->id;\n }", "public function get_id()\n {\n return $this->id;\n }", "public function get_id() {\n return $this->id;\n }", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}", "public function get_id() {\n return $this->id;\n }", "public function get_id() {\n return $this->id;\n }", "public function get_id() {\n return $this->id;\n }", "function getID() {\n\t\treturn $this->data_array['id'];\n\t}", "public function getid()\n\t{\n\t\treturn $this->Id;\n\t}", "public function GetId()\n\t{\n\t\treturn $this->id;\n\t}", "public function getPrimaryKey(phpDataMapper_Model_Row $row)\n\t{\n\t\t$pkField = $this->getPrimaryKeyField();\n\t\treturn $row->$pkField;\n\t}", "function getDataRowId()\r\n\t{\r\n\t\treturn 'prefix_'.'id';\r\n\t}", "public function getid() {\n\t\treturn $this->id;\n\t}", "public function getID()\n {\n return $this->formattedData['id'];\n }", "public function getID() : int {\n return $this->id;\n }", "private function GetID()\n\t\t{\n\t\t\treturn $this->id;\n\t\t}", "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}", "public function getId()\n {\n return isset($this->id) ? $this->id : 0;\n }", "public function getId()\n {\n return isset($this->id) ? $this->id : 0;\n }", "public function getId()\n {\n return isset($this->id) ? $this->id : 0;\n }", "public function get_id();", "public function get_id();", "public function newId(){ // get array of rows objects\r\t\treturn sqlite_last_insert_rowid ($this->handle);\r\t}", "public function getID()\r\n\t\t{\r\n\t\t\treturn $this->id;\r\n\t\t}", "public function getID() : int {\n return $this->_id;\n }", "public function getid()\n {\n return $this->id;\n }", "public function getid()\n {\n return $this->id;\n }", "protected function getID() {\n return $this->id;\n }", "public function getPrimaryKey()\n {\n $cols = $this->info('cols');\n return $cols[0];\n }", "public function get_id()\n {\n return $this->_id;\n }" ]
[ "0.8508267", "0.8325835", "0.7667713", "0.76391095", "0.7615099", "0.7445898", "0.73740613", "0.72321683", "0.7228337", "0.7208054", "0.7196547", "0.7188324", "0.7135955", "0.7135955", "0.7124512", "0.7124512", "0.7115398", "0.7098186", "0.7091234", "0.7089761", "0.708549", "0.70754844", "0.70744133", "0.7070958", "0.7070958", "0.7055738", "0.70407736", "0.70324796", "0.7023584", "0.7023584", "0.7023584", "0.7023584", "0.70182294", "0.70182294", "0.70182294", "0.70036095", "0.70036095", "0.70036095", "0.70036095", "0.698623", "0.6960668", "0.69459224", "0.69459224", "0.6942742", "0.69398", "0.69348806", "0.6923035", "0.69185334", "0.69156325", "0.69138855", "0.69138855", "0.69138855", "0.69138855", "0.69138855", "0.69113505", "0.69113505", "0.69048595", "0.689187", "0.68907046", "0.6888215", "0.68872803", "0.6884663", "0.6884663", "0.6884663", "0.6883577", "0.68834144", "0.68834144", "0.68834144", "0.68834144", "0.68834144", "0.68834144", "0.68834144", "0.68834144", "0.6880059", "0.6880059", "0.6880059", "0.687964", "0.6876155", "0.6865388", "0.68607706", "0.6842994", "0.68363374", "0.68334866", "0.68289447", "0.68258923", "0.6820603", "0.6820603", "0.6820603", "0.6803429", "0.6803429", "0.6803429", "0.6803123", "0.6803123", "0.6802166", "0.68017405", "0.67979187", "0.67797524", "0.67797524", "0.67794764", "0.67790693", "0.6778394" ]
0.0
-1
Add a cell to the row.
public function addCell($key, Cell $cell);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addCell(Cell $cell)\n {\n $this->cells->add($cell);\n }", "public function addCell(Cell $cell)\n {\n if (!isset($this->kitCells[$cell->getPosition()])) {\n ExceptionFactory::positionOutOfRangeException($cell->getPosition());\n }\n\n if (!empty($this->kitCells[$cell->getPosition()])) {\n ExceptionFactory::positionAlreadyExistException($cell->getPosition());\n }\n\n $this->kitCells[$cell->getPosition()] = $cell;\n }", "public function addRow($row)\n {\n $this->rows[] = $row;\n }", "private function newRow( $cell ) {\n\n $sheetDataRef = $this->sheet->contents->sheetData;\n $rowCol = $this->cellToRowAndColumn( $cell );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a row between\n // already existing rows. We must redraw the entire rows section of the xml object but insert our new row in the correct place as we redraw.\n if ( count( $sheetDataRef->row ) > 0 ) {\n\n $rowsCopy = clone $this->sheet->contents->sheetData;\n unset( $this->sheet->contents->sheetData->row );\n\n foreach ( $rowsCopy->row as $row ) {\n\n if ( (int) $row->attributes()->r > $rowCol[0] && empty( $inserted ) ) {\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n $inserted = true;\n }\n\n $copiedRow = $sheetDataRef->addChild( 'row' );\n $copiedRow->addAttribute( 'r', $row->attributes()->r );\n $copiedRow->addAttribute( 'spans', $row->attributes()->spans );\n\n foreach( $row->c as $col ) {\n\n $this->newCol( $copiedRow, $col->attributes()->r, $col->v );\n }\n }\n\n if ( ! empty( $inserted ) )\n return $insertedRow;\n }\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n return $insertedRow;\n }", "public function addRow($row) {\n array_push($this->rows, $row);\n }", "public function addRow(TableRow $row);", "public function add_cell(HTMLCellElement $cell): int\n {\n if($cell === null) $cell = new HTMLCellElement(\"\");\n return $this -> add_child($cell);\n }", "private function AddRow($row) {\n $this->_table .= $this->Tpl2HTML($this->_rowtpl, array('RowContent' => $row));\n $this->_rown++;\n }", "function add_cell($val, $link = \"\")\n\t{\n\t\tif (!empty($link))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"begin_link\");\n\t\t\t$this->tpl->setVariable(\"LINK_TARGET\", $link);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"end_link\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"text\");\n\t\t$this->tpl->setVariable(\"TEXT_CONTENT\", $val);\n\t\t$this->tpl->parseCurrentBlock();\n\t\t$this->tpl->setCurrentBlock(\"table_cell\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}", "function add_cell($val, $link = \"\")\n\t{\n\t\tif(!empty($link))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"begin_link\");\n\t\t\t$this->tpl->setVariable(\"LINK_TARGET\", $link);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"end_link\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"text\");\n\t\t$this->tpl->setVariable(\"TEXT_CONTENT\", $val);\n\t\t$this->tpl->parseCurrentBlock();\n\t\t$this->tpl->setCurrentBlock(\"table_cell\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}", "public function addRow($data)\n\t{\n\t\t$struct = isset($this->table) ? $this->table->structure() : null;\n\t\t\n\t\tif (is_array($data)) {\n\t\t\t$model = $this->generateModel($data);\n\t\t\t$row = new Row($model, $struct);\n\t\t} else if ($data instanceof ModelInterface) {\n\t\t\t$row = new Row($data, $struct);\n\t\t} else if ($data instanceof Row) {\n\t\t\t$row = $data;\n\t\t}\n\t\t\n\t\tif (!isset($row)) {\n\t\t\tthrow new \\Exception(\"No valid row data was provided.\");\n\t\t}\n\t\t\n\t\t$this->rows[] = $row;\n\t}", "public function addRow(array $row) {\n\t\t$this->tableInfo['rows'][] = $row;\t\n\t}", "public function addCell($value, $type = null, $styleName = null)\n {\n if (!$type) {\n $type = $this->guessType($value);\n }\n $value = htmlentities($value, ENT_COMPAT, $this->encoding);\n $this->data .= \"<Cell\" . ($styleName ? \" ss:StyleID=\\\"\" . $styleName . \"\\\"\" : \"\") . \"><Data ss:Type=\\\"\" . $type . \"\\\">\" . $value . \"</Data></Cell>\";\n return $this;\n }", "public function addcell( $row, $col, $string, $raw = '' ) {\n\t\t$this->sheets[ $this->sn ]['maxrow'] = max( $this->sheets[ $this->sn ]['maxrow'], $row + $this->rowoffset );\n\t\t$this->sheets[ $this->sn ]['maxcol'] = max( $this->sheets[ $this->sn ]['maxcol'], $col + $this->colOffset );\n\t\t$this->sheets[ $this->sn ]['cells'][ $row + $this->rowoffset ][ $col + $this->colOffset ] = $string;\n\t\tif ( $raw ) {\n\t\t\t$this->sheets[ $this->sn ]['cellsInfo'][ $row + $this->rowoffset ][ $col + $this->colOffset ]['raw'] = $raw;\n\t\t}\n\t\tif ( isset( $this->recType ) ) {\n\t\t\t$this->sheets[ $this->sn ]['cellsInfo'][ $row + $this->rowoffset ][ $col + $this->colOffset ]['type'] = $this->recType;\n\t\t}\n\n\t}", "function helper_pdf_add_cell($pdf, $largura, $altura, $texto, $bordas, $pula_linha, $alinhamento){\n\t$pdf->Cell($largura, $altura, $texto, $bordas, $pula_linha, $alinhamento);\n}", "public function AddRow(Row $row) {\n return $this->Add($row);\n }", "public function addRow($row){\n\t\t\t$fn = \"addRow\";\n\t\t\tif(is_array($row) && count($row) == count($this->db[\"COLUMNS_NAME\"]) && $this->status){\n\t\t\t\tif(self::checkType($row)){\n\t\t\t\t\t$this->db[\"ROWS\"][] = $row;\n\t\t\t\t} else {\n\t\t\t\t\tself::printErr($fn, \"Invalid type value.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tself::printErr($fn, \"Error adding row\");\n\t\t\t}\n\t\t}", "private function newCol( $row, $cell, $value ) {\n\n if ( count( $row->c ) > 0 ) {\n\n $rowCopy = clone $row;\n unset( $row->c );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a column between\n // already existing columns. We must redraw the entire columns ('c') section of the xml object but insert our new column in the correct place as we redraw.\n foreach ( $rowCopy as $col ) {\n\n if ( $cell < $col->attributes()->r && empty( $inserted ) ) {\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n $inserted = true;\n }\n\n $copiedCol = $row->addChild( 'c' );\n $copiedCol->addAttribute( 'r', $col->attributes()->r );\n $copiedCol->addChild( 'v', $col->v );\n }\n\n if ( ! empty( $inserted ) )\n return $insertedCol;\n }\n\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n return $insertedCol;\n }", "public function addRow(array $row)\n {\n if (null === $this->nbColumns) {\n $this->nbColumns = count($row);\n } elseif (count($row) !== $this->nbColumns) {\n throw new LogicException(sprintf(\n 'Expected the row to contain %s cells, but got %s.',\n $this->nbColumns,\n count($row)\n ));\n }\n\n $this->rows[] = array_values($row);\n\n return $this;\n }", "public function addRow($row, $file)\n { }", "public function addTableRow($data, $font_color = '808080') {\n\n $styleArray = array(\n 'font' => array(\n 'color' => array('rgb' => $font_color),\n ),\n );\n $this->xls->getActiveSheet()->getStyle($this->row)->applyFromArray($styleArray);\n\n\t\t$offset = $this->tableParams['offset'];\n\n\t\tforeach ($data as $d) {\n if( strpos($d, '.png') === false ){\n if (in_array($offset, $this->columnasTiposNumericos)) {\n $this->xls->getActiveSheet()->setCellValueExplicitByColumnAndRow($offset++, $this->row, $d, PHPExcel_Cell_DataType::TYPE_NUMERIC);\n }\n else {\n $this->xls->getActiveSheet()->setCellValueExplicitByColumnAndRow($offset++, $this->row, $d);\n }\n } else{\n if( !$this->addImage( $d, PHPExcel_Cell::stringFromColumnIndex( $offset ), $this->row ) ){\n $this->xls->getActiveSheet()->setCellValueExplicitByColumnAndRow($offset++, $this->row, 'NO IMAGE');\n }\n }\n //$this->xls->getActiveSheet()->setCellValueExplicitByColumnAndRow($offset++, $this->row, $d);\n\t\t}\n\t\t$this->row++;\n\t\t$this->tableParams['row_count']++;\n\t}", "public function cell($key, Cell $cell);", "public function setCell($row, $column)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'column_family'=> $column, 'flag' => 1))));\n\t\treturn $this;\n\t}", "function append(Row $row) {\n\t\t$this->rows[] = $row;\n\t\treturn $this;\n\t}", "public function insertRow($row);", "public function addRow(array $data)\r\n {\r\n $iRow = $this->getNumberOfRows();\r\n $this->data[$iRow] = $data;\r\n }", "function addRow($row, $attributes = null)\n {\n $key = sizeof($this->_rows);\n $this->_rows[$key] = $row;\n\n //if updateValue has been called make sure to update the values of each added element\n foreach (array_keys($this->_rows[$key]) as $key2) {\n if (isset($this->_form)) {\n $this->_rows[$key][$key2]->onQuickFormEvent('updateValue', null, $this->_form);\n }\n if ($this->isFrozen()) {\n $this->_rows[$key][$key2]->freeze();\n }\n }\n \n if (isset($attributes)) $this->_rowAttributes[$key] = $attributes;\n }", "function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}", "public function addRow() {\n if ($this->linesCount >= 0)\n $this->addContent('</div>');\n $this->linesCount ++;\n $this->colunsCount = 0;\n $this->addContent('<div class=\"row\" >');\n }", "function AddRow()\n\t{\n\t\tif (!func_num_args())\n\t\t{\n\t\t\t// no parameters were passed\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// increment the row pointer\n\t\tif (!isset($this->_intCurrentRow))\n\t\t{\n\t\t\t$this->_intCurrentRow = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_intCurrentRow++;\n\t\t}\n\t\t\n\t\t// build the array of column values\t\t\n\t\t$arrColumns = func_get_args();\n\t\t$this->_arrRows[] = Array('Columns'=>$arrColumns);\n\t\t\n\t\treturn $this->_intCurrentRow;\n\t}", "public function cell($value) {\n return $this->setProperty('cell', $value);\n }", "public function WriteRow(\n array $newRow): void\n {\n $rows = [$newRow]; // you can append several rows at once\n $valueRange = new \\Google_Service_Sheets_ValueRange();\n $valueRange->setValues($rows);\n $range = 'Sheet1'; // the service will detect the last row of this sheet\n $options = ['valueInputOption' => 'USER_ENTERED'];\n try {\n $this->service->spreadsheets_values->append($this->spread_sheet_Id, $range, $valueRange, $options);\n } catch (Exception $exception) {\n echo $exception;\n }\n /*\n $newRow = [\n '456740',\n 'Hellboy',\n 'https://image.tmdb.org/t/p/w500/bk8LyaMqUtaQ9hUShuvFznQYQKR.jpg',\n \"Hellboy comes to England, where he must defeat Nimue, Merlin's consort and the Blood Queen. But their battle will bring about the end of the world, a fate he desperately tries to turn away.\",\n '1554944400',\n 'Fantasy, Action'\n ];\n $rows = [$newRow]; // you can append several rows at once\n $valueRange = new \\Google_Service_Sheets_ValueRange();\n $valueRange->setValues($rows);\n $range = 'Sheet1'; // the service will detect the last row of this sheet\n $options = ['valueInputOption' => 'USER_ENTERED'];\n $service->spreadsheets_values->append($spreadsheetId, $range, $valueRange, $options);\n */\n }", "public function addRow($data){\n $data = (array)$data;\n $this->counter++;\n $newRow = [];\n $newRow = array_merge($newRow, $this->saveMetaData($data));\n $newRow = array_merge($newRow, $this->saveGeoData($data));\n $newRow = array_merge($newRow, $this->saveCoreData($data));\n $this->rowData[]=$newRow;\n }", "public function addColumn($content, $col = null, $row = null)\r\n {\r\n $row = $row === null ? $this->rowIndex : $row;\r\n if ($col === null) {\r\n $col = isset($this->data[$row]) ? count($this->data[$row]) : 0;\r\n }\r\n\r\n $this->data[$row][$col] = $content;\r\n\r\n return $this;\r\n }", "public function addRow(array $data = null)\r\n {\r\n $this->rowIndex++;\r\n\r\n if (is_array($data)) {\r\n foreach ($data as $col => $content) {\r\n $this->data[$this->rowIndex][$col] = $content;\r\n }\r\n }\r\n\r\n return $this;\r\n }", "public function setToCell(Cell &$Cell);", "public function addRow(array $row)\n {\n $this->_rows[] = $row;\n return $this;\n }", "function addRow($rowData, $options = array()) {\r\n\r\n\t $this->rowCount++;\r\n\r\n\t $rowalign = _get_option($options, \"align\", false);\r\n\r\n\t // Start the row, indicate even/oneven\r\n\t $html = \" <tr class=\\\"\";\r\n\t if ( _get_option($options, \"static\", false)) {\r\n\t\t\t$html .= \"static\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$html .= (($this->rowCount % 2) == 0) ? \"even\" : \"oneven\";\r\n\t\t}\r\n\r\n\t\t$html .= \" \" . _get_option($options, \"rowClass\", \"\");\r\n\r\n\t\t$html .= \"\\\"\";\r\n\r\n\t\t$style = _get_option($options, \"style\", \"\");\r\n\r\n\t if ( $style != \"\") {\r\n\t $html .= \" style=\\\"$style\\\"\";\r\n\t }\r\n\r\n // Insert user defined attributes for the tr tag\r\n foreach(_get_option($options, \"trAttributes\", array()) as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\r\n\t\t$html .= \">\\n\";\r\n\r\n\t // Draw each cell in the row\r\n\t\tfor($i = 0; $i < $this->colCount; $i++) {\r\n\r\n\t\t // Opening td tag with options\r\n \t\t$html .= \" <td\";\r\n\r\n\t\t\t$html .= \" id='cell_\" . $this->rowCount . \"_$i'\";\r\n\r\n \t\tif ($rowalign) {\r\n\t\t\t $html .= \" align=\\\"$rowalign\\\"\";\r\n\t\t\t}\r\n\t\t else if ( isset($this->columnInfo[$i][\"align\"])) {\r\n\t\t\t $html .= \" align=\\\"\" . $this->columnInfo[$i][\"align\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_array($rowData[$i]) && isset($rowData[$i][\"style\"]) ) {\r\n \t\t\t $html .= \" style=\\\"\" . $rowData[$i][\"style\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['tdAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['tdAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\r\n\t\t\t$cellContent = '';\r\n\r\n\t\t\t$html .=\"<div style='overflow:hidden' \";\r\n\r\n\t\t\t// Cell content or empty\r\n\t\t\tif ( ! is_array($rowData[$i]) ){\r\n\t\t\t $cellContent = $rowData[$i];\r\n\r\n if (is_object($cellContent) && method_exists($cellContent, '__toString'))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags((string) $cellContent)));\r\n }\r\n elseif (! is_object($cellContent))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse if ( is_array($rowData[$i]) && isset($rowData[$i][\"content\"]) ) {\r\n\t\t\t\t$cellContent = $rowData[$i][\"content\"];\r\n if (! isset($rowData[$i]['divAttributes']['title']))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $cellContent = \"&nbsp;\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['divAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['divAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\t\t\t$html .= $cellContent;\r\n\r\n\t\t\t// End of cell\r\n\t\t\t$html .= \"</div>\";\r\n\t\t\t$html .= \" </td>\\n\";\r\n\t\t}\r\n\r\n\t\t// End of row\r\n\t\t$html .= \" </tr>\\n\";\r\n\t\t$this->rowDataHtml .= $html;\r\n\t}", "public function addCellToVisited()\n {\n if (!$this->isCellVisited($this->currentXPosition, $this->currentYPosition)) {\n $this->executionResult['visited'][] = ['X' => $this->currentXPosition, 'Y' => $this->currentYPosition];\n return true;\n }\n else return false;\n }", "public function addTableRow($data, $params = array()) {\n if( !empty($this->_tableParams['offset']) ) {\n $offset = $this->_tableParams['offset'];\n } else {\n $offset = 0;\n }\n\n foreach ($data as $d) {\n\n if( is_array($d) ) {\n $text = isset($d['text'])?$d['text']:null;\n $options = !empty($d['options'])?$d['options']:null;\n } else {\n $text = $d;\n $options = null;\n }\n\n\n if( !empty($options) ) {\n $type = !empty($options['type'])?$options['type']:PHPExcel_Cell_DataType::TYPE_STRING;\n $align = !empty($options['align'])?$options['align']:PHPExcel_Style_Alignment::HORIZONTAL_LEFT;\n $colspan = !empty($options['colspan'])?$options['colspan']:null;\n\n switch ($type) {\n case 'string':\n $type = PHPExcel_Cell_DataType::TYPE_STRING;\n break;\n case 'number':\n $type = PHPExcel_Cell_DataType::TYPE_NUMERIC;\n break;\n }\n\n switch ($align) {\n case 'center':\n $align = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;\n break;\n case 'right':\n $align = PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;\n break;\n }\n\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($align);\n $this->_xls->getActiveSheet()->getCellByColumnAndRow($offset, $this->_row)->setValueExplicit($text, $type);\n\n if( !empty($options['bold']) ) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold(true);\n }\n if( !empty($colspan) ) {\n $default = 1+$offset;\n $dimensi = $default+($colspan-1); // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n // if( $text == 'OPENING BALANCE' ) {\n // debug(__('%s%s:%s%s', $default, $row, $cell_end, $row));die();\n // }\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan-1;\n }\n } else {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $text);\n }\n \n // if (isset($params['horizontal'])) {\n // $this->_xls->getActiveSheet()->getCellByColumnAndRow($this->_row, $offset)->getStyle()->getAlignment()->setHorizontal($params['horizontal']);\n // }\n\n $offset++;\n }\n\n if( !empty($this->_tableParams['row_count']) ) {\n $row_count = $this->_tableParams['row_count'];\n } else {\n $row_count = 0;\n }\n\n $this->_row++;\n $this->_tableParams['row_count'] = $row_count+1;\n\n return $this;\n }", "function addRowToTable(&$table, $row) {\n\t\tglobal $TCA, $BACK_PATH;\n\t\t$uid = $row['uid'];\n\t\t$hidden = $row['hidden'];\n\n\t\tif ($row[$TCA[$this->tableName]['ctrl']['languageField']]==0) {\n\t\t\t$catnum = $this->categories[$row['category']] . sprintf ('%02d', $row['number']);\n\t\t} else {\n\t\t\t$catnum = '';\n\t\t}\n\t\t// Get language flag\n\t\tlist($imglang, $imgtrans) = $this->makeLocalizationPanel($this->tableName,$row);\n\n\t\t// If deleted show the delete icon instead of the delete link\n\t\tif ('DELETED!' == $row['t3ver_label']) {\n\t\t\t$deleteIcon = '<img'\n\t\t\t\t. t3lib_iconWorks::skinImg(\n\t\t\t\t\t$BACK_PATH,\n\t\t\t\t\t'gfx/i/shadow_delete.png',\n\t\t\t\t\t'width=\"16\" height=\"14\"'\n\t\t\t\t\t)\n\t\t\t\t. '>';\n\t\t} else {\n\t\t\t$deleteIcon = $this->getDeleteIcon($uid);\n\t\t}\n\t\t\n\t\t// Add the result row to the table array.\n\t\t$table[] = array(\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $catnum . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. t3lib_div::fixed_lgd_cs(\n\t\t\t\t\t$row['name'],\n\t\t\t\t\t50\n\t\t\t\t) . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $imglang . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $imgtrans . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $row['timeslots'] . LF,\n\t\t\tTAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $this->getEditIcon($uid) . LF\n\t\t\t\t. TAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $deleteIcon . LF\n\t\t\t\t. TAB . TAB . TAB . TAB . TAB\n\t\t\t\t. $this->getHideUnhideIcon($uid,$hidden) . LF,\n\t\t);\n\t}", "public function row($row)\r\n {\r\n $this->rows[] = $row;\r\n\r\n return $this;\r\n }", "public function addRowFromArray($row)\n {\n $this->addRowsFromArray(array($row));\n }", "public static function addRow(DetailTable $table, int|string|null $header, ?string $htmlSnippet): void\n {\n $table->addRow($header, ['class' => $table->renderWalker->getClasses(['cell', 'cell-html'])], $htmlSnippet, true);\n }", "public function addRow(array $row){\n\t\t$prependedCols=array();\n\t\t$html=\"\";\n\t\tif(!empty($this->prependedCols)){\n\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t$html.=$this->renderAdditionalCol($col,$row);;\n\t\t\t}\n\t\t\t$prependedCols[\"prependedCol\".$col[\"header\"]]=$html;\n\t\t\t$row=array_merge($prependedCols,$row);\n\t\t}\n\t\t\n\t\t$appendedCols=array();\n\t\t$html=\"\";\n\t\tif(!empty($this->appendedCols)){\n\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t$html.=$this->renderAdditionalCol($col,$row);\n\t\t\t}\n\t\t\t$appendedCols[\"appendedCol\".$col[\"header\"].$counter]=$html;\n\t\t\t$row=array_merge($row,$appendedCols);\n\t\t}\n\t\t\n\t\t$this->rows+=1; \t\t\n\t\t$this->data[]=$row;\n\t}", "protected function addItemRow(Worksheet $sheet, int $y, array $row): void\n {\n $columns = [\n 'A' => 'identifier',\n 'B' => 'fullStatement',\n 'C' => 'humanCodingScheme',\n 'D' => 'smartLevel',\n 'E' => 'listEnumInSource',\n 'F' => 'abbreviatedStatement',\n 'G' => 'conceptKeywords',\n 'H' => 'notes',\n 'I' => 'language',\n 'J' => 'educationalAlignment',\n 'K' => ['itemType', 'title'],\n 'L' => 'license',\n ];\n\n foreach ($columns as $column => $field) {\n $this->addCellIfExists($sheet, $column, $y, $row, $field);\n }\n }", "public function addRow($row){\n\t\t$row = $row instanceof \\Traversable ? iterator_to_array($row) : $row;\n\t\tif(!is_array($row))\n\t\t\tthrow new \\InvalidArgumentException('Row must be an array or a Traversable instance.');\n\n\t\t$this->rows[] = $row;\n\t\treturn $this;\n\t}", "public function add_row(object $row)\n\t{\n\t\tif (!$row->is_a(crm_bill_row_obj::CLID))\n\t\t{\n\t\t\tthrow new awex_obj_type(\"Invalid row object \" . var_export($row, true) . \" with class: \" . $row->class_id());\n\t\t}\n\n\t\t$this->connect(array(\n\t\t\t\"to\" => $row,\n\t\t\t\"type\" => \"RELTYPE_CHILD\"\n\t\t));\n\t}", "function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }", "public function addRow($row, $position = null) {\n\t\tif ((is_array($row) && !empty($row)) || $row instanceof Row) {\n\t\t\tif ((!empty($this->headers) && count($row) == count($this->headers)) || empty($this->headers)) {\n\t\t\t\tif (is_array($row)) {\n\t\t\t\t\t$row = array_values($row);\n\t\t\t\t}\n\t\t\t\tif (!empty($this->headers)) {\n\t\t\t\t\t$row = Row::getInstance()->setData($row, $this->headers);\n\t\t\t\t} else {\n\t\t\t\t\t$row = Row::getInstance()->setData($row);\n\t\t\t\t}\n\t\t\t\tif (!is_null($position) && is_int($position)) {\n\t\t\t\t\tif ($position == 0) {\n\t\t\t\t\t\t$this->data = array_merge(array($row), $this->data);\n\t\t\t\t\t} elseif ($position == count($this->data)) {\n\t\t\t\t\t\t$this->data[] = $row;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->data = array_merge(array_slice($this->data, 0, $position),\n\t\t\t\t\t\t\tarray($row),\n\t\t\t\t\t\t\tarray_slice($this->data, $position, count($this->data)-$position));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->data[] = $row;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new RowCountMismatchException(\"Row/header column count mismatch [\".count($this->data).\"]\");\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new InputTypeException(\"Input must be a non-empty array or a Row object\");\n\t\t}\n\t\treturn $this;\n\t}", "public function addRows()\n {\n }", "public function addElement($h, $icon, $data, $rowParams = '', $_ = '', $_2 = '', $colType = 'td')\n {\n $colType = ($colType === 'th') ? 'th' : 'td';\n $noWrap = $this->no_noWrap ? '' : ' nowrap';\n // Start up:\n $l10nParent = isset($data['_l10nparent_']) ? (int)$data['_l10nparent_'] : 0;\n $out = '\n\t\t<!-- Element, begin: -->\n\t\t<tr ' . $rowParams . ' data-uid=\"' . (int)$data['uid'] . '\" data-l10nparent=\"' . $l10nParent . '\">';\n // Show icon and lines\n if ($this->showIcon) {\n $out .= '\n\t\t\t<' . $colType . ' class=\"col-icon nowrap\">';\n if (!$h) {\n $out .= '&nbsp;';\n } else {\n for ($a = 0; $a < $h; $a++) {\n if (!$a) {\n if ($icon) {\n $out .= $icon;\n }\n }\n }\n }\n $out .= '</' . $colType . '>\n\t\t\t';\n }\n // Init rendering.\n $colsp = '';\n $lastKey = '';\n $c = 0;\n $ccount = 0;\n // __label is used as the label key to circumvent problems with uid used as label (see #67756)\n // as it was introduced later on, check if it really exists before using it\n $fields = $this->fieldArray;\n if ($colType === 'td' && array_key_exists('__label', $data)) {\n $fields[0] = '__label';\n }\n // Traverse field array which contains the data to present:\n foreach ($fields as $vKey) {\n if (isset($data[$vKey])) {\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass && $ccount % 2 == 0) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n $lastKey = $vKey;\n $c = 1;\n $ccount++;\n } else {\n if (!$lastKey) {\n $lastKey = $vKey;\n }\n $c++;\n }\n if ($c > 1) {\n $colsp = ' colspan=\"' . $c . '\"';\n } else {\n $colsp = '';\n }\n }\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n // End row\n $out .= '\n\t\t</tr>';\n // Return row.\n return $out;\n }", "function add_row($arr_html,$row){\r\n\r\n\t\tarray_splice($this->data, $row-1, 0, array($arr_html));\r\n\r\n\t}", "public function insertRow(TableRow $row, $position = null);", "public function insert($row)\n {\n $entry = '<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:gsx=\"http://schemas.google.com/spreadsheets/2006/extended\">';\n foreach($row as $colName => $value) {\n $entry .= sprintf(\n '<gsx:%s>%s</gsx:%s>',\n $colName,\n $value,\n $colName\n );\n }\n $entry .= '</entry>';\n\n ServiceRequestFactory::getInstance()->post($this->getPostUrl(), $entry);\n }", "public function CellRow($text, $height = 7, $border = 0)\n {\n\n $this->Cell($this->GetWithWithoutMargin(), $height, $text, $border, 1);\n }", "public function cell() {\r\n\t\t$argKeys = ['cell', 'header', 'headerSort', 'skipId', 'cellOptions'];\r\n\t\t$totalArgs = count($argKeys);\r\n\t\t$totalArgKey = $lastArgKey = $totalArgs - 1;\r\n\t\t$args = func_get_args();\r\n\t\t$numArgs = count($args);\r\n\t\tfor ($i = $totalArgKey; $i > 0; $i--) {\r\n\t\t\tif (!empty($args[$i])) {\r\n\t\t\t\t$lastArgKey = $i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($lastArgKey < $totalArgKey) {\r\n\t\t\t// The last passed argument can always be cell options\r\n\t\t\tif (is_array($args[$lastArgKey])) {\r\n\t\t\t\t$args[$totalArgKey] = $args[$lastArgKey];\r\n\t\t\t\tfor ($i = $lastArgKey; $i < $totalArgKey; $i++) {\r\n\t\t\t\t\t$args[$i] = null;\r\n\t\t\t\t}\r\n\t\t\t\tksort($args);\r\n\t\t\t}\r\n\t\t}\r\n\t\textract(array_combine($argKeys, $args + array_fill(0, $totalArgs, null)));\r\n\t\t\r\n\t\t// Checks if the skipId is in the skip array\r\n\t\tif (!empty($skipId) && $this->_checkSkip($skipId)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$formAddCell = '&nbsp;';\r\n\t\tif ($this->getHeader) {\r\n\t\t\t$this->columnCount++;\r\n\t\t\t//Stores first instance of non-blank header\r\n\t\t\tif (!empty($header) && !$this->hasHeader) {\r\n\t\t\t\t$this->hasHeader = true;\r\n\t\t\t}\r\n\t\t\tif ($headerSort) {\r\n\t\t\t\tif ($headerSort === true) {\r\n\t\t\t\t\t$headerSort = null;\r\n\t\t\t\t}\r\n\t\t\t\t$header = $this->thSort($header, $headerSort);\r\n\t\t\t}\r\n\t\t\t$thOptions = isset($cellOptions['th']) ? $cellOptions['th'] : $cellOptions;\r\n\t\t\t$this->headers[] = [$header => $thOptions];\r\n\t\t\t\r\n\t\t}\r\n\t\t/*\r\n\t\tif ($editCell = Param::keyCheck($cellOptions, 'edit', true)) {\r\n\t\t\t$formAddCell = $editCell;\r\n\t\t\t$cell = $this->_editCell($cell, $editCell);\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tif (is_array($cellOptions)) {\r\n\t\t\t$cell = [$cell, $cellOptions];\r\n\t\t}\r\n\t\t$this->row[] = $cell;\r\n\t\tif ($this->trCount == 0) {\r\n\t\t\t$this->formAddRow[] = $formAddCell;\r\n\t\t}\r\n\t}", "public function addRow(Piwik_DataTable_Row $row)\n {\n // if there is a upper limit on the number of allowed rows and the table is full,\n // add the new row to the summary row\n if ($this->maximumAllowedRows > 0\n && $this->getRowsCount() >= $this->maximumAllowedRows - 1\n ) {\n if ($this->summaryRow === null) // create the summary row if necessary\n {\n $this->addSummaryRow(new Piwik_DataTable_Row(array(\n Piwik_DataTable_Row::COLUMNS => $row->getColumns()\n )));\n $this->summaryRow->setColumn('label', self::LABEL_SUMMARY_ROW);\n } else {\n $this->summaryRow->sumRow($row, $enableCopyMetadata = false, $this->columnAggregationOperations);\n }\n return $this->summaryRow;\n }\n\n $this->rows[] = $row;\n if (!$this->indexNotUpToDate\n && $this->rebuildIndexContinuously\n ) {\n $label = $row->getColumn('label');\n if ($label !== false) {\n $this->rowsIndexByLabel[$label] = count($this->rows) - 1;\n }\n $this->indexNotUpToDate = false;\n }\n return $row;\n }", "public function addRaw($row) {\n\t\t$this->addRow($row, null, array('noformat' => true));\n\t}", "public function addCellXf($style) {\n\t\t$this->cellXfCollection[] = $style;\n\t\t$style->setIndex(count($this->cellXfCollection) - 1);\n\t}", "public function add(array $row, $index = null)\n {\n if (null === $index) {\n $this->rows[] = $row;\n $index = array_key_last($this->rows);\n } else {\n $this->rows[$index] = $row;\n }\n\n return $index;\n }", "public function addRow(array $row, $sheetName = '', $gridType = 'contents')\n {\n try {\n $nextGridRow = $this->getNextGridRow($sheetName, $gridType);\n $this->Grid['worksheets'][$sheetName][$gridType][$nextGridRow] = $this->checkGridRows($row);\n } catch (\\Exception $ex) {\n throw new \\Bridge\\Components\\Exporter\\ExporterException($ex->getMessage());\n }\n }", "protected function addCellIfExists(Worksheet $sheet, string $x, int $y, array $row, $field): void\n {\n if (is_array($field)) {\n if (array_key_exists($field[0], $row) && null !== $row[$field[0]]) {\n $row = $row[$field[0]];\n $field = $field[1];\n } else {\n return;\n }\n }\n if (array_key_exists($field, $row) && null !== $row[$field]) {\n $sheet->setCellValue($x.$y, $row[$field]);\n }\n }", "public function setRow($row)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'flag' => 0))));\n\t\treturn $this;\n\t}", "public function new_cell($css = '', $extras='') {\n\n $opts = '';\n\n if ($css == '') {\n $cssfirst = true;\n } else {\n $cssfirst = false;\n }\n\n // Close the previous cell if needed\n if ($this->_cellopen) {\n $this->end_cell();\n }\n\n // Check if column span was set via $this->set_colspan()\n if ($this->_colspan > 1) {\n $opts .= ' colspan=\"'.$this->_colspan.'\"';\n\n $this->_colspan = 0;\n }\n\n // Check if row span was set via $this->set_rowspan()\n if ($this->_rowspan > 1) {\n $opts .= ' rowspan=\"'.$this->_rowspan.'\"';\n\n $this->_rowspan = 0;\n }\n\n // Check if width was set via $this->set_width()\n if ($this->_width > 0) {\n $opts .= ' width=\"'.$this->_width.$this->_wpp.'\"';\n\n $this->_width = 0;\n $this->_wpp = '';\n }\n\n // Check if height was set via $this->set_height()\n if ($this->_height > 0) {\n $opts .= ' height=\"'.$this->_height.$this->_hpp.'\"';\n\n $this->_height = 0;\n $this->_hpp = '';\n }\n\n if ($this->_celltitledata != '') {\n $opts .= ' title=\"'.$this->_celltitledata.'\"';\n\n $this->_celltitledata = '';\n }\n\n if ($this->_newid != '') {\n $opts .= ' id=\"'.$this->_newid.'\"';\n\n $this->_newid = '';\n }\n\n if ($this->_onclickdata != '') {\n $opts .= ' onclick=\"'.$this->_onclickdata.'\"';\n\n $this->_onclickdata = '';\n }\n\n if ($this->_onmouseoverdata != '') {\n $opts .= ' onmouseover=\"'.$this->_onmouseoverdata.'\"';\n\n $this->_onmouseoverdata = '';\n }\n\n if ($css != '') {\n $opts = ' class=\"'.$css.'\"'.$opts;\n }\n\n if ($extras != '') {\n // Allows inline styles to override formatting in the CSS stylesheet\n $opts .= ' '.$extras;\n }\n\n echo '<td'.$opts.'>';\n $this->_cellopen = true;\n }", "private function newRow(){\n\t\t$r = new HtmlBox('tr');\n\t\tfor($i=0;$i<$this->col;$i++)\n\t\t\t$r->add(new HtmlBox('td')) ;\n\t\t$this->row++;\n\t\t$this->add($r);\n\t\treturn $this;\n\t}", "function appendWorksheetRow($row, $service, $config)\n{\n\t// set target spreadsheet and worksheet\n\t$ssKey = $config['ssid'];\n\t$wsKey = $config['wsid'];\n\n\ttry {\n\t\t// insert new row\n\t\t$service->insertRow($row, $ssKey, $wsKey);\n\t}\n\tcatch (Exception $e) {\n\t\tdie('ERROR: ' . $e->getMessage());\n\t}\t\n}", "function Row($data) {\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++) {\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}", "public function add_row(HTMLRowElement $row = null): int\n {\n if($row === null) $row = new HTMLRowElement();\n return $this -> add_child($row);\n }", "public function setCellValue( $cell, $value ) {\n\n $rowCol = $this->cellToRowAndColumn( $cell );\n\n foreach( $this->sheet->contents->sheetData->row as $row ) {\n\n //if we find a row in the xml that matches the row for the cell given\n if ( $row->attributes()->r == $rowCol[0] ) {\n\n foreach( $row->c as $col ) {\n\n //if we find a matching cell entry in the xml that we can just replace the value of\n if ( $col->attributes()->r == $cell ) {\n $col->v = $value;\n\n return true;\n }\n }\n\n //if we get to this point, a matching column wasn't found, but a row was, we must add the column\n $this->newCol( $row, $cell, $value );\n\n return true;\n }\n }\n\n //If we get to this point, a matching row was not found, and must be added\n $newRow = $this->newRow( $cell );\n\n //then a column must be added to the new row\n $this->newCol( $newRow, $cell, $value );\n\n\n }", "public function add_row($mark, $location, $nwork) {\n\t\t$data = array(\n 'oznaka' => $mark,\n 'lokacija' => $location,\n 'brm' => $nwork\n );\n\n\t\t$this->db->insert('sale', $data); //Note: All values are escaped automatically producing safer queries.\n\t}", "function Row($data){\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++){\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n \t//Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n \t//Draw the border\n\t $this->Rect($x,$y,$w,$h);\n \t//Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\n\t //Go to the next line\n\t $this->Ln($h);\n\t}", "public function insertValue( $value, $iRow, $iColumn )\r\n {\r\n $this->data[$iRow][$iColumn] = $value;\r\n }", "public function addRowElement(HtmlTableRow $row)\n\t{\n\t\t$this->_createRowContainer();\n\t\t$this->_tbody->addElement($row);\n\t\treturn $this;\n\t}", "public function addRow($values){\n\t\t$row = &$this->xml_data;\n\t\t$row .= '\n <Row ss:AutoFitHeight=\"0\">';\n\n\t\tforeach($values as $val){\n\t\t\t\n\t\t\t// check if given variable contains array\n\t\t\tif(is_array($val)){\n\t\t\t\t$value = $val[0];\n\t\t\t\t$datatype = $val[1];\n\t\t\t} else {\n\t\t\t\t$value = $val;\n\t\t\t\t$datatype = is_numeric($val) ? 'Number' : 'String';\n\t\t\t}\n\t\t\t$row .= '\n <Cell><Data ss:Type=\"'.$datatype.'\">'.$value.'</Data></Cell>';\t\t\t\n\t\t}\n\n\t\t$row .= '\n </Row>';\n\t}", "function Row($data)\n {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 3.8 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 3.8, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "function Row($data)\n {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 3.8 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 3.8, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 5, $data[$i], 0, $a);\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 Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 5, $data[$i], 0, $a);\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 }", "public function new_row($css = '', $extras='') {\n\n if ($this->_cellopen) {\n $this->end_cell();\n }\n\n if ($this->_rowopen) {\n $this->end_row();\n }\n\n if ($this->_newid != '') {\n $extras .= ' id=\"'.$this->_newid.'\"';\n\n $this->_newid = '';\n }\n\n echo '<tr'.($css != '' ? ' class=\"'.$css.'\"' : '').($extras != '' ? ' '.$extras : '').'>';\n $this->_rowopen = true;\n }", "public function addRow($tabela, $name, $type, $pkey, $notnull, $ai, $keys, $size, $default, $index, $unique);", "public function append(array $row, $index = null)\n {\n $index = $this->add($row, $index);\n\n $this->render();\n\n return $index;\n }", "function Row($data)\n{\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\t//Issue a page break first if needed\n\t$this->CheckPageBreak($h);\n\t//Draw the cells of the row\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t//Save the current position\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\t\t//Draw the border\n\t\t\n\t\t$this->Rect($x,$y,$w,$h);\n\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\n\t\t//Put the position to the right of the cell\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Go to the next line\n\t$this->Ln($h);\n}", "function Row($data)\n{\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\t//Issue a page break first if needed\n\t$this->CheckPageBreak($h);\n\t//Draw the cells of the row\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t//Save the current position\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\t\t//Draw the border\n\t\t\n\t\t$this->Rect($x,$y,$w,$h);\n\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\n\t\t//Put the position to the right of the cell\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Go to the next line\n\t$this->Ln($h);\n}", "function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=15*$nb;\n\t\t\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\t\t\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t//Print the text\n\t\t\t$this->MultiCell($w,15,$data[$i],0,$a);\n\t\t\t//Put the position to the right of the cell\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}", "public function insert(Table $table, $row);", "public function add_invoice_row() {\n\n $addFlag = false;\n\n // Set null values to check for and later insertion if required\n $data = array(\n 'category' => null,\n 'description' => null,\n 'amount' => null,\n 'mockInvoiceId' => $_POST[ 'mockInvoiceId' ]\n );\n\n // Check if there are any rows that have nothing in them\n $row = $this->mockinvoice_row_model->get_by( $data );\n\n // Add a new row if there are no blank ones already\n if ( empty( $row ) ) {\n // Add a new row with empty values\n $this->mockinvoice_row_model->save( $data );\n $addFlag = true;\n }\n\n\n // Send back if a new row was added\n $returnArray[] = array( 'rowAdded' => $addFlag );\n $this->json_library->print_array_json_unless_empty( $returnArray );\n }", "function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 4 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n\n //Se pone para que depues de insertar una pagina establezca la posicion en X = 5\n $this->SetX(5);\n\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 4, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "public function Row($data)\n {\n $nb=0;\n $this->SetDrawColor(35, 32, 32);\n\n for($i=0;$i<count($data);$i++){\n\n if ($i == 0)\n $this->SetFont('Arial','B',11);\n else\n $this->SetFont('Arial','',11);\n\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\n }\n\n $h=7*$nb;\n\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++){\n\n if ($i == 0)\n $this->SetFont('Arial','B',11);\n else\n $this->SetFont('Arial','',11);\n\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$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->MultiCell($w,7,$data[$i],0,$a);\n\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n\n }\n\n //Go to the next line\n $this->Ln($h);\n\n }", "function Row($data)\n\t{\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++)\n\t {\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'J';\n\t //Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n\t //Draw the border\n\t $this->Rect($x,$y,$w,$h);\n\t //Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\t //Go to the next line\n\t $this->Ln($h);\n\t}", "public function add_cells($cells = []){\n if(empty($cells)){\n $this -> add_cell(new HTMLCellElement(\"\"));\n }else{\n foreach ($cells as $cell) {\n $this -> add_cell($cell);\n }\n }\n }", "public function testCreateCell()\n {\n $object = new \\stdClass();\n $object->title = 'barfoo';\n $cell = $this->createFactory()->createCell('title', PropertyColumn::class, $object, []);\n\n $this->assertInstanceOf(Cell::class, $cell);\n $this->assertEquals('barfoo', $cell->value);\n $this->assertEquals('Property', $cell->getTemplate());\n }", "public function setCell($cell)\n {\n $this->cell = $cell;\n\n return $this;\n }", "function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=6*$nb;\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\n\t\t\t//Berder semua\n\t\t\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t//Print the text\n\t\t\t$this->MultiCell($w,6,$data[$i],0,$a);\n\t\t\t//Put the position to the right of the cell enaena\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}", "public function getCellValueForRendering($row, $cell=null);", "function Row($data)\n\t{\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5.5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++)\n\t {\n\t $w=$this->widths[$i];\n\t if ($i == 4 || $i == 5){\n\t \t$a = 'R';\n\t } elseif ($i == 0) {\n\t \t$a='L';\n\t } else {\n\t\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n\t\t}\n\t //Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n\t //Draw the border\n\t $this->Rect($x,$y,$w,$h);\n\t //Print the text\n\t $this->MultiCell($w,5.5,\"$data[$i]\",0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\t //Go to the next line\n\t $this->Ln($h);\n\t}", "protected function addAssociationRow(Worksheet $sheet, int $y, array $row): void\n {\n $columns = [\n 'A' => 'identifier',\n 'B' => 'originNodeIdentifier',\n 'C' => ['originLsItem', 'humanCodingScheme'],\n 'D' => 'type',\n 'E' => ['destinationLsItem', 'humanCodingScheme'],\n 'F' => 'destinationNodeIdentifier',\n 'G' => 'group',\n 'H' => 'groupName',\n ];\n\n foreach ($columns as $column => $field) {\n $this->addCellIfExists($sheet, $column, $y, $row, $field);\n }\n }", "public function cellType($row, $column) {\n\t}", "public function addTableHeader($data, $params = array(), $cell_end = 'H') {\n // offset\n $offset = 0;\n if (isset($params['offset']))\n $offset = is_numeric($params['offset']) ? (int)$params['offset'] : PHPExcel_Cell::columnIndexFromString($params['offset']);\n\n // font name\n if (isset($params['font']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setName($params['font']);\n\n // font size\n if (isset($params['size']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setSize($params['size']);\n\n // bold\n if (isset($params['bold']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold($params['bold']);\n\n // italic\n if (isset($params['italic']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setItalic($params['italic']);\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // set internal params that need to be processed after data are inserted\n $this->_tableParams = array(\n 'header_row' => $this->_row,\n 'offset' => $offset,\n 'row_count' => 0,\n 'auto_width' => array(),\n 'filter' => array(),\n 'wrap' => array(),\n 'horizontal' => false,\n 'fill_color' => false,\n 'text_color' => false,\n );\n\n if( !empty($data) ) {\n foreach ($data as $d) {\n $child = Common::hashEmptyField($d, 'child');\n\n // set label\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $d['label']);\n\n // set width\n if (isset($d['width']) && is_numeric($d['width']))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($offset)->setWidth((float)$d['width']);\n else\n $this->_tableParams['auto_width'][] = $offset;\n\n // filter\n if (isset($d['filter']) && $d['filter'])\n $this->_tableParams['filter'][] = $offset;\n\n // wrap\n if (isset($d['wrap']) && $d['wrap'])\n $this->_tableParams['wrap'][] = $offset;\n\n // fill color\n if (isset($d['fill_color']) && $d['fill_color'])\n $this->_tableParams['fill_color'][] = $offset;\n\n // text color\n if (isset($d['text_color']) && $d['text_color'])\n $this->_tableParams['text_color'][] = $offset;\n\n if( !empty($child) ) {\n $childRow = $this->_row+1;\n\n if( !isset($childOffset) ) {\n $childOffset = $offset;\n }\n\n foreach ($child as $key => $val) {\n $label = Common::hashEmptyField($val, 'label');\n $width = Common::hashEmptyField($val, 'width');\n\n $childOffsetAcii = 1+$childOffset;\n $childOffsetAcii = Common::getNameFromNumber($childOffsetAcii);\n $childPosition = sprintf('%s%s:%s%s', $childOffsetAcii, $childRow, $childOffsetAcii, $childRow);\n\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($childOffset, $childRow, $label);\n \n if (isset($width) && is_numeric($width))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($childOffset)->setWidth((float)$width);\n else\n $this->_tableParams['auto_width'][] = $childOffset;\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($childRow)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n $childOffset++;\n }\n }\n\n if( !empty($d['rowspan']) ) {\n $rowspan = $d['rowspan']-1;\n $default = 1+$offset;\n $row = $this->_row;\n $cell_end = $row+$rowspan; // Acii A\n\n $default = Common::getNameFromNumber($default);\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $default, $cell_end));\n // $this->_row += $rowspan;\n // $offset++;\n }\n if( !empty($d['colspan']) ) {\n $colspan = $d['colspan']-1;\n $default = 1+$offset;\n $dimensi = $default+$colspan; // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan;\n // $this->_row ++;\n }\n\n $offset++;\n }\n }\n\n $child = Set::extract('/child', $data);\n\n if ( !empty($child) ) {\n $this->_row++;\n }\n \n $this->_row++;\n\n return $this;\n }", "public function addNew($row = null)\n {\n if(($row <> null) && ($nm = $row->getModelName()) <> $this->childName)\n throw new HTException(\"SolModel cannot $this->childName::addNew($nm)\");\n if($row == null)\n {\n $newPropVals = array();\n foreach($this->accessorNames as $accessorName)\n {\n $newPropVals[$accessorName] = '';\n }\n $objResult = new HTResult($newPropVals, $this->childName);\n }\n else\n $objResult = $row;\n $this->resultList[] = $objResult;\n return $objResult;\n }" ]
[ "0.7585231", "0.70532227", "0.67234623", "0.6705477", "0.66555446", "0.66047245", "0.65948236", "0.6496232", "0.6384709", "0.6384382", "0.63062847", "0.62880045", "0.6213451", "0.61820865", "0.61656547", "0.6119413", "0.5989856", "0.5945783", "0.5924645", "0.58909374", "0.58805686", "0.5827954", "0.5799961", "0.57892615", "0.57593536", "0.574554", "0.5742303", "0.5734824", "0.57206434", "0.569935", "0.56981593", "0.5659989", "0.56526256", "0.56476945", "0.564539", "0.5614658", "0.5556109", "0.55426764", "0.5501447", "0.54960644", "0.5493993", "0.5472576", "0.5465945", "0.5464868", "0.5455199", "0.54220307", "0.5414718", "0.5401631", "0.53939503", "0.53845596", "0.5382484", "0.53701943", "0.53690904", "0.5359104", "0.5342627", "0.5340262", "0.53181565", "0.5309966", "0.5296493", "0.5294304", "0.52941763", "0.5281371", "0.5245246", "0.5240068", "0.52336043", "0.5221712", "0.5214359", "0.519363", "0.51924545", "0.5191349", "0.51812935", "0.515628", "0.5151748", "0.51205677", "0.5087225", "0.50802565", "0.50802565", "0.5078182", "0.5078182", "0.50660026", "0.50641567", "0.504615", "0.5035193", "0.5035193", "0.5024209", "0.50219595", "0.50101036", "0.50065184", "0.5003171", "0.5003005", "0.5001162", "0.49966976", "0.49870434", "0.4982382", "0.49740508", "0.49625716", "0.49618313", "0.49608886", "0.49505773", "0.49338317" ]
0.78364974
0
Alias for the addCell method.
public function cell($key, Cell $cell);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addCell($key, Cell $cell);", "public function addCell(Cell $cell)\n {\n $this->cells->add($cell);\n }", "public function addCell(Cell $cell)\n {\n if (!isset($this->kitCells[$cell->getPosition()])) {\n ExceptionFactory::positionOutOfRangeException($cell->getPosition());\n }\n\n if (!empty($this->kitCells[$cell->getPosition()])) {\n ExceptionFactory::positionAlreadyExistException($cell->getPosition());\n }\n\n $this->kitCells[$cell->getPosition()] = $cell;\n }", "function helper_pdf_add_cell($pdf, $largura, $altura, $texto, $bordas, $pula_linha, $alinhamento){\n\t$pdf->Cell($largura, $altura, $texto, $bordas, $pula_linha, $alinhamento);\n}", "public function setToCell(Cell &$Cell);", "public function addCell($value, $type = null, $styleName = null)\n {\n if (!$type) {\n $type = $this->guessType($value);\n }\n $value = htmlentities($value, ENT_COMPAT, $this->encoding);\n $this->data .= \"<Cell\" . ($styleName ? \" ss:StyleID=\\\"\" . $styleName . \"\\\"\" : \"\") . \"><Data ss:Type=\\\"\" . $type . \"\\\">\" . $value . \"</Data></Cell>\";\n return $this;\n }", "public function addcell( $row, $col, $string, $raw = '' ) {\n\t\t$this->sheets[ $this->sn ]['maxrow'] = max( $this->sheets[ $this->sn ]['maxrow'], $row + $this->rowoffset );\n\t\t$this->sheets[ $this->sn ]['maxcol'] = max( $this->sheets[ $this->sn ]['maxcol'], $col + $this->colOffset );\n\t\t$this->sheets[ $this->sn ]['cells'][ $row + $this->rowoffset ][ $col + $this->colOffset ] = $string;\n\t\tif ( $raw ) {\n\t\t\t$this->sheets[ $this->sn ]['cellsInfo'][ $row + $this->rowoffset ][ $col + $this->colOffset ]['raw'] = $raw;\n\t\t}\n\t\tif ( isset( $this->recType ) ) {\n\t\t\t$this->sheets[ $this->sn ]['cellsInfo'][ $row + $this->rowoffset ][ $col + $this->colOffset ]['type'] = $this->recType;\n\t\t}\n\n\t}", "public function add_cell(HTMLCellElement $cell): int\n {\n if($cell === null) $cell = new HTMLCellElement(\"\");\n return $this -> add_child($cell);\n }", "public function cell() {\r\n\t\t$argKeys = ['cell', 'header', 'headerSort', 'skipId', 'cellOptions'];\r\n\t\t$totalArgs = count($argKeys);\r\n\t\t$totalArgKey = $lastArgKey = $totalArgs - 1;\r\n\t\t$args = func_get_args();\r\n\t\t$numArgs = count($args);\r\n\t\tfor ($i = $totalArgKey; $i > 0; $i--) {\r\n\t\t\tif (!empty($args[$i])) {\r\n\t\t\t\t$lastArgKey = $i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($lastArgKey < $totalArgKey) {\r\n\t\t\t// The last passed argument can always be cell options\r\n\t\t\tif (is_array($args[$lastArgKey])) {\r\n\t\t\t\t$args[$totalArgKey] = $args[$lastArgKey];\r\n\t\t\t\tfor ($i = $lastArgKey; $i < $totalArgKey; $i++) {\r\n\t\t\t\t\t$args[$i] = null;\r\n\t\t\t\t}\r\n\t\t\t\tksort($args);\r\n\t\t\t}\r\n\t\t}\r\n\t\textract(array_combine($argKeys, $args + array_fill(0, $totalArgs, null)));\r\n\t\t\r\n\t\t// Checks if the skipId is in the skip array\r\n\t\tif (!empty($skipId) && $this->_checkSkip($skipId)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$formAddCell = '&nbsp;';\r\n\t\tif ($this->getHeader) {\r\n\t\t\t$this->columnCount++;\r\n\t\t\t//Stores first instance of non-blank header\r\n\t\t\tif (!empty($header) && !$this->hasHeader) {\r\n\t\t\t\t$this->hasHeader = true;\r\n\t\t\t}\r\n\t\t\tif ($headerSort) {\r\n\t\t\t\tif ($headerSort === true) {\r\n\t\t\t\t\t$headerSort = null;\r\n\t\t\t\t}\r\n\t\t\t\t$header = $this->thSort($header, $headerSort);\r\n\t\t\t}\r\n\t\t\t$thOptions = isset($cellOptions['th']) ? $cellOptions['th'] : $cellOptions;\r\n\t\t\t$this->headers[] = [$header => $thOptions];\r\n\t\t\t\r\n\t\t}\r\n\t\t/*\r\n\t\tif ($editCell = Param::keyCheck($cellOptions, 'edit', true)) {\r\n\t\t\t$formAddCell = $editCell;\r\n\t\t\t$cell = $this->_editCell($cell, $editCell);\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tif (is_array($cellOptions)) {\r\n\t\t\t$cell = [$cell, $cellOptions];\r\n\t\t}\r\n\t\t$this->row[] = $cell;\r\n\t\tif ($this->trCount == 0) {\r\n\t\t\t$this->formAddRow[] = $formAddCell;\r\n\t\t}\r\n\t}", "function add_cell($val, $link = \"\")\n\t{\n\t\tif(!empty($link))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"begin_link\");\n\t\t\t$this->tpl->setVariable(\"LINK_TARGET\", $link);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"end_link\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"text\");\n\t\t$this->tpl->setVariable(\"TEXT_CONTENT\", $val);\n\t\t$this->tpl->parseCurrentBlock();\n\t\t$this->tpl->setCurrentBlock(\"table_cell\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}", "function add_cell($val, $link = \"\")\n\t{\n\t\tif (!empty($link))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"begin_link\");\n\t\t\t$this->tpl->setVariable(\"LINK_TARGET\", $link);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"end_link\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"text\");\n\t\t$this->tpl->setVariable(\"TEXT_CONTENT\", $val);\n\t\t$this->tpl->parseCurrentBlock();\n\t\t$this->tpl->setCurrentBlock(\"table_cell\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}", "public function setCell($cell)\n {\n $this->cell = $cell;\n\n return $this;\n }", "public function addCellToVisited()\n {\n if (!$this->isCellVisited($this->currentXPosition, $this->currentYPosition)) {\n $this->executionResult['visited'][] = ['X' => $this->currentXPosition, 'Y' => $this->currentYPosition];\n return true;\n }\n else return false;\n }", "public function getCell()\n {\n return $this->cell;\n }", "public function addCellXf($style) {\n\t\t$this->cellXfCollection[] = $style;\n\t\t$style->setIndex(count($this->cellXfCollection) - 1);\n\t}", "private function newRow( $cell ) {\n\n $sheetDataRef = $this->sheet->contents->sheetData;\n $rowCol = $this->cellToRowAndColumn( $cell );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a row between\n // already existing rows. We must redraw the entire rows section of the xml object but insert our new row in the correct place as we redraw.\n if ( count( $sheetDataRef->row ) > 0 ) {\n\n $rowsCopy = clone $this->sheet->contents->sheetData;\n unset( $this->sheet->contents->sheetData->row );\n\n foreach ( $rowsCopy->row as $row ) {\n\n if ( (int) $row->attributes()->r > $rowCol[0] && empty( $inserted ) ) {\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n $inserted = true;\n }\n\n $copiedRow = $sheetDataRef->addChild( 'row' );\n $copiedRow->addAttribute( 'r', $row->attributes()->r );\n $copiedRow->addAttribute( 'spans', $row->attributes()->spans );\n\n foreach( $row->c as $col ) {\n\n $this->newCol( $copiedRow, $col->attributes()->r, $col->v );\n }\n }\n\n if ( ! empty( $inserted ) )\n return $insertedRow;\n }\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n return $insertedRow;\n }", "public function cell($value) {\n return $this->setProperty('cell', $value);\n }", "public function setCell($row, $column)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'column_family'=> $column, 'flag' => 1))));\n\t\treturn $this;\n\t}", "public function new_cell($css = '', $extras='') {\n\n $opts = '';\n\n if ($css == '') {\n $cssfirst = true;\n } else {\n $cssfirst = false;\n }\n\n // Close the previous cell if needed\n if ($this->_cellopen) {\n $this->end_cell();\n }\n\n // Check if column span was set via $this->set_colspan()\n if ($this->_colspan > 1) {\n $opts .= ' colspan=\"'.$this->_colspan.'\"';\n\n $this->_colspan = 0;\n }\n\n // Check if row span was set via $this->set_rowspan()\n if ($this->_rowspan > 1) {\n $opts .= ' rowspan=\"'.$this->_rowspan.'\"';\n\n $this->_rowspan = 0;\n }\n\n // Check if width was set via $this->set_width()\n if ($this->_width > 0) {\n $opts .= ' width=\"'.$this->_width.$this->_wpp.'\"';\n\n $this->_width = 0;\n $this->_wpp = '';\n }\n\n // Check if height was set via $this->set_height()\n if ($this->_height > 0) {\n $opts .= ' height=\"'.$this->_height.$this->_hpp.'\"';\n\n $this->_height = 0;\n $this->_hpp = '';\n }\n\n if ($this->_celltitledata != '') {\n $opts .= ' title=\"'.$this->_celltitledata.'\"';\n\n $this->_celltitledata = '';\n }\n\n if ($this->_newid != '') {\n $opts .= ' id=\"'.$this->_newid.'\"';\n\n $this->_newid = '';\n }\n\n if ($this->_onclickdata != '') {\n $opts .= ' onclick=\"'.$this->_onclickdata.'\"';\n\n $this->_onclickdata = '';\n }\n\n if ($this->_onmouseoverdata != '') {\n $opts .= ' onmouseover=\"'.$this->_onmouseoverdata.'\"';\n\n $this->_onmouseoverdata = '';\n }\n\n if ($css != '') {\n $opts = ' class=\"'.$css.'\"'.$opts;\n }\n\n if ($extras != '') {\n // Allows inline styles to override formatting in the CSS stylesheet\n $opts .= ' '.$extras;\n }\n\n echo '<td'.$opts.'>';\n $this->_cellopen = true;\n }", "public function apply(Cell $cell)\n {\n }", "public function cells();", "public function hasCell(){\n return $this->_has(1);\n }", "private function newCol( $row, $cell, $value ) {\n\n if ( count( $row->c ) > 0 ) {\n\n $rowCopy = clone $row;\n unset( $row->c );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a column between\n // already existing columns. We must redraw the entire columns ('c') section of the xml object but insert our new column in the correct place as we redraw.\n foreach ( $rowCopy as $col ) {\n\n if ( $cell < $col->attributes()->r && empty( $inserted ) ) {\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n $inserted = true;\n }\n\n $copiedCol = $row->addChild( 'c' );\n $copiedCol->addAttribute( 'r', $col->attributes()->r );\n $copiedCol->addChild( 'v', $col->v );\n }\n\n if ( ! empty( $inserted ) )\n return $insertedCol;\n }\n\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n return $insertedCol;\n }", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "public function Cell($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = ''): void\n {\n }", "public function addToCell($object, Vector2D $position): bool {\n return $this->getCell($position)->add($object);\n }", "public function cell ($text,$options=NULL) { print $this->cell_html ($text,$options); }", "public function cellType($row, $column) {\n\t}", "function Cell2($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M') {\n // $this->Cell($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, $ignore_min_height, $calign, $valign);\n $h = 5;\n $this->StartTransform();\n $this->Rect($this->x, $this->y, $w, $h, 'CNZ');\n $this->writeHTMLCell($w, $h, $this->x, $this->y, $txt);\n $this->StopTransform();\n }", "private function BuildCell($_RowNo, $_ColNo, $_Cell) {\r\n if(is_string($_Cell)) {\r\n $Len_ = strlen($_Cell);\r\n return(pack(\"S*\", 0x0204, $Len_ + 8, $_RowNo, $_ColNo, 0x00, $Len_).$_Cell);\r\n }\r\n if(is_int($_Cell))\r\n return(pack(\"S*\", 0x027E, 10, $_RowNo, $_ColNo, 0x00).pack(\"I\", ($_Cell<<2) | 2));\r\n if(is_float($_Cell))\r\n return(pack(\"S*\", 0x0203, 14, $_RowNo, $_ColNo, 0x00).pack(\"d\", $_Cell));\r\n if(is_bool($_Cell))\r\n return($this->BuildCell($_RowNo, $_ColNo, (int)($_Cell ? 1 : 0)));\r\n // Returns a null cell\r\n return(pack(\"S*\", 0x0201, 6, $_RowNo, $_ColNo, 0x17));\r\n }", "public function setCell(CellInterface $cell, $options = array())\n {\n $this->listColumn->setCell($cell, $options);\n return $this;\n }", "function OutputCell($width,$height,$htmlContent,$border=0,$LineFeedHeight=0,$align='',$fill=0,$cellmargin=3){\r\n\t$this->Cell($width, $height, '', $border, 0, $align, $fill);\r\n\t// on note la position apres la cellule\r\n\t$x = $this->x; $y = $this->y;\r\n\t$lmargin = $this->lMargin;\r\n\t$rmargin = $this->rMargin;\r\n\r\n\t// on se remet en debut de cellule\r\n\t$this->x-=$width;\r\n\t$this->x = $this->x+$cellmargin/2;\r\n\t$this->lMargin = $this->x; // pour que les retour ligne se fassent correctement dans la cellule\r\n\t$this->rMargin = $this->w-$this->x-$width+$cellmargin/2;\r\n\r\n\t$this -> WriteHTML($htmlContent,$LineFeedHeight);\r\n\t// on se remet a la fin de la cellule\r\n\t$this->x = $x; $this->y = $y;\r\n\t$this->lMargin = $lmargin;\r\n\t$this->rMargin = $rmargin;\r\n}", "public function getCellPrototype()\n\t{\n\t\treturn $this->cell;\n\t}", "public function add_cells($cells = []){\n if(empty($cells)){\n $this -> add_cell(new HTMLCellElement(\"\"));\n }else{\n foreach ($cells as $cell) {\n $this -> add_cell($cell);\n }\n }\n }", "abstract protected function doSaveCell(CellInterface $cell);", "public function addCoordinate()\n {\n $args = func_get_args();\n \n if(isset($args[0]) && is_int($args[0]) && isset($args[1]) && is_int($args[1]))\n {\n if(isset($args[2]) && is_bool($args[2]))\n $this->coordinates[] = new Coordinate($args[0], $args[1], $args[2]);\n else\n $this->coordinates[] = new Coordinate($args[0], $args[1]);\n }\n else if(isset($args[0]) && ($args[0] instanceof Coordinate))\n $this->coordinates[] = $args[0];\n else\n throw new \\InvalidArgumentException();\n }", "public function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link=''){\n $txt = html_entity_decode(utf8_decode($txt));\n parent::Cell($w, $h, $txt, $border, $ln, $align, $fill, $link);\n }", "public function add();", "public function add();", "public function addColumn($content, $col = null, $row = null)\r\n {\r\n $row = $row === null ? $this->rowIndex : $row;\r\n if ($col === null) {\r\n $col = isset($this->data[$row]) ? count($this->data[$row]) : 0;\r\n }\r\n\r\n $this->data[$row][$col] = $content;\r\n\r\n return $this;\r\n }", "public function addCellToCleaned()\n {\n if (!$this->isCellCleaned($this->currentXPosition, $this->currentYPosition)) {\n $this->executionResult['cleaned'][] = ['X' => $this->currentXPosition, 'Y' => $this->currentYPosition];\n return true;\n }\n else return false;\n }", "public function put($i, Cell $cell)\n\t{\n\t\t$this->cells->put($i, $cell->cells($this));\n\t\treturn $this;\n\t}", "function show_cell($which) {\r\n $token = $this->position[$which];\r\n if ($token <> '-') {\r\n return '<td>' . $token . '</td>';\r\n }\r\n $this->newposition = $this->position;\r\n $this->newposition[$which] = 'o';\r\n $move = implode($this->newposition);\r\n $link = '?board=' .$move;\r\n return '<td><a href=' . $link . '>-</a></td>';\r\n }", "public function add(Drawable $letter)\n \t{\n \t$this->arr = $letter->draw($this->arr, $this->startRow, $this->startCol);\n \t\n \t// adjust startRow or startCol (depending on the direction) for the \n \t// next starting point of the next letter to draw\n \tif ($this->direction == self::HORIZONTAL) {\n \t\t$this->startCol += $this->size + 1;\n \t} else {\n \t\t$this->startRow += $this->size + 1;\n \t}\n }", "public function testCreateCell()\n {\n $object = new \\stdClass();\n $object->title = 'barfoo';\n $cell = $this->createFactory()->createCell('title', PropertyColumn::class, $object, []);\n\n $this->assertInstanceOf(Cell::class, $cell);\n $this->assertEquals('barfoo', $cell->value);\n $this->assertEquals('Property', $cell->getTemplate());\n }", "function tablecell_close() {\n $this->doc .= '</td>';\n }", "final public function setCell($key,string $class):self\n {\n $key = $this->onPrepareKey(['cell',$key]);\n $data =& $this->arr();\n $data[$key] = $class;\n\n return $this;\n }", "public function addRows()\n {\n }", "public function setCellValue( $cell, $value ) {\n\n $rowCol = $this->cellToRowAndColumn( $cell );\n\n foreach( $this->sheet->contents->sheetData->row as $row ) {\n\n //if we find a row in the xml that matches the row for the cell given\n if ( $row->attributes()->r == $rowCol[0] ) {\n\n foreach( $row->c as $col ) {\n\n //if we find a matching cell entry in the xml that we can just replace the value of\n if ( $col->attributes()->r == $cell ) {\n $col->v = $value;\n\n return true;\n }\n }\n\n //if we get to this point, a matching column wasn't found, but a row was, we must add the column\n $this->newCol( $row, $cell, $value );\n\n return true;\n }\n }\n\n //If we get to this point, a matching row was not found, and must be added\n $newRow = $this->newRow( $cell );\n\n //then a column must be added to the new row\n $this->newCol( $newRow, $cell, $value );\n\n\n }", "public function added($input): Matrix\n {\n if (is_numeric($input)) {\n return $this->map(function ($cell) use ($input) {\n return $cell + $input;\n });\n }\n\n return $this->map(function ($currentValue, $x, $y) use ($input) {\n return $currentValue + $input->get($x, $y);\n });\n }", "function add() {\n }", "function AddCol($field=-1,$width=-1,$align='L')\r\n{\r\n\tif($field==-1)\r\n\t{\r\n\t\t$field=count($this->columnProp);\r\n\t}\r\n\r\n\t$this->columnProp[$field]=array('f'=>$field,'w'=>$width,'a'=>$align);\r\n\t#$this->Write(5, \"Ajout de colonne : \".$field.\"/\".$width.\"/\".$align); $this->Ln();\r\n}", "public function setCellLocation($value)\n {\n return $this->set('CellLocation', $value);\n }", "function tck_table_add_row_cell_array( $cells, $keyword, $url, $title, $ip, $clicks, $timestamp ) {\n $fkeyword = tck_get_keyword($keyword);\n \n if ( $fkeyword != $keyword ) {\n $shorturl = yourls_link($fkeyword);\n $cells['keyword']['shorturl'] = yourls_esc_url($shorturl);\n $cells['keyword']['keyword_html'] = yourls_esc_html( $fkeyword );\n $cells['actions']['keyword'] = $fkeyword;\n }\n \n $newcells['custom']['template'] = '%custom%';\n $newcells['custom']['custom'] = (tck_is_custom_keyword($fkeyword) ? 'Yes' : 'No');\n $newcells['actions'] = $cells['actions'];\n\n unset($cells['actions']);\n return array_merge($cells, $newcells);\n }", "function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}", "function add_email($which, $address) {\n $this->emails[$which] = $address;\n }", "public function getCellValueForRendering($row, $cell=null);", "public function cell($x = null, $y = null, $w = null, $h = null, $txt = '', $style = null, $options = [])\n {\n if (!isset($x)) $x = $this->getCursorX();\n if (!isset($y)) $y = $this->getCursorY();\n if (!isset($w)) $w = $this->getInnerWidth() - $x;\n if (!isset($h)) $h = $this->getInnerHeight() - $y;\n\n $style = Style::merged($this->getStyle('body'), $this->getStyle('cell'), $style);\n\n $originalY = $this->pdf->getCursorY();\n $originalPage = $this->pdf->getPage();\n\n $this->pdf->cell(\n $this->moveToGlobal_h($x),\n $this->moveToGlobal_v($y),\n $this->scaleToGlobal_h($w),\n $this->scaleToGlobal_v($h),\n $txt,\n $this->scaledStyle($style),\n $options\n );\n\n // If a automatic page-break is detected, move the entire view accordingly\n $newPage = $this->pdf->getPage();\n\n if ($newPage != $originalPage) {\n\n // TODO: Maybe just use the inner page height? The view moved one page backwards?\n $newY = $this->pdf->getCursorY();\n\n // For Multiline cells, assume 'bottom left' cursor placement, else 'top right'\n $default = Style::value($style, Multiline::ATTRIBUTE, false) ? CursorPlacement::BOTTOM_LEFT : CursorPlacement::TOP_RIGHT;\n $cursorPlacement = Style::value($style, CursorPlacement::ATTRIBUTE, $default);\n\n if ($cursorPlacement === CursorPlacement::BOTTOM_LEFT || $cursorPlacement === CursorPlacement::BOTTOM_RIGHT || $cursorPlacement === CursorPlacement::NEWLINE) {\n // If the cursor is at the bottom of the cell, subtract the cell height to determine\n // where the cell would have started on the new page.\n $newY -= $this->scaleToGlobal_v($h);\n }\n\n // Then move our view up accordingly.\n $this->y += $newY - $originalY;\n\n }\n\n return $this;\n }", "function add_row($selector, $row = \\false, $post_id = \\false)\n{\n}", "public function cellFormat($row, $column) {\n\t}", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "function show_cell($which) {\n\n $token = $this->position[$which];\n\n //if the cell is not a dash - place the token in it\n if ($token <> '-')\n return '<td>' . $token . '</td>';\n\n\n //now the hard case\n $this->new_position = $this->position; // copy the original\n $this->new_position[$which] = 'o'; // this would be their move\n $move = implode($this->newposition); // make a string from the board array\n $link = '?board=' . $move; // this is what we want the link to be\n\n // so return a cell containing an anchor and showing a hyphen\n return '<td><a href=\"' . $link . '\">-</a></td>';\n }", "function AddRow()\n\t{\n\t\tif (!func_num_args())\n\t\t{\n\t\t\t// no parameters were passed\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// increment the row pointer\n\t\tif (!isset($this->_intCurrentRow))\n\t\t{\n\t\t\t$this->_intCurrentRow = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_intCurrentRow++;\n\t\t}\n\t\t\n\t\t// build the array of column values\t\t\n\t\t$arrColumns = func_get_args();\n\t\t$this->_arrRows[] = Array('Columns'=>$arrColumns);\n\t\t\n\t\treturn $this->_intCurrentRow;\n\t}", "public function setCellType(?string $cellType) {\n\t\tif (!in_array($cellType, ['td', 'th']) && !empty($cellType)) {\n\t\t\tthrow new InvalidArgumentException(\"\\$cellType must be 'td' or 'th'. Found: $cellType.\");\n\t\t}\n\t\t$this->_config = Hash::insert($this->_config, 'cellType', $cellType);\n\n\t\treturn $this;\n\t}", "public function getDddCell()\n {\n return $this->dddCell;\n }", "private function setValue(Cell $cell, $value, $style) {\n\t\t$cell->appendToClass($style);\n\t\t$cell->setValue('<span>' . $value . '</span>');\n\t}", "function &add(& $element)\n {\n if (!is_a($element, 'Image_Graph_Font')) {\n $this->_elements[] = &$element;\n }\n $element->_setParent($this);\n return $element;\n }", "function CellCount() {\n return $this->rows[$this->LastRow]->CellCount();\n }", "public function addNewSheet();", "public function add_element($form_element, $num_cols=1, $attrs=false)\n\t{\n\t\tif (!is_array($attrs)) { $attrs = array(); }\n\t\tarray_push($this->form_elements, array($form_element, $num_cols, 'cell', $attrs));\n\t}", "function append(Row $row) {\n\t\t$this->rows[] = $row;\n\t\treturn $this;\n\t}", "protected function addCellIfExists(Worksheet $sheet, string $x, int $y, array $row, $field): void\n {\n if (is_array($field)) {\n if (array_key_exists($field[0], $row) && null !== $row[$field[0]]) {\n $row = $row[$field[0]];\n $field = $field[1];\n } else {\n return;\n }\n }\n if (array_key_exists($field, $row) && null !== $row[$field]) {\n $sheet->setCellValue($x.$y, $row[$field]);\n }\n }", "protected function add() {\n\t}", "public function callbackCreatedCell($bodyOrParams = []) {\n\t\tValidator::getInstance()->validateBodyOrParams($bodyOrParams);\n\t\t$this->_config = Hash::insert($this->_config, 'createdCell', $bodyOrParams);\n\n\t\treturn $this;\n\t}", "function fcell($c_width,$c_height,$x_axis,$text){\n $w_w=$c_height/3;\n $w_w_1=$w_w+2;\n $w_w1=$w_w+$w_w+$w_w+3;\n $len=strlen($text); \n if($len>10){\n $w_text=str_split($text,10);\n $this->SetX($x_axis);\n $this->Cell($c_width,$w_w_1,$w_text[0],'','','');\n $this->SetX($x_axis);\n $this->Cell($c_width,$w_w1,$w_text[1],'','','');\n $this->SetX($x_axis);\n $this->Cell($c_width,$c_height,'','LTRB',0,'C',0);\n }\n else{\n $this->SetX($x_axis);\n $this->Cell($c_width,$c_height,$text,'LTRB',0,'C',0);\n }\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function setCellStyle($cell, $styleArray ){\n \n $this->getPHPExcel()->getActiveSheet()->getStyle($cell)->applyFromArray($styleArray);\n }", "private function newRow(){\n\t\t$r = new HtmlBox('tr');\n\t\tfor($i=0;$i<$this->col;$i++)\n\t\t\t$r->add(new HtmlBox('td')) ;\n\t\t$this->row++;\n\t\t$this->add($r);\n\t\treturn $this;\n\t}", "public static function cellAddress($row, $column, $relativity = 1, $referenceStyle = true, $sheetText = '')\n {\n return Address::cell($row, $column, $relativity, $referenceStyle, $sheetText);\n }", "public function add_row($mark, $location, $nwork) {\n\t\t$data = array(\n 'oznaka' => $mark,\n 'lokacija' => $location,\n 'brm' => $nwork\n );\n\n\t\t$this->db->insert('sale', $data); //Note: All values are escaped automatically producing safer queries.\n\t}", "public function add($input): Matrix\n {\n if (is_numeric($input)) {\n return $this->apply(function ($cell) use ($input) {\n return $cell + $input;\n });\n }\n\n return $this->apply(function ($currentValue, $x, $y) use ($input) {\n return $currentValue + $input->get($x, $y);\n });\n }", "public function addColumn( $name, $label = NULL )\n\t{\n\t\t$this->columns[ $name ] = $column = new Column( $name, $label );\n\t\treturn $column->setGrid( $this );\n\t}", "public function addRow($row)\n {\n $this->rows[] = $row;\n }", "public function addAddress()\n\t{\n\t\treturn $this->editAddress();\n\t}", "abstract public function addCoord(array $coord);", "public function add ($elType, $param = NULL, $place = 'head');", "abstract public function addNewSheet();", "function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }", "function AddCol($field=-1,$width=-1,$caption='',$align='')\r\n{\r\n if($field==-1)\r\n $field=count($this->aCols);\r\n $this->aCols[]=array('f'=>$field,'c'=>$caption,'w'=>$width,'a'=>$align);\r\n}", "public function getCells();", "function getCell() {\n \tglobal $synAbsolutePath;\n $ext = $this->translate($this->value);\n $mat=$this->translatePath($this->mat);\n $filename=$mat.$this->createFilename().\".\".$ext;\n $file_exists=file_exists($synAbsolutePath.$filename);\n $isImg=$this->isImage($filename);\n if ($ext and $file_exists and $isImg) $ret=\"<div style='overflow: hidden; height: 25px; display:inline;background: url($filename) no-repeat center;width: 100%' onMouseOver=\\\"openbox('$filename')\\\" onMouseOut=\\\"closebox()\\\"></div>\";\n else if ($ext and $file_exists and !$isImg) $ret=\"<span style='color: gray'>Document $ext</span>\";\n else if ($ext and !$file_exists) $ret=\"<span style='color: gray'>Error $ext</span>\";\n else $ret=\"<span style='color: gray'>Empty</span>\";\n return $ret;\n //die;\n }", "public function addRow($row, $file)\n { }", "function room_cell_html($row, $link)\n{\n $html = '';\n $html .= tdcell(\"row_labels\", 1, array('name' => 'room', 'value' => $row['id']));\n $html .= \"<div class=\\\"celldiv slots1\\\">\\n\";\n $html .= \"<a href=\\\"$link\\\" title=\\\"\" . get_vocab(\"viewweek\") . \" &#10;&#10;\" . $row['description'] . \"\\\">\";\n $html .= htmlspecialchars($row['room_name']) . ($row['capacity'] > 0 ? \"(\".$row['capacity'].\")\" : \"\");\n $html .= \"</a>\\n\";\n $html .= \"</div></td>\\n\";\n return $html;\n}", "function show_cell($which) {\r\n $token = $this->position[$which];\r\n if ($token <> '-') {\r\n $player_board = str_split($this->board); \r\n return '<td style=\"text-align:center;' . ($token != $player_board[$which] ? ' background-color: #FFA500;' : '' ) . '\"><div style=\"padding: 1em;\">' . $token . ($this->debug ? ('<br /><span style=\"font-size:66%;\">' . $which . ':(' . ((int) ($which / $this->grid_size) + 1) . ',' . (($which % $this->grid_size) + 1) . ')</span>') : '') . '</div></td>';\r\n }\r\n $this->newposition = $this->position; \r\n $this->newposition[$which] = 'x'; \r\n $move = implode($this->newposition); \r\n $link = '?size=' . $this->grid_size . '&board=' . $move . ($this->debug ? '&debug' : ''); \r\n return '<td style=\"text-align:center;\"><a href = \"' . $link . '\" style = \"text-decoration: none;\"><div style=\"padding: 1em;\">-' . ($this->debug ? ('<br /><span style=\"font-size:66%;\">' . $which . ':(' . ((int) ($which / $this->grid_size) + 1) . ',' . (($which % $this->grid_size) + 1) . ')</span>') : '') . '</div></a></td>';\r\n }", "public function setCellEdit($val=false)\n {\n $this->_cellEdit = $val;\n }", "public function addElement($h, $icon, $data, $rowParams = '', $_ = '', $_2 = '', $colType = 'td')\n {\n $colType = ($colType === 'th') ? 'th' : 'td';\n $noWrap = $this->no_noWrap ? '' : ' nowrap';\n // Start up:\n $l10nParent = isset($data['_l10nparent_']) ? (int)$data['_l10nparent_'] : 0;\n $out = '\n\t\t<!-- Element, begin: -->\n\t\t<tr ' . $rowParams . ' data-uid=\"' . (int)$data['uid'] . '\" data-l10nparent=\"' . $l10nParent . '\">';\n // Show icon and lines\n if ($this->showIcon) {\n $out .= '\n\t\t\t<' . $colType . ' class=\"col-icon nowrap\">';\n if (!$h) {\n $out .= '&nbsp;';\n } else {\n for ($a = 0; $a < $h; $a++) {\n if (!$a) {\n if ($icon) {\n $out .= $icon;\n }\n }\n }\n }\n $out .= '</' . $colType . '>\n\t\t\t';\n }\n // Init rendering.\n $colsp = '';\n $lastKey = '';\n $c = 0;\n $ccount = 0;\n // __label is used as the label key to circumvent problems with uid used as label (see #67756)\n // as it was introduced later on, check if it really exists before using it\n $fields = $this->fieldArray;\n if ($colType === 'td' && array_key_exists('__label', $data)) {\n $fields[0] = '__label';\n }\n // Traverse field array which contains the data to present:\n foreach ($fields as $vKey) {\n if (isset($data[$vKey])) {\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass && $ccount % 2 == 0) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n $lastKey = $vKey;\n $c = 1;\n $ccount++;\n } else {\n if (!$lastKey) {\n $lastKey = $vKey;\n }\n $c++;\n }\n if ($c > 1) {\n $colsp = ' colspan=\"' . $c . '\"';\n } else {\n $colsp = '';\n }\n }\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n // End row\n $out .= '\n\t\t</tr>';\n // Return row.\n return $out;\n }" ]
[ "0.75593454", "0.7028347", "0.6890411", "0.6387463", "0.634084", "0.622569", "0.6213007", "0.6130754", "0.6100125", "0.6086604", "0.6085811", "0.6024093", "0.58102614", "0.57630736", "0.5714475", "0.5646151", "0.5620156", "0.55966485", "0.5487881", "0.5481717", "0.5329711", "0.52357155", "0.5229268", "0.5221168", "0.5221168", "0.52185726", "0.5208249", "0.5205233", "0.52005255", "0.5176548", "0.51654387", "0.5155808", "0.5152016", "0.5148871", "0.51419145", "0.5097747", "0.50124437", "0.50058454", "0.50036263", "0.50036263", "0.49811178", "0.49601972", "0.49508262", "0.49202555", "0.49015868", "0.48984647", "0.48960838", "0.48913708", "0.48643205", "0.48611695", "0.48602766", "0.48590252", "0.4857846", "0.48543888", "0.48417485", "0.48305494", "0.48285452", "0.48190093", "0.48128614", "0.48116744", "0.48090193", "0.48011082", "0.48011082", "0.478002", "0.47734505", "0.4759523", "0.47397605", "0.4733639", "0.47316483", "0.4718284", "0.47177354", "0.47149923", "0.47070998", "0.47034952", "0.47020012", "0.4699431", "0.46990898", "0.46980494", "0.46980494", "0.46980494", "0.46951452", "0.46934325", "0.4678547", "0.46780893", "0.46671838", "0.46619907", "0.46601638", "0.46487984", "0.46408066", "0.4634104", "0.46318692", "0.46274585", "0.46230036", "0.4619522", "0.4604937", "0.46023163", "0.45993033", "0.45978454", "0.45949847", "0.4582082" ]
0.62312067
5
Add a new action to the row.
public function addAction(Action $action);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addAction($action)\r\n {\r\n $this->_actions[] = $action;\r\n }", "public function addAction() {\r\n\t}", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public function addAction()\n {\n parent::addAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }", "protected function appendActionsColumn()\n {\n// if (!$this->option('useActions')) {\n// return;\n// }\n $this->addColumn('__actions__', trans('admin.action'))\n ->displayUsing(Actions::class, [$this->actionsCallback]);\n }", "protected function appendActionsColumn()\n {\n if (!$this->option('useActions')) {\n return;\n }\n\n $grid = $this;\n $callback = $this->actionsCallback;\n $column = $this->addColumn('__actions__', trans('admin.action'));\n\n $column->display(function ($value) use ($grid, $column, $callback) {\n $actions = new Actions($value, $grid, $column, $this);\n\n return $actions->display($callback);\n });\n }", "protected function column_default_add_action( $item, $column_name, &$actions ) { }", "public function addAction()\n\t{\n\n\t}", "public function setAddAction($action)\n {\n $this->m_addAction = $action;\n }", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "public function addAction(\\NMC\\Migration\\ActionInterface $action)\n {\n $this->actions[] = $action;\n }", "private function add_actions()\n {\n }", "function add_actions()\n {\n }", "function addAction($name, $action){\n\t\t$this->actions[$name] =& $action;\n\t}", "public function addAction()\n {\n $ctrl = $this->dbController->find($this->checkControllerIdParam());\n $action = $this->getRequest()->getParam('actionname', NULL);\n\n IF($action === NULL || $ctrl->count() !== 1) {\n throw new Admin_Model_Acl_Exception('Invalid or no ActionName/ControllerId Parameter given');\n }\n\n $ctrl = new Admin_Model_DbRow_Controller($ctrl->current());\n $form = new Admin_Form_Action_Add($ctrl, $action);\n $form->setAction('/noc/admin/action/add');\n\n IF($this->getRequest()->isPost()) {\n IF($form->isValid($this->getRequest()->getParams())) {\n $actionRow = new Admin_Model_DbRow_Action(array(\n 'mcId' => $ctrl->get('id'),\n 'actionName' => $this->getRequest()->getParam('actionname'),\n 'enabled' => 0,\n 'description' => $this->getRequest()->getParam('description', '')\n ));\n\n $this->dbAction->insert($actionRow->toDbArray());\n $this->_redirect('admin/action/scan/control/' . $ctrl->get('id'));\n\n } ELSE {\n $form->addError('Exexpected error occured');\n }\n }\n\n $this->view->form = $form;\n $this->view->controller = $ctrl;\n }", "public function addActions()\n {\n }", "public function registerAction($action){\r\n\t\t\t\t\r\n\t\t\t$this->_actions[] = $action;\r\n\t\t}", "public function addAction($action)\n {\n if ($action instanceof BaseQualifier) {\n $action = new Action($action);\n }\n\n $this->actions[] = $action;\n\n return $this;\n }", "public function add_action($actions){\r\n\t\t\t$actions[$this->id] = $this->name;\r\n\t\t\treturn $actions;\r\n\t\t}", "private function row_imported( $row, $action = '' ) {\n\t\t$this->imported_rows[] = $row + 1;\n\t\tif ( $action && is_scalar( $action ) ) {\n\t\t\tif ( ! isset( $this->actions[ $action ] ) ) {\n\t\t\t\t$this->actions[ $action ] = 0;\n\t\t\t}\n\t\t\t$this->actions[ $action ]++;\n\t\t}\n\t}", "public function addAction($title, $iconPath, $action, $params = array('id'), $jsFunction = 'listAction', $jsParams = null)\n {\n if (!preg_match('/::/', $action))\n {\n $action = $this->getListControlName() . '::' . $action;\n }\n\n $objAction->icon = $iconPath;\n $objAction->title = $title;\n $objAction->action = $action;\n $objAction->params = $params;\n $objAction->jsFunction = $jsFunction;\n $objAction->jsParams = $jsParams;\n\n $this->actions[] = $objAction;\n }", "public function enqueueActions($action, $type = \"switch\", $text = \"\", $colName = \"\", $attr = array()) {\r\n $this->actions[$this->getRandomKey(false)] = array(\r\n $colName,\r\n $action,\r\n $type,\r\n $text,\r\n $attr\r\n );\r\n return $this;\r\n }", "public function addAction($url_mod, $target_id, $target_name, $action, $description, $creator_id, $creator_username){\n $query = \"INSERT INTO actions VALUES (DEFAULT, '$action', '$url_mod', '$description', '$target_id','$target_name','$creator_id', '$creator_username', DEFAULT)\";\n $db = Db::instance();\n $db->execute($query);\n }", "public function add_action($action, $method, $priority = 10, $accepted_args = 1)\n {\n }", "public function addAction(NonKeyAction $a){\n\t\t$this->_on_click[] = $a;\n\t}", "public function addToActions($actionArray)\n {\n $this->_actions[] = $actionArray;\n }", "public function xadmin_createaction() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$action_title = $args [1];\n\t\t$action_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$action = $this->getModel ( 'action' );\n\t\t$this->session->returnto ( 'actions' );\n\t\t\n\t\t/* create the form */\n\t\t$action->createNewAction ( $action_title, $action_type );\n\t\t\n\t\t$this->loadPluginModel ( 'actions' );\n\t\t$plug = Plugins_Actions::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateAction', $action );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateAction_ExtendDataTable', $action );\n\t\t\n\t\t/* set argument for the edit view */\n\t\t$this->setArguments ( array ($action->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t\n\t\t/* quiet redirect */\n\t\t$this->_redirect ( '_editAction' );\n\t}", "public function setActionOnSelectRow($action)\n {\n $this->_actionOnSelectRow = $action;\n }", "public function addAction($action)\n {\n $this->guardLimitTen();\n /*if($action instanceof Action){\n return $this->actions()->save($action);\n }else if($action instanceof Collection){\n return $this->actions()->saveMany($action);\n } else{ //Assoc Array\n return $this->actions()->create($action);\n }*/\n return $this->actions()->create($action);\n }", "public static function add_action( $action, $method, $args = array() ) {\r\n\r\n\t\tself::$actions[ $action ] = array(\r\n\t\t\t'action' => $action,\r\n\t\t\t'method' => $method,\r\n\t\t\t'args' => $args,\r\n\t\t);\r\n\t}", "public function addModelAction($model, $action, $data = [])\n\t{\n\t\t$this->modelActions[] = [\n\t\t\t'model' => $model,\n\t\t\t'key' => isset($data['key']) ? $data['key'] : null,\n\t\t\t'action' => $action,\n\t\t\t'attributes' => isset($data['attributes']) ? $data['attributes'] : [],\n\t\t\t'changes' => isset($data['changes']) ? $data['changes'] : [],\n\t\t\t'duration' => $duration = isset($data['duration']) ? $data['duration'] : null,\n\t\t\t'time' => isset($data['time']) ? $data['time'] : microtime(true) - ($duration ?: 0) / 1000,\n\t\t\t'query' => isset($data['query']) ? $data['query'] : null,\n\t\t\t'connection' => isset($data['connection']) ? $data['connection'] : null,\n\t\t\t'trace' => isset($data['trace']) ? $data['trace'] : null,\n\t\t\t'file' => isset($data['file']) ? $data['file'] : null,\n\t\t\t'line' => isset($data['line']) ? $data['line'] : null,\n\t\t\t'tags' => isset($data['tags']) ? $data['tags'] : []\n\t\t];\n\t}", "public function addMteAction($action, $title, $cssStyle = ''){\n // Agrego accion\n if(!empty($title) && !empty($action)){\n // Estilos por defecto\n if ($action == mteConst::MTE_ACT_UPDATE){\n $cssStyle = (empty($cssStyle)?'Edit':$cssStyle);\n }\n if ($action == mteConst::MTE_ACT_DELETE){\n $cssStyle = (empty($cssStyle)?'Delete':$cssStyle);\n }\n if ($action == mteConst::MTE_ACT_VIEW){\n $cssStyle = (empty($cssStyle)?'View':$cssStyle);\n }\n $this->_mteActions[] = array('action'=>$action, 'title'=>$title, 'cssStyle'=>$cssStyle);\n }\n }", "public function setAction($action);", "public function setAction($var)\n {\n GPBUtil::checkString($var, True);\n $this->action = $var;\n\n return $this;\n }", "public function addAction(WebDriverAction $action)\n {\n $this->actions[] = $action;\n\n return $this;\n }", "function setAction($action);", "public function addAction(callable $action)\n {\n // Add to the state\n $this->state->addAction($action);\n return $this;\n }", "public function addQuickAction($label, TDataGridAction $action, $field, $icon = NULL)\n {\n $action->setLabel($label);\n if ($icon)\n {\n $action->setImage($icon);\n }\n \n if (is_array($field))\n {\n $action->setFields($field);\n }\n else\n {\n $action->setField($field);\n }\n \n // add the datagrid action\n parent::addAction($action);\n \n return $action;\n }", "function diy_table_action_button($row_data, $field_target = 'id', $current_url, $action, $removed_button = null) {\n\t\t$privileges = session()->all()['privileges']['role'];\n\t\t$path = [];\n\t\t$addActions = [];\n\t\t$add_path = false;\n\t\t$enabledAction = [];\n\t\t$enabledAction['read'] = true;\n\t\t$enabledAction['insert'] = true;\n\t\t$enabledAction['modify'] = true;\n\t\t$enabledAction['delete'] = true;\n\t\t\n\t\t$actions = [];\n\t\tif (in_array(current_route(), $privileges)) {\n\t\t\tforeach ($privileges as $roles) {\n\t\t\t\tif (diy_string_contained($roles, routelists_info()['base_info'])) {\n\t\t\t\t\tif (!in_array(routelists_info($roles)['last_info'], ['index', 'insert', 'update', 'destroy'])) {\n\t\t\t\t\t\t$actions[routelists_info()['base_info']][] = routelists_info($roles)['last_info'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$actionType = [];\n\t\t\t$actionType['custom'] = [];\n\t\t\t$actionType['default'] = $actions[routelists_info()['base_info']];\n\t\t\t\n\t\t\tforeach ($action as $ai => $actval) {\n\t\t\t\tif (in_array($actval, ['index', 'show', 'view', 'create', 'insert', 'add', 'edit', 'update', 'modify', 'delete', 'destroy'])) {\n\t\t\t\t\tunset($action[$ai]);\n\t\t\t\t} else {\n\t\t\t\t\t$actionType['custom'][] = $actval;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$action = array_merge_recursive($actionType['default'], $actionType['custom']);\n\t\t}\n\t\t\n\t\tif (!empty($removed_button)) {\n\t\t\tif (is_array($removed_button)) {\n\t\t\t\t$actionNode = array_flip($action);\n\t\t\t\tforeach ($removed_button as $remove) {\n\t\t\t\t\tif (in_array($remove, ['index', 'show', 'view', 'read'])) {\n\t\t\t\t\t\t$enabledAction['read'] = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!empty($actionNode['view'])) unset($action[$actionNode['view']]);\n\t\t\t\t\t\tif (!empty($actionNode['index'])) unset($action[$actionNode['index']]);\n\t\t\t\t\t\tif (!empty($actionNode['show'])) unset($action[$actionNode['show']]);\n\t\t\t\t\t\t\n\t\t\t\t\t} elseif (in_array($remove, ['create', 'insert', 'add'])) {\n\t\t\t\t\t\t$enabledAction['insert'] = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!empty($actionNode['create'])) unset($action[$actionNode['create']]);\n\t\t\t\t\t\tif (!empty($actionNode['insert'])) unset($action[$actionNode['insert']]);\n\t\t\t\t\t\tif (!empty($actionNode['add'])) unset($action[$actionNode['add']]);\n\t\t\t\t\t\t\n\t\t\t\t\t} elseif (in_array($remove, ['edit', 'update', 'modify'])) {\n\t\t\t\t\t\t$enabledAction['modify'] = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!empty($actionNode['edit'])) unset($action[$actionNode['edit']]);\n\t\t\t\t\t\tif (!empty($actionNode['update'])) unset($action[$actionNode['update']]);\n\t\t\t\t\t\tif (!empty($actionNode['modify'])) unset($action[$actionNode['modify']]);\n\t\t\t\t\t\t\n\t\t\t\t\t} elseif (in_array($remove, ['delete', 'destroy'])) {\n\t\t\t\t\t\t$enabledAction['delete'] = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!empty($actionNode['delete'])) unset($action[$actionNode['delete']]);\n\t\t\t\t\t\tif (!empty($actionNode['destroy'])) unset($action[$actionNode['destroy']]);\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$enabledAction[$removed_button] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add Action Button if the $action parameter above set with array\n\t\tif (is_array($action)) {\n\t\t\tforeach ($action as $action_data) {\n\t\t\t\tif (diy_string_contained($action_data, '|')) {\n\t\t\t\t\t$action_info = diy_add_action_button_by_string($action_data);\n\t\t\t\t\t$addActions[key($action_info)] = $action_info[key($action_info)];\n\t\t\t\t\t$enabledAction[key($action_info)] = true;\n\t\t\t\t} else {\n\t\t\t\t\t$addActions[$action_data] = diy_add_action_button_by_string(\"{$action_data}|default|link\");\n\t\t\t\t\t$enabledAction[$action_data] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\t\t\t\n\t\t\tif (is_string($action)) {\n\t\t\t\tif (diy_string_contained($action, '|')) {\n\t\t\t\t\t$addActions = diy_add_action_button_by_string($action);\n\t\t\t\t} else {\n\t\t\t\t\t$addActions = diy_add_action_button_by_string(\"{$action}|default|link\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Default Action\n\t\t$urlTarget = $row_data->{$field_target};\n\t\t$path['view'] = \"{$current_url}/{$urlTarget}\";\n\t\t$path['edit'] = \"{$current_url}/{$urlTarget}/edit\";\n\t\tif (!empty($row_data->deleted_at)) {\n\t\t\t$path['delete'] = \"{$current_url}/{$urlTarget}/restore_deleted\";\n\t\t} else {\n\t\t\t$path['delete'] = \"{$current_url}/{$urlTarget}/delete\";\n\t\t}\n\t\t\n\t\tif (false === $enabledAction['read']) $path['view'] = false;\n\t\tif (false === $enabledAction['modify']) $path['edit'] = false;\n\t\tif (false === $enabledAction['delete']) $path['delete'] = false;\n\t\t\n\t\tif (count($addActions) >= 1) {\n\t\t\tforeach ($addActions as $action_name => $action_values) {\n\t\t\t\tif (!in_array($action_name, ['show', 'view', 'create', 'edit', 'delete'])) {\n\t\t\t\t\t$add_path[$action_name]['url'] = \"{$current_url}/{$urlTarget}/{$action_name}\";\n\t\t\t\t\tif (is_array($action_values)) {\n\t\t\t\t\t\tforeach ($action_values as $actionKey => $actionValue) {\n\t\t\t\t\t\t\tif ($actionKey === $action_name) {\n\t\t\t\t\t\t\t\t$add_path[$action_name] = $actionValue;\n\t\t\t\t\t\t\t\t$add_path[$action_name]['url'] = \"{$current_url}/{$urlTarget}/{$action_name}\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$add_path[$action_name][$actionKey] = $actionValue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn create_action_buttons($path['view'], $path['edit'], $path['delete'], $add_path);\n\t}", "public function addIfNotExists(string $action): self\n {\n if (! $this->actions->contains($action)) {\n $this->actions->push($action);\n }\n\n return $this;\n }", "public function addAction()\n {\n return $this->editor($isEditAction=false);\n }", "public function addNode($node, $action = self::NODE_ADD);", "public function add(Action $action) {\r\n\t\t$stmt = $this->db->prepare(\"INSERT INTO accion(id_accion, nombre) values (?,?)\"); \r\n\t\t$stmt->execute(array($action->getCodaction(), $action->getActionname()));\r\n\r\n\t\treturn $this->db->lastInsertId();\r\n\t}", "public function addAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }", "public function annimalAddAction()\n {\n }", "public function rowsAction() {\n parent::rowsAction();\n }", "protected function row_actions($actions, $always_visible = \\false)\n {\n }", "public function crudAddAction($actionName, $colName, $displayVal = array(), $applyVal = array()) {\r\n $this->curdAddActionBtn[$colName] = array(\"actionName\" => $actionName, \"displayVal\" => $displayVal, \"applyVal\" => $applyVal);\r\n return $this;\r\n }", "public function addActionColumn($name, $caption = NULL, $setAsCurrent = TRUE)\n\t{\n\t\t$column = new ActionColumn($caption);\n\n\t\tif ($setAsCurrent) {\n\t\t\t$this->setCurrentActionColumn($column);\n\t\t}\n\t\treturn $this[$name] = $column;\n\t}", "public function action(int $action)\n {\n $this->_parts['action'] = $action;\n\n return $this;\n }", "public function handles(Action $action)\n {\n $this->actions[] = $action;\n }", "public function action(string $action): self;", "public function addAction(Action $l)\n {\n if ($this->collActions === null) {\n $this->initActions();\n $this->collActionsPartial = true;\n }\n if (!in_array($l, $this->collActions->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddAction($l);\n }\n\n return $this;\n }", "public function setActionOnDblClickRow($action)\n {\n $this->_actionOnDblClickRow = $action;\n }", "public function addAction($key, $value)\n {\n if (!is_array($value)) {\n $value = array($value);\n }\n\n $actions = $this->getActions();\n $actions[] = array(\n 'key' => $key,\n 'value' => $value,\n );\n\n Mage::getSingleton('core/session')->setAdabraTracking($actions);\n\n return $this->getActions();\n }", "public function addAction(AdaptiveCardAction $action)\n {\n if (!isset($this->actions)) {\n $this->actions = [];\n }\n\n $this->actions[] = $action;\n\n return $this;\n }", "function add() \n {\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n \n // Render the action with template\n $this->renderWithTemplate('users/add', 'AdminPageBaseTemplate');\n }", "public function setAction(callable $action);", "public function setAction($value)\n {\n $this->action = $value;\n }", "public function addAction() {\n\t\t$this->_forward('edit', null, null, array('id' => 0, 'model' => $this->_getParam('model')));\n\t}", "function add_action($tag = '', $function_to_add = '', $priority = 10, $accepted_args = 1)\n {\n }", "function addInstallAction(&$node) {\n\t\t$fileName = $node->getAttribute('file');\n\n\t\tif (!isset($fileName)) {\n\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => null, 'attr' => $node->getAttributes());\n\n\t\t} else if (strstr($fileName, '{$installedLocale}')) {\n\t\t\t// Filename substitution for locales\n\t\t\tforeach ($this->installedLocales as $thisLocale) {\n\t\t\t\t$newFileName = str_replace('{$installedLocale}', $thisLocale, $fileName);\n\t\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => $newFileName, 'attr' => $node->getAttributes());\n\t\t\t}\n\n\t\t} else {\n\t\t\t$newFileName = str_replace('{$locale}', $this->locale, $fileName);\n\t\t\tif (!file_exists($newFileName)) {\n\t\t\t\t// Use version from default locale if data file is not available in the selected locale\n\t\t\t\t$newFileName = str_replace('{$locale}', INSTALLER_DEFAULT_LOCALE, $fileName);\n\t\t\t}\n\n\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => $newFileName, 'attr' => $node->getAttributes());\n\t\t}\n\t}", "public function setAction($action)\n {\n $this->action = $action . 'Action';\n return $this;\n }", "public function action(Action $action);", "public function add_action( $action_name, $callback ){\n if ( !isset(self::$actions[$action_name]) ) {\n self::$actions[$action_name] = array();\n }\n self::$actions[$action_name][] = $callback;\t\n }", "public function action(){\n\t\t\t$this->__switchboard('action');\n\t\t}", "function add_actions($item) {\n $actions = array(\n 'xpprove' => sprintf('<a href=\"?page=%s&action=%s&active=%d&id=%s\">Approve</a>',$_REQUEST['page'],'approve',$item->active,$item->ID),\n 'reject' => sprintf('<a href=\"?page=%s&action=%s&active=%d&id=%s\">Reject</a>',$_REQUEST['page'],'reject',$item->active,$item->ID),\n );\n if ( strcmp( $item->display_name,$item->user_login ) == 0 ) {\n return sprintf('%1$s %2$s', $item->user_login, $this->row_actions($actions) );\n } else {\n return sprintf('%1$s %2$s', $item->user_login.' ['.$item->display_name.'; ID '.$item->userID.']', $this->row_actions($actions) );\n }\n }", "public function action($action)\n {\n $this->attributes->establish(ActionAttribute::class)->setValue($action);\n return $this;\n }", "public function action($action = null, $additional_message = null) {\n\t\t\tglobal $user;\n\t\t\t\n\t\t\t// Define the SQL to be used to make changes to the database\n\t\t\t$sql = '\n\t\t\t\tINSERT INTO logs ( \n\t\t\t\t\tdatetime, \n\t\t\t\t\taction, \n\t\t\t\t\turl, \n\t\t\t\t\tuser, \n\t\t\t\t\tip, \n\t\t\t\t\tuser_agent \n\t\t\t\t) VALUES ( \n\t\t\t\t\t:datetime, \n\t\t\t\t\t:action, \n\t\t\t\t\t:url, \n\t\t\t\t\t:user, \n\t\t\t\t\t:ip, \n\t\t\t\t\t:user_agent \n\t\t\t\t)\n\t\t\t';\n\t\t\t\n\t\t\t// Begin a prepared statement using the previous $sql\n\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\n\t\t\t// Bind values to the prepared statement\n\t\t\t$datetime = $this->current_mysql_datetime();\n\t\t\t$stmt->bindParam(':datetime', $datetime);\n\t\t\t$action = $this->get_action($action, $additional_message);\n\t\t\t$stmt->bindParam(':action', $action);\n\t\t\t$url = site_url() . $_SERVER['REQUEST_URI'];\n\t\t\t$stmt->bindParam(':url', $url);\n\t\t\t$name = $user->username ? $user->name . ' [' . $user->username . ']' : 'Unknown';\n\t\t\t$stmt->bindParam(':user', $name);\n\t\t\t$stmt->bindParam(':ip', $_SERVER['REMOTE_ADDR']);\n\t\t\t$stmt->bindParam(':user_agent', $_SERVER['HTTP_USER_AGENT']);\n\t\t\t\n\t\t\t// Execute the prepared statement\n\t\t\t$result = $stmt->execute();\n\t\t\t\n\t\t\t// Check if successful\n\t\t\tif($result) {\n\t\t\t\t// Insert successful\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// Insert failed\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function addRow(TableRow $row);", "public function testAddActionAdds()\n {\n // another time perhaps\n }", "private function installActions()\n {\n $actions = array(\n array(\n 'class' => RETS_RABBIT_V2_NAME,\n 'method' => 'run_search'\n ),\n );\n\n ee()->db->insert_batch('actions', $actions);\n }", "public function add_action( $hook, $callback, $priority = 10, $accepted_args = 1 ) {\n\t\t$this->actions[] = compact( 'hook', 'callback', 'priority', 'accepted_args' );\n\t}", "function add_action($hook, $functionname, $priority = plugin_default_priority){\n\tglobal $actions;\n\t$actions[$hook][] = ['name' => $functionname, 'priority' => $priority];\n}", "private function undo_add_action($action, $id, $id_parent, $id_parent_prev) {\n global $db, $uid;\n $undo_node = array();\n $undo_node[\"ACTION\"] = mysql_escape_string($action);\n $undo_node[\"FK_KAT\"] = (int)$id;\n $undo_node[\"FK_PARENT\"] = (int)$id_parent;\n $undo_node[\"FK_PARENT_PREV\"] = (int)$id_parent_prev;\n $undo_node[\"FK_USER\"] = (int)$uid;\n if ($db->update($this->table.\"_undo\", $undo_node)) {\n return true;\n } else {\n $this->error = \"ERR_UNDO_ADD\";\n return false;\n }\n }", "function set_action($action)\r\n {\r\n return $this->set_parameter(self :: PARAM_ACTION, $action);\r\n }", "protected function _setAddEditAction($action)\n {\n $this->_addEditAction = $action;\n\n return $this;\n }", "public function getAddAction()\n {\n return $this->m_addAction;\n }", "public function setAction($val)\n {\n $this->_propDict[\"action\"] = $val;\n return $this;\n }", "protected function createAction()\n {\n }", "public function setAction(?string $action) {\n $this->action = $action;\n return $this;\n }", "protected function newAction() : void\n {\n $this->newAction\n ->execute($this, RoleEntity::class, RoleActionEvent::class, __METHOD__);\n }", "public function set_action($action) {\n $this->_action = (string)$action;\n }", "public function setAction($action = '')\n {\n $this->action = $action;\n }", "public function newAction()\n {\n\n return parent::newAction();\n\n\n }", "private function setAction()\n\t\t{\n\t\t\t$this->_action = ($this->_separetor[2]);\n\t\t}", "public function register_actions() {\n\t\t}", "public function page_row_actions($actions, $post)\n {\n }", "public function setAction(?string $action): self\n {\n $this->action = $action;\n\n return $this;\n }", "public function setAction($action) {\n\t\t$this->action = $action;\n\t}", "public function addClickAction(NonKeyAction $a){\n\t\tparent::addClickAction($a);\n\t\t$this->_year->addClickAction($a);\n\t\t$this->_month->addClickAction($a);\n\t\t$this->_day->addClickAction($a);\n\t\t$this->_dow->addClickAction($a);\n\t}", "public function setAction( $action )\n\t{\n\t\t$this->setAttribute( \"action\", $action );\n\t}", "function addCdtActionFunction(CdtActionFunction $oCdtActionFunction) ;" ]
[ "0.7048781", "0.6678837", "0.65977454", "0.65977454", "0.65977454", "0.65888506", "0.6512476", "0.65097797", "0.6448389", "0.6434616", "0.64128155", "0.6382317", "0.6382317", "0.6382317", "0.6382317", "0.6382317", "0.6382317", "0.6370423", "0.63322836", "0.6303879", "0.62719715", "0.6172477", "0.61272424", "0.61252093", "0.60551745", "0.59999466", "0.5968626", "0.5968017", "0.5965306", "0.5903022", "0.5900601", "0.58915925", "0.58633256", "0.585095", "0.58176416", "0.57757145", "0.57545686", "0.5744459", "0.57226294", "0.5687181", "0.568489", "0.56836647", "0.5680723", "0.567481", "0.56572676", "0.5655762", "0.56491643", "0.55892307", "0.55881476", "0.5581731", "0.5573078", "0.55670583", "0.5557614", "0.55494136", "0.5547956", "0.5540709", "0.5529403", "0.552536", "0.5519779", "0.5511313", "0.55040145", "0.5503599", "0.5499865", "0.5486727", "0.5480959", "0.5467954", "0.54608214", "0.5457635", "0.545757", "0.543061", "0.54297155", "0.54155463", "0.540944", "0.5407411", "0.53841823", "0.5382859", "0.5377753", "0.53551906", "0.5352881", "0.5352788", "0.5326955", "0.5314693", "0.5312523", "0.53115094", "0.5309931", "0.52858186", "0.52834666", "0.5282537", "0.5281235", "0.52744985", "0.52703655", "0.5269693", "0.5266221", "0.52639776", "0.5259202", "0.525075", "0.524246", "0.5241961", "0.52392924", "0.5235497" ]
0.7104265
0
Alias for the addAction method.
public function action(Action $action);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addAction() {\r\n\t}", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public function addAction(Action $action);", "public function addAction()\n\t{\n\n\t}", "public function addAction()\n {\n parent::addAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }", "function addAction($action)\r\n {\r\n $this->_actions[] = $action;\r\n }", "function addAction($name, $action){\n\t\t$this->actions[$name] =& $action;\n\t}", "public function addActions()\n {\n }", "public function add_action($action, $method, $priority = 10, $accepted_args = 1)\n {\n }", "function add_actions()\n {\n }", "public function annimalAddAction()\n {\n }", "private function add_actions()\n {\n }", "function add_action($tag = '', $function_to_add = '', $priority = 10, $accepted_args = 1)\n {\n }", "public function setAddAction($action)\n {\n $this->m_addAction = $action;\n }", "public function getAddAction()\n {\n return $this->m_addAction;\n }", "public function addAction()\n {\n return $this->editor($isEditAction=false);\n }", "function add_action($hook_name, $callback, $priority = 10, $accepted_args = 1)\n {\n }", "public function registerAction($action){\r\n\t\t\t\t\r\n\t\t\t$this->_actions[] = $action;\r\n\t\t}", "function add_action($name, $function, $priority=10){\n return Plugins::instance()->add_action($name, $function, $priority);\n}", "public function addAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }", "public function addAction()\n {\n $ctrl = $this->dbController->find($this->checkControllerIdParam());\n $action = $this->getRequest()->getParam('actionname', NULL);\n\n IF($action === NULL || $ctrl->count() !== 1) {\n throw new Admin_Model_Acl_Exception('Invalid or no ActionName/ControllerId Parameter given');\n }\n\n $ctrl = new Admin_Model_DbRow_Controller($ctrl->current());\n $form = new Admin_Form_Action_Add($ctrl, $action);\n $form->setAction('/noc/admin/action/add');\n\n IF($this->getRequest()->isPost()) {\n IF($form->isValid($this->getRequest()->getParams())) {\n $actionRow = new Admin_Model_DbRow_Action(array(\n 'mcId' => $ctrl->get('id'),\n 'actionName' => $this->getRequest()->getParam('actionname'),\n 'enabled' => 0,\n 'description' => $this->getRequest()->getParam('description', '')\n ));\n\n $this->dbAction->insert($actionRow->toDbArray());\n $this->_redirect('admin/action/scan/control/' . $ctrl->get('id'));\n\n } ELSE {\n $form->addError('Exexpected error occured');\n }\n }\n\n $this->view->form = $form;\n $this->view->controller = $ctrl;\n }", "function add_action($hook, $functionname, $priority = plugin_default_priority){\n\tglobal $actions;\n\t$actions[$hook][] = ['name' => $functionname, 'priority' => $priority];\n}", "abstract function allowAddAction();", "private function add_action( $tag = NULL, $method = NULL, $priority = 10, $accepted_args = NULL ) {\n\t\t\n\t\tif( isset($tag,$method) ) {\n\t\t\t//Check that action has not already been added\n\t\t\t\tadd_action( $tag, array(&$this, $method), $priority, $accepted_args );\n\t\t}\n\t\t\n\t}", "public function testAddActionAdds()\n {\n // another time perhaps\n }", "public function addAction() {\n\t\t$this->_forward('edit', null, null, array('id' => 0, 'model' => $this->_getParam('model')));\n\t}", "public function addAction($title, $iconPath, $action, $params = array('id'), $jsFunction = 'listAction', $jsParams = null)\n {\n if (!preg_match('/::/', $action))\n {\n $action = $this->getListControlName() . '::' . $action;\n }\n\n $objAction->icon = $iconPath;\n $objAction->title = $title;\n $objAction->action = $action;\n $objAction->params = $params;\n $objAction->jsFunction = $jsFunction;\n $objAction->jsParams = $jsParams;\n\n $this->actions[] = $objAction;\n }", "public static function add_action( $action, $method, $args = array() ) {\r\n\r\n\t\tself::$actions[ $action ] = array(\r\n\t\t\t'action' => $action,\r\n\t\t\t'method' => $method,\r\n\t\t\t'args' => $args,\r\n\t\t);\r\n\t}", "public function add_action( $hook, $callback, $priority = 10, $accepted_args = 1 ) {\n\t\t$this->actions[] = compact( 'hook', 'callback', 'priority', 'accepted_args' );\n\t}", "function setAction($action);", "public function addAction(NonKeyAction $a){\n\t\t$this->_on_click[] = $a;\n\t}", "function Core_AddAction( $hookName, $function )\n{\n\tCore_ModuleManager::getInstance()->dispatcher->addObserver( $function, $hookName );\n}", "public function setAction($action);", "public function add_action($actions){\r\n\t\t\t$actions[$this->id] = $this->name;\r\n\t\t\treturn $actions;\r\n\t\t}", "public function register_actions() {\n\t\t}", "public function action(string $action): self;", "public function newAction()\n {\n\n return parent::newAction();\n\n\n }", "function add_action($actionname, $function, $params = array(), $priority = 10){\r\tglobal $actions;\r\t$actions[$actionname][$function] = array(\r\t\"name\" => $function,\r\t\"parameter\" => $params,\r\t\"priority\" => $priority\r\t);\r\t$actions[$actionname] = array_reverse($actions[$actionname]);\r\tuasort($actions[$actionname], 'action_sort');\r}", "public function addAction(\\NMC\\Migration\\ActionInterface $action)\n {\n $this->actions[] = $action;\n }", "public function addAction($action)\n {\n $this->guardLimitTen();\n /*if($action instanceof Action){\n return $this->actions()->save($action);\n }else if($action instanceof Collection){\n return $this->actions()->saveMany($action);\n } else{ //Assoc Array\n return $this->actions()->create($action);\n }*/\n return $this->actions()->create($action);\n }", "public function add_action( $hook, $component, $callback, $priority = 10, $acc_args = 1 ) {\n\t\t$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $acc_args );\n\t}", "public function newAction() {\n\t}", "public function newAction()\n {\n }", "public function newAction()\n\t{\n\t}", "public function setAction(callable $action);", "public function newAction() {\n\n\t}", "public function addAction(callable $action)\n {\n // Add to the state\n $this->state->addAction($action);\n return $this;\n }", "public function addAction(Action $l)\n {\n if ($this->collActions === null) {\n $this->initActions();\n $this->collActionsPartial = true;\n }\n if (!in_array($l, $this->collActions->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddAction($l);\n }\n\n return $this;\n }", "public function addToActions($actionArray)\n {\n $this->_actions[] = $actionArray;\n }", "function add() \n {\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n \n // Render the action with template\n $this->renderWithTemplate('users/add', 'AdminPageBaseTemplate');\n }", "public function add_action( $action_name, $callback ){\n if ( !isset(self::$actions[$action_name]) ) {\n self::$actions[$action_name] = array();\n }\n self::$actions[$action_name][] = $callback;\t\n }", "public function actionAdd(){\r\n \r\n }", "public static function addAction($action, $params = array(), $options = array())\n\t{\n\t\t$link = new SitemapURL(action($action, $params), $options);\n\t\tarray_push(static::$links, $link);\n\t}", "public function action($strAction = \"\") {\r\n if ($strAction == \"\")\r\n $strActionName = $this->getAction();\r\n else\r\n $strActionName = $strAction;\r\n\r\n $this->strOriginalAction = $strActionName;\r\n\r\n if(!$this->checkMethodExistsInConcreteClass(\"action\".ucfirst($strActionName))) {\r\n\r\n foreach(self::$arrActionNameMapping as $strAutoMatchAction => $strAnnotation) {\r\n $this->autoMatchAction($strAutoMatchAction, $strAnnotation, $strActionName);\r\n }\r\n }\r\n\r\n return parent::action($strActionName);\r\n }", "protected function createAction()\n {\n }", "public function addAction(WebDriverAction $action)\n {\n $this->actions[] = $action;\n\n return $this;\n }", "public function addAction($action)\n {\n if ($action instanceof BaseQualifier) {\n $action = new Action($action);\n }\n\n $this->actions[] = $action;\n\n return $this;\n }", "protected function action( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {\n\t\treturn \\add_action( $tag, [ $this, $function_to_add ], $priority, $accepted_args );\n\t}", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "function addCdtActionFunction(CdtActionFunction $oCdtActionFunction) ;", "public function addNode($node, $action = self::NODE_ADD);", "public function add($_action) {\n\t\tif(is_callable($_action)) {\n\t\t\t$this->middlewares[] = $_action;\n\t\t\treturn $this;\n\t\t}\n\t\telse {\n\t\t\tthrow new \\Exception(\"Incorrect action. Type function expected.\");\n\t\t\thttp_response_code(500);\n\t\t}\n\t\treturn $this;\n\t}", "public function setDefaultAction($actionName);", "public function createAction() {\n\t}", "public function setAction($name)\n {\n return $this->action = $name;\n }", "function add_field_action($tag = '', $function_to_add = '', $priority = 10, $accepted_args = 1)\n {\n }", "public function addMteAction($action, $title, $cssStyle = ''){\n // Agrego accion\n if(!empty($title) && !empty($action)){\n // Estilos por defecto\n if ($action == mteConst::MTE_ACT_UPDATE){\n $cssStyle = (empty($cssStyle)?'Edit':$cssStyle);\n }\n if ($action == mteConst::MTE_ACT_DELETE){\n $cssStyle = (empty($cssStyle)?'Delete':$cssStyle);\n }\n if ($action == mteConst::MTE_ACT_VIEW){\n $cssStyle = (empty($cssStyle)?'View':$cssStyle);\n }\n $this->_mteActions[] = array('action'=>$action, 'title'=>$title, 'cssStyle'=>$cssStyle);\n }\n }", "public function handles(Action $action)\n {\n $this->actions[] = $action;\n }", "public function actionAdd()\n\t{\n\t\t$this->render('add');\n\t}", "public function addIfNotExists(string $action): self\n {\n if (! $this->actions->contains($action)) {\n $this->actions->push($action);\n }\n\n return $this;\n }", "public function addAction($hook, $callback, $priority = 10, $acceptedArgs = 1)\n {\n $this->hookLoader->addAction($hook, $this, $callback, $priority, $acceptedArgs);\n }", "function Piwik_AddAction( $hookName, $function )\n{\n\tPiwik_PluginsManager::getInstance()->dispatcher->addObserver( $function, $hookName );\n}", "public function addAction($url_mod, $target_id, $target_name, $action, $description, $creator_id, $creator_username){\n $query = \"INSERT INTO actions VALUES (DEFAULT, '$action', '$url_mod', '$description', '$target_id','$target_name','$creator_id', '$creator_username', DEFAULT)\";\n $db = Db::instance();\n $db->execute($query);\n }", "protected function addAction($hook, $callback, $priority = 10, $args = 1)\n\t{\n\t\tswitch ( Stringify::lowercase($hook) ) {\n\t\t\tcase 'head':\n\t\t\t\t$hook = 'wp_head';\n\t\t\t\tbreak;\n\t\t\tcase 'body':\n\t\t\t\t$hook = 'wp_body_open';\n\t\t\t\tbreak;\n\t\t\tcase 'footer':\n\t\t\t\t$hook = 'wp_footer';\n\t\t\t\tbreak;\n\t\t\tcase 'content':\n\t\t\t\t$hook = 'the_content';\n\t\t\t\tbreak;\n\t\t}\n\t\treturn add_action($hook,$callback,$priority,$args);\n\t}", "protected function add_action( $tag, $method = '', $priority = 10, $accepted_args = 1 ) {\n\t\tadd_action(\n\t\t\t$tag,\n\t\t\t$this->get_callback( $tag, $method ),\n\t\t\t$priority,\n\t\t\t$accepted_args\n\t\t);\n\n\t\treturn $this;\n\t}", "public function add(ActionCollectionInterface $actionCollection)\n {\n $this->actionCollections[$actionCollection->getName()] = $actionCollection;\n }" ]
[ "0.8572171", "0.85700226", "0.85700226", "0.85700226", "0.84821975", "0.8360767", "0.78019094", "0.7735769", "0.7654127", "0.74775445", "0.74642897", "0.7377014", "0.7310956", "0.7284814", "0.71925026", "0.715849", "0.7151677", "0.7040616", "0.6988787", "0.6947414", "0.69096464", "0.6869371", "0.6833197", "0.68168634", "0.6813403", "0.67857045", "0.6729786", "0.6699085", "0.66657925", "0.66590804", "0.6627163", "0.6613579", "0.6540093", "0.65284806", "0.6526683", "0.6502071", "0.64970833", "0.6470255", "0.6469979", "0.6454494", "0.6454109", "0.6445367", "0.6408369", "0.63807815", "0.6339731", "0.6338545", "0.63218653", "0.63103664", "0.6309059", "0.6298104", "0.6294885", "0.6281501", "0.6276607", "0.6274047", "0.6268148", "0.6251732", "0.62476563", "0.6242839", "0.62296903", "0.6225055", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.622185", "0.6215411", "0.62034464", "0.6193907", "0.6188424", "0.6181538", "0.61800617", "0.6173843", "0.61618215", "0.6151622", "0.614075", "0.612716", "0.61050195", "0.60977876", "0.6069887", "0.6063681", "0.60516167", "0.60273373" ]
0.67180836
27
Return the row cells.
public function getCells();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCells()\n {\n return $this->cells;\n }", "public function cells();", "public function rows() {\n\t\treturn $this->row();\n\t}", "public function getRows();", "public function getRows();", "public function getCells()\r\n {\r\n return $this->cells ?: $this->cells = new \\Doctrine\\Common\\Collections\\ArrayCollection();\r\n }", "abstract protected function getRows();", "public function getRow() {}", "public function getRow();", "public function getCellValues()\n {\n return $this->get('CellValues');\n }", "public function getRows()\n {\n return $this->rows;\n }", "public function getRows()\n {\n return $this->rows;\n }", "public function getCell()\n {\n return $this->cell;\n }", "function getRows() {\n\t\treturn $this->rows;\n\t}", "public function get_row();", "public function getRows ()\n {\n return $this->_rows;\n }", "public function get_rows() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->rows = $this->get_array();\n\t\t\t// Take out the header\n\t\t\tarray_shift($this->rows);\n\t\t}\n\t\telse {\n\t\t\treset($this->rows);\n\t\t}\n\t\treturn $this->rows;\n\t}", "function getRows() { return $this->_rows; }", "public function getRows()\n {\n return $this->_rows;\n }", "public function getRows()\n {\n return 1;\n }", "public function get_rows() {\n return $this->rows;\n }", "public function getRows()\n {\n if (is_null($this->summaryRow)) {\n return $this->rows;\n } else {\n return $this->rows + array(self::ID_SUMMARY_ROW => $this->summaryRow);\n }\n }", "public function getRow()\n {\n return $this->row;\n }", "public function getCellsRead() : array\n {\n\n return $this->cellsRead;\n }", "public function rows() {\n return $this->schema->rows;\n }", "abstract public function getRow();", "abstract public function getRow();", "public function getIterateOnlyExistingCells()\n {\n return $this->_onlyExistingCells;\n }", "function getCalculatedRows();", "public function getColumns(){\n $rows = array();\n return $rows; \n }", "public function getRow()\n {\n return $this->row;\n }", "abstract public function get_rows();", "public function getRows()\n\t{\n\t\treturn $this->driver->getRows();\n\t}", "public function getRows()\n\t{\n\t\t$ret = null;\n\t\tif ($this->_tbody instanceof HtmlElement) {\n\t\t\t$ret = $this->_tbody->getElements();\n\t\t}\n\t\treturn $ret;\n\t}", "public function getRow(){\n return $this->_row;\n }", "public function get_rows()\n {\n $lock = !empty($this->configs['rows_edit']) && $this->configs['rows_edit'] == 1 ? true : false;\n\n $tables = $this->file->sheets->first()->tables;\n\n list($query, $power) = $this->get_rows_query($tables);\n\n $head = $tables[0]->columns->map(function($column) { return 'C' . $column->id; })->toArray();\n\n if (Input::has('search.text') && Input::has('search.column_id')) {\n $query->where('C' . Input::get('search.column_id'), Input::get('search.text'));\n }\n\n $query->whereNull('deleted_at')->select($head)->addSelect('id');\n\n $paginate = $this->isCreater()\n ? $query->addSelect('created_by')->paginate(15)\n : $query->where('created_by', $this->user->id)->paginate(15);\n\n $encrypts = $tables[0]->columns->filter(function($column) { return $column->encrypt; });\n\n if (!$encrypts->isEmpty()) {\n $paginate->getCollection()->each(function($row) use($encrypts) {\n $this->setEncrypts($row, $encrypts);\n });\n }\n return ['paginate' => $paginate->toArray(),'lock' => $lock];\n }", "public function getRow()\n {\n return $this->get('Row');\n }", "protected function calculateRowsAndColumns() {}", "function getElements() {\n return $this->rows_object;\n }", "public function getRowRanges()\n {\n return $this->row_ranges;\n }", "public function getAllRows()\n\t{\n\t\treturn $this->foundRows;\n\t}", "public function getCells(): array\n {\n $matrix = [];\n\n foreach ($this->cells as $x => $cellY)\n {\n foreach ($cellY as $y => $cellX)\n {\n $matrix[$x][$y] = $this->cells[$x][$y]->imAlive();\n }\n }\n\n return $matrix;\n }", "public function tableRows(){\n\t\t$this->tableRows = $this->responseRows->length;\n\t\treturn $this->tableRows;\n\t}", "public static function getRowsArray(): array {\n return range('A', 'J');\n }", "protected function tableRows()\n {\n $tbody = DB::table($this->argument('table'))->get();\n\n return $tbody->map(function ($field) {\n return $this->selectRowByField($field);\n });\n }", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "public function getEntries()\n {\n $rows = array();\n // dd($this->xml->entry->asXml()); // <- TO GET XML\n\n if(count($this->xml->entry) > 0) {\n // d($this->xml); // <- NOT GETTING EMPTY CELLS\n\n $colNames = $this->getColumnNames($this->xml);\n // dd($colNames);\n // dd($this->xml);\n\n\n foreach ($this->xml->entry as $entry) {\n $cols = $entry->xpath('gsx:*');\n // dd($cols);\n\n $vals = array();\n foreach($cols as $col) {\n // dd($col); // <- THIS DISPLAYS\n // var_dump((string) $col);\n\n // if (is_null($col) || $col == '' || $col === '' || !isset($col)) {\n // // $col = ' ';\n // $vals[] = ' ';\n // } else {\n $vals[] = $col->__toString();\n // }\n }\n // dd($vals); // <- THIS HAS THE VALUES YOU WANT\n // d($entry);\n // dd($colNames);\n // d($vals); <- ROWS (in a basic array form)\n $rows[] = new ListEntry($entry, array_combine($colNames, $vals));\n\n }\n }\n // dd($rows);\n return $rows;\n }", "public function getCells($gameid) {\n\n $sql =<<<SQL\nSELECT * \nFROM $this->tableName \nWHERE gameid=?\nSQL;\n\n $pdo = $this->pdo();\n $statement = $pdo->prepare($sql);\n $statement->execute([$gameid]);\n\n $cells = [];\n\n foreach($statement as $row) {\n $cells[] = new Cell($row);\n }\n\n return $cells;\n\n }", "function Event_Config_Cell_Rows($group,$text,$class)\n {\n return\n array\n (\n array\n (\n $this->Event_Config_Cell($group,$text,$class),\n \"\"\n ),\n );\n }", "public function get() {\n\t\treturn $this->rows[$this->rowIndex];\n\t}", "function GetRow()\n {\n return $this->row;\n }", "public function getRowsContainer()\n\t{\n\t\treturn $this->_tbody;\n\t}", "abstract protected function getRowsHeader(): array;", "public function getRowCount();", "public function getRows($rows){\n\t\treturn $this->rows;\n\t}", "public function getData()\n {\n return $this->rowData;\n }", "private function extractRows()\n {\n $this->setHeader($this->temp);\n $this->setRows($this->temp);\n }", "public function enumerate_values_table_row(){\n\t\treturn \"\n\t\t\t<tr>\n\t\t\t\t<td>$this->avg_reaction_time_m_no_faces</td> \n\t\t\t\t<td>$this->accuracy_m_no_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_m_faces</td> \n\t\t\t\t<td>$this->accuracy_m_faces</td> \n\n\t\t\t\t<td>$this->avg_reaction_time_aba_no_faces</td> \n\t\t\t\t<td>$this->accuracy_aba_no_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_aba_faces</td> \n\t\t\t\t<td>$this->accuracy_aba_faces</td> \n\n\t\t\t\t<td>$this->avg_reaction_time_faces</td> \n\t\t\t\t<td>$this->accuracy_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_no_faces</td> \n\t\t\t\t<td>$this->accuracy_no_faces</td> \n\t\t\t</tr>\n\t\t\";\n\t}", "public function getRowValues()\n {\n return array(\n $this->getUsdModifier(),\n $this->getEurModifier(),\n $this->getPlnModifier()\n );\n }", "private function createCells($data){\r\n $html = '';\r\n foreach ($data AS $index => $row) {\r\n $html .= '<tr class=\"ctable-rows\">';\r\n foreach ($row as $rownr => $data) {\r\n $html .= '<td>' . $data . '</td>';\r\n }\r\n $html .= '</tr>';\r\n }\r\n return $html;\r\n }", "public function getSelectedCells() {\n\t\treturn $this->getActiveSheet()->getSelectedCells();\n\t}", "public function getRows() : int\n {\n return $this->x;\n }", "public function getFoundRows();", "protected function RenderTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $records = array();\n $records[] = $this->m_RecordRow->RenderColumn();\n $counter = 0;\n while (true) {\n if ($this->m_Range != null && $this->m_Range > 0 && $counter > $this->m_Range)\n break;\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n if (!$arr)\n break;\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $records[] = $tblRow;\n $counter++;\n }\n return $records;\n }", "public function get_rows()\n\t{\n//\t\t$rows = new object_list($this->connections_from(array(\"type\" => \"RELTYPE_CHILD\", \"to.class_id\" => crm_bill_row_obj::CLID)));\n\t\t$rows = new object_list(array(\n\t\t\t\"class_id\" => crm_bill_row_obj::CLID,\n\t\t\t\"CL_CRM_BILL_ROW.RELTYPE_CHILD(CL_CRM_BILL_ROW_GROUP).oid\" => $this->id(),\n\t\t\tnew obj_predicate_sort(array(\"jrk\" => \"asc\")),\n\t\t));\n\t\treturn $rows;\n\t}", "public function getData_row()\n {\n return $this->data_row;\n }", "abstract public function getRowAsArray();", "function GetRows()\n {\n $arr = [];\n for ($i = 0, mysqli_data_seek($this->rs, 0); $this->Next(); $i++) $arr[$i] = $this->row;\n return $arr;\n }", "public function asRow() {\n\t\treturn $this->_sth->fetchAll(PDO::FETCH_NUM);\n\t}", "function getRowHtml()\r\n\t{\r\n\t // Failsafe if i18n is not loaded\r\n\t if(! function_exists('__'))\r\n\t Misc::use_helper('I18N');\r\n\r\n\t if ($this->showGeenResultaten && ($this->rowCount == 0)) {\r\n\t\t $html = \" <td colspan='$this->colCount'>\" . __('Geen resultaten') . \"</td>\\n\";\r\n\t\t}\r\n\t\telse $html = $this->rowDataHtml;\r\n\r\n\t\treturn $html;\r\n\t}", "public function display_rows()\n {\n }", "public function display_rows()\n {\n }", "public function row($cells = null, $options = []) {\r\n\t\tif (empty($options)) {\r\n\t\t\t$options = true;\r\n\t\t}\r\n\t\treturn $this->cells($cells, $options);\r\n\t}", "function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}", "function Row($data){\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++){\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n \t//Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n \t//Draw the border\n\t $this->Rect($x,$y,$w,$h);\n \t//Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\n\t //Go to the next line\n\t $this->Ln($h);\n\t}", "function getRows() {\r\n\t\t$start_row = isset($_REQUEST['start'])?$_REQUEST['start']:0;\r\n\t\t$start_row = 3 * (int)$start_row;\r\n\t\t\r\n\t\t$mouses = dajProizvode($start_row);\r\n\t\t\r\n\t\t$formatted_mouses = \"<div id='formatted_mouses'>\" . formatData($mouses) . \"</div>\";\r\n\t\t\r\n\t\techo $formatted_mouses;\r\n\t}", "public function generateRows(){\n $alphabet = $this->generateAlphabet();\n $this->refreshRows();\n for ($i = 0; $i < $this->nbRows; $i++){\n $row = new BlockRow();\n if ($this->rowLabel === 2){\n $name = ''.($i+1);\n $row->setName($name);\n } else {\n $row->setName($alphabet[$i]);\n }\n $row->setBlock($this);\n $row->setNbSeats($this->getNbSeatsPerRow());\n $row->setNumerotationSystem($this->getSeatLabel());\n $this->addRow($row);\n }\n $this->generateSeats();\n }", "private function spreadsheet_rows($string, $content_num) {\n $rows1 = explode('</table:table-row>', $string);\n array_pop($rows1);\n\n $result_rows = array();\n $ix = 0;\n foreach ($rows1 as $row_text) {\n list($row_text, $cellscontent) = $this->extract_first_tag_str($row_text);\n $row_tag = $this->tag_attr($row_text);\n\n $row_tag['content'] = explode('<table:table-cell', $cellscontent);\n\n /*\n * if cell is spanned columns or rows\n */\n if ($row_tag['content']) {\n if ($row_tag['content'][0] == '') {\n array_shift($row_tag['content']);\n }\n }\n\n foreach ($row_tag['content'] as $cell_content) {\n\n if (strpos($cell_content, '<table:covered-table-cell') === 0) {\n /*\n * Compensation cell before\n */\n\n $covered_list = explode('<table:covered-table-cell', $cell_content);\n\n array_shift($covered_list);\n foreach ($covered_list as $c) {\n $coverTag = $this->tag_attr('<table:covered-table-cell' . $c);\n $coverTag['content'] = false;\n $row_tag['cells'][] = $coverTag;\n }\n }\n\n if ($cell_content[0] == ' ' || $cell_content[0] == '/') {\n /*\n * Обычная ячейка\n */\n $cell_content = '<table:table-cell' . $cell_content;\n $cell_closing_pair_pos = strpos($cell_content, '</table:table-cell>');\n\n if ($cell_closing_pair_pos !== false) {\n /*\n * cell is content\n */\n list($cell_tag_text, $cell_tag_content) = $this->extract_first_tag_str($cell_content);\n $cell_tag = $this->tag_attr($cell_tag_text);\n $cell_tag['content'] = current(explode('</table:table-cell>', $cell_tag_content));\n } else {\n $cell_tag = $this->tag_attr($cell_content);\n $cell_tag['content'] = false;\n }\n $row_tag['cells'][] = $cell_tag;\n\n /*\n * Check compensation cells after cell\n */\n if (strpos($cell_content, '<table:covered-table-cell') !== false) {\n /*\n * Compensation cell before\n */\n $covered_list = explode('<table:covered-table-cell', $cell_content);\n\n array_shift($covered_list);\n foreach ($covered_list as $c) {\n $coverTag = $this->tag_attr('<table:covered-table-cell' . $c);\n $coverTag['content'] = false;\n $row_tag['cells'][] = $coverTag;\n }\n }\n }\n }\n unset($row_tag['content']);\n $row_tag['content_num'] = $content_num;\n $row_tag['content_index'] = $ix;\n if ($ix == 0)\n $row_tag['content_first'] = true;\n if ($ix == count($rows1) - 1)\n $row_tag['content_last'] = true;\n\n $row_tag['repeated'] = false;\n if (empty($row_tag['attr']['table:number-rows-repeated']))\n $result_rows[] = $row_tag;\n else {\n $repeated = (int) $row_tag['attr']['table:number-rows-repeated'];\n if ($repeated > 1000)\n $repeated = 1000;\n $row_tag['repeated'] = true;\n unset($row_tag['attr']['table:number-rows-repeated']);\n for ($i = 0; $i < $repeated; $i++)\n $result_rows[] = $row_tag;\n }\n \n $ix++;\n }\n return $result_rows;\n }", "function CellCount() {\n return $this->rows[$this->LastRow]->CellCount();\n }", "public function getAll() {\n\t\treturn $this->rows;\n\t}", "public function numRows();", "public function getRow(): int\n {\n return $this->row;\n }", "public function getData() : array\n {\n\n // Lvd.\n $result = [];\n $firstDataCol = $this->getFirstCol();\n $lastDataCol = $this->getLastCol();\n $firstDataRow = ( $this->getFirstRow() + 1 );\n $lastDataRow = $this->getLastRow();\n $rowNo = -1;\n\n // Try.\n try {\n\n // Scan each row.\n for ($r = $firstDataRow; $r <= $lastDataRow; ++$r) {\n\n // Next row.\n ++$rowNo;\n\n // Scan each cell in row.\n for ($c = $firstDataCol; $c <= $lastDataCol; ++$c) {\n\n // Get value for cell.\n $value = ( $this->xlWorksheet->getCellValue($r, $c) ?? '' );\n\n // Get column name.\n $columnName = $this->getColumn($c);\n\n // Add to result.\n $result[$rowNo][$columnName] = $value;\n\n // Add refs of this cell to save it to cellsReadByTables (row, col).\n $this->cellsRead[] = [ $r, $c ];\n }\n }//end for\n } catch (Throwable $thr) {\n throw (new MethodFopException('readDataFromXlsxTable', $thr))\n ->addInfo('tableName', $this->name)\n ->addObjectInfos($this->getReader());\n }//end try\n\n return $result;\n }", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getGrid()\n {\n return $this->all();\n }", "public function getGrid()\n {\n return $this->all();\n }", "public function grid() : array\r\n {\r\n return [];\r\n }", "public function getRows()\n {\n return $this->last->fetch_array(MYSQLI_ASSOC);\n \n }", "public function getFreeCell()\n {\n $free = array();\n foreach ($this->kitCells as $pos => $value) {\n if ($value === null) {\n $free[] = $pos;\n }\n }\n\n return $free;\n }", "private function getRawData() {\n $phpExcelPath = Yii::getPathOfAlias('ext.phpexcel.Classes');\n // Turn off YII library autoload\n spl_autoload_unregister(array('YiiBase','autoload'));\n \n // PHPExcel_IOFactory\n require_once $phpExcelPath.'/PHPExcel/IOFactory.php';\n \n $objPHPExcel = PHPExcel_IOFactory::load($this->fileName);\n $ws = $objPHPExcel->getSheet(0); // process only FIRST sheet\n \n $emptyRows = 0;\n $row = 1;\n $result = array();\n while ($emptyRows < 5) { // 5 empty rows denote end of file\n $empty = TRUE;\n $content = array();\n foreach (range('A', 'Z') as $col) {\n $value = $this->getCellValue($ws, \"$col$row\");\n if (!empty($value)) {\n $empty = FALSE;\n }\n $content[] = $value;\n }\n if ($empty) {\n $emptyRows ++;\n }\n else {\n $emptyRows = 0;\n $result[] = $content; \n }\n $row++;\n }\n \n // Once we have finished using the library, give back the\n // power to Yii...\n spl_autoload_register(array('YiiBase','autoload'));\n \n return $result;\n }", "function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}", "function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}", "function Row($data) {\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++) {\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}", "function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 5, $data[$i], 0, $a);\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 }" ]
[ "0.7743921", "0.74654126", "0.74412096", "0.72640306", "0.72640306", "0.71391004", "0.7017703", "0.6995888", "0.6968887", "0.68359995", "0.6705278", "0.6705278", "0.6698613", "0.66919744", "0.6685413", "0.6664782", "0.6662402", "0.66118693", "0.6569146", "0.6536943", "0.6535713", "0.6519661", "0.64993227", "0.6488766", "0.64725465", "0.6464463", "0.6464463", "0.646345", "0.64520943", "0.64506423", "0.6443025", "0.64352584", "0.64306146", "0.6406771", "0.63917214", "0.637818", "0.6368203", "0.6324855", "0.6298238", "0.62512755", "0.6239877", "0.62153363", "0.6198667", "0.61961174", "0.6170204", "0.6090505", "0.6076546", "0.6075209", "0.60700417", "0.6068533", "0.6066839", "0.6063868", "0.604998", "0.60257626", "0.600006", "0.5995355", "0.59950346", "0.5984093", "0.5973531", "0.5936739", "0.59359264", "0.5918234", "0.59181786", "0.5908676", "0.58994925", "0.58976", "0.58648896", "0.5864283", "0.5855676", "0.58310515", "0.5828617", "0.5827187", "0.58267784", "0.5826259", "0.58254594", "0.5825038", "0.58223945", "0.58086395", "0.57976776", "0.57965404", "0.5791004", "0.5786601", "0.5777969", "0.5774684", "0.5774684", "0.5774684", "0.5774684", "0.5774684", "0.5774684", "0.5774684", "0.5755773", "0.5755773", "0.57505804", "0.57498664", "0.5748209", "0.57410765", "0.5735287", "0.5735287", "0.5722731", "0.5720426" ]
0.7985553
0
Alias for the getCells method.
public function cells();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCells();", "public function getCells()\n {\n return $this->cells;\n }", "public function getCells()\r\n {\r\n return $this->cells ?: $this->cells = new \\Doctrine\\Common\\Collections\\ArrayCollection();\r\n }", "public function getCell()\n {\n return $this->cell;\n }", "public function getSelectedCells() {\n\t\treturn $this->getActiveSheet()->getSelectedCells();\n\t}", "public function getIterateOnlyExistingCells()\n {\n return $this->_onlyExistingCells;\n }", "public function getCells(): array\n {\n $matrix = [];\n\n foreach ($this->cells as $x => $cellY)\n {\n foreach ($cellY as $y => $cellX)\n {\n $matrix[$x][$y] = $this->cells[$x][$y]->imAlive();\n }\n }\n\n return $matrix;\n }", "public function getCellValues()\n {\n return $this->get('CellValues');\n }", "public function getCellsRead() : array\n {\n\n return $this->cellsRead;\n }", "public function hasCells();", "public function getCells($gameid) {\n\n $sql =<<<SQL\nSELECT * \nFROM $this->tableName \nWHERE gameid=?\nSQL;\n\n $pdo = $this->pdo();\n $statement = $pdo->prepare($sql);\n $statement->execute([$gameid]);\n\n $cells = [];\n\n foreach($statement as $row) {\n $cells[] = new Cell($row);\n }\n\n return $cells;\n\n }", "public function getCellXfCollection() {\n\t\treturn $this->cellXfCollection;\n\t}", "function get(array &$grid, int $rowIndex, int $columnIndex): int {//tiene\n \n return $grid[$rowIndex][$columnIndex]; \n}", "abstract protected function getRows();", "public function getRows();", "public function getRows();", "public function getFreeCell()\n {\n $free = array();\n foreach ($this->kitCells as $pos => $value) {\n if ($value === null) {\n $free[] = $pos;\n }\n }\n\n return $free;\n }", "public function cells($cells = null, $rowEnd = false) {\r\n\t\tif (is_array($cells)) {\r\n\t\t\tforeach ($cells as $cell) {\r\n\t\t\t\t$cell += [null, null, null, null, null];\r\n\t\t\t\t$this->cell($cell[0], $cell[1], $cell[2], $cell[3], $cell[4]); \r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($rowEnd) {\r\n\t\t\t$this->rowEnd(is_array($rowEnd) ? $rowEnd : []);\r\n\t\t}\r\n\t}", "public function getDddCell()\n {\n return $this->dddCell;\n }", "public function getGrid()\n {\n return $this->all();\n }", "public function getGrid()\n {\n return $this->all();\n }", "public function rows() {\n\t\treturn $this->row();\n\t}", "public function getCellPrototype()\n\t{\n\t\treturn $this->cell;\n\t}", "public function get() {\n\t\treturn $this->rows[$this->rowIndex];\n\t}", "private function getRange()\n {\n $low = (($this->boardWidth * $this->myRowNum) - ($this->boardWidth)) + 1;\n $high = ($this->boardWidth * $this->myRowNum);\n\n return range($low, $high);\n }", "public function cell($key, Cell $cell);", "public function cell($row=0, $column=0) {\n\t\tif ($row || $column) return false;\n\t\treturn $this->query;\n\t}", "public function get_cell_info() {\n $types = array();\n $cells = array();\n foreach ($this->get_unique_section('GridMap/Palette')->sections as $cell) {\n if (is_array($cell)) {\n $cell = end($cell);\n }\n /** @var \\Totengeist\\IVParser\\Section $cell */\n $path = explode('/', $cell->path);\n $name = $path[count($path)-1];\n // If the name is empty, the character is '/' and was exploded.\n if ($name == '') {\n $name = '/';\n }\n // If the cell is empty space, it contains no content.\n if (count($cell->content) == 0) {\n $types[$name] = array();\n } else {\n foreach ($cell->content as $key => $type) {\n if (in_array($key, static::$CELLS)) {\n $types[$name][] = $key;\n } elseif (in_array($key, static::$CELL_TYPES)) {\n $key = 'Storage ' . $type;\n $types[$name][] = $key;\n } else {\n $types[$name] = array();\n }\n }\n }\n }\n $typekeys = array_keys($types);\n $cell_width = strlen($typekeys[count($typekeys)-1])+1;\n\n foreach ($this->get_unique_section('GridMap/Cells')->content as $cellk => $cell) {\n for ($i = 0; $i < strlen($cell); $i += $cell_width) {\n $char = trim(substr($cell, $i, $cell_width));\n if (in_array($char, array_keys($types))) {\n foreach ($types[$char] as $type) {\n if (!isset($cells[$type])) {\n $cells[$type] = 1;\n } else {\n $cells[$type]++;\n }\n }\n }\n }\n }\n if (isset($cells['Habitation'])) {\n $cells['HabitationCapacity'] = (int) floor($cells['Habitation']/9);\n }\n\n return $cells;\n }", "public function grid() : array\r\n {\r\n return [];\r\n }", "function getCalculatedRows();", "public function getRow() {}", "abstract public function get_rows();", "public static function getRowsArray(): array {\n return range('A', 'J');\n }", "public function getCoordinates();", "abstract public function grid();", "public function hasCell(){\n return $this->_has(1);\n }", "public function cell($value) {\n return $this->setProperty('cell', $value);\n }", "function getRows() { return $this->_rows; }", "public function getBounds();", "function getRows() {\n\t\treturn $this->rows;\n\t}", "public function getRowRanges()\n {\n return $this->row_ranges;\n }", "final public function cell($key):?string\n {\n return $this->get(['cell',$key]);\n }", "public function get_row();", "function getElements() {\n return $this->rows_object;\n }", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "abstract protected function getColumns(): array;", "public function getRange() {\n\n }", "function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}", "function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}", "public function getCellCount(): int {\n return $this->cellCountY * $this->cellCountX;\n }", "public function getCellValueForRendering($row, $cell=null);", "function CellCount() {\n return $this->rows[$this->LastRow]->CellCount();\n }", "public function getRow();", "public function getRows ()\n {\n return $this->_rows;\n }", "public function getRows()\n {\n return $this->rows;\n }", "public function getRows()\n {\n return $this->rows;\n }", "public function cell() {\r\n\t\t$argKeys = ['cell', 'header', 'headerSort', 'skipId', 'cellOptions'];\r\n\t\t$totalArgs = count($argKeys);\r\n\t\t$totalArgKey = $lastArgKey = $totalArgs - 1;\r\n\t\t$args = func_get_args();\r\n\t\t$numArgs = count($args);\r\n\t\tfor ($i = $totalArgKey; $i > 0; $i--) {\r\n\t\t\tif (!empty($args[$i])) {\r\n\t\t\t\t$lastArgKey = $i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($lastArgKey < $totalArgKey) {\r\n\t\t\t// The last passed argument can always be cell options\r\n\t\t\tif (is_array($args[$lastArgKey])) {\r\n\t\t\t\t$args[$totalArgKey] = $args[$lastArgKey];\r\n\t\t\t\tfor ($i = $lastArgKey; $i < $totalArgKey; $i++) {\r\n\t\t\t\t\t$args[$i] = null;\r\n\t\t\t\t}\r\n\t\t\t\tksort($args);\r\n\t\t\t}\r\n\t\t}\r\n\t\textract(array_combine($argKeys, $args + array_fill(0, $totalArgs, null)));\r\n\t\t\r\n\t\t// Checks if the skipId is in the skip array\r\n\t\tif (!empty($skipId) && $this->_checkSkip($skipId)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$formAddCell = '&nbsp;';\r\n\t\tif ($this->getHeader) {\r\n\t\t\t$this->columnCount++;\r\n\t\t\t//Stores first instance of non-blank header\r\n\t\t\tif (!empty($header) && !$this->hasHeader) {\r\n\t\t\t\t$this->hasHeader = true;\r\n\t\t\t}\r\n\t\t\tif ($headerSort) {\r\n\t\t\t\tif ($headerSort === true) {\r\n\t\t\t\t\t$headerSort = null;\r\n\t\t\t\t}\r\n\t\t\t\t$header = $this->thSort($header, $headerSort);\r\n\t\t\t}\r\n\t\t\t$thOptions = isset($cellOptions['th']) ? $cellOptions['th'] : $cellOptions;\r\n\t\t\t$this->headers[] = [$header => $thOptions];\r\n\t\t\t\r\n\t\t}\r\n\t\t/*\r\n\t\tif ($editCell = Param::keyCheck($cellOptions, 'edit', true)) {\r\n\t\t\t$formAddCell = $editCell;\r\n\t\t\t$cell = $this->_editCell($cell, $editCell);\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tif (is_array($cellOptions)) {\r\n\t\t\t$cell = [$cell, $cellOptions];\r\n\t\t}\r\n\t\t$this->row[] = $cell;\r\n\t\tif ($this->trCount == 0) {\r\n\t\t\t$this->formAddRow[] = $formAddCell;\r\n\t\t}\r\n\t}", "abstract public function getCols();", "function getNeighbours($arr, $x, $y){\n\t$c = getColumn($arr, $x);\n\t$r = getRow($arr, $y);\n\t[$bnum, $bpos] = locateBlock($x, $y);\n\t$b = getBlock($arr, $bnum);\n\t$ret = array_merge(remove($b, $bpos), remove($c, $y), remove($r, $x));\n\treturn $ret;\n}", "public function getFoundRows();", "public function get_rows() {\n return $this->rows;\n }", "private function getCell(int $x, int $y): ?Piece\n {\n return $this->board[$y][$x];\n }", "final private function initCells(){\n\t\t$row = $this->row;\n\t\t$col = $this->col;\n\t\tfor($i=0;$i<$row;$i++)\n\t\t\tfor($j=0;$j<$col;$j++)\n\t\t\tif (@$this->contents[$i]->contents[$j] and\n\t\t\t\t\t@!$this->markspan[$i][$j] and\n\t\t\t\t\tcount(@$this->contents[$i]->contents[$j]->contents) == 0)\n\t\t\t$this->cellContent($i,$j,'&nbsp;');\n\n\t}", "public function getColumns(){\n $rows = array();\n return $rows; \n }", "public function getCellValue()\n {\n return $this->get('CellValue');\n }", "public function getCellValue()\n {\n return $this->get('CellValue');\n }", "public function getColumns()\r\n {\r\n }", "static public function\tgetPlanningCells()\n {\n $workshops = workshop_level_3::all();\n\n $array = array();\n \n foreach ($workshops as $workshop) \n { \n foreach ($workshop->worker as $task) \n {\n \t$cell = array(\n \"workshop_level_3\" => $workshop->id,\n \"isMorning\" => $task->pivot->isMorning,\n \"date\" => $task->pivot->date,\n \"text\" => $task->username,\n );\n\n $array[] = $cell; \n }\n }\n return json_encode($array);\n }", "public function getCellSize(): int {\n return $this->cellSize;\n }", "public function row($cells = null, $options = []) {\r\n\t\tif (empty($options)) {\r\n\t\t\t$options = true;\r\n\t\t}\r\n\t\treturn $this->cells($cells, $options);\r\n\t}", "public function getRows()\n {\n return $this->_rows;\n }", "public function get_cellId(): int\n {\n return $this->_cid;\n }", "public function get_cellId(): int\n {\n return $this->_cid;\n }", "public function getColumns(): array;", "private function nextCells($cells){\n\n $res = [];\n $firstEmpty = $this->findEmpty($cells);\n\n if($firstEmpty !== null){\n\n $x = $firstEmpty[0];\n $y = $firstEmpty[1];\n\n foreach($this->shifts as $shift){\n\n $cells[$x][$y]['schedule'] = $shift;\n $res[] = $cells;\n }\n\n }\n\n return $res;\n\n }", "public function getRows()\n {\n return 1;\n }", "public function getCell($position): ?GridCellInterface {\n if (is_int($position)) {\n return $this->cells[$position];\n }\n\n $x = (int)$position['x'] / $this->cellSize;\n $y = (int)$position['y'] / $this->cellSize;\n\n return $this->cells[(int)($x + ($y * $this->cellCountX))];\n }", "public function getNeighbors(array $columns = ['*']);", "protected function calculateRowsAndColumns() {}", "public function getCellValue($row);", "public function findAdjacentOf(Cell $cell);", "public function getBoundaries()\n {\n }", "protected function _getRanges() {}", "public function getCategoryNeighbors()\n {\n return $this->categoryNeighbors;\n }", "public function getSheet()\n {\n return $this->sheet;\n }", "public function getAllRows()\n\t{\n\t\treturn $this->foundRows;\n\t}", "public function getNeighborhood()\n {\n return $this->neighborhood;\n }", "abstract protected function getConcreteSheetIterator();", "static function getColumns()\n {\n }", "protected function getConcreteSheetIterator()\n {\n return $this->sheetIterator;\n }", "abstract public function getRow();", "abstract public function getRow();", "protected function wrapResults($outputs)\n {\n return new Google_Spreadsheets_RetrieveCellList_Results($outputs);\n }", "public function setCellLocations($value)\n {\n return $this->set('CellLocations', $value);\n }" ]
[ "0.8727427", "0.8186724", "0.7766314", "0.69713396", "0.6680871", "0.6562327", "0.6430758", "0.64172786", "0.63818663", "0.61682534", "0.6000105", "0.5709704", "0.563236", "0.5594752", "0.55761236", "0.55761236", "0.5542074", "0.5501382", "0.54954165", "0.5471345", "0.5471345", "0.54220456", "0.54199135", "0.5387499", "0.5349378", "0.5312204", "0.5295387", "0.5283506", "0.5280191", "0.5265673", "0.5244577", "0.52350295", "0.52034", "0.52023834", "0.52023005", "0.5190017", "0.5185826", "0.5164791", "0.51513094", "0.51490116", "0.51382166", "0.51334256", "0.5125402", "0.51209855", "0.51049286", "0.51049286", "0.51049286", "0.51049286", "0.51049286", "0.51049286", "0.51049286", "0.50997794", "0.5098444", "0.5093689", "0.5093689", "0.5065176", "0.5063163", "0.50592124", "0.5057384", "0.5055394", "0.5033269", "0.5033269", "0.50156367", "0.5013604", "0.5001679", "0.49930125", "0.49885157", "0.4980919", "0.49747282", "0.4971564", "0.49501893", "0.49501893", "0.49395037", "0.49271458", "0.49239323", "0.49172458", "0.49130118", "0.49085546", "0.49085546", "0.48960894", "0.48881736", "0.48837605", "0.4882774", "0.48806724", "0.48792863", "0.48717797", "0.48631737", "0.48510814", "0.48496985", "0.48454297", "0.4826964", "0.48206457", "0.4814678", "0.48064086", "0.48063985", "0.47893277", "0.47765172", "0.47765172", "0.47736186", "0.47545022" ]
0.7457208
3
Check if the row has any cells.
public function hasCells();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCell(){\n return $this->_has(1);\n }", "public function hasRowContents(){\n return $this->_has(1);\n }", "abstract public function hasRow();", "public function hasRows()\n\t{\n\t\treturn count($this->getRows()) > 0;\n\t}", "protected function isRowEmpty( $row )\n {\n foreach ( $row as $item ) {\n if ( $item ) {\n return false;\n }\n }\n\n return true;\n }", "public function hasRowCount(){\n return $this->_has(7);\n }", "public function valid()\n {\n return !empty($this->_currentRow);\n }", "private function isFilled(): bool {\n foreach ($this->board as $row => $cols) {\n foreach ($cols as $col => $cellValue) {\n if($this->board[$row][$col] == 0 || $this->board[$row][$col] > 9 || $this->board[$row][$col] < 1) {\n return false;\n }\n }\n }\n return true;\n }", "public function hasRowRange(){\n return $this->_has(3);\n }", "private function hasNoColumns() {\n if (count($this->columns) === 0) return true;\n\n\n if (count($this->columns) === 1 && isset($this->columns['*'])) {\n return true;\n }\n\n return false;\n }", "public function getIterateOnlyExistingCells()\n {\n return $this->_onlyExistingCells;\n }", "function is_empty() {\n\t\treturn !$this->count();\n\t}", "public function valid()\n\t{\n\t\treturn $this->row !== NULL;\n\t}", "function isCellEmpty($xPos, $yPos){\r\n\t\t\tif($this->board[$xPos][$yPos] != 1){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "private function validCells($cells){\n\n return $this->rowsGood($cells) && $this->columnsGood($cells);\n\n }", "public function hasRowSet(){\n return $this->_has(8);\n }", "private function checkNrOfCells($data) {\r\n //Check if there are the same number of cells in each row\r\n $checkValue = 0;\r\n $nrOfCells = count($data);\r\n for ($i = 0; $i < $nrOfCells; $i++) {\r\n foreach ($data AS $key => $value) {\r\n $counted = count($value);\r\n if ($i === 0) {\r\n $checkValue = $counted;\r\n } elseif ($checkValue != $counted) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "public function isEmpty()\n {\n \treturn 0 == $this->getItemCount();\n }", "public function isEmpty()\n\t{\n\t\treturn empty($this->coords);\n\t}", "public function isEmpty()\n {\n return count($this->index) == 0;\n }", "private function tableIsEmpty(){\r\n\t\tglobal $TABLEAFILIADOS;\r\n\t\t$sqlquery=\"SELECT * from `$TABLEAFILIADOS`;\";\r\n\t\t$result=mysql_query($sqlquery);\r\n\t\t$int_numRows = mysql_num_rows($result);\r\n\t\tif ($int_numRows==0){\t\t\t\r\n\t\t\treturn true;\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function isFirstRowCell() {\n $ret = $this->cellnumber % $this->colnum_int == 1;\n $ret = $ret || ($this->colnum_int == 1);\n# error_log('Step2: ' . $ret);\n return $ret;\n }", "public function is_empty() {\n return ($this->count == 0);\n }", "public function isEmpty()\n {\n return $this->count() === 0;\n }", "public function isEmpty()\n\t{\n\t\treturn count( $this ) < 1;\n\t}", "static function cellExists($row_id, $day_header, $dataArray) {\n foreach($dataArray as $row) {\n if ($row['row_id'] == $row_id && !empty($row[$day_header]['duration']))\n return true;\n }\n return false;\n }", "public function valid() {\n // TODO: Check numProcessed against itemlimit\n return !is_null($this->currentRow);\n }", "public function hasRowKey(){\n return $this->_has(1);\n }", "public function hasRowKey(){\n return $this->_has(1);\n }", "public function hasRowKey(){\n return $this->_has(1);\n }", "public function isFilled()\n {\n return ! empty($this->data);\n }", "public function isEmpty() {\n return $this->size() == 0;\n }", "public function isEmpty(): bool\n {\n return $this->count() === 0;\n }", "public function isEmpty(): bool\n {\n return $this->count() === 0;\n }", "public function isEmpty(): bool\n {\n return $this->count() === 0;\n }", "public function isEmpty()\r\n {\r\n return isset($this->data['total']) AND $this->data['total'] == '0';\r\n }", "function validate_rows() {\r\n $ok = True;\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n foreach ($this->properties as $colvar=>$col) {\r\n if (!$this->validate_field($colvar,$i)) { # make sure this field is not empty\r\n $ok = False;\r\n }\r\n }\r\n }\r\n return $ok;\r\n }", "public function isEmpty()\n {\n return $this->map->isEmpty();\n }", "public function isEmpty()\n {\n return count($this->values) === 0;\n }", "public function isEmpty()\n {\n return (empty($this->map));\n }", "function hasGrid() {\n\t\t\t$grid = $this->getGrid( );\n\n\t\t\tif (!empty( $$grid )) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function isEmpty()\n {\n return $this->getTotalQty() == 0;\n }", "public function isEmpty(): bool\n\t{\n\t\treturn $this->count() === 0;\n\t}", "public function isEmpty(): bool\n {\n return 0 === $this->count();\n }", "public function isEmpty()\n {\n return ($this->count() === 0);\n }", "public function isEmpty(): bool {\n return $this->size() === 0;\n }", "public function isEmpty()\r\n\t{\r\n\t\treturn ( 0 === $this->count() );\r\n\t}", "public function isEmpty(): bool\n {\n return ($this->count() === 0);\n }", "public function isEmpty()\n\t{\n\t\treturn $this->count === 0;\n\t}", "public function validateIsFullBoard(){\r\n //in case of a full Column\r\n for($index=0; $index < Board::COLUMNS; $index++){\r\n //if there is an empty cell\r\n if($this->board->gameBoard[0][$index] == Board::CELL){\r\n //board is not full\r\n return false;\r\n }\r\n }///board is full\r\n return true;\r\n }", "public function isEmpty()\n {\n return ($this->count() == 0);\n }", "public function isEmpty()\n {\n return !$this->elements;\n }", "public function is_empty(){\r\n\t\treturn $this->size==0;\r\n\t}", "public function isEmpty() {\n\t\treturn ($this->count === 0);\n\t}", "public function isEmpty()\n {\n return empty($this->all());\n }", "public function isEmpty()\n {\n return empty($this->map);\n }", "public function isEmpty()\n {\n return ! $this->_elements;\n }", "public function isEmpty()\n {\n return empty($this->data);\n }", "public function isEmpty() {\n return (0 == $this->size());\n }", "public function isEmpty()\n {\n return empty($this->record);\n }", "public function clearGrid(): bool {\n $result = true;\n for ($i = $this->cells->length();$i-- > 0;) {\n $result = ($result === false ? false : $this->cells[$i]->clear());\n }\n return $result;\n }", "public function isEmpty() {\n return empty($this->_data);\n }", "public function isValid(){\n\t\treturn !count($this->_rows) && empty($this->_settings);\n\t}", "public function isEmpty(): bool {\n\t\treturn count($this->array) === 0;\n\t}", "private function isValidRowColumn(): bool {\n foreach ($this->board as $row => $cols) {\n $curRow = [];\n $curCol = [];\n foreach ($cols as $col => $cellValue) {\n // check if repeated in row\n if(in_array($this->board[$row][$col], $curRow)){\n return false;\n }\n array_push($curRow, $this->board[$row][$col]);\n\n // check if repeated in column \n if(in_array($this->board[$col][$row], $curCol)){\n return false;\n }\n array_push($curCol, $this->board[$col][$row]);\n }\n }\n return true;\n }", "public function isEmpty() {\n return 0 == count($this->elements);\n }", "public function isEmpty(): bool\n {\n $this->collectLogs();\n\n return empty($this->data);\n }", "public static function hasItems() {\n\t\treturn self::itemCount() > 0;\n\t}", "public function hasColumns(){\n return $this->_has(3);\n }", "public function isEmpty() : bool {\n return sizeof($this) == 0;\n }", "public function checkrow(){\n return $this->select->num_rows;\n }", "public function valid()\n {\n return $this->_position < ExcelCell::columnIndexFromString($this->_subject->getHighestColumn());\n }", "public function isEmpty()\n {\n return $this->head == null;\n }", "public function hasResetRow(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }", "public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }", "public function valid() {\n if ($valid=isset($this->__rows__[$this->__rowsi__])) {\n $this->__iterate__ = true;\n } else {\n unset($this->__iterate__);\n }\n return $valid;\n }", "public function isEmpty()\n {\n return ($this->size == 0);\n }", "public function is_empty() {\n\t\treturn (\n\t\t\t! isset( $this->root )\n\t\t\t|| ! $this->root->hasChildNodes()\n\t\t);\n\t}", "public function hasElements()\n {\n return count($this->getElements()) > 0;\n }", "public function clearRows() : bool {\n // loop all rows\n for ($i = count($this->map->getRows()) - 1; $i >= 0; $i--) {\n // if the current row is full\n $isFull = true;\n // loop all columns\n for ($j = 0; $j < count($this->map->getRows()[$i]); $j++) {\n // check if the current row is still full, after considering the current column\n $isFull = $isFull && $this->map->getRows()[$i][$j]->getBlock();\n }\n\n // check if the current row is full\n if ($isFull) {\n // loop all columns\n for ($j = 0; $j < count($this->map->getRows()[$i]); $j++) {\n // clear the current field\n $this->map->getRows()[$i][$j]->setBlock(null);\n }\n\n // one more row was cleared\n $lines++;\n // award the points\n $points += $lines * $this->map->getWidth();\n\n // loop all rows above the cleared row\n for ($j = $i; $j > 0; $j--) {\n // loop all columns\n for ($k = 0; $k < count($this->map->getRows()[$j]); $k++) {\n // let the current column's block fall down into the cleared row\n $this->map->getRows()[$j][$k]->setBlock($this->map->getRows()[$j - 1][$k]->getBlock());\n }\n }\n\n // re-check the current row, a full row might have fallen down\n $i++;\n }\n }\n\n // check if rows were cleared\n if ($lines > 0) {\n // add all rows at once\n $this->lines += $lines;\n\n // get the level to play at the current number of rows\n $this->level = array_reverse(array_filter(self::LEVELS, function($level) {\n // check if the current level has been reached\n return $this->lines >= $level['lines'];\n }))[0];\n }\n\n // check if points were awarded\n if ($points > 0) {\n // add all points at once\n $this->points += $points;\n }\n\n // return if rows were cleared or points were awarded\n return $lines > 0 || $points > 0;\n }", "private function shapeIsNotComplete(int $rowIndex)\n {\n return $rowIndex < $this->height;\n }", "public function isEmpty()\n {\n return\n empty($this->items)\n && empty($this->fields);\n }", "function isEmpty()\n {\n }", "public function isEmpty()\n\t{\n\t\tif(count($this->error))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "public function isEmpty(): bool\n {\n return count($this->entities) === 0;\n }", "public function isEmpty()\n {\n return count($this->_metaData) == 0;\n }", "public function isEmpty()\n {\n \t$empty = $this->getHousingCount() == 0;\n \t$empty = $empty && is_null($this->getHousingDescription());\n \t$empty = $empty && $this->getOtherCount() == 0;\n \t$empty = $empty && is_null($this->getOtherDescription());\n \t$empty = $empty && $this->getPhotoCount() == 0;\n \t$empty = $empty && is_null($this->getPhotoDescription());\n \t$empty = $empty && $this->getSheetCount() == 0;\n \t$empty = $empty && is_null($this->getSheetDescription());\n \t$empty = $empty && $this->getVolumeCount() == 0;\n \t$empty = $empty && is_null($this->getVolumeDescription());\n \t\t$empty = $empty && $this->getBoxCount() == 0;\n \t$empty = $empty && is_null($this->getBoxDescription());\n \t\treturn $empty;\n }", "public function isEmpty() {\n return $this->getLength() == 0;\n }", "public function isEmpty()\n {\n return $this->length === 0;\n }", "public function isEmpty()\n {\n return ($this->shelfs[0]->count() == 0) ? true : false;\n }", "final private function initCells(){\n\t\t$row = $this->row;\n\t\t$col = $this->col;\n\t\tfor($i=0;$i<$row;$i++)\n\t\t\tfor($j=0;$j<$col;$j++)\n\t\t\tif (@$this->contents[$i]->contents[$j] and\n\t\t\t\t\t@!$this->markspan[$i][$j] and\n\t\t\t\t\tcount(@$this->contents[$i]->contents[$j]->contents) == 0)\n\t\t\t$this->cellContent($i,$j,'&nbsp;');\n\n\t}", "public function valid()\n {\n return $this->_position <= $this->_subject->getHighestRow();\n }", "public function isEmpty(): bool\n {\n return 0 === $this->size;\n }", "public function isEmpty(): bool\n {\n return empty($this->elements);\n }", "public function isEmpty() {\n return empty($this->_elements);\n }" ]
[ "0.80122054", "0.73982966", "0.7139153", "0.69978046", "0.6850296", "0.67528754", "0.66993093", "0.66594356", "0.6638342", "0.6563785", "0.64876133", "0.64768803", "0.6441029", "0.64363277", "0.6412719", "0.6335578", "0.6329724", "0.63028026", "0.6232167", "0.6230197", "0.6194729", "0.61787516", "0.61364347", "0.61358744", "0.6132236", "0.6109587", "0.6084794", "0.6061516", "0.6061516", "0.6061516", "0.60612494", "0.60363656", "0.6030863", "0.6030863", "0.6030863", "0.601707", "0.6013399", "0.60098237", "0.60019654", "0.59804064", "0.59738195", "0.59718716", "0.59700525", "0.5962063", "0.59532773", "0.59499717", "0.5936322", "0.5933361", "0.5929874", "0.59243184", "0.59242195", "0.59192556", "0.5915289", "0.58964753", "0.58644646", "0.58636975", "0.5863207", "0.585621", "0.58545107", "0.585089", "0.5843932", "0.5838783", "0.5837135", "0.58361334", "0.5835631", "0.57931566", "0.57904655", "0.5786304", "0.57860446", "0.5784905", "0.5784227", "0.5782382", "0.5778699", "0.5766566", "0.57640755", "0.57640755", "0.57640755", "0.57640755", "0.576011", "0.576011", "0.5759679", "0.57564265", "0.5752535", "0.5737521", "0.57281005", "0.5727209", "0.57266885", "0.5725479", "0.5721855", "0.571751", "0.5715088", "0.5713121", "0.57003677", "0.5699814", "0.569814", "0.5683508", "0.56784666", "0.566512", "0.5648254", "0.56477916" ]
0.77078974
1
Return the row actions.
public function getActions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRowActions() {\n\t\t\tif ( empty( $this->config ) ) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t$two_step = tve_leads_get_form_type( $this->config['l_id'], array( 'active_test' => true ) );\n\t\t\tif ( $two_step->active_test ) {\n\t\t\t\treturn sprintf(\n\t\t\t\t\t'<br>%s - <a href=\"%s\" target=\"_blank\" class=\"tve_link_no_warning\">%s</a>',\n\t\t\t\t\t__( 'A/B test in progress', 'thrive-leads' ),\n\t\t\t\t\tadmin_url( 'admin.php?page=thrive_leads_dashboard' ) . '#test/' . $two_step->active_test->id,\n\t\t\t\t\t__( 'View test', 'thrive-leads' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn sprintf(\n\t\t\t\t'<br><a href=\"%s\" target=\"_blank\" class=\"tve_link_no_warning\">%2$s</a>',\n\t\t\t\tadmin_url( 'admin.php?page=thrive_leads_dashboard' ) . '#2step-lightbox/' . $this->config['l_id'],\n\t\t\t\t__( 'Edit ThriveBox', 'thrive-leads' )\n\t\t\t);\n\t\t}", "public function rowsAction() {\n parent::rowsAction();\n }", "private function getRecordActions()\n {\n return array_filter($this->actions, function($item) {\n return in_array($item, array('show', 'edit'));\n });\n }", "protected function getActions() {}", "public function getActions(){\r\n\t\t\r\n\t\t\treturn $this->_actions;\r\n\t\t}", "public Function getActions(){\n\t\treturn $this->actions;\n\t}", "function get_bulk_actions( ) {\r\n\t\t$actions = array();\r\n\r\n\t\tif ( $this->is_trash ) {\r\n\t\t\t$actions['restore'] = __( 'Restore', 'media-library-assistant' );\r\n\t\t\t$actions['delete'] = __( 'Delete Permanently', 'media-library-assistant' );\r\n\t\t} else {\r\n\t\t\t$actions['edit'] = __( 'Edit', 'media-library-assistant' );\r\n\r\n\t\t\tif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {\r\n\t\t\t\t$actions['trash'] = __( 'Move to Trash', 'media-library-assistant' );\r\n\t\t\t} else {\r\n\t\t\t\t$actions['delete'] = __( 'Delete Permanently', 'media-library-assistant' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_bulk_actions', $actions );\r\n\t}", "public function getActions() {\n\n\t}", "public function get_actions(): array;", "public function actions()\n {\n return $this->hasMany('App\\Models\\Misc\\Action', 'table_id')->where('table', $this->table);\n }", "public static function returnActions() {\n return array(\n 'view' => 'Просмотр',\n 'moderate' => 'Доступ к модерированию',\n 'clear' => 'Полная очистка БД',\n );\n }", "function actions()\n {\n return[];\n }", "protected function get_bulk_actions() {\n\n\t\t// Make a basic array of the actions we wanna include.\n\t\t$setup = array(\n\t\t\t'wbr_bulk_approve' => __( 'Approve Pending', 'woo-better-reviews' ),\n\t\t\t'wbr_bulk_delete' => __( 'Delete Selected', 'woo-better-reviews' ),\n\t\t);\n\n\t\t// Return it filtered.\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_bulk_actions', $setup );\n\t}", "public function getActions()\n {\n return $this->actions;\n }", "public function getActions()\n {\n return $this->actions;\n }", "public function getActions()\n {\n return $this->actions;\n }", "public function talk_row_actions( $actions = array(), $talk = null ) {\n\t\t\tif ( empty( $talk ) || $talk->post_type != $this->post_type ) {\n\t\t\t\treturn $actions;\n\t\t\t}\n\n\t\t\t// No row actions in case downloading talks\n\t\t\tif ( ! empty( $this->downloading_csv ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $actions;\n\t\t}", "public static function returnActions() {\n ##return array();\n }", "public static function rowActions($arguments)\n {\n $model = $arguments['model'];\n $request_role = $arguments['request_role'];\n $service = 'users:row_actions';\n\n /*-----------------------------------------------\n | Editor ...\n */\n service($service)\n ->add('edit')\n ->icon('pencil')\n ->trans(\"manage::forms.button.edit_info\")\n ->link(\"modal:manage/users/act/-hashid-/edit\")\n ->condition($model->canEdit())\n ->order(11)\n ;\n\n\n /*-----------------------------------------------\n | Change Password ...\n */\n service($service)\n ->add('password')\n ->icon('key')\n ->trans(\"users::forms.change_password\")\n ->link(\"modal:manage/users/act/-hashid-/password\")\n ->condition($model->canEdit())\n ->order(21)\n ;\n\n /*-----------------------------------------------\n | Role Management ...\n */\n service($service)\n ->add('roles')\n ->icon('user-circle')\n ->trans(\"users::permits.user_role\")\n ->link(\"modal:manage/users/act/-hashid-/roles\")\n ->condition($model->canPermit())\n ->order(31)\n ;\n\n /*-----------------------------------------------\n | Permits ...\n */\n if (static::isNotACombinedRole($request_role)) {\n service($service)\n ->add('permits')\n ->icon('shield')\n ->trans(\"users::permits.permit\")\n ->link(\"modal:manage/users/act/-hashid-/permits/$request_role\")\n ->condition($model->as($request_role)->canPermit())\n ->order(31)\n ;\n }\n\n /*-----------------------------------------------\n | Block / Unblock ...\n */\n if ($request_role != 'all') {\n $enabled = $model->as($request_role)->enabled();\n $action = $enabled ? 'block' : 'unblock';\n\n service($service)\n ->add('block')\n ->icon($enabled ? 'ban' : 'unlock')\n ->trans($enabled ? \"users::forms.block\" : \"users::forms.unblock\")\n ->link(\"modal:manage/users/act/-hashid-/block/$request_role/$action\")\n ->condition($enabled ? $model->canDelete() : $model->canBin())\n ->order(99)\n ;\n }\n\n /*-----------------------------------------------\n | Delete / Undelete ...\n */\n if ($request_role == 'all') {\n $enabled = !$model->trashed();\n $action = $enabled ? 'delete' : 'undelete';\n\n service($service)\n ->add('delete')\n ->icon($enabled ? 'trash' : 'undo')\n ->trans($enabled ? \"manage::forms.button.soft_delete\" : \"manage::forms.button.undelete\")\n ->link(\"modal:manage/users/act/-hashid-/delete/$action\")\n ->condition($enabled ? $model->canDelete() : $model->canBin())\n ->order(99)\n ;\n }\n\n\n /*\n |--------------------------------------------------------------------------\n | Login As\n |--------------------------------------------------------------------------\n |\n */\n if (dev()) {\n service($service)\n ->add('login_as')\n ->icon('bug')\n ->trans(\"users::forms.login_as\")\n ->link(\"modal:manage/users/act/-hashid-/login\")\n ->condition(!$model->isDeveloper() and $model->id != user()->id)\n ;\n }\n }", "function get_actions() {\n\t\tglobal $db;\n\t\tstatic $actions = null;\n\t\tif ( is_null($actions) ) {\n\t\t\tfor ( $info = $db->Execute(\"SELECT * FROM `actions` ORDER BY `title` ASC\"); !$info->EOF; $info->moveNext() ) {\n\t\t\t\t$actions[$info->fields['id']] = (object)array(\"id\" => $info->fields['id'], \"title\" => $info->fields['title'], \"visible\" => $info->fields['visible'] == \"true\" ? true : false);\n\t\t\t}\n\t\t} return $actions;\n\t}", "protected function row_actions($actions, $always_visible = \\false)\n {\n }", "public function page_row_actions($actions, $post)\n {\n }", "public function getActions()\n\t{\n\t\treturn $this->actions;\n\t}", "public static function returnActions() {\n return array();\n }", "public function Actions()\n {\n return $this->actions;\n }", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "protected function getActions()\n {\n $actions = [];\n\n if (method_exists($this, 'editAction')) {\n $actions['edit'] = [\n 'label' => 'bigfoot_core.crud.actions.edit.label',\n 'route' => $this->getRouteNameForAction('edit'),\n 'icon' => 'edit',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'duplicateAction')) {\n $actions['duplicate'] = [\n 'label' => 'bigfoot_core.crud.actions.duplicate.label',\n 'route' => $this->getRouteNameForAction('duplicate'),\n 'icon' => 'copy',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'deleteAction')) {\n $actions['delete'] = [\n 'label' => 'bigfoot_core.crud.actions.delete.label',\n 'route' => $this->getRouteNameForAction('delete'),\n 'icon' => 'trash',\n 'color' => 'red',\n 'class' => 'confirm-action',\n 'attributes' => [\n 'data-confirm-message' => $this->getTranslator()->trans(\n 'bigfoot_core.crud.actions.delete.confirm',\n ['%entity%' => $this->getEntityLabel()]\n ),\n ],\n ];\n }\n\n return $actions;\n }", "public function action()\n {\n return $this->_actions;\n }", "public function getBatchActions()\n {\n $actions = parent::getBatchActions();\n\n // PS : https://sonata-project.org/bundles/admin/2-0/doc/reference/batch_actions.html\n\n // check user permissions\n if($this->isGranted('EDIT') && $this->isGranted('DELETE')){\n $originalActions = $actions; // on copie les actions et les réinitialise pour mettre les actiosn 'valider' & 'dévalider' en premier\n $actions = array(); // on réinitilaise le tableau\n $actions['valider']=array(\n 'label' => 'Valider',\n 'ask_confirmation' => true // If true, a confirmation will be asked before performing the action\n );\n\n $actions['devalider']=array(\n 'label' => 'Dévalider',\n 'ask_confirmation' => true // If true, a confirmation will be asked before performing the action\n );\n\n $actions = array_merge($actions, $originalActions);\n }\n\n return $actions;\n }", "protected function get_bulk_actions()\n {\n }", "protected function get_bulk_actions()\n {\n }", "public function xactions() {\n\t\t\n\t\t/* Load Model */\n\t\t$actions = $this->getModel ( 'action' );\n\t\t\n\t\t/* Get all rows */\n\t\t$actions->getAll ( 'form_id = \"' . $this->_getFormId () . '\"' );\n\t\t\n\t\tif (! count ( $actions->rows )) {\n\t\t\t$this->_redirect ( '_newAction' );\n\t\t\treturn;\n\t\t}\n\t\t/* set the view file (optional) */\n\t\t$this->setView ( 'actions' );\n\t\t\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t}", "public function getFrontEndActions();", "public function getActions(): array;", "public function get_bulk_actions() {\n\t\t$actions = array(\n\t\t\t'trash' => __( 'Move to Trash', 'wdaf' ),\n\t\t);\n\n\t\treturn $actions;\n\t}", "public function getActions(){\n\t\treturn $this->_on_click;\n\t }", "public function getActions()\n {\n $em = $this->getEntityManager();\n $query = $em->createQuery(\n \"SELECT p\n FROM Vlreleases\\UserBundle\\Entity\\Actions p\n WHERE p.screenStatus = '1'\"\n \n );\n $result = $query->getResult();\n \n return $result;\n }", "public function actions() {\n return array(\n 'toggle' => 'ext.jtogglecolumn.ToggleAction',\n 'switch' => 'ext.jtogglecolumn.SwitchAction', // only if you need it\n );\n }", "public static function returnActions() {\n }", "protected function get_bulk_actions() {\n\t\t// We don't want bulk actions, we have our own UI\n\t\treturn array();\n\t}", "public function actions(): array;", "function get_actions_data() {\n\t\t$actions_data = $this->get_meta( 'actions' );\n\t\treturn is_array( $actions_data ) ? array_map( [ $this, 'format_action_fields' ], $actions_data ) : [];\n\t}", "public function getActions(): array\n {\n return $this->actions;\n }", "public function getActions()\n {\n return self::$actionList;\n }", "public static function bulkActions() {\n return [\n static::BULK_ACTION_SETREAD => ['title' => \\Yii::t('app', 'خوانده شده')],\n static::BULK_ACTION_SETNOTREAD => ['title' => \\Yii::t('app', 'خوانده نشده')],\n static::BULK_ACTION_DELETE => ['title' => \\Yii::t('app', 'حذف')],\n ];\n }", "function _edit_row_actions($actions, $post){\n \n if(!in_array($post->post_status, array('publish', 'acf-disabled')))\n return $actions;\n \n $post_id = $post->ID;\n $name = $this->get_name($post_id);\n \n acfe_unset($actions, 'inline hide-if-no-js');\n \n // View\n $view = $this->edit_row_actions_view($post, $name);\n if($view)\n $actions['view'] = $view;\n \n // Tools\n foreach($this->tools as $action){\n \n $action_name = $action === 'php' ? 'PHP' : 'Json';\n $actions[$action] = '<a href=\"' . admin_url(\"edit.php?post_type=acf-field-group&page=acf-tools&tool={$this->tool}&action={$action}&keys={$name}\") . '\">' . $action_name . '</a>';\n \n }\n \n return $this->edit_row_actions($actions, $post);\n \n }", "function get_bulk_actions()\n {\n $actions = array(\n 'delete_selected' => 'Delete Selected',\n );\n return $actions;\n }", "protected function getActionsColumn($canView, $canRun, $canUpdate)\n {\n return function ($row) use($canView, $canRun, $canUpdate) {\n $btns = [];\n $html = app('html');\n if ($canView) {\n $btns[] = $html->create('li', $html->link(handles(\"antares::automation/show/\" . $row->id), trans('Show details'), ['data-icon' => 'desktop-windows']));\n }\n if ($canRun) {\n $btns[] = $html->create('li', $html->link(handles(\"antares::automation/run/\" . $row->id, ['csrf' => true]), trans('Run'), ['class' => \"triggerable confirm\", 'data-icon' => 'play-circle-outline', 'data-title' => trans(\"Are you sure?\"), 'data-description' => trans('Running job') . ' #' . $row->id]));\n }\n if ($canUpdate) {\n $btns[] = $html->create('li', $html->link(handles(\"antares::automation/edit/\" . $row->id), trans('Edit'), ['data-icon' => 'edit']));\n }\n if (empty($btns)) {\n return '';\n }\n $section = $html->create('div', $html->create('section', $html->create('ul', $html->raw(implode('', $btns)))), ['class' => 'mass-actions-menu'])->get();\n return '<i class=\"zmdi zmdi-more\"></i>' . $html->raw($section)->get();\n };\n }", "public static function mla_list_table_extranav_actions( $actions, $which ) {\r\n\t\tif ( 'bottom' === $which ) {\r\n\t\t\treturn $actions;\r\n\t\t}\r\n\r\n\t\t$new_actions = array();\r\n\t\tforeach ( $actions as $action ) {\r\n\t\t\tif ( 'mla_filter' === $action ) {\r\n\t\t\t\t$new_actions[] = 'author';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$new_actions[] = $action;\r\n\t\t}\r\n\t\t\r\n\t\tif ( count( $new_actions ) === count( $actions ) ) {\r\n\t\t\t$new_actions[] = 'author';\r\n\t\t}\r\n\t\t\r\n\t\treturn $new_actions;\r\n\t}", "protected function get_available_actions()\n {\n }", "protected function get_available_actions()\n {\n }", "public function getActionsAttribute()\n {\n return [\n 'id' => $this->id,\n 'beneficiary_id' => $this->beneficiary->id,\n 'cancel' => $this->state == 'PENDIENTE',\n 'approved' => $this->state == 'APROBADO',\n 'next' => __('app.selects.loan.state_next.' . $this->state),\n ];\n }", "public static function render_row_actions( $actions, $post ) {\n\t\t// Bailout\n\t\tif ( 'munim_estimate' !== $post->post_type ) {\n\t\t\treturn $actions;\n\t\t}\n\n\t\t$actions['view'] = sprintf( '<a href=\"%s\" target=\"_blank\">%s</a>', self::get_url( 'view' ), __( 'View', 'munim' ) );\n\t\t$actions['download'] = sprintf( '<a href=\"%s\">%s</a>', self::get_url( 'download' ), __( 'Download', 'munim' ) );\n\n\t\tif ( 'approved' === $post->post_status ) {\n\t\t\t$actions['generate_invoice'] = sprintf( '<a href=\"%s\" target=\"_blank\">%s</a>', self::get_url( 'generate_invoice' ), __( 'Generate Invoice', 'munim' ) );\n\t\t}\n\n\t\treturn $actions;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "public function get_bulk_actions() \n\t{\n\t\treturn $this->bulkActions;\n\t}", "public function get_bulk_actions() {\n\n\t\t\tif ( ! $this->bulk_actions_enabled ) {\n\t\t\t\t// Bulk actions disabled.\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif ( empty( $this->wpda_list_columns->get_table_primary_key() ) ) {\n\t\t\t\t// Tables has no primary key: no bulk actions allowed!\n\t\t\t\t// Primary key is neccesary to ensure uniqueness.\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\t$actions = [];\n\n\t\t\tif ( $this->allow_delete === 'on' ) {\n\t\t\t\t$actions = [\n\t\t\t\t\t'bulk-delete' => __( 'Delete Permanently', 'wp-data-access' ),\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$this->bulk_export_enabled && (\n\t\t\t\t\tWPDA::is_wpda_table( $this->table_name ) ||\n\t\t\t\t\tWPDA::get_option( WPDA::OPTION_BE_EXPORT_ROWS ) === 'on'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t$actions['bulk-export'] = __( 'Export to SQL', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-xml'] = __( 'Export to XML', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-json'] = __( 'Export to JSON', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-excel'] = __( 'Export to Excel', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-csv'] = __( 'Export to CSV', 'wp-data-access' );\n\t\t\t}\n\n\t\t\treturn $actions;\n\n\t\t}", "public function get_bulk_actions() {\n\t\t $actions = [\n\t\t \t'bulk-delete' => 'Delete',\n\t\t ];\n\n\t\t //return $actions;\n\t}", "public function getBatchActions()\n {\n return array();\n }", "public function actions();", "public function get_actions() {\n $actions = parent::get_actions();\n $assignaction = new deepsight_action_usersetuser_assign($this->DB, 'usersetuserassign');\n $assignaction->endpoint = (strpos($this->endpoint, '?') !== false)\n ? $this->endpoint.'&m=action' : $this->endpoint.'?m=action';\n array_unshift($actions, $assignaction);\n return $actions;\n }", "function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT) {\n\t\tif ( $column->getId() == 'title' ) {\n\t\t\treturn array();\n\t\t} elseif ($column->getId() == 'task') {\n\t\t\t$notification = $row->getData();\n\n\t\t\t$notificationMgr = new NotificationManager();\n\t\t\treturn array(new LinkAction(\n\t\t\t\t'details',\n\t\t\t\tnew RedirectAction(\n\t\t\t\t\t$notificationMgr->getNotificationUrl($request, $notification)\n\t\t\t\t),\n\t\t\t\t$notificationMgr->getNotificationMessage($request, $notification)\n\t\t\t));\n\t\t}\n\t\t// This should be unreachable.\n\t\tassert(false);\n\t}", "public function get_implemented_form_actions()\n {\n $actions = new TableFormActions(__NAMESPACE__, self::TABLE_IDENTIFIER);\n \n if ($this->get_component()->is_allowed(WeblcmsRights::EDIT_RIGHT))\n {\n $actions->add_form_action(\n new TableFormAction(\n $this->get_component()->get_url(\n array(Manager::PARAM_ACTION => Manager::ACTION_DOWNLOAD_SUBMISSIONS)), \n Translation::get('DownloadSubmissionsSelected'), \n false));\n }\n \n return $actions;\n }", "public function getBatchActions()\n {\n //$actions = parent::getBatchActions();\n\n\n $actions['check']= array('label' => $this->trans('action_check', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n $actions['visible']= array('label' => $this->trans('action_visible', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n\n return $actions;\n }", "public function getBatchActions()\n {\n //$actions = parent::getBatchActions();\n\n\n $actions['check']= array('label' => $this->trans('action_check', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n $actions['visible']= array('label' => $this->trans('action_visible', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n\n return $actions;\n }", "public function column_actions( $item ) {\n\t\t$actions = [];\n\n\t\tif ( Helper::get_module( 'redirections' ) ) {\n\t\t\t$this->add_redirection_actions( $item, $actions );\n\t\t}\n\n\t\t$actions['delete'] = sprintf(\n\t\t\t'<a href=\"%s\" class=\"rank-math-404-delete\">' . esc_html__( 'Delete', 'rank-math' ) . '</a>',\n\t\t\tHelper::get_admin_url(\n\t\t\t\t'404-monitor',\n\t\t\t\t[\n\t\t\t\t\t'action' => 'delete',\n\t\t\t\t\t'log' => $item['id'],\n\t\t\t\t\t'security' => wp_create_nonce( '404_delete_log' ),\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\n\t\treturn $this->row_actions( $actions );\n\t}", "public function get_actions() {\n $actions = parent::get_actions();\n $unassignaction = new deepsight_action_usersetuser_unassign($this->DB, 'usersetuserunassign');\n $unassignaction->endpoint = (strpos($this->endpoint, '?') !== false)\n ? $this->endpoint.'&m=action' : $this->endpoint.'?m=action';\n $unassignaction->condition = 'function(rowdata) { return (rowdata.canunassign == \\'0\\') ? false : true; }';\n array_unshift($actions, $unassignaction);\n return $actions;\n }", "public function get_bulk_actions()\n\t{\n\t\t$actions = array(\n\t\t\t'remove-items' => 'Remove Items',\n\t\t\t'process-items' => 'Process Items',\n\t\t);\n \t\treturn $actions;\n\t}", "public function get_actions() {\n $actions = get_post_meta( $this->post_id, '_wcs_actions', true );\n\n if ( ! $actions ) {\n return array();\n }\n\n return (array) $actions;\n }", "function get_bulk_actions() {\n\n\t\treturn $actions = array(\n\t\t\t'delete'\t=> 'Delete'\n\t\t);\n\t}", "public function getActionsAttribute()\n {\n return [\n 'id' => $this->id,\n 'cancel' => $this->concept == 'PENDIENTE',\n 'approved' => $this->concept == 'APROBADO',\n 'next' => __('app.selects.project.concept_next.' . $this->concept),\n ];\n }", "public function retrieveUserActions()\n {\n return $this->start()->uri(\"/api/user-action\")\n ->get()\n ->go();\n }", "public function actions(){\n $actions = parent::actions();\n unset($actions['index']);\n unset($actions['view']);\n unset($actions['create']);\n unset($actions['update']);\n unset($actions['delete']);\n return $actions;\n }", "public function getActions() {\n $translator = $this->getTranslator();\n\n $actions = array();\n if (!$this->isReadOnly) {\n $actions[self::ACTION_ADD] = $translator->translate($this->translationAdd);\n }\n $actions[''] = $translator->translate($this->translationOverview);\n\n return $actions;\n }", "function get_bulk_actions() {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }", "function get_bulk_actions() {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }", "public function getActionNames()\n {\n return $this->action_names;\n }", "protected function get_bulk_actions() {\n\n\t\t$actions = [];\n\n\t\tif ( current_user_can( wp_mail_smtp()->get_pro()->get_logs()->get_manage_capability() ) ) {\n\t\t\t$actions['delete'] = esc_html__( 'Delete', 'wp-mail-smtp-pro' );\n\t\t\t$actions['resend'] = esc_html__( 'Resend', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\treturn $actions;\n\t}", "function get_bulk_actions()\n {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }", "public function getActions($type = 'mzk\\DataGrid\\IAction')\n\t{\n\t\t$actions = new \\ArrayObject();\n\t\tforeach ($this->getColumns('mzk\\DataGrid\\Columns\\ActionColumn') as $column) {\n\t\t\tif ($column->hasAction()) {\n\t\t\t\tforeach ($column->getActions() as $action) {\n\t\t\t\t\tif ($action instanceof $type) {\n\t\t\t\t\t\t$actions->append($action);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $actions->getIterator();\n\t}", "function getActions($params=array(), $actions=null){\n\t\tif ( !is_array($params) ){\n\t\t\ttrigger_error(\"In Dataface_ActionTool::getActions(), expected parameter to be an array but received a scalar: \".$params.\".\".Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t}\n\t\t$app =& Dataface_Application::getInstance();\n\t\t\n\t\t$out = array();\n\t\t\n\t\t$tablename = null;\n\t\tif ( isset($params['table']) ) $tablename = $params['table'];\n\t\tif ( isset($params['record']) and is_a($params['record'], 'Dataface_Record') ) $tablename = $params['record']->_table->tablename;\n\t\telse if ( isset($params['record']) and is_a($params['record'], 'Dataface_RelatedRecord')) $tablename = $params['record']->_record->_table->tablename;\n\t\t\n\t\tif ( isset( $params['record'] ) && is_a($params['record'], 'Dataface_Record') ){\n\t\t\t\t// we have received a record as a parameter... we can infer the table information\n\t\t\t$params['table'] = $params['record']->_table->tablename;\n\t\t} else if ( isset($params['record']) && is_a($params['record'], 'Dataface_RelatedRecord') ){\n\t\t\t// we have recieved a related record object... we can infer both the table and relationship information.\n\t\t\t$temp =& $params['record']->getParent();\n\t\t\t$params['table'] = $temp->_table->tablename;\n\t\t\tunset($temp);\n\t\t\t\n\t\t\t$params['relationship'] = $params['record']->_relationshipName;\n\t\t}\n\t\t\n\t\tif ( @$params['relationship']){\n\t\t\tif ( strpos($params['relationship'], '.') !== false ){\n\t\t\t\t// if the relationship is specified in the form 'Tablename.RElationshipname' parse it.\n\t\t\t\tlist($params['table'],$params['relationship']) = explode('.', $params['relationship']);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $tablename !== null ){\n\t\t\t// Some actions are loaded from the table's actions.ini file and must be loaded before we return the actions.\n\t\t\t$table =& Dataface_Table::loadTable($tablename);\n\t\t\tif ( !$table->_actionsLoaded ){\n\t\t\t\t$tparams = array();\n\t\t\t\t$table->getActions($tparams, true);\n\t\t\t}\n\t\t\tunset($table);\n\t\t}\n\t\t\n\t\t\n\t\tif ( $actions === null ) $actions = $this->actions;\n\t\tforeach ( array_keys($actions) as $key ){\n\t\t\tif ( isset($action) ) unset($action);\n\t\t\t$action =& $actions[$key];\n\t\t\t\n\t\t\tif ( @$params['name'] and @$params['name'] !== @$action['name']) continue;\n\t\t\tif ( @$params['id'] and @$params['id'] !== @$action['id']) continue;\n\t\t\t\n\t\t\tif ( isset($params['category']) and $params['category'] !== @$action['category']) continue;\n\t\t\t\t// make sure that the category matches\n\t\t\t\n\t\t\tif ( @$params['table'] /*&& @$action['table']*/ && !(@$action['table'] == @$params['table'] or @in_array(@$params['table'], @$action['table']) )) continue;\n\t\t\t\t// Filter actions by table\n\t\t\t\t\n\t\t\tif ( @$params['relationship'] && @$action['relationship'] && @$action['relationship'] != @$params['relationship']) continue;\n\t\t\t\t// Filter actions by relationship.\n\t\t\t\t\n\t\t\tif ( @$action['condition'] and !$app->testCondition($action['condition'], $params) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( isset($params['record']) ){\n\t\t\t\tif ( isset($action['permission']) and !$params['record']->checkPermission($action['permission']) ){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isset( $action['permission'] ) and !$app->checkPermission($action['permission'])){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( @$action['selected_condition'] ) $action['selected'] = $app->testCondition($action['selected_condition'], $params);\n\t\t\t\n\t\t\tif ( isset($action['visible']) and !$action['visible']) continue;\n\t\t\t\t// Filter based on a condition\n\t\t\tforeach (array_keys($action) as $attribute){\n\t\t\t\t// Some entries may have variables that need to be evaluated. We use Dataface_Application::eval()\n\t\t\t\t// to evaluate these entries. The eval method will replace variables such as $site_url, $site_href\n\t\t\t\t// $dataface_url with the appropriate real values. Also if $params['record'] contains a \n\t\t\t\t// Record object or a related record object its values are treated as php variables that can be \n\t\t\t\t// replaced. For example if a Profile record has fields 'ProfileID' and 'ProfileName' with\n\t\t\t\t// ProfileID=10 and ProfileName = 'John Smith', then:\n\t\t\t\t// $app->parseString('ID is ${ProfileID} and Name is ${ProfileName}') === 'ID is 10 and Name is John Smith'\n\t\t\t\t//if ( strpos($attribute, 'condition') !== false) continue;\n\t\t\t\tif ( eregi('condition',$attribute) ) continue;\n\t\t\t\t\n\t\t\t\t//if ( isset($action[$attribute.'_condition']) and !$app->testCondition($action[$attribute.'_condition'], $params) ){\n\n\t\t\t\t\t//$action[$attribute] = null;\n\t\t\t\t//} else {\n\t\t\t\t\t$action[$attribute] = $app->parseString($action[$attribute], $params);\n\t\t\t\t//}\n\t\t\t}\n\t\t\t\n\t\t\t$out[$key] =& $action;\n\t\t\t\n\t\t\tunset($action);\n\t\t}\n\t\t\n\t\tuasort($out, array(&$this, '_compareActions'));\n\t\treturn $out;\n\t}", "function get_bulk_actions()\n {\n $actions = array(\n\n 'delete' => 'Delete',\n );\n return $actions;\n }", "public function get_bulk_actions() {\r\n\t\t$actions = [\r\n\t\t\t'bulk-delete' => 'Delete'\r\n\t\t];\r\n\r\n\t\treturn $actions;\r\n\t}", "public static function getActions()\n\t{\n\t\t$user\t= JFactory::getUser();\n\t\t$result\t= new JObject;\n\n\t\t$actions = array(\n\t\t\t'core.admin', 'core.manage'\n\t\t);\n\n\t\tforeach ($actions as $action) {\n\t\t\t$result->set($action, $user->authorise($action, 'com_repair'));\n\t\t}\n\n\t\treturn $result;\n\t}", "public function actions()\n {\n return [\n 'grid-sort' => [\n 'class' => SortableGridAction::className(),\n 'modelName' => $this->modelClass,\n ],\n ];\n }", "public function getAllActionsAttribute()\n\t{\n\t\t$output = array();\n\t\t//check if model has default permissions. if so, lets add them.\n\t\tif($defaults = config('alpacajs.model-permissions.'. class_basename($this), false)){\n\t\t\t$output = $defaults;\n\t\t} \n\t\t//check if model exist, if it does then check if it has actions.\n\t\tif($this->exists && $modelActions = $this->actions)\n\t\t{\n\t\t\t$output = array_merge($output, $modelActions);\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "protected function get_row_actions( $actions, $post ) {\n\t\t/* translators: %d: product ID. */\n\t\treturn array_merge( array( 'id' => sprintf( __( 'ID: %d', 'woocommerce' ), $post->ID ) ), $actions );\n\t}", "function getMainActions(){\n $step = $this->getStep($this->listing->user_id);\n $data=[];\n\n /**\n * Hide buttons when listing is not on steps\n */\n if(isset($step) && $step->date_end != '0000-00-00 00:00:00')\n {\n /**\n * APPROVE AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_ACTIVE)\n {\n $data[]=[\n /** Approve and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_approve_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_ACTIVE,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-approve action-btn',\n ];\n }\n /**\n * REJECT AND GO TO NEXT MATCHING LISTING IF EXISTS\n */\n if($this->listing->featured == \\Orm\\Model\\Listings\\Listings::NOT_FEATURED){\n if($this->listing->order->status != \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED || $this->listing->status != \\Orm\\Model\\Listings\\Listings::STATUS_DELETED)\n {\n $data[]=[\n /** REJECT and NEXT */\n 'title' => $this->app->lang->translate('admin_bar_reject_and_next'),\n 'cplink' => $this->app->urlFor('page.orders_express', ['id' => $this->listing->order->id, 'status' => \\Orm\\Model\\Orders\\Orders::STATUS_CANCELED,'set_domain'=>true]),\n 'class' => 'btn btn-default btn-reject action-btn',\n ];\n }\n }\n return $data;\n }\n }", "public function get_bulk_actions() {\n\t\t$actions = [\n\t\t\t'bulk-delete' => 'Delete'\n\t\t];\n\n\t\treturn $actions;\n\t}", "protected static function getActions()\n {\n return [\n CrudController::ACTION_ADD => 'created',\n CrudController::ACTION_DELETE => 'removed',\n CrudController::ACTION_DETAILS => 'displayed',\n CrudController::ACTION_EDIT => 'updated',\n CrudController::ACTION_HIDE => 'hidden',\n CrudController::ACTION_VIEW => 'displayed',\n CrudController::ACTION_UNHIDE => 'made visible',\n CrudController::ACTION_ENABLE => 'enabled',\n CrudController::ACTION_DISABLE => 'disabled',\n ];\n }" ]
[ "0.71152955", "0.7068351", "0.7040198", "0.6969407", "0.6774387", "0.67601895", "0.6721968", "0.6718471", "0.66951615", "0.66910017", "0.6621339", "0.6602876", "0.65955544", "0.6574045", "0.6574045", "0.6574045", "0.6561137", "0.6546914", "0.6538931", "0.65266514", "0.65127087", "0.651158", "0.6501818", "0.6498718", "0.64699876", "0.64647204", "0.64647204", "0.64647204", "0.64647204", "0.64647204", "0.64647204", "0.6451993", "0.6449585", "0.64483154", "0.64439684", "0.644272", "0.6437033", "0.6432996", "0.64088905", "0.6390476", "0.63870287", "0.63607705", "0.63469714", "0.63408446", "0.6339503", "0.6330996", "0.631882", "0.6315975", "0.6313264", "0.62994194", "0.6249138", "0.6243194", "0.6187003", "0.61825997", "0.61746305", "0.61746305", "0.6173833", "0.61563987", "0.6136008", "0.6136008", "0.6136008", "0.6136008", "0.6136008", "0.6136008", "0.61334157", "0.61285585", "0.6117398", "0.61172336", "0.6110219", "0.6102442", "0.6091812", "0.6091565", "0.60838556", "0.60838556", "0.6083046", "0.60803884", "0.606041", "0.6057204", "0.60396504", "0.6038029", "0.6035339", "0.6031738", "0.60177296", "0.60099584", "0.60074383", "0.59971046", "0.5992318", "0.59875023", "0.5984135", "0.5979041", "0.5976076", "0.59558386", "0.5939539", "0.59359443", "0.5928414", "0.59066135", "0.5906033", "0.59048134", "0.5904726" ]
0.6968442
5
Alias for the row actions.
public function actions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rowsAction() {\n parent::rowsAction();\n }", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "public static function rowActions($arguments)\n {\n $model = $arguments['model'];\n $request_role = $arguments['request_role'];\n $service = 'users:row_actions';\n\n /*-----------------------------------------------\n | Editor ...\n */\n service($service)\n ->add('edit')\n ->icon('pencil')\n ->trans(\"manage::forms.button.edit_info\")\n ->link(\"modal:manage/users/act/-hashid-/edit\")\n ->condition($model->canEdit())\n ->order(11)\n ;\n\n\n /*-----------------------------------------------\n | Change Password ...\n */\n service($service)\n ->add('password')\n ->icon('key')\n ->trans(\"users::forms.change_password\")\n ->link(\"modal:manage/users/act/-hashid-/password\")\n ->condition($model->canEdit())\n ->order(21)\n ;\n\n /*-----------------------------------------------\n | Role Management ...\n */\n service($service)\n ->add('roles')\n ->icon('user-circle')\n ->trans(\"users::permits.user_role\")\n ->link(\"modal:manage/users/act/-hashid-/roles\")\n ->condition($model->canPermit())\n ->order(31)\n ;\n\n /*-----------------------------------------------\n | Permits ...\n */\n if (static::isNotACombinedRole($request_role)) {\n service($service)\n ->add('permits')\n ->icon('shield')\n ->trans(\"users::permits.permit\")\n ->link(\"modal:manage/users/act/-hashid-/permits/$request_role\")\n ->condition($model->as($request_role)->canPermit())\n ->order(31)\n ;\n }\n\n /*-----------------------------------------------\n | Block / Unblock ...\n */\n if ($request_role != 'all') {\n $enabled = $model->as($request_role)->enabled();\n $action = $enabled ? 'block' : 'unblock';\n\n service($service)\n ->add('block')\n ->icon($enabled ? 'ban' : 'unlock')\n ->trans($enabled ? \"users::forms.block\" : \"users::forms.unblock\")\n ->link(\"modal:manage/users/act/-hashid-/block/$request_role/$action\")\n ->condition($enabled ? $model->canDelete() : $model->canBin())\n ->order(99)\n ;\n }\n\n /*-----------------------------------------------\n | Delete / Undelete ...\n */\n if ($request_role == 'all') {\n $enabled = !$model->trashed();\n $action = $enabled ? 'delete' : 'undelete';\n\n service($service)\n ->add('delete')\n ->icon($enabled ? 'trash' : 'undo')\n ->trans($enabled ? \"manage::forms.button.soft_delete\" : \"manage::forms.button.undelete\")\n ->link(\"modal:manage/users/act/-hashid-/delete/$action\")\n ->condition($enabled ? $model->canDelete() : $model->canBin())\n ->order(99)\n ;\n }\n\n\n /*\n |--------------------------------------------------------------------------\n | Login As\n |--------------------------------------------------------------------------\n |\n */\n if (dev()) {\n service($service)\n ->add('login_as')\n ->icon('bug')\n ->trans(\"users::forms.login_as\")\n ->link(\"modal:manage/users/act/-hashid-/login\")\n ->condition(!$model->isDeveloper() and $model->id != user()->id)\n ;\n }\n }", "protected function row_actions($actions, $always_visible = \\false)\n {\n }", "public function getRowActions() {\n\t\t\tif ( empty( $this->config ) ) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t$two_step = tve_leads_get_form_type( $this->config['l_id'], array( 'active_test' => true ) );\n\t\t\tif ( $two_step->active_test ) {\n\t\t\t\treturn sprintf(\n\t\t\t\t\t'<br>%s - <a href=\"%s\" target=\"_blank\" class=\"tve_link_no_warning\">%s</a>',\n\t\t\t\t\t__( 'A/B test in progress', 'thrive-leads' ),\n\t\t\t\t\tadmin_url( 'admin.php?page=thrive_leads_dashboard' ) . '#test/' . $two_step->active_test->id,\n\t\t\t\t\t__( 'View test', 'thrive-leads' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn sprintf(\n\t\t\t\t'<br><a href=\"%s\" target=\"_blank\" class=\"tve_link_no_warning\">%2$s</a>',\n\t\t\t\tadmin_url( 'admin.php?page=thrive_leads_dashboard' ) . '#2step-lightbox/' . $this->config['l_id'],\n\t\t\t\t__( 'Edit ThriveBox', 'thrive-leads' )\n\t\t\t);\n\t\t}", "public function page_row_actions($actions, $post)\n {\n }", "public function setRowActions(?array $rowActions = null)\n {\n if ($rowActions) {\n $this->rowActions = $rowActions;\n\n return;\n }\n\n // default row actions\n $this->rowActions = [\n 'name' => 'actions',\n 'orderable' => 'false',\n 'searchable' => 'false',\n 'width' => '60px',\n //@todo: provide template customization for row actions default labels\n 'links' => [\n [\n 'url' => ['action' => 'view', 'extra' => \"/' + obj.id + '\"],\n 'label' => '<li class=\"fas fa-search\"></li>',\n ],\n [\n 'url' => ['action' => 'edit', 'extra' => \"/' + obj.id + '\"],\n 'label' => '<li class=\"fas fa-pencil-alt\"></li>',\n ],\n [\n 'url' => ['action' => 'delete', 'extra' => \"/' + obj.id + '\"],\n 'type' => Datatables::LINK_TYPE_POST,\n 'confirm' => __('Are you sure you want to delete this item?'), // @todo go to class config\n 'label' => '<li class=\"far fa-trash-alt\"></li>',\n ],\n ],\n ];\n }", "function _edit_row_actions($actions, $post){\n \n if(!in_array($post->post_status, array('publish', 'acf-disabled')))\n return $actions;\n \n $post_id = $post->ID;\n $name = $this->get_name($post_id);\n \n acfe_unset($actions, 'inline hide-if-no-js');\n \n // View\n $view = $this->edit_row_actions_view($post, $name);\n if($view)\n $actions['view'] = $view;\n \n // Tools\n foreach($this->tools as $action){\n \n $action_name = $action === 'php' ? 'PHP' : 'Json';\n $actions[$action] = '<a href=\"' . admin_url(\"edit.php?post_type=acf-field-group&page=acf-tools&tool={$this->tool}&action={$action}&keys={$name}\") . '\">' . $action_name . '</a>';\n \n }\n \n return $this->edit_row_actions($actions, $post);\n \n }", "protected function bulk_actions($which = '')\n {\n }", "protected function handle_row_actions( $item, $column_name, $primary ) {\n\t\t\treturn '';\n\t\t}", "protected function appendActionsColumn()\n {\n// if (!$this->option('useActions')) {\n// return;\n// }\n $this->addColumn('__actions__', trans('admin.action'))\n ->displayUsing(Actions::class, [$this->actionsCallback]);\n }", "protected function handle_row_actions($item, $column_name, $primary)\n {\n }", "protected function handle_row_actions($item, $column_name, $primary)\n {\n }", "protected function handle_row_actions($item, $column_name, $primary)\n {\n }", "protected function handle_row_actions($item, $column_name, $primary)\n {\n }", "protected function handle_row_actions($item, $column_name, $primary)\n {\n }", "protected function handle_row_actions($item, $column_name, $primary)\n {\n }", "protected function handle_row_actions($item, $column_name, $primary)\n {\n }", "protected function handle_row_actions($item, $column_name, $primary)\n {\n }", "public function actions(Closure $actions): Column\n {\n $this->data('dt-actions', $actions)->class('visible-on-hover text-nowrap')->notSearchable()->notOrderable();\n\n return $this;\n }", "protected function handle_row_actions( $item, $column_name, $primary ) {\r\n\t\tif ( $primary === $column_name ) {\r\n\t\t\t$actions = $this->row_actions( $this->_build_rollover_actions( $item, $column_name ) );\r\n\t\t\t$actions .= $this->_build_inline_data( $item );\r\n\t\t\treturn $actions;\r\n\t\t}\r\n\r\n\t\treturn '';\r\n\t}", "protected function appendActionsColumn()\n {\n if (!$this->option('useActions')) {\n return;\n }\n\n $grid = $this;\n $callback = $this->actionsCallback;\n $column = $this->addColumn('__actions__', trans('admin.action'));\n\n $column->display(function ($value) use ($grid, $column, $callback) {\n $actions = new Actions($value, $grid, $column, $this);\n\n return $actions->display($callback);\n });\n }", "protected function column_default_add_action( $item, $column_name, &$actions ) { }", "public function admin_table_bulk_actions($actions)\n {\n }", "public function actions() {\n return array(\n 'toggle' => 'ext.jtogglecolumn.ToggleAction',\n 'switch' => 'ext.jtogglecolumn.SwitchAction', // only if you need it\n );\n }", "protected function getActionsColumn($canView, $canRun, $canUpdate)\n {\n return function ($row) use($canView, $canRun, $canUpdate) {\n $btns = [];\n $html = app('html');\n if ($canView) {\n $btns[] = $html->create('li', $html->link(handles(\"antares::automation/show/\" . $row->id), trans('Show details'), ['data-icon' => 'desktop-windows']));\n }\n if ($canRun) {\n $btns[] = $html->create('li', $html->link(handles(\"antares::automation/run/\" . $row->id, ['csrf' => true]), trans('Run'), ['class' => \"triggerable confirm\", 'data-icon' => 'play-circle-outline', 'data-title' => trans(\"Are you sure?\"), 'data-description' => trans('Running job') . ' #' . $row->id]));\n }\n if ($canUpdate) {\n $btns[] = $html->create('li', $html->link(handles(\"antares::automation/edit/\" . $row->id), trans('Edit'), ['data-icon' => 'edit']));\n }\n if (empty($btns)) {\n return '';\n }\n $section = $html->create('div', $html->create('section', $html->create('ul', $html->raw(implode('', $btns)))), ['class' => 'mass-actions-menu'])->get();\n return '<i class=\"zmdi zmdi-more\"></i>' . $html->raw($section)->get();\n };\n }", "protected function handle_row_actions( $item, $column_name, $primary ) {\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_row_actions', '', $item, $column_name, $primary );\n\t}", "function edit_row_actions_view($post, $name){\n \n return '<a href=\"' . admin_url(\"admin.php?page={$name}\") . '\">' . __('View') . '</a>';\n \n }", "public function bulk_actions( $which = '' ) {\n\t\t//edd_log_views();\n\t}", "public function xactions() {\n\t\t\n\t\t/* Load Model */\n\t\t$actions = $this->getModel ( 'action' );\n\t\t\n\t\t/* Get all rows */\n\t\t$actions->getAll ( 'form_id = \"' . $this->_getFormId () . '\"' );\n\t\t\n\t\tif (! count ( $actions->rows )) {\n\t\t\t$this->_redirect ( '_newAction' );\n\t\t\treturn;\n\t\t}\n\t\t/* set the view file (optional) */\n\t\t$this->setView ( 'actions' );\n\t\t\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t}", "private function row_imported( $row, $action = '' ) {\n\t\t$this->imported_rows[] = $row + 1;\n\t\tif ( $action && is_scalar( $action ) ) {\n\t\t\tif ( ! isset( $this->actions[ $action ] ) ) {\n\t\t\t\t$this->actions[ $action ] = 0;\n\t\t\t}\n\t\t\t$this->actions[ $action ]++;\n\t\t}\n\t}", "function get_bulk_actions( ) {\r\n\t\t$actions = array();\r\n\r\n\t\tif ( $this->is_trash ) {\r\n\t\t\t$actions['restore'] = __( 'Restore', 'media-library-assistant' );\r\n\t\t\t$actions['delete'] = __( 'Delete Permanently', 'media-library-assistant' );\r\n\t\t} else {\r\n\t\t\t$actions['edit'] = __( 'Edit', 'media-library-assistant' );\r\n\r\n\t\t\tif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {\r\n\t\t\t\t$actions['trash'] = __( 'Move to Trash', 'media-library-assistant' );\r\n\t\t\t} else {\r\n\t\t\t\t$actions['delete'] = __( 'Delete Permanently', 'media-library-assistant' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_bulk_actions', $actions );\r\n\t}", "public function getRow() {}", "public static function bulkActions() {\n return [\n static::BULK_ACTION_SETREAD => ['title' => \\Yii::t('app', 'خوانده شده')],\n static::BULK_ACTION_SETNOTREAD => ['title' => \\Yii::t('app', 'خوانده نشده')],\n static::BULK_ACTION_DELETE => ['title' => \\Yii::t('app', 'حذف')],\n ];\n }", "public function setActionOnSelectRow($action)\n {\n $this->_actionOnSelectRow = $action;\n }", "function correctiveAction($row) {\n if (!empty($row)) {\n $correctiveAction = new CorrectiveAction();\n foreach ($row as $key => $value) {\n $correctiveAction->$key = $value;\n }\n return $correctiveAction;\n }\n }", "public function column_actions( $item ) {\n\t\t$actions = [];\n\n\t\tif ( Helper::get_module( 'redirections' ) ) {\n\t\t\t$this->add_redirection_actions( $item, $actions );\n\t\t}\n\n\t\t$actions['delete'] = sprintf(\n\t\t\t'<a href=\"%s\" class=\"rank-math-404-delete\">' . esc_html__( 'Delete', 'rank-math' ) . '</a>',\n\t\t\tHelper::get_admin_url(\n\t\t\t\t'404-monitor',\n\t\t\t\t[\n\t\t\t\t\t'action' => 'delete',\n\t\t\t\t\t'log' => $item['id'],\n\t\t\t\t\t'security' => wp_create_nonce( '404_delete_log' ),\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\n\t\treturn $this->row_actions( $actions );\n\t}", "public function indexAction()\n {\n $source = new Entity(\"VipaUserBundle:User\");\n $grid = $this->get('grid');\n $gridAction = $this->get('grid_action');\n $grid->setSource($source);\n\n $passwordAction = new RowAction('<i class=\"fa fa-key\"></i>', 'vipa_admin_user_password');\n $passwordAction->setRouteParameters('id');\n $passwordAction->setAttributes(\n [\n 'class' => 'btn btn-info btn-xs',\n 'data-toggle' => 'tooltip',\n 'title' => $this->get('translator')->trans('title.password_change'),\n ]\n );\n\n $mergeAction = new RowAction('<i class=\"fa fa-compress\"></i>', 'vipa_admin_user_primary_merge');\n $mergeAction->setRouteParameters('id');\n $mergeAction->setAttributes(\n [\n 'class' => 'btn btn-primary btn-xs',\n 'data-toggle' => 'tooltip',\n 'title' => $this->get('translator')->trans('title.user_merge'),\n ]\n );\n\n $actionColumn = new ActionsColumn(\"actions\", 'actions');\n $rowAction[] = $gridAction->showAction('vipa_admin_user_show', 'id');\n $rowAction[] = $gridAction->editAction('vipa_admin_user_edit', 'id');\n $rowAction[] = $passwordAction;\n $rowAction[] = $mergeAction;\n $rowAction[] = $gridAction->userBanAction();\n\n $actionColumn->setRowActions($rowAction);\n $grid->addColumn($actionColumn);\n\n return $grid->getGridResponse('VipaAdminBundle:AdminUser:index.html.twig', ['grid' => $grid]);\n }", "function column_customer( $item ) {\n\n $actions = array();\n $actions['edit'] = sprintf( '<a href=\"%s\" data-id=\"%d\" title=\"%s\">%s</a>', admin_url( 'admin.php?page=' . $this->slug . '&action=edit&id=' . $item->id ), $item->id, __( 'Edit this item', 'wp-erp-ac' ), __( 'Edit', 'wp-erp-ac' ) );\n $actions['invoice'] = sprintf( '<a href=\"%s\" data-id=\"%d\" title=\"%s\">%s</a>', admin_url( 'admin.php?page=' . $this->slug . '&action=edit&id=' . $item->id ), $item->id, __( 'Create Bill', 'wp-erp-ac' ), __( 'Create Bill', 'wp-erp-ac' ) );\n $actions['expense'] = sprintf( '<a href=\"%s\" data-id=\"%d\" title=\"%s\">%s</a>', admin_url( 'admin.php?page=' . $this->slug . '&action=edit&id=' . $item->id ), $item->id, __( 'Create Expense', 'wp-erp-ac' ), __( 'Create Expense', 'wp-erp-ac' ) );\n $actions['delete'] = sprintf( '<a href=\"%s\" class=\"submitdelete\" data-id=\"%d\" title=\"%s\">%s</a>', admin_url( 'admin.php?page=' . $this->slug . '&action=delete&id=' . $item->id ), $item->id, __( 'Delete this item', 'wp-erp-ac' ), __( 'Delete', 'wp-erp-ac' ) );\n\n return get_avatar( $item->email, 32 ) . sprintf( '<a href=\"%1$s\"><strong>%2$s</strong></a> %3$s', admin_url( 'admin.php?page=' . $this->slug . '&action=view&id=' . $item->id ), $item->first_name . ' ' . $item->last_name, $this->row_actions( $actions ) );\n }", "function add_actions($item) {\n $actions = array(\n 'xpprove' => sprintf('<a href=\"?page=%s&action=%s&active=%d&id=%s\">Approve</a>',$_REQUEST['page'],'approve',$item->active,$item->ID),\n 'reject' => sprintf('<a href=\"?page=%s&action=%s&active=%d&id=%s\">Reject</a>',$_REQUEST['page'],'reject',$item->active,$item->ID),\n );\n if ( strcmp( $item->display_name,$item->user_login ) == 0 ) {\n return sprintf('%1$s %2$s', $item->user_login, $this->row_actions($actions) );\n } else {\n return sprintf('%1$s %2$s', $item->user_login.' ['.$item->display_name.'; ID '.$item->userID.']', $this->row_actions($actions) );\n }\n }", "public function talk_row_actions( $actions = array(), $talk = null ) {\n\t\t\tif ( empty( $talk ) || $talk->post_type != $this->post_type ) {\n\t\t\t\treturn $actions;\n\t\t\t}\n\n\t\t\t// No row actions in case downloading talks\n\t\t\tif ( ! empty( $this->downloading_csv ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $actions;\n\t\t}", "public static function render_row_actions( $actions, $post ) {\n\t\t// Bailout\n\t\tif ( 'munim_estimate' !== $post->post_type ) {\n\t\t\treturn $actions;\n\t\t}\n\n\t\t$actions['view'] = sprintf( '<a href=\"%s\" target=\"_blank\">%s</a>', self::get_url( 'view' ), __( 'View', 'munim' ) );\n\t\t$actions['download'] = sprintf( '<a href=\"%s\">%s</a>', self::get_url( 'download' ), __( 'Download', 'munim' ) );\n\n\t\tif ( 'approved' === $post->post_status ) {\n\t\t\t$actions['generate_invoice'] = sprintf( '<a href=\"%s\" target=\"_blank\">%s</a>', self::get_url( 'generate_invoice' ), __( 'Generate Invoice', 'munim' ) );\n\t\t}\n\n\t\treturn $actions;\n\t}", "protected function get_bulk_actions()\n {\n }", "protected function get_bulk_actions()\n {\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', 'LION' ) . '</a>';\n\n\treturn $actions;\n\n}", "function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT) {\n\t\tif ( $column->getId() == 'title' ) {\n\t\t\treturn array();\n\t\t} elseif ($column->getId() == 'task') {\n\t\t\t$notification = $row->getData();\n\n\t\t\t$notificationMgr = new NotificationManager();\n\t\t\treturn array(new LinkAction(\n\t\t\t\t'details',\n\t\t\t\tnew RedirectAction(\n\t\t\t\t\t$notificationMgr->getNotificationUrl($request, $notification)\n\t\t\t\t),\n\t\t\t\t$notificationMgr->getNotificationMessage($request, $notification)\n\t\t\t));\n\t\t}\n\t\t// This should be unreachable.\n\t\tassert(false);\n\t}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getRow();", "function get_bulk_actions()\n {\n $actions = array(\n 'delete_selected' => 'Delete Selected',\n );\n return $actions;\n }", "public function onEditHeaderButtonCallback(array $row, string $href, string $label, string $title, string $icon, string $attributes): string\n {\n return $this->generateButton($row, $href, $label, $title, $icon, $attributes, $this->permissionChecker->hasUserPermission(PermissionChecker::PERMISSION_EDIT));\n }", "protected function _action($name = null) {\n\t\treturn $this->_crud()->action($name);\n\t}", "private function add_actions()\n {\n }", "public function actions()\n {\n return [\n 'grid-sort' => [\n 'class' => SortableGridAction::className(),\n 'modelName' => $this->modelClass,\n ],\n ];\n }", "function editActions($item, $_options = false) {\n\t\tglobal $model;\n\n\t\t$_ = '';\n\n\t\t$_ .= '<ul class=\"actions\">';\n\t\t$_ .= $model->submit(\"Update\", array(\"class\" => \"primary key:s\", \"wrapper\" => \"li.save\"));\n\t\t$_ .= '</ul>';\n\n\t\treturn $_;\n\t}", "public function setActionOnDblClickRow($action)\n {\n $this->_actionOnDblClickRow = $action;\n }", "protected function getActions() {}", "function formatRow(){\n $this->hook('formatRow');\n }", "public function getBatchActions()\n {\n $actions = parent::getBatchActions();\n\n // PS : https://sonata-project.org/bundles/admin/2-0/doc/reference/batch_actions.html\n\n // check user permissions\n if($this->isGranted('EDIT') && $this->isGranted('DELETE')){\n $originalActions = $actions; // on copie les actions et les réinitialise pour mettre les actiosn 'valider' & 'dévalider' en premier\n $actions = array(); // on réinitilaise le tableau\n $actions['valider']=array(\n 'label' => 'Valider',\n 'ask_confirmation' => true // If true, a confirmation will be asked before performing the action\n );\n\n $actions['devalider']=array(\n 'label' => 'Dévalider',\n 'ask_confirmation' => true // If true, a confirmation will be asked before performing the action\n );\n\n $actions = array_merge($actions, $originalActions);\n }\n\n return $actions;\n }", "protected function getActionPrefix() {\n\t\treturn 'do';\n\t}", "public function register_actions() {\n\t\t}", "public static function returnActions() {\n return array(\n 'view' => 'Просмотр',\n 'moderate' => 'Доступ к модерированию',\n 'clear' => 'Полная очистка БД',\n );\n }", "public static function mla_list_table_extranav_actions( $actions, $which ) {\r\n\t\tif ( 'bottom' === $which ) {\r\n\t\t\treturn $actions;\r\n\t\t}\r\n\r\n\t\t$new_actions = array();\r\n\t\tforeach ( $actions as $action ) {\r\n\t\t\tif ( 'mla_filter' === $action ) {\r\n\t\t\t\t$new_actions[] = 'author';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$new_actions[] = $action;\r\n\t\t}\r\n\t\t\r\n\t\tif ( count( $new_actions ) === count( $actions ) ) {\r\n\t\t\t$new_actions[] = 'author';\r\n\t\t}\r\n\t\t\r\n\t\treturn $new_actions;\r\n\t}", "public function indexAction()\n {\n\n return parent::indexAction();\n\n\n }", "public function getRowUrl($row) {\n return $this->getUrl ( '*/*/edit', array (\n \n 'id' => $row->getId () \n ) );\n }", "function actions()\n {\n return array(\n 'block' =>array(\n 'class'=>'application.modules.admin.components.actions.BlockAction',\n 'modelClass'=>'ResFormulaTitle',\n 'message_block'=>Yii::t('infoMessages', 'Наименование оценочной формулы включено!'),\n 'errorMessage_block'=>Yii::t('infoMessages', 'Произошла ошибка при включении наименования оценочной формулы!'),\n 'message_unBlock'=>Yii::t('infoMessages', 'Наименование оценочной формулы выключено!'),\n 'errorMessage_unBlock'=>Yii::t('infoMessages', 'Произошла ошибка при выключении наименования оценочной формулы!'),\n ),\n 'markAsDeleted' =>array(\n 'class'=>'application.modules.admin.components.actions.MarkAsDeletedAction',\n 'modelClass'=>'ResFormulaTitle',\n 'message_mark'=>Yii::t('infoMessages', 'Наименование оценочной формулы удалено!'),\n 'errorMessage_mark'=>Yii::t('infoMessages', 'Произошла ошибка при удалении наименования оценочной формулы!'),\n ) \n );\n }", "function __buildActionSummary()\n {\n // Leverage the parent class method\n\n $table = parent::__buildActionSummary() ;\n\n $table->add_row(html_b(__(WPST_ACTION_ADD)),\n __('Add a job or volunteer position. Use this action to define\n a new job or position so it can be used to help run a swim team.')) ;\n $table->add_row(html_b(__(WPST_ACTION_UPDATE)),\n __('Update a job or volunteer position. Use this\n action to update the information for a job or position. Set\n a position to <b>Inactive</b> if it is no longer needed.')) ;\n $table->add_row(html_b(__(WPST_ACTION_DELETE)),\n __('Delete a job or volunteer position. Use this\n action to delete a position from the system. Deleting a\n job will also delete any job allocations or job assignments\n effectively erasing it from the system. Set a position to\n Inactive if it is no longer needed.')) ;\n $table->add_row(html_b(__(WPST_ACTION_ALLOCATE)),\n __('Allocate a job to a season or one or more swim meets. Jobs\n must be allocated before users can be assigned to them. The\n process of allocating a job determines how many of a specific\n job is required for a season or a meet.')) ;\n $table->add_row(html_b(__(WPST_ACTION_REALLOCATE)),\n __('Change how a job is allocated against a season or meet. If\n reallocating a job decreases the quantity, existing assigments\n may be deleted depending on whether or not they have been filled\n or not. When increasing the quantity, new job assigments are\n added to the existing assignments.')) ;\n $table->add_row(html_b(__(WPST_ACTION_DEALLOCATE)),\n __('Remove all allocations of a job from a season or meet. When\n deallocating a job, any existing job assignments are also removed.')) ;\n\n return $table ;\n }", "function actions() {\n return array(\n 'delete' => array(\n 'class' => 'DeleteAction',\n 'modelClass' => 'User'\n )\n );\n }", "protected function get_row_actions( $actions, $post ) {\n\t\t/* translators: %d: product ID. */\n\t\treturn array_merge( array( 'id' => sprintf( __( 'ID: %d', 'woocommerce' ), $post->ID ) ), $actions );\n\t}", "public function import()\n {\n return !empty($this->configs['rows_edit']) && $this->configs['rows_edit'] == 1 ? self::rows() : 'files.rows.table_import';\n }", "function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }", "function escape_get_view_actions() {\n return array('view','view all');\n}", "public function getActionName(){ }", "private function actions()\n {\n }", "function modify_list_row_actions( $actions, $post ) {\n\t\tif ( $post->post_type == BF_Episode::POST_TYPE ) {\n\n\n\t\t\t$status = get_post_meta( $post->ID, Unity3_Audio_Transcription::PM_STATUS, true );\n\t\t\t$has_transcription = $status === 'COMPLETED';\n\t\t\t$visibility = get_post_meta( $post->ID, Unity3_Audio_Transcription::PM_VISIBILITY, true );\n\t\t\t$str_visibility = 'public' === $visibility ? 'Public' : 'Private';\n\n\t\t\t$actions = array(\n\t\t\t\t'transcription' => sprintf( '<a href=\"%1$s\">%2$s</a>',\n\t\t\t\t\t$has_transcription ? esc_url( admin_url('admin.php?page=aht-transcription&aht_post_id=' . $post->ID) ) : '#',\n\t\t\t\t\t( $has_transcription ? ( 'Edit Transcription - ' . $str_visibility ) : 'No Transcription' )\n\t\t\t));\n//\t\t\tunset( $actions['trash'] );\n//\t\t\tunset( $actions['inline hide-if-no-js'] );\n//\t\t\tunset( $actions['view'] );\n\t\t}\n\n\t\treturn $actions;\n\t}", "public function render()\n {\n return view('components.table-view-action');\n }", "abstract protected function getRow($row);", "public function changeRowData(&$row){}", "public function get_row();", "public function showclientajax()\n {\n return DataTables::of(Client::query())->addColumn('action', function ($id) {\n return '<a href=\"editclient/' . $id->id . '\" class=\"btn btn-primary\">Edit</a>\n <a href=\"deleteclient/' . $id->id . '\" class=\"btn btn-danger\">Delete</a>\n ';})->make(true);\n }", "function aspirelists_get_view_actions() {\n return array('view', 'view all');\n}", "function get_bulk_actions() {\n\n\t\treturn $actions = array(\n\t\t\t'delete'\t=> 'Delete'\n\t\t);\n\t}", "public function actions(Request $request)\n {\n return [\n //(new TestActionn())->showOnTableRow(),\n ];\n }", "public function btnActions()\n {\n return view('viewers.meter.buttons.actions', ['meter' => $this->entity]);\n }", "function getActRow($act, $aval, $create = false) {\n\tif ($create) { // Init fields if row creation\n\t\t$aval['address'] = \"\";\n\t\t$aval['method'] = \"PUT\";\n\t\t$aval['body'] = \"\";\n\t} else {\n\t\techo \"<TR>\";\n\t}\n\tdisplay_td_checkbox(\"act\", $act, \"asel\");\n\techo \"<TD>\";\n\techo \"<INPUT TYPE=text ID=aaddr$act VALUE=\\\"\" . $aval['address'] . \"\\\" CLASS=ui-corner-all>\";\n\techo \"<TD>\";\n\tselMethod(\"sbact_\" . $act, $aval['method']);\n\techo \"<TD>\";\n\techo \"<INPUT TYPE=text ID=abody$act VALUE=\\\"\";\n\t$comma = \"\";\n\tif ($aval['body'] != \"\") {\n\t\tforeach ($aval['body'] as $key => $val) {\n\t\t\techo $comma . \"&quot;$key&quot;:&quot;$val&quot;\";\n\t\t\t$comma = \", \";\n\t\t}\n\t}\n\techo \"\\\" CLASS=ui-corner-all>\\n\";\n}", "protected function getAction() {}", "public function getEvents(){\n \n return Datatables::of(Event::query())\n ->setRowData([\n 'data-id' => function($user) {\n return 'row-' . $user->id;\n },\n 'data-name' => function($user) {\n return 'row-' . $user->name;\n },\n ])\n\n ->setRowId('{{$id}}')\n\n ->setRowAttr( ['align' => 'center'])\n \n ->addColumn('interresse', function($event){\n return $event->users()->count();\n } )\n ->editColumn('date_debut', function($event){\n return Carbon::parse($event->date_debut)->diffForHumans();\n } )\n ->editColumn('duree', function($event){\n return (Carbon::parse($event->date_debut)->diffInDays(Carbon::parse($event->date_fin)));\n } )\n ->addColumn('action', function ($user) {\n return '<a href=\"#edit-'.$user->id.'\" class=\"btn btn-xs btn-primary\"><i class=\"glyphicon glyphicon-edit\"></i> Edit</a>';\n })\n \n ->editColumn('action' , function($evenement){\n $description = $evenement->description;\n $nom = $evenement->nom;\n $data = [$nom , $description];\n $id = $evenement->id;\n $action = ' <button type=\"button\" id=\"Modifier\" class=\"btn btn-primary btn-sm \n \"data-nom =\" '.$nom.\n '\" data-desc = \"'.$description.\n '\" data-edition =\" '.$evenement->edition.\n '\" data-date_debut =\" '.$evenement->date_debut.\n '\" data-date_fin =\" '.$evenement->date_fin.\n '\" data-nombre_min_participant =\" '.$evenement->nombre_min_participant.\n '\" data-nombre_max_participant = \"'.$evenement->nomber_max_participant.\n '\" data-etat = \"'.$evenement->etat.\n '\"> <i class=\"fas fa-edit \"></i></button>';\n $action = $action.'<button type=\"button\" id=\"detail\" class=\"btn btn-info btn-sm detail\" data-nom = \"'.$nom.'\" data-desc = \"'.$description.'\"><i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i></button>';\n $action = $action.'<button type=\"button\" id=\"supprimer\" class=\"btn btn-danger btn-sm\" data-id = \"'.$evenement->id.'\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></button> ';\n $action = $action.'<button type=\"button\" id=\"notify\" class=\"btn btn-warning btn-sm\" data-id = \"'.$evenement->id.'\">Notifier</button> ';\n return $action;\n })\n ->rawColumns(['action'])\n ->toJson();\n \n }", "public function get_actions(): array;", "public function listActions() {\n return [\n new Action('Export', 'fa-download', URL::route('admin-'.$this->name().'-export'))\n ];\n }", "private function getRecordActions()\n {\n return array_filter($this->actions, function($item) {\n return in_array($item, array('show', 'edit'));\n });\n }", "public function annimalEditAction()\n {\n }" ]
[ "0.7046582", "0.6722085", "0.6722085", "0.6722085", "0.6722085", "0.6722085", "0.6722085", "0.6565014", "0.648004", "0.6265145", "0.6241173", "0.6213028", "0.6057626", "0.59533507", "0.58780235", "0.58719194", "0.58207095", "0.58207095", "0.58207095", "0.58207095", "0.5819136", "0.5819136", "0.58170754", "0.58170754", "0.5790448", "0.57204264", "0.56718904", "0.5655752", "0.5649527", "0.563508", "0.55981493", "0.5593654", "0.5560582", "0.54826695", "0.5448888", "0.5432499", "0.5410296", "0.539532", "0.5375358", "0.53241676", "0.5320845", "0.53126514", "0.53065467", "0.53064966", "0.5291337", "0.5276471", "0.52761453", "0.5274268", "0.52741486", "0.5265566", "0.5241643", "0.5238648", "0.5238648", "0.5238648", "0.5238648", "0.5238648", "0.5238648", "0.5223685", "0.5211399", "0.51984864", "0.51895624", "0.5189244", "0.51745194", "0.51627636", "0.51594335", "0.5137495", "0.5132507", "0.5131294", "0.5100575", "0.5096141", "0.50931627", "0.5091111", "0.5086567", "0.5081403", "0.5078374", "0.507458", "0.5065283", "0.50605685", "0.50593746", "0.50516546", "0.50509316", "0.5048171", "0.5045242", "0.5043325", "0.50330085", "0.50248206", "0.50174725", "0.50091493", "0.49999982", "0.49983573", "0.4992021", "0.4989569", "0.4987798", "0.49855408", "0.49792555", "0.4978593", "0.49775392", "0.49735025", "0.49661002", "0.49579942" ]
0.5437084
35
Check if the row has any actions.
public function hasActions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasAction()\n {\n return !is_null($this->_action);\n }", "public function hasChildActions() {}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "function Row_CustomAction($action, $row) {\n\n\t\t// Return FALSE to abort\n\t\treturn TRUE;\n\t}", "public function isEmpty(): bool\n {\n return $this->actions->isEmpty();\n }", "public function hasActions($type = NULL)\n\t{\n\t\treturn count($type == NULL ? $this->getActions() : $this->getActions($type)) > 0;\n\t}", "public function hasPendingActions()\r\n {\r\n }", "public function hasRowContents(){\n return $this->_has(1);\n }", "public function has_valid_action(): bool {\n\t\treturn is_string( $this->get_action() )\n\t\t&& \\mb_strlen( $this->get_action() ) > 0;\n\t}", "public function test_admin_delete_all_user_actions_when_user_has_no_action() {\n\n $this->actingAs($this->admin)\n ->post('/admin-center/users-manager/user/' . $this->user->id . '/delete-actions/all')\n ->seeJson([\n 'success' => true,\n 'message' => trans('users_manager.user_actions_deleted')\n ])\n ->notSeeInDatabase('user_actions', [\n 'user_id' => $this->user->id\n ]);\n }", "protected function get_available_actions()\n {\n }", "protected function get_available_actions()\n {\n }", "public function hasFirstaction(){\n return $this->_has(36);\n }", "public function checkActions() {\n if (isset($this->request_json->action)) {\n\n if (is_array($this->request_json->action)) {\n $this->request_json->action = array_pop($this->request_json->action);\n }\n $vars = array('data' => (array) $this->request_json);\n $this->hook('action_' . $this->request_json->action, $vars);\n exit;\n }\n }", "protected function row_actions($actions, $always_visible = \\false)\n {\n }", "public function hasCommitRow(){\n return $this->_has(3);\n }", "protected function executeActions($exists)\r\n {\r\n \r\n }", "abstract public function hasRow();", "public function hasRows()\n\t{\n\t\treturn count($this->getRows()) > 0;\n\t}", "private function rowsMustHaveAudits() {\n return\n $this->auditIDs ||\n $this->auditorPHIDs ||\n $this->auditAwaitingUser;\n }", "public function rowsAction() {\n parent::rowsAction();\n }", "private function getRecordActions()\n {\n return array_filter($this->actions, function($item) {\n return in_array($item, array('show', 'edit'));\n });\n }", "public function page_row_actions($actions, $post)\n {\n }", "public function hasResetRow(){\n return $this->_has(2);\n }", "public function isEmpty(): bool\n {\n return\n null === $this->exclude\n && empty($this->items)\n && empty($this->actions);\n }", "public function validateCatalogProductAttributeActions()\n {\n if (!$this->_role->getIsAll()) {\n $this->_forward();\n return false;\n }\n return true;\n }", "public function actions_empty(){\n\n // Empty the internal actions array\n $this->actions = array();\n\n // Return the resulting array\n return $this->actions;\n\n }", "public function test_admin_delete_all_user_actions_with_not_existent_user_id() {\n\n // Generate allowed actions\n factory(\\App\\UserAction::class, 3)->create(['user_id' => $this->user->id]);\n\n // Generate info actions\n factory(\\App\\UserAction::class, 'info', 4)->create(['user_id' => $this->user->id]);\n\n $this->actingAs($this->admin)\n ->post('/admin-center/users-manager/user/' . rand(1000, 9999) . '/delete-actions/all')\n ->seeJson([\n 'success' => false,\n 'message' => trans('users_manager.user_not_found')\n ]);\n }", "public function has($name)\n {\n return isset($this->actions[$name]);\n }", "public function isAction()\n {\n $args = func_get_args();\n foreach ($args as $arg)\n {\n // Check if action is set and exists\n if ($_POST['action'] == $arg || $_GET['action'] == $arg)\n {\n // quit here\n return true;\n }\n }\n\n return false;\n }", "public function hasAction(string $name): bool;", "public function xactions() {\n\t\t\n\t\t/* Load Model */\n\t\t$actions = $this->getModel ( 'action' );\n\t\t\n\t\t/* Get all rows */\n\t\t$actions->getAll ( 'form_id = \"' . $this->_getFormId () . '\"' );\n\t\t\n\t\tif (! count ( $actions->rows )) {\n\t\t\t$this->_redirect ( '_newAction' );\n\t\t\treturn;\n\t\t}\n\t\t/* set the view file (optional) */\n\t\t$this->setView ( 'actions' );\n\t\t\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t}", "public function hasRowKey(){\n return $this->_has(1);\n }", "public function hasRowKey(){\n return $this->_has(1);\n }", "public function hasRowKey(){\n return $this->_has(1);\n }", "public function valid()\n {\n return !empty($this->_currentRow);\n }", "public function hasRowCount(){\n return $this->_has(7);\n }", "public function has_async_action() {\n\t\treturn false;\n\t}", "function process_bulk_action() {\r\n if( 'apporve'===$this->current_action() ) {\r\n wp_die('Items deleted (or they would be if we had items to delete)!');\r\n }\r\n elseif( 'reject'===$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 }", "protected function getActions() {}", "public function access() {\n \treturn true;\n // return count($this->selectContentRowsToConvert());\n }", "function valid_action() {\n # of pages that are about that page (i.e. not admin\n # or recent changes)\n global $ACT;\n if($ACT == 'show') { return true; }\n if($ACT == 'edit') { return true; }\n if($ACT == 'revisions') { return true; }\n return false;\n }", "public function valid() {\n // TODO: Check numProcessed against itemlimit\n return !is_null($this->currentRow);\n }", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function getAdditionalActions() {}", "public function isButtonValidBrokenSetupMultiplePrimaryActionsGivenExpectFalse() {}", "public static function hasItems() {\n\t\treturn self::itemCount() > 0;\n\t}", "public function test_not_logged_in_user_delete_all_user_actions() {\n\n // Generate wrong format actions\n factory(\\App\\UserAction::class, 'wrong_format', 4)->create(['user_id' => $this->user->id]);\n\n // Generate not allowed actions\n factory(\\App\\UserAction::class, 'not_allowed', 13)->create(['user_id' => $this->user->id]);\n\n $this->post('/admin-center/users-manager/user/' . $this->user->id . '/delete-actions/all')\n ->assertEquals(17, \\App\\UserAction::where('user_id', $this->user->id)->count());\n }", "public function hasItems()\n {\n return $this->getItemsCount() > 0;\n }", "function actions()\n {\n return[];\n }", "protected function checkScreenAction() {}", "private function hasNoColumns() {\n if (count($this->columns) === 0) return true;\n\n\n if (count($this->columns) === 1 && isset($this->columns['*'])) {\n return true;\n }\n\n return false;\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function supportsAction($actions);", "public function canHaveTrigger() {\n // triggers because cards routinely end up in these columns through tag\n // edits rather than drag-and-drop and it would likely be confusing to\n // have these triggers act only a small fraction of the time.\n\n if ($this->isDefaultColumn()) {\n return false;\n }\n\n if ($this->getProxy()) {\n return false;\n }\n\n return true;\n }", "private function actionIsAvailable($actionName)\n {\n return isset($this->availableActions[$actionName]);\n }", "protected function assess_required_wp_actions() {\n\t\tglobal $phpEx, $user;\n\t\t\n\t\tif(defined('WPU_PHPBB_IS_EMBEDDED')) { // phpBB embedded in WP admin page\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$numActions = sizeof($this->integActions);\n\t\tif($numActions > 0) { \n\t\t\treturn $numActions;\n\t\t}\n\t\t\n\t\t\n\t\tif(!$this->is_wordpress_loaded()) {\n\t\t\t\n\t\t\t// Check for user integration-related actions\n\t\t\tif($this->get_setting('integrateLogin')) { \n\t\t\t\n\t\t\t\t// Is this a login/out page or profile update?\n\t\t\t\tif(preg_match(\"/\\/ucp\\.{$phpEx}/\", $_SERVER['REQUEST_URI'])) { \n\t\t\t\t\t\n\t\t\t\t\t$actionMode = request_var('mode', '');\t\n\t\t\t\t\t\n\t\t\t\t\tif($actionMode == 'logout') {\n\t\t\t\t\t\t$this->integActions[] = 'logout';\n\t\t\t\t\t//} else if($actionMode == 'login') { \n\t\t\t\t\t\t//$this->integActions[] = 'login';\n\t\t\t\t\t} else if(($actionMode == 'profile_info') || ($actionMode == 'reg_details') || ($actionMode == 'avatar')) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$didSubmit = request_var('submit', '');\n\t\t\t\t\t\tif(!empty($didSubmit)) {\n\t\t\t\t\t\t\t$this->integActions[] = 'profile';\n\t\t\t\t\t\t\t$this->integActionsFor = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t// Or is it an admin editing a user's profile?\n\t\t\t\t} else if(defined('ADMIN_START')) {\n\t\t\t\t\n\t\t\t\t\t$didSubmit = request_var('update', '');\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($didSubmit)) {\n\t\t\t\t\t\t$actionMode = request_var('mode', '');\n\t\t\t\t\t\t$wpuActionsFor = (int)request_var('u', '');\n\t\t\t\t\t\tif(!empty($wpuActionsFor) && (($actionMode == 'profile') || ($actionMode == 'overview') || ($actionMode == 'profile'))) {\n\t\t\t\t\t\t\t$this->integActions[] = 'profile';\n\t\t\t\t\t\t\t$this->integActionsFor = $wpuActionsFor;\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\t// Check for template integration-related actions:\n\t\t\tif ($this->get_setting('showHdrFtr') == 'REV') {\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * We don't want to run template integration on an ACP page, unless this is the login message box.\n\t\t\t\t * However we need to decide whether to run wordpress now, before $user exists. So we have to pre-load the session\n\t\t\t\t * As it's only run on admin pages, it's not much of a bother even on busy forums.\n\t\t\t\t * TODO: In future, we could add a core file edit to adm/index.php to defer the decision if this is considered too ugly\n\t\t\t\t */\n\t\t\t\t$inAdmin = false;\n\t\t\t\tif(defined('ADMIN_START')) {\n\t\t\t\t\t$user->session_begin();\n\t\t\t\t\t if(isset($user->data['session_admin']) && $user->data['session_admin']) {\n\t\t\t\t\t\t$inAdmin = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!$inAdmin) {\n\t\t\t\t\t$this->integActions[] = 'template-p-in-w';\n\t\t\t\t}\t\n\t\t\t}\n\t\t\n\t\t\n\t\t// if wordpress is loaded, we're only interested if this is a forward integration\n\t\t} else {\n\t\t\tif ($this->get_setting('showHdrFtr') == 'FWD') {\n\t\t\t\t$this->integActions[] = 'template-w-in-p';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sizeof($this->integActions);\n\t}", "public function valid()\n\t{\n\t\treturn $this->row !== NULL;\n\t}", "public function validateCustomerAttributeActions()\n {\n $actionName = $this->getActionName();\n $attributeId = $this->_request->getParam('attribute_id');\n $websiteId = $this->_request->getParam('website');\n if (in_array($actionName, [self::ACTION_NEW, self::ACTION_DELETE])\n || in_array($actionName, [self::ACTION_EDIT, self::ACTION_SAVE])\n && !$attributeId\n || $websiteId\n && !$this->_role->hasWebsiteAccess($websiteId, true)\n ) {\n $this->_forward();\n return false;\n }\n return true;\n }", "public function isEditAction() {}", "public function hasExcecuted()\n {\n return $this->executed;\n }", "public function has_items() {\n global $DB;\n if (!is_null($this->cards)) {\n return !empty($this->cards);\n }\n $result = $DB->count_records('swipe_item', array('swipeid' => $this->cm->instance));\n return !empty($result);\n }", "public function isShowActions()\n {\n return $this->isShowActions;\n }", "public function hasOp() {\n return $this->_has(1);\n }", "protected function handle_row_actions( $item, $column_name, $primary ) {\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_row_actions', '', $item, $column_name, $primary );\n\t}", "public function hasColumns(){\n return $this->_has(3);\n }", "public function hasOperations()\n\t{\n\t\treturn count($this->operations) > 0;\n\t}", "public function actionExist ($actionName) {\n\t\treturn method_exists($this, 'process'.$actionName);\n\t}", "protected function checkIsThereAnyDataToGenerate()\n {\n if (count($this->commandData->fields) > 3) {\n return true;\n }\n }", "function isEmpty () {\r\n foreach ($this->edits as $edit) {\r\n if ($edit->type != 'copy')\r\n return false;\r\n }\r\n return true;\r\n }", "protected function bulk_actions($which = '')\n {\n }", "public function get_actions(): array;", "function is_empty() {\n\t\treturn !$this->count();\n\t}", "private function tableIsEmpty(){\r\n\t\tglobal $TABLEAFILIADOS;\r\n\t\t$sqlquery=\"SELECT * from `$TABLEAFILIADOS`;\";\r\n\t\t$result=mysql_query($sqlquery);\r\n\t\t$int_numRows = mysql_num_rows($result);\r\n\t\tif ($int_numRows==0){\t\t\t\r\n\t\t\treturn true;\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected function shouldExecute()\n {\n return !$this->job->isDryRun() || $this->get('executeInPreview');\n }", "public function triggered()\n {\n Log::debug('user_action always returns true.');\n\n return true;\n }", "public function isEmpty()\n {\n \treturn 0 == $this->getItemCount();\n }", "public function questActions($questid)\n {\n $query = $this->dbh->prepare('SELECT `step1`,`step2`,`step3`,`step4`,`step5`,\n `requiredLevel`,`requiredQuest`,`questname`,`mobid` FROM `quest_actions`\n WHERE `questid` = ?');\n $query->execute(array($questid));\n \n // false = non existing quest\n // true = fetches the actions as an object\n return ($query->rowCount() == 0) ? false : $query->fetch(PDO::FETCH_OBJ);\n }", "public function manageNotFoundExecutableAction()\n {\n $responses = $this->triggerEvent(__FUNCTION__ . '.normalAction');\n return !$responses->stopped() && $this->flowEvaluator->attemptResume();\n }", "protected function get_bulk_actions()\n {\n }", "protected function get_bulk_actions()\n {\n }", "public function test_normal_user_delete_all_user_actions() {\n\n // Generate info actions\n factory(\\App\\UserAction::class, 'info', 4)->create(['user_id' => $this->user->id]);\n\n // Generate wrong format actions\n factory(\\App\\UserAction::class, 'wrong_format', 4)->create(['user_id' => $this->user->id]);\n\n $this->actingAs(factory(\\App\\User::class)->create())\n ->post('/admin-center/users-manager/user/' . $this->user->id . '/delete-actions/all')\n ->assertEquals(8, \\App\\UserAction::where('user_id', $this->user->id)->count());\n }", "public function visitRow(WPTableRow $row)\n {\n return true;\n }", "public function hasCell(){\n return $this->_has(1);\n }", "function isAllowedAction($action) {\n\t\t\treturn true;\n\t\t}", "public function test_admin_delete_all_user_actions() {\n\n // Generate allowed actions\n factory(\\App\\UserAction::class, 3)->create(['user_id' => $this->user->id]);\n\n // Generate wrong format actions\n factory(\\App\\UserAction::class, 'wrong_format', 4)->create(['user_id' => $this->user->id]);\n\n $this->actingAs($this->admin)\n ->post('/admin-center/users-manager/user/' . $this->user->id . '/delete-actions/all')\n ->seeJson([\n 'success' => true,\n 'message' => trans('users_manager.user_actions_deleted')\n ])\n ->notSeeInDatabase('user_actions', [\n 'user_id' => $this->user->id\n ]);\n }", "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 }", "public function getActions();", "public function getActions();" ]
[ "0.67897725", "0.6630516", "0.6602548", "0.6602548", "0.6602548", "0.6602548", "0.6602548", "0.6602548", "0.65875715", "0.6537966", "0.65269905", "0.6336686", "0.61716855", "0.6106606", "0.6068278", "0.6068278", "0.59005845", "0.5882754", "0.5804234", "0.5792341", "0.576818", "0.56521845", "0.56473696", "0.5640474", "0.5609585", "0.5606792", "0.559209", "0.5590071", "0.55882806", "0.5563971", "0.55446476", "0.55326545", "0.551957", "0.54986286", "0.5478826", "0.5478628", "0.54755723", "0.54755723", "0.54755723", "0.5471978", "0.5465484", "0.5455282", "0.5447844", "0.54408306", "0.5435794", "0.543397", "0.5433917", "0.5387448", "0.5387448", "0.5387448", "0.5387448", "0.5387448", "0.5387448", "0.5382046", "0.5379392", "0.5375053", "0.53639823", "0.53569335", "0.535187", "0.53333664", "0.53266114", "0.53266114", "0.53266114", "0.53266114", "0.5325315", "0.5315453", "0.5308288", "0.5305567", "0.5303193", "0.52989537", "0.5295422", "0.52880466", "0.5286444", "0.5284449", "0.52716076", "0.52593243", "0.525902", "0.5238296", "0.52298117", "0.5226328", "0.52248687", "0.52240884", "0.52198756", "0.52170104", "0.5215558", "0.5213104", "0.52111", "0.5204214", "0.5202051", "0.5201124", "0.5196272", "0.51962614", "0.5196011", "0.5189614", "0.518293", "0.51798266", "0.5167731", "0.51590735", "0.5157482", "0.5157482" ]
0.74259025
0
Get the DomNode before which the signature should be injected. Return null if you want to append the signature to the root element
public function getAppendBeforeNode();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function locateSignature(\\DOMNode $node)\n {\n if ($node instanceof \\DOMDocument) {\n $doc = $node;\n $relativeTo = null;\n } else {\n $doc = $node->ownerDocument;\n $relativeTo = $node;\n }\n $xpath = new \\DOMXPath($doc);\n $xpath->registerNamespace('ds', self::NS_XMLDSIG);\n $query = './/ds:Signature';\n $nodes = $xpath->query($query, $relativeTo);\n if ($nodes->length > 0) {\n return $nodes->item(0);\n }\n\n return null;\n }", "public function insertBefore (DOMNode $newnode , $refnode = null) {}", "public function parentNode()\n {\n return new Element($this->node->parentNode);\n }", "public function & getRoot()\n\t{\n\t\t$r = null;\n\t\tforeach($this->m_document->childNodes as $c)\n\t\t{\n\t\t\tif($c->nodeType == XML_ELEMENT_NODE)\n\t\t\t{\n\t\t\t\t$r = new ZXmlTag($c);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(!$r)\n\t\t\t$r = new ZXmlTag($this->m_document);\n\n\t\treturn $r;\n\t}", "public function document()\n {\n return $this->DOM->getNode(0)->parentNode;\n }", "public function parentNode()\n {\n return null;\n }", "function getRoot ()\n\t{\n\t\treturn $this->doc->document_element();\n\t}", "public function previousSibling()\n {\n $node = $this->node->previousSibling;\n\n if ($node === null) {\n return null;\n }\n\n return new Element($node);\n }", "abstract protected function get_root_element();", "function &firstChild () {\r\n $ret = null;\r\n if (!count ($this->_children)) {\r\n return $ret;\r\n }\r\n return $this->_children[0];\r\n }", "public function &firstChild()\n {\n $ret = null;\n if (! count($this->_children)) {\n return $ret;\n }\n return $this->_children[0];\n }", "public function firstChild()\n {\n $node = $this->node->firstChild;\n\n if ($node === null) {\n return null;\n }\n\n return new Element($node);\n }", "public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)\n {\n $element = parent::getDOM($doc, $majorVersion, $minorVersion);\n if ($this->_login !== null) {\n $element->appendChild($this->_login->getDOM($element->ownerDocument));\n }\n if ($this->_nickname !== null) {\n $element->appendChild($this->_nickname->getDOM($element->ownerDocument));\n }\n return $element;\n }", "public function getBefore():? string;", "public function getFirstChild();", "public function parentTag(): ?string\n {\n return null;\n }", "public function getParentElement() {}", "public function getRootNode() {}", "public function previousNode(): ?Node\n {\n return $this->traverse('previous');\n }", "public function getRoot() : ElementInterface\n {\n return $this->root;\n }", "public function getRootWidget()\n {\n return $this->rootWidgetNode;\n }", "public function getPhpcrNode();", "final function getDocumentRootElement () { return new XDTNodeList($this->root); }", "protected function preVisitElement(Element $element)\n\t{\n\t\t$elementCodeBuffers = $this->codeBufferManager->getProperties($element);\n\t\t$elementProperties = $this->nodePropertyManager->getProperties($element);\n\t\t\n\t\tif($elementCodeBuffers->hasContent(CodeBufferCollection::TAG_NAME))\n\t\t{\n\t\t\t$name = $elementCodeBuffers->link(array(CodeBufferCollection::TAG_NAME));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$name = $element->getFullyQualifiedName();\n\t\t}\n\t\t\n\t\tif(!$element->hasChildren() && $element->isEmpty())\n\t\t{\n\t\t\t$this->output .= $elementCodeBuffers->link(array(CodeBufferCollection::TAG_BEFORE, CodeBufferCollection::TAG_SINGLE_BEFORE));\n\t\t\t$this->output .= '<'.$name.$this->linkAttributes($element, $elementCodeBuffers, $elementProperties).' />';\n\t\t\t$this->output .= $elementCodeBuffers->link(array(CodeBufferCollection::TAG_SINGLE_AFTER, CodeBufferCollection::TAG_AFTER));\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->output .= $elementCodeBuffers->link(array(CodeBufferCollection::TAG_BEFORE, CodeBufferCollection::TAG_OPENING_BEFORE));\n\t\t\t$this->output .= '<'.$name.$this->linkAttributes($element, $elementCodeBuffers, $elementProperties).'>';\n\t\t\t$this->output .= $elementCodeBuffers->link(array(CodeBufferCollection::TAG_OPENING_AFTER, CodeBufferCollection::TAG_CONTENT_BEFORE));\n\t\t\t\n\t\t\t$elementProperties->set('link:name', $name);\n\t\t\treturn $this->enqueue($element);\n\t\t}\n\t}", "static function prependHtmlDom($element, $html, $encoding = 'UTF-8')\n {\n if ($html == null) {\n return;\n }\n $elementDoc = $element->ownerDocument;\n\n $contentNode = self::makeContentNode($html);\n foreach ($contentNode->childNodes as $child) {\n $node = $elementDoc->importNode($child, true);\n if ($element->firstChild) {\n $element->insertBefore($node, $element->firstChild);\n } else {\n $element->appendChild($node);\n }\n }\n return $contentNode;\n }", "public static function getSecurityKey(\\DOMElement $signature)\n {\n $encryptedMethod = $signature->getElementsByTagNameNS(self::NS_XMLDSIG, 'SignatureMethod')->item(0);\n if (!is_null($encryptedMethod)) {\n $algorithm = $encryptedMethod->getAttribute('Algorithm');\n $keyInfo = $signature->getElementsByTagNameNS(self::NS_XMLDSIG, 'KeyInfo')->item(0);\n if (!is_null($keyInfo)) {\n return self::getSecurityKeyFromKeyInfo($keyInfo, $algorithm);\n }\n }\n\n return null;\n }", "public function getSvgRoot()\n {\n return new \\View\\Svg\\Svg($this->firstChild);\n }", "public function setBefore(string $content): HtmlElementInterface;", "private static final function getHTMLHeadContainer () {\r\n // Return the <HTML><head> container;\r\n $containerHTMLHead = new FileContent (FORM_TP_DIR . _S . 'frm_web_html_head_container.tp');\r\n return $containerHTMLHead->doToken ('[%BASE_HREF_URL%]', DOCUMENT_HOST);\r\n }", "public function getParentNode() {}", "public function first () { return new XDTNodeList($this[0]); }", "public function getRootNode(){\n\t\tif(!$this->root_node) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->root_node;\n\t}", "public function getOriginalSecret()\n {\n if (! isset($this->originalSecret)) {\n $this->originalSecret = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getOriginalSecretQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->originalSecret;\n }", "public function insertBefore ($target) { \r\n\t\t\r\n\t\tif ($target = $this->process($target)) \r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tif (get_class() === 'XDTNodeList') $target[0]->parentNode->insertBefore($node, $target[0]);\r\n\t\t\t\telse $target->parentNode->insertBefore($node, $target);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "public function getSignature()\n {\n $headers = $this->getHeaders();\n return isset($headers['X-Hub-Signature']) ? $headers['X-Hub-Signature'] : null;\n }", "public function find_parent_by_tag($tag)\r\n\t{\r\n\t\t$node = $this->parent();\r\n\t\t\r\n\t\twhile($this->parent() != null\r\n\t\t\t&& !$node instanceof SBBCodeParser_Document)\r\n\t\t{\r\n\t\t\tif($node->tag() === $tag)\r\n\t\t\t\treturn $node;\r\n\t\t\t\r\n\t\t\t$node = $node->parent();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "private function createRootElement(): \\DOMElement {\n $attribute = [\n 'office:version' => '1.2',\n 'xmlns:office' => 'urn:oasis:names:tc:opendocument:xmlns:office:1.0',\n 'xmlns:style' => 'urn:oasis:names:tc:opendocument:xmlns:style:1.0',\n 'xmlns:text' => 'urn:oasis:names:tc:opendocument:xmlns:text:1.0',\n 'xmlns:table' => 'urn:oasis:names:tc:opendocument:xmlns:table:1.0',\n 'xmlns:draw' => 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0',\n 'xmlns:fo' => 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0',\n 'xmlns:xlink' => 'http://www.w3.org/1999/xlink',\n 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',\n 'xmlns:meta' => 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0',\n 'xmlns:number' => 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0',\n 'xmlns:svg' => 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0',\n 'xmlns:chart' => 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0',\n 'xmlns:dr3d' => 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0',\n 'xmlns:math' => 'http://www.w3.org/1998/Math/MathML',\n 'xmlns:form' => 'urn:oasis:names:tc:opendocument:xmlns:form:1.0',\n 'xmlns:script' => 'urn:oasis:names:tc:opendocument:xmlns:script:1.0',\n 'xmlns:ooo' => 'http://openoffice.org/2004/office',\n 'xmlns:ooow' => 'http://openoffice.org/2004/writer',\n 'xmlns:oooc' => 'http://openoffice.org/2004/calc',\n 'xmlns:dom' => 'http://www.w3.org/2001/xml-events',\n 'xmlns:rpt' => 'http://openoffice.org/2005/report',\n 'xmlns:of' => 'urn:oasis:names:tc:opendocument:xmlns:of:1.2',\n 'xmlns:xhtml' => 'http://www.w3.org/1999/xhtml',\n 'xmlns:grddl' => 'http://www.w3.org/2003/g/data-view#',\n 'xmlns:tableooo' => 'http://openoffice.org/2009/table',\n 'xmlns:css3t' => 'http://www.w3.org/TR/css3-text/',\n 'xmlns:xforms' => 'http://www.w3.org/2002/xforms',\n 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',\n 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',\n 'xmlns:field' => 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0',\n 'xmlns:formx' => 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'];\n\n $rootElement = $this->createNewElement('office:document-content', $attribute);\n $bodyElement = $this->createNewElement('office:body', $attribute);\n $textElement = $this->createNewElement('office:text');\n\n $this->getDocument()->appendChild($rootElement);\n $rootElement->appendChild($bodyElement);\n $bodyElement->appendChild($textElement);\n\n return $textElement;\n }", "public function domElement(\\DOMDocument &$aframe_dom): DOMElement;", "public function getDomDocument() {}", "static function getOuterXml($node)\n {\n return ($node == null) ? null : $node->ownerDocument->saveXML($node);\n }", "function getHead() {\n return '';\n // return $this->document->getHead();\n }", "public function end()\n {\n # attach internal tree to parent\n $this->parentNode->getNode()->addChild($this->getNode());\n \n return $this->parentNode; \n }", "public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)\n {\n $element = parent::getDOM($doc, $majorVersion, $minorVersion);\n if ($this->_login !== null) {\n $element->appendChild($this->_login->getDOM($element->ownerDocument));\n }\n if ($this->_name !== null) {\n $element->appendChild($this->_name->getDOM($element->ownerDocument));\n }\n if ($this->_quota !== null) {\n $element->appendChild($this->_quota->getDOM($element->ownerDocument));\n }\n foreach ($this->_feedLink as $feedLink) {\n $element->appendChild($feedLink->getDOM($element->ownerDocument));\n }\n return $element;\n }", "function domdoctoxpath($domdocinput) {\n //local variables clean themselves up, no need to unset.\n $newdomdoc = new SmartDOMDocument();\n $newdomdoc->appendChild($newdomdoc->importNode($domdocinput, true));\n $newxpathtable = new DOMXPath($newdomdoc);\n //DEBUG $image = $newdomdoc->saveHTMLExact();echo($image);\n return $newxpathtable;\n}", "public static function tag_remove_start() {\n\t//--\n\treturn '<!-- PDF REMOVE START -->';\n\t//--\n}", "public function handle(DOMDocument $xml, DOMNode $xmlRequest)\r\n {\r\n $canonicalizationPath = '//AuthSignature/*';\r\n $signaturePath = \"//*[@authenticate='true']\";\r\n $signatureMethodAlgorithm = 'sha256';\r\n $digestMethodAlgorithm = 'sha256';\r\n $canonicalizationMethodAlgorithm = 'REC-xml-c14n-20010315';\r\n $digestTransformAlgorithm = 'REC-xml-c14n-20010315';\r\n\r\n // Add AuthSignature to request.\r\n $xmlAuthSignature = $xml->createElement('AuthSignature');\r\n $xmlRequest->appendChild($xmlAuthSignature);\r\n\r\n // Add ds:SignedInfo to AuthSignature.\r\n $xmlSignedInfo = $xml->createElementNS('http://www.w3.org/2000/09/xmldsig#', 'ds:SignedInfo');\r\n $xmlAuthSignature->appendChild($xmlSignedInfo);\r\n\r\n // Add ds:CanonicalizationMethod to ds:SignedInfo.\r\n $xmlCanonicalizationMethod = $xml->createElement('ds:CanonicalizationMethod');\r\n $xmlCanonicalizationMethod->setAttribute('Algorithm', sprintf('http://www.w3.org/TR/2001/%s', $canonicalizationMethodAlgorithm));\r\n $xmlSignedInfo->appendChild($xmlCanonicalizationMethod);\r\n\r\n // Add ds:SignatureMethod to ds:SignedInfo.\r\n $xmlSignatureMethod = $xml->createElement('ds:SignatureMethod');\r\n $xmlSignatureMethod->setAttribute('Algorithm', sprintf('http://www.w3.org/2001/04/xmldsig-more#rsa-%s', $signatureMethodAlgorithm));\r\n $xmlSignedInfo->appendChild($xmlSignatureMethod);\r\n\r\n // Add ds:Reference to ds:SignedInfo.\r\n $xmlReference = $xml->createElement('ds:Reference');\r\n $xmlReference->setAttribute('URI', sprintf('#xpointer(%s)', $signaturePath));\r\n $xmlSignedInfo->appendChild($xmlReference);\r\n\r\n // Add ds:Transforms to ds:Reference.\r\n $xmlTransforms = $xml->createElement('ds:Transforms');\r\n $xmlReference->appendChild($xmlTransforms);\r\n\r\n // Add ds:Transform to ds:Transforms.\r\n $xmlTransform = $xml->createElement('ds:Transform');\r\n $xmlTransform->setAttribute('Algorithm', sprintf('http://www.w3.org/TR/2001/%s', $digestTransformAlgorithm));\r\n $xmlTransforms->appendChild($xmlTransform);\r\n\r\n // Add ds:DigestMethod to ds:Reference.\r\n $xmlDigestMethod = $xml->createElement('ds:DigestMethod');\r\n $xmlDigestMethod->setAttribute('Algorithm', sprintf('http://www.w3.org/2001/04/xmlenc#%s', $digestMethodAlgorithm));\r\n $xmlReference->appendChild($xmlDigestMethod);\r\n\r\n // Add ds:DigestValue to ds:Reference.\r\n $xmlDigestValue = $xml->createElement('ds:DigestValue');\r\n $canonicalizedHeader = $this->calculateC14N($this->prepareH004XPath($xml), $signaturePath, $canonicalizationMethodAlgorithm);\r\n $canonicalizedHeaderHash = CryptService::calculateHash($canonicalizedHeader, $digestMethodAlgorithm);\r\n $xmlDigestValue->nodeValue = base64_encode($canonicalizedHeaderHash);\r\n $xmlReference->appendChild($xmlDigestValue);\r\n\r\n // Add ds:SignatureValue to AuthSignature.\r\n $xmlSignatureValue = $xml->createElement('ds:SignatureValue');\r\n $canonicalizedSignedInfo = $this->calculateC14N($this->prepareH004XPath($xml), $canonicalizationPath, $canonicalizationMethodAlgorithm);\r\n $canonicalizedSignedInfoHash = CryptService::calculateHash($canonicalizedSignedInfo, $signatureMethodAlgorithm);\r\n $canonicalizedSignedInfoHashSigned = CryptService::cryptSignatureValue($this->keyRing, $canonicalizedSignedInfoHash);\r\n $canonicalizedSignedInfoHashSignedEn = base64_encode($canonicalizedSignedInfoHashSigned);\r\n $xmlSignatureValue->nodeValue = $canonicalizedSignedInfoHashSignedEn;\r\n $xmlAuthSignature->appendChild($xmlSignatureValue);\r\n }", "public function toDOM() {\n\t\treturn self::hashToDomDocument($this->toHash(), 'Tchat');\n\t}", "public function getOuterHtml()\n {\n return $this->getSession()->getDriver()->getOuterHtml($this->getXpath());\n }", "public function getRoot()\n {\n $root_id = $this->getField('RootID');\n if (! $root_id) {\n return null;\n }\n\n return DataObject::get_one('Gtkdoc', '\"Gtkdoc\".\"ID\" = ' . (int) $root_id);\n }", "protected function node_prefix() {\n return null;\n }", "public function getPrevSibling();", "public function getHeadElement()\n {\n return $this->head;\n }", "abstract function getAsElem($dom);", "public function getWrapperElement();", "public function getDomNode() {\n\t\treturn $this->domNode;\n\t}", "public function getSignature() {\n\t\treturn $this->signature;\n\t}", "final public function getParent() {\n\t\treturn $this->_parentNode;\n\t}", "public function toDomElement(DOMDocument $document): DOMElement\n {\n return $document->createElement('version', $this->getVersion());\n }", "function getXMLnode($sourcen, $node, $remove = 0)\n{\n\t//$sourcen = preg_replace('/\\s\\s/', '', $sourcen);\n\t$source = preg_replace(array('/\\n/', '/\\t/'), '', $sourcen);\n\t$return = array();\n\t$regex = '#&lt;'.preg_quote($node, '#').'( |&gt;).*&lt;\\/'.preg_quote($node, '#').'&gt;#';\n\tpreg_match($regex, $source, $return);\n\n\tif(empty($return))\n\t{\n\t\t$regex = '#\\<'.$node.'.*\\/\\>#';\n\t\tpreg_match($regex, $source, $return);\n\t}\n\t\n\tif ($remove == 1 && !empty($return)) {\n\t\t$return[0] = preg_replace('#&lt;[\\/]*'.$node.'&gt;#', '', $return[0]);\n\t}\n\t\n\treturn !empty($return) ? $return[0] : $sourcen;\n}", "public function getRTERootBlockElement()\n\t{\n\t}", "public function getSignatureHeader()\n {\n return $this->signature_header;\n }", "public function prepend ($content) {\r\n\t\t\r\n\t\tif ($this->length < 1) return null;\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $offset => $value) \r\n\t\t\tif ($value = $this->process($value)) \r\n\t\t\t\tforeach ($this as $node) \r\n\t\t\t\t\tif (get_class($value) === 'XDTNodeList') $node->insertBefore($value[0], $node->firstChild);\r\n\t\t\t\t\telse $node->insertBefore($value, $node->firstChild);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "function firstChild() {\n\t\t$children = $this->children();\n\t\tif (sizeof($children>0)) {\n\t\t\treturn $children[0];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "protected function get_body_node() {\n\t\t_deprecated_function( 'Use $this->dom->body instead', '1.5.0' );\n\t\treturn $this->dom->body;\n\t}", "public function getParentNode()\r\n {\r\n return $this->_parentNode ? $this->_parentNode : false;\r\n }", "public function getDocBlock()\n {\n $docblocks = $this->getDirectElementsByTagName($this->node, 'docblock');\n\n // if this method does not yet have a docblock; add one; even\n // though DocBlox throws a warning about a missing DocBlock!\n if (count($docblocks) < 1) {\n $docblock = new DOMElement('docblock');\n $this->node->appendChild($docblock);\n } else {\n /** @var DOMElement $docblock */\n $docblock = reset($docblocks);\n }\n\n return new DocBlox_Plugin_Core_Transformer_Behaviour_Inherit_Node_DocBlock(\n $docblock, $this->nodes\n );\n }", "public function prepend() {\n $num_of_args = func_num_args();\n if ( $num_of_args == 1 && gettype( func_get_arg( 0 ) ) == \"array\" ) {\n $args = func_get_arg( 0 );\n $num_of_args = count( $args );\n } else {\n $args = func_get_args();\n }\n for ( $i = 0; $i < $num_of_args; $i++ ) {\n $arg = $args[$i];\n if ( $arg instanceof AbstractHTMLElement ) {\n $arg = $arg->asHTML();\n }\n $this->content = $arg . $this->content;\n }\n return $this;\n }", "public function getRootNode() : Node\n {\n return $this->rootNode;\n }", "public function toDOM() {\n\t\treturn self::hashToDomDocument($this->toHash(), 'Factuurmaand');\n\t}", "function getSignature()\n {\n return $this->_signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "private function getWrapperNode(DOMXPath $xpath, DOMElement $node)\n {\n $content = $xpath->query('.//*[@data-element=\"wrapper\"]', $node);\n\n return $content->item(0);\n }", "public function getOpeningTag() {\n return $this->openingTag;\n }", "public function getSecurityToken()\n {\n return ($this->_widgetEditor->getForm() ? $this->_widgetEditor->getForm()->getSecurityToken() : null);\n }", "public function getRoot()\n {\n return $this->active->geContext()->getCurrentSiteNode();\n }", "function __setRoot() {\r\n\t\t$this->root = $this->domFragment->createElementNS(self :: TEXT, 'text:user-field-get');\r\n\t}", "public function getContentElement(): ?ContentElementInterface\n {\n return $this->getChildElement(1);\n }", "function currentElement()\n {\n return $this->current ? $this->current->parentNode : NULL;\n }", "function getActualNode(){\n\t\treturn $this->anode;\n\t}", "public static function addNodeToSignature(\\DOMElement $signature, \\DOMNode $node, $digestAlgorithm, $transformationAlgorithm, array $options = array())\n {\n $doc = $signature->ownerDocument;\n $signedInfo = $signature->getElementsByTagNameNS(self::NS_XMLDSIG, 'SignedInfo')->item(0);\n\n $idName = 'Id';\n if (isset($options['id_name'])) {\n $idName = $options['id_name'];\n }\n $idNamespace = null;\n if (isset($options['id_ns_prefix']) && isset($options['id_prefix_ns'])) {\n $idName = $options['id_ns_prefix'] . ':' .$idName;\n $idNamespace = $options['id_prefix_ns'];\n }\n $overwriteId = true;\n if (isset($options['overwrite_id'])) {\n $overwriteId = (bool) $options['overwrite_id'];\n }\n\n $uri = null;\n if ($node instanceof \\DOMElement) {\n $idAttributeValue = null;\n if ($overwriteId === false) {\n $idAttributeValue = $node->getAttributeNS($idNamespace, $idName);\n }\n if (empty($idAttributeValue)) {\n $idAttributeValue = 'Id-' . self::generateUUID();\n $node->setAttributeNS($idNamespace, $idName, $idAttributeValue);\n }\n $uri = '#' . $idAttributeValue;\n }\n\n $reference = $doc->createElementNS(self::NS_XMLDSIG, self::PFX_XMLDSIG . ':Reference');\n if (!is_null($uri)) {\n $reference->setAttribute('URI', $uri);\n }\n $signedInfo->appendChild($reference);\n\n $transforms = $doc->createElementNS(self::NS_XMLDSIG, self::PFX_XMLDSIG . ':Transforms');\n $reference->appendChild($transforms);\n\n $transform = $doc->createElementNS(self::NS_XMLDSIG, self::PFX_XMLDSIG . ':Transform');\n $transform->setAttribute('Algorithm', $transformationAlgorithm);\n $transforms->appendChild($transform);\n\n if ($transformationAlgorithm == self::XPATH && isset($options['xpath_transformation'])) {\n $xpath = $doc->createElementNS(self::NS_XMLDSIG, self::PFX_XMLDSIG.':XPath', $options['xpath_transformation']['query']);\n foreach ($options['xpath_transformation']['namespaces'] as $prefix => $value) {\n $xpath->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:' . $prefix, $value);\n }\n $transform->appendChild($xpath);\n } elseif (($transformationAlgorithm == self::EXC_C14N || $transformationAlgorithm == self::EXC_C14N_COMMENTS)\n && isset($options['inclusive_namespaces'])) {\n $inclusiveNamespaces = $doc->createElementNS(self::EXC_C14N, 'es:InclusiveNamespaces');\n $inclusiveNamespaces->setAttributeNS(self::EXC_C14N, 'PrefixList', implode(' ', $options['inclusive_namespaces']));\n $transform->appendChild($inclusiveNamespaces);\n }\n\n $digestMethod = $doc->createElementNS(self::NS_XMLDSIG, self::PFX_XMLDSIG . ':DigestMethod');\n $digestMethod->setAttribute('Algorithm', $digestAlgorithm);\n $reference->appendChild($digestMethod);\n\n $transformedData = self::processTransform($node, $transformationAlgorithm, $options);\n $digestValueString = self::calculateDigest($transformedData, $digestAlgorithm);\n $digestValue = $doc->createElementNS(self::NS_XMLDSIG, self::PFX_XMLDSIG . ':DigestValue', $digestValueString);\n $reference->appendChild($digestValue);\n\n return $reference;\n }", "public function getPrevHref(): ?TagInterface;", "function non_DOM_stripme($opening_tag_string) {\r\n\t\tpreg_match_all('/' . $opening_tag_string . '/is', $this->code, $matches, PREG_OFFSET_CAPTURE);\r\n\t\t$size = sizeof($matches[0]) - 1;\r\n\t\twhile($size > -1) {\r\n\t\t\t//print(\"matches[0][size][0]: \");var_dump($matches[0][$size][0]);\r\n\t\t\tpreg_match('/<(\\w+)/is', $matches[0][$size][0], $tagname_matches);\r\n\t\t\t$tagname = $tagname_matches[1];\r\n\t\t\t$OString = OM::getOString($this->code, '<' . $tagname, '</' . $tagname . '>', $matches[0][$size][1]);\r\n\t\t\t//print(\"strlen(matches[0][size][0]): \");var_dump(strlen($matches[0][$size][0]));\r\n\t\t\t$substr = substr($OString, strlen($matches[0][$size][0]), strlen($OString) - strlen($matches[0][$size][0]) - (strlen($tagname) + 3));\r\n\t\t\t//print(\"OString: \");var_dump($OString);\r\n\t\t\t//print(\"substr: \");var_dump($substr);\r\n\t\t\t//$this->code = str_replace($OString, $substr, $this->code);\r\n\t\t\t$this->code = substr($this->code, 0, $matches[0][$size][1]) . $substr . substr($this->code, $matches[0][$size][1] + strlen($OString));\r\n\t\t\t$size--;\r\n\t\t}\r\n\t}", "public function getDerivationElement(): ?ComplexContentDerivationElementInterface\n {\n return $this->getChildElement(1);\n }", "private function _preprocessDocument()\n {\n $xml = $this->getDocument();\n $xml = preg_replace('/<w:bookmarkStart w:id=\"[0-9]\" w:name=\"([0-9 A-Z _]*)\"/',\n self::$_templateSymbol . '${1}' . self::$_templateSymbol, $xml);\n return $xml;\n }", "public function getHTMLNode($xml, &$data) {\n\t\t$node = parent::getHTMLNode($xml, $data);\n\t\t$node->appendChild($xml->createImgElement($this->getImageURL('image'), 'image'));\n\t\treturn $node;\n\t}", "public function withParentElement(ComponentSpecification $specification = null) : Specification\\WithParentElement\n {\n return new \\ElementTree\\Specification\\WithParentElement($specification);\n }", "private function get_document_head( $html ) {\n\t\t$head_html = $html;\n\n\t\t// Find the opening `<head>` tag.\n\t\t$head_start = strpos( $html, '<head' );\n\t\tif ( false === $head_start ) {\n\t\t\t// Didn't find it. Return the original HTML.\n\t\t\treturn $html;\n\t\t}\n\n\t\t// Find the closing `</head>` tag.\n\t\t$head_end = strpos( $head_html, '</head>' );\n\t\tif ( false === $head_end ) {\n\t\t\t// Didn't find it. Find the opening `<body>` tag.\n\t\t\t$head_end = strpos( $head_html, '<body' );\n\n\t\t\t// Didn't find it. Return the original HTML.\n\t\t\tif ( false === $head_end ) {\n\t\t\t\treturn $html;\n\t\t\t}\n\t\t}\n\n\t\t// Extract the HTML from opening tag to the closing tag. Then add the closing tag.\n\t\t$head_html = substr( $head_html, $head_start, $head_end );\n\t\t$head_html .= '</head>';\n\n\t\treturn $head_html;\n\t}", "public function root() {\n $node = $this;\n while ($parent = $node->getParent())\n $node = $parent;\n return $node;\n }", "public function getOwnerNotes()\n {\n $node = $this->getXml()->getElementsByTagName('OwnerNotes');\n if ($node->length) {\n return $node->item(0)->nodeValue;\n }\n return null;\n }", "public function getSignatureKey(): ?string\n {\n return $this->signatureKey;\n }", "public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)\n {\n if ($doc === null) {\n $doc = new \\DOMDocument('1.0', 'utf-8');\n }\n $domElement = $doc->importNode($this->_ccrDom, true);\n return $domElement;\n }", "public function getSignature();", "public function prevInvisible() {\n if(!$this->parent) {\n return null;\n } else {\n return $this->_prev($this->parent->children(), func_get_args(), 'invisible');\n }\n }", "public function getParentnode()\n {\n return $this->__parentnode__;\n }", "function getRoot() { return($this->_root); }", "public function withSignature(CryptoKeyInterface $key, CryptoKeyInterface $certificate, string $query = null) : object {\n $doc = $this->clone();\n try {\n\n // NOTE (modethirteen, 20200110): can we support signing algorithms besides sha1?\n // sha1 is the only digest algorithm defined in XMLDSIG-CORE <https://www.w3.org/TR/xmlsec-algorithms/#bib-XMLDSIG-CORE1>\n $securityKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, ['type' => 'private']);\n $securityKey->loadKey($key->toString(), false);\n } catch(Exception $e) {\n throw new SamlCannotLoadCryptoKeyException($key, $e->getMessage());\n }\n\n // get the element we should sign\n if($query !== null) {\n $elements = $doc->query($query);\n if($elements->length === 0) {\n throw new SamlDocumentNoElementToSignException($query);\n }\n $element = $elements->item(0);\n } else {\n $element = $doc->firstChild;\n }\n\n // sign the doc with our private key\n $dsig = new XMLSecurityDSig();\n try {\n $dsig->setCanonicalMethod(XMLSecurityDSig::EXC_C14N);\n } catch(Exception $e) {\n throw new SamlDocumentSignatureException($key, $e->getMessage());\n }\n $dsig->addReferenceList(\n [$element],\n XMLSecurityDSig::SHA1,\n ['http://www.w3.org/2000/09/xmldsig#enveloped-signature', XMLSecurityDSig::EXC_C14N],\n ['id_name' => 'ID']\n );\n $dsig->sign($securityKey);\n\n // add the certificate to the signature\n $dsig->add509Cert($certificate->toString(), true);\n $insertBefore = $element->firstChild;\n if($element instanceof DOMElement && in_array($element->tagName, [\n 'samlp:AuthnRequest',\n 'samlp:Response',\n 'samlp:LogoutRequest',\n 'samlp:LogoutResponse'\n ])) {\n\n // TODO (modethirteen, 20200110: there seems to be a DOM traversal-related defect here when trying to inject a signature after an issuer element\n $issuerNodes = $this->query(\"/{$element->tagName}/saml:Issuer\");\n if($issuerNodes->length === 1) {\n $insertBefore = $issuerNodes->item(0)->nextSibling;\n }\n }\n\n // add the signature and return new doc\n $dsig->insertSignature($element, $insertBefore);\n return $doc;\n }" ]
[ "0.5607085", "0.5525356", "0.55004936", "0.5454933", "0.5420375", "0.5356876", "0.5345998", "0.51649314", "0.5077656", "0.50405127", "0.49136922", "0.48986927", "0.48958117", "0.48624435", "0.4853889", "0.47993562", "0.47023642", "0.46644646", "0.46635586", "0.4660301", "0.4656446", "0.4642915", "0.4639581", "0.46381122", "0.463517", "0.4627187", "0.46267498", "0.4626311", "0.46173644", "0.46004376", "0.4597648", "0.4597379", "0.45832863", "0.45803264", "0.4561706", "0.45597348", "0.45494202", "0.45407745", "0.45116442", "0.45031893", "0.45027274", "0.45018137", "0.4494914", "0.44769564", "0.44740883", "0.4464606", "0.4460701", "0.44525555", "0.44465247", "0.44438356", "0.4439631", "0.44376555", "0.44364262", "0.4430965", "0.44284058", "0.4424157", "0.44054407", "0.44022378", "0.43997595", "0.4397736", "0.43925765", "0.43914104", "0.43801928", "0.43705755", "0.4366685", "0.4356692", "0.43475774", "0.43467298", "0.4346679", "0.4345619", "0.4345424", "0.4345424", "0.4345424", "0.4345424", "0.4345424", "0.434234", "0.43400294", "0.4337736", "0.43306667", "0.43304062", "0.43284422", "0.43279716", "0.4323193", "0.43137935", "0.430639", "0.43060446", "0.4304564", "0.43040514", "0.43020555", "0.42994803", "0.42875206", "0.4286206", "0.4279592", "0.4272339", "0.42698264", "0.42675158", "0.42669585", "0.4256023", "0.42539588", "0.4251839" ]
0.63135946
0
Mock session and mock session attributes
protected function _mockSession($attributes) { $session = new \Cake\Http\Session(); foreach ($attributes as $field => $value) { $session->write($field, $value); } $this->Trait ->getRequest() ->expects($this->any()) ->method('getSession') ->willReturn($session); return $session; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMockSession() {\n if (!class_exists('\\RightNow\\Libraries\\MockSession')) {\n Mock::generate('\\RightNow\\Libraries\\Session');\n }\n $session = new \\RightNow\\Libraries\\MockSession;\n $this->realSession = $this->CI->session;\n $this->CI->session = $session;\n $session->setSessionData(array('sessionID' => 'garbage'));\n }", "protected function mockSession()\n\t{\n\t\trequire_once ROOTPATH . 'tests/_support/Session/MockSession.php';\n\t\t$config = config('App');\n\t\t$this->session = new MockSession(new ArrayHandler($config, '0.0.0.0'), $config);\n\t\t\\Config\\Services::injectMock('session', $this->session);\n\t}", "protected function mockSession()\n {\n $session = new Session(new MockArraySessionStorage());\n $session->start();\n\n $beBag = new ArrayAttributeBag('_contao_be_attributes');\n $beBag->setName('contao_backend');\n\n $session->registerBag($beBag);\n\n $feBag = new ArrayAttributeBag('_contao_fe_attributes');\n $feBag->setName('contao_frontend');\n\n $session->registerBag($feBag);\n\n return $session;\n }", "public function testSession() {\n static::$_session = array(\n 'test1' => 'abc',\n 'test2' => 123\n );\n\n $request = $this->createRequest();\n\n\n $this->assertInstanceOf('Nimbles\\Http\\Session', $request->getSession());\n $this->assertInstanceOf('Nimbles\\Http\\Session', $request->session);\n\n $this->assertEquals('abc', $request->getSession('test1'));\n $this->assertEquals('abc', $request->session->read('test1'));\n $this->assertEquals(123, $request->getSession('test2'));\n $this->assertNull($request->getSession('test3'));\n\n $request->getSession()->write('test3', 'def');\n $this->assertNull($request->getSession('test3'));\n\n $request->getSession()->clear();\n $this->assertEquals('abc', $request->getSession('test1'));\n $this->assertEquals(123, $request->getSession('test2'));\n }", "public function testGetSession()\n {\n $this->assertEquals('session value', $this->_req->getSession('my_test_session'));\n }", "public function setUp()\n {\n parent::setUp();\n // Avoid \"Session store not set on request.\" - Exception!\n Session::setDefaultDriver('array');\n $this->manager = app('session');\n\n $user = new User;\n $user->id = 77;\n \t$user->fullname = \"Jack Robinson\";\n \t$user->phone = \"+2348022007561\";\n \t$user->email = \"[email protected]\";\n\n \t$request = new Request();\n $request->setSession($this->manager->driver());\n $request->session()->set('patient', $this->user);\n\n $session = $request->session()->get('patient');\n\n }", "public function testSessionHttpServer(): void\n {\n $this->session(['foo' => 'session data']);\n $this->get('/request_action/session_test');\n $this->assertResponseOk();\n $this->assertResponseContains('session data');\n $this->assertHeader('X-Middleware', 'true');\n }", "function unsetMockSession() {\n if ($this->realSession) {\n $this->CI->session = $this->realSession;\n $this->realSession = null;\n }\n }", "abstract protected function getSession();", "protected function setUp()\n {\n parent::setUp();\n $this->object = new Session();\n }", "function testGetUserBySession() {\n $this->assertFalse(Sessions::getUserBySession());\n }", "public function getSession() {}", "public function testGetSessionArray()\n {\n $expected = array('my_test_session' => 'session value', \n 'my_other_session' => 'session stuff');\n $this->assertEquals($expected, $this->_req->getSession());\n }", "public function setUp() : void\n {\n parent::setUp();\n\n $this->app['request']->setLaravelSession($this->app['session']->driver('array'));\n }", "public function testWithCookieThatNewDataIsStoredFor()\n {\n $cookieValue = 'cookie-value';\n\n // Return an empty array.\n $this->sessionManager->read( $cookieValue )->willReturn([]);\n\n // We expect the new session to be written\n $this->sessionManager->write( Argument::type('string'), ['test' => true] )->shouldBeCalled();\n\n $middleware = new SessionMiddleware( $this->sessionManager->reveal(), 300 );\n\n $this->request->getCookieParams()->willReturn([\n SessionMiddleware::COOKIE_NAME => $cookieValue\n ]);\n\n // We use this to set data in session; as a delegate process would do.\n $this->request->withAttribute( 'session', Argument::that(function ($arg) {\n $arg['test'] = true;\n return true;\n }))->shouldBeCalled()->willReturn(\n $this->prophesize(ServerRequestInterface::class)->reveal()\n );\n\n $response = $middleware->process(\n $this->request->reveal(),\n $this->delegateInterface->reveal()\n );\n\n $this->assertInstanceOf(ResponseInterface::class, $response);\n\n $headers = $response->getHeaders();\n\n $this->assertArrayHasKey('Set-Cookie', $headers);\n\n $cookies = $headers['Set-Cookie'];\n\n $this->assertInternalType('array', $cookies);\n $this->assertCount(1, $cookies);\n\n $cookie = GuzzleSetCookie::fromString(array_pop($cookies));\n\n /*\n * We are setting an invalid cookie name here, so we expect a correctly named\n * cookie, with a *different* value, that has not expired.\n */\n $this->assertEquals( SessionMiddleware::COOKIE_NAME, $cookie->getName() );\n $this->assertFalse( $cookie->isExpired() );\n $this->assertTrue( $cookie->getSecure() );\n $this->assertTrue( $cookie->getHttpOnly() );\n $this->assertInternalType( 'string', $cookie->getValue() );\n $this->assertNotEquals( $cookieValue, $cookie->getValue() );\n\n // We're expecting the session ID to be over 75 characters.\n $this->assertGreaterThan( 75, strlen($cookie->getValue()) );\n }", "public function testWithoutCookieSetAndNewDataSet()\n {\n\n $this->sessionManager->write( Argument::type('string'), Argument::type('array') )->shouldBeCalled();\n\n $middleware = new SessionMiddleware( $this->sessionManager->reveal(), 300 );\n\n $this->request->getCookieParams()->willReturn(array());\n\n // We use this to amend the data stored in session; as a delegate process would do.\n $this->request->withAttribute( 'session', Argument::that(function ($arg) {\n $arg['test'] = true;\n return true;\n }))->shouldBeCalled()->willReturn(\n $this->prophesize(ServerRequestInterface::class)->reveal()\n );\n\n $response = $middleware->process(\n $this->request->reveal(),\n $this->delegateInterface->reveal()\n );\n\n $this->assertInstanceOf(ResponseInterface::class, $response);\n\n $headers = $response->getHeaders();\n\n $this->assertArrayHasKey('Set-Cookie', $headers);\n\n $cookies = $headers['Set-Cookie'];\n\n $this->assertInternalType('array', $cookies);\n $this->assertCount(1, $cookies);\n\n\n $cookie = GuzzleSetCookie::fromString(array_pop($cookies));\n\n /*\n * We are setting the cookie here, so we expect a correctly named cookie, with a value, that has not expired.\n */\n $this->assertEquals( SessionMiddleware::COOKIE_NAME, $cookie->getName() );\n $this->assertFalse( $cookie->isExpired() );\n $this->assertTrue( $cookie->getSecure() );\n $this->assertTrue( $cookie->getHttpOnly() );\n $this->assertInternalType( 'string', $cookie->getValue() );\n\n // We're expecting the session ID to be over 75 characters.\n $this->assertGreaterThan( 75, strlen($cookie->getValue()) );\n }", "public function setUp()\n\t{\n\t\tSession::$instance = null;\n\t\tSession::load();\n\t}", "private function _setSession(Session $session)\n\t{\n\t\t$property = new \\ReflectionProperty('aik099\\\\PHPUnit\\\\BrowserTestCase', '_session');\n\t\t$property->setAccessible(true);\n\t\t$property->setValue($this, $session);\n\t}", "public static function phpunit_mockup_session_id($sessionid) {\n static::$sessionidmockup = $sessionid;\n }", "public function getSession();", "public function returnPreviouslySetData()\n {\n $_SESSION = ['foo' => 'bar', 'object' => new \\stdClass()];\n\n $serializedSession = serialize($_SESSION);\n\n $this->sessionEntity->setData($serializedSession);\n\n $this->assertEquals($serializedSession, $this->sessionEntity->getData());\n }", "public function beInstanceOfSession()\n {\n $this->assertInstanceOf('Neducatio\\ORMSessionHandlerBundle\\Model\\Session', $this->sessionEntity);\n }", "public static function SetUpUserBySession ();", "public function testGetSession()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->get($this->url('sessions/1'));\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'name',\n 'school_id',\n 'start_date',\n 'end_date'\n ]);\n }", "public static function setUpBeforeClass()\n {\n @session_start();\n\n }", "public function get_test_php_sessions()\n {\n }", "private function _createSession(){\n return $this->_session = new Session();\n }", "public static function setUpBeforeClass()\n {\n global $c;\n require __DIR__.'/../../../../bootstrap.php';\n require __DIR__.'/../../../../resources/web/services.php';\n // Mock session\n $c['session'] = function () {\n return new Session(new MockArraySessionStorage());\n };\n }", "protected function initializeSession() {}", "public function testGetLoggedInUser()\n {\n $user = new User(\"[email protected]\", \"Some User\", \"asdf\", \"student\");\n $user->insert();\n\n unset($_SESSION[\"user_id\"]);\n\n $this->assertNull(User::loggedIn());\n\n $_SESSION[\"user_id\"] = $user->getId();\n\n $this->assertInstanceOf(User::class, User::loggedIn());\n }", "public function setUp()\n\t{\n\t\t// http://stackoverflow.com/questions/23270650/cannot-send-session-cookie-headers-already-sent-phpunit-laravel\n\t\t@session_start();\n\t\t$this->_killSession();\n\t}", "protected function setUp()\n {\n /**\n * Mock session to avoid BUG\n * \"Exception: Warning: session_start(): Cannot send session cookie - headers already sent by\"\n */\n $sessionMock = $this->getModelMock('customer/session', array(\n 'init', 'renewSession', 'start'\n )\n );\n $this->replaceByMock('model', 'customer/session', $sessionMock);\n\n $sessionMock = $this->getModelMock('checkout/session', array(\n 'init', 'renewSession', 'start'\n )\n );\n $this->replaceByMock('model', 'checkout/session', $sessionMock);\n\n //Basic Setup\n $this->store = Mage::app()->getStore(0)->load(0);\n $_baseUrl = Mage::getStoreConfig('web/unsecure/base_url');\n $this->app()->getRequest()->setBaseUrl($_baseUrl);\n\n parent::setup();\n }", "public function testGetSessionDefault()\n {\n $val = $this->_req->getSession('DOESNT_EXIST', 'default value');\n $this->assertEquals('default value', $val);\n }", "protected function manageSession()\n {\n $this->session = new WebsiteSession();\n foreach ($this->eventRequest->getSession() as $key => $value) {\n\n if ($key == 'createdAt') {\n $value = time();\n }\n\n $method = 'set' . ucwords($key);\n if (method_exists($this->session, $method)) {\n $this->session->$method($value);\n }\n }\n }", "public function sessionDummy()\n {\n return true;\n }", "public function setUpSession() \n {\n exec('mysqldump -u '.env('DB_USERNAME').' test | mysql -u '.env('DB_USERNAME').' test_testing');\n\n $this->amOnPage('/');\n $this->setCookie('selenium_request', 'true');\n }", "public function testSessionManagerTest()\n {\n // Get date from session\n $dates = Session::get('dates');\n $this->assertIsArray($dates);\n $this->assertIsArray($dates[0]);\n\n $date = $dates[0];\n $this->assertSame('John Doe', $date['Name']);\n $this->assertSame('52', $date['Years']);\n $this->assertSame('18996', $date['Days']);\n $this->assertSame('460639', $date['Hours']);\n }", "public function setup_session(){\n if(!(isset($_SESSION))){\n session_start();\n }\n\n $_SESSION['user_id'] = $this->user_id;\n $_SESSION['name'] = $this->firstname;\n\n //Remove anon flag\n if(isset($_SESSION['anon'])){\n unset($_SESSION['anon']);\n }\n\n }", "protected function set_session_id() {\n $this->sessionid = static::$sessionidmockup;\n }", "public function testArrayAccess() {\n\t\t$session = $this->getSession();\n\t\t$this->assertFalse(isset($session['test']), 'Test key is set for new empty session');\n\t\t$this->assertNull($session['test'], 'Not set key is not null');\n\t\t$session['test'] = 'testValue';\n\t\t$this->assertTrue(isset($session['test']), 'Test key is not set');\n\t\t$this->assertSame('testValue', $session['test'], 'Test key is not correctly set');\n\t\tunset($session['test']);\n\t\t$this->assertFalse(isset($session['test']), 'Test key is set after deleting');\n\t\t$this->assertNull($session['test'], 'Deleted key is not null');\n\t}", "protected function _getSession() {\n /**\n * Return session value\n */\n return Mage::getSingleton ( 'core/session' );\n }", "public function storeSession() {}", "protected static function getFacadeAccessor() { return 'session'; }", "public function setUp()\n\t{\n\t\t\\Laravel\\Session::load();\n\t}", "protected function setUp()\n {\n parent::setUp();\n\n /** @var SessionManagerInterface $adminSession */\n $adminSession = Bootstrap::getObjectManager()->get(SessionManagerInterface::class);\n $adminSession->setData(AuthenticationInterface::DATA_KEY_SESSION_TOKEN_EXPIRY, '2038-01-19T03:03:33.000Z');\n }", "public function testIndexStatus(){\n\n $user = factory(User::class)->create();\n\n $this->actingAs($user)->withSession(['foo' => 'bar'])->visit('admin/price/')->see(\"Price List\")\n ;\n\n }", "protected function _session() {\n\t\treturn $this->_crud()->Session;\n\t}", "private function _getSession()\n {\n return Mage::getSingleton('payone_core/session');\n }", "protected abstract function get_sessions();", "public function setSession()\n {\n $this->setShared('session', function() {\n $session = new SessionAdapter();\n $session->start();\n return $session;\n });\n }", "protected function _getSession ()\n {\n return Mage::getSingleton('customer/session');\n }", "protected function _getSession()\n {\n return Mage::getSingleton('mbiz_cc/session');\n }", "protected function setUp() {\n $this->object = new SeseSession;\n }", "public function testSetName()\n {\n $session = new Session();\n $session->setName('oldName');\n\n $this->assertEquals('oldName', $session->getName());\n\n $session->open();\n $session->setName('newName');\n\n $this->assertEquals('newName', $session->getName());\n\n $session->destroy();\n }", "public function __construct()\n {\n // $this->session = new \\Behat\\Mink\\Session($this->driver);\n // $this->session->start();\n }", "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "protected function _getSession()\n {\n return Mage::getSingleton('customer/session');\n }", "public function testWithCookieThatReturnsData()\n {\n $cookieValue = 'cookie-value';\n\n $testData = [\n 'test'=>true\n ];\n\n //---\n\n $this->sessionManager->read( $cookieValue )->willReturn($testData);\n $this->sessionManager->write( $cookieValue, $testData )->shouldBeCalled();\n\n $middleware = new SessionMiddleware( $this->sessionManager->reveal(), 300 );\n\n $this->request->getCookieParams()->willReturn([\n SessionMiddleware::COOKIE_NAME => $cookieValue\n ]);\n\n $response = $middleware->process(\n $this->request->reveal(),\n $this->delegateInterface->reveal()\n );\n\n $this->assertInstanceOf(ResponseInterface::class, $response);\n\n $headers = $response->getHeaders();\n\n $this->assertArrayHasKey('Set-Cookie', $headers);\n\n $cookies = $headers['Set-Cookie'];\n\n $this->assertInternalType('array', $cookies);\n $this->assertCount(1, $cookies);\n\n\n $cookie = GuzzleSetCookie::fromString(array_pop($cookies));\n\n /*\n * We are setting the cookie here, so we expect a correctly named\n * cookie, with the above value, that has not expired.\n */\n $this->assertEquals( SessionMiddleware::COOKIE_NAME, $cookie->getName() );\n $this->assertFalse( $cookie->isExpired() );\n $this->assertTrue( $cookie->getSecure() );\n $this->assertTrue( $cookie->getHttpOnly() );\n $this->assertInternalType( 'string', $cookie->getValue() );\n $this->assertEquals( $cookieValue, $cookie->getValue() );\n }", "public function storeSessionData() {}", "public function storeSessionData() {}", "public function hasSession() {}", "public function __construct($debug=false){\n if($debug){\n $this->session = new Session(new MockFileSessionStorage(ROOT.'/tests', self::DEBUG_FILE_NAME)); //dev, debug\n }else{\n $storage = new NativeSessionStorage(array(), new NativeFileSessionHandler());\n $this->session = new Session($storage);\n }\n }", "public function testExistingIdentityCrossSession() {\n\n $sessionFactory = $this->getSampleProjectSessionFactory(true);\n \n $session1 = $sessionFactory->openSession();\n $session2 = $sessionFactory->openSession();\n $session3 = $sessionFactory->openSession();\n \n $bug = $session1->find('sample_Bug')->filterBy('bugId', 521152)->one();\n $project = $session2->find('sample_Project')->filterBy('projectId', 12345)->one();\n $user = $session3->find('sample_User')->filterBy('userId', '55566')->one();\n\n $this->assertTrue($bug->owner !== $project->manager);\n $this->assertTrue($user !== $bug->owner);\n $this->assertTrue($user !== $project->manager);\n \n $sessionFactory2 = $this->getSampleProjectSessionFactory(false);\n $sessionFactory3 = $this->getSampleProjectSessionFactory(false);\n \n $bug = $sessionFactory2->currentSession()->find('sample_Bug')->filterBy('bugId', 521152)->one();\n $user = $sessionFactory3->currentSession()->find('sample_User')->filterBy('userId', '55566')->one();\n $this->assertTrue($user !== $bug->owner);\n \n }", "public function testShowUser()\n {\n \t$user = factory(User::class)->create()''\n \t$response = $this->actingAs($user)->withSession(['Foo' => 'bar'])->get('/memes');\n \t$response->assertStatus(200);\n \n }", "protected function setSessionCookie() {}", "public function testExample()\n {\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->withSession(['foo' => 'bar'])\n ->visit('/')\n ->see($user->name);\n }", "protected function _getSession()\n\t{\n\t\treturn Mage::getSingleton('checkout/session');\n\t}", "function testSet() {\n\n\t\tsession_start();\n\n\t\techo $_SESSION['sessionID'];\n\t\t\n\t\tif(!isset($_SESSION['sessionID'])){\n\t\t\techo \"out\";\n\t\t\texit;\n\t\t}\n\n\t\techo \"in\";\n\t}", "public function getSession(): object\n {\n return SessionTrait::sessionFromGlobal();\n }", "private function _setSessionxxxx()\n {\n $this->_session = new Class_Session();\n\n if (!$this->_session instanceof Class_Session_Abstract) {\n require_once 'Class/User/SessionException.php';\n throw new Class_User_Exception('Invalid table data gateway provided');\n }\n }", "protected function setUp()\n {\n $this->object = Qwin::getInstance()->session;\n }", "protected function _getSession() {\n return Mage::getSingleton('customer/session');\n }", "private function getNewUserMock() {\n $user_mock = $this->getMockForAbstractClass('\\Drupal\\Core\\Session\\AccountProxyInterface', ['id']);\n $user_mock->method('id')->willReturn(1);\n return $user_mock;\n }", "protected function get_sessions()\n {\n }", "public function __construct() {\n $this->session = new Session();\n }", "protected function _session()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'set data on session markers',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_session && $this->_session->returns('display')) {\n foreach ($this->_session->returns('display') as $key => $val) {\n $this->generate('session_display;' . $key, $val);\n }\n }\n }", "protected function _getSession() {\n return Mage::getSingleton ( 'customer/session' );\n }", "public function getSession(){\r\n return $this->session;\r\n }", "public function __construct($session)\n {\n $this->session = $session;\n }", "protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }", "protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }", "protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }", "protected function _getSession()\n {\n return Mage::getSingleton('adminhtml/session');\n }", "public static function use_sessions()\n {\n \\Session::started() or \\Session::load();\n }", "function sessionSet(){\r\n\t\tif(isset($_SESSION[\"$this->session_name\"])) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function setSession(mvcSessionBase $inSession) {\n\t\treturn $this->setParam(self::PARAM_REQUEST_SESSION, $inSession);\n\t}", "public function session() {\n return $this->session;\n }", "function getSession() {\n\t\treturn $this->get('_session', $this->get('session'));\n\t}", "public function testLoggedIn()\n {\n $this->session($this->sessionInfo);\n\n $response = $this->call('GET', '/api/user');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $decoded = json_decode($response->getContent());\n\n $this->assertEquals('success', $decoded->status);\n\n $this->assertEquals(true, $decoded->data->logged_in);\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\tSession::start();\n\t}", "abstract function getSessionById($id);", "protected function _getSession()\n\t{\n\t\treturn Mage::getSingleton('customer/session');\n\t}", "public function __construct()\n {\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.use_trans_sid', 0);\n ini_set('session.save_handler', 'files');\n ini_set('session.gc_maxlifetime', 3600);\n\n session_name($this->sessionName);\n session_set_cookie_params(\n $this->sessionMaxLifeTime,\n $this->sessionPath,\n $this->sessionDomain,\n $this->sessionSSL,\n $this->sessionHTTPOnly\n );\n session_save_path($this->sessionSavePath);\n\n /*\n * very important : so read, write \n * can use them form my class not from SessionHandler\n * */\n session_set_save_handler($this, true);\n }", "public function testConstructionSettings(): void\n {\n $this->getTableLocator()->clear();\n new DatabaseSession();\n\n $session = $this->getTableLocator()->get('Sessions');\n $this->assertInstanceOf('Cake\\ORM\\Table', $session);\n $this->assertSame('Sessions', $session->getAlias());\n $this->assertEquals(ConnectionManager::get('test'), $session->getConnection());\n $this->assertSame('sessions', $session->getTable());\n }", "function __construct(){\n $this->startSession();\n }", "function set_session() {\n\t\t\t// Set cart and coupon session data\n\t\t\t$_SESSION['cart'] = $this->cart_contents;\n\t\t\t$_SESSION['coupons'] = $this->applied_coupons;\n\t\t\t\n\t\t\t// Cart contents change so reset shipping\n\t\t\tunset($_SESSION['_chosen_shipping_method']);\n\t\t\t\n\t\t\t// Calculate totals\n\t\t\t$this->calculate_totals();\n\t\t}", "function get_session()\n{\n static $session;\n if (!$session) {\n $session = new session_class();\n }\n return $session;\n}", "abstract protected function getSession(\n\t\t$sessionId = null, array $sessionData = array(), &$storage = null, $autoRegister = false, $configName = 'test'\n\t);", "public static function sessionAndUserLoggedIn(){\n Verify::session();\n Verify::userLoggedIn();\n }" ]
[ "0.77938175", "0.7670697", "0.7461096", "0.7238249", "0.72185946", "0.6994089", "0.6574466", "0.64606637", "0.64544934", "0.64388984", "0.64205575", "0.63227427", "0.63142717", "0.6296146", "0.62952757", "0.6292854", "0.629111", "0.62527335", "0.62133056", "0.61775184", "0.6163345", "0.61613274", "0.6128728", "0.6078396", "0.6068751", "0.6064397", "0.60578686", "0.6042909", "0.6040552", "0.6017139", "0.5999615", "0.59992754", "0.59981173", "0.59956783", "0.59845334", "0.5976135", "0.59658074", "0.59634876", "0.5950363", "0.59453505", "0.59416586", "0.5930155", "0.590603", "0.59001034", "0.58937484", "0.5892918", "0.5890036", "0.58598495", "0.5836836", "0.5833588", "0.5808915", "0.58083355", "0.5803709", "0.5801377", "0.5791601", "0.5785522", "0.5785522", "0.5785522", "0.5784486", "0.5778239", "0.57775456", "0.57771033", "0.57719415", "0.5771165", "0.5765076", "0.57634664", "0.57471985", "0.57388836", "0.57378244", "0.5727837", "0.5727775", "0.5724067", "0.5716301", "0.57144403", "0.5705986", "0.5701679", "0.5698414", "0.56906885", "0.56894594", "0.568236", "0.5681029", "0.5681029", "0.5681029", "0.5681029", "0.5668173", "0.5660786", "0.56592304", "0.5649898", "0.56424576", "0.56411767", "0.56372195", "0.5631043", "0.56304824", "0.56281304", "0.5609629", "0.56064934", "0.56035477", "0.5601214", "0.55871457", "0.55864793" ]
0.72102016
5
Data provider for testU2User
public function dataProviderU2User() { $empty = []; $withRegistration = new User([ 'id' => '00000000-0000-0000-0000-000000000001', 'username' => 'user-1', ]); $withoutRegistration = new User([ 'id' => '00000000-0000-0000-0000-000000000002', 'username' => 'user-2', ]); return [ // [$empty, ['action' => 'login']], // [$withoutRegistration, ['action' => 'u2fRegister']], [$withRegistration, ['action' => 'u2fAuthenticate']], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInfoUser()\n {\n }", "public function testCreateUser()\n {\n }", "public function testUserMeGet()\n {\n }", "public function data_user()\n {\n return new Data\\User;\n }", "public function testAddUserStore()\n {\n\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testGetNetworkMerakiAuthUser()\n {\n }", "public function testCreateNetworkMerakiAuthUser()\n {\n }", "public function testListUserIdentities()\n {\n }", "public function testGetUserAttributes()\n {\n }", "public function testCreateUser()\n { \n $userRepo = new UserRepository(new User);\n $user = $userRepo->create($this->data);\n\n $this->assertInstanceOf(User::class, $user);\n foreach ($this->data as $key => $value) {\n \t$this->assertEquals($value, $user->$key);\n }\n }", "public function testGetUser()\n {\n $user = factory(User::class)->create();\n $userRepo = new UserRepository(new User);\n $found = $userRepo->get($user->id);\n\n $this->assertInstanceOf(User::class, $found);\n foreach ($this->data as $key => $value) {\n \t$this->assertEquals($found->$key, $user->$key);\n }\n }", "public function testGetNetworkMerakiAuthUsers()\n {\n }", "public function testGetUser()\n {\n }", "public function userProvider() {\n return [\n // Test blocked authenticated user.\n [self::BLOCKED, self::AUTHENTICATED, 1, ['user']],\n // Test active anonymous user.\n [self::ACTIVE, self::ANONYMOUS, 0, []],\n // Test active authenticated user.\n [self::ACTIVE, self::AUTHENTICATED, 0, []],\n // Test blocked anonymous user.\n [self::BLOCKED, self::ANONYMOUS, 0, []],\n ];\n }", "public function testUserUserIDGet()\n {\n }", "public static function get_user_data()\n {\n }", "public function testGetUser()\n {\n\n }", "public function getTestUser()\n {\n $user = new User();\n $user\n ->setUsername(\"TestUser\")\n ->setFirstName(\"Test\")\n ->setLastName(\"User\")\n ->setFullname(\"TestUser\")\n ->setEmail(\"[email protected]\")\n ->setToken(\"testToken\");\n\n return $user;\n }", "public function testAddUser()\n {\n }", "public function test_it_store_data_for_user()\n {\n $user = ['name'=>'mostafa','email'=>'123@frr','password'=>'5654'];\n $response = $this->post('/api/register',$user);\n $this->assertDatabaseHas('users',['name'=>'mostafa']);\n }", "public function testAddUser()\n {\n\n }", "public function testGetBackendUser()\n {\n $itemsProcFunc = GeneralUtility::makeInstance(ColPosList::class);\n $backendUserAuthentication = GeneralUtility::makeInstance(BackendUserAuthentication::class);\n $GLOBALS['BE_USER'] = $backendUserAuthentication;\n $result = $itemsProcFunc->getBackendUser();\n $this->assertEquals($backendUserAuthentication, $result);\n }", "public function test_compare_database()\n {\n $responseProfie = $this->jsonUser('GET', 'api/users/info',[], []);\n $data = json_decode($responseProfie->getContent())->result;\n $arrayUser = [\n 'id' => $data->id,\n 'username' => $data->username,\n 'email' => $data->email\n ];\n $this->assertDatabaseHas('users', $arrayUser);\n }", "private function example_of_user() {\n $data = array();\n $randomString = \\App\\Helpers::generateRandomString(1);\n //$data['name'] = 'User' . $randomString;\n $data['name'] = '';\n $data['phone'] = '';\n $data['email'] = 'user' . $randomString . '@gmail.com';\n $data['password'] = '1234';\n $data['password'] = '1234';\n\n return $data;\n }", "public function load($userId = 0)\n{\n $userId=7;\n $username='tarun';\n $password='abcdefg';\n\t\n //Load the user factory\n $this->load->library(\"UserFactory\");\n //Create a data array so we can pass information to the view\n \n $this->userfactory->setUser($username, $password);\n \n\n\n}", "public function testUser()\n {\n $this->assertDatabaseHas('users', [\n 'email' => '[email protected]'\n ]);\n }", "public function simulateUser() {}", "public function testGetUsers()\n {\n }", "public function testSetUserAttributes()\n {\n }", "public function testPropertyUsernameDataProvider()\n {\n $testData = [];\n\n $testModelKeys = ['username','AGAVE_USERNAME'];\n\n foreach ($testModelKeys as $testModelKey) {\n $testData[] = [$testModelKey, self::DEFAULT_CLIENT_NAME_VALUE . $testModelKey];\n }\n\n return $testData;\n }", "public static function createTestUser()\n\t{\n\t\tKinvey::setAuthMode('app');\n\t\t$user = new User();\n\t\t$user->setRawAttributes(array(\n\t\t\t'email'\t => '[email protected]',\n\t\t\t'first_name'=> 'Test',\n\t\t\t'last_name' => 'Guy',\n\t\t\t'password' \t=> str_random(8),\n\t\t\t'original' => 'baz'\n\t\t));\n\t\t$user->save();\n\t\tKinvey::setAuthMode('admin');\n\t\treturn $user;\n\t}", "public function testFindUsers()\n {\n\n }", "private function createUserProviders($config) {}", "public function userProvider()\n {\n return [\n 'user' => ['user', collect()],\n 'author' => ['author', collect(['author', 'stuff'])],\n 'admin' => ['admin', collect(['admin', 'stuff'])],\n ];\n }", "public function testUser()\n {\n $this->assertNull($this->kittyUser->getUser());\n $userMock = $this->getMockBuilder('\\Icans\\Platforms\\UserBundle\\Api\\UserInterface')->getMock();\n $returnedKittyUser = $this->kittyUser->setUser($userMock);\n $this->assertSame($this->kittyUser, $returnedKittyUser);\n $this->assertSame($userMock, $this->kittyUser->getUser());\n }", "public static function test_user($user_id, $user_pass);", "public function userObjectDataProvider(): array\n {\n return [\n ['displayName'],\n ['role'],\n ['status']\n ];\n }", "public function testProjectProjectIDUsersUserIDGet()\n {\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function initializeBackendUser() {}", "public function initializeBackendUser() {}", "public function testRoleUsers()\n {\n }", "abstract protected function getUser();", "public function testUser()\n {\n $user = new User();\n $user->email = \"[email protected]\";\n \t\t $user->first_name = \"Sankaja\";\n \t\t $user->last_name = \"Rajapakse\";\n \t\t $user->password = \"123123\";\n \t\t $user->save();\n \t\t //testing for email\n $this->assertEquals($user->email,\"[email protected]\");\n //testing for first name\n $this->assertEquals($user->first_name,\"Sankaja\");\n //testing for second name\n $this->assertEquals($user->last_name,\"Rajapakse\");\n //see in database\n $this->assertDatabaseHas('users',['email' => '[email protected]','first_name'=>'Sankaja','last_name' => 'Rajapakse','password' => '123123']);\n }", "public function testEditUser()\n {\n }", "function user() {\r\r\r\n\t\t$this->_dao = DB_DataObject::factory('Users');\r\r\r\n\t}", "public function testUsersTotpAuth()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testSetAllUserAttributes()\n {\n }", "public function testCreateUserAndList(): void\n {\n User::factory()->count(1)->create();\n\n $users = User::all();\n self::assertCount(1, $users);\n $list = array_keys($users->first()->getAttributes());\n self::assertEqualsCanonicalizing(\n [\n 'id',\n 'name',\n 'email',\n 'cpf/cnpj',\n 'type_person',\n 'email_verified_at',\n 'password',\n 'remember_token',\n 'created_at',\n 'updated_at'\n ],\n $list\n );\n }", "protected function add_sample_users(){\n // a non-admin user\n factory(User::class,1)->create();\n\n $this->non_admin = User::where('superuser',0)->first();\n $this->admin = User::where('superuser',1)->first();\n }", "public function testUserCreate() {\n $createUser = PromisePay::User()->create($this->userData);\n \n // Second, fetch its data\n $getUser = PromisePay::User()->get($createUser['id']);\n \n $this->assertNotNull($createUser['created_at']);\n $this->assertNotNull($createUser['updated_at']);\n $this->assertEquals($createUser['id'], $getUser['id']);\n $this->assertEquals($this->userData['first_name'] . ' ' . $this->userData['last_name'], $getUser['full_name']);\n }", "public function testGetExistingWithConfigData()\n {\n $users = TableRegistry::get('Users');\n TableRegistry::get('Users', ['table' => 'my_users']);\n }", "public function testProjectProjectIDUsersGet()\n {\n }", "public function testEditUser()\n {\n\n }", "private function setupUsers()\n {\n $users = [\n [\n 'username' => '[email protected]',\n 'email' => '[email protected]',\n 'password' => 'test123',\n 'password-encoder' => $this->passwordEncoder\n ],\n [\n 'username' => '[email protected]',\n 'email' => '[email protected]',\n 'password' => 'test123',\n 'password-encoder' => $this->passwordEncoder\n ],\n [\n 'username' => '[email protected]',\n 'email' => '[email protected]',\n 'password' => 'test123',\n 'password-encoder' => $this->passwordEncoder\n ],\n ];\n\n $container = $this->setupData($users, User::class);\n\n $this->users = $container;\n }", "public function testUsersAreUsers() {\n $users = $this->users->users();\n $this->assertInstanceOf('NYPL\\Bibliophpile\\User', $users[0]);\n }", "public function testCreateUser()\n {\n $rand = rand(1,999999);\n $data = [\n 'name' => 'name'.$rand,\n 'email' => 'email'.$rand.'@gmail.com',\n 'password' => 'password'\n ];\n\n User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => $data['password'],\n ]);\n\n $this->assertTrue(true);\n\n $user = User::where('name',$data['name']) -> first();\n $this -> assertEquals($data['email'],$user->email);\n $this -> assertEquals($data['password'],$user->password);\n\n }", "function UserModel()\n\t\t{\n\t\t\t$this->QueryTool = new UserModelDataBasic(DB_NAME);\n\t\t}", "public function testItReturnsUsers()\n {\n $this->user->update([\"firstname\" => \"anthony\"]);\n $user1 = factory(User::class)->create([\n \"firstname\" => \"james\",\n \"tenant_id\" => $this->user->tenant_id,\n ]);\n $tenant2 = factory(Tenant::class)->create();\n $user2 = factory(User::class)->create([\n \"firstname\" => \"benjamin\",\n \"tenant_id\" => $tenant2->id,\n ]);\n\n $this->actingAs($this->user)\n ->getJson(\"api/v1/users\")\n ->assertOk()\n ->assertJson([\n \"data\" => [\n $this->user->only([\"id\", \"firstname\"]),\n $user2->only([\"id\", \"firstname\"]),\n $user1->only([\"id\", \"firstname\"]),\n ],\n ]);\n }", "public function seedUser()\n\t{\n\t\t// User ID or screen name\n\t\treturn array(\n\t\t\tarray(234654235457),\n\t\t\tarray('testUser'),\n\t\t\tarray(null)\n\t\t\t);\n\t}", "public function testDataType()\n {\n $user = User::inRandomOrder()->first();\n $this -> assertInternalType('int',$user->id);\n $this -> assertInternalType('string', $user -> name);\n $this -> assertInternalType('string', $user -> email);\n $this -> assertInstanceOf('App\\User',$user);\n }", "public function get_user()\n {\n \t$user = factory(User::class)->create(array('uuid' => ''));\n\n \treturn $user;\n }", "abstract public function user();", "public function authenticateDataProvider(): array\n {\n $userData = [\n 'uid' => 1,\n 'username' => 'test',\n 'password' => md5('test123'),\n ];\n\n return [\n [false, $userData, 200, 1],\n [true, $userData, 0, 2],\n [true, $userData, 50, 3],\n ];\n }", "public function testAuth() {\n /** @var \\Drupal\\users_jwt\\UsersJwtKeyRepositoryInterface $key_repository */\n $key_repository = $this->container->get('users_jwt.key_repository');\n /** @var \\Drupal\\Core\\Extension\\ExtensionPathResolver $path_resolver */\n $path_resolver = $this->container->get('extension.path.resolver');\n $module_path = $path_resolver->getPath('module', 'users_jwt');\n $path = $module_path . '/tests/fixtures/users_jwt_rsa1-public.pem';\n $public_key = file_get_contents($path);\n $key_repository->saveKey($this->testUser->id(), 'wxyz', 'RS256', $public_key);\n $variants = [\n 'uid' => $this->testUser->id(),\n 'uuid' => $this->testUser->uuid(),\n 'name' => $this->testUser->getAccountName(),\n ];\n foreach ($variants as $id_type => $id_value) {\n $this->dotestAuth($id_type, $id_value, $module_path);\n }\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function testCreateUser()\n {\n $num = rand(10, 1000);\n $userData = [\n \"name\" => \"John Doe $num\",\n \"email\" => \"[email protected]\",\n \"password\" => \"demo12345\",\n \"org_id\" => 1\n ];\n $this->json('POST', 'api/user/create', $userData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n \"action\",\n \"data\" => [],\n \"status\"\n ]);\n }", "public function testGetUserOptions()\n\t{\n\t}", "public function testItReturnsAUserByUserId()\n {\n $user1 = factory(User::class)->create([\n \"tenant_id\" => $this->user->tenant->id,\n ]);\n \n $this->actingAs($this->user)\n ->getJson(\"api/v1/users/{$user1->id}\")\n ->assertStatus(200)\n ->assertJson([\n \"id\" => $user1->id,\n \"firstname\" => $user1->firstname,\n ]);\n }", "function setup_userdata($for_user_id = 0)\n {\n }", "public function processLoginDataProvider() {}", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "private function createUserDaoProvider($name, $provider) {}", "public function getUser() {}", "public function test_if_users_list_loads_with_data()\n {\n factory(User::class)->create([\n 'name'=>'Joel' \n ]);\n $this->get('/usuarios')\n ->assertStatus(200)\n ->assertSee('Joel'); \n }", "public function testCreateUser()\n {\n $dados = [\n 'unidade_id' => 1,\n 'chave' => '1111',\n 'name' => 'Fulano',\n 'email' => '[email protected]',\n 'password' => 'Gerente',\n 'password_confirmation' => 'Gerente',\n 'ativo' => true,\n 'perfil_id' => 1,\n ];\n\n $this->post('/api/users', $dados, $this->api_token);\n\n $this->assertResponseOk();\n\n $reposta = (array) json_decode($this->response->content());\n\n $this->assertArrayHasKey('unidade_id', $reposta);\n $this->assertArrayHasKey('chave', $reposta);\n $this->assertArrayHasKey('name', $reposta);\n $this->assertArrayHasKey('email', $reposta);\n $this->assertArrayHasKey('ativo', $reposta);\n $this->assertArrayHasKey('perfil_id', $reposta);\n $this->assertArrayHasKey('id', $reposta);\n }", "protected function setUp()\n {\n $this->object = new \\Yana\\Security\\Data\\Users\\ArrayAdapter();\n }", "public function user();", "public function user();", "public function user();", "public function user();", "public function user();", "public function user();", "public function user();", "public function user();", "public function check_user_exists_provider() {\n return [\n 'Fetch by email' => [\n 'email', '[email protected]', true\n ],\n 'Fetch by email, different case' => [\n 'email', '[email protected]', true\n ],\n 'Fetch data using a non-existent email' => [\n 'email', '[email protected]', false\n ],\n 'Multiple accounts with the same email' => [\n 'email', '[email protected]', false, 1\n ],\n 'Fetch data using a valid user ID' => [\n 'id', true, true\n ],\n 'Fetch data using a non-existent user ID' => [\n 'id', false, false\n ],\n 'Fetch data using a valid username' => [\n 'username', 's1', true\n ],\n 'Fetch data using a valid username, different case' => [\n 'username', 'S1', true\n ],\n 'Fetch data using an invalid username' => [\n 'username', 's2', false\n ],\n 'Fetch data using a valid ID Number' => [\n 'idnumber', 's1', true\n ],\n 'Fetch data using an invalid ID Number' => [\n 'idnumber', 's2', false\n ],\n ];\n }", "public function getUser()\n {\n }", "public function testGetUserToken()\n {\n\n }", "public function listUserData()\n {\n $userData = $this->model->select('id','name','email','role')->orderby('id','asc')->get();\n $test = $this->service->abc($userData);\n dd($test);\n return $userData;\n }", "public function providerTestIsValidUsername() {\n return [\n 'valid' => [\n 'YesCT',\n TRUE,\n ],\n 'not valid' => [\n 'x x',\n FALSE,\n ],\n ];\n }", "public function testGetUserByName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"user\");\n\n\t\t// create a new User and insert to into mySQL\n\t\t$user = new User(null, $this->VALID_SALT, $this->VALID_HASH, $this->VALID_EMAIL, $this->VALID_NAME);\n\t\t$user->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoUser = User::getUserByUserId($this->getPDO(), $user->getUserId());\n\t\t$this->assertSame($numRows + 1, $this->getConnection()->getRowCount(\"user\"));\n\t\t$this->assertLessThan($pdoUser->getUserId(), 0);\n\t\t$this->assertSame($pdoUser->getSalt(), $this->VALID_SALT);\n\t\t$this->assertSame($pdoUser->getHash(), $this->VALID_HASH);\n\t\t$this->assertSame($pdoUser->getEmail(), $this->VALID_EMAIL);\n\t\t$this->assertSame($pdoUser->getName(), $this->VALID_NAME);\n\n\t}", "public function testSetRoleUsers()\n {\n }", "public function setUp() {\n $this->user = new \\App\\Models\\User;\n }" ]
[ "0.6698907", "0.6695186", "0.65961087", "0.65581626", "0.65578306", "0.651998", "0.64748776", "0.6473458", "0.63354295", "0.6325115", "0.6311413", "0.63069844", "0.6304938", "0.63031155", "0.628658", "0.62815475", "0.62808925", "0.6253458", "0.6239532", "0.6236414", "0.6219479", "0.6196965", "0.61861545", "0.6156765", "0.61488044", "0.613971", "0.611344", "0.61059994", "0.60832125", "0.60814035", "0.6072524", "0.60402465", "0.60328", "0.60160553", "0.60142976", "0.59976315", "0.5995017", "0.5994056", "0.5988508", "0.5986011", "0.59794843", "0.59774673", "0.5977108", "0.59718376", "0.59674156", "0.59673315", "0.5955088", "0.5946952", "0.59454226", "0.59390515", "0.5937483", "0.5911711", "0.59103954", "0.58904517", "0.58829206", "0.588224", "0.5877826", "0.5850521", "0.5848707", "0.5845821", "0.5839023", "0.5832475", "0.58231056", "0.580587", "0.58027416", "0.5801493", "0.58007777", "0.58007777", "0.58007777", "0.58007777", "0.58007777", "0.58007777", "0.58007777", "0.5800745", "0.5798161", "0.579225", "0.57884264", "0.57877076", "0.5785011", "0.57684326", "0.57671547", "0.5766549", "0.5763056", "0.5757315", "0.57477015", "0.57477015", "0.57477015", "0.57477015", "0.57477015", "0.57477015", "0.57477015", "0.57477015", "0.5740902", "0.5739137", "0.57388985", "0.5732795", "0.57327664", "0.5731717", "0.5730403", "0.5704659" ]
0.70196193
0
Data provider for testU2fRegisterRedirect
public function dataProviderU2fRegisterRedirect() { $empty = []; $withRegistration = new User([ 'id' => '00000000-0000-0000-0000-000000000001', 'username' => 'user-1', ]); return [ [$empty, ['action' => 'login']], [$withRegistration, ['action' => 'u2fAuthenticate']], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegister()\n {\n }", "public function testRegistration(): void { }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function testProfileUnilogin()\n {\n\n }", "public function dataProviderU2fAuthenticateRedirectCustomUser()\n {\n $empty = [];\n $withWhoutRegistration = new User([\n 'id' => '00000000-0000-0000-0000-000000000002',\n 'username' => 'user-2',\n ]);\n\n return [\n [$empty, ['action' => 'login']],\n [$withWhoutRegistration, ['action' => 'u2fRegister']],\n ];\n }", "public function testUserRegister()\n {\n $response = $this->get('/register')\n ->assertStatus(200)\n ->assertSee('Register');\n }", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function testLoginRegister(){\n $user = User::find(1);\n $this->be($user);\n\n $response =$this->get(route('administracion'));\n $response->assertStatus(200);\n }", "public function testLoginWithOutRegister(){\n $response =$this->get(route('administracion'));\n $response->assertRedirect(route('login'));\n }", "public function testRegisterButLogin(){\n $user = User::find(1);\n $this->be($user);\n\n $response =$this->get(route('register'));\n $response->assertRedirect(route('home'));\n }", "public function user_can_register_with_valid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n \t$user1= factory(User::class)->make();\n\n//\t\t\tdie($user1);\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n\n ->waitFor('#nav-register')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'password'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>$user1->password, 'field_type'=> 'password']\n\t ]\n\t );\n $browser->assertpathIs('/restaurants')\n ->assertSeeIn('#accountName',$user1->username)\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up')\n ->logout();\n });\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function testRegister()\n {\n $this->visit('/register')\n ->type('Test User', 'name')\n ->type('081233548738', 'phone')\n ->type('Tester', 'occupation')\n ->type('[email protected]', 'email')\n ->type(bcrypt('testing123'), 'password')\n ->press('Register')\n ->seeInDatabase('users', ['email' => '[email protected]']);\n }", "public function testSeeRegisterTest()\n {\n $response = $this->get('/register');\n\n $response->assertStatus(200);\n $response->assertSeeText(config('app.name'));\n }", "public function testRegistrationExtraFields(): void { }", "public function testWebinarRegistrantGet()\n {\n }", "public function testGetSelfServiceBrowserRegistrationRequest()\n {\n }", "function testDoubleRegistration() {\n\t\t$pkey = Cgn_User::registerUser($this->user);\n\t\t$this->assertEqual(FALSE, $pkey);\n\t}", "public function test_is_new_user_can_register()\n {\n $data = factory('App\\User')->make();\n\n $this->post(route('register'), $data->toArray())\n ->assertRedirect(\"/\");\n }", "public function testRegister()\n {\n $this->visit('/')\n ->click('Login')\n ->type('[email protected]', 'email')\n ->type('password', 'password')\n ->press('Login')\n ->see('Dashboard');\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testRegisterForm()\n {\n \\Cake\\Core\\Configure::write('CM.Register', true);\n\n $this->get('/register');\n\n $this->assertResponseSuccess();\n\n $this->assertNoRedirect();\n\n $this->assertResponseContains('<input type=\"email\" name=\"email\" required=\"required\" maxlength=\"255\" id=\"email\">');\n $this->assertResponseContains('<input type=\"password\" name=\"new_password\" required=\"required\" id=\"new-password\" value=\"\">');\n $this->assertResponseContains('<input type=\"password\" name=\"confirm_password\" required=\"required\" id=\"confirm-password\" value=\"\">');\n }", "public function testNewUserRegistration()\n\t{\n\t $this->visit('/register')\n\t ->type('Taylor', 'name')\n\t ->type('[email protected]', 'email')\n\t ->type('mytest', 'password')\n\t ->type('mytest', 'password_confirmation')\n\t ->press('Register');\n\t}", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function testRegisterPageDisplay()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->assertDontSee('Contacts Manager');\n });\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testMemberRegistrationForm()\n {\n $response = $this\n ->get('/register-member')\n ->assertStatus(200);\n }", "public function testRegisterInvalid()\n {\n \\Cake\\Core\\Configure::write('CM.Register', false);\n\n $this->get('/register');\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/');\n\n \\Cake\\Core\\Configure::write('CM.Register', true);\n\n $this->session([\n 'Auth' => [\n 'User' => [\n 'id' => 5,\n 'role_id' => 1,\n 'email' => '[email protected]'\n ]\n ]\n ]);\n\n $this->get('/register');\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/login');\n }", "public function testAuthenticationsInweboIdGet()\n {\n }", "public function logInRegisterPage();", "public function testSignUp()\n {\n $rand = rand();\n $this->visit('/register')\n ->type('ruchi', 'name')\n ->type('ruchi' .$rand.'@in.com', 'email')\n ->type('qwerty', 'password')\n ->type('qwerty', 'password_confirmation')\n ->press('Register')\n ->seePageIs('/');\n }", "public function test_user_can_register_via_password()\n {\n\n $this->artisan('passport:install');\n\n $temp_user = factory(User::class)->make();\n\n $request = [\n 'email' => $temp_user->email,\n 'name' => $temp_user->name,\n 'password' => 'password',\n 'password_confirmation' => 'password',\n ];\n\n $response = $this->postJson('/register', $request);\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n \"access_token\",\n \"token_type\",\n \"refresh_token\",\n \"expires_in\"\n ]);\n }", "public function getLoginAfterRegistration();", "public function testRegistrationFieldsMissing(): void { }", "public function testRegisterSuccess()\n {\n $mock = new MockHandler([\n new Response(200, [], '{\"token\": \"QpwL5tke4Pnpja7X4\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/create-user', ['email' => '[email protected]', 'password' => 'password'], $this->headers)\n ->assertStatus(200)\n ->assertJson(['token' => 'QpwL5tke4Pnpja7X4']);\n\n }", "public function testRegisterCompany()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->type('name', env('DUSK_NEW_NAME'))\n ->type('email', env('DUSK_NEW_USER'))\n ->type('verificateEmail', env('DUSK_NEW_USER'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testRedirect()\n {\n //$member = $this->objFromFixture(Member::class, \"joebloggs\");\n //$this->logInAs($member);\n $this->markTestIncomplete('Test user config CMS fields');\n }", "public function dataProviderU2User()\n {\n $empty = [];\n $withRegistration = new User([\n 'id' => '00000000-0000-0000-0000-000000000001',\n 'username' => 'user-1',\n ]);\n $withoutRegistration = new User([\n 'id' => '00000000-0000-0000-0000-000000000002',\n 'username' => 'user-2',\n ]);\n\n return [\n // [$empty, ['action' => 'login']],\n // [$withoutRegistration, ['action' => 'u2fRegister']],\n [$withRegistration, ['action' => 'u2fAuthenticate']],\n ];\n }", "public function testRegisterSucessful() {\n\t\t$data = $this->getUserData(\n\t\t\t$this->username,\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t$this->email\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\tvar_dump($resp_data);\n\t\t$this->assertResponseStatus(201);\n\t\t$this->assertEquals($resp_data->user->username, $this->username);\n\t\t$this->assertEquals($resp_data->user->first_name, $this->first_name);\n\t\t$this->assertEquals($resp_data->user->surname, $this->surname);\n\t\t$this->assertEquals($resp_data->user->email, $this->email);\n\t}", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','[email protected]')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "private function register()\n {\n $this->browser->visit('/admin')->pause(1000)\n ->assertPathIs('/admin/register')\n ->type('first_name', $this->faker->firstName)\n ->type('last_name', $this->faker->lastName)\n ->type('email', $this->email)\n ->type('password', $this->password)\n ->type('password_confirmation', $this->password)\n ->press('Register')\n ->assertPathIs('/admin');\n }", "public function testForm()\n {\n $response = $this->get('/register');\n\n $response->assertStatus(200)\n ->assertSee('Register');\n }", "public function testCanRegister()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/');\n $browser->assertSee('TicTacToe');\n $browser->clickLink('register');\n $browser->assertSee('Create your account');\n $browser->type('name', $name = $this->faker->name);\n $browser->type('email', $this->faker->email);\n $password = $this->faker->password;\n $browser->type('password', $password);\n $browser->type('password_confirmation', $password);\n $browser->press('Register')\n ->on(new Home)\n ->assertSee('Dashboard')\n ->assertSee($name . ', you have lost 0 times and won 0 times.');\n });\n }", "public function testRegisterUser()\n {\n $this->withoutExceptionHandling();\n $user = [\n 'email' => '[email protected]',\n 'password' => 'test1234',\n ];\n $response = $this->postJson('/api/register', $user);\n $response->assertStatus(201)->assertJsonFragment([\n 'email' => '[email protected]',\n ]);\n }", "public function testUserMeGet()\n {\n }", "public function user_cannot_register_with_invalid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n\t $user1= factory(User::class)->make([\n\t \t'first_name'=> 'al',\n\t\t 'last_name' => str_repeat('Number of times the input string should be repeated',15),\n\t\t 'username' => 'al',\n\t\t 'email' => 'h@',\n\t\t 'password' => 'secret'\n\t ]);\n\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>ucfirst($user1->password), 'field_type'=> 'text']\n\t\t ]\n\t );\n//\t\t\tdie($user1->last_name);\n //Assertion not written\n $browser->assertpathIs('/register')\n\t ->assertSeeIn('#registerForm div:nth-child(2) .invalid-feedback-content','The first name must be at least 3 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(3) .invalid-feedback-content','The last name may not be greater than 255 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(4) .invalid-feedback-content','The username must be at least 3 characters.')\n\t ->assertSeeIn('#registerForm div:nth-child(5) .invalid-feedback','The email must be a valid email address.')\n\t ->assertSeeIn('#registerForm div:nth-child(6) .invalid-feedback-content', 'The password confirmation does not match.')\n ->clickLink('Account')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up');\n });\n }", "public function testRegistrationIsSuccessfulWithValidInputs()\n {\n $this->output->writeln('Running testRegistrationIsSuccessfulWithValidInputs...');\n\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', 'John Smith')\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->press('Register')\n ->assertPathIs('/home');\n });\n }", "public function testTokenRegistration()\n {\n\n User::where('email', '[email protected]')->delete();\n\n $response = $this->post('/api/register', ['email' => '[email protected]', 'name' => 'test', 'password' => '123456', 'is_admin' => 0]);\n\n $this->assertEquals(200, $response->status());\n\n User::where('email', '[email protected]')->delete();\n\n $response = $this->post('/api/register', ['email' => '[email protected]', 'name' => 'test', 'password' => '123456', 'is_admin' => 0]);\n\n // Assert the JSON structure of successfull action.\n $response->assertJsonStructure( [\n 'status',\n 'token'\n ]);\n\n\n $response = $this->post('/api/register', ['email' => '[email protected]', 'name' => 'test', 'password' => '123456', 'is_admin' => 0]);\n\n // Assert if user is douplicated\n $this->assertEquals(401, $response->status());\n\n $response->assertJsonStructure( [\n 'error' => [ 'email' ]\n ]);\n\n\n }", "public function testU2fAuthenticateRedirectCustomUser($userData, $redirect)\n {\n $request = $this->getMockBuilder('Cake\\Http\\ServerRequest')\n ->setMethods(['getSession', 'is'])\n ->getMock();\n $this->Trait->setRequest($request);\n $request->expects($this->any())\n ->method('is')\n ->with(\n $this->equalTo('ssl')\n )->will($this->returnValue(true));\n $response = new Response([\n 'body' => (string)time(),\n ]);\n $this->Trait->expects($this->once())\n ->method('redirect')\n ->with(\n $this->equalTo($redirect)\n )->will($this->returnValue($response));\n $this->_mockSession([\n 'U2f.User' => $userData,\n ]);\n $actual = $this->Trait->u2fAuthenticate();\n $this->assertSame($response, $actual);\n }", "public function test_new_user_can_register()\n {\n $this->RegisterRolesAndPermissions();\n// $this->withExceptionHandling();\n $response = $this->postJson(route('auth.register'), [\n 'name' => \"ehsan dastras\",\n 'email' => \"[email protected]\",\n 'password' => \"12345678\",\n ]);\n\n $response->assertStatus(Response::HTTP_CREATED);\n }", "public function testRegistrationPasswordsDontMatch(): void { }", "public function testGetUserToken()\n {\n\n }", "public function testMemberRegistrationHandler()\n {\n Mail::fake();\n\n // POST and check status code\n $response = $this\n ->followingRedirects()\n ->post('/register-member', $this->postData)\n ->assertStatus(200);\n\n // Check existence of member and user in DB\n $this->assertDatabaseHas('members', $this->memberData);\n $this->assertDatabaseHas('users', $this->userData);\n $this->assertDatabaseHas('event_member', [\n 'member_id' => \\App\\Models\\Member::latest()->first()->id,\n 'event_id' => $this->postData['selected_camp'],\n ]);\n Event::assertDispatched(MemberUpdated::class);\n }", "public function testSuccess()\n {\n $this->userGhost();\n \n # Config for easy registration\n $module = Module_Register::instance();\n $module->saveConfigValue('signup_password_retype', false);\n $module->saveConfigValue('email_activation', false);\n $module->saveConfigValue('admin_activation', false);\n $module->saveConfigValue('activation_login', false);\n $module->saveConfigValue('force_tos', false);\n $method = Form::make();\n $parameters = [\n 'user_name' => 'Peter1',\n 'user_password' => '11111111',\n ];\n $response = MethodTest::make()->method($method)->parameters($parameters)->execute();\n assertEquals(200, $response->code, \"Check if registration works\");\n }", "public function test_it_store_data_for_user()\n {\n $user = ['name'=>'mostafa','email'=>'123@frr','password'=>'5654'];\n $response = $this->post('/api/register',$user);\n $this->assertDatabaseHas('users',['name'=>'mostafa']);\n }", "public function testRegisterNotConfirmedPassword() {\n $generic = new GenericValidationTests($this);\n $generic->testNotConfirmedAttribute('register', 'POST', self::$headers, self::$body, 'password');\n }", "public function testGetNetworkMerakiAuthUser()\n {\n }", "public function testEnterCorrectData()\n {\n $user = User::factory()->create();\n \n $response = $this->call('POST', '/admin/signin', [\n 'email' => $user->email,\n 'password' => '123456',\n '_token' => csrf_token()\n ]);\n \n $this->assertEquals(200, $response->getStatusCode());\n\n \n\n }", "public function testU2fAutheticateFinishWithException()\n {\n $saveUser = TableRegistry::getTableLocator()\n ->get('CakeDC/Users.Users')\n ->get('00000000-0000-0000-0000-000000000001');\n\n $savedRegistration = $saveUser->u2f_registration;\n $this->assertNotNull($savedRegistration);\n $registration = $saveUser->u2f_registration;\n $counter = $registration->counter;\n $this->assertNotNull($registration);\n\n $request = $this->getMockBuilder('Cake\\Http\\ServerRequest')\n ->setMethods(['getSession', 'is', 'getData'])\n ->getMock();\n $this->Trait->setRequest($request);\n $request->expects($this->once())\n ->method('is')\n ->with(\n $this->equalTo('ssl')\n )->will($this->returnValue(true));\n\n $u2fLib = $this->getMockBuilder(U2F::class)\n ->setConstructorArgs(['https://localhost'])\n ->setMethods(['doAuthenticate'])\n ->getMock();\n\n $signs = json_decode(json_encode([\n ['fake' => new \\stdClass()],\n ['fake2' => new \\stdClass()],\n ]));\n $authenticateResponse = json_decode(json_encode([\n 'fakeA' => 'fakevaluea',\n 'fakeB' => 'fakevalueb',\n ]));\n\n $this->Trait->getRequest()->expects($this->once())\n ->method('getData')\n ->with($this->equalTo('authenticateResponse'))\n ->will($this->returnValue(json_encode($authenticateResponse)));\n\n $this->_mockSession([\n 'U2f' => [\n 'User' => new User([\n 'id' => '00000000-0000-0000-0000-000000000001',\n 'username' => 'user-1',\n ]),\n 'authenticateRequest' => json_encode($signs),\n ],\n ]);\n\n $u2fLib->expects($this->once())\n ->method('doAuthenticate')\n ->with(\n $this->equalTo($signs),\n $this->equalTo([$registration]),\n $this->equalTo($authenticateResponse)\n )\n ->will($this->throwException(new \\Exception('Invalid')));\n\n $this->Trait->expects($this->once())\n ->method('createU2fLib')\n ->will($this->returnValue($u2fLib));\n\n $response = new Response();\n $this->Trait->expects($this->once())\n ->method('redirect')\n ->with(['action' => 'u2fAuthenticate'])\n ->will($this->returnValue($response));\n\n $actual = $this->Trait->u2fAuthenticateFinish();\n $this->assertSame($response, $actual);\n $actual = $this->Trait->getRequest()->getSession()->read('U2f');\n $this->assertEquals(\n [\n 'User' => new User([\n 'id' => '00000000-0000-0000-0000-000000000001',\n 'username' => 'user-1',\n ]),\n ],\n $actual\n );\n\n $updatedEntityUser = TableRegistry::getTableLocator()\n ->get('CakeDC/Users.Users')\n ->get('00000000-0000-0000-0000-000000000001');\n\n $updatedEntity = $updatedEntityUser->u2f_registration;\n $this->assertEquals($counter, $updatedEntity->counter);\n }", "public function testSuitSuccess()\n {\n $this->visit('/register')\n ->type('Tester', 'name')\n ->type('[email protected]', 'email')\n ->type('password12', 'password')\n ->type('password12', 'password_confirmation')\n ->press('Register')\n ->seePageIs('/login');\n }", "public function onRegister();", "public function registerUser($data);", "public function test_register()\n {\n $faker = Factory::create();\n // User's data\n $user = [\n 'email' => $faker->email,\n 'name' => $faker->name,\n 'password' => 'password',\n ];\n // Send post request\n $response = $this->json('POST', route('api.register'), $user);\n // Assert it was successful\n $response->assertStatus(200)->json(['successfully register test user!']);\n }", "public function testRegistrationFieldsWrongType(): void { }", "public function testApiRegistrationWithTokenResponse()\n {\n\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $uniqueData[ 'scopes' ] = [ 'api' ];\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayHasKey('token_type', $responseArray);\n $this->assertArrayHasKey('expires_in', $responseArray);\n $this->assertArrayHasKey('access_token', $responseArray);\n $this->assertArrayHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testRegisterUser()\n {\n\n $data = factory(User::class)->raw([\n 'password' => $this->faker->password,\n ]);\n\n $response = $this->postJson(\"$this->baseurl/signup\", $data);\n $response->assertStatus(201);\n $response->assertJsonStructure([\n \"data\" => [\n \"token\",\n \"user\",\n ],\n \"status\",\n \"message\",\n ]);\n }", "public function register_show_2()\n {\n return view('fontend.user.verify');\n }", "public function testUniqueEmailOnRegistration(){\n User::factory(1)->create();\n\n $credentials = [\n \"email\" => \"[email protected]\",\n \"password\" => \"111111\",\n \"password_confirmation\" => \"111111\",\n \"account_type\" => \"Savings\",\n \"account_name\" => \"John Doe\",\n \"phone_number\" => \"08133093344\",\n ];\n\n $response = $this->post(route(\"register.submit\"),$credentials);\n\n $response->assertSessionHasErrors(\"email\");\n\n }", "public function testValidPassword()\n {\n $client = static::createClient();\n $crawler = $client->request('GET', '/register');\n $form = $crawler->selectButton('Envoyer')->form();\n\n $form['user[nickName]'] = 'JoJo';\n $form['user[email]'] = '[email protected]';\n $form['user[plainPassword][first]'] = 'JoJo1234';\n $form['user[plainPassword][second]'] = 'JoJo1234';\n\n $crawler = $client->submit($form);\n\n $this->assertTrue(\n $client->getResponse()->isRedirect('/login')\n );\n }", "public function testVerifyPasswordRecoveryToken()\n {\n }", "public function testInfoUser()\n {\n }", "public function testGetSecondVerifier()\n {\n $secondVerifier = $this->em->getRepository('UserBundle:User')->find(6);\n //Get the polling Station in order to compare its frist & second verifier to the above ones\n $pollingStation = $this->em->getRepository('VtallyBundle:PollingStation')->find(1);\n $_secondVerifier = $pollingStation->getSecondVerifier();\n //$this->assertEquals($secondVerifier, $pollingStation->getSecondVerifier());\n $this->assertEquals($_secondVerifier->getFirstName(), 'VERIFIER 2');\n }", "public function testRegister()\n {\n $crawler = $this->client->request('GET', '/cliente/');\n $crawler = $this->client->followRedirect();\n\n $this->assertTrue($this->client->getContainer()->get('security.context')->isGranted('IS_AUTHENTICATED_ANONYMOUSLY'));\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Acesse sua conta\")')->count());\n \n // validate form\n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '',\n ));\n \n $crawler = $this->client->submit($form);\n $this->assertGreaterThan(0, $crawler->filter('span:contains(\"Campo obrigatório\")')->count());\n \n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '[email protected]',\n ));\n \n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n // Check data in the show view\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Novo cadastro\")')->count());\n }", "public function testAddUserStore()\n {\n\n }", "public function generateRegisterUrl(): string\n {\n // This is why we 'fake' the username to a uniqid, to use the test system's token storage.\n return sprintf(\n '%s/register/%s',\n $this->accountEndpoint,\n $this->generateToken(\"register_\" . uniqid())\n );\n }", "public function testAuthenticationsEmailIdGet()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testGetSelfServiceBrowserLoginRequest()\n {\n }", "public function testCanRegisterUsers()\n {\n $this->post('/api/v1/register', [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => 'johndoepass',\n 'password_confirmation' => 'johndoepass',\n ], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => 'John Doe',\n 'email' => '[email protected]'\n ]\n ]);\n $this->assertDatabaseHas('users', [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'activated' => false\n ]);\n $this->assertDatabaseHas('user_activations', [\n 'email' => '[email protected]'\n ]);\n }", "public function testAuthenticationServiceRequestPasswordReset()\n {\n }", "public function testProfileLogout()\n {\n\n }", "public function testSignUp()\n {\n //add new user\n $this->browse(function ($browser) {\n $browser->visit('user/signup')\n ->type('email', '[email protected]')\n ->type('phone', '0775635458')\n ->type('name', 'ABC')\n ->type('password', '1234')\n ->type('passwordConfirm', '1234')\n ->click('.signup')\n ->assertPathIs('/');\n\n });\n }", "public function registerUrlC2B() {\n $data = [\n 'ShortCode' => $this->shortCode,\n 'ResponseType' => ' ',\n 'ConfirmationURL' => $this->apiBaseUrl.'/mobilepay/c2b/confirmation',\n 'ValidationURL' => $this->apiBaseUrl.'/mobilepay/c2b/validation_url'\n ];\n return $this->remotePostCall('mpesa/c2b/v1/registerurl', $data);\n }", "public function testRegisterActionPassWithActivation()\n {\n \\Cake\\Core\\Configure::write('CM.Register', true);\n \\Cake\\Core\\Configure::write('CM.ActivationOnRegister', true);\n\n $data = [\n 'email' => '[email protected]',\n 'new_password' => 'test',\n 'confirm_password' => 'test',\n ];\n\n $this->post('/register', $data);\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/users/login');\n\n $user = $this->Users->get(5);\n\n $this->assertNotNull($user->get('activation_key'));\n $this->assertEquals(false, $user->get('active'));\n }", "public function testRegistrationEmailAlreadyInUse(): void { }", "public function testRegisterFailure()\n {\n $mock = new MockHandler([\n new Response(400, [], '{\"error\": \"register failure\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/create-user', ['email' => '[email protected]', 'password' => 'password'], $this->headers)\n ->assertStatus(400)\n ->assertSeeText('register failure');\n\n }", "public function testProfileCreate()\n {\n\n }", "public function testRegisterUsedUsername() {\n\t\t$data = $this->getUserData(\n\t\t\t$this->username,\t\t\t// Already registered\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t\t$this->assertEquals(count($resp_data->messages), 1);\n\t}", "public function testRegistrationNoConfirmPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->type('username', 'Tester1')\n ->type('first_name', 'Test')\n ->type('last_name', 'User')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', '')\n ->click('button[type=\"submit\"]')\n\n // we're still on the registration page\n ->assertSee('Save');\n });\n }", "public function testRegister0()\n{\n\n $actual = $this->migrationServiceProvider->register();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegisterFail()\n {\n $response = $this->post('/register');\n\n $response->assertSessionHasErrors(['name', 'email', 'password']);\n }", "public function testRegistrationPasswordOnlyLowerCase(): void { }", "abstract function register_data($register);", "public function test_users_store_valid_redirects_home(){\n $this->signInUser();\n $response = $this->post(route('users.store'), $this->user); \n $response->assertStatus(302);\n $response->assertRedirect(route('home.index'));\n }", "public function registration_get(){\n }", "public function redirectToProviderInstagram()\n {\n \\Session::flash('type', 'register');\n return Socialite::driver('instagram')->redirect();\n }", "public function testGetForgotPageWithAuth()\n\t{\n\t\t$this->be($this->user);\n\t\t$this->call('orchestra::forgot@index');\n\t\t$this->assertRedirectedTo(handles('orchestra'));\n\t}" ]
[ "0.6482484", "0.641024", "0.6299298", "0.6241206", "0.6165038", "0.6152605", "0.6110356", "0.60775757", "0.6065265", "0.6051713", "0.60439306", "0.60261595", "0.600683", "0.595628", "0.59555197", "0.59355533", "0.5912699", "0.59064656", "0.5904065", "0.588304", "0.58618695", "0.5814299", "0.5813051", "0.58054996", "0.5785698", "0.57559514", "0.5753524", "0.57385945", "0.5703026", "0.56978005", "0.56599927", "0.5643771", "0.5641194", "0.5634078", "0.5615045", "0.5614525", "0.56093305", "0.55971086", "0.55748236", "0.5573072", "0.5569696", "0.5560311", "0.5558146", "0.55508745", "0.55284", "0.55117625", "0.5510858", "0.5507997", "0.5494226", "0.54936916", "0.549359", "0.54860735", "0.5480742", "0.5478331", "0.54761034", "0.54758143", "0.5472784", "0.547153", "0.5467313", "0.5463341", "0.5462447", "0.546096", "0.5448469", "0.544514", "0.54436105", "0.5438073", "0.54377776", "0.54376286", "0.54238683", "0.54231673", "0.5416907", "0.5411303", "0.5401088", "0.53862894", "0.5381567", "0.53799427", "0.537991", "0.5369954", "0.5363728", "0.53611046", "0.53484523", "0.53473526", "0.5341435", "0.5336125", "0.5332666", "0.53256226", "0.5314207", "0.5287839", "0.5284088", "0.52822673", "0.5277904", "0.52741814", "0.5273914", "0.5271743", "0.527143", "0.5268022", "0.52671945", "0.52648944", "0.5262121", "0.52557653" ]
0.6888445
0
Data provider for testU2fAuthenticateRedirectCustomUser
public function dataProviderU2fAuthenticateRedirectCustomUser() { $empty = []; $withWhoutRegistration = new User([ 'id' => '00000000-0000-0000-0000-000000000002', 'username' => 'user-2', ]); return [ [$empty, ['action' => 'login']], [$withWhoutRegistration, ['action' => 'u2fRegister']], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testU2fAuthenticateRedirectCustomUser($userData, $redirect)\n {\n $request = $this->getMockBuilder('Cake\\Http\\ServerRequest')\n ->setMethods(['getSession', 'is'])\n ->getMock();\n $this->Trait->setRequest($request);\n $request->expects($this->any())\n ->method('is')\n ->with(\n $this->equalTo('ssl')\n )->will($this->returnValue(true));\n $response = new Response([\n 'body' => (string)time(),\n ]);\n $this->Trait->expects($this->once())\n ->method('redirect')\n ->with(\n $this->equalTo($redirect)\n )->will($this->returnValue($response));\n $this->_mockSession([\n 'U2f.User' => $userData,\n ]);\n $actual = $this->Trait->u2fAuthenticate();\n $this->assertSame($response, $actual);\n }", "public function testAuthenticationsInweboIdGet()\n {\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testGetNetworkMerakiAuthUser()\n {\n }", "public function testAuthenticationServiceAuthenticationInformation()\n {\n }", "public function testAuthenticateUser ()\n {\n $result = $this->storage->authenticateUser($this->accessId1, $this->signature1, $this->stringToSign1);\n $this->assertEquals($this->accessId1, $result['access_key']);\n }", "public function testRedirect()\n {\n //$member = $this->objFromFixture(Member::class, \"joebloggs\");\n //$this->logInAs($member);\n $this->markTestIncomplete('Test user config CMS fields');\n }", "public function testAuthenticationsEmailIdGet()\n {\n }", "protected function getBackendUserAuthentication() {}", "protected function getBackendUserAuthentication() {}", "protected function getBackendUserAuthentication() {}", "protected function getBackendUserAuthentication() {}", "protected function getBackendUserAuthentication() {}", "public function testUsersTotpAuth()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testUserMeGet()\n {\n }", "public function authenticateSecondFactor() {\t \t \t\t \n\t \n\t $module = $this->getModule();\n\t \n\t\t$authParams = array(\n\t\t\t'module' => $module,\n\t\t);\n\t\t\n\t\tif ($module == RublonMagentoModule::CONNECT) {\n\t\t $callbackUrl = $this->getCallbackUrl($connect = true);\n\t\t} else {\n\t\t $callbackUrl = $this->getCallbackUrl();\n\t\t}\n\t\t\t\t\n\t\t$userId = $this->getAuthUserId();\n\t\t$email = $this->getAuthUserEmail(); \n\t\t\n\t\t$this->clearLoggedUser();\n \n try {\n \n $authUrl = $this->service->auth($callbackUrl, $userId, $email, $authParams); \n if (!empty($authUrl)) {\n \n // Retrive cached rublon features\n RublonFeature::getFeatures();\n \n $this->redirect($authUrl);\n } else {\n // do nothing\n }\n \n } catch (RublonException $e) {\n \n $notifierOptions = array(\n 'Method' => __METHOD__,\n 'Line' => __LINE__,\n 'Trace' => $e->getTraceAsString()\n );\n \n $this->addError($e, $notifierOptions);\n }\n\t}", "public function testGetUserToken()\n {\n\n }", "public function processLoginDataProvider() {}", "public function testAddAuthentication();", "public function providerTestAuthenticateAction()\n {\n return array(\n array(false, null, null, new Response(), false),\n array(false, null, null, false, false),\n array(false, null, null, false, true),\n array(false, 'localhost/test1', null, false, false),\n array(false, 'localhost/test1', null, false, true),\n array(false, 'localhost/test1', 'localhost/test2', false, false),\n array(false, 'localhost/test1', 'localhost/test2', false, true),\n array(false, null, 'localhost/test2', false, false),\n array(false, null, 'localhost/test2', false, true),\n\n array(true, null, null, false, false),\n array(true, null, null, false, true),\n array(true, 'localhost/test1', null, false, false),\n array(true, 'localhost/test1', null, false, true),\n array(true, 'localhost/test1', 'localhost/test2', false, false),\n array(true, 'localhost/test1', 'localhost/test2', false, true),\n array(true, null, 'localhost/test2', false, false),\n array(true, null, 'localhost/test2', false, true),\n );\n }", "public function testGetBackendUser()\n {\n $itemsProcFunc = GeneralUtility::makeInstance(ColPosList::class);\n $backendUserAuthentication = GeneralUtility::makeInstance(BackendUserAuthentication::class);\n $GLOBALS['BE_USER'] = $backendUserAuthentication;\n $result = $itemsProcFunc->getBackendUser();\n $this->assertEquals($backendUserAuthentication, $result);\n }", "public function testAuthenticateEmailUser ()\n {\n $result = $this->storage->authenticateUser($this->email1, $this->signature1, $this->stringToSign1);\n $this->assertEquals($this->email1, $result['email_address']);\n }", "public function testAuthenticationServiceListAuthentications()\n {\n }", "public function testAuthenticationServiceAuthenticationUpdate()\n {\n }", "public function testCreateNetworkMerakiAuthUser()\n {\n }", "public function testAuthenticationServiceListIdentityProviders()\n {\n }", "public function testGetNetworkMerakiAuthUsers()\n {\n }", "public function testAuth()\n {\n $user = factory(User::class)->create();\n $this->browse(function ($first, $second, $third) use ($user) {\n // prompted to log in\n $first->visit(new AdminPage)\n ->assertRouteIs('login');\n\n // successfully login\n $second->loginAs($user)\n ->visit(new AdminPage)\n ->assertRouteIs('admin')\n ->assertSee('Dashboard')\n ->assertSee($user->name);\n\n // successfully logout\n $third->loginAs($user)\n ->visit(new AdminPage)\n ->click('@profile-toggle')\n ->click('@logout-link')\n ->assertRouteIs('login');\n });\n }", "public function dataProviderU2fRegisterRedirect()\n {\n $empty = [];\n $withRegistration = new User([\n 'id' => '00000000-0000-0000-0000-000000000001',\n 'username' => 'user-1',\n ]);\n\n return [\n [$empty, ['action' => 'login']],\n [$withRegistration, ['action' => 'u2fAuthenticate']],\n ];\n }", "public function testAuthenticationServiceAuthenticationCreate()\n {\n }", "public function testShowUnauthicatedAccess(): void { }", "public function testEnterCorrectData()\n {\n $user = User::factory()->create();\n \n $response = $this->call('POST', '/admin/signin', [\n 'email' => $user->email,\n 'password' => '123456',\n '_token' => csrf_token()\n ]);\n \n $this->assertEquals(200, $response->getStatusCode());\n\n \n\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = '[email protected]';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function testGetSingleUserPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@view', array(1));\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}", "public function testU2fAutheticateFinishWithException()\n {\n $saveUser = TableRegistry::getTableLocator()\n ->get('CakeDC/Users.Users')\n ->get('00000000-0000-0000-0000-000000000001');\n\n $savedRegistration = $saveUser->u2f_registration;\n $this->assertNotNull($savedRegistration);\n $registration = $saveUser->u2f_registration;\n $counter = $registration->counter;\n $this->assertNotNull($registration);\n\n $request = $this->getMockBuilder('Cake\\Http\\ServerRequest')\n ->setMethods(['getSession', 'is', 'getData'])\n ->getMock();\n $this->Trait->setRequest($request);\n $request->expects($this->once())\n ->method('is')\n ->with(\n $this->equalTo('ssl')\n )->will($this->returnValue(true));\n\n $u2fLib = $this->getMockBuilder(U2F::class)\n ->setConstructorArgs(['https://localhost'])\n ->setMethods(['doAuthenticate'])\n ->getMock();\n\n $signs = json_decode(json_encode([\n ['fake' => new \\stdClass()],\n ['fake2' => new \\stdClass()],\n ]));\n $authenticateResponse = json_decode(json_encode([\n 'fakeA' => 'fakevaluea',\n 'fakeB' => 'fakevalueb',\n ]));\n\n $this->Trait->getRequest()->expects($this->once())\n ->method('getData')\n ->with($this->equalTo('authenticateResponse'))\n ->will($this->returnValue(json_encode($authenticateResponse)));\n\n $this->_mockSession([\n 'U2f' => [\n 'User' => new User([\n 'id' => '00000000-0000-0000-0000-000000000001',\n 'username' => 'user-1',\n ]),\n 'authenticateRequest' => json_encode($signs),\n ],\n ]);\n\n $u2fLib->expects($this->once())\n ->method('doAuthenticate')\n ->with(\n $this->equalTo($signs),\n $this->equalTo([$registration]),\n $this->equalTo($authenticateResponse)\n )\n ->will($this->throwException(new \\Exception('Invalid')));\n\n $this->Trait->expects($this->once())\n ->method('createU2fLib')\n ->will($this->returnValue($u2fLib));\n\n $response = new Response();\n $this->Trait->expects($this->once())\n ->method('redirect')\n ->with(['action' => 'u2fAuthenticate'])\n ->will($this->returnValue($response));\n\n $actual = $this->Trait->u2fAuthenticateFinish();\n $this->assertSame($response, $actual);\n $actual = $this->Trait->getRequest()->getSession()->read('U2f');\n $this->assertEquals(\n [\n 'User' => new User([\n 'id' => '00000000-0000-0000-0000-000000000001',\n 'username' => 'user-1',\n ]),\n ],\n $actual\n );\n\n $updatedEntityUser = TableRegistry::getTableLocator()\n ->get('CakeDC/Users.Users')\n ->get('00000000-0000-0000-0000-000000000001');\n\n $updatedEntity = $updatedEntityUser->u2f_registration;\n $this->assertEquals($counter, $updatedEntity->counter);\n }", "function isAuthenticate(Controller $controller) {\n \n $pdoService = $controller->getService('PDO');\n $conn = $pdoService->getConnection();\n \n $controller->set('user', array(\n 'name' => 'lseguin',\n 'email' => '[email protected]',\n 'type' => 'admin'\n ));\n \n}", "public function testCustomAuthentication(): void\n {\n $authClass = 'CKSource\\Bundle\\CKFinderBundle\\Tests\\Fixtures\\Authentication\\CustomAuthentication';\n\n $this->container->loadFromExtension($this->extensionAlias, [\n 'connector' => [\n 'authenticationClass' => $authClass\n ]\n ]);\n\n $this->container->compile();\n\n /* @var $auth \\CKSource\\Bundle\\CKFinderBundle\\Tests\\Fixtures\\Authentication\\CustomAuthentication */\n $auth = $this->container->get('ckfinder.connector.auth');\n $this->assertInstanceOf('CKSource\\Bundle\\CKFinderBundle\\Authentication\\AuthenticationInterface', $auth);\n $this->assertInstanceOf($authClass, $auth);\n\n /* @var $connector \\CKSource\\CKFinder\\CKFinder */\n $connector = $this->container->get('ckfinder.connector');\n $connectorAuth = $connector->offsetGet('authentication');\n $this->assertSame($auth, $connectorAuth);\n\n $this->assertFalse($connectorAuth->authenticate());\n $auth->setAuthenticated(true);\n $this->assertTrue($connectorAuth->authenticate());\n }", "protected function detectLoginProvider() {}", "public function testInfoUser()\n {\n }", "function testSimpleLoginRequest() {\n $Record = $this->RecordObj->create(array('active'=>1));\n $this->AuthwellUser->create();\n $this->assertTrue($this->AuthwellUser->save($Record));\n #debug($this->AuthwellUser->invalidFields());\n\n // then call\n $FormData = array(\n 'AuthwellUser' => array(\n 'email_login' => $Record['email'],\n 'password_login' => $Record['password']\n )\n );\n\n $is_logged_in = $this->AuthwellUser->is_valid_login_request($FormData);\n $Cache = $this->AuthwellUser->UserDataCache;\n\n $this->assertTrue($is_logged_in);\n $this->assertEqual($Cache['User']['email'], $Record['email']);\n }", "public function testAuthenticateTokenParameter()\n {\n $request = new ServerRequest();\n\n $result = $this->auth->getUser($request, $this->response);\n $this->assertFalse($result);\n\n $expected = [\n 'id' => 1,\n 'group_id' => 1,\n 'user_name' => 'admad',\n 'email' => '[email protected]',\n 'created' => new FrozenTime('2014-03-17 01:18:23'),\n 'updated' => new FrozenTime('2014-03-17 01:20:31'),\n ];\n $request = new ServerRequest(['url' => 'posts/index?token=' . $this->token]);\n $result = $this->auth->getUser($request, $this->response);\n $this->assertEquals($expected, $result);\n\n $this->auth->setConfig('parameter', 'tokenname');\n $request = new ServerRequest(['url' => 'posts/index?tokenname=' . $this->token]);\n $result = $this->auth->getUser($request, $this->response);\n $this->assertEquals($expected, $result);\n\n $request = new ServerRequest(['url' => 'posts/index?wrongtoken=' . $this->token]);\n $result = $this->auth->getUser($request, $this->response);\n $this->assertFalse($result);\n }", "public function testAuthenticationServiceAccessTokenInformation()\n {\n }", "public function dataProviderU2User()\n {\n $empty = [];\n $withRegistration = new User([\n 'id' => '00000000-0000-0000-0000-000000000001',\n 'username' => 'user-1',\n ]);\n $withoutRegistration = new User([\n 'id' => '00000000-0000-0000-0000-000000000002',\n 'username' => 'user-2',\n ]);\n\n return [\n // [$empty, ['action' => 'login']],\n // [$withoutRegistration, ['action' => 'u2fRegister']],\n [$withRegistration, ['action' => 'u2fAuthenticate']],\n ];\n }", "public function testGetUser()\n {\n }", "public function test_logged_in_user_show_info()\n {\n $user=User::factory()->create();\n //behavior as this created user\n $response=$this->actingAs($user)->get(route('auth.user'));\n\n $response->assertStatus(Response::HTTP_OK);\n }", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function authorizedTest(WebTestCase $webTestCase);", "public function testAuthenticate()\n {\n $this->mockWebApplication([\n 'modules' => [\n 'oauth2' => [\n 'resourceServerAccessTokenRevocationValidation' => false, // Token revocation validation is tested during functional testing.\n ]\n ]\n ]);\n // phpcs:enable Generic.Files.LineLength.TooLong\n\n $request = Yii::$app->request;\n $request->headers->set('Authorization', 'Bearer ' . $this->validAccessToken);\n\n $httpBearerAuth = new Oauth2HttpBearerAuth();\n\n $identity = $httpBearerAuth->authenticate(Yii::$app->user, $request, Yii::$app->response);\n $this->assertNotNull($identity);\n $this->assertEquals(123, $identity->getId());\n }", "public function testAuth() {\n /** @var \\Drupal\\users_jwt\\UsersJwtKeyRepositoryInterface $key_repository */\n $key_repository = $this->container->get('users_jwt.key_repository');\n /** @var \\Drupal\\Core\\Extension\\ExtensionPathResolver $path_resolver */\n $path_resolver = $this->container->get('extension.path.resolver');\n $module_path = $path_resolver->getPath('module', 'users_jwt');\n $path = $module_path . '/tests/fixtures/users_jwt_rsa1-public.pem';\n $public_key = file_get_contents($path);\n $key_repository->saveKey($this->testUser->id(), 'wxyz', 'RS256', $public_key);\n $variants = [\n 'uid' => $this->testUser->id(),\n 'uuid' => $this->testUser->uuid(),\n 'name' => $this->testUser->getAccountName(),\n ];\n foreach ($variants as $id_type => $id_value) {\n $this->dotestAuth($id_type, $id_value, $module_path);\n }\n }", "public function handleProviderCallback()\n\n {\n $user = Socialite::driver('facebook')->user();\n\n $gender = $user->user['gender'];\n $ext_id = $user->user['id'];\n $verified = $user->user['verified'];\n $avatar = $user->avatar;\n $name = explode(' ',$user->name);\n\n\n $social_exist = User::where('ext_id',$ext_id)->first();\n\n\n if($social_exist)\n {\n return $this->loginUsingId($social_exist->id);\n }\n else\n {\n $user_create = User::create([\n 'uuid' => Uuid::generate(5,$user->email, Uuid::NS_DNS),\n \"firstname\" => \"$name[0]\",\n \"lastname\" => \"$name[1]\",\n \"email\" => \"$user->email\",\n 'password' => bcrypt($ext_id),\n \"gender\" => \"$gender\",\n \"avatar\" => $avatar,\n \"ext_id\" => $ext_id,\n \"ext_source\" => \"facebook\",\n \"ext_verified\" => \"$verified\"\n ]);\n\n $userObj = User::find($user_create->id);\n\n if(Event::fire(new WelcomeUser($user_create)))\n {\n return $this->loginUsingId($user_create->id);\n }else\n {\n //Redirect to error page and log in the incident\n }\n }\n }", "public function authenticateDataProvider(): array\n {\n $userData = [\n 'uid' => 1,\n 'username' => 'test',\n 'password' => md5('test123'),\n ];\n\n return [\n [false, $userData, 200, 1],\n [true, $userData, 0, 2],\n [true, $userData, 50, 3],\n ];\n }", "public function testLogin(): void { }", "public function testGetUser()\n {\n\n }", "public function testGetUsersPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@index');\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function initializeBackendUser() {}", "public function initializeBackendUser() {}", "public function userProvider() {\n return [\n // Test blocked authenticated user.\n [self::BLOCKED, self::AUTHENTICATED, 1, ['user']],\n // Test active anonymous user.\n [self::ACTIVE, self::ANONYMOUS, 0, []],\n // Test active authenticated user.\n [self::ACTIVE, self::AUTHENTICATED, 0, []],\n // Test blocked anonymous user.\n [self::BLOCKED, self::ANONYMOUS, 0, []],\n ];\n }", "public function authenticateUserById($emailOrJblUserId);", "public function testGetUserAttributes()\n {\n }", "public function testUserCanAuthenticate()\n {\n $password = 'test';\n\n $user = User::factory()->create([\n 'password' => bcrypt($password)\n ]);\n\n $response = $this->json('POST', '/api/v1/login', [\n 'email' => $user->email,\n 'password' => $password\n ]);\n\n $response->assertStatus(200);\n }", "public function testLoginActionWithUnknowUser()\n {\n $data = [\n '_username' => 'unknowuser',\n '_password' => '',\n ];\n $client = static::createClient();\n\n $crawler = $client->request('GET', '/login');\n $form = $crawler->filter('form[action$=\"login_check\"].form-horizontal button[type=\"submit\"]')->form();\n $client->submit($form, $data);\n $crawler = $client->followRedirect();\n $this->assertSame('Bad credentials', $crawler->filter('div.alert.alert-error')->text());\n $security = $client->getContainer()->get('security.context');\n $this->assertFalse($security->isGranted('ROLE_USER'));\n }", "public function testGetAuthorizationRoleUsers()\n {\n }", "public function idpAuthenticate()\n {\n if (empty(config('shibboleth.user'))) {\n throw new \\Exception('No user attribute mapping for server variables.');\n }\n\n foreach (config('shibboleth.user') as $local => $server) {\n $map[$local] = $this->getServerVariable($server);\n }\n\n if (empty($map['email'])) {\n return abort(403, 'Unauthorized');\n }\n\n $userClass = config('auth.providers.users.model', 'App\\User');\n\n // Attempt to login with the email, if success, update the user model\n // with data from the Shibboleth headers (if present)\n if (Auth::attempt(array('email' => $map['email']), true)) {\n $user = $userClass::where('email', '=', $map['email'])->first();\n\n // Update the model as necessary\n $user->update($map);\n }\n\n // Add user and send through auth.\n elseif (config('shibboleth.add_new_users', true)) {\n $map['password'] = 'shibboleth';\n $user = $userClass::create($map);\n Auth::login($user);\n }\n\n else {\n return abort(403, 'Unauthorized');\n }\n\n Session::regenerate();\n\n // Check if there is a session variable 'shibboleth_redirect_to' set, otherwise use the default value in config('shibboleth.authenticated')\n $route = empty(session('shibboleth_redirect_to')) ? config('shibboleth.authenticated') : session('shibboleth_redirect_to');\n\n // Unset the shibboleth_redirect_to if it was set\n if(!empty(session('shibboleth_redirect_to'))){\n\n session()->remove('shibboleth_redirect_to');\n\n }\n\n// if (config('jwtauth') === true) {\n// $route .= $this->tokenizeRedirect($user, ['auth_type' => 'idp']);\n// }\n\n return redirect()->intended($route);\n }", "public function testAuthenticationsInweboIdPut()\n {\n }", "public function test_example()\n {\n $user = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->withSession(['banned' => false])\n ->post('/nova/login', ['email' => $user->email, 'password' => $user->password]);\n\n $response->assertStatus(302);\n\n }", "public static function test_user($user_id, $user_pass);", "public function use_authentication()\n {\n }", "public function testUserUserIDGet()\n {\n }", "public function testProfileLogout()\n {\n\n }", "public function testLogin(){\n Session::flush();\n $user = $this->postuser();\n\n $this->assertTrue(Auth::user()->username == $user['username']);\n }", "public function testRoleUsers()\n {\n }", "public function testPostAuthorizationRole()\n {\n }", "public function testPostAuthorizationRolesDefault()\n {\n }", "public function testLoginActionWithExistingUser()\n {\n $data = [\n '_username' => 'user1',\n '_password' => 'user1',\n ];\n $client = static::createClient();\n\n $crawler = $client->request('GET', '/login');\n $form = $crawler->filter('form[action$=\"login_check\"].form-horizontal button[type=\"submit\"]')->form();\n $crawler = $client->submit($form, $data);\n // Authentified\n $security = $client->getContainer()->get('security.context');\n $this->assertTrue($security->isGranted('ROLE_USER'));\n }", "public function testAuthenticateReturnsUnresolvedPassportWhenNullUser(): void\n {\n // flagging the authorization header to be removed at the same time\n $this->serverService->expects($this->once())\n ->method('getBearerToken')\n ->with(\n $this->isInstanceOf(Request::class),\n $this->equalTo(true)\n )\n ->will($this->returnValue('mock_token_string'))\n ;\n\n // expect the OAuth2 service to verify the token, returning an access\n // token, but without a related user\n $accessToken = new AccessToken();\n $this->serverService->expects($this->once())\n ->method('verifyAccessToken')\n ->with('mock_token_string')\n ->will($this->returnValue($accessToken))\n ;\n\n // expect the null user value to not be processed\n $this->userChecker->expects($this->never())->method('checkPreAuth');\n\n $passport = $this->authenticator->authenticate(new Request());\n\n // confirm that the returned passport won't pass validation\n $this->assertFalse($passport->getBadge(OAuthCredentials::class)->isResolved());\n }", "public function auth($data = null) {}", "public function testVisitUserAccountProfilePageRedirectsToLogin()\n {\n $response = $this->call('GET', $this->accountProfilePageUrl);\n $response->assertRedirect('login');\n }", "public function handleProviderCallback()\n {\n $fbUser = Socialite::driver('facebook')->user();\n $user = User::where('facebook_id', $fbUser->id)\n ->orWhere('email', $fbUser->email)\n ->first();\n\n if(!$user) {\n $user = User::create([\n 'name' => $fbUser->name,\n 'email' => $fbUser->email,\n 'facebook_id' => $fbUser->id,\n 'active' => true,\n ]);\n $user->roles()->attach(Role::where('name', 'customer')->first()->id);\n }\n\n \\Auth::login($user, true);\n return redirect()->intended($this->redirectTo);\n }", "public function test_authorized_user_can_access_the_user_route()\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n\n $response = $this->get('/user');\n\n $response->assertStatus(200);\n $response->assertJson(['data' => ['name' => $user->name, 'email' => $user->email]]);\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('facebook')->user();\n\n $findUser = User::where('email', $user->email)->first();\n\n if($findUser)\n {\n Auth::login($findUser);\n $findUser->is_email_verified = 1;\n $findUser->save();\n return redirect()->route('show-price');\n }\n else{\n $firstName = explode(\" \", $user->name);\n $saveData = new User;\n $saveData->name = $firstName[0];\n $saveData->email = $user->email;\n $saveData->password = bcrypt(123456789);\n $saveData->is_email_verified = 1;\n $saveData->save();\n Auth::login($saveData);\n return redirect()->route('show-price');\n }\n }", "public function testGetSelfServiceBrowserLoginRequest()\n {\n }", "abstract protected function auth();", "public function testPostAuthorizationRoles()\n {\n }", "public function testValidUserLogin()\n {\n $this->withoutExceptionHandling();\n\n //Create test user from factory\n User::factory(1)->create();\n\n $credentials = [\n \"email\" => \"[email protected]\",\n \"password\" => \"1234\",\n ];\n\n $response = $this->post(route(\"login.attempt\"),$credentials);\n\n $response->assertRedirect(route(\"account.dashboard\"));\n }", "public function testAddUserStore()\n {\n\n }", "public function testCreateUser()\n {\n }", "public function testAuth() {\n\n\t\t// Hakija 1 kirjautuu\n $res = cliRun(\"test_auth\", '{\"user_email\": \"'.USER_EMAIL.'\", \"user_pass\": \"'.USER_PASS.'\", \"format\":\"json\"}');\n $auth_data = fromObjArray($res);\n $this->token = findValRecursive('Suojaustunnus', $auth_data); // this token is used by all the other tests\n\n $this->assertTrue(is_string($this->token), \"Unable to get auth token for test user1, run 'php tests/test_auth.php' for details\");\n $this->assertTrue(strlen($this->token)>30, \"Invalid token, 'php tests/test_auth.php' for details\");\n\n $this->user_id = $auth_data['KayttajaDTO']['ID'];\n\n\t\t// Hakija 2 kirjautuu\n $res = cliRun(\"test_auth\", '{\"user_email\": \"'.NEW_USER_EMAIL.'\", \"user_pass\": \"'.NEW_USER_PASS.'\", \"format\":\"json\"}');\n $auth_data = fromObjArray($res);\n $this->new_token = findValRecursive('Suojaustunnus', $auth_data); // this token is used by all the other tests\n\n $this->assertTrue(is_string($this->new_token), \"Unable to get auth token for test user2, run 'php tests/test_auth.php' for details\");\n $this->assertTrue(strlen($this->new_token)>30, \"Invalid token, 'php tests/test_auth.php' for details\");\n\n $this->new_user_id = $auth_data['KayttajaDTO']['ID'];\n\n // phpunit4 that comes with php5 calls tests statically, so we need this workaround. Cause @depends testAuth doesn't do the trick too\n define('TOKEN', $this->token);\n define('USER_ID', $this->user_id);\n define('NEW_TOKEN', $this->new_token);\n define('NEW_USER_ID', $this->new_user_id);\t\n\t\t\n\t\t// Viranomainen kirjautuu\n $res = cliRun(\"test_auth\", '{\"user_email\": \"'.VIRANOMAINEN_EMAIL.'\", \"user_pass\": \"'.VIRANOMAINEN_PASS.'\", \"format\":\"json\"}');\n $auth_data = fromObjArray($res);\t\n\t\t$Suojaustunnus = findValRecursive('Suojaustunnus', $auth_data);\t\n\n $this->assertTrue(is_string($Suojaustunnus), \"Unable to get auth token for test viranomainen, run 'php tests/test_auth.php' for details\");\n $this->assertTrue(strlen($Suojaustunnus)>30, \"Invalid token, 'php tests/test_auth.php' for details\");\t\n\n define('VIRANOMAINEN_TOKEN', $Suojaustunnus);\n define('VIRANOMAINEN_ID', $auth_data['KayttajaDTO']['ID']);\t\t\t\n\t\t\n\t\t// Viranomainen 2 kirjautuu\n $res = cliRun(\"test_auth\", '{\"user_email\": \"'.VIRANOMAINEN2_EMAIL.'\", \"user_pass\": \"'.VIRANOMAINEN2_PASS.'\", \"format\":\"json\"}');\n $auth_data = fromObjArray($res);\t\n\t\t$Suojaustunnus = findValRecursive('Suojaustunnus', $auth_data);\t\t\t\n\n $this->assertTrue(is_string($Suojaustunnus), \"Unable to get auth token for test viranomainen, run 'php tests/test_auth.php' for details\");\n $this->assertTrue(strlen($Suojaustunnus)>30, \"Invalid token, 'php tests/test_auth.php' for details\");\t\n\t\t\n define('VIRANOMAINEN2_TOKEN', $Suojaustunnus);\n define('VIRANOMAINEN2_ID', $auth_data['KayttajaDTO']['ID']);\t\t\n\t\t\n }", "public function authenticate() {}", "function assignFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.User';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('merchant_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "public function auth($data = null);", "public function testUsersEmailAuth()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testLoginRedirect()\n {\n $this->session([\n 'Auth' => [\n 'User' => [\n 'id' => 5,\n 'role_id' => 1,\n 'email' => '[email protected]'\n ]\n ]\n ]);\n\n $this->get('/login');\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/admin/manager/users');\n }", "public function testAuthenticationServiceSignAccessToken()\n {\n }", "public function attemptedLoginProvider() {\n\t\t$dataSet = array();\n\t\t\n\t\t$successExpected = new \\Main\\To\\UserData(new \\MongoId(\"000000000000000000000001\"), \"69 East\", \"69 Eastbound Down Road Atlanta, GA 22222\", \"PQW2d\", \"[email protected]\");\n\t\t$successVotingTopicExpected = new \\Main\\To\\VotingTopicData(new \\MongoId(\"000000000000000000000001\"), \"\", \"\", array(), array(),array());\n\t\t\n\t\t//Fully successful\n\t\t$successUserMock = $this->getMock('Main\\Database\\UserDao', array('searchUserByUrlExtension', 'loadUsers'));\n\t\t$successUserMock->expects($this->once())\n\t\t\t->method('searchUserByUrlExtension')\n\t\t\t->with($successExpected->getUniqueUrlExtension())\n\t\t\t->will($this->returnValue($successExpected));\n\t\t$successUserMock->expects($this->once())\n\t\t\t->method('loadUsers')\n\t\t\t->with($successVotingTopicExpected->getUsers())\n\t\t\t->will($this->returnValue(array()));\n\n\t\t$successVoteMock = $this->getMock('Main\\Database\\VotingTopicDao', array('lookupTopicViaUserId'));\n\t\t$successVoteMock->expects($this->once())\n\t\t\t->method('lookupTopicViaUserId')\n\t\t\t->with($successExpected->getId())\n\t\t\t->will($this->returnValue($successVotingTopicExpected));\n\t\t\t\n\t\t$successController = new \\Main\\Controller\\LoginController($successExpected->getUniqueUrlExtension());\n\t\t$successController->setUserDao($successUserMock);\n\t\t$successController->setVotingTopicDao($successVoteMock);\n\t\t$successSet = array(json_encode(\n\t\t\t\t\t\tarray('status' => 'ok', \n\t\t\t\t\t\t\t'userData' => $successExpected,\n\t\t\t\t\t\t\t'votingTopic' => $successVotingTopicExpected)),\n\t\t\t\t\t\t\t$successController);\n\t\t\n\t\t//Fails because of url\n\t\t$fakeurl = \"fakeurl\";\n\t\t$userFailUserMock = $this->getMock('Main\\Database\\UserDao', array('searchUserByUrlExtension', 'loadUsers'));\n\t\t$userFailUserMock->expects($this->once())\n\t\t\t->method('searchUserByUrlExtension')\n\t\t\t->with($fakeurl)\n\t\t\t->will($this->returnValue(null));\n\t\t$userFailController = new \\Main\\Controller\\LoginController($fakeurl);\n\t\t$userFailController->setUserDao($userFailUserMock);\n\t\t$userFailSet = array(json_encode(array('status' => '404', 'message' => \"User was not found. Do you have the wrong url?\")), $userFailController);\n\t\t\n\t\t//Fails because of voting topic\n\t\t$voteFailUserMock = $this->getMock('Main\\Database\\UserDao', array('searchUserByUrlExtension'));\n\t\t$voteFailUserMock->expects($this->once())\n\t\t\t->method('searchUserByUrlExtension')\n\t\t\t->with($successExpected->getUniqueUrlExtension())\n\t\t\t->will($this->returnValue($successExpected));\n\t\t\n\t\t$voteFailUserMock->expects($this->once())\n\t\t\t->method('loadUsers')\n\t\t\t->with(array())\n\t\t\t->will($this->returnValue(array()));\n\t\t\n\t\t$voteTopicFailMock = $this->getMock('Main\\Database\\VotingTopicDao', array('lookupTopicViaUserId'));\n\t\t$voteTopicFailMock->expects($this->once())\n\t\t\t->method('lookupTopicViaUserId')\n\t\t\t->with($successExpected->getId())\n\t\t\t->will($this->returnValue(null));\n\t\t\n\t\t$voteTopicFailController = new \\Main\\Controller\\LoginController($successExpected->getUniqueUrlExtension());\n\t\t$voteTopicFailController->setUserDao($voteFailUserMock);\n\t\t$voteTopicFailController->setVotingTopicDao($voteTopicFailMock);\n\t\t$votingTopicFailSet = array(json_encode(array('status' => '404', 'message' => \"Voting topic was not found, it may be deactivated?\")), $voteTopicFailController);\n\t\t\n\t\tarray_push($dataSet, $successSet, $userFailSet, $votingTopicFailSet);\n\t\treturn $dataSet;\n\t}", "public function test_login2()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('123456','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "public function testLoginWrongEmail(): void { }", "public function testAuthenticateUserEmailFalse ()\n {\n try {\n $this->storage->authenticateUser('milan@magudia', $this->signature1, $this->stringToSign1);\n } catch (InvalidArgumentException $e) {\n $this->assertEquals('$email address is not valid', $e->getMessage());\n return;\n }\n $this->fail('An expected exception has not been raised.');\n }", "public function test_user_can_login_with_true_credentials()\n {\n $user=User::factory()->create();\n $response = $this->postJson(route('auth.login') , [\n 'email'=>$user->email,\n 'password'=>'password',\n ]);\n\n $response->assertStatus(Response::HTTP_OK);\n }", "protected function facebookAuthenticate(){\n\n\t\t\n\t}" ]
[ "0.70283735", "0.635108", "0.63216746", "0.6110761", "0.600469", "0.5992375", "0.59776646", "0.59654975", "0.59325105", "0.5931807", "0.5931807", "0.59317535", "0.59316325", "0.59262073", "0.5856804", "0.5844002", "0.58393645", "0.5819625", "0.581078", "0.57959914", "0.5795486", "0.5774515", "0.57583857", "0.57118845", "0.5685608", "0.56816286", "0.5651853", "0.5630395", "0.5616385", "0.5615345", "0.5612497", "0.5610284", "0.5580101", "0.5567949", "0.5532146", "0.5517079", "0.55124205", "0.55064386", "0.5501302", "0.54979676", "0.54958636", "0.54841006", "0.54789275", "0.5475329", "0.54675996", "0.54651254", "0.5463754", "0.5455793", "0.545527", "0.54371834", "0.54367596", "0.5431688", "0.54259205", "0.54256237", "0.5425272", "0.5421592", "0.54208696", "0.53782326", "0.537233", "0.53717977", "0.5370154", "0.53557724", "0.5354819", "0.5351167", "0.53504264", "0.53480685", "0.5345759", "0.53455806", "0.5337091", "0.533462", "0.53176427", "0.5304397", "0.53038347", "0.5303617", "0.530297", "0.52984554", "0.52983636", "0.5294893", "0.52874196", "0.5283799", "0.5282819", "0.5282661", "0.527856", "0.52765423", "0.52727455", "0.5267704", "0.52673554", "0.526688", "0.52573115", "0.52520555", "0.5249641", "0.5246602", "0.5244911", "0.524441", "0.52441657", "0.5240258", "0.52401805", "0.52348065", "0.5234159", "0.52333534" ]
0.7514791
0
Test u2fAuthenticate method redirect cases
public function testU2fAuthenticateRedirectCustomUser($userData, $redirect) { $request = $this->getMockBuilder('Cake\Http\ServerRequest') ->setMethods(['getSession', 'is']) ->getMock(); $this->Trait->setRequest($request); $request->expects($this->any()) ->method('is') ->with( $this->equalTo('ssl') )->will($this->returnValue(true)); $response = new Response([ 'body' => (string)time(), ]); $this->Trait->expects($this->once()) ->method('redirect') ->with( $this->equalTo($redirect) )->will($this->returnValue($response)); $this->_mockSession([ 'U2f.User' => $userData, ]); $actual = $this->Trait->u2fAuthenticate(); $this->assertSame($response, $actual); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authenticateSecondFactor() {\t \t \t\t \n\t \n\t $module = $this->getModule();\n\t \n\t\t$authParams = array(\n\t\t\t'module' => $module,\n\t\t);\n\t\t\n\t\tif ($module == RublonMagentoModule::CONNECT) {\n\t\t $callbackUrl = $this->getCallbackUrl($connect = true);\n\t\t} else {\n\t\t $callbackUrl = $this->getCallbackUrl();\n\t\t}\n\t\t\t\t\n\t\t$userId = $this->getAuthUserId();\n\t\t$email = $this->getAuthUserEmail(); \n\t\t\n\t\t$this->clearLoggedUser();\n \n try {\n \n $authUrl = $this->service->auth($callbackUrl, $userId, $email, $authParams); \n if (!empty($authUrl)) {\n \n // Retrive cached rublon features\n RublonFeature::getFeatures();\n \n $this->redirect($authUrl);\n } else {\n // do nothing\n }\n \n } catch (RublonException $e) {\n \n $notifierOptions = array(\n 'Method' => __METHOD__,\n 'Line' => __LINE__,\n 'Trace' => $e->getTraceAsString()\n );\n \n $this->addError($e, $notifierOptions);\n }\n\t}", "public function testAuthenticationsInweboIdGet()\n {\n }", "function auth_redirect()\n {\n }", "public function testRedirect()\n {\n //$member = $this->objFromFixture(Member::class, \"joebloggs\");\n //$this->logInAs($member);\n $this->markTestIncomplete('Test user config CMS fields');\n }", "public function test_client_page_auth_check()\n {\n $response = $this->get(route('client.index'))->assertStatus(302);\n }", "public function authenticateAction() {\n try {\n $this->authenticationManager->authenticate();\n $this->addFlashMessage('Erfolgreich angemeldet.');\n $this->redirect('index', 'Marketplace');\n } catch (\\TYPO3\\Flow\\Exception $exception) {\n // Prüft ob eine Fehlernachricht vorhanden ist. Wenn ja zeigt diese an.\n if($exception->getMessage()){\n $this->addFlashMessage('Falscher Benutzername oder Passwort!'/* . $exception->getMessage()*/);\n //$this->addFlashMessage($exception->getMessage());\n $this->redirect('index', 'Login');\n }\n }\n }", "public function authenticateAction()\n {\n if ($this->request->isPost()) {\n $email = $this->request->getPost('email', 'email');\n $password = $this->request->getPost('password', 'string');\n if($this->userService->authenticateContact($email, $password)){\n if ($this->request->isAjax()) {\n return UserServices::SUCCESS;\n }\n return $this->response->redirect('mein-konto');\n }else{\n if ($this->request->isAjax()) {\n return UserServices::WRONGEMAILPASS;\n }\n $this->error = UserServices::WRONGEMAILPASS;\n }\n }\n if(!is_null($this->error)){\n $this->flash->error($this->error);\n }\n return $this->dispatcher->forward(\n [\n \"controller\" => \"signup\",\n \"action\" => \"index\",\n ]\n );\n }", "function authenticate() {}", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function testProfileUnilogin()\n {\n\n }", "function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}", "public function testGetForgotPageWithAuth()\n\t{\n\t\t$this->be($this->user);\n\t\t$this->call('orchestra::forgot@index');\n\t\t$this->assertRedirectedTo(handles('orchestra'));\n\t}", "public function testRedirectToLogin()\n {\n $this->visit('/')\n ->see('Email');\n }", "function verify()\n {\n $activation = null;\n $param = getParameter();\n if (!empty($param[0])) {\n $activation = $param[0];\n }\n $resultActive = $this->model->khachhang->activeAccount($activation);\n switch ($resultActive) {\n case 1 :\n redirect('user/active_expire');\n break;\n case 2:\n redirect('user/active_success');\n break;\n case 3:\n redirect('user/active_fail');\n break;\n }\n }", "public function doAuthentication();", "public function test_users_edit_unauthenticated_redirects_to_login(){\n $response = $this->get(route('users.edit', ['user'=> 5])); \n $response->assertStatus(302);\n $response->assertRedirect(route('login'));\n }", "public function authenticate() {}", "public function testGetUsersPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@index');\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}", "public function test_login2()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('123456','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "public function authenticate();", "public function authenticate();", "public function authenticate();", "public function testVisitUserAccountProfilePageRedirectsToLogin()\n {\n $response = $this->call('GET', $this->accountProfilePageUrl);\n $response->assertRedirect('login');\n }", "public function testShowUnauthicatedAccess(): void { }", "public function fbauthAction()\n {\n $request = $this->getRequest()->getQuery()->toArray();\n\n $auth = array(\n \"signup\" => $this->params()->fromRoute('url', false) == \"signup\",\n \"login\" => $this->params()->fromRoute('url', false) == \"login\",\n \"connect\" => $this->params()->fromRoute('url', false) == \"connect\",\n \"state_key\" => \"fb_ipoints_auth\"\n );\n\n $auth['url'] = $this->getConfig()->site['domain'] .\"/\". $this->getLang() . \"/user/fbauth/\";\n if ($auth['login'])\n $auth['url'] .= \"login\";\n else if ($auth['connect'])\n $auth['url'] .= \"connect\";\n else if ($auth['signup'])\n $auth['url'] .= \"signup\";\n else {\n return $this->redirect()->toRoute(\"home\", array(\"language\" => $this->getLang()));\n }\n $fbconfig = array(\n 'appId' => $this->getConfig()->FB['api_key'],\n 'secret' => $this->getConfig()->FB['app_secret'],\n );\n\n if(array_key_exists('state', $request) && $request['state']) {\n $state = json_decode(stripslashes(urldecode($request[\"state\"])));\n if (array_key_exists('code', $request) && $request['code']) {\n // User accepted app authorization, retrieve access_token\n $url = \"https://graph.facebook.com/oauth/access_token?client_id=\" . $fbconfig['appId'] .\n \"&redirect_uri=\" . $auth['url'] . \"&client_secret=\" . $fbconfig['secret'] .\n \"&code=\" . $request[\"code\"];\n\n $config = array(\n 'adapter' => 'Zend\\Http\\Client\\Adapter\\Socket',\n 'ssltransport' => 'tls',\n 'sslverifypeer' => false\n );\n\n $client = new Client($url, $config);\n $response = $client->send();\n\n if (!$response->isSuccess()) {\n die($response->getBody());\n } else {\n try {\n parse_str($response->getContent(), $facebook_response);\n $access_token = $facebook_response['access_token'];\n\n $config = array(\n 'adapter' => 'Zend\\Http\\Client\\Adapter\\Socket',\n 'ssltransport' => 'tls',\n 'sslverifypeer' => false\n );\n\n $client1 = new Client(\"https://graph.facebook.com/me?access_token=\" . $access_token, $config);\n $response1 = $client1->send();\n\n $facebook_user = json_decode($response1->getBody(), true);\n if ($auth['login']) {\n $redirect = $this->facebookLogin($state, $facebook_user['id'], $access_token, $facebook_user);\n } else if ($auth['signup']) {\n $redirect = $this->facebookSignup($state, $facebook_user['id'], $access_token, $facebook_user);\n } else if ($auth['connect']) {\n // @TODO implement\n $redirect = $this->facebookConnect($state, $facebook_user['id'], $access_token, $facebook_user);\n }\n } catch (Exception $e) {\n //$redirect = $this->getRedirect($state->redirect, $e->getMessage());\n die(\"bbbbbbbbbbbbbbbbbbb\");\n }\n }\n } else {\n // User declined the applications Auth Dialog\n return $this->redirect()->toUrl($state->redirect);\n }\n } else {\n // the user is calling /fbauth/___/ without any parameters, redirect them to the Facebook login page\n $state = array(\"state_key\" => $auth['state_key']);\n $state[\"redirect\"] = array_key_exists(\"redirect\", $request) ? $request[\"redirect\"] : $this->getConfig()->site['domain'].\"/\".$this->getLang().\"/user/fbauth/\";\n $redirect = \"https://www.facebook.com/dialog/oauth?client_id=\" . $fbconfig['appId'] .\n \"&redirect_uri=\" . urlencode($auth['url']) .\n \"&scope=email,user_birthday,user_location,publish_actions&state=\" . urlencode(json_encode($state));\n }\n// if (substr($redirect, 0, 1) == '/')\n// $redirect = substr($redirect, 1);\n if($redirect == \"/?action=registration\") {\n header(\"Location: \" . $redirect);\n exit;\n }\n\n if (strpos($redirect, \"http\") === 0) {\n header(\"Location: \" . $redirect);\n } else {\n if (!array_key_exists(\"iframe\", $request)){\n return $this->redirect()->toUrl($this->getRequest()->getServer('HTTP_REFERER'));\n } else if($redirect) {\n return $this->redirect()->toUrl($redirect);\n } else {\n return $this->redirect()->toUrl($this->getRequest()->getServer('HTTP_REFERER'));\n }\n }\n exit;\n }", "public function dataProviderU2fAuthenticateRedirectCustomUser()\n {\n $empty = [];\n $withWhoutRegistration = new User([\n 'id' => '00000000-0000-0000-0000-000000000002',\n 'username' => 'user-2',\n ]);\n\n return [\n [$empty, ['action' => 'login']],\n [$withWhoutRegistration, ['action' => 'u2fRegister']],\n ];\n }", "public function test_making_get_request_to_slash_home_with_no_authentication_fails_and_redirects() {\n $response = $this->get('http://127.0.0.1:8000/home');\n $response->assertStatus(302);\n }", "abstract protected function redirectTo();", "public function testLoginButLogin(){\n $user = User::find(1);\n $this->be($user);\n\n $response =$this->get(route('login'));\n $response->assertRedirect(route('home'));\n }", "public function checkAuthentication() {}", "abstract protected function auth_url();", "public function authenticateAction() {\n\t\ttry {\n $this->authenticationManager->authenticate();\n $this->redirect('index', 'Overview');\n } catch (\\TYPO3\\Flow\\Security\\Exception\\AuthenticationRequiredException $exception) {\n\t\t\t$this->addFlashMessage('Wrong username or password.', 'Login failed', \\TYPO3\\Flow\\Error\\Message::SEVERITY_ERROR);\n $this->redirect('index');\n }\n\t}", "protected function checkRedirect() {}", "public function testRedirect(): void\n {\n $this->post('/tests_apps/redirect_to');\n $this->assertResponseSuccess();\n $this->assertResponseCode(302);\n }", "public function openidredirectAction()\n {\n if(!OPENID_ACTIVE){\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::OPEN_ID_NOT_ACTIVE));\n }\n if(empty($_GET[User::INPUT_OPENID_GET_IDENTITY])){\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::MISSING_GET_IDENTITY));\n }\n\n // 2nd loop\n $authAdapter = new Zend_Auth_Adapter_OpenId();\n $result = $authAdapter->authenticate();\n if (!$result->isValid()) {\n $this->_onLoginError($result->getMessages(), $result->getCode());\n }\n\n $userTable = new User();\n $where = $userTable->getAdapter()->quoteInto(User::COLUMN_OPENID_IDENTITY . \" = ?\", $_GET[User::INPUT_OPENID_GET_IDENTITY]);\n $user = $userTable->fetchRow($where);\n if(in_array($user->status, array(\n \t\tUser::STATUS_BANNED,\n \t\tUser::STATUS_GUEST,\n \t\tUser::STATUS_PENDING,\n \t))){\n $user = null;\n }\n if(!$user){\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NO_USER_FOR_GIVEN_IDENTITY));\n }\n\n $this->_onLoginSuccess($user);\n }", "public function testAuthenticateUser ()\n {\n $result = $this->storage->authenticateUser($this->accessId1, $this->signature1, $this->stringToSign1);\n $this->assertEquals($this->accessId1, $result['access_key']);\n }", "public function testAddAuthentication();", "public function callbackAuthorization($f3){\n $getParams = (array)$f3->get('GET');\n\n // users can log in either from @login (new user) or @map (existing user) root alias\n // -> or from /admin page\n // -> in case login fails, users should be redirected differently\n $rootAlias = 'login';\n if( !empty($f3->get(self::SESSION_KEY_SSO_FROM)) ){\n $rootAlias = $f3->get(self::SESSION_KEY_SSO_FROM);\n }\n\n if($f3->exists(self::SESSION_KEY_SSO_STATE)){\n // check response and validate 'state'\n if(\n isset($getParams['code']) &&\n isset($getParams['state']) &&\n !empty($getParams['code']) &&\n !empty($getParams['state']) &&\n $f3->get(self::SESSION_KEY_SSO_STATE) === $getParams['state']\n ){\n // clear 'state' for new next login request\n $f3->clear(self::SESSION_KEY_SSO_STATE);\n $f3->clear(self::SESSION_KEY_SSO_FROM);\n\n $accessData = $this->getSsoAccessData($getParams['code']);\n\n if(\n isset($accessData->accessToken) &&\n isset($accessData->refreshToken)\n ){\n // login succeeded -> get basic character data for current login\n $verificationCharacterData = $this->verifyCharacterData($accessData->accessToken);\n\n if( !is_null($verificationCharacterData)){\n\n // check if login is restricted to a characterID\n\n // verification available data. Data is needed for \"ownerHash\" check\n\n // get character data from ESI\n $characterData = $this->getCharacterData((int)$verificationCharacterData->CharacterID);\n\n if( isset($characterData->character) ){\n // add \"ownerHash\" and SSO tokens\n $characterData->character['ownerHash'] = $verificationCharacterData->CharacterOwnerHash;\n $characterData->character['crestAccessToken'] = $accessData->accessToken;\n $characterData->character['crestRefreshToken'] = $accessData->refreshToken;\n $characterData->character['esiScopes'] = Lib\\Util::convertScopesString($verificationCharacterData->Scopes);\n\n // add/update static character data\n $characterModel = $this->updateCharacter($characterData);\n\n if( !is_null($characterModel) ){\n // check if character is authorized to log in\n if( ($authStatus = $characterModel->isAuthorized()) === 'OK'){\n // character is authorized to log in\n // -> update character log (current location,...)\n $characterModel = $characterModel->updateLog();\n\n // connect character with current user\n if( is_null($user = $this->getUser()) ){\n // connect character with existing user (no changes)\n if( is_null( $user = $characterModel->getUser()) ){\n // no user found (new character) -> create new user and connect to character\n /**\n * @var $user Model\\UserModel\n */\n $user = Model\\BasicModel::getNew('UserModel');\n $user->name = $characterModel->name;\n $user->save();\n }\n }\n\n /**\n * @var $userCharactersModel Model\\UserCharacterModel\n */\n if( is_null($userCharactersModel = $characterModel->userCharacter) ){\n $userCharactersModel = Model\\BasicModel::getNew('UserCharacterModel');\n $userCharactersModel->characterId = $characterModel;\n }\n\n // user might have changed\n $userCharactersModel->userId = $user;\n $userCharactersModel->save();\n\n // get updated character model\n $characterModel = $userCharactersModel->getCharacter();\n\n // login by character\n $loginCheck = $this->loginByCharacter($characterModel);\n\n if($loginCheck){\n // set \"login\" cookie\n $this->setLoginCookie($characterModel);\n\n // -> pass current character data to target page\n $f3->set(Api\\User::SESSION_KEY_TEMP_CHARACTER_DATA, $characterModel->_id);\n\n // route to \"map\"\n if($rootAlias == 'admin'){\n $f3->reroute([$rootAlias, ['*' => '']]);\n }else{\n $f3->reroute(['map', ['*' => '']]);\n }\n }else{\n $f3->set(self::SESSION_KEY_SSO_ERROR, sprintf(self::ERROR_LOGIN_FAILED, $characterModel->name));\n }\n }else{\n // character is not authorized to log in\n $f3->set(self::SESSION_KEY_SSO_ERROR,\n sprintf(self::ERROR_CHARACTER_FORBIDDEN, $characterModel->name, Model\\CharacterModel::AUTHORIZATION_STATUS[$authStatus])\n );\n }\n }\n }else{\n // failed to load characterData from API\n $f3->set(self::SESSION_KEY_SSO_ERROR, self::ERROR_CHARACTER_DATA);\n }\n }else{\n // failed to verify character by CCP SSO\n $f3->set(self::SESSION_KEY_SSO_ERROR, self::ERROR_CHARACTER_VERIFICATION);\n }\n }else{\n // SSO \"accessData\" missing (e.g. timeout)\n $f3->set(self::SESSION_KEY_SSO_ERROR, sprintf(self::ERROR_SERVICE_TIMEOUT, self::SSO_TIMEOUT));\n }\n }else{\n // invalid SSO response\n $f3->set(self::SESSION_KEY_SSO_ERROR, sprintf(self::ERROR_LOGIN_FAILED, 'Invalid response'));\n }\n }\n\n $f3->reroute([$rootAlias, ['*' => '']]);\n }", "public function testRedirectAfterLogin()\n {\n $this->auth();\n\n // Should redirect to the first route in the config\n $response = $this->get('admin');\n $response->assertRedirect('admin/articles');\n\n }", "public function testGetSingleUserPageWithoutAuth()\n\t{\n\t\t$response = $this->call('orchestra::users@view', array(1));\n\t\t\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\t\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::login'), \n\t\t\t$response->foundation->headers->get('location'));\n\t}", "public function testExample()\n {\n $response = $this->get(route('login_form'));\n\n $response->assertStatus(200)\n ->assertViewIs('two_factor_auth.login_form')\n ->assertSee('ログイン')\n ->assertSee('パスワード');\n }", "public function testIndexRoutedUser(): void\n {\n // given\n $expectedStatusCode = 302;\n $user = $this->createUser([User::ROLE_USER]);\n $this->logIn($user);\n\n // when\n $this->httpClient->request('GET', '/tag');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n }", "public function testAuthenticate()\n {\n $this->mockWebApplication([\n 'modules' => [\n 'oauth2' => [\n 'resourceServerAccessTokenRevocationValidation' => false, // Token revocation validation is tested during functional testing.\n ]\n ]\n ]);\n // phpcs:enable Generic.Files.LineLength.TooLong\n\n $request = Yii::$app->request;\n $request->headers->set('Authorization', 'Bearer ' . $this->validAccessToken);\n\n $httpBearerAuth = new Oauth2HttpBearerAuth();\n\n $identity = $httpBearerAuth->authenticate(Yii::$app->user, $request, Yii::$app->response);\n $this->assertNotNull($identity);\n $this->assertEquals(123, $identity->getId());\n }", "public function mustRedirect();", "function isAuthenticate(Controller $controller) {\n \n $pdoService = $controller->getService('PDO');\n $conn = $pdoService->getConnection();\n \n $controller->set('user', array(\n 'name' => 'lseguin',\n 'email' => '[email protected]',\n 'type' => 'admin'\n ));\n \n}", "public function testRedirectLoggedOutUserTest()\n {\n $response = $this->get('/home');\n\n $response->assertRedirect('/login');\n }", "public function testRequiredAuthentication()\n {\n $response = $this->get('/');\n\n $response->assertStatus(Response::HTTP_FOUND);\n $response->assertRedirect(route('auth.login'));\n }", "public function test_valid_user_login()\n {\n Session::start();\n $response = $this->call('POST', '/login', [\n 'email' => '[email protected]',\n 'password' => 'password',\n '_token' => csrf_token()\n ]);\n $response->assertStatus(302);\n $response->assertRedirect('/home');\n }", "public function test_teams_index_unauthenticated_redirects_to_login(){\n $response = $this->get(route('teams.index'));\n $response->assertStatus(302);\n $response->assertRedirect(route('login'));\n }", "public function test_making_sure_that_get_requests_redirects_to_login_if_user_is_not_authenticated(){\n $response = $this->get('/home');\n $response->assertRedirect('/login');\n }", "public function login_redirect_test()\n {\n $response = $this->get('/');\n\n $response->assertRedirect('/login');\n }", "public function test_users_create_unauthenticated_redirects_to_login(){\n $response = $this->get(route('users.create'));\n $response->assertStatus(302);\n $response->assertRedirect(route('login'));\n }", "function authenticate()\n {\n if(!$this->Session->check('User'))\n {\n $this->redirect(array('controller' => 'Users', 'action' => 'login_form'));\n exit();\n }\n }", "protected function facebookAuthenticate(){\n\n\t\t\n\t}", "public function init() {\n $authorization = Zend_Auth::getInstance();\n if(!$authorization->hasIdentity() && $this->_request->getActionName() != \"loginuser\"&& $this->_request->getActionName() != \"forgetpassword\")\n {\n $this->redirect('user/loginuser');\n } \n\n }", "function template_redirect() {\r\n\t\tappthemes_auth_redirect_login();\r\n\t}", "public function authenticate() {\n }", "public function testLoginWithOutRegister(){\n $response =$this->get(route('administracion'));\n $response->assertRedirect(route('login'));\n }", "abstract protected function redirect();", "public function providerTestAuthenticateAction()\n {\n return array(\n array(false, null, null, new Response(), false),\n array(false, null, null, false, false),\n array(false, null, null, false, true),\n array(false, 'localhost/test1', null, false, false),\n array(false, 'localhost/test1', null, false, true),\n array(false, 'localhost/test1', 'localhost/test2', false, false),\n array(false, 'localhost/test1', 'localhost/test2', false, true),\n array(false, null, 'localhost/test2', false, false),\n array(false, null, 'localhost/test2', false, true),\n\n array(true, null, null, false, false),\n array(true, null, null, false, true),\n array(true, 'localhost/test1', null, false, false),\n array(true, 'localhost/test1', null, false, true),\n array(true, 'localhost/test1', 'localhost/test2', false, false),\n array(true, 'localhost/test1', 'localhost/test2', false, true),\n array(true, null, 'localhost/test2', false, false),\n array(true, null, 'localhost/test2', false, true),\n );\n }", "public function test_admin_login_submission()\n {\n $this->assertTrue(true);\n $response = $this->call('POST', '/login/save');\n $this->assertEquals(302, $response->status());\n // $this->assertRedirectedToRoute(\"admin.dashboard.index\");\n }", "public function testAuthenticationServiceListAuthentications()\n {\n }", "public function testActionGatekeeperForLoginAction() {\n\t\t$this->markTestIncomplete();\n\t}", "public function testAuthenticateEmailUser ()\n {\n $result = $this->storage->authenticateUser($this->email1, $this->signature1, $this->stringToSign1);\n $this->assertEquals($this->email1, $result['email_address']);\n }", "public function actionLogin()\r\n\t{\r\n\t $this->redirect(array('//user/auth'));\r\n\t}", "abstract protected function auth();", "public function test_teams_show_unauthenticated_redirects_to_login(){\n $response = $this->get(route('teams.show', ['team' => 1]));\n $response->assertStatus(302);\n $response->assertRedirect(route('login'));\n }", "public function test_users_store_unauthenticated_redirects_login(){\n $response = $this->post(route('users.store'));\n $response->assertStatus(302);\n $response->assertRedirect(route('login'));\n }", "public function testAuthenticationServiceAuthenticationUpdate()\n {\n }", "abstract public function url_authorize();", "public function testAuth()\n {\n $user = factory(User::class)->create();\n $this->browse(function ($first, $second, $third) use ($user) {\n // prompted to log in\n $first->visit(new AdminPage)\n ->assertRouteIs('login');\n\n // successfully login\n $second->loginAs($user)\n ->visit(new AdminPage)\n ->assertRouteIs('admin')\n ->assertSee('Dashboard')\n ->assertSee($user->name);\n\n // successfully logout\n $third->loginAs($user)\n ->visit(new AdminPage)\n ->click('@profile-toggle')\n ->click('@logout-link')\n ->assertRouteIs('login');\n });\n }", "public function test_users_store_valid_redirects_home(){\n $this->signInUser();\n $response = $this->post(route('users.store'), $this->user); \n $response->assertStatus(302);\n $response->assertRedirect(route('home.index'));\n }", "function umnshib_redirectToLogin(array $options = array())\n{\n $shib = new BasicAuthenticator();\n $shib->redirectToLogin($options);\n}", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "public function testLogAuthActionUsingPOST()\n {\n\n }", "public function authenticate() { return false; }", "function login_verifyURL() {\n\treturn BASE . 'login' . DS .'verify';\n}", "public function testAuthenticationsInweboIdPut()\n {\n }", "public function post_signin()\n\t{\n\t\tif(Service\\Validation\\Login::passes(Input::all()))\n\t\t{\n\t\t\tif(Service\\Security::authorize(array('username' => Input::get('username'), 'password' => Input::get('password'))))\n\t\t\t{\n\t\t\t\treturn Redirect::home();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to_route('login')->with_input()->with_errors(new Messages(array(\n\t\t\t\t\t__('login.failed')->get()\n\t\t\t\t)));\n\t\t\t}\n\t\t}\n\n\t\treturn Redirect::to_route('login')->with_input()->with_errors(Service\\Validation::errors());\n\t}", "public function testIndexAuthTest()\n {\n $response = $this->get('/images');\n\n $this->assertGuest($guard = null);\n $response->assertStatus(302);\n }", "public function test_it_redirects_to_login()\n {\n $response = $this->get('/');\n\n $response->assertStatus(302);\n\n $response->assertRedirect('/login');\n }", "public function visitActivationUrlTwiceAsGuestTest(FunctionalTester $I){\n $user = HelperController::common_login($I, $this->name, $this->email, $this->password);\n $I->assertFalse( (bool) $user->active);\n HelperController::logout($I);\n $I->see( trans( 'text.log_in' ) , '.login_button');\n $I->amOnPage( route('account_activation', $user->activation_code ));\n $I->see( trans('text.activation_successful') );\n $I->amOnPage( route('account_activation', $user->activation_code) );\n $I->see( trans('text.activate_user_not_found') );\n\n $I->assertTrue( (bool) User::find($user->id)->active);\n }", "function assertAuthorizeParams();", "function authenticate_from_post($success_page)\n\t{\n\t\t$post = new Context($_POST);\n\t\tif ($post->password) {\n\t\t\tif (authenticate($post->password)) {\n\t\t\t\tauthenticate_session();\n\t\t\t\treturn redirect(url($success_page));\n\t\t\t}\n\t\t\treturn WARP_INCORRECT_PASSWORD;\n\t\t}\n\t\treturn false;\n\t}", "public function testAuthenticationsEmailIdGet()\n {\n }", "public function testVerifyCreate()\n {\n $response = $this->withHeaders([\n 'X-Header' => 'Value',\n ])->post('/login', [\n 'name' => 'admin',\n 'password' => 'admin'\n ]);\n\n $response->assertStatus(302);\n $response->assertSee('Redirect');\n $response->assertRedirect(\"myaccount\");\n }", "function doSecureAuthValidate(){\n\t\n\t\tif(\t@$this->loginKey == \"\" || @$this->identification == \"\"){\n\t\t\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"You need to login to access this service \", \"localStorage.clear(); window.location='index.html'; \");\n\t\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->doSecureAuth(@$this->loginKey, @$this->obsfucate->makeKey($this->sanitize( $this->identification )) );\n\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public function checkAuth();", "public function checkAuth();", "public function test_circular_redirect_auth() {\n $this->resetAfterTest(true);\n $user = $this->getDataGenerator()->create_user();\n $this->setUser($user);\n\n // Spoof the referrer for the redirect check.\n $_SERVER['HTTP_REFERER'] = '/admin/tool/mfa/auth.php';\n $baseurl = new \\moodle_url('/my/naughty/page.php');\n\n // After a single check, we should redirect.\n $this->assertEquals(\\tool_mfa\\manager::REDIRECT,\n \\tool_mfa\\manager::should_require_mfa($baseurl, false));\n\n // Now hammer it up to the threshold to emulate a repeated force browse from auth.php\n for ($i = 0; $i < \\tool_mfa\\manager::REDIR_LOOP_THRESHOLD; $i++) {\n \\tool_mfa\\manager::should_require_mfa($baseurl, false);\n }\n\n // Now finally confirm that a 6th access attempt (after loop safety trigger) still redirects.\n $this->assertEquals(\\tool_mfa\\manager::REDIRECT,\n \\tool_mfa\\manager::should_require_mfa($baseurl, false));\n }", "public function testNonLoggedUserVisitsChangePasswordPageRedirectsToLogin()\n {\n // Request\n $response = $this->call('GET', $this->accountChangePasswordPageUrl);\n\n // Asserts\n $response->assertStatus(302);\n $response->assertRedirect('login');\n }", "public function LoginSuccessfulTest(FunctionalTester $I){\n $I->am('user');\n $I->wantTo('go to register');\n $I->lookForwardTo('getting registered successfully');\n\n HelperController::common_login($I, $this->name, $this->email, $this->password);\n\n }", "public function testLoginPasswordCaseSensitivity()\n {\n\n $this->expectOutputString(\"err_login_failed\");\n $email = '[email protected]';\n $ctrl = new Controller();\n // Give it the wrong case password\n $ctrl->login($email,'testpwor');\n\n }", "public function testAuthenticationServiceAuthenticationInformation()\n {\n }", "public function test_default_login()\n {\n $data = ['email' => '[email protected]', 'password' => 'default'];\n\n $response = $this->post('/login', $data);\n\n $response->assertStatus(302);\n\n $response->assertRedirect('/home');\n }", "public function test_only_logged_in_users_can_see_detailed_customer_list()\n {\n // the login page, assert \"true\"\n $response = $this->get('/customers/detailedlist')->assertRedirect('/login');\n\n }", "public function test_AllRoutesNoAuthAvailable()\n {\n //should be possible without any DB entry\n\n Session::start();\n $token = session('_token');\n\n $credentials = array(\n 'email' => '[email protected]',\n 'password' => 'wrongpass',\n '_token' => $token\n );\n\n $session = array(\n '_token' => $token\n );\n\n //index has redirect\n $this->get('/')->assertStatus(302);\n\n //index redirect to login page\n $this->followingRedirects()->get('/')\n ->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Auth Login\n $this->get('/login')->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n $this->followingRedirects()->post('/login', $credentials)->assertStatus(200)\n ->assertViewIs('auth.login');\n\n //Auth Logout POST\n $this->followingRedirects()->post('/logout', ['_token' => $token])->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Auth Logout GET\n $this->get('/logout')->assertStatus(302);\n $this->followingRedirects()->get('/logout')->assertStatus(200)\n ->assertViewIs('auth.login')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //Register Message GET\n $this->get('/auth/success')->assertStatus(200)\n ->assertSee('Dein Benutzer muss erst freigeschaltet werden. Du wirst per E-Mail benachrichtigt.')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n // impressum\n $this->get('/impressum')->assertStatus(200)->assertSee('Impressum')->assertSee('Datenschutz');;\n\n // datenschutz\n $this->get('/datenschutz')->assertStatus(200)->assertSee('Impressum')->assertSee('Datenschutz');\n\n // order\n $this->get('/order')->assertStatus(200)\n ->assertSee('Dein Dienstplan')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/basic')->assertStatus(200)\n ->assertSee('Basis Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/module')->assertStatus(200)\n ->assertSee('Modulares Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n $this->get('/order/create/support')->assertStatus(200)\n ->assertSee('Support Paket')\n ->assertSee('Impressum')->assertSee('Datenschutz');\n\n //following sites should not be available for guests and redirect to login\n\n //home\n $this->followingRedirects()->get('/home')->assertStatus(200)->assertViewIs('auth.login');\n\n //mailtest\n $this->followingRedirects()->get('/mailtest')->assertStatus(200)->assertViewIs('auth.login');\n\n //pdf extract\n $this->followingRedirects()->get('/pdf')->assertStatus(200)->assertViewIs('auth.login');\n\n //sendService PDF\n $this->followingRedirects()->get('/sendServicePDF')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/sendServicePDF', $session)->assertStatus(419);\n\n //userguide\n $this->followingRedirects()->get('/userguide')->assertStatus(200)->assertViewIs('auth.login');\n\n //superadmin user\n $this->followingRedirects()->get('/superadmin/user')->assertStatus(200)->assertViewIs('auth.login');\n\n //qualification (resource)\n $this->followingRedirects()->get('/qualification')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/qualification', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/qualification/1', $session)->assertStatus(419);\n $this->delete('/qualification/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/qualification/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //user (resource)\n $this->followingRedirects()->get('/user')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/user', $session)->assertStatus(419);\n $this->followingRedirects()->get('/user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/user/1', $session)->assertStatus(419);\n $this->delete('/user/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/user/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/user/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //user approve\n $this->followingRedirects()->get('/user/approve/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/user/approve/1', $session)->assertStatus(419);\n\n //client (resource)\n $this->followingRedirects()->get('/client')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/client/1', $session)->assertStatus(419);\n $this->delete('/client/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/client/create')->assertStatus(200)->assertViewIs('auth.login');\n\n // client apply\n $this->followingRedirects()->get('/clientapply')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/client/1/apply')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/apply', $session)->assertStatus(419);\n $this->delete('/client/1/apply', $session)->assertStatus(419);\n $this->put('/client/1/apply', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/apply/revert')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/apply/revert', $session)->assertStatus(419);\n $this->delete('/client/1/apply/revert', $session)->assertStatus(419);\n $this->put('/client/1/apply/revert', $session)->assertStatus(419);\n $this->followingRedirects()->get('/client/1/removeuser/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/1/removeuser/1', $session)->assertStatus(419);\n $this->delete('/client/1/removeuser/1', $session)->assertStatus(419);\n $this->put('/client/1/removeuser/1', $session)->assertStatus(419);\n\n //client update module\n $this->followingRedirects()->get('/client/module')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/client/module', $session)->assertStatus(419);\n $this->delete('/client/module', $session)->assertStatus(419);\n $this->put('/client/module', $session)->assertStatus(419);\n\n //change client\n $this->followingRedirects()->get('/changeclient/1')->assertStatus(200)->assertViewIs('auth.login');\n\n //service (resource)\n $this->followingRedirects()->get('/service')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/servicehistory')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/service/finalize/1')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->post('/service', $session)->assertStatus(419);\n $this->followingRedirects()->get('/service/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/service/1', $session)->assertStatus(419);\n $this->delete('/service/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/service/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/service/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/service/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //training (resource)\n $this->followingRedirects()->get('/training')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/training', $session)->assertStatus(419);\n $this->followingRedirects()->get('/training/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/training/1', $session)->assertStatus(419);\n $this->delete('/training/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/training/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/training/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/training/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //training user\n $this->followingRedirects()->get('/training/training_user/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/training/training_user/1/delete', $session)->assertStatus(419);\n $this->delete('/training/training_user/1/delete', $session)->assertStatus(419);\n $this->put('/training/training_user/1/delete', $session)->assertStatus(419);\n\n //news (resource)\n $this->followingRedirects()->get('/news')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/news', $session)->assertStatus(419);\n $this->followingRedirects()->get('/news/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/news/1', $session)->assertStatus(419);\n $this->delete('/news/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/news/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/news/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/news/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n\n //holiday (resource)\n $this->followingRedirects()->get('/holiday')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/holiday', $session)->assertStatus(419);\n $this->followingRedirects()->get('/holiday/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/holiday/1', $session)->assertStatus(419);\n $this->delete('/holiday/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/holiday/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/holiday/create')->assertStatus(200)->assertViewIs('auth.login');\n\n $this->followingRedirects()->get('/holiday/storeservice/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/holiday/storetraining/1')->assertStatus(200)->assertViewIs('auth.login');\n\n // Qualification <-> User\n $this->post('/qualification_user/create', $session)->assertStatus(419);\n $this->followingRedirects()->get('/qualification_user/delete/1/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/qualification_user/delete/1/1', $session)->assertStatus(419);\n\n // Client <-> User\n $this->post('/client_user/admin', $session)->assertStatus(419);\n $this->post('/client_user/trainingeditor', $session)->assertStatus(419);\n\n //Position\n $this->followingRedirects()->get('/position/1/subscribe')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/subscribe', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/subscribe_user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/subscribe_user/1', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/unsubscribe')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/unsubscribe', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/unsubscribe_user/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/unsubscribe_user/1', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/authorize')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/authorize', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/deauthorize')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/deauthorize', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/list_notAuthorized')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/list_notAuthorized', $session)->assertStatus(419);\n\n $this->followingRedirects()->get('/position/1/position_user')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/position/1/position_user', $session)->assertStatus(419);\n\n //Statistic\n $this->followingRedirects()->get('/statistic')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/statistic', $session)->assertStatus(419);\n\n //Calendar\n $this->followingRedirects()->get('/calendar')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/calendar', $session)->assertStatus(419);\n $this->followingRedirects()->get('/calendar/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/calendar/1', $session)->assertStatus(419);\n $this->delete('/calendar/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/calendar/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/calendar/1/delete')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/calendar/create')->assertStatus(200)->assertViewIs('auth.login');\n\n //Survey\n $this->followingRedirects()->get('/survey')->assertStatus(200)->assertViewIs('auth.login');\n $this->post('/survey', $session)->assertStatus(419);\n $this->followingRedirects()->get('/survey/1')->assertStatus(200)->assertViewIs('auth.login');\n $this->put('/survey/1', $session)->assertStatus(419);\n $this->delete('/survey/1', $session)->assertStatus(419);\n $this->followingRedirects()->get('/survey/1/edit')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->get('/survey/create')->assertStatus(200)->assertViewIs('auth.login');\n $this->followingRedirects()->post('/survey/vote/1')->assertStatus(419);\n $this->followingRedirects()->get('/survey/postpone/1')->assertStatus(200)->assertViewIs('auth.login');\n }", "public function testUsersTotpAuth()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function visitActivationUrlTwiceAsLoggedUserTest(FunctionalTester $I){\n $user = HelperController::common_login($I, $this->name, $this->email, $this->password);\n $I->assertFalse( (bool) $user->active);\n $I->see($this->name, '.logged_user');\n\n $I->amOnPage( route('account_activation', $user->activation_code ));\n $I->see( trans('text.activation_successful') );\n $I->amOnPage( route('account_activation', $user->activation_code) );\n $I->see( trans('text.activate_user_not_found') );\n\n $I->assertTrue( (bool) User::find($user->id)->active);\n\n }", "function auth()\n{\n $return = urlencode($_SERVER['REQUEST_URI']);\n\n if (isset($_POST['username']) && isset($_POST['passwd'])) {\n if (!verify_password($_POST['username'], $_POST['passwd'])) {\n header ('Location: https://doc.php.net/login.php?return='.$return);\n exit;\n }\n } else {\n header ('Location: https://doc.php.net/login.php?return='.$return);\n exit;\n }\n}" ]
[ "0.6694131", "0.63728565", "0.63075703", "0.6301784", "0.6197498", "0.61473346", "0.6135565", "0.610654", "0.61054003", "0.608855", "0.5989024", "0.59842056", "0.5972112", "0.5935534", "0.5925416", "0.5920498", "0.5907273", "0.5906379", "0.58987844", "0.58984214", "0.58984214", "0.58984214", "0.58973217", "0.5877452", "0.58419126", "0.58404654", "0.5829197", "0.58212394", "0.58162266", "0.58124524", "0.58106947", "0.5810341", "0.58075076", "0.58056605", "0.57975674", "0.57745844", "0.5771897", "0.57651585", "0.57646215", "0.5759143", "0.5754252", "0.5749927", "0.57486576", "0.5745476", "0.57454145", "0.5724942", "0.5723088", "0.5722897", "0.57200193", "0.57195956", "0.5719529", "0.5717008", "0.571671", "0.57096905", "0.5704824", "0.5698625", "0.5697778", "0.56964177", "0.5693471", "0.5681049", "0.5672473", "0.56710315", "0.5669154", "0.5662001", "0.5661273", "0.5661263", "0.56577134", "0.56498176", "0.5642248", "0.563323", "0.5628802", "0.5627256", "0.56268203", "0.56198126", "0.55976623", "0.5592203", "0.5591903", "0.5588545", "0.558212", "0.55742013", "0.55635315", "0.55620253", "0.55616736", "0.5561337", "0.55541015", "0.5552716", "0.55408406", "0.5540617", "0.5540617", "0.553339", "0.552071", "0.5517077", "0.55127376", "0.5512484", "0.55081487", "0.55066895", "0.5505523", "0.54935056", "0.54928815", "0.5490741" ]
0.6421278
1
Test u2fAuthenticateFinish method with exception
public function testU2fAutheticateFinishWithException() { $saveUser = TableRegistry::getTableLocator() ->get('CakeDC/Users.Users') ->get('00000000-0000-0000-0000-000000000001'); $savedRegistration = $saveUser->u2f_registration; $this->assertNotNull($savedRegistration); $registration = $saveUser->u2f_registration; $counter = $registration->counter; $this->assertNotNull($registration); $request = $this->getMockBuilder('Cake\Http\ServerRequest') ->setMethods(['getSession', 'is', 'getData']) ->getMock(); $this->Trait->setRequest($request); $request->expects($this->once()) ->method('is') ->with( $this->equalTo('ssl') )->will($this->returnValue(true)); $u2fLib = $this->getMockBuilder(U2F::class) ->setConstructorArgs(['https://localhost']) ->setMethods(['doAuthenticate']) ->getMock(); $signs = json_decode(json_encode([ ['fake' => new \stdClass()], ['fake2' => new \stdClass()], ])); $authenticateResponse = json_decode(json_encode([ 'fakeA' => 'fakevaluea', 'fakeB' => 'fakevalueb', ])); $this->Trait->getRequest()->expects($this->once()) ->method('getData') ->with($this->equalTo('authenticateResponse')) ->will($this->returnValue(json_encode($authenticateResponse))); $this->_mockSession([ 'U2f' => [ 'User' => new User([ 'id' => '00000000-0000-0000-0000-000000000001', 'username' => 'user-1', ]), 'authenticateRequest' => json_encode($signs), ], ]); $u2fLib->expects($this->once()) ->method('doAuthenticate') ->with( $this->equalTo($signs), $this->equalTo([$registration]), $this->equalTo($authenticateResponse) ) ->will($this->throwException(new \Exception('Invalid'))); $this->Trait->expects($this->once()) ->method('createU2fLib') ->will($this->returnValue($u2fLib)); $response = new Response(); $this->Trait->expects($this->once()) ->method('redirect') ->with(['action' => 'u2fAuthenticate']) ->will($this->returnValue($response)); $actual = $this->Trait->u2fAuthenticateFinish(); $this->assertSame($response, $actual); $actual = $this->Trait->getRequest()->getSession()->read('U2f'); $this->assertEquals( [ 'User' => new User([ 'id' => '00000000-0000-0000-0000-000000000001', 'username' => 'user-1', ]), ], $actual ); $updatedEntityUser = TableRegistry::getTableLocator() ->get('CakeDC/Users.Users') ->get('00000000-0000-0000-0000-000000000001'); $updatedEntity = $updatedEntityUser->u2f_registration; $this->assertEquals($counter, $updatedEntity->counter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authenticateSecondFactor() {\t \t \t\t \n\t \n\t $module = $this->getModule();\n\t \n\t\t$authParams = array(\n\t\t\t'module' => $module,\n\t\t);\n\t\t\n\t\tif ($module == RublonMagentoModule::CONNECT) {\n\t\t $callbackUrl = $this->getCallbackUrl($connect = true);\n\t\t} else {\n\t\t $callbackUrl = $this->getCallbackUrl();\n\t\t}\n\t\t\t\t\n\t\t$userId = $this->getAuthUserId();\n\t\t$email = $this->getAuthUserEmail(); \n\t\t\n\t\t$this->clearLoggedUser();\n \n try {\n \n $authUrl = $this->service->auth($callbackUrl, $userId, $email, $authParams); \n if (!empty($authUrl)) {\n \n // Retrive cached rublon features\n RublonFeature::getFeatures();\n \n $this->redirect($authUrl);\n } else {\n // do nothing\n }\n \n } catch (RublonException $e) {\n \n $notifierOptions = array(\n 'Method' => __METHOD__,\n 'Line' => __LINE__,\n 'Trace' => $e->getTraceAsString()\n );\n \n $this->addError($e, $notifierOptions);\n }\n\t}", "public function testAuthenticateUserEmailFalse ()\n {\n try {\n $this->storage->authenticateUser('milan@magudia', $this->signature1, $this->stringToSign1);\n } catch (InvalidArgumentException $e) {\n $this->assertEquals('$email address is not valid', $e->getMessage());\n return;\n }\n $this->fail('An expected exception has not been raised.');\n }", "public function testOnAuthenticationFailure(): void\n {\n $this->serverService->expects($this->once())\n ->method('getVariable')\n ->with('realm')\n ->will($this->returnValue('mock_realm'))\n ;\n\n $response = $this->authenticator->onAuthenticationFailure(\n new Request(),\n new AuthenticationException('Authentication failure message')\n );\n\n $this->assertSame(401, $response->getStatusCode());\n $this->assertSame('{\"error\":\"access_denied\",\"error_description\":\"Authentication failure message\"}', $response->getContent());\n }", "public function authenticationFailure()\n {\n return $this->sendFailed(\"not authenticated\");\n }", "private function loginFailed()\n {\n //Login failed...\n }", "public function authenticate()\n\t{\n\t\t$this->errorCode==self::ERROR_NONE;\n\t}", "public function testAuthenticateUserFalseSignature ()\n {\r\n $this->setExpectedException('SignatureDoesNotMatchException');\r\n $this->storage->authenticateUser($this->email1, false, $this->stringToSign1);\n }", "public function testAuthenticateUserFalse ()\n {\r\n $this->setExpectedException('InvalidAccessKeyIdException');\n $result = $this->storage->authenticateUser($this->badAccessId, $this->signature1, $this->stringToSign1);\n $this->assertNull($result);\n }", "public function testAuthenticateUser ()\n {\n $result = $this->storage->authenticateUser($this->accessId1, $this->signature1, $this->stringToSign1);\n $this->assertEquals($this->accessId1, $result['access_key']);\n }", "public function testLoginFailedFunctionality()\n {\n $this->expectOutputString(\"err_login_failed\");\n $email = '[email protected]';\n $ctrl = new Controller();\n // Give it the wrong password\n $ctrl->login($email,'wrong password');\n\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testAuthenticateEmailUser ()\n {\n $result = $this->storage->authenticateUser($this->email1, $this->signature1, $this->stringToSign1);\n $this->assertEquals($this->email1, $result['email_address']);\n }", "public static function userLoginFailed(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_LOGIN_KEY, self::USER_INTELLIGENCE_FAILED);\n }", "public function testAuthenticateUserFalseStringToSign ()\n {\r\n $this->setExpectedException('SignatureDoesNotMatchException');\n $this->storage->authenticateUser($this->email1, $this->signature1, false);\n }", "public function callbackFail()\n {\n $this->AddOutput(\"<p><i>\" . $this->logoutMessage . \"</i></p>\");\n $this->redirectTo();\n }", "public function testAuthenticateUserFalseId ()\n {\n try {\n $this->storage->authenticateUser(false, $this->signature1, $this->stringToSign1);\n } catch (InvalidAccessKeyIdException $e) {\n $this->assertEquals('$accessId cannot be empty: must be 20 alphanumeric characters', $e->getMessage());\n return;\n }\n $this->fail('An expected exception has not been raised.');\n }", "function ft_hook_loginfail() {}", "public function testFailLogin()\n {\n $response = $this->call('GET', '/api/v1/[email protected]&password=12345');\n \n $this->assertEquals(401, $response->status());\n }", "public function authenticateAction() {\n try {\n $this->authenticationManager->authenticate();\n $this->addFlashMessage('Erfolgreich angemeldet.');\n $this->redirect('index', 'Marketplace');\n } catch (\\TYPO3\\Flow\\Exception $exception) {\n // Prüft ob eine Fehlernachricht vorhanden ist. Wenn ja zeigt diese an.\n if($exception->getMessage()){\n $this->addFlashMessage('Falscher Benutzername oder Passwort!'/* . $exception->getMessage()*/);\n //$this->addFlashMessage($exception->getMessage());\n $this->redirect('index', 'Login');\n }\n }\n }", "public function test_login2()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('123456','password')\n ->press('Login')\n ->see('These credentials do not match our records.');\n }", "public function callbackFail()\n {\n $this->di->get(\"response\")->redirect(\"user\")->send();\n }", "public function throwAuthenticationException()\n {\n $user = new User();\n try {\n $user->generateResetPasswordToken($this->valid_test_email_2);\n $this->fail(\"Token generated successfully even when the account is an inactive one\");\n } catch (Exception $e) {\n $this->assertInstanceOf('UserAuth\\Exceptions\\UserAuthenticationException', $e);\n }\n }", "public function testProcessLoginFailed(){\n\n Sentinel::disableCheckpoints();\n\n $credentials = [\n 'email' => '[email protected]',\n 'password' => 'passwords',\n ];\n\n $response = $this->post(route('login.action', $credentials));\n\n $response->assertSessionHas('failed');\n $response->assertRedirect(route('login.form'));\n }", "public function testAuthenticate()\n {\n $this->mockWebApplication([\n 'modules' => [\n 'oauth2' => [\n 'resourceServerAccessTokenRevocationValidation' => false, // Token revocation validation is tested during functional testing.\n ]\n ]\n ]);\n // phpcs:enable Generic.Files.LineLength.TooLong\n\n $request = Yii::$app->request;\n $request->headers->set('Authorization', 'Bearer ' . $this->validAccessToken);\n\n $httpBearerAuth = new Oauth2HttpBearerAuth();\n\n $identity = $httpBearerAuth->authenticate(Yii::$app->user, $request, Yii::$app->response);\n $this->assertNotNull($identity);\n $this->assertEquals(123, $identity->getId());\n }", "public function tearDown()\n {\n Authenticate::doLogout();\n }", "public function testFailedDifferentUserLoggedIn(): void\n {\n self::$httpAuthorizationToken = AccessTokenFixture::DATA['access-token-juliette']['id'];\n\n $this->checkFailedAccessDenied();\n }", "public function OAuthAuthenticate()\n {\n throw new Exception( \"OAuthAuthenticate Not yet implemented\" );\n \n// $response = Auth1::legs(2)\n// ->set( 'key', $this->OAuthConsumerKey )\n// ->set( 'secret', $this->OAuthConsumerSecret )\n// ->request( $this->OAuthRequestURI );\n }", "public function test_fail_login() {\n $_POST = array('name' => \"customer2\", 'password' => \"123:\");\n $expected = json_encode(array(\"status\" => 0, \"message\" => \"Username or password is incorrect\"));\n $this->expectOutputString($expected);\n $this->object->main();\n }", "function doSecureAuthValidate(){\n\t\n\t\tif(\t@$this->loginKey == \"\" || @$this->identification == \"\"){\n\t\t\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"You need to login to access this service \", \"localStorage.clear(); window.location='index.html'; \");\n\t\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->doSecureAuth(@$this->loginKey, @$this->obsfucate->makeKey($this->sanitize( $this->identification )) );\n\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "private function failure() : void\n {\n (new Repository())->disconnect();\n (new Session())->set('user','success', 'Une erreur est survenue nous vous prions de réessayer ultèrieurement');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }", "public function testAuthenticationServiceAuthenticationUpdate()\n {\n }", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception);", "function ft_hook_loginsuccess() {}", "public function testAuthenticationServiceAuthenticate()\n {\n $response = self::$av->authenticate(self::$credentials);\n $this->assertFalse($response->hasError);\n\n $this->assertNotEmpty($response->reply->getAccessToken());\n self::$accessToken = $response->reply->getAccessToken();\n }", "function authenticate() {}", "public function testExecuteUserNotFound(): void\n {\n $authenticateApi = $this->createAuthenticationAPI();\n $authenticateApiRequest = new AuthenticateApiRequest('admin', 'centreon');\n $authenticateApiResponse = new AuthenticateApiResponse();\n\n $this->authenticationService\n ->expects($this->once())\n ->method('deleteExpiredSecurityTokens');\n\n $this->providerFactory\n ->expects($this->once())\n ->method('create')\n ->with(Provider::LOCAL)\n ->willReturn($this->providerAuthentication);\n\n $this->providerAuthentication\n ->expects($this->once())\n ->method('authenticateOrFail')\n ->with(LoginRequest::createForLocal('admin', 'centreon'));\n\n $this->providerAuthentication\n ->expects($this->once())\n ->method('getAuthenticatedUser')\n ->willReturn(null);\n\n $this->expectException(AuthenticationException::class);\n $this->expectExceptionMessage('User cannot be retrieved from the provider');\n\n $authenticateApi->execute($authenticateApiRequest, $authenticateApiResponse);\n }", "public function testAuthenticateTransformsAccountStatusException(): void\n {\n // flagging the authorization header to be removed at the same time\n $this->serverService->expects($this->once())\n ->method('getBearerToken')\n ->with(\n $this->isInstanceOf(Request::class),\n $this->equalTo(true)\n )\n ->will($this->returnValue('mock_token_string'))\n ;\n\n // expect the OAuth2 service to verify the token, returning an access token\n $accessToken = new AccessToken();\n $accessToken->setUser($this->user);\n $accessToken->setScope('scope_1 scope_2');\n $this->serverService->expects($this->once())\n ->method('verifyAccessToken')\n ->with('mock_token_string')\n ->will($this->returnValue($accessToken))\n ;\n\n // expect the user checker to not pass\n $this->userChecker->expects($this->once())\n ->method('checkPreAuth')\n ->with($this->user)\n ->willThrowException(new DisabledException('User account is disabled.'))\n ;\n\n $passport = $this->authenticator->authenticate(new Request());\n\n // confirm that the returned passport won't pass validation\n $this->assertFalse($passport->getBadge(OAuthCredentials::class)->isResolved());\n }", "function handle_signin_error($transport) {\n\t\t$this->error->get(MC_INTERR, true);\n\t\t$this->error->get(MC_ERROR, true);\n\n\t\tswitch($transport->faultcode) {\n\t\t\tcase 'soap:UserAuthen':\n\t\t\tcase 'soap:AuthzError':\n\t\t\tcase 'soap:WrongParams':\n\t\t\tcase 'soap:MissingPerson':\n\t\t\tcase 'soap:PersonsDenied':\n\t\t\tcase 'soap:LoginError':\n\t\t\t\t$this->error->add(MC_ERROR, 'LOGIN_INVALID');\n\t\t\tbreak;\n\n\t\t\tcase 'soap:UserDelayed':\n\t\t\t\t$this->error->add(MC_ERROR, 'LOGIN_DELAYED');\n\t\t\tbreak;\n\n\t\t\tcase 'soap:UserFraudError':\n\t\t\t\t$this->error->add(MC_ERROR, null, $transport->faultstring);\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->error->add(MC_ERROR, $transport->faultstring ? null : 'LOGIN_INVALID', $transport->faultstring ? $transport->faultstring : null);\n\t\t\tbreak;\n\t\t}\n\t}", "public function authenticateAction()\n {\n if ($this->request->isPost()) {\n $email = $this->request->getPost('email', 'email');\n $password = $this->request->getPost('password', 'string');\n if($this->userService->authenticateContact($email, $password)){\n if ($this->request->isAjax()) {\n return UserServices::SUCCESS;\n }\n return $this->response->redirect('mein-konto');\n }else{\n if ($this->request->isAjax()) {\n return UserServices::WRONGEMAILPASS;\n }\n $this->error = UserServices::WRONGEMAILPASS;\n }\n }\n if(!is_null($this->error)){\n $this->flash->error($this->error);\n }\n return $this->dispatcher->forward(\n [\n \"controller\" => \"signup\",\n \"action\" => \"index\",\n ]\n );\n }", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function testInvalidUserLogin()\n {\n $this->withoutExceptionHandling();\n\n $credentials = [\n \"email\" => \"[email protected]\",\n \"password\" => \"1111\",\n ];\n\n $response = $this->post(route(\"login.attempt\"),$credentials);\n\n $response->assertRedirect(route(\"home\"));\n $response->assertSessionHas(\"error\");\n }", "public function testU2fAuthenticateRedirectCustomUser($userData, $redirect)\n {\n $request = $this->getMockBuilder('Cake\\Http\\ServerRequest')\n ->setMethods(['getSession', 'is'])\n ->getMock();\n $this->Trait->setRequest($request);\n $request->expects($this->any())\n ->method('is')\n ->with(\n $this->equalTo('ssl')\n )->will($this->returnValue(true));\n $response = new Response([\n 'body' => (string)time(),\n ]);\n $this->Trait->expects($this->once())\n ->method('redirect')\n ->with(\n $this->equalTo($redirect)\n )->will($this->returnValue($response));\n $this->_mockSession([\n 'U2f.User' => $userData,\n ]);\n $actual = $this->Trait->u2fAuthenticate();\n $this->assertSame($response, $actual);\n }", "public function testVerifyPasswordRecoveryToken()\n {\n }", "public function authenticate() { return false; }", "protected function failedToAuthenticateUserMessage(): string\n {\n return 'Unable to authenticate with invalid token.';\n }", "public function loginCheckAction()\n {\n\n\n throw new \\Exception('This should never be reached!');\n }", "public function testLoginFailure()\n {\n $mock = new MockHandler([\n new Response(400, [], '{\"error\": \"login failure\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/login', ['email' => '[email protected]', 'password' => 'password'], $this->headers)\n ->assertStatus(400)\n ->assertSeeText('login failure');\n\n }", "public function testAuthenticated()\n {\n $this->assertFalse($this->auth->authenticate(new ServerRequest(), $this->response));\n }", "public function testLoginWrongEmail(): void { }", "public function onUserLoginFailed($event)\n {\n }", "public function testUnauthenticatedNoException()\n {\n $this->auth->setConfig('unauthenticatedException', false);\n $this->assertNull($this->auth->unauthenticated(new ServerRequest(), $this->response));\n }", "public function completeFlow()\n {\n $app = app();\n \n // Get the required params\n $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser());\n if (is_null($clientId)) {\n throw new Exception\\InvalidRequestException('client_id');\n }\n\n $clientSecret = $this->server->getRequest()->request->get('client_secret',\n $this->server->getRequest()->getPassword());\n if (is_null($clientSecret)) {\n throw new Exception\\InvalidRequestException('client_secret');\n }\n\n // Validate client ID and client secret\n $client = $this->server->getClientStorage()->get(\n $clientId,\n $clientSecret,\n null,\n $this->getIdentifier()\n );\n\n if (($client instanceof ClientEntity) === false) {\n $this->server->getEventEmitter()->emit(new Event\\ClientAuthenticationFailedEvent($this->server->getRequest()));\n throw new Exception\\InvalidClientException();\n }\n\n $code = $this->server->getRequest()->request->get('code', null);\n if (is_null($code)) {\n throw new Exception\\InvalidRequestException('code');\n }\n\n // Query the database.\n $users = $app['mandango']->getRepository('Byryby\\\\Model\\\\User')\n ->createQuery()\n ->criteria([\n 'emails.verificationCode' => $code\n ])\n ->all();\n\n if (count($users) < 1) {\n throw new Exception\\InvalidCredentialsException();\n }\n \n if (count($users) > 1) {\n $msg = 'More than one user is associated with the same e-mail verification code: ' . $code;\n $app['log']->alert($msg);\n throw new Exception\\ServerErrorException($msg);\n }\n\n // ...so there's exactly one user with that verification code\n $user = array_pop($users);\n $userId = (string)$user->getId();\n\n /* @var \\Byryby\\Model\\User $user */\n if($user->getPendingInvitation()) {\n throw new PendingInvitationException();\n }\n if($user->getDeleted()) {\n throw new DeletedException();\n }\n if($user->getSuspended()) {\n throw new SuspendedException();\n }\n\n // Set the e-mail to verified\n foreach ($user->getEmails() as $email) {\n if ($email->getVerificationCode() == $code) {\n $email->setVerificationCode(null);\n $email->setVerified(1);\n $user->save();\n break;\n }\n }\n\n // Validate any scopes that are in the request\n $scopeParam = $this->server->getRequest()->request->get('scope', '');\n $scopes = $this->validateScopes($scopeParam, $client);\n\n // Create a new session\n $session = new SessionEntity($this->server);\n $session->setOwner('user', $userId);\n $session->associateClient($client);\n\n // Generate an access token\n $accessToken = new AccessTokenEntity($this->server);\n $accessToken->setId(SecureKey::generate());\n $accessToken->setExpireTime($this->getAccessTokenTTL() + time());\n\n // Associate scopes with the session and access token\n foreach ($scopes as $scope) {\n $session->associateScope($scope);\n }\n\n foreach ($session->getScopes() as $scope) {\n $accessToken->associateScope($scope);\n }\n\n $this->server->getTokenType()->setSession($session);\n $this->server->getTokenType()->setParam('access_token', $accessToken->getId());\n $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL());\n\n // Associate a refresh token if set\n if ($this->server->hasGrantType('refresh_token')) {\n $refreshToken = new RefreshTokenEntity($this->server);\n $refreshToken->setId(SecureKey::generate());\n $refreshToken->setExpireTime($this->server->getGrantType('refresh_token')->getRefreshTokenTTL() + time());\n $this->server->getTokenType()->setParam('refresh_token', $refreshToken->getId());\n }\n\n // Save everything\n $session->save();\n $accessToken->setSession($session);\n $accessToken->save();\n\n if ($this->server->hasGrantType('refresh_token')) {\n $refreshToken->setAccessToken($accessToken);\n $refreshToken->save();\n }\n\n return $this->server->getTokenType()->generateResponse();\n }", "public function testLoginWithInvalidEmail() : void\n {\n $res = self::$dataService->login( \"login\", null, $this->userFake[\"user\"], $this->userEmpty[\"pass\"], [] );\n\n $this->assertIsArray( $res, 'testLoginWithNotValidEmail' );\n $this->assertArrayHasKey('status', $res, 'testLoginWithNotValidEmail' );\n $this->assertArrayHasKey('msg', $res, 'testLoginWithNotValidEmail' );\n $this->assertCount(2, $res, 'testLoginWithNotValidEmail' );\n $this->assertEquals( [ \"status\" => false, \"msg\" => $this->userFake[\"user\"].\" is not a valid email address\" ], $res, 'testLoginWithNotValidEmail' );\n }", "public function testValidationErrorIsReturnedIfInvalidDataIsPassedToEnabled2FA()\n {\n /** @var \\Pterodactyl\\Models\\User $user */\n $user = User::factory()->create(['use_totp' => false]);\n\n $response = $this->actingAs($user)->postJson('/api/client/account/two-factor', [\n 'code' => '',\n ]);\n\n $response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);\n $response->assertJsonPath('errors.0.code', 'ValidationException');\n $response->assertJsonPath('errors.0.meta.rule', 'required');\n }", "function b2c_verify_token( $return_uri = '' ) {\n\ttry {\n\t\tif ( isset( $_POST['error'] ) ) {\n\t\t\t// If user requests the Password Reset flow from a Sign-in/Sign-up flow, the following is returned:\n\t\t\t// Error: access_denied\n\t\t\t// Description: AADB2C90118: The user has forgotten their password.\n\t\t\tif ( preg_match( '/.*AADB2C90118.*/i', $_POST['error_description'] ) ) {\n\t\t\t\t// user forgot password so redirect to the password reset flow\n\t\t\t\tb2c_password_reset();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t// If user cancels the Sign-up portion of the Sign-in/Sign-up flow or\n\t\t\t// if user cancels the Profile Edit flow, the following is returned:\n\t\t\t// Error: access_denied\n\t\t\t// Description: AADB2C90091: The user has cancelled entering self-asserted information.\n\t\t\tif ( preg_match( '/.*AADB2C90091.*/i', $_POST['error_description'] ) ) {\n\t\t\t\t// user cancelled profile editing or cancelled signing up\n\t\t\t\t// so redirect to the home page instead of showing an error\n\t\t\t\twp_safe_redirect( site_url() . '/' );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\techo 'Authentication error on ' . get_bloginfo( 'name' ) . '.';\n\t\t\techo '<br>Error: ' . $_POST['error'];\n\t\t\techo '<br>Description: ' . $_POST['error_description'];\n\t\t\techo '<br><br><a href=\"' . site_url() . '\">Go to ' . site_url() . '</a>';\n\t\t\texit;\n\t\t}\n\n\t\tif ( isset( $_POST[ B2C_RESPONSE_MODE ] ) ) {\n\t\t\t// Check which authorization policy was used\n\t\t\tswitch ( $_POST['state'] ) {\n\t\t\t\tcase 'subscriber':\n\t\t\t\t\t$policy = B2C_Settings::$subscriber_policy;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'admin':\n\t\t\t\t\t$policy = B2C_Settings::$admin_policy;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'edit_profile':\n\t\t\t\t\t$policy = B2C_Settings::$edit_profile_policy;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'signup':\n\t\t\t\t\t$policy = B2C_Settings::$signup_policy;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// Not a B2C request, ignore.\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Verifies token only if the checkbox \"Verify tokens\" is checked on the settings page\n\t\t\t$token_checker = new B2C_Token_Checker( $_POST[ B2C_RESPONSE_MODE ], B2C_Settings::$clientID, $policy );\n\t\t\tif ( B2C_Settings::$verify_tokens ) {\n\t\t\t\t$verified = $token_checker->authenticate();\n\t\t\t\tif ( $verified == false ) {\n\t\t\t\t\twp_die( 'Token validation error' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Use the email claim to fetch the user object from the WP database\n\t\t\t$email = $token_checker->get_claim( 'emails' );\n\t\t\t$email = $email[0];\n\t\t\t$user_b2c_id = $token_checker->get_claim( 'oid' );\n\t\t\t$user = b2c_get_user( $user_b2c_id, $email );\n\t\t\t// $user = WP_User::get_data_by('email', $email);\n\n\t\t\t// Get the userID for the user\n\t\t\tif ( $user == false ) { // User doesn't exist yet, create new userID\n\n\t\t\t\t// if we are not allowing the automatic creation of new users and we are not coming from the signup policy then throw an error\n\t\t\t\tif ( ! B2C_Settings::$create_users && $policy != B2C_Settings::$signup_policy ) {\n\t\t\t\t\t// user could not be found in WP so logout to clear the b2c cookies\n\t\t\t\t\tb2c_logout();\n\t\t\t\t};\n\n\t\t\t\t$name = $token_checker->get_claim( 'name' );\n\t\t\t\t$first_name = $token_checker->get_claim( 'given_name' );\n\t\t\t\t$last_name = $token_checker->get_claim( 'family_name' );\n\t\t\t\t$username = b2c_generate_username( $email );\n\n\t\t\t\t$our_userdata = array(\n\t\t\t\t\t'ID' => 0,\n\t\t\t\t\t'user_login' => $username,\n\t\t\t\t\t'user_pass' => null,\n\t\t\t\t\t'user_registered' => true,\n\t\t\t\t\t'user_status' => 0,\n\t\t\t\t\t'user_email' => $email,\n\t\t\t\t\t'nickname' => $name,\n\t\t\t\t\t'display_name' => $name,\n\t\t\t\t\t'first_name' => $first_name,\n\t\t\t\t\t'last_name' => $last_name,\n\t\t\t\t);\n\n\t\t\t\t$filtered_user_data = apply_filters( 'b2c_insert_user', $our_userdata, $token_checker->get_payload() );\n\n\t\t\t\t// Filter returned false which means we do not want to insert this specific user\n\t\t\t\tif ( $filtered_user_data === false ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$userID = wp_insert_user( $filtered_user_data );\n\n\t\t\t\t// Allows custom fields sent over the payload to be saved in WordPress\n\t\t\t\tdo_action( 'b2c_new_userdata', $userID, $token_checker->get_payload() );\n\t\t\t} elseif ( $policy == B2C_Settings::$edit_profile_policy ) { // Update the existing user w/ new attritubtes\n\n\t\t\t\t$name = $token_checker->get_claim( 'name' );\n\t\t\t\t$first_name = $token_checker->get_claim( 'given_name' );\n\t\t\t\t$last_name = $token_checker->get_claim( 'family_name' );\n\t\t\t\t$user_b2c_id = $token_checker->get_claim( 'object_id' );\n\n\t\t\t\t$our_userdata = array(\n\t\t\t\t\t'ID' => $user->ID,\n\t\t\t\t\t'display_name' => $name,\n\t\t\t\t\t'nickname' => $name,\n\t\t\t\t\t'first_name' => $first_name,\n\t\t\t\t\t'last_name' => $last_name,\n\t\t\t\t\t'user_email' => $email,\n\t\t\t\t);\n\n\t\t\t\t$filtered_user_data = apply_filters( 'b2c_update_user', $our_userdata, $token_checker->get_payload() );\n\n\t\t\t\t// Filter returned false which means we do not want to update this specific user\n\t\t\t\tif ( $filtered_user_data === false ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$userID = wp_update_user( $filtered_user_data );\n\n\t\t\t\t// Allows custom fields sent over the payload to be updated in WordPress\n\t\t\t\tdo_action( 'b2c_update_userdata', $userID, $token_checker->get_payload() );\n\t\t\t} else {\n\t\t\t\t$userID = $user->ID;\n\t\t\t}\n\n\t\t\t// update the provider used by the user\n\t\t\tupdate_user_meta( $userID, 'b2c_auth_provider', $token_checker->get_claim( 'idp', '' ) );\n\n\t\t\t// Check if the user is an admin and needs MFA\n\t\t\t$wp_user = new WP_User( $userID );\n\t\t\tif ( in_array( 'administrator', $wp_user->roles ) ) {\n\n\t\t\t\t// If user did not authenticate with admin_policy, redirect to admin policy\n\t\t\t\tif ( mb_strtolower( $token_checker->get_claim( 'tfp' ) ) != mb_strtolower( B2C_Settings::$admin_policy ) ) {\n\t\t\t\t\t$b2c_endpoint_handler = new B2C_Endpoint_Handler( B2C_Settings::$admin_policy );\n\t\t\t\t\t$authorization_endpoint = $b2c_endpoint_handler->get_authorization_endpoint( $return_uri ) . '&state=admin';\n\t\t\t\t\tif ( $authorization_endpoint ) {\n\t\t\t\t\t\twp_redirect( $authorization_endpoint );\n\t\t\t\t\t}\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set cookies to authenticate on WP side\n\t\t\twp_set_auth_cookie( $userID );\n\n\t\t\t// Redirect to home page\n\t\t\twp_safe_redirect( site_url() . '/' );\n\t\t\texit;\n\t\t}\n\t} catch ( Exception $e ) {\n\t\techo $e->getMessage();\n\t\texit;\n\t}\n}", "public function authenticate()\n\t{\n\t\tif ($this->hasErrors())\n return; // There are errors already\n\t\t\n $identity = $this->getIdentity();\n if ($identity->ok)\n return; // Authenticate successfully\n \n if (!YII_DEBUG) {\n $this->addError('password','Incorrect email or password.');\n\n } else {\n switch ($identity->errorCode) {\n case UserIdentity::ERROR_USERNAME_INVALID:\n $this->addError('email', 'Invalid email.');\n break;\n\n case UserIdentity::ERROR_PASSWORD_INVALID:\n $this->addError('email', 'Invalid password.');\n break;\n\n default:\n $this->addError('password', 'Unknown UserIdenitity error.');\n break;\n }\n }\n\t}", "public function testCantLoginWithInvalidCredentials()\n {\n // arrange \n $user = User::factory()->create();\n\n // act\n $response = $this->post(\"/login\", [\n \"email\" => $user->email,\n \"password\" => \"invalidpassword\"\n ]);\n\n // assert\n $response->assertStatus(302);\n $response->assertSessionHas(\"errors\");\n\n $messages = session(\"errors\")->getMessages();\n $this->assertEquals($messages[\"email\"][0], \"These credentials do not match our records.\");\n // dd($messages);\n }", "function validateCredential(){\r\n\r\n\t\t$avsData = array('Street' => '1 Main St', 'City' => 'San Jose', 'PostalCode' => '95131');\r\n\t\t$cardData = array('cardowner' => 'Jane Doe', 'cardtype' => 'Visa', 'pan' => '4012888812348882', 'expire' => '1218', 'cvv' => '123');\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$obj_transaction = new VelocityProcessor( $this->applicationprofileid, $this->merchantprofileid, $this->workflowid, $this->isTestAccount, $this->identitytoken, null);\r\n\t\t\treturn array('status'=>1,'message'=>'Authentication Validated Successfully.');\r\n\t\t\t/* try {\r\n\t\t\t\t$response = $obj_transaction->verify(array(\r\n\t\t\t\t\t\t'amount' => 1.00,\r\n\t\t\t\t\t\t'avsdata' => $avsData,\r\n\t\t\t\t\t\t'carddata' => $cardData,\r\n\t\t\t\t\t\t'entry_mode' => 'Keyed',\r\n\t\t\t\t\t\t'IndustryType' => $this->IndustryType,\r\n\t\t\t\t\t\t'Reference' => 'Ezneterp',\r\n\t\t\t\t\t\t'EmployeeId' => '11'\r\n\t\t\t\t));\r\n\t\t\t\t\r\n\t\t\t\tif (is_array($response) && isset($response['Status']) && $response['Status'] == 'Successful') \r\n\t\t\t\t\treturn array('status'=>1,'message'=>'Authentication Validated Successfully.');\r\n\t\t\t\telse\r\n\t\t\t\t\treturn array('status'=>0,'errors'=>$response);\r\n\t\t\t\t\r\n\t\t\t} catch (Exception $e) {\r\n\t\t\t\treturn array('status'=>0,'errors'=>$e->getMessage());\r\n\t\t\t} */\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\tif(strcmp($e->getMessage(), 'An invalid security token was provided') == 0)\r\n\t\t\t\treturn array('status'=>0,'errors'=>'An invalid security token was provided');\r\n\t\t\telse\r\n\t\t\t\treturn array('status'=>0,'errors'=>$e->getMessage());\r\n\t\t}\r\n\t}", "public function testExecuteUserNotAuthenticated(): void\n {\n $authenticateApi = $this->createAuthenticationAPI();\n $authenticateApiRequest = new AuthenticateApiRequest('admin', 'centreon');\n $authenticateApiResponse = new AuthenticateApiResponse();\n\n $this->authenticationService\n ->expects($this->once())\n ->method('deleteExpiredSecurityTokens');\n\n $this->providerFactory\n ->expects($this->once())\n ->method('create')\n ->with(Provider::LOCAL)\n ->willReturn($this->providerAuthentication);\n\n $this->providerAuthentication\n ->expects($this->once())\n ->method('authenticateOrFail')\n ->with(LoginRequest::createForLocal('admin', 'centreon'))\n ->willThrowException(AuthenticationException::invalidCredentials());\n\n $this->expectException(AuthenticationException::class);\n $this->expectExceptionMessage('Invalid Credentials');\n\n $authenticateApi->execute($authenticateApiRequest, $authenticateApiResponse);\n }", "public function authenticate() {}", "public function callbackFail()\n {\n $this->redirectTo();\n }", "public function testAuthenticate()\n\t{\n\t\t$mock = $this->getMockBuilder('UserIdentity')\n\t\t\t->disableOriginalConstructor()\n\t\t\t->setMethods(array('findUserByUsername'))\n\t\t\t->getMock();\n\n\t\t$user = $this->getMockBuilder('User')\n\t\t\t->disableOriginalConstructor()\n\t\t\t->setMethods(array('updateLastLogin'))\n\t\t\t->getMock();\n\n\t\t$user->salt = 'test';\n\t\t$user->username = 'test';\n\t\t$user->password = User::hashPassword('test', 'test');\n\n\t\t$mock->expects($this->any())\n\t\t\t->method('findUserByUsername')\n\t\t\t->will($this->returnValue($user));\n\n\t\t$mock->username = 'test';\n\t\t$mock->password = 'test';\n\n\t\t$result = $mock->authenticate();\n\n\t\t$this->assertTrue($result);\n\t\t$this->assertEquals(UserIdentity::ERROR_NONE, $mock->errorCode);\n\t}", "public function testAuthenticationServiceAuthenticationInformation()\n {\n }", "public function testActivateFailLoggedin()\n {\n $user = $this->Users->get(1);\n\n $user->set('activation_key', $this->Users->generateActivationKey());\n\n $user = $this->Users->save($user);\n\n $this->session(['Auth.User' => [\n 'id' => 1,\n 'role_id' => 1,\n ]]);\n\n $this->get('/users/activate/' . $user->email . '/' . $user->activation_key . '');\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/login');\n }", "public function testAuthenticationsInweboIdGet()\n {\n }", "public function testShowUnauthicatedAccess(): void { }", "public function login_verify($args)\n {\n $rcmail = rcmail::get_instance();\n\n $time = $_SESSION['kolab_2fa_time'];\n $nonce = $_SESSION['kolab_2fa_nonce'];\n $factors = (array)$_SESSION['kolab_2fa_factors'];\n\n $this->login_verified = false;\n $expired = $time < time() - $rcmail->config->get('kolab_2fa_timeout', 120);\n\n if (!empty($factors) && !empty($nonce) && !$expired) {\n // TODO: check signature\n\n // try to verify each configured factor\n foreach ($factors as $factor) {\n list($method) = explode(':', $factor, 2);\n\n // verify the submitted code\n $code = rcube_utils::get_input_value(\"_${nonce}_${method}\", rcube_utils::INPUT_POST);\n $this->login_verified = $this->verify_factor_auth($factor, $code);\n\n // accept first successful method\n if ($this->login_verified) {\n break;\n }\n }\n }\n\n if ($this->login_verified) {\n // restore POST data from session\n $_POST['_user'] = $_SESSION['username'];\n $_POST['_host'] = $_SESSION['host'];\n $_POST['_pass'] = $rcmail->decrypt($_SESSION['password']);\n }\n\n // proceed with regular login ...\n $args['action'] = 'login';\n\n // session data will be reset in index.php thus additional\n // auth attempts with intercepted data will be rejected\n // $rcmail->kill_session();\n\n // we can't display any custom error messages on failed login\n // but that's actually desired to expose as little information as possible\n\n return $args;\n }", "public static function userLoginSuccess(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_LOGIN_KEY, self::USER_INTELLIGENCE_SUCCESS);\n }", "public function testLoginWrongPassword(): void { }", "public function loginCheckAction()\n {\n throw new \\Exception('This should never be reached!');\n }", "private function logAuthFailure($message){\t\t\t\r\n\t\t// If authentication is failed, then pass '0' while fetching logging object\r\n\t\t$this->IsAuthorised = 0;\r\n\t\t$log = ToaLogService::GetLog($this->IsAuthorised);\r\n\t\tif($log != null){\r\n\t\t $log->error($message);\r\n\t\t}\r\n\t}", "public function testCanLogOut() {\n // TBA\n }", "protected function _authenticateSetup()\n {\n $exception = null;\n \n if ($this->_rest === null) {\n $exception = 'A REST location was not set.';\n } elseif ($this->_identityColumn == '') {\n $exception = 'An identity column must be supplied for the Etd_Auth_Adapter authentication adapter.';\n } elseif ($this->_credentialColumn == '') {\n $exception = 'A credential column must be supplied for the Etd_Auth_Adapter authentication adapter.';\n } elseif ($this->_identity == '') {\n $exception = 'A value for the identity was not provided prior to authentication with Etd_Auth_Adapter.';\n } elseif ($this->_credential === null) {\n $exception = 'A credential value was not provided prior to authentication with Etd_Auth_Adapter.';\n }\n\n if (null !== $exception) {\n /**\n * @see Zend_Auth_Adapter_Exception\n */\n require_once 'Zend/Auth/Adapter/Exception.php';\n throw new Zend_Auth_Adapter_Exception($exception);\n }\n \n $this->_authenticateResultInfo = array(\n 'code' => Zend_Auth_Result::FAILURE,\n 'identity' => $this->_identity,\n 'messages' => array()\n );\n \n return true;\n }", "public function testProfileLogout()\n {\n\n }", "public function testWrongUser(){\n Session::flush();\n $user = $this->postuser(array('username'=>'XxX','password'=>'XxX'));\n $status_message = $this->getJsonResponse();\n $this->assertResponseStatus('401');\n $this->assertTrue($status_message['message'] == 'login refused');\n }", "public function callbackFail()\n {\n if (isset($this->exception)) {\n if (strpos($this->exception, CFormAddUser::SQLSTATE) !== false && strpos($this->exception, CFormAddUser::ERROR_DUPLICATE_KEY) !== false) {\n $errorMessage = \"<p><i>Fel har uppstått i databasen. Akronym är redan upptaget, försök att välja ny akronym eller kontakta administratör!</i></p>\";\n } else {\n $errorMessage = \"<p><i>Fel har uppstått i databasen, försök igen eller kontakta administratör!</i></p>\";\n }\n } else {\n if (isset($this->errorMessage)) {\n $errorMessage = $this->errorMessage;\n } else {\n $errorMessage = \"<p><i>Fel har uppstått i databasen, kunde ej spara information i databasen. Försök igen eller kontakta administratör!</i></p>\";\n }\n }\n\n $this->AddOutput($errorMessage);\n $this->redirectTo();\n }", "public function testAuthenticateNonExistingIdentity()\n {\n $this->mockWebApplication([\n 'modules' => [\n 'oauth2' => [\n 'resourceServerAccessTokenRevocationValidation' => false, // Token revocation validation is tested during functional testing.\n ]\n ],\n 'components' => [\n 'user' => [\n 'identityClass' => get_class(new class extends TestUserModel {\n public static function findIdentityByAccessToken($token, $type = null)\n {\n return null;\n }\n })\n ],\n ],\n ]);\n // phpcs:enable Generic.Files.LineLength.TooLong\n\n $request = Yii::$app->request;\n $response = Yii::$app->response;\n $request->headers->set('Authorization', 'Bearer ' . $this->validAccessToken);\n\n $httpBearerAuth = new Oauth2HttpBearerAuth([\n 'realm' => 'test-realm',\n ]);\n\n try {\n $httpBearerAuth->authenticate(Yii::$app->user, $request, $response);\n } catch (\\Exception $e) {\n }\n\n $this->assertInstanceOf(UnauthorizedHttpException::class, $e);\n $this->assertEquals('Bearer realm=\"test-realm\"', $response->headers->get('WWW-Authenticate'));\n }", "public function onAuthenticationFailure(AuthenticationFailureEvent $event)\n {\n // TODO warn about login attempt on admin users accounts.\n }", "public function testCannotLoginInactiveUser()\n {\n $user = factory(User::class)->create();\n $user->create_activation();\n \n $this->post('/api/v1/login', [\n 'email' => $user->email,\n 'password' => 'secret',\n ], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'message' => 'This account has not been activated. Please check your email.'\n ]);\n \n $this->get('/api/v1/me', ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson(['error' => 'Unauthenticated.']);\n }", "protected function onAuthenticationFailure(AuthenticationRequiredException $exception = NULL) {\n\t\t$this->addFlashMessage('The entered username or password was wrong', 'Wrong credentials', Message::SEVERITY_ERROR, array(), ($exception === NULL ? 1347016771 : $exception->getCode()));\n\t}", "public function testAuthenticationServiceSignAccessToken()\n {\n }", "public function showAuthenticateFailed(Request $request);", "protected function failedAuthorization()\n {\n throw new UnauthorizedException();\n }", "public function testWrongTokenTwoPhase(){\n $array_test = ['email' => '[email protected]', 'pubid' => 4];\n\n $api = new ApiConnection();\n $dataCheck = [\n 'status' => 400,\n 'message' => \"wrong API token\",\n 'data' => []\n ];\n $this->assertEquals($dataCheck, $api->updateAccount($array_test));\n }", "public function testLogoutNotAuthenticated(): void { }", "function alt_failed_login()\n {\n return 'The login information you have entered is incorrect.';\n }", "public function testWrongTransactionTokenTwoPhase(){\n $array_test = ['email' => '[email protected]', 'pubid' => 4];\n\n $api = new ApiConnection();\n $dataCheck = [\n 'status' => 401,\n 'message' => \"wrong transaction token\",\n 'data' => []\n ];\n $this->assertEquals($dataCheck, $api->updateAccount($array_test));\n }", "public function testAuth() {\n\n\t\t// Hakija 1 kirjautuu\n $res = cliRun(\"test_auth\", '{\"user_email\": \"'.USER_EMAIL.'\", \"user_pass\": \"'.USER_PASS.'\", \"format\":\"json\"}');\n $auth_data = fromObjArray($res);\n $this->token = findValRecursive('Suojaustunnus', $auth_data); // this token is used by all the other tests\n\n $this->assertTrue(is_string($this->token), \"Unable to get auth token for test user1, run 'php tests/test_auth.php' for details\");\n $this->assertTrue(strlen($this->token)>30, \"Invalid token, 'php tests/test_auth.php' for details\");\n\n $this->user_id = $auth_data['KayttajaDTO']['ID'];\n\n\t\t// Hakija 2 kirjautuu\n $res = cliRun(\"test_auth\", '{\"user_email\": \"'.NEW_USER_EMAIL.'\", \"user_pass\": \"'.NEW_USER_PASS.'\", \"format\":\"json\"}');\n $auth_data = fromObjArray($res);\n $this->new_token = findValRecursive('Suojaustunnus', $auth_data); // this token is used by all the other tests\n\n $this->assertTrue(is_string($this->new_token), \"Unable to get auth token for test user2, run 'php tests/test_auth.php' for details\");\n $this->assertTrue(strlen($this->new_token)>30, \"Invalid token, 'php tests/test_auth.php' for details\");\n\n $this->new_user_id = $auth_data['KayttajaDTO']['ID'];\n\n // phpunit4 that comes with php5 calls tests statically, so we need this workaround. Cause @depends testAuth doesn't do the trick too\n define('TOKEN', $this->token);\n define('USER_ID', $this->user_id);\n define('NEW_TOKEN', $this->new_token);\n define('NEW_USER_ID', $this->new_user_id);\t\n\t\t\n\t\t// Viranomainen kirjautuu\n $res = cliRun(\"test_auth\", '{\"user_email\": \"'.VIRANOMAINEN_EMAIL.'\", \"user_pass\": \"'.VIRANOMAINEN_PASS.'\", \"format\":\"json\"}');\n $auth_data = fromObjArray($res);\t\n\t\t$Suojaustunnus = findValRecursive('Suojaustunnus', $auth_data);\t\n\n $this->assertTrue(is_string($Suojaustunnus), \"Unable to get auth token for test viranomainen, run 'php tests/test_auth.php' for details\");\n $this->assertTrue(strlen($Suojaustunnus)>30, \"Invalid token, 'php tests/test_auth.php' for details\");\t\n\n define('VIRANOMAINEN_TOKEN', $Suojaustunnus);\n define('VIRANOMAINEN_ID', $auth_data['KayttajaDTO']['ID']);\t\t\t\n\t\t\n\t\t// Viranomainen 2 kirjautuu\n $res = cliRun(\"test_auth\", '{\"user_email\": \"'.VIRANOMAINEN2_EMAIL.'\", \"user_pass\": \"'.VIRANOMAINEN2_PASS.'\", \"format\":\"json\"}');\n $auth_data = fromObjArray($res);\t\n\t\t$Suojaustunnus = findValRecursive('Suojaustunnus', $auth_data);\t\t\t\n\n $this->assertTrue(is_string($Suojaustunnus), \"Unable to get auth token for test viranomainen, run 'php tests/test_auth.php' for details\");\n $this->assertTrue(strlen($Suojaustunnus)>30, \"Invalid token, 'php tests/test_auth.php' for details\");\t\n\t\t\n define('VIRANOMAINEN2_TOKEN', $Suojaustunnus);\n define('VIRANOMAINEN2_ID', $auth_data['KayttajaDTO']['ID']);\t\t\n\t\t\n }", "public function failed();", "public function autherrorAction()\n {\n }", "public function interruptLogin();", "public function testAuthenticationServiceRequestPasswordReset()\n {\n }", "public function testAuthenticateUserNotFound()\n\t{\n\t\t$mock = $this->getMockBuilder('UserIdentity')\n\t\t\t->disableOriginalConstructor()\n\t\t\t->setMethods(array('findUserByUsername'))\n\t\t\t->getMock();\n\n\t\t$user = null;\n\n\t\t$mock->expects($this->any())\n\t\t\t->method('findUserByUsername')\n\t\t\t->will($this->returnValue($user));\n\n\t\t$mock->username = 'test';\n\t\t$mock->password = 'test';\n\n\t\t$result = $mock->authenticate();\n\n\t\t$this->assertFalse($result);\n\t\t$this->assertEquals(UserIdentity::ERROR_USERNAME_INVALID, $mock->errorCode);\n\t}", "public function testInvalidCredentialsCantLogin()\n {\n $this->browse( function( Browser $browser ){\n $browser->visit( '/admin' );\n $browser->type( 'email', '[email protected]' );\n $browser->type( 'password', 'wrongpassword' );\n $browser->click( '.button.is-primary' );\n $browser->assertSee( 'Your username or password were incorrect' );\n });\n }", "public function testDestiny2AwaProvideAuthorizationResult()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testRegisterFailure()\n {\n $mock = new MockHandler([\n new Response(400, [], '{\"error\": \"register failure\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/create-user', ['email' => '[email protected]', 'password' => 'password'], $this->headers)\n ->assertStatus(400)\n ->assertSeeText('register failure');\n\n }", "public function authenticate() {\n }", "public function checkAuthentication() {}", "public function testLoginPost()\n\t{\n\t\t$request = $this->getMockedRequest();\n\t\t$request->server->set('REQUEST_METHOD', 'POST');\n\t\t$userbaseController = new UserbaseController($request);\n\t\t$result = $userbaseController->loginAction();\n\t\t$this->assertCount(2, $result);\n\t\t$this->assertEquals(401, $result['returnCode']);\n\t}", "public function test_that_unauthroized_user_cannot_view_courses()\n {\n\n }" ]
[ "0.6409867", "0.62959474", "0.6290672", "0.61401886", "0.607836", "0.6006887", "0.59911436", "0.59179646", "0.59041125", "0.5851945", "0.58415484", "0.5841146", "0.58029", "0.5773044", "0.57547253", "0.5733913", "0.57234365", "0.57096386", "0.56445163", "0.5633259", "0.5630944", "0.56282955", "0.56280726", "0.5613819", "0.5606725", "0.5598858", "0.5593913", "0.5583407", "0.5562255", "0.5557938", "0.55500776", "0.5543872", "0.55421007", "0.5541934", "0.55236244", "0.5519924", "0.5498477", "0.5497176", "0.5476321", "0.54707396", "0.5466501", "0.5462024", "0.54571", "0.5443794", "0.54427946", "0.5439012", "0.5435774", "0.5366343", "0.53575116", "0.53564095", "0.53394526", "0.5337244", "0.5336882", "0.5332899", "0.5328685", "0.53237396", "0.5319993", "0.53091115", "0.5304827", "0.5304521", "0.53023964", "0.5300444", "0.5299238", "0.5298694", "0.5287235", "0.5287122", "0.5281285", "0.5272408", "0.526795", "0.52627176", "0.525931", "0.5256818", "0.5256276", "0.52524126", "0.5241142", "0.52378035", "0.52221996", "0.52143914", "0.52085036", "0.5207154", "0.5196805", "0.51944804", "0.5183306", "0.5181624", "0.518026", "0.5177403", "0.5175846", "0.5175705", "0.51727986", "0.51676786", "0.5166556", "0.51657104", "0.51655877", "0.5162327", "0.51552325", "0.5154896", "0.51539886", "0.5145517", "0.5145491", "0.5144453" ]
0.6758325
0
Se verifica que el usuario ingresado exista en la base
function verificar_login($user,&$result) { $sql = "SELECT * FROM empleados WHERE nombre = '$user'"; $rec = mysql_query($sql); $count = 0; while($row = mysql_fetch_object($rec)) { $count++; $result = $row; } if($count == 1){ return 1; }else{ return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkUserExistence() {\n\t\t\t\t$query = \"select count(email) as count from register where email='$this->email'\";\n\t\t\t\t$resource = returnQueryResult($query);\n\t\t\t\t$result = mysql_fetch_assoc($resource);\n\t\t\t\tif($result['count'] > 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public function userExists() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection(); \n\t\t\n //inserts username and password in to users table\n $data =(\"SELECT user_id FROM user WHERE username ='{$this->_username}'\");\n\t\t$result = $mysqli->query($data);\n return(mysqli_num_rows($result) > 0) ? 1 : 0;\n }", "private function existe_usuario()\n\t{\n\t\t$data = $this->request->getRawInput();\n\t\t$ruc = $data['nick']; \n\t\t$usu = new Admin_model();\n\t\t$usuarioObject = $usu->where(\"nick\", $ruc) \n\t\t->first();\n\t\treturn !is_null($usuarioObject);\n\t\t \n\t}", "private function existeUsuario()\n {\n $con = Conexion::getInstance();\n $sql = \"SELECT user \n FROM usuarios\n WHERE user = '{$this->usuario}' AND estado = 1 AND idUsuario != {$this->Id}\";\n\n $result = mysqli_query($con, $sql);\n\n if($result->num_rows >= 1 && $result != false)\n {\n return false;\n }\n\n return true;\n }", "function user_exist($uname)\n {\n $this->removeOldTemps();\n \n $res = $this->query(\"SELECT * FROM `{$this->userTable}` WHERE `{$this->tbFields1['email']}` = '\".$uname.\"'\");\n $res2 = $this->query(\"SELECT * FROM `{$this->userTempTable}` WHERE `{$this->tbTmpFields['email']}` = '\".$uname.\"'\"); \n \n if((!$res && !$res2) || (mysql_num_rows($res) == 0 && mysql_num_rows($res2) == 0)){ // no records \n return false;\n }\n return true; \n }", "public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}", "function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }", "private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }", "function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}", "public function userExists( $user_name ) { return true;}", "function usuario_existe($usuario){\n\t$sql = \"SELECT id FROM usuarios WHERE usuario = '$usuario'\";\n\n\t$resultado = query($sql);\n\n\tif(contar_filas($resultado) == 1){\n\n\t\treturn true;\n\t} else{\n\t\treturn false;\n\t}\n\n}", "public function userExists(){\r\n\t\t$bool = false ;\r\n\t\t$pseudo = addslashes($this -> getPseudo()) ;\r\n\t\t$r = execute(\"select count(User_pseudo) as nb from UserTab where User_pseudo='\".$pseudo.\"'\");\t\r\n\t\twhile($l = mysql_fetch_assoc($r)){\r\n\t\t\tif($l['nb'] > 0)\r\n\t\t\t\t$bool = true ;\r\n\t\t}\t\t\r\n\t\r\n\t\treturn $bool ;\r\n\t }", "public function existNameUser($user){\t\t\n\t\t$query = \"SELECT idUser FROM final_usuario WHERE nick='\".$user.\"'\";\n\t\treturn mysqli_num_rows($this->con->action($query))> 0? True: False;\n\t}", "public function existeUser($acc){\n\t\tUtilidades::_log(\"existeUser($acc)\");\n\t\t$db=DB::conectar();\n\t\t$select=$db->prepare('SELECT * FROM user WHERE account=:account');\n\t\t$select->bindValue('account',$acc);\n\t\t$select->execute();\n\t\t$registro=$select->fetch();\n\t\tif(null != registro['id']){\n\t\t\t$usado=False;\n\t\t}else{\n\t\t\t$usado=True;\n\t\t}\t\n\t\treturn $usado;\n\t}", "public function userExists($login){\n $usr = $this->userInfo($login);\n if($usr == null) { // uzivatel neni v DB\n return false;\n }\n else {\n return true;\n }\n }", "public function any_user_exists(){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` \";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user exists \n if(mysqli_num_rows($run_select_query) > 0){\n //check if \n return true;\n }else{\n return false;\n }\n }\n }", "function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }", "function user_exists()\n\t{\t\n\t\tif((empty($_SESSION['username'])))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public function userExists()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$users = self::getRawUsers('uname = \\'' . mysql_escape_string($uname) . '\\'');\n\n\t\tif(count($users) == 1) {\n\t\t\tforeach($users as $user) {\n\t\t\t\tif($user['uname'] == $uname) {\n\t\t\t\t\t$return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return = false;\n\t\t}\n\t\treturn self::ret($return);\n\t}", "function dbUserExists($unm)\n{\n\t$result = false;\n\t$sql = \"SELECT username FROM _account WHERE username = '$unm'\";\n\ttry {\n\t\t$stmt = Database :: prepare ( $sql );\n\t\t$stmt->execute();\n\t\t$count = $stmt -> rowCount();\n\t\tif ($count > 0) {\n\t\t\t$result = true; //Username already taken\n\t\t}\n\t\t$stmt->closeCursor ( ) ;\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n\treturn $result;\n}", "function exists ($name)\r\n {\r\n # create encoded_key_string\r\n $encoded_key_string = parent::_encode_key_string(USER_NAME_FIELD_NAME.\"='\".$name.\"'\");\r\n\r\n $record = parent::select_record($encoded_key_string);\r\n if (count($record) > 0)\r\n {\r\n $this->_log->debug(\"user already exists (name=\".$name.\")\");\r\n\r\n return TRUE;\r\n }\r\n else if (strlen($this->get_error_message_str()) == 0)\r\n {\r\n $this->_log->debug(\"user does not exist (name=\".$name.\")\");\r\n\r\n return FALSE;\r\n }\r\n else\r\n return FALSE;\r\n }", "private function checkUsernameExist(){\n $base = new ConnexionDb();\n\n $req = $base->query(\n \"SELECT u.username FROM user as u WHERE u.username = :username\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR)\n )\n );\n\n if(isset($req[0]->username)){\n return true;\n }else{\n return false;\n }\n }", "public function existUser($user,$pwd){\n\t\t$query = \"SELECT idUser FROM final_usuario WHERE nick='\".$user.\"' and \n\t\tpassword='\".$pwd.\"'\";\n\t\treturn mysqli_num_rows($this->con->action($query))> 0? True: False; \n\t}", "function is_user_exists($cellphone,$password)\n {\n\n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND password='{$password}' AND register_user=1\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }", "function userExists( $username ) {\n return true;\n }", "function doesUserExist($user) {\r\n global $dbaseUserData, $leagueID, $dbase;\r\n\r\n\r\n $query = \"SELECT username from $dbaseUserData where lid='$leagueID' and username=\\\"$user\\\"\";\r\n $result = $dbase->query($query);\r\n\r\n if ($result == FALSE) {\r\n ErrorNotify(\"Query Failed : $query\");\r\n CloseConnection($link);\r\n return TRUE;\r\n }\r\n \r\n // If we get >0 rows, the username already exists.\r\n $numrows = mysql_num_rows($result);\r\n\r\n if ($numrows == 0) {\r\n return FALSE;\r\n }\r\n\r\n return TRUE;\r\n}", "function exists($user_query){\n\t\t\n\t\t//CALL MEMBER FUNCTION QUERY OF THE CURRENT OBJECT\n\t\t$result = $this->query(\"Select username from users where username='\".$user_query.\"'\");\n\t\t\n\t\t//COUNT RESULTS FROM QUERY\n\t\t$count = mysqli_num_rows($result);\n\n\t\t//IF COUNT HAS COUNTED ONE OR MORE RESULTS, RETURN FALSE BECAUSE EMAIL/USER IS ALREADY REGISTERED!\n\t\tif($count>0){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function usernameExists() {\n\t\tif(!check($this->_username)) return;\n\t\t$result = $this->db->queryFetchSingle(\"SELECT \"._CLMN_USERNM_.\" FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = ?\", array($this->_username));\n\t\tif(!is_array($result)) return;\n\t\treturn true;\n\t}", "public function existe_usuario($user){ \n \n $query = \"SELECT email, password, idneo4j FROM usuario WHERE email = '\".$user.\"';\";\n $mysql = new Conexion();\n $resultado = $mysql->get_resultados_query($query);\n \n //print_r($resultado);\n \n if(!empty($resultado))\n return $resultado;\n \n return false;\n \n }", "function Register(){\n\n\t\t$sql = \"select * from USUARIOS where login = '\".$this->login.\"'\";\n\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'El usuario ya existe';\n\t\t\t}\n\t\telse{\n\t \t\treturn true; //TEST : El usuario no existe\n\n\t}\n}", "private function existeusuario($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `carga` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n\n return $stmt->num_rows > 0;\n }", "public function usuarioExiste($usuario)\n {\n $bd = new Bd();\n\n $usser = \"SELECT * FROM usuarios WHERE mail='\" . $this->mail . \"'\" . \" AND clave='\" . $this->clave . \"'\";\n $resultado = $bd->consulta($usser);\n\n\n if ($bd->numeroElementos() == 1) {\n session_start();\n $_SESSION['mail'] = $this->mail;\n $_SESSION['clave'] = $this->clave;\n\n header('location: inici.php');\n } else {\n\n header(\"location: registro.php\");\n }\n }", "public function hasUser();", "function usernameExists(){\n\t $query = \"SELECT id, first_name, last_name, password\n\t FROM \" . $this->table_name . \"\n\t WHERE username = ?\n\t LIMIT 0,1\";\n\t \n\t $stmt = $this->conn->prepare( $query );\n\t $this->username=htmlspecialchars(strip_tags($this->username));\n\t $stmt->bindParam(1, $this->username);\n\t \n\t $stmt->execute();\n\t $num = $stmt->rowCount();\n\t \n\t if($num > 0){\n\t $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t \n\t $this->id = $row['id'];\n\t $this->first_name = $row['first_name'];\n\t $this->last_name = $row['last_name'];\n\t $this->password = $row['password'];\n\t \n\t return true;\n\t }\n\t return false;\n\t}", "function isUserExist($con,$androidId,$username,$email){\n\t$sql = \"SELECT * FROM `access`,`owner` WHERE owner.email = access.email AND owner.android_id = '\".$androidId.\"' AND owner.email='\".$email.\"' AND access.username='\".$username.\"' AND access.enable = 'Y'\";\n\n\t$result = mysqli_query($con,$sql);\n\t$value = @mysqli_num_rows($result);\n\n\tif ($value){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function userExists()\r\n {\r\n $sql = \"SELECT COUNT(*) FROM (SELECT * FROM doctors WHERE email = :email) AS subquery\";\r\n\r\n $query = $this->db_connection->prepare($sql);\r\n $query->bindValue(':email', $this->email);\r\n $query->execute();\r\n\r\n while($result_row = $query->fetch() ){\r\n if($result_row[0] == 1) return true;\r\n else return false;\r\n }\r\n\r\n return false; \r\n }", "public function checkUsernameExists(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t//echo \"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"'\";\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' LIMIT 1\");\r\n\t\t\t\t$count= mysql_num_rows($result);\r\n\t\t\t\tif($count==0){\r\n\t\t\t\t\t//Username is available\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return true;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Username already taken.\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return false;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t//return false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "function getUserExistsOrNot() \n{\n\t$username = $_POST['username'];\t\n\t$query = \"SELECT id FROM users WHERE username='\".$username.\"'\";\n\t$result = mysql_query($query) or die(\"Failed to fetch data: \".mysql_error());\n\t\n\tif(!mysql_num_rows($result)) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\t\n}", "function Boolean_Existencia_Usuario($username,$email)\n{\n\t$query = consultar(sprintf(\"SELECT email_usuario,usuario FROM tb_usuarios WHERE email_usuario='%s' or usuario='%s'\",escape($username),escape($email)));\n\tif(Int_consultaVacia($query)>0)\n\t{\n\t\treturn array(false,'El usuario o el email ya existen, intenta nuevamente.');\n\t}else\n\t{\n\t\treturn array(true,'');\t\n\t}\n\n}", "function chkExist($user){\n\tglobal $dbLink;\n\t\n\t$sqlChkExist = \"SELECT uid FROM users WHERE uid='$user'\";\n\t\n\t$dbLink->query($sqlChkExist);\n\t$rows = $dbLink->affected_rows;\n\t\n\tif($rows == 1){\n\t\t$ok==0;\n\t}\n\telse{\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user does not exist\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t}\n}", "public function getUserExiste(){\n return $this->userExist;\n }", "function userExists(){\n\t\t//assume user is not in system\n\t\t$exists = false;\n\t\ttry{//try to est connection to db \n\t\t\t$user_db = new SQLite3('users.db');\n\t\t}catch(Exception $ex){ //if cannot catch exception \n\t\t\techo $ex->getMessage(); \n\t\t}\n\t\t//query for all usernames\n\t\t$statement = 'SELECT Username FROM users;';\n\t\t$run = $user_db->query($statement); \n\n\t\tif($run){//if not error in query \n\t\t\twhile($row = $run->fetchArray()){//while there are still rows to parse\n\t\t\t\tif(trim($row['Username']) === trim($_POST['name'])){//if provided user name matches one in db\n\t\t\t\t\t//user exists\n\t\t\t\t\t$exists = true;\n\t\t\t\t\t//break out of loop\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t//close connection to db\n\t\t$user_db->close(); \n\t\treturn $exists;\n\t}", "function checkIfUserExists($conn,$data)\n {\n $sql = \"SELECT * FROM tbl_users \n WHERE email='\".$data['email'].\"' AND username='\".$data['username'].\"'\";\n $result = $conn->query($sql);\n return ($result->num_rows>0 ? true : false);\n }", "function isAlreadyExist(){\n $query = \"SELECT *\n FROM\n \" . $this->db_table . \" \n WHERE\n username='\".$this->username.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n if($stmt->rowCount() > 0){\n return true;\n }\n else{\n return false;\n }\n }", "private function existeusuario2($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `descuento` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n return $stmt->num_rows > 0;\n }", "public function user_exists() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"SELECT user_id FROM `users` WHERE user_id = '$this->user_id'\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\treturn ($result->num_rows == 1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UnexpectedValueException('UnexpectedValueException occured on method call user_exists because the user id is invalid');\r\n\t\t}\r\n\t}", "public function check_user()\n {\n $res = $this->CustomModel->checkUser(\n $this->input->get('index_no')\n );\n\n if (!$res) {\n echo 'not exists';\n }\n }", "public function check_insta_user() {\n \n }", "public function userExist( $data = [] ) {\n\t\tif( $this->where(\"username\", $data[\"user\"])->exist() ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function userExists($email) {\r\n\t\t\tif ($this->getUser($email) != false)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t}", "public function user_exists($staff_id){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` WHERE `staff_id` = '$staff_id'\";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user already exists \n if(mysqli_num_rows($run_select_query) == 0){\n //check if \n return false;\n }else{\n return true;\n }\n }\n }", "public function user_exists($staff_id){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` WHERE `staff_id` = '$staff_id'\";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user exists \n if(mysqli_num_rows($run_select_query) > 0){\n //check if \n return true;\n// trecho \"hgello\";\n }else{\n return false;\n }\n }\n }", "public function _userexists($input) {\n\n\t\t$prepare \t= $this->db->prepare(\"SELECT * FROM `users` WHERE `username` = ?\");\n\t\t$prepare->execute(array(r::post($input)));\n\t\t$result \t= $prepare->fetch();\n\n\t\tif(!empty($result)) {\n\t\t\treturn true;\n\t\t}\n\t}", "public function check() {\n return (isset($_SESSION['usuario']));\n }", "function userExists()\n\t{\n\t\t$uid = mysql_real_escape_string($_POST[\"uid\"]);\n\n\t\t$query = \"\n\t\t\tSELECT *\n\t\t\tFROM user\n\t\t\tWHERE uid='$uid';\";\n\n\t\t$result = mysql_query($query) or die(\"db access error\" . mysql_error());\n\n\t\t$exists = (mysql_numrows($result) == 1) ? true : false;\n\n\t\treturn $exists;\n\t}", "public function isUserExisting($username){\n\t\t$sqlQuery = \"SELECT count(*) as isExisting \";\n\n\t\t$sqlQuery .= \"FROM user_table \";\n\n\t\t$sqlQuery .= \"WHERE user_name='$username' \";\t\t\n\t\t//Calls the method from the DAOFactory and passes in the query to be execute, and the result is stored\n\t\t$result = $this->getDbManager()->executeSelectQuery($sqlQuery);\n\t\t\n\t\tif ($result[0][\"isExisting\"] == 1) return (true);\n\n\t\telse return (false);\n\t}", "function existUsername($username)\n{\n $c = conectar();\n $select = \"select * from USUARIOS where USERNAME='$username'\";\n // Ejecutamos la consulta recogiendo el resultado\n $resultado = mysqli_query($c, $select);\n // Comprobamos cuantas filas tiene\n if (mysqli_num_rows($resultado) === 1) {\n $resultado = true;\n } else {\n $resultado = false;\n }\n desconectar($c);\n return $resultado;\n}", "public function usernameExists(){\n\n // query to check if email exists\n $query = \"SELECT id, username, uid, password\n FROM \" . $this->table_name . \"\n WHERE username = ?\n LIMIT 0,1\";\n\n // prepare the query\n $stmt = $this->conn->prepare( $query );\n\n // sanitize\n $this->adminusername=htmlspecialchars(strip_tags($this->adminusername));\n\n // bind given email value\n $stmt->bindParam(1, $this->adminusername);\n\n // execute the query\n $stmt->execute();\n\n // get number of rows\n $num = $stmt->rowCount();\n\n // if email exists, assign values to object properties for easy access and use for php sessions\n if($num>0){\n\n // get record details / values\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // assign values to object properties\n $this->adminid = $row['id'];\n $this->adminusername = $row['username'];\n $this->uid = $row['uid'];\n $this->adminpassword = $row['password'];\n\n // return true because username exists in the database\n return true;\n }\n\n // return false if username does not exist in the database\n return false;\n }", "private function Check_If_User_Exists($query){\r\n\r\n // Send query into server\r\n $this->_db->get_Row($query);\r\n\r\n // Return result of query\r\n // True - if find\r\n // False - in dont\r\n return ($this->_db->count() > 0 ) ? true : false;\r\n }", "public function isNewUser($dh) {\n //perhaps at some point this will be a flag in the database...for now it's\n //just a matter of if password has ever been set or not\n $info = $this->getDbInfo($dh, true);\n return ($info[\"user\"][\"password\"] === \"\");\n //note that right now this will return false if there is an error returned\n //from getDbInfo\n }", "public function user_not_exists($staff_id){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` WHERE `staff_id` = '$staff_id'\";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user already exists \n if(mysqli_num_rows($run_select_query) == 0){\n //check if \n return true;\n }else{\n return false;\n }\n }\n }", "public function checkUserExist($account){\n $query = \"select * from members where account=\\\"$account\\\"\";\n $result = $this->dbh->query($query);\n if($result->rowCount() > 0){\n return true;\n }\n return false;\n }", "function checkExistsUser($email){\n\n\t\t$stmt = $this->conn->prepare(\"SELECT * FROM user Where email=:email\");\n\t\t$stmt->execute(['email'=>$email]);\n\t\t$result = $stmt->fetchAll();\n\t\t$num_rows = count($result);\n\n\t\tif($num_rows > 0){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function existeUsuario($usuario){\n\tif (hasKey(BUCKET_USUARIOS,$usuario))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function isUserExists($username, $connection) {\n $q = mysqli_query($connection, 'SELECT user_name, user_id \n FROM users \n WHERE user_name = \"' . $username . '\"'\n );\n\n if (!$q) {\n echo 'Възникна грешка с базата данни!!!';\n exit;\n } else {\n if ($q->num_rows == 0) {\n return false;\n } else {\n return mysqli_fetch_assoc($q)['user_id'];\n }\n }\n}", "private function doesUserExists($name,$log=false){\n\t\treturn ($this->_link->countFieldsLCASE('users',array('name'=>strtolower($name)),$log)>0);\n\t}", "public function isExists(Request $request){\n $mode = $this->isEmail($request->phn_or_email);\n $user = null;\n $flashmail=$request->phn_or_email;\n if($mode){\n $user = User::where('email', $request->phn_or_email)->first();\n }else{\n $user = User::where('phone', $request->phn_or_email)->first();\n }\n if($user){\n $data['flag'] = 6;\n Session::flash ( 'email', $flashmail );\n return redirect('login-user')->with(['msg2' =>'You already have an account, Please login using ' . $request->phn_or_email,'phn_or_email' => $request->phn_or_email]);\n }else{\n return redirect('registration')->with('msg', 'You dont have an account, Please register.');\n }\n }", "function isInvitedUserExist($invited_user)\n {\n $sql=\"SELECT id from user WHERE id = $invited_user\";\n $query = $this->db->query($sql);\n if($query->num_rows()>0)\n { return true;\n }\n else{\n return false;\n }\n }", "function isUserExist($email)\n\t{\n\t\t$stmt = $this->con->prepare(\"SELECT id FROM users WHERE email = ?\");\n\t\t$stmt->bind_param(\"s\", $email);\n\t\t$stmt->execute();\n\t\t$stmt->store_result();\n\t\treturn $stmt->num_rows > 0;\n\t}", "public function existUser($params)\r\n {\r\n if (!empty($this->getAll($params))) {\r\n return True;\r\n } else {\r\n return False;\r\n }\r\n }", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "function userIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM users WHERE id = ?\",array($id));\n\t$num_returns = $query->count();\n\tif ($num_returns > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "private function doesUserExists($id,$log=false){\n\t\treturn (\n\t\t\tNewDao::getInstance()\n\t\t\t->countFields('users',array('id'=>$id),$log)>0\n\t\t);\n\t}", "public function checkData()\n\t{\n\t\t$result = parent::checkData();\n\t\t$query = (new \\App\\Db\\Query())->from($this->baseTable)->where(['server_id' => $this->get('server_id'), 'user_name' => $this->get('user_name')]);\n\t\tif ($this->getId()) {\n\t\t\t$query->andWhere(['<>', 'id', $this->getId()]);\n\t\t}\n\t\treturn !$result && $query->exists() ? 'LBL_DUPLICATE_LOGIN' : $result;\n\t}", "public function check_user_exist($con,$username) {\n $query = \"SELECT * FROM user WHERE username = '$username'\";\n $result = mysqli_query($con, $query);\n $count = mysqli_num_rows($result);\n if ($count > 0) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "protected function userExist ($username,$email) {\n\t\t$sql = \"SELECT user_name, user_email FROM users\n\t\t\t\tWHERE user_name = ? AND user_email = ?\";\n\t\t$data = [$username,$email];\n\t\t//create stdStatemment object | call to Model method from core/Database.php\t\n\t\t$statement = $this->setStatement($sql,$data);\n\t\t\tif ( $statement->rowCount() < 1 ) {\n\t\t\t\t$out = true;\n\t\t\t} else {\n\t\t\t\t$out = false;\n\t}\n\t\treturn $out;\n\t}", "function checkUser($usuario, $password){\n $conexion = $this->conectarBD();\n\t\t$userRegistered = false;\n\n $sql = \"SELECT id_usuario FROM usuarios WHERE nombre_usuario = '\".$usuario.\"' and password_usuario = '\".$password.\"' ;\";\n\n $result = mysqli_query($conexion, $sql);\n\n if($row=mysqli_fetch_array($result, MYSQL_ASSOC)){ \n $this->id_user = $row['id_usuario'];\n\t\t $userRegistered = true;\n } \n //Desconectamos la base de datos\n $this->desconectarBD($conexion);\n return $userRegistered;\n }", "function user_exists($username){\n\n $sql = \"SELECT Username, Password, Email, Id FROM Users\"; //WHERE\n //Username={$username}\";\n $result = mysqli_query(Db::$conn, $sql);\n //check results return true if >0\n if(mysqli_num_rows($result)>0) {\n while ($row = mysqli_fetch_assoc($result)) {\n $temp_user = $row[\"Username\"];\n $temp_pass = $row[\"Password\"];\n if ($username == $row[\"Username\"]) {\n return true;\n }\n }\n }\n\n return false;\n\n}", "public function exists() {\n\t\tglobal $config;\n\t\t\n\t\tif(!empty($this->data['id']))\n\t\t\t$where = 'id = '.$this->data['id'];\n\t\telseif(!empty($this->data['fbid']))\n\t\t\t$where = 'fbid = '.$this->data['fbid'];\n\t\n\t\t$result = $config['database']->query(\"\n\t\t\tSELECT id\n\t\t\tFROM nuusers\n\t\t\tWHERE $where\n\t\t\tLIMIT 1\n\t\t\");\n\t\t\n\t\treturn $result->num_rows;\n\t}", "function isUserExist($username)\n {\n $allUsers = $this->data->getAllUsers();\n while ($user = $allUsers->fetch_assoc())\n {\n if ($user['Username'] == $username)\n {\n return true;\n }\n }\n return false;\n }", "function isUserExisted($email) {\n $result = mysql_query(\"SELECT email from users WHERE email = '$email'\",$first);\n $no_of_rows = mysql_num_rows($result);\n if ($no_of_rows > 0) {\n // user existed \n return true;\n } else {\n // user not existed\n return false;\n }\n }", "public function SesionIniciada()\n{\n \n $ConexionCassandra=new ManejadorCassandra();//Conexion con la base de datos \n $ObtenerIp=$ConexionCassandra->ConsultaPorParametro('sesion',array('ip'=>$this->ObtenerIp())); //Busco en la tabla sesion si se encuentra la ip\n $VerificarIp=$ObtenerIp->getAll();\n \n if($VerificarIp!=NULL){\n \n return true; //Retorna true si se encontra el usuario\n }\n else{\n \n return false; //Retorna false si no se encuentra el usuario\n }\n \n }", "function userExists($uid)\r\n {\r\n return $this->UD->userExists($uid);\r\n }", "public function user_exists($staff_id){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` WHERE `staff_id` = '$staff_id'\";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user exists \n if(mysqli_num_rows($run_select_query) > 0){\n //check if \n return true;\n }else{\n return false;\n }\n }\n }", "function userExists($username){\r\n $sql = \"SELECT username FROM users WHERE username = '$username'\";\r\n $count = $this->q()->num_rows;\r\n if ($count > 0 ){ return true; } else{ return false; }\r\n }", "function userExists($username, $name, $email) {\n $dbo =& JFactory::getDBO();\n $query = 'SELECT id FROM #__users ' .\n 'WHERE username = ' . $dbo->quote($username) . ' ' .\n 'AND name = ' . $dbo->quote($name) . ' ' .\n 'AND email = ' . $dbo->quote($email);\n \n $dbo->setQuery($query);\n // Checking subscription existence\n if ($user_info = $dbo->loadObjectList()) {\n if (! empty ($user_info)) {\n $user = $user_info[0];\n return $user->id;\n }\n }\n return false;\n }", "public function checkIfAvailable(){\n $user_check_query = self::$connection->db->prepare(\"SELECT * FROM users WHERE name = ? OR email = ?\");\n $user_check_query->bind_param(\"ss\", self::$signUpName, self::$signUpEmail);\n $user_check_query->execute();\n $users = $user_check_query->get_result()->fetch_assoc();\n $user_check_query->close();\n $nameError = false;\n $emailError = false;\n $_POST = array();\n if (isset($users)) {\n foreach($users as $key=>$value) {\n if (strtolower($users['name']) === strtolower(self::$signUpName) && !$nameError) {\n self::addError(\"signUp\", \"Name already exists.\");\n $nameError = true;\n Auth::CreateView('Auth');\n };\n if ($users['email'] === self::$signUpEmail && !$emailError) {\n self::addError(\"signUp\", \"Email already exists.\");\n $emailError = true;\n Auth::CreateView('Auth');\n };\n }\n } else if(count(self::$signUpErrors) === 0){\n $this->registering();\n return true;\n }\n }", "function autenticado(){\n\tif(isset($_SESSION['DNI'])){//Si existe, existe\n\t\treturn true;\n\t}else{//Si no existe, no existe\n\t\treturn false;\n\t}\n}", "public function userExists($userId) {\n\t\t$sql = \"select userName from user where userName = ? LIMIT 1\";\n\t\t$result = $this->executeQuery($sql, array($userId));\n\t\treturn count($result) == 1; \n\t}", "private function verifyAccount()\n {\n $check = $this->db->query('SELECT users.password, users.id FROM users WHERE username = ?', $this->username)->fetchArray();\n //Check of de user in de database staat.\n if (isset($check['password'])) {\n //Check of de password matched\n if (password_verify($this->password, $check['password'])) {\n echo \"AUTH verify complete\";\n $this->setLoggedinUser($check['id']);\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function _userntexists($input) {\n\n\t\t$prepare \t= $this->db->prepare(\"SELECT * FROM `users` WHERE `username` = ?\");\n\t\t$prepare->execute(array(r::post($input)));\n\t\t$result \t= $prepare->fetch();\n\n\t\tif(empty($result)) {\n\t\t\treturn true;\n\t\t}\n\t}", "private function userExist(){\n $result = $this->facebookModel->project(array(\"User_id\" => true, \"Current_city\" => true, \"_id\" => false))->get()->count();\n return $result;\n }", "function existsUser($user){\n $users = array();\n $table = $this->getTableConstant();\n $query_selectUser = \"SELECT * FROM $table WHERE user=?\";\n $statement = $this->connection->prepare($query_selectUser);\n $statement->bind_param('s', $user);\n $statement->execute();\n $result = $statement->get_result();\n while($result->fetch_assoc()){\n return true;\n }\n return false;\n }", "public static function HayAdministradores(){\n $usuario = new Usuario();\n $result = (new Usuario())->FindBy([\"tipo = '\".USUARIO::TIPO_ADMINISTRADOR.\"'\"]);\n return (count($result) > 0);\n }", "private function userExists($username){ return $this->redis->exists($username);\n }", "function exists($userName)\n{\n\treturn (bool)$this->getUser($userName);\n}", "function checkUserExists($username){\n\treturn false;\n}", "public function hasUsername() : bool;", "function verify_username_availability($userName){\n $exists = false;\n if(get_user($userName)){\n $exists = true;\n }\n return $exists;\n}", "function existUsuarios($USUAID)\n\t{\n\t\t$sql = \"SELECT * FROM usuarios WHERE USUAID=$USUAID\";\n\t\t$this->consult = $this->connection->Execute($sql);\n\t\tif ($this->consult->fields)\n\t\t\treturn 1;\n\t}", "function username_exist($user){\n\t\t$db = new mysql();\n\t\t$query = \"SELECT*FROM user WHERE username='$user'\";\n\t\t$x = $db->numofrows($query);\n\t\tif($x > 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.7794566", "0.766299", "0.75452787", "0.7455723", "0.73666817", "0.73455405", "0.7342811", "0.7307983", "0.72979546", "0.7246181", "0.72416055", "0.72205603", "0.72183317", "0.72039676", "0.7191013", "0.717983", "0.71531373", "0.71491385", "0.7140143", "0.71374285", "0.7116933", "0.7104135", "0.7103291", "0.709513", "0.70705956", "0.70633894", "0.70468515", "0.70404655", "0.7020422", "0.701409", "0.7007821", "0.69952756", "0.6990805", "0.6985572", "0.69777054", "0.69553155", "0.6948568", "0.69326806", "0.6925772", "0.69165343", "0.69006145", "0.6883456", "0.68834263", "0.6872703", "0.68608636", "0.68585366", "0.685773", "0.68575215", "0.68520355", "0.68466747", "0.6843158", "0.68417424", "0.6830866", "0.68207264", "0.681898", "0.6808937", "0.68080693", "0.6806617", "0.67996633", "0.6796602", "0.67952126", "0.6791547", "0.6758428", "0.6757508", "0.67572117", "0.6735353", "0.6734333", "0.67270607", "0.6710524", "0.67104465", "0.67099637", "0.6709734", "0.6705478", "0.6705418", "0.6702356", "0.6696155", "0.6696038", "0.6693697", "0.66933954", "0.66895676", "0.66788834", "0.6674519", "0.6674031", "0.66732186", "0.667248", "0.66697466", "0.66567695", "0.6656724", "0.6650905", "0.6648324", "0.6646115", "0.664545", "0.66407347", "0.66386145", "0.66374934", "0.66365147", "0.66349465", "0.6627717", "0.6627079", "0.6626794", "0.66256976" ]
0.0
-1
Handle an incoming request.
public function handle($request, Closure $next) { $agent = new Agent(); if ( \Auth::check() ) { Auditor::create([ 'user_id' => \Auth::user()->id, 'method' => $request->getMethod(), 'path' => $request->getPathInfo(), 'query' => $request->getQueryString(), 'userAgent' => $agent->getUserAgent(), 'ip' => \Request::ip(), 'device' => $agent->device(), 'platform' => $agent->platform(), 'browser' => $agent->browser(), 'isDesktop' => $agent->isDesktop(), 'isMobile' => $agent->isMobile(), 'isPhone' => $agent->isPhone(), 'isTablet' => $agent->isTablet() ]); } return $next($request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $request);", "public function handle($request);", "public function handleRequest() {}", "function handleRequest() ;", "public function handle(Request $request);", "protected function handle(Request $request) {}", "public function handle(array $request);", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }", "abstract protected function process(Request $request);", "public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }", "abstract function handle(Request $request, $parameters);", "protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }", "public function handle(ServerRequestInterface $request);", "public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }", "function handle(Request $request = null, Response $response = null);", "public function processRequest();", "public abstract function processRequest();", "public function handleRequest(Request $request, Response $response);", "abstract public function processRequest();", "public function handle(array $request = []);", "public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }", "public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }", "protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }", "public function process(Request $request, Response $response, RequestHandlerInterface $handler);", "public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }", "public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function handle(Request $request): Response;", "public static function process_http_request()\n {\n }", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "abstract public function handle(ServerRequestInterface $request): ResponseInterface;", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}", "public function handle($request, $next);", "public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }", "public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }", "public function process($path, Request $request);", "public function handle(string $query, ServerRequestInterface $request);", "public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}", "public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }", "public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }", "public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }", "final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }", "public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "function handleRequest() {\n // I. On récupère l'action demandée par l'utilisateur, avec retrocompatibilité\n // Controller et Entité\n $entityName = (isset($_GET['controller']) ? $_GET['controller'] : \"article\");\n // on retravaille le nom pour obtenir un nom de la forme \"Article\"\n $entityName = ucfirst(strtolower($entityName));\n\n // Action\n $actionName = (isset($_GET['action']) ? $_GET['action'] : \"index\");\n $actionName = strtolower($actionName);\n\n // II à IV sont maintenant dans loadDep\n $controller = $this->loadDependencies($entityName);\n\n // V. On regarde si l'action de controller existe, puis on la charge\n // on retravaille la var obtenue pour obtenir un nom de la forme \"indexAction\"\n $action = $actionName . \"Action\";\n\n // si la méthode demandée n'existe pas, remettre \"index\"\n if (!method_exists($controller, $action)) {\n $actionName = \"index\";\n $action = \"indexAction\";\n }\n\n // on stock le titre sous la forme \"Article - Index\"\n $this->title = $entityName . \" - \" . $actionName;\n\n // on appelle dynamiquement la méthode de controller\n $this->content = $controller->$action();\n }", "public function handle(RequestInterface $request): ResponseInterface;", "public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }", "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );", "protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}", "public function handleHttpRequest($requestParams)\n\t{\n\t\t$action = strtolower(@$requestParams[self::REQ_PARAM_ACTION]);\t\t\n\t\t$methodName = $this->actionToMethod($action);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->$methodName($requestParams);\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\techo \"Error: \".$e->getMessage();\n\t\t}\n\t}", "public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}", "public function handle() {\n $this->initDb(((!isset(self::$_config['db']['type'])) ? 'mysql' : self::$_config['db']['type']));\n $request = new corelib_request(self::$_config['routing'], self::$_config['reg_routing']);\n $path = parse_url($_SERVER['REQUEST_URI']);\n\n if (self::$_config['home'] == \"/\" || self::$_config['home'] == \"\") {\n $uri = ltrim($path['path'], '/');\n } else {\n $uri = str_replace(self::$_config['home'], '', $path['path']);\n }\n\n if (\"\" == $uri || \"/\" == $uri) {\n $uri = self::$_config['routing']['default']['controller'] . '/' . self::$_config['routing']['default']['action'];\n }\n self::$isAjax = $request->isAjax();\n self::$request = $request->route($uri);\n self::$request['uri'] = $uri;\n\n if (self::$request['action'] == \"\")\n self::$request['action'] = self::$_config['routing']['default']['action'];\n\n $this->_run( self::$request['params'] );\n }", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }", "public function handle(ClientInterface $client, RequestInterface $request, HttpRequest $httpRequest);", "public function handleRequest() {\n $questions=$this->contactsService->getAllQuestions(\"date\");\n //load all the users\n $userList = User::loadUsers();\n //load all the topics\n \t\t$topics = $this->contactsService2->getAllTopics(\"name\");\n \t\t\n\t\t\t\trequire_once '../view/home.tpl';\n\t}", "public function serve_request()\n {\n }", "public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}", "function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }", "public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}", "private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }", "function handle()\n {\n $this->verifyPost();\n\n $postTarget = $this->determinePostTarget();\n\n $this->filterPostData();\n\n switch ($postTarget) {\n case 'upload_media':\n $this->handleMediaFileUpload();\n break;\n case 'feed':\n $this->handleFeed();\n break;\n case 'feed_media':\n $this->handleFeedMedia();\n break;\n case 'feed_users':\n $this->handleFeedUsers();\n break;\n case 'delete_media':\n $this->handleDeleteMedia();\n break;\n }\n }", "public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}", "public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }", "public function RouteRequest ();", "public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;", "public function DispatchRequest ();", "protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}", "public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}", "abstract public function request();", "public function run() {\r\n $this->routeRequest(new Request());\r\n }", "public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);", "public function handle(Request $request, Closure $next);", "public function handleGetRequest($id);", "abstract function doExecute($request);", "public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }", "abstract public function mapRequest($request);", "public function handle(ServerRequestInterface $request)\n {\n $router = $this->app->get(RouterInterface::class);\n $response = $router->route($request);\n\n if (! headers_sent()) {\n\n // Status\n header(sprintf(\n 'HTTP/%s %s %s',\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase()\n ));\n\n // Headers\n foreach ($response->getHeaders() as $name => $values) {\n foreach ($values as $value) {\n header(sprintf('%s: %s', $name, $value), false);\n }\n }\n }\n\n echo $response->getBody()->getContents();\n }", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "private function handleRequest()\n {\n // we check the inputs validity\n $validator = Validator::make($this->request->only('rowsNumber', 'search', 'sortBy', 'sortDir'), [\n 'rowsNumber' => 'required|numeric',\n 'search' => 'nullable|string',\n 'sortBy' => 'nullable|string|in:' . $this->columns->implode('attribute', ','),\n 'sortDir' => 'nullable|string|in:asc,desc',\n ]);\n // if errors are found\n if ($validator->fails()) {\n // we log the errors\n Log::error($validator->errors());\n // we set back the default values\n $this->request->merge([\n 'rowsNumber' => $this->rowsNumber ? $this->rowsNumber : config('tablelist.default.rows_number'),\n 'search' => null,\n 'sortBy' => $this->sortBy,\n 'sortDir' => $this->sortDir,\n ]);\n } else {\n // we save the request values\n $this->setAttribute('rowsNumber', $this->request->rowsNumber);\n $this->setAttribute('search', $this->request->search);\n }\n }", "public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}", "protected function handle(Request $request)\n {\n return 1;\n }", "public function __invoke(Request $request, RequestHandler $handler) {\n R::setup('mysql:host=127.0.0.1;dbname=cellar','root','');\n \n $response = $handler->handle($request);\n R::close();\n return $response;\n }", "public function handle($req)\n {\n $params = $req->post ?: [];\n\n $files = $this->transformFiles($req->files);\n\n $cookies = $req->cookie ?: [];\n\n $server = $this->transformHeadersToServerVars(array_merge($req->header, [\n 'PATH_INFO' => array_get($req->server, 'path_info'),\n ]));\n $server['X_REQUEST_ID'] = Str::uuid()->toString();\n\n $requestUri = $req->server['request_uri'];\n if (isset($req->server['query_string']) && $req->server['query_string']) {\n $requestUri .= \"?\" . $req->server['query_string'];\n }\n\n $resp = $this->call(\n strtolower($req->server['request_method']),\n $requestUri, $params, $cookies, $files,\n $server, $req->rawContent()\n );\n\n return [\n 'status' => $resp->getStatusCode(),\n 'headers' => $resp->headers,\n 'body' => $resp->getContent(),\n ];\n }", "public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }" ]
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", "0.71463037", "0.7126907", "0.7122795", "0.71225274", "0.7116879", "0.70607233", "0.6981947", "0.6966695", "0.69393975", "0.6912079", "0.68985975", "0.6887614", "0.68774897", "0.6806274", "0.67969805", "0.67778915", "0.6762979", "0.67565143", "0.67533374", "0.67192745", "0.6683243", "0.66487724", "0.66395754", "0.6634629", "0.66283566", "0.6617558", "0.6610097", "0.6610011", "0.6544976", "0.653806", "0.6512757", "0.64682734", "0.64381886", "0.6416964", "0.63373476", "0.63359964", "0.6334543", "0.63308066", "0.6321675", "0.63176167", "0.631661", "0.6310991", "0.63108873", "0.6295945", "0.6279438", "0.62778515", "0.62508965", "0.62422955", "0.62321424", "0.62237644", "0.6203428", "0.61954546", "0.6191255", "0.61774665", "0.61682004", "0.6151806", "0.61271876", "0.61257905", "0.6116093", "0.61126447", "0.6112368", "0.6101652", "0.60893977", "0.60871464", "0.60862815", "0.60734737", "0.60535145", "0.6028341", "0.60250086", "0.60224646", "0.6011745", "0.6011483", "0.60106593", "0.5998867", "0.5997086", "0.5991233", "0.59844923", "0.59668386", "0.5961315", "0.5954762" ]
0.0
-1
Register any application services.
public function register() { $this->setNamespace('plugins/wordpress-importer') ->loadAndPublishViews() ->loadAndPublishTranslations() ->publishAssets() ->loadRoutes(['web']); Event::listen(RouteMatched::class, function () { dashboard_menu() ->registerItem([ 'id' => 'cms-plugin-wordpress-importer', 'priority' => 99, 'parent_id' => 'cms-core-settings', 'name' => 'plugins/wordpress-importer::wordpress-importer.name', 'icon' => null, 'url' => route('wordpress-importer'), 'permissions' => ['settings.options'], ]); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1